HE Plan
Convert a spec into a decision-complete execution plan.
Inputs
- •
docs/specs/<slug>.md - •
docs/specs/<slug>-spike.md(if a spike was run — incorporate findings into plan decisions)
Output
- •
docs/plans/active/<slug>.md
Subagent Usage
Use subagents to research the codebase before writing the plan. Launch parallel subagents to explore different areas of the codebase (e.g., one for the data layer, one for the API layer, one for the UI layer). Gather file lists, existing patterns, and test conventions from subagent results, then synthesize into the plan in the main thread.
Planning Requirements
- •Read
plan_modefromdocs/specs/<slug>.md. - •For
executionmode:- •Define architecture and interface decisions.
- •Define task DAG with explicit dependencies using sequence IDs (
1,1.1,1.2). - •Keep DAG entries high-level (task summary, dependency, parallel safety, priority, status).
- •Use full task detail format (see template) with all fields.
- •For
lightweightmode:- •Keep plan concise (typically <= 3 tasks).
- •Use sequence IDs (
1,1.1,1.2) only as needed. - •Use minimal task detail format:
files,steps,test_type,verify,done_when. - •Keep one short decision log and progress log section in the same template.
- •Define priority level (
critical|high|medium|low) per task. - •In
Task Details, create one section per task/subtask using exact heading format:#### [ ] <task_seq> [Action-oriented title]. - •Define concrete target files per task/subtask in Task Details (exact repo-relative paths).
- •Define concrete tests and verification commands per task/subtask in Task Details.
- •Specify
test_type(unit or e2e) per task — no mock-based tests. - •Task DAG
statusis the single source of truth for task completion state. - •Keep implementation step checkboxes as local progress within each task detail.
- •Progress Log is append-only evidence — not a sync target.
- •Define rollout and rollback strategy.
- •Define escalation conditions.
- •Initialize
Decision LogandProgress Logsections.
Plan Template
Use templates/active-plan-template.md. Select the lightweight or execution task format based on plan_mode.
Exit Gate
- •Plan exists in
docs/plans/active/<slug>.md - •Every task has acceptance criteria (or
done_whenfor lightweight) - •Every task/subtask has a
#### [ ] <task_seq> [Action-oriented title]section in Task Details - •Every task/subtask lists concrete file paths and tests
- •Every task specifies
test_type(unit or e2e) — no mocks - •For
executionmode: every task includes objective, implementation steps, risks, rollback impact, and evidence fields - •For
lightweightmode: every task includes files, steps, verify, and done_when - •Implementation steps are markdown checkboxes
- •Task DAG status reflects current completion state
- •Rollback path exists
- •
Decision Logexists - •
Progress Logexists - •Docs commit gate passes
Transition Options
Present 2-3 explicit next-step options with a recommended default. Use request_user_input (Codex) or AskUserQuestion (Claude Code) in Plan mode; otherwise ask in chat. Wait for user selection before proceeding.
At least one option must be Next step: he-implement.