Existing Projects
Adding LumenFlow to an existing project takes about 15 minutes. This guide walks through the process without disrupting your current workflow.
Prerequisites
Section titled “Prerequisites”Before starting:
- Git repository (any platform)
- Node.js 22+ (for CLI)
- Understanding of Work Units and Gates
Quick Overview
Section titled “Quick Overview”LumenFlow adds:
.lumenflow.config.yaml- Configuration fileLUMENFLOW.md- Workflow entry point.lumenflow/- State and constraintsdocs/04-operations/tasks/- WU specs and backlog (optional)- Git hooks for enforcement (optional)
It does not require:
- Changing your existing code structure
- Migrating existing tickets immediately
- Modifying CI/CD pipelines (optional enhancement)
- Team-wide adoption at once
Installation Methods
Section titled “Installation Methods”Full Setup with CLI
Section titled “Full Setup with CLI”The CLI provides the fastest path to adoption.
-
Install the CLI
bash pnpm add -D @lumenflow/clibash npm install -D @lumenflow/cli -
Initialize LumenFlow
Answer the prompts or use flags for non-interactive setup:
Agent onboarding docs are included by default. Use
--minimalto skip them.Adding to existing config files? Use
--mergemode to safely insert LumenFlow configuration into your existingAGENTS.mdor other files without overwriting your content:The merge mode uses bounded markers (
<!-- LUMENFLOW:START -->and<!-- LUMENFLOW:END -->) to safely insert and update the LumenFlow block. Running--mergetwice produces no changes on the second run (idempotent).Using a specific AI coding tool? Use the
--clientflag to generate client-specific overlay files: -
Review generated files
The init command creates (agent onboarding docs are now included by default):
- .lumenflow.config.yaml (your configuration) - LUMENFLOW.md (workflow entry point) - AGENTS.md (universal AI agent entry point) - .lumenflow/ - constraints.md (non-negotiable rules) - agents/ (AI agent guidance) - docs/04-operations/ - tasks/ - backlog.md - status.md - wu/ (WU spec directory) - _frameworks/lumenflow/agent/onboarding/ - quick-ref-commands.md (CLI command reference) - first-wu-mistakes.md (common pitfalls) - troubleshooting-wu-done.md (wu:done issues) - agent-safety-card.md (safety reference)
Use
--minimalto skip agent onboarding docs if you want a lighter setup.With
--clientflags, additional overlay files are created:Client Flag Files Created --client claudeCLAUDE.md--client cursor.cursor/rules/lumenflow.md--client windsurf.windsurf/rules/lumenflow.md--client allAll of the above -
Add scripts to package.json
-
Git hooks (auto-scaffolded)
lumenflow initautomatically creates.husky/pre-commit(blocks main commits) andscripts/safe-git(blocks dangerous git operations). To also run gates on commit:
Manual Setup (No CLI)
Section titled “Manual Setup (No CLI)”If you prefer not to use the CLI or are using a non-Node.js project.
-
Create configuration file
Create
.lumenflow.config.yamlin your repo root: -
Create LUMENFLOW.md
-
Create directory structure
-
Create backlog.md
-
Create your first WU
Create
docs/04-operations/tasks/wu/WU-001.yaml:
Mapping Existing Structure
Section titled “Mapping Existing Structure”Your Gates Are Already There
Section titled “Your Gates Are Already There”Most projects already have the tools LumenFlow gates run. Map them:
| Gate | Your Existing Command | LumenFlow Config |
|---|---|---|
| Format | npm run prettier | gates.execution.format |
| Lint | npm run eslint | gates.execution.lint |
| Typecheck | npm run tsc | gates.execution.typecheck |
| Test | npm test | gates.execution.test |
Example mapping:
Your Branches Map to Lanes
Section titled “Your Branches Map to Lanes”If you have team branches or areas:
| Current Branches | LumenFlow Lanes |
|---|---|
feature/*, frontend-* | Experience: UI |
api/*, backend-* | Framework: Core |
infra/*, devops-* | Operations: Infrastructure |
docs/* | Content: Documentation |
Your PRs Map to WUs
Section titled “Your PRs Map to WUs”Each pull request or ticket becomes a Work Unit:
| PR/Ticket Field | WU Field |
|---|---|
| Title | title |
| Description | description |
| Labels | lane, type |
| Acceptance | acceptance |
| Assignee | assigned_to |
Gradual Adoption Path
Section titled “Gradual Adoption Path”You don’t need to migrate everything at once.
Week 1: Shadow Mode
Section titled “Week 1: Shadow Mode”Run LumenFlow alongside existing workflow:
- Install and configure
- Create WUs for new work only
- Keep using existing tickets for in-progress work
- Run gates manually to test
Week 2-3: Parallel Operation
Section titled “Week 2-3: Parallel Operation”- New work starts as WUs
- Existing PRs complete normally
- When a PR completes, optionally create a retroactive WU for history
- Team familiarizes with commands
Week 4+: Full Adoption
Section titled “Week 4+: Full Adoption”- All new work uses WUs
- Close out ticket system (or keep for roadmap/epics)
- Enable git hooks (auto-scaffolded by
lumenflow init)
Coexistence Strategies
Section titled “Coexistence Strategies”Keep External Roadmap
Section titled “Keep External Roadmap”LumenFlow handles execution. Keep your roadmap tool:
Link them:
Hybrid Team Adoption
Section titled “Hybrid Team Adoption”Not everyone needs to adopt simultaneously:
| Role | Adoption Level |
|---|---|
| AI Agents | Full LumenFlow (required) |
| Backend Team | Full LumenFlow (recommended) |
| Frontend Team | Gradual adoption |
| Product Manager | Continues using roadmap tool |
Existing CI/CD
Section titled “Existing CI/CD”LumenFlow gates can run in CI without replacing your existing pipeline:
Common Concerns
Section titled “Common Concerns””We have hundreds of open tickets”
Section titled “”We have hundreds of open tickets””You don’t need to migrate them. Options:
- Ignore old tickets - Start fresh with WUs for new work
- Migrate incrementally - Convert tickets as you work on them
- Bulk migrate - Script conversion (see Migration Guide)
“Our team isn’t ready for trunk-based development”
Section titled ““Our team isn’t ready for trunk-based development””LumenFlow supports gradual transition:
- Start with worktrees (isolated, like feature branches)
- Gates run in worktrees, merge when passing
- This feels like PRs but with automated quality
”We need code review”
Section titled “”We need code review””LumenFlow doesn’t eliminate review, it changes when:
- Gates replace mechanical review (format, lint, types, tests)
- Human review for security, architecture, judgment calls
”Our tests are slow”
Section titled “”Our tests are slow””Use gate presets with test splitting:
Or run fast tests in gates, slow tests in CI.
Verification
Section titled “Verification”After setup, verify everything works:
Next Steps
Section titled “Next Steps”- Migration Guide - Migrate from existing tools
- Solo Developer Workflow - Simpler setup for individuals
- Team Workflow - Team-specific practices
- CLI Reference - Full command documentation