@praneeth_54/agentdoctor 1.1.1 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +164 -7
- package/README.md +263 -513
- package/dist/agents/aider/adapter.d.ts +1 -0
- package/dist/agents/aider/adapter.js +1 -0
- package/dist/agents/aider/detector.d.ts +14 -0
- package/dist/agents/aider/detector.js +120 -0
- package/dist/agents/copilot/adapter.d.ts +1 -0
- package/dist/agents/copilot/adapter.js +1 -0
- package/dist/agents/copilot/detector.d.ts +13 -0
- package/dist/agents/copilot/detector.js +113 -0
- package/dist/agents/gemini/adapter.d.ts +1 -0
- package/dist/agents/gemini/adapter.js +1 -0
- package/dist/agents/gemini/detector.d.ts +13 -0
- package/dist/agents/gemini/detector.js +151 -0
- package/dist/agents/registry.js +13 -1
- package/dist/agents/types.d.ts +1 -1
- package/dist/agents/windsurf/adapter.d.ts +1 -0
- package/dist/agents/windsurf/adapter.js +1 -0
- package/dist/agents/windsurf/detector.d.ts +14 -0
- package/dist/agents/windsurf/detector.js +119 -0
- package/dist/architecture/c4.d.ts +22 -0
- package/dist/architecture/c4.js +62 -0
- package/dist/architecture/contract.d.ts +64 -0
- package/dist/architecture/contract.js +373 -0
- package/dist/assurance/change.d.ts +211 -0
- package/dist/assurance/change.js +624 -0
- package/dist/assurance/proof.d.ts +136 -0
- package/dist/assurance/proof.js +338 -0
- package/dist/auth/index.d.ts +81 -0
- package/dist/auth/index.js +130 -0
- package/dist/auth/rbac.d.ts +9 -0
- package/dist/auth/rbac.js +26 -0
- package/dist/cli/commands/architecture.d.ts +6 -0
- package/dist/cli/commands/architecture.js +109 -0
- package/dist/cli/commands/assurance.d.ts +67 -0
- package/dist/cli/commands/assurance.js +210 -0
- package/dist/cli/commands/brain.d.ts +12 -0
- package/dist/cli/commands/brain.js +162 -0
- package/dist/cli/commands/complete.d.ts +23 -0
- package/dist/cli/commands/complete.js +232 -0
- package/dist/cli/commands/explain.js +1 -1
- package/dist/cli/commands/fix.js +22 -2
- package/dist/cli/commands/mcp.d.ts +8 -0
- package/dist/cli/commands/mcp.js +14 -0
- package/dist/cli/commands/platform.d.ts +17 -0
- package/dist/cli/commands/platform.js +195 -0
- package/dist/cli/commands/policy-graph-run.d.ts +40 -0
- package/dist/cli/commands/policy-graph-run.js +200 -0
- package/dist/cli/commands/v2.d.ts +55 -0
- package/dist/cli/commands/v2.js +278 -0
- package/dist/cli/commands/workspace.d.ts +9 -0
- package/dist/cli/commands/workspace.js +82 -0
- package/dist/cli/program.js +1328 -3
- package/dist/constants.d.ts +3 -2
- package/dist/constants.js +5 -1
- package/dist/contracts/adapters.d.ts +7 -0
- package/dist/contracts/adapters.js +60 -0
- package/dist/contracts/index.d.ts +162 -0
- package/dist/contracts/index.js +18 -0
- package/dist/core/baseline/store.d.ts +48 -0
- package/dist/core/baseline/store.js +163 -0
- package/dist/core/brain-cli/service.d.ts +26 -0
- package/dist/core/brain-cli/service.js +175 -0
- package/dist/core/brain-product/init.d.ts +45 -0
- package/dist/core/brain-product/init.js +235 -0
- package/dist/core/changes/analyze.d.ts +41 -0
- package/dist/core/changes/analyze.js +223 -0
- package/dist/core/context-health/analyze.d.ts +15 -0
- package/dist/core/context-health/analyze.js +234 -0
- package/dist/core/fix/apply.d.ts +21 -4
- package/dist/core/fix/apply.js +118 -18
- package/dist/core/fix/backup.d.ts +30 -0
- package/dist/core/fix/backup.js +193 -0
- package/dist/core/fix/plan.d.ts +6 -3
- package/dist/core/fix/plan.js +113 -9
- package/dist/core/fix/render.d.ts +2 -0
- package/dist/core/fix/render.js +36 -21
- package/dist/core/fix/run.js +5 -1
- package/dist/core/fix/safe-target.d.ts +14 -0
- package/dist/core/fix/safe-target.js +81 -0
- package/dist/core/fix/types.d.ts +12 -1
- package/dist/core/fix/types.js +2 -0
- package/dist/core/fix/writers/claude-settings.js +3 -1
- package/dist/core/fix/writers/codex-config.d.ts +3 -0
- package/dist/core/fix/writers/codex-config.js +24 -3
- package/dist/core/fix/writers/cursorignore.js +3 -1
- package/dist/core/fix/writers/simple-ignore.d.ts +16 -0
- package/dist/core/fix/writers/simple-ignore.js +68 -0
- package/dist/core/monorepo/detect.d.ts +13 -0
- package/dist/core/monorepo/detect.js +121 -0
- package/dist/core/rules/build-context.js +22 -3
- package/dist/core/rules/context/generated-directory.js +11 -1
- package/dist/core/rules/context/large-instruction-file.js +6 -0
- package/dist/core/rules/context/large-log-file.js +16 -1
- package/dist/core/rules/ignore.d.ts +11 -1
- package/dist/core/rules/ignore.js +22 -1
- package/dist/core/rules/instructions/empty-instructions.js +7 -0
- package/dist/core/rules/security/env-file-exposure.js +23 -2
- package/dist/core/rules/security/private-key-file.js +1 -1
- package/dist/core/scanner/scan.js +1 -1
- package/dist/core/schemas/validate.d.ts +6 -0
- package/dist/core/schemas/validate.js +62 -0
- package/dist/core/scoring/compute-scores.d.ts +1 -1
- package/dist/core/scoring/compute-scores.js +5 -1
- package/dist/core/scoring/placeholder.d.ts +1 -1
- package/dist/core/scoring/placeholder.js +5 -1
- package/dist/core/secrets/scan.d.ts +29 -0
- package/dist/core/secrets/scan.js +172 -0
- package/dist/coverage/cobertura.d.ts +6 -0
- package/dist/coverage/cobertura.js +52 -0
- package/dist/coverage/istanbul.d.ts +7 -0
- package/dist/coverage/istanbul.js +134 -0
- package/dist/coverage/lcov.d.ts +7 -0
- package/dist/coverage/lcov.js +59 -0
- package/dist/coverage/load.d.ts +9 -0
- package/dist/coverage/load.js +39 -0
- package/dist/coverage/types.d.ts +23 -0
- package/dist/coverage/types.js +5 -0
- package/dist/dashboard/server.d.ts +24 -0
- package/dist/dashboard/server.js +402 -0
- package/dist/enforcement/runner.d.ts +67 -0
- package/dist/enforcement/runner.js +460 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.js +25 -0
- package/dist/integrations/github/pr-analyze.d.ts +28 -0
- package/dist/integrations/github/pr-analyze.js +98 -0
- package/dist/integrations/local-ai/provider.d.ts +45 -0
- package/dist/integrations/local-ai/provider.js +104 -0
- package/dist/intelligence/git/analyze.d.ts +34 -0
- package/dist/intelligence/git/analyze.js +136 -0
- package/dist/intelligence/graph/build.d.ts +15 -0
- package/dist/intelligence/graph/build.js +259 -0
- package/dist/intelligence/graph/incremental.d.ts +68 -0
- package/dist/intelligence/graph/incremental.js +234 -0
- package/dist/intelligence/resolve/imports.d.ts +36 -0
- package/dist/intelligence/resolve/imports.js +245 -0
- package/dist/knowledge/store.d.ts +25 -0
- package/dist/knowledge/store.js +91 -0
- package/dist/languages/go.d.ts +9 -0
- package/dist/languages/go.js +45 -0
- package/dist/languages/index.d.ts +11 -0
- package/dist/languages/index.js +76 -0
- package/dist/languages/php.d.ts +7 -0
- package/dist/languages/php.js +193 -0
- package/dist/languages/python.d.ts +7 -0
- package/dist/languages/python.js +150 -0
- package/dist/languages/types.d.ts +42 -0
- package/dist/languages/types.js +26 -0
- package/dist/languages/typescript.d.ts +3 -0
- package/dist/languages/typescript.js +95 -0
- package/dist/mcp/agentdoctor/server.d.ts +16 -0
- package/dist/mcp/agentdoctor/server.js +67 -0
- package/dist/mcp/brain/session.js +7 -7
- package/dist/mcp/intelligence/handlers.d.ts +16 -0
- package/dist/mcp/intelligence/handlers.js +364 -0
- package/dist/mcp/intelligence/path-safety.d.ts +9 -0
- package/dist/mcp/intelligence/path-safety.js +63 -0
- package/dist/mcp/intelligence/registry.d.ts +8 -0
- package/dist/mcp/intelligence/registry.js +228 -0
- package/dist/ops/health.d.ts +18 -0
- package/dist/ops/health.js +51 -0
- package/dist/platform/ai-quality/analyze.d.ts +9 -0
- package/dist/platform/ai-quality/analyze.js +65 -0
- package/dist/platform/architecture/drift.d.ts +17 -0
- package/dist/platform/architecture/drift.js +74 -0
- package/dist/platform/auth/local.d.ts +15 -0
- package/dist/platform/auth/local.js +58 -0
- package/dist/platform/context-security/analyze.d.ts +6 -0
- package/dist/platform/context-security/analyze.js +97 -0
- package/dist/platform/firewall/evaluate.d.ts +57 -0
- package/dist/platform/firewall/evaluate.js +359 -0
- package/dist/platform/graph/build.d.ts +6 -0
- package/dist/platform/graph/build.js +189 -0
- package/dist/platform/health/analyze.d.ts +7 -0
- package/dist/platform/health/analyze.js +192 -0
- package/dist/platform/index.d.ts +27 -0
- package/dist/platform/index.js +89 -0
- package/dist/platform/knowledge/analyze.d.ts +20 -0
- package/dist/platform/knowledge/analyze.js +96 -0
- package/dist/platform/provenance/build.d.ts +44 -0
- package/dist/platform/provenance/build.js +65 -0
- package/dist/platform/readiness/scorecard.d.ts +5 -0
- package/dist/platform/readiness/scorecard.js +98 -0
- package/dist/platform/refactor/impact.d.ts +20 -0
- package/dist/platform/refactor/impact.js +60 -0
- package/dist/platform/reports/export.d.ts +12 -0
- package/dist/platform/reports/export.js +92 -0
- package/dist/platform/security/redact.d.ts +15 -0
- package/dist/platform/security/redact.js +87 -0
- package/dist/platform/sessions/store.d.ts +32 -0
- package/dist/platform/sessions/store.js +97 -0
- package/dist/platform/store.d.ts +6 -0
- package/dist/platform/store.js +57 -0
- package/dist/platform/test-impact/analyze.d.ts +50 -0
- package/dist/platform/test-impact/analyze.js +350 -0
- package/dist/platform/time-machine/compare.d.ts +17 -0
- package/dist/platform/time-machine/compare.js +62 -0
- package/dist/platform/tokens/plan.d.ts +28 -0
- package/dist/platform/tokens/plan.js +108 -0
- package/dist/platform/types.d.ts +120 -0
- package/dist/platform/types.js +5 -0
- package/dist/plugins/runtime.d.ts +36 -0
- package/dist/plugins/runtime.js +101 -0
- package/dist/plugins/sdk.d.ts +29 -0
- package/dist/plugins/sdk.js +114 -0
- package/dist/policy/compose.d.ts +34 -0
- package/dist/policy/compose.js +118 -0
- package/dist/policy/packs.d.ts +9 -0
- package/dist/policy/packs.js +91 -0
- package/dist/reporters/terminal/report.js +38 -5
- package/dist/security/paths.d.ts +21 -0
- package/dist/security/paths.js +105 -0
- package/dist/storage/postgres.d.ts +26 -0
- package/dist/storage/postgres.js +90 -0
- package/dist/storage/provider.d.ts +30 -0
- package/dist/storage/provider.js +109 -0
- package/dist/storage/sqlite.d.ts +33 -0
- package/dist/storage/sqlite.js +77 -0
- package/dist/team/auth.d.ts +35 -0
- package/dist/team/auth.js +70 -0
- package/dist/types/index.d.ts +5 -1
- package/dist/workspace/index.d.ts +69 -0
- package/dist/workspace/index.js +220 -0
- package/package.json +15 -5
package/README.md
CHANGED
|
@@ -1,644 +1,394 @@
|
|
|
1
1
|
# AgentDoctor
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Engineering assurance for AI coding agents.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
AI coding agents can read files. They still lack reliable **repository-level** understanding — what is in a project, what evidence supports a claim, what is dangerous to change, and what must stay **UNKNOWN**.
|
|
8
|
-
|
|
9
|
-
AgentDoctor analyzes a repository, builds a structured **Project Brain** (claims, evidence, confidence, ownership, risks, snapshots, deltas), and exposes it to agents through local **STDIO MCP**.
|
|
5
|
+
Understand your codebase, assess the impact of changes, govern engineering knowledge, enforce safety policies, and attach inspectable evidence to AI-driven changes.
|
|
10
6
|
|
|
11
7
|
[](https://www.npmjs.com/package/@praneeth_54/agentdoctor)
|
|
12
8
|
[](https://github.com/pranee54/AgentDoctor/actions/workflows/ci.yml)
|
|
13
9
|
[](https://nodejs.org)
|
|
14
10
|
[](LICENSE)
|
|
15
11
|
|
|
16
|
-
|
|
12
|
+
**In-repo cut:** `2.0.1` (publish pending human authorization). Last published: [`@praneeth_54/agentdoctor@2.0.0`](https://www.npmjs.com/package/@praneeth_54/agentdoctor)
|
|
17
13
|
|
|
18
|
-
|
|
19
|
-
Repository
|
|
20
|
-
↓
|
|
21
|
-
Project Understanding
|
|
22
|
-
↓
|
|
23
|
-
Project Brain
|
|
24
|
-
↓
|
|
25
|
-
Evidence / Claims / Confidence
|
|
26
|
-
↓
|
|
27
|
-
MCP
|
|
28
|
-
↓
|
|
29
|
-
AI Coding Agent
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Also ships **Safety V1**: Scan → Fix → Verify → Policy → CI for Cursor, Claude Code, and Codex configuration. Brain risk is **change-danger analysis**, not vulnerability scanning.
|
|
14
|
+
[Install](#install) · [Quickstart](#quickstart) · [Change assurance](#change-assurance) · [Documentation](docs/2.0.1/README.md) · [MCP](#mcp) · [GitHub Action](#github-action) · [Architecture](#architecture)
|
|
33
15
|
|
|
34
16
|
---
|
|
35
17
|
|
|
36
|
-
## What is
|
|
37
|
-
|
|
38
|
-
Local developer infrastructure for AI coding agents (`@praneeth_54/agentdoctor`, CLI `agentdoctor`, **1.1.0**, Node.js **20+**).
|
|
39
|
-
|
|
40
|
-
It:
|
|
41
|
-
|
|
42
|
-
- analyzes repositories with deterministic discovery passes
|
|
43
|
-
- builds a structured Project Brain
|
|
44
|
-
- represents claims with typed evidence and confidence
|
|
45
|
-
- preserves **UNKNOWN** when evidence is missing
|
|
46
|
-
- persists snapshots and computes deltas
|
|
47
|
-
- exposes Brain capabilities through MCP (`agentdoctor brain-mcp --root <path>`)
|
|
18
|
+
## What AgentDoctor is
|
|
48
19
|
|
|
49
|
-
|
|
20
|
+
AgentDoctor sits between developers / AI coding agents and the repository’s engineering reality.
|
|
50
21
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
## Why Project Brain?
|
|
54
|
-
|
|
55
|
-
Agents edit with fragmented context. Ownership gets invented. Blast radius stays implicit. “Why should I trust that?” rarely has an answer with a snapshot id.
|
|
22
|
+
AI agents can write code quickly. The harder engineering problem is knowing whether a change is **correct, safe, compatible, explainable, and consistent** with the rest of the repository.
|
|
56
23
|
|
|
57
|
-
|
|
24
|
+
AgentDoctor collects repository signals — source structure, graphs, Git history, policies, knowledge, and verification evidence — so humans and agents can reason about changes with fewer unsupported assumptions.
|
|
58
25
|
|
|
59
|
-
|
|
26
|
+
It is **not** an autonomous coding agent, chatbot, or IDE interceptor. It does **not** guarantee correctness. It produces **evidence and controls** you can inspect.
|
|
60
27
|
|
|
61
|
-
|
|
28
|
+
**Short description:** Engineering assurance for AI coding agents — repository intelligence, change evidence, safety controls, and MCP tools.
|
|
62
29
|
|
|
63
30
|
---
|
|
64
31
|
|
|
65
|
-
##
|
|
32
|
+
## Why AgentDoctor?
|
|
66
33
|
|
|
67
|
-
|
|
34
|
+
Modern AI coding agents can:
|
|
68
35
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
| Project Brain | `src/core/understanding/brain/` |
|
|
73
|
-
| MCP bridge | `src/mcp/brain/` |
|
|
74
|
-
| CLI | `src/cli/commands/brain-mcp.ts` |
|
|
75
|
-
| Safety (separate path) | `src/core/{scanner,rules,fix,verify,policy}/`, `action.yml` |
|
|
36
|
+
- read individual files
|
|
37
|
+
- generate and edit code
|
|
38
|
+
- run tests when asked
|
|
76
39
|
|
|
77
|
-
|
|
40
|
+
Repository-level context is usually fragmented across:
|
|
78
41
|
|
|
79
|
-
|
|
42
|
+
| Signal | Typical location |
|
|
43
|
+
| ------------------ | ------------------------------ |
|
|
44
|
+
| Source structure | AST / imports / modules |
|
|
45
|
+
| Dependencies | manifests / lockfiles |
|
|
46
|
+
| History | Git |
|
|
47
|
+
| Architecture | docs / conventions / inference |
|
|
48
|
+
| Tests | test trees / naming heuristics |
|
|
49
|
+
| Policy | CI rules / allowlists |
|
|
50
|
+
| Decisions | ADRs / RFCs / tribal knowledge |
|
|
51
|
+
| Secrets / exposure | config files / ignore rules |
|
|
80
52
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-

|
|
84
|
-
|
|
85
|
-
### Evidence & provenance
|
|
53
|
+
AgentDoctor brings those signals into one local toolchain around an AI-driven engineering change:
|
|
86
54
|
|
|
87
55
|
```text
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
56
|
+
Developer / AI Agent
|
|
57
|
+
│
|
|
58
|
+
▼
|
|
59
|
+
AgentDoctor
|
|
60
|
+
│
|
|
61
|
+
┌───────────────────────────────┐
|
|
62
|
+
│ Repository Intelligence │
|
|
63
|
+
│ AST / Graph / Git / Impact │
|
|
64
|
+
├───────────────────────────────┤
|
|
65
|
+
│ Engineering Knowledge │
|
|
66
|
+
│ Brain / Decisions / Provenance│
|
|
67
|
+
├───────────────────────────────┤
|
|
68
|
+
│ Safety & Policy │
|
|
69
|
+
│ Scan / Fix / Enforce / Secrets│
|
|
70
|
+
├───────────────────────────────┤
|
|
71
|
+
│ Verification │
|
|
72
|
+
│ Tests / Reports / Evidence │
|
|
73
|
+
└───────────────────────────────┘
|
|
74
|
+
│
|
|
75
|
+
▼
|
|
76
|
+
Safer, explainable engineering decisions
|
|
93
77
|
```
|
|
94
78
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
Claim lifecycle: `ACTIVE` · `INVALIDATED` · `SUPERSEDED` · `CONTRADICTED`
|
|
98
|
-
|
|
99
|
-
Epistemics on evidence: `observed` | `inferred`. ACTIVE claims must reference evidence. Serialization redacts secret-like values.
|
|
79
|
+
---
|
|
100
80
|
|
|
101
|
-
|
|
81
|
+
## Capability map
|
|
102
82
|
|
|
103
|
-
|
|
104
|
-
Ownership evidence unavailable
|
|
105
|
-
↓
|
|
106
|
-
UNKNOWN
|
|
107
|
-
```
|
|
83
|
+
Status labels: **SUPPORTED** · **PARTIAL** · **EXPERIMENTAL** · **NOT YET SUPPORTED**
|
|
108
84
|
|
|
109
|
-
|
|
85
|
+
Details and evidence: [docs/2.0/overview/capabilities.md](docs/2.0/overview/capabilities.md) · [readiness matrix](docs/2.0/overview/readiness-matrix.md)
|
|
110
86
|
|
|
111
|
-
|
|
87
|
+
### Repository intelligence
|
|
112
88
|
|
|
113
|
-
|
|
89
|
+
| Capability | Status |
|
|
90
|
+
| ---------------------------------------------------- | ------------ |
|
|
91
|
+
| TypeScript / JavaScript AST graph (+ regex fallback) | PARTIAL |
|
|
92
|
+
| Import / inferred call relationships | PARTIAL |
|
|
93
|
+
| Git hotspot / engineering intelligence | PARTIAL |
|
|
94
|
+
| Change / test / refactor impact | PARTIAL |
|
|
95
|
+
| C4-style architecture views | EXPERIMENTAL |
|
|
114
96
|
|
|
115
|
-
|
|
97
|
+
### Engineering knowledge
|
|
116
98
|
|
|
117
|
-
|
|
99
|
+
| Capability | Status |
|
|
100
|
+
| ------------------------------------------------------------- | --------- |
|
|
101
|
+
| Project Brain store + evidence-backed claims | SUPPORTED |
|
|
102
|
+
| Repository Brain init / proposal review (never auto-approved) | PARTIAL |
|
|
103
|
+
| Governed knowledge + abstention on retrieve | PARTIAL |
|
|
104
|
+
| Provenance envelopes on Brain MCP tools | SUPPORTED |
|
|
118
105
|
|
|
119
|
-
|
|
120
|
-
AI Coding Agent → MCP client → agentdoctor brain-mcp --root <abs> → Project Brain
|
|
121
|
-
```
|
|
106
|
+
### Agent interfaces
|
|
122
107
|
|
|
123
|
-
|
|
108
|
+
| Capability | Status |
|
|
109
|
+
| --------------------------------------------------------------------------------- | --------- |
|
|
110
|
+
| Brain MCP (`brain_*` tools, STDIO) | SUPPORTED |
|
|
111
|
+
| Combined MCP (Brain + intelligence tools) | PARTIAL |
|
|
112
|
+
| Agent adapters (Cursor, Claude Code, Codex, Copilot, Windsurf, Gemini CLI, Aider) | SUPPORTED |
|
|
113
|
+
| Local dashboard + `/api/v2/*` | PARTIAL |
|
|
114
|
+
| Programmatic API (`scan`, Fix, Brain helpers) | SUPPORTED |
|
|
124
115
|
|
|
125
|
-
###
|
|
116
|
+
### Safety & governance
|
|
126
117
|
|
|
127
|
-
|
|
|
128
|
-
|
|
|
129
|
-
|
|
|
130
|
-
|
|
|
131
|
-
|
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
|
|
|
135
|
-
| `brain_ownership` | Explicit CODEOWNERS / MAINTAINERS / package only |
|
|
136
|
-
| `brain_risk` | Change-danger risk (not SAST / CVE) |
|
|
137
|
-
| `brain_delta` | Read-only snapshot comparison |
|
|
138
|
-
| `brain_snapshot` | `current` · `history` · `compare` · `load` · `rebuild` |
|
|
118
|
+
| Capability | Status |
|
|
119
|
+
| -------------------------------------------------------- | --------------------- |
|
|
120
|
+
| Scan → Safe Fix → Verify | SUPPORTED |
|
|
121
|
+
| Policy gates (`--min-score`, severity, rule, verify-new) | SUPPORTED |
|
|
122
|
+
| Evaluate-only policy / controlled enforcement runner | PARTIAL |
|
|
123
|
+
| Secret scan (redacted findings) + export redaction | PARTIAL |
|
|
124
|
+
| Path-safety for MCP / dashboard | PARTIAL |
|
|
125
|
+
| Local-dev team auth (scrypt) | PARTIAL — **not SSO** |
|
|
139
126
|
|
|
140
|
-
|
|
127
|
+
### Verification
|
|
141
128
|
|
|
142
|
-
|
|
129
|
+
| Capability | Status |
|
|
130
|
+
| ------------------------------------------------------- | -------------------------- |
|
|
131
|
+
| Change assurance assessment + evidence bundles | PARTIAL |
|
|
132
|
+
| Evidence hash verify (`verified` = integrity only) | SUPPORTED |
|
|
133
|
+
| Unit / integration / MCP STDIO tests (`npm run verify`) | SUPPORTED |
|
|
134
|
+
| Packed CLI clean-install smoke | SUPPORTED |
|
|
135
|
+
| Reproducible AST perf harness | PARTIAL (synthetic sample) |
|
|
143
136
|
|
|
144
137
|
---
|
|
145
138
|
|
|
146
|
-
##
|
|
139
|
+
## How AgentDoctor is different
|
|
147
140
|
|
|
148
|
-
|
|
141
|
+
Most engineering tools optimize one layer: static analysis, search, docs generation, dashboards, security scanners, or AI chat.
|
|
142
|
+
|
|
143
|
+
AgentDoctor is designed around the **lifecycle of an AI-driven change**:
|
|
149
144
|
|
|
150
145
|
```text
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
Evidence-backed result (+ provenance)
|
|
146
|
+
Repository
|
|
147
|
+
→ Understand
|
|
148
|
+
→ Impact
|
|
149
|
+
→ Knowledge
|
|
150
|
+
→ Policy
|
|
151
|
+
→ Change
|
|
152
|
+
→ Verification
|
|
153
|
+
→ Evidence
|
|
160
154
|
```
|
|
161
155
|
|
|
162
|
-
|
|
156
|
+
That combination is the product direction. It does not mean every layer is equally mature — see the capability map and limitations.
|
|
163
157
|
|
|
164
|
-
|
|
165
|
-
| --- | -------------- | ------------------------------------------------- |
|
|
166
|
-
| Q1 | Overview | `brain_overview` |
|
|
167
|
-
| Q2 | Entrypoints | `brain_query` |
|
|
168
|
-
| Q3 | Change risk | `brain_risk` |
|
|
169
|
-
| Q4 | Ownership | `brain_ownership` |
|
|
170
|
-
| Q5 | Impact / trace | `brain_trace` |
|
|
171
|
-
| Q6 | Provenance | `brain_explain`, `brain_claims`, `brain_evidence` |
|
|
172
|
-
| Q7 | Delta | `brain_delta`, `brain_snapshot` |
|
|
158
|
+
---
|
|
173
159
|
|
|
174
|
-
|
|
160
|
+
## Architecture
|
|
175
161
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
162
|
+
```text
|
|
163
|
+
AgentDoctor
|
|
164
|
+
│
|
|
165
|
+
├── Repository Intelligence
|
|
166
|
+
│ ├── AST (TS/JS)
|
|
167
|
+
│ ├── Graph
|
|
168
|
+
│ ├── Git
|
|
169
|
+
│ └── Impact
|
|
170
|
+
│
|
|
171
|
+
├── Engineering Knowledge
|
|
172
|
+
│ ├── Brain
|
|
173
|
+
│ ├── Governance
|
|
174
|
+
│ └── Provenance
|
|
175
|
+
│
|
|
176
|
+
├── Safety
|
|
177
|
+
│ ├── Scanner
|
|
178
|
+
│ ├── Safe Fix
|
|
179
|
+
│ ├── Secrets
|
|
180
|
+
│ └── Policies
|
|
181
|
+
│
|
|
182
|
+
├── Agent Interface
|
|
183
|
+
│ ├── MCP (brain-mcp / mcp)
|
|
184
|
+
│ ├── CLI
|
|
185
|
+
│ ├── API / dashboard
|
|
186
|
+
│ └── Adapters
|
|
187
|
+
│
|
|
188
|
+
└── Verification
|
|
189
|
+
├── Tests
|
|
190
|
+
├── Reports
|
|
191
|
+
└── Release validation
|
|
192
|
+
```
|
|
181
193
|
|
|
182
|
-
|
|
194
|
+
Code layout: `src/{intelligence,knowledge,core,mcp,platform,enforcement,cli}/`
|
|
183
195
|
|
|
184
|
-
|
|
196
|
+
Canonical docs: [docs/2.0/overview/architecture.md](docs/2.0/overview/architecture.md)
|
|
185
197
|
|
|
186
198
|
---
|
|
187
199
|
|
|
188
|
-
##
|
|
189
|
-
|
|
190
|
-
1.1.0 was hardened under real MCP, CI, and Windows pressure — not README theater.
|
|
200
|
+
## Engineering principles
|
|
191
201
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
| Terminal / injection surface | Findings must not become escape channels; Security policy calls out terminal escape injection. |
|
|
203
|
-
| UNKNOWN | Inventing ownership is a product failure mode. |
|
|
202
|
+
1. Evidence over assumptions
|
|
203
|
+
2. Explicit limitations over inflated claims
|
|
204
|
+
3. Safety before automation
|
|
205
|
+
4. Repository context over isolated files
|
|
206
|
+
5. Human approval for governed decisions
|
|
207
|
+
6. Backwards compatibility where documented
|
|
208
|
+
7. Reproducible verification
|
|
209
|
+
8. Explainable agent actions
|
|
210
|
+
9. Least privilege
|
|
211
|
+
10. Secure defaults
|
|
204
212
|
|
|
205
213
|
---
|
|
206
214
|
|
|
207
|
-
##
|
|
215
|
+
## Install
|
|
208
216
|
|
|
209
|
-
|
|
217
|
+
Requires **Node.js 20+**.
|
|
210
218
|
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
└── cli/
|
|
218
|
-
└── commands/
|
|
219
|
-
└── brain-mcp.ts
|
|
220
|
-
|
|
221
|
-
tests/
|
|
222
|
-
└── unit/
|
|
223
|
-
├── understanding/
|
|
224
|
-
└── mcp/
|
|
225
|
-
|
|
226
|
-
validation/
|
|
227
|
-
├── project-brain/
|
|
228
|
-
├── software-understanding/
|
|
229
|
-
├── real-world/
|
|
230
|
-
└── mcp-agent/
|
|
231
|
-
|
|
232
|
-
docs/
|
|
233
|
-
├── assets/ # README diagrams (this landing page)
|
|
234
|
-
├── mcp/
|
|
235
|
-
├── demo/
|
|
236
|
-
└── project-brain.md
|
|
237
|
-
|
|
238
|
-
examples/mcp/ # Cursor / Claude Code / Codex config samples
|
|
219
|
+
```bash
|
|
220
|
+
# Local/RC version is 2.0.1; npm registry may still show 2.0.0 until published.
|
|
221
|
+
npm install -g @praneeth_54/agentdoctor@2.0.1 # after publish
|
|
222
|
+
# or from a packed tarball / this repo:
|
|
223
|
+
# npm install /path/to/praneeth_54-agentdoctor-2.0.1.tgz
|
|
224
|
+
npx @praneeth_54/agentdoctor@2.0.1 --help # after publish
|
|
239
225
|
```
|
|
240
226
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
---
|
|
244
|
-
|
|
245
|
-
## Validation
|
|
246
|
-
|
|
247
|
-

|
|
227
|
+
From source:
|
|
248
228
|
|
|
249
229
|
```bash
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
npm
|
|
253
|
-
npm run verify
|
|
254
|
-
npm run validate:mcp-agent
|
|
230
|
+
git clone https://github.com/pranee54/AgentDoctor.git
|
|
231
|
+
cd AgentDoctor
|
|
232
|
+
npm install
|
|
233
|
+
npm run verify
|
|
255
234
|
```
|
|
256
235
|
|
|
257
|
-
| Layer | How verified | Current note |
|
|
258
|
-
| ---------------- | ------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
|
259
|
-
| Core / Safety | `npm run verify` + CI quality (Ubuntu/Windows) | Live [CI badge](https://github.com/pranee54/AgentDoctor/actions/workflows/ci.yml) |
|
|
260
|
-
| Understanding | `npm run verify:understanding` | Unit surface under `tests/unit/understanding/` |
|
|
261
|
-
| Project Brain | `npm run verify:project-brain` + CI `project-brain` job | Requires built CLI |
|
|
262
|
-
| MCP | `npm run verify:mcp` | Protocol + STDIO client tests |
|
|
263
|
-
| Agent validation | `npm run validate:mcp-agent` | MCP discovery **PASS**; LLM Q1–Q7 **BLOCKED** (see report) |
|
|
264
|
-
| Benchmark | `benchmark:project-brain` | Part of `verify:project-brain` |
|
|
265
|
-
| Package | npm `@praneeth_54/agentdoctor` | Published **1.1.0** |
|
|
266
|
-
| Security | mcp-agent security suite + [SECURITY.md](SECURITY.md) | Tool-level **10/10** in report |
|
|
267
|
-
|
|
268
|
-
Re-run the commands above for live status; do not treat this table as a substitute for CI.
|
|
269
|
-
|
|
270
236
|
---
|
|
271
237
|
|
|
272
|
-
##
|
|
273
|
-
|
|
274
|
-
```bash
|
|
275
|
-
npx @praneeth_54/agentdoctor@1.1.1
|
|
276
|
-
# or
|
|
277
|
-
npm install -g @praneeth_54/agentdoctor
|
|
278
|
-
agentdoctor --help
|
|
279
|
-
```
|
|
238
|
+
## Quickstart
|
|
280
239
|
|
|
281
240
|
```bash
|
|
282
|
-
agentdoctor
|
|
283
|
-
|
|
284
|
-
agentdoctor .
|
|
241
|
+
agentdoctor --version # 2.0.1
|
|
242
|
+
agentdoctor scan .
|
|
285
243
|
agentdoctor scan . --json
|
|
286
|
-
agentdoctor fix
|
|
287
|
-
agentdoctor verify
|
|
288
|
-
|
|
289
|
-
|
|
244
|
+
agentdoctor fix --dry-run
|
|
245
|
+
agentdoctor verify --baseline agentdoctor-report.json
|
|
246
|
+
|
|
247
|
+
# Repository Brain proposals (not auto-approved)
|
|
248
|
+
agentdoctor init --name "My App" --domain "payments"
|
|
249
|
+
agentdoctor brain proposals
|
|
250
|
+
|
|
251
|
+
# Intelligence
|
|
252
|
+
agentdoctor graph --mode auto --json
|
|
253
|
+
agentdoctor impact --json
|
|
254
|
+
agentdoctor c4 --json
|
|
255
|
+
|
|
256
|
+
# Change assurance
|
|
257
|
+
agentdoctor change analyze
|
|
258
|
+
agentdoctor change verify
|
|
259
|
+
agentdoctor change explain|diff|status
|
|
260
|
+
agentdoctor evidence inspect <id>
|
|
261
|
+
agentdoctor evidence verify <id>
|
|
262
|
+
agentdoctor proof build|inspect|verify|export <id>
|
|
263
|
+
|
|
264
|
+
# Architecture / policy / controlled run
|
|
265
|
+
agentdoctor architecture init|check|explain
|
|
266
|
+
agentdoctor policy check|explain --command "npm test"
|
|
267
|
+
agentdoctor run explain --command "npm test"
|
|
268
|
+
agentdoctor workspace create|add|list|status|remove
|
|
269
|
+
|
|
270
|
+
# MCP (absolute --root required)
|
|
271
|
+
agentdoctor brain-mcp --root /ABS/PATH/TO/REPO
|
|
272
|
+
agentdoctor mcp --root /ABS/PATH/TO/REPO
|
|
290
273
|
```
|
|
291
274
|
|
|
292
|
-
|
|
275
|
+
CLI reference: [docs/2.0/guides/cli.md](docs/2.0/guides/cli.md) · Change assurance: [docs/2.0.1/change-assurance.md](docs/2.0.1/change-assurance.md)
|
|
293
276
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
AgentDoctor can run repository-level AI coding-agent configuration audits inside GitHub Actions and enforce CI policy gates.
|
|
277
|
+
---
|
|
297
278
|
|
|
298
|
-
|
|
279
|
+
## Change assurance
|
|
299
280
|
|
|
300
|
-
|
|
281
|
+
Structured assessment, evidence bundles, and Change Proof **integrity** (not engineering correctness). Optional `--coverage` for coverage-backed / hybrid test impact. See [docs/2.0.1/FINAL_COMPLETION_AUDIT.md](docs/2.0.1/FINAL_COMPLETION_AUDIT.md).
|
|
301
282
|
|
|
302
|
-
```
|
|
303
|
-
|
|
283
|
+
```bash
|
|
284
|
+
agentdoctor change analyze # ChangeAssessment (verificationStatus: not-run)
|
|
285
|
+
agentdoctor change verify # write .agentdoctor/evidence/<id>/ (evidence-produced)
|
|
286
|
+
agentdoctor change explain|diff|status
|
|
287
|
+
agentdoctor evidence inspect <id> # list artifacts + manifest
|
|
288
|
+
agentdoctor evidence verify <id> # SHA-256 check; verified only if all hashes match
|
|
289
|
+
agentdoctor proof inspect|verify <id> # integrity; correctnessStatus always NOT_CLAIMED
|
|
304
290
|
```
|
|
305
291
|
|
|
306
|
-
|
|
292
|
+
`verified` means artifact integrity against the manifest — not that the change is correct or safe. Details: [docs/2.0.1/change-assurance.md](docs/2.0.1/change-assurance.md) · [docs/2.0.1/evidence.md](docs/2.0.1/evidence.md)
|
|
307
293
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
| Surface | Value |
|
|
311
|
-
| ---------------------------------- | -------------------------------------------- |
|
|
312
|
-
| Action release tag | `v1.1.0` (this repository’s Action metadata) |
|
|
313
|
-
| Action input `version` **default** | **`1.0.0`** |
|
|
314
|
-
|
|
315
|
-
The `v1.1.0` Action release still defaults to the published AgentDoctor **CLI `1.0.0`** for compatibility. That is intentional.
|
|
316
|
-
|
|
317
|
-
- Omit `version` (or set `version: "1.0.0"`) → install `@praneeth_54/agentdoctor@1.0.0`
|
|
318
|
-
- Set `version: "1.1.1"` explicitly when you want the newer CLI in CI
|
|
319
|
-
- `version: workspace` runs this repo’s built `dist/cli/index.js` (maintainers / local CI after `npm run build`)
|
|
320
|
-
- `latest` / `beta` dist-tags are also accepted
|
|
321
|
-
|
|
322
|
-
Project Brain and MCP are **not** started by this Action even when `version: "1.1.1"`. The Action still runs Safety scan/verify only.
|
|
323
|
-
|
|
324
|
-
The Action is report-only until you set a policy input (`minimum-score`, `fail-on-severity`, `fail-on-rule`, or `fail-on-new` with `verify-baseline`).
|
|
294
|
+
---
|
|
325
295
|
|
|
326
|
-
|
|
296
|
+
## MCP
|
|
327
297
|
|
|
328
|
-
|
|
298
|
+
AgentDoctor exposes local **STDIO** MCP servers (no API key).
|
|
329
299
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
300
|
+
| Server | Command | Tools |
|
|
301
|
+
| ------------ | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
302
|
+
| Brain MCP | `agentdoctor brain-mcp --root <abs>` | `brain_overview`, `brain_query`, `brain_explain`, `brain_trace`, `brain_claims`, `brain_evidence`, `brain_ownership`, `brain_risk`, `brain_delta`, `brain_snapshot` |
|
|
303
|
+
| Combined MCP | `agentdoctor mcp --root <abs>` | All `brain_*` tools **plus** intelligence tools below |
|
|
333
304
|
|
|
334
|
-
|
|
335
|
-
|
|
305
|
+
Intelligence tools (combined MCP):
|
|
306
|
+
`repo_overview`, `codebase_search`, `symbol_lookup`, `dependency_lookup`, `call_graph_lookup`, `test_impact`, `refactor_impact`, `code_health`, `architecture_info`, `architecture_check`, `knowledge_retrieve`, `policy_evaluate`, `change_analyze`, `proof_inspect`, `evidence_inspect`, `graph_query`
|
|
336
307
|
|
|
337
|
-
|
|
338
|
-
id: agentdoctor
|
|
339
|
-
uses: pranee54/AgentDoctor@v1.1.0
|
|
340
|
-
with:
|
|
341
|
-
path: .
|
|
342
|
-
```
|
|
308
|
+
Guide: [docs/2.0/guides/mcp.md](docs/2.0/guides/mcp.md) · Deep Brain MCP: [docs/mcp/brain-mcp.md](docs/mcp/brain-mcp.md)
|
|
343
309
|
|
|
344
|
-
|
|
310
|
+
---
|
|
345
311
|
|
|
346
|
-
|
|
347
|
-
- uses: pranee54/AgentDoctor@v1.1.0
|
|
348
|
-
with:
|
|
349
|
-
path: .
|
|
350
|
-
minimum-score: "70"
|
|
351
|
-
```
|
|
312
|
+
## GitHub Action
|
|
352
313
|
|
|
353
|
-
|
|
314
|
+
Use AgentDoctor Safety in CI for scan / verify gates. Default npm version input is **`2.0.1`**.
|
|
354
315
|
|
|
355
316
|
```yaml
|
|
356
|
-
- uses: pranee54/AgentDoctor@
|
|
317
|
+
- uses: pranee54/AgentDoctor@v2.0.1
|
|
357
318
|
with:
|
|
358
319
|
path: .
|
|
320
|
+
version: "2.0.1"
|
|
359
321
|
fail-on-severity: critical
|
|
360
322
|
```
|
|
361
323
|
|
|
362
|
-
|
|
324
|
+
For repository CI against the checked-out build: `version: workspace` (requires `dist/` from `npm run build`).
|
|
363
325
|
|
|
364
|
-
|
|
365
|
-
- uses: pranee54/AgentDoctor@v1.1.0
|
|
366
|
-
with:
|
|
367
|
-
path: .
|
|
368
|
-
fail-on-rule: security/env-file-exposure
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
**5. Baseline verification:**
|
|
372
|
-
|
|
373
|
-
```yaml
|
|
374
|
-
- uses: pranee54/AgentDoctor@v1.1.0
|
|
375
|
-
with:
|
|
376
|
-
path: .
|
|
377
|
-
verify-baseline: agentdoctor-report.json
|
|
378
|
-
fail-on-new: "true"
|
|
379
|
-
```
|
|
380
|
-
|
|
381
|
-
**6. JSON report** (default `json-output: "true"`; customize path):
|
|
382
|
-
|
|
383
|
-
```yaml
|
|
384
|
-
- uses: pranee54/AgentDoctor@v1.1.0
|
|
385
|
-
id: agentdoctor
|
|
386
|
-
with:
|
|
387
|
-
path: .
|
|
388
|
-
json-output: "true"
|
|
389
|
-
output-file: agentdoctor-report.json
|
|
390
|
-
|
|
391
|
-
- uses: actions/upload-artifact@v4
|
|
392
|
-
with:
|
|
393
|
-
name: agentdoctor-report
|
|
394
|
-
path: ${{ steps.agentdoctor.outputs.report-path }}
|
|
395
|
-
```
|
|
396
|
-
|
|
397
|
-
**7. GitHub summary:**
|
|
398
|
-
|
|
399
|
-
```yaml
|
|
400
|
-
- uses: pranee54/AgentDoctor@v1.1.0
|
|
401
|
-
with:
|
|
402
|
-
path: .
|
|
403
|
-
summary: "true"
|
|
404
|
-
```
|
|
405
|
-
|
|
406
|
-
**8. GitHub annotations:**
|
|
407
|
-
|
|
408
|
-
```yaml
|
|
409
|
-
- uses: pranee54/AgentDoctor@v1.1.0
|
|
410
|
-
with:
|
|
411
|
-
path: .
|
|
412
|
-
annotations: "true"
|
|
413
|
-
```
|
|
414
|
-
|
|
415
|
-
**Combined policy example** (explicit newer CLI):
|
|
416
|
-
|
|
417
|
-
```yaml
|
|
418
|
-
permissions:
|
|
419
|
-
contents: read
|
|
420
|
-
|
|
421
|
-
steps:
|
|
422
|
-
- uses: actions/checkout@v4
|
|
423
|
-
|
|
424
|
-
- name: Audit coding-agent configuration
|
|
425
|
-
id: agentdoctor
|
|
426
|
-
uses: pranee54/AgentDoctor@v1.1.0
|
|
427
|
-
with:
|
|
428
|
-
path: .
|
|
429
|
-
version: "1.1.1"
|
|
430
|
-
output-file: agentdoctor-report.json
|
|
431
|
-
json-output: "true"
|
|
432
|
-
minimum-score: "70"
|
|
433
|
-
fail-on-severity: critical
|
|
434
|
-
summary: "true"
|
|
435
|
-
annotations: "true"
|
|
436
|
-
|
|
437
|
-
- name: Upload AgentDoctor report
|
|
438
|
-
if: always()
|
|
439
|
-
uses: actions/upload-artifact@v4
|
|
440
|
-
with:
|
|
441
|
-
name: agentdoctor-report
|
|
442
|
-
path: ${{ steps.agentdoctor.outputs.report-path }}
|
|
443
|
-
```
|
|
444
|
-
|
|
445
|
-
### Inputs
|
|
446
|
-
|
|
447
|
-
From [`action.yml`](action.yml):
|
|
448
|
-
|
|
449
|
-
| Input | Required | Default | Description |
|
|
450
|
-
| ------------------ | -------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
451
|
-
| `path` | no | `.` | Repository-relative directory to scan. |
|
|
452
|
-
| `version` | no | `1.0.0` | Published AgentDoctor npm version or dist-tag (`latest` \| `beta`), or `workspace` to run the checked-out repository’s built CLI at `dist/cli/index.js`. |
|
|
453
|
-
| `output-file` | no | `agentdoctor-report.json` | Repository-relative path for the JSON report. |
|
|
454
|
-
| `minimum-score` | no | _(empty)_ | Fail when overall readiness score is below this integer (0–100). Empty skips the gate. |
|
|
455
|
-
| `fail-on-severity` | no | _(empty)_ | Fail when any finding has this severity or higher (`critical` \| `warning` \| `info`). Empty skips the gate. |
|
|
456
|
-
| `fail-on-rule` | no | _(empty)_ | Comma-separated rule IDs that fail CI when present (e.g. `security/env-file-exposure`). |
|
|
457
|
-
| `fail-on-new` | no | _(empty)_ | When `verify-baseline` is set, fail on new findings vs the baseline. Defaults to true whenever `verify-baseline` is non-empty unless set to `false`. |
|
|
458
|
-
| `verify-baseline` | no | _(empty)_ | Repository-relative path to a prior scan JSON baseline. When set, runs `agentdoctor verify` instead of scan. |
|
|
459
|
-
| `json-output` | no | `true` | Write a JSON report to `output-file` (`true`/`false`). |
|
|
460
|
-
| `summary` | no | `false` | Write a GitHub Actions job step summary (requires CLI with `--summary` support). |
|
|
461
|
-
| `annotations` | no | `false` | Emit GitHub Actions annotations for findings (requires CLI with `--annotations` support). |
|
|
462
|
-
|
|
463
|
-
### Outputs
|
|
464
|
-
|
|
465
|
-
| Output | Description |
|
|
466
|
-
| --------------- | ------------------------------------------------------------------------------- |
|
|
467
|
-
| `report-path` | Absolute path to the generated JSON report (empty when `json-output` is false). |
|
|
468
|
-
| `outcome` | `success` \| `policy-failure` \| `configuration-error` \| `internal-failure` |
|
|
469
|
-
| `overall-score` | Overall readiness score from the scan/verify result when available. |
|
|
326
|
+
Guide: [docs/2.0/guides/github-action.md](docs/2.0/guides/github-action.md) · Action metadata: [`action.yml`](action.yml)
|
|
470
327
|
|
|
471
|
-
|
|
472
|
-
| --------------------- | ----------------------------------------------------- |
|
|
473
|
-
| `success` | Scan/verify completed without a failing policy gate. |
|
|
474
|
-
| `policy-failure` | A configured policy gate failed (exit `1`). |
|
|
475
|
-
| `configuration-error` | Invalid Action/CLI configuration or usage (exit `2`). |
|
|
476
|
-
| `internal-failure` | Unexpected failure during execution. |
|
|
477
|
-
|
|
478
|
-
Exit-code details: [docs/exit-codes.md](docs/exit-codes.md). Scoring: [docs/scoring.md](docs/scoring.md).
|
|
479
|
-
|
|
480
|
-
### Action security notes
|
|
481
|
-
|
|
482
|
-
Controls implemented in `action.yml`:
|
|
483
|
-
|
|
484
|
-
- Paths must stay inside `GITHUB_WORKSPACE` (`realpath` + containment checks)
|
|
485
|
-
- Traversal and parent-escape attempts are rejected
|
|
486
|
-
- Symlink escapes for `output-file` parents / final file and for `verify-baseline` are rejected
|
|
487
|
-
- Newlines in Action path inputs are rejected
|
|
488
|
-
- `output-file` must resolve to a regular file path inside the workspace (not a directory or symlink)
|
|
489
|
-
- `verify-baseline` must exist, realpath back into the workspace, and remain a file
|
|
490
|
-
- `version` must match an exact npm semver, `latest`/`beta`, or `workspace`
|
|
491
|
-
- No Action-level credential inputs
|
|
492
|
-
|
|
493
|
-
Boundary (honest): the Action executes AgentDoctor against repository contents (treated as untrusted) and, except for `version: workspace`, may invoke `npm exec` against the public npm registry. This is not a claim of universal security.
|
|
494
|
-
|
|
495
|
-
Related: [SECURITY.md](SECURITY.md)
|
|
496
|
-
|
|
497
|
-
### Action versioning
|
|
498
|
-
|
|
499
|
-
| Recommendation | Value |
|
|
500
|
-
| -------------- | ----------------------------------- |
|
|
501
|
-
| Preferred tag | `uses: pranee54/AgentDoctor@v1.1.0` |
|
|
502
|
-
| Stronger pin | Full commit SHA of this repository |
|
|
503
|
-
| Avoid | `@main` |
|
|
504
|
-
|
|
505
|
-
The existing `v1.1.0` product tag is the Action metadata consumers should pin today. Changing the Action’s default CLI `version` input is a separate, explicit decision and is **not** done in this documentation update.
|
|
328
|
+
Marketplace listing: confirm in the GitHub UI if you need Marketplace discovery beyond the Action in this repository.
|
|
506
329
|
|
|
507
330
|
---
|
|
508
331
|
|
|
509
|
-
##
|
|
332
|
+
## Security model
|
|
510
333
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
334
|
+
| Control | Behavior |
|
|
335
|
+
| ----------- | -------------------------------------------------------------------------- |
|
|
336
|
+
| Path safety | MCP / dashboard reject traversal, encoded escapes, hostile URLs |
|
|
337
|
+
| Safe Fix | Preflight targets; refuse symlink write-through / non-allowlisted paths |
|
|
338
|
+
| Secrets | Opt-in scan; findings and exports redact sensitive patterns |
|
|
339
|
+
| Policy | Evaluate-only by default (`executionResult: "not-executed"`) |
|
|
340
|
+
| Enforcement | Controlled runner blocks; does **not** claim IDE interception |
|
|
341
|
+
| Dashboard | Loopback by default; non-loopback requires explicit opt-in |
|
|
342
|
+
| Team auth | Local-dev scrypt + optional OIDC JWT validation — **not** full browser SSO |
|
|
516
343
|
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
| Link | Purpose |
|
|
520
|
-
| ------------------------------------------------------------------------------ | ------------------------------ |
|
|
521
|
-
| [docs/quickstart.md](docs/quickstart.md) | 5-minute path to MCP |
|
|
522
|
-
| [docs/demo/first-5-minutes.md](docs/demo/first-5-minutes.md) | Practical walkthrough |
|
|
523
|
-
| [docs/demo/architecture-walkthrough.md](docs/demo/architecture-walkthrough.md) | Architecture for evaluators |
|
|
524
|
-
| [docs/why-agentdoctor.md](docs/why-agentdoctor.md) | Why this exists |
|
|
525
|
-
| [docs/engineering-lessons.md](docs/engineering-lessons.md) | Real 1.1.0 engineering lessons |
|
|
526
|
-
| [CONTRIBUTING.md](CONTRIBUTING.md) | Dev setup + gates |
|
|
527
|
-
| [docs/community/good-first-issues.md](docs/community/good-first-issues.md) | Starter contributions |
|
|
528
|
-
| [ROADMAP.md](ROADMAP.md) | Shipped vs planned |
|
|
529
|
-
| [docs/mcp/brain-mcp.md](docs/mcp/brain-mcp.md) | MCP contract |
|
|
530
|
-
|
|
531
|
-
Primary ask: run AgentDoctor on a repository you know well. If the Brain is wrong or incomplete, [file a Brain-quality issue](.github/ISSUE_TEMPLATE/brain-quality.md).
|
|
344
|
+
Threat model: [docs/2.0/overview/security-threat-model.md](docs/2.0/overview/security-threat-model.md) · Trust boundaries: [docs/2.0/overview/trust-boundaries.md](docs/2.0/overview/trust-boundaries.md)
|
|
532
345
|
|
|
533
346
|
---
|
|
534
347
|
|
|
535
|
-
##
|
|
536
|
-
|
|
537
|
-
Configs: [examples/mcp/](examples/mcp/). Use placeholders — never commit machine paths.
|
|
538
|
-
|
|
539
|
-
**Cursor** ([examples/mcp/cursor.mcp.json](examples/mcp/cursor.mcp.json)):
|
|
540
|
-
|
|
541
|
-
```json
|
|
542
|
-
{
|
|
543
|
-
"mcpServers": {
|
|
544
|
-
"agentdoctor-brain": {
|
|
545
|
-
"command": "node",
|
|
546
|
-
"args": [
|
|
547
|
-
"/ABSOLUTE/PATH/TO/AgentDoctor/dist/cli/index.js",
|
|
548
|
-
"brain-mcp",
|
|
549
|
-
"--root",
|
|
550
|
-
"/ABSOLUTE/PATH/TO/YOUR/PROJECT"
|
|
551
|
-
]
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
```
|
|
348
|
+
## What AgentDoctor does not do
|
|
556
349
|
|
|
557
|
-
|
|
350
|
+
- Full browser OAuth / production IdP login UX (JWT validation library path exists; redirect flow is experimental)
|
|
351
|
+
- Complete multi-language AST (Java / Kotlin / Rust / Dart / Go extractors external or unsupported)
|
|
352
|
+
- Coverage as universal ground truth without a coverage file / test map
|
|
353
|
+
- IDE / agent process interception (external host APIs)
|
|
354
|
+
- Production multi-tenant cloud / managed hosting in this package
|
|
355
|
+
- Guaranteed autonomous command execution of “allowed” policies
|
|
356
|
+
- Treating inferred C4 / heuristic impact as approved architecture truth
|
|
357
|
+
- Shipping full `docs/2.0.1/` inside the npm tarball (Option B: README + GitHub docs)
|
|
558
358
|
|
|
559
|
-
|
|
359
|
+
Full list: [docs/2.0.1/limitations.md](docs/2.0.1/limitations.md) · [docs/2.0/overview/known-limitations.md](docs/2.0/overview/known-limitations.md)
|
|
560
360
|
|
|
561
361
|
---
|
|
562
362
|
|
|
563
|
-
##
|
|
564
|
-
|
|
565
|
-
| AgentDoctor IS | AgentDoctor IS NOT |
|
|
566
|
-
| ------------------------ | ---------------------------------- |
|
|
567
|
-
| Repository understanding | Chatbot |
|
|
568
|
-
| Structured Project Brain | Generic RAG / AI memory |
|
|
569
|
-
| Evidence-backed claims | Autonomous coding agent |
|
|
570
|
-
| MCP interface | Vulnerability scanner |
|
|
571
|
-
| Change-danger analysis | “Understands every repo perfectly” |
|
|
572
|
-
| Snapshots / deltas | Zero-hallucination guarantee |
|
|
573
|
-
|
|
574
|
-
---
|
|
575
|
-
|
|
576
|
-
## Release 1.1.0
|
|
577
|
-
|
|
578
|
-
Version verified in `package.json` / `PACKAGE_VERSION`: **1.1.0** (also on npm).
|
|
579
|
-
|
|
580
|
-
Shipped: Project Brain packaging, `brain-mcp`, ten provenance tools, snapshots/delta, agent validation harness + docs. Safety V1 unchanged.
|
|
363
|
+
## Roadmap note: Change Proof
|
|
581
364
|
|
|
582
|
-
|
|
365
|
+
Change assessment, evidence, and proof **integrity** shipped in 2.0.1. `correctnessStatus` is always `ENGINEERING_CORRECTNESS_NOT_CLAIMED`. Broader compliance / team-scale proof UX remains planned.
|
|
583
366
|
|
|
584
|
-
|
|
367
|
+
See [ROADMAP.md](ROADMAP.md) · [docs/2.0.1/limitations.md](docs/2.0.1/limitations.md) · [docs/2.0.1/FINAL_COMPLETION_AUDIT.md](docs/2.0.1/FINAL_COMPLETION_AUDIT.md).
|
|
585
368
|
|
|
586
369
|
---
|
|
587
370
|
|
|
588
|
-
## Documentation
|
|
589
|
-
|
|
590
|
-
| Doc | Contents |
|
|
591
|
-
| ------------------------------------------------------------ | ------------------------- |
|
|
592
|
-
| [docs/quickstart.md](docs/quickstart.md) | Developer quickstart |
|
|
593
|
-
| [docs/project-brain.md](docs/project-brain.md) | Project Brain model |
|
|
594
|
-
| [docs/mcp/brain-mcp.md](docs/mcp/brain-mcp.md) | MCP contract |
|
|
595
|
-
| [docs/demo/brain-mcp-demo.md](docs/demo/brain-mcp-demo.md) | Fixture-backed MCP demo |
|
|
596
|
-
| [docs/demo/first-5-minutes.md](docs/demo/first-5-minutes.md) | 5-minute walkthrough |
|
|
597
|
-
| [docs/why-agentdoctor.md](docs/why-agentdoctor.md) | Product rationale |
|
|
598
|
-
| [docs/engineering-lessons.md](docs/engineering-lessons.md) | 1.1.0 engineering lessons |
|
|
599
|
-
| [docs/release-notes-v1.1.0.md](docs/release-notes-v1.1.0.md) | 1.1.0 notes |
|
|
600
|
-
| [SECURITY.md](SECURITY.md) | Vulnerability reporting |
|
|
601
|
-
| [ROADMAP.md](ROADMAP.md) | Shipped vs planned |
|
|
602
|
-
| [docs/README.md](docs/README.md) | Full index |
|
|
371
|
+
## Documentation map
|
|
603
372
|
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
|
611
|
-
|
|
|
612
|
-
|
|
|
613
|
-
|
|
|
614
|
-
| 🟡 Planned | Agent Context layer; change-aware / reliable agent context; Brain Delta workflows |
|
|
615
|
-
| 🔵 Exploratory | CI/PR Brain analysis; team-scale intelligence; additional MCP transports |
|
|
616
|
-
|
|
617
|
-
Non-goals: chatbot / RAG memory, autonomous coding agent, vulnerability-scanner replacement, fabricated ownership.
|
|
373
|
+
| Audience | Start here |
|
|
374
|
+
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
|
|
375
|
+
| Product / 2.0.1 | [docs/2.0.1/README.md](docs/2.0.1/README.md) |
|
|
376
|
+
| Product / 2.0 | [docs/2.0/README.md](docs/2.0/README.md) |
|
|
377
|
+
| Capabilities / readiness | [capabilities](docs/2.0/overview/capabilities.md) · [readiness](docs/2.0/overview/readiness-matrix.md) |
|
|
378
|
+
| Guides | [docs/2.0/guides/](docs/2.0/guides/) |
|
|
379
|
+
| Reference (rules, scoring, exit codes) | [docs/reference/](docs/reference/) |
|
|
380
|
+
| Contributing | [CONTRIBUTING.md](CONTRIBUTING.md) · [docs/development/development.md](docs/development/development.md) |
|
|
381
|
+
| Changelog | [CHANGELOG.md](CHANGELOG.md) |
|
|
382
|
+
| Release evidence | [FINAL_RELEASE_AUDIT](docs/2.0.1/FINAL_RELEASE_AUDIT.md) · [FINAL_COMPLETION_AUDIT](docs/2.0.1/FINAL_COMPLETION_AUDIT.md) |
|
|
618
383
|
|
|
619
384
|
---
|
|
620
385
|
|
|
621
386
|
## Contributing
|
|
622
387
|
|
|
623
|
-
[CONTRIBUTING.md](CONTRIBUTING.md)
|
|
624
|
-
|
|
625
|
-
```bash
|
|
626
|
-
git clone https://github.com/pranee54/AgentDoctor.git
|
|
627
|
-
cd AgentDoctor
|
|
628
|
-
npm install
|
|
629
|
-
npm run verify
|
|
630
|
-
```
|
|
631
|
-
|
|
632
|
-
---
|
|
633
|
-
|
|
634
|
-
## Security
|
|
635
|
-
|
|
636
|
-
Local analysis. No API key for core Brain/Safety. No default upload. Redacted Brain serialization.
|
|
637
|
-
|
|
638
|
-
Report privately via [SECURITY.md](SECURITY.md).
|
|
388
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). Prefer evidence-backed PRs, honest status labels, and no inflated capability claims.
|
|
639
389
|
|
|
640
390
|
---
|
|
641
391
|
|
|
642
392
|
## License
|
|
643
393
|
|
|
644
|
-
[
|
|
394
|
+
MIT — see [LICENSE](LICENSE).
|