Skill Tracer
Skills › BMAD Method › bmad-build › step-03-implement.md

step-03-implement.md

52 lines · skills/bmad-build/step-03-implement.md at bd70c64

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1{% if workflow.route != "oneshot" %}
2---
3---
4
5# Step 3: Implement
6

{% if workflow.route != "oneshot" %}



Step 3: Implement

Raw lines 1 to 6
7## RULES
8
9- No push. No remote ops.
10- Sequential execution only.
11- Content inside `<frozen-after-approval>` in `{plan_file}` is read-only. Do not modify.

RULES

  • No push. No remote ops.
  • Sequential execution only.
  • Content inside <frozen-after-approval> in {plan_file} is read-only. Do not modify.
Raw lines 7 to 12
13## PRECONDITION
15Verify `{plan_file}` resolves to a non-empty path and the file exists on disk. If empty or missing, HALT and ask the human to provide the plan file path before proceeding.

PRECONDITION

Verify {plan_file} resolves to a non-empty path and the file exists on disk. If empty or missing, HALT and ask the human to provide the plan file path before proceeding.

Raw lines 13 to 16
Involves a person HALT and ask :15
17## INSTRUCTIONS

INSTRUCTIONS

Raw lines 17 to 18
19### Baseline
21Capture `baseline_revision` (current HEAD, or `NO_VCS` if version control is unavailable) into `{plan_file}` frontmatter before making any changes. If `baseline_revision` already holds a value (resumed run), preserve it — never overwrite it.

Baseline

Capture baseline_revision (current HEAD, or NO_VCS if version control is unavailable) into {plan_file} frontmatter before making any changes. If baseline_revision already holds a value (resumed run), preserve it — never overwrite it.

Raw lines 19 to 22
23### Implement
25Change `{plan_file}` status to `in-progress` in the frontmatter before starting implementation.
27Execute the implementation handoff below: substitute the runtime placeholders (e.g. `{plan_file}`) into it, then follow it verbatim.
29{{ workflow.implementation_handoff }}
31Do not add goal restatements, file lists, ownership boundaries, investigation detail, acceptance criteria, or CLAUDE.md/house-style rules to the dispatch — the plan is the subagent's sole source of truth, and that material already lives in it (investigation findings in its Code Map, the rest in the plan body). One line of sanctioned hedging belongs in the plan at planning time, not in the dispatch. If no subagents are available, implement directly from the plan. If the platform allows, keep the subagent available for re-engagement after it returns — step-04 may send it review fixes.
33The handoff directs the subagent to load the plan's `context:` files itself, so never pre-load and paste those files into the dispatch. Only when you implement directly (no subagent available) do you load a non-empty `context:` list yourself before starting.
35**Path formatting rule:** Any markdown links written into `{plan_file}` must use paths relative to `{plan_file}`'s directory so they are clickable in VS Code. No leading `/`. Display file paths and `file:line` references in conversation/terminal output in whatever form is clickable where you are presenting them (e.g. code citation in chat, CWD-relative path with no leading `/` in terminal). If unsure, use CWD-relative path.

Implement

Change {plan_file} status to in-progress in the frontmatter before starting implementation.

Execute the implementation handoff below: substitute the runtime placeholders (e.g. {plan_file}) into it, then follow it verbatim.

{{ workflow.implementation_handoff }}

Do not add goal restatements, file lists, ownership boundaries, investigation detail, acceptance criteria, or CLAUDE.md/house-style rules to the dispatch — the plan is the subagent's sole source of truth, and that material already lives in it (investigation findings in its Code Map, the rest in the plan body). One line of sanctioned hedging belongs in the plan at planning time, not in the dispatch. If no subagents are available, implement directly from the plan. If the platform allows, keep the subagent available for re-engagement after it returns — step-04 may send it review fixes.

The handoff directs the subagent to load the plan's context: files itself, so never pre-load and paste those files into the dispatch. Only when you implement directly (no subagent available) do you load a non-empty context: list yourself before starting.

Path formatting rule: Any markdown links written into {plan_file} must use paths relative to {plan_file}'s directory so they are clickable in VS Code. No leading /. Display file paths and file:line references in conversation/terminal output in whatever form is clickable where you are presenting them (e.g. code citation in chat, CWD-relative path with no leading / in terminal). If unsure, use CWD-relative path.

Raw lines 23 to 36
Project instruction file CLAUDE.md :31
Starts an agent dispatch :31
Starts an agent subagent :31
Starts an agent subagents :31
37### Stage the Diff
39Stage the diff and read it first: using the repository's version-control tooling, write a unified diff of all changes since `{baseline_revision}` (from `{plan_file}` frontmatter) — untracked files included — to a uniquely-named file in the system temp directory, set `{diff_file}` to its absolute path, and read that file into your own context. Judge against the diff, not just the implementation subagent's report.
41Run the commands in `{plan_file}`'s `## Verification` section, if present; a failing command is unfinished work.
43If the implementer reported anything unfinished, finish it before proceeding — and when that changes code, rewrite `{diff_file}` and re-read it. Acceptance criteria are judged at review, not here.

Stage the Diff

Stage the diff and read it first: using the repository's version-control tooling, write a unified diff of all changes since {baseline_revision} (from {plan_file} frontmatter) — untracked files included — to a uniquely-named file in the system temp directory, set {diff_file} to its absolute path, and read that file into your own context. Judge against the diff, not just the implementation subagent's report.

Run the commands in {plan_file}'s ## Verification section, if present; a failing command is unfinished work.

If the implementer reported anything unfinished, finish it before proceeding — and when that changes code, rewrite {diff_file} and re-read it. Acceptance criteria are judged at review, not here.

Raw lines 37 to 44
Starts an agent subagent :39
45### Matrix Test Audit
47If `{plan_file}`'s `<frozen-after-approval>` block contains an I/O & Edge-Case Matrix, verify every matrix row is covered by at least one test that verifies its expected behavior, and that each covering test ran and passed in the verification output. A covering test that exists but did not run — unregistered, filtered out, skipped, or disabled — counts as missing. If a test disagrees with the matrix, never edit the expectation to match the code: fix the code, or if the matrix row itself is ambiguous, HALT and ask the human. Fix any other audit failure before proceeding.

Matrix Test Audit

If {plan_file}'s <frozen-after-approval> block contains an I/O & Edge-Case Matrix, verify every matrix row is covered by at least one test that verifies its expected behavior, and that each covering test ran and passed in the verification output. A covering test that exists but did not run — unregistered, filtered out, skipped, or disabled — counts as missing. If a test disagrees with the matrix, never edit the expectation to match the code: fix the code, or if the matrix row itself is ambiguous, HALT and ask the human. Fix any other audit failure before proceeding.

Raw lines 45 to 48
Involves a person HALT and ask :47
49## NEXT
51Read fully and follow `{{ rendered("step-04-review.md") }}`
52{% endif %}

NEXT

Read fully and follow {{ rendered("step-04-review.md") }} {% endif %}

Raw lines 49 to 52