@praneeth_54/agentdoctor 1.1.1 → 2.0.0
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 +95 -7
- package/README.md +163 -538
- 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/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 +15 -0
- package/dist/cli/commands/platform.js +191 -0
- package/dist/cli/commands/v2.d.ts +55 -0
- package/dist/cli/commands/v2.js +278 -0
- package/dist/cli/program.js +809 -2
- 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 +232 -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 +23 -0
- package/dist/core/secrets/scan.js +172 -0
- package/dist/dashboard/server.d.ts +24 -0
- package/dist/dashboard/server.js +386 -0
- package/dist/enforcement/runner.d.ts +23 -0
- package/dist/enforcement/runner.js +56 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +12 -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 +13 -0
- package/dist/intelligence/graph/build.js +215 -0
- package/dist/knowledge/store.d.ts +25 -0
- package/dist/knowledge/store.js +91 -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 +11 -0
- package/dist/mcp/intelligence/handlers.js +175 -0
- package/dist/mcp/intelligence/path-safety.d.ts +11 -0
- package/dist/mcp/intelligence/path-safety.js +82 -0
- package/dist/mcp/intelligence/registry.d.ts +8 -0
- package/dist/mcp/intelligence/registry.js +160 -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 +54 -0
- package/dist/platform/firewall/evaluate.js +308 -0
- package/dist/platform/graph/build.d.ts +6 -0
- package/dist/platform/graph/build.js +193 -0
- package/dist/platform/health/analyze.d.ts +7 -0
- package/dist/platform/health/analyze.js +186 -0
- package/dist/platform/index.d.ts +27 -0
- package/dist/platform/index.js +87 -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 +32 -0
- package/dist/platform/test-impact/analyze.js +164 -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 +89 -0
- package/dist/platform/types.d.ts +111 -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/packs.d.ts +9 -0
- package/dist/policy/packs.js +59 -0
- package/dist/reporters/terminal/report.js +38 -5
- package/dist/storage/provider.d.ts +35 -0
- package/dist/storage/provider.js +103 -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/package.json +8 -4
package/README.md
CHANGED
|
@@ -1,644 +1,269 @@
|
|
|
1
1
|
# AgentDoctor
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Codebase intelligence for developers, agents, and engineering teams.**
|
|
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
|
+
Local-first tooling that helps you understand a repository, keep AI coding agents safer, and query evidence-backed project knowledge — without requiring a cloud account or API key.
|
|
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
|
-
|
|
17
|
-
|
|
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.
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
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>`)
|
|
48
|
-
|
|
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.
|
|
50
|
-
|
|
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.
|
|
56
|
-
|
|
57
|
-
Project Brain structures understanding that exists in this codebase:
|
|
58
|
-
|
|
59
|
-
architecture · domains · components · entrypoints · dependencies · relationships · ownership · change-danger risks · claims · evidence · confidence · snapshots · deltas
|
|
60
|
-
|
|
61
|
-
Details: [docs/project-brain.md](docs/project-brain.md)
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
## Architecture
|
|
66
|
-
|
|
67
|
-

|
|
68
|
-
|
|
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` |
|
|
76
|
-
|
|
77
|
-
MCP depends on Brain. Brain does not depend on MCP.
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
## Project Brain
|
|
82
|
-
|
|
83
|
-

|
|
84
|
-
|
|
85
|
-
### Evidence & provenance
|
|
86
|
-
|
|
87
|
-
```text
|
|
88
|
-
Claim
|
|
89
|
-
↓
|
|
90
|
-
Evidence
|
|
91
|
-
↓
|
|
92
|
-
Snapshot
|
|
93
|
-
```
|
|
94
|
-
|
|
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.
|
|
100
|
-
|
|
101
|
-
### UNKNOWN semantics
|
|
102
|
-
|
|
103
|
-
```text
|
|
104
|
-
Ownership evidence unavailable
|
|
105
|
-
↓
|
|
106
|
-
UNKNOWN
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
No invented owners. Contract: `preserve-unknown-never-invent`.
|
|
12
|
+
**Published package:** `@praneeth_54/agentdoctor@`**2.0.0**
|
|
110
13
|
|
|
111
|
-
|
|
14
|
+
[Documentation index](docs/README.md) · [AgentDoctor 2.0 docs](docs/2.0/README.md) · [Known limitations](docs/2.0/overview/known-limitations.md) · [Readiness matrix](docs/2.0/overview/readiness-matrix.md) · [Security](SECURITY.md) · [Changelog](CHANGELOG.md)
|
|
112
15
|
|
|
113
16
|
---
|
|
114
17
|
|
|
115
|
-
##
|
|
116
|
-
|
|
117
|
-

|
|
118
|
-
|
|
119
|
-
```text
|
|
120
|
-
AI Coding Agent → MCP client → agentdoctor brain-mcp --root <abs> → Project Brain
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
STDIO only. No API key. No upload. `--root` is required. Diagnostics on **stderr**; protocol on **stdout**.
|
|
124
|
-
|
|
125
|
-
### Tools (from `src/mcp/brain/tools/registry.ts`)
|
|
126
|
-
|
|
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` |
|
|
139
|
-
|
|
140
|
-
Only controlled write: `brain_snapshot` `rebuild` under `<root>/.agentdoctor/project-brain/`.
|
|
141
|
-
|
|
142
|
-
Contract: [docs/mcp/brain-mcp.md](docs/mcp/brain-mcp.md)
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
## Real Cursor Agent Validation
|
|
147
|
-
|
|
148
|
-

|
|
149
|
-
|
|
150
|
-
```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)
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
Harness: `validation/mcp-agent` on `fixtures/understanding-dependencies-project`.
|
|
163
|
-
|
|
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` |
|
|
173
|
-
|
|
174
|
-
Documented harness results ([validation/mcp-agent/README.md](validation/mcp-agent/README.md), 2026-08-13, AgentDoctor 1.1.0):
|
|
175
|
-
|
|
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
|
|
18
|
+
## What AgentDoctor does
|
|
181
19
|
|
|
182
|
-
|
|
20
|
+
AgentDoctor combines three complementary layers:
|
|
183
21
|
|
|
184
|
-
|
|
22
|
+
1. **Safety** — audit and safely fix AI coding-agent configuration (scan → fix → verify → policy → CI).
|
|
23
|
+
2. **Repository Brain** — evidence-backed claims, proposals, human review, and Project Brain MCP tools.
|
|
24
|
+
3. **Codebase intelligence** — TypeScript/JavaScript AST graphs, git hotspots, impact analysis, knowledge governance, evaluate-only policy, and a combined MCP server.
|
|
185
25
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
## Built Through Real Validation
|
|
189
|
-
|
|
190
|
-
1.1.0 was hardened under real MCP, CI, and Windows pressure — not README theater.
|
|
191
|
-
|
|
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. |
|
|
204
|
-
|
|
205
|
-
---
|
|
206
|
-
|
|
207
|
-
## Repository Structure
|
|
208
|
-
|
|
209
|
-

|
|
210
|
-
|
|
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
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
Do not treat `.agentdoctor/` or project-local agent config dirs as committed AgentDoctor source.
|
|
26
|
+
It is **not** an autonomous coding agent, chatbot, or IDE process interceptor. It does **not** block Cursor/Claude/Codex unless you deliberately run commands through AgentDoctor’s controlled runner.
|
|
242
27
|
|
|
243
28
|
---
|
|
244
29
|
|
|
245
|
-
##
|
|
246
|
-
|
|
247
|
-

|
|
30
|
+
## Install
|
|
248
31
|
|
|
249
32
|
```bash
|
|
250
|
-
npm
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
npm run verify:project-brain # understanding + validate:project-brain + benchmark
|
|
254
|
-
npm run validate:mcp-agent
|
|
33
|
+
npm install -g @praneeth_54/agentdoctor
|
|
34
|
+
# or
|
|
35
|
+
npx @praneeth_54/agentdoctor --help
|
|
255
36
|
```
|
|
256
37
|
|
|
257
|
-
|
|
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.
|
|
38
|
+
Requires **Node.js 20+**. The runtime depends on the TypeScript compiler API for AST analysis.
|
|
269
39
|
|
|
270
40
|
---
|
|
271
41
|
|
|
272
|
-
##
|
|
42
|
+
## Quick start
|
|
273
43
|
|
|
274
44
|
```bash
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
agentdoctor --
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
agentdoctor brain
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
agentdoctor
|
|
287
|
-
agentdoctor
|
|
288
|
-
agentdoctor
|
|
289
|
-
agentdoctor
|
|
45
|
+
# Safety loop
|
|
46
|
+
agentdoctor scan
|
|
47
|
+
agentdoctor fix --dry-run
|
|
48
|
+
agentdoctor verify --baseline agentdoctor-report.json
|
|
49
|
+
|
|
50
|
+
# Repository Brain proposals (never auto-approved)
|
|
51
|
+
agentdoctor init --name "My App" --domain "payments"
|
|
52
|
+
agentdoctor brain proposals
|
|
53
|
+
agentdoctor brain review --artifact <id> --decision approved
|
|
54
|
+
|
|
55
|
+
# Intelligence
|
|
56
|
+
agentdoctor graph --mode auto --json
|
|
57
|
+
agentdoctor health --json
|
|
58
|
+
agentdoctor c4 --json
|
|
59
|
+
agentdoctor impact --json
|
|
60
|
+
agentdoctor refactor-impact --symbol MySymbol --json
|
|
61
|
+
|
|
62
|
+
# Knowledge (draft → human approve)
|
|
63
|
+
agentdoctor knowledge-create --title "Standard" --content "…"
|
|
64
|
+
agentdoctor knowledge-approve --id <id> --decision approved
|
|
65
|
+
|
|
66
|
+
# Policy (evaluate-only by default)
|
|
67
|
+
agentdoctor enforce --command "npm test" --json
|
|
68
|
+
|
|
69
|
+
# MCP (Brain tools preserved; combined server adds intelligence tools)
|
|
70
|
+
agentdoctor brain-mcp --root /ABS/PATH/TO/REPO
|
|
71
|
+
agentdoctor mcp --root /ABS/PATH/TO/REPO
|
|
72
|
+
|
|
73
|
+
# Local dashboard (loopback)
|
|
74
|
+
agentdoctor dashboard
|
|
290
75
|
```
|
|
291
76
|
|
|
292
77
|
---
|
|
293
78
|
|
|
294
|
-
##
|
|
79
|
+
## Capability status (honest)
|
|
295
80
|
|
|
296
|
-
|
|
81
|
+
Classifications match [docs/2.0/overview/readiness-matrix.md](docs/2.0/overview/readiness-matrix.md). **No blanket 5/5 claims.**
|
|
297
82
|
|
|
298
|
-
|
|
83
|
+
### Fully verified (shipped & regression-tested core)
|
|
299
84
|
|
|
300
|
-
|
|
85
|
+
| Capability | Notes |
|
|
86
|
+
| --------------------------------------------------------------------------------- | ---------------------------------------------------------- |
|
|
87
|
+
| Safety scan / Safe Fix / verify / policy gates | Exit codes and CI Action preserved |
|
|
88
|
+
| Agent adapters (Cursor, Claude Code, Codex, Copilot, Windsurf, Gemini CLI, Aider) | Detect + rules; Safe Fix where official ignore/deny exists |
|
|
89
|
+
| Project Brain store + Brain MCP tool names (`brain_*`) | STDIO MCP; `--root` required |
|
|
301
90
|
|
|
302
|
-
|
|
303
|
-
uses: pranee54/AgentDoctor@v1.1.0
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
For maximum supply-chain pinning, pin a full commit SHA of this repository. Do not use `@main`.
|
|
307
|
-
|
|
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`).
|
|
325
|
-
|
|
326
|
-
### Examples
|
|
327
|
-
|
|
328
|
-
**1. Basic scan** (report-only; default CLI `1.0.0`):
|
|
329
|
-
|
|
330
|
-
```yaml
|
|
331
|
-
permissions:
|
|
332
|
-
contents: read
|
|
333
|
-
|
|
334
|
-
steps:
|
|
335
|
-
- uses: actions/checkout@v4
|
|
336
|
-
|
|
337
|
-
- name: Audit coding-agent configuration
|
|
338
|
-
id: agentdoctor
|
|
339
|
-
uses: pranee54/AgentDoctor@v1.1.0
|
|
340
|
-
with:
|
|
341
|
-
path: .
|
|
342
|
-
```
|
|
343
|
-
|
|
344
|
-
**2. Minimum readiness score:**
|
|
345
|
-
|
|
346
|
-
```yaml
|
|
347
|
-
- uses: pranee54/AgentDoctor@v1.1.0
|
|
348
|
-
with:
|
|
349
|
-
path: .
|
|
350
|
-
minimum-score: "70"
|
|
351
|
-
```
|
|
91
|
+
### Partially validated (implemented, tested; accuracy/perf not independently certified)
|
|
352
92
|
|
|
353
|
-
|
|
93
|
+
| Capability | Entry points |
|
|
94
|
+
| ----------------------------------------------- | ------------------------------------------- |
|
|
95
|
+
| Repository Brain init / proposal review | `init`, `brain review`, `brain proposals` |
|
|
96
|
+
| TS/JS AST intelligence graph (+ regex fallback) | `graph` |
|
|
97
|
+
| Git hotspots / bus-factor style metrics | `health` (method disclosed per metric) |
|
|
98
|
+
| Impact / test-impact / refactor-impact | `impact`, `test-impact`, `refactor-impact` |
|
|
99
|
+
| Knowledge governance + abstention | `knowledge*`; MCP `knowledge_retrieve` |
|
|
100
|
+
| Policy packs + controlled enforcement runner | `enforce`, `platform policy-check` |
|
|
101
|
+
| Combined MCP (`agentdoctor mcp`) | Brain + intelligence tools |
|
|
102
|
+
| Dashboard + `/api/v2/*` | `dashboard` (loopback default) |
|
|
103
|
+
| Local-dev team auth (scrypt) | `team-register`, `team-login` — **not SSO** |
|
|
354
104
|
|
|
355
|
-
|
|
356
|
-
- uses: pranee54/AgentDoctor@v1.1.0
|
|
357
|
-
with:
|
|
358
|
-
path: .
|
|
359
|
-
fail-on-severity: critical
|
|
360
|
-
```
|
|
105
|
+
### Experimental
|
|
361
106
|
|
|
362
|
-
|
|
107
|
+
| Capability | Notes |
|
|
108
|
+
| -------------- | --------------------------------------------------------------------------------- |
|
|
109
|
+
| C4-style views | `c4` — **inferred/proposed** from graph evidence, not approved architecture truth |
|
|
363
110
|
|
|
364
|
-
|
|
365
|
-
- uses: pranee54/AgentDoctor@v1.1.0
|
|
366
|
-
with:
|
|
367
|
-
path: .
|
|
368
|
-
fail-on-rule: security/env-file-exposure
|
|
369
|
-
```
|
|
111
|
+
### Unsupported / not claimed
|
|
370
112
|
|
|
371
|
-
|
|
113
|
+
| Topic | Status |
|
|
114
|
+
| ------------------------------------------------ | -------------------------------------------------- |
|
|
115
|
+
| Enterprise SSO / IdP | Not bundled |
|
|
116
|
+
| Production SQLite / Postgres / vector search | Flags off / stub only |
|
|
117
|
+
| Full multi-language AST (Python, Go, …) | Unsupported |
|
|
118
|
+
| Direct IDE interception / agent process blocking | Unsupported |
|
|
119
|
+
| Coverage-backed test selection as ground truth | Not bundled (test-impact is heuristic/graph-based) |
|
|
372
120
|
|
|
373
|
-
|
|
374
|
-
- uses: pranee54/AgentDoctor@v1.1.0
|
|
375
|
-
with:
|
|
376
|
-
path: .
|
|
377
|
-
verify-baseline: agentdoctor-report.json
|
|
378
|
-
fail-on-new: "true"
|
|
379
|
-
```
|
|
121
|
+
---
|
|
380
122
|
|
|
381
|
-
|
|
123
|
+
## Safety (preserved)
|
|
382
124
|
|
|
383
|
-
|
|
384
|
-
- uses: pranee54/AgentDoctor@v1.1.0
|
|
385
|
-
id: agentdoctor
|
|
386
|
-
with:
|
|
387
|
-
path: .
|
|
388
|
-
json-output: "true"
|
|
389
|
-
output-file: agentdoctor-report.json
|
|
125
|
+
Scan agent configs and repository hygiene; apply Safe Fix where supported; verify against a baseline; fail CI on severity/score gates.
|
|
390
126
|
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
127
|
+
```bash
|
|
128
|
+
agentdoctor scan --json
|
|
129
|
+
agentdoctor fix -y
|
|
130
|
+
agentdoctor verify --baseline agentdoctor-report.json
|
|
395
131
|
```
|
|
396
132
|
|
|
397
|
-
|
|
133
|
+
GitHub Action: pin `pranee54/AgentDoctor@v2.0.0` (default npm version input is `2.0.0`). Surfaces matrix: [docs/reference/surfaces-and-adapters.md](docs/reference/surfaces-and-adapters.md).
|
|
398
134
|
|
|
399
135
|
```yaml
|
|
400
|
-
- uses: pranee54/AgentDoctor@
|
|
136
|
+
- uses: pranee54/AgentDoctor@v2.0.0
|
|
401
137
|
with:
|
|
402
138
|
path: .
|
|
403
|
-
|
|
139
|
+
version: "2.0.0"
|
|
404
140
|
```
|
|
405
141
|
|
|
406
|
-
|
|
142
|
+
---
|
|
407
143
|
|
|
408
|
-
|
|
409
|
-
- uses: pranee54/AgentDoctor@v1.1.0
|
|
410
|
-
with:
|
|
411
|
-
path: .
|
|
412
|
-
annotations: "true"
|
|
413
|
-
```
|
|
144
|
+
## Repository Brain
|
|
414
145
|
|
|
415
|
-
**
|
|
146
|
+
`agentdoctor init` writes **PROPOSED** artifacts under `.agentdoctor/repository-brain/proposals/`. They are **not** facts until a human reviews them.
|
|
416
147
|
|
|
417
|
-
```
|
|
418
|
-
|
|
419
|
-
|
|
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 }}
|
|
148
|
+
```bash
|
|
149
|
+
agentdoctor brain init
|
|
150
|
+
agentdoctor brain snapshot
|
|
151
|
+
agentdoctor brain review --artifact prop_… --decision approved|rejected
|
|
443
152
|
```
|
|
444
153
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
From [`action.yml`](action.yml):
|
|
154
|
+
Guide: [docs/2.0/guides/repository-brain.md](docs/2.0/guides/repository-brain.md).
|
|
448
155
|
|
|
449
|
-
|
|
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. |
|
|
470
|
-
|
|
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
|
|
156
|
+
---
|
|
481
157
|
|
|
482
|
-
|
|
158
|
+
## Codebase intelligence
|
|
483
159
|
|
|
484
|
-
-
|
|
485
|
-
-
|
|
486
|
-
-
|
|
487
|
-
-
|
|
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
|
|
160
|
+
- **AST graph** — TypeScript/JavaScript via the TypeScript compiler API; regex fallback when needed (`graph --mode auto|typescript-ast|regex`).
|
|
161
|
+
- **Git intelligence** — recent-window hotspots / co-change heuristics with method disclosure (`health`).
|
|
162
|
+
- **C4 views** — inferred diagrams (`c4`); label them proposed/inferred.
|
|
163
|
+
- **Impact** — change/test/refactor blast-radius helpers (`impact`, `refactor-impact`).
|
|
492
164
|
|
|
493
|
-
|
|
165
|
+
Limitations: call resolution is best-effort; non-TS languages are not deeply analyzed.
|
|
494
166
|
|
|
495
|
-
|
|
167
|
+
---
|
|
496
168
|
|
|
497
|
-
|
|
169
|
+
## Knowledge governance
|
|
498
170
|
|
|
499
|
-
|
|
500
|
-
| -------------- | ----------------------------------- |
|
|
501
|
-
| Preferred tag | `uses: pranee54/AgentDoctor@v1.1.0` |
|
|
502
|
-
| Stronger pin | Full commit SHA of this repository |
|
|
503
|
-
| Avoid | `@main` |
|
|
171
|
+
Draft → pending-review → approved/rejected. Retrieval **abstains** when no approved record matches.
|
|
504
172
|
|
|
505
|
-
|
|
173
|
+
Guide: [docs/2.0/guides/knowledge-governance.md](docs/2.0/guides/knowledge-governance.md).
|
|
506
174
|
|
|
507
175
|
---
|
|
508
176
|
|
|
509
|
-
##
|
|
510
|
-
|
|
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)
|
|
516
|
-
|
|
517
|
-
### Built for developers who care about repository understanding
|
|
177
|
+
## Policy evaluation and controlled enforcement
|
|
518
178
|
|
|
519
|
-
|
|
|
520
|
-
|
|
|
521
|
-
|
|
|
522
|
-
|
|
|
523
|
-
|
|
|
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 |
|
|
179
|
+
| Mode | Behavior |
|
|
180
|
+
| ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------- |
|
|
181
|
+
| Policy evaluation (`platform policy-check`, MCP `policy_evaluate`) | Verdict only; `executionResult: "not-executed"` |
|
|
182
|
+
| Controlled runner (`enforce`) | Can report `blocked-by-enforcement` when **AgentDoctor** refuses to run a blocked command |
|
|
183
|
+
| Third-party IDEs | **Not** intercepted |
|
|
530
184
|
|
|
531
|
-
|
|
185
|
+
Trust boundaries: [docs/2.0/overview/trust-boundaries.md](docs/2.0/overview/trust-boundaries.md).
|
|
532
186
|
|
|
533
187
|
---
|
|
534
188
|
|
|
535
|
-
## MCP
|
|
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
|
-
```
|
|
189
|
+
## MCP
|
|
556
190
|
|
|
557
|
-
|
|
191
|
+
| Command | Server | Tools |
|
|
192
|
+
| ------------------------------------- | ---------- | -------------------------- |
|
|
193
|
+
| `agentdoctor brain-mcp --root <path>` | Brain only | Stable `brain_*` names |
|
|
194
|
+
| `agentdoctor mcp --root <path>` | Combined | Brain + intelligence tools |
|
|
558
195
|
|
|
559
|
-
|
|
196
|
+
MCP docs: [docs/2.0/guides/mcp.md](docs/2.0/guides/mcp.md) · legacy detail: [docs/mcp/brain-mcp.md](docs/mcp/brain-mcp.md).
|
|
560
197
|
|
|
561
198
|
---
|
|
562
199
|
|
|
563
|
-
##
|
|
200
|
+
## CLI / API / dashboard
|
|
564
201
|
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
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 |
|
|
202
|
+
- CLI index: [docs/2.0/guides/cli.md](docs/2.0/guides/cli.md)
|
|
203
|
+
- HTTP API (local dashboard): [docs/2.0/guides/api.md](docs/2.0/guides/api.md)
|
|
204
|
+
- Dashboard defaults to `127.0.0.1`; `?user=` role selection is **not** authentication
|
|
573
205
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
206
|
+
```bash
|
|
207
|
+
agentdoctor dashboard
|
|
208
|
+
agentdoctor doctor --json
|
|
209
|
+
```
|
|
577
210
|
|
|
578
|
-
|
|
211
|
+
---
|
|
579
212
|
|
|
580
|
-
|
|
213
|
+
## Local-development team authentication
|
|
581
214
|
|
|
582
|
-
|
|
215
|
+
```bash
|
|
216
|
+
agentdoctor team-register --username alice --password '………'
|
|
217
|
+
agentdoctor team-login --username alice --password '………'
|
|
218
|
+
```
|
|
583
219
|
|
|
584
|
-
|
|
220
|
+
This is **local-dev scrypt auth**, clearly labeled — **not** enterprise SSO.
|
|
585
221
|
|
|
586
222
|
---
|
|
587
223
|
|
|
588
|
-
##
|
|
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 |
|
|
224
|
+
## Important limitations (read before adopting)
|
|
603
225
|
|
|
604
|
-
|
|
226
|
+
1. AST depth is **TypeScript/JavaScript**-oriented.
|
|
227
|
+
2. Test-impact is **heuristic / graph-based**, not coverage-oracle accurate.
|
|
228
|
+
3. C4 views are **inferred**, not approved architecture.
|
|
229
|
+
4. Firewall is **evaluate-only** unless you use AgentDoctor’s controlled runner.
|
|
230
|
+
5. Team auth is **local-dev**, not SSO.
|
|
231
|
+
6. No IDE interception.
|
|
232
|
+
7. No production SQLite/Postgres/vector backend in this package.
|
|
233
|
+
8. No complete multi-language AST.
|
|
234
|
+
9. Deep 2.0 audits and readiness reports live on GitHub under [docs/2.0/](docs/2.0/README.md) (not inside the npm tarball — packaging Option B).
|
|
605
235
|
|
|
606
|
-
|
|
236
|
+
Full list: [docs/2.0/overview/known-limitations.md](docs/2.0/overview/known-limitations.md).
|
|
607
237
|
|
|
608
|
-
|
|
238
|
+
---
|
|
609
239
|
|
|
610
|
-
|
|
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 |
|
|
240
|
+
## Compatibility
|
|
616
241
|
|
|
617
|
-
|
|
242
|
+
- Safety CLI exit codes and Brain MCP tool names are preserved.
|
|
243
|
+
- Additive 2.0 commands do not remove 1.x workflows.
|
|
244
|
+
- Migration notes: [docs/2.0/guides/migration.md](docs/2.0/guides/migration.md).
|
|
618
245
|
|
|
619
246
|
---
|
|
620
247
|
|
|
621
|
-
##
|
|
248
|
+
## Documentation map
|
|
622
249
|
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
250
|
+
| Area | Link |
|
|
251
|
+
| ---------------- | -------------------------------------------------------------------------- |
|
|
252
|
+
| 2.0 index | [docs/2.0/README.md](docs/2.0/README.md) |
|
|
253
|
+
| CLI / MCP / API | [docs/2.0/guides/](docs/2.0/guides/) |
|
|
254
|
+
| Release blockers | [docs/2.0/audits/release-blockers.md](docs/2.0/audits/release-blockers.md) |
|
|
255
|
+
| Docs hub | [docs/README.md](docs/README.md) |
|
|
256
|
+
| Changelog | [CHANGELOG.md](CHANGELOG.md) |
|
|
257
|
+
| Contributing | [CONTRIBUTING.md](CONTRIBUTING.md) |
|
|
631
258
|
|
|
632
259
|
---
|
|
633
260
|
|
|
634
|
-
##
|
|
635
|
-
|
|
636
|
-
Local analysis. No API key for core Brain/Safety. No default upload. Redacted Brain serialization.
|
|
261
|
+
## Contributing
|
|
637
262
|
|
|
638
|
-
|
|
263
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) and [docs/development/development.md](docs/development/development.md).
|
|
639
264
|
|
|
640
265
|
---
|
|
641
266
|
|
|
642
267
|
## License
|
|
643
268
|
|
|
644
|
-
[
|
|
269
|
+
MIT — see [LICENSE](LICENSE).
|