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. 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 lumenflowcompleted;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.
pnpm lumenflow scaffolds LUMENFLOW.md, LumenFlow-owned .lumenflow/skills, and workspace state. It never creates or changes tool-specific instruction files. Every consumer environment adapts the managed contract through its own project-owned configuration. See AI Coding Assistant Integrations for the migration pattern.
If lumenflow:doctor reports errors
Section titled “If lumenflow:doctor reports errors”lumenflow init automatically scaffolds scripts/safe-git and .husky/pre-commit. It resolves the dependency lock beside the updated manifest, publishes both together, synchronizes local main through the governed Git path, and runs an immutable package-manager install. For Yarn, Classic keeps install --ignore-scripts; Yarn 2 uses install --skip-builds and retains its link step; Yarn 3 and later use install --mode=update-lockfile, which writes the lock without linking packages or running build scripts. Init selects the generation from packageManager or lock metadata, then verifies the published manifest and lock with Yarn 2+‘s install --immutable or Classic’s existing frozen-lockfile install. If lock resolution, synchronization, or installation fails, init prints the concrete error and stops without reporting setup complete. If doctor still reports errors:
- Check the pre-commit hook:
pnpm lumenflowscaffolds.husky/pre-commit. If doctor reports the file missing, rerunpnpm lumenflow. If it reports the hook is not wired, runpnpm lumenflow:enable - Check node_modules: Resolve any registry or package-manager error, then run the matching immutable install (for example,
pnpm install --frozen-lockfile) after the consumer manifest and lock are synchronized - 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.
If init reports that local main is dirty or divergent, preserve and reconcile those changes, run pnpm git:sync-main from the clean primary checkout, then retry pnpm lumenflow. Init never repairs or resets the caller’s changes automatically.
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 ≥26.0.0) |
pnpm --version | Verify toolchain (require ≥11.4.0) |
git --version | Verify toolchain (require ≥2) |
git init | New project only |
pnpm init | Only if no package.json and user approved |
pnpm add -D @hellmai/lumenflow-cli | Install LumenFlow CLI |
pnpm lumenflow | Initialize LumenFlow (new repos) |
pnpm lumenflow --merge | Initialize LumenFlow (existing repos) |
pnpm lumenflow:doctor | Verify enforcement (errors block) |
pnpm lumenflow:doctor --deep | Optional: extended WU validation |
pnpm lumenflow:enable | Repair/install lifecycle enforcement if doctor reports non-enforced |
pnpm wu:create --help | Verify scripts were injected |
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:
-
Configure private registry access
@hellmai/lumenflow-cliis distributed through the private licence registry.In the project folder, add the non-secret routing line to the project’s
.npmrc(safe to commit):Windows (PowerShell):
Also, with pnpm 10.26 or newer, allow the CLI’s native SQLite dependency to build by merging this into the project’s root
pnpm-workspace.yaml(keep existing settings):Windows (PowerShell):
If
pnpm-workspace.yamlalready has anallowBuildskey, add thebetter-sqlite3: trueline under that existing key instead of appending a secondallowBuildsblock.On pnpm 10.0-10.25, add
better-sqlite3to the existingonlyBuiltDependencieslist instead of introducingallowBuilds. Do not configure both forms.In your home folder, sign in once at the user level — never from inside this or any pnpm project. Inside a pnpm project, npm stops with
EBADDEVENGINES. The owner gives you a one-line credential to run:Windows (PowerShell):
Still from your home folder, verify the credential can read real package metadata:
Windows (PowerShell):
This prints a version number. A
401/403means the credential is missing or wrong — fix it before continuing.Then return to the project folder before the next step:
Windows (PowerShell):
See Installing and upgrading with a LumenFlow licence for the full authentication options.
-
Install LumenFlow
-
Initialize LumenFlow
This is the canonical bootstrap-all path. It writes
workspace.yamland bootstraps Software Delivery settings underworkspace.yaml > software_delivery. The first governed command on a machine also prompts you to accept the LumenFlow licence terms (typeaccept, or setLUMENFLOW_EULA_ACCEPTED=1on a non-interactive host).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
-
Verify and, if needed, repair lifecycle enforcement
If doctor reports anything other than
enforcedfor a remediable state (non-compliant, missing, stale, or tampered), repair it and confirm: -
Commit LumenFlow setup
This setup commit goes directly to
main. The scaffolded pre-commit hook allows a commit onmainonly while the lanes recorded in the committedworkspace.yamlareunconfiguredordraft, so make every setup commit beforepnpm lane:lock. After lanes are locked, the hook refuses direct commits tomainand all work goes through WUs. -
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)
Feature WUs require a plan or spec reference.
--plancreates and links a lightweight repository plan; use--spec-refs "lumenflow://plans/my-plan.md"when one already exists.If you created an initiative, add:
--initiative <initiative-id>.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.
-
Configure private registry access
@hellmai/lumenflow-cliis distributed through the private licence registry.In the project folder, add the non-secret routing line to the project’s
.npmrc(safe to commit):Windows (PowerShell):
Also, with pnpm 10.26 or newer, allow the CLI’s native SQLite dependency to build by merging this into the project’s root
pnpm-workspace.yaml(keep existing settings):Windows (PowerShell):
If
pnpm-workspace.yamlalready has anallowBuildskey, add thebetter-sqlite3: trueline under that existing key instead of appending a secondallowBuildsblock.On pnpm 10.0-10.25, add
better-sqlite3to the existingonlyBuiltDependencieslist instead of introducingallowBuilds. Do not configure both forms.In your home folder, sign in once at the user level — never from inside this or any pnpm project. Inside a pnpm project, npm stops with
EBADDEVENGINES. The owner gives you a one-line credential to run:Windows (PowerShell):
Still from your home folder, verify the credential can read real package metadata:
Windows (PowerShell):
This prints a version number. A
401/403means the credential is missing or wrong — fix it before continuing.Then return to the project folder before the next step:
Windows (PowerShell):
See Installing and upgrading with a LumenFlow licence for the full authentication options.
-
Install LumenFlow
-
Initialize with merge mode
Merge mode still uses bootstrap-all semantics and keeps
workspace.yamlas canonical config. On an existing workspace, init fills only missing required kernel fields from maintained defaults and preserves explicit identity, namespaces, pack pins, lanes, security, policies, and pack-owned settings. It validates the result before writing; invalid explicit values are left untouched and reported. Do not use--forceas a legacy migration because it can replace managed workspace content. The first governed command on a machine also prompts you to accept the LumenFlow licence terms (typeaccept, or setLUMENFLOW_EULA_ACCEPTED=1on a non-interactive host). -
Verify scripts were injected
-
Verify and, if needed, repair lifecycle enforcement
If doctor reports anything other than
enforcedfor a remediable state (non-compliant, missing, stale, or tampered), repair it and confirm: -
Commit LumenFlow setup
This setup commit goes directly to
main. The scaffolded pre-commit hook allows a commit onmainonly while the lanes recorded in the committedworkspace.yamlareunconfiguredordraft, so make every setup commit beforepnpm lane:lock. After lanes are locked, the hook refuses direct commits tomainand all work goes through WUs. -
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 <initiative-id>.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 | Defer stack choices to a 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.