Skip to content

refactor(quick-flow): separate one-shot into self-contained step file#2044

Merged
alexeyv merged 2 commits intomainfrom
fix/oneshot-step-separation
Mar 18, 2026
Merged

refactor(quick-flow): separate one-shot into self-contained step file#2044
alexeyv merged 2 commits intomainfrom
fix/oneshot-step-separation

Conversation

@alexeyv
Copy link
Copy Markdown
Collaborator

@alexeyv alexeyv commented Mar 17, 2026

Summary

Reworked version of #1899, now from org repo branch.

  • Creates step-oneshot.md — self-contained one-shot step with implement/review/classify/commit/present
  • Routes one-shot directly from step-01 via EARLY EXIT pattern, bypassing steps 2–5 entirely
  • Removes all execution_mode and one-shot conditional branches from steps 3–5
  • Moves spec_file generation to plan-code-review path only (one-shot never needs it)
  • Simplifies step-01 NEXT section to single plan-code-review target

What changed vs the original PR #1899

  • Adapted to current file layout (no steps/ subdirectory)
  • Uses ./ relative paths instead of {installed_path}/steps/
  • Also cleans step-05-present.md (original PR missed this)
  • Fixes "No push" rule contradiction in step-oneshot (review finding)
  • Adds human escalation path for non-trivial one-shot findings (review finding)
  • Structured Present section with code -r file opening and summary format
  • Does NOT add a second commit step in step-04 (review caught this as a plan-code-review behavioral change)

Test plan

  • Trigger quick-dev-new-preview with a zero-blast-radius change — verify it routes to step-oneshot.md
  • Trigger quick-dev-new-preview with a non-trivial change — verify it still routes through step-02 → step-03 → step-04 → step-05
  • Verify steps 3–5 contain zero matches for "one-shot" or "execution_mode"
  • Verify plan-code-review path behavior is unchanged

🤖 Generated with Claude Code

One-shot and plan-code-review shared steps 3-5 which depend on spec
files one-shot never creates. Give one-shot its own step-oneshot.md
with implement/review/classify/commit/present. Clean all one-shot
and execution_mode references from steps 3-5. Restructure step-01
routing with EARLY EXIT pattern for one-shot and artifact-scan resume.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Mar 17, 2026

🤖 Augment PR Summary

Summary: Refactors the bmad-quick-dev-new-preview workflow to isolate the zero-blast-radius “one-shot” path into its own step file.

Changes: Adds step-oneshot.md (implement → review → classify → commit → present) and routes to it via an EARLY EXIT from step-01.

Routing: Step-01 can now EARLY EXIT directly to step-03/step-04 when resuming an existing spec, bypassing intermediate steps.

Cleanup: Removes execution_mode and one-shot conditional branches from steps 3–5; spec_file generation is now only on the plan-code-review route.

Technical note: Plan-code-review continues to rely on {spec_file} and {baseline_commit} for diff construction/presentation; one-shot no longer uses steps 2–5.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 17, 2026

📝 Walkthrough

Walkthrough

This PR refactors the bmad-quick-dev-new-preview workflow by introducing EARLY EXIT routing logic, consolidating execution paths into a unified review flow with an Acceptance Auditor role, and creating a new self-contained one-shot workflow step that can be invoked as an alternative path from the initial routing step.

Changes

Cohort / File(s) Summary
Routing and Early Exit Logic
step-01-clarify-and-route.md
Introduced EARLY EXIT semantics directing ready-for-dev/in-progress outcomes to step-oneshot; updated spec_file description and simplified routing to a single "choose exactly one" approach.
Unified Implementation Delegation
step-03-implement.md
Replaced conditional execution logic (one-shot vs. plan-code-review) with consistent delegation to sub-agent/task; updated frontmatter description to reflect plan-code-review via sub-agent, local only.
Consolidated Review Flow
step-04-review.md
Removed explicit one-shot/plan-code-review branching; unified to three-subagent review pattern; added Acceptance Auditor reviewer role; simplified loopback escalation to human halt without dynamic routing re-evaluation.
Generalized Presentation
step-05-present.md
Removed bifurcated plan-code-review vs. one-shot logic; unified presentation to always read baseline_commit from spec_file frontmatter and construct diff generically; simplified status updates and review order handling.
New One-Shot Workflow
step-oneshot.md
Added new self-contained workflow document providing direct implement-review-present path with inline review via subagent (or halt for external review), patch/defer/reject triage, and local commit with human-controlled push.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • bmadcode
  • pbean
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main refactoring: separating one-shot workflow into a self-contained step file, which is the primary change across all modified files.
Description check ✅ Passed The description comprehensively relates to the changeset, explaining the new step-oneshot.md file, routing changes, removal of conditional branches, and adapting from the original PR #1899.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/oneshot-step-separation
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can use oxc to improve the quality of JavaScript and TypeScript code reviews.

Add a configuration file to your project to customize how CodeRabbit runs oxc.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/step-oneshot.md (1)

23-24: Make {changed_files} explicit before Review/Present steps.

Both review invocation and editor-open instructions depend on {changed_files}, but the file never explicitly defines how that list is captured. Add a short “capture changed files” instruction right after implementation to remove ambiguity.

Based on learnings, one-shot mode relies on in-session changed-file tracking; making that explicit here improves execution reliability.

Also applies to: 41-43

🤖 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/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/step-01-clarify-and-route.md`:
- Around line 39-50: The new EARLY EXIT one-shot routing behavior introduced in
step-01-clarify-and-route.md (the "EARLY EXIT → ./step-oneshot.md" route and the
simplified routing semantics) must be reflected in repository docs: add or
update a docs page describing the one-shot path behavior, when to use it, the
zero-blast-radius criteria, and how it interacts with the existing
Plan-code-review flow (mention spec_file and kebab-case slug rules), and update
any docs index or navigation so readers can find ./step-oneshot.md;
alternatively, if no docs change is needed, add a short justification comment in
the PR linking to the decision and noting why existing docs already cover it.
🪄 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: 1767c013-58d5-417e-8ce4-5966207e0c0d

📥 Commits

Reviewing files that changed from the base of the PR and between f3f606a and 93d03e5.

📒 Files selected for processing (5)
  • src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/step-01-clarify-and-route.md
  • src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/step-03-implement.md
  • src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/step-04-review.md
  • src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/step-05-present.md
  • src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/step-oneshot.md

- Remove name/description from step-03-implement.md frontmatter (STEP-06)
- Remove name/description from step-oneshot.md frontmatter (STEP-06)
- Fix {project_root} to {project-root} placeholder convention
- Replace undefined {changed_files} with natural language

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@alexeyv alexeyv merged commit e84874e into main Mar 18, 2026
5 checks passed
@alexeyv alexeyv deleted the fix/oneshot-step-separation branch March 18, 2026 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant