@lumenflow/cli 3.6.6 → 3.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/init.js +78 -7
  2. package/dist/init.js.map +1 -1
  3. package/dist/initiative-create.js +74 -23
  4. package/dist/initiative-create.js.map +1 -1
  5. package/dist/lane-lock.js +62 -1
  6. package/dist/lane-lock.js.map +1 -1
  7. package/dist/lane-setup.js +102 -28
  8. package/dist/lane-setup.js.map +1 -1
  9. package/dist/lane-status.js +42 -0
  10. package/dist/lane-status.js.map +1 -1
  11. package/dist/lane-validate.js +62 -1
  12. package/dist/lane-validate.js.map +1 -1
  13. package/dist/plan-link.js +25 -2
  14. package/dist/plan-link.js.map +1 -1
  15. package/dist/public-manifest.js +7 -0
  16. package/dist/public-manifest.js.map +1 -1
  17. package/dist/release.js +17 -0
  18. package/dist/release.js.map +1 -1
  19. package/dist/state-doctor-fix.js +12 -11
  20. package/dist/state-doctor-fix.js.map +1 -1
  21. package/dist/state-emit.js +198 -0
  22. package/dist/state-emit.js.map +1 -0
  23. package/dist/wu-claim-state.js +58 -15
  24. package/dist/wu-claim-state.js.map +1 -1
  25. package/dist/wu-claim-worktree.js +3 -3
  26. package/dist/wu-claim-worktree.js.map +1 -1
  27. package/dist/wu-claim.js +19 -1
  28. package/dist/wu-claim.js.map +1 -1
  29. package/dist/wu-create-content.js +2 -4
  30. package/dist/wu-create-content.js.map +1 -1
  31. package/dist/wu-create-validation.js +14 -1
  32. package/dist/wu-create-validation.js.map +1 -1
  33. package/dist/wu-create.js +2 -6
  34. package/dist/wu-create.js.map +1 -1
  35. package/dist/wu-done.js +95 -4
  36. package/dist/wu-done.js.map +1 -1
  37. package/dist/wu-edit-operations.js +36 -5
  38. package/dist/wu-edit-operations.js.map +1 -1
  39. package/dist/wu-recover.js +115 -12
  40. package/dist/wu-recover.js.map +1 -1
  41. package/package.json +9 -8
  42. package/packs/sidekick/.turbo/turbo-build.log +4 -0
  43. package/packs/sidekick/README.md +194 -0
  44. package/packs/sidekick/constants.ts +10 -0
  45. package/packs/sidekick/index.ts +8 -0
  46. package/packs/sidekick/manifest-schema.ts +262 -0
  47. package/packs/sidekick/manifest.ts +333 -0
  48. package/packs/sidekick/manifest.yaml +406 -0
  49. package/packs/sidekick/pack-registration.ts +110 -0
  50. package/packs/sidekick/package.json +55 -0
  51. package/packs/sidekick/tool-impl/channel-tools.ts +226 -0
  52. package/packs/sidekick/tool-impl/index.ts +22 -0
  53. package/packs/sidekick/tool-impl/memory-tools.ts +188 -0
  54. package/packs/sidekick/tool-impl/routine-tools.ts +194 -0
  55. package/packs/sidekick/tool-impl/shared.ts +124 -0
  56. package/packs/sidekick/tool-impl/storage.ts +315 -0
  57. package/packs/sidekick/tool-impl/system-tools.ts +155 -0
  58. package/packs/sidekick/tool-impl/task-tools.ts +278 -0
  59. package/packs/sidekick/tools/channel-tools.ts +53 -0
  60. package/packs/sidekick/tools/index.ts +9 -0
  61. package/packs/sidekick/tools/memory-tools.ts +53 -0
  62. package/packs/sidekick/tools/routine-tools.ts +53 -0
  63. package/packs/sidekick/tools/system-tools.ts +47 -0
  64. package/packs/sidekick/tools/task-tools.ts +61 -0
  65. package/packs/sidekick/tools/types.ts +57 -0
  66. package/packs/sidekick/tsconfig.json +20 -0
  67. package/templates/core/ai/onboarding/starting-prompt.md.template +33 -2
@@ -183,6 +183,20 @@ all signals are user-configured.
183
183
 
184
184
  ---
185
185
 
186
+ ## Top Gotchas (Read This First)
187
+
188
+ These are the mistakes agents make most often. Memorize these before reading anything else:
189
+
190
+ 1. **wu:done deletes the worktree.** After it completes, your shell CWD is invalid. Immediately `cd` back to the project root.
191
+ 2. **When wu:done fails with a non-fast-forward error, just rerun it.** It has built-in auto-rebase. Never manually `git rebase` on main.
192
+ 3. **Always run `--help` before first use of any command.** Don't guess flags — 30 seconds reading help saves 5 minutes of failed attempts.
193
+ 4. **Never `pnpm update @lumenflow/*` directly.** Use `pnpm lumenflow:upgrade --latest` (uses micro-worktree isolation).
194
+ 5. **State files are auto-generated.** Never manually edit `wu-events.jsonl`, `backlog.md`, or `status.md` — lifecycle commands manage them.
195
+ 6. **wu:edit requires a clean worktree.** Commit `wu-events.jsonl` and other changes before running `wu:edit`.
196
+ 7. **Don't edit on main then stash to a worktree.** If a hook blocks you on main, that means you need a WU. Create one and work in the worktree from the start.
197
+
198
+ ---
199
+
186
200
  ## Before Creating WUs
187
201
 
188
202
  Before the first delivery WU in a project, complete lane lifecycle:
@@ -420,6 +434,20 @@ pnpm wu:done --id WU-XXX --skip-gates \
420
434
  --fix-wu WU-XXX
421
435
  ```
422
436
 
437
+ ### Scenario 6: wu:done fails with non-fast-forward error
438
+
439
+ **Cause:** Another agent or process pushed to main between your fetch and push (race condition).
440
+
441
+ **Fix:** Just rerun `wu:done`. It has built-in auto-rebase that handles this cleanly.
442
+
443
+ ```bash
444
+ # WRONG - never manually rebase main
445
+ git rebase origin/main # DON'T DO THIS
446
+
447
+ # RIGHT - just rerun the command
448
+ pnpm wu:done --id WU-XXX
449
+ ```
450
+
423
451
  ---
424
452
 
425
453
  ## Delegating Sub-Agents with wu:brief / wu:delegate
@@ -498,14 +526,14 @@ pnpm wu:delegate --id WU-XXXX --parent-wu WU-YYYY --client <client-type>
498
526
  ```
499
527
  /path/to/repo/
500
528
  ├── docs/04-operations/tasks/
501
- │ ├── backlog.md # All WUs listed here
529
+ │ ├── backlog.md # All WUs listed here (auto-generated, don't edit)
502
530
  │ └── wu/WU-XXXX.yaml # Individual WU specs
503
531
  ├── worktrees/
504
532
  │ └── <lane>-wu-xxxx/ # Your isolated workspace
505
533
  ├── .lumenflow/
506
534
  │ ├── constraints.md # Non-negotiable rules
507
535
  │ ├── stamps/WU-XXXX.done # Completion stamps
508
- │ └── state/wu-events.jsonl # Event log
536
+ │ └── state/wu-events.jsonl # Event log (auto-generated, don't edit)
509
537
  └── LUMENFLOW.md # Main workflow docs
510
538
  ```
511
539
 
@@ -532,6 +560,9 @@ Before reporting a WU complete, verify:
532
560
  5. **Don't use LUMENFLOW_FORCE casually** - Only for genuine emergencies
533
561
  6. **Don't delete another agent's uncommitted work** - Coordinate with user
534
562
  7. **Don't work after context compaction** - Spawn fresh agent instead
563
+ 8. **Don't run `pnpm update @lumenflow/*` directly** - Use `pnpm lumenflow:upgrade`
564
+ 9. **Don't manually edit state files** - `wu-events.jsonl`, `backlog.md`, `status.md` are auto-generated
565
+ 10. **Don't edit on main then stash to worktree** - Create the WU first, work in the worktree from the start
535
566
 
536
567
  ---
537
568