refactor(quick-dev): replace unconditional artifact scan with intent cascade#2105
refactor(quick-dev): replace unconditional artifact scan with intent cascade#2105
Conversation
🤖 Augment PR SummarySummary: Refactors 🤖 Was this summary useful? React with 👍 or 👎 |
| ### Tier 1: Explicit argument | ||
|
|
||
| The workflow was invoked with a file path, spec name, or clear directive as an argument. If that alone identifies the target unambiguously: | ||
| - If the argument names a `ready-for-dev` or `in-progress` spec: Set `spec_file`. **EARLY EXIT** → `./step-03-implement.md` |
There was a problem hiding this comment.
Tier 1 routing is based on whether a spec is ready-for-dev/in-progress/in-review, which typically requires reading the spec frontmatter. Consider stating explicitly that the spec file’s status must be verified (not inferred from the argument text) before choosing the EARLY EXIT target.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
|
|
||
| ### Tier 2: Preceding conversation context | ||
|
|
||
| No explicit argument, but the human turns before invocation contain a decision (e.g. "let's do X", discussion of a specific spec). If context alone resolves intent unambiguously, apply the same routing logic as Tier 1. Intent resolved — skip to INSTRUCTIONS. |
There was a problem hiding this comment.
Tier 2 ends with “Intent resolved — skip to INSTRUCTIONS,” which could be read as continuing even when context indicates an in-review or ready-for-dev spec. Consider making the Tier 1-style EARLY EXIT routing explicit here as well to reduce the risk of misrouting.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
📝 WalkthroughWalkthroughDocumentation update to the step-01 routing workflow, replacing an artifact-scan approach with an intent-cascade framework using tiered short-circuit evaluation. Routing now resolves through explicit arguments, preceding context, or artifact scan, with earlier tiers preventing later interactive gating prompts. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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
🧹 Nitpick comments (1)
src/bmm-skills/4-implementation/bmad-quick-dev/step-01-clarify-and-route.md (1)
31-31: Clarify Tier 2 control flow to avoid contradictory execution.Line 31 says “apply Tier 1 routing logic” and also “skip to INSTRUCTIONS.” For context that identifies an
in-revieworready-for-devspec, that second clause conflicts with Tier 1 early exits. Tighten wording so “skip to INSTRUCTIONS” applies only to new-work/intent cases.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/bmm-skills/4-implementation/bmad-quick-dev/step-01-clarify-and-route.md` at line 31, The Tier 2 paragraph referencing "apply Tier 1 routing logic" and "skip to INSTRUCTIONS" is ambiguous; update the sentence so that Tier 1's early-exit routing (the Tier 1 routing logic) is always honored for contexts that resolve to existing-spec states like "in-review" or "ready-for-dev", and make "skip to INSTRUCTIONS" explicitly apply only when the context represents a new-work/intent decision (i.e., an explicit new intent such as "let's do X"); ensure the wording names the states "in-review" and "ready-for-dev" and references INSTRUCTIONS and Tier 1 routing logic so readers know when to take the early-exit vs when to proceed directly to INSTRUCTIONS.
🤖 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 20-27: When Tier 1 or Tier 2 resolves the intent as "new work"
(the branches described in the Tier 1 bullets and the similar Tier 2 branch),
add a non-routing safety check that detects an existing {wipFile} and pauses the
early-exit: if {wipFile} exists, present the resume/archive choice (or
auto-archive) before proceeding to ingest new intent and before skipping Tier 3;
ensure this check lives immediately after the "new work" resolution in the
resolution logic so step-03/step-04 early exits only occur after the {wipFile}
decision is handled.
---
Nitpick comments:
In `@src/bmm-skills/4-implementation/bmad-quick-dev/step-01-clarify-and-route.md`:
- Line 31: The Tier 2 paragraph referencing "apply Tier 1 routing logic" and
"skip to INSTRUCTIONS" is ambiguous; update the sentence so that Tier 1's
early-exit routing (the Tier 1 routing logic) is always honored for contexts
that resolve to existing-spec states like "in-review" or "ready-for-dev", and
make "skip to INSTRUCTIONS" explicitly apply only when the context represents a
new-work/intent decision (i.e., an explicit new intent such as "let's do X");
ensure the wording names the states "in-review" and "ready-for-dev" and
references INSTRUCTIONS and Tier 1 routing logic so readers know when to take
the early-exit vs when to proceed directly to INSTRUCTIONS.
🪄 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: 4f0864b7-9302-48d4-ba3c-079ba4c8e309
📒 Files selected for processing (1)
src/bmm-skills/4-implementation/bmad-quick-dev/step-01-clarify-and-route.md
| Resolve intent using short-circuit evaluation — walk tiers in order, stop as soon as intent is unambiguous. Later tiers may still enrich understanding (e.g. artifact status confirms routing), but must not gate with interactive prompts once an earlier tier resolved the target. | ||
|
|
||
| ### Tier 1: Explicit argument | ||
|
|
||
| The workflow was invoked with a file path, spec name, or clear directive as an argument. If that alone identifies the target unambiguously: | ||
| - If the argument names a `ready-for-dev` or `in-progress` spec: Set `spec_file`. **EARLY EXIT** → `./step-03-implement.md` | ||
| - If the argument names an `in-review` spec: Set `spec_file`. **EARLY EXIT** → `./step-04-review.md` | ||
| - If the argument names an intent file or describes new work: Ingest it as the starting intent. Intent resolved — skip to INSTRUCTIONS. |
There was a problem hiding this comment.
Potential WIP data loss when Tier 1/2 resolves “new work”.
If intent resolves in Line 20/Line 27/Line 31 as “new work,” Tier 3 is skipped, so existing {wipFile} is never offered for resume/archive. Step 2 then writes to {wipFile}, which can clobber unfinished work.
Suggested guard (non-routing safety check)
Resolve intent using short-circuit evaluation — walk tiers in order, stop as soon as intent is unambiguous. Later tiers may still enrich understanding (e.g. artifact status confirms routing), but must not gate with interactive prompts once an earlier tier resolved the target.
+Exception: if resolved target is "new work" and `{wipFile}` exists, run a safety prompt (`[R] Resume` | `[A] Archive and continue`) before proceeding to INSTRUCTIONS.Also applies to: 31-31
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/bmm-skills/4-implementation/bmad-quick-dev/step-01-clarify-and-route.md`
around lines 20 - 27, When Tier 1 or Tier 2 resolves the intent as "new work"
(the branches described in the Tier 1 bullets and the similar Tier 2 branch),
add a non-routing safety check that detects an existing {wipFile} and pauses the
early-exit: if {wipFile} exists, present the resume/archive choice (or
auto-archive) before proceeding to ingest new intent and before skipping Tier 3;
ensure this check lives immediately after the "new work" resolution in the
resolution logic so step-03/step-04 early exits only occur after the {wipFile}
decision is handled.
0a0f75c to
9b2695f
Compare
…cascade Short-circuit evaluation in step-01: explicit argument → conversation context → full artifact scan. Stops prompting as soon as intent is unambiguous. All existing scan behaviors preserved in tier 3. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
9b2695f to
0504506
Compare
Summary
quick-devs step-01 used to run a full artifact scan on every invocation -- listing active specs and halting for input even when the user already said what they want. This adds an intent check that short-circuits that scan:
The scan still exists and works the same way -- it just doesnt fire when its not needed.
Test plan