Initiatives
Initiatives are multi-phase projects that coordinate multiple Work Units across lanes.
When to Use Initiatives
Section titled “When to Use Initiatives”Use an initiative when:
- A feature spans multiple WUs (more than 3-4)
- Work spans multiple lanes (Framework + UI + Ops)
- There are dependencies between WUs
- You need phased rollout (Phase 1: Backend, Phase 2: Frontend, Phase 3: Launch)
Creating an Initiative
Section titled “Creating an Initiative”This creates docs/04-operations/tasks/initiatives/INIT-001.yaml:
Initiative Lifecycle
Section titled “Initiative Lifecycle”| Status | Description |
|---|---|
draft | Planning phase, defining scope |
open | Approved, ready to start |
in_progress | Active work underway |
done | All phases complete |
archived | Closed (cancelled or completed) |
Adding WUs to an Initiative
Section titled “Adding WUs to an Initiative”Link a single WU
Section titled “Link a single WU”Bulk assign WUs
Section titled “Bulk assign WUs”Edit WU to add initiative
Section titled “Edit WU to add initiative”Phased Execution
Section titled “Phased Execution”Initiatives support wave-based execution where WUs in each phase are completed before moving to the next:
Viewing Initiative Status
Section titled “Viewing Initiative Status”Output:
Mermaid Visualization
Section titled “Mermaid Visualization”Orchestrating Initiatives
Section titled “Orchestrating Initiatives”For AI-assisted execution, use the orchestration commands:
Dry Run (Preview)
Section titled “Dry Run (Preview)”Shows the execution plan without spawning agents. The output includes:
- Wave breakdown with WU assignments
- Bottleneck WUs (prioritize these for fastest unblocking)
- Recommended next steps with defaults
Execute with Checkpoints
Section titled “Execute with Checkpoints”This spawns agents for the current wave, then exits. Run again to process the next wave.
How checkpoint-per-wave works:
- The orchestrator groups WUs by dependency depth using topological sorting (Kahn’s algorithm)
- Each group becomes a “wave” — all WUs in a wave can run in parallel
- With
--checkpoint-per-wave(or-c), the orchestrator spawns agents for one wave, writes a manifest, then exits - Re-running the same command advances to the next wave (idempotent — already-completed WUs are skipped)
Wave manifest location:
Manifests are written to .lumenflow/artifacts/waves/ with the naming convention INIT-XXX-wave-N.json. Each manifest records:
- Wave number and WU IDs in that wave
- Spawn timestamps and agent IDs
- Completion status per WU
Idempotent re-runs:
If the orchestrator is interrupted or an agent crashes mid-wave, re-running orchestrate:initiative will:
- Skip WUs that already have
status: done - Re-spawn agents for WUs that are still
readyorin_progress - Advance to the next wave only when all WUs in the current wave are complete
Continuous Execution
Section titled “Continuous Execution”Spawns agents for all ready WUs and polls for completion.
Monitor Progress
Section titled “Monitor Progress”Shows signals from spawned agents. Use mem:inbox --since <duration> to check for
coordination signals between waves.
Delegation
Section titled “Delegation”When orchestrating an initiative, you delegate individual WUs to sub-agents. LumenFlow provides two commands for this, plus a way to inspect the delegation tree.
wu:brief — Generate Handoff Prompt
Section titled “wu:brief — Generate Handoff Prompt”wu:brief generates a complete context-loaded prompt for a sub-agent without any side effects:
The generated prompt includes:
- Context loading preamble (LUMENFLOW.md, constraints, WU YAML)
- Full acceptance criteria from the WU spec
- TDD directives and constraints block
- Truncation sentinels for verification
Use wu:brief when you want to review the prompt before spawning, or when delegation lineage tracking is not needed.
wu:delegate — Generate Prompt with Lineage
Section titled “wu:delegate — Generate Prompt with Lineage”wu:delegate does everything wu:brief does, plus records an auditable delegation record:
The delegation record captures:
- Parent WU (the orchestrator’s own WU or a coordination WU)
- Child WU (the delegated work)
- Timestamp and client type
- Delegation state (
pending,completed,timeout,crashed,escalated)
Use wu:delegate for initiative work where you need traceability of who-delegated-what.
delegation:list — Inspect the Tree
Section titled “delegation:list — Inspect the Tree”View the delegation tree for a specific WU or an entire initiative:
When NOT to Use wu:brief/wu:delegate
Section titled “When NOT to Use wu:brief/wu:delegate”Do not use these commands for helper agents working on your own WU:
- Code reviewer checking your changes — use inline context
- Test engineer validating your implementation — use inline context
- Explore agents for codebase research — use inline context
These helper agents do not need the full WU handoff prompt because they are assisting with your WU, not taking ownership of a separate one.
Memory Coordination
Section titled “Memory Coordination”During initiative orchestration, agents communicate through the memory layer using signals and an inbox. This is how the orchestrator knows when waves complete and how agents coordinate handoffs.
Sending Signals
Section titled “Sending Signals”Agents broadcast progress using mem:signal:
Signals are append-only (they produce immutable receipts) and are written to .lumenflow/memory/signals.jsonl.
Reading the Inbox
Section titled “Reading the Inbox”The orchestrator (or any interested agent) reads signals via mem:inbox:
Between-Wave Coordination Pattern
Section titled “Between-Wave Coordination Pattern”When using checkpoint-per-wave execution, the typical coordination flow is:
-
Orchestrator spawns Wave 1 agents
-
Agents broadcast completion signals as they finish
Each agent runs
mem:signalas part ofwu:done. -
Orchestrator checks inbox before spawning Wave 2
-
Orchestrator spawns next wave
Checkpoint Signals
Section titled “Checkpoint Signals”Agents can also create checkpoints for progress tracking within long-running WUs:
Checkpoints are useful for context recovery if an agent hits context limits or crashes mid-WU. The next agent (or resumed session) can read the checkpoint to understand where work left off.
Failure Recovery
Section titled “Failure Recovery”When agents get stuck, crash, or produce incorrect results during initiative execution, the orchestration system provides a structured escalation path.
Escalation Levels
Section titled “Escalation Levels”| Attempt | Severity | Action | Outcome |
|---|---|---|---|
| 1st | warning | Retry | Re-spawn the agent with the same parameters |
| 2nd | error | Block | Mark the WU as blocked, notify parallel agents |
| 3rd+ | critical | Human escalation | Create a Bug WU, alert a human operator |
Detecting Stuck Agents
Section titled “Detecting Stuck Agents”The orchestrate:monitor command detects agents that have been running longer than expected:
When stuck agents are detected, the monitor outputs copy-paste recovery commands.
Self-Healing Signal Flow
Section titled “Self-Healing Signal Flow”The system uses an agent-in-loop recovery pattern:
Recovery Commands
Section titled “Recovery Commands”When issues are detected, use these commands to recover:
Handling Abandoned WUs
Section titled “Handling Abandoned WUs”If an agent crashes and leaves a worktree behind:
Editing Initiatives
Section titled “Editing Initiatives”Update Status
Section titled “Update Status”Add/Remove Lanes
Section titled “Add/Remove Lanes”Add Phases
Section titled “Add Phases”Update Phase Status
Section titled “Update Phase Status”Block Initiative
Section titled “Block Initiative”Listing Initiatives
Section titled “Listing Initiatives”Linking Plans to Initiatives
Section titled “Linking Plans to Initiatives”Plans capture goals, scope, approach, and success criteria before implementation. Link a plan to an initiative to document the high-level strategy.
Create a New Plan
Section titled “Create a New Plan”This creates a plan template at docs/04-operations/plans/INIT-001-<slug>.md and links it to the initiative via the related_plan field.
Link an Existing Plan
Section titled “Link an Existing Plan”Plan URI Format
Section titled “Plan URI Format”Plans are referenced using the lumenflow://plans/ URI scheme:
Plan Template Structure
Section titled “Plan Template Structure”Best Practices
Section titled “Best Practices”-
Keep initiatives focused
An initiative should have a clear outcome. “Improve performance” is too vague; “Reduce API latency to under 100ms” is better.
-
Limit phases to 3-5
More phases create coordination overhead. If you need more, consider splitting into multiple initiatives.
-
Define dependencies upfront
Before starting, map out which WUs block which. This prevents surprises mid-execution.
-
Use checkpointing for AI agents
The
--checkpoint-per-waveflag prevents context exhaustion when orchestrating large initiatives. -
Review progress regularly
Run
initiative:statusat least daily to catch blockers early.
CLI Reference
Section titled “CLI Reference”| Command | Description |
|---|---|
pnpm initiative:create | Create new initiative |
pnpm initiative:edit | Edit initiative YAML |
pnpm initiative:list | List all initiatives |
pnpm initiative:status | Detailed status view |
pnpm initiative:add-wu | Link WU to initiative |
pnpm initiative:bulk-assign | Bulk assign WUs |
pnpm orchestrate:initiative | Orchestrate execution |
pnpm orchestrate:init-status | Compact status view |
pnpm orchestrate:monitor | Monitor agent progress |
pnpm wu:brief | Generate handoff prompt for delegation |
pnpm wu:delegate | Generate prompt with delegation lineage |
pnpm delegation:list | View delegation tree |
pnpm mem:signal | Broadcast coordination signal |
pnpm mem:inbox | Read coordination signals |
pnpm mem:checkpoint | Save progress checkpoint |
Next Steps
Section titled “Next Steps”- Flow Metrics — Track delivery performance
- AI Agents — Agent orchestration
- Work Units — WU fundamentals