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

step-03-implement.md

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

Open on GitHub

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

1---
2---
3
4# Step 3: Implement
5

Step 3: Implement

Raw lines 1 to 5
6## RULES
7
8- No human interaction: do not ask questions or wait for approval in this step.
9- Content inside `<intent-contract>` in `{plan_file}` is read-only. Do not modify.

RULES

  • No human interaction: do not ask questions or wait for approval in this step.
  • Content inside <intent-contract> in {plan_file} is read-only. Do not modify.
Raw lines 6 to 10
Involves a person wait for approval :8
11## PRECONDITION
13Verify `{plan_file}` resolves to a non-empty path and the file exists on disk. If empty or missing, HALT with status `blocked` and blocking condition `missing plan_file before implementation`.

PRECONDITION

Verify {plan_file} resolves to a non-empty path and the file exists on disk. If empty or missing, HALT with status blocked and blocking condition missing plan_file before implementation.

Raw lines 11 to 14
15## INSTRUCTIONS

INSTRUCTIONS

Raw lines 15 to 16
17### Baseline
19Capture `baseline_revision` (current HEAD, or `NO_VCS` if version control is unavailable) into `{plan_file}` frontmatter before making any changes. When `baseline_revision` already holds a value (resuming or repairing this run), preserve it.

Baseline

Capture baseline_revision (current HEAD, or NO_VCS if version control is unavailable) into {plan_file} frontmatter before making any changes. When baseline_revision already holds a value (resuming or repairing this run), preserve it.

Raw lines 17 to 20
21### Implement
23Change `{plan_file}` status to `in-progress` in the frontmatter before starting implementation. Execute only the matching route below, then continue with Both routes.
25{% if workflow.route != "full" %}
26#### Oneshot (`route: oneshot`)
28Implement in this main session from the plan's Intent and working notes. Do not launch an implementing subagent or execute the full-route handoff. Append decisions, files touched, and surprises to `## Implementation Notes`.
30Stop if the intent left out something the user would notice in the result. Record the gap in `## Implementation Notes`, then HALT with status `blocked` and blocking condition `intent gap` — do not guess.
32{% endif %}
33{% if workflow.route != "oneshot" %}
34#### Full (`route: full`, or a legacy plan with no route)
36Substitute the runtime placeholders (e.g. `{plan_file}`) into the implementation handoff below, then follow it verbatim. Do not add parent-authored goal restatements, file lists, ownership boundaries, or acceptance criteria to the handoff — the plan is the subagent's sole source of truth. If the handoff conflicts with the plan, HALT with status `blocked` and blocking condition `handoff conflicts with plan`, and include both conflicting passages.
38{{ workflow.implementation_handoff }}
40Invoke the subagent **synchronously** and wait for it to return in this same turn — do not background/detach it (`run_in_background`) or end your turn to await a notification (see workflow.md → Subagents). Resume at "Verify" only after it returns. If the platform allows, keep the subagent available for re-engagement after it returns — step-04 may send it review fixes.
42{% endif %}

Implement

Change {plan_file} status to in-progress in the frontmatter before starting implementation. Execute only the matching route below, then continue with Both routes.

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

Oneshot (route: oneshot)

Implement in this main session from the plan's Intent and working notes. Do not launch an implementing subagent or execute the full-route handoff. Append decisions, files touched, and surprises to ## Implementation Notes.

Stop if the intent left out something the user would notice in the result. Record the gap in ## Implementation Notes, then HALT with status blocked and blocking condition intent gap — do not guess.

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

Full (route: full, or a legacy plan with no route)

Substitute the runtime placeholders (e.g. {plan_file}) into the implementation handoff below, then follow it verbatim. Do not add parent-authored goal restatements, file lists, ownership boundaries, or acceptance criteria to the handoff — the plan is the subagent's sole source of truth. If the handoff conflicts with the plan, HALT with status blocked and blocking condition handoff conflicts with plan, and include both conflicting passages.

{{ workflow.implementation_handoff }}

Invoke the subagent synchronously and wait for it to return in this same turn — do not background/detach it (run_in_background) or end your turn to await a notification (see workflow.md → Subagents). Resume at "Verify" only after it returns. If the platform allows, keep the subagent available for re-engagement after it returns — step-04 may send it review fixes.

{% endif %}

Raw lines 21 to 42
Starts an agent subagent :28
Involves a person and wait :40
Starts an agent Subagents :40
43### Both routes
45**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. Any file paths displayed in terminal/conversation output must use CWD-relative format with `:line` notation (e.g., `src/path/file.ts:42`) for terminal clickability. No leading `/` in either case.

Both routes

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. Any file paths displayed in terminal/conversation output must use CWD-relative format with :line notation (e.g., src/path/file.ts:42) for terminal clickability. No leading / in either case.

Raw lines 43 to 46
47### Verify
49{% if workflow.route != "oneshot" %}
50On the full route, finish any unfinished work reported by the implementing subagent before proceeding.
52{% endif %}
53Stage the diff and read it: 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 implementation notes or a subagent's report.
55Run the commands in `{plan_file}`'s `## Verification` section (or perform its manual checks). If verification fails and the failure cannot be fixed, HALT with status `blocked`, blocking condition `implementation verification failed`, and include the failing command or check and reason. When fixing a failure changes code, rewrite `{diff_file}` and re-read it. Acceptance criteria are judged at review, not here.

Verify

{% if workflow.route != "oneshot" %} On the full route, finish any unfinished work reported by the implementing subagent before proceeding.

{% endif %} Stage the diff and read it: 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 implementation notes or a subagent's report.

Run the commands in {plan_file}'s ## Verification section (or perform its manual checks). If verification fails and the failure cannot be fixed, HALT with status blocked, blocking condition implementation verification failed, and include the failing command or check and reason. When fixing a failure changes code, rewrite {diff_file} and re-read it. Acceptance criteria are judged at review, not here.

Raw lines 47 to 56
Starts an agent subagent :50
57### Matrix Test Audit
59If `{plan_file}`'s intent-contract 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 with status `blocked` and blocking condition `matrix ambiguity`. If the audit cannot otherwise be satisfied, HALT with status `blocked` and blocking condition `matrix test audit failed`.

Matrix Test Audit

If {plan_file}'s intent-contract 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 with status blocked and blocking condition matrix ambiguity. If the audit cannot otherwise be satisfied, HALT with status blocked and blocking condition matrix test audit failed.

Raw lines 57 to 60
61## NEXT
63Read fully and follow `{{ rendered("step-04-review.md") }}`

NEXT

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

Raw lines 61 to 63