feat(quick-dev): add epic context compilation to step-01#2218
feat(quick-dev): add epic context compilation to step-01#2218
Conversation
📝 WalkthroughWalkthroughThis PR adds a new documentation file defining a context-compilation agent workflow for extracting epic-relevant constraints and decisions from planning artifacts, and refactors step-01's routing logic to implement an explicit two-branch strategy: epic stories load precompiled or freshly compiled epic context, while non-epic intents follow an existing freeform path with selective planning artifact loading. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/bmm-skills/4-implementation/bmad-quick-dev/step-01-clarify-and-route.md`:
- Around line 49-51: The cached epic context load step must validate file
integrity before trusting it: when checking
`{implementation_artifacts}/epic-{N}-context.md` ensure the file both exists and
is non-empty and passes a basic sanity check (e.g., minimum byte/line length and
presence of expected markers like a title or frontmatter token). If the file is
missing, zero-length, below the minimum threshold, or fails the sanity check, do
not load it; instead trigger the `./compile-epic-context.md` sub-agent passing
the epic number, epics file path, `{planning_artifacts}` and the intended output
`{implementation_artifacts}/epic-{N}-context.md`, then verify the produced file
again for existence and integrity before loading; if it still fails, fall back
to path B. Ensure the same validation is applied after sub-agent completion and
that any validation failure causes recompilation or fallback rather than
silently accepting a bad cache.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c322946b-4b5a-4706-937f-1fade57a5e7d
📒 Files selected for processing (2)
src/bmm-skills/4-implementation/bmad-quick-dev/compile-epic-context.mdsrc/bmm-skills/4-implementation/bmad-quick-dev/step-01-clarify-and-route.md
src/bmm-skills/4-implementation/bmad-quick-dev/step-01-clarify-and-route.md
Outdated
Show resolved
Hide resolved
Fork step-01 context loading: epic stories get a sub-agent that
compiles planning docs into a cached epic-{N}-context.md, while
freeform intents keep the lightweight directory-listing path.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
92378cd to
6446b68
Compare
🤖 Augment PR SummarySummary: This PR adds an “epic story” context-loading path to the Changes:
Technical Notes: Epic context is intended to be regenerated only when missing, providing a lightweight cache for subsequent stories in the same epic. 🤖 Was this summary useful? React with 👍 or 👎 |
src/bmm-skills/4-implementation/bmad-quick-dev/step-01-clarify-and-route.md
Outdated
Show resolved
Hide resolved
src/bmm-skills/4-implementation/bmad-quick-dev/step-01-clarify-and-route.md
Outdated
Show resolved
Hide resolved
src/bmm-skills/4-implementation/bmad-quick-dev/step-01-clarify-and-route.md
Outdated
Show resolved
Hide resolved
- Validate cached epic-<N>-context.md is non-empty and starts with the
expected header before loading; treat invalid cache as missing.
- Replace inline {N} placeholders with <N> so the skill validator does
not flag them as unresolved workflow variables.
- Replace ambiguous "fall back to path B" with an explicit instruction
to scan/load planning artifacts using path B's procedure, with a note
not to re-evaluate path B's gating clause.
Addresses CodeRabbit and Augment review comments on PR #2218.
Triage complete — 4 findings
Totals: FIX=3, DISMISS=1, DEFER=0 Applied in commit 565167a:
|
- Restructure with Task/Steps opening and Exact Output Format section.
- Switch Stories template to bullet form for clarity.
- Add "no hallucination" and explicit "omit empty sections except Goal
and Stories" rules.
- Use <N> instead of {N} in the filename for consistency with step-01.
Reshape path A of step-01 into five explicit numbered steps and add an inline-compilation fallback for runtimes that cannot spawn sub-agents (Copilot, Codex, local Ollama, older Claude). - Pull cache validity, compilation, verification, and continuity into separate numbered steps instead of nested paragraphs. - Define "valid cached context" upfront: non-empty and starts with `# Epic <N> Context:`. - Add inline-compilation fallback: runtimes without sub-agent support read compile-epic-context.md and follow it directly. - Make previous-story continuity run regardless of which context source succeeded (cache hit, fresh compilation, or path-B raw fallback).
Summary
Test plan
Generated with Claude Code