Best-practices review fixes: risk-signal dead logic, Standard audit path, closeout extraction, triage-log writer (0.16.0) - #11
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
/lcd:audit. It now lives once inskills/triage/references/closeout.md(thefanout.mdpattern); both call-sites point there. Triage drops 237 → 207 lines, under the ~200-line instruction-file adherence budget./lcd:auditno 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 uncoveredAC-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:tidymachine-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
commits.mdrow the command already required.D-NNNblocks (the DECISIONS template's format), not free-form lines.rules/lcd.mdanddocs/why-lcd.md— TTLs vary by plan and load; the cache-miss argument stands without the dated number.none/EVALcombination rule stated flatly ("nonecombines with nothing;EVALis mixable with any real surface") instead of the self-contradicting "opposite of none but like none".doctor/tidydrop the literalargument-hint: "(no args)"placeholder.lcd-evaluator/lcd-reviewerdigest contracts.lcd-reconnotes its Context7 allowlist assumes the server is registered ascontext7(other registrations put the tools outside the allowlist; the agent falls through to web search).Deliberately left alone
MultiEditstays in the hooks matcher — back-compat with older Claude Code versions; it simply never matches on current ones.user-invocablefrontmatter untouched — works today; default-value semantics not worth the risk in this pass.Verification
tests/run.sh: 11/11 (includes the newtest-triage-log.sh).claude plugin validate .: passed.evals/run-eval.shwould 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