Skip to content

Honor /revise on an implementation pull request#46

Merged
norrietaylor merged 2 commits into
mainfrom
feat/execute-revise
May 19, 2026
Merged

Honor /revise on an implementation pull request#46
norrietaylor merged 2 commits into
mainfrom
feat/execute-revise

Conversation

@norrietaylor
Copy link
Copy Markdown
Owner

Root cause

The command table (shared/sdd-interaction.md) declares /revise <note> for spec PRs, architecture PRs, and implementation PRs — "re-run the owning agent." sdd-spec and sdd-triage honor it. sdd-execute did not: its wrapper's issue_comment handler matched only /execute, and /execute on a PR was explicitly ignored. /revise on an implementation PR was silently dropped. The contract over-promised.

Fix

sdd-execute already addresses inline pull_request_review_comment events (trigger 4) — line-anchored feedback. This adds /revise as a second path — a holistic instruction — so feedback on implementation PRs is uniform with spec and architecture PRs. Both paths push follow-up commits to the same branch (step 7).

  • sdd-execute (3 tier sources): trigger 6 — a write-access /revise <note> on an implementation PR this agent opened. Step 7 handles it alongside review comments; ownership confirmed by the sdd/<task-id>-<slug> head branch.
  • Wrappers (3 tiers): the issue_comment handler routes /revise on a PR through the same repo-write-access gate as /execute, as trigger: 'revise', item_type: 'pull_request'.
  • Tier gate: an issue_comment event carries no payload.pull_request, so the gate fetches the PR via pulls.get to read its Closes #<task> body reference and resolve the model tier. A /revise on a non-implementation PR (no Closes) resolves to no task and the variant skips it.
  • Recompiled the 3 sdd-execute locks.

Feedback modes after this change

Artifact Feedback mode
spec PR /revise <note>sdd-spec
architecture PR /revise <note>sdd-triage
implementation PR /revise <note> or an inline review comment → sdd-execute

Acceptance

  • /revise <note> on an sdd/* implementation PR triggers the matching sdd-execute tier; it pushes follow-up commits to the same branch.
  • /revise on a spec/* or arch/* PR does not run sdd-execute (tier gate finds no Closes #<task>).
  • gh aw compile reports 0 errors; no lock drift.

References

shared/sdd-interaction.md command table. Pairs with the diagram update on PR #44.

🤖 Generated with Claude Code

The command table (shared/sdd-interaction.md) lists /revise for spec
PRs, architecture PRs, and implementation PRs. sdd-spec and sdd-triage
handle it; sdd-execute did not — its wrapper matched only /execute, and
/execute on a PR was explicitly ignored. The contract over-promised.

sdd-execute already addresses inline pull_request_review_comment events
(trigger 4). This adds /revise as a second feedback path: a holistic
note, where review comments are line-anchored. Both push follow-up
commits to the same branch (step 7).

- sdd-execute (3 tier sources): trigger 6 — /revise on an implementation
  PR this agent opened; step 7 handles it alongside review comments.
- Wrappers (3 tiers): the issue_comment handler routes /revise on a PR
  with the same write-access gate as /execute, as trigger 'revise'.
- Tier gate: an issue_comment event has no payload.pull_request, so the
  gate fetches the PR to read its `Closes #<task>` body reference.
- Recompiled the 3 sdd-execute locks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 64026fd6-6a88-4583-b50e-ac99674fb3fd

📥 Commits

Reviewing files that changed from the base of the PR and between a3cfd2c and 4543dc0.

📒 Files selected for processing (9)
  • .github/workflows/sdd-execute-haiku.lock.yml
  • .github/workflows/sdd-execute-haiku.md
  • .github/workflows/sdd-execute-opus.lock.yml
  • .github/workflows/sdd-execute-opus.md
  • .github/workflows/sdd-execute-sonnet.lock.yml
  • .github/workflows/sdd-execute-sonnet.md
  • wrappers/sdd-execute-haiku.yml
  • wrappers/sdd-execute-opus.yml
  • wrappers/sdd-execute-sonnet.yml

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Introduced /revise <note> command support for pull requests, enabling revision requests with custom instructions where follow-up commits are pushed to the same branch without creating additional pull requests
    • Enhanced workflow trigger handling to recognize and route both /execute and /revise commands with appropriate validation logic and branch ownership checks

Walkthrough

This PR extends the sdd-execute wrapper and agent tiers (haiku, opus, sonnet) to recognize and route /revise <note> commands on implementation pull requests, complementing the existing /execute command routing on task issues. Wrapper routers now distinguish command types, emit appropriate trigger contexts, and fetch PR bodies when missing from event payloads. Each tier's compiled prompts and documentation reflect the new situation.

Changes

Wrapper Routing and Agent Tier Updates

Layer / File(s) Summary
Wrapper /revise routing and aw_context setup
wrappers/sdd-execute-haiku.yml, wrappers/sdd-execute-opus.yml, wrappers/sdd-execute-sonnet.yml
Issue-comment routing now distinguishes /execute (on issues) from /revise (on pull requests), ignores /execute on PRs, and emits trigger: 'revise' with item_type: 'pull_request' or trigger: 'command' with item_type: 'issue' based on command and target for write-access actors.
Wrapper PR body fetching fallback
wrappers/sdd-execute-*.yml
Tier-gating logic conditionally fetches the PR body via github.rest.pulls.get when payload.pull_request.body is missing, supporting /revise flows that don't embed PR metadata before extracting task-issue references.
Haiku agent tier: /revise support
.github/workflows/sdd-execute-haiku.lock.yml, .github/workflows/sdd-execute-haiku.md
Compiled prompt and documentation expanded from five to six wrapper-invoked situations; added situation #6 for /revise <note> on PRs with sdd/<task-id>-<slug> branch ownership checks and noop fallback; updated step-7 to handle /revise triggers without anchored diff using comment text as instruction.
Opus agent tier: /revise support
.github/workflows/sdd-execute-opus.lock.yml, .github/workflows/sdd-execute-opus.md
Expanded situation handling from five to six; documented /revise trigger (#6) with ownership verification and behavior clarification (no anchored diff, follow-up commits to same branch); refreshed compiled heredoc identifiers for prompt sections and MCP gateway config.
Sonnet agent tier: /revise support
.github/workflows/sdd-execute-sonnet.lock.yml, .github/workflows/sdd-execute-sonnet.md
Added sixth situation for /revise <note> comments on agent-owned PRs; extended step-7 procedure to route revise events with no anchored diff, using comment text as instruction; updated generated heredoc identifiers for safe-output and MCP gateway configs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

A rabbit hops through workflows swift, ✨
/revise now rings through PR gifts,
Three tiers aligned, from small to grand,
Routing commands across the land—
No diff is anchored, text takes flight! 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Honor /revise on an implementation pull request' directly and clearly summarizes the main change: adding support for the /revise command on implementation PRs in the sdd-execute workflow.
Description check ✅ Passed The description comprehensively explains the root cause, fix, implementation details, resulting feedback modes, acceptance criteria, and references—all closely related to the changeset's purpose of honoring /revise on implementation pull requests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/execute-revise

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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