cat-mode: a hook or classifier block is a stop, not a puzzle - #471
Merged
EdbertChan merged 6 commits intoSep 12, 2026
Merged
Conversation
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_bd3dfda5-6a35-4ea3-ad3b-98590a0e9c6b) |
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
…cat-mode names a hook or classifier block as a stop, with the concrete ways of getting past a block spelled out as forbidden. Review lane: docs Safety invariant: Prose only. No hook, script, installer, or settings change, and no edit outside corpus/skills/cat-mode. Pending user confirmation in this session. Effectiveness measurement: The coverage and provenance gates pass on the diff and the bullet's bold lead appears once in SKILL.md. Slice rationale: One rule in one skill, so the diff carries one claim. Architectural effect: None; the mode skill gains one standing rule. Goal: Add the bullet to SKILL.md under Named constraints and its full text to references/named-constraints.md, mirroring the neighbours' structure. Motivation: The same complaint class recurred in three sessions and the existing lines cover only reading a gate and classifier denials. Alternative considerations: Relying on the tag-needs-a-tool-call hook alone was rejected because rewording a subagent prompt and reissuing a denied command are not tag shapes. Restating the classifier-denial rule from CLAUDE.learned.md was rejected; the new text references it in one clause. Implementation details: See prompt. Non-goals: No hook or code change. No change to CLAUDE.core.md or CLAUDE.learned.md. No dates, session ids, or incident narrative in the rule text. Layer: docs Feature state: active Files: - corpus/skills/cat-mode/SKILL.md - corpus/skills/cat-mode/references/named-constraints.md Change types: - corpus/skills/cat-mode/SKILL.md: modify - corpus/skills/cat-mode/references/named-constraints.md: modify Acceptance criteria: - `git grep -c "A hook or classifier block is a stop, not a puzzle" -- corpus/skills/cat-mode/SKILL.md` prints 1. - `python3 scripts/check_skill_test_coverage.py --base origin/main --head HEAD` exits 0. - `python3 scripts/check_no_dated_provenance.py` exits 0. Exit code: 0 Invoker-Finalize-Id: 6f060ec2-4eb0-4b6e-af44-cf78932754c7
…aim: the rule is present exactly once and the prose gates pass on the finished branch. Review lane: proof Safety invariant: Verification is read-only and does not alter any file. Effectiveness measurement: The grep count and the two gate runs are the direct measurement. Slice rationale: One focused proof per claim before review. Architectural effect: None; verification only. Goal: Prove the bullet landed once and the coverage and provenance gates are green. Layer exception: allowed. Proof runs after the docs task so it checks the finished branch; it reads files only and changes nothing. Motivation: A rule that fails a gate never reaches the installed skill. Alternative considerations: Reading the diff by eye was rejected as non-deterministic. Implementation details: Run the grep and the two gate scripts. Non-goals: No mutations. Layer: app_regression Feature state: active Acceptance criteria: - Exits 0 only when the grep count is 1 and both gates pass. Exit code: 1 Invoker-Finalize-Id: d7581d63-c315-4b14-8995-518d9748c0f7
The prior docs commit added the "hook or classifier block is a stop" bullet to SKILL.md and named-constraints.md without a corresponding test change, failing check_skill_test_coverage.py. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…aim: the rule is present exactly once and the prose gates pass on the finished branch. Review lane: proof Safety invariant: Verification is read-only and does not alter any file. Effectiveness measurement: The grep count and the two gate runs are the direct measurement. Slice rationale: One focused proof per claim before review. Architectural effect: None; verification only. Goal: Prove the bullet landed once and the coverage and provenance gates are green. Layer exception: allowed. Proof runs after the docs task so it checks the finished branch; it reads files only and changes nothing. Motivation: A rule that fails a gate never reaches the installed skill. Alternative considerations: Reading the diff by eye was rejected as non-deterministic. Implementation details: Run the grep and the two gate scripts. Non-goals: No mutations. Layer: app_regression Feature state: active Acceptance criteria: - Exits 0 only when the grep count is 1 and both gates pass. Exit code: 0 Invoker-Finalize-Id: publish-approved-fix
…o ephemeral inter-task handoff files remain in the worktree before the merge gate. Review lane: cleanup Safety invariant: The scrub script only checks for known handoff artifact names and never touches source, tests, or other repository files. Effectiveness measurement: The script exits non-zero if any handoff artifact remains. Slice rationale: Required terminal scrub for every implementation workflow. Architectural effect: None; hygiene only. Goal: Leave the branch free of handoff artifacts. Motivation: Handoff files must not reach the PR. Alternative considerations: Manual cleanup was rejected as non-deterministic. Implementation details: Run scripts/scrub-handoff-artifacts.sh. Non-goals: No product edits. Layer: app_regression Feature state: active Acceptance criteria: - `bash scripts/scrub-handoff-artifacts.sh` exits 0. Exit code: 0 Invoker-Finalize-Id: 608b0668-5db8-4b5b-898b-415a17f9d6c7
EdbertChan
force-pushed
the
plan/cat-mode-a-hook-or-classifier-block-is-a-stop-not-a-puzzle
branch
from
September 12, 2026 06:35
cd40b96 to
3c7c3f5
Compare
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_ba80571a-4649-49a4-a8b3-a0537b9ef8da) |
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.
Summary
Add a named cat-mode constraint for hook and classifier blocks.
The rule tells agents to follow the block, report it, and stop instead of bypassing it.
The reference text names the forbidden shapes, and a focused contract test keeps the short and full forms aligned.
Review Claim
Approve the cat-mode rule that treats hook or classifier blocks as stopping conditions.
Review Lane
docs
Review Unit
corpus-lesson
Safety Invariant
Only cat-mode prose and its focused root-level contract test change. No hook, script, installer, settings, or other skill behavior changes.
Slice Rationale
One named constraint and its contract test form a single reviewable docs slice.
Non-goals
CLAUDE.core.mdorCLAUDE.learned.md.Test Plan
Test Plan
python3 engine/skills/make-pr/scripts/preflight.py --base origin/maintest "$(git grep -c 'A hook or classifier block is a stop, not a puzzle' -- corpus/skills/cat-mode/SKILL.md | cut -d: -f2)" = "1" && python3 scripts/check_skill_test_coverage.py --base origin/main --head HEAD && python3 scripts/check_no_dated_provenance.pybash scripts/scrub-handoff-artifacts.shRevert Plan
Revert Plan
git revert <sha>Note
Low Risk
Documentation and regression tests only; no hooks, classifiers, installers, or runtime behavior change.
Overview
Adds a named cat-mode constraint so agents treat hook and classifier blocks as hard stops: comply with what the block asks, report it, and stop—instead of trying to route around it.
SKILL.mdgets the short rule (“A hook or classifier block is a stop, not a puzzle”), forbidding rewording prompts, switching tools, retagging claims, or weakening hooks to get past a block; disagreement is escalated to the user after reading the hook source.named-constraints.mdspells out the forbidden bypass shapes (e.g. re-prompting afteragent-routing-guard, skipping a gate’s check for an unverified tag, reissuing a denied command via another tool, or edits that make a hook complain less), and points at the existing classifier-denial rule incorpus/CLAUDE.learned.md.A contract test in
tests/test_cat_mode.pypins both the SKILL bullet and the reference detail, matching the pattern used for other split rules like the unhedged-claim text.Reviewed by Cursor Bugbot for commit 3c7c3f5. Bugbot is set up for automated code reviews on this repo. Configure here.