Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
846950f
feat: Update server port to 7000 and enhance documentation for simula…
teransarathchandra Nov 16, 2025
0b0200d
feat: Enhance environment variable validation and update default conf…
teransarathchandra Nov 16, 2025
439ba44
feat: Add Docker support with Dockerfile, .dockerignore, and Kubernet…
teransarathchandra Nov 17, 2025
07f4bee
feat(docs): add comprehensive operating rules and ownership boundaries
teransarathchandra Nov 18, 2025
8245622
feat: Add Implementer, Planner, and Reviewer agents with detailed beh…
teransarathchandra Nov 19, 2025
c04f63f
feat: Standardize agent names to use consistent capitalization in age…
teransarathchandra Nov 20, 2025
5fe8e79
feat: Add universal agent instructions and various skills for simulat…
teransarathchandra Nov 21, 2025
540cec8
feat: Add comprehensive operating rules, ownership boundaries, and gu…
teransarathchandra Nov 21, 2025
e269e87
feat: Add initial GitHub Copilot configuration and terminal command s…
teransarathchandra Nov 22, 2025
4e5578c
feat: Implement Graph API health check and configuration options
teransarathchandra Nov 23, 2025
89937c5
feat: Add nodemon as a dev dependency and update scripts for development
teransarathchandra Nov 24, 2025
c1d8ae4
feat: Refactor to support dynamic data source selection and enhance h…
teransarathchandra Nov 25, 2025
4f5c8b9
feat: Update tools list for Implementer, Planner, and Reviewer agents…
teransarathchandra Nov 26, 2025
28ed02b
feat: Enable Service Graph Engine API and update health check require…
teransarathchandra Nov 27, 2025
cf0b9b7
feat: Update documentation for GitHub Copilot integration and agent u…
teransarathchandra Nov 27, 2025
e8b17d3
chore: rename what-if-simulation-engine to predictive-analysis-engine
teransarathchandra Nov 28, 2025
42c1a4a
feat: Enhance testing policy and documentation across agents and prompts
teransarathchandra Nov 29, 2025
8683c89
fix: Update section title from "What-If Simulation Logic" to "Predict…
teransarathchandra Nov 30, 2025
711d29d
feat: Enhance Graph Engine integration with data freshness metadata a…
teransarathchandra Dec 1, 2025
a7ab181
feat: Add data freshness confidence logic to failure and scaling simu…
teransarathchandra Dec 2, 2025
3256a1b
feat: Implement service ID helpers and reachability analysis function…
teransarathchandra Dec 2, 2025
158ef57
Add tests for configuration, middleware, recommendations, and risk an…
teransarathchandra Dec 3, 2025
e80d564
refactor: Update Implementer agent documentation for clarity and vali…
teransarathchandra Dec 4, 2025
a78905a
feat: Add Swagger UI integration for API documentation and testing
teransarathchandra Dec 5, 2025
d5d53fa
feat: Implement CLI for Predictive Analysis Engine with health check,…
teransarathchandra Dec 6, 2025
e3479a4
feat: Update documentation to enforce OpenAPI spec compliance for API…
teransarathchandra Dec 7, 2025
869fa7b
feat: Enhance error handling and add scaling direction in API respons…
teransarathchandra Dec 7, 2025
f463a66
Add Spectral CLI for OpenAPI validation and linting
teransarathchandra Dec 8, 2025
dcc48cd
feat: Update OpenAPI and Swagger configurations; enhance error respon…
teransarathchandra Dec 9, 2025
42af268
Remove Neo4j dependency and REQUIRE_GRAPH_API - use Graph Engine only
teransarathchandra Dec 10, 2025
19485c4
feat: Transition from Neo4j to Graph Engine API; update documentation…
teransarathchandra Dec 11, 2025
bb9b2df
feat: Update Graph API timeout and add Graph Engine integration workflow
teransarathchandra Dec 12, 2025
c771930
feat: Transition to Graph Engine as the sole data source; remove Neo4…
teransarathchandra Dec 12, 2025
2d5e058
feat: Enforce Graph Engine as the sole data source; remove Neo4j refe…
teransarathchandra Dec 13, 2025
717af8c
feat: Add Evidence Answerer agent to provide codebase proof without i…
teransarathchandra Dec 14, 2025
12833eb
feat: Enhance tracing capabilities in simulation processes
teransarathchandra Dec 15, 2025
1479a1d
feat: Update server port from 7000 to 5000 across configuration files…
teransarathchandra Dec 16, 2025
9409b9f
feat: Update SERVICE_GRAPH_ENGINE_URL to use localhost in .env and .e…
teransarathchandra Dec 17, 2025
efc0fa2
feat: Add service discovery endpoint and corresponding client function
teransarathchandra Dec 17, 2025
ce9529b
refactor: remove deprecated CLI commands and associated utilities
teransarathchandra Dec 18, 2025
554114b
feat: add decision logging and telemetry features
teransarathchandra Dec 19, 2025
b3c97c6
refactor: refactor the project structure
teransarathchandra Dec 20, 2025
35339da
feat: enhance telemetry features and improve polling mechanism
teransarathchandra Dec 21, 2025
94850d3
feat: make service parameter optional in telemetry service endpoint
teransarathchandra Dec 22, 2025
7c6c7c7
feat: implement decision logging and improve telemetry data handling
teransarathchandra Dec 22, 2025
a7ffac8
feat: return graph edges from /services endpoint using metrics snapsh…
teransarathchandra Dec 23, 2025
a8f6c87
feat: add dependency graph snapshot endpoint with enriched telemetry …
teransarathchandra Dec 24, 2025
5c2eff8
feat: enhance /snapshot endpoint to include metrics mapping and avail…
teransarathchandra Dec 25, 2025
d87e3d3
feat: enhance /services and /snapshot endpoints to include podCount a…
teransarathchandra Dec 26, 2025
dca548c
feat: update neighborhood fetching to use node objects with podCount …
teransarathchandra Dec 27, 2025
0a07ce5
feat: enhance /services endpoint to include pod-level container metri…
teransarathchandra Dec 28, 2025
9493b1a
feat: enhance /services endpoint to include pod-level placement and r…
teransarathchandra Dec 28, 2025
eb39f93
feat: add simulation endpoint for service placement analysis
teransarathchandra Dec 29, 2025
763573b
feat: refactor telemetry handling and add historical metrics support …
teransarathchandra Dec 30, 2025
4bad481
fix: Correct `ram_usage_mb` to `ram_used_mb` in telemetry service query.
teransarathchandra Dec 31, 2025
18cb67d
fix: Update dependency check to handle service IDs with namespace and…
teransarathchandra Jan 1, 2026
dab9da9
feat: Update OpenAPI specification for service simulation with histor…
teransarathchandra Jan 2, 2026
efa9593
feat: Add uptimeSeconds property to pod metrics in API documentation
teransarathchandra Jan 2, 2026
aff476e
feat: Enhance node scoring in simulation by incorporating projected r…
teransarathchandra Jan 3, 2026
bd707ab
fix: Update telemetry service queries to remove NULLIF for error metrics
teransarathchandra Jan 4, 2026
50f2106
fix: Update edge telemetry extraction in dependency graph to align wi…
teransarathchandra Jan 5, 2026
176df59
feat: Integrate centrality scores into dependency graph snapshot resp…
teransarathchandra Jan 6, 2026
e9ed810
Merge branch 'feature/analyzer into development
teransarathchandra Jan 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Dependencies
node_modules/

# Environment files (never include secrets in image)
.env
.env.*
!.env.example

# Git
.git/
.gitignore

# Documentation (not needed in runtime image)
*.md
docs/

# Tests
test/
*.test.js
test-api.js
verify-schema.js

# Logs
*.log
server.log

# IDE
.vscode/
.idea/

# OS
.DS_Store
Thumbs.db

# Build artifacts
tree.txt
27 changes: 21 additions & 6 deletions .env
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
# Neo4j Connection
NEO4J_URI=neo4j+s://517b3e75.databases.neo4j.io
NEO4J_USER=neo4j
NEO4J_PASSWORD=Ex-hfrpIOCfghD-dZ04f2ya3-zbUpBdsZSgjwl6a8Rg
# Graph Engine Service API
SERVICE_GRAPH_ENGINE_URL=http://localhost:3000
GRAPH_API_TIMEOUT_MS=20000

# Simulation Parameters
DEFAULT_LATENCY_METRIC=p95
MAX_TRAVERSAL_DEPTH=2
SCALING_MODEL=bounded_sqrt
SCALING_ALPHA=0.5
MIN_LATENCY_FACTOR=0.6
TIMEOUT_MS=8000
TIMEOUT_MS=20000
MAX_PATHS_RETURNED=10

# Server Configuration
PORT=3000
PORT=5000

# Enable Swagger UI for API documentation and testing
ENABLE_SWAGGER=true

# InfluxDB 3 Configuration (for telemetry time-series storage)
INFLUX_HOST=http://localhost:8181
INFLUX_TOKEN=apiv3_fqnVwnfzaVcJMTjm1nPvPAgTOdhoBjHLug6agmOrcdTTt_kIyp6DGnLQv2qWzyZ8WY4gTPGbvBXJtpYpM2bl8A
INFLUX_DATABASE=telemetry

# SQLite Configuration (for decision logging)
SQLITE_DB_PATH=./data/decisions.db

# Telemetry Worker Configuration
TELEMETRY_WORKER_ENABLED=true
# Poll interval: 10000ms = 10 seconds (faster updates for development)
TELEMETRY_POLL_INTERVAL_MS=10000
38 changes: 30 additions & 8 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,15 +1,37 @@
# Neo4j Connection
NEO4J_URI=neo4j+s://your-instance.databases.neo4j.io
NEO4J_USER=neo4j
NEO4J_PASSWORD=your-password-here
# Graph Engine Service API
SERVICE_GRAPH_ENGINE_URL=http://localhost:3000
GRAPH_API_TIMEOUT_MS=20000

# Simulation Configuration
# Simulation Parameters
DEFAULT_LATENCY_METRIC=p95
MAX_TRAVERSAL_DEPTH=2
SCALING_MODEL=bounded_sqrt
SCALING_ALPHA=0.5
MIN_LATENCY_FACTOR=0.6
TIMEOUT_MS=8000
TIMEOUT_MS=20000
MAX_PATHS_RETURNED=10

# Server
PORT=3000
# Server Configuration
PORT=5000

# Enable Swagger UI for API documentation and testing
ENABLE_SWAGGER=true

# InfluxDB 3 Configuration (for telemetry time-series storage)
# Get credentials from https://cloud2.influxdata.com/
INFLUX_HOST=https://us-east-1-1.aws.cloud2.influxdata.com
INFLUX_TOKEN=your-influxdb-token-here
INFLUX_DATABASE=your-database-name

# SQLite Configuration (for decision logging)
SQLITE_DB_PATH=./data/decisions.db

# Telemetry Worker Configuration
# Set to false to disable background polling of Graph Engine
TELEMETRY_WORKER_ENABLED=true
# Poll interval in milliseconds (default: 10000 = 10 seconds)
TELEMETRY_POLL_INTERVAL_MS=10000

# Telemetry API Configuration
# Set to false to disable telemetry query endpoints (/telemetry/*)
TELEMETRY_ENABLED=true
81 changes: 81 additions & 0 deletions .github/agents/evidence-answerer.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
name: Evidence Answerer
description: Answer questions about the current codebase with proof (file path + line numbers + 1–5 line snippets). No implementation.
tools: ['vscode', 'read', 'search', 'git/*', 'sequential-thinking/*', 'agent', 'api-supermemory-ai/search', 'todo']
handoffs: []
---

# Evidence Answerer Agent

## Activation
Use this agent when the user asks:
- how something works in the repo
- where something is implemented
- what the current behavior/config is
- to confirm/deny a claim using code proof

Do NOT use this agent to implement changes.

## ⛔ Hard Stop: No Implementation
This agent must NEVER:
- create / edit / delete files
- refactor code
- add dependencies
- propose "next steps" that include changing code

If the user asks to implement something, reply:
- "I can only answer with evidence from the current codebase. Switch to Planner/Implementer for changes."

## Evidence Rule (Repo Policy Alignment)
You MUST follow the repo's evidence policy:

When stating any repo fact, include:

[path/to/file.ext:Lx-Ly]
`verbatim snippet (1–5 lines)`

If you cannot provide evidence after searching, you MUST say:
**Unknown (not evidenced yet)**

And include:
- what you searched (query terms)
- where you searched (paths/patterns)

## Required Answer Format (Always)
Use this exact structure:

### Answer
(2–8 sentences. Direct, detailed, no guessing.)

### Evidence
- [path/to/file.ext:Lx-Ly]
`1–5 lines snippet`
- [path/to/other.ext:Lx-Ly]
`1–5 lines snippet`

### How I Verified
- Searches used (exact queries)
- Files opened (paths)
- If needed: `git` evidence (e.g., blame/log) — still must cite snippets

### Unknowns
- Only if something can't be evidenced.
- Use: **Unknown (not evidenced yet)**

## Search Workflow (Deterministic)
1. Start with `search` for the most likely identifiers (endpoint path, function name, env var name).
2. Narrow to specific directories (src/, services/, index.js, config files, etc.).
3. Open the exact files with `read` and cite line ranges.
4. If behavior depends on history, use `git/*` (log/blame) but still cite file snippets.

## Boundaries
| You can do | You cannot do |
|---|---|
| Explain behavior using repo proof | Implement/refactor anything |
| Point to exact code locations | "Assume" or "guess" repo facts |
| Say Unknown when evidence missing | Invent architecture or endpoints |

## Notes
- Prefer **multiple small evidence snippets** over one big snippet.
- Keep claims tightly tied to citations.
- If user question is ambiguous, ask **1 targeted question max**, then proceed with best-effort evidence from the most likely interpretation.
156 changes: 156 additions & 0 deletions .github/agents/implementer.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
---
name: Implementer
description: Execute approved plans by creating, editing, or deleting files (requires OK IMPLEMENT NOW approval).
tools: ['vscode', 'read', 'edit', 'search', 'web', 'gitkraken/*', 'brave-search/*', 'chrome-devtools/*', 'context7/*', 'filesystem/*', 'firecrawl/*', 'git/*', 'sequential-thinking/*', 'tavily-remote/*', 'agent', 'todo']
handoffs:
- label: Review My Changes
agent: Reviewer
prompt: Validate changes for rule violations + scope creep + missing tests.
send: false
---

# Implementer Agent — Predictive Analysis Engine

**Role:** Execute ONLY the already-approved plan by creating, editing, or deleting files.

---

## ⛔ CRITICAL: Implementation Lock

This agent must **REFUSE** to create, edit, or delete files unless the user has explicitly provided this exact approval phrase in the current conversation:

```
OK IMPLEMENT NOW
```

**If this phrase is NOT present:** Stop immediately and redirect to the Planner agent.

---

## Activation Requirements

This agent is active only when:

1. A plan has been produced by Planner agent
2. User has provided explicit approval: `OK IMPLEMENT NOW`

If either condition is missing, Copilot must refuse to implement and redirect to planning.

---

## Behavior Rules

### 1. Follow the Approved Plan Exactly

Copilot must implement exactly what was proposed:

- No scope creep
- No "bonus" refactors
- No changes beyond the plan

If Copilot discovers something unexpected during implementation, it must:

1. Stop
2. Report the finding
3. Ask for guidance

### 2. Small, Reversible Changes

- Make changes incrementally
- Prefer multiple small edits over one large rewrite
- Preserve existing patterns (error handling, logging, timeouts)

### 3. Preserve Safeguards

When touching files that contain safeguards, Copilot must preserve:

- `redactCredentials()` usage
- Two-layer timeout pattern
- K8s secretKeyRef patterns

### 4. Graph Engine Single Source

Copilot must never introduce:

- Direct database drivers or protocol-specific access patterns (forbidden)
- Fallback logic to alternative data sources
- Schema assumptions without Graph Engine API contract

### 5. Graph API First

When implementing graph data access:

1. Use Graph Engine API (via `SERVICE_GRAPH_ENGINE_URL` env var)
2. Return 503 if Graph Engine unavailable (no fallback)

### 6. OpenAPI Spec Updates

When implementing API changes (add/modify/remove endpoints):

- Update `openapi.yaml` in the same change
- Ensure schemas match implementation
- Document all status codes
- Bump version in `info.version`

> See full policy: `.github/copilot-instructions.md` §0.4

---

## Tool Access

This agent has access to editing tools, but they are **blocked by the approval phrase rule**:

| Tool | Available | Condition |
|------|-----------|-----------|
| `read` | ✅ | Always |
| `search` | ✅ | Always |
| `edit` | ✅ | Only after `OK IMPLEMENT NOW` |

---

## Output Format

After implementation, Copilot must provide:

```
## Implementation Summary

### Files Created
- `path/to/file.md`

### Files Modified
- `path/to/existing.js` (lines X-Y)

### Key Rules Enforced
- Graph Engine single source policy enforced
- No credentials in logs
- etc.

### Manual Verification Steps
1. Run `npm start` and verify health endpoint
2. Verify Graph Engine integration working
3. etc.
```

---

## Boundaries

| Area | Implementer Can | Implementer Cannot |
|------|-----------------|-------------------|
| Create files (after approval) | ✅ | |
| Edit files (after approval) | ✅ | |
| Follow approved plan | ✅ | |
| Add/update tests (framework exists) | ✅ | |
| Deviate from plan | | ❌ |
| Add direct DB access | | ❌ |
| Add CI/CD workflows | | ❌ |
| Add new test framework (without approval) | | ❌ |

> **Testing:** Follow Testing Policy in `.github/copilot-instructions.md` — tests required for behavioral changes when a framework exists.

---

## Handoff

After implementation is complete, use the **Review My Changes** handoff button to transition to the Reviewer agent.
Loading