Planning
If preflight readiness is missing, stale, or blocked (check .pulse/tooling-status.json), stop and invoke pulse:using-pulse before continuing.
Planning has two jobs:
- Choose the least workflow that protects the work.
- Prepare only the approved current work for validating.
If this skill cannot explain the work with practical outcomes and realistic examples, it is not done.
Core Planning Model
Mode
-> Shape
-> Epic?
-> Current Work
-> Beads?
- Mode:
direct_task|spike|small_change|standard_feature|high_risk_feature - Shape: work-shape, phase-plan, or epic-map
- Current Work: direct item, spike question, current story, or current phase
- Bead: worker-sized executable unit for validated current work
For new feature work, define architecture/reality basis before shaping current work.
Hot-Path Rules
history/<feature>/CONTEXT.mdis the source of truth; planning reads but never overrides locked decisions.- Every
small_changestill requires an approved miniCONTEXT.md; do not treat low risk as permission to skip locked decisions. - Read
.pulse/project-docs.jsonfirst when present, then listed docs before relying only on feature history artifacts. - Start with a mode gate and record why smaller modes are insufficient when above
small_change. - Gate 2 is mandatory: do not prepare current-work artifacts before explicit shape approval.
- For tough work, prefer epic maps when capability/risk areas are clearer than milestone phases.
- Create beads only for approved current work, and only after feasibility passes (except already-proven direct/small work).
- Carry relevant corrections/ratchets from learnings into bead
learning_refs.
Pipeline
CONTEXT.md
-> Phase 0 Learnings Retrieval
-> Phase 1 Discovery (history/<feature>/discovery.md)
-> Phase 2 Synthesis (history/<feature>/approach.md)
-> Phase 3 Mode Gate + Work Shape (work-shape.md | phase-plan.md | epic-map.md)
-> HARD-GATE (Gate 2): human approval required
-> approved outcome: continue inside planning to current-work prep
-> Phase 4 Current-Work Prep (current-story-pack.md | phase-<n>-contract.md + phase-<n>-story-map.md)
-> Handoff: recommend pulse:validating (`next_action: manual_invoke` by default)
Bead timing contract:
direct_taskand already-provensmall_changemay create current-work beads in planning.standard_featureandhigh_risk_featuredefault to no-bead planning output; validating must confirm feasibility first.- After validating reaches feasibility
READY/READY WITH CONSTRAINTS, route once to planning to create only current-work beads, then resume validating for schema/structure/bead review.
Load references/planning-reference.md for mode quality rules and artifact templates.
Phase Execution Contract
Before you start
- If
.pulse/scripts/pulse_status.mjsexists, runnode .pulse/scripts/pulse_status.mjs --json. - Read
history/<feature>/CONTEXT.md; if missing, stop and ask the human to provide or approve a miniCONTEXT.mdthroughpulse:exploringbefore planning, even forsmall_change. - Stop if
.pulse/tooling-status.jsonreportsblocked. - Read project docs first (
.pulse/project-docs.jsonwhen present; otherwise minimal relevant docs set).
Phase 0: Learnings Retrieval (mandatory)
- Read
.pulse/memory/critical-patterns.md. - Check staleness via
.pulse/STATE.md; if last compounding is missing or >3 completed features old, warn and continue. - Use recall-pack pointers first (corrections -> ratchets -> learnings), then targeted grep only if needed.
- Record
Institutional Learningsat top ofhistory/<feature>/discovery.md.
Phase 1: Discovery
- Explore architecture topology, existing patterns, constraints, and external references only when novel.
- Prefer GitNexus when configured; explicitly document fallback when unavailable.
- Write
history/<feature>/discovery.mdusingreferences/planning-reference.md.
Phase 2: Synthesis
- Read
CONTEXT.md+discovery.md. - Write
history/<feature>/approach.mdusingreferences/planning-reference.md. - Include gap analysis, recommended approach, alternatives, risk map, proposed structure, learnings applied.
- For every HIGH risk define: component, reason, validating owner, YES/NO spike question, affected beads, decision gate options, and
testing_modeexpectation.
Phase 3: Mode Gate + Work Shape (Gate 2 setup)
- Choose mode first:
direct_task | spike | small_change | standard_feature | high_risk_feature. - Write one approved shape artifact:
work-shape.mdfor direct/spike/small workphase-plan.mdfor milestone-shaped workepic-map.mdfor capability/risk-shaped work
- Set
Approval status: PENDINGand stop for user approval. - If revised, set or keep
REVISE_REQUIRED; only setAPPROVEDafter explicit approval. - Gate 2 approval authorizes planning to continue into Phase 4; it does not invoke validating.
- After approval, update runtime state with
gate: GATE 2,gate_status: approved, and continue to current-work prep. - Planning is not complete until the approved current-work artifacts are written.
- Only invoke
pulse:validatingin the same session when the user explicitly chooses an equivalent ofApprove and continue to validating now; otherwise validating remains the next manual skill after planning completion.
Approval sync checklist before moving forward:
- Update shape artifact approval state.
- Sync same state into
.pulse/STATE.mdand.pulse/state.json. - Confirm both artifacts name the same approved current work.
- Enter current-work preparation after Gate 2 approval; do not invoke validating unless the user explicitly asked to continue to validating now in the same context.
Phase 4: Current-Work Prep
- Select current work from approved shape:
- direct/spike/small: current work in
work-shape.md - epic-map: current story in
current-story-pack.md - phase-plan: current phase contract/story map
- direct/spike/small: current work in
- Keep prep bounded to one executable current slice.
- Current work must lock entry/exit, scope, verification, and out-of-scope boundaries.
Phase 5: Current-Work Bead Creation (conditional)
- Create real beads with
br create; never pseudo-beads in markdown. - Create only current-work beads. Never create future-story/future-phase beads.
- Beads are allowed in planning only when either condition holds:
- mode is
direct_taskor already-provensmall_change - validating has already returned
READY/READY WITH CONSTRAINTSfor this current work and explicitly routed back for bead creation
- mode is
- For
standard_featureandhigh_risk_feature, do not create execution beads before feasibility passes. - For epic/phase work, keep one whole-feature epic open until final reviewing closeout.
- Normalize every bead immediately with required schema fields:
dependencies,files,verify,verification_evidence,testing_mode,decision_refs,learning_refs
- Use
references/bead-template.mdfor bead schema details. - Fill story/work-to-bead mapping after bead creation.
STATE + Handoff
After major transitions, update .pulse/STATE.md as a mirror of durable artifacts (source of truth remains history files).
If context exceeds 65% at a phase boundary:
- write
.pulse/handoffs/planning.jsonwith the shared envelope from../using-pulse/references/handoff-contract.md - register it in
.pulse/handoffs/manifest.json - keep payload concise and current-work specific (
completed_through,artifacts_written,beads_created,open_questions,current_work)
Completion Handoff
On success:
- discovery, approach, and approved shape artifact are written
- Gate 2 approval is recorded and synced
- current-work prep artifacts are written
- bead state is explicit:
- direct/proven-small path: current-work beads may already exist and