⨠feat: P-07 work rules at pre-push and on the pull request
Roadmap P-07, work rules check.
An agent pull request names exactly one slice, as a line Slice: #N, and that slice may be built:
- it is a Slice issue under a Work item the owner labeled
approved(the latestapprovedlabel event must be the owner's); - a slice added to the work item after the approval carries the owner's
Decision:comment naming it (on the work item), or aDecision:comment on the slice; - each State sub-issue closed as not planned after the approval carries the owner's
Decision:comment; - no other open pull request names the slice.
Where it runs:
- On the pull request: the shared workflow's new "Work rules" job (
process-rules pr-work-rules). It reads the settings from the base commit, so a pull request cannot change them. The owner's pull requests pass. - Before a push:
onboardnow writes a pre-push git hook runningprocess-rules pre-push(or names the line to add to the client's own hook). In agent sessions, the commits pushed must name one slice between them, as aSlice: #Ntrailer, and it must pass the same rules.
The client workflow gains issues: read.
Sandbox proof after merge: planted cases refused. These are an unapproved start, a slice added after approval, a dropped state and a second pull request.
pnpm check passes. The roadmap marks P-07 shipped.
š¤ Generated with Claude Code
Summary by cubic
Implements the P-07 work rules check: an agent pull request must name exactly one slice the owner has approved, and the same rules run before an agent session pushes. P-07 stays building until its sandbox proof. CI stops caching pnpm and limits setup-node to 3 minutes after cache restores repeatedly hung the required job.
Work rules
- An agent pull request names exactly one slice as a
Slice: #Nline, and it must be a Slice under a Work item the owner labeledapproved; no other open pull request may name it. - A slice added after approval, or an approved State closed as not planned, needs the owner's
Decision:comment. - A push is checked whole: its commits across every ref name one slice, on one branch.
Where it runs
- The shared workflow's
Work rulesjob checks pull requests ā including re-running when the description is edited ā reading settings from the base branch so a pull request cannot change them. The client workflow now needsissues: read. onboardwrites a pre-push hook runningprocess-rules pre-push, or names the line to add to a client's own hook or a global hooks folder. Agent pushes must carry aSlice: #Ntrailer; the hook refuses them when the CLI is missing or the session has no token.