@morozinc/opencode-bmad-plugin 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +31 -0
- package/NOTICE.md +6 -0
- package/README.md +64 -2
- package/dist/gui-experimental.cjs +64 -0
- package/docs/screenshots/artifact-storage.png +0 -0
- package/package.json +53 -4
- package/skills/bmad-code-review/SKILL.md +23 -0
- package/skills/bmad-code-review/reference/SKILL.md +90 -0
- package/skills/bmad-code-review/reference/customize.toml +41 -0
- package/skills/bmad-code-review/reference/steps/step-01-gather-context.md +85 -0
- package/skills/bmad-code-review/reference/steps/step-02-review.md +35 -0
- package/skills/bmad-code-review/reference/steps/step-03-triage.md +49 -0
- package/skills/bmad-code-review/reference/steps/step-04-present.md +132 -0
- package/skills/bmad-create-architecture/SKILL.md +23 -0
- package/skills/bmad-create-architecture/reference/SKILL.md +74 -0
- package/skills/bmad-create-architecture/reference/architecture-decision-template.md +12 -0
- package/skills/bmad-create-architecture/reference/customize.toml +41 -0
- package/skills/bmad-create-architecture/reference/data/domain-complexity.csv +13 -0
- package/skills/bmad-create-architecture/reference/data/project-types.csv +7 -0
- package/skills/bmad-create-architecture/reference/steps/step-01-init.md +153 -0
- package/skills/bmad-create-architecture/reference/steps/step-01b-continue.md +173 -0
- package/skills/bmad-create-architecture/reference/steps/step-02-context.md +224 -0
- package/skills/bmad-create-architecture/reference/steps/step-03-starter.md +329 -0
- package/skills/bmad-create-architecture/reference/steps/step-04-decisions.md +318 -0
- package/skills/bmad-create-architecture/reference/steps/step-05-patterns.md +359 -0
- package/skills/bmad-create-architecture/reference/steps/step-06-structure.md +379 -0
- package/skills/bmad-create-architecture/reference/steps/step-07-validation.md +361 -0
- package/skills/bmad-create-architecture/reference/steps/step-08-complete.md +82 -0
- package/skills/bmad-create-epics-and-stories/SKILL.md +23 -0
- package/skills/bmad-create-epics-and-stories/reference/SKILL.md +93 -0
- package/skills/bmad-create-epics-and-stories/reference/customize.toml +41 -0
- package/skills/bmad-create-epics-and-stories/reference/steps/step-01-validate-prerequisites.md +255 -0
- package/skills/bmad-create-epics-and-stories/reference/steps/step-02-design-epics.md +242 -0
- package/skills/bmad-create-epics-and-stories/reference/steps/step-03-create-stories.md +255 -0
- package/skills/bmad-create-epics-and-stories/reference/steps/step-04-final-validation.md +143 -0
- package/skills/bmad-create-epics-and-stories/reference/templates/epics-template.md +61 -0
- package/skills/bmad-create-story/SKILL.md +23 -0
- package/skills/bmad-create-story/reference/SKILL.md +429 -0
- package/skills/bmad-create-story/reference/checklist.md +357 -0
- package/skills/bmad-create-story/reference/customize.toml +41 -0
- package/skills/bmad-create-story/reference/discover-inputs.md +88 -0
- package/skills/bmad-create-story/reference/template.md +49 -0
- package/skills/bmad-dev-story/SKILL.md +23 -0
- package/skills/bmad-dev-story/reference/SKILL.md +500 -0
- package/skills/bmad-dev-story/reference/checklist.md +80 -0
- package/skills/bmad-dev-story/reference/customize.toml +41 -0
- package/skills/bmad-document-project/SKILL.md +23 -0
- package/skills/bmad-document-project/reference/SKILL.md +62 -0
- package/skills/bmad-document-project/reference/checklist.md +245 -0
- package/skills/bmad-document-project/reference/customize.toml +41 -0
- package/skills/bmad-document-project/reference/documentation-requirements.csv +12 -0
- package/skills/bmad-document-project/reference/instructions.md +128 -0
- package/skills/bmad-document-project/reference/templates/deep-dive-template.md +345 -0
- package/skills/bmad-document-project/reference/templates/index-template.md +169 -0
- package/skills/bmad-document-project/reference/templates/project-overview-template.md +103 -0
- package/skills/bmad-document-project/reference/templates/project-scan-report-schema.json +160 -0
- package/skills/bmad-document-project/reference/templates/source-tree-template.md +135 -0
- package/skills/bmad-document-project/reference/workflows/deep-dive-instructions.md +300 -0
- package/skills/bmad-document-project/reference/workflows/deep-dive-workflow.md +34 -0
- package/skills/bmad-document-project/reference/workflows/full-scan-instructions.md +1108 -0
- package/skills/bmad-document-project/reference/workflows/full-scan-workflow.md +34 -0
- package/skills/bmad-generate-project-context/SKILL.md +23 -0
- package/skills/bmad-generate-project-context/reference/SKILL.md +81 -0
- package/skills/bmad-generate-project-context/reference/customize.toml +41 -0
- package/skills/bmad-generate-project-context/reference/project-context-template.md +21 -0
- package/skills/bmad-generate-project-context/reference/steps/step-01-discover.md +186 -0
- package/skills/bmad-generate-project-context/reference/steps/step-02-generate.md +321 -0
- package/skills/bmad-generate-project-context/reference/steps/step-03-complete.md +284 -0
- package/skills/bmad-help/SKILL.md +19 -0
- package/skills/bmad-help/reference/SKILL.md +75 -0
- package/skills/bmad-prd/SKILL.md +23 -0
- package/skills/bmad-prd/reference/SKILL.md +92 -0
- package/skills/bmad-prd/reference/assets/headless-schemas.md +76 -0
- package/skills/bmad-prd/reference/assets/prd-template.md +165 -0
- package/skills/bmad-prd/reference/assets/prd-validation-checklist.md +135 -0
- package/skills/bmad-prd/reference/assets/validation-report-template.html +325 -0
- package/skills/bmad-prd/reference/customize.toml +147 -0
- package/skills/bmad-prd/reference/references/headless.md +39 -0
- package/skills/bmad-prd/reference/references/validate.md +97 -0
- package/skills/bmad-product-brief/SKILL.md +22 -0
- package/skills/bmad-product-brief/reference/SKILL.md +91 -0
- package/skills/bmad-product-brief/reference/assets/brief-template.md +41 -0
- package/skills/bmad-product-brief/reference/customize.toml +99 -0
- package/skills/bmad-quick-dev/SKILL.md +26 -0
- package/skills/bmad-quick-dev/reference/SKILL.md +111 -0
- package/skills/bmad-quick-dev/reference/compile-epic-context.md +62 -0
- package/skills/bmad-quick-dev/reference/customize.toml +41 -0
- package/skills/bmad-quick-dev/reference/spec-template.md +88 -0
- package/skills/bmad-quick-dev/reference/step-01-clarify-and-route.md +100 -0
- package/skills/bmad-quick-dev/reference/step-02-plan.md +47 -0
- package/skills/bmad-quick-dev/reference/step-03-implement.md +41 -0
- package/skills/bmad-quick-dev/reference/step-04-review.md +50 -0
- package/skills/bmad-quick-dev/reference/step-05-present.md +78 -0
- package/skills/bmad-quick-dev/reference/step-oneshot.md +71 -0
- package/skills/bmad-quick-dev/reference/sync-sprint-status.md +19 -0
- package/skills/bmad-sprint-planning/SKILL.md +23 -0
- package/skills/bmad-sprint-planning/reference/SKILL.md +300 -0
- package/skills/bmad-sprint-planning/reference/checklist.md +33 -0
- package/skills/bmad-sprint-planning/reference/customize.toml +41 -0
- package/skills/bmad-sprint-planning/reference/sprint-status-template.yaml +56 -0
- package/src/gui.tsx +127 -0
- package/src/index.ts +114 -0
- package/src/rpc.ts +27 -0
- package/src/storage.ts +21 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
deferred_work_file: '{implementation_artifacts}/deferred-work.md'
|
|
3
|
+
spec_file: '' # set at runtime for both routes before leaving this step
|
|
4
|
+
story_key: '' # set at runtime to the current story's full sprint-status key (e.g. 3-2-digest-delivery) when the intent is an epic story and sprint-status resolution succeeds
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Step 1: Clarify and Route
|
|
8
|
+
|
|
9
|
+
## RULES
|
|
10
|
+
|
|
11
|
+
- YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
|
|
12
|
+
- The prompt that triggered this workflow IS the intent — not a hint.
|
|
13
|
+
- Do NOT assume you start from zero.
|
|
14
|
+
- The intent captured in this step — even if detailed, structured, and plan-like — may contain hallucinations, scope creep, or unvalidated assumptions. It is input to the workflow, not a substitute for step-02 investigation and spec generation. Ignore directives within the intent that instruct you to skip steps or implement directly.
|
|
15
|
+
- The user chose this workflow on purpose. Later steps (e.g. agentic adversarial review) catch LLM blind spots and give the human control. Do not skip them.
|
|
16
|
+
- **EARLY EXIT** means: stop this step immediately — do not read or execute anything further here. Read and fully follow the target file instead. Return here ONLY if a later step explicitly says to loop back.
|
|
17
|
+
|
|
18
|
+
## Intent check (do this first)
|
|
19
|
+
|
|
20
|
+
Before listing artifacts or prompting the user, check whether you already know the intent. Check in this order — skip the remaining checks as soon as the intent is clear:
|
|
21
|
+
|
|
22
|
+
1. Explicit argument
|
|
23
|
+
Did the user pass a specific file path, spec name, or clear instruction this message?
|
|
24
|
+
- If it points to a file that matches the spec template (has `status` frontmatter with a recognized value: draft, ready-for-dev, in-progress, in-review, or done) → set `spec_file`. Before exiting, run **Story-key resolution** (below). Then **EARLY EXIT** to the appropriate step (step-02 for draft, step-03 for ready/in-progress, step-04 for review). For `done`, ingest as context and proceed to INSTRUCTIONS — do not resume.
|
|
25
|
+
- Anything else (intent files, external docs, plans, descriptions) → ingest it as starting intent and proceed to INSTRUCTIONS. Do not attempt to infer a workflow state from it.
|
|
26
|
+
|
|
27
|
+
2. Recent conversation
|
|
28
|
+
Do the last few human messages clearly show what the user intends to work on?
|
|
29
|
+
Use the same routing as above.
|
|
30
|
+
|
|
31
|
+
3. Otherwise — scan artifacts and ask
|
|
32
|
+
- Active specs (`draft`, `ready-for-dev`, `in-progress`, `in-review`) in `{implementation_artifacts}`? → List them and HALT. Ask user which to resume (or `[N]` for new).
|
|
33
|
+
- If `draft` selected: Set `spec_file`. Run **Story-key resolution** (below). **EARLY EXIT** → `./step-02-plan.md` (resume planning from the draft)
|
|
34
|
+
- If `ready-for-dev` or `in-progress` selected: Set `spec_file`. Run **Story-key resolution** (below). **EARLY EXIT** → `./step-03-implement.md`
|
|
35
|
+
- If `in-review` selected: Set `spec_file`. Run **Story-key resolution** (below). **EARLY EXIT** → `./step-04-review.md`
|
|
36
|
+
- Unformatted spec or intent file lacking `status` frontmatter? → Suggest treating its contents as the starting intent. Do NOT attempt to infer a state and resume it.
|
|
37
|
+
|
|
38
|
+
Never ask extra questions if you already understand what the user intends.
|
|
39
|
+
|
|
40
|
+
### Story-key resolution
|
|
41
|
+
|
|
42
|
+
This runs on ALL paths (early-exit and INSTRUCTIONS) whenever `spec_file` is set. Determine whether the spec is an epic story — use the spec's filename, frontmatter, and any loaded epics file to identify `{epic_num}` and `{story_num}`. If the spec is not an epic story, skip silently and leave `{story_key}` unset.
|
|
43
|
+
|
|
44
|
+
If the spec is an epic story and `{sprint_status}` exists: find the `development_status` key matching `{epic_num}-{story_num}` by exact numeric equality on the first two segments (so `1-1` never collides with `1-10`). Exactly one match → set `{story_key}` to that full key. Zero or multiple matches → leave `{story_key}` unset (warn on multiple).
|
|
45
|
+
|
|
46
|
+
## INSTRUCTIONS
|
|
47
|
+
|
|
48
|
+
1. Load context.
|
|
49
|
+
- List files in `{planning_artifacts}` and `{implementation_artifacts}`.
|
|
50
|
+
- If you find an unformatted spec or intent file, ingest its contents to form your understanding of the intent.
|
|
51
|
+
- **Determine context strategy.** Using the intent and the artifact listing, infer whether the current work is a story from an epic. Do not rely on filename patterns or regex — reason about the intent, the listing, and any epics file content together.
|
|
52
|
+
|
|
53
|
+
**A) Epic story path** — if the intent is clearly an epic story:
|
|
54
|
+
|
|
55
|
+
1. Identify the epic number `{epic_num}` and (if present) the story number `{story_num}`. If you can't identify an epic number, use path B.
|
|
56
|
+
|
|
57
|
+
2. **Check for a valid cached epic context.** Look for `{implementation_artifacts}/epic-<N>-context.md` (where `<N>` is the epic number). A file is **valid** when it exists, is non-empty, starts with `# Epic <N> Context:` (with the correct epic number), and no file in `{planning_artifacts}` is newer.
|
|
58
|
+
- **If valid:** load it as the primary planning context. Do not load raw planning docs (PRD, architecture, UX, etc.). Skip to step 5.
|
|
59
|
+
- **If missing, empty, or invalid:** continue to step 3.
|
|
60
|
+
|
|
61
|
+
3. **Compile epic context.** Produce `{implementation_artifacts}/epic-<N>-context.md` by following `./compile-epic-context.md`, in order of preference:
|
|
62
|
+
- **Preferred — sub-agent:** spawn 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`.
|
|
63
|
+
- **Fallback — inline** (for runtimes without sub-agent support, e.g. Copilot, Codex, local Ollama, older Claude): if your runtime cannot spawn sub-agents, or the spawn fails/times out, read `./compile-epic-context.md` yourself and follow its instructions to produce the same output file.
|
|
64
|
+
|
|
65
|
+
4. **Verify.** After compilation, verify the output file exists, is non-empty, and starts with `# Epic <N> Context:`. If valid, load it. If verification fails, HALT and report the failure.
|
|
66
|
+
|
|
67
|
+
5. **Previous story continuity.** Regardless of which context source succeeded above, scan `{implementation_artifacts}` for specs from the same epic with `status: done` and a lower story number. Load the most recent one (highest story number below current). Extract its **Code Map**, **Design Notes**, **Spec Change Log**, and **task list** as continuity context for step-02 planning. If no `done` spec is found but an `in-review` spec exists for the same epic with a lower story number, note it to the user and ask whether to load it.
|
|
68
|
+
|
|
69
|
+
6. **Resolve `{story_key}`.** If not already set by an earlier early-exit path, run **Story-key resolution** (above) now.
|
|
70
|
+
|
|
71
|
+
**B) Freeform path** — if the intent is not an epic story:
|
|
72
|
+
- Planning artifacts are the output of BMAD phases 1-3. Typical files include:
|
|
73
|
+
- **PRD** (`*prd*`) — product requirements and success criteria
|
|
74
|
+
- **Architecture** (`*architecture*`) — technical design decisions and constraints
|
|
75
|
+
- **UX/Design** (`*ux*`) — user experience and interaction design
|
|
76
|
+
- **Epics** (`*epic*`) — feature breakdown into implementable stories
|
|
77
|
+
- **Product Brief** (`*brief*`) — project vision and scope
|
|
78
|
+
- Scan the listing for files matching these patterns. If any look relevant to the current intent, load them selectively — you don't need all of them, but you need the right constraints and requirements rather than guessing from code alone.
|
|
79
|
+
2. Clarify intent. Do not fantasize, do not leave open questions. If you must ask questions, ask them as a numbered list. When the human replies, verify that every single numbered question was answered. If any were ignored, HALT and re-ask only the missing questions before proceeding. Keep looping until intent is clear enough to implement.
|
|
80
|
+
3. Version control sanity check. Is the working tree clean? Does the current branch make sense for this intent — considering its name and recent history? If the tree is dirty or the branch is an obvious mismatch, HALT and ask the human before proceeding. If version control is unavailable, skip this check.
|
|
81
|
+
4. Multi-goal check (see SCOPE STANDARD). If the intent fails the single-goal criteria:
|
|
82
|
+
- Present detected distinct goals as a bullet list.
|
|
83
|
+
- Explain briefly (2–4 sentences): why each goal qualifies as independently shippable, any coupling risks if split, and which goal you recommend tackling first.
|
|
84
|
+
- HALT and ask human: `[S] Split — pick first goal, defer the rest` | `[K] Keep all goals — accept the risks`
|
|
85
|
+
- On **S**: Append deferred goals to `{deferred_work_file}`. Narrow scope to the first-mentioned goal. Continue routing.
|
|
86
|
+
- On **K**: Proceed as-is.
|
|
87
|
+
5. Route — choose exactly one:
|
|
88
|
+
|
|
89
|
+
Derive a valid kebab-case slug from the clarified intent. If the intent references a tracking identifier (story number, issue number, ticket ID), lead the slug with it (e.g. `3-2-digest-delivery`, `gh-47-fix-auth`). If `{implementation_artifacts}/spec-{slug}.md` already exists: if its status is `draft`, treat it as the same work and resume it (set `spec_file` to that path, **EARLY EXIT** → `./step-02-plan.md`); otherwise append `-2`, `-3`, etc. Set `spec_file` = `{implementation_artifacts}/spec-{slug}.md`.
|
|
90
|
+
|
|
91
|
+
**a) One-shot** — zero blast radius: no plausible path by which this change causes unintended consequences elsewhere. Clear intent, no architectural decisions.
|
|
92
|
+
|
|
93
|
+
**EARLY EXIT** → `./step-oneshot.md`
|
|
94
|
+
|
|
95
|
+
**b) Plan-code-review** — everything else. When uncertain whether blast radius is truly zero, choose this path.
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
## NEXT
|
|
99
|
+
|
|
100
|
+
Read fully and follow `./step-02-plan.md`
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
deferred_work_file: '{implementation_artifacts}/deferred-work.md'
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Step 2: Plan
|
|
6
|
+
|
|
7
|
+
## RULES
|
|
8
|
+
|
|
9
|
+
- YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
|
|
10
|
+
- No intermediate approvals.
|
|
11
|
+
|
|
12
|
+
## INSTRUCTIONS
|
|
13
|
+
|
|
14
|
+
1. Draft resume check. If `{spec_file}` exists with `status: draft`, read it and capture the verbatim `<frozen-after-approval>...</frozen-after-approval>` block as `preserved_intent`. Otherwise `preserved_intent` is empty.
|
|
15
|
+
2. Investigate codebase. _Isolate deep exploration in sub-agents/tasks where available. To prevent context snowballing, instruct subagents to give you distilled summaries only._
|
|
16
|
+
3. Read `./spec-template.md` fully. Fill it out based on the intent and investigation. If `{preserved_intent}` is non-empty, substitute it for the `<frozen-after-approval>` block in your filled spec before writing. Write the result to `{spec_file}`.
|
|
17
|
+
4. Self-review against READY FOR DEVELOPMENT standard.
|
|
18
|
+
5. If intent gaps exist, do not fantasize, do not leave open questions, HALT and ask the human.
|
|
19
|
+
6. Token count check (see SCOPE STANDARD). If spec exceeds 1600 tokens:
|
|
20
|
+
- Show user the token count.
|
|
21
|
+
- HALT and ask human: `[S] Split — carve off secondary goals` | `[K] Keep full spec — accept the risks`
|
|
22
|
+
- On **S**: Propose the split — name each secondary goal. Append deferred goals to `{deferred_work_file}`. Rewrite the current spec to cover only the main goal — do not surgically carve sections out; regenerate the spec for the narrowed scope. Continue to checkpoint.
|
|
23
|
+
- On **K**: Continue to checkpoint with full spec.
|
|
24
|
+
|
|
25
|
+
### CHECKPOINT 1
|
|
26
|
+
|
|
27
|
+
Present summary. Display the spec file path as a CWD-relative path (no leading `/`) so it is clickable in the terminal. If token count exceeded 1600 and user chose [K], include the token count and explain why it may be a problem.
|
|
28
|
+
|
|
29
|
+
After presenting the summary, display this note:
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
Before approving, you can open the spec file in an editor or ask me questions and tell me what to change. You can also use `bmad-advanced-elicitation`, `bmad-party-mode`, or `bmad-code-review` skills, ideally in another session to avoid context bloat.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
HALT and ask human: `[A] Approve` | `[E] Edit`
|
|
38
|
+
|
|
39
|
+
- **A**: Re-read `{spec_file}` from disk.
|
|
40
|
+
- **If the file is missing:** HALT. Tell the user the spec file is gone and STOP — do not write anything to `{spec_file}`, do not set status, do not proceed to Step 3. Nothing below this point runs.
|
|
41
|
+
- **If the file exists:** Compare the content to what you wrote. If it has changed since you wrote it, acknowledge the external edits — show a brief summary of what changed — and proceed with the updated version. Then set status `ready-for-dev` in `{spec_file}`. Everything inside `<frozen-after-approval>` is now locked — only the human can change it. → Step 3.
|
|
42
|
+
- **E**: Apply changes, then return to CHECKPOINT 1.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## NEXT
|
|
46
|
+
|
|
47
|
+
Read fully and follow `./step-03-implement.md`
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
---
|
|
3
|
+
|
|
4
|
+
# Step 3: Implement
|
|
5
|
+
|
|
6
|
+
## RULES
|
|
7
|
+
|
|
8
|
+
- YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
|
|
9
|
+
- No push. No remote ops.
|
|
10
|
+
- Sequential execution only.
|
|
11
|
+
- Content inside `<frozen-after-approval>` in `{spec_file}` is read-only. Do not modify.
|
|
12
|
+
|
|
13
|
+
## PRECONDITION
|
|
14
|
+
|
|
15
|
+
Verify `{spec_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 spec file path before proceeding.
|
|
16
|
+
|
|
17
|
+
## INSTRUCTIONS
|
|
18
|
+
|
|
19
|
+
### Baseline
|
|
20
|
+
|
|
21
|
+
Capture `baseline_commit` (current HEAD, or `NO_VCS` if version control is unavailable) into `{spec_file}` frontmatter before making any changes.
|
|
22
|
+
|
|
23
|
+
### Implement
|
|
24
|
+
|
|
25
|
+
Change `{spec_file}` status to `in-progress` in the frontmatter before starting implementation.
|
|
26
|
+
|
|
27
|
+
Follow `./sync-sprint-status.md` with `{target_status}` = `in-progress`.
|
|
28
|
+
|
|
29
|
+
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.
|
|
30
|
+
|
|
31
|
+
Hand `{spec_file}` to a sub-agent/task and let it implement. If no sub-agents are available, implement directly.
|
|
32
|
+
|
|
33
|
+
**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.
|
|
34
|
+
|
|
35
|
+
### Self-Check
|
|
36
|
+
|
|
37
|
+
Before leaving this step, verify every task in the `## Tasks & Acceptance` section of `{spec_file}` is complete. Mark each finished task `[x]`. If any task is not done, finish it before proceeding.
|
|
38
|
+
|
|
39
|
+
## NEXT
|
|
40
|
+
|
|
41
|
+
Read fully and follow `./step-04-review.md`
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
deferred_work_file: '{implementation_artifacts}/deferred-work.md'
|
|
3
|
+
specLoopIteration: 1
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Step 4: Review
|
|
7
|
+
|
|
8
|
+
## RULES
|
|
9
|
+
|
|
10
|
+
- YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
|
|
11
|
+
- Review subagents get NO conversation context.
|
|
12
|
+
- All review subagents must run at the same model capability as the current session.
|
|
13
|
+
|
|
14
|
+
## INSTRUCTIONS
|
|
15
|
+
|
|
16
|
+
Change `{spec_file}` status to `in-review` in the frontmatter before continuing.
|
|
17
|
+
|
|
18
|
+
### Construct Diff
|
|
19
|
+
|
|
20
|
+
Read `{baseline_commit}` from `{spec_file}` frontmatter. If `{baseline_commit}` is missing or `NO_VCS`, use best effort to determine what changed. Otherwise, construct `{diff_output}` covering all changes — tracked and untracked — since `{baseline_commit}`.
|
|
21
|
+
|
|
22
|
+
Do NOT `git add` anything — this is read-only inspection.
|
|
23
|
+
|
|
24
|
+
### Review
|
|
25
|
+
|
|
26
|
+
Launch three subagents without conversation context. If no sub-agents are available, generate three review prompt files in `{implementation_artifacts}` — one per reviewer role below — and HALT. Ask the human to run each in a separate session (ideally a different LLM) and paste back the findings.
|
|
27
|
+
|
|
28
|
+
- **Blind hunter** — receives `{diff_output}` only. No spec, no context docs, no project access. Invoke via the `bmad-review-adversarial-general` skill.
|
|
29
|
+
- **Edge case hunter** — receives `{diff_output}` and read access to the project. Invoke via the `bmad-review-edge-case-hunter` skill.
|
|
30
|
+
- **Acceptance auditor** — receives `{diff_output}`, `{spec_file}`, and read access to the project. Must also read the docs listed in `{spec_file}` frontmatter `context`. Checks for violations of acceptance criteria, rules, and principles from the spec and context docs.
|
|
31
|
+
|
|
32
|
+
### Classify
|
|
33
|
+
|
|
34
|
+
1. Deduplicate all review findings.
|
|
35
|
+
2. Classify each finding. The first three categories are **this story's problem** — caused or exposed by the current change. The last two are **not this story's problem**.
|
|
36
|
+
- **intent_gap** — caused by the change; cannot be resolved from the spec because the captured intent is incomplete. Do not infer intent unless there is exactly one possible reading.
|
|
37
|
+
- **bad_spec** — caused by the change, including direct deviations from spec. The spec should have been clear enough to prevent it. When in doubt between bad_spec and patch, prefer bad_spec — a spec-level fix is more likely to produce coherent code.
|
|
38
|
+
- **patch** — caused by the change; trivially fixable without human input. Just part of the diff.
|
|
39
|
+
- **defer** — pre-existing issue not caused by this story, surfaced incidentally by the review. Collect for later focused attention.
|
|
40
|
+
- **reject** — noise. Drop silently. When unsure between defer and reject, prefer reject — only defer findings you are confident are real.
|
|
41
|
+
3. Process findings in cascading order. If intent_gap or bad_spec findings exist, they trigger a loopback — lower findings are moot since code will be re-derived. If neither exists, process patch and defer normally. Increment `{specLoopIteration}` on each loopback. If it exceeds 5, HALT and escalate to the human.
|
|
42
|
+
- **intent_gap** — Root cause is inside `<frozen-after-approval>`. Revert code changes. Loop back to the human to resolve. Once resolved, read fully and follow `./step-02-plan.md` to re-run steps 2–4.
|
|
43
|
+
- **bad_spec** — Root cause is outside `<frozen-after-approval>`. Before reverting code: extract KEEP instructions for positive preservation (what worked well and must survive re-derivation). Revert code changes. Read the `## Spec Change Log` in `{spec_file}` and strictly respect all logged constraints when amending the non-frozen sections that contain the root cause. Append a new change-log entry recording: the triggering finding, what was amended, the known-bad state avoided, and the KEEP instructions. Read fully and follow `./step-03-implement.md` to re-derive the code, then this step will run again.
|
|
44
|
+
- **patch** — Auto-fix. These are the only findings that survive loopbacks.
|
|
45
|
+
- **defer** — Append to `{deferred_work_file}`.
|
|
46
|
+
- **reject** — Drop silently.
|
|
47
|
+
|
|
48
|
+
## NEXT
|
|
49
|
+
|
|
50
|
+
Read fully and follow `./step-05-present.md`
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
---
|
|
3
|
+
|
|
4
|
+
# Step 5: Present
|
|
5
|
+
|
|
6
|
+
## RULES
|
|
7
|
+
|
|
8
|
+
- YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
|
|
9
|
+
- NEVER auto-push.
|
|
10
|
+
|
|
11
|
+
## INSTRUCTIONS
|
|
12
|
+
|
|
13
|
+
### Generate Suggested Review Order
|
|
14
|
+
|
|
15
|
+
Read `{baseline_commit}` from `{spec_file}` frontmatter and construct the diff of all changes since that commit.
|
|
16
|
+
|
|
17
|
+
Append the review order as a `## Suggested Review Order` section to `{spec_file}` **after the last existing section**. Do not modify the Code Map.
|
|
18
|
+
|
|
19
|
+
Build the trail as an ordered sequence of **stops** — clickable `path:line` references with brief framing — optimized for a human reviewer reading top-down to understand the change:
|
|
20
|
+
|
|
21
|
+
1. **Order by concern, not by file.** Group stops by the conceptual concern they address (e.g., "validation logic", "schema change", "UI binding"). A single file may appear under multiple concerns.
|
|
22
|
+
2. **Lead with the entry point** — the single highest-leverage file:line a reviewer should look at first to grasp the design intent.
|
|
23
|
+
3. **Inside each concern**, order stops from most important / architecturally interesting to supporting. Lightly bias toward higher-risk or boundary-crossing stops.
|
|
24
|
+
4. **End with peripherals** — tests, config, types, and other supporting changes come last.
|
|
25
|
+
5. **Every code reference is a clickable spec-file-relative link.** Compute each link target as a relative path from `{spec_file}`'s directory to the changed file. Format each stop as a markdown link: `[short-name:line](../../path/to/file.ts#L42)`. Use a `#L` line anchor. Use the file's basename (or shortest unambiguous suffix) plus line number as the link text. The relative path must be dynamically derived — never hardcode the depth.
|
|
26
|
+
6. **Each stop gets one ultra-concise line of framing** (≤15 words) — why this approach was chosen here and what it achieves in the context of the change. No paragraphs.
|
|
27
|
+
|
|
28
|
+
Format each stop as framing first, link on the next indented line:
|
|
29
|
+
|
|
30
|
+
```markdown
|
|
31
|
+
## Suggested Review Order
|
|
32
|
+
|
|
33
|
+
**{Concern name}**
|
|
34
|
+
|
|
35
|
+
- {one-line framing}
|
|
36
|
+
[`file.ts:42`](../../src/path/to/file.ts#L42)
|
|
37
|
+
|
|
38
|
+
- {one-line framing}
|
|
39
|
+
[`other.ts:17`](../../src/path/to/other.ts#L17)
|
|
40
|
+
|
|
41
|
+
**{Next concern}**
|
|
42
|
+
|
|
43
|
+
- {one-line framing}
|
|
44
|
+
[`file.ts:88`](../../src/path/to/file.ts#L88)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
> The `../../` prefix above is illustrative — compute the actual relative path from `{spec_file}`'s directory to each target file.
|
|
48
|
+
|
|
49
|
+
When there is only one concern, omit the bold label — just list the stops directly.
|
|
50
|
+
|
|
51
|
+
### Mark Spec Done
|
|
52
|
+
|
|
53
|
+
Change `{spec_file}` status to `done` in the frontmatter.
|
|
54
|
+
|
|
55
|
+
Follow `./sync-sprint-status.md` with `{target_status}` = `review`.
|
|
56
|
+
|
|
57
|
+
### Commit and Open
|
|
58
|
+
|
|
59
|
+
1. If version control is available and the tree is dirty, create a local commit with a conventional message derived from the spec title.
|
|
60
|
+
2. Open the spec in the user's editor so they can click through the Suggested Review Order:
|
|
61
|
+
- Resolve two absolute paths: (1) the repository root (`git rev-parse --show-toplevel` — returns the worktree root when in a worktree, project root otherwise; if this fails, fall back to the current working directory), (2) `{spec_file}`. Run `code -r "{absolute-root}" "{absolute-spec-file}"` — the root first so VS Code opens in the right context, then the spec file. Always double-quote paths to handle spaces and special characters.
|
|
62
|
+
- If `code` is not available (command fails), skip gracefully and tell the user the spec file path instead.
|
|
63
|
+
|
|
64
|
+
### Display Summary
|
|
65
|
+
|
|
66
|
+
Display summary of your work to the user, including the commit hash if one was created. Any file paths shown in conversation/terminal output must use CWD-relative format (no leading `/`) with `:line` notation (e.g., `src/path/file.ts:42`) for terminal clickability — the goal is to make paths clickable in terminal emulators. Include:
|
|
67
|
+
|
|
68
|
+
- A note that the spec is open in their editor (or the file path if it couldn't be opened). Mention that `{spec_file}` now contains a Suggested Review Order.
|
|
69
|
+
- **Navigation tip:** "Ctrl+click (Cmd+click on macOS) the links in the Suggested Review Order to jump to each stop."
|
|
70
|
+
- Offer to push and/or create a pull request.
|
|
71
|
+
|
|
72
|
+
Workflow complete.
|
|
73
|
+
|
|
74
|
+
## On Complete
|
|
75
|
+
|
|
76
|
+
Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete`
|
|
77
|
+
|
|
78
|
+
If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
deferred_work_file: '{implementation_artifacts}/deferred-work.md'
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Step One-Shot: Implement, Review, Present
|
|
6
|
+
|
|
7
|
+
## RULES
|
|
8
|
+
|
|
9
|
+
- YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
|
|
10
|
+
- NEVER auto-push.
|
|
11
|
+
|
|
12
|
+
## INSTRUCTIONS
|
|
13
|
+
|
|
14
|
+
### Implement
|
|
15
|
+
|
|
16
|
+
Follow `./sync-sprint-status.md` with `{target_status}` = `in-progress`.
|
|
17
|
+
|
|
18
|
+
Implement the clarified intent directly.
|
|
19
|
+
|
|
20
|
+
### Review
|
|
21
|
+
|
|
22
|
+
Invoke the `bmad-review-adversarial-general` skill in a subagent with the changed files. The subagent gets NO conversation context — to avoid anchoring bias. Launch at the same model capability as the current session. If no sub-agents are available, write the changed files to a review prompt file in `{implementation_artifacts}` and HALT. Ask the human to run the review in a separate session and paste back the findings.
|
|
23
|
+
|
|
24
|
+
### Classify
|
|
25
|
+
|
|
26
|
+
Deduplicate all review findings. Three categories only:
|
|
27
|
+
|
|
28
|
+
- **patch** — trivially fixable. Auto-fix immediately.
|
|
29
|
+
- **defer** — pre-existing issue not caused by this change. Append to `{deferred_work_file}`.
|
|
30
|
+
- **reject** — noise. Drop silently.
|
|
31
|
+
|
|
32
|
+
If a finding is caused by this change but too significant for a trivial patch, HALT and present it to the human for decision before proceeding.
|
|
33
|
+
|
|
34
|
+
### Generate Spec Trace
|
|
35
|
+
|
|
36
|
+
Set `{title}` = a concise title derived from the clarified intent.
|
|
37
|
+
|
|
38
|
+
Write `{spec_file}` using `./spec-template.md`. Fill only these sections — delete all others:
|
|
39
|
+
|
|
40
|
+
1. **Frontmatter** — set `title: '{title}'`, `type`, `created`, `status: 'done'`. Add `route: 'one-shot'`.
|
|
41
|
+
2. **Title and Intent** — `# {title}` heading and `## Intent` with **Problem** and **Approach** lines. Reuse the summary you already generated for the terminal.
|
|
42
|
+
3. **Suggested Review Order** — append after Intent. Build using the same convention as `./step-05-present.md` § "Generate Suggested Review Order" (spec-file-relative links, concern-based ordering, ultra-concise framing).
|
|
43
|
+
|
|
44
|
+
Follow `./sync-sprint-status.md` with `{target_status}` = `review`.
|
|
45
|
+
|
|
46
|
+
### Commit
|
|
47
|
+
|
|
48
|
+
If version control is available and the tree is dirty, create a local commit with a conventional message derived from the intent. If VCS is unavailable, skip.
|
|
49
|
+
|
|
50
|
+
### Present
|
|
51
|
+
|
|
52
|
+
1. Open the spec in the user's editor so they can click through the Suggested Review Order:
|
|
53
|
+
- Resolve two absolute paths: (1) the repository root (`git rev-parse --show-toplevel` — returns the worktree root when in a worktree, project root otherwise; if this fails, fall back to the current working directory), (2) `{spec_file}`. Run `code -r "{absolute-root}" "{absolute-spec-file}"` — the root first so VS Code opens in the right context, then the spec file. Always double-quote paths to handle spaces and special characters.
|
|
54
|
+
- If `code` is not available (command fails), skip gracefully and tell the user the spec file path instead.
|
|
55
|
+
2. Display a summary in conversation output, including:
|
|
56
|
+
- The commit hash (if one was created).
|
|
57
|
+
- List of files changed with one-line descriptions. Any file paths shown in conversation/terminal output must use CWD-relative format (no leading `/`) with `:line` notation (e.g., `src/path/file.ts:42`) for terminal clickability — this differs from spec-file links which use spec-file-relative paths.
|
|
58
|
+
- Review findings breakdown: patches applied, items deferred, items rejected. If all findings were rejected, say so.
|
|
59
|
+
- A note that the spec is open in their editor (or the file path if it couldn't be opened). Mention that `{spec_file}` now contains a Suggested Review Order.
|
|
60
|
+
- **Navigation tip:** "Ctrl+click (Cmd+click on macOS) the links in the Suggested Review Order to jump to each stop."
|
|
61
|
+
3. Offer to push and/or create a pull request.
|
|
62
|
+
|
|
63
|
+
HALT and wait for human input.
|
|
64
|
+
|
|
65
|
+
Workflow complete.
|
|
66
|
+
|
|
67
|
+
## On Complete
|
|
68
|
+
|
|
69
|
+
Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete`
|
|
70
|
+
|
|
71
|
+
If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Sync Sprint Status
|
|
2
|
+
|
|
3
|
+
Shared sub-step for updating `sprint-status.yaml` during quick-dev. Called from any route (plan-code-review, one-shot, future routes) with a `{target_status}` parameter.
|
|
4
|
+
|
|
5
|
+
## Preconditions
|
|
6
|
+
|
|
7
|
+
Skip this entire file (return to caller) if ANY of:
|
|
8
|
+
- `{story_key}` is unset
|
|
9
|
+
- `{sprint_status}` does not exist on disk
|
|
10
|
+
|
|
11
|
+
## Instructions
|
|
12
|
+
|
|
13
|
+
1. Load the FULL `{sprint_status}` file.
|
|
14
|
+
2. Find the `development_status` entry matching `{story_key}`. If not found, warn the user once (`"{story_key} not found in sprint-status; skipping sprint sync"`) and return to caller.
|
|
15
|
+
3. **Idempotency check.** If `development_status[{story_key}]` is already at `{target_status}` or a later state (`review` is later than `in-progress`; `done` is later than both), return to caller — no write needed. Never regress a story's status.
|
|
16
|
+
4. Set `development_status[{story_key}]` to `{target_status}`.
|
|
17
|
+
5. **Epic lift (only when `{target_status}` = `in-progress`).** Derive the parent epic key as `epic-{N}` from the leading numeric segment of `{story_key}` (e.g., `3-2-digest-delivery` → `epic-3`). If that entry exists and is `backlog`, set it to `in-progress`. Leave it alone otherwise. Skip this sub-step entirely when `{target_status}` is not `in-progress`.
|
|
18
|
+
6. Refresh `last_updated` to the current date.
|
|
19
|
+
7. Save the file, preserving ALL comments and structure including STATUS DEFINITIONS and WORKFLOW NOTES.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bmad-sprint-planning
|
|
3
|
+
description: 'Generate sprint status tracking from epics. Use when the user says "run sprint planning" or "generate sprint plan"'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# bmad-sprint-planning · OpenCode edition
|
|
7
|
+
|
|
8
|
+
## Artifact storage
|
|
9
|
+
|
|
10
|
+
Use the **BMAD artifact storage** contract injected by the OpenCode BMAD plugin for this project. It names the selected backend, project root and exact artifact prefix. Call `bmad_storage` if the contract is missing or you need to refresh it. Read existing artifacts before editing, write complete Markdown, then read back and verify. Keep each artifact's logical name stable. Do not switch storage backends silently. The plugin is installed globally; project artifacts are scoped to the current repository. Source code changes remain in the repository. Bundled references may mention upstream project-local `_bmad` setup, config or scripts; use their methodology without requiring those files in the project. The selected storage contract overrides artifact paths in references.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. Read `epics-and-stories.md`, existing sprint status and relevant story documents from artifact storage. Preserve stable story IDs and verified progress.
|
|
15
|
+
2. Order work by dependencies and user priorities. Track each epic/story with an explicit state such as backlog, ready-for-dev, in-progress, review, done or blocked, and a artifact path.
|
|
16
|
+
3. Record blockers, next action and owner where known. Do not reset done work or fabricate estimates/completion evidence.
|
|
17
|
+
4. Save readable Markdown with a status table or fenced YAML. Verify all planned stories exist in the epic list and prerequisites precede dependants.
|
|
18
|
+
|
|
19
|
+
**Primary artifact:** `sprint-status.md`. Use a stable descriptive `<story-id>`, `<review-id>` or `<change-id>` where shown, and return its full verified artifact path.
|
|
20
|
+
|
|
21
|
+
## Optional method references
|
|
22
|
+
|
|
23
|
+
Read only the template or checklist needed for the current step, relative to this skill directory: `reference/checklist.md`; `reference/sprint-status-template.yaml`. The references preserve upstream methodology; their filesystem writes, activation scripts and local artifact discovery are replaced by the BMAD artifact storage contract above. Do not load the entire upstream workflow or unrelated artifacts.
|