@lumenflow/cli 2.5.0 → 2.6.0
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.
- package/README.md +11 -8
- package/dist/__tests__/gates-config.test.js +304 -0
- package/dist/__tests__/init-scripts.test.js +111 -0
- package/dist/__tests__/templates-sync.test.js +219 -0
- package/dist/gates.js +64 -15
- package/dist/init.js +90 -0
- package/dist/orchestrate-init-status.js +37 -9
- package/dist/orchestrate-initiative.js +10 -4
- package/dist/sync-templates.js +137 -5
- package/dist/wu-prep.js +131 -8
- package/dist/wu-spawn.js +7 -2
- package/package.json +7 -7
- package/templates/core/.lumenflow/constraints.md.template +61 -3
- package/templates/core/LUMENFLOW.md.template +85 -23
- package/templates/core/ai/onboarding/agent-invocation-guide.md.template +157 -0
- package/templates/core/ai/onboarding/agent-safety-card.md.template +227 -0
- package/templates/core/ai/onboarding/docs-generation.md.template +277 -0
- package/templates/core/ai/onboarding/first-wu-mistakes.md.template +49 -7
- package/templates/core/ai/onboarding/quick-ref-commands.md.template +343 -110
- package/templates/core/ai/onboarding/release-process.md.template +8 -2
- package/templates/core/ai/onboarding/starting-prompt.md.template +407 -0
- package/templates/core/ai/onboarding/test-ratchet.md.template +131 -0
- package/templates/core/ai/onboarding/troubleshooting-wu-done.md.template +91 -38
- package/templates/core/ai/onboarding/vendor-support.md.template +219 -0
- package/templates/vendors/claude/.claude/skills/context-management/SKILL.md.template +13 -1
- package/templates/vendors/claude/.claude/skills/execution-memory/SKILL.md.template +14 -16
- package/templates/vendors/claude/.claude/skills/orchestration/SKILL.md.template +48 -4
- package/templates/vendors/claude/.claude/skills/worktree-discipline/SKILL.md.template +5 -1
- package/templates/vendors/claude/.claude/skills/wu-lifecycle/SKILL.md.template +19 -8
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
# Troubleshooting: wu:done
|
|
1
|
+
# Troubleshooting: wu:prep and wu:done Workflow
|
|
2
2
|
|
|
3
3
|
**Last updated:** {{DATE}}
|
|
4
4
|
|
|
5
|
-
This is the most common mistake agents make. This document explains
|
|
5
|
+
This is the most common mistake agents make. This document explains the two-step completion workflow introduced in WU-1223.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## The New Workflow (WU-1223)
|
|
10
|
+
|
|
11
|
+
As of WU-1223, completion is a **two-step process**:
|
|
12
|
+
|
|
13
|
+
1. **From worktree**: Run `pnpm wu:prep --id WU-XXX` (runs gates, prints copy-paste instruction)
|
|
14
|
+
2. **From main**: Run `pnpm wu:done --id WU-XXX` (merge + cleanup only)
|
|
6
15
|
|
|
7
16
|
---
|
|
8
17
|
|
|
@@ -21,54 +30,87 @@ Agents complete their work, write "To Complete: pnpm wu:done --id WU-XXX" in the
|
|
|
21
30
|
|
|
22
31
|
## The Fix
|
|
23
32
|
|
|
24
|
-
### Rule:
|
|
33
|
+
### Rule: Use wu:prep Then wu:done
|
|
25
34
|
|
|
26
|
-
After
|
|
35
|
+
After implementation is complete:
|
|
27
36
|
|
|
28
37
|
```bash
|
|
29
|
-
|
|
30
|
-
pnpm wu:
|
|
38
|
+
# Step 1: From worktree, run wu:prep
|
|
39
|
+
pnpm wu:prep --id WU-XXX
|
|
40
|
+
# This runs gates and prints a copy-paste instruction
|
|
41
|
+
|
|
42
|
+
# Step 2: Copy-paste the instruction from wu:prep output
|
|
43
|
+
cd /path/to/main && pnpm wu:done --id WU-XXX
|
|
31
44
|
```
|
|
32
45
|
|
|
33
46
|
Do NOT:
|
|
34
47
|
|
|
35
48
|
- Ask "Should I run wu:done?"
|
|
36
49
|
- Write "To Complete: pnpm wu:done"
|
|
37
|
-
-
|
|
38
|
-
-
|
|
50
|
+
- Run wu:done directly from a worktree (it will error)
|
|
51
|
+
- Skip wu:prep and go directly to wu:done from main (gates won't run in worktree)
|
|
39
52
|
|
|
40
53
|
---
|
|
41
54
|
|
|
42
55
|
## Correct Completion Flow
|
|
43
56
|
|
|
44
57
|
```bash
|
|
45
|
-
# 1. In worktree, run
|
|
46
|
-
pnpm
|
|
58
|
+
# 1. In worktree, run wu:prep
|
|
59
|
+
pnpm wu:prep --id WU-XXX
|
|
60
|
+
# Output includes: cd /path/to/main && pnpm wu:done --id WU-XXX
|
|
47
61
|
|
|
48
|
-
# 2.
|
|
49
|
-
cd /path/to/main
|
|
62
|
+
# 2. Copy-paste the wu:done command from the output
|
|
63
|
+
cd /path/to/main && pnpm wu:done --id WU-XXX
|
|
50
64
|
|
|
51
|
-
# 3.
|
|
52
|
-
pnpm wu:done --id WU-XXX
|
|
53
|
-
|
|
54
|
-
# 4. Report success with the wu:done output
|
|
65
|
+
# 3. Report success with the wu:done output
|
|
55
66
|
```
|
|
56
67
|
|
|
57
68
|
---
|
|
58
69
|
|
|
59
|
-
## What wu:
|
|
70
|
+
## What wu:prep Does (WU-1223)
|
|
71
|
+
|
|
72
|
+
When you run `pnpm wu:prep --id WU-XXX` from a worktree:
|
|
73
|
+
|
|
74
|
+
1. Validates you're in a worktree (errors if in main)
|
|
75
|
+
2. Runs gates in the worktree
|
|
76
|
+
3. Prints copy-paste instruction for wu:done
|
|
77
|
+
|
|
78
|
+
## What wu:done Does (WU-1223)
|
|
79
|
+
|
|
80
|
+
When you run `pnpm wu:done --id WU-XXX` from main:
|
|
81
|
+
|
|
82
|
+
1. Validates you're in main checkout (errors if in worktree)
|
|
83
|
+
2. Fast-forward merges the lane branch to main
|
|
84
|
+
3. Creates the done stamp
|
|
85
|
+
4. Updates status and backlog docs
|
|
86
|
+
5. Removes the worktree
|
|
87
|
+
6. Pushes to origin
|
|
88
|
+
|
|
89
|
+
**This two-step process is the ONLY way to complete a WU.** Manual steps will leave things in an inconsistent state.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Error Messages
|
|
94
|
+
|
|
95
|
+
### "wu:done must be run from main checkout"
|
|
96
|
+
|
|
97
|
+
If you see this error, you ran wu:done from a worktree. Use wu:prep instead:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# You're in the worktree - use wu:prep
|
|
101
|
+
pnpm wu:prep --id WU-XXX
|
|
102
|
+
# Then follow the copy-paste instruction it prints
|
|
103
|
+
```
|
|
60
104
|
|
|
61
|
-
|
|
105
|
+
### "wu:prep must be run from a worktree"
|
|
62
106
|
|
|
63
|
-
|
|
64
|
-
2. Runs gates in the worktree (not main)
|
|
65
|
-
3. Fast-forward merges to main
|
|
66
|
-
4. Creates the done stamp
|
|
67
|
-
5. Updates status and backlog docs
|
|
68
|
-
6. Removes the worktree
|
|
69
|
-
7. Pushes to origin
|
|
107
|
+
If you see this error, you ran wu:prep from main. Navigate to the worktree:
|
|
70
108
|
|
|
71
|
-
|
|
109
|
+
```bash
|
|
110
|
+
# Navigate to worktree first
|
|
111
|
+
cd worktrees/<lane>-wu-xxx
|
|
112
|
+
pnpm wu:prep --id WU-XXX
|
|
113
|
+
```
|
|
72
114
|
|
|
73
115
|
---
|
|
74
116
|
|
|
@@ -76,8 +118,8 @@ When you run `pnpm wu:done --id WU-XXX`:
|
|
|
76
118
|
|
|
77
119
|
If a WU is missing `exposure`, `wu:done` auto-sets a safe default:
|
|
78
120
|
|
|
79
|
-
- **Content lanes**
|
|
80
|
-
- **Framework/Operations lanes**
|
|
121
|
+
- **Content lanes** -> `documentation`
|
|
122
|
+
- **Framework/Operations lanes** -> `backend-only`
|
|
81
123
|
|
|
82
124
|
Existing exposure values are preserved.
|
|
83
125
|
|
|
@@ -102,11 +144,12 @@ If a previous agent forgot to run wu:done:
|
|
|
102
144
|
# 1. Check worktree exists
|
|
103
145
|
ls worktrees/
|
|
104
146
|
|
|
105
|
-
# 2. If it does, run wu:
|
|
106
|
-
|
|
147
|
+
# 2. If it does, navigate there and run wu:prep
|
|
148
|
+
cd worktrees/<lane>-wu-xxx
|
|
149
|
+
pnpm wu:prep --id WU-XXX
|
|
107
150
|
|
|
108
|
-
# 3.
|
|
109
|
-
|
|
151
|
+
# 3. Follow the copy-paste instruction
|
|
152
|
+
cd /path/to/main && pnpm wu:done --id WU-XXX
|
|
110
153
|
```
|
|
111
154
|
|
|
112
155
|
---
|
|
@@ -124,9 +167,9 @@ An incomplete WU causes problems:
|
|
|
124
167
|
|
|
125
168
|
## Checklist Before Ending Session
|
|
126
169
|
|
|
127
|
-
- [ ] Did I run `pnpm
|
|
128
|
-
- [ ] Did gates pass?
|
|
129
|
-
- [ ] Did I `cd` back to main?
|
|
170
|
+
- [ ] Did I run `pnpm wu:prep --id WU-XXX` in the worktree?
|
|
171
|
+
- [ ] Did wu:prep (gates) pass?
|
|
172
|
+
- [ ] Did I `cd` back to main using the copy-paste instruction?
|
|
130
173
|
- [ ] Did I run `pnpm wu:done --id WU-XXX`?
|
|
131
174
|
- [ ] Did wu:done complete successfully?
|
|
132
175
|
|
|
@@ -143,12 +186,22 @@ I've completed all the work. To finish:
|
|
|
143
186
|
1. Run `pnpm wu:done --id WU-123`
|
|
144
187
|
```
|
|
145
188
|
|
|
146
|
-
###
|
|
189
|
+
### ALSO WRONG:
|
|
147
190
|
|
|
148
191
|
```bash
|
|
149
|
-
#
|
|
150
|
-
cd /home/project/main
|
|
192
|
+
# Running wu:done from worktree (will error)
|
|
151
193
|
pnpm wu:done --id WU-123
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### RIGHT:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
# Step 1: From worktree, run wu:prep
|
|
200
|
+
pnpm wu:prep --id WU-123
|
|
201
|
+
# Output: cd /path/to/main && pnpm wu:done --id WU-123
|
|
202
|
+
|
|
203
|
+
# Step 2: Copy-paste the instruction
|
|
204
|
+
cd /path/to/main && pnpm wu:done --id WU-123
|
|
152
205
|
# Output: WU-123 completed successfully
|
|
153
206
|
```
|
|
154
207
|
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
# AI Coding Assistant Integrations
|
|
2
|
+
|
|
3
|
+
**Last updated:** {{DATE}}
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Works with Any AI
|
|
8
|
+
|
|
9
|
+
**LumenFlow is friction-free for any AI coding assistant.** If your AI can read project files, it can use LumenFlow.
|
|
10
|
+
|
|
11
|
+
### Universal Entry Points
|
|
12
|
+
|
|
13
|
+
Every LumenFlow project includes these plain markdown files that work with ANY AI:
|
|
14
|
+
|
|
15
|
+
| File | Purpose |
|
|
16
|
+
| --------------------------- | ---------------------------------------- |
|
|
17
|
+
| `AGENTS.md` | Universal agent instructions |
|
|
18
|
+
| `LUMENFLOW.md` | Workflow fundamentals and critical rules |
|
|
19
|
+
| `.lumenflow/constraints.md` | Non-negotiable constraints |
|
|
20
|
+
|
|
21
|
+
**No vendor lock-in.** Point any AI at these files and it understands the workflow.
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Initialize with universal files only (works with any AI)
|
|
25
|
+
lumenflow init
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Enhanced Integrations
|
|
31
|
+
|
|
32
|
+
For popular AI coding assistants, LumenFlow provides **optional enhanced integrations** with deeper features like auto-detection, skills, and vendor-specific configurations.
|
|
33
|
+
|
|
34
|
+
| Assistant | Config File | Auto-detected | Enhanced Features |
|
|
35
|
+
| ----------- | ------------------------------ | ------------- | ------------------------------- |
|
|
36
|
+
| Claude Code | `CLAUDE.md`, `.claude/` | Yes | Skills, agents, hooks, settings |
|
|
37
|
+
| Cursor | `.cursor/rules/lumenflow.md` | Yes | Rules integration |
|
|
38
|
+
| Windsurf | `.windsurf/rules/lumenflow.md` | Yes | Rules integration |
|
|
39
|
+
| Cline | `.clinerules` | No | Rules file |
|
|
40
|
+
| Codex | `AGENTS.md` (native) | No | Uses universal files directly |
|
|
41
|
+
| Aider | `.aider.conf.yml` | No | Config file |
|
|
42
|
+
| Antigravity | `AGENTS.md` (native) | Unknown | Research phase |
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Integration Details
|
|
47
|
+
|
|
48
|
+
### Claude Code (Anthropic)
|
|
49
|
+
|
|
50
|
+
Claude Code is Anthropic's official CLI for Claude. It has the deepest integration with LumenFlow.
|
|
51
|
+
|
|
52
|
+
**Config Files:**
|
|
53
|
+
|
|
54
|
+
- `CLAUDE.md` - Root-level instructions
|
|
55
|
+
- `.claude/settings.json` - Permission configuration
|
|
56
|
+
- `.claude/agents/` - Agent definitions
|
|
57
|
+
- `.claude/skills/` - Skill definitions
|
|
58
|
+
|
|
59
|
+
**Auto-detection:** Environment variables `CLAUDE_PROJECT_DIR` or `CLAUDE_CODE`
|
|
60
|
+
|
|
61
|
+
**Initialize:**
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
lumenflow init --client claude
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Cursor
|
|
68
|
+
|
|
69
|
+
Cursor is an AI-first code editor built on VS Code.
|
|
70
|
+
|
|
71
|
+
**Config Files:**
|
|
72
|
+
|
|
73
|
+
- `.cursor/rules/lumenflow.md` - LumenFlow rules
|
|
74
|
+
|
|
75
|
+
**Auto-detection:** Environment variables starting with `CURSOR_`
|
|
76
|
+
|
|
77
|
+
**Initialize:**
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
lumenflow init --client cursor
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Windsurf
|
|
84
|
+
|
|
85
|
+
Windsurf (Codeium) is an AI IDE with agentic capabilities.
|
|
86
|
+
|
|
87
|
+
**Config Files:**
|
|
88
|
+
|
|
89
|
+
- `.windsurf/rules/lumenflow.md` - LumenFlow rules
|
|
90
|
+
|
|
91
|
+
**Auto-detection:** Environment variables starting with `WINDSURF_`
|
|
92
|
+
|
|
93
|
+
**Initialize:**
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
lumenflow init --client windsurf
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Cline
|
|
100
|
+
|
|
101
|
+
Cline is an autonomous coding agent that works in VS Code.
|
|
102
|
+
|
|
103
|
+
**Config Files:**
|
|
104
|
+
|
|
105
|
+
- `.clinerules` - LumenFlow rules (root-level)
|
|
106
|
+
|
|
107
|
+
**Auto-detection:** Not supported
|
|
108
|
+
|
|
109
|
+
**Initialize:**
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
lumenflow init --client cline
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### OpenAI Codex
|
|
116
|
+
|
|
117
|
+
Codex reads the AGENTS.md file directly for universal instructions.
|
|
118
|
+
|
|
119
|
+
**Config Files:**
|
|
120
|
+
|
|
121
|
+
- `AGENTS.md` - Universal agent instructions (always created)
|
|
122
|
+
|
|
123
|
+
**Initialize:**
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
lumenflow init # AGENTS.md is created by default
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Aider
|
|
130
|
+
|
|
131
|
+
Aider is a terminal-based pair programming tool.
|
|
132
|
+
|
|
133
|
+
**Config Files:**
|
|
134
|
+
|
|
135
|
+
- `.aider.conf.yml` - Aider configuration
|
|
136
|
+
|
|
137
|
+
**Initialize:**
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
lumenflow init --client aider
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Antigravity (Research Phase)
|
|
146
|
+
|
|
147
|
+
**Status:** Research Phase
|
|
148
|
+
|
|
149
|
+
Antigravity is Google's AI IDE, announced in November 2025. It is MCP-based and appears to read `AGENTS.md` natively.
|
|
150
|
+
|
|
151
|
+
### What We Know
|
|
152
|
+
|
|
153
|
+
- **Announced:** November 2025
|
|
154
|
+
- **Platform:** Google's AI IDE
|
|
155
|
+
- **Protocol:** MCP (Model Context Protocol)
|
|
156
|
+
- **Agent Config:** Appears to read `AGENTS.md` natively (similar to Codex)
|
|
157
|
+
|
|
158
|
+
### Research Links
|
|
159
|
+
|
|
160
|
+
- [Google Codelabs - Getting Started with Antigravity](https://codelabs.developers.google.com/getting-started-google-antigravity)
|
|
161
|
+
- Google AI documentation (when available)
|
|
162
|
+
|
|
163
|
+
### Current Recommendation
|
|
164
|
+
|
|
165
|
+
For projects using Antigravity:
|
|
166
|
+
|
|
167
|
+
1. Ensure `AGENTS.md` is present (created by default with `lumenflow init`)
|
|
168
|
+
2. The universal instructions in AGENTS.md should work out of the box
|
|
169
|
+
3. Report any issues for future vendor-specific support
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Using Another AI?
|
|
174
|
+
|
|
175
|
+
If your AI coding assistant isn't listed above, LumenFlow still works:
|
|
176
|
+
|
|
177
|
+
1. Run `lumenflow init` to create universal entry points
|
|
178
|
+
2. Tell your AI to read `AGENTS.md` and `LUMENFLOW.md`
|
|
179
|
+
3. The workflow commands (`wu:claim`, `wu:done`, `gates`) work the same
|
|
180
|
+
|
|
181
|
+
**Want enhanced integration for your AI?** See [Adding New Integrations](#adding-new-integrations) below.
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## All Integrations Setup
|
|
186
|
+
|
|
187
|
+
To configure all enhanced integrations at once:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
lumenflow init --client all
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
This creates all vendor-specific configuration files alongside the universal entry points.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Sync Vendor Configs
|
|
198
|
+
|
|
199
|
+
To ensure all vendor configs are in sync with the template:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
# Check if configs are in sync
|
|
203
|
+
./scripts/sync-vendor-configs.sh --check
|
|
204
|
+
|
|
205
|
+
# Regenerate all configs from template
|
|
206
|
+
./scripts/sync-vendor-configs.sh
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Adding New Integrations
|
|
212
|
+
|
|
213
|
+
To add enhanced integration for a new AI coding assistant:
|
|
214
|
+
|
|
215
|
+
1. Update `templates/vendor-rules.template.md` (single source of truth)
|
|
216
|
+
2. Add vendor config path to `scripts/sync-vendor-configs.sh`
|
|
217
|
+
3. Add scaffolding in `packages/@lumenflow/cli/src/init.ts`
|
|
218
|
+
4. Update this integrations document
|
|
219
|
+
5. Test with `lumenflow init --client <vendor>`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: context-management
|
|
3
3
|
description: Session checkpoint patterns, output bypass for large results, when to spawn fresh sub-agents. Use for long-running sessions, context exhaustion, or agent coordination.
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.0
|
|
5
5
|
source: docs/04-operations/_frameworks/lumenflow/agent/onboarding/agent-invocation-guide.md
|
|
6
6
|
source_sections: Context Tiers, Session Management, Wave Orchestration
|
|
7
7
|
last_updated: {{DATE}}
|
|
@@ -76,6 +76,17 @@ pnpm mem:ready --wu WU-123 # Shows pending work
|
|
|
76
76
|
pnpm mem:inbox --wu WU-123 # Check signals from other agents
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
+
### Optional: Pre-Clear Checkpoint Hook
|
|
80
|
+
|
|
81
|
+
If your client supports hooks, add a pre-clear/pre-compaction hook that runs:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
pnpm mem:checkpoint "Pre-clear: <summary>" --wu WU-XXX --trigger pre-clear
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
This is a safety net for when humans forget to checkpoint. It does **not** replace the
|
|
88
|
+
spawn-fresh protocol; still exit and spawn a new agent after `/clear`.
|
|
89
|
+
|
|
79
90
|
## Output Bypass Pattern
|
|
80
91
|
|
|
81
92
|
For large results that would exhaust context:
|
|
@@ -151,5 +162,6 @@ Always load context in this order for best comprehension:
|
|
|
151
162
|
|
|
152
163
|
## Version History
|
|
153
164
|
|
|
165
|
+
- **v1.3.0** ({{DATE}}): Added pre-clear checkpoint hook guidance
|
|
154
166
|
- **v1.1.0** ({{DATE}}): Added wave orchestration pattern cross-reference
|
|
155
167
|
- **v1.0.0** ({{DATE}}): Initial skill created
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: execution-memory
|
|
3
3
|
description: Memory layer for session tracking, context recovery, and agent coordination. Use when resuming work after /clear, coordinating with parallel agents, or managing long-running sessions.
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
source: docs/04-operations/_frameworks/lumenflow/agent/onboarding/quick-ref-commands.md
|
|
6
6
|
source_sections: Memory Commands
|
|
7
7
|
last_updated: {{DATE}}
|
|
@@ -26,23 +26,18 @@ Activate automatically when:
|
|
|
26
26
|
|
|
27
27
|
## Quick Reference: Storage Location
|
|
28
28
|
|
|
29
|
-
All memory data is stored in `.
|
|
29
|
+
All memory data is stored in `.lumenflow/memory/` as append-only JSONL:
|
|
30
30
|
|
|
31
31
|
```
|
|
32
|
-
.
|
|
33
|
-
├──
|
|
34
|
-
|
|
35
|
-
├──
|
|
36
|
-
|
|
37
|
-
│ └── <timestamp>.md # Individual checkpoint
|
|
38
|
-
├── discoveries/ # Bugs, ideas, discoveries
|
|
39
|
-
│ └── <node-id>.json # Discovery node with type, status
|
|
40
|
-
├── signals/ # Inter-agent coordination signals
|
|
41
|
-
│ └── <timestamp>-<wu>.json # Signal with lane, message
|
|
42
|
-
└── summaries/ # Rollup summaries for compaction
|
|
43
|
-
└── <wu-id>-summary.md # Summarised session history
|
|
32
|
+
.lumenflow/memory/
|
|
33
|
+
├── memory.jsonl # Session/checkpoint/discovery/summary nodes
|
|
34
|
+
├── relationships.jsonl # Optional node relationships (blocks, related)
|
|
35
|
+
├── signals.jsonl # Inter-agent coordination signals
|
|
36
|
+
└── config.yaml # Retention policy defaults
|
|
44
37
|
```
|
|
45
38
|
|
|
39
|
+
Legacy docs may mention `.beacon/memory/`; the current source of truth is `.lumenflow/memory/`.
|
|
40
|
+
|
|
46
41
|
## Automatic Integration
|
|
47
42
|
|
|
48
43
|
The memory layer integrates automatically with WU lifecycle commands:
|
|
@@ -51,7 +46,7 @@ The memory layer integrates automatically with WU lifecycle commands:
|
|
|
51
46
|
|
|
52
47
|
When you run `pnpm wu:claim`:
|
|
53
48
|
|
|
54
|
-
1. Creates session node in `.
|
|
49
|
+
1. Creates session node in `.lumenflow/memory/memory.jsonl`
|
|
55
50
|
2. Links session to WU ID
|
|
56
51
|
3. Records baseline main SHA for recovery
|
|
57
52
|
|
|
@@ -60,7 +55,7 @@ When you run `pnpm wu:claim`:
|
|
|
60
55
|
When you run `pnpm wu:done`:
|
|
61
56
|
|
|
62
57
|
1. Creates pre-gates checkpoint (recovery point if gates fail)
|
|
63
|
-
2. Broadcasts completion signal to parallel agents
|
|
58
|
+
2. Broadcasts completion signal to parallel agents (`signals.jsonl`)
|
|
64
59
|
3. Checks `mem:inbox` for recent signals from other agents
|
|
65
60
|
4. Ends session and marks as completed
|
|
66
61
|
|
|
@@ -181,6 +176,9 @@ For long sessions (>20 tool calls):
|
|
|
181
176
|
4. **Query ready nodes**: `pnpm mem:ready --wu WU-XXX`
|
|
182
177
|
5. **Continue from checkpoint**
|
|
183
178
|
|
|
179
|
+
If your client supports hooks, add a pre-clear hook that runs `pnpm mem:checkpoint` automatically
|
|
180
|
+
before `/clear` or `/compact` to avoid losing context.
|
|
181
|
+
|
|
184
182
|
## Discovery Lifecycle
|
|
185
183
|
|
|
186
184
|
Discoveries captured via `mem:create` follow this lifecycle:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: orchestration
|
|
3
3
|
description: Agent orchestration dashboard and initiative execution. Use when running initiatives, monitoring spawned agents, or debugging stuck spawns.
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.5.0
|
|
5
5
|
source: packages/@lumenflow/cli/src/orchestrate.ts
|
|
6
6
|
last_updated: {{DATE}}
|
|
7
7
|
allowed-tools: Read, Bash, Grep
|
|
@@ -47,6 +47,49 @@ pnpm wu:spawn --id WU-XXX
|
|
|
47
47
|
|
|
48
48
|
---
|
|
49
49
|
|
|
50
|
+
## Verbatim Output Verification (WU-1131)
|
|
51
|
+
|
|
52
|
+
When using `wu:spawn` output to invoke Task agents, you **MUST** verify the output was not truncated.
|
|
53
|
+
|
|
54
|
+
### Truncation Detection
|
|
55
|
+
|
|
56
|
+
`wu:spawn` output includes:
|
|
57
|
+
|
|
58
|
+
- **Warning banner** at the start with truncation instructions
|
|
59
|
+
- **End sentinel** `<!-- LUMENFLOW_SPAWN_END -->` after the constraints block
|
|
60
|
+
|
|
61
|
+
### Verification Checklist
|
|
62
|
+
|
|
63
|
+
Before spawning a sub-agent with `wu:spawn` output:
|
|
64
|
+
|
|
65
|
+
1. **Check for end sentinel**: The output MUST end with `<!-- LUMENFLOW_SPAWN_END -->`
|
|
66
|
+
2. **Verify constraints block**: Look for `</constraints>` before the end sentinel
|
|
67
|
+
3. **Check warning banner**: The start should contain `LUMENFLOW_TRUNCATION_WARNING`
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Quick verification commands
|
|
71
|
+
pnpm wu:spawn --id WU-XXX | tail -5 # Should show LUMENFLOW_SPAWN_END
|
|
72
|
+
pnpm wu:spawn --id WU-XXX | head -20 # Should show TRUNCATION_WARNING
|
|
73
|
+
pnpm wu:spawn --id WU-XXX | grep -c 'constraints' # Should return 2 (open and close tags)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### What Truncation Causes
|
|
77
|
+
|
|
78
|
+
If spawn output is truncated, sub-agents will:
|
|
79
|
+
|
|
80
|
+
- Miss TDD directives (skip writing tests first)
|
|
81
|
+
- Miss constraints block (ignore safety rules)
|
|
82
|
+
- Miss worktree discipline (edit main instead of worktree)
|
|
83
|
+
- Miss wu:done instructions (ask for permission instead of completing)
|
|
84
|
+
|
|
85
|
+
### If Truncation Is Detected
|
|
86
|
+
|
|
87
|
+
1. Re-run `wu:spawn` and capture full output
|
|
88
|
+
2. If context window is too small, use `--codex` for shorter Markdown format
|
|
89
|
+
3. Consider breaking WU into smaller sub-WUs if prompt is too large
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
50
93
|
## Commands
|
|
51
94
|
|
|
52
95
|
```bash
|
|
@@ -171,12 +214,13 @@ pnpm wu:spawn --id WU-XXX
|
|
|
171
214
|
|
|
172
215
|
```
|
|
173
216
|
Starting WU?
|
|
174
|
-
├── Run: pnpm
|
|
175
|
-
└── Review
|
|
217
|
+
├── Run: pnpm wu:spawn --id WU-XXX
|
|
218
|
+
└── Review generated prompt with agent recommendations
|
|
176
219
|
|
|
177
220
|
Initiative with multiple WUs?
|
|
178
221
|
├── Run: pnpm orchestrate:initiative -i INIT-XXX --dry-run
|
|
179
|
-
|
|
222
|
+
├── Review wave plan
|
|
223
|
+
└── Run: pnpm orchestrate:init-status -i INIT-XXX for progress
|
|
180
224
|
|
|
181
225
|
Agent appears stuck or crashed?
|
|
182
226
|
├── Run: pnpm orchestrate:monitor
|
|
@@ -61,6 +61,10 @@ Write({
|
|
|
61
61
|
|
|
62
62
|
3. **Use relative paths for ALL file operations**
|
|
63
63
|
|
|
64
|
+
4. **Docs-only exception (documentation WUs)**:
|
|
65
|
+
- Read-only commands may run from main.
|
|
66
|
+
- **All file writes still require a worktree** (claim first if needed).
|
|
67
|
+
|
|
64
68
|
## Quick Detection
|
|
65
69
|
|
|
66
70
|
**Red flags** (you're about to fall into the trap):
|
|
@@ -115,7 +119,7 @@ About to use Write/Edit/Read?
|
|
|
115
119
|
│ ├─ YES → Use RELATIVE paths only
|
|
116
120
|
│ └─ NO → Did I claim a WU?
|
|
117
121
|
│ ├─ YES → cd worktrees/<lane>-wu-xxx first
|
|
118
|
-
│ └─ NO → Claim WU or use docs-only paths
|
|
122
|
+
│ └─ NO → Claim WU or use docs-only paths (read-only only)
|
|
119
123
|
└─ Path starts with "/" ?
|
|
120
124
|
├─ YES → STOP! Convert to relative path
|
|
121
125
|
└─ NO → Safe to proceed
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wu-lifecycle
|
|
3
|
-
description: Work Unit claim/block/done workflow automation. Use when claiming WUs, blocking/unblocking, running wu:done, or understanding WU state transitions.
|
|
4
|
-
version: 2.
|
|
3
|
+
description: Work Unit claim/block/done workflow automation. Use when claiming WUs, blocking/unblocking, running wu:prep + wu:done, or understanding WU state transitions.
|
|
4
|
+
version: 2.2.0
|
|
5
5
|
source: docs/04-operations/_frameworks/lumenflow/lumenflow-complete.md
|
|
6
6
|
source_sections: §2.4, §6 (WU Lifecycle)
|
|
7
7
|
last_updated: {{DATE}}
|
|
@@ -38,9 +38,13 @@ ready → in_progress → waiting/blocked → done
|
|
|
38
38
|
pnpm wu:claim --id WU-XXX --lane <lane>
|
|
39
39
|
cd worktrees/<lane>-wu-xxx # IMMEDIATELY
|
|
40
40
|
|
|
41
|
-
# Complete WU (
|
|
42
|
-
|
|
43
|
-
pnpm wu:
|
|
41
|
+
# Complete WU - TWO STEPS (WU-1223)
|
|
42
|
+
# Step 1: From worktree, run wu:prep
|
|
43
|
+
pnpm wu:prep --id WU-XXX
|
|
44
|
+
# This prints: cd /path/to/main && pnpm wu:done --id WU-XXX
|
|
45
|
+
|
|
46
|
+
# Step 2: From main, run wu:done (copy-paste from wu:prep output)
|
|
47
|
+
cd /path/to/main && pnpm wu:done --id WU-XXX
|
|
44
48
|
|
|
45
49
|
# Block/Unblock
|
|
46
50
|
pnpm wu:block --id WU-XXX --reason "..."
|
|
@@ -59,11 +63,18 @@ pnpm wu:prune --execute # Clean stale worktrees
|
|
|
59
63
|
pnpm wu:cleanup --id WU-XXX # After PR merge
|
|
60
64
|
```
|
|
61
65
|
|
|
62
|
-
## wu:done Workflow
|
|
66
|
+
## wu:prep + wu:done Workflow (WU-1223)
|
|
67
|
+
|
|
68
|
+
**Two-step completion:**
|
|
69
|
+
|
|
70
|
+
1. `wu:prep` (from worktree): Runs gates, prints copy-paste instruction
|
|
71
|
+
2. `wu:done` (from main): Fast-forward merge, stamp, cleanup
|
|
72
|
+
|
|
73
|
+
**wu:done workflow (from main):**
|
|
63
74
|
|
|
64
|
-
1.
|
|
75
|
+
1. Validates running from main (errors if in worktree)
|
|
65
76
|
2. Fast-forward merge to main
|
|
66
|
-
3. Creates `.
|
|
77
|
+
3. Creates `.lumenflow/stamps/WU-XXX.done`
|
|
67
78
|
4. Updates backlog.md + status.md
|
|
68
79
|
5. Removes worktree
|
|
69
80
|
|