SDSection 4 →

Section 3 · /implement

Executing Tasks Against the Spec

One atomic task at a time — scoped to its linked requirement, verified before advancing to the next.

Scope rule

Never prompt AI with "build the whole feature." Always: "Implement Task N from tasks.md, Requirement REQ-XXX."

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.

Workflow

1

Identify next task

First unverified task whose dependencies are complete.

2

Load context

Task from tasks.md + linked REQ-XXX from requirements.md.

3

Scope implementation

Single task only — never the whole feature in one prompt.

4

Write code

Minimum code to satisfy task + requirement. Commit with Task + REQ ref.

5

Run verification

Execute every checkbox in the task's verification section.

6

Pass or fix

All pass → mark complete. Any fail → fix code, re-verify. Do not advance.

7

Feature complete

All tasks verified + full acceptance criteria from requirements.md.

Example Prompt (Task 2)

Implement Task 2 from tasks.md:
- Requirement: REQ-001 — User roles
- Description: Sender can compose and dispatch a message...
- Do NOT implement Task 3 or beyond.
- Verification steps:
  - [ ] Sender can create a message with receiverId and body
  - [ ] Message not persisted until delivery confirmed
  - [ ] Receiver can fetch the message after send

Commit as: feat(messaging): implement send message (Task 2, REQ-001)

Anti-Patterns

AvoidInstead
"Build the messaging feature""Implement Task 2: send message function"
Skip Task 1 verificationVerify before starting Task 2
Change spec to match buggy codeFix code to match spec
One giant prompt for all tasksOne scoped prompt per atomic task
Tests "later"Task 4 is tests — follow dependency order