home / skills / yellinzero / aico / aico-subagent-driven

aico-subagent-driven skill

/.claude/skills/aico-subagent-driven

This skill executes a plan by dispatching subagents per task, enforcing spec compliance first and quality review second for reliable completion.

npx playbooks add skill yellinzero/aico --skill aico-subagent-driven

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.6 KB
---
name: aico-subagent-driven
description: |
  Execute implementation plan by dispatching fresh subagent per task. Each task gets: Implementer → Spec Review → Quality Review. Two-stage review ensures both correctness and quality.

  Use this skill when:
  - Have implementation plan with multiple independent tasks
  - Want automated execution with quality gates after each task
  - Tasks are mostly independent (not tightly coupled)
  - User asks to "execute the plan", "run the tasks", "auto implement"

  Prerequisites: Must have plan from aico-*-plan or aico-*-task-breakdown skill.
  Process: For each task: Dispatch Implementer → Spec Review (passes?) → Quality Review (passes?) → Next task
  Review order: ALWAYS spec compliance first, THEN code quality.
---

# Subagent-Driven Development

## Process

```
1. Read plan, extract all tasks
      ↓
2. Create TodoWrite with all tasks
      ↓
3. For each task:
   a. Dispatch Implementer Subagent
   b. Implementer: implement, test, commit
   c. Dispatch Spec Reviewer (matches spec?)
   d. Spec issues? → Implementer fixes → re-review
   e. Dispatch Quality Reviewer (code quality?)
   f. Quality issues? → Implementer fixes → re-review
   g. Mark task complete
      ↓
4. All tasks complete → Final review → Done
```

## Review Order is Critical

```
Spec Compliance Review FIRST
        ↓
    ✅ Passes
        ↓
Code Quality Review SECOND
```

**Why:** No point reviewing code quality if it doesn't meet spec.

## Subagent Prompts

### Implementer

- Provide FULL task text (don't make subagent read file)
- Provide context (where task fits in plan)
- Require TDD and self-review

### Spec Reviewer

- Check: Does implementation match spec exactly?
- Missing anything? Added anything extra?

### Quality Reviewer

- Check: Tests, readability, error handling, performance, security
- Rate issues as Critical/Important/Minor

## Key Rules

- ALWAYS run both reviews (spec AND quality)
- MUST fix issues before proceeding to next task
- NEVER dispatch multiple implementers in parallel
- ALWAYS provide full task text to subagent
- Spec review FIRST, then quality review

## Red Flags

**Never:**

- Skip any review
- Proceed with unfixed issues
- Start quality review before spec passes
- Move to next task with open issues

**If issues found:**

- Same implementer fixes them
- Reviewer reviews again
- Repeat until approved

## Common Mistakes

- ❌ Skip spec review → ✅ Always verify spec first
- ❌ Skip quality review → ✅ Always check quality
- ❌ Wrong review order → ✅ Spec first, then quality
- ❌ Provide partial task text → ✅ Give full text

Overview

This skill executes an implementation plan by dispatching a fresh subagent for each task and enforcing a two-stage review loop: spec compliance followed by code quality. Each task cycles through Implementer → Spec Review → Quality Review, with fixes applied by the same implementer until both reviews pass. It’s designed for automated, gated execution of multiple independent tasks in TypeScript projects.

How this skill works

The skill reads a provided plan, extracts tasks, and creates a todo list. For each task it dispatches an Implementer subagent that implements, tests, and commits changes. After implementation it runs a Spec Reviewer to verify exact compliance, and only if the spec passes it runs a Quality Reviewer to evaluate tests, readability, error handling, performance, and security. Issues are fixed by the same implementer and re-reviewed until approved before moving to the next task.

When to use it

  • You have a multi-task implementation plan from a plan or task-breakdown skill.
  • You want automated execution with enforced quality gates after each task.
  • Tasks are mostly independent and can be implemented sequentially.
  • You need strict spec adherence before any code-quality evaluation.
  • You want reproducible, auditable task-by-task progress with reviews.

Best practices

  • Always provide the full task text and relevant plan context to the Implementer subagent.
  • Keep tasks decoupled so one task’s review or fixes don’t block unrelated tasks.
  • Require TDD and self-review from the Implementer before dispatching reviewers.
  • Never start Quality Review until Spec Review has explicitly passed.
  • Address reviewer issues with the same Implementer and re-run the appropriate review loop.

Example use cases

  • Execute a feature rollout broken into independent stories where each story needs exact spec compliance.
  • Automate implementation of smaller modules or utilities across a TypeScript codebase with enforced reviews.
  • Run a bulk set of refactors that must preserve behavior exactly, with a spec-first validation.
  • Perform incremental improvements where each change must pass functional spec and then quality gates.
  • Onboard a temporary team by dispatching reliable subagents to implement and review isolated tasks.

FAQ

Can reviewers add new requirements during spec review?

No. Spec reviewers must verify the implementation matches the given spec exactly; any missing requirements are flagged back to the implementer to fix, not to expand the spec.

Are tasks executed in parallel?

No. The skill never dispatches multiple implementers in parallel for the same plan. Tasks are handled sequentially so each task completes the full review loop before the next begins.