Section 3
Implementation: From Tasks to Verified Code
Execute atomic tasks in dependency order, implement against the spec, and verify each unit before advancing — the Code and Verify development stages.
"What does the spec say should happen — not what does the code happen to do.
Overview
Section 3 begins where Section 2 ends. With tasks.md ready, use the /implement workflow to execute one task at a time — scoped to its requirement, verified before the next task unlocks.
Prerequisites from Sections 1 & 2
Clarification Gate passed · tasks.md generated via /create-tasks · tasks ordered with requirement links and verification steps.
Governing rules
Project Constitution
Non-negotiable rules for implementation. Follow these on every task — Always Do, Ask First, Never Do.
Always Do
Follow naming
Use established naming conventions for variables, functions, files, and APIs.
Keep PRs small
Ship focused pull requests that are easy to review and map to a single task.
Ask First
Change schema
Discuss database or data-structure changes before implementing.
Refactor core modules
Get alignment before changing foundational or shared modules.
Never Do
Bypass auth checks
Never skip authentication or authorization — even in local or temporary code.
Log sensitive data
Never log passwords, tokens, PII, or secrets into system logs.
Apply the Constitution on every /implement run — Always Do by default, Ask First for high-impact changes, Never Do under any circumstance.
Key Concepts
Dependency order is law
Task-Ordered Execution
Implement tasks strictly in dependency order from tasks.md. Never skip ahead — Task 2 waits until Task 1 verification passes.
One task at a time
/implement
Execute a single atomic task scoped to its linked requirement. Verify all checkboxes before picking the next task.
Spec wins over code
Spec-Aligned Code
Every implementation decision resolves against requirements.md. When code diverges from spec — fix the code, not the intent.
Checkboxes gate progress
Per-Task Verification
Each task's verification steps must pass before the next task begins. Verification is not optional end-of-sprint QA.
Example — Implementing Messaging Tasks
Execute tasks in dependency order. Verify each before advancing. Task 3 is in progress — complete its verification to unlock Task 4.
Create error handling for failed messages
Depends on: Task 2
Implementation
Failed send shows retry UI; no orphan records; retry without duplicate.
Verification
Feature Completion Criteria
- All tasks in tasks.md verified
- All verification checkboxes checked
- All user story acceptance criteria from requirements.md pass
- Implementation matches spec — not retrofitted spec matching code
Practical Takeaways
- 1Follow the Project Constitution. Always Do · Ask First · Never Do — on every task.
- 2One task at a time. Dependency order is not a suggestion.
- 3Verify before advancing. Failed verification blocks the next task.
- 4Spec over code. Fix code when it diverges from requirements.
- 5Scope AI prompts to one task. Never 'build the whole feature.'
- 6Trace commits to tasks and requirements. Code → Task → REQ → Story.
- 7Tests are in the task list — not an afterthought after shipping.