Quickstart (Agents)
Read this first: Your purpose
Section titled “Read this first: Your purpose”You are here to set up LumenFlow. That is your only job in the setup phase.
- ✅ Initialize LumenFlow in this repo
- ✅ Create an Initiative if the user provided a vision doc or multi-phase plan
- ✅ Complete lane lifecycle and create the first Work Unit (WU)
- ✅ Stop and hand off
- ❌ Do not implement features
- ❌ Do not write schemas/models/components
- ❌ Do not refactor or optimize code
- ❌ Do not scaffold project templates (Next.js/Vite/etc.) during setup. If the user wants a stack, create a WU after setup.
- ❌ Do not ask the user to choose templates/frameworks during setup. Ask only for client type; defer stack choices to a WU.
- ❌ Do not proceed past setup without explicit user approval
Setup Exit Criteria (Must be true)
Section titled “Setup Exit Criteria (Must be true)”- LumenFlow installed and activated. CLI installed;
pnpm lumenflow --client <client>completed;pnpm wu:create --helpworks. - LumenFlow enforced. Run
pnpm lumenflow:doctor; errors are blockers. Work happens only in claimed WUs; no edits on main; gates run beforewu:done. - Lane lifecycle configured. Run
pnpm lane:setup,pnpm lane:validate,pnpm lane:lockbefore first delivery WU. - Next step chosen with the user. Create one of: Discovery WU, concrete task WU, or Initiative for multi-phase vision. Stop after selection.
Supported clients: claude, cursor, windsurf, codex, cline, aider, all, none
If you don’t know the user’s client, ask before running init. If their client isn’t listed, use --client none for generic files only.
If lumenflow-doctor reports errors
Section titled “If lumenflow-doctor reports errors”lumenflow init automatically scaffolds scripts/safe-git and .husky/pre-commit. If doctor still reports errors:
- Check if Husky is installed: Run
pnpm add -D husky && pnpm exec huskyif missing - Check node_modules: Run
pnpm installto ensure dependencies are set up - Read the specific error message: Doctor explains what’s wrong and how to fix it
If errors persist after these steps, ask the user for help. Do not proceed to work until doctor passes.
Lane overlap warnings: Informational only. Do not edit workspace.yaml manually during setup.
Decide the next step (with the user)
Section titled “Decide the next step (with the user)”Use this ladder after setup:
- Multi-phase vision or roadmap → Create an Initiative first, then a Discovery WU to translate it into a small backlog.
- Clear single task → Create one concrete WU for that task.
- Unclear or exploratory → Create a Discovery WU: “Define next steps after LumenFlow setup.”
- Tech stack or scaffolding request → Create a WU: “Set up
<stack>after LumenFlow setup.”
Stop after creating the next artifact. Do not claim a WU without explicit approval.
If the user says the project is multi-phase or shares a vision doc, create an Initiative before any WU:
Allowed commands (setup only)
Section titled “Allowed commands (setup only)”If a command is not listed here, do not run it during setup.
If you are unsure about a command, run <command> --help first. Do not guess.
| Command | Purpose |
|---|---|
node --version | Verify toolchain (require ≥22) |
pnpm --version | Verify toolchain (require ≥9) |
git --version | Verify toolchain (require ≥2) |
git init | New project only |
pnpm init | Only if no package.json and user approved |
pnpm add -D @lumenflow/cli | Install LumenFlow CLI |
pnpm lumenflow --client <client> | Initialize LumenFlow (new repos) |
pnpm lumenflow --client <client> --merge | Initialize LumenFlow (existing repos) |
pnpm lumenflow:doctor | Verify enforcement (errors block) |
pnpm lumenflow:doctor --deep | Optional: extended WU validation |
pnpm wu:create --help | Verify scripts were injected |
pnpm lumenflow:integrate --client claude-code | Regenerate enforcement hooks (auto-run by init) |
pnpm initiative:create ... | Create an initiative |
pnpm initiative:edit ... | Add initiative phases |
pnpm lane:setup | Create/update draft lane artifacts |
pnpm lane:validate | Validate lane artifacts |
pnpm lane:lock | Lock lane lifecycle for WU creation |
pnpm lane:status | Check lane lifecycle status |
pnpm wu:create ... | Create first WU |
pnpm wu:status --id WU-XXX | Confirm WU status |
pnpm wu:claim --id WU-XXX --lane "..." | Only if user explicitly says “proceed” |
git add -A && git commit -m "..." | Commit scaffold/LumenFlow setup only |
Read-only commands allowed: pwd, ls, cat, rg, git status.
If a script command is not found, rerun pnpm lumenflow:commands and use the current documented
command instead of guessing older executable aliases.
Setup: New project
Section titled “Setup: New project”-
Verify toolchain
If any version is below minimum, stop and inform the user.
-
Initialize the repo (only if empty)
-
Ensure
package.jsonexistsIf there is no
package.json, create one. LumenFlow needs it to install the CLI and register scripts. -
Scaffold a tech stack only if the user explicitly asked
Keep this minimal. Do not add feature code.
If you scaffolded, commit the baseline:
-
Install LumenFlow
-
Initialize LumenFlow
This is the canonical bootstrap-all path. It writes
workspace.yamland bootstraps Software Delivery settings underworkspace.yaml > software_delivery.Treat this as a shape reference for the generated config. Manage it through the CLI and init flow; do not hand-edit
workspace.yamlduring setup. -
Verify scripts were injected
-
Commit LumenFlow setup
-
Create initiative (only if a vision doc exists)
Optional: connect the workspace to LumenFlow Cloud after bootstrap.
-
Configure lane lifecycle
-
Create the first WU (do not implement)
--spec-refsis optional; add it when a plan file exists (e.g.,--spec-refs "lumenflow://plans/my-plan.md").If you created an initiative, add:
--initiative INIT-001.Do not claim or implement unless the user explicitly says “proceed”.
Setup: Existing project
Section titled “Setup: Existing project”-
Verify toolchain
If any version is below minimum, stop and inform the user.
-
Install LumenFlow
-
Initialize with merge mode
Merge mode still uses bootstrap-all semantics and keeps
workspace.yamlas canonical config. -
Verify scripts were injected
-
Commit LumenFlow setup
-
Create initiative (optional)
If the user provided a vision doc or multi-phase plan:
-
Configure lane lifecycle
-
Create the first WU (do not implement)
If you created an initiative, add:
--initiative INIT-001.Do not claim or implement unless the user explicitly says “proceed”.
After setup is complete, do not create or modify any files (including notes or docs). The only allowed actions are creating an Initiative/WU and asking clarifying questions. Any real work must happen inside a claimed WU.
Setup handoff template
Section titled “Setup handoff template”Copy this template and fill in the values:
DO NOT list
Section titled “DO NOT list”These actions will break the workflow.
| Do Not | Instead |
|---|---|
| Work on main branch | Work in a worktree after wu:claim |
| Manually create WU YAML files | Use pnpm wu:create |
| Manually edit WU YAML status | Use pnpm wu:block, pnpm wu:unblock, or pnpm wu:release |
Use git worktree add directly | Use pnpm wu:claim |
Run wu:done from a worktree | Run from main checkout |
Use --no-verify to skip hooks | Fix hook failures properly |
| Manually edit backlog.md or status.md | Let CLI regenerate from state |
Manually edit workspace.yaml | Use CLI commands and lumenflow-doctor |
Run pnpm init by default | Only if user requested a bare Node project |
Run pnpm lumenflow:doctor | Use pnpm lumenflow:doctor |
| Fix enforcement without approval | Ask, then apply explicit fixes if approved |
| Ask more than 2 setup questions | Use defaults; ask only essential questions |
| Ask user to choose templates/frameworks | Ask only for client; defer stack choices to WU |
| Scaffold a tech stack during setup | Create a WU after setup, then scaffold |
| Create files/folders after setup | Only create files inside a claimed WU |
| Save user-provided docs during setup | Capture in WU, save in worktree after claim |
| Write feature code before a WU exists | Create a WU first |
| Continue after setup | Stop, hand off, and wait |
After setup
Section titled “After setup”All work flows through WUs and Initiatives only:
pnpm wu:createpnpm wu:claim→ enter worktree- Implement acceptance criteria
pnpm wu:preppnpm wu:done
If a user asks for work outside a WU, create a WU first and wait for approval.