Skip to content

Best-practices review fixes: risk-signal dead logic, Standard audit path, closeout extraction, triage-log writer (0.16.0) - #11

Merged
stid merged 6 commits into
mainfrom
feat/review-fixes
Aug 22, 2026
Merged

stid merged 6 commits into
mainfrom
feat/review-fixes

Conversation

@stid

@stid stid commented Aug 22, 2026

Copy link
Copy Markdown
Owner

From a full review of the plugin's prompt surfaces (skills, commands, agents, rules, templates, hooks) against Anthropic's current published guidance on skill authoring, subagents, hooks, and instruction framing.

Fixed — dead logic in the routing rule

The risk-signal definition ("irreversibility OR multi-session cold-pickup") contained a branch that could never fire: Deep-level irreversibility is already a hard trigger, which routes to Deep before the 4+-signals branch is evaluated. The rule now names the one operative risk signal — multi-session cold-pickup — in all three places it is stated (triage SKILL, rules/lcd.md, README), with the why in parentheses.

Changed — closeout contract extracted; Standard audit gets its own path

  • The closeout contract (~40 lines: log line, opt-in evaluator, living-spec fold) lived inline in the triage SKILL — paid at triage time for actions that fire at the finish line — and was restated verbatim in /lcd:audit. It now lives once in skills/triage/references/closeout.md (the fanout.md pattern); both call-sites point there. Triage drops 237 → 207 lines, under the ~200-line instruction-file adherence budget.
  • /lcd:audit no longer threads Standard-lane items through a Deep-numbered list via exceptions. Standard has its own section, including the previously unspecified failure branch: BLOCKED names each uncovered AC-N (SURFACE) and writes no closeout line. PASS (test-presence) joins the documented audit-result vocabulary (it was emitted but absent from the contract enum).

Added — bin/lcd-triage-log.sh (+ fixture test)

The triage log's read side was always a script; the write side was model-formatted — but /lcd:tidy machine-reads both line shapes. A format is only a contract if a program owns both ends: the script validates every field (lane/hard/risk enums, the audit-result vocabulary), creates the log with its header when missing, and echoes the appended line. Triage and the closeout reference now call it.

Docs drift pass

  • Plan template Constitution table gains the commits.md row the command already required.
  • Quick lane records decisions as D-NNN blocks (the DECISIONS template's format), not free-form lines.
  • STUCK header names all three halt reasons (iteration-cap was missing).
  • Hardcoded "~5 min" prompt-cache TTL dropped from rules/lcd.md and docs/why-lcd.md — TTLs vary by plan and load; the cache-miss argument stands without the dated number.
  • none/EVAL combination rule stated flatly ("none combines with nothing; EVAL is mixable with any real surface") instead of the self-contradicting "opposite of none but like none".
  • doctor/tidy drop the literal argument-hint: "(no args)" placeholder.
  • One sample finding line each in the lcd-evaluator / lcd-reviewer digest contracts.
  • lcd-recon notes its Context7 allowlist assumes the server is registered as context7 (other registrations put the tools outside the allowlist; the agent falls through to web search).

Deliberately left alone

  • MultiEdit stays in the hooks matcher — back-compat with older Claude Code versions; it simply never matches on current ones.
  • user-invocable frontmatter untouched — works today; default-value semantics not worth the risk in this pass.

Verification

  • tests/run.sh: 11/11 (includes the new test-triage-log.sh).
  • claude plugin validate .: passed.
  • Prompt changes here are behavioural (triage routing wording, audit restructure) — an eval row per evals/run-eval.sh would be the usual evidence; flagging for a local run since eval runs cost API tokens.

🤖 Generated with Claude Code

https://claude.ai/code/session_0123cKLoJu9PxoCQfBCFU1yN

stid and others added 6 commits August 21, 2026 23:57
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0123cKLoJu9PxoCQfBCFU1yN
The log is machine-read by /lcd:tidy (lane distribution + calibration read),
but both line shapes were model-formatted at write time — a format is only a
contract if a program owns both ends. The script validates every field
(lane/hard/risk enums, the audit-result vocabulary incl. the Standard lane's
'PASS (test-presence)'), creates the log with its header when missing, and
echoes the appended line. Fixture test in the same commit per convention.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0123cKLoJu9PxoCQfBCFU1yN
…nition

Deep-level irreversibility (schema/migration/public API) is already a hard
trigger, which routes to Deep before the 4+-signals branch is evaluated — so
in the only branch where the risk signal is consulted, that half could never
fire. The operative risk signal is multi-session cold-pickup alone; the rule
now says so in all three places it is stated (triage SKILL, rules/lcd.md,
README), with the why in parentheses so a careful reader doesn't re-derive
the contradiction.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0123cKLoJu9PxoCQfBCFU1yN
…ard audit its own path

Three review findings in one structural move:

- The closeout contract (log line, opt-in evaluator, living-spec fold) lived
  inline in the triage SKILL — ~40 lines paid at triage time for actions that
  fire at a different lifecycle point — AND was restated verbatim in
  commands/audit.md (two sources, guaranteed drift). It now lives once in
  skills/triage/references/closeout.md (the fanout.md pattern), loaded at the
  finish line; triage and audit both point there. Triage drops from 237 to
  207 lines, under the instruction-file adherence budget.
- The Standard-lane path through /lcd:audit threaded a Deep-numbered list via
  exceptions ('continue at step 4's closeout' into a step that opens with
  Deep-only actions). Standard now has its own section — and its previously
  unspecified failure branch: BLOCKED names each uncovered AC × surface and
  writes no closeout line.
- 'PASS (test-presence)' joins the documented audit-result vocabulary (it was
  emitted but absent from the contract's enum); both line shapes are now
  written via lcd-triage-log.sh, which validates them.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0123cKLoJu9PxoCQfBCFU1yN
- plan template: add the missing commits.md row to the Constitution table
  (the command and rules/lcd.md both name it as part of the constitution;
  the template is what gets filled).
- triage Quick lane: 'append one line to DECISIONS.md' → record a D-NNN
  block (the template's format; free-form lines break the D-NNN referencing
  SPEC provenance depends on).
- STUCK template header: name all three halt reasons (iteration-cap was in
  the field enum but not the prose).
- rules/lcd.md + docs/why-lcd.md: drop the hardcoded '~5 min' prompt-cache
  TTL — TTLs vary by plan and load; the cache-miss argument stands without
  the dated number.
- ac-convention: state the none/EVAL combination rule flatly ('none combines
  with nothing; EVAL is mixable with any real surface') instead of the
  self-contradicting 'opposite of none but like none' phrasing.
- doctor/tidy: drop 'argument-hint: (no args)' — the hint rendered a literal
  placeholder in the UI; omitting the field is the convention.
- lcd-evaluator/lcd-reviewer: one sample finding line each — an example
  anchors the digest format better than the field description alone.
- lcd-recon: note that the Context7 allowlist assumes the server is
  registered as 'context7'; other registrations put its tools outside the
  allowlist, and the agent should fall through to web search.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0123cKLoJu9PxoCQfBCFU1yN
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0123cKLoJu9PxoCQfBCFU1yN
@stid
stid merged commit 30db105 into main Aug 22, 2026
3 checks passed
@stid
stid deleted the feat/review-fixes branch August 22, 2026 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant