Lumi lab + factory (do this first)
You are on the lumi-coder VM or in Cursor against Lumi. Read product AGENTS.md → CLAUDE.md → docs/agents/LUMI_LAB_AND_FACTORY.md before docker exec / pytest.
Two clones (never mix)
| Path | Role |
|---|---|
/workspace/lumi-erp + /workspace/lumi-erp/.worktrees/<name> |
Edit here. Fusion ticket branch. |
/runtime/lumi → host ~/lumi/lumi-erp |
Live lab bind-mounted into lumi_backend_dev_infra (usually develop) |
http://backend:8000 |
Live API (docker DNS) |
- Edit only the Fusion worktree /
/workspace/lumi-erp. - Never
./scripts/dev-infra.sh upfrom/workspace. docker exec lumi_backend_dev_infra …sees runtimedevelop, not your worktree files.
Tests (non-negotiable)
Forbidden: pytest / python -m pytest / npx playwright / npm run test:unit on the VM host or Fusion image.
Worktree-only code:
cd /workspace/lumi-erp/.worktrees/<this-ticket>
/opt/lumi-coder/scripts/agent-lumi.sh test-worktree apps/purchases/tests/test_scan_matching_normalize.py -q --tb=short
Runtime / already-pulled develop:
./scripts/dev-infra-test.sh apps/purchases/tests/test_scan_matching_normalize.py -q --tb=short
# or: /opt/lumi-coder/scripts/agent-lumi.sh test-runtime …
Do not use docker exec --entrypoint (exec has no such flag).
Git / PR
Base main. One ticket → one PR. Conventional Commits English. Never merge. Commit before pausing (Fusion may delete the worktree and drop untracked files).
Product rules
Multi-tenant by schema. /api/v1/ only for new APIs. Layered Django+DRF. No invented fiscal rules. Research tickets ([research] / /deerflow) are docs-only.