bmad-method 6.0.5-next.5 → 6.0.5-next.7

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "bmad-method",
4
- "version": "6.0.5-next.5",
4
+ "version": "6.0.5-next.7",
5
5
  "description": "Breakthrough Method of Agile AI-driven Development",
6
6
  "keywords": [
7
7
  "agile",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: bmad-quick-dev-new-preview
3
- description: 'Implements any user intent, requirement, story, bug fix or change request by producing clean working code artifacts that follow the projects existing architecture, patterns and conventions. Use when the user wants to build, fix, tweak, refactor, add or modify any code, component or feature.'
3
+ description: 'Implements any user intent, requirement, story, bug fix or change request by producing clean working code artifacts that follow the project''s existing architecture, patterns and conventions. Use when the user wants to build, fix, tweak, refactor, add or modify any code, component or feature.'
4
4
  ---
5
5
 
6
6
  Follow the instructions in [workflow.md](workflow.md).
@@ -43,13 +43,11 @@ Do NOT `git add` anything — this is read-only inspection.
43
43
  - **defer** — pre-existing issue not caused by this story, surfaced incidentally by the review. Collect for later focused attention.
44
44
  - **reject** — noise. Drop silently. When unsure between defer and reject, prefer reject — only defer findings you are confident are real.
45
45
  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. On any loopback, re-evaluate routing — if scope has grown beyond one-shot, escalate `execution_mode` to plan-code-review.
46
- - **intent_gap** — Root cause is inside `<frozen-after-approval>`. Revert code changes. Loop back to the human to resolve, then re-run steps 2–4.
46
+ - **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 `./steps/step-02-plan.md` to re-run steps 2–4.
47
47
  - **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 `./steps/step-03-implement.md` to re-derive the code, then this step will run again.
48
48
  - **patch** — Auto-fix. These are the only findings that survive loopbacks.
49
49
  - **defer** — Append to `{deferred_work_file}`.
50
50
  - **reject** — Drop silently.
51
- 4. Commit.
52
-
53
51
  ## NEXT
54
52
 
55
53
  Read fully and follow `./steps/step-05-present.md`
@@ -12,8 +12,8 @@ description: 'Present findings, get approval, create PR'
12
12
 
13
13
  ## INSTRUCTIONS
14
14
 
15
- 1. If version control is available and the tree is dirty, create a local commit with a conventional message derived from the spec title.
16
- 2. Change `{spec_file}` status to `done` in the frontmatter.
15
+ 1. Change `{spec_file}` status to `done` in the frontmatter.
16
+ 2. If version control is available and the tree is dirty, create a local commit with a conventional message derived from the spec title.
17
17
  3. Display summary of your work to the user, including the commit hash if one was created. Advise on how to review the changes. Offer to push and/or create a pull request.
18
18
 
19
19
  Workflow complete.
@@ -3,7 +3,7 @@ core,anytime,Brainstorming,BSP,,_bmad/core/workflows/brainstorming/workflow.md,b
3
3
  core,anytime,Party Mode,PM,,_bmad/core/workflows/party-mode/workflow.md,bmad-party-mode,false,party-mode facilitator,,"Orchestrate multi-agent discussions. Use when you need multiple agent perspectives or want agents to collaborate.",,
4
4
  core,anytime,bmad-help,BH,,skill:bmad-help,bmad-help,false,,,"Get unstuck by showing what workflow steps come next or answering BMad Method questions.",,
5
5
  core,anytime,Index Docs,ID,,skill:bmad-index-docs,bmad-index-docs,false,,,"Create lightweight index for quick LLM scanning. Use when LLM needs to understand available docs without loading everything.",,
6
- core,anytime,Shard Document,SD,,_bmad/core/tasks/shard-doc.xml,bmad-shard-doc,false,,,"Split large documents into smaller files by sections. Use when doc becomes too large (>500 lines) to manage effectively.",,
6
+ core,anytime,Shard Document,SD,,skill:bmad-shard-doc,bmad-shard-doc,false,,,"Split large documents into smaller files by sections. Use when doc becomes too large (>500 lines) to manage effectively.",,
7
7
  core,anytime,Editorial Review - Prose,EP,,skill:bmad-editorial-review-prose,bmad-editorial-review-prose,false,,,"Review prose for clarity, tone, and communication issues. Use after drafting to polish written content.",report located with target document,"three-column markdown table with suggested fixes",
8
8
  core,anytime,Editorial Review - Structure,ES,,skill:bmad-editorial-review-structure,bmad-editorial-review-structure,false,,,"Propose cuts, reorganization, and simplification while preserving comprehension. Use when doc produced from multiple subprocesses or needs structural improvement.",report located with target document,
9
9
  core,anytime,Adversarial Review (General),AR,,skill:bmad-review-adversarial-general,bmad-review-adversarial-general,false,,,"Review content critically to find issues and weaknesses. Use for quality assurance or before finalizing deliverables. Code Review in other modules run this automatically, but its useful also for document reviews",,
@@ -0,0 +1,6 @@
1
+ ---
2
+ name: bmad-shard-doc
3
+ description: 'Splits large markdown documents into smaller, organized files based on level 2 (default) sections. Use if the user says perform shard document'
4
+ ---
5
+
6
+ Follow the instructions in [workflow.md](workflow.md).
@@ -0,0 +1,100 @@
1
+ # Shard Document
2
+
3
+ **Goal:** Split large markdown documents into smaller, organized files based on level 2 sections using `npx @kayvan/markdown-tree-parser`.
4
+
5
+ ## CRITICAL RULES
6
+
7
+ - MANDATORY: Execute ALL steps in the EXECUTION section IN EXACT ORDER
8
+ - DO NOT skip steps or change the sequence
9
+ - HALT immediately when halt-conditions are met
10
+ - Each action within a step is a REQUIRED action to complete that step
11
+
12
+ ## EXECUTION
13
+
14
+ ### Step 1: Get Source Document
15
+
16
+ - Ask user for the source document path if not provided already
17
+ - Verify file exists and is accessible
18
+ - Verify file is markdown format (.md extension)
19
+ - If file not found or not markdown: HALT with error message
20
+
21
+ ### Step 2: Get Destination Folder
22
+
23
+ - Determine default destination: same location as source file, folder named after source file without .md extension
24
+ - Example: `/path/to/architecture.md` --> `/path/to/architecture/`
25
+ - Ask user for the destination folder path (`[y]` to confirm use of default: `[suggested-path]`, else enter a new path)
26
+ - If user accepts default: use the suggested destination path
27
+ - If user provides custom path: use the custom destination path
28
+ - Verify destination folder exists or can be created
29
+ - Check write permissions for destination
30
+ - If permission denied: HALT with error message
31
+
32
+ ### Step 3: Execute Sharding
33
+
34
+ - Inform user that sharding is beginning
35
+ - Execute command: `npx @kayvan/markdown-tree-parser explode [source-document] [destination-folder]`
36
+ - Capture command output and any errors
37
+ - If command fails: HALT and display error to user
38
+
39
+ ### Step 4: Verify Output
40
+
41
+ - Check that destination folder contains sharded files
42
+ - Verify index.md was created in destination folder
43
+ - Count the number of files created
44
+ - If no files created: HALT with error message
45
+
46
+ ### Step 5: Report Completion
47
+
48
+ - Display completion report to user including:
49
+ - Source document path and name
50
+ - Destination folder path
51
+ - Number of section files created
52
+ - Confirmation that index.md was created
53
+ - Any tool output or warnings
54
+ - Inform user that sharding completed successfully
55
+
56
+ ### Step 6: Handle Original Document
57
+
58
+ > **Critical:** Keeping both the original and sharded versions defeats the purpose of sharding and can cause confusion.
59
+
60
+ Present user with options for the original document:
61
+
62
+ > What would you like to do with the original document `[source-document-name]`?
63
+ >
64
+ > Options:
65
+ > - `[d]` Delete - Remove the original (recommended - shards can always be recombined)
66
+ > - `[m]` Move to archive - Move original to a backup/archive location
67
+ > - `[k]` Keep - Leave original in place (NOT recommended - defeats sharding purpose)
68
+ >
69
+ > Your choice (d/m/k):
70
+
71
+ #### If user selects `d` (delete)
72
+
73
+ - Delete the original source document file
74
+ - Confirm deletion to user: "Original document deleted: [source-document-path]"
75
+ - Note: The document can be reconstructed from shards by concatenating all section files in order
76
+
77
+ #### If user selects `m` (move)
78
+
79
+ - Determine default archive location: same directory as source, in an `archive` subfolder
80
+ - Example: `/path/to/architecture.md` --> `/path/to/archive/architecture.md`
81
+ - Ask: Archive location (`[y]` to use default: `[default-archive-path]`, or provide custom path)
82
+ - If user accepts default: use default archive path
83
+ - If user provides custom path: use custom archive path
84
+ - Create archive directory if it does not exist
85
+ - Move original document to archive location
86
+ - Confirm move to user: "Original document moved to: [archive-path]"
87
+
88
+ #### If user selects `k` (keep)
89
+
90
+ - Display warning to user:
91
+ - Keeping both original and sharded versions is NOT recommended
92
+ - The discover_inputs protocol may load the wrong version
93
+ - Updates to one will not reflect in the other
94
+ - Duplicate content taking up space
95
+ - Consider deleting or archiving the original document
96
+ - Confirm user choice: "Original document kept at: [source-document-path]"
97
+
98
+ ## HALT CONDITIONS
99
+
100
+ - HALT if npx command fails or produces no output files
@@ -1,4 +0,0 @@
1
- shard-doc.xml:
2
- canonicalId: bmad-shard-doc
3
- type: task
4
- description: "Splits large markdown documents into smaller, organized files based on sections"
@@ -1,108 +0,0 @@
1
- <task id="_bmad/core/tasks/shard-doc" name="Shard Document"
2
- description="Splits large markdown documents into smaller, organized files based on level 2 (default) sections. Use if the user says perform shard document">
3
- <objective>Split large markdown documents into smaller, organized files based on level 2 sections using @kayvan/markdown-tree-parser tool</objective>
4
-
5
- <llm critical="true">
6
- <i>MANDATORY: Execute ALL steps in the flow section IN EXACT ORDER</i>
7
- <i>DO NOT skip steps or change the sequence</i>
8
- <i>HALT immediately when halt-conditions are met</i>
9
- <i>Each action xml tag within step xml tag is a REQUIRED action to complete that step</i>
10
- <i>Sections outside flow (validation, output, critical-context) provide essential context - review and apply throughout execution</i>
11
- </llm>
12
-
13
- <critical-context>
14
- <i>Uses `npx @kayvan/markdown-tree-parser` to automatically shard documents by level 2 headings and generate an index</i>
15
- </critical-context>
16
-
17
- <flow>
18
- <step n="1" title="Get Source Document">
19
- <action>Ask user for the source document path if not provided already</action>
20
- <action>Verify file exists and is accessible</action>
21
- <action>Verify file is markdown format (.md extension)</action>
22
- <action if="file not found or not markdown">HALT with error message</action>
23
- </step>
24
-
25
- <step n="2" title="Get Destination Folder">
26
- <action>Determine default destination: same location as source file, folder named after source file without .md extension</action>
27
- <action>Example: /path/to/architecture.md → /path/to/architecture/</action>
28
- <action>Ask user for the destination folder path ([y] to confirm use of default: [suggested-path], else enter a new path)</action>
29
- <action if="user accepts default">Use the suggested destination path</action>
30
- <action if="user provides custom path">Use the custom destination path</action>
31
- <action>Verify destination folder exists or can be created</action>
32
- <action>Check write permissions for destination</action>
33
- <action if="permission denied">HALT with error message</action>
34
- </step>
35
-
36
- <step n="3" title="Execute Sharding">
37
- <action>Inform user that sharding is beginning</action>
38
- <action>Execute command: `npx @kayvan/markdown-tree-parser explode [source-document] [destination-folder]`</action>
39
- <action>Capture command output and any errors</action>
40
- <action if="command fails">HALT and display error to user</action>
41
- </step>
42
-
43
- <step n="4" title="Verify Output">
44
- <action>Check that destination folder contains sharded files</action>
45
- <action>Verify index.md was created in destination folder</action>
46
- <action>Count the number of files created</action>
47
- <action if="no files created">HALT with error message</action>
48
- </step>
49
-
50
- <step n="5" title="Report Completion">
51
- <action>Display completion report to user including:</action>
52
- <i>- Source document path and name</i>
53
- <i>- Destination folder path</i>
54
- <i>- Number of section files created</i>
55
- <i>- Confirmation that index.md was created</i>
56
- <i>- Any tool output or warnings</i>
57
- <action>Inform user that sharding completed successfully</action>
58
- </step>
59
-
60
- <step n="6" title="Handle Original Document">
61
- <critical>Keeping both the original and sharded versions defeats the purpose of sharding and can cause confusion</critical>
62
- <action>Present user with options for the original document:</action>
63
-
64
- <ask>What would you like to do with the original document `[source-document-name]`?
65
-
66
- Options:
67
- [d] Delete - Remove the original (recommended - shards can always be recombined)
68
- [m] Move to archive - Move original to a backup/archive location
69
- [k] Keep - Leave original in place (NOT recommended - defeats sharding purpose)
70
-
71
- Your choice (d/m/k):</ask>
72
-
73
- <check if="user selects 'd' (delete)">
74
- <action>Delete the original source document file</action>
75
- <action>Confirm deletion to user: "✓ Original document deleted: [source-document-path]"</action>
76
- <note>The document can be reconstructed from shards by concatenating all section files in order</note>
77
- </check>
78
-
79
- <check if="user selects 'm' (move)">
80
- <action>Determine default archive location: same directory as source, in an "archive" subfolder</action>
81
- <action>Example: /path/to/architecture.md → /path/to/archive/architecture.md</action>
82
- <ask>Archive location ([y] to use default: [default-archive-path], or provide custom path):</ask>
83
- <action if="user accepts default">Use default archive path</action>
84
- <action if="user provides custom path">Use custom archive path</action>
85
- <action>Create archive directory if it doesn't exist</action>
86
- <action>Move original document to archive location</action>
87
- <action>Confirm move to user: "✓ Original document moved to: [archive-path]"</action>
88
- </check>
89
-
90
- <check if="user selects 'k' (keep)">
91
- <action>Display warning to user:</action>
92
- <output>⚠️ WARNING: Keeping both original and sharded versions is NOT recommended.
93
-
94
- This creates confusion because:
95
- - The discover_inputs protocol may load the wrong version
96
- - Updates to one won't reflect in the other
97
- - You'll have duplicate content taking up space
98
-
99
- Consider deleting or archiving the original document.</output>
100
- <action>Confirm user choice: "Original document kept at: [source-document-path]"</action>
101
- </check>
102
- </step>
103
- </flow>
104
-
105
- <halt-conditions critical="true">
106
- <i>HALT if npx command fails or produces no output files</i>
107
- </halt-conditions>
108
- </task>