بنقرة واحدة
questioning-flow
Adaptive project initialization questioning that captures vision, requirements, and preferences
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Adaptive project initialization questioning that captures vision, requirements, and preferences
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
DEPRECATED compatibility shim; workflow-common-core is canonical for all conventions referenced here
Interprets --just-* and --skip-* command flags for /legion:build and /legion:review, validates flag combinations against rules, and resolves the matching team template from intent-teams.yaml. Use when the user passes intent flags to build or review commands, asks about flag combinations, or needs to filter agent teams by intent.
Dev-QA loop engine with structured feedback, fix routing, and user escalation for /legion:review
Executes wave-structured plans with personality-injected agents — parallel or sequential per CLI adapter
Maps all 48 Legion agents by division, capability, and task type for intelligent team assembly
Engine for /legion:map. Analyzes an existing codebase, generates CODEBASE.md for backward-compatible architecture context, and writes .planning/codebase/ index artifacts consumed by /legion:start, /plan, /build, /review, /status, and /quick.
| name | 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. |
Adaptive conversation engine for /legion:start. Captures everything needed to populate PROJECT.md, ROADMAP.md, and STATE.md templates through a 3-stage dialogue.
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.Looks correct / Correct a specific field / Add missing detail / Cancel. Never close a summary with an open "Anything to add?" prompt.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.
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 unknownsexisting-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.
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:
Question 2 — Planning Depth:
Question 3 — Cost Profile:
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] |
| 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. |
Requirements — each requirement is a checkbox item:
- [ ] User authentication with email/password
- [ ] Dashboard showing key metrics
- [ ] Export data as CSV
Decisions — each decision is a table row:
| Tech stack | Team familiarity and ecosystem maturity | Next.js + PostgreSQL |
| Execution mode | First project with Legion | Guided |
Out of scope / Constraints — plain bullet lists:
- Mobile app (web-first for v1)
- Multi-language support
Omission rule: If a section has no content (e.g., no constraints mentioned), omit the content entirely rather than writing "N/A" or "None." Leave the placeholder unfilled so the template renders cleanly with just the heading.
After all three stages are complete, decompose the captured requirements into phases for ROADMAP.md.
Group by dependency and domain — requirements that depend on each other or share a domain belong in the same phase. Foundation before features. Features before polish.
Order phases by dependency chain:
Size each phase by coherent work boundaries:
Name phases descriptively — use what the phase delivers, not a number:
Assign agents per phase — use the recommendation algorithm in agent-registry.md Section 3. For each phase:
Define success criteria — each phase needs testable, observable completion conditions:
Estimate plan count per phase:
planning.max_tasks_per_plan only as the per-plan task capFor each phase, produce a block matching the roadmap template pattern:
### Phase N: {phase_name}
**Goal**: One sentence describing what this phase delivers.
**Requirements**: R1, R2, R3 (reference the requirements list items)
**Recommended Agents**: agent-id-1, agent-id-2 (from agent-registry)
**Success Criteria**:
- [ ] Specific, testable criterion 1
- [ ] Specific, testable criterion 2
**Plans**: {estimated_plan_count}
- [ ] Phase 1: {phase_name} ({plan_count} plans)
- [ ] Phase 2: {phase_name} ({plan_count} plans)
| Depth | Phase Count | Plan Density | Notes |
|---|---|---|---|
| Quick Sketch | 2-3 | As needed | Keep phases broad, but preserve independent verification boundaries. |
| Standard | 3-6 | As needed | Balanced. Split plans when traceability or ownership improves. |
| Deep Analysis | 6+ | As needed | Add research phases when dependencies require them, not to avoid plan count. |
Accept it. Infer reasonable defaults from whatever context they provided. Record all assumptions as decisions in {decisions_table} with rationale "Inferred — user skipped detailed questioning." Apply default workflow preferences (Guided, Standard, Balanced).
If the user pastes or references an existing document:
{decisions_table}.The start.md command handles the overwrite warning. If the user confirms reinitialize, proceed with a clean questioning flow. Do not attempt to merge with existing state — it's a fresh start.
Push for specificity. Use:
"That's broad — if you could only ship ONE thing first, what would it be?"
If the user remains vague after two attempts, scope to what's concrete and note "Scope requires further refinement" in {constraints}.
Legion supports marketing, design, content, and research projects. If the project has no code component:
{architecture_notes} — omit the sectionIf requirements are small enough for one phase, that's fine. Create a single phase with 1-2 plans. Don't pad with artificial phases.
If the user contradicts something from an earlier stage, update the captured data. Always use the latest stated preference. Note the pivot in {decisions_table} if it's significant.