Manual Quickstart (Humans)
Prerequisites
Section titled “Prerequisites”Verify these tools are installed before proceeding.
Step 1: Install the CLI
Section titled “Step 1: Install the CLI”Run this command in your project root.
Step 2: Initialize LumenFlow
Section titled “Step 2: Initialize LumenFlow”Run this command. It creates all required configuration files.
This creates:
.lumenflow.config.yaml— Configuration (managed)LUMENFLOW.md— Workflow entry point (managed)AGENTS.md— Universal AI agent entry point (user-owned, LumenFlow inserts managed section).lumenflow/constraints.md— Non-negotiable constraints (managed)docs/tasks/— Task storage (default path, ordocs/04-operations/tasks/for arc42 projects)
Step 3: Verify Scripts Were Injected
Section titled “Step 3: Verify Scripts Were Injected”LumenFlow automatically adds scripts to your package.json during initialization. Verify they exist.
If this command works, scripts are correctly installed. If not, re-run initialization.
Step 4: Create an Initiative (Optional)
Section titled “Step 4: Create an Initiative (Optional)”For multi-phase projects or product visions, create an Initiative first.
Skip this step for single-task work or bug fixes.
Step 5: Create Your First Work Unit
Section titled “Step 5: Create Your First Work Unit”Run this command. Replace the values with your actual task details.
The CLI prints a WU ID (example: WU-123). Use this ID in subsequent commands.
Step 6: Claim the Work Unit
Section titled “Step 6: Claim the Work Unit”Run this command with the ID from Step 5.
This creates a worktree at worktrees/experience-ui-wu-123/.
Step 7: Enter the Worktree
Section titled “Step 7: Enter the Worktree”Run this command immediately after claiming.
All work happens inside this directory.
Step 8: Implement and Commit
Section titled “Step 8: Implement and Commit”Write your code. Write tests. Commit your changes.
Step 9: Run Gates in Worktree
Section titled “Step 9: Run Gates in Worktree”Run this command from inside the worktree.
This runs all quality gates (format, lint, typecheck, test). It prints the next command to run.
Step 10: Complete the Work Unit
Section titled “Step 10: Complete the Work Unit”Run this command from the main checkout (not the worktree).
This merges your work to main, creates a completion stamp, and removes the worktree.
Verify Success
Section titled “Verify Success”After wu:done completes, verify these conditions.
- WU YAML status is
done - Stamp file exists at
.lumenflow/stamps/WU-123.done - Worktree directory is removed
- Changes are on main branch
File Ownership
Section titled “File Ownership”LumenFlow manages certain files automatically. Understand which files you own.
| File/Directory | Owner | Action |
|---|---|---|
.lumenflow.config.yaml | LumenFlow | Do not edit manually. Use CLI commands. |
LUMENFLOW.md | LumenFlow | Do not edit. Regenerated on init. |
AGENTS.md | You | User-owned. LumenFlow manages section via markers. |
.lumenflow/constraints.md | LumenFlow | Do not edit. Contains workflow rules. |
.lumenflow/stamps/ | LumenFlow | Do not create manually. Created by wu:done. |
docs/tasks/wu/*.yaml | LumenFlow | Do not create/edit manually. Use wu:create/wu:edit. |
docs/tasks/backlog.md | LumenFlow | Do not edit. Regenerated from state. |
docs/tasks/status.md | LumenFlow | Do not edit. Regenerated from state. |
worktrees/ | LumenFlow | Do not create manually. Created by wu:claim. |
| Your source code | You | Edit freely inside worktrees. |
| Your tests | You | Edit freely inside worktrees. |
package.json scripts | LumenFlow | Auto-injected during init. Re-run with --force if missing. |
Common Mistakes
Section titled “Common Mistakes”Avoid these errors. The left column shows correct behavior. The right column shows mistakes.
| Correct | Mistake |
|---|---|
pnpm wu:create --title "..." | Manually creating WU YAML files |
pnpm wu:claim --id WU-123 | Using git worktree add directly |
cd worktrees/experience-ui-wu-123 | Editing files on main branch |
pnpm wu:prep --id WU-123 (from worktree) | Skipping gates |
pnpm wu:done --id WU-123 (from main) | Running wu:done from inside worktree |
| Use relative paths inside worktree | Using absolute paths to main checkout |
| Fix hook failures | Using --no-verify to skip hooks |
pnpm wu:edit --id WU-123 --status blocked | Manually editing WU YAML status field |
| Let CLI manage backlog.md | Manually editing backlog.md |
| Let CLI manage stamps | Manually creating .done stamp files |
Command Reference
Section titled “Command Reference”| Command | Description |
|---|---|
pnpm exec lumenflow | Initialize 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-XXX | Run gates in worktree |
pnpm wu:done --id WU-XXX | Complete WU, merge, cleanup |
pnpm wu:edit --id WU-XXX --field value | Edit WU fields |
pnpm gates | Run quality gates (standalone) |
Run any command with --help for all options.
Next Steps
Section titled “Next Steps”- Work Units — Understand WU lifecycle and fields
- Gates — Learn about quality gates
- Configuration — Full configuration reference