Manual Quickstart (Humans)
Prerequisites and common pitfalls
Section titled “Prerequisites and common pitfalls”Before you start, verify your tools and read through the common pitfalls. Each step below assumes you have followed them.
Required tooling:
Configure an attributable identity for this clone. LumenFlow fails closed when Git would otherwise invent an author from the machine hostname.
Repository access is enforced by your Git hosting provider and its permissions. LumenFlow does not generate a hook that pins a developer name, email domain, or GitHub account. If your project owns such a hook, remove that project policy rather than adding each developer to a LumenFlow allowlist.
Common pitfalls — avoid these as you go:
| Do | Don’t |
|---|---|
Install @hellmai/lumenflow-cli as a dev dependency | Install globally with -g |
| Use CLI commands to modify configuration | Hand-edit workspace.yaml or WU YAML files |
Work inside the worktree created by wu:claim | Edit files on main or run git worktree add directly |
| Use relative paths inside the worktree | Use absolute paths that point outside the worktree |
Run wu:prep from the worktree, wu:done from main | Run wu:done from inside the worktree |
| Fix pre-commit hook failures properly | Bypass hooks with --no-verify |
Let the CLI manage backlog.md, stamps, and status | Manually edit managed files |
Step 1: Configure Private Registry Access
Section titled “Step 1: Configure Private Registry Access”@hellmai/lumenflow-cli is 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.yaml already has an allowBuilds key, add the better-sqlite3: true line
under that existing key instead of appending a second allowBuilds block.
On pnpm 10.0-10.25, add better-sqlite3 to the existing onlyBuiltDependencies list instead of
introducing allowBuilds. 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/403 means 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, including the licence-key (username/_password) form.
Step 2: Install the CLI
Section titled “Step 2: Install the CLI”Run this command in your project root.
Step 3: Initialize LumenFlow
Section titled “Step 3: Initialize LumenFlow”Run this command. It creates all required configuration files and injects scripts into package.json.
This creates:
workspace.yaml— Configuration (managed)LUMENFLOW.md— Sole universal agent contract (managed).lumenflow/constraints.md— Non-negotiable constraints (managed)docs/tasks/— Task storage (default path, ordocs/operations/tasks/for arc42 projects)
The first governed command on a machine also prompts you to accept the LumenFlow licence terms
(type accept, or set LUMENFLOW_EULA_ACCEPTED=1 on a non-interactive host).
Step 4: Verify Scripts Were Injected
Section titled “Step 4: Verify Scripts Were Injected”If this command works, scripts are correctly installed. If not, re-run pnpm lumenflow --force.
Step 5: Verify and, if Needed, Repair Lifecycle Enforcement
Section titled “Step 5: Verify and, if Needed, Repair Lifecycle Enforcement”lumenflow:doctor classifies enforcement evidence as enforced, non-compliant-disabled,
missing, stale, or tampered. If it reports anything other than enforced for a remediable
state, repair it and confirm:
lumenflow:enable commits workspace.yaml and the enforcement files only; it never writes
LUMENFLOW.md (Step 3 does). A repository enabled without it can still claim WUs: each claim
pins the fact that LUMENFLOW.md is not committed, so committing it later counts as a policy
change, and any active claim then asks for the governed policy refresh. See
Scoped integration targets.
On Windows, Git for Windows defaults to core.autocrlf=true. The managed .gitattributes block
that lumenflow writes keeps LumenFlow’s hooks and state files LF on every checkout. If
lumenflow:doctor shows a Line Endings warning, the block predates those rules: run
pnpm lumenflow:upgrade to add them.
Step 6: Create an Initiative (Optional)
Section titled “Step 6: Create an Initiative (Optional)”For multi-phase projects or product visions, create an Initiative first. Skip for single-task work or bug fixes.
Step 7: Configure Lane Lifecycle
Section titled “Step 7: Configure Lane Lifecycle”Run before creating the first delivery WU:
Step 8: Create Your First Work Unit
Section titled “Step 8: Create Your First Work Unit”Replace the values with your actual task details.
The CLI prints a WU ID (example: <wu-id>). Use this ID in subsequent commands.
Step 9: Claim the Work Unit
Section titled “Step 9: Claim the Work Unit”This creates a worktree at worktrees/experience-ui-<wu-id>/.
Step 10: Enter the Worktree
Section titled “Step 10: Enter the Worktree”All work happens inside this directory.
Step 11: Implement and Commit
Section titled “Step 11: Implement and Commit”Write your code. Write tests. Commit your changes.
Step 12: Run Gates in Worktree
Section titled “Step 12: Run Gates in Worktree”From inside the worktree:
This runs all quality gates (format, lint, typecheck, test) and prints the next command to run.
Step 13: Complete the Work Unit
Section titled “Step 13: Complete the Work Unit”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, run the lifecycle verifier:
It checks the canonical done state, completion stamp, integration commit, and clean checkout without requiring you to know whether this workspace has migrated its state namespace.
File Ownership
Section titled “File Ownership”LumenFlow manages certain files automatically. Understand which files you own.
| File/Directory | Owner | Action |
|---|---|---|
workspace.yaml | LumenFlow | Do not edit manually. Use CLI commands. |
LUMENFLOW.md | LumenFlow | Do not edit. Regenerated on init. |
| Tool instruction files | You | Project-owned. Point to the LumenFlow contract if needed. |
.lumenflow/constraints.md | LumenFlow | Do not edit. Contains workflow rules. |
.lumenflow/state/packs/software-delivery/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. |
Command Reference
Section titled “Command Reference”| Command | Description |
|---|---|
pnpm 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 --description "..." | Edit a supported WU field |
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