specs/028-bundled-screen-rules/spec.md
Specification: Bundled screen rules for Pi, OpenCode and Cursor
Created: 2026-10-09. Status: clarified.
Spec 027 added [[screen]] rules but shipped none, so out of the box a pane
running Pi (which has no hooks) still never shows working, blocked or
done. This spec ships herdr's screen rules for the agents whose rules fit the
engine with two small additions, following docs/14 directive 3.
Acceptance
- A
[[screen]]rule may addall(every regex must match) andnot(no regex may match) toregex(any regex matches). It needsregexorall; an invalid regex in any list rejects the manifest. - signaltty ships rules for
pi,opencodeandcursor, ported from herdr (Apache-2.0, attributed in each file), each ending with a lowest-priorityidlerule: like herdr, a known agent that shows no working or blocked sign is idle, so a finished turn becomesdone+unread. - If any user manifest of a kind declares
[[screen]]rules, those replace the bundled rules of that kind; otherwise the bundled rules apply. Hook gating and transitions are unchanged from spec 027. - Fixture tests drive each bundled rule set through a representative working,
blocked (OpenCode, Cursor) and idle screen, plus near-miss screens.
A real-PTY test shows a
pipane going working → done with no manifests.
Scope and clarification
Claude and Codex rules need herdr's prompt-aware regions (prompt_box_body,
after_last_prompt_marker, …) and are deferred; those agents usually report
through hooks anyway. Fixtures are written from the rules' text, not captured
from the real CLIs, so they prove the port, not the CLIs' current output.
agent.explain stays deferred. No unresolved requirements remain.