@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.
Files changed (224) hide show
  1. package/CHANGELOG.md +164 -7
  2. package/README.md +263 -513
  3. package/dist/agents/aider/adapter.d.ts +1 -0
  4. package/dist/agents/aider/adapter.js +1 -0
  5. package/dist/agents/aider/detector.d.ts +14 -0
  6. package/dist/agents/aider/detector.js +120 -0
  7. package/dist/agents/copilot/adapter.d.ts +1 -0
  8. package/dist/agents/copilot/adapter.js +1 -0
  9. package/dist/agents/copilot/detector.d.ts +13 -0
  10. package/dist/agents/copilot/detector.js +113 -0
  11. package/dist/agents/gemini/adapter.d.ts +1 -0
  12. package/dist/agents/gemini/adapter.js +1 -0
  13. package/dist/agents/gemini/detector.d.ts +13 -0
  14. package/dist/agents/gemini/detector.js +151 -0
  15. package/dist/agents/registry.js +13 -1
  16. package/dist/agents/types.d.ts +1 -1
  17. package/dist/agents/windsurf/adapter.d.ts +1 -0
  18. package/dist/agents/windsurf/adapter.js +1 -0
  19. package/dist/agents/windsurf/detector.d.ts +14 -0
  20. package/dist/agents/windsurf/detector.js +119 -0
  21. package/dist/architecture/c4.d.ts +22 -0
  22. package/dist/architecture/c4.js +62 -0
  23. package/dist/architecture/contract.d.ts +64 -0
  24. package/dist/architecture/contract.js +373 -0
  25. package/dist/assurance/change.d.ts +211 -0
  26. package/dist/assurance/change.js +624 -0
  27. package/dist/assurance/proof.d.ts +136 -0
  28. package/dist/assurance/proof.js +338 -0
  29. package/dist/auth/index.d.ts +81 -0
  30. package/dist/auth/index.js +130 -0
  31. package/dist/auth/rbac.d.ts +9 -0
  32. package/dist/auth/rbac.js +26 -0
  33. package/dist/cli/commands/architecture.d.ts +6 -0
  34. package/dist/cli/commands/architecture.js +109 -0
  35. package/dist/cli/commands/assurance.d.ts +67 -0
  36. package/dist/cli/commands/assurance.js +210 -0
  37. package/dist/cli/commands/brain.d.ts +12 -0
  38. package/dist/cli/commands/brain.js +162 -0
  39. package/dist/cli/commands/complete.d.ts +23 -0
  40. package/dist/cli/commands/complete.js +232 -0
  41. package/dist/cli/commands/explain.js +1 -1
  42. package/dist/cli/commands/fix.js +22 -2
  43. package/dist/cli/commands/mcp.d.ts +8 -0
  44. package/dist/cli/commands/mcp.js +14 -0
  45. package/dist/cli/commands/platform.d.ts +17 -0
  46. package/dist/cli/commands/platform.js +195 -0
  47. package/dist/cli/commands/policy-graph-run.d.ts +40 -0
  48. package/dist/cli/commands/policy-graph-run.js +200 -0
  49. package/dist/cli/commands/v2.d.ts +55 -0
  50. package/dist/cli/commands/v2.js +278 -0
  51. package/dist/cli/commands/workspace.d.ts +9 -0
  52. package/dist/cli/commands/workspace.js +82 -0
  53. package/dist/cli/program.js +1328 -3
  54. package/dist/constants.d.ts +3 -2
  55. package/dist/constants.js +5 -1
  56. package/dist/contracts/adapters.d.ts +7 -0
  57. package/dist/contracts/adapters.js +60 -0
  58. package/dist/contracts/index.d.ts +162 -0
  59. package/dist/contracts/index.js +18 -0
  60. package/dist/core/baseline/store.d.ts +48 -0
  61. package/dist/core/baseline/store.js +163 -0
  62. package/dist/core/brain-cli/service.d.ts +26 -0
  63. package/dist/core/brain-cli/service.js +175 -0
  64. package/dist/core/brain-product/init.d.ts +45 -0
  65. package/dist/core/brain-product/init.js +235 -0
  66. package/dist/core/changes/analyze.d.ts +41 -0
  67. package/dist/core/changes/analyze.js +223 -0
  68. package/dist/core/context-health/analyze.d.ts +15 -0
  69. package/dist/core/context-health/analyze.js +234 -0
  70. package/dist/core/fix/apply.d.ts +21 -4
  71. package/dist/core/fix/apply.js +118 -18
  72. package/dist/core/fix/backup.d.ts +30 -0
  73. package/dist/core/fix/backup.js +193 -0
  74. package/dist/core/fix/plan.d.ts +6 -3
  75. package/dist/core/fix/plan.js +113 -9
  76. package/dist/core/fix/render.d.ts +2 -0
  77. package/dist/core/fix/render.js +36 -21
  78. package/dist/core/fix/run.js +5 -1
  79. package/dist/core/fix/safe-target.d.ts +14 -0
  80. package/dist/core/fix/safe-target.js +81 -0
  81. package/dist/core/fix/types.d.ts +12 -1
  82. package/dist/core/fix/types.js +2 -0
  83. package/dist/core/fix/writers/claude-settings.js +3 -1
  84. package/dist/core/fix/writers/codex-config.d.ts +3 -0
  85. package/dist/core/fix/writers/codex-config.js +24 -3
  86. package/dist/core/fix/writers/cursorignore.js +3 -1
  87. package/dist/core/fix/writers/simple-ignore.d.ts +16 -0
  88. package/dist/core/fix/writers/simple-ignore.js +68 -0
  89. package/dist/core/monorepo/detect.d.ts +13 -0
  90. package/dist/core/monorepo/detect.js +121 -0
  91. package/dist/core/rules/build-context.js +22 -3
  92. package/dist/core/rules/context/generated-directory.js +11 -1
  93. package/dist/core/rules/context/large-instruction-file.js +6 -0
  94. package/dist/core/rules/context/large-log-file.js +16 -1
  95. package/dist/core/rules/ignore.d.ts +11 -1
  96. package/dist/core/rules/ignore.js +22 -1
  97. package/dist/core/rules/instructions/empty-instructions.js +7 -0
  98. package/dist/core/rules/security/env-file-exposure.js +23 -2
  99. package/dist/core/rules/security/private-key-file.js +1 -1
  100. package/dist/core/scanner/scan.js +1 -1
  101. package/dist/core/schemas/validate.d.ts +6 -0
  102. package/dist/core/schemas/validate.js +62 -0
  103. package/dist/core/scoring/compute-scores.d.ts +1 -1
  104. package/dist/core/scoring/compute-scores.js +5 -1
  105. package/dist/core/scoring/placeholder.d.ts +1 -1
  106. package/dist/core/scoring/placeholder.js +5 -1
  107. package/dist/core/secrets/scan.d.ts +29 -0
  108. package/dist/core/secrets/scan.js +172 -0
  109. package/dist/coverage/cobertura.d.ts +6 -0
  110. package/dist/coverage/cobertura.js +52 -0
  111. package/dist/coverage/istanbul.d.ts +7 -0
  112. package/dist/coverage/istanbul.js +134 -0
  113. package/dist/coverage/lcov.d.ts +7 -0
  114. package/dist/coverage/lcov.js +59 -0
  115. package/dist/coverage/load.d.ts +9 -0
  116. package/dist/coverage/load.js +39 -0
  117. package/dist/coverage/types.d.ts +23 -0
  118. package/dist/coverage/types.js +5 -0
  119. package/dist/dashboard/server.d.ts +24 -0
  120. package/dist/dashboard/server.js +402 -0
  121. package/dist/enforcement/runner.d.ts +67 -0
  122. package/dist/enforcement/runner.js +460 -0
  123. package/dist/index.d.ts +34 -0
  124. package/dist/index.js +25 -0
  125. package/dist/integrations/github/pr-analyze.d.ts +28 -0
  126. package/dist/integrations/github/pr-analyze.js +98 -0
  127. package/dist/integrations/local-ai/provider.d.ts +45 -0
  128. package/dist/integrations/local-ai/provider.js +104 -0
  129. package/dist/intelligence/git/analyze.d.ts +34 -0
  130. package/dist/intelligence/git/analyze.js +136 -0
  131. package/dist/intelligence/graph/build.d.ts +15 -0
  132. package/dist/intelligence/graph/build.js +259 -0
  133. package/dist/intelligence/graph/incremental.d.ts +68 -0
  134. package/dist/intelligence/graph/incremental.js +234 -0
  135. package/dist/intelligence/resolve/imports.d.ts +36 -0
  136. package/dist/intelligence/resolve/imports.js +245 -0
  137. package/dist/knowledge/store.d.ts +25 -0
  138. package/dist/knowledge/store.js +91 -0
  139. package/dist/languages/go.d.ts +9 -0
  140. package/dist/languages/go.js +45 -0
  141. package/dist/languages/index.d.ts +11 -0
  142. package/dist/languages/index.js +76 -0
  143. package/dist/languages/php.d.ts +7 -0
  144. package/dist/languages/php.js +193 -0
  145. package/dist/languages/python.d.ts +7 -0
  146. package/dist/languages/python.js +150 -0
  147. package/dist/languages/types.d.ts +42 -0
  148. package/dist/languages/types.js +26 -0
  149. package/dist/languages/typescript.d.ts +3 -0
  150. package/dist/languages/typescript.js +95 -0
  151. package/dist/mcp/agentdoctor/server.d.ts +16 -0
  152. package/dist/mcp/agentdoctor/server.js +67 -0
  153. package/dist/mcp/brain/session.js +7 -7
  154. package/dist/mcp/intelligence/handlers.d.ts +16 -0
  155. package/dist/mcp/intelligence/handlers.js +364 -0
  156. package/dist/mcp/intelligence/path-safety.d.ts +9 -0
  157. package/dist/mcp/intelligence/path-safety.js +63 -0
  158. package/dist/mcp/intelligence/registry.d.ts +8 -0
  159. package/dist/mcp/intelligence/registry.js +228 -0
  160. package/dist/ops/health.d.ts +18 -0
  161. package/dist/ops/health.js +51 -0
  162. package/dist/platform/ai-quality/analyze.d.ts +9 -0
  163. package/dist/platform/ai-quality/analyze.js +65 -0
  164. package/dist/platform/architecture/drift.d.ts +17 -0
  165. package/dist/platform/architecture/drift.js +74 -0
  166. package/dist/platform/auth/local.d.ts +15 -0
  167. package/dist/platform/auth/local.js +58 -0
  168. package/dist/platform/context-security/analyze.d.ts +6 -0
  169. package/dist/platform/context-security/analyze.js +97 -0
  170. package/dist/platform/firewall/evaluate.d.ts +57 -0
  171. package/dist/platform/firewall/evaluate.js +359 -0
  172. package/dist/platform/graph/build.d.ts +6 -0
  173. package/dist/platform/graph/build.js +189 -0
  174. package/dist/platform/health/analyze.d.ts +7 -0
  175. package/dist/platform/health/analyze.js +192 -0
  176. package/dist/platform/index.d.ts +27 -0
  177. package/dist/platform/index.js +89 -0
  178. package/dist/platform/knowledge/analyze.d.ts +20 -0
  179. package/dist/platform/knowledge/analyze.js +96 -0
  180. package/dist/platform/provenance/build.d.ts +44 -0
  181. package/dist/platform/provenance/build.js +65 -0
  182. package/dist/platform/readiness/scorecard.d.ts +5 -0
  183. package/dist/platform/readiness/scorecard.js +98 -0
  184. package/dist/platform/refactor/impact.d.ts +20 -0
  185. package/dist/platform/refactor/impact.js +60 -0
  186. package/dist/platform/reports/export.d.ts +12 -0
  187. package/dist/platform/reports/export.js +92 -0
  188. package/dist/platform/security/redact.d.ts +15 -0
  189. package/dist/platform/security/redact.js +87 -0
  190. package/dist/platform/sessions/store.d.ts +32 -0
  191. package/dist/platform/sessions/store.js +97 -0
  192. package/dist/platform/store.d.ts +6 -0
  193. package/dist/platform/store.js +57 -0
  194. package/dist/platform/test-impact/analyze.d.ts +50 -0
  195. package/dist/platform/test-impact/analyze.js +350 -0
  196. package/dist/platform/time-machine/compare.d.ts +17 -0
  197. package/dist/platform/time-machine/compare.js +62 -0
  198. package/dist/platform/tokens/plan.d.ts +28 -0
  199. package/dist/platform/tokens/plan.js +108 -0
  200. package/dist/platform/types.d.ts +120 -0
  201. package/dist/platform/types.js +5 -0
  202. package/dist/plugins/runtime.d.ts +36 -0
  203. package/dist/plugins/runtime.js +101 -0
  204. package/dist/plugins/sdk.d.ts +29 -0
  205. package/dist/plugins/sdk.js +114 -0
  206. package/dist/policy/compose.d.ts +34 -0
  207. package/dist/policy/compose.js +118 -0
  208. package/dist/policy/packs.d.ts +9 -0
  209. package/dist/policy/packs.js +91 -0
  210. package/dist/reporters/terminal/report.js +38 -5
  211. package/dist/security/paths.d.ts +21 -0
  212. package/dist/security/paths.js +105 -0
  213. package/dist/storage/postgres.d.ts +26 -0
  214. package/dist/storage/postgres.js +90 -0
  215. package/dist/storage/provider.d.ts +30 -0
  216. package/dist/storage/provider.js +109 -0
  217. package/dist/storage/sqlite.d.ts +33 -0
  218. package/dist/storage/sqlite.js +77 -0
  219. package/dist/team/auth.d.ts +35 -0
  220. package/dist/team/auth.js +70 -0
  221. package/dist/types/index.d.ts +5 -1
  222. package/dist/workspace/index.d.ts +69 -0
  223. package/dist/workspace/index.js +220 -0
  224. package/package.json +15 -5
package/README.md CHANGED
@@ -1,644 +1,394 @@
1
1
  # AgentDoctor
2
2
 
3
- Evidence-backed Project Brain for AI Coding Agents
3
+ ## Engineering assurance for AI coding agents.
4
4
 
5
- ![AgentDoctor hero](docs/assets/agentdoctor-hero.svg)
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
  [![npm](https://img.shields.io/npm/v/@praneeth_54/agentdoctor?label=npm)](https://www.npmjs.com/package/@praneeth_54/agentdoctor)
12
8
  [![CI](https://img.shields.io/github/actions/workflow/status/pranee54/AgentDoctor/ci.yml?branch=main&label=CI)](https://github.com/pranee54/AgentDoctor/actions/workflows/ci.yml)
13
9
  [![Node](https://img.shields.io/node/v/@praneeth_54/agentdoctor)](https://nodejs.org)
14
10
  [![License](https://img.shields.io/github/license/pranee54/AgentDoctor)](LICENSE)
15
11
 
16
- [Documentation](docs/README.md) · [Project Brain](docs/project-brain.md) · [MCP](docs/mcp/brain-mcp.md) · [GitHub Action](#github-action) · [Demo](docs/demo/brain-mcp-demo.md) · [Security](SECURITY.md) · [Roadmap](ROADMAP.md)
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
- ```text
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 AgentDoctor?
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
- It is **not** an autonomous coding agent, chatbot, RAG memory product, AGI claim, or vulnerability scanner. It does not claim universal or perfect repository understanding.
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
- Project Brain structures understanding that exists in this codebase:
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
- architecture · domains · components · entrypoints · dependencies · relationships · ownership · change-danger risks · claims · evidence · confidence · snapshots · deltas
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
- Details: [docs/project-brain.md](docs/project-brain.md)
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
- ## Architecture
32
+ ## Why AgentDoctor?
66
33
 
67
- ![Architecture](docs/assets/architecture.svg)
34
+ Modern AI coding agents can:
68
35
 
69
- | Layer | Location |
70
- | ------------------------- | ----------------------------------------------------------- |
71
- | Understanding / discovery | `src/core/understanding/` |
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
- MCP depends on Brain. Brain does not depend on MCP.
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
- ## Project Brain
82
-
83
- ![Provenance](docs/assets/provenance.svg)
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
- Claim
89
- ↓
90
- Evidence
91
- ↓
92
- Snapshot
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
- Successful MCP tools return a provenance envelope: `result`, `evidenceIds`, `confidence` (`[0,1]`, rule-derived / uncalibrated), `snapshot` (`id` + `contentHash`), and `claimStatus` when applicable.
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
- ### UNKNOWN semantics
81
+ ## Capability map
102
82
 
103
- ```text
104
- Ownership evidence unavailable
105
- ↓
106
- UNKNOWN
107
- ```
83
+ Status labels: **SUPPORTED** · **PARTIAL** · **EXPERIMENTAL** · **NOT YET SUPPORTED**
108
84
 
109
- No invented owners. Contract: `preserve-unknown-never-invent`.
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
- Local runtime store (not committed product source): `<repo>/.agentdoctor/project-brain/`.
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
- ## MCP
97
+ ### Engineering knowledge
116
98
 
117
- ![MCP tools](docs/assets/mcp-tools.svg)
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
- ```text
120
- AI Coding Agent → MCP client → agentdoctor brain-mcp --root <abs> → Project Brain
121
- ```
106
+ ### Agent interfaces
122
107
 
123
- STDIO only. No API key. No upload. `--root` is required. Diagnostics on **stderr**; protocol on **stdout**.
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
- ### Tools (from `src/mcp/brain/tools/registry.ts`)
116
+ ### Safety & governance
126
117
 
127
- | Tool | Purpose |
128
- | ----------------- | ------------------------------------------------------ |
129
- | `brain_overview` | Compact summary + confidence envelope |
130
- | `brain_query` | Typed `BrainQueryEngine` queries |
131
- | `brain_explain` | Evidence-backed `explainClaim` |
132
- | `brain_trace` | Capped deterministic `traceBrain` |
133
- | `brain_claims` | Claim lifecycle (default ACTIVE + CONTRADICTED) |
134
- | `brain_evidence` | Typed redacted evidence |
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
- Only controlled write: `brain_snapshot` `rebuild` under `<root>/.agentdoctor/project-brain/`.
127
+ ### Verification
141
128
 
142
- Contract: [docs/mcp/brain-mcp.md](docs/mcp/brain-mcp.md)
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
- ## Real Cursor Agent Validation
139
+ ## How AgentDoctor is different
147
140
 
148
- ![Agent validation](docs/assets/agent-validation.svg)
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
- Cursor Agent
152
- ↓
153
- MCP discovery (agentdoctor-brain)
154
- ↓
155
- brain_* tool call
156
- ↓
157
- Project Brain
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
- Harness: `validation/mcp-agent` on `fixtures/understanding-dependencies-project`.
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
- | Q | Focus | Expected tools |
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
- Documented harness results ([validation/mcp-agent/README.md](validation/mcp-agent/README.md), 2026-08-13, AgentDoctor 1.1.0):
160
+ ## Architecture
175
161
 
176
- - Deterministic Brain tool exercise: **10/10** succeeded (actual tool calls, not prose inference)
177
- - Cursor MCP tools discovered: **PASS** (all 10 listed)
178
- - Security checks: **10/10**
179
- - Provenance (tool-level): **PASS**
180
- - Authenticated LLM Q1–Q7 grading: **BLOCKED** without agent login — kept separate from MCP contract PASS
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
- Checks include grounding, UNKNOWN ownership guard, risk semantics, provenance, snapshot/delta semantics — not “zero hallucinations.”
194
+ Code layout: `src/{intelligence,knowledge,core,mcp,platform,enforcement,cli}/`
183
195
 
184
- Demo: [docs/demo/brain-mcp-demo.md](docs/demo/brain-mcp-demo.md)
196
+ Canonical docs: [docs/2.0/overview/architecture.md](docs/2.0/overview/architecture.md)
185
197
 
186
198
  ---
187
199
 
188
- ## Built Through Real Validation
189
-
190
- 1.1.0 was hardened under real MCP, CI, and Windows pressure — not README theater.
200
+ ## Engineering principles
191
201
 
192
- | Problem | What we learned |
193
- | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
194
- | MCP cold start | Session loads latest snapshot or, by default, **compiles on first connect** (`buildIfMissing`). Large roots make host MCP timeouts more likely — prefer an existing snapshot / explicit `rebuild` before attaching an agent. |
195
- | Large Brain init | First compile writes under `.agentdoctor/project-brain/`; local Brain state ≠ committed source. |
196
- | STDIO discipline | Protocol on stdout only; logs on stderr (`src/mcp/brain/server.ts`, `tests/unit/mcp/`). |
197
- | Cross-process MCP tests | Unit STDIO client + protocol tests matter more than assuming tool use from answer quality. |
198
- | Windows CLI | `.cmd` / POSIX shim pitfalls → invoke via `node` + `npm-cli.js`; native `cmd` quoting. |
199
- | Argument escaping | CodeQL-driven hardening of Windows command argument escaping in test helpers. |
200
- | CI matrix | Ubuntu + Windows quality job; Project Brain laboratory requires `npm run build` before spawn (`f3cd550`). |
201
- | Snapshots | Atomic writes, checksum fail-closed, refuse divergent overwrite of the same snapshot id. |
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
- ## Repository Structure
215
+ ## Install
208
216
 
209
- ![Repository layout](docs/assets/repository-architecture.svg)
217
+ Requires **Node.js 20+**.
210
218
 
211
- ```text
212
- src/
213
- ├── core/
214
- │ └── understanding/ # discovery + Project Brain
215
- ├── mcp/
216
- │ └── brain/ # STDIO MCP bridge
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
- Do not treat `.agentdoctor/` or project-local agent config dirs as committed AgentDoctor source.
242
-
243
- ---
244
-
245
- ## Validation
246
-
247
- ![Validation pipeline](docs/assets/validation-pipeline.svg)
227
+ From source:
248
228
 
249
229
  ```bash
250
- npm run verify # typecheck · lint · format · unit · build
251
- npm run verify:understanding
252
- npm run verify:mcp
253
- npm run verify:project-brain # understanding + validate:project-brain + benchmark
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
- ## Installation
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 brain-mcp --root /ABSOLUTE/PATH/TO/YOUR/PROJECT
283
-
284
- agentdoctor .
241
+ agentdoctor --version # 2.0.1
242
+ agentdoctor scan .
285
243
  agentdoctor scan . --json
286
- agentdoctor fix . --dry-run
287
- agentdoctor verify . --baseline agentdoctor-report.json
288
- agentdoctor explain security/env-file-exposure
289
- agentdoctor doctor
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
- ## GitHub Action
295
-
296
- AgentDoctor can run repository-level AI coding-agent configuration audits inside GitHub Actions and enforce CI policy gates.
277
+ ---
297
278
 
298
- This Action is the **Safety / CI** surface (`action.yml`): Scan → policy gates → JSON report. It does **not** expose Project Brain or MCP. For Brain/MCP, use the CLI and [docs/mcp/brain-mcp.md](docs/mcp/brain-mcp.md).
279
+ ## Change assurance
299
280
 
300
- Recommended pin:
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
- ```yaml
303
- uses: pranee54/AgentDoctor@v1.1.0
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
- For maximum supply-chain pinning, pin a full commit SHA of this repository. Do not use `@main`.
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
- ### CLI version default (intentional)
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
- ### Examples
296
+ ## MCP
327
297
 
328
- **1. Basic scan** (report-only; default CLI `1.0.0`):
298
+ AgentDoctor exposes local **STDIO** MCP servers (no API key).
329
299
 
330
- ```yaml
331
- permissions:
332
- contents: read
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
- steps:
335
- - uses: actions/checkout@v4
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
- - name: Audit coding-agent configuration
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
- **2. Minimum readiness score:**
310
+ ---
345
311
 
346
- ```yaml
347
- - uses: pranee54/AgentDoctor@v1.1.0
348
- with:
349
- path: .
350
- minimum-score: "70"
351
- ```
312
+ ## GitHub Action
352
313
 
353
- **3. Severity gate:**
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@v1.1.0
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
- **4. Rule gate:**
324
+ For repository CI against the checked-out build: `version: workspace` (requires `dist/` from `npm run build`).
363
325
 
364
- ```yaml
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
- | `outcome` value | Meaning |
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
- ## Try it yourself
332
+ ## Security model
510
333
 
511
- 1. **Install:** `npx @praneeth_54/agentdoctor@1.1.1 --help`
512
- 2. **Run Brain MCP:** `agentdoctor brain-mcp --root /ABSOLUTE/PATH/TO/YOUR/PROJECT`
513
- 3. **Connect MCP:** copy [examples/mcp/cursor.mcp.json](examples/mcp/cursor.mcp.json) (or Claude / Codex siblings) with absolute paths
514
- 4. **First query:** call `brain_overview`
515
- 5. **Demo:** [docs/demo/first-5-minutes.md](docs/demo/first-5-minutes.md)
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
- ### Built for developers who care about repository understanding
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
- ## MCP Quick Start
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
- Also: [examples/mcp/claude-code.mcp.json](examples/mcp/claude-code.mcp.json), [examples/mcp/codex.config.toml](examples/mcp/codex.config.toml).
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
- Tip: rebuild or ensure a snapshot exists before attaching an agent if the repository is large.
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
- ## Design Boundaries
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
- [docs/release-notes-v1.1.0.md](docs/release-notes-v1.1.0.md) · [CHANGELOG.md](CHANGELOG.md)
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
- GitHub Action usage and the intentional CLI `version` default (`1.0.0`): [GitHub Action](#github-action).
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
- ## Roadmap
607
-
608
- From [ROADMAP.md](ROADMAP.md):
609
-
610
- | Status | Focus |
611
- | -------------- | --------------------------------------------------------------------------------- |
612
- | 🟢 Shipped | Safety `1.0.x`; Project Brain → MCP → Agent (`1.1.0`) |
613
- | 🟡 Next | Developer adoption: feedback, Brain quality, docs/ecosystem (not a new Brain API) |
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) · [Code of Conduct](CODE_OF_CONDUCT.md) · [good first issues](docs/good-first-issues.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
- [MIT](LICENSE) © AgentDoctor Contributors
394
+ MIT — see [LICENSE](LICENSE).