-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Open
Description
Summary
Document-creation workflows (create-prd, create-architecture, create-epics-and-stories) should offer shard-doc as a post-completion step when the output document is large. Currently, the framework's consumption side fully supports sharded documents (via discover_inputs protocol with 3 loading strategies), but the creation side never suggests producing them.
The Gap
| Side | Sharding Support |
|---|---|
| Consumption (discover_inputs) | Sophisticated — checks sharded folder FIRST, falls back to whole file. Three strategies: FULL_LOAD, SELECTIVE_LOAD, INDEX_GUIDED |
| Creation (workflow completion) | None — no workflow suggests sharding after document creation |
Workflows affected
| Workflow | Completion Step | Suggests Sharding? |
|---|---|---|
| create-architecture | step-08-complete | No |
| create-prd | step-12-complete | No |
| create-epics-and-stories | step-04-final-validation | No |
Proposed Behavior
After a document-creation workflow completes, add a conditional post-completion check:
- Measure the created document (line count + number of
##headings) - If document exceeds threshold (~500 lines or 5+ level-2 sections):
- Inform user: "Your document is X lines with Y sections."
- Offer:
[S] Shard now using shard-doc/[C] Continue without sharding
- If user selects
S, invokeshard-doctask with the created document
Implementation options
- Centralized (preferred): Add post-completion hook in
workflow.xmlso all document-creating workflows benefit automatically - Per-workflow: Add to each completion step individually (more duplication)
Context
- Issue shard-doc task is orphaned: manifest mismatch, no consumers, no execution path #1260 mentioned this in "Suggested Fixes" point Combining BMAD-Method with cursor-custom-agents-rules-generator #3 ("Add shard-doc calls to document-generating workflows") but was closed after fixing only the invocability/slash-command issue
shard-docis now invocable via slash command (fixed in beta), but users must know it exists — discovery is poorbmad-help.csvlists shard-doc as an "anytime" utility, but help.md only shows sequential next-workflows, not contextual utilities
Environment
- BMAD Method version: 6.0.0 (installed via bmad-setup)
- Discovered while analyzing sharding candidates in a real project with 2000+ line architecture doc
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels