Index of every page on this site: llms.txt
All skills
donnfelker avatar

/implement-full-spec

@2369972
Run it yourself

Use when the operator points at a parent ticket, audit, RFC, design doc, or multi-finding report with N actionable subtasks and wants every subtask shipped as its own stacked pull request, then driven to merge-ready by addressing every bot/human review comment and re-requesting review per round. Triggers on: 'fix all subtasks of [ticket]', 'work through P1/P2/P3 items', 'open a PR per finding and stack them', 'ship the audit remediations', 'knock out this report end to end', 'use agent teams to fix [parent]', 'address all comments on these stacked PRs', 'drive the stack to merge-ready', 'do a review-response sweep', 'comment @bot re-review when done'. Depends on the dev-team and pr-autopilot plugins. For a single unit of work, see dev-team; for one PR's review-response, see pr-autopilot.

Use this Skill: https://skilld.dev/gh/donnfelker/loop-skills/implement-full-spec

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesprompt-templates.md

≈1.5k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Prompt Templates

Copy-paste skeletons for the agents this skill dispatches outside the per-subtask loop. Replace <angle-brackets> with concrete values. Treat these as starting points — adapt to the specific PR or parent.

The Dev / QA / Reviewer / combined-single-shot skeletons live in the dev-team skill (references/prompt-templates.md there). Phase B calls that loop per subtask, so those role prompts are owned by it. This file holds only the templates that are specific to driving a stack of PRs: the Phase C per-PR review-response agent and the Phase A operator kickoff.

These templates are distilled from real multi-PR orchestration runs. The phrases marked important are the ones that demonstrably change agent behavior in production.

Table of contents

Phase files reference these anchors directly — e.g., prompt-templates.md#phase-c-single-pr-agent-for-prs-with-multiple-comments-to-address.


Phase C single-PR agent (for PRs with multiple comments to address)

You are addressing review comments on PR #<N> for <REPO>. One-shot agent.

## Workspace
- **Worktree**: <absolute path>
- **Branch**: <branch> (already rebased on its parent's current tip)
- Always prefix Bash with `cd <worktree> && …`.
- Do NOT touch <operator's primary checkout>.

## Unresolved feedback to address

### Inline review threads
<for each unresolved thread, paste:
- Thread graphql id (for resolveReviewThread mutation)
- First-comment databaseId (for /comments/{id}/replies)
- File:line, author, full body
>

### Top-level review bodies
<for each non-empty review body, paste:
- review id
- author
- state (APPROVED / COMMENTED / CHANGES_REQUESTED)
- full body
>

### General PR comments
<for each non-bot-noise comment, paste:
- comment id
- author
- full body
>

## Classification rules
<per the pr-review-mechanics decision matrix — actionable vs informational>
Spell out which items are actionable. Skip the rest.

## What to do

1. For each actionable item, read the file and make the change.
2. Add or update tests if applicable.
3. Run: <canonical checks>
4. Commit (default: NEW commit, no amend) with subject ≤72 chars:

   <conventional commit message template>

5. Push: `git push origin <branch>` (plain push).

6. For each addressed item, post a reply with the addressing commit:

   **Inline thread** (has resolve op):

gh api repos/OWNER/REPO/pulls/<N>/comments/<first-comment-databaseId>/replies
-f body="Addressed in `<short>`" gh api graphql -f query='mutation($threadId: ID!) { resolveReviewThread(input: {threadId: $threadId}) { thread { isResolved } } }' -F threadId='<thread.id>'


**Top-level review** (no resolve op):

gh pr comment <N> --body "Addressed @<reviewer>'s review in `<short>`:

  • Item 1: <change>.
  • Item 2: <change>.

@<reviewer-bot-handle> re-review"


**General comment** (no resolve op): same as top-level review reply, referencing the comment URL.

## Return format
- Each addressed item: <which source, what changed>
- Commit SHA
- Reply URLs
- Thread resolution statuses (for inline threads)
- Test output summary

## Constraints
- Worktree only.
- NO --no-verify. NEW commit, no amend (unless explicitly told to amend for a commit-message-subject-too-long item).
- Don't open PRs, don't merge, don't touch other branches.

Phase A "kickoff" prompt (for the orchestrator to surface to the operator)

After Phase A is drafted but before exiting plan mode, present this back to the operator for sign-off:

## Plan: <PARENT-TICKET-ID> → <N>-PR stack

**Source**: <URL to the parent>
**Filter**: <criteria — e.g., P1/P2/P3 subtasks, status=open>
**Subtask count**: <N>

## Stack order

| # | Subtask | Branch | Worktree | Stack-parent |
|---|---|---|---|---|
| 1 | <ID> — <title> | <branch> | ~/.claude-worktrees/<slug>/ | main |
| 2 | <ID> — <title> | <branch> | ~/.claude-worktrees/<slug>/ | <prev branch> |
| ... |

## Execution parameters

- **PR strategy**: one per subtask, stacked.
- **Branching**: one branch per subtask, off the prior subtask's tip.
- **Worktrees**: yes, one per subtask.
- **Concurrency**: strict serial (the stack enforces it).
- **Cycle cap**: 3 Dev → QA → Reviewer cycles, then escalate.
- **Tier boundaries**: <continue without stopping | pause for go/no-go>.
- **Stop condition**: <only on hard block | end of each tier>.

## What I'll do when you approve

1. Create the worktree for subtask #1 off `main`.
2. Mark subtask #1 status as in-progress.
3. Run the dev-team on subtask #1 (Dev → QA → Reviewer → commit).
4. Open PR #1 with base = main.
5. Advance to subtask #2 (parent = subtask #1's branch).
6. Continue through subtask #<N>.
7. Hand off to Phase C (review-response sweep) when all PRs are open.

Plan saved to ~/.claude/plans/<task-slug>.md.

OK to proceed?

Don't exit plan mode until the operator approves.


Adapting the templates

In practice, these templates get modified in flight. Common adaptations:

  1. Drop the "tier boundary pause" — when the operator says "don't stop until done", do a fast verification at each tier boundary and continue.
  2. Embed the Phase C reply templates into the loop's agents when a single agent is also doing Phase C work — reduces round-trips and lets the agent commit + reply in one shot.
  3. Trim the unresolved-feedback block to only the items that are actually actionable before handing the Phase C agent the prompt — informational bot summaries add noise.

The skeletons are a starting point, not a contract. For the Dev / QA / Reviewer adaptations, see the dev-team skill's own template notes.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning5mo3 checks · Risk SAFE
  • Gen Agent Trust Hub5mo

    The skill is safe but maintains a surface for indirect prompt injection due to the processing of untrusted content from ticketing systems and pull request reviews without explicit sanitization or delimiters.

  • Socket5mo

    No alerts

  • Snyk5mo

    Risk: MEDIUM · 1 issue

Signed by skilld at 2369972. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 5 months ago

README badge

README badge for donnfelker/loop-skills/implement-full-spec