Skip to content

feat(pst): add Rule 25 context hygiene and output compression#73

Merged
pstaylor-patrick merged 1 commit into
mainfrom
feat/rule-24-context-hygiene
Jun 22, 2026
Merged

feat(pst): add Rule 25 context hygiene and output compression#73
pstaylor-patrick merged 1 commit into
mainfrom
feat/rule-24-context-hygiene

Conversation

@pstaylor-patrick

Copy link
Copy Markdown
Owner

Summary

  • Adds Rule 25 to SKILL.md: context hygiene and output compression, covering pre-execution bash output limiting, content-type routing, and a ~50-line skip threshold. Numbered 25 (Rule 24 is already Best-of-N tournament).
  • Amends Stage 0.5 in Rule 19 to apply Rule 25 heuristics when assembling the Opus planner context bundle.
  • Adds a Rule 25 section to REFERENCE.md with: pre-execution limiting examples (table), content-type routing table, CCR pattern grounded in the session scratchpad, accurate Anthropic prefix-cache note, and verbosity-at-tail drafting heuristic.

Inspired by headroom. Adversarial-reviewed; five findings addressed (removed inapplicable recency clause, replaced 250-token threshold with ~50-lines, corrected prefix-cache claim, grounded CCR in Read tool + scratchpad, reframed verbosity-at-tail as a heuristic).

Test plan

  • /pst loads without errors; Rule 25 appears in doctrine
  • Stage 0.5 description in Rule 19 references Rule 25
  • REFERENCE.md Rule 25 section renders correctly with tables
  • No em dashes in added content (scripts/pst-emdash.rb check)

🤖 Generated with Claude Code

Inspired by headroom (headroomlabs-ai/headroom). Adds bash output
limiting, content-type routing, CCR pattern (scratchpad-backed),
accurate prefix-cache guidance, and verbosity-at-tail heuristic.
Numbered 25 (Rule 24 = Best-of-N tournament). Stage 0.5 pre-flight
updated to apply Rule 25 heuristics when assembling context bundles.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@pstaylor-patrick

Copy link
Copy Markdown
Owner Author

pst:ready attestation -- tournament winner: Strategy A (15/15)

Auto-validated test plan items:

  • Stage 0.5 description in Rule 19 references Rule 25 (grep confirmed)
  • REFERENCE.md Rule 25 section renders correctly with tables (section + table header confirmed)
  • No em dashes in added content (0 matches for U+2014)
  • /pst loads without errors; Rule 25 appears in doctrine (manual)

CI: lint pass. Open threads: 0. Ready to merge.

@pstaylor-patrick pstaylor-patrick merged commit ce895f0 into main Jun 22, 2026
1 check passed
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