claudemd-cli 0.9.14 → 0.9.16

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 (2) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -8,6 +8,49 @@ All notable changes to the `claudemd` plugin. This changelog tracks plugin artif
8
8
  - **Canonical spec version source**: `spec/CLAUDE.md` top-line title (`# AI-CODING-SPEC vX.Y.Z — Core`) + `spec/CLAUDE-changelog.md` top `##` entry.
9
9
  - **Plugin semver vs spec semver** are independent: plugin patch (0.2.0 → 0.2.1) may ship when spec is unchanged (this release); plugin minor (0.1.9 → 0.2.0) ships when spec minor updates (v0.2.0 shipped spec v6.10.0).
10
10
 
11
+ ## [0.9.16] - 2026-05-10
12
+
13
+ **Patch — three slash-command CLIs silently dropped wrong-shape arguments.** Spec v6.11.7 unchanged. Surfaced while exercising the v0.9.15 plugin from a real `/claudemd-clean-residue --apply --age-days 0` user attempt: `--age-days` value dropped (script fell back to default `1`), `--apply` ran, script exited 0 reporting "0 deleted." Same family as v0.9.14 `claudemd-cli lint <path>` silent-success — argv-shape mismatch produced indistinguishable-from-success output.
14
+
15
+ ### Fixed
16
+
17
+ - `[fix]` **Strict argv parser in `scripts/lib/argv.js` (new) wired into `clean-residue.js` / `audit.js` / `sparkline.js`.** Pre-fix, each script used `args.find(a => a.startsWith('--key='))` which silently dropped (a) the space-separated form `--key value`, (b) any unknown flag, (c) `--apply=yes`-style boolean-with-value. Post-fix all three exit 2 with a parser error before touching state. The contract documented in `commands/claudemd-{clean-residue,audit,sparkline}.md` (`--key=value` only) is now enforced. Documented happy-path behavior is unchanged.
18
+
19
+ ### Added
20
+
21
+ - `[test]` **9 new cases in `tests/scripts/argv.test.js`** covering happy path, both bug shapes (space-form, unknown flag), and edge cases (empty value, `=` in value, repeated flag, bool-with-value, bare unknown arg).
22
+ - `[test]` **2 new cases each in `tests/scripts/clean-residue.test.js`, `audit.test.js`, `sparkline.test.js`** asserting exit 2 + stderr message on the two bug shapes via spawned CLI (225 → 240 tests).
23
+
24
+ ### Why no L3 / pre-ship-review chain
25
+
26
+ `fix:` per spec §2 hard-upgrade exclusion — restores documented intent (`--key=value` is the contract per slash-command docs). L2 ceiling. Diff: 1 new lib file (~40 LOC), 3 script tails refactored (~10 LOC each, no lib API change), 4 test files (+15 cases). Notable: third silent-success-on-wrong-arg-shape bug in 3 patches (v0.9.14 `lint <path>`; v0.9.15 hook tag-with-dash; this one) — argv-shape silent-fallback is a recurring antipattern worth a hook-level lint, candidate for the §13.2 promotion queue.
27
+
28
+ ## [0.9.15] - 2026-05-10
29
+
30
+ **Patch — `memory-read-check.sh` two coupled silent-fail-open defects.** Spec v6.11.7 unchanged. Surfaced while end-to-end-testing the v0.9.14 fix from real cwd `/mnt/data_ssd/dev/projects/claudemd`: the §11 HARD memory-read hook had been a no-op for any project containing `_` in its path AND broke entirely when MEMORY.md held a tag beginning with `-`.
31
+
32
+ ### Fixed
33
+
34
+ - `[fix]` **`tr '/.' '-'` → `tr '/._' '-'`** in `hooks/memory-read-check.sh:50` and `hooks/lib/rule-hits.sh:28`. Empirical: Claude Code encodes every non-`[a-zA-Z0-9-]` char to `-` (verified across all `~/.claude/projects/` entries). Pre-fix, any cwd containing `_` resolved to a non-existent `~/.claude/projects/-mnt-data_ssd-...` (vs CC's actual `-mnt-data-ssd-...`), the `[[ -f "$MEM_INDEX" ]] || exit 0` fail-open kicked in, and the §11 enforcement degraded to silent no-op. Stale-Memory note `feedback_cc_cwd_encoding_dots.md` claimed only `/` and `.` were encoded — incomplete; updated to reflect the broader rule.
35
+ - `[fix]` **`grep -qiF -- "$t"`** in `hooks/memory-read-check.sh:95` (and `--` added to the transcript-scan grep at L109 for parity). A MEMORY.md tag beginning with `-` (e.g. `--file`, `-h`) was parsed by `grep -qiF` as a flag, erroring `option '--file' requires an argument` and aborting the entire MEMORY scan with exit-0 fail-open. Discovered when v0.9.14's own MEMORY.md entry tagged itself with `[--file]` and broke the hook for the entire `git push` path.
36
+
37
+ ### Added
38
+
39
+ - `[test]` **3 new cases in `tests/hooks/memory-read-check.test.sh` (16/16 → 19/19)**:
40
+ - Case 17: cwd `/work/my_project` → underscore-encoded → tag match → deny.
41
+ - Case 18: cwd `/mnt/data_ssd/my.proj_v2` mixed `/`, `.`, `_` → all encoded → deny.
42
+ - Case 19: tag `--file` matched literally with `-- "$t"` separator → deny without grep crash.
43
+
44
+ ### Why no L3 / pre-ship-review chain
45
+
46
+ `fix:` per spec §2 hard-upgrade exclusion — both items restore the hook's documented intent (HARD-block ship verbs without prior matching MEMORY.md Read). L2 ceiling. Diff: 2 hook files (~6 lines net), 1 test file (~50 lines added), 0 spec/contract change. Notable: this kind of bug class — silently-no-op'd HARD enforcement under specific cwd shapes — is the worst-quality fix to ship because users couldn't have noticed (no error signal); ratio of installed users on underscore-containing paths is high (Linux convention), so impact ≫ patch surface size.
47
+
48
+ ### Versioning
49
+
50
+ - `package.json`, `plugin.json`, `marketplace.json` (×2 fields) → `0.9.15`. Spec trio unchanged at v6.11.7.
51
+
52
+ ---
53
+
11
54
  ## [0.9.14] - 2026-05-10
12
55
 
13
56
  **Patch — `claudemd-cli lint <path>` silent-success fix.** Spec v6.11.7 unchanged. Surfaced while role-playing a real user of the standalone CLI: `claudemd lint /path/to/COMMIT_EDITMSG` (the natural pre-commit-hook shape, mirroring `audit <jsonl-path>`) silently scans the **literal path string** for banned-vocab — finds none — and exits 0, even when the file content would deny. CI / git-pre-commit integrations would have shipped commit messages full of `significantly` / `robust` / `production-ready` undetected.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudemd-cli",
3
- "version": "0.9.14",
3
+ "version": "0.9.16",
4
4
  "description": "Standalone CLI for §10-V banned-vocab + transcript scanning. Companion to the claudemd Claude Code plugin (github.com/sdsrss/claudemd) for use in git pre-commit hooks, GitHub Actions, and other agents.",
5
5
  "type": "module",
6
6
  "bin": {