Skip to content

Manual Quickstart (Humans)

Before you start, verify your tools and read through the common pitfalls. Each step below assumes you have followed them.

Required tooling:

node --version   # 22.0.0+
pnpm --version   # 9.0.0+
git --version    # 2.0.0+

Common pitfalls — avoid these as you go:

DoDon’t
Install @lumenflow/cli as a dev dependencyInstall globally with -g
Use CLI commands to modify configurationHand-edit workspace.yaml or WU YAML files
Work inside the worktree created by wu:claimEdit files on main or run git worktree add directly
Use relative paths inside the worktreeUse absolute paths that point outside the worktree
Run wu:prep from the worktree, wu:done from mainRun wu:done from inside the worktree
Fix pre-commit hook failures properlyBypass hooks with --no-verify
Let the CLI manage backlog.md, stamps, and statusManually edit managed files

Run this command in your project root.

pnpm add -D @lumenflow/cli

Run this command. It creates all required configuration files and injects scripts into package.json.

pnpm lumenflow

This creates:

  • workspace.yaml — Configuration (managed)
  • LUMENFLOW.md — Workflow entry point (managed)
  • AGENTS.md — Universal AI agent entry point (user-owned, LumenFlow inserts a managed section using bounded markers)
  • .lumenflow/constraints.md — Non-negotiable constraints (managed)
  • docs/tasks/ — Task storage (default path, or docs/operations/tasks/ for arc42 projects)

pnpm wu:create --help

If this command works, scripts are correctly installed. If not, re-run pnpm lumenflow --force.


For multi-phase projects or product visions, create an Initiative first. Skip for single-task work or bug fixes.

pnpm initiative:create \
  --id INIT-001 \
  --slug "my-project" \
  --title "My Project" \
  --owner "team@example.com"

pnpm initiative:edit --id INIT-001 --add-phase "Phase 1: MVP"
pnpm initiative:edit --id INIT-001 --add-phase "Phase 2: Polish"

Replace the values with your actual task details.

pnpm wu:create \
  --title "Fix login error banner" \
  --lane "Experience: UI" \
  --type bug \
  --exposure ui \
  --description "Fix error banner overlap on small screens" \
  --acceptance "Error banner no longer overlaps the form on mobile widths" \
  --code-paths "src/components/LoginError.tsx" \
  --test-paths-unit "src/components/__tests__/LoginError.test.tsx"

The CLI prints a WU ID (example: WU-123). Use this ID in subsequent commands.


pnpm wu:claim --id WU-123 --lane "Experience: UI"

This creates a worktree at worktrees/experience-ui-wu-123/.


cd worktrees/experience-ui-wu-123

All work happens inside this directory.


Write your code. Write tests. Commit your changes.

git add .
git commit -m "fix: resolve error banner overlap on mobile"

From inside the worktree:

pnpm wu:prep --id WU-123

This runs all quality gates (format, lint, typecheck, test) and prints the next command to run.


From the main checkout (not the worktree):

cd /path/to/your/repo
pnpm wu:done --id WU-123

This merges your work to main, creates a completion stamp, and removes the worktree.


After wu:done completes, verify:

  • WU YAML status is done
  • Stamp file exists at .lumenflow/stamps/WU-123.done
  • Worktree directory is removed
  • Changes are on main branch

LumenFlow manages certain files automatically. Understand which files you own.

File/DirectoryOwnerAction
workspace.yamlLumenFlowDo not edit manually. Use CLI commands.
LUMENFLOW.mdLumenFlowDo not edit. Regenerated on init.
AGENTS.mdYouUser-owned. LumenFlow manages section via markers.
.lumenflow/constraints.mdLumenFlowDo not edit. Contains workflow rules.
.lumenflow/stamps/LumenFlowDo not create manually. Created by wu:done.
docs/tasks/wu/*.yamlLumenFlowDo not create/edit manually. Use wu:create/wu:edit.
docs/tasks/backlog.mdLumenFlowDo not edit. Regenerated from state.
docs/tasks/status.mdLumenFlowDo not edit. Regenerated from state.
worktrees/LumenFlowDo not create manually. Created by wu:claim.
Your source codeYouEdit freely inside worktrees.
Your testsYouEdit freely inside worktrees.
package.json scriptsLumenFlowAuto-injected during init. Re-run with --force if missing.

CommandDescription
pnpm lumenflowInitialize LumenFlow
pnpm wu:create --title "..." ...Create a new Work Unit
pnpm wu:claim --id WU-XXX --lane "..."Claim WU and create worktree
pnpm wu:prep --id WU-XXXRun gates in worktree
pnpm wu:done --id WU-XXXComplete WU, merge, cleanup
pnpm wu:edit --id WU-XXX --field valueEdit WU fields
pnpm gatesRun quality gates (standalone)

Run any command with --help for all options.