contract-driven-delivery 2.1.1 → 2.1.3

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,30 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.1.3] - 2026-05-29
4
+
5
+ Correct Claude Code MCP registration guidance.
6
+
7
+ ### Changed
8
+
9
+ - Install and upgrade guidance now recommends
10
+ `claude mcp add --scope user cdd-kit -- cdd-kit mcp`, which writes the server
11
+ to `~/.claude.json`.
12
+ - Documentation now warns that adding `mcpServers` to
13
+ `~/.claude/settings.json` alone is not sufficient for Claude Code CLI MCP
14
+ discovery.
15
+
16
+ ## [2.1.2] - 2026-05-29
17
+
18
+ Recommended MCP setup during install and upgrade.
19
+
20
+ ### Changed
21
+
22
+ - `cdd-kit init` and `cdd-kit refresh` now explicitly recommend enabling the
23
+ `cdd-kit mcp` server so AI agents use graph/code-map tools directly.
24
+ - `CLAUDE.md`, `CODEX.md`, README, and install guide now present MCP graph tools
25
+ as the recommended project exploration path, with `cdd-kit graph/index` as
26
+ fallback.
27
+
3
28
  ## [2.1.1] - 2026-05-29
4
29
 
5
30
  MCP tool access for graph/code-map exploration.
package/README.md CHANGED
@@ -275,6 +275,19 @@ 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: register the cdd-kit MCP server with Claude Code after init:
279
+
280
+ ```bash
281
+ claude mcp add --scope user cdd-kit -- cdd-kit mcp
282
+ claude mcp list
283
+ ```
284
+
285
+ This writes the server to `~/.claude.json` and exposes graph/code-map tools
286
+ directly to the agent (`cdd_graph_context`, `cdd_graph_query`,
287
+ `cdd_graph_impact`, `cdd_index_query`, `cdd_index_impact`). Do not rely on
288
+ manually adding `mcpServers` to `~/.claude/settings.json`; that file is a Claude
289
+ Code UI settings format and is not the MCP registry read by the CLI.
290
+
278
291
  ---
279
292
 
280
293
  ### `cdd-kit update`
@@ -307,6 +320,11 @@ cdd-kit migrate --all # add new per-change scaffolds such as implementation-p
307
320
  cdd-kit doctor --strict
308
321
  ```
309
322
 
323
+ After syncing, register MCP-capable agents with
324
+ `claude mcp add --scope user cdd-kit -- cdd-kit mcp`. This is the recommended
325
+ way for agents to use the regenerated code graph and code-map; shell commands
326
+ remain the fallback.
327
+
310
328
  What gets updated:
311
329
 
312
330
  | command | updates | preserves |
@@ -389,6 +407,18 @@ cdd-kit refresh --yes --no-templates
389
407
  5. Resyncs `.cdd/model-policy.json` roles from installed agent frontmatter.
390
408
  6. Regenerates `.cdd/code-map.yml`.
391
409
 
410
+ After `refresh --yes`, register the MCP server:
411
+
412
+ ```bash
413
+ claude mcp add --scope user cdd-kit -- cdd-kit mcp
414
+ ```
415
+
416
+ The MCP tools are the recommended graph/code-map exploration interface for AI
417
+ agents. Claude Code CLI stores user-scope MCP servers in `~/.claude.json`; a
418
+ manual `mcpServers` entry in `~/.claude/settings.json` is not sufficient.
419
+ `cdd-kit graph ...` and `cdd-kit index ...` remain the fallback when MCP is not
420
+ available.
421
+
392
422
  Run `cdd-kit migrate --all` separately when you need existing
393
423
  `specs/changes/*` directories to gain new required artifacts.
394
424
 
@@ -716,19 +746,17 @@ code-map-only fallback, `--engine codegraph` to require external CodeGraph, or
716
746
  ### `cdd-kit mcp`
717
747
 
718
748
  `cdd-kit mcp` runs a stdio MCP server so agents can call the graph/index layer
719
- as tools instead of shelling out manually.
749
+ as tools instead of shelling out manually. Register it with Claude Code:
720
750
 
721
- ```json
722
- {
723
- "mcpServers": {
724
- "cdd-kit": {
725
- "command": "cdd-kit",
726
- "args": ["mcp"]
727
- }
728
- }
729
- }
751
+ ```bash
752
+ claude mcp add --scope user cdd-kit -- cdd-kit mcp
753
+ claude mcp list
730
754
  ```
731
755
 
756
+ Use the CLI command above so Claude Code writes the server to `~/.claude.json`.
757
+ Do not rely on manually editing `~/.claude/settings.json`; that file is not the
758
+ MCP registry read by the CLI.
759
+
732
760
  Exposed tools:
733
761
 
734
762
  - `cdd_graph_status`
@@ -769,6 +797,9 @@ cdd-kit migrate --all
769
797
  cdd-kit doctor --strict
770
798
  ```
771
799
 
800
+ Recommended agent setup after the refresh: enable the `cdd-kit` MCP server with
801
+ args `["mcp"]` so agents use graph/code-map tools before opening source files.
802
+
772
803
  ### Old completed specs
773
804
 
774
805
  If a change is already finished, merged, or only kept for audit/history:
@@ -801,11 +832,12 @@ Then choose one path per active change:
801
832
  ### Recommended rollout for production repos already burned by token overuse
802
833
 
803
834
  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.
835
+ 2. Register MCP-capable agents with `claude mcp add --scope user cdd-kit -- cdd-kit mcp`.
836
+ 3. Run `cdd-kit migrate --all` so existing active changes receive the current required artifact set.
837
+ 4. Review and fill `implementation-plan.md` before resuming implementation agents on active changes.
838
+ 5. Run `cdd-kit doctor --strict` in CI.
839
+ 6. Migrate active specs with `cdd-kit migrate --enable-context-governance` only after reviewing the generated manifest.
840
+ 7. Teach agents to use `cdd-kit context request/approve/reject/list` instead of silently widening context.
809
841
 
810
842
  ---
811
843
 
@@ -42,6 +42,27 @@ 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
+ ```bash
50
+ claude mcp add --scope user cdd-kit -- cdd-kit mcp
51
+ claude mcp list
52
+ ```
53
+
54
+ For Claude Code, use `claude mcp add` so the server is written to
55
+ `~/.claude.json`. Do not rely on manually adding `mcpServers` to
56
+ `~/.claude/settings.json`; that is a Claude Code UI settings format and is not
57
+ the MCP registry read by the CLI.
58
+
59
+ Prefer these MCP tools before reading source files: `cdd_graph_context`,
60
+ `cdd_graph_query`, `cdd_graph_impact`, `cdd_index_query`, and
61
+ `cdd_index_impact`. They use `.cdd/code-map.yml` and
62
+ `.cdd/code-graph.index.json` as the project exploration layer. If MCP is not
63
+ available, use the equivalent CLI commands: `cdd-kit graph ...` and
64
+ `cdd-kit index ...`.
65
+
45
66
  ## Context Governance
46
67
 
47
68
  For context-governed changes, read `specs/changes/<change-id>/context-manifest.md` before using file-reading or broad search tools.
@@ -11,6 +11,27 @@ 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
+ ```bash
19
+ claude mcp add --scope user cdd-kit -- cdd-kit mcp
20
+ claude mcp list
21
+ ```
22
+
23
+ For Claude Code, use `claude mcp add` so the server is written to
24
+ `~/.claude.json`. Do not rely on manually adding `mcpServers` to
25
+ `~/.claude/settings.json`; that is a Claude Code UI settings format and is not
26
+ the MCP registry read by the CLI.
27
+
28
+ Prefer these MCP tools before reading source files: `cdd_graph_context`,
29
+ `cdd_graph_query`, `cdd_graph_impact`, `cdd_index_query`, and
30
+ `cdd_index_impact`. They use `.cdd/code-map.yml` and
31
+ `.cdd/code-graph.index.json` as the project exploration layer. If MCP is not
32
+ available, use the equivalent CLI commands: `cdd-kit graph ...` and
33
+ `cdd-kit index ...`.
34
+
14
35
  ## Context Governance
15
36
 
16
37
  Read `specs/changes/<change-id>/context-manifest.md` before using file-reading or search tools.
package/dist/cli/index.js CHANGED
@@ -98,6 +98,22 @@ 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(" Claude Code user-scope setup: claude mcp add --scope user cdd-kit -- cdd-kit mcp");
105
+ log.dim(" Verify in Claude Code: /mcp or `claude mcp list`");
106
+ log.dim(" Note: Claude Code CLI reads MCP servers from ~/.claude.json; ~/.claude/settings.json is not enough.");
107
+ log.dim(" Tools exposed: cdd_graph_context, cdd_graph_query, cdd_graph_impact, cdd_index_query, cdd_index_impact");
108
+ log.dim(" Use MCP graph tools before source reads; CLI fallback: cdd-kit graph/index.");
109
+ }
110
+ var init_mcp_hint = __esm({
111
+ "src/utils/mcp-hint.ts"() {
112
+ "use strict";
113
+ init_logger();
114
+ }
115
+ });
116
+
101
117
  // src/commands/code-map-hook.ts
102
118
  var code_map_hook_exports = {};
103
119
  __export(code_map_hook_exports, {
@@ -10283,8 +10299,10 @@ async function refresh(opts) {
10283
10299
  log.info("Next: review changes with `git diff`, then commit:");
10284
10300
  log.dim(" git add .cdd/code-map.yml .cdd/model-policy.json specs/templates tests/templates ci-templates .github/workflows");
10285
10301
  log.dim(' git commit -m "chore: cdd-kit refresh"');
10302
+ logRecommendedMcpSetup();
10286
10303
  } else {
10287
10304
  log.info("Dry-run finished. Re-run with `--yes` to apply.");
10305
+ log.info("After applying, register MCP with `claude mcp add --scope user cdd-kit -- cdd-kit mcp` so agents use graph/code-map tools directly.");
10288
10306
  }
10289
10307
  log.blank();
10290
10308
  }
@@ -10299,6 +10317,7 @@ var init_refresh = __esm({
10299
10317
  init_upgrade();
10300
10318
  init_code_map();
10301
10319
  init_code_map_hook();
10320
+ init_mcp_hint();
10302
10321
  HOOKS_MARKER_PATH = ".cdd/.hooks-installed";
10303
10322
  }
10304
10323
  });
@@ -12843,6 +12862,7 @@ function detectStack(repoRoot) {
12843
12862
  }
12844
12863
 
12845
12864
  // src/commands/init.ts
12865
+ init_mcp_hint();
12846
12866
  function readCondaEnvName(cwd) {
12847
12867
  const envYml = join5(cwd, "environment.yml");
12848
12868
  if (!existsSync4(envYml))
@@ -13080,6 +13100,7 @@ async function init(opts) {
13080
13100
  } else {
13081
13101
  log.info("Use the contract-driven-delivery skill in Claude Code to scan this repo.");
13082
13102
  }
13103
+ logRecommendedMcpSetup();
13083
13104
  log.blank();
13084
13105
  }
13085
13106
 
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.3",
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",