carto-md 2.1.0 → 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.
- package/CHANGELOG.md +135 -0
- package/CONTRIBUTING.md +11 -8
- package/README.md +165 -213
- package/docs/anci/v0.1-DRAFT.md +132 -2
- package/docs/api/README.md +27 -2
- package/docs/api/did_we_discuss_this.md +2 -0
- package/docs/api/dismiss_gap.md +39 -0
- package/docs/api/find_consumers_of_api.md +2 -0
- package/docs/api/get_action_patterns.md +2 -0
- package/docs/api/get_arch_events.md +2 -0
- package/docs/api/get_architectural_drift.md +2 -0
- package/docs/api/get_blast_radius.md +2 -0
- package/docs/api/get_canonical_pattern.md +2 -0
- package/docs/api/get_change_velocity.md +2 -0
- package/docs/api/get_churn_vs_blast_radius.md +2 -0
- package/docs/api/get_complexity_trend.md +2 -0
- package/docs/api/get_conventions.md +2 -0
- package/docs/api/get_cross_repo_blast_radius.md +2 -0
- package/docs/api/get_data_flow.md +2 -0
- package/docs/api/get_decision_log.md +2 -0
- package/docs/api/get_domain_evolution.md +2 -0
- package/docs/api/get_domain_health.md +2 -0
- package/docs/api/get_file_receipts.md +34 -0
- package/docs/api/get_gaps.md +52 -0
- package/docs/api/get_hotspot_files.md +2 -0
- package/docs/api/get_intent.md +25 -0
- package/docs/api/get_intervention_history.md +2 -0
- package/docs/api/get_invariants.md +2 -0
- package/docs/api/get_microservices_migration_cut_points.md +2 -0
- package/docs/api/get_neighbors.md +2 -0
- package/docs/api/get_org_architecture.md +2 -0
- package/docs/api/get_org_domain_mapping.md +2 -0
- package/docs/api/get_pending_decisions.md +2 -0
- package/docs/api/get_recent_decisions.md +2 -0
- package/docs/api/get_service_boundary_violations.md +2 -0
- package/docs/api/get_service_dependency_graph.md +2 -0
- package/docs/api/get_session_context.md +2 -0
- package/docs/api/get_temporal_context.md +2 -0
- package/docs/api/history.md +78 -0
- package/docs/api/impact.md +56 -0
- package/docs/api/memory.md +70 -0
- package/docs/api/org.md +51 -0
- package/docs/api/patterns.md +63 -0
- package/docs/api/set_intent.md +45 -0
- package/docs/api/simulate_change_impact.md +2 -0
- package/docs/concepts/domains.md +75 -50
- package/docs/concepts/mcp-integration.md +4 -2
- package/docs/guides/pre-merge-review.md +2 -2
- package/docs/migration/v1-to-v2.md +2 -2
- package/docs/screenshots/carto-supabase-blast-radius.png +0 -0
- package/package.json +2 -1
- package/scripts/gen-api-docs.js +51 -19
- package/src/agents/domains.js +72 -24
- package/src/ai/tools.js +4 -2
- package/src/anci/consumer.js +83 -3
- package/src/anci/emit.js +18 -1
- package/src/anci/git-meta.js +171 -0
- package/src/anci/pack.js +288 -0
- package/src/anci/serialize.js +77 -6
- package/src/anci/staleness.js +161 -0
- package/src/brain/conventions/index.js +134 -20
- package/src/brain/invariants/index.js +76 -22
- package/src/cli/anci.js +27 -1
- package/src/cli/doctor.js +69 -0
- package/src/cli/export.js +128 -0
- package/src/cli/index.js +19 -1
- package/src/cli/init.js +84 -1
- package/src/cli/load.js +125 -0
- package/src/extractors/imports.js +35 -10
- package/src/extractors/languages/javascript.js +8 -4
- package/src/extractors/languages/prisma.js +1 -1
- package/src/extractors/languages/typescript.js +13 -49
- package/src/extractors/schemas.js +60 -0
- package/src/extractors/tree-sitter-parser.js +39 -0
- package/src/mcp/change-plan.js +131 -12
- package/src/mcp/impact.js +119 -0
- package/src/mcp/server.js +708 -82
- package/src/rules/concepts/auth-middleware.md +111 -0
- package/src/rules/concepts/money-as-float.md +80 -0
- package/src/rules/engine.js +178 -0
- package/src/rules/intent.js +178 -0
- package/src/rules/registry.js +24 -0
- package/src/rules/rules/auth-missing-on-mutating-route.js +255 -0
- package/src/rules/rules/money-as-float.js +166 -0
- package/src/store/config-loader.js +77 -3
- package/src/store/sqlite-store.js +248 -7
- package/src/store/sync.js +69 -39
package/docs/anci/v0.1-DRAFT.md
CHANGED
|
@@ -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
|
|
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.
|
package/docs/api/README.md
CHANGED
|
@@ -2,11 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
Auto-generated from `src/mcp/server.js`. Re-run `node scripts/gen-api-docs.js` after adding tools.
|
|
4
4
|
|
|
5
|
-
**
|
|
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.
|
|
6
19
|
|
|
7
20
|
## Categories
|
|
8
21
|
|
|
9
|
-
###
|
|
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)
|
|
10
30
|
- [`get_routes`](./get_routes.md)
|
|
11
31
|
- [`get_blast_radius`](./get_blast_radius.md)
|
|
12
32
|
- [`get_structure`](./get_structure.md)
|
|
@@ -23,6 +43,11 @@ Auto-generated from `src/mcp/server.js`. Re-run `node scripts/gen-api-docs.js` a
|
|
|
23
43
|
- [`get_change_plan`](./get_change_plan.md)
|
|
24
44
|
- [`get_similar_patterns`](./get_similar_patterns.md)
|
|
25
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)
|
|
26
51
|
|
|
27
52
|
### Episodic Memory (5)
|
|
28
53
|
- [`validate_diff`](./validate_diff.md)
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `did_we_discuss_this`
|
|
2
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
|
+
|
|
3
5
|
Substring search over the episodic memory log (decisions + interventions) for prior discussions of a topic. Use to avoid re-deciding settled questions.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -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)
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `find_consumers_of_api`
|
|
2
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
|
+
|
|
3
5
|
Across all org repos, find every file importing a given npm/pypi/go/maven target.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_action_patterns`
|
|
2
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
|
+
|
|
3
5
|
Procedural patterns mined from git history: "when developers add X, they also touch Y". Filter by natural-language intent.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_arch_events`
|
|
2
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
|
+
|
|
3
5
|
Architectural events (domain split, merge, growth, hotspot emergence). Severity filter: minor | major | critical.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_architectural_drift`
|
|
2
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
|
+
|
|
3
5
|
Per-domain growth/shrink and event count over a time window. Run `carto temporal init` first to backfill from git history.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_blast_radius`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `impact(file, mode="blast")` 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
|
+
|
|
3
5
|
Get all files, routes, and domains affected by changing a specific file. Includes risk level per route.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_canonical_pattern`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `patterns(kind="canonical")` 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
|
+
|
|
3
5
|
Highest-quality example of a pattern in the codebase (e.g. canonical route handler). Use as a copy-paste template before writing similar code.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_change_velocity`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `history(view="velocity")` 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
|
+
|
|
3
5
|
Commits-per-day over a window (requires temporal store). Useful for spotting development tempo shifts.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_churn_vs_blast_radius`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `history(view="churn")` 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
|
+
|
|
3
5
|
Scatter data of churn vs blast_radius for every changed file in a window. Use to find risk hotspots.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_complexity_trend`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `history(view="complexity")` 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
|
+
|
|
3
5
|
A single file's presence across snapshots + commit count + current blast_radius. Use to track how a file's footprint evolved.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_conventions`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `patterns(kind="conventions")` 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
|
+
|
|
3
5
|
Naming + export + directory conventions that apply to a given file or directory. Confidence-scored. Use before writing new code in this location.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_cross_repo_blast_radius`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `org(view="blast")` 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
|
+
|
|
3
5
|
Direct downstream consumers of a producer repo. "If I break repo X, who notices?"
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_data_flow`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `impact(file, mode="data_flow")` 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
|
+
|
|
3
5
|
Per-file data-flow snapshot: upstream imports + downstream importers + routes + models + env vars in the file. The AI-friendly view, not full taint analysis.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_decision_log`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `memory(kind="log")` 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
|
+
|
|
3
5
|
Recent decisions from the episodic-memory log, optionally annotated with concurrent architectural events from the temporal store.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_domain_evolution`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `history(view="evolution")` 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
|
+
|
|
3
5
|
Time-series of a single domain's file count, by snapshot. Use to chart a domain's growth over the last quarter.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_domain_health`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `history(view="health")` 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
|
+
|
|
3
5
|
Per-domain growth rate, instability, recent events, and hotspot files. Use to spot domains drifting out of bounds.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# `get_file_receipts`
|
|
2
|
+
|
|
3
|
+
For one file, returns receipts — everything Carto knows: change history, blast radius, prior interventions and decisions touching this file, active gaps on this file, cross-domain deps. Read-only. Use before proposing a change to a file to understand what depends on it and what has been said about it before.
|
|
4
|
+
|
|
5
|
+
## Input schema
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"file": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Relative file path from project root."
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": [
|
|
17
|
+
"file"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Required arguments
|
|
23
|
+
|
|
24
|
+
- `file`
|
|
25
|
+
|
|
26
|
+
## Properties
|
|
27
|
+
|
|
28
|
+
| Name | Type | Description |
|
|
29
|
+
|------|------|-------------|
|
|
30
|
+
| `file` | string | Relative file path from project root. |
|
|
31
|
+
|
|
32
|
+
## See also
|
|
33
|
+
|
|
34
|
+
- [Index of all MCP tools](./README.md)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# `get_gaps`
|
|
2
|
+
|
|
3
|
+
The current gap list for this repo — grounded findings from the rule engine ("SHOULD − IS"). Each gap ties to a file + rule_id + evidence. Ranked HIGH > MEDIUM > LOW. Dismissed gaps are excluded by default. Call this when the user asks "what should I fix?", when you enter a new repo for the first time, or before recommending changes to a file. If the response is empty and the project is unsupported, tell the user the rule engine only ships for Next.js + Supabase SaaS-with-auth today.
|
|
4
|
+
|
|
5
|
+
## Input schema
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"rule_id": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Optional rule filter, e.g. \"money-as-float\"."
|
|
14
|
+
},
|
|
15
|
+
"file": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Optional file filter."
|
|
18
|
+
},
|
|
19
|
+
"severity": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Optional severity filter: HIGH | MEDIUM | LOW."
|
|
22
|
+
},
|
|
23
|
+
"include_dismissed": {
|
|
24
|
+
"type": "boolean",
|
|
25
|
+
"description": "Include gaps the user has already dismissed (default false)."
|
|
26
|
+
},
|
|
27
|
+
"refresh": {
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"description": "Re-run the rule engine before returning (default false — uses last cached run)."
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"required": []
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Required arguments
|
|
37
|
+
|
|
38
|
+
_None._
|
|
39
|
+
|
|
40
|
+
## Properties
|
|
41
|
+
|
|
42
|
+
| Name | Type | Description |
|
|
43
|
+
|------|------|-------------|
|
|
44
|
+
| `rule_id` | string | Optional rule filter, e.g. "money-as-float". |
|
|
45
|
+
| `file` | string | Optional file filter. |
|
|
46
|
+
| `severity` | string | Optional severity filter: HIGH \| MEDIUM \| LOW. |
|
|
47
|
+
| `include_dismissed` | boolean | Include gaps the user has already dismissed (default false). |
|
|
48
|
+
| `refresh` | boolean | Re-run the rule engine before returning (default false — uses last cached run). |
|
|
49
|
+
|
|
50
|
+
## See also
|
|
51
|
+
|
|
52
|
+
- [Index of all MCP tools](./README.md)
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_hotspot_files`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `history(view="hotspots")` 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
|
+
|
|
3
5
|
Top files by churn × blast_radius score over a window. The CodeHealth heuristic: high-churn files in high-blast-radius positions are where bugs cluster.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# `get_intent`
|
|
2
|
+
|
|
3
|
+
Return the currently stored intent — product type, stack, notes, updated_at. Use this at the start of a session to know which rules will apply to this project.
|
|
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)
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_intervention_history`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `memory(kind="interventions")` 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
|
+
|
|
3
5
|
List interventions (Carto-issued violations and suggestions) optionally filtered by file. Use to see prior warnings on a file before editing it.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_invariants`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `patterns(kind="invariants")` 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
|
+
|
|
3
5
|
Architectural invariants mined from the import graph: "Domain X never imports from Y", "Files in Z always export N symbols", etc. Confidence-scored.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_microservices_migration_cut_points`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `org(view="migration")` 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
|
+
|
|
3
5
|
Suggested microservices extraction order. Repos with high stability (more incoming than outgoing edges) extract first.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_neighbors`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `impact(file, mode="neighbors")` 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
|
+
|
|
3
5
|
Get import graph neighbors of a file — files it imports and files that import it. Returns nodes and edges for visualization.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_org_architecture`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `org(view="architecture")` 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
|
+
|
|
3
5
|
Org-wide summary: registered repos + total cross-repo edge count + edges by kind. Requires `carto org init` + `carto org sync`.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_org_domain_mapping`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `org(view="domains")` 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
|
+
|
|
3
5
|
Per-repo domain list across all org repos (reads each repo's carto.db if registered).
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_pending_decisions`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `memory(kind="pending")` 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
|
+
|
|
3
5
|
Recent decisions with pending/unresolved/HIGH-risk flags in their payload. Surfaces unfinished AI work from the episodic log.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_recent_decisions`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `memory(kind="recent")` 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
|
+
|
|
3
5
|
List recent validation decisions and architectural choices the AI has made in this project. Returns time-descending rows.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_service_boundary_violations`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `org(view="violations")` 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
|
+
|
|
3
5
|
Cross-repo edges that import private/internal surface (heuristic: target path contains internal / private / _lib).
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_service_dependency_graph`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `org(view="graph")` 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
|
+
|
|
3
5
|
Aggregated cross-repo graph: each repo is a node, edges grouped by (from_repo, to_repo, edge_kind).
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_session_context`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `memory(kind="session")` 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
|
+
|
|
3
5
|
Full context for an AI session: every decision and every intervention, ordered chronologically. Use to recap what happened in a long-running session.
|
|
4
6
|
|
|
5
7
|
## Input schema
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `get_temporal_context`
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `history(view="file")` 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
|
+
|
|
3
5
|
A file's full temporal context: first_seen_ts, last_modified_ts, commit_count, blast_radius, recent events, age in days.
|
|
4
6
|
|
|
5
7
|
## Input schema
|