claudemd-cli 0.11.0 → 0.12.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 +53 -0
- package/README.md +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,59 @@ 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.12.1] - 2026-05-11
|
|
12
|
+
|
|
13
|
+
**Patch — refactor: AI-CODING-SPEC v6.11.13 → v6.11.14 extended compression (audit-driven trim).**
|
|
14
|
+
|
|
15
|
+
Spec audit (user request `分析一下我们的CLAUDE.md...能不能精炼和压缩`) surfaced two structural redundancies in `CLAUDE-extended.md` — §11-EXT was 6 sibling sub-sections covering overlapping topics, and Appendix B carried 4 examples (B.3–B.6) whose normative content already lived in §10-R / §2-EXT / §2.S. No HARD rule add/remove/downgrade; no behavior change.
|
|
16
|
+
|
|
17
|
+
### What changed
|
|
18
|
+
|
|
19
|
+
- **Spec v6.11.13 → v6.11.14** (patch — content reorg + redundancy removal, identical rule semantics).
|
|
20
|
+
- **§11-EXT consolidated** in `spec/CLAUDE-extended.md`: 4 sub-sections (`Session maintenance heuristics` + `Execution heuristics (CC-borrowed)` + `Memory-system routing` + `Auto-memory decision tree`) merged into 2 (`§11-EXT Session heuristics (advisory)` + `§11-EXT Memory operations`); `MEMORY-tag-syntax` folded into Memory operations as a subsection; `macOS shell portability` replaced with one-paragraph cross-ref pointer to `feedback_macos_shell_portability.md` + `feedback_hook_platform_lib_source.md` memory anchors.
|
|
21
|
+
- **Appendix B trimmed**: B.1 (`[AUTH REQUIRED]` format) + B.2 (evidence valid/invalid) retained as canonical reuse-cases; B.3 (L3 summary formats) + B.4 (EMERGENCY incident report) + B.5 (auto-decision one-liners) + B.6 (L3 spec example) removed.
|
|
22
|
+
- **Version pins synced**: `spec/CLAUDE.md` header, `spec/CLAUDE-changelog.md` top entry, `tests/scripts/spec-structure.test.js` assertions, `README.md` (2 occurrences). Plugin manifest `description` fields kept at `v6.11` per the major.minor-only versioning policy (set in v0.2.1).
|
|
23
|
+
|
|
24
|
+
### Why patch (not minor)
|
|
25
|
+
|
|
26
|
+
§13 META: patch = wording / clarification / identical behavior. No rule added or relaxed. Pure content reorganization + redundancy removal; agent behavior unchanged. §13.2 budget cost: 0.
|
|
27
|
+
|
|
28
|
+
### Tests
|
|
29
|
+
|
|
30
|
+
- `tests/scripts/spec-structure.test.js` version pins bumped: still asserts core header + changelog top entry shape unchanged; A14 `§11-EXT` anchor still present in extended; A15 `[tag1, tag2]` literal still present (now inside `§11-EXT Memory operations § MEMORY.md tag syntax` subsection).
|
|
31
|
+
|
|
32
|
+
### Sizing
|
|
33
|
+
|
|
34
|
+
Live numbers in `spec/CLAUDE-extended.md §Recent changes` Sizing line. Single post-edit `wc -c` per `feedback_spec_sizing_recursive_rewrite.md` option 1 (±20B drift envelope).
|
|
35
|
+
|
|
36
|
+
## [0.12.0] - 2026-05-11
|
|
37
|
+
|
|
38
|
+
**Minor — feat: `/claudemd-analyze` spec ↔ implementation coherence audit.** Borrowed from github/spec-kit's `/analyze` pattern, scoped to claudemd's three highest-value drift surfaces. Read-only by default; `--strict` flag exits non-zero on CRITICAL/HIGH for pre-tag ship gate.
|
|
39
|
+
|
|
40
|
+
### What changed
|
|
41
|
+
|
|
42
|
+
- **New script** `scripts/spec-coherence-audit.js` (~280 LOC). Three checks:
|
|
43
|
+
1. **§EXT cross-ref resolution** (CRITICAL on miss) — every `§EXT §<id>` ref in `spec/CLAUDE.md` must resolve to a `##+ §<id>` heading in `spec/CLAUDE-extended.md`. Catches the "core cites section, extended doesn't have it" drift family the v0.9.30 partial-impl bug hinted at structurally.
|
|
44
|
+
2. **Sizing line accuracy** (HIGH on >±20B drift) — parses the canonical `**Sizing** (...): core N → M bytes; extended N → M bytes` line in `spec/CLAUDE-extended.md`, compares against `fs.statSync().size`. Tolerance per `feedback_spec_sizing_recursive_rewrite.md` accepted-drift envelope.
|
|
45
|
+
3. **MEMORY.md ↔ files bidirectional** (MEDIUM on dangling refs, LOW on orphan files) — scans the project's MEMORY.md index, cross-references against `~/.claude/projects/<encoded>/memory/*.md`. CC `tr '/._'` encoding consistent with `memory-read-check.sh` + `memory-prompt-hint.sh`.
|
|
46
|
+
- **New slash command** `commands/claudemd-analyze.md`.
|
|
47
|
+
- **Severity scheme** (Spec Kit borrowed): CRITICAL / HIGH / MEDIUM / LOW grouped findings + per-check `[✓]/[△]/[✗]` summary.
|
|
48
|
+
- **Out of scope** (covered by sibling commands; explicitly documented in script header + slash command body to avoid duplication): HARD-rule → hook coverage → `safety-coverage-audit.js`; section_anchor resolution → `hard-rules-drift.test.js`; tag-FP → `claudemd-doctor memory-tag-specificity`; banned-vocab 3-way drift → deferred to v0.13.0.
|
|
49
|
+
- **CLI**: `--json` machine output; `--strict` exit-1 gate; `--project=<cwd>` MEMORY.md scope override.
|
|
50
|
+
|
|
51
|
+
### Why minor, not patch
|
|
52
|
+
|
|
53
|
+
Pure additive: new script, new slash command, no existing artifact format / output shape changes. But it introduces a new contract surface (`/claudemd-analyze` as a publicly-supported coherence check + CI-gateable `--strict` mode) — minor bump makes the contract semver-discoverable for downstream automation that wants to depend on it.
|
|
54
|
+
|
|
55
|
+
### Tests
|
|
56
|
+
|
|
57
|
+
- New `tests/scripts/spec-coherence-audit.test.js`: 12 cases — real-repo smoke + structured-report shape + synthetic-fixture for each failure class (unresolved §EXT ref → CRITICAL, literal `§X-EXT` placeholder NOT flagged, sizing >±20B → HIGH, sizing within tolerance → ok, dangling memory ref → MEDIUM, orphan memory file → LOW, missing MEMORY.md → silent no-index, slash/dot/underscore cwd encoding parity, severity aggregation).
|
|
58
|
+
- Suite: 396/396 JS + 20/20 hook + 2/2 integration pass.
|
|
59
|
+
|
|
60
|
+
### Sizing
|
|
61
|
+
|
|
62
|
+
No spec changes; same `spec/CLAUDE.md` v6.11.13 baseline as v0.11.0.
|
|
63
|
+
|
|
11
64
|
## [0.11.0] - 2026-05-11
|
|
12
65
|
|
|
13
66
|
**Minor — feat: proactive MEMORY.md tag hint at UserPromptSubmit.** New hook `memory-prompt-hint` fires on every user prompt, parses MEMORY.md `[tag, tag]` index, matches against the prompt with the same word-boundary + declension + meta-escape regex as `memory-read-check.sh`, and emits an `additionalContext` block listing un-Read matched memory files. Attacks the observed §11 cite-recall ~8% (2/24) by surfacing relevant memories *before* the agent acts, not waiting for the ship-time deny.
|
package/README.md
CHANGED
|
@@ -59,9 +59,9 @@ Verify in one command (Linux): `node --version && jq --version && gh --version &
|
|
|
59
59
|
| Layer | Contents |
|
|
60
60
|
|---|---|
|
|
61
61
|
| 14 shell hooks | `banned-vocab-check` · `pre-bash-safety-check` · `ship-baseline-check` · `residue-audit` · `memory-read-check` · `memory-prompt-hint` · `sandbox-disposal-check` · `session-start-check` · `session-summary` · `session-end-check` · `transcript-vocab-scan` · `transcript-structure-scan` · `version-sync` · `mem-audit` |
|
|
62
|
-
|
|
|
62
|
+
| 10 slash commands | `/claudemd-status` · `/claudemd-update` · `/claudemd-audit` · `/claudemd-toggle` · `/claudemd-doctor` · `/claudemd-analyze` · `/claudemd-uninstall` · `/claudemd-rules` · `/claudemd-clean-residue` · `/claudemd-sparkline` |
|
|
63
63
|
| 1 standalone CLI | `claudemd-cli lint` · `claudemd-cli audit` ([npm: `claudemd-cli`](https://www.npmjs.com/package/claudemd-cli)) |
|
|
64
|
-
| Spec v6.11.
|
|
64
|
+
| Spec v6.11.14 | `~/.claude/CLAUDE.md` · `CLAUDE-extended.md` · `CLAUDE-changelog.md` (backup-before-overwrite) |
|
|
65
65
|
|
|
66
66
|
Install moves any existing `~/.claude/CLAUDE*.md` to `~/.claude/backup-<ISO>/` (last 5 kept automatically). Uninstall offers `keep / restore / delete`; `delete` requires an extra confirmation.
|
|
67
67
|
|
|
@@ -305,7 +305,7 @@ claudemd/
|
|
|
305
305
|
├── commands/ # 9 slash-command markdown files
|
|
306
306
|
├── bin/ # standalone CLI entrypoint (claudemd-lint.js → `npx claudemd-cli` on npmjs.org)
|
|
307
307
|
├── scripts/ # 10 Node.js management scripts + scripts/lib/ (single-source registry, lint, etc.)
|
|
308
|
-
├── spec/ # shipped v6.11.
|
|
308
|
+
├── spec/ # shipped v6.11.14 CLAUDE*.md trio + hard-rules.json manifest
|
|
309
309
|
├── tests/ # hook shell tests + Node.js tests + integration + fixtures
|
|
310
310
|
├── docs/ # ADDING-NEW-HOOK.md + RULE-HITS-SCHEMA.md + superpowers/
|
|
311
311
|
└── .github/workflows/ # ci.yml (ubuntu+macOS × node 20) + npm-publish.yml (tag-triggered)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claudemd-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.1",
|
|
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": {
|