name
legion:questioning-flow
description
Adaptive project initialization questioning that captures vision, requirements, and preferences
triggers
["start","initialize","project","question","discovery","setup"]
token_cost
low
summary
Guided questioning flow for new project initialization. Extracts vision, requirements, constraints, and architecture preferences through structured conversation. Generates PROJECT.md, ROADMAP.md, STATE.md.
Questioning Flow
Adaptive conversation engine for
/legion:start
. Captures everything needed to populate PROJECT.md, ROADMAP.md, and STATE.md templates through a 3-stage dialogue.
Section 1: Questioning Philosophy
Vision first, technology second
— understand what the user wants to exist before asking how to build it.
Adaptive depth
— follow the user's energy. If they go deep on a topic, explore it. If they give a terse answer, move on.
Infer where possible, confirm where uncertain
— don't ask questions the user already answered implicitly. State your inference and let them correct it.
Always close with a bounded choice (CLAUDE.md mandate)
— every user-facing question MUST invoke
adapter.ask_user
(AskUserQuestion on Claude Code) with a finite option set. Free-text prompts are not permitted. When the concept space is unbounded, include an
Other / Add details
option that opens a single free-text capture via
adapter.prompt_free_text
— never end a turn with an open prose prompt.
Target 5-8 total exchanges
— not 20 questions. Combine related questions. Skip what's already clear.
Summarize between stages with a closure question
— after each stage, reflect back what you captured and close with a bounded confirmation:
Looks correct
/
Correct a specific field
/
Add missing detail
/
Cancel
. Never close a summary with an open "Anything to add?" prompt.
Section 2: Conversation Flow
Stage 1: Vision & Identity (1-3 exchanges)
Purpose
: Capture
{project_name}
,
{project_description}
,
{value_proposition}
,
{target_users}
.
Open with an
adapter.ask_user
(AskUserQuestion) call
— not a bare prose prompt. Example option set for the opener:
id
label
description
pitch
Paste or type my elevator pitch
Opens
adapter.prompt_free_text
for a single free-text elevator pitch
from-spec
I have a spec/PRD to paste
Opens
adapter.prompt_free_text
for the spec text
from-url
Start from a link (repo, doc, deck)
Opens
adapter.prompt_free_text
for a URL
other
None of these
Opens
adapter.prompt_free_text
for an alternative entry
From the captured text, extract what you can. Then ask only what's still missing — each follow-up MUST be an
adapter.ask_user
call with a bounded option set (not a prose question):
Slot to fill
Options presented via
adapter.ask_user
{target_users}
Concrete user archetypes inferred from the pitch (3-5 options) +
Other (specify via free-text primitive)
{value_proposition}
Inferred value-prop candidates (2-4 options) +
Refine — describe the real differentiator
(free-text primitive)
{architecture_notes}
(competitive context)
Detected adjacent products/spaces (2-4 options) +
None of these — describe what's close
(free-text primitive) +
Nothing close exists
Only open a free-text primitive when the user explicitly selects an
Other
/
Refine
/
Describe
option — never as the default prompt.
After Stage 1
— Summarize, then close with a bounded
adapter.ask_user
confirmation:
Display the summary as plain text:
"Here's what I'm understanding:
[project_name]
is [project_description]. It's for [target_users] and the core value is [value_proposition]."
Then invoke
adapter.ask_user
with these options (exact schema — no free-text default):
id
label
description
confirm
Looks correct, proceed to Stage 2
Accept the summary as captured
correct-name
Correct the project name
Opens
adapter.prompt_free_text
scoped to
{project_name}
correct-description
Correct the description
Opens
adapter.prompt_free_text
scoped to
{project_description}
correct-users
Correct the target users
Opens
adapter.prompt_free_text
scoped to
{target_users}
correct-value
Correct the value proposition
Opens
adapter.prompt_free_text
scoped to
{value_proposition}
add-missing
Add missing detail not captured above
Opens
adapter.prompt_free_text
for an unbounded addition
cancel
Cancel initialization
Stop the questioning flow
Wait for a selection. Do NOT emit an open "Anything to correct or add?" prompt — that is a CLAUDE.md violation.
Stage 2: Requirements & Constraints (2-4 exchanges)
Purpose
: Capture
{requirements_list}
,
{out_of_scope}
,
{constraints}
,
{architecture_notes}
,
{decisions_table}
.
Core capture — always via
adapter.ask_user
:
For must-have features:
id
label
description
list-features
Enter the v1 feature list
Opens
adapter.prompt_free_text
for a bullet-list of must-haves
from-spec
Extract from a spec/PRD
Opens
adapter.prompt_free_text
for the spec text
defer-to-legion
Let Legion propose a minimal v1 from the vision captured
Legion drafts a feature list for user confirmation
For out-of-scope:
id
label
description
list-out-of-scope
Enter explicit exclusions
Opens
adapter.prompt_free_text
for the exclusion list
none
Nothing explicit — include whatever Legion suggests
No exclusions recorded
Adaptive follow-ups
— after detecting project type in Stage 1, invoke one
adapter.ask_user
call per slot with option lists inferred from the stack — never a free-prose question. Examples:
Project type signal
Slot
Example option set
Code/software
stack
Next.js + PostgreSQL
,
Django + Postgres
,
Rails + MySQL
,
Other (specify)
,
No preference
Code/software
codebase
Greenfield
,
Brownfield (existing repo)
,
Fork of existing project
Code/software
deploy-target
Vercel
,
Cloudflare
,
AWS
,
Self-hosted
,
Other (specify)
,
Undecided
Content/marketing
platforms
LinkedIn
,
X
,
Instagram
,
TikTok
,
YouTube
,
Newsletter
,
Other (specify)
Design
devices
Desktop web
,
Mobile web
,
Native iOS
,
Native Android
,
Cross-platform
,
Other (specify)
Research/analysis
deliverable
Report (markdown)
,
Slide deck
,
Dashboard
,
Dataset
,
Other (specify)
Rule: If you cannot enumerate 2-5 plausible options for a slot, do not ask — skip the slot and let the phase planner capture it later.
General optional slots
— each invoked via
adapter.ask_user
when relevant (skip the slot entirely if not):
constraints
— options:
None
,
Timeline
,
Budget
,
Hosting
,
Language/stack
,
Other (specify)
risk
— options: 3-5 inferred risks +
Other (specify)
+
No major unknowns
existing-assets
— options:
Existing repo
,
Existing designs
,
Existing content
,
Nothing yet
,
Other (specify)
timeline
— options:
No deadline
,
Soft (weeks)
,
Firm (date — specify)
,
Urgent (this week)
After Stage 2
— Summarize as plain text, then close with a bounded
adapter.ask_user
confirmation:
Summary display:
"Here's the v1 scope I captured: [bullet list]. Out of scope: [items]."
Close with:
id
label
description
confirm
Looks correct, proceed to Stage 3
Accept the requirements as captured
adjust-requirements
Adjust the v1 requirements list
Opens
adapter.prompt_free_text
scoped to
{requirements_list}
adjust-scope
Adjust the out-of-scope list
Opens
adapter.prompt_free_text
scoped to
{out_of_scope}
adjust-constraints
Adjust the constraints
Opens
adapter.prompt_free_text
scoped to
{constraints}
add-missing
Add missing detail not captured
Opens
adapter.prompt_free_text
for an unbounded addition
cancel
Cancel initialization
Stop the questioning flow
Do NOT close with an open "Any adjustments?" prompt — that is a CLAUDE.md violation.
Stage 3: Workflow Preferences (1-2 exchanges)
Purpose
: Capture execution mode, planning depth, and cost profile. These shape how ROADMAP.md phases are structured and how agents execute.
Present three structured choices. Use clear descriptions so the user can choose quickly.
Question 1 — Execution Mode
:
Guided
(Recommended): Legion recommends actions, you approve before each step. Best for first-time use or high-stakes projects.
Autonomous
: Legion plans and executes, you review at checkpoints. Best for trusted workflows or time pressure.
Collaborative
: Work alongside agents with high interaction. Best when you want to stay hands-on.
Question 2 — Planning Depth
:
Standard
(Recommended): Balanced planning and execution. 3-6 phases. Good for most projects.
Quick Sketch
: Minimal planning, start building fast. 2-3 phases. Good for prototypes or explorations.
Deep Analysis
: Thorough research and planning before execution. 6+ phases. Good for complex or unfamiliar domains.
Question 3 — Cost Profile
:
Balanced
(Recommended): Opus for planning, Sonnet for execution, Haiku for checks. Best cost/quality ratio.
Economy
: Sonnet for planning and execution, Haiku for checks. Lower cost, still capable.
Premium
: Opus for planning and execution, Sonnet for checks. Maximum quality, higher cost.
Record choices as decisions in
{decisions_table}
:
| Execution mode | [user rationale or "default"] | [chosen mode] |
| Planning depth | [user rationale or "default"] | [chosen depth] |
| Cost profile | [user rationale or "default"] | [chosen profile] |
Section 3: Output Structure
Placeholder Mapping
Template Placeholder
Source Stage
How to Fill
{project_name}
Stage 1
Short name extracted from pitch. Use the user's own words if they named it.
{project_description}
Stage 1
2-3 sentence description of what the project is.
{value_proposition}
Stage 1
Core differentiator — why this matters.
{target_users}
Stage 1
Who the project serves. Concrete user types, not vague "everyone."
{requirements_list}
Stage 2
Checkbox list of v1 requirements (see format below).
{out_of_scope}
Stage 2
Bullet list of explicitly excluded items. Omit section if none stated.
{constraints}
Stage 2
Technical, timeline, or resource constraints. Omit section if none.
{decisions_table}
Stage 2-3
Table rows:
| Decision | Rationale | Outcome |
{architecture_notes}
Stage 2
Stack choices, competitive context, technical direction. Omit if non-technical project.
{date}
Generated
Current date in YYYY-MM-DD format.
{phase_checklist}
Decomposition
Checkbox list of phases (see Section 4).
{phase_details_sections}
Decomposition
One detail block per phase (see roadmap template comment).
{progress_table}
Decomposition
One row per phase, all showing "Not started".
{total_phases}
Decomposition
Integer count of phases.
{total_plans}
Decomposition
Sum of estimated plans across all phases.
{progress_bar}
Generated
Empty progress bar matching total plans width, e.g.,
··········
{progress_percent}
Generated
0
at initialization.
{recent_decisions}
Stage 3
Workflow preference decisions formatted as bullet list.
{first_phase_name}
Decomposition
Name of Phase 1 for the "next action" prompt.
Formatting Rules
Requirements
— each requirement is a checkbox item: