claudemd-cli 0.26.2 → 0.28.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 +21 -0
- package/README.md +6 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,27 @@ 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.28.0] - 2026-07-10
|
|
12
|
+
|
|
13
|
+
**Minor — sampling-audit detector expansion 4 → 8, opportunity denominators, self/external stratification, pre-registered calibration gate.** Second implementation tranche of `docs/spec-optimization-plan-2026-07-10.md` (P1 items A2–A5).
|
|
14
|
+
|
|
15
|
+
- **4 new sequence/claim detectors** (`scripts/sampling-audit.js`): `§11-turn-yield` (typed continuation-nudge — `继续`/`next`/`怎么停了`/`why did you stop` — after a tool-active turn; the spec's own confirmed-yield tell), `§7-bugfix-anchor` (`Done: fixed …` line without a prior-failing token in the same line), `§11-post-compaction` (compaction event — `compact_boundary` system line or `isCompactSummary` user line, deduped as one event — with no plan/spec re-read within the next 10 main-line assistant events), `§5-hard-auth` (hard-class op — settings.json/.env/migrations write, prod `npm install <pkg>`, `git push --force`, `DROP TABLE` — with no `[AUTH REQUIRED` marker in the previous 10 assistant texts; pre-declared FP-heavy, advisory collection only). Sequence detectors walk the full event stream (tool_use / typed-user / compaction) and exclude subagent sidechains (`isSidechain:true`).
|
|
16
|
+
- **A2 metric contract**: every rule now reports `violations` WITH its `opportunities` denominator (Done lines examined / substantive Uncertain lines / typed-after-tool-turn messages / compaction events / hard-class ops); `§10-V` splits `violations` (turns with ≥1 match, rate stays ≤1) from `hits` (raw per-pattern matches, kept for A1-baseline comparability). `metricContract` string rides in the JSON and the report header.
|
|
17
|
+
- **Stratification**: `--global` now returns `byClass` (`self`/`external`/`unknown` via the shared `classifyProject` — trailing `-claudemd` segment = self) and the markdown report gains a per-class `viol/opps` table; `samplingAuditGlobal({projectsRoot})` exported and parameterized for tests.
|
|
18
|
+
- **A4 calibration gate (pre-registered)**: `PRECISION_GATE = 0.8` exported; every detector starts `precision: null, status: 'collecting'`. Uncalibrated ratios are collection data, not compliance evidence.
|
|
19
|
+
- **A5 dashboard**: `scripts/audit.js` gains a `selfCompliance` section (embeds the transcript scan of the current project, same window) — per rule `opportunities/violations/rate/precision/status`, with **`rate` withheld (null) until hand-labeled precision ≥ 0.8**. `/claudemd-audit` command doc instructs reporting denominators verbatim and never presenting `collecting` ratios as rates.
|
|
20
|
+
- **Tests**: sampling-audit 9 → 17 cases (4 new real-shape fixtures: `turn-yield` / `bugfix-anchor` / `post-compaction` / `hard-auth`, incl. sidechain-exclusion, boundary+summary dedup, and lookback-window coverage shapes), audit 21 → 22 (`selfCompliance` shape + rate-withheld gate). Fixture shapes byte-verified against a real 2026-07-10 transcript (string-content typed prompts, `compact_boundary` + `compactMetadata`, tool_use blocks).
|
|
21
|
+
- **CLI report format**: stdout summary now prints `violations/opportunities (rate, status)` per rule; markdown table adds Opportunities/Rate/Precision/Status columns. Command doc warns that same-day re-runs overwrite `tasks/sampling-audit-<date>.md` (use `--json` to protect hand-written analysis).
|
|
22
|
+
|
|
23
|
+
## [0.27.0] - 2026-07-10
|
|
24
|
+
|
|
25
|
+
**Minor — post-compaction §11 re-read reminder (new SessionStart behavior) + spec v6.14.2 wording patch.** First implementation tranche of `docs/spec-optimization-plan-2026-07-10.md` (P6 items F1–F4).
|
|
26
|
+
|
|
27
|
+
- **Compaction re-read reminder** (`hooks/session-start-check.sh`): SessionStart events with `source=="compact"` (auto or manual compaction — verified against code.claude.com/docs/en/hooks) now emit a one-line `additionalContext` banner: re-read the active plan + spec state per core §11 before continuing L2+ work. Rationale: §11 post-compaction re-read is a self-enforced rule guarding exactly the state where model attention is least reliable — it depended on the very attention it protects; the banner makes it hook-assisted. Advisory only, never blocks. **Opt-out**: `DISABLE_COMPACT_REREAD_REMINDER=1` (README §2a). Telemetry event: `session-start / compact-reminder / §11`.
|
|
28
|
+
- **Behavior change on compact events**: `source=="compact"` now exits early — bootstrap, upgrade-banner, and summary-banner no longer run on compaction. They are session-START concerns; re-running `install.js` mid-session on a compaction event was never desirable. Startup / resume / clear paths are unchanged (stdin is now parsed whenever `jq` is present, previously only when `CLAUDE_SESSION_ID` was unset — needed for the `source` field; no observable difference on those paths).
|
|
29
|
+
- **Spec v6.14.2** (patch — wording only, no rule change; detail in `spec/CLAUDE-changelog.md`): (1) extended header load-scope "review" → "pre-ship review", aligning with core §2.2 (per-task code review does not load extended); (2) trigger-word lists marked non-exhaustive with `e.g.` (quality-slider / depth-triggers / HACK / EMERGENCY / three-strike / continuation-cancel-switch) — detector-consumed lists (§11 mid-SPINE tell) stay exact; (3) context7 hard references conditionalized to "docs-lookup for API claims (e.g. context7, if available)" + a §12 fallback-table row (WebFetch official docs).
|
|
30
|
+
- **Tests**: `session-start.test.sh` 14 → 17 — compact banner emits exactly ONE JSON object (`jq -s length == 1`, per the v0.23.13 double-emit lesson); `DISABLE_COMPACT_REREAD_REMINDER=1` suppresses; compact does NOT spawn bootstrap even when the manifest is missing. Version-pin cascade updated (`spec-structure.test.js`, `upgrade-lifecycle.test.sh`, `hard-rules.json#spec_version`).
|
|
31
|
+
|
|
11
32
|
## [0.26.2] - 2026-07-07
|
|
12
33
|
|
|
13
34
|
**Patch — dogfood QA hardening: three false-positive / data-loss fixes surfaced by an end-to-end usage pass.** All `fix:` (restore intended behavior); spec unchanged (stays v6.14.1). No new user-facing features.
|
package/README.md
CHANGED
|
@@ -198,6 +198,11 @@ export DISABLE_SESSION_SUMMARY_BANNER=1 # v0.8.0+ — only the SessionStart b
|
|
|
198
198
|
# the data is captured for /claudemd-audit
|
|
199
199
|
# but no additionalContext line is injected.
|
|
200
200
|
|
|
201
|
+
export DISABLE_COMPACT_REREAD_REMINDER=1 # v0.27.0+ — only the post-compaction §11
|
|
202
|
+
# re-read reminder banner (SessionStart with
|
|
203
|
+
# source=="compact"); compact events still
|
|
204
|
+
# skip bootstrap/upgrade-banner either way.
|
|
205
|
+
|
|
201
206
|
export DISABLE_BATCH_CADENCE_ADVISORY=1 # v0.19.2+ — only the §13.2 batch-review
|
|
202
207
|
# cadence advisory inside session-end-check;
|
|
203
208
|
# mid-SPINE warn-on-unvalidated-mutation
|
|
@@ -333,7 +338,7 @@ claudemd/
|
|
|
333
338
|
├── commands/ # 12 slash-command markdown files
|
|
334
339
|
├── bin/ # standalone CLI entrypoint (claudemd-lint.js → `npx claudemd-cli` on npmjs.org)
|
|
335
340
|
├── scripts/ # 16 Node.js management scripts + scripts/lib/ (single-source registry, lint, etc.)
|
|
336
|
-
├── spec/ # shipped v6.14.
|
|
341
|
+
├── spec/ # shipped v6.14.2 CLAUDE*.md trio + OPERATOR.md + hard-rules.json manifest
|
|
337
342
|
├── tests/ # hook shell tests + Node.js tests + integration + fixtures
|
|
338
343
|
├── docs/ # ADDING-NEW-HOOK.md + RULE-HITS-SCHEMA.md + superpowers/
|
|
339
344
|
└── .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.28.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": {
|