Repository navigation
refactor(markdown-format,typos-format): trim model-coaching prose from injected hook reports - #2055
Conversation
…m injected hook reports Issue #2021's hook-surface classification marked both formatter plugins hybrids whose only ablatable surface is injected conduct-coaching prose (remediation line 3). This trims exactly that surface: markdown-format 0.10.0 -> 0.10.1: - delta-gate repeat line drops its configure-it-away lecture; the unchanged-from-previous-run fact stays - truncation hint shrinks to a terse (cap: markdown_format_max_findings) pointer typos-format 0.5.1 -> 0.5.2: - per-finding "if intentional, add it to extend-words..." tail (repeated up to 10x per report) replaced by facts-only finding lines plus one trailing pointer for the whole list - applied-path disclosure keeps its facts (dictionary source, no-memory re-correction, allow-list route) at roughly half the length - report-only header drops the option-explainer parenthetical Kept intact per the classification: the deterministic transforms, the finding relays, both-channel mutation disclosure, and markdown-format's fail-closed code-execution trust gate on .cjs/.mjs configs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Claude finished @kyle-sexton's task in 1m 0s —— View job Security review: no issues found
Scope reviewed (via Findings: none. This PR is a pure prose-trim of hardcoded string literals injected into hook reports (
No injection surfaces, authorization gaps, secret handling, or supply-chain risk in this diff. Branch: |
|
Claude finished @kyle-sexton's task in 2m 50s —— View job Review complete
Overall: clean, well-scoped mechanical trim. The two hook diffs do exactly what the description claims — remove instructional/coaching clauses while keeping every fact (counts, file names, mode statements, allow-list mechanism names). Nothing in this diff touches the deterministic transforms, the finding relays, the both-channel mutation disclosure, or markdown-format's Checks I ran myself:
Two minor style nits (left as inline comments, neither blocking):
No correctness, architecture, error-handling, or test-coverage issues found. Security is out of scope for this lane per REVIEW.md. |
|
Claude has reviewed this PR 2 times. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
…g-pointer phrasing Review follow-ups on #2055: the disallowed branch drops its colon separator to match the "should be" branch's parenthetical-then-period form, and the SYSMSG remediation pointer says "the repo's typos config" like the other two pointers instead of "your typos config". Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Claude finished @kyle-sexton's task in 1m 9s —— View job Security review: no issues found
Scope reviewed (full cumulative diff, both commits, Findings: none. Every hunk in this diff replaces a hardcoded string literal that is concatenated into
No control-flow, conditional, or gating logic changed anywhere in either script — every edit sits inside an existing branch ( No injection surfaces (command/path/template), authorization gaps, secret/token handling, or supply-chain risk in this diff. This is a mechanical prose trim with no data-flow or trust-boundary changes. Branch: |
|
Claude finished @kyle-sexton's task in 2m 1s —— View job Review complete
Overall: no blocking issues. This is a clean, mechanical prose trim that does exactly what it claims. Both hook diffs remove instruction/coaching clauses while keeping every measured fact (counts, mode statements, config-pointer mechanism names); no control-flow, branch condition, or interpolation changed. Notable: the second commit already resolves the prior review's two nits. Commit Verification I ran myself (not author-claimed):
Scope discipline: matches CLAUDE.md's fresh-docs mandate correctly — this diff touches only report-string prose inside existing hook logic, not a manifest schema/hook-contract surface, so the fresh-docs WebFetch requirement doesn't apply here; the PR body's manifest-versioning citation was for the No architecture, error-handling, test-coverage, or maintainability issues found in the current diff state (both prior inline nits are resolved). Security is out of scope for this lane per the repo's lane split. |
|
Both findings fixed in a52900e: the residual-line branches now share one punctuation form ("is disallowed, no known correction.") and all three remediation pointers say "the repo's typos config". Scoped verification: string-only edits inside typos-format.sh; the typos-format suite passed and CI is green on the commit. |
No linked issue
Summary
Executes issue #2021's remediation line (3): trims the model-conduct coaching prose from the two formatter plugins that classification pass marked as hybrids — markdown-format and typos-format. Facts the tools measured (findings, counts, applied rewrites, file names) stay; sentences that instruct the model how to behave are removed or shortened. The classification's keep-list is untouched: the deterministic transforms, the lint/typo finding relays, both-channel mutation disclosure, and markdown-format's fail-closed code-execution trust gate on
.cjs/.mjsconfigs.Fix
markdown-format 0.10.0 → 0.10.1 (
hooks/markdown-format.sh):typos-format 0.5.1 → 0.5.2 (
hooks/typos-format.sh):Both
plugin.jsonversions bumped patch with matching CHANGELOG entries. Patch is correct per the current official manifest reference:versionis "Optional. Semantic version. Setting this pins the plugin to that version string, so users only receive updates when you bump it", and "If you use explicit versions, follow semantic versioning (MAJOR.MINOR.PATCH) … Document changes in a CHANGELOG.md" (https://code.claude.com/docs/en/plugins-reference, fetched 2026-08-08).Verification
bash plugins/typos-format/hooks/typos-format.test.sh— PASS=79 FAIL=2; the two failures are wall-clock performance assertions (stub/scale/stub/scale-residual, 15s handler-budget checks) that fail identically on an unmodified checkout of main on the same machine (65s/60s baseline vs 59s/75s here) — pre-existing environment-speed failures, not introduced by this change. Every content assertion passes, including the ones pinning kept strings: extend-words remediation present on both the applied and residual paths,report-only+NOT modifiedmode statement, applied-rewrite disclosure on both channels.bash plugins/markdown-format/hooks/markdown-format.test.sh— locally PASS=129 FAIL=1; the single failure istelemetry/slow-sink, a wall-clock fd1-leak detector whose measured delta varied 5269ms → 12118ms across two local runs (threshold-based timing assertion). The measured path is byte-identical to main —hooks/hook-utils.shand the test file are unchanged, and the diff touches only two CTX string literals in the report composer. All string-pinning assertions pass, includingUnchanged from the previous runand theand N more findingremainder count the trimmed strings still carry.plugin-gatelane executes everyplugins/**/*.test.sh(both suites, timing assertions included) on ubuntu-24.04 and passes on this PR — the local failures above are Windows machine-speed artifacts.shellcheck -xandshfmt -dclean on both edited hooks.node scripts/generate-catalog.mjs/node scripts/generate-cheatsheet.mjs: both already in sync, no diff, nothing to commit.Related
🤖 Generated with Claude Code