Skip to content

feat(claude): wake edited-path admits PRs — PR panels live, claude-task PR labels, placement contract, hooks parity ask #102

Description

@gingur-bot

Wake currently excludes PRs entirely (!github.event.issue.pull_request at the top of the gate in .github/workflows/claude.wake.yml). Armed action panels on PRs must wake turns; plain PR replies stay inert (assignment remains the PR reply path).

Context: this task comes from ask #98. Implement after #96 merges. Coordinate with #97: whichever lands second rebases; do not block on it.

Operator guidance (applies equally to the hooks parity ask below): if folding the PR carve-out into the single wake gate gets complex or hard to read, splitting into two workflows/gates is acceptable — issue.wake (created-path, issues only) vs pr.wake (edited-path panels on PRs). Simplicity of the trust gate wins over single-file purity.

Changes:

  1. .github/workflows/claude.wake.yml
    • Move !github.event.issue.pull_request from the top-level clause into the created branch only. The edited branch is otherwise unchanged (bot-authored + anchored startsWith marker + - [x] + Submit clause). The label gate (claude-ask/claude-task) stays top-level and uniform — PR labels surface in github.event.issue.labels on issue_comment events. Trust model unchanged: only write-access users can edit another user's comment.
    • Update the gate comment block to describe the PR carve-out.
    • Verify the Wake step's gh issue edit --remove-assignee/--add-assignee accepts PR numbers (claude.handoff already runs it against PR numbers in production, so expected to work); if it refuses, switch to REST (gh api -X DELETE|POST repos/$REPO/issues/$ISSUE/assignees -f 'assignees[]=$BOT') — PRs are issues to that API. Dispatch needs no new logic: assignment fires the review workflow.
  2. actions/claude.implement/prompt.md — Draft PR contract: the PR is labeled claude-task at creation (e.g. gh pr create --label claude-task). This is what lets wake's uniform label gate admit panel ticks on bot PRs (making e.g. fix(claude): turn-failure hardening — host claude install + Retry panel #96's Retry panel live on failed review turns). No label carve-out in wake.
  3. Placement contract in both actions/claude.review/prompt.md and actions/claude.implement/prompt.md: armed panels MUST be conversation-tab comments (issue_comment family). Checkboxes embedded in a review body (pull_request_review) or inline review comments (pull_request_review_comment) are wake-invisible — never put actionable boxes there.
  4. .github/workflows/claude.review.yml — replace the stale comment "No panel: action panels live on ask/task issues only." (panels now live on PRs; review turns still pass no default panel: — the reviewer posts its own when needed).
  5. File the hooks parity ask on gingur/hooks (issue, label claude-ask if present there; do NOT implement hooks): hooks' gates/wake.ts (hooks#19) is a clause-by-clause port of this gate and must mirror the change. The ask must name the exact clauses: !issue.pull_request moves from the top-level conjunction into the created branch; the edited branch (bot-author + anchored marker + - [x] + Submit clause) now applies to PRs; label gate and sender!=bot clause unchanged. Include the operator guidance above (two-gate split acceptable if simpler).

Acceptance criteria:

  • Gate truth table verified (event-payload eval or act): PR + created → false; PR + edited bot-panel tick (+ ticked Submit when the body contains **Submit**) → true; issue paths unchanged; bot-sender events still excluded.
  • Wake's assign step works against a PR number (evidence cited in the PR).
  • Implement prompt's Draft PR contract requires the claude-task label; both prompts carry the placement constraint verbatim in intent.
  • The hooks ask exists, is linked in the PR body, and names the exact gate clauses that changed.

Metadata

Metadata

Assignees

Labels

claude-taskagent-implementable task

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions