{"id":17543,"plugin_id":"plugins_6a78e83987748191afc0c56e12172fce","kind":"skill","collection_source":null,"comparison_source":null,"observed_at":"2026-09-30T23:14:15.326Z","digest":"b2c0b636353e74758d4ad015aa2db6d1f0669632119f3c7fbd1a161208fb546f","against":null,"payload":{"description":"Execute a full specification across task tickets using isolated subagent branches into a unified PR. Use when a specification with associated task-graph tickets is ready to implement across multiple subagents or isolated worktrees, and the goal is a complete pull request on a single branch — even if the user says \"build the whole spec\". Do NOT use for single isolated bug fixes or exploratory coding without tickets.","included_files":[{"relative_path":"agents/openai.yaml","size_in_bytes":120}],"name":"implement-spec","skill_md_contents":"---\nname: implement-spec\ndescription: \"Execute a full specification across task tickets using isolated subagent branches into a unified PR. Use when a specification with associated task-graph tickets is ready to implement across multiple subagents or isolated worktrees, and the goal is a complete pull request on a single branch — even if the user says \\\"build the whole spec\\\". Do NOT use for single isolated bug fixes or exploratory coding without tickets.\"\n---\n\n# Implement Spec\n\nOrchestrate the parallel implementation of an approved specification and its DAG task graph across isolated subagent branches, culminating in a single unified, code-reviewed pull request.\n\n---\n\n## Core Invariants\n\n1. **DAG Frontier Concurrency**: Implementer subagents work exclusively on unblocked frontier tickets; merge completions immediately unlock newly unblocked tickets.\n2. **Strict Worktree Isolation**: Every implementer subagent executes in its own dedicated, isolated Git worktree and branch to prevent file collision.\n3. **Context Pointers Exclusively**: Communicate to subagents strictly via context pointers (spec path, ticket IDs, ADRs); avoid dumping giant walls of text.\n4. **Dedicated Merger Verification**: Merging completed worktree branches into the main PR branch is handled by a merger subagent with full test suite verification.\n5. **Unified Code-Review Quality Gate**: Run `code-review` across the unified PR branch before marking it ready for human review, fixing all findings in a final pass.\n\n---\n\n## Architecture & Map of Content (MOC)\n\n```\n[ Approved Spec & DAG Tickets ] ──► [ Create PR Branch ] ──► [ Parallel Worktree Subagents ]\n                                                                       │\n                                      ┌────────────────────────────────┴────────────────────────────────┐\n                                      ▼                                                                 ▼\n                            [ Ticket #01 Worktree ]                                           [ Ticket #02 Worktree ]\n                            - Isolated branch                                                 - Isolated branch\n                            - Red/Green TDD cycle                                             - Red/Green TDD cycle\n                                      │                                                                 │\n                                      └────────────────────────────────┬────────────────────────────────┘\n                                                                       ▼\n                                                       [ Merge & Verify on PR Branch ]\n                                                                       │\n                                                                       ▼\n                                                       [ Code Review & Worktree Cleanup ]\n```\n\n| Role | Responsibility | Execution Mode |\n|---|---|---|\n| **Exploration Agent** | Pre-read external documentation and shared schemas | Background subagent (`research`) |\n| **Implementer Agents** | Execute single tickets inside isolated worktrees | Parallel subagents (`implement`) |\n| **Merger Agent** | Merge feature branches into PR branch & verify tests | Serial integration pass |\n| **Review Gate** | Run two-axis code review on final PR branch | `skills/code-review/SKILL.md` |\n\n---\n\n## Step-by-Step Procedure (TWI)\n\n### Step 1: Ingest Task Graph & Initialize PR Branch\n- **Action**: Read the specification and associated tickets to compute the initial unblocked frontier.\n- **Key Point**: Create a dedicated PR branch (`feat/<spec-slug>`) and draft pull request linking all target tickets.\n- **Why**: Linking tickets upfront ensures automated status tracking and traceability.\n\n### Step 2: Dispatch Parallel Implementer Subagents\n- **Action**: For each ticket on the unblocked frontier, spawn an implementer subagent in an isolated worktree (`.worktrees/<ticket-slug>`).\n- **Key Point**: Pass context pointers to the spec and ticket without duplicating instructions.\n- **Inline Checklist**:\n  - [ ] Worktrees isolated from main repository workspace\n  - [ ] Implementers follow strict TDD red-green cycle\n  - [ ] Each implementer works on a single assigned ticket\n\n### Step 3: Merge Completed Tickets & Advance Frontier\n- **Action**: When an implementer completes, merge its branch into the PR branch, run the test suite, and delete the worktree.\n- **Key Point**: Recompute the task graph frontier to launch newly unblocked tickets immediately.\n- **Why**: Continuous merging keeps integration diffs small and surfaces conflicts early.\n\n### Step 4: Run Two-Axis Code Review & Cleanup\n- **Action**: Once all tickets are merged, run `code-review` on `feat/<spec-slug>`.\n- **Key Point**: Remediate all Standards and Spec findings before marking the PR ready for human review.\n- **Why**: Comprehensive pre-merge review guarantees production-grade architecture and full spec compliance.\n\n---\n\n## Anti-Rationalization Guardrails\n\n| Tempting Rationalization | Binding Rule | Engineering Rationale |\n|---|---|---|\n| *\"Run all implementers in the same shared working tree.\"* | **Mandatory isolated git worktrees per subagent.** | Shared workspaces cause file lock contention, overwrites, and git index corruption. |\n| *\"Skip code review since all unit tests passed.\"* | **Mandatory two-axis code review on the final PR branch.** | Passing tests do not catch architectural smells, Fowler anti-patterns, or missed spec clauses. |\n| *\"Implement blocked tickets before their dependencies merge.\"* | **Strictly adhere to the DAG frontier.** | Implementing blocked tickets prematurely results in massive merge conflicts and rework. |\n\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}