Auto-Code
ImplementationAutomatically implements code from documented requirements, TODO items, or feature specifications. Proactively scans the TODO directory for specs, generates production-ready code, and tracks completion by moving finished specs to the COMPLETE directory.
How It Works
- Scans TODO Directory: Proactively looks for feature specifications
- Implements Features: Generates production-ready code from specs
- Runs Tests: Validates implementation against acceptance criteria
- Updates Tracker: Marks requirements as implemented in BRD-tracker.json
- Moves to COMPLETE: Finished specs are moved out of TODO
Key Features
- Spec-Driven Development: Only implements what's documented
- Zero Placeholders: Generates complete, functional code
- Test Integration: Runs tests as part of implementation
- Progress Tracking: Updates claude_progress.txt and BRD-tracker.json
- Iterative Processing: Works through specs systematically
Atomic Git Commits Per Task GSD Pattern
MANDATORY: Create atomic, bisectable commits after EACH completed task. Each commit should represent ONE logical unit of work that can be reverted independently, used for git bisect, and understood in isolation.
Atomic Commit Protocol
After completing EACH logical task within a spec:
# Stage only files related to THIS specific task
git add [specific-files]
# Create atomic commit with structured message
git commit -m "$(cat <<'EOF'
[REQ-XXX] Brief description (imperative mood)
Task: [task-id from spec if applicable]
Spec: TODO/[feature-name].md
Agent: auto-code
Changes:
- [Change 1]
- [Change 2]
Verification:
- [x] Tests pass
- [x] No security issues
- [x] Functional verification complete
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
Commit Granularity Guide
| Change Type | Commit Frequency | Example |
|---|---|---|
| New file/module | Per file | "Add TrivyScanner service class" |
| Function implementation | Per function | "Implement scanContainer method" |
| Bug fix | Per fix | "Fix null pointer in scan result parser" |
| Configuration change | Per config | "Add Trivy environment variables" |
| Test addition | Per test file | "Add TrivyScanner integration tests" |
| Refactor | Per logical unit | "Extract scan result parsing to utility" |
Commit Message Format
[REQ-XXX] <type>: <subject> (max 50 chars)
<body - what and why, not how>
Task: <task-id>
Spec: <spec-file>
Agent: auto-code
Types: feat, fix, refactor, test, docs, chore, security
Why Atomic Commits Matter
git bisect can pinpoint exact commit that introduced a bug
Revert single feature without affecting others
Each commit tells a complete story
Smaller commits are easier to review
Smaller changes = fewer merge conflicts
Anti-Patterns (FORBIDDEN)
# FORBIDDEN: Mega-commits
git add -A && git commit -m "Implement feature"
# FORBIDDEN: WIP commits
git commit -m "WIP" || git commit -m "stuff"
# FORBIDDEN: Mixed concerns
git commit -m "Add scanner and fix bug and update docs" # Split into 3!
Workflow Integration
Auto-Code operates in Phase 3 of the conductor workflow, after architect has created specs and before final QA validation. It iterates until all quality gates pass.