TDD Cycle Skills
The core TDD loop: an orchestrator dispatches specialized sub-agents for each phase. The full /add:tdd-cycle skill coordinates all four phases. Individual phase skills can also be invoked standalone.
/add:tdd-cycle
Full TDD
Full TDD Cycle
Execute the complete RED → GREEN → REFACTOR → VERIFY cycle against a feature specification. The orchestrator reads the spec, dispatches sub-agents for each phase, coordinates results, and independently verifies the final output. This is the primary skill for feature development in ADD.
The --ac flag targets specific acceptance criteria for a partial cycle. The --parallel flag enables concurrent sub-agent execution at Beta+ maturity using git worktrees for isolation. Without flags, all acceptance criteria are processed sequentially.
The orchestrator coordinates four sub-agents in order: test-writer (RED), implementer (GREEN), reviewer (REFACTOR), and verify (VERIFY). If any phase fails, the cycle halts and reports the failure point. After successful completion, a knowledge checkpoint is automatically captured.
/add:test-writer
RED
Write Failing Tests
Parse the feature spec, extract acceptance criteria and test cases, generate test files, and verify that all tests fail with clear, descriptive messages. This is the RED phase — tests must exist and must fail before any implementation begins.
The test-writer reads the spec's acceptance criteria and generates test files that map one-to-one to each criterion. Every test must fail (RED state) before the phase is considered complete. The --type flag controls the test layer; when omitted, the skill generates tests at the layer implied by each acceptance criterion.
Test files follow the project's existing test conventions (naming, framework, directory structure). Each test includes a descriptive failure message that references the acceptance criterion ID (e.g., "AC-001: should reject empty email").
/add:implementer
GREEN
Make Tests Pass
Verify that tests exist and currently fail, analyze the requirements from each failing test, and implement the minimal code necessary to achieve GREEN state. No gold-plating — write only what the tests require.
The implementer first confirms RED state by running the test suite and verifying failures. It then implements code incrementally — one acceptance criterion at a time — re-running tests after each change. The goal is minimal passing code: no premature abstractions, no features beyond what the tests specify.
If the implementer encounters a situation where a test seems incorrect or ambiguous, it halts and requests clarification rather than guessing. All implementations follow the project's existing code conventions and patterns.
/add:reviewer
REFACTOR
Code Review
Read-only analysis of the implementation. Check spec compliance, code quality, test coverage, architecture consistency, and ADD methodology adherence. Produces a structured review report with actionable findings.
The reviewer is a strictly read-only agent — it cannot modify files. It examines the implementation against the spec, checking that every acceptance criterion is satisfied, code follows project patterns, test coverage is adequate, and no spec drift has occurred.
The review report is structured with severity levels (critical, warning, suggestion) and includes specific file locations and remediation guidance. Critical findings block progression to the verify phase.
/add:verify
VERIFY
Quality Gates
Execute the 5-level quality gate system: Gate 1 (lint/format), Gate 2 (type checking), Gate 3 (tests and coverage), Gate 4 (spec compliance and integration), Gate 5 (smoke tests). Each gate must pass before the next runs.
The --level flag controls which gates are executed. local runs Gates 1-3, ci adds Gate 4, deploy includes all 5, and smoke runs only Gate 5 post-deployment. The --fix flag allows the verify agent to automatically remediate Gate 1 failures (formatting and lint issues).
Each gate produces a pass/fail result with details. A knowledge checkpoint is automatically captured after verification completes, recording any patterns or issues discovered during the process.
- Gate 1: Lint and format — code style, import ordering, formatting rules
- Gate 2: Type checking — static type analysis, no implicit any
- Gate 3: Tests and coverage — all tests pass, coverage meets threshold
- Gate 4: Spec compliance — acceptance criteria satisfied, integration tests pass
- Gate 5: Smoke tests — end-to-end verification in target environment
Workflow Skills
Skills that support the broader development workflow: planning, optimization, deployment, and documentation. These skills complement the TDD cycle and are typically invoked at specific points in the development lifecycle.
/add:plan
Planning
Implementation Planning
Parse a feature spec and decompose it into an ordered task list with phases (Prep → Core → Testing → Polish). Identify parallelizable work streams, assess risks, and produce a structured implementation plan.
The plan skill reads the spec and produces a phased implementation plan. Each phase contains ordered tasks with effort estimates, dependency mapping, and parallelism annotations. The plan also includes a risk assessment — what could go wrong, what's uncertain, and what needs research before implementation begins.
Plans are designed to be consumed by the /add:tdd-cycle skill. Tasks map directly to acceptance criteria. The plan document is committed to git as an audit trail of the implementation approach.
/add:optimize
Optimization
Performance Optimization
Profile the codebase, identify performance bottlenecks, prioritize by ROI (impact vs. effort), and implement optimizations with TDD discipline — write a performance test first, then optimize to pass it.
The --profile-first flag instructs the skill to run profiling tools and gather baseline metrics before proposing any changes. Without this flag, the skill analyzes code statically for known anti-patterns and bottlenecks.
Optimizations follow TDD discipline: for each improvement, a performance test is written first that asserts the target metric (e.g., response time under 200ms), then the optimization is implemented to pass the test. This prevents regression and documents the performance contract.
/add:deploy
Deployment
Environment-Aware Deployment
Run quality gates, compose a conventional commit, push, monitor CI, and execute deployment per environment rules. Agents climb the promotion ladder autonomously — but production always requires human approval.
Deployment behavior varies by environment:
- Local: Commit only. Runs Gates 1-3 before committing.
- Dev: Commit + push. Runs Gates 1-3 locally, monitors CI for Gate 4.
- Staging: Commit + push + CI. Waits for full CI pipeline, runs Gate 5 smoke tests post-deploy.
- Production: Creates PR + awaits human approval. Never auto-deploys to production regardless of maturity level.
The --skip-verify flag bypasses quality gates (use with caution). Rollback strategies are environment-specific: revert-commit for dev, redeploy-previous-tag for staging.
/add:infographic
Documentation
Generate Infographic
Generate an SVG infographic from the project PRD and configuration, applying project branding (colors, fonts, tone). Adapts content depth to the project's maturity level and supports image generation enhancement.
The infographic skill gathers content from the PRD, config, and project state to produce a visual SVG overview. It uses the branding system (colors, gradients, fonts) defined in .add/config.json to ensure visual consistency with other project artifacts.
The --update flag regenerates the infographic using existing content structure, updating only the data that has changed. Without it, the skill performs full content gathering and may ask the user clarifying questions via AskUserQuestion. The output SVG is GitHub-compatible (no <style> or <script> tags) for README embedding.
Summary Table
| Skill | Phase | Read-Only | Auto-Fix | Key Output |
|---|---|---|---|---|
/add:tdd-cycle |
Full TDD | No | No | Passing tests + verified implementation |
/add:test-writer |
RED | No | No | Failing test files |
/add:implementer |
GREEN | No | No | Minimal passing implementation |
/add:reviewer |
REFACTOR | Yes | No | Structured review report |
/add:verify |
VERIFY | No | Yes (--fix) | Gate pass/fail results |
/add:plan |
Planning | No | No | docs/plans/{feature}-plan.md |
/add:optimize |
Optimization | No | No | Performance tests + optimized code |
/add:deploy |
Deployment | No | No | Commit, push, deploy per environment |
/add:infographic |
Documentation | No | No | SVG infographic |