claudemd-cli 0.44.0 → 0.46.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 +22 -0
- package/README.md +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,28 @@ 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.46.0] - 2026-07-13
|
|
12
|
+
|
|
13
|
+
**Minor — §8 detection-precision batch: close command-grouping/substitution false-negatives (SEC-3) + recognize mktemp-provenance temp cleanup (SEC-4).** Hook-code only; spec text unchanged (stays v6.19.0). From the 2026-07-13 comprehensive audit + the §8 detection-precision design review (`docs/s8-detection-precision-design-2026-07-13.md`). All changes sandbox-verified against the full corpus + adversarial FN-matrix (`DISABLE_RULE_HITS_LOG=1`) before landing.
|
|
14
|
+
|
|
15
|
+
- **SEC-3 — command-grouping/substitution FN closure** (`hooks/pre-bash-safety-check.sh`): a command inside `$(…)` / `(…)` / `{…;}` / backtick **executes at eval time** but bypassed all three §8 gates. Fixes: the rm segment splitter now breaks on `(` `)` backtick (NOT `{}` — that is brace-`${VAR}` far more often, splitting it corrupted the var target) + strips a leading group opener so `(rm`/`{ rm` is seen as rm + strips grouping chars from the residue; the curl sink tolerates a closing `)`/`}`; the npx anchor gains `(`/`{` so `$(npx …)` is caught. `\npx`/`env npx` wrapper coverage and `${VAR}` targets are preserved (233-case corpus zero-regression).
|
|
16
|
+
- **SEC-4 — mktemp-provenance recognition** (`hooks/pre-bash-safety-check.sh`): `T=$(mktemp -d); … rm -rf "$T"` (the §8.V4 sandbox-disposal idiom, previously denied as an unvalidated var) is now allowed when the target var is assigned **in the same command** from `$(mktemp …)` / `` `mktemp …` `` — mktemp output is a fresh, uniquely-named path. Additive recognition analogous to the existing `${VAR:?}` guard; new telemetry event `rm-rf-allow-provenance`. Cross-command mktemp, fake `mktemp` (`$(echo mktemp)`), transitive vars (`$S/x`), and `..` escapes stay strict.
|
|
17
|
+
- **Test completeness** (`tests/scripts/hard-rules-drift.test.js`): the hard-rules-8 reverse-completeness assertion now enumerates **both** deny idioms (`HIT_SECTIONS+=` and direct `hook_record <hook> <deny-verb> … '§…'`); the prior regex saw only the first, leaving `§10-V` / `§11-memory-read` / `§7-ship-baseline` invisible to the demote-accounting guard.
|
|
18
|
+
- **Corpus** (`tests/fixtures/bash-safety/corpus.tsv`): +22 rows (F7 grouping/substitution deny + FP controls, F8 mktemp-provenance allow + escape/fake/cross-call deny). Suite 233 → 255.
|
|
19
|
+
- **Docs** (`docs/RULE-HITS-SCHEMA.md`): document `rm-rf-allow-provenance` event + section mapping.
|
|
20
|
+
- **Deferred**: the npx command-position anchor rework (fix npx-plain-words-in-quoted-commit-message FP without regressing `env npx` wrapper coverage) needs a wrapper-aware token walk — see `tasks/s8-npx-message-fp-deferred.md`.
|
|
21
|
+
- **Tests**: full `npm test` green (corpus 255/255, node --test all pass, integration lifecycle PASS); shellcheck clean; positioning as guardrail (env/bypass-token still bypass) unchanged.
|
|
22
|
+
|
|
23
|
+
## [0.45.0] - 2026-07-13
|
|
24
|
+
|
|
25
|
+
**Minor — ships spec v6.19.0: §2.2 Runbook fast-path (ship-time token-efficiency relaxation).** When extended would load solely because of ship/release (incl. released-artifact L3) and the project's ship-runbook memory carries a current-version coverage stamp (`covers: §EXT §12 … @ v<spec>`), the ship reads the runbook + targeted-reads the stamped §EXT sections instead of the full ~47KB file. Stamp missing/stale → full load + stamp refresh (self-healing, one full re-read per spec release). All §12 HARD obligations bind unchanged. Companion to the v6.16.0 ship-runbook memory consolidation — the two together make a routine ship cost one runbook Read + ~7KB of targeted spec reads.
|
|
26
|
+
|
|
27
|
+
- **Spec** (`spec/CLAUDE.md` §2.2 + §2.1, `spec/CLAUDE-extended.md` §12 + new §2.1-EXT + Recent changes + Sizing, `spec/CLAUDE-changelog.md`): v6.18.0 → v6.19.0. Paired net-delete per §0.1: **C4 consumed** — §2.1 Model-tiering Sonnet/Opus category enumeration moved to new §EXT §2.1-EXT; safety invariants (inherit default / NEVER-downgrade list / verifier ≥ generator / anomalous re-run / evidence bar) stay in core. Candidate pool now empty.
|
|
28
|
+
- **Manifest** (`spec/hard-rules.json`): `spec_version` v6.18.0 → v6.19.0 (no rule add/remove — fast-path bounds live inside the existing `§12-ship-pipeline-hardening` HARD block; anchor unchanged).
|
|
29
|
+
- **Descriptions** (`.claude-plugin/plugin.json`, `.claude-plugin/marketplace.json` ×2, `README.md` ×3): spec family tag v6.18 → v6.19.
|
|
30
|
+
- **Memory (project-side, not in repo)**: claudemd ship runbook (`feedback_claudemd_ship_from_main_atomic.md`) gains the coverage stamp `covers: §EXT §12, §EXT §13 META, §EXT §2-EXT released-artifact checklist @ v6.19.0`.
|
|
31
|
+
- **Tests**: full `npm test` green; `version-cascade-check` v6.19 consistent + Sizing within ±20B; shellcheck + bash-3.2 gate clean.
|
|
32
|
+
|
|
11
33
|
## [0.44.0] - 2026-07-13
|
|
12
34
|
|
|
13
35
|
**Minor — ships spec v6.18.0: §1 Language-contract refinement.** Reasoning/思考 moves from the user's-language bucket to English (joining code / comments / commits); a docs split is added — local analysis/audit docs follow the user's language, shipped reference/contract docs (ARCHITECTURE / HOOK-PROTOCOL / RULE-HITS-SCHEMA / ADDING-NEW-HOOK / cross-project-pilot) stay English for adopters; Done narrative made explicit in the user's-language bucket. Code artifacts / CHANGELOG / PR / log-strings / config-keys / CLI-labels unchanged (English). Operator-requested with boundaries confirmed before edit.
|
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.19**, 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.19 — 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
|
| 16 shell hooks | `banned-vocab-check` · `pre-bash-safety-check` · `ship-baseline-check` · `residue-audit` · `memory-read-check` · `memory-prompt-hint` · `mid-spine-yield-scan` · `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
|
| 15 slash commands | `/claudemd-install` · `/claudemd-status` · `/claudemd-update` · `/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.19 | `~/.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.
|
|
@@ -338,7 +338,7 @@ claudemd/
|
|
|
338
338
|
├── commands/ # 15 slash-command markdown files
|
|
339
339
|
├── bin/ # standalone CLI entrypoint (claudemd-lint.js → `npx claudemd-cli` on npmjs.org)
|
|
340
340
|
├── scripts/ # 18 Node.js scripts + scripts/lib/ (single-source registry, lint, etc.)
|
|
341
|
-
├── spec/ # shipped v6.
|
|
341
|
+
├── spec/ # shipped v6.19.0 CLAUDE*.md trio + OPERATOR.md + hard-rules.json manifest
|
|
342
342
|
├── tests/ # hook shell tests + Node.js tests + integration + fixtures
|
|
343
343
|
├── docs/ # ADDING-NEW-HOOK.md + RULE-HITS-SCHEMA.md + superpowers/
|
|
344
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.46.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": {
|