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.
- package/CHANGELOG.md +135 -0
- package/CONTRIBUTING.md +27 -20
- package/README.md +177 -448
- package/docs/anci/v0.1-DRAFT.md +132 -2
- package/docs/api/README.md +124 -0
- package/docs/api/did_we_discuss_this.md +36 -0
- package/docs/api/dismiss_gap.md +39 -0
- package/docs/api/dismiss_suggestion.md +34 -0
- package/docs/api/explain_change_in_natural_language.md +33 -0
- package/docs/api/find_consumers_of_api.md +36 -0
- package/docs/api/get_action_patterns.md +34 -0
- package/docs/api/get_active_drift.md +32 -0
- package/docs/api/get_active_suggestions.md +25 -0
- package/docs/api/get_ai_cost_attribution.md +32 -0
- package/docs/api/get_arch_events.md +44 -0
- package/docs/api/get_architectural_drift.md +39 -0
- package/docs/api/get_architecture.md +25 -0
- package/docs/api/get_blast_radius.md +36 -0
- package/docs/api/get_canonical_pattern.md +41 -0
- package/docs/api/get_change_plan.md +34 -0
- package/docs/api/get_change_velocity.md +34 -0
- package/docs/api/get_churn_vs_blast_radius.md +34 -0
- package/docs/api/get_complexity_trend.md +41 -0
- package/docs/api/get_context.md +34 -0
- package/docs/api/get_conventions.md +34 -0
- package/docs/api/get_cross_domain.md +25 -0
- package/docs/api/get_cross_language_call_graph.md +25 -0
- package/docs/api/get_cross_repo_blast_radius.md +36 -0
- package/docs/api/get_cross_team_coupling.md +25 -0
- package/docs/api/get_data_flow.md +35 -0
- package/docs/api/get_dead_code_with_confidence.md +32 -0
- package/docs/api/get_decision_log.md +34 -0
- package/docs/api/get_dependency_surface.md +25 -0
- package/docs/api/get_domain.md +34 -0
- package/docs/api/get_domain_evolution.md +41 -0
- package/docs/api/get_domain_health.md +34 -0
- package/docs/api/get_domains_list.md +25 -0
- package/docs/api/get_drift_digest.md +32 -0
- package/docs/api/get_env_vars.md +32 -0
- package/docs/api/get_evolution_delta.md +36 -0
- package/docs/api/get_file_ownership.md +33 -0
- package/docs/api/get_file_receipts.md +34 -0
- package/docs/api/get_file_summary.md +34 -0
- package/docs/api/get_gaps.md +52 -0
- package/docs/api/get_high_impact_files.md +32 -0
- package/docs/api/get_hot_in_prod_no_tests.md +34 -0
- package/docs/api/get_hotspot_files.md +39 -0
- package/docs/api/get_iac_resources.md +25 -0
- package/docs/api/get_intent.md +25 -0
- package/docs/api/get_interface_contract.md +33 -0
- package/docs/api/get_intervention_history.md +34 -0
- package/docs/api/get_invariants.md +39 -0
- package/docs/api/get_llm_enrichment.md +33 -0
- package/docs/api/get_microservice_cut_points.md +32 -0
- package/docs/api/get_microservices_migration_cut_points.md +27 -0
- package/docs/api/get_minimal_context_for_intent.md +39 -0
- package/docs/api/get_models.md +32 -0
- package/docs/api/get_neighbors.md +41 -0
- package/docs/api/get_org_architecture.md +27 -0
- package/docs/api/get_org_domain_mapping.md +27 -0
- package/docs/api/get_pending_decisions.md +34 -0
- package/docs/api/get_predictive_risk.md +32 -0
- package/docs/api/get_progressive_disclosure_tree.md +25 -0
- package/docs/api/get_recent_decisions.md +39 -0
- package/docs/api/get_risk_weighted_blast_radius.md +32 -0
- package/docs/api/get_routes.md +25 -0
- package/docs/api/get_safety_checklist.md +33 -0
- package/docs/api/get_semantic_diff.md +34 -0
- package/docs/api/get_service_boundary_violations.md +27 -0
- package/docs/api/get_service_dependency_graph.md +27 -0
- package/docs/api/get_session_context.md +34 -0
- package/docs/api/get_similar_patterns.md +39 -0
- package/docs/api/get_stale_docs.md +25 -0
- package/docs/api/get_structure.md +25 -0
- package/docs/api/get_temporal_context.md +36 -0
- package/docs/api/get_test_coverage_map.md +25 -0
- package/docs/api/get_token_budget_report.md +36 -0
- package/docs/api/get_upgrade_risk.md +25 -0
- package/docs/api/get_working_memory.md +25 -0
- package/docs/api/history.md +78 -0
- package/docs/api/impact.md +56 -0
- package/docs/api/ingest_otlp_traces.md +34 -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/scaffold_for_intent.md +34 -0
- package/docs/api/search_routes.md +34 -0
- package/docs/api/set_intent.md +45 -0
- package/docs/api/simulate_change_impact.md +39 -0
- package/docs/api/validate_change.md +39 -0
- package/docs/api/validate_diff.md +39 -0
- package/docs/concepts/anci.md +87 -0
- package/docs/concepts/blast-radius.md +66 -0
- package/docs/concepts/domains.md +116 -0
- package/docs/concepts/import-graph.md +102 -0
- package/docs/concepts/mcp-integration.md +150 -0
- package/docs/guides/adding-feature-safely.md +101 -0
- package/docs/guides/ci-integration.md +175 -0
- package/docs/guides/monorepo-setup.md +121 -0
- package/docs/guides/onboarding-new-engineer.md +121 -0
- package/docs/guides/pre-merge-review.md +139 -0
- package/docs/migration/v1-to-v2.md +110 -0
- package/docs/quickstart.md +95 -0
- package/docs/scale.md +2 -2
- package/docs/screenshots/carto-supabase-blast-radius.png +0 -0
- package/docs/troubleshooting.md +180 -0
- package/package.json +11 -4
- package/scripts/gen-api-docs.js +202 -0
- package/src/acp/agent.js +83 -11
- package/src/acp/config.js +64 -0
- package/src/acp/persistence.js +146 -0
- package/src/acp/providers/anthropic.js +179 -27
- package/src/acp/providers/index.js +15 -2
- package/src/acp/providers/openai.js +164 -38
- package/src/acp/providers/sse.js +82 -0
- package/src/acp/safety.js +128 -0
- package/src/acp/session.js +73 -0
- package/src/adjacent/call-graph.js +170 -0
- package/src/adjacent/iac.js +167 -0
- package/src/adjacent/llm-enrich.js +35 -0
- package/src/adjacent/runtime.js +216 -0
- package/src/adjacent/semantic-diff.js +143 -0
- package/src/agents/domains.js +72 -24
- package/src/agents/scan-structure.js +1 -1
- package/src/ai/context-builder.js +215 -0
- package/src/ai/retrieval/lexical.js +122 -0
- package/src/ai/retrieval/rrf.js +121 -0
- package/src/ai/retrieval/semantic.js +35 -0
- package/src/ai/retrieval/structural.js +82 -0
- package/src/ai/tools.js +425 -0
- package/src/anci/consumer.js +83 -3
- package/src/anci/emit.js +20 -3
- 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/bitmap/index.js +1 -1
- package/src/bitmap/tools.js +2 -2
- package/src/brain/conventions/index.js +299 -0
- package/src/brain/index.js +31 -0
- package/src/brain/invariants/index.js +306 -0
- package/src/brain/procedural/index.js +181 -0
- package/src/brain/suggestions/index.js +153 -0
- package/src/brain/working/index.js +170 -0
- package/src/cli/anci.js +27 -1
- package/src/cli/check.js +47 -1
- package/src/cli/diff.js +83 -0
- package/src/cli/doctor.js +339 -0
- package/src/cli/explain.js +61 -0
- package/src/cli/export.js +128 -0
- package/src/cli/index.js +120 -1
- package/src/cli/init.js +227 -6
- package/src/cli/load.js +125 -0
- package/src/cli/org.js +172 -0
- package/src/cli/pr-impact.js +59 -2
- package/src/cli/serve.js +1 -1
- package/src/cli/status.js +211 -0
- package/src/cli/sync.js +2 -2
- package/src/cli/temporal.js +188 -0
- package/src/cli/validate.js +201 -0
- package/src/cli/watch.js +4 -4
- package/src/cli/why.js +101 -0
- package/src/extractors/frameworks.js +236 -0
- package/src/extractors/imports.js +35 -10
- package/src/extractors/languages/dart.js +138 -0
- package/src/extractors/languages/go.js +11 -1
- package/src/extractors/languages/javascript.js +21 -7
- package/src/extractors/languages/kotlin.js +169 -0
- package/src/extractors/languages/php.js +195 -0
- package/src/extractors/languages/prisma.js +1 -1
- package/src/extractors/languages/python.js +12 -1
- package/src/extractors/languages/swift.js +140 -0
- package/src/extractors/languages/typescript.js +28 -51
- package/src/extractors/plugin-api.js +102 -0
- 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/files-without-tests.js +285 -0
- package/src/mcp/impact.js +119 -0
- package/src/mcp/middleware/index.js +451 -0
- package/src/mcp/server.js +2918 -0
- package/src/mcp/validate.js +1 -1
- package/src/org/detect.js +262 -0
- package/src/org/queries.js +144 -0
- package/src/org/store.js +173 -0
- package/src/org/sync.js +106 -0
- package/src/predictive/cut-points.js +83 -0
- package/src/predictive/drift-digest.js +88 -0
- package/src/predictive/ownership.js +145 -0
- package/src/predictive/risk-score.js +121 -0
- package/src/predictive/validate-change.js +55 -0
- 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/store-adapter.js +3 -3
- package/src/store/{sync-v2.js → sync.js} +122 -52
- package/src/temporal/backfill.js +211 -0
- package/src/temporal/delta.js +85 -0
- package/src/temporal/events.js +180 -0
- package/src/temporal/queries.js +358 -0
- package/src/temporal/snapshot.js +151 -0
- package/src/temporal/store.js +400 -0
- package/src/mcp/server-v2.js +0 -986
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# `get_upgrade_risk`
|
|
2
|
+
|
|
3
|
+
Cross-references each external dep against the import graph. Returns usage count + domain count + LOW/MEDIUM/HIGH risk per dep. Use before bumping a dep version.
|
|
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,25 @@
|
|
|
1
|
+
# `get_working_memory`
|
|
2
|
+
|
|
3
|
+
Live state snapshot: branch, HEAD, uncommitted files, recent decision count, open HIGH-severity warnings, recent drift. Read this at the start of every AI session.
|
|
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,78 @@
|
|
|
1
|
+
# `history`
|
|
2
|
+
|
|
3
|
+
Temporal/architectural history: domain drift (default), domain evolution, hotspots, arch events, a file's timeline, change velocity, complexity trend, churn-vs-blast, domain health. Requires `carto temporal init`.
|
|
4
|
+
|
|
5
|
+
## Input schema
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"view": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": [
|
|
14
|
+
"drift",
|
|
15
|
+
"evolution",
|
|
16
|
+
"hotspots",
|
|
17
|
+
"events",
|
|
18
|
+
"file",
|
|
19
|
+
"velocity",
|
|
20
|
+
"complexity",
|
|
21
|
+
"churn",
|
|
22
|
+
"health"
|
|
23
|
+
],
|
|
24
|
+
"description": "Which historical view to return (default drift)."
|
|
25
|
+
},
|
|
26
|
+
"domain": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "Domain filter (drift/evolution/health)."
|
|
29
|
+
},
|
|
30
|
+
"file": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "File (file/complexity views)."
|
|
33
|
+
},
|
|
34
|
+
"time_range": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "Window like \"30d\", \"90d\"."
|
|
37
|
+
},
|
|
38
|
+
"limit": {
|
|
39
|
+
"type": "number",
|
|
40
|
+
"description": "Row cap (hotspots)."
|
|
41
|
+
},
|
|
42
|
+
"severity": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "Event severity (events)."
|
|
45
|
+
},
|
|
46
|
+
"kind": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "Event kind (events)."
|
|
49
|
+
},
|
|
50
|
+
"days": {
|
|
51
|
+
"type": "number",
|
|
52
|
+
"description": "Lookback days (velocity)."
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"required": []
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Required arguments
|
|
60
|
+
|
|
61
|
+
_None._
|
|
62
|
+
|
|
63
|
+
## Properties
|
|
64
|
+
|
|
65
|
+
| Name | Type | Description |
|
|
66
|
+
|------|------|-------------|
|
|
67
|
+
| `view` | string | Which historical view to return (default drift). |
|
|
68
|
+
| `domain` | string | Domain filter (drift/evolution/health). |
|
|
69
|
+
| `file` | string | File (file/complexity views). |
|
|
70
|
+
| `time_range` | string | Window like "30d", "90d". |
|
|
71
|
+
| `limit` | number | Row cap (hotspots). |
|
|
72
|
+
| `severity` | string | Event severity (events). |
|
|
73
|
+
| `kind` | string | Event kind (events). |
|
|
74
|
+
| `days` | number | Lookback days (velocity). |
|
|
75
|
+
|
|
76
|
+
## See also
|
|
77
|
+
|
|
78
|
+
- [Index of all MCP tools](./README.md)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# `impact`
|
|
2
|
+
|
|
3
|
+
Impact of changing code: blast radius (default), multi-file simulate, import neighbors, or data flow. Signature capability — "what breaks if I touch this?"
|
|
4
|
+
|
|
5
|
+
## Input schema
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"file": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Relative file path (modes: blast, neighbors, data_flow)."
|
|
14
|
+
},
|
|
15
|
+
"files": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"items": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"description": "File paths for mode=\"simulate\" (change a set at once)."
|
|
21
|
+
},
|
|
22
|
+
"mode": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"enum": [
|
|
25
|
+
"blast",
|
|
26
|
+
"simulate",
|
|
27
|
+
"neighbors",
|
|
28
|
+
"data_flow"
|
|
29
|
+
],
|
|
30
|
+
"description": "blast=transitive dependents (default); simulate=union for a file set; neighbors=import graph neighbors; data_flow=upstream/downstream + routes/models/env."
|
|
31
|
+
},
|
|
32
|
+
"hops": {
|
|
33
|
+
"type": "number",
|
|
34
|
+
"description": "Neighbor hops (mode=\"neighbors\", default 1, max 3)."
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"required": []
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Required arguments
|
|
42
|
+
|
|
43
|
+
_None._
|
|
44
|
+
|
|
45
|
+
## Properties
|
|
46
|
+
|
|
47
|
+
| Name | Type | Description |
|
|
48
|
+
|------|------|-------------|
|
|
49
|
+
| `file` | string | Relative file path (modes: blast, neighbors, data_flow). |
|
|
50
|
+
| `files` | array | File paths for mode="simulate" (change a set at once). |
|
|
51
|
+
| `mode` | string | blast=transitive dependents (default); simulate=union for a file set; neighbors=import graph neighbors; data_flow=upstream/downstream + routes/models/env. |
|
|
52
|
+
| `hops` | number | Neighbor hops (mode="neighbors", default 1, max 3). |
|
|
53
|
+
|
|
54
|
+
## See also
|
|
55
|
+
|
|
56
|
+
- [Index of all MCP tools](./README.md)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# `ingest_otlp_traces`
|
|
2
|
+
|
|
3
|
+
Parse an OpenTelemetry OTLP JSON/JSONL trace file and aggregate per-route hit counts. Use the resulting counts with get_risk_weighted_blast_radius.
|
|
4
|
+
|
|
5
|
+
## Input schema
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"path": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Path to OTLP file"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": [
|
|
17
|
+
"path"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Required arguments
|
|
23
|
+
|
|
24
|
+
- `path`
|
|
25
|
+
|
|
26
|
+
## Properties
|
|
27
|
+
|
|
28
|
+
| Name | Type | Description |
|
|
29
|
+
|------|------|-------------|
|
|
30
|
+
| `path` | string | Path to OTLP file |
|
|
31
|
+
|
|
32
|
+
## See also
|
|
33
|
+
|
|
34
|
+
- [Index of all MCP tools](./README.md)
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# `memory`
|
|
2
|
+
|
|
3
|
+
Episodic memory: search past decisions (default), decision log, recent decisions, session recap, pending work, or a file's intervention history. Ask "did we already decide this?"
|
|
4
|
+
|
|
5
|
+
## Input schema
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"kind": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": [
|
|
14
|
+
"search",
|
|
15
|
+
"log",
|
|
16
|
+
"recent",
|
|
17
|
+
"session",
|
|
18
|
+
"pending",
|
|
19
|
+
"interventions"
|
|
20
|
+
],
|
|
21
|
+
"description": "search=substring over the log (default); log=recent decision log; recent=validation decisions; session=full session recap; pending=unfinished/HIGH-risk work; interventions=warnings on a file."
|
|
22
|
+
},
|
|
23
|
+
"query": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "Search topic (kind=\"search\")."
|
|
26
|
+
},
|
|
27
|
+
"file": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "File filter (kind=\"interventions\")."
|
|
30
|
+
},
|
|
31
|
+
"hours": {
|
|
32
|
+
"type": "number",
|
|
33
|
+
"description": "Lookback hours (kind=\"log\"/\"pending\")."
|
|
34
|
+
},
|
|
35
|
+
"time_range": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "Window like \"7d\" (kind=\"recent\")."
|
|
38
|
+
},
|
|
39
|
+
"filter": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "Decision-kind filter (kind=\"recent\")."
|
|
42
|
+
},
|
|
43
|
+
"session_id": {
|
|
44
|
+
"type": "number",
|
|
45
|
+
"description": "Session id (kind=\"session\")."
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"required": []
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Required arguments
|
|
53
|
+
|
|
54
|
+
_None._
|
|
55
|
+
|
|
56
|
+
## Properties
|
|
57
|
+
|
|
58
|
+
| Name | Type | Description |
|
|
59
|
+
|------|------|-------------|
|
|
60
|
+
| `kind` | string | search=substring over the log (default); log=recent decision log; recent=validation decisions; session=full session recap; pending=unfinished/HIGH-risk work; interventions=warnings on a file. |
|
|
61
|
+
| `query` | string | Search topic (kind="search"). |
|
|
62
|
+
| `file` | string | File filter (kind="interventions"). |
|
|
63
|
+
| `hours` | number | Lookback hours (kind="log"/"pending"). |
|
|
64
|
+
| `time_range` | string | Window like "7d" (kind="recent"). |
|
|
65
|
+
| `filter` | string | Decision-kind filter (kind="recent"). |
|
|
66
|
+
| `session_id` | number | Session id (kind="session"). |
|
|
67
|
+
|
|
68
|
+
## See also
|
|
69
|
+
|
|
70
|
+
- [Index of all MCP tools](./README.md)
|
package/docs/api/org.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# `org`
|
|
2
|
+
|
|
3
|
+
Cross-repo / multi-repo view: org architecture (default), service dependency graph, cross-repo blast radius, API consumers, per-repo domains, boundary violations, or migration cut points. Requires `carto org init`.
|
|
4
|
+
|
|
5
|
+
## Input schema
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"view": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": [
|
|
14
|
+
"architecture",
|
|
15
|
+
"graph",
|
|
16
|
+
"blast",
|
|
17
|
+
"consumers",
|
|
18
|
+
"domains",
|
|
19
|
+
"violations",
|
|
20
|
+
"migration"
|
|
21
|
+
],
|
|
22
|
+
"description": "Which org-wide view to return (default architecture)."
|
|
23
|
+
},
|
|
24
|
+
"repo": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "Producer repo (view=\"blast\")."
|
|
27
|
+
},
|
|
28
|
+
"target": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "Package/module (view=\"consumers\")."
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"required": []
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Required arguments
|
|
38
|
+
|
|
39
|
+
_None._
|
|
40
|
+
|
|
41
|
+
## Properties
|
|
42
|
+
|
|
43
|
+
| Name | Type | Description |
|
|
44
|
+
|------|------|-------------|
|
|
45
|
+
| `view` | string | Which org-wide view to return (default architecture). |
|
|
46
|
+
| `repo` | string | Producer repo (view="blast"). |
|
|
47
|
+
| `target` | string | Package/module (view="consumers"). |
|
|
48
|
+
|
|
49
|
+
## See also
|
|
50
|
+
|
|
51
|
+
- [Index of all MCP tools](./README.md)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# `patterns`
|
|
2
|
+
|
|
3
|
+
Semantic + procedural patterns mined from the repo: architectural invariants (default), naming/export/dir conventions, canonical exemplar, or "when X changes, Y changes" action patterns.
|
|
4
|
+
|
|
5
|
+
## Input schema
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"kind": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": [
|
|
14
|
+
"invariants",
|
|
15
|
+
"conventions",
|
|
16
|
+
"canonical",
|
|
17
|
+
"actions"
|
|
18
|
+
],
|
|
19
|
+
"description": "invariants=mined rules (default); conventions=naming/export/dir; canonical=best exemplar; actions=git co-change patterns."
|
|
20
|
+
},
|
|
21
|
+
"domain": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "Domain filter (invariants/canonical)."
|
|
24
|
+
},
|
|
25
|
+
"threshold": {
|
|
26
|
+
"type": "number",
|
|
27
|
+
"description": "Confidence threshold (invariants)."
|
|
28
|
+
},
|
|
29
|
+
"file": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "File or directory (conventions)."
|
|
32
|
+
},
|
|
33
|
+
"pattern_type": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "route_handler | model_definition (canonical)."
|
|
36
|
+
},
|
|
37
|
+
"intent": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"description": "Intent filter (actions)."
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": []
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Required arguments
|
|
47
|
+
|
|
48
|
+
_None._
|
|
49
|
+
|
|
50
|
+
## Properties
|
|
51
|
+
|
|
52
|
+
| Name | Type | Description |
|
|
53
|
+
|------|------|-------------|
|
|
54
|
+
| `kind` | string | invariants=mined rules (default); conventions=naming/export/dir; canonical=best exemplar; actions=git co-change patterns. |
|
|
55
|
+
| `domain` | string | Domain filter (invariants/canonical). |
|
|
56
|
+
| `threshold` | number | Confidence threshold (invariants). |
|
|
57
|
+
| `file` | string | File or directory (conventions). |
|
|
58
|
+
| `pattern_type` | string | route_handler \| model_definition (canonical). |
|
|
59
|
+
| `intent` | string | Intent filter (actions). |
|
|
60
|
+
|
|
61
|
+
## See also
|
|
62
|
+
|
|
63
|
+
- [Index of all MCP tools](./README.md)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# `scaffold_for_intent`
|
|
2
|
+
|
|
3
|
+
For a natural-language intent ("add a payment route"), returns: anchor file + co-changed files + canonical pattern + conventions to follow. Combines invariants, conventions, and procedural memory.
|
|
4
|
+
|
|
5
|
+
## Input schema
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"intent": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Natural-language description of the change."
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": [
|
|
17
|
+
"intent"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Required arguments
|
|
23
|
+
|
|
24
|
+
- `intent`
|
|
25
|
+
|
|
26
|
+
## Properties
|
|
27
|
+
|
|
28
|
+
| Name | Type | Description |
|
|
29
|
+
|------|------|-------------|
|
|
30
|
+
| `intent` | string | Natural-language description of the change. |
|
|
31
|
+
|
|
32
|
+
## See also
|
|
33
|
+
|
|
34
|
+
- [Index of all MCP tools](./README.md)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# `search_routes`
|
|
2
|
+
|
|
3
|
+
Search API routes by path or method. Case-insensitive.
|
|
4
|
+
|
|
5
|
+
## Input schema
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"query": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Search query e.g. \"auth\", \"POST\", \"/api/users\""
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": [
|
|
17
|
+
"query"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Required arguments
|
|
23
|
+
|
|
24
|
+
- `query`
|
|
25
|
+
|
|
26
|
+
## Properties
|
|
27
|
+
|
|
28
|
+
| Name | Type | Description |
|
|
29
|
+
|------|------|-------------|
|
|
30
|
+
| `query` | string | Search query e.g. "auth", "POST", "/api/users" |
|
|
31
|
+
|
|
32
|
+
## See also
|
|
33
|
+
|
|
34
|
+
- [Index of all MCP tools](./README.md)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# `set_intent`
|
|
2
|
+
|
|
3
|
+
Capture a user-stated intent about this project — product type, stack, or a scope note ("single-user for now"). Product-type gates every rule in the rule engine, so calling this correctly is how the AI unlocks (or narrows) gap detection. Notes accumulate — this tool never overwrites prior notes, only appends.
|
|
4
|
+
|
|
5
|
+
## Input schema
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"product_type": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "The product classification, e.g. \"saas-with-auth\" or \"unsupported\"."
|
|
14
|
+
},
|
|
15
|
+
"stack": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"items": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"description": "Optional explicit stack list, e.g. [\"Next.js\", \"Supabase\"]. Replaces the auto-detected stack."
|
|
21
|
+
},
|
|
22
|
+
"note": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "A single scope statement from the user. Timestamped and appended to the notes array."
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"required": []
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Required arguments
|
|
32
|
+
|
|
33
|
+
_None._
|
|
34
|
+
|
|
35
|
+
## Properties
|
|
36
|
+
|
|
37
|
+
| Name | Type | Description |
|
|
38
|
+
|------|------|-------------|
|
|
39
|
+
| `product_type` | string | The product classification, e.g. "saas-with-auth" or "unsupported". |
|
|
40
|
+
| `stack` | array | Optional explicit stack list, e.g. ["Next.js", "Supabase"]. Replaces the auto-detected stack. |
|
|
41
|
+
| `note` | string | A single scope statement from the user. Timestamped and appended to the notes array. |
|
|
42
|
+
|
|
43
|
+
## See also
|
|
44
|
+
|
|
45
|
+
- [Index of all MCP tools](./README.md)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# `simulate_change_impact`
|
|
2
|
+
|
|
3
|
+
> ⚠️ **Deprecated (CF-7).** Use `impact(files, mode="simulate")` 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
|
+
Given a list of files, returns all files transitively affected by changing them simultaneously, with hop distance. Powered by the bitmap engine — only feasible at this speed (sub-millisecond) with bitmap OR-aggregation. Use when planning a refactor that touches multiple files.
|
|
6
|
+
|
|
7
|
+
## Input schema
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": {
|
|
13
|
+
"files": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
"description": "Array of relative file paths from project root"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": [
|
|
22
|
+
"files"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Required arguments
|
|
28
|
+
|
|
29
|
+
- `files`
|
|
30
|
+
|
|
31
|
+
## Properties
|
|
32
|
+
|
|
33
|
+
| Name | Type | Description |
|
|
34
|
+
|------|------|-------------|
|
|
35
|
+
| `files` | array | Array of relative file paths from project root |
|
|
36
|
+
|
|
37
|
+
## See also
|
|
38
|
+
|
|
39
|
+
- [Index of all MCP tools](./README.md)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# `validate_change`
|
|
2
|
+
|
|
3
|
+
Pre-write governance: given a file + proposed full content, synthesizes a diff vs disk and runs validate_diff. Use in IDE onWillSaveTextDocument hooks.
|
|
4
|
+
|
|
5
|
+
## Input schema
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"file": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"content": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": [
|
|
19
|
+
"file",
|
|
20
|
+
"content"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Required arguments
|
|
26
|
+
|
|
27
|
+
- `file`
|
|
28
|
+
- `content`
|
|
29
|
+
|
|
30
|
+
## Properties
|
|
31
|
+
|
|
32
|
+
| Name | Type | Description |
|
|
33
|
+
|------|------|-------------|
|
|
34
|
+
| `file` | string | |
|
|
35
|
+
| `content` | string | |
|
|
36
|
+
|
|
37
|
+
## See also
|
|
38
|
+
|
|
39
|
+
- [Index of all MCP tools](./README.md)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# `validate_diff`
|
|
2
|
+
|
|
3
|
+
Given a unified diff, returns: violations (cross-domain imports, high-blast files), blast radius per file, risk level (SAFE/LOW/MEDIUM/HIGH), and suggestions. Sub-15ms p99 on a 7K-file repo. Each call is recorded in the episodic memory log so other tools can ask "did we discuss this?".
|
|
4
|
+
|
|
5
|
+
## Input schema
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"diff": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Unified diff text (output of `git diff` / GitHub PR patch)."
|
|
14
|
+
},
|
|
15
|
+
"session_id": {
|
|
16
|
+
"type": "number",
|
|
17
|
+
"description": "Optional session id. Defaults to the most recent active session, or a fresh one."
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"required": [
|
|
21
|
+
"diff"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Required arguments
|
|
27
|
+
|
|
28
|
+
- `diff`
|
|
29
|
+
|
|
30
|
+
## Properties
|
|
31
|
+
|
|
32
|
+
| Name | Type | Description |
|
|
33
|
+
|------|------|-------------|
|
|
34
|
+
| `diff` | string | Unified diff text (output of `git diff` / GitHub PR patch). |
|
|
35
|
+
| `session_id` | number | Optional session id. Defaults to the most recent active session, or a fresh one. |
|
|
36
|
+
|
|
37
|
+
## See also
|
|
38
|
+
|
|
39
|
+
- [Index of all MCP tools](./README.md)
|