agentleFS
imMamdouhaboammarimMamdouhaboammar/matts-skills-into-chatgpt/skills/implement-spec/SKILL.md

implement-spec

Skill8 starsChanged 2 months agoMITView on GitHub

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.

We split this skill into the rules it gives an agent

5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 87 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Strict Worktree Isolation: Every implementer subagent executes in its own dedicated, isolated Git worktree and branch to prevent file …

    line 15
  2. Very specific:

    Unified Code-Review Quality Gate: Run code-review across the unified PR branch before marking it ready for human review, fixing all …

    line 18
  3. Distinctive:

    Action: Read the specification and associated tickets to compute the initial unblocked frontier.

    line 53
  4. Very specific:

    Key Point: Create a dedicated PR branch (feat/<spec-slug>) and draft pull request linking all target tickets.

    line 54
  5. Distinctive:

    Action: When an implementer completes, merge its branch into the PR branch, run the test suite, and delete the worktree.

    line 66

“Common” is measured: kept by at least 6 in 10 of the 87 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Implement Spec

Orchestrate 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.


Core Invariants

  1. DAG Frontier Concurrency: Implementer subagents work exclusively on unblocked frontier tickets; merge completions immediately unlock newly unblocked tickets.
  2. Strict Worktree Isolation: Every implementer subagent executes in its own dedicated, isolated Git worktree and branch to prevent file collision.
  3. Context Pointers Exclusively: Communicate to subagents strictly via context pointers (spec path, ticket IDs, ADRs); avoid dumping giant walls of text.
  4. Dedicated Merger Verification: Merging completed worktree branches into the main PR branch is handled by a merger subagent with full test suite verification.
  5. 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.

Architecture & Map of Content (MOC)

[ Approved Spec & DAG Tickets ] ──► [ Create PR Branch ] ──► [ Parallel Worktree Subagents ]
                                                                       │
                                      ┌────────────────────────────────┴────────────────────────────────┐
                                      ▼                                                                 ▼
                            [ Ticket #01 Worktree ]                                           [ Ticket #02 Worktree ]
                            - Isolated branch                                                 - Isolated branch
                            - Red/Green TDD cycle                                             - Red/Green TDD cycle
                                      │                                                                 │
                                      └────────────────────────────────┬────────────────────────────────┘
                                                                       ▼
                                                       [ Merge & Verify on PR Branch ]
                                                                       │
                                                                       ▼
                                                       [ Code Review & Worktree Cleanup ]
RoleResponsibilityExecution Mode
Exploration AgentPre-read external documentation and shared schemasBackground subagent (research)
Implementer AgentsExecute single tickets inside isolated worktreesParallel subagents (implement)
Merger AgentMerge feature branches into PR branch & verify testsSerial integration pass
Review GateRun two-axis code review on final PR branchskills/code-review/SKILL.md

Step-by-Step Procedure (TWI)

Step 1: Ingest Task Graph & Initialize PR Branch

  • Action: Read the specification and associated tickets to compute the initial unblocked frontier.
  • Key Point: Create a dedicated PR branch (feat/<spec-slug>) and draft pull request linking all target tickets.
  • Why: Linking tickets upfront ensures automated status tracking and traceability.

Step 2: Dispatch Parallel Implementer Subagents

  • Action: For each ticket on the unblocked frontier, spawn an implementer subagent in an isolated worktree (.worktrees/<ticket-slug>).
  • Key Point: Pass context pointers to the spec and ticket without duplicating instructions.
  • Inline Checklist:
    • Worktrees isolated from main repository workspace
    • Implementers follow strict TDD red-green cycle
    • Each implementer works on a single assigned ticket

Step 3: Merge Completed Tickets & Advance Frontier

  • Action: When an implementer completes, merge its branch into the PR branch, run the test suite, and delete the worktree.
  • Key Point: Recompute the task graph frontier to launch newly unblocked tickets immediately.
  • Why: Continuous merging keeps integration diffs small and surfaces conflicts early.

Step 4: Run Two-Axis Code Review & Cleanup

  • Action: Once all tickets are merged, run code-review on feat/<spec-slug>.
  • Key Point: Remediate all Standards and Spec findings before marking the PR ready for human review.
  • Why: Comprehensive pre-merge review guarantees production-grade architecture and full spec compliance.

Anti-Rationalization Guardrails

Tempting RationalizationBinding RuleEngineering Rationale
"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.
"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.
"Implement blocked tickets before their dependencies merge."Strictly adhere to the DAG frontier.Implementing blocked tickets prematurely results in massive merge conflicts and rework.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.