Implement code based on the change artifacts. Supports two modes:
- Gherkin-driven (default): feature files drive implementation and testing
- Proposal-driven: when gherkin is skipped (technical changes), proposal drives testing
Use for:
- Implementing code for a Beat change that has spec artifacts (gherkin or proposal) done
- TDD implementation driven by feature files or proposal risk points
- Resuming implementation of a partially completed change
NOT for:
- Creating spec artifacts like proposal, gherkin, or design.md (use
/beat:design)
- Breaking down tasks or creating execution plans (use
/beat:plan)
- Verifying implementation completeness (use
/beat:verify)
- Exploring ideas or investigating a problem (use
/beat:explore)
Trigger examples:
- "Implement the change" / "Start coding" / "Apply the plan" / "TDD the scenarios"
- Should NOT trigger: "design a feature" / "break down tasks" / "verify the implementation"
Prerequisites (invoke before proceeding)
| Superpower |
When |
Priority |
| using-git-worktrees |
Verify isolation (should exist from design/plan; creates if not) |
MUST |
| test-driven-development |
At start, in TDD mode |
MUST |
| systematic-debugging |
When stuck (3 failed attempts) |
SHOULD |
| subagent-driven-development |
When tasks.md has multiple independent tasks |
SHOULD |
Invoke in order: worktrees first (verify isolation), then TDD (discipline). Debugging and subagent are conditional — only invoke when triggered. If a superpower is unavailable (skill not installed), skip and continue.
Rationalization Prevention
| Thought |
Reality |
| "The change is small, I don't need a worktree" |
Worktrees protect against contamination. The worktree should already exist from design/plan — verify, don't skip. |
| "I'll write the test after the implementation, same result" |
TDD is about design feedback, not just test coverage. Writing tests after loses the design signal. |
| "This is a refactor, TDD doesn't apply" |
Refactors need tests most — they prove behavior is preserved. If testing.required is false, TDD is already skipped. |
| "I'll add @covered-by annotations at the end for all scenarios" |
Annotations must be added per-scenario immediately after writing the test. Batching them leads to forgetting. |
| "The e2e test setup is too complex, I'll write a unit test instead" |
The scenario is tagged @e2e for a reason. If e2e setup is genuinely blocked, announce the blocker and ask — don't silently downgrade. |
| "This @behavior test is obvious, a skeleton is enough" |
Every test must be executable. A skeleton that doesn't run is not a test. |
| "These tasks are small, I'll combine them for efficiency" |
Each task is bounded for a reason. Merging recreates the oversized-output problem that decomposition solved. One task = one subagent dispatch. |
| "The existing test is roughly correct, no need to update it" |
If scenario steps changed, the test must reflect those changes. An old test passing does not mean the new behavior is correct. |
| "I'll create a new test file, it's faster" |
If @covered-by already points to an existing test, creating a new file breaks traceability. Update the existing test. |
Red Flags — STOP if you catch yourself:
- Writing implementation code before invoking using-git-worktrees
- Writing implementation code before writing a failing test (in TDD mode)
- Thinking "I'll set up the worktree after this first file"
- Skipping TDD because "the test would be trivial"
- Moving to the next scenario without adding
@covered-by to the .feature file
- Skipping e2e test creation because "the e2e framework is complex to set up"
- Writing a test skeleton instead of an executable test
- Thinking "I'll add the annotations at the end after all scenarios are done"
- Dispatching a single subagent for multiple tasks to "save time"
- Creating a new test file for a scenario that already has
@covered-by pointing to an existing test
- Modifying scenario steps without updating the corresponding e2e test
Mid-Implementation Triggers (mandatory)
- ADR — hard-to-reverse + surprising + real-trade-off decision not in
design.md → write ADR (references/adr-format.md)
- README — module public-interface change → update module README (
references/architecture-format.md)
- New module — creating a new module (new top-level directory with its own concerns) → offer to scaffold its README (
references/architecture-format.md)
Run inline as conditions arise. Don't batch.
Process Flow
digraph apply {
"Select change, read artifacts" [shape=box];
"Invoke using-git-worktrees" [shape=box, style=bold];
"testing.required false?" [shape=diamond];
"No-test mode" [shape=box];
"Invoke test-driven-development" [shape=box, style=bold];
"Gherkin done?" [shape=diamond];
"Gherkin-driven" [shape=box];
"Proposal-driven" [shape=box];
"tasks.md exists?" [shape=diamond];
"Has Task N headings?" [shape=diamond];
"Executor mode\nfollow tasks exactly" [shape=box];
"Planner mode\nextract scenarios/criteria" [shape=box];
"Implementation loop" [shape=box];
"All tasks complete" [shape=doublecircle];
"Select change, read artifacts" -> "Invoke using-git-worktrees";
"Invoke using-git-worktrees" -> "testing.required false?";
"testing.required false?" -> "No-test mode" [label="yes"];
"testing.required false?" -> "Invoke test-driven-development" [label="no"];
"No-test mode" -> "Gherkin done?";
"Invoke test-driven-development" -> "Gherkin done?";
"Gherkin done?" -> "Gherkin-driven" [label="yes"];
"Gherkin done?" -> "Proposal-driven" [label="gherkin skipped"];
"Gherkin-driven" -> "tasks.md exists?";
"Proposal-driven" -> "tasks.md exists?";
"tasks.md exists?" -> "Has Task N headings?" [label="yes"];
"tasks.md exists?" -> "Planner mode\nextract scenarios/criteria" [label="no"];
"Has Task N headings?" -> "Executor mode\nfollow tasks exactly" [label="yes"];
"Has Task N headings?" -> "Planner mode\nextract scenarios/criteria" [label="no"];
"Executor mode\nfollow tasks exactly" -> "Implementation loop";
"Planner mode\nextract scenarios/criteria" -> "Implementation loop";
"Implementation loop" -> "All tasks complete";
}
Input: Optionally specify a change name. If omitted, infer from context or prompt.
Steps
Select the change
If no name provided:
- Look for
beat/changes/ directories (excluding archive/)
- If only one exists, use it (announce: "Using change: ")
- If multiple exist, use AskUserQuestion tool to let user select
Read status.yaml and verify readiness (schema: references/status-schema.md)
Check that either:
gherkin has status: done → Gherkin-driven mode
gherkin has status: skipped AND proposal has status: done → Proposal-driven mode
If neither condition is met: "Features or proposal are required before implementation. Run /beat:design first." STOP.
If status.yaml has source: distill: warn — "This is a distill change; its features describe behavior the code already has, so there is nothing to implement. The intended flow is /beat:verify → /beat:archive." Use AskUserQuestion tool to confirm before proceeding.
Read all artifacts and determine testing mode
Read in order:
proposal.md (if exists) -- business context and risk points
features/*.feature (all files, if gherkin is done) -- implementation targets
design.md (if exists) -- technical decisions
tasks.md (if exists) -- implementation checklist
Read beat/config.yaml (if exists, schema: references/config-schema.md).
Determine testing mode:
- If
testing.required: false → no-test mode: skip TDD cycles for all scenarios, write implementation only
- If
testing.behavior is set → use that framework for @behavior scenarios (skip auto-detection)
- If
testing.e2e is set → use that framework for @e2e scenarios (skip auto-detection)
- If
testing.framework is set (legacy) → treat as testing.behavior
- If
testing is absent or testing.required: true → TDD mode (default): require tests for all scenarios
Determine BDD feature paths (for running e2e tests):
- Base:
beat/features/ (unchanged features; .feature.orig files are invisible to BDD runners)
- If
beat/changes/<name>/features/ contains feature files: add it (new + modified features)
- Combine both paths when invoking BDD runner (e.g.,
npx cucumber-js beat/features beat/changes/<name>/features)
Determine implementation strategy
If tasks.md exists: Use it as the implementation checklist.
- Detailed format (contains
### Task N: headings with Steps): Enter executor mode — follow each step exactly as written, don't re-plan.
- Simple format (only
- [ ] checkboxes): Enter planner mode — plan each task's implementation yourself (existing behavior).
If no tasks.md and Gherkin-driven: Extract each Scenario from feature files as a unit of work (planner mode).
If no tasks.md and Proposal-driven: Extract success criteria and risk points from proposal.md as units of work (planner mode).
Show implementation overview
## Implementing: <change-name>
### Drive mode: gherkin-driven / proposal-driven
### Execution mode: executor / planner
### Tasks/Scenarios to implement:
1. [source] <name>
2. [source] <name>
...
Implement (loop)
For each task (from tasks.md) or scenario (from features) or risk point (from proposal):
a. Announce: "Working on: "
b. Write automated test first (TDD mode only):
- Skip this step if no-test mode
- The test framework: use
testing.behavior or testing.e2e from config (depending on scenario tag), or detect from codebase
Generate vs Update (see references/testing-conventions.md for details):
@covered-by present + test file exists → Update: modify the existing test to reflect new scenario steps
@covered-by present + test file missing → Generate + WARNING (stale annotation)
@covered-by absent → Generate: create new test (existing flow)
For @e2e scenarios (Gherkin-driven):
- Generate (or update) e2e test or step definitions using
testing.e2e framework from config, or auto-detect from codebase
- If the project uses a BDD runner (Cucumber, pytest-bdd, etc.), generate step definitions that bind to the .feature file
- If no BDD runner, generate a regular e2e test with
@feature/@scenario annotations (same as @behavior)
For @behavior scenarios (Gherkin-driven):
For proposal-driven units:
- Generate test files covering the risk point using the project's test framework
- No annotation conventions needed (no features to link to)
For pytest-bdd projects: the
@scenario decorator serves as the annotation — no separate # @feature / # @scenario comments needed (see references/testing-conventions.md).
Follow the conventions in references/testing-conventions.md for annotation format, e2e test style, and Generate vs Update path.
c. Write implementation code:
- Follow design.md decisions if available
- Keep changes minimal and focused on the scenario
- In no-test mode: still write implementation, just without preceding test
d. If using tasks.md: Mark task complete - [ ] -> - [x]
e. Continue to next
f. Scenario completion checklist (verify before moving to next scenario):
For @e2e scenarios (TDD mode):
For @behavior scenarios (TDD mode):
For all scenarios:
Do NOT move to the next scenario until all applicable items are checked.
Pause if:
- Task/scenario is unclear -> ask for clarification
- Implementation reveals design issue -> suggest updating artifacts
- Error or blocker -> report and wait
E2E regression check (after all scenarios implemented)
If @e2e scenarios exist and testing.e2e is configured (or auto-detected):
- Run the full e2e test suite using the combined BDD feature paths
- If any failures → report and pause. Do NOT advance to verify phase.
- All passing → continue to completion.
Skip if no @e2e scenarios or no-test mode.
On completion or pause, show status
If all done: update status.yaml phase to verify
## Implementation Complete
**Change:** <name>
**Scenarios:** N/N implemented with tests
Suggested next steps:
- `/beat:verify` -- validate implementation against artifacts
- `/beat:archive` -- sync features and archive the change
Testing Rule: Conditional TDD
In TDD mode (default when testing.required is true or unset):
- For every Scenario in every .feature file: there MUST be a corresponding automated test
@e2e scenarios → e2e test or step definitions (using project's e2e framework)
@behavior scenarios → test with @feature/@scenario annotations + @covered-by comment in .feature
- The test MUST be executable (not just a skeleton)
- The test framework:
testing.behavior (for @behavior) or testing.e2e (for @e2e) from config, or auto-detect from codebase
- If the project has a BDD runner (Cucumber, pytest-bdd, etc.), generate step definitions that bind directly to .feature files
In proposal-driven mode (gherkin skipped):
- Tests are driven by proposal.md success criteria and risk points
- Each risk point should have corresponding test coverage
- No annotation conventions (no features to link to)
In no-test mode (testing.required: false):
- Tests are not required. Implementation code is written directly.
- Developers may still write tests voluntarily using
testing.behavior/testing.e2e if specified.
Guardrails
- Never implement without reading artifacts first (features in gherkin-driven, proposal in proposal-driven)
- In TDD mode: always write test before implementation
- For
@behavior scenarios: always add @covered-by annotation to .feature after writing the test
- For
@behavior scenarios: always add @feature/@scenario annotations in the test file
- Keep each change scoped to one scenario/task
- Update task checkbox immediately after completing each task
- Pause on errors, blockers, or unclear requirements -- don't guess
- If implementation reveals issues with features/design, suggest updating artifacts
1---2name: apply3description: Use when implementing a Beat change — requires gherkin or proposal artifact to be done first4---56Implement code based on the change artifacts. Supports two modes:78- **Gherkin-driven** (default): feature files drive implementation and testing9- **Proposal-driven**: when gherkin is skipped (technical changes), proposal drives testing1011<decision_boundary>1213**Use for:**14- Implementing code for a Beat change that has spec artifacts (gherkin or proposal) done15- TDD implementation driven by feature files or proposal risk points16- Resuming implementation of a partially completed change1718**NOT for:**19- Creating spec artifacts like proposal, gherkin, or design.md (use `/beat:design`)20- Breaking down tasks or creating execution plans (use `/beat:plan`)21- Verifying implementation completeness (use `/beat:verify`)22- Exploring ideas or investigating a problem (use `/beat:explore`)2324**Trigger examples:**25- "Implement the change" / "Start coding" / "Apply the plan" / "TDD the scenarios"26- Should NOT trigger: "design a feature" / "break down tasks" / "verify the implementation"2728</decision_boundary>2930<HARD-GATE>31Before any code changes: you MUST invoke superpowers:using-git-worktrees to verify isolation32(should already exist from design/plan; creates one if not).33In TDD mode: you MUST invoke superpowers:test-driven-development.34Invoke in order: worktrees first (verify), then TDD (discipline).35If a prerequisite skill is unavailable (not installed), continue without it — but NEVER skip36because you judged it unnecessary.37</HARD-GATE>3839**Prerequisites** (invoke before proceeding)4041| Superpower | When | Priority |42|-----------|------|----------|43| using-git-worktrees | Verify isolation (should exist from design/plan; creates if not) | MUST |44| test-driven-development | At start, in TDD mode | MUST |45| systematic-debugging | When stuck (3 failed attempts) | SHOULD |46| subagent-driven-development | When tasks.md has multiple independent tasks | SHOULD |4748Invoke in order: worktrees first (verify isolation), then TDD (discipline). Debugging and subagent are conditional — only invoke when triggered. If a superpower is unavailable (skill not installed), skip and continue.4950## Rationalization Prevention5152| Thought | Reality |53|---------|---------|54| "The change is small, I don't need a worktree" | Worktrees protect against contamination. The worktree should already exist from design/plan — verify, don't skip. |55| "I'll write the test after the implementation, same result" | TDD is about design feedback, not just test coverage. Writing tests after loses the design signal. |56| "This is a refactor, TDD doesn't apply" | Refactors need tests most — they prove behavior is preserved. If testing.required is false, TDD is already skipped. |57| "I'll add @covered-by annotations at the end for all scenarios" | Annotations must be added per-scenario immediately after writing the test. Batching them leads to forgetting. |58| "The e2e test setup is too complex, I'll write a unit test instead" | The scenario is tagged @e2e for a reason. If e2e setup is genuinely blocked, announce the blocker and ask — don't silently downgrade. |59| "This @behavior test is obvious, a skeleton is enough" | Every test must be executable. A skeleton that doesn't run is not a test. |60| "These tasks are small, I'll combine them for efficiency" | Each task is bounded for a reason. Merging recreates the oversized-output problem that decomposition solved. One task = one subagent dispatch. |61| "The existing test is roughly correct, no need to update it" | If scenario steps changed, the test must reflect those changes. An old test passing does not mean the new behavior is correct. |62| "I'll create a new test file, it's faster" | If @covered-by already points to an existing test, creating a new file breaks traceability. Update the existing test. |6364## Red Flags — STOP if you catch yourself:6566- Writing implementation code before invoking using-git-worktrees67- Writing implementation code before writing a failing test (in TDD mode)68- Thinking "I'll set up the worktree after this first file"69- Skipping TDD because "the test would be trivial"70- Moving to the next scenario without adding `@covered-by` to the .feature file71- Skipping e2e test creation because "the e2e framework is complex to set up"72- Writing a test skeleton instead of an executable test73- Thinking "I'll add the annotations at the end after all scenarios are done"74- Dispatching a single subagent for multiple tasks to "save time"75- Creating a new test file for a scenario that already has `@covered-by` pointing to an existing test76- Modifying scenario steps without updating the corresponding e2e test7778## Mid-Implementation Triggers (mandatory)7980- **ADR** — hard-to-reverse + surprising + real-trade-off decision not in `design.md` → write ADR (`references/adr-format.md`)81- **README** — module public-interface change → update module README (`references/architecture-format.md`)82- **New module** — creating a new module (new top-level directory with its own concerns) → offer to scaffold its README (`references/architecture-format.md`)8384Run inline as conditions arise. Don't batch.8586## Process Flow8788```dot89digraph apply {90 "Select change, read artifacts" [shape=box];91 "Invoke using-git-worktrees" [shape=box, style=bold];92 "testing.required false?" [shape=diamond];93 "No-test mode" [shape=box];94 "Invoke test-driven-development" [shape=box, style=bold];95 "Gherkin done?" [shape=diamond];96 "Gherkin-driven" [shape=box];97 "Proposal-driven" [shape=box];98 "tasks.md exists?" [shape=diamond];99 "Has Task N headings?" [shape=diamond];100 "Executor mode\nfollow tasks exactly" [shape=box];101 "Planner mode\nextract scenarios/criteria" [shape=box];102 "Implementation loop" [shape=box];103 "All tasks complete" [shape=doublecircle];104105 "Select change, read artifacts" -> "Invoke using-git-worktrees";106 "Invoke using-git-worktrees" -> "testing.required false?";107 "testing.required false?" -> "No-test mode" [label="yes"];108 "testing.required false?" -> "Invoke test-driven-development" [label="no"];109 "No-test mode" -> "Gherkin done?";110 "Invoke test-driven-development" -> "Gherkin done?";111 "Gherkin done?" -> "Gherkin-driven" [label="yes"];112 "Gherkin done?" -> "Proposal-driven" [label="gherkin skipped"];113 "Gherkin-driven" -> "tasks.md exists?";114 "Proposal-driven" -> "tasks.md exists?";115 "tasks.md exists?" -> "Has Task N headings?" [label="yes"];116 "tasks.md exists?" -> "Planner mode\nextract scenarios/criteria" [label="no"];117 "Has Task N headings?" -> "Executor mode\nfollow tasks exactly" [label="yes"];118 "Has Task N headings?" -> "Planner mode\nextract scenarios/criteria" [label="no"];119 "Executor mode\nfollow tasks exactly" -> "Implementation loop";120 "Planner mode\nextract scenarios/criteria" -> "Implementation loop";121 "Implementation loop" -> "All tasks complete";122}123```124125**Input**: Optionally specify a change name. If omitted, infer from context or prompt.126127**Steps**1281291. **Select the change**130131 If no name provided:132 - Look for `beat/changes/` directories (excluding `archive/`)133 - If only one exists, use it (announce: "Using change: <name>")134 - If multiple exist, use **AskUserQuestion tool** to let user select1351362. **Read status.yaml and verify readiness** (schema: `references/status-schema.md`)137138 Check that either:139 - `gherkin` has `status: done` → **Gherkin-driven mode**140 - `gherkin` has `status: skipped` AND `proposal` has `status: done` → **Proposal-driven mode**141142 If neither condition is met: "Features or proposal are required before implementation. Run `/beat:design` first." STOP.143144 If `status.yaml` has `source: distill`: warn — "This is a distill change; its features describe behavior the code already has, so there is nothing to implement. The intended flow is `/beat:verify` → `/beat:archive`." Use **AskUserQuestion tool** to confirm before proceeding.1451463. **Read all artifacts and determine testing mode**147148 Read in order:149 - `proposal.md` (if exists) -- business context and risk points150 - `features/*.feature` (all files, if gherkin is done) -- implementation targets151 - `design.md` (if exists) -- technical decisions152 - `tasks.md` (if exists) -- implementation checklist153154 Read `beat/config.yaml` (if exists, schema: `references/config-schema.md`).155156 **Determine testing mode:**157 - If `testing.required: false` → **no-test mode**: skip TDD cycles for all scenarios, write implementation only158 - If `testing.behavior` is set → use that framework for `@behavior` scenarios (skip auto-detection)159 - If `testing.e2e` is set → use that framework for `@e2e` scenarios (skip auto-detection)160 - If `testing.framework` is set (legacy) → treat as `testing.behavior`161 - If `testing` is absent or `testing.required: true` → **TDD mode** (default): require tests for all scenarios162163 **Determine BDD feature paths** (for running e2e tests):164 - Base: `beat/features/` (unchanged features; `.feature.orig` files are invisible to BDD runners)165 - If `beat/changes/<name>/features/` contains feature files: add it (new + modified features)166 - Combine both paths when invoking BDD runner (e.g., `npx cucumber-js beat/features beat/changes/<name>/features`)1671684. **Determine implementation strategy**169170 **If tasks.md exists:** Use it as the implementation checklist.171 - **Detailed format** (contains `### Task N:` headings with Steps): Enter **executor mode** — follow each step exactly as written, don't re-plan.172 - **Simple format** (only `- [ ]` checkboxes): Enter **planner mode** — plan each task's implementation yourself (existing behavior).173174 **If no tasks.md and Gherkin-driven:** Extract each Scenario from feature files as a unit of work (planner mode).175176 **If no tasks.md and Proposal-driven:** Extract success criteria and risk points from proposal.md as units of work (planner mode).1771785. **Show implementation overview**179180 ```181 ## Implementing: <change-name>182183 ### Drive mode: gherkin-driven / proposal-driven184 ### Execution mode: executor / planner185 ### Tasks/Scenarios to implement:186 1. [source] <name>187 2. [source] <name>188 ...189 ```1901916. **Implement (loop)**192193 For each task (from tasks.md) or scenario (from features) or risk point (from proposal):194195 a. **Announce**: "Working on: <description>"196197 b. **Write automated test first** (TDD mode only):198 - Skip this step if **no-test mode**199 - The test framework: use `testing.behavior` or `testing.e2e` from config (depending on scenario tag), or detect from codebase200201 **Generate vs Update** (see `references/testing-conventions.md` for details):202 - `@covered-by` present + test file exists → **Update**: modify the existing test to reflect new scenario steps203 - `@covered-by` present + test file missing → **Generate** + WARNING (stale annotation)204 - `@covered-by` absent → **Generate**: create new test (existing flow)205206 **For `@e2e` scenarios (Gherkin-driven):**207 - Generate (or update) e2e test or step definitions using `testing.e2e` framework from config, or auto-detect from codebase208 - If the project uses a BDD runner (Cucumber, pytest-bdd, etc.), generate step definitions that bind to the .feature file209 - If no BDD runner, generate a regular e2e test with `@feature`/`@scenario` annotations (same as `@behavior`)210211 **For `@behavior` scenarios (Gherkin-driven):**212 - Generate a test file (using `testing.behavior` from config, or auto-detect) with annotation comments:213 ```214 @feature: <feature-filename>.feature215 @scenario: <exact scenario name>216 ```217 (Use the project language's comment syntax: `//` for JS/TS/Java/C#, `#` for Python/Ruby, etc.)218 - After writing the test, update the .feature file with a `@covered-by` annotation (placed between the tag and the scenario line):219 ```gherkin220 @behavior @happy-path221 # @covered-by: <relative path to test file>222 Scenario: <name>223 ```224225 **For proposal-driven units:**226 - Generate test files covering the risk point using the project's test framework227 - No annotation conventions needed (no features to link to)228 **For pytest-bdd projects:** the `@scenario` decorator serves as the annotation — no separate `# @feature` / `# @scenario` comments needed (see `references/testing-conventions.md`).229230 Follow the conventions in `references/testing-conventions.md` for annotation format, e2e test style, and Generate vs Update path.231232 c. **Write implementation code**:233 - Follow design.md decisions if available234 - Keep changes minimal and focused on the scenario235 - In no-test mode: still write implementation, just without preceding test236237 d. **If using tasks.md**: Mark task complete `- [ ]` -> `- [x]`238239 e. **Continue to next**240241 f. **Scenario completion checklist** (verify before moving to next scenario):242243 **For `@e2e` scenarios (TDD mode):**244 - [ ] E2e test or step definition exists and is executable245 - [ ] Test references the scenario (`@feature`/`@scenario` annotations or BDD binding)246 - [ ] `# @covered-by: <path>` annotation added to .feature file (between tag and Scenario line)247248 **For `@behavior` scenarios (TDD mode):**249 - [ ] Test file exists with `@feature` and `@scenario` comments250 - [ ] `# @covered-by: <path>` annotation added to .feature file (between tag and Scenario line)251 - [ ] Test is executable (not a skeleton)252253 **For all scenarios:**254 - [ ] Implementation code handles the scenario's behavior255 - [ ] Task checkbox marked complete (if using tasks.md)256257 Do NOT move to the next scenario until all applicable items are checked.258259 **Pause if:**260 - Task/scenario is unclear -> ask for clarification261 - Implementation reveals design issue -> suggest updating artifacts262 - Error or blocker -> report and wait2632647. **E2E regression check** (after all scenarios implemented)265266 If `@e2e` scenarios exist and `testing.e2e` is configured (or auto-detected):267 - Run the full e2e test suite using the combined BDD feature paths268 - If any failures → report and pause. Do NOT advance to verify phase.269 - All passing → continue to completion.270271 Skip if no `@e2e` scenarios or no-test mode.2722738. **On completion or pause, show status**274275 If all done: update `status.yaml` phase to `verify`276 ```277 ## Implementation Complete278279 **Change:** <name>280 **Scenarios:** N/N implemented with tests281282 Suggested next steps:283 - `/beat:verify` -- validate implementation against artifacts284 - `/beat:archive` -- sync features and archive the change285 ```286287**Testing Rule: Conditional TDD**288289**In TDD mode** (default when `testing.required` is true or unset):290- For every Scenario in every .feature file: there MUST be a corresponding automated test291- `@e2e` scenarios → e2e test or step definitions (using project's e2e framework)292- `@behavior` scenarios → test with `@feature`/`@scenario` annotations + `@covered-by` comment in .feature293- The test MUST be executable (not just a skeleton)294- The test framework: `testing.behavior` (for @behavior) or `testing.e2e` (for @e2e) from config, or auto-detect from codebase295- If the project has a BDD runner (Cucumber, pytest-bdd, etc.), generate step definitions that bind directly to .feature files296297**In proposal-driven mode** (gherkin skipped):298- Tests are driven by proposal.md success criteria and risk points299- Each risk point should have corresponding test coverage300- No annotation conventions (no features to link to)301302**In no-test mode** (`testing.required: false`):303- Tests are not required. Implementation code is written directly.304- Developers may still write tests voluntarily using `testing.behavior`/`testing.e2e` if specified.305306**Guardrails**307- Never implement without reading artifacts first (features in gherkin-driven, proposal in proposal-driven)308- In TDD mode: always write test before implementation309- For `@behavior` scenarios: always add `@covered-by` annotation to .feature after writing the test310- For `@behavior` scenarios: always add `@feature`/`@scenario` annotations in the test file311- Keep each change scoped to one scenario/task312- Update task checkbox immediately after completing each task313- Pause on errors, blockers, or unclear requirements -- don't guess314- If implementation reveals issues with features/design, suggest updating artifacts