| name | build |
| description | Execute implementation with on-the-fly task generation from a DESIGN document
(Phase 3). Use when the user wants to implement a feature that has a completed
DESIGN document.
|
Build Command
Execute implementation with on-the-fly task generation (Phase 3)
Usage
/build <design-file>
Examples
/build .github/sdd/features/DESIGN_NOTIFICATION_SYSTEM.md
/build DESIGN_USER_AUTH.md
Overview
This is Phase 3 of the 5-phase AgentSpec workflow:
Phase 0: /brainstorm → .github/sdd/features/BRAINSTORM_{FEATURE}.md (optional)
Phase 1: /define → .github/sdd/features/DEFINE_{FEATURE}.md
Phase 2: /design → .github/sdd/features/DESIGN_{FEATURE}.md
Phase 3: /build → Code + .github/sdd/reports/BUILD_REPORT_{FEATURE}.md (THIS COMMAND)
Phase 4: /ship → .github/sdd/archive/{FEATURE}/SHIPPED_{DATE}.md
The /build command executes the implementation, generating tasks on-the-fly from the file manifest.
What This Command Does
- Parse - Extract file manifest from DESIGN
- Prioritize - Order files by dependencies
- Execute - Create each file with verification
- Validate - Run tests after each significant change
- Report - Generate build report
Process
Step 1: Load Context
Read(.github/sdd/features/DESIGN_{FEATURE}.md)
Read(.github/sdd/features/DEFINE_{FEATURE}.md)
Read(.github/copilot-instructions.md)
Step 2: Extract Tasks from File Manifest
Convert the file manifest to a task list:
From DESIGN file manifest:
| File | Action | Purpose |
Generate:
- [ ] Create/Modify {file1}
- [ ] Create/Modify {file2}
- [ ] ...
Step 3: Order by Dependencies
Analyze imports and dependencies to determine execution order.
Step 4: Execute Each Task
For each file:
- Write - Create the file following code patterns from DESIGN
- Verify - Run verification command (lint, type check, import test)
- Mark Complete - Update progress
Step 5: Run Full Validation
After all files created:
ruff check .
mypy .
pytest
Step 6: Generate Build Report
Write(.github/sdd/reports/BUILD_REPORT_{FEATURE}.md)
Output
| Artifact | Location |
|---|
| Code | As specified in DESIGN file manifest |
| Build Report | .github/sdd/reports/BUILD_REPORT_{FEATURE}.md |
Next Step: /ship .github/sdd/features/DEFINE_{FEATURE}.md (when ready)
Execution Loop
The build agent follows this loop for each task:
┌─────────────────────────────────────────────────────┐
│ EXECUTE TASK │
├─────────────────────────────────────────────────────┤
│ 1. Read task from manifest │
│ 2. Write code following DESIGN patterns │
│ 3. Run verification command │
│ └─ If FAIL → Fix and retry (max 3) │
│ 4. Mark task complete │
│ 5. Move to next task │
└─────────────────────────────────────────────────────┘
Quality Gate
Before marking complete, verify:
[ ] All files from manifest created
[ ] All verification commands pass
[ ] Lint check passes
[ ] Tests pass (if applicable)
[ ] No TODO comments left in code
[ ] Build report generated
Tips
- Follow the DESIGN - Don't improvise, use the code patterns
- Verify Incrementally - Test after each file, not at the end
- Fix Forward - If something breaks, fix it immediately
- Self-Contained - Each file should be independently functional
- No Comments - Code should be self-documenting
Handling Issues During Build
If you encounter issues:
| Issue | Action |
|---|
| Missing requirement | Use /iterate to update DEFINE |
| Architecture problem | Use /iterate to update DESIGN |
| Simple bug | Fix immediately and continue |
| Major blocker | Stop and report in build report |
References
- Agent:
.github/agents/workflow-build.agent.md
- Template:
.github/sdd/templates/BUILD_REPORT_TEMPLATE.md
- Contracts:
.github/sdd/architecture/WORKFLOW_CONTRACTS.yaml
- Next Phase:
.github/skills/workflow-ship/SKILL.md