diff --git a/expansion-packs/bmad-wechat-mini-game-dev/tasks/shard-doc.md b/expansion-packs/bmad-wechat-mini-game-dev/tasks/shard-doc.md index 900616a8..676233cd 100644 --- a/expansion-packs/bmad-wechat-mini-game-dev/tasks/shard-doc.md +++ b/expansion-packs/bmad-wechat-mini-game-dev/tasks/shard-doc.md @@ -8,62 +8,7 @@ - Create a folder structure to organize the sharded documents - Maintain all content integrity including code blocks, diagrams, and markdown formatting -## Primary Method: Automatic with markdown-tree - -[[LLM: First, check if markdownExploder is set to true in {root}/core-config.yaml. If it is, attempt to run the command: `md-tree explode {input file} {output path}`. - -If the command succeeds, inform the user that the document has been sharded successfully and STOP - do not proceed further. - -If the command fails (especially with an error indicating the command is not found or not available), inform the user: "The markdownExploder setting is enabled but the md-tree command is not available. Please either: - -1. Install @kayvan/markdown-tree-parser globally with: `npm install -g @kayvan/markdown-tree-parser` -2. Or set markdownExploder to false in {root}/core-config.yaml - -**IMPORTANT: STOP HERE - do not proceed with manual sharding until one of the above actions is taken.**" - -If markdownExploder is set to false, inform the user: "The markdownExploder setting is currently false. For better performance and reliability, you should: - -1. Set markdownExploder to true in {root}/core-config.yaml -2. Install @kayvan/markdown-tree-parser globally with: `npm install -g @kayvan/markdown-tree-parser` - -I will now proceed with the manual sharding process." - -Then proceed with the manual method below ONLY if markdownExploder is false.]] - -### Installation and Usage - -1. **Install globally**: - - ```bash - npm install -g @kayvan/markdown-tree-parser - ``` - -2. **Use the explode command**: - - ```bash - # For PRD - md-tree explode docs/prd.md docs/prd - - # For Architecture - md-tree explode docs/architecture.md docs/architecture - - # For any document - md-tree explode [source-document] [destination-folder] - ``` - -3. **What it does**: - - Automatically splits the document by level 2 sections - - Creates properly named files - - Adjusts heading levels appropriately - - Handles all edge cases with code blocks and special markdown - -If the user has @kayvan/markdown-tree-parser installed, use it and skip the manual process below. - ---- - -## Manual Method (if @kayvan/markdown-tree-parser is not available or user indicated manual method) - -### Task Instructions +## Task Instructions 1. Identify Document and Target Location