name: 'step-01-mode-detection' description: 'Determine execution mode (tech-spec vs direct), handle escalation, set state variables'
workflow_path: '{project-root}/_bmad/bmm/workflows/bmad-quick-flow/quick-dev' thisStepFile: './step-01-mode-detection.md' nextStepFile_modeA: './step-03-execute.md'
Goal: Determine execution mode, capture baseline, handle escalation if needed.
These variables MUST be set in this step and available to all subsequent steps:
{baseline_commit} - Git HEAD at workflow start (or "NO_GIT" if not a git repo){execution_mode} - "tech-spec" or "direct"{tech_spec_path} - Path to tech-spec file (if Mode A)First, check if the project uses Git version control:
If Git repo exists (.git directory present or git rev-parse --is-inside-work-tree succeeds):
git rev-parse HEAD and store result as {baseline_commit}If NOT a Git repo:
{baseline_commit} = "NO_GIT"Check if {project_context} exists (**/project-context.md). If found, load it as a foundational reference for ALL implementation decisions.
Analyze the user's input to determine mode:
Mode A: Tech-Spec
quick-dev tech-spec-auth.md){execution_mode} = "tech-spec"{tech_spec_path} = provided pathstep-03-execute.mdMode B: Direct Instructions
refactor src/foo.ts...){execution_mode} = "direct"Evaluate user input with minimal token usage (no file loading):
Triggers escalation (if 2+ signals present):
Reduces signal:
Use holistic judgment, not mechanical keyword matching.
Present choice:
**[t] Plan first** - Create tech-spec then implement
**[e] Execute directly** - Start now
{quick_spec_workflow}. EXIT Quick Dev.step-02-context-gathering.mdThis looks like a focused feature with multiple components.
**[t] Create tech-spec first** (recommended)
**[w] Seems bigger than quick-dev** - see what BMad Method recommends
**[e] Execute directly**
{quick_spec_workflow}. EXIT Quick Dev.{workflow_init}. EXIT Quick Dev.step-02-context-gathering.mdThis sounds like platform/system work.
**[w] Start BMad Method** (recommended)
**[t] Create tech-spec** (lighter planning)
**[e] Execute directly** - feeling lucky
{workflow_init}. EXIT Quick Dev.{quick_spec_workflow}. EXIT Quick Dev.step-02-context-gathering.mdCRITICAL: When this step completes, explicitly state which step to load:
step-03-execute.md"step-02-context-gathering.md"{baseline_commit} captured and stored{execution_mode} determined ("tech-spec" or "direct"){tech_spec_path} set if Mode A