fix: tighten dev auto workflow contract
This commit is contained in:
parent
0a32fcb65e
commit
87aa3e864c
|
|
@ -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-create-epics-and-stories` | Create epics and stories |
|
||||||
| `bmad-dev-story` | Implement a story |
|
| `bmad-dev-story` | Implement a story |
|
||||||
| `bmad-code-review` | Run a code review |
|
| `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.
|
See [Workflow Map](./workflow-map.md) for the complete workflow reference organized by phase.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,7 @@ Skip phases 1-3 for small, well-understood work.
|
||||||
| Workflow | Purpose | Produces |
|
| Workflow | Purpose | Produces |
|
||||||
|------------------|---------------------------------------------------------------------------|--------------------|
|
|------------------|---------------------------------------------------------------------------|--------------------|
|
||||||
| `bmad-quick-dev` | Unified quick flow — clarify intent, plan, implement, review, and present | `spec-*.md` + code |
|
| `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
|
## Context Management
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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:
|
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`.
|
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-<slug-or-timestamp>.md` with:
|
||||||
```markdown
|
```markdown
|
||||||
---
|
---
|
||||||
status: <final status>
|
status: <final status>
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ If the invocation prompt explicitly points to an existing spec file with recogni
|
||||||
- `draft` → `./step-02-plan.md`
|
- `draft` → `./step-02-plan.md`
|
||||||
- `ready-for-dev` or `in-progress` → `./step-03-implement.md`
|
- `ready-for-dev` or `in-progress` → `./step-03-implement.md`
|
||||||
- `in-review` → `./step-04-review.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.
|
- `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.
|
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 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.
|
- **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-<N>-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-<N>-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-<N>-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-<N>-context.md`.
|
||||||
|
|
||||||
4. **Verify if compiled.** If epic context was compiled, verify the output file exists, is non-empty, and starts with `# Epic <N> Context:`. If valid, load it. If verification fails, HALT with status `blocked` and blocking condition `context compilation verification failed`.
|
4. **Verify if compiled.** If epic context was compiled, verify the output file exists, is non-empty, and starts with `# Epic <N> Context:`. If valid, load it. If verification fails, HALT with status `blocked` and blocking condition `context compilation verification failed`.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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.
|
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.
|
**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.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue