Skip to content

cat-mode: a hook or classifier block is a stop, not a puzzle - #471

Merged
EdbertChan merged 6 commits into
mainfrom
plan/cat-mode-a-hook-or-classifier-block-is-a-stop-not-a-puzzle
Sep 12, 2026
Merged

cat-mode: a hook or classifier block is a stop, not a puzzle#471
EdbertChan merged 6 commits into
mainfrom
plan/cat-mode-a-hook-or-classifier-block-is-a-stop-not-a-puzzle

Conversation

@EdbertChan

@EdbertChan EdbertChan commented Sep 12, 2026

Copy link
Copy Markdown
Owner

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

  • Does not modify hooks, classifiers, scripts, installers, or settings.
  • Does not change CLAUDE.core.md or CLAUDE.learned.md.
  • Does not alter routing, tool selection, or permission behavior.

Test Plan

Test Plan
  • python3 engine/skills/make-pr/scripts/preflight.py --base origin/main
  • test "$(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.py
  • bash scripts/scrub-handoff-artifacts.sh

Revert Plan

Revert Plan
  • Safe to revert? Yes
  • Revert command: git revert <sha>
  • Post-revert steps: None
  • Data migration? No

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.md gets 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.md spells out the forbidden bypass shapes (e.g. re-prompting after agent-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 in corpus/CLAUDE.learned.md.

A contract test in tests/test_cat_mode.py pins 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.

@cursor

cursor Bot commented Sep 12, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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)

@mergify

mergify Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

EdbertChan and others added 6 commits September 11, 2026 23:34
…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
EdbertChan force-pushed the plan/cat-mode-a-hook-or-classifier-block-is-a-stop-not-a-puzzle branch from cd40b96 to 3c7c3f5 Compare September 12, 2026 06:35
@cursor

cursor Bot commented Sep 12, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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)

@EdbertChan
EdbertChan merged commit 72d4583 into main Sep 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant