β¨ feat: P-20 the owner approves with a reaction
Slice: #67
The owner can now approve a slice with one tap. Before this, the only way to approve a slice added after its work item's approval, or a State dropped after it, was to type a Decision: comment.
process-rules propose <issue>is a new command for agent sessions. Given a slice, it posts oneProposal:comment on it as the agent for each decision the slice owes: its addition after approval, and each State dropped after approval. Given a State, it posts that state's proposal alone. Each proposal mentions the owner, so it reaches their GitHub notifications. The command then labels the sliceneeds-owner, which puts it in the Needs you view. Run again, it posts nothing twice. Once everything is approved, it takes the label off. It refuses to post unless the session's token is the agent's.- Work rules count the owner's π on the agent's proposal the same way they count a
Decision:comment. A π counts only when all of these hold:- it comes from the owner;
- it is on the agent's comment starting
Proposal:, and that comment's first#Nis the slice or state being approved; - it was made after the proposal's last edit;
- for an added slice, it was made after the slice's latest addition.
- GraphQL reads each
Reaction'suserandcreatedAt, and each comment'slastEditedAt. Reactions are read only for proposals that could still settle something, at most 100 comment ids per query. - The refusal message tells the owner to react π on the agent's proposal or to comment
Decision:. When no proposal exists yet, it also gives the agent theproposecommand to run. - A typed
Decision:comment still works, unchanged. - Version: a patch release, 0.5.2, after 0.5.1 (#70), bumped the way #64 did (
package.jsonand the README's install line).
docs/decisions.md records why each proposal goes on the slice. A dropped State is closed, and the Needs you view shows open issues only. It also records the rule that a proposal approves the first #N it names, the edit and time rules, and that a reaction triggers no workflow. So a π made after the PR's checks ran shows up only when Work rules runs again, or at pre-push.
Proof against the sandbox (athya-hq/process-rules-sandbox, this build, as AthyaBot):
- Before:
sliceProblemson #4, which was added after #1's approval, gave#4 was added to work item #1 after its approval; AlokBansal8 reacts π on AthyaBot's proposal on #4, or adds a "Decision:" comment naming #4; AthyaBot proposes it with: process-rules propose 4. On #2, the State #7 that was closed as not planned gave the matching message for the state. propose 4posted the proposal on #4 and labeled #4needs-owner.propose '#7'posted the state's proposal on #2 and labeled #2.- Running
propose 4again printed#4: proposed on #4, waiting on AlokBansal8's πand posted nothing.propose 9(an open State) printed#9 needs no decision from AlokBansal8. - AthyaBot's own π on the #4 proposal did not count: the refusal stayed, now without the
proposehint. - Still to do: the owner's π on those two proposals, to show that it passes. Unit tests cover it (
src/work.test.ts, "the owner's π on the agent's proposal"). - The sandbox's slices are not items on its Project, so the Needs you view there cannot show them. In a client using
board, slices are on the Project.
pnpm check passes (546 tests, after rebasing on #70). The secret scans are clean.
π€ Generated with Claude Code