claudemd-cli 0.65.2 → 0.67.0
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 +26 -0
- package/README.md +5 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,32 @@ 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.67.0] - 2026-08-16
|
|
12
|
+
|
|
13
|
+
The 2026-08-16 comprehensive audit's fix batch (report: `docs/comprehensive-audit-2026-08-16-v0.66.0.md`, local). Two defect families dominate: five more instances of "gate scope narrower than its subject", and a NEW family — per-session semantics stored in global state files, exposed when headless-session concurrency arrived (682 cwd=/tmp sessions in 3 days against a 2-5/day baseline). Ships spec **v6.25.1** (semantic-loss restore, see `spec/CLAUDE-changelog.md`). Minor, not patch: doctor/audit gain user-visible additive surfaces per the released-artifact checklist.
|
|
14
|
+
|
|
15
|
+
- **fix: banned-vocab Path 2 sanitize stage regains the bare `name.ext` strip clause** (`hooks/banned-vocab-check.sh`). The identifier-strip exists in three engines; the ONLY blocking one lacked the third clause, so an assistant turn mentioning `comprehensive-parser.js` denied the next ship-flow command — the v0.23.19 field-report deny-loop class, resurrected on one engine while both advisory engines were immune. New gate `tests/scripts/sanitize-stage-parity.test.js` extracts each hook's sed program from source and runs all three engines over shared probes (divergence RED-verified pre-fix; over-strip controls included).
|
|
16
|
+
- **fix: per-session Stop-hook state — sandbox-disposal window ref and residue-audit baseline are now keyed by session_id** (`session-start-<sid>.ref` / `tmp-baseline-<sid>.txt`). One global file meant concurrent session B claimed A's fresh sandboxes AND disarmed A's own next scan (both arms RED-verified: B warned on A's dir; A then saw nothing), and residue deltas shrank toward zero as concurrency grew. Sessions without a session_id keep the legacy global names (pre-fix blind spot kept, not widened). Trade-off disclosed: each session's FIRST Stop now establishes its window silently, so an artifact created before a session's first Stop is not flagged by that session — scanning it against a foreign baseline is exactly the misattribution being removed; multi-turn sessions are covered from their second Stop. Orphans reaped by `clean-residue.js` (new `session-ref` / `tmp-baseline` patterns; manual `/claudemd-clean-residue`, 7d mtime); `docs/ARCHITECTURE.md` State locations updated (drift-gated).
|
|
17
|
+
- **fix: §13.2 batch-review counter writes via tmp+mv** (`session-end-check.sh`). The truncating `printf > file` let a concurrent reader observe an empty file, and the numeric guard coerced that torn read to 0 — discarding the whole accumulated count near the threshold. tmp+mv removes torn reads; racing increments can still undercount (advisory tolerates undercount, not resets).
|
|
18
|
+
- **fix: jq-guard consumer gate derives its set from source shapes, not one helper's name** (`tests/scripts/jq-guard-consumers.test.js`). Deriving from `hook_require_jq` alone missed every hook using an inline `command -v jq` guard: the widened extraction caught FIVE (session-start-check — whose broken-jq arm silently killed the §11-post-compaction reminder with zero telemetry —, sandbox-disposal, residue-audit, mem-audit, version-sync; the audit itself had only named two). All five now route their first event parse through `hook_jq_field` and record `jq-missing` fail-open rows; `docs/RULE-HITS-SCHEMA.md` emitter list extended accordingly.
|
|
19
|
+
- **fix: doctor gains the spec-cache-drift axis it was blind on** (`scripts/doctor.js`). Axis 1 (source vs installed) self-compares when run from the repo, so during the v0.66.0 post-tag-edit incident the SessionStart banner fired 713 times over 4 days while `/claudemd-doctor` exited 0 with every spec hash green. New check mirrors what hook-drift has done since v0.9.22: installed `~/.claude` vs the marketplace clone; skip contract (`market-root-missing` / `self-compare` / `market-spec-missing`) mirrors hook-drift. RED-verified against the live incident (doctor now exits 3 naming the two forked files).
|
|
20
|
+
- **fix: jq-free fallback row rejects truncated `extra` payloads** (`hooks/lib/rule-hits.sh`). The first/last-char sniff accepted `{"matched":}` / `{"matched":[}` — the exact shapes six call sites produce under a jq that works once then fails — and appended an unparseable line, failing at the property the guard's own comment claimed. Now: delimiter-count balance + dangling-`:`/`,` rejection at the closer AND mid-payload (`{"missing":,"n":2}` — a live memory-read-check shape the first cut of THIS guard still missed; caught by the pre-tag review, S1). Conservative: worst case degrades `extra` to null, row survives. The first cut also miscounted via `${var//[^]]/}` — bash parses that bracket expression non-POSIX — and was caught by the new T14 control probes; final form counts by length difference. `fail-open.test.sh` grows T14 (9 shapes).
|
|
21
|
+
- **fix: rotation-race comment told the next reader a falsehood** (`hooks/lib/rule-hits.sh`). "At worst one log line is lost" — sandbox replay shows the interleaved double-mv destroys BOTH archive generations (live rows survive under `.2`). The race stays accepted (archives are cold storage no consumer reads); the comment now states the real bound.
|
|
22
|
+
- **feat: `audit.js` dataIntegrity gains `logFirstTs` / `logSpanDays` / `windowCovered`.** Rotation is size-triggered while every consumer window is time-based; `logFirstTs()` existed for exactly this and the other two consumers already called it. At the 5MB cap (log is at 50%) a `--days=30` report would silently cover a truncated window.
|
|
23
|
+
- **fix: `contract.test.sh` exit-code spectrum split extended to the three remaining recursive greps** (B-direction ×2, C2) — 60 lines above the site 0.65.2 fixed, and MORE exposed: a missing `$HOOKS_DIR` would have presented as mass documentation drift. Verified with a missing-dir control arm (exit 2 → "infrastructure fault").
|
|
24
|
+
- **fix: `npm-tarball-contents.test.js` accepts npm 12's `pack --json` object shape** (npm ≤11 emits an array). CI's node 20/22 legs never see npm 12, so the suite was red only on dev boxes running node 24 — the exact class the next item closes.
|
|
25
|
+
- **ci: node 24 joins the matrix** (engines declares `>=20` open-ended; the maintainer's actual runtime was never CI-executed) **and a spec-bump gate lands**: spec/ edits since the last reachable tag must ship with a version bump in the same change (`git describe` against `package.json`; checkout now fetches tags). RED-verified against the incident commit shape; goes green with this release's bump. The gate lives in CI, not tests/ — the suite must stay runnable from an npm tarball with no git history.
|
|
26
|
+
- **chore (audit P2 hygiene batch)**: new `CONTRIBUTING.md` (dev entry point — `npm test`, conventions, doc map) and `docs/ROLLBACK.md` (release rollback runbook, previously memory-layer-only; audit PROC-1); `.gitignore` docs/ whitelist gains ROLLBACK.md + `docs/spec-optimization-plan-2026-07-10.md` (cited by shipped code and spec changelog — a clone no longer dangles those references; audit D1); dead export `spec-diff.js#summarizeDiff` removed (B1); `toggle.js` exit-code doc gains the `2 argv-shape` it already emitted (PROC-4); `hook-registry.js` header no longer claims an execution-order mirror it never kept (C1); `docs/ARCHITECTURE.md` drops the v0.9.13-stale claim that session-summary reads `session-start.ref`.
|
|
27
|
+
- Users upgrading: nothing to do. The 713-events/4-days spec-drift banner storm ends because installed and marketplace content agree again at v6.25.1. Revert path: pin 0.66.0 or `CLAUDEMD_ALLOW_DOWNGRADE=1 node scripts/install.js` from a 0.66.0 checkout.
|
|
28
|
+
|
|
29
|
+
## [0.66.0] - 2026-08-09
|
|
30
|
+
|
|
31
|
+
Ships spec **v6.25.0** — a compression + relocation minor that restores attention-budget headroom. No hook, script, or command behavior change; the shipped artifact delta is the four spec files + manifests.
|
|
32
|
+
|
|
33
|
+
- **spec: core 24793 → 23042 bytes (−7.1%), extended 49964 → 42999 bytes (−14%)** with zero rule-semantics change, zero section renames, and the enforcement partition unchanged (6 hook / 16 self / 2 both / 1 external). What left: version archaeology, rationale essays (rules keep one-line incident citations), duplicated enumerations, operator bookkeeping. What moved: §13.2 promotion gates, §13.3 gate tables, and the Recent-changes operator carry-forward now live in `OPERATOR.md` (which grows accordingly — it is not Agent-loaded, so the growth is free at runtime).
|
|
34
|
+
- Basis: per-clause audit (`tasks/spec-lean-cut-candidates-2026-08-09.md`, local) against 30d rule-hits telemetry and incident memories; `hard-rules-audit.js` reported `demoteCandidates: []`, so every HARD rule survives verbatim at anchor level — `hard-rules.json` bumps `spec_version` only. An externally-drafted "lean v7" (core→11.4K, new caps, changelog restart) was evaluated and rejected; the decision record enumerates 8 rejected items with reasons.
|
|
35
|
+
- Users upgrading: nothing to do. The spec reads ~0.5k tokens lighter per turn (core ≈6.0k → ≈5.5k estimated, matching the extended Sizing line; an earlier draft of this entry said 4.9k — that was the pre-review target, not the shipped size); every obligation, AUTH surface, and hook contract is unchanged. Revert path: pin the previous plugin version (0.65.2) or `CLAUDEMD_ALLOW_DOWNGRADE=1 node scripts/install.js` from a 0.65.2 checkout.
|
|
36
|
+
|
|
11
37
|
## [0.65.2] - 2026-07-28
|
|
12
38
|
|
|
13
39
|
The v0.65.0 red leg has an explanation, and the guidance v0.65.1 left behind was wrong. No shipped **code** changed: the tarball delta is the version field and this changelog entry (`CHANGELOG.md` is itself the largest shipped file, so "byte-identical apart from the version" — the first draft of this sentence — would have been self-falsifying). No hook, script, command or spec changed. It is released so the correction carries a version and reaches the marketplace channel, which serves the whole repository.
|
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# claudemd
|
|
2
2
|
|
|
3
|
-
> A **personal AI-coding discipline harness**: one developer's opinionated **AI-CODING-SPEC v6.
|
|
3
|
+
> A **personal AI-coding discipline harness**: one developer's opinionated **AI-CODING-SPEC v6.25**, encoded as Claude Code shell hooks and shipped with the plugin. Built and dogfooded on my own repos — fork and adapt, don't adopt wholesale.
|
|
4
4
|
|
|
5
5
|
[](https://github.com/sdsrss/claudemd/actions/workflows/ci.yml)
|
|
6
6
|
[](https://www.npmjs.com/package/claudemd-cli)
|
|
7
7
|
[](LICENSE)
|
|
8
8
|
|
|
9
|
-
claudemd plugs into the Claude Code hook system to **block commits, pushes, and bash commands** that violate AI-CODING-SPEC v6.
|
|
9
|
+
claudemd plugs into the Claude Code hook system to **block commits, pushes, and bash commands** that violate AI-CODING-SPEC v6.25 — banned vocabulary in commit messages, `rm -rf $VAR` without variable validation, ship-on-red-CI, unread `MEMORY.md` entries during release flows, and more. The spec itself (`CLAUDE.md` + `CLAUDE-extended.md` + `CLAUDE-changelog.md` + `OPERATOR.md`) ships with the plugin and installs into `~/.claude/`, so the rules Claude Code reads at session start match the rules the hooks enforce. (`OPERATOR.md` is the human-only spec-maintenance handbook — Agent-loaded files are the CLAUDE trio.)
|
|
10
10
|
|
|
11
11
|
A standalone CLI (`npx claudemd-cli`) reuses the same `banned-vocab.patterns` source for git pre-commit hooks, GitHub Actions, and other agents that don't run inside Claude Code.
|
|
12
12
|
|
|
@@ -60,7 +60,7 @@ Verify in one command (Linux): `node --version && jq --version && gh --version &
|
|
|
60
60
|
| 15 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-extended-read` · `session-summary` · `session-end-check` · `transcript-vocab-scan` · `transcript-structure-scan` · `version-sync` · `mem-audit` |
|
|
61
61
|
| 16 slash commands | `/claudemd-install` · `/claudemd-status` · `/claudemd-update` · `/claudemd-refresh` · `/claudemd-audit` · `/claudemd-toggle` · `/claudemd-doctor` · `/claudemd-analyze` · `/claudemd-uninstall` · `/claudemd-rules` · `/claudemd-clean-residue` · `/claudemd-sparkline` · `/claudemd-sampling-audit` · `/claudemd-bypass-audit` · `/claudemd-design-adopt` · `/claudemd-statusline` |
|
|
62
62
|
| 1 standalone CLI | `claudemd-cli lint` · `claudemd-cli audit` ([npm: `claudemd-cli`](https://www.npmjs.com/package/claudemd-cli)) |
|
|
63
|
-
| Spec v6.
|
|
63
|
+
| Spec v6.25 | `~/.claude/CLAUDE.md` · `CLAUDE-extended.md` · `CLAUDE-changelog.md` · `OPERATOR.md` (backup-before-overwrite) |
|
|
64
64
|
| StatusLine (opt-out) | PS1-style line — `user@host:dir (branch) Model [ctx:N% · 5h:N% · 7d:N%]` (`dir` = cwd basename; context / 5-hour quota / weekly quota, all **used %**, read from Claude Code's `rate_limits` payload; quota segments auto-hide when the data is absent, or force-hide with `DISABLE_STATUSLINE_QUOTA=1`) — wired into `~/.claude/settings.json` on install **only when the slot is empty**; an existing statusline is left untouched. Skip entirely with `CLAUDEMD_NO_STATUSLINE=1`. Manage via `/claudemd-statusline`. |
|
|
65
65
|
|
|
66
66
|
Install backs up a hand-written `~/.claude/CLAUDE.md` (any file without the `# AI-CODING-SPEC` H1) to `~/.claude/backup-<ISO>/` before overwriting (last 5 kept automatically). An already-installed claudemd spec is overwritten **without** a backup — deliberate (v0.23.11): the sole backup is always your own content, so `restore` can never return a stale spec instead. Uninstall offers `keep / restore / delete`; `delete` requires an extra confirmation.
|
|
@@ -352,10 +352,10 @@ claudemd/
|
|
|
352
352
|
├── commands/ # 16 slash-command markdown files
|
|
353
353
|
├── bin/ # standalone CLI entrypoint (claudemd-lint.js → `npx claudemd-cli` on npmjs.org)
|
|
354
354
|
├── scripts/ # 18 Node.js scripts + scripts/lib/ (single-source registry, lint, etc.)
|
|
355
|
-
├── spec/ # shipped v6.
|
|
355
|
+
├── spec/ # shipped v6.25.1 CLAUDE*.md trio + OPERATOR.md + hard-rules.json manifest
|
|
356
356
|
├── tests/ # hook shell tests + Node.js tests + integration + fixtures
|
|
357
357
|
├── docs/ # ADDING-NEW-HOOK.md + RULE-HITS-SCHEMA.md + superpowers/
|
|
358
|
-
└── .github/workflows/ # ci.yml (ubuntu+macOS × node 20) + npm-publish.yml (tag-triggered)
|
|
358
|
+
└── .github/workflows/ # ci.yml (ubuntu+macOS × node 20/22/24) + npm-publish.yml (tag-triggered)
|
|
359
359
|
```
|
|
360
360
|
|
|
361
361
|
---
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claudemd-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.67.0",
|
|
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": {
|