carto-md 2.0.9 → 2.1.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 (209) hide show
  1. package/CHANGELOG.md +135 -0
  2. package/CONTRIBUTING.md +27 -20
  3. package/README.md +177 -448
  4. package/docs/anci/v0.1-DRAFT.md +132 -2
  5. package/docs/api/README.md +124 -0
  6. package/docs/api/did_we_discuss_this.md +36 -0
  7. package/docs/api/dismiss_gap.md +39 -0
  8. package/docs/api/dismiss_suggestion.md +34 -0
  9. package/docs/api/explain_change_in_natural_language.md +33 -0
  10. package/docs/api/find_consumers_of_api.md +36 -0
  11. package/docs/api/get_action_patterns.md +34 -0
  12. package/docs/api/get_active_drift.md +32 -0
  13. package/docs/api/get_active_suggestions.md +25 -0
  14. package/docs/api/get_ai_cost_attribution.md +32 -0
  15. package/docs/api/get_arch_events.md +44 -0
  16. package/docs/api/get_architectural_drift.md +39 -0
  17. package/docs/api/get_architecture.md +25 -0
  18. package/docs/api/get_blast_radius.md +36 -0
  19. package/docs/api/get_canonical_pattern.md +41 -0
  20. package/docs/api/get_change_plan.md +34 -0
  21. package/docs/api/get_change_velocity.md +34 -0
  22. package/docs/api/get_churn_vs_blast_radius.md +34 -0
  23. package/docs/api/get_complexity_trend.md +41 -0
  24. package/docs/api/get_context.md +34 -0
  25. package/docs/api/get_conventions.md +34 -0
  26. package/docs/api/get_cross_domain.md +25 -0
  27. package/docs/api/get_cross_language_call_graph.md +25 -0
  28. package/docs/api/get_cross_repo_blast_radius.md +36 -0
  29. package/docs/api/get_cross_team_coupling.md +25 -0
  30. package/docs/api/get_data_flow.md +35 -0
  31. package/docs/api/get_dead_code_with_confidence.md +32 -0
  32. package/docs/api/get_decision_log.md +34 -0
  33. package/docs/api/get_dependency_surface.md +25 -0
  34. package/docs/api/get_domain.md +34 -0
  35. package/docs/api/get_domain_evolution.md +41 -0
  36. package/docs/api/get_domain_health.md +34 -0
  37. package/docs/api/get_domains_list.md +25 -0
  38. package/docs/api/get_drift_digest.md +32 -0
  39. package/docs/api/get_env_vars.md +32 -0
  40. package/docs/api/get_evolution_delta.md +36 -0
  41. package/docs/api/get_file_ownership.md +33 -0
  42. package/docs/api/get_file_receipts.md +34 -0
  43. package/docs/api/get_file_summary.md +34 -0
  44. package/docs/api/get_gaps.md +52 -0
  45. package/docs/api/get_high_impact_files.md +32 -0
  46. package/docs/api/get_hot_in_prod_no_tests.md +34 -0
  47. package/docs/api/get_hotspot_files.md +39 -0
  48. package/docs/api/get_iac_resources.md +25 -0
  49. package/docs/api/get_intent.md +25 -0
  50. package/docs/api/get_interface_contract.md +33 -0
  51. package/docs/api/get_intervention_history.md +34 -0
  52. package/docs/api/get_invariants.md +39 -0
  53. package/docs/api/get_llm_enrichment.md +33 -0
  54. package/docs/api/get_microservice_cut_points.md +32 -0
  55. package/docs/api/get_microservices_migration_cut_points.md +27 -0
  56. package/docs/api/get_minimal_context_for_intent.md +39 -0
  57. package/docs/api/get_models.md +32 -0
  58. package/docs/api/get_neighbors.md +41 -0
  59. package/docs/api/get_org_architecture.md +27 -0
  60. package/docs/api/get_org_domain_mapping.md +27 -0
  61. package/docs/api/get_pending_decisions.md +34 -0
  62. package/docs/api/get_predictive_risk.md +32 -0
  63. package/docs/api/get_progressive_disclosure_tree.md +25 -0
  64. package/docs/api/get_recent_decisions.md +39 -0
  65. package/docs/api/get_risk_weighted_blast_radius.md +32 -0
  66. package/docs/api/get_routes.md +25 -0
  67. package/docs/api/get_safety_checklist.md +33 -0
  68. package/docs/api/get_semantic_diff.md +34 -0
  69. package/docs/api/get_service_boundary_violations.md +27 -0
  70. package/docs/api/get_service_dependency_graph.md +27 -0
  71. package/docs/api/get_session_context.md +34 -0
  72. package/docs/api/get_similar_patterns.md +39 -0
  73. package/docs/api/get_stale_docs.md +25 -0
  74. package/docs/api/get_structure.md +25 -0
  75. package/docs/api/get_temporal_context.md +36 -0
  76. package/docs/api/get_test_coverage_map.md +25 -0
  77. package/docs/api/get_token_budget_report.md +36 -0
  78. package/docs/api/get_upgrade_risk.md +25 -0
  79. package/docs/api/get_working_memory.md +25 -0
  80. package/docs/api/history.md +78 -0
  81. package/docs/api/impact.md +56 -0
  82. package/docs/api/ingest_otlp_traces.md +34 -0
  83. package/docs/api/memory.md +70 -0
  84. package/docs/api/org.md +51 -0
  85. package/docs/api/patterns.md +63 -0
  86. package/docs/api/scaffold_for_intent.md +34 -0
  87. package/docs/api/search_routes.md +34 -0
  88. package/docs/api/set_intent.md +45 -0
  89. package/docs/api/simulate_change_impact.md +39 -0
  90. package/docs/api/validate_change.md +39 -0
  91. package/docs/api/validate_diff.md +39 -0
  92. package/docs/concepts/anci.md +87 -0
  93. package/docs/concepts/blast-radius.md +66 -0
  94. package/docs/concepts/domains.md +116 -0
  95. package/docs/concepts/import-graph.md +102 -0
  96. package/docs/concepts/mcp-integration.md +150 -0
  97. package/docs/guides/adding-feature-safely.md +101 -0
  98. package/docs/guides/ci-integration.md +175 -0
  99. package/docs/guides/monorepo-setup.md +121 -0
  100. package/docs/guides/onboarding-new-engineer.md +121 -0
  101. package/docs/guides/pre-merge-review.md +139 -0
  102. package/docs/migration/v1-to-v2.md +110 -0
  103. package/docs/quickstart.md +95 -0
  104. package/docs/scale.md +2 -2
  105. package/docs/screenshots/carto-supabase-blast-radius.png +0 -0
  106. package/docs/troubleshooting.md +180 -0
  107. package/package.json +11 -4
  108. package/scripts/gen-api-docs.js +202 -0
  109. package/src/acp/agent.js +83 -11
  110. package/src/acp/config.js +64 -0
  111. package/src/acp/persistence.js +146 -0
  112. package/src/acp/providers/anthropic.js +179 -27
  113. package/src/acp/providers/index.js +15 -2
  114. package/src/acp/providers/openai.js +164 -38
  115. package/src/acp/providers/sse.js +82 -0
  116. package/src/acp/safety.js +128 -0
  117. package/src/acp/session.js +73 -0
  118. package/src/adjacent/call-graph.js +170 -0
  119. package/src/adjacent/iac.js +167 -0
  120. package/src/adjacent/llm-enrich.js +35 -0
  121. package/src/adjacent/runtime.js +216 -0
  122. package/src/adjacent/semantic-diff.js +143 -0
  123. package/src/agents/domains.js +72 -24
  124. package/src/agents/scan-structure.js +1 -1
  125. package/src/ai/context-builder.js +215 -0
  126. package/src/ai/retrieval/lexical.js +122 -0
  127. package/src/ai/retrieval/rrf.js +121 -0
  128. package/src/ai/retrieval/semantic.js +35 -0
  129. package/src/ai/retrieval/structural.js +82 -0
  130. package/src/ai/tools.js +425 -0
  131. package/src/anci/consumer.js +83 -3
  132. package/src/anci/emit.js +20 -3
  133. package/src/anci/git-meta.js +171 -0
  134. package/src/anci/pack.js +288 -0
  135. package/src/anci/serialize.js +77 -6
  136. package/src/anci/staleness.js +161 -0
  137. package/src/bitmap/index.js +1 -1
  138. package/src/bitmap/tools.js +2 -2
  139. package/src/brain/conventions/index.js +299 -0
  140. package/src/brain/index.js +31 -0
  141. package/src/brain/invariants/index.js +306 -0
  142. package/src/brain/procedural/index.js +181 -0
  143. package/src/brain/suggestions/index.js +153 -0
  144. package/src/brain/working/index.js +170 -0
  145. package/src/cli/anci.js +27 -1
  146. package/src/cli/check.js +47 -1
  147. package/src/cli/diff.js +83 -0
  148. package/src/cli/doctor.js +339 -0
  149. package/src/cli/explain.js +61 -0
  150. package/src/cli/export.js +128 -0
  151. package/src/cli/index.js +120 -1
  152. package/src/cli/init.js +227 -6
  153. package/src/cli/load.js +125 -0
  154. package/src/cli/org.js +172 -0
  155. package/src/cli/pr-impact.js +59 -2
  156. package/src/cli/serve.js +1 -1
  157. package/src/cli/status.js +211 -0
  158. package/src/cli/sync.js +2 -2
  159. package/src/cli/temporal.js +188 -0
  160. package/src/cli/validate.js +201 -0
  161. package/src/cli/watch.js +4 -4
  162. package/src/cli/why.js +101 -0
  163. package/src/extractors/frameworks.js +236 -0
  164. package/src/extractors/imports.js +35 -10
  165. package/src/extractors/languages/dart.js +138 -0
  166. package/src/extractors/languages/go.js +11 -1
  167. package/src/extractors/languages/javascript.js +21 -7
  168. package/src/extractors/languages/kotlin.js +169 -0
  169. package/src/extractors/languages/php.js +195 -0
  170. package/src/extractors/languages/prisma.js +1 -1
  171. package/src/extractors/languages/python.js +12 -1
  172. package/src/extractors/languages/swift.js +140 -0
  173. package/src/extractors/languages/typescript.js +28 -51
  174. package/src/extractors/plugin-api.js +102 -0
  175. package/src/extractors/schemas.js +60 -0
  176. package/src/extractors/tree-sitter-parser.js +39 -0
  177. package/src/mcp/change-plan.js +131 -12
  178. package/src/mcp/files-without-tests.js +285 -0
  179. package/src/mcp/impact.js +119 -0
  180. package/src/mcp/middleware/index.js +451 -0
  181. package/src/mcp/server.js +2918 -0
  182. package/src/mcp/validate.js +1 -1
  183. package/src/org/detect.js +262 -0
  184. package/src/org/queries.js +144 -0
  185. package/src/org/store.js +173 -0
  186. package/src/org/sync.js +106 -0
  187. package/src/predictive/cut-points.js +83 -0
  188. package/src/predictive/drift-digest.js +88 -0
  189. package/src/predictive/ownership.js +145 -0
  190. package/src/predictive/risk-score.js +121 -0
  191. package/src/predictive/validate-change.js +55 -0
  192. package/src/rules/concepts/auth-middleware.md +111 -0
  193. package/src/rules/concepts/money-as-float.md +80 -0
  194. package/src/rules/engine.js +178 -0
  195. package/src/rules/intent.js +178 -0
  196. package/src/rules/registry.js +24 -0
  197. package/src/rules/rules/auth-missing-on-mutating-route.js +255 -0
  198. package/src/rules/rules/money-as-float.js +166 -0
  199. package/src/store/config-loader.js +77 -3
  200. package/src/store/sqlite-store.js +248 -7
  201. package/src/store/store-adapter.js +3 -3
  202. package/src/store/{sync-v2.js → sync.js} +122 -52
  203. package/src/temporal/backfill.js +211 -0
  204. package/src/temporal/delta.js +85 -0
  205. package/src/temporal/events.js +180 -0
  206. package/src/temporal/queries.js +358 -0
  207. package/src/temporal/snapshot.js +151 -0
  208. package/src/temporal/store.js +400 -0
  209. package/src/mcp/server-v2.js +0 -986
@@ -91,11 +91,25 @@ implementations only emit/parse the strict subset.
91
91
  ```yaml
92
92
  anci:
93
93
  version: "0.1.0-DRAFT" # required, string
94
- generator: "carto-md@2.0.9" # required, string
94
+ generator: "carto-md@2.1.0" # required, string
95
95
  generated_at: "2026-06-07T..." # required, ISO-8601 UTC
96
+ carto_version: "2.1.0" # required, bare producer version
97
+ contains: # required, capability list (≥1 entry)
98
+ - "structural"
96
99
  body:
97
100
  file: "anci.bin" # required, relative to header
98
101
  bytes: 12345 # required, body length on disk
102
+ content_digest: "sha256:9f86…" # optional, hash of the body bytes
103
+
104
+ source: # required block; fields null if non-git
105
+ commit: "a4334a2c…" # git HEAD commit SHA, or null
106
+ tree_hash: "e7d3f1…" # git HEAD tree hash, or null
107
+ branch: "main" # current branch, or null (detached)
108
+
109
+ grammar_versions: # optional; { pkg: version }
110
+ tree-sitter: "0.25.0"
111
+ tree-sitter-javascript: "0.25.0"
112
+ tree-sitter-typescript: "0.23.2"
99
113
 
100
114
  project:
101
115
  total_files: 7567 # required
@@ -130,6 +144,32 @@ Field names are stable for the v0.x line. Adding new optional fields is
130
144
  not a breaking change. Removing or renaming a field IS breaking and
131
145
  requires a version bump.
132
146
 
147
+ ### 4.1.1 Container identity (v0.1)
148
+
149
+ The identity fields turn ANCI from "a folder" into a versioned,
150
+ verifiable artifact:
151
+
152
+ | Field | Meaning |
153
+ |-----------------------------|----------------------------------------------------------------------|
154
+ | `anci.carto_version` | Bare producer version (distinct from the free-form `generator`). |
155
+ | `anci.contains` | Capability list — which memory layers the container carries. v0.1 producers emit `["structural"]` (the import graph, domains, routes, models). Episodic/temporal/semantic/procedural layers are **not** in the file; they remain live in the producing engine. |
156
+ | `anci.body.content_digest` | `"<algorithm>:<hex>"` hash of the exact `anci.bin` bytes. Optional but recommended. Consumers recompute it to verify integrity. |
157
+ | `source.commit` | Git commit the container was built from, or `null` (non-git repo). |
158
+ | `source.tree_hash` | Git tree hash of that commit — identifies exact committed content. |
159
+ | `source.branch` | Branch name at build time, or `null` (detached HEAD / non-git). |
160
+ | `grammar_versions` | Map of tree-sitter core + grammar package versions used to extract. Enables reproducibility checks (same repo + same grammars → same digest). |
161
+
162
+ **Consumer integrity check.** A consumer that reads `content_digest`
163
+ SHOULD recompute `<algorithm>(anci.bin)` and compare. On mismatch it
164
+ SHOULD warn; a strict consumer MAY refuse to load. The reference
165
+ consumer (`loadAnci`) exposes `reader.verifyDigest()` and a
166
+ `{ verify: true }` option that promotes a mismatch to a thrown error.
167
+
168
+ **Staleness.** `source.commit`/`source.tree_hash` let a consumer detect
169
+ that the container was built from an older repo state than the current
170
+ `HEAD` (e.g. "graph is N commits stale — results may be inaccurate").
171
+ The reference engine surfaces this in MCP responses and `carto doctor`.
172
+
133
173
  ### 4.2 Versioning
134
174
 
135
175
  | Field | Meaning |
@@ -258,7 +298,12 @@ sequential read.
258
298
 
259
299
  Producers SHOULD compute the body as follows:
260
300
 
261
- 1. Assign each file a stable, dense integer id.
301
+ 1. Assign each file a stable, dense integer id. For **reproducibility**
302
+ (CT-4), ids MUST be assigned over the file list sorted by normalized
303
+ POSIX path (forward slashes, code-unit order — never a locale-aware
304
+ comparison), NOT over the filesystem enumeration order. This makes the
305
+ body layout, and therefore `content_digest`, identical across machines
306
+ for the same repo. See §16.2.
262
307
  2. For each file, build a bitmap of its forward imports (resolved
263
308
  imports only; unresolved imports are excluded).
264
309
  3. Reverse the forward bitmaps into `reverse`.
@@ -418,3 +463,88 @@ reachability bitmaps (2013), and Lucene's Roaring posting lists (2014).
418
463
 
419
464
  The spec is iterated alongside carto-md. File issues at
420
465
  https://github.com/theanshsonkar/carto for proposed changes.
466
+
467
+ ## 16. Single-file container envelope (`.anci`) — CT-3
468
+
469
+ The two-file layout of §3 (`anci.yaml` + `anci.bin`) is the on-disk form.
470
+ For **transport** — handing a container from one machine to another —
471
+ `carto export` packs both files into ONE portable file, conventionally
472
+ `project.anci`, and `carto load` unpacks it back into a queryable
473
+ `.carto/` with **no re-index**. This makes "build once, load anywhere"
474
+ literal: build on machine A, copy `project.anci`, `carto load` it on
475
+ machine B, and blast radius answers instantly against the container A
476
+ produced.
477
+
478
+ ### 16.1 Envelope wire format (little-endian)
479
+
480
+ ```
481
+ magic u32 = 0x50434E41 ("ANCP" — 'A','N','C','P' little-endian)
482
+ version u8 = 1
483
+ reserved u8×3 = 0
484
+ entry_count u32
485
+ entry_count × {
486
+ name_len u32
487
+ name name_len UTF-8 bytes # a bare basename (see 16.3)
488
+ data_len u32
489
+ data data_len bytes
490
+ }
491
+ trailer 32 bytes = sha256(all preceding bytes)
492
+ ```
493
+
494
+ The envelope has its **own magic** (`ANCP`), distinct from the ANCI body
495
+ magic (`ANCI` = `0x49434E41`) and carto-md's internal bitmap cache
496
+ (`CBRT`). A consumer MUST NOT attempt to load one as another. A v0.1
497
+ container carries exactly two entries — `anci.yaml` and `anci.bin` — in
498
+ name-sorted order.
499
+
500
+ ### 16.2 Reproducibility
501
+
502
+ Entries are written in a fixed (name-sorted) order, so packing the same
503
+ input pair twice yields a byte-identical envelope. Note that `anci.yaml`
504
+ embeds a `generated_at` timestamp, so the *envelope file* is only
505
+ byte-stable for a fixed input pair. The **reproducible identity** of a
506
+ container is its `anci.bin` `content_digest` (§4.1.1), which the envelope
507
+ carries verbatim inside the packed `anci.yaml`.
508
+
509
+ `anci.bin` itself is reproducible: **the same repo + the same grammar
510
+ versions produce the same `content_digest`, independent of the machine or
511
+ filesystem.** This holds because the producer assigns file ids over a
512
+ list sorted by normalized POSIX path (not filesystem enumeration order),
513
+ so the body layout — and therefore its hash — is a true content address
514
+ of the repo. `grammar_versions` (§4.1.1) records the tree-sitter versions
515
+ used, so a consumer that sees two containers with different digests can
516
+ tell whether a grammar version drift could explain the difference. This
517
+ enables container **diff / verify** across machines and over time.
518
+
519
+ ### 16.3 Security — a shared container is UNTRUSTED
520
+
521
+ A `.anci` file is shareable, so on ingest it MUST be treated as untrusted.
522
+ The reference `carto load` / `unpackContainer` enforce, in order:
523
+
524
+ 1. **Integrity.** Recompute the trailer `sha256` over the whole payload
525
+ before trusting any length field. A mismatch (corruption, truncation,
526
+ tampering of the envelope) rejects the file.
527
+ 2. **Entry whitelist.** Only the two known basenames (`anci.yaml`,
528
+ `anci.bin`) are accepted; any other name rejects the container.
529
+ 3. **Path-traversal guard (zip-slip).** An entry name must be a bare
530
+ basename — no path separators, no `..`, no absolute path, no NUL — so
531
+ unpacking can never write outside the destination directory. Writes
532
+ additionally re-derive `path.basename` and assert containment (defense
533
+ in depth).
534
+ 4. **Bounded allocation.** Entry count and per-entry size are capped so a
535
+ hostile header cannot trigger an unbounded allocation.
536
+
537
+ Beyond structural validation, the **contents** of a loaded container —
538
+ file paths, domain names, route strings, and any other embedded text —
539
+ are **data, never instructions.** The consumer (`loadAnci`) parses them
540
+ into data structures with a strict hand-rolled YAML subset parser and the
541
+ binary deserializer; nothing in a container is ever executed, `eval`-ed,
542
+ or interpreted as a command or a prompt. A container that embeds
543
+ prompt-injection-looking or shell-injection-looking strings loads those
544
+ strings verbatim as literal string values. Any tool consuming ANCI SHOULD
545
+ preserve this property: render container text as untrusted data.
546
+
547
+ This guardrail ships **with** single-file export/import (CT-3), before any
548
+ signing or registry work (Tier 3). Signing (CT-7) later adds *origin*
549
+ verification on top; the untrusted-data handling is independent and
550
+ earlier.
@@ -0,0 +1,124 @@
1
+ # Carto MCP Tools — API Reference
2
+
3
+ Auto-generated from `src/mcp/server.js`. Re-run `node scripts/gen-api-docs.js` after adding tools.
4
+
5
+ **86 tools** across 9 categories.
6
+
7
+ ## Tool surface & tiers (CF-7)
8
+
9
+ The MCP surface is collapsed into **5 parameterized families** + a tiered set of singletons.
10
+ Which tools are *listed* to a client is gated by `CARTO_MCP_TIER` (env) or `carto.config.json` `mcp.tier`:
11
+
12
+ - **core** (default): the ~10 tools every session needs — `get_architecture`, `get_context`, `impact`, `validate_diff`, `get_change_plan`, `memory`, `get_predictive_risk`, `get_minimal_context_for_intent`, `patterns`, `history`.
13
+ - **advanced**: core + the documented ~8 (e.g. `org`, `get_routes`, `get_models`, `get_gaps`, `scaffold_for_intent`, `get_working_memory`, `get_test_coverage_map`, `get_safety_checklist`).
14
+ - **all**: also lists experimental singletons.
15
+
16
+ The **Families** collapse ~30 former tools; those old names are **deprecated shims** — they still
17
+ resolve (byte-identical output + a one-line deprecation notice) but are never listed. See each
18
+ family doc for the `mode`/`kind`/`view` that replaces the old tool.
19
+
20
+ ## Categories
21
+
22
+ ### Families (5)
23
+ - [`impact`](./impact.md)
24
+ - [`memory`](./memory.md)
25
+ - [`history`](./history.md)
26
+ - [`patterns`](./patterns.md)
27
+ - [`org`](./org.md)
28
+
29
+ ### Core graph (21)
30
+ - [`get_routes`](./get_routes.md)
31
+ - [`get_blast_radius`](./get_blast_radius.md)
32
+ - [`get_structure`](./get_structure.md)
33
+ - [`get_domain`](./get_domain.md)
34
+ - [`get_neighbors`](./get_neighbors.md)
35
+ - [`get_cross_domain`](./get_cross_domain.md)
36
+ - [`get_context`](./get_context.md)
37
+ - [`search_routes`](./search_routes.md)
38
+ - [`get_models`](./get_models.md)
39
+ - [`get_high_impact_files`](./get_high_impact_files.md)
40
+ - [`get_env_vars`](./get_env_vars.md)
41
+ - [`get_domains_list`](./get_domains_list.md)
42
+ - [`get_file_summary`](./get_file_summary.md)
43
+ - [`get_change_plan`](./get_change_plan.md)
44
+ - [`get_similar_patterns`](./get_similar_patterns.md)
45
+ - [`simulate_change_impact`](./simulate_change_impact.md)
46
+ - [`get_gaps`](./get_gaps.md)
47
+ - [`dismiss_gap`](./dismiss_gap.md)
48
+ - [`set_intent`](./set_intent.md)
49
+ - [`get_intent`](./get_intent.md)
50
+ - [`get_file_receipts`](./get_file_receipts.md)
51
+
52
+ ### Episodic Memory (5)
53
+ - [`validate_diff`](./validate_diff.md)
54
+ - [`get_recent_decisions`](./get_recent_decisions.md)
55
+ - [`get_session_context`](./get_session_context.md)
56
+ - [`did_we_discuss_this`](./did_we_discuss_this.md)
57
+ - [`get_intervention_history`](./get_intervention_history.md)
58
+
59
+ ### Temporal (9)
60
+ - [`get_architecture`](./get_architecture.md)
61
+ - [`get_architectural_drift`](./get_architectural_drift.md)
62
+ - [`get_domain_evolution`](./get_domain_evolution.md)
63
+ - [`get_hotspot_files`](./get_hotspot_files.md)
64
+ - [`get_complexity_trend`](./get_complexity_trend.md)
65
+ - [`get_churn_vs_blast_radius`](./get_churn_vs_blast_radius.md)
66
+ - [`get_arch_events`](./get_arch_events.md)
67
+ - [`get_domain_health`](./get_domain_health.md)
68
+ - [`get_temporal_context`](./get_temporal_context.md)
69
+
70
+ ### Brain (10)
71
+ - [`get_invariants`](./get_invariants.md)
72
+ - [`get_canonical_pattern`](./get_canonical_pattern.md)
73
+ - [`get_conventions`](./get_conventions.md)
74
+ - [`get_action_patterns`](./get_action_patterns.md)
75
+ - [`scaffold_for_intent`](./scaffold_for_intent.md)
76
+ - [`get_working_memory`](./get_working_memory.md)
77
+ - [`get_pending_decisions`](./get_pending_decisions.md)
78
+ - [`get_active_drift`](./get_active_drift.md)
79
+ - [`get_active_suggestions`](./get_active_suggestions.md)
80
+ - [`dismiss_suggestion`](./dismiss_suggestion.md)
81
+
82
+ ### AI-native (14)
83
+ - [`get_minimal_context_for_intent`](./get_minimal_context_for_intent.md)
84
+ - [`get_progressive_disclosure_tree`](./get_progressive_disclosure_tree.md)
85
+ - [`get_token_budget_report`](./get_token_budget_report.md)
86
+ - [`get_decision_log`](./get_decision_log.md)
87
+ - [`get_evolution_delta`](./get_evolution_delta.md)
88
+ - [`get_change_velocity`](./get_change_velocity.md)
89
+ - [`get_test_coverage_map`](./get_test_coverage_map.md)
90
+ - [`get_safety_checklist`](./get_safety_checklist.md)
91
+ - [`get_data_flow`](./get_data_flow.md)
92
+ - [`get_interface_contract`](./get_interface_contract.md)
93
+ - [`explain_change_in_natural_language`](./explain_change_in_natural_language.md)
94
+ - [`get_stale_docs`](./get_stale_docs.md)
95
+ - [`get_dependency_surface`](./get_dependency_surface.md)
96
+ - [`get_upgrade_risk`](./get_upgrade_risk.md)
97
+
98
+ ### Adjacent (8)
99
+ - [`get_cross_language_call_graph`](./get_cross_language_call_graph.md)
100
+ - [`get_iac_resources`](./get_iac_resources.md)
101
+ - [`ingest_otlp_traces`](./ingest_otlp_traces.md)
102
+ - [`get_risk_weighted_blast_radius`](./get_risk_weighted_blast_radius.md)
103
+ - [`get_dead_code_with_confidence`](./get_dead_code_with_confidence.md)
104
+ - [`get_hot_in_prod_no_tests`](./get_hot_in_prod_no_tests.md)
105
+ - [`get_semantic_diff`](./get_semantic_diff.md)
106
+ - [`get_llm_enrichment`](./get_llm_enrichment.md)
107
+
108
+ ### Predictive (7)
109
+ - [`get_predictive_risk`](./get_predictive_risk.md)
110
+ - [`get_microservice_cut_points`](./get_microservice_cut_points.md)
111
+ - [`validate_change`](./validate_change.md)
112
+ - [`get_file_ownership`](./get_file_ownership.md)
113
+ - [`get_cross_team_coupling`](./get_cross_team_coupling.md)
114
+ - [`get_drift_digest`](./get_drift_digest.md)
115
+ - [`get_ai_cost_attribution`](./get_ai_cost_attribution.md)
116
+
117
+ ### Org-wide (7)
118
+ - [`get_org_architecture`](./get_org_architecture.md)
119
+ - [`get_service_dependency_graph`](./get_service_dependency_graph.md)
120
+ - [`get_cross_repo_blast_radius`](./get_cross_repo_blast_radius.md)
121
+ - [`find_consumers_of_api`](./find_consumers_of_api.md)
122
+ - [`get_org_domain_mapping`](./get_org_domain_mapping.md)
123
+ - [`get_service_boundary_violations`](./get_service_boundary_violations.md)
124
+ - [`get_microservices_migration_cut_points`](./get_microservices_migration_cut_points.md)
@@ -0,0 +1,36 @@
1
+ # `did_we_discuss_this`
2
+
3
+ > ⚠️ **Deprecated (CF-7).** Use `memory(query, kind="search")` instead. This name still resolves and returns byte-identical output for a deprecation window, but is no longer listed by default and emits a one-line notice.
4
+
5
+ Substring search over the episodic memory log (decisions + interventions) for prior discussions of a topic. Use to avoid re-deciding settled questions.
6
+
7
+ ## Input schema
8
+
9
+ ```json
10
+ {
11
+ "type": "object",
12
+ "properties": {
13
+ "topic": {
14
+ "type": "string",
15
+ "description": "Topic to search for, e.g. \"auth\", \"snake_case\", \"blast radius\"."
16
+ }
17
+ },
18
+ "required": [
19
+ "topic"
20
+ ]
21
+ }
22
+ ```
23
+
24
+ ## Required arguments
25
+
26
+ - `topic`
27
+
28
+ ## Properties
29
+
30
+ | Name | Type | Description |
31
+ |------|------|-------------|
32
+ | `topic` | string | Topic to search for, e.g. "auth", "snake_case", "blast radius". |
33
+
34
+ ## See also
35
+
36
+ - [Index of all MCP tools](./README.md)
@@ -0,0 +1,39 @@
1
+ # `dismiss_gap`
2
+
3
+ Mark a specific gap as intentional. Writes the dismissal to the gaps table so the same gap does not re-surface on the next run. Idempotent — re-dismissing updates the reason. Only call this when the user explicitly says the gap is intentional; never dismiss on your own judgment.
4
+
5
+ ## Input schema
6
+
7
+ ```json
8
+ {
9
+ "type": "object",
10
+ "properties": {
11
+ "gap_hash": {
12
+ "type": "string",
13
+ "description": "The gap_hash from get_gaps output."
14
+ },
15
+ "reason": {
16
+ "type": "string",
17
+ "description": "Short explanation of why this gap is intentional. Optional but strongly encouraged."
18
+ }
19
+ },
20
+ "required": [
21
+ "gap_hash"
22
+ ]
23
+ }
24
+ ```
25
+
26
+ ## Required arguments
27
+
28
+ - `gap_hash`
29
+
30
+ ## Properties
31
+
32
+ | Name | Type | Description |
33
+ |------|------|-------------|
34
+ | `gap_hash` | string | The gap_hash from get_gaps output. |
35
+ | `reason` | string | Short explanation of why this gap is intentional. Optional but strongly encouraged. |
36
+
37
+ ## See also
38
+
39
+ - [Index of all MCP tools](./README.md)
@@ -0,0 +1,34 @@
1
+ # `dismiss_suggestion`
2
+
3
+ Mark a suggestion ID as dismissed for the current session. Acknowledgment-only; the underlying signal still exists.
4
+
5
+ ## Input schema
6
+
7
+ ```json
8
+ {
9
+ "type": "object",
10
+ "properties": {
11
+ "id": {
12
+ "type": "string",
13
+ "description": "Suggestion id from get_active_suggestions."
14
+ }
15
+ },
16
+ "required": [
17
+ "id"
18
+ ]
19
+ }
20
+ ```
21
+
22
+ ## Required arguments
23
+
24
+ - `id`
25
+
26
+ ## Properties
27
+
28
+ | Name | Type | Description |
29
+ |------|------|-------------|
30
+ | `id` | string | Suggestion id from get_active_suggestions. |
31
+
32
+ ## See also
33
+
34
+ - [Index of all MCP tools](./README.md)
@@ -0,0 +1,33 @@
1
+ # `explain_change_in_natural_language`
2
+
3
+ Given a unified diff, returns a plain-language summary + risk + violation list + suggestions. Powered by validate_diff.
4
+
5
+ ## Input schema
6
+
7
+ ```json
8
+ {
9
+ "type": "object",
10
+ "properties": {
11
+ "diff": {
12
+ "type": "string"
13
+ }
14
+ },
15
+ "required": [
16
+ "diff"
17
+ ]
18
+ }
19
+ ```
20
+
21
+ ## Required arguments
22
+
23
+ - `diff`
24
+
25
+ ## Properties
26
+
27
+ | Name | Type | Description |
28
+ |------|------|-------------|
29
+ | `diff` | string | |
30
+
31
+ ## See also
32
+
33
+ - [Index of all MCP tools](./README.md)
@@ -0,0 +1,36 @@
1
+ # `find_consumers_of_api`
2
+
3
+ > ⚠️ **Deprecated (CF-7).** Use `org(view="consumers")` instead. This name still resolves and returns byte-identical output for a deprecation window, but is no longer listed by default and emits a one-line notice.
4
+
5
+ Across all org repos, find every file importing a given npm/pypi/go/maven target.
6
+
7
+ ## Input schema
8
+
9
+ ```json
10
+ {
11
+ "type": "object",
12
+ "properties": {
13
+ "target": {
14
+ "type": "string",
15
+ "description": "Target package or module name"
16
+ }
17
+ },
18
+ "required": [
19
+ "target"
20
+ ]
21
+ }
22
+ ```
23
+
24
+ ## Required arguments
25
+
26
+ - `target`
27
+
28
+ ## Properties
29
+
30
+ | Name | Type | Description |
31
+ |------|------|-------------|
32
+ | `target` | string | Target package or module name |
33
+
34
+ ## See also
35
+
36
+ - [Index of all MCP tools](./README.md)
@@ -0,0 +1,34 @@
1
+ # `get_action_patterns`
2
+
3
+ > ⚠️ **Deprecated (CF-7).** Use `patterns(kind="actions")` instead. This name still resolves and returns byte-identical output for a deprecation window, but is no longer listed by default and emits a one-line notice.
4
+
5
+ Procedural patterns mined from git history: "when developers add X, they also touch Y". Filter by natural-language intent.
6
+
7
+ ## Input schema
8
+
9
+ ```json
10
+ {
11
+ "type": "object",
12
+ "properties": {
13
+ "intent": {
14
+ "type": "string",
15
+ "description": "Optional intent filter (e.g. \"add route\")."
16
+ }
17
+ },
18
+ "required": []
19
+ }
20
+ ```
21
+
22
+ ## Required arguments
23
+
24
+ _None._
25
+
26
+ ## Properties
27
+
28
+ | Name | Type | Description |
29
+ |------|------|-------------|
30
+ | `intent` | string | Optional intent filter (e.g. "add route"). |
31
+
32
+ ## See also
33
+
34
+ - [Index of all MCP tools](./README.md)
@@ -0,0 +1,32 @@
1
+ # `get_active_drift`
2
+
3
+ Domains with active drift in the last 7d: growth, threshold breaches. Use to spot domains drifting before they reach a critical event.
4
+
5
+ ## Input schema
6
+
7
+ ```json
8
+ {
9
+ "type": "object",
10
+ "properties": {
11
+ "threshold": {
12
+ "type": "number",
13
+ "description": "Drift threshold 0-1 (default 0.2 = 20%)."
14
+ }
15
+ },
16
+ "required": []
17
+ }
18
+ ```
19
+
20
+ ## Required arguments
21
+
22
+ _None._
23
+
24
+ ## Properties
25
+
26
+ | Name | Type | Description |
27
+ |------|------|-------------|
28
+ | `threshold` | number | Drift threshold 0-1 (default 0.2 = 20%). |
29
+
30
+ ## See also
31
+
32
+ - [Index of all MCP tools](./README.md)
@@ -0,0 +1,25 @@
1
+ # `get_active_suggestions`
2
+
3
+ Active Suggestion Engine output. 4 triggers: cross-domain coupling jump, AI session conflict, convention violation mid-session, hotspot threshold crossed. Read periodically.
4
+
5
+ ## Input schema
6
+
7
+ ```json
8
+ {
9
+ "type": "object",
10
+ "properties": {},
11
+ "required": []
12
+ }
13
+ ```
14
+
15
+ ## Required arguments
16
+
17
+ _None._
18
+
19
+ ## Properties
20
+
21
+ _None._
22
+
23
+ ## See also
24
+
25
+ - [Index of all MCP tools](./README.md)
@@ -0,0 +1,32 @@
1
+ # `get_ai_cost_attribution`
2
+
3
+ Per-AI-client decision counts + violation counts. Use to attribute cross-domain coupling cost to individual AI sessions / developers.
4
+
5
+ ## Input schema
6
+
7
+ ```json
8
+ {
9
+ "type": "object",
10
+ "properties": {
11
+ "hours": {
12
+ "type": "number",
13
+ "description": "Lookback hours (default 168 = 7d)."
14
+ }
15
+ },
16
+ "required": []
17
+ }
18
+ ```
19
+
20
+ ## Required arguments
21
+
22
+ _None._
23
+
24
+ ## Properties
25
+
26
+ | Name | Type | Description |
27
+ |------|------|-------------|
28
+ | `hours` | number | Lookback hours (default 168 = 7d). |
29
+
30
+ ## See also
31
+
32
+ - [Index of all MCP tools](./README.md)
@@ -0,0 +1,44 @@
1
+ # `get_arch_events`
2
+
3
+ > ⚠️ **Deprecated (CF-7).** Use `history(view="events")` instead. This name still resolves and returns byte-identical output for a deprecation window, but is no longer listed by default and emits a one-line notice.
4
+
5
+ Architectural events (domain split, merge, growth, hotspot emergence). Severity filter: minor | major | critical.
6
+
7
+ ## Input schema
8
+
9
+ ```json
10
+ {
11
+ "type": "object",
12
+ "properties": {
13
+ "severity": {
14
+ "type": "string",
15
+ "description": "Filter: minor | major | critical."
16
+ },
17
+ "kind": {
18
+ "type": "string",
19
+ "description": "Optional kind filter (e.g. domain_growth, hotspot_active)."
20
+ },
21
+ "time_range": {
22
+ "type": "string",
23
+ "description": "Window like \"90d\" (default \"90d\")."
24
+ }
25
+ },
26
+ "required": []
27
+ }
28
+ ```
29
+
30
+ ## Required arguments
31
+
32
+ _None._
33
+
34
+ ## Properties
35
+
36
+ | Name | Type | Description |
37
+ |------|------|-------------|
38
+ | `severity` | string | Filter: minor \| major \| critical. |
39
+ | `kind` | string | Optional kind filter (e.g. domain_growth, hotspot_active). |
40
+ | `time_range` | string | Window like "90d" (default "90d"). |
41
+
42
+ ## See also
43
+
44
+ - [Index of all MCP tools](./README.md)
@@ -0,0 +1,39 @@
1
+ # `get_architectural_drift`
2
+
3
+ > ⚠️ **Deprecated (CF-7).** Use `history(view="drift")` instead. This name still resolves and returns byte-identical output for a deprecation window, but is no longer listed by default and emits a one-line notice.
4
+
5
+ Per-domain growth/shrink and event count over a time window. Run `carto temporal init` first to backfill from git history.
6
+
7
+ ## Input schema
8
+
9
+ ```json
10
+ {
11
+ "type": "object",
12
+ "properties": {
13
+ "domain": {
14
+ "type": "string",
15
+ "description": "Optional domain filter (e.g. AUTH)."
16
+ },
17
+ "time_range": {
18
+ "type": "string",
19
+ "description": "Window like \"30d\", \"90d\", \"1y\" (default \"30d\")."
20
+ }
21
+ },
22
+ "required": []
23
+ }
24
+ ```
25
+
26
+ ## Required arguments
27
+
28
+ _None._
29
+
30
+ ## Properties
31
+
32
+ | Name | Type | Description |
33
+ |------|------|-------------|
34
+ | `domain` | string | Optional domain filter (e.g. AUTH). |
35
+ | `time_range` | string | Window like "30d", "90d", "1y" (default "30d"). |
36
+
37
+ ## See also
38
+
39
+ - [Index of all MCP tools](./README.md)