S

Subagent-Driven Development Skill

Dispatches independent subagents for parallel development with built-in code review checkpoints. Each subagent works on a scoped task, and a coordinator reviews and integrates results for quality assurance.

SkillCommunitydevelopmentv1.0.0MIT
0 views0 copies

Description

This skill implements a parallel development workflow where a coordinator agent breaks work into scoped tasks, dispatches subagents to work independently, and reviews their output through structured code review checkpoints before integration.

Instructions

When building features that can be parallelized, follow this workflow:

Phase 1: Task Scoping

Decompose the work into independent, well-defined tasks:

## Feature: Notification System ### Task Breakdown: | ID | Task | Scope | Dependencies | Estimated Files | |----|------|-------|--------------|-----------------| | T1 | Notification model + DB | domain + infra | None | 3 | | T2 | Email notification channel | infra | T1 types only | 2 | | T3 | Push notification channel | infra | T1 types only | 2 | | T4 | Notification API routes | presentation | T1 types only | 3 | | T5 | Notification preferences UI | frontend | T4 API contract | 4 | ### Shared Contract (define before dispatching): ```typescript interface Notification { id: string; userId: string; type: 'email' | 'push' | 'in-app'; title: string; body: string; read: boolean; createdAt: Date; } interface NotificationChannel { send(notification: Notification): Promise<void>; }

### Phase 2: Dispatch Subagents
Each subagent receives:
- Clear task description
- Shared type definitions
- File scope (which files to create/modify)
- Quality requirements

```markdown
### Subagent 1 Instructions:
Create the Notification domain model and database layer.
- Files: src/domain/Notification.ts, src/infrastructure/NotificationRepository.ts, migrations/add-notifications.sql
- Use the shared Notification interface
- Add validation: title 1-200 chars, body 1-5000 chars
- Write unit tests for the model
- Do NOT modify any existing files

Phase 3: Code Review Checkpoint

After each subagent completes, review against criteria:

## Review Checkpoint: T1 (Notification Model) ### Checklist: - [x] Follows shared interface contract - [x] Types are correct and complete - [x] Unit tests pass - [x] No modifications to files outside scope - [ ] Error handling for edge cases — NEEDS FIX: missing validation for empty title - [x] Code follows project conventions ### Verdict: NEEDS REVISION ### Feedback: Add title/body validation before approving

Phase 4: Integration

After all subagents pass review:

  1. Merge all changes into a feature branch
  2. Resolve any conflicts (should be rare if scoping was good)
  3. Run full test suite
  4. Verify integration between components
  5. Create PR with combined changes
git checkout -b feat/notification-system # Apply subagent 1-5 changes git add -A npm test npm run build

Rules

  • Define shared interfaces/types BEFORE dispatching subagents
  • Each subagent should have a clear, non-overlapping file scope
  • Subagents must NOT modify files outside their scope
  • Every subagent output must pass code review before integration
  • If a subagent fails review, provide specific feedback and re-dispatch
  • Maximum 2 revision rounds per subagent — escalate to manual if still failing
  • Run full test suite after integration, not just individual subagent tests
  • Keep subagent tasks small — 2-5 files each, completable in one pass
  • Document the task breakdown and review results for audit trail

Examples

User: Build the payment processing module Action: Break into: payment model, Stripe integration, PayPal integration, API routes, admin UI. Define shared PaymentIntent interface, dispatch 5 subagents.

User: Refactor the auth system Action: Break into: extract interfaces, implement JWT provider, implement session provider, update routes, update tests. Coordinate to avoid conflicts.

User: Add i18n support across the app Action: Break into: setup i18n library, extract strings from component groups (1 subagent per page/section), update build config.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates