If TASK_TRACKING: TaskUpdate(PHASE_TASKS[4], status: "completed")
Phase 5: Capture Learnings
If TASK_TRACKING: TaskUpdate(PHASE_TASKS[5], status: "in_progress")
PRIMARY_DIR = extract main folder from architect_output.file_recommendations
AGENTS_MD = walk up from PRIMARY_DIR until AGENTS.md found (default: root)
If new patterns or decisions discovered:
Edit(AGENTS_MD, append patterns/decisions)
If TASK_TRACKING: TaskUpdate(PHASE_TASKS[5], status: "completed")
Phase 6: Write Plan
If TASK_TRACKING: TaskUpdate(PHASE_TASKS[6], status: "in_progress")
Apply plan-builder skill.
Select template based on complexity:
Minimal: Single file changes, simple bugs
Standard: Most features (default)
Comprehensive: Major features, architectural changes
Output: Write to docs/plans/[YYYYMMDDHHMMSS]_<title>.md
If TASK_TRACKING: TaskUpdate(PHASE_TASKS[6], status: "completed")
Phase 7: Review Plan
If TASK_TRACKING: TaskUpdate(PHASE_TASKS[7], status: "in_progress")
Task(majestic-engineer:plan:plan-review):
prompt: "Review plan at {plan_path}"
Incorporate feedback and update plan file.
If TASK_TRACKING: TaskUpdate(PHASE_TASKS[7], status: "completed")
Phase 8: User Decision
If TASK_TRACKING: TaskUpdate(PHASE_TASKS[8], status: "in_progress")
AskUserQuestion:
question: "Blueprint ready at `{plan_path}`. What next?"
options:
- "Build as single task" → Phase 9a
- "Break into small tasks" → Phase 9b
- "Create as single epic" → Phase 9c
- "Deep dive into specifics" → Phase 8.1
- "Preview plan" → Read and display, return to Phase 8
- "Revise" → Ask what to change, return to Phase 6
- "Review and refine" → Apply document-refinement skill, return to Phase 8
IMPORTANT: After user selects, EXECUTE that action.
If TASK_TRACKING: TaskUpdate(PHASE_TASKS[8], status: "completed")
If "Review and refine":
Apply document-refinement skill to {plan_path}
→ Auto-fix minor issues in plan file
→ Present refinement report to user
→ Return to Phase 8
AskUserQuestion:
question: "Tasks added to plan. Create in backlog?"
options:
- "Yes, create tasks" → For each task in plan: Skill("backlog-manager")
- "No, just the plan" → Skip
Then offer build:
AskUserQuestion:
question: "Start building?"
options:
- "Build all tasks now" → Skill("run-blueprint") "{plan_path}"
- "Done for now" → End workflow
9c. Single Epic (user_choice == "Create as single epic"):
Skill("backlog-manager")
Update plan with task reference, then offer build:
AskUserQuestion:
question: "Start building?"
options:
- "Build all tasks now" → Skill("run-blueprint") "{plan_path}"
- "Done for now" → End workflow
If TASK_TRACKING: TaskUpdate(PHASE_TASKS[9], status: "completed")
Error Handling
Scenario
Action
Discovery skill fails
Ask user for AC manually, continue
Research skill fails
Continue with architect (degraded)
User skips validation
Continue to Phase 4
Architect fails
Log error, ask user to provide approach
Plan-review fails
Continue with original plan
Task creation fails
Report error, ask user to create manually
Config read fails
Use default value
User cancels
End workflow gracefully
Notes
Blueprint-only skill - no implementation code
Research and spec-review run in parallel (inside blueprint-research)
Architect MUST wait for research completion
All phases are mandatory except branches (8.1, 9a/9b/9c)