contract-driven-delivery 2.0.7 → 2.0.9

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 (3) hide show
  1. package/CHANGELOG.md +113 -0
  2. package/dist/cli/index.js +2328 -1903
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,118 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.0.9] - 2026-05-04
4
+
5
+ Bug-fix patch. Discovered when verifying a real consumer repo (TODOLIST)
6
+ after a successful 2.0.8 upgrade: the user's committed
7
+ `specs/context/project-map.md` listed local kit-generated backup directories
8
+ (`.cdd/.refresh-backup/...`, `.cdd/migrate-backup/...`), which then never
9
+ matched fresh-clone digests — `cdd-kit doctor` reported "inputs changed"
10
+ forever even when nothing was wrong.
11
+
12
+ ### Fixed
13
+
14
+ - **`cdd-kit context-scan` excludes kit runtime artifacts AND common
15
+ transient cache directories at any depth**:
16
+ - `DEFAULT_FORBIDDEN` (path-prefix list) now includes
17
+ `.cdd/.refresh-backup`, `.cdd/migrate-backup`, `.cdd/runtime`.
18
+ - New `FORBIDDEN_DIRECTORY_NAMES` (basename-anywhere list) catches
19
+ Python (`__pycache__`, `.pytest_cache`, `.mypy_cache`, `.ruff_cache`,
20
+ `.tox`), JS/TS framework caches (`.next`, `.nuxt`, `.svelte-kit`,
21
+ `.parcel-cache`, `.turbo`, `.nyc_output`), generic build/coverage
22
+ (`coverage`, `htmlcov`, `.cache`), virtualenvs (`venv`, `.venv`),
23
+ nested `node_modules`, and IDE noise (`.idea`, `.vscode`, `.DS_Store`).
24
+ - Mirrors `code-map`'s `BUILTIN_EXCLUDE` so the two indexes ignore the
25
+ same noise. Previously context-scan only had 8 path-prefix entries
26
+ (`.claude / .git / node_modules / dist / build / assets / specs/archive /
27
+ specs/changes`), so locally-generated caches polluted the project-map
28
+ tree section and broke `inputs-digest` determinism for fresh clones.
29
+
30
+ ### Added
31
+
32
+ - **`cdd-kit refresh`** auto-appends `.cdd/.refresh-backup/` to `.gitignore`
33
+ the first time it overwrites a template (idempotent — no duplicate
34
+ entries on subsequent runs). Logs the action so users know what changed.
35
+ - **`cdd-kit migrate`** auto-appends `.cdd/migrate-backup/` to `.gitignore`
36
+ with identical idempotent semantics.
37
+
38
+ ### Migration
39
+
40
+ If you already committed a polluted `specs/context/project-map.md` (signs:
41
+ the tree section contains paths under `.cdd/.refresh-backup/` or
42
+ `.cdd/migrate-backup/`, doctor reports "inputs changed" after a successful
43
+ refresh), recover with:
44
+
45
+ ```bash
46
+ echo ".cdd/.refresh-backup/" >> .gitignore
47
+ rm -rf .cdd/.refresh-backup
48
+ cdd-kit context-scan
49
+ git add .gitignore specs/context/
50
+ git commit -m "fix: exclude cdd-kit refresh-backup from context-scan"
51
+ ```
52
+
53
+ Future refreshes will handle the gitignore entry automatically.
54
+
55
+ ## [2.0.8] - 2026-05-04
56
+
57
+ Adds `cdd-kit refresh` — a one-shot complete upgrade command. The previous
58
+ upgrade flow (`update --yes` + `upgrade --yes`) only touched `~/.claude/`
59
+ and added missing project files; kit-shipped templates that the user already
60
+ had on disk were never refreshed, leaving them stale across releases.
61
+
62
+ ### Added
63
+
64
+ - **`cdd-kit refresh [--yes]`**: composes `update` + `upgrade` and adds
65
+ force-refresh for kit-owned templates with automatic timestamped backup.
66
+ Six steps, each independently skippable:
67
+ 1. `~/.claude/agents` and `~/.claude/skills/contract-driven-delivery`
68
+ (delegates to `cdd-kit update`)
69
+ 2. Add missing project files (delegates to `cdd-kit upgrade`)
70
+ 3. **Force-refresh kit templates** with backup to
71
+ `.cdd/.refresh-backup/<timestamp>/`. Targets:
72
+ `specs/templates/`, `tests/templates/`, `ci-templates/`,
73
+ `.github/workflows/contract-driven-gates.yml`.
74
+ 4. Re-install pre-commit hook if `.cdd/.hooks-installed` marker exists.
75
+ 5. Resync `.cdd/model-policy.json` roles map from
76
+ `~/.claude/agents/<name>.md` `model:` frontmatter (drift detector).
77
+ 6. Regenerate `.cdd/code-map.yml`.
78
+
79
+ Flags to skip individual steps: `--no-templates`, `--no-hooks`,
80
+ `--no-code-map`, `--no-update`, `--no-upgrade`. Default is dry-run; pass
81
+ `--yes` to apply.
82
+
83
+ - **`.cdd/.hooks-installed` marker**: written by `cdd-kit init --hooks`.
84
+ Travels in the repo. Lets `cdd-kit refresh` know whether to re-install
85
+ the pre-commit hook on every refresh — so the hook stays in sync with
86
+ the latest kit version automatically.
87
+
88
+ ### Fixed
89
+
90
+ - **Pre-commit hook extension list**: `installCodeMapHook` now triggers
91
+ on `.py / .js / .jsx / .mjs / .cjs / .ts / .tsx / .vue` (was: `.py / .js / .vue`).
92
+ Mirrors `BUILTIN_INCLUDE` and the 2.0.7 qa-reviewer fix.
93
+
94
+ ### Boundaries (locked)
95
+
96
+ `cdd-kit refresh` will **never** touch:
97
+ - `contracts/`, `specs/changes/`, `specs/archive/`
98
+ - `src/`, `tests/*` (except `tests/templates/`)
99
+ - `.cdd/code-map-config.yml`, `.cdd/context-policy.json`
100
+ - `CLAUDE.md`, `AGENTS.md`, `CODEX.md`
101
+ - `package.json`, `.git/` (except `.git/hooks/pre-commit` when marker exists),
102
+ `node_modules/`, `dist/`, `build/`
103
+
104
+ ### Migration
105
+
106
+ Existing 2.0.x projects: `npm install -g contract-driven-delivery@latest`
107
+ then `cdd-kit refresh --yes`. The first refresh will surface any drift
108
+ that accumulated across 2.0.3 → 2.0.7 — backups land in
109
+ `.cdd/.refresh-backup/<timestamp>/` so rolling back any specific change
110
+ is a single `cp` away.
111
+
112
+ To use the auto-refreshing pre-commit hook on every push:
113
+ 1. `cdd-kit init --hooks` (writes the marker)
114
+ 2. From now on, `cdd-kit refresh --yes` will re-install the hook every time.
115
+
3
116
  ## [2.0.7] - 2026-05-04
4
117
 
5
118
  Comprehensive cross-consistency audit fixes. Targets the #1 root cause of