Feature Cycle Workflow
This skill defines the complete feature development workflow. It wraps TDD cycles with higher-level orchestration.
Cycle Overview
PLAN → [TDD-CYCLE → COMMIT]* → ARCHIVE → DOCUMENT
| Phase | Agent/Skill | Entry | Exit Criteria |
|---|---|---|---|
| PLAN | feature-planner | User request | Spec with ACs approved by human |
| TDD-CYCLE | tdd-workflow | One acceptance criterion | Tests pass, reviewed, refactored |
| COMMIT | (human decision) | TDD cycle complete | Changes committed |
| ARCHIVE | primary agent | All ACs implemented + approved | Context files moved to archive |
| DOCUMENT | primary agent | Archive complete | Project docs updated |
Human approval required before each phase transition.
Phase Details
PLAN: Define Feature Specification
Agent: feature-planner
Actions:
- •Analyze user request
- •Research existing codebase patterns
- •Identify ambiguities — ask human for clarification
- •Write feature specification with acceptance criteria
- •Stop and present spec for approval
Output: Feature specification with numbered acceptance criteria (ACs)
Exit: Human approves spec → proceed to first TDD cycle
TDD-CYCLE: Implement One Acceptance Criterion
Skill: tdd-workflow
Actions:
- •Pick next incomplete AC from feature spec
- •Run full TDD cycle: RED → GREEN → REVIEW → REFACTOR
- •Report completion status
Rules:
- •One AC per TDD cycle
- •Follow tdd-workflow skill completely
- •Update
.feature_context.mdwith AC completion status
Exit: TDD cycle complete → proceed to commit
COMMIT: Commit Changes
Actions:
- •Stage relevant files
- •Generate commit message based on convention
- •Human approves commit
- •Commit changes
Commit Message Detection:
- •Check for
.release-please-manifest.jsonorrelease-please-config.json - •If present, follow configured commit convention
- •If absent, use conventional commits
- •Study recent git history to match established patterns
Conventional Commit Prefixes:
| Prefix | Usage |
|---|---|
test: | Adding or modifying tests |
feat: | New functionality |
fix: | Bug fixes |
refactor: | Code restructuring, no behavior change |
chore: | Tooling, config, dependencies |
docs: | Documentation only |
Rules:
- •Never auto-commit — ask human first
- •Keep commits atomic — one logical change per AC
- •Combine test and implementation in single commit when they form one logical unit
Exit: Commit complete → check if more ACs remain
Loop Check: More Acceptance Criteria?
After each COMMIT:
- •Review
.feature_context.mdfor remaining ACs - •If incomplete ACs exist → return to TDD-CYCLE
- •If all ACs complete → propose feature completion to human
- •Human confirms → proceed to ARCHIVE
ARCHIVE: Preserve Context
Actions:
- •Move
.tdd_context.mdto.tdd_archive/with timestamp - •Archive
.feature_context.mdsimilarly
Archive Naming: YYYY-MM-DD_HH-MM_feature-name.md
Exit: Context archived → proceed to DOCUMENT
DOCUMENT: Update Project Documentation
Actions:
- •Review cycle for documentation-worthy insights:
- •New patterns discovered
- •Project structure decisions
- •Technology choices and rationales
- •Common pitfalls and solutions
- •Update relevant project docs:
- •
CLAUDE.md/AGENTS.md— project configuration - •
CONTRIBUTING.md— development workflow - •Architecture decision records
- •
- •Stage and commit documentation changes
Rules:
- •Documentation commits use
docs:prefix - •Only document actual learnings — no speculation
- •Ask human approval before committing
Exit: Documentation updated → feature cycle complete
Context Preservation
Feature Context File
.feature_context.md tracks feature-level state across TDD cycles:
# Feature Context **Feature**: User Authentication **Started**: 2026-01-29 10:00 **Current Phase**: TDD-CYCLE (AC #2) ## Acceptance Criteria - [x] AC1: User can log in with email and password - [ ] AC2: User can log out from any page - [ ] AC3: Invalid credentials show error message ## Commits - `feat: implement login with email/password` (AC1) ## Notes - Using JWT with RS256 algorithm - Tokens stored in httpOnly cookies
TDD Context File
.tdd_context.md tracks state within a single TDD cycle. See tdd-workflow skill for format.
Archive Structure
.tdd_archive/ ├── 2026-01-29_10-00_auth-feature_context.md ├── 2026-01-29_10-00_auth-ac1_tdd.md ├── 2026-01-29_11-30_auth-ac2_tdd.md └── ...
Gitignore Entry:
# Feature cycle context files .feature_context.md .tdd_context.md .tdd_archive/
Anti-Patterns
- •Starting TDD without approved feature spec
- •Implementing multiple ACs in one TDD cycle
- •Committing without human approval
- •Skipping ARCHIVE or DOCUMENT phases
- •Modifying feature spec mid-cycle without human approval