agentvibes 2.0.22 → 2.0.23

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.
Files changed (134) hide show
  1. package/README.md +2 -2
  2. package/package.json +1 -1
  3. package/.bmad-core/agent-teams/team-all.yaml +0 -15
  4. package/.bmad-core/agent-teams/team-fullstack.yaml +0 -19
  5. package/.bmad-core/agent-teams/team-ide-minimal.yaml +0 -11
  6. package/.bmad-core/agent-teams/team-no-ui.yaml +0 -14
  7. package/.bmad-core/agents/analyst.md +0 -84
  8. package/.bmad-core/agents/architect.md +0 -85
  9. package/.bmad-core/agents/bmad-master.md +0 -110
  10. package/.bmad-core/agents/bmad-orchestrator.md +0 -147
  11. package/.bmad-core/agents/dev.md +0 -81
  12. package/.bmad-core/agents/pm.md +0 -84
  13. package/.bmad-core/agents/po.md +0 -79
  14. package/.bmad-core/agents/qa.md +0 -87
  15. package/.bmad-core/agents/sm.md +0 -65
  16. package/.bmad-core/agents/ux-expert.md +0 -69
  17. package/.bmad-core/checklists/architect-checklist.md +0 -440
  18. package/.bmad-core/checklists/change-checklist.md +0 -184
  19. package/.bmad-core/checklists/pm-checklist.md +0 -372
  20. package/.bmad-core/checklists/po-master-checklist.md +0 -434
  21. package/.bmad-core/checklists/story-dod-checklist.md +0 -96
  22. package/.bmad-core/checklists/story-draft-checklist.md +0 -155
  23. package/.bmad-core/core-config.yaml +0 -22
  24. package/.bmad-core/data/bmad-kb.md +0 -809
  25. package/.bmad-core/data/brainstorming-techniques.md +0 -38
  26. package/.bmad-core/data/elicitation-methods.md +0 -156
  27. package/.bmad-core/data/technical-preferences.md +0 -5
  28. package/.bmad-core/data/test-levels-framework.md +0 -148
  29. package/.bmad-core/data/test-priorities-matrix.md +0 -174
  30. package/.bmad-core/enhanced-ide-development-workflow.md +0 -248
  31. package/.bmad-core/install-manifest.yaml +0 -230
  32. package/.bmad-core/tasks/advanced-elicitation.md +0 -119
  33. package/.bmad-core/tasks/apply-qa-fixes.md +0 -150
  34. package/.bmad-core/tasks/brownfield-create-epic.md +0 -162
  35. package/.bmad-core/tasks/brownfield-create-story.md +0 -149
  36. package/.bmad-core/tasks/correct-course.md +0 -72
  37. package/.bmad-core/tasks/create-brownfield-story.md +0 -314
  38. package/.bmad-core/tasks/create-deep-research-prompt.md +0 -280
  39. package/.bmad-core/tasks/create-doc.md +0 -103
  40. package/.bmad-core/tasks/create-next-story.md +0 -114
  41. package/.bmad-core/tasks/document-project.md +0 -345
  42. package/.bmad-core/tasks/execute-checklist.md +0 -88
  43. package/.bmad-core/tasks/facilitate-brainstorming-session.md +0 -138
  44. package/.bmad-core/tasks/generate-ai-frontend-prompt.md +0 -53
  45. package/.bmad-core/tasks/index-docs.md +0 -175
  46. package/.bmad-core/tasks/kb-mode-interaction.md +0 -77
  47. package/.bmad-core/tasks/nfr-assess.md +0 -345
  48. package/.bmad-core/tasks/qa-gate.md +0 -163
  49. package/.bmad-core/tasks/review-story.md +0 -316
  50. package/.bmad-core/tasks/risk-profile.md +0 -355
  51. package/.bmad-core/tasks/shard-doc.md +0 -187
  52. package/.bmad-core/tasks/test-design.md +0 -176
  53. package/.bmad-core/tasks/trace-requirements.md +0 -266
  54. package/.bmad-core/tasks/validate-next-story.md +0 -136
  55. package/.bmad-core/templates/architecture-tmpl.yaml +0 -651
  56. package/.bmad-core/templates/brainstorming-output-tmpl.yaml +0 -156
  57. package/.bmad-core/templates/brownfield-architecture-tmpl.yaml +0 -477
  58. package/.bmad-core/templates/brownfield-prd-tmpl.yaml +0 -281
  59. package/.bmad-core/templates/competitor-analysis-tmpl.yaml +0 -307
  60. package/.bmad-core/templates/front-end-architecture-tmpl.yaml +0 -219
  61. package/.bmad-core/templates/front-end-spec-tmpl.yaml +0 -350
  62. package/.bmad-core/templates/fullstack-architecture-tmpl.yaml +0 -824
  63. package/.bmad-core/templates/market-research-tmpl.yaml +0 -253
  64. package/.bmad-core/templates/prd-tmpl.yaml +0 -203
  65. package/.bmad-core/templates/project-brief-tmpl.yaml +0 -222
  66. package/.bmad-core/templates/qa-gate-tmpl.yaml +0 -103
  67. package/.bmad-core/templates/story-tmpl.yaml +0 -138
  68. package/.bmad-core/user-guide.md +0 -577
  69. package/.bmad-core/utils/bmad-doc-template.md +0 -327
  70. package/.bmad-core/utils/workflow-management.md +0 -71
  71. package/.bmad-core/workflows/brownfield-fullstack.yaml +0 -298
  72. package/.bmad-core/workflows/brownfield-service.yaml +0 -188
  73. package/.bmad-core/workflows/brownfield-ui.yaml +0 -198
  74. package/.bmad-core/workflows/greenfield-fullstack.yaml +0 -241
  75. package/.bmad-core/workflows/greenfield-service.yaml +0 -207
  76. package/.bmad-core/workflows/greenfield-ui.yaml +0 -236
  77. package/.bmad-core/working-in-the-brownfield.md +0 -606
  78. package/.claude/agents/health-coach.md +0 -154
  79. package/.claude/agents/motivator.md +0 -171
  80. package/.claude/agents/negotiator.md +0 -97
  81. package/.claude/commands/BMad/agents/analyst.md +0 -88
  82. package/.claude/commands/BMad/agents/architect.md +0 -89
  83. package/.claude/commands/BMad/agents/bmad-master.md +0 -114
  84. package/.claude/commands/BMad/agents/bmad-orchestrator.md +0 -151
  85. package/.claude/commands/BMad/agents/dev.md +0 -85
  86. package/.claude/commands/BMad/agents/pm.md +0 -88
  87. package/.claude/commands/BMad/agents/po.md +0 -83
  88. package/.claude/commands/BMad/agents/qa.md +0 -91
  89. package/.claude/commands/BMad/agents/sm.md +0 -69
  90. package/.claude/commands/BMad/agents/ux-expert.md +0 -73
  91. package/.claude/commands/BMad/tasks/advanced-elicitation.md +0 -123
  92. package/.claude/commands/BMad/tasks/apply-qa-fixes.md +0 -154
  93. package/.claude/commands/BMad/tasks/brownfield-create-epic.md +0 -166
  94. package/.claude/commands/BMad/tasks/brownfield-create-story.md +0 -153
  95. package/.claude/commands/BMad/tasks/correct-course.md +0 -76
  96. package/.claude/commands/BMad/tasks/create-brownfield-story.md +0 -318
  97. package/.claude/commands/BMad/tasks/create-deep-research-prompt.md +0 -284
  98. package/.claude/commands/BMad/tasks/create-doc.md +0 -107
  99. package/.claude/commands/BMad/tasks/create-next-story.md +0 -118
  100. package/.claude/commands/BMad/tasks/document-project.md +0 -349
  101. package/.claude/commands/BMad/tasks/execute-checklist.md +0 -92
  102. package/.claude/commands/BMad/tasks/facilitate-brainstorming-session.md +0 -142
  103. package/.claude/commands/BMad/tasks/generate-ai-frontend-prompt.md +0 -57
  104. package/.claude/commands/BMad/tasks/index-docs.md +0 -179
  105. package/.claude/commands/BMad/tasks/kb-mode-interaction.md +0 -81
  106. package/.claude/commands/BMad/tasks/nfr-assess.md +0 -349
  107. package/.claude/commands/BMad/tasks/qa-gate.md +0 -167
  108. package/.claude/commands/BMad/tasks/review-story.md +0 -320
  109. package/.claude/commands/BMad/tasks/risk-profile.md +0 -359
  110. package/.claude/commands/BMad/tasks/shard-doc.md +0 -191
  111. package/.claude/commands/BMad/tasks/test-design.md +0 -180
  112. package/.claude/commands/BMad/tasks/trace-requirements.md +0 -270
  113. package/.claude/commands/BMad/tasks/validate-next-story.md +0 -140
  114. package/.claude/commands/agent-vibes/agent-health-coach.md +0 -15
  115. package/.claude/commands/agent-vibes/agent-motivator.md +0 -15
  116. package/.claude/commands/agent-vibes/agent-negotiator.md +0 -15
  117. package/.claude/commands/agent-vibes/agent.md +0 -79
  118. package/docs/agents.md +0 -485
  119. package/fix-vscode-colors.sh +0 -88
  120. package/fixcolors +0 -88
  121. package/generate-all-agent-voices.sh +0 -174
  122. package/generate-new-voices.sh +0 -108
  123. package/generate-piper-agent-intros.sh +0 -85
  124. package/generate-provider-and-agent-intros.sh +0 -136
  125. package/linkedin/vibe-coding-and-pulseaudio.md +0 -121
  126. package/logo/fav_icon_128x128.png +0 -0
  127. package/logo/fav_icon_128x128.png:Zone.Identifier +0 -4
  128. package/logo/logo1.webp +0 -0
  129. package/logo/logo1.webp:Zone.Identifier +0 -4
  130. package/logo/social.png +0 -0
  131. package/logo/social.png:Zone.Identifier +0 -4
  132. package/mcp-server/agentvibes.db +0 -0
  133. package/regenerate-agent-voices.sh +0 -79
  134. package/scripts/audio-tunnel.config +0 -17
@@ -1,359 +0,0 @@
1
- # /risk-profile Task
2
-
3
- When this command is used, execute the following task:
4
-
5
- <!-- Powered by BMAD™ Core -->
6
-
7
- # risk-profile
8
-
9
- Generate a comprehensive risk assessment matrix for a story implementation using probability × impact analysis.
10
-
11
- ## Inputs
12
-
13
- ```yaml
14
- required:
15
- - story_id: '{epic}.{story}' # e.g., "1.3"
16
- - story_path: 'docs/stories/{epic}.{story}.*.md'
17
- - story_title: '{title}' # If missing, derive from story file H1
18
- - story_slug: '{slug}' # If missing, derive from title (lowercase, hyphenated)
19
- ```
20
-
21
- ## Purpose
22
-
23
- Identify, assess, and prioritize risks in the story implementation. Provide risk mitigation strategies and testing focus areas based on risk levels.
24
-
25
- ## Risk Assessment Framework
26
-
27
- ### Risk Categories
28
-
29
- **Category Prefixes:**
30
-
31
- - `TECH`: Technical Risks
32
- - `SEC`: Security Risks
33
- - `PERF`: Performance Risks
34
- - `DATA`: Data Risks
35
- - `BUS`: Business Risks
36
- - `OPS`: Operational Risks
37
-
38
- 1. **Technical Risks (TECH)**
39
- - Architecture complexity
40
- - Integration challenges
41
- - Technical debt
42
- - Scalability concerns
43
- - System dependencies
44
-
45
- 2. **Security Risks (SEC)**
46
- - Authentication/authorization flaws
47
- - Data exposure vulnerabilities
48
- - Injection attacks
49
- - Session management issues
50
- - Cryptographic weaknesses
51
-
52
- 3. **Performance Risks (PERF)**
53
- - Response time degradation
54
- - Throughput bottlenecks
55
- - Resource exhaustion
56
- - Database query optimization
57
- - Caching failures
58
-
59
- 4. **Data Risks (DATA)**
60
- - Data loss potential
61
- - Data corruption
62
- - Privacy violations
63
- - Compliance issues
64
- - Backup/recovery gaps
65
-
66
- 5. **Business Risks (BUS)**
67
- - Feature doesn't meet user needs
68
- - Revenue impact
69
- - Reputation damage
70
- - Regulatory non-compliance
71
- - Market timing
72
-
73
- 6. **Operational Risks (OPS)**
74
- - Deployment failures
75
- - Monitoring gaps
76
- - Incident response readiness
77
- - Documentation inadequacy
78
- - Knowledge transfer issues
79
-
80
- ## Risk Analysis Process
81
-
82
- ### 1. Risk Identification
83
-
84
- For each category, identify specific risks:
85
-
86
- ```yaml
87
- risk:
88
- id: 'SEC-001' # Use prefixes: SEC, PERF, DATA, BUS, OPS, TECH
89
- category: security
90
- title: 'Insufficient input validation on user forms'
91
- description: 'Form inputs not properly sanitized could lead to XSS attacks'
92
- affected_components:
93
- - 'UserRegistrationForm'
94
- - 'ProfileUpdateForm'
95
- detection_method: 'Code review revealed missing validation'
96
- ```
97
-
98
- ### 2. Risk Assessment
99
-
100
- Evaluate each risk using probability × impact:
101
-
102
- **Probability Levels:**
103
-
104
- - `High (3)`: Likely to occur (>70% chance)
105
- - `Medium (2)`: Possible occurrence (30-70% chance)
106
- - `Low (1)`: Unlikely to occur (<30% chance)
107
-
108
- **Impact Levels:**
109
-
110
- - `High (3)`: Severe consequences (data breach, system down, major financial loss)
111
- - `Medium (2)`: Moderate consequences (degraded performance, minor data issues)
112
- - `Low (1)`: Minor consequences (cosmetic issues, slight inconvenience)
113
-
114
- ### Risk Score = Probability × Impact
115
-
116
- - 9: Critical Risk (Red)
117
- - 6: High Risk (Orange)
118
- - 4: Medium Risk (Yellow)
119
- - 2-3: Low Risk (Green)
120
- - 1: Minimal Risk (Blue)
121
-
122
- ### 3. Risk Prioritization
123
-
124
- Create risk matrix:
125
-
126
- ```markdown
127
- ## Risk Matrix
128
-
129
- | Risk ID | Description | Probability | Impact | Score | Priority |
130
- | -------- | ----------------------- | ----------- | ---------- | ----- | -------- |
131
- | SEC-001 | XSS vulnerability | High (3) | High (3) | 9 | Critical |
132
- | PERF-001 | Slow query on dashboard | Medium (2) | Medium (2) | 4 | Medium |
133
- | DATA-001 | Backup failure | Low (1) | High (3) | 3 | Low |
134
- ```
135
-
136
- ### 4. Risk Mitigation Strategies
137
-
138
- For each identified risk, provide mitigation:
139
-
140
- ```yaml
141
- mitigation:
142
- risk_id: 'SEC-001'
143
- strategy: 'preventive' # preventive|detective|corrective
144
- actions:
145
- - 'Implement input validation library (e.g., validator.js)'
146
- - 'Add CSP headers to prevent XSS execution'
147
- - 'Sanitize all user inputs before storage'
148
- - 'Escape all outputs in templates'
149
- testing_requirements:
150
- - 'Security testing with OWASP ZAP'
151
- - 'Manual penetration testing of forms'
152
- - 'Unit tests for validation functions'
153
- residual_risk: 'Low - Some zero-day vulnerabilities may remain'
154
- owner: 'dev'
155
- timeline: 'Before deployment'
156
- ```
157
-
158
- ## Outputs
159
-
160
- ### Output 1: Gate YAML Block
161
-
162
- Generate for pasting into gate file under `risk_summary`:
163
-
164
- **Output rules:**
165
-
166
- - Only include assessed risks; do not emit placeholders
167
- - Sort risks by score (desc) when emitting highest and any tabular lists
168
- - If no risks: totals all zeros, omit highest, keep recommendations arrays empty
169
-
170
- ```yaml
171
- # risk_summary (paste into gate file):
172
- risk_summary:
173
- totals:
174
- critical: X # score 9
175
- high: Y # score 6
176
- medium: Z # score 4
177
- low: W # score 2-3
178
- highest:
179
- id: SEC-001
180
- score: 9
181
- title: 'XSS on profile form'
182
- recommendations:
183
- must_fix:
184
- - 'Add input sanitization & CSP'
185
- monitor:
186
- - 'Add security alerts for auth endpoints'
187
- ```
188
-
189
- ### Output 2: Markdown Report
190
-
191
- **Save to:** `qa.qaLocation/assessments/{epic}.{story}-risk-{YYYYMMDD}.md`
192
-
193
- ```markdown
194
- # Risk Profile: Story {epic}.{story}
195
-
196
- Date: {date}
197
- Reviewer: Quinn (Test Architect)
198
-
199
- ## Executive Summary
200
-
201
- - Total Risks Identified: X
202
- - Critical Risks: Y
203
- - High Risks: Z
204
- - Risk Score: XX/100 (calculated)
205
-
206
- ## Critical Risks Requiring Immediate Attention
207
-
208
- ### 1. [ID]: Risk Title
209
-
210
- **Score: 9 (Critical)**
211
- **Probability**: High - Detailed reasoning
212
- **Impact**: High - Potential consequences
213
- **Mitigation**:
214
-
215
- - Immediate action required
216
- - Specific steps to take
217
- **Testing Focus**: Specific test scenarios needed
218
-
219
- ## Risk Distribution
220
-
221
- ### By Category
222
-
223
- - Security: X risks (Y critical)
224
- - Performance: X risks (Y critical)
225
- - Data: X risks (Y critical)
226
- - Business: X risks (Y critical)
227
- - Operational: X risks (Y critical)
228
-
229
- ### By Component
230
-
231
- - Frontend: X risks
232
- - Backend: X risks
233
- - Database: X risks
234
- - Infrastructure: X risks
235
-
236
- ## Detailed Risk Register
237
-
238
- [Full table of all risks with scores and mitigations]
239
-
240
- ## Risk-Based Testing Strategy
241
-
242
- ### Priority 1: Critical Risk Tests
243
-
244
- - Test scenarios for critical risks
245
- - Required test types (security, load, chaos)
246
- - Test data requirements
247
-
248
- ### Priority 2: High Risk Tests
249
-
250
- - Integration test scenarios
251
- - Edge case coverage
252
-
253
- ### Priority 3: Medium/Low Risk Tests
254
-
255
- - Standard functional tests
256
- - Regression test suite
257
-
258
- ## Risk Acceptance Criteria
259
-
260
- ### Must Fix Before Production
261
-
262
- - All critical risks (score 9)
263
- - High risks affecting security/data
264
-
265
- ### Can Deploy with Mitigation
266
-
267
- - Medium risks with compensating controls
268
- - Low risks with monitoring in place
269
-
270
- ### Accepted Risks
271
-
272
- - Document any risks team accepts
273
- - Include sign-off from appropriate authority
274
-
275
- ## Monitoring Requirements
276
-
277
- Post-deployment monitoring for:
278
-
279
- - Performance metrics for PERF risks
280
- - Security alerts for SEC risks
281
- - Error rates for operational risks
282
- - Business KPIs for business risks
283
-
284
- ## Risk Review Triggers
285
-
286
- Review and update risk profile when:
287
-
288
- - Architecture changes significantly
289
- - New integrations added
290
- - Security vulnerabilities discovered
291
- - Performance issues reported
292
- - Regulatory requirements change
293
- ```
294
-
295
- ## Risk Scoring Algorithm
296
-
297
- Calculate overall story risk score:
298
-
299
- ```text
300
- Base Score = 100
301
- For each risk:
302
- - Critical (9): Deduct 20 points
303
- - High (6): Deduct 10 points
304
- - Medium (4): Deduct 5 points
305
- - Low (2-3): Deduct 2 points
306
-
307
- Minimum score = 0 (extremely risky)
308
- Maximum score = 100 (minimal risk)
309
- ```
310
-
311
- ## Risk-Based Recommendations
312
-
313
- Based on risk profile, recommend:
314
-
315
- 1. **Testing Priority**
316
- - Which tests to run first
317
- - Additional test types needed
318
- - Test environment requirements
319
-
320
- 2. **Development Focus**
321
- - Code review emphasis areas
322
- - Additional validation needed
323
- - Security controls to implement
324
-
325
- 3. **Deployment Strategy**
326
- - Phased rollout for high-risk changes
327
- - Feature flags for risky features
328
- - Rollback procedures
329
-
330
- 4. **Monitoring Setup**
331
- - Metrics to track
332
- - Alerts to configure
333
- - Dashboard requirements
334
-
335
- ## Integration with Quality Gates
336
-
337
- **Deterministic gate mapping:**
338
-
339
- - Any risk with score ≥ 9 → Gate = FAIL (unless waived)
340
- - Else if any score ≥ 6 → Gate = CONCERNS
341
- - Else → Gate = PASS
342
- - Unmitigated risks → Document in gate
343
-
344
- ### Output 3: Story Hook Line
345
-
346
- **Print this line for review task to quote:**
347
-
348
- ```text
349
- Risk profile: qa.qaLocation/assessments/{epic}.{story}-risk-{YYYYMMDD}.md
350
- ```
351
-
352
- ## Key Principles
353
-
354
- - Identify risks early and systematically
355
- - Use consistent probability × impact scoring
356
- - Provide actionable mitigation strategies
357
- - Link risks to specific test requirements
358
- - Track residual risk after mitigation
359
- - Update risk profile as story evolves
@@ -1,191 +0,0 @@
1
- # /shard-doc Task
2
-
3
- When this command is used, execute the following task:
4
-
5
- <!-- Powered by BMAD™ Core -->
6
-
7
- # Document Sharding Task
8
-
9
- ## Purpose
10
-
11
- - Split a large document into multiple smaller documents based on level 2 sections
12
- - Create a folder structure to organize the sharded documents
13
- - Maintain all content integrity including code blocks, diagrams, and markdown formatting
14
-
15
- ## Primary Method: Automatic with markdown-tree
16
-
17
- [[LLM: First, check if markdownExploder is set to true in .bmad-core/core-config.yaml. If it is, attempt to run the command: `md-tree explode {input file} {output path}`.
18
-
19
- If the command succeeds, inform the user that the document has been sharded successfully and STOP - do not proceed further.
20
-
21
- 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:
22
-
23
- 1. Install @kayvan/markdown-tree-parser globally with: `npm install -g @kayvan/markdown-tree-parser`
24
- 2. Or set markdownExploder to false in .bmad-core/core-config.yaml
25
-
26
- **IMPORTANT: STOP HERE - do not proceed with manual sharding until one of the above actions is taken.**"
27
-
28
- If markdownExploder is set to false, inform the user: "The markdownExploder setting is currently false. For better performance and reliability, you should:
29
-
30
- 1. Set markdownExploder to true in .bmad-core/core-config.yaml
31
- 2. Install @kayvan/markdown-tree-parser globally with: `npm install -g @kayvan/markdown-tree-parser`
32
-
33
- I will now proceed with the manual sharding process."
34
-
35
- Then proceed with the manual method below ONLY if markdownExploder is false.]]
36
-
37
- ### Installation and Usage
38
-
39
- 1. **Install globally**:
40
-
41
- ```bash
42
- npm install -g @kayvan/markdown-tree-parser
43
- ```
44
-
45
- 2. **Use the explode command**:
46
-
47
- ```bash
48
- # For PRD
49
- md-tree explode docs/prd.md docs/prd
50
-
51
- # For Architecture
52
- md-tree explode docs/architecture.md docs/architecture
53
-
54
- # For any document
55
- md-tree explode [source-document] [destination-folder]
56
- ```
57
-
58
- 3. **What it does**:
59
- - Automatically splits the document by level 2 sections
60
- - Creates properly named files
61
- - Adjusts heading levels appropriately
62
- - Handles all edge cases with code blocks and special markdown
63
-
64
- If the user has @kayvan/markdown-tree-parser installed, use it and skip the manual process below.
65
-
66
- ---
67
-
68
- ## Manual Method (if @kayvan/markdown-tree-parser is not available or user indicated manual method)
69
-
70
- ### Task Instructions
71
-
72
- 1. Identify Document and Target Location
73
-
74
- - Determine which document to shard (user-provided path)
75
- - Create a new folder under `docs/` with the same name as the document (without extension)
76
- - Example: `docs/prd.md` → create folder `docs/prd/`
77
-
78
- 2. Parse and Extract Sections
79
-
80
- CRITICAL AEGNT SHARDING RULES:
81
-
82
- 1. Read the entire document content
83
- 2. Identify all level 2 sections (## headings)
84
- 3. For each level 2 section:
85
- - Extract the section heading and ALL content until the next level 2 section
86
- - Include all subsections, code blocks, diagrams, lists, tables, etc.
87
- - Be extremely careful with:
88
- - Fenced code blocks (```) - ensure you capture the full block including closing backticks and account for potential misleading level 2's that are actually part of a fenced section example
89
- - Mermaid diagrams - preserve the complete diagram syntax
90
- - Nested markdown elements
91
- - Multi-line content that might contain ## inside code blocks
92
-
93
- CRITICAL: Use proper parsing that understands markdown context. A ## inside a code block is NOT a section header.]]
94
-
95
- ### 3. Create Individual Files
96
-
97
- For each extracted section:
98
-
99
- 1. **Generate filename**: Convert the section heading to lowercase-dash-case
100
- - Remove special characters
101
- - Replace spaces with dashes
102
- - Example: "## Tech Stack" → `tech-stack.md`
103
-
104
- 2. **Adjust heading levels**:
105
- - The level 2 heading becomes level 1 (# instead of ##) in the sharded new document
106
- - All subsection levels decrease by 1:
107
-
108
- ```txt
109
- - ### → ##
110
- - #### → ###
111
- - ##### → ####
112
- - etc.
113
- ```
114
-
115
- 3. **Write content**: Save the adjusted content to the new file
116
-
117
- ### 4. Create Index File
118
-
119
- Create an `index.md` file in the sharded folder that:
120
-
121
- 1. Contains the original level 1 heading and any content before the first level 2 section
122
- 2. Lists all the sharded files with links:
123
-
124
- ```markdown
125
- # Original Document Title
126
-
127
- [Original introduction content if any]
128
-
129
- ## Sections
130
-
131
- - [Section Name 1](./section-name-1.md)
132
- - [Section Name 2](./section-name-2.md)
133
- - [Section Name 3](./section-name-3.md)
134
- ...
135
- ```
136
-
137
- ### 5. Preserve Special Content
138
-
139
- 1. **Code blocks**: Must capture complete blocks including:
140
-
141
- ```language
142
- content
143
- ```
144
-
145
- 2. **Mermaid diagrams**: Preserve complete syntax:
146
-
147
- ```mermaid
148
- graph TD
149
- ...
150
- ```
151
-
152
- 3. **Tables**: Maintain proper markdown table formatting
153
-
154
- 4. **Lists**: Preserve indentation and nesting
155
-
156
- 5. **Inline code**: Preserve backticks
157
-
158
- 6. **Links and references**: Keep all markdown links intact
159
-
160
- 7. **Template markup**: If documents contain {{placeholders}} ,preserve exactly
161
-
162
- ### 6. Validation
163
-
164
- After sharding:
165
-
166
- 1. Verify all sections were extracted
167
- 2. Check that no content was lost
168
- 3. Ensure heading levels were properly adjusted
169
- 4. Confirm all files were created successfully
170
-
171
- ### 7. Report Results
172
-
173
- Provide a summary:
174
-
175
- ```text
176
- Document sharded successfully:
177
- - Source: [original document path]
178
- - Destination: docs/[folder-name]/
179
- - Files created: [count]
180
- - Sections:
181
- - section-name-1.md: "Section Title 1"
182
- - section-name-2.md: "Section Title 2"
183
- ...
184
- ```
185
-
186
- ## Important Notes
187
-
188
- - Never modify the actual content, only adjust heading levels
189
- - Preserve ALL formatting, including whitespace where significant
190
- - Handle edge cases like sections with code blocks containing ## symbols
191
- - Ensure the sharding is reversible (could reconstruct the original from shards)