@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.
Files changed (170) hide show
  1. package/CHANGELOG.md +95 -7
  2. package/README.md +163 -538
  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/cli/commands/brain.d.ts +12 -0
  24. package/dist/cli/commands/brain.js +162 -0
  25. package/dist/cli/commands/complete.d.ts +23 -0
  26. package/dist/cli/commands/complete.js +232 -0
  27. package/dist/cli/commands/explain.js +1 -1
  28. package/dist/cli/commands/fix.js +22 -2
  29. package/dist/cli/commands/mcp.d.ts +8 -0
  30. package/dist/cli/commands/mcp.js +14 -0
  31. package/dist/cli/commands/platform.d.ts +15 -0
  32. package/dist/cli/commands/platform.js +191 -0
  33. package/dist/cli/commands/v2.d.ts +55 -0
  34. package/dist/cli/commands/v2.js +278 -0
  35. package/dist/cli/program.js +809 -2
  36. package/dist/constants.d.ts +3 -2
  37. package/dist/constants.js +5 -1
  38. package/dist/contracts/adapters.d.ts +7 -0
  39. package/dist/contracts/adapters.js +60 -0
  40. package/dist/contracts/index.d.ts +162 -0
  41. package/dist/contracts/index.js +18 -0
  42. package/dist/core/baseline/store.d.ts +48 -0
  43. package/dist/core/baseline/store.js +163 -0
  44. package/dist/core/brain-cli/service.d.ts +26 -0
  45. package/dist/core/brain-cli/service.js +175 -0
  46. package/dist/core/brain-product/init.d.ts +45 -0
  47. package/dist/core/brain-product/init.js +232 -0
  48. package/dist/core/changes/analyze.d.ts +41 -0
  49. package/dist/core/changes/analyze.js +223 -0
  50. package/dist/core/context-health/analyze.d.ts +15 -0
  51. package/dist/core/context-health/analyze.js +234 -0
  52. package/dist/core/fix/apply.d.ts +21 -4
  53. package/dist/core/fix/apply.js +118 -18
  54. package/dist/core/fix/backup.d.ts +30 -0
  55. package/dist/core/fix/backup.js +193 -0
  56. package/dist/core/fix/plan.d.ts +6 -3
  57. package/dist/core/fix/plan.js +113 -9
  58. package/dist/core/fix/render.d.ts +2 -0
  59. package/dist/core/fix/render.js +36 -21
  60. package/dist/core/fix/run.js +5 -1
  61. package/dist/core/fix/safe-target.d.ts +14 -0
  62. package/dist/core/fix/safe-target.js +81 -0
  63. package/dist/core/fix/types.d.ts +12 -1
  64. package/dist/core/fix/types.js +2 -0
  65. package/dist/core/fix/writers/claude-settings.js +3 -1
  66. package/dist/core/fix/writers/codex-config.d.ts +3 -0
  67. package/dist/core/fix/writers/codex-config.js +24 -3
  68. package/dist/core/fix/writers/cursorignore.js +3 -1
  69. package/dist/core/fix/writers/simple-ignore.d.ts +16 -0
  70. package/dist/core/fix/writers/simple-ignore.js +68 -0
  71. package/dist/core/monorepo/detect.d.ts +13 -0
  72. package/dist/core/monorepo/detect.js +121 -0
  73. package/dist/core/rules/build-context.js +22 -3
  74. package/dist/core/rules/context/generated-directory.js +11 -1
  75. package/dist/core/rules/context/large-instruction-file.js +6 -0
  76. package/dist/core/rules/context/large-log-file.js +16 -1
  77. package/dist/core/rules/ignore.d.ts +11 -1
  78. package/dist/core/rules/ignore.js +22 -1
  79. package/dist/core/rules/instructions/empty-instructions.js +7 -0
  80. package/dist/core/rules/security/env-file-exposure.js +23 -2
  81. package/dist/core/rules/security/private-key-file.js +1 -1
  82. package/dist/core/scanner/scan.js +1 -1
  83. package/dist/core/schemas/validate.d.ts +6 -0
  84. package/dist/core/schemas/validate.js +62 -0
  85. package/dist/core/scoring/compute-scores.d.ts +1 -1
  86. package/dist/core/scoring/compute-scores.js +5 -1
  87. package/dist/core/scoring/placeholder.d.ts +1 -1
  88. package/dist/core/scoring/placeholder.js +5 -1
  89. package/dist/core/secrets/scan.d.ts +23 -0
  90. package/dist/core/secrets/scan.js +172 -0
  91. package/dist/dashboard/server.d.ts +24 -0
  92. package/dist/dashboard/server.js +386 -0
  93. package/dist/enforcement/runner.d.ts +23 -0
  94. package/dist/enforcement/runner.js +56 -0
  95. package/dist/index.d.ts +13 -0
  96. package/dist/index.js +12 -0
  97. package/dist/integrations/github/pr-analyze.d.ts +28 -0
  98. package/dist/integrations/github/pr-analyze.js +98 -0
  99. package/dist/integrations/local-ai/provider.d.ts +45 -0
  100. package/dist/integrations/local-ai/provider.js +104 -0
  101. package/dist/intelligence/git/analyze.d.ts +34 -0
  102. package/dist/intelligence/git/analyze.js +136 -0
  103. package/dist/intelligence/graph/build.d.ts +13 -0
  104. package/dist/intelligence/graph/build.js +215 -0
  105. package/dist/knowledge/store.d.ts +25 -0
  106. package/dist/knowledge/store.js +91 -0
  107. package/dist/mcp/agentdoctor/server.d.ts +16 -0
  108. package/dist/mcp/agentdoctor/server.js +67 -0
  109. package/dist/mcp/brain/session.js +7 -7
  110. package/dist/mcp/intelligence/handlers.d.ts +11 -0
  111. package/dist/mcp/intelligence/handlers.js +175 -0
  112. package/dist/mcp/intelligence/path-safety.d.ts +11 -0
  113. package/dist/mcp/intelligence/path-safety.js +82 -0
  114. package/dist/mcp/intelligence/registry.d.ts +8 -0
  115. package/dist/mcp/intelligence/registry.js +160 -0
  116. package/dist/ops/health.d.ts +18 -0
  117. package/dist/ops/health.js +51 -0
  118. package/dist/platform/ai-quality/analyze.d.ts +9 -0
  119. package/dist/platform/ai-quality/analyze.js +65 -0
  120. package/dist/platform/architecture/drift.d.ts +17 -0
  121. package/dist/platform/architecture/drift.js +74 -0
  122. package/dist/platform/auth/local.d.ts +15 -0
  123. package/dist/platform/auth/local.js +58 -0
  124. package/dist/platform/context-security/analyze.d.ts +6 -0
  125. package/dist/platform/context-security/analyze.js +97 -0
  126. package/dist/platform/firewall/evaluate.d.ts +54 -0
  127. package/dist/platform/firewall/evaluate.js +308 -0
  128. package/dist/platform/graph/build.d.ts +6 -0
  129. package/dist/platform/graph/build.js +193 -0
  130. package/dist/platform/health/analyze.d.ts +7 -0
  131. package/dist/platform/health/analyze.js +186 -0
  132. package/dist/platform/index.d.ts +27 -0
  133. package/dist/platform/index.js +87 -0
  134. package/dist/platform/knowledge/analyze.d.ts +20 -0
  135. package/dist/platform/knowledge/analyze.js +96 -0
  136. package/dist/platform/provenance/build.d.ts +44 -0
  137. package/dist/platform/provenance/build.js +65 -0
  138. package/dist/platform/readiness/scorecard.d.ts +5 -0
  139. package/dist/platform/readiness/scorecard.js +98 -0
  140. package/dist/platform/refactor/impact.d.ts +20 -0
  141. package/dist/platform/refactor/impact.js +60 -0
  142. package/dist/platform/reports/export.d.ts +12 -0
  143. package/dist/platform/reports/export.js +92 -0
  144. package/dist/platform/security/redact.d.ts +15 -0
  145. package/dist/platform/security/redact.js +87 -0
  146. package/dist/platform/sessions/store.d.ts +32 -0
  147. package/dist/platform/sessions/store.js +97 -0
  148. package/dist/platform/store.d.ts +6 -0
  149. package/dist/platform/store.js +57 -0
  150. package/dist/platform/test-impact/analyze.d.ts +32 -0
  151. package/dist/platform/test-impact/analyze.js +164 -0
  152. package/dist/platform/time-machine/compare.d.ts +17 -0
  153. package/dist/platform/time-machine/compare.js +62 -0
  154. package/dist/platform/tokens/plan.d.ts +28 -0
  155. package/dist/platform/tokens/plan.js +89 -0
  156. package/dist/platform/types.d.ts +111 -0
  157. package/dist/platform/types.js +5 -0
  158. package/dist/plugins/runtime.d.ts +36 -0
  159. package/dist/plugins/runtime.js +101 -0
  160. package/dist/plugins/sdk.d.ts +29 -0
  161. package/dist/plugins/sdk.js +114 -0
  162. package/dist/policy/packs.d.ts +9 -0
  163. package/dist/policy/packs.js +59 -0
  164. package/dist/reporters/terminal/report.js +38 -5
  165. package/dist/storage/provider.d.ts +35 -0
  166. package/dist/storage/provider.js +103 -0
  167. package/dist/team/auth.d.ts +35 -0
  168. package/dist/team/auth.js +70 -0
  169. package/dist/types/index.d.ts +5 -1
  170. package/package.json +8 -4
package/CHANGELOG.md CHANGED
@@ -9,8 +9,95 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  ### Notes
11
11
 
12
+ - Post-cut work only. Version cut for **2.0.0** is recorded below (not yet
13
+ committed, tagged, or published unless a human does so separately).
14
+
15
+ ## [2.0.0] — 2026-09-21
16
+
17
+ AgentDoctor 2.0 expands the product from Safety + Project Brain into **codebase
18
+ intelligence** for developers, agents, and engineering teams — while preserving
19
+ Safety CLI behavior and Brain MCP tool names.
20
+
21
+ Canonical docs: [docs/2.0/](docs/2.0/README.md). Readiness:
22
+ [docs/2.0/overview/readiness-matrix.md](docs/2.0/overview/readiness-matrix.md).
23
+ Limitations: [docs/2.0/overview/known-limitations.md](docs/2.0/overview/known-limitations.md).
24
+
25
+ ### Added
26
+
27
+ - Shared contracts layer (`CONTRACTS_VERSION`) unifying findings / graph /
28
+ knowledge / policy shapes.
29
+ - Repository Brain productization: `init`, proposal artifacts, `brain review` /
30
+ `brain proposals` / product snapshots (proposals never auto-approved).
31
+ - TypeScript/JavaScript AST intelligence graph (`graph`) with regex fallback.
32
+ - Git engineering intelligence (`health`) with per-metric method disclosure.
33
+ - C4-style architecture views (`c4`) labeled inferred/proposed.
34
+ - Impact surfaces: `impact`, `test-impact`, `refactor-impact`.
35
+ - Governed knowledge store with abstention (`knowledge`, `knowledge-create`,
36
+ `knowledge-approve`).
37
+ - Policy packs + AgentDoctor-controlled enforcement runner (`enforce`) distinct
38
+ from evaluate-only firewall.
39
+ - Combined MCP server (`agentdoctor mcp`) exposing Brain tools **plus**
40
+ intelligence tools without renaming `brain_*`.
41
+ - Dashboard `/api/v2/*` endpoints (graph, health, c4, knowledge,
42
+ projects/workspaces stubs).
43
+ - Local-dev team authentication (`team-register`, `team-login`) — not enterprise SSO.
44
+ - Ops health via `doctor --json`.
45
+ - Security hardening: MCP/dashboard path-safety, symlink skip in AST walk,
46
+ secret redaction on exports/API samples.
47
+ - Documentation tree: `docs/2.0/` (overview, guides, reports, audits, release).
48
+ - Additional 2.0 platform / Safety surfaces landed with this release train:
49
+ evaluate-only Action Policy Evaluator (`platform policy-check`, alias
50
+ `firewall-check`), session audit, provenance, context-security, architecture
51
+ drift, time-machine, token planner, readiness scorecard, multi-format reports,
52
+ Copilot / Windsurf / Gemini CLI / Aider adapters, Project Brain CLI
53
+ (`brain init|status|inspect|rebuild|history|search|export|import`),
54
+ `changes`, `context-health`, `secrets`, Safe Fix 2.0 backup/undo, named
55
+ baselines, monorepo `packages`, local `pr-review`, loopback `dashboard`,
56
+ `plugins`, optional `local-ai`.
57
+
58
+ ### Security
59
+
60
+ - Path-traversal hardening for MCP `dependency_lookup` and dashboard hostile URLs.
61
+ - Evaluate-only policy evaluation remains explicit (`executionResult: "not-executed"`).
62
+ - `blocked-by-enforcement` only on the AgentDoctor-controlled runner block path.
63
+ - Loopback dashboard default retained; non-loopback requires explicit opt-in.
64
+ - Safe Fix target hardening: refuse symlink write-through, symlink ancestors,
65
+ directory targets, and non-allowlisted paths.
66
+
67
+ ### Compatibility
68
+
69
+ - Safety `scan` / `fix` / `verify` workflows and exit codes preserved.
70
+ - Brain MCP tool names preserved (`brain_overview`, …, `brain_snapshot`).
71
+ - Additive CLI commands only; no intentional removal of 1.x public surfaces.
72
+ - Platform evaluate-only firewall behavior preserved.
73
+
74
+ ### Known limitations (at release)
75
+
76
+ - AST analysis is TypeScript/JavaScript-focused; other languages unsupported for
77
+ deep graph analysis.
78
+ - Test-impact is heuristic/graph-based (no coverage-file oracle).
79
+ - C4 views are inferred, not approved architecture truth.
80
+ - No IDE interception of third-party agents.
81
+ - Local-dev team auth is not SSO.
82
+ - SQLite/Postgres/vector backends are not production-complete.
83
+ - See README limitations and `docs/2.0/overview/known-limitations.md`.
84
+
85
+ ### Migration notes
86
+
87
+ - Upgrading from 1.1.x: existing `.agentdoctor` Safety/Brain data remains valid.
88
+ - New directories may appear under `.agentdoctor/repository-brain/`,
89
+ `.agentdoctor/knowledge/`, `.agentdoctor/team/`, `.agentdoctor/platform/`.
90
+ - Treat `init` outputs as **proposed** until reviewed.
91
+ - Prefer `agentdoctor mcp` for combined tools; `brain-mcp` remains for Brain-only clients.
92
+ - Full guide: [docs/2.0/guides/migration.md](docs/2.0/guides/migration.md).
93
+
94
+ ### Notes
95
+
96
+ - Readiness matrix classifications remain honest; many 2.0 surfaces are
97
+ **implemented but partially validated**. No blanket 5/5 claims.
98
+ - Multi-writer Safe Fix is still not fully atomic across targets after preflight.
12
99
  - Vitest 3 → 4/5 major upgrade remains deferred (dev-only moderate advisory).
13
- - Do **not** auto-publish from CI agents.
100
+ - Do **not** auto-publish from CI agents. Tag/publish require a separate human step.
14
101
 
15
102
  ## [1.1.1] — 2026-09-20
16
103
 
@@ -33,9 +120,9 @@ GitHub Release, and Action default are aligned on **`1.1.1`**.
33
120
 
34
121
  ### Docs
35
122
 
36
- - [docs/DEPENDENCY_SECURITY_AUDIT.md](docs/DEPENDENCY_SECURITY_AUDIT.md)
37
- - [docs/DEPENDABOT_PR_REVIEW.md](docs/DEPENDABOT_PR_REVIEW.md)
38
- - [docs/release-notes-v1.1.1.md](docs/release-notes-v1.1.1.md)
123
+ - [docs/archive/DEPENDENCY_SECURITY_AUDIT.md](docs/archive/DEPENDENCY_SECURITY_AUDIT.md)
124
+ - [docs/archive/DEPENDABOT_PR_REVIEW.md](docs/archive/DEPENDABOT_PR_REVIEW.md)
125
+ - [docs/release-notes/v1.1.1.md](docs/release-notes/v1.1.1.md)
39
126
 
40
127
  ## [1.1.0] — 2026-08-13
41
128
 
@@ -131,7 +218,7 @@ First production release: Scan → Fix → Verify → CI contract frozen for v1.
131
218
 
132
219
  ### Compatibility
133
220
 
134
- - CLI + JSON + rule ID contracts frozen for v1 (see [docs/compatibility.md](docs/compatibility.md))
221
+ - CLI + JSON + rule ID contracts frozen for v1 (see [docs/reference/compatibility.md](docs/reference/compatibility.md))
135
222
  - Action `version` input default is `1.0.0` (bumped after npm published `@praneeth_54/agentdoctor@1.0.0`)
136
223
 
137
224
  ## [0.3.0-beta] — 2026-08-07
@@ -175,7 +262,7 @@ Minor beta: deterministic readiness scoring and CLI `--min-score` enforcement.
175
262
 
176
263
  - Deterministic readiness scoring (v1): `scan()` populates `scoringAvailable: true` and
177
264
  `scores` (`overall`, `categories`, `agents`) from post-dedupe findings
178
- ([docs/scoring.md](docs/scoring.md))
265
+ ([docs/reference/scoring.md](docs/reference/scoring.md))
179
266
  - CLI `--min-score N` enforcement: exit code `1` when `scores.overall < N`
180
267
  - `--ci` without `--min-score` remains report-only (exit `0` on successful scan)
181
268
  - Scoring specification and compatibility / exit-code docs updated for shipped behavior
@@ -298,7 +385,8 @@ First public beta.
298
385
  - Not a complete secret scanner
299
386
  - Git “tracked secret” detection deferred
300
387
 
301
- [Unreleased]: https://github.com/pranee54/AgentDoctor/compare/v1.1.1...HEAD
388
+ [Unreleased]: https://github.com/pranee54/AgentDoctor/compare/v2.0.0...HEAD
389
+ [2.0.0]: https://github.com/pranee54/AgentDoctor/compare/v1.1.1...v2.0.0
302
390
  [1.1.1]: https://github.com/pranee54/AgentDoctor/releases/tag/v1.1.1
303
391
  [1.1.0]: https://github.com/pranee54/AgentDoctor/releases/tag/v1.1.0
304
392
  [1.0.0]: https://github.com/pranee54/AgentDoctor/releases/tag/v1.0.0