@lumenflow/cli 2.2.1 → 2.3.1
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 +147 -57
- package/dist/__tests__/agent-log-issue.test.js +56 -0
- package/dist/__tests__/cli-entry-point.test.js +66 -17
- package/dist/__tests__/cli-subprocess.test.js +25 -0
- package/dist/__tests__/init.test.js +298 -0
- package/dist/__tests__/initiative-plan.test.js +340 -0
- package/dist/__tests__/mem-cleanup-execution.test.js +19 -0
- package/dist/__tests__/merge-block.test.js +220 -0
- package/dist/__tests__/release.test.js +28 -0
- package/dist/__tests__/safe-git.test.js +191 -0
- package/dist/__tests__/state-doctor.test.js +274 -0
- package/dist/__tests__/wu-done.test.js +36 -0
- package/dist/__tests__/wu-edit.test.js +119 -0
- package/dist/__tests__/wu-prep.test.js +108 -0
- package/dist/agent-issues-query.js +4 -3
- package/dist/agent-log-issue.js +25 -4
- package/dist/backlog-prune.js +5 -4
- package/dist/cli-entry-point.js +11 -1
- package/dist/doctor.js +368 -0
- package/dist/flow-bottlenecks.js +6 -5
- package/dist/flow-report.js +4 -3
- package/dist/gates.js +468 -116
- package/dist/guard-locked.js +4 -3
- package/dist/guard-worktree-commit.js +4 -3
- package/dist/init.js +508 -86
- package/dist/initiative-add-wu.js +4 -3
- package/dist/initiative-bulk-assign-wus.js +8 -5
- package/dist/initiative-create.js +73 -37
- package/dist/initiative-edit.js +37 -21
- package/dist/initiative-list.js +4 -3
- package/dist/initiative-plan.js +337 -0
- package/dist/initiative-status.js +4 -3
- package/dist/lane-health.js +377 -0
- package/dist/lane-suggest.js +382 -0
- package/dist/mem-checkpoint.js +2 -2
- package/dist/mem-cleanup.js +2 -2
- package/dist/mem-context.js +306 -0
- package/dist/mem-create.js +2 -2
- package/dist/mem-delete.js +293 -0
- package/dist/mem-inbox.js +2 -2
- package/dist/mem-index.js +211 -0
- package/dist/mem-init.js +1 -1
- package/dist/mem-profile.js +207 -0
- package/dist/mem-promote.js +254 -0
- package/dist/mem-ready.js +2 -2
- package/dist/mem-signal.js +2 -2
- package/dist/mem-start.js +2 -2
- package/dist/mem-summarize.js +2 -2
- package/dist/mem-triage.js +2 -2
- package/dist/merge-block.js +222 -0
- package/dist/metrics-cli.js +7 -4
- package/dist/metrics-snapshot.js +4 -3
- package/dist/orchestrate-initiative.js +10 -4
- package/dist/orchestrate-monitor.js +379 -31
- package/dist/signal-cleanup.js +296 -0
- package/dist/spawn-list.js +6 -5
- package/dist/state-bootstrap.js +5 -4
- package/dist/state-cleanup.js +360 -0
- package/dist/state-doctor-fix.js +196 -0
- package/dist/state-doctor.js +501 -0
- package/dist/validate-agent-skills.js +4 -3
- package/dist/validate-agent-sync.js +4 -3
- package/dist/validate-backlog-sync.js +7 -84
- package/dist/validate-skills-spec.js +4 -3
- package/dist/validate.js +7 -107
- package/dist/wu-block.js +3 -3
- package/dist/wu-claim.js +208 -98
- package/dist/wu-cleanup.js +5 -4
- package/dist/wu-create.js +71 -46
- package/dist/wu-delete.js +88 -60
- package/dist/wu-deps.js +6 -5
- package/dist/wu-done-check.js +34 -0
- package/dist/wu-done.js +60 -24
- package/dist/wu-edit.js +63 -28
- package/dist/wu-infer-lane.js +7 -6
- package/dist/wu-preflight.js +23 -81
- package/dist/wu-prep.js +125 -0
- package/dist/wu-prune.js +4 -3
- package/dist/wu-recover.js +88 -22
- package/dist/wu-repair.js +7 -6
- package/dist/wu-spawn.js +226 -270
- package/dist/wu-status.js +4 -3
- package/dist/wu-unblock.js +5 -5
- package/dist/wu-unlock-lane.js +4 -3
- package/dist/wu-validate.js +5 -4
- package/package.json +16 -7
- package/templates/core/.lumenflow/constraints.md.template +192 -0
- package/templates/core/.lumenflow/rules/git-safety.md.template +27 -0
- package/templates/core/.lumenflow/rules/wu-workflow.md.template +48 -0
- package/templates/core/AGENTS.md.template +60 -0
- package/templates/core/LUMENFLOW.md.template +255 -0
- package/templates/core/UPGRADING.md.template +121 -0
- package/templates/core/ai/onboarding/agent-safety-card.md.template +106 -0
- package/templates/core/ai/onboarding/first-wu-mistakes.md.template +198 -0
- package/templates/core/ai/onboarding/quick-ref-commands.md.template +186 -0
- package/templates/core/ai/onboarding/release-process.md.template +362 -0
- package/templates/core/ai/onboarding/troubleshooting-wu-done.md.template +159 -0
- package/templates/core/ai/onboarding/wu-create-checklist.md.template +117 -0
- package/templates/vendors/aider/.aider.conf.yml.template +27 -0
- package/templates/vendors/claude/.claude/CLAUDE.md.template +52 -0
- package/templates/vendors/claude/.claude/settings.json.template +49 -0
- package/templates/vendors/claude/.claude/skills/bug-classification/SKILL.md.template +192 -0
- package/templates/vendors/claude/.claude/skills/code-quality/SKILL.md.template +152 -0
- package/templates/vendors/claude/.claude/skills/context-management/SKILL.md.template +155 -0
- package/templates/vendors/claude/.claude/skills/execution-memory/SKILL.md.template +304 -0
- package/templates/vendors/claude/.claude/skills/frontend-design/SKILL.md.template +131 -0
- package/templates/vendors/claude/.claude/skills/initiative-management/SKILL.md.template +164 -0
- package/templates/vendors/claude/.claude/skills/library-first/SKILL.md.template +98 -0
- package/templates/vendors/claude/.claude/skills/lumenflow-gates/SKILL.md.template +87 -0
- package/templates/vendors/claude/.claude/skills/multi-agent-coordination/SKILL.md.template +84 -0
- package/templates/vendors/claude/.claude/skills/ops-maintenance/SKILL.md.template +254 -0
- package/templates/vendors/claude/.claude/skills/orchestration/SKILL.md.template +189 -0
- package/templates/vendors/claude/.claude/skills/tdd-workflow/SKILL.md.template +139 -0
- package/templates/vendors/claude/.claude/skills/worktree-discipline/SKILL.md.template +138 -0
- package/templates/vendors/claude/.claude/skills/wu-lifecycle/SKILL.md.template +106 -0
- package/templates/vendors/cline/.clinerules.template +53 -0
- package/templates/vendors/cursor/.cursor/rules/lumenflow.md.template +34 -0
- package/templates/vendors/cursor/.cursor/rules.md.template +28 -0
- package/templates/vendors/windsurf/.windsurf/rules/lumenflow.md.template +34 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: context-management
|
|
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.2.0
|
|
5
|
+
source: docs/04-operations/_frameworks/lumenflow/agent/onboarding/agent-invocation-guide.md
|
|
6
|
+
source_sections: Context Tiers, Session Management, Wave Orchestration
|
|
7
|
+
last_updated: {{DATE}}
|
|
8
|
+
allowed-tools: Read, Write, Bash
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Context Management Skill
|
|
12
|
+
|
|
13
|
+
**Source**: `docs/04-operations/_frameworks/lumenflow/agent/onboarding/agent-invocation-guide.md`
|
|
14
|
+
|
|
15
|
+
Patterns for managing context in long-running AI coding sessions.
|
|
16
|
+
|
|
17
|
+
## Primary Strategy: Spawn Fresh, Don't Continue
|
|
18
|
+
|
|
19
|
+
**When approaching context limits, spawn a fresh agent instead of continuing after compaction.**
|
|
20
|
+
|
|
21
|
+
Context compaction (summarization) causes agents to lose critical rules. The recommended approach from [Anthropic's engineering guidance](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents):
|
|
22
|
+
|
|
23
|
+
> "An initializer agent that sets up the environment, and a coding agent tasked with **making incremental progress in every session**, while leaving clear artifacts for the next session."
|
|
24
|
+
|
|
25
|
+
### Mandatory Triggers
|
|
26
|
+
|
|
27
|
+
Spawn a fresh agent when ANY of these apply:
|
|
28
|
+
|
|
29
|
+
- Context usage exceeds **80%**
|
|
30
|
+
- **50+ tool calls** in current session
|
|
31
|
+
- Performance degradation (redundant queries, forgotten context)
|
|
32
|
+
- You're about to run `/compact` or `/clear`
|
|
33
|
+
|
|
34
|
+
### Spawn Fresh Protocol
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# 1. Checkpoint your progress
|
|
38
|
+
pnpm mem:checkpoint "Progress: completed X, next: Y" --wu WU-XXX
|
|
39
|
+
|
|
40
|
+
# 2. Commit and push work
|
|
41
|
+
git add -A && git commit -m "checkpoint: progress on X"
|
|
42
|
+
git push origin lane/<lane>/wu-xxx
|
|
43
|
+
|
|
44
|
+
# 3. Generate fresh agent prompt
|
|
45
|
+
pnpm wu:spawn --id WU-XXX
|
|
46
|
+
|
|
47
|
+
# 4. EXIT current session (do NOT continue after compaction)
|
|
48
|
+
|
|
49
|
+
# 5. Start fresh agent with the generated prompt
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Why Not Continue After Compaction?
|
|
53
|
+
|
|
54
|
+
- Compaction summarizes conversation → rules get lost in summary
|
|
55
|
+
- Agent forgets worktree discipline, WU context, constraints
|
|
56
|
+
- Recovery mechanisms are complex and vendor-specific
|
|
57
|
+
- Prevention (fresh agent) is simpler and more reliable than recovery
|
|
58
|
+
|
|
59
|
+
**This is not failure—it's disciplined execution.** See [wu-sizing-guide.md](../../../docs/04-operations/_frameworks/lumenflow/wu-sizing-guide.md) for complete sizing thresholds.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Session Checkpoints
|
|
64
|
+
|
|
65
|
+
Use memory commands to preserve state across context boundaries:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# Start session tracking
|
|
69
|
+
pnpm mem:start --wu WU-123
|
|
70
|
+
|
|
71
|
+
# Save checkpoint before context-heavy operation
|
|
72
|
+
pnpm mem:checkpoint --wu WU-123 --note "Completed step 2, starting API integration"
|
|
73
|
+
|
|
74
|
+
# Resume after /clear
|
|
75
|
+
pnpm mem:ready --wu WU-123 # Shows pending work
|
|
76
|
+
pnpm mem:inbox --wu WU-123 # Check signals from other agents
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Output Bypass Pattern
|
|
80
|
+
|
|
81
|
+
For large results that would exhaust context:
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
// ❌ BAD: Returns 10MB of data into context
|
|
85
|
+
const allLogs = await fetchAllLogs();
|
|
86
|
+
return allLogs;
|
|
87
|
+
|
|
88
|
+
// ✅ GOOD: Store to filesystem, return reference
|
|
89
|
+
const allLogs = await fetchAllLogs();
|
|
90
|
+
await writeFile('/tmp/analysis-results.json', JSON.stringify(allLogs));
|
|
91
|
+
console.log('Results saved to /tmp/analysis-results.json');
|
|
92
|
+
return { resultPath: '/tmp/analysis-results.json', summary: summarize(allLogs) };
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## When to Spawn Sub-Agents
|
|
96
|
+
|
|
97
|
+
Spawn fresh agent when:
|
|
98
|
+
|
|
99
|
+
- Current context >80% exhausted
|
|
100
|
+
- Task is independent and parallelizable
|
|
101
|
+
- Need specialized agent (e.g., code-reviewer, test-engineer)
|
|
102
|
+
- Switching to different WU scope
|
|
103
|
+
|
|
104
|
+
Keep in current context when:
|
|
105
|
+
|
|
106
|
+
- Tasks share significant state
|
|
107
|
+
- Sequential dependencies exist
|
|
108
|
+
- Context usage still low
|
|
109
|
+
|
|
110
|
+
## Wave Orchestration Pattern
|
|
111
|
+
|
|
112
|
+
When orchestrating multi-wave initiatives, use the checkpoint-per-wave pattern to prevent context exhaustion:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# Spawn next wave then exit (no polling)
|
|
116
|
+
pnpm orchestrate:initiative -i INIT-009 -c
|
|
117
|
+
|
|
118
|
+
# Check progress via stamps
|
|
119
|
+
pnpm orchestrate:initiative -i INIT-009 -p
|
|
120
|
+
|
|
121
|
+
# Repeat for next wave when complete
|
|
122
|
+
pnpm orchestrate:initiative -i INIT-009 -c
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Key principles:**
|
|
126
|
+
|
|
127
|
+
1. **Exit immediately after spawning** — No polling loops in the orchestrator
|
|
128
|
+
2. **Wave manifests for idempotency** — `.beacon/artifacts/waves/INIT-XXX-wave-N.json`
|
|
129
|
+
3. **Stamp-based completion** — Check `.beacon/stamps/WU-*.done` for progress
|
|
130
|
+
4. **Compact output** — Keep orchestrator output under 20 lines
|
|
131
|
+
|
|
132
|
+
See [orchestration skill](../orchestration/SKILL.md) for complete documentation.
|
|
133
|
+
|
|
134
|
+
## Context Loading Order
|
|
135
|
+
|
|
136
|
+
Always load context in this order for best comprehension:
|
|
137
|
+
|
|
138
|
+
1. `LUMENFLOW.md` — Workflow fundamentals
|
|
139
|
+
2. `README.md` — Project structure
|
|
140
|
+
3. `lumenflow-complete.md` §§1-7 — Constraints
|
|
141
|
+
4. WU YAML — Current task spec
|
|
142
|
+
5. Task instructions — What to do
|
|
143
|
+
6. Constraints block — Critical rules (at END per "Lost in Middle" research)
|
|
144
|
+
|
|
145
|
+
## Integration with Other Skills
|
|
146
|
+
|
|
147
|
+
- **multi-agent-coordination**: For parallel sub-agent work
|
|
148
|
+
- **wu-lifecycle**: Session ties to WU lifecycle
|
|
149
|
+
- **orchestration**: Agent selection guidance, wave orchestration pattern
|
|
150
|
+
- **execution-memory**: Memory layer commands for checkpoints and signals
|
|
151
|
+
|
|
152
|
+
## Version History
|
|
153
|
+
|
|
154
|
+
- **v1.1.0** ({{DATE}}): Added wave orchestration pattern cross-reference
|
|
155
|
+
- **v1.0.0** ({{DATE}}): Initial skill created
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: execution-memory
|
|
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.1.0
|
|
5
|
+
source: docs/04-operations/_frameworks/lumenflow/agent/onboarding/quick-ref-commands.md
|
|
6
|
+
source_sections: Memory Commands
|
|
7
|
+
last_updated: {{DATE}}
|
|
8
|
+
allowed-tools: Read, Bash, Grep
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Execution Memory Skill
|
|
12
|
+
|
|
13
|
+
**Source**: Memory Layer (implemented across wu:claim, wu:done, and mem:\* commands)
|
|
14
|
+
|
|
15
|
+
This skill documents the memory layer for agent session tracking, context recovery, and coordination. It provides patterns for resuming work after `/clear`, coordinating with parallel agents, and managing discoveries during execution.
|
|
16
|
+
|
|
17
|
+
## When to Use This Skill
|
|
18
|
+
|
|
19
|
+
Activate automatically when:
|
|
20
|
+
|
|
21
|
+
- Resuming work after `/clear` or session handoff
|
|
22
|
+
- Coordinating with parallel agents (signals/inbox)
|
|
23
|
+
- Managing long-running sessions (>20 tool calls)
|
|
24
|
+
- Capturing discoveries (bugs, ideas) mid-WU
|
|
25
|
+
- Context window feels constrained
|
|
26
|
+
|
|
27
|
+
## Quick Reference: Storage Location
|
|
28
|
+
|
|
29
|
+
All memory data is stored in `.beacon/memory/`:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
.beacon/memory/
|
|
33
|
+
├── sessions/ # Session metadata by session ID
|
|
34
|
+
│ └── <session-id>.json # Session start time, WU link, tier
|
|
35
|
+
├── checkpoints/ # Progress checkpoints
|
|
36
|
+
│ └── <wu-id>/ # Checkpoints grouped by WU
|
|
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
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Automatic Integration
|
|
47
|
+
|
|
48
|
+
The memory layer integrates automatically with WU lifecycle commands:
|
|
49
|
+
|
|
50
|
+
### wu:claim (automatic)
|
|
51
|
+
|
|
52
|
+
When you run `pnpm wu:claim`:
|
|
53
|
+
|
|
54
|
+
1. Creates session node in `.beacon/memory/sessions/`
|
|
55
|
+
2. Links session to WU ID
|
|
56
|
+
3. Records baseline main SHA for recovery
|
|
57
|
+
|
|
58
|
+
### wu:done (automatic)
|
|
59
|
+
|
|
60
|
+
When you run `pnpm wu:done`:
|
|
61
|
+
|
|
62
|
+
1. Creates pre-gates checkpoint (recovery point if gates fail)
|
|
63
|
+
2. Broadcasts completion signal to parallel agents
|
|
64
|
+
3. Checks `mem:inbox` for recent signals from other agents
|
|
65
|
+
4. Ends session and marks as completed
|
|
66
|
+
|
|
67
|
+
**No manual intervention required** for basic session tracking.
|
|
68
|
+
|
|
69
|
+
## Manual Commands Reference
|
|
70
|
+
|
|
71
|
+
### Session Management
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# Start a new session (usually automatic via wu:claim)
|
|
75
|
+
pnpm mem:start --wu WU-XXX
|
|
76
|
+
|
|
77
|
+
# Create progress checkpoint
|
|
78
|
+
pnpm mem:checkpoint "Completed port definitions, starting tests" --wu WU-XXX
|
|
79
|
+
|
|
80
|
+
# Query ready nodes (what's pending/next?)
|
|
81
|
+
pnpm mem:ready --wu WU-XXX
|
|
82
|
+
pnpm mem:ready --wu WU-XXX --type discovery # Filter by type
|
|
83
|
+
pnpm mem:ready --wu WU-XXX --format json # JSON output
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Discovery Capture
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Create discovery node with type aliases
|
|
90
|
+
pnpm mem:create "Found race condition in auth flow" --type bug # → type=discovery, tags=[bug]
|
|
91
|
+
pnpm mem:create "Could extract common validation logic" --type idea # → type=discovery, tags=[idea]
|
|
92
|
+
|
|
93
|
+
# Canonical form (equivalent, explicit)
|
|
94
|
+
pnpm mem:create "Performance issue" --type discovery --tags bug,performance
|
|
95
|
+
|
|
96
|
+
# Tags are merged and deduplicated
|
|
97
|
+
pnpm mem:create "Bug with extra tags" --type bug --tags scope-creep # → tags=[bug, scope-creep]
|
|
98
|
+
|
|
99
|
+
# WU is auto-inferred from current session (no --wu required if session exists)
|
|
100
|
+
pnpm mem:create "Found issue" --type bug # auto-links to current WU
|
|
101
|
+
|
|
102
|
+
# List discoveries for review
|
|
103
|
+
pnpm mem:triage --list
|
|
104
|
+
|
|
105
|
+
# Promote discovery to WU
|
|
106
|
+
pnpm mem:triage --promote mem-xxxx --lane "Operations: Tooling"
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Agent Coordination
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# Send signal to other agents
|
|
113
|
+
pnpm mem:signal "Completed auth refactor, ready for integration" --wu WU-XXX
|
|
114
|
+
|
|
115
|
+
# Read signals for your lane
|
|
116
|
+
pnpm mem:inbox --lane Operations
|
|
117
|
+
pnpm mem:inbox --lane "Operations: Tooling"
|
|
118
|
+
|
|
119
|
+
# Watch mode for real-time coordination
|
|
120
|
+
pnpm mem:inbox --since 1h --watch
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Maintenance
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Summarise nodes for context compaction
|
|
127
|
+
pnpm mem:summarize --wu WU-XXX
|
|
128
|
+
|
|
129
|
+
# Preview cleanup
|
|
130
|
+
pnpm mem:cleanup --dry-run
|
|
131
|
+
|
|
132
|
+
# Execute cleanup per lifecycle rules
|
|
133
|
+
pnpm mem:cleanup
|
|
134
|
+
|
|
135
|
+
# Initialize memory directory (first time setup)
|
|
136
|
+
pnpm mem:init
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Context Recovery Pattern
|
|
140
|
+
|
|
141
|
+
When resuming work after `/clear` or session handoff:
|
|
142
|
+
|
|
143
|
+
### Step 1: Check Pending Work
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# What's pending for this WU?
|
|
147
|
+
pnpm mem:ready --wu WU-XXX
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Output shows:
|
|
151
|
+
|
|
152
|
+
- Checkpoints with progress notes
|
|
153
|
+
- Pending discoveries to triage
|
|
154
|
+
- Incomplete tasks from previous session
|
|
155
|
+
|
|
156
|
+
### Step 2: Check Coordination Signals
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
# Any messages from parallel agents?
|
|
160
|
+
pnpm mem:inbox --wu WU-XXX
|
|
161
|
+
pnpm mem:inbox --lane Operations --since 2h
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Step 3: Resume or Start Fresh
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
# Option A: Resume from checkpoint (context available)
|
|
168
|
+
# Read the checkpoint, continue from where you left off
|
|
169
|
+
|
|
170
|
+
# Option B: Start new session (fresh context)
|
|
171
|
+
pnpm mem:start --wu WU-XXX
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Context Compaction Workflow
|
|
175
|
+
|
|
176
|
+
For long sessions (>20 tool calls):
|
|
177
|
+
|
|
178
|
+
1. **Checkpoint progress**: `pnpm mem:checkpoint "status" --wu WU-XXX`
|
|
179
|
+
2. **Clear context**: `/clear` in your AI coding tool
|
|
180
|
+
3. **Reload minimal context**: Tier 1 docs + WU YAML
|
|
181
|
+
4. **Query ready nodes**: `pnpm mem:ready --wu WU-XXX`
|
|
182
|
+
5. **Continue from checkpoint**
|
|
183
|
+
|
|
184
|
+
## Discovery Lifecycle
|
|
185
|
+
|
|
186
|
+
Discoveries captured via `mem:create` follow this lifecycle:
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
created → triaged → promoted/dismissed
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
**States:**
|
|
193
|
+
|
|
194
|
+
- `created`: Just captured, needs review
|
|
195
|
+
- `triaged`: Reviewed, decision pending
|
|
196
|
+
- `promoted`: Converted to WU via `mem:triage --promote`
|
|
197
|
+
- `dismissed`: Not actionable, archived
|
|
198
|
+
|
|
199
|
+
**Discovery Types (via `--type` argument):**
|
|
200
|
+
|
|
201
|
+
| Type Alias | Stored As | Auto-Tag | Description |
|
|
202
|
+
| ----------- | ----------- | -------- | -------------------------------- |
|
|
203
|
+
| `bug` | `discovery` | `bug` | Defect found during work |
|
|
204
|
+
| `idea` | `discovery` | `idea` | Improvement suggestion |
|
|
205
|
+
| `discovery` | `discovery` | - | General finding (canonical type) |
|
|
206
|
+
|
|
207
|
+
## Signal Patterns
|
|
208
|
+
|
|
209
|
+
### Completion Broadcast
|
|
210
|
+
|
|
211
|
+
After completing significant work:
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
pnpm mem:signal "WU-XXX complete: auth refactor merged" --wu WU-XXX
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Coordination Request
|
|
218
|
+
|
|
219
|
+
When needing input from parallel agent:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
pnpm mem:signal "Need review of auth flow before proceeding" --wu WU-XXX
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### Polling Pattern (Orchestrators)
|
|
226
|
+
|
|
227
|
+
For orchestrators managing multiple agents:
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
# Check for updates from all lanes
|
|
231
|
+
pnpm mem:inbox --since 30m
|
|
232
|
+
pnpm mem:inbox --lane "Operations: Tooling"
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## Integration with Other Skills
|
|
236
|
+
|
|
237
|
+
### wu-lifecycle
|
|
238
|
+
|
|
239
|
+
The execution-memory skill complements wu-lifecycle:
|
|
240
|
+
|
|
241
|
+
- `wu:claim` automatically starts session
|
|
242
|
+
- `wu:done` automatically creates checkpoint and broadcasts signal
|
|
243
|
+
- `wu:block/unblock` preserves session state
|
|
244
|
+
|
|
245
|
+
### multi-agent-coordination
|
|
246
|
+
|
|
247
|
+
For parallel WU coordination:
|
|
248
|
+
|
|
249
|
+
- Use `mem:signal` to notify completion
|
|
250
|
+
- Use `mem:inbox` to receive coordination messages
|
|
251
|
+
- Use `mem:ready` to check handoff status
|
|
252
|
+
|
|
253
|
+
### orchestration
|
|
254
|
+
|
|
255
|
+
For initiative orchestration:
|
|
256
|
+
|
|
257
|
+
- `orchestrate:initiative` polls `mem:inbox` during wave execution
|
|
258
|
+
- Signals inform wave coordination decisions
|
|
259
|
+
- Discoveries feed into WU creation pipeline
|
|
260
|
+
|
|
261
|
+
## Decision Trees
|
|
262
|
+
|
|
263
|
+
### When to Create Checkpoint
|
|
264
|
+
|
|
265
|
+
**Create checkpoint if:**
|
|
266
|
+
|
|
267
|
+
- Completing significant milestone (port definition, test pass)
|
|
268
|
+
- Context window feeling constrained (>50 tool calls)
|
|
269
|
+
- About to run `/clear`
|
|
270
|
+
- Switching to sub-task (will return later)
|
|
271
|
+
|
|
272
|
+
**Skip checkpoint if:**
|
|
273
|
+
|
|
274
|
+
- Quick edit (<5 tool calls total)
|
|
275
|
+
- Already near completion
|
|
276
|
+
- WU is simple single-file change
|
|
277
|
+
|
|
278
|
+
### When to Capture Discovery
|
|
279
|
+
|
|
280
|
+
**Capture as discovery if:**
|
|
281
|
+
|
|
282
|
+
- Bug found in code outside current WU's `code_paths`
|
|
283
|
+
- Idea for improvement unrelated to current work
|
|
284
|
+
- Performance/security concern for later investigation
|
|
285
|
+
- Question needs external input
|
|
286
|
+
|
|
287
|
+
**Fix in place if:**
|
|
288
|
+
|
|
289
|
+
- Bug is in current WU's `code_paths`
|
|
290
|
+
- Fix is small (<=10 lines)
|
|
291
|
+
- Directly blocks acceptance criteria
|
|
292
|
+
|
|
293
|
+
See `bug-classification` skill for full decision tree.
|
|
294
|
+
|
|
295
|
+
## Related Skills
|
|
296
|
+
|
|
297
|
+
- [wu-lifecycle](../wu-lifecycle/SKILL.md) - WU claim/block/done (auto-integrated)
|
|
298
|
+
- [multi-agent-coordination](../multi-agent-coordination/SKILL.md) - Parallel agent patterns
|
|
299
|
+
- [orchestration](../orchestration/SKILL.md) - Initiative wave coordination
|
|
300
|
+
|
|
301
|
+
## Version History
|
|
302
|
+
|
|
303
|
+
- **v1.1.0** ({{DATE}}): Added type aliases (`--type bug/idea`) and worktree-aware WU auto-inference
|
|
304
|
+
- **v1.0.0** ({{DATE}}): Initial skill for memory layer
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontend-design
|
|
3
|
+
description: Create distinctive, production-grade frontend interfaces. Use when building React components, pages, UI features, or when user requests visual/design work.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
source: docs/04-operations/_frameworks/lumenflow/lumenflow-complete.md
|
|
6
|
+
last_updated: {{DATE}}
|
|
7
|
+
allowed-tools: Read, Write, Edit, Bash
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Frontend Design Skill
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
Create distinctive, production-grade frontend interfaces with high design quality. Generates creative, polished code that avoids generic AI aesthetics.
|
|
15
|
+
|
|
16
|
+
## When to Use
|
|
17
|
+
|
|
18
|
+
- Building new React components or pages
|
|
19
|
+
- Creating UI features or visual elements
|
|
20
|
+
- User requests "make it look good" or design-focused work
|
|
21
|
+
- Implementing dashboards, forms, or interactive features
|
|
22
|
+
- Working on Experience/UI lane WUs with components
|
|
23
|
+
|
|
24
|
+
## Capabilities
|
|
25
|
+
|
|
26
|
+
This skill provides patterns for:
|
|
27
|
+
|
|
28
|
+
- **Creative UI generation** - Distinctive designs, not generic templates
|
|
29
|
+
- **Production-ready code** - Clean, maintainable React/TypeScript
|
|
30
|
+
- **Design system awareness** - Respects existing component libraries
|
|
31
|
+
- **Accessibility built-in** - WCAG compliance by default
|
|
32
|
+
- **Responsive design** - Mobile-first approach
|
|
33
|
+
|
|
34
|
+
## Common Tech Stack Patterns
|
|
35
|
+
|
|
36
|
+
Projects commonly use:
|
|
37
|
+
|
|
38
|
+
- **Tailwind CSS** for styling
|
|
39
|
+
- **shadcn/ui** or similar component libraries
|
|
40
|
+
- **React 18+** with TypeScript
|
|
41
|
+
- **Next.js** App Router (for Next.js projects)
|
|
42
|
+
|
|
43
|
+
Adapt to your project's specific stack.
|
|
44
|
+
|
|
45
|
+
## Accessibility Requirements
|
|
46
|
+
|
|
47
|
+
All UI must meet:
|
|
48
|
+
|
|
49
|
+
- WCAG 2.1 AA compliance
|
|
50
|
+
- Screen reader compatibility
|
|
51
|
+
- Keyboard navigation support
|
|
52
|
+
- Sufficient colour contrast
|
|
53
|
+
|
|
54
|
+
## Component Patterns
|
|
55
|
+
|
|
56
|
+
### File Organization
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
components/
|
|
60
|
+
├── ui/ # Primitive UI components
|
|
61
|
+
├── features/ # Feature-specific components
|
|
62
|
+
├── layouts/ # Layout components
|
|
63
|
+
└── forms/ # Form components
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Component Structure
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
// components/features/user-card.tsx
|
|
70
|
+
import { Card, CardContent, CardHeader } from '@/components/ui/card';
|
|
71
|
+
|
|
72
|
+
interface UserCardProps {
|
|
73
|
+
name: string;
|
|
74
|
+
email: string;
|
|
75
|
+
avatar?: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function UserCard({ name, email, avatar }: UserCardProps) {
|
|
79
|
+
return (
|
|
80
|
+
<Card>
|
|
81
|
+
<CardHeader>
|
|
82
|
+
{avatar && <img src={avatar} alt="" className="h-10 w-10 rounded-full" />}
|
|
83
|
+
<h3 className="font-semibold">{name}</h3>
|
|
84
|
+
</CardHeader>
|
|
85
|
+
<CardContent>
|
|
86
|
+
<p className="text-muted-foreground">{email}</p>
|
|
87
|
+
</CardContent>
|
|
88
|
+
</Card>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Usage Pattern
|
|
94
|
+
|
|
95
|
+
```markdown
|
|
96
|
+
1. Activate this skill when UI work is needed
|
|
97
|
+
2. Describe the component/page requirements
|
|
98
|
+
3. Specify any design constraints or existing patterns to follow
|
|
99
|
+
4. Review generated code for project conventions
|
|
100
|
+
5. Test accessibility with screen reader and keyboard
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Example Prompts
|
|
104
|
+
|
|
105
|
+
**Component creation**:
|
|
106
|
+
|
|
107
|
+
> "Create a user profile card component that displays avatar, name, email, and status. Should match our existing card style."
|
|
108
|
+
|
|
109
|
+
**Page layout**:
|
|
110
|
+
|
|
111
|
+
> "Build a dashboard page showing metrics with charts and a recent activity feed."
|
|
112
|
+
|
|
113
|
+
**Form design**:
|
|
114
|
+
|
|
115
|
+
> "Design an accessible multi-step form for user registration."
|
|
116
|
+
|
|
117
|
+
## Quality Checklist
|
|
118
|
+
|
|
119
|
+
Before completing UI work:
|
|
120
|
+
|
|
121
|
+
- [ ] Responsive across breakpoints (mobile, tablet, desktop)
|
|
122
|
+
- [ ] Keyboard navigable (Tab, Enter, Escape)
|
|
123
|
+
- [ ] Screen reader friendly (proper ARIA labels)
|
|
124
|
+
- [ ] Colour contrast meets WCAG AA
|
|
125
|
+
- [ ] Loading and error states handled
|
|
126
|
+
- [ ] Animations respect `prefers-reduced-motion`
|
|
127
|
+
|
|
128
|
+
## Related Skills
|
|
129
|
+
|
|
130
|
+
- **tdd-workflow** - For component testing approach
|
|
131
|
+
- **code-quality** - For TypeScript patterns
|