contract-driven-delivery 2.1.1 → 2.1.2

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.1.2] - 2026-05-29
4
+
5
+ Recommended MCP setup during install and upgrade.
6
+
7
+ ### Changed
8
+
9
+ - `cdd-kit init` and `cdd-kit refresh` now explicitly recommend enabling the
10
+ `cdd-kit mcp` server so AI agents use graph/code-map tools directly.
11
+ - `CLAUDE.md`, `CODEX.md`, README, and install guide now present MCP graph tools
12
+ as the recommended project exploration path, with `cdd-kit graph/index` as
13
+ fallback.
14
+
3
15
  ## [2.1.1] - 2026-05-29
4
16
 
5
17
  MCP tool access for graph/code-map exploration.
package/README.md CHANGED
@@ -275,6 +275,12 @@ Creates: `contracts/`, `specs/templates/`, provider guidance files (`CLAUDE.md`,
275
275
 
276
276
  `.cdd/model-policy.json` stores role-to-model **classes** (`opus`, `sonnet`, `haiku`) instead of provider release IDs such as `claude-opus-4-7`. This keeps the policy stable across Claude and Codex adapters; provider-specific tooling can map the class to the concrete model available in that environment.
277
277
 
278
+ Recommended: configure MCP-capable AI agents with `command: "cdd-kit"` and
279
+ `args: ["mcp"]` after init. This exposes graph/code-map tools directly to the
280
+ agent (`cdd_graph_context`, `cdd_graph_query`, `cdd_graph_impact`,
281
+ `cdd_index_query`, `cdd_index_impact`) so project exploration does not depend on
282
+ the agent remembering shell commands.
283
+
278
284
  ---
279
285
 
280
286
  ### `cdd-kit update`
@@ -307,6 +313,10 @@ cdd-kit migrate --all # add new per-change scaffolds such as implementation-p
307
313
  cdd-kit doctor --strict
308
314
  ```
309
315
 
316
+ After syncing, configure MCP-capable agents with `command: "cdd-kit"` and
317
+ `args: ["mcp"]`. This is the recommended way for agents to use the regenerated
318
+ code graph and code-map; shell commands remain the fallback.
319
+
310
320
  What gets updated:
311
321
 
312
322
  | command | updates | preserves |
@@ -389,6 +399,11 @@ cdd-kit refresh --yes --no-templates
389
399
  5. Resyncs `.cdd/model-policy.json` roles from installed agent frontmatter.
390
400
  6. Regenerates `.cdd/code-map.yml`.
391
401
 
402
+ After `refresh --yes`, configure MCP-capable agents to run `cdd-kit mcp`.
403
+ The MCP tools are the recommended graph/code-map exploration interface for AI
404
+ agents; `cdd-kit graph ...` and `cdd-kit index ...` remain the fallback when MCP
405
+ is not available.
406
+
392
407
  Run `cdd-kit migrate --all` separately when you need existing
393
408
  `specs/changes/*` directories to gain new required artifacts.
394
409
 
@@ -769,6 +784,9 @@ cdd-kit migrate --all
769
784
  cdd-kit doctor --strict
770
785
  ```
771
786
 
787
+ Recommended agent setup after the refresh: enable the `cdd-kit` MCP server with
788
+ args `["mcp"]` so agents use graph/code-map tools before opening source files.
789
+
772
790
  ### Old completed specs
773
791
 
774
792
  If a change is already finished, merged, or only kept for audit/history:
@@ -801,11 +819,12 @@ Then choose one path per active change:
801
819
  ### Recommended rollout for production repos already burned by token overuse
802
820
 
803
821
  1. Run `cdd-kit refresh --yes` once per repo after updating the npm package.
804
- 2. Run `cdd-kit migrate --all` so existing active changes receive the current required artifact set.
805
- 3. Review and fill `implementation-plan.md` before resuming implementation agents on active changes.
806
- 4. Run `cdd-kit doctor --strict` in CI.
807
- 5. Migrate active specs with `cdd-kit migrate --enable-context-governance` only after reviewing the generated manifest.
808
- 6. Teach agents to use `cdd-kit context request/approve/reject/list` instead of silently widening context.
822
+ 2. Configure MCP-capable agents with `command: "cdd-kit"` and `args: ["mcp"]`.
823
+ 3. Run `cdd-kit migrate --all` so existing active changes receive the current required artifact set.
824
+ 4. Review and fill `implementation-plan.md` before resuming implementation agents on active changes.
825
+ 5. Run `cdd-kit doctor --strict` in CI.
826
+ 6. Migrate active specs with `cdd-kit migrate --enable-context-governance` only after reviewing the generated manifest.
827
+ 7. Teach agents to use `cdd-kit context request/approve/reject/list` instead of silently widening context.
809
828
 
810
829
  ---
811
830
 
@@ -42,6 +42,28 @@ This repository follows the Contract-Driven Delivery workflow.
42
42
 
43
43
  Run `cdd-kit detect-stack` to verify the detected tech stack.
44
44
 
45
+ ## Recommended MCP Tools
46
+
47
+ Configure MCP-capable agents to use the cdd-kit server:
48
+
49
+ ```json
50
+ {
51
+ "mcpServers": {
52
+ "cdd-kit": {
53
+ "command": "cdd-kit",
54
+ "args": ["mcp"]
55
+ }
56
+ }
57
+ }
58
+ ```
59
+
60
+ Prefer these MCP tools before reading source files: `cdd_graph_context`,
61
+ `cdd_graph_query`, `cdd_graph_impact`, `cdd_index_query`, and
62
+ `cdd_index_impact`. They use `.cdd/code-map.yml` and
63
+ `.cdd/code-graph.index.json` as the project exploration layer. If MCP is not
64
+ available, use the equivalent CLI commands: `cdd-kit graph ...` and
65
+ `cdd-kit index ...`.
66
+
45
67
  ## Context Governance
46
68
 
47
69
  For context-governed changes, read `specs/changes/<change-id>/context-manifest.md` before using file-reading or broad search tools.
@@ -11,6 +11,28 @@ This project uses Contract-Driven Delivery (CDD).
11
11
  - Run `cdd-kit context-scan` before classification when project context may be stale.
12
12
  - Run `cdd-kit gate <change-id>` before proposing a commit or PR.
13
13
 
14
+ ## Recommended MCP Tools
15
+
16
+ Configure MCP-capable agents to use the cdd-kit server:
17
+
18
+ ```json
19
+ {
20
+ "mcpServers": {
21
+ "cdd-kit": {
22
+ "command": "cdd-kit",
23
+ "args": ["mcp"]
24
+ }
25
+ }
26
+ }
27
+ ```
28
+
29
+ Prefer these MCP tools before reading source files: `cdd_graph_context`,
30
+ `cdd_graph_query`, `cdd_graph_impact`, `cdd_index_query`, and
31
+ `cdd_index_impact`. They use `.cdd/code-map.yml` and
32
+ `.cdd/code-graph.index.json` as the project exploration layer. If MCP is not
33
+ available, use the equivalent CLI commands: `cdd-kit graph ...` and
34
+ `cdd-kit index ...`.
35
+
14
36
  ## Context Governance
15
37
 
16
38
  Read `specs/changes/<change-id>/context-manifest.md` before using file-reading or search tools.
package/dist/cli/index.js CHANGED
@@ -98,6 +98,21 @@ var init_logger = __esm({
98
98
  }
99
99
  });
100
100
 
101
+ // src/utils/mcp-hint.ts
102
+ function logRecommendedMcpSetup() {
103
+ log.info("Recommended for AI agents: enable the cdd-kit MCP server.");
104
+ log.dim(" MCP server command: cdd-kit");
105
+ log.dim(' MCP server args: ["mcp"]');
106
+ log.dim(" Tools exposed: cdd_graph_context, cdd_graph_query, cdd_graph_impact, cdd_index_query, cdd_index_impact");
107
+ log.dim(" Use MCP graph tools before source reads; CLI fallback: cdd-kit graph/index.");
108
+ }
109
+ var init_mcp_hint = __esm({
110
+ "src/utils/mcp-hint.ts"() {
111
+ "use strict";
112
+ init_logger();
113
+ }
114
+ });
115
+
101
116
  // src/commands/code-map-hook.ts
102
117
  var code_map_hook_exports = {};
103
118
  __export(code_map_hook_exports, {
@@ -10283,8 +10298,10 @@ async function refresh(opts) {
10283
10298
  log.info("Next: review changes with `git diff`, then commit:");
10284
10299
  log.dim(" git add .cdd/code-map.yml .cdd/model-policy.json specs/templates tests/templates ci-templates .github/workflows");
10285
10300
  log.dim(' git commit -m "chore: cdd-kit refresh"');
10301
+ logRecommendedMcpSetup();
10286
10302
  } else {
10287
10303
  log.info("Dry-run finished. Re-run with `--yes` to apply.");
10304
+ log.info('After applying, configure MCP with command `cdd-kit` and args ["mcp"] so agents use graph/code-map tools directly.');
10288
10305
  }
10289
10306
  log.blank();
10290
10307
  }
@@ -10299,6 +10316,7 @@ var init_refresh = __esm({
10299
10316
  init_upgrade();
10300
10317
  init_code_map();
10301
10318
  init_code_map_hook();
10319
+ init_mcp_hint();
10302
10320
  HOOKS_MARKER_PATH = ".cdd/.hooks-installed";
10303
10321
  }
10304
10322
  });
@@ -12843,6 +12861,7 @@ function detectStack(repoRoot) {
12843
12861
  }
12844
12862
 
12845
12863
  // src/commands/init.ts
12864
+ init_mcp_hint();
12846
12865
  function readCondaEnvName(cwd) {
12847
12866
  const envYml = join5(cwd, "environment.yml");
12848
12867
  if (!existsSync4(envYml))
@@ -13080,6 +13099,7 @@ async function init(opts) {
13080
13099
  } else {
13081
13100
  log.info("Use the contract-driven-delivery skill in Claude Code to scan this repo.");
13082
13101
  }
13102
+ logRecommendedMcpSetup();
13083
13103
  log.blank();
13084
13104
  }
13085
13105
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contract-driven-delivery",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "Contract-driven delivery kit for AI coding agents with deterministic context indexes, manifest-backed read-scope governance, and orchestrated contracts-first delivery.",
5
5
  "keywords": [
6
6
  "contract-driven",