fix: address code review findings across pipeline skills

- ce-brainstorm: Phase 0.1 skip now proceeds to Phase 0.2 (not 0.3),
  preserving the "requirements already clear" short-circuit gate
- slfg: add plan-file and implementation GATEs matching lfg
- ce-plan-beta: Pipeline Mode note now distinguishes workflow prompts
  (skip) from content questions like source-doc disambiguation (keep)
- Solution doc: update Phase 0.1 description to reflect staleness
  checks and blocking-question resume path
This commit is contained in:
Trevin Chow
2026-03-23 22:34:37 -07:00
parent 9f7d4616e9
commit a67808809e
3 changed files with 9 additions and 3 deletions
@@ -71,7 +71,7 @@ Three-part fix across four files.
Added a `## Pipeline Mode` section that defines behavior when invoked from LFG/SLFG/disable-model-invocation context:
- **Phase 0.1:** If a relevant requirements doc already exists in `docs/brainstorms/`, return control immediately. `ce:plan` already discovers these docs in its Phase 0 and will use them.
- **Phase 0.1:** If a relevant requirements doc already exists in `docs/brainstorms/`, check staleness first: skip the doc if a completed plan in `docs/plans/` already references it (via `origin:` + `status: completed`), or if its scope meaningfully diverges from the current `$ARGUMENTS`. If the doc is still relevant, check for `Resolve Before Planning` items -- if blocking questions remain, resume the brainstorm to resolve them rather than returning control (otherwise the pipeline dead-ends). If the doc is plan-ready, return control immediately.
- **Empty feature description:** Ask the user. This is the one interaction that cannot be skipped -- brainstorm owns "what do you want to build?"
- **Phase 0.2:** Genuine skip when requirements are clear. Do NOT proceed to Phase 1.3 (interactive dialogue) or Phase 3.
- **Workflow prompts** (handoff menus, "what do you want to do next?", "resume or start fresh?", post-generation options): Skip. The pipeline controls routing.
@@ -43,7 +43,7 @@ When invoked from an automated workflow (LFG, SLFG, or any `disable-model-invoca
Specific phase behavior:
- **Phase 0.1:** If a relevant requirements document already exists, read it. Skip it (treat as a new brainstorm) if: a plan in `docs/plans/` has an `origin:` frontmatter field pointing to this requirements doc and `status: completed` (the doc was already fully consumed), or its problem frame and requirements meaningfully diverge from the current feature description (`$ARGUMENTS`). If the doc is still relevant (no completed plan referencing it and scope matches), check for `Resolve Before Planning` items. If the document is plan-ready (no blocking questions), note it and return control immediately. If it still has `Resolve Before Planning` items, resume the brainstorm to resolve them (proceed to Phase 1.3) rather than returning control -- otherwise the pipeline dead-ends because `ce:plan` will block and re-invoking `ce:brainstorm` will hit this same check. Do not ask whether to resume or start fresh.
- **Phase 0.1:** If a relevant requirements document already exists, read it. Skip it (proceed to Phase 0.2 to reassess the current `$ARGUMENTS`) if: a plan in `docs/plans/` has an `origin:` frontmatter field pointing to this requirements doc and `status: completed` (the doc was already fully consumed), or its problem frame and requirements meaningfully diverge from the current feature description (`$ARGUMENTS`). If the doc is still relevant (no completed plan referencing it and scope matches), check for `Resolve Before Planning` items. If the document is plan-ready (no blocking questions), note it and return control immediately. If it still has `Resolve Before Planning` items, resume the brainstorm to resolve them (proceed to Phase 1.3) rather than returning control -- otherwise the pipeline dead-ends because `ce:plan` will block and re-invoking `ce:brainstorm` will hit this same check. Do not ask whether to resume or start fresh.
- **Phase 0.2 short-circuit is a genuine skip.** If requirements are already clear (specific acceptance criteria, exact expected behavior, well-defined scope), skip brainstorm entirely. Note "requirements clear, skipping brainstorm" and return control to the calling workflow. Do not proceed to Phase 1.3 or Phase 3.
- **Phases 1.3 and 2:** Content questions to clarify vague or ambiguous requirements are still permitted. The user is present and getting requirements right is more valuable than speed.
- **Phase 4 handoff is skipped.** Do not present handoff options or invoke `/ce:plan`. Write the requirements document (if warranted) and return control to the calling workflow.
@@ -64,7 +64,7 @@ Do not proceed until you have a feature description from the user.
If the user references an existing brainstorm topic or document, or there is an obvious recent matching `*-requirements.md` file in `docs/brainstorms/`:
- Read the document
- **In pipeline mode:** skip the document (proceed to Phase 0.3 as a new brainstorm) if a plan in `docs/plans/` has `origin:` pointing to this doc and `status: completed` (already fully consumed), or its scope meaningfully diverges from the current feature description (`$ARGUMENTS`). If the doc is still relevant (no completed plan referencing it and scope matches), check for `Resolve Before Planning` items. If none exist, note the existing document and return control immediately (see Pipeline Mode above). If blocking questions remain, resume the brainstorm to resolve them (proceed to Phase 1.3) rather than returning control. Do not ask the user whether to resume or start fresh.
- **In pipeline mode:** skip the document (proceed to Phase 0.2 to reassess whether brainstorming is needed for the current `$ARGUMENTS`) if a plan in `docs/plans/` has `origin:` pointing to this doc and `status: completed` (already fully consumed), or its scope meaningfully diverges from the current feature description (`$ARGUMENTS`). If the doc is still relevant (no completed plan referencing it and scope matches), check for `Resolve Before Planning` items. If none exist, note the existing document and return control immediately (see Pipeline Mode above). If blocking questions remain, resume the brainstorm to resolve them (proceed to Phase 1.3) rather than returning control. Do not ask the user whether to resume or start fresh.
- **Otherwise:** Confirm with the user before resuming: "Found an existing requirements doc for [topic]. Should I continue from this, or start fresh?"
- If resuming, summarize the current state briefly, continue from its existing decisions and outstanding questions, and update the existing document instead of creating a duplicate
@@ -17,12 +17,18 @@ Swarm-enabled LFG. Run these steps in order, parallelizing where indicated. Skil
## Sequential Phase
3. `/ce:plan $ARGUMENTS`
GATE: Verify that `ce:plan` produced a plan file in `docs/plans/`. If no plan file was created, run `/ce:plan $ARGUMENTS` again. Do NOT proceed until a written plan exists.
4. **Conditionally** run `/compound-engineering:deepen-plan`
- Run only if the plan is `Standard` or `Deep`, touches a high-risk area (auth, security, payments, migrations, external APIs, significant rollout concerns), or still has obvious confidence gaps in decisions, sequencing, system-wide impact, risks, or verification
- If deepen-plan ran, confirm the plan was deepened or judged sufficiently grounded before moving on
- If skipped, note why and continue
5. `/ce:work` -- **Use swarm mode**: Make a Task list and launch an army of agent swarm subagents to build the plan
GATE: Verify that implementation work was performed -- files were created or modified beyond the plan. Do NOT proceed if no code changes were made.
## Parallel Phase
After work completes, read `compound-engineering.local.md` frontmatter for `autopilot_features` settings (if missing, assume all enabled). Launch steps 6 and 7 as **parallel swarm agents** (both only need code to be written):