From 87aa3e864c2cd259b81d8ce2204eeb2d002b1057 Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Tue, 23 Jun 2026 04:02:24 -0700 Subject: [PATCH] fix: tighten dev auto workflow contract --- docs/reference/commands.md | 3 ++- docs/reference/workflow-map.md | 1 + src/bmm-skills/4-implementation/bmad-dev-auto/SKILL.md | 2 +- .../bmad-dev-auto/step-01-clarify-and-route.md | 3 ++- .../4-implementation/bmad-dev-auto/step-03-implement.md | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/reference/commands.md b/docs/reference/commands.md index dc11760b5..1633d0afe 100644 --- a/docs/reference/commands.md +++ b/docs/reference/commands.md @@ -99,7 +99,8 @@ Workflow skills run a structured, multi-step process without loading an agent pe | `bmad-create-epics-and-stories` | Create epics and stories | | `bmad-dev-story` | Implement a story | | `bmad-code-review` | Run a code review | -| `bmad-quick-dev` | Unified quick flow — clarify intent, plan, implement, review, present | +| `bmad-quick-dev` | Implement a story or any other small intent — clarify, plan, implement, review, present | +| `bmad-dev-auto` | One unattended development-loop iteration — small intent in, code out, no human interaction | See [Workflow Map](./workflow-map.md) for the complete workflow reference organized by phase. diff --git a/docs/reference/workflow-map.md b/docs/reference/workflow-map.md index 50784e771..9b9e6f970 100644 --- a/docs/reference/workflow-map.md +++ b/docs/reference/workflow-map.md @@ -94,6 +94,7 @@ Skip phases 1-3 for small, well-understood work. | Workflow | Purpose | Produces | |------------------|---------------------------------------------------------------------------|--------------------| | `bmad-quick-dev` | Unified quick flow — clarify intent, plan, implement, review, and present | `spec-*.md` + code | +| `bmad-dev-auto` | One unattended development-loop iteration — small intent in, code out | `spec-*.md` + code | ## Context Management diff --git a/src/bmm-skills/4-implementation/bmad-dev-auto/SKILL.md b/src/bmm-skills/4-implementation/bmad-dev-auto/SKILL.md index d9e48844f..fbb32c5a7 100644 --- a/src/bmm-skills/4-implementation/bmad-dev-auto/SKILL.md +++ b/src/bmm-skills/4-implementation/bmad-dev-auto/SKILL.md @@ -14,7 +14,7 @@ description: 'One iteration of an unattended development loop. Use when invoked To HALT with a final status and optional blocking condition: 1. If `{spec_file}` is known and exists, update `status` in frontmatter and append missing result details under `## Auto Run Result`. -2. If `{spec_file}` is unknown or missing, create `{implementation_artifacts}/bmad-dev-auto-result-{slug-or-timestamp}.md` with: +2. If `{spec_file}` is unknown or missing, create `{implementation_artifacts}/bmad-dev-auto-result-.md` with: ```markdown --- status: diff --git a/src/bmm-skills/4-implementation/bmad-dev-auto/step-01-clarify-and-route.md b/src/bmm-skills/4-implementation/bmad-dev-auto/step-01-clarify-and-route.md index 94632a605..aed4f03e4 100644 --- a/src/bmm-skills/4-implementation/bmad-dev-auto/step-01-clarify-and-route.md +++ b/src/bmm-skills/4-implementation/bmad-dev-auto/step-01-clarify-and-route.md @@ -19,6 +19,7 @@ If the invocation prompt explicitly points to an existing spec file with recogni - `draft` → `./step-02-plan.md` - `ready-for-dev` or `in-progress` → `./step-03-implement.md` - `in-review` → `./step-04-review.md` +- `blocked` → HALT with status `blocked` and blocking condition `blocked spec supplied`. - `done` → ingest as context and proceed to INSTRUCTIONS — do not resume. Otherwise, treat the invocation prompt as starting intent. This may be a story ID, ticket ID, file path, short description, or longer free-form intent. Do not infer workflow state from non-spec files. @@ -39,7 +40,7 @@ If the invocation prompt does not contain enough intent to identify what to impl - **If valid:** load it as the primary planning context. Do not load raw planning docs (PRD, architecture, UX, etc.). - **If missing, empty, or invalid:** compile it in the next bullet. - 3. **Compile epic context if needed.** If no valid cached epic context was loaded, produce `{implementation_artifacts}/epic--context.md` by spawning a sub-agent with `./compile-epic-context.md` as its prompt. Pass it the epic number, the epics file path, the `{planning_artifacts}` directory, and the output path `{implementation_artifacts}/epic--context.md`. If sub-agents are unavailable, HALT with status `blocked` and blocking condition `no subagents`. + 3. **Compile epic context if needed.** If no valid cached epic context was loaded, produce `{implementation_artifacts}/epic--context.md` by spawning a sub-agent with `./compile-epic-context.md` as its prompt. Pass it the epic number, the epics file path, the `{planning_artifacts}` directory, and the output path `{implementation_artifacts}/epic--context.md`. 4. **Verify if compiled.** If epic context was compiled, verify the output file exists, is non-empty, and starts with `# Epic Context:`. If valid, load it. If verification fails, HALT with status `blocked` and blocking condition `context compilation verification failed`. diff --git a/src/bmm-skills/4-implementation/bmad-dev-auto/step-03-implement.md b/src/bmm-skills/4-implementation/bmad-dev-auto/step-03-implement.md index 8be1441e8..52a8a65ff 100644 --- a/src/bmm-skills/4-implementation/bmad-dev-auto/step-03-implement.md +++ b/src/bmm-skills/4-implementation/bmad-dev-auto/step-03-implement.md @@ -25,7 +25,7 @@ Change `{spec_file}` status to `in-progress` in the frontmatter before starting If `{spec_file}` has a non-empty `context:` list in its frontmatter, load those files before implementation begins. When handing to a sub-agent, include them in the sub-agent prompt so it has access to the referenced context. -Hand `{spec_file}` to a sub-agent/task and let it implement. If no sub-agents are available, HALT with status `blocked` and blocking condition `implementation subagent unavailable`. +Hand `{spec_file}` to a sub-agent/task and let it implement. **Path formatting rule:** Any markdown links written into `{spec_file}` must use paths relative to `{spec_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.