@jmylchreest/aide-plugin 0.0.24 → 0.0.26

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.
@@ -0,0 +1,135 @@
1
+ ---
2
+ name: plan-swarm
3
+ description: Socratic planning interview for swarm decomposition
4
+ triggers:
5
+ - plan swarm
6
+ - plan stories
7
+ - decompose stories
8
+ - scope swarm
9
+ - socratic plan
10
+ ---
11
+
12
+ # Plan Swarm
13
+
14
+ **Recommended model tier:** smart (opus) - this skill requires careful reasoning
15
+
16
+ Structured planning interview to decompose work into independent stories before running a swarm.
17
+
18
+ ## Quick Reference
19
+
20
+ ```
21
+ plan swarm → Full interview workflow (recommended)
22
+ plan swarm --fast → Skip interview, state assumptions, decompose directly
23
+ ```
24
+
25
+ ## Workflow
26
+
27
+ ### Phase 1: Understand
28
+
29
+ Explore the codebase and existing context before asking questions.
30
+
31
+ 1. **Read existing decisions** via `mcp__plugin_aide_aide__decision_list` and `mcp__plugin_aide_aide__decision_get`
32
+ 2. **Search memories** via `mcp__plugin_aide_aide__memory_search` for relevant past context
33
+ 3. **Explore the codebase** — read key files, understand architecture, identify boundaries
34
+ 4. **Identify the scope** — what is the user asking for? What are the natural boundaries?
35
+
36
+ Do NOT ask questions yet. Build understanding first.
37
+
38
+ ### Phase 2: Interview
39
+
40
+ Conduct 2-3 rounds of focused questions. Each round has 2-4 questions. Max 3 rounds total.
41
+
42
+ **Round 1: Scope & Boundaries**
43
+ - What is in scope vs out of scope?
44
+ - What are the success criteria?
45
+ - Are there any constraints (time, tech, compatibility)?
46
+
47
+ **Round 2: Dependencies & Risks**
48
+ - What shared state or files will multiple stories touch?
49
+ - What could go wrong? What are the risky parts?
50
+ - Are there external dependencies (APIs, services, data)?
51
+
52
+ **Round 3: Acceptance Criteria** (if needed)
53
+ - How will we know each story is done?
54
+ - What tests should exist?
55
+ - What does "good enough" look like?
56
+
57
+ Use the AskUserQuestion tool for each round. Summarize what you've learned before asking the next round.
58
+
59
+ **Fast mode** (`plan swarm --fast`): Skip this phase. State your assumptions explicitly, then proceed directly to Phase 3.
60
+
61
+ ### Phase 3: Decompose
62
+
63
+ Output a structured story list. Each story must be:
64
+
65
+ - **Independent** — can be developed in parallel without conflicting file edits
66
+ - **Complete** — has clear boundaries and acceptance criteria
67
+ - **Testable** — has concrete verification steps
68
+
69
+ **Story format:**
70
+
71
+ ```markdown
72
+ ## Stories
73
+
74
+ ### 1. [Story Name]
75
+ - **Description**: What this story implements
76
+ - **Files**: List of files this story will create or modify
77
+ - **Acceptance Criteria**:
78
+ - [ ] Criterion 1
79
+ - [ ] Criterion 2
80
+ - **Risk**: low | medium | high
81
+ - **Notes**: Any special considerations
82
+
83
+ ### 2. [Story Name]
84
+ ...
85
+ ```
86
+
87
+ **Independence check**: Verify that no two stories modify the same file. If they do, either:
88
+ 1. Merge the stories
89
+ 2. Restructure so each story owns its files
90
+ 3. Sequence them (one blocks the other)
91
+
92
+ ### Phase 4: Validate & Store
93
+
94
+ 1. **Present the plan** to the user for review
95
+ 2. **Store as decision** once approved:
96
+ ```bash
97
+ aide decision set "swarm-plan" "<N> stories: <story-1>, <story-2>, ..." \
98
+ --details='<JSON object>' \
99
+ --rationale="<brief description of scope and approach>"
100
+ ```
101
+ 3. **Record shared decisions** discovered during planning:
102
+ ```bash
103
+ aide decision set "<topic>" "<decision>"
104
+ ```
105
+ 4. **Instruct the user**: Run `/aide:swarm` to execute the plan
106
+
107
+ ## Output Format
108
+
109
+ The stored `swarm-plan` decision should be a JSON object:
110
+
111
+ ```json
112
+ {
113
+ "stories": [
114
+ {
115
+ "name": "story-name",
116
+ "description": "What it does",
117
+ "files": ["src/foo.ts", "src/bar.ts"],
118
+ "acceptance": ["criterion 1", "criterion 2"],
119
+ "risk": "low",
120
+ "notes": ""
121
+ }
122
+ ],
123
+ "shared_decisions": ["auth-strategy", "db-schema"],
124
+ "assumptions": ["Node 20+", "existing test framework"],
125
+ "created": "ISO timestamp"
126
+ }
127
+ ```
128
+
129
+ ## Tips
130
+
131
+ - Fewer stories is usually better. 2-4 stories is ideal for most tasks.
132
+ - Each story should take roughly similar effort.
133
+ - If a story is too large, split it. If it's too small, merge it.
134
+ - Stories that share database migrations or config files should be sequenced, not parallelized.
135
+ - The plan is a starting point. The swarm skill will adapt if needed.
@@ -0,0 +1,483 @@
1
+ ---
2
+ name: ralph
3
+ description: Ralph Wiggum methodology - iterative implementation with test-driven backpressure
4
+ triggers:
5
+ - ralph
6
+ - persist
7
+ - persistence
8
+ - don't stop
9
+ - dont stop
10
+ - until done
11
+ - must complete
12
+ - relentless
13
+ - ralph wiggum
14
+ ---
15
+
16
+ # Ralph Mode (Ralph Wiggum Methodology)
17
+
18
+ **Recommended model tier:** smart (opus) - this skill requires complex reasoning
19
+
20
+ You are now in **Ralph Wiggum mode** - an iterative development methodology that uses test-driven backpressure and aide-based state persistence.
21
+
22
+ ## Core Principles
23
+
24
+ 1. **Planning vs Building**: Separate phases with distinct behaviors
25
+ 2. **Backpressure via Tests**: Cannot proceed until tests pass
26
+ 3. **Task Atomicity**: One task per iteration
27
+ 4. **Don't Assume**: Verify gaps exist before implementing
28
+ 5. **aide-Based Persistence**: Tasks, state, and decisions stored in aide (not files)
29
+ 6. **Swarm Compatible**: Multiple agents can work in parallel
30
+
31
+ ---
32
+
33
+ ## State Management
34
+
35
+ All state is managed through aide. Use MCP tools for reads, CLI for writes:
36
+
37
+ ### Reads (MCP Tools)
38
+ | Tool | Purpose |
39
+ |------|---------|
40
+ | `mcp__plugin_aide_aide__state_get` | Get phase, objective |
41
+ | `mcp__plugin_aide_aide__state_list` | List all state |
42
+ | `mcp__plugin_aide_aide__decision_get` | Get decisions |
43
+ | `mcp__plugin_aide_aide__decision_list` | List all decisions |
44
+ | `mcp__plugin_aide_aide__memory_search` | Search discoveries |
45
+
46
+ ### Writes (CLI via Bash)
47
+ ```bash
48
+ # Phase tracking
49
+ aide state set ralph:phase planning # or "building"
50
+
51
+ # Task management (use Claude's native TaskCreate/TaskUpdate/TaskList)
52
+
53
+ # Decisions
54
+ aide decision set <topic> "<decision>" --rationale="<why>"
55
+
56
+ # Gap analysis / discoveries
57
+ aide memory add --category=discovery --tags=ralph "Gap found: <description>"
58
+ ```
59
+
60
+ ---
61
+
62
+ ## Phase 1: Planning Mode
63
+
64
+ When starting a new task or when `aide state get ralph:phase` is empty/planning:
65
+
66
+ ### Step 1: Set Phase
67
+
68
+ ```bash
69
+ aide state set ralph:phase planning
70
+ aide state set ralph:objective "<what we're building>"
71
+ ```
72
+
73
+ ### Step 2: Gap Analysis (Don't Assume!)
74
+
75
+ **CRITICAL**: Before assuming anything needs implementation, SEARCH THE CODE:
76
+
77
+ ```bash
78
+ # Search for existing implementations
79
+ rg "functionName\|ClassName\|feature" --type ts
80
+
81
+ # Check existing tests
82
+ rg "describe.*feature\|it.*should" --type ts
83
+ ```
84
+
85
+ Record findings:
86
+ ```bash
87
+ aide memory add --category=discovery --tags=ralph,gap-analysis "Searched for X: <results>"
88
+ ```
89
+
90
+ Only after confirming gaps exist, proceed to task creation.
91
+
92
+ ### Step 3: Create Tasks
93
+
94
+ Create atomic, testable tasks:
95
+
96
+ ```bash
97
+ aide task create "Implement user model" --tags=ralph,task-1
98
+ aide task create "Add validation to user model" --tags=ralph,task-2
99
+ aide task create "Write user model tests" --tags=ralph,task-3
100
+ ```
101
+
102
+ Each task should be:
103
+ - Small enough to complete in one iteration
104
+ - Independently testable
105
+ - Clearly defined acceptance criteria
106
+
107
+ ### Step 4: Record Key Decisions
108
+
109
+ ```bash
110
+ aide decision set ralph:test-framework "vitest" --rationale="Already configured in project"
111
+ aide decision set ralph:approach "<approach>" --rationale="<why>"
112
+ ```
113
+
114
+ ### Step 5: Exit Planning
115
+
116
+ ```bash
117
+ aide state set ralph:phase building
118
+ ```
119
+
120
+ Report the plan:
121
+ - List tasks: `aide task list`
122
+ - List decisions: `aide decision list`
123
+
124
+ **DO NOT implement during planning phase.**
125
+
126
+ ---
127
+
128
+ ## Phase 2: Building Mode
129
+
130
+ When `aide state get ralph:phase` returns "building":
131
+
132
+ ### Iteration Loop
133
+
134
+ Each iteration follows this exact sequence:
135
+
136
+ #### 1. Load Context
137
+
138
+ ```bash
139
+ # Check current phase and objective
140
+ aide state get ralph:phase
141
+ aide state get ralph:objective
142
+
143
+ # List tasks to find next one
144
+ aide task list
145
+
146
+ # Check existing decisions
147
+ aide decision list
148
+ ```
149
+
150
+ #### 2. Select Next Task
151
+
152
+ Find the first pending task:
153
+ ```bash
154
+ aide task list # Look for [pending] status
155
+ ```
156
+
157
+ Claim it:
158
+ ```bash
159
+ aide task claim <task-id> --agent=ralph
160
+ ```
161
+
162
+ #### 3. Verify Gap Still Exists (Don't Assume!)
163
+
164
+ Before implementing, RE-VERIFY:
165
+
166
+ ```bash
167
+ # Search again - someone may have implemented it
168
+ rg "featureName" --type ts
169
+ ```
170
+
171
+ If gap no longer exists:
172
+ ```bash
173
+ aide task complete <task-id>
174
+ # Proceed to next task
175
+ ```
176
+
177
+ #### 4. Write Tests First
178
+
179
+ Create or update test file with failing tests:
180
+
181
+ ```bash
182
+ # Run tests - they MUST fail initially
183
+ npm test -- path/to/test.test.ts
184
+ ```
185
+
186
+ If tests pass without implementation, the gap analysis was wrong - complete the task and move on.
187
+
188
+ #### 5. Implement Solution
189
+
190
+ Write minimal code to make tests pass.
191
+
192
+ #### 6. Backpressure Checkpoint (REQUIRED)
193
+
194
+ **You CANNOT proceed until this passes:**
195
+
196
+ ```bash
197
+ npm test -- path/to/test.test.ts
198
+ ```
199
+
200
+ **BLOCKING RULE**: If tests fail, you MUST:
201
+ 1. Analyze the failure
202
+ 2. Fix the issue
203
+ 3. Re-run tests
204
+ 4. Repeat until passing
205
+
206
+ **DO NOT skip failing tests. DO NOT proceed with failing tests.**
207
+
208
+ #### 7. Complete Task
209
+
210
+ ```bash
211
+ aide task complete <task-id>
212
+ ```
213
+
214
+ #### 8. Atomic Commit
215
+
216
+ ```bash
217
+ git add -A
218
+ git commit -m "feat: <task description> - tests passing"
219
+ ```
220
+
221
+ #### 9. Check Completion
222
+
223
+ ```bash
224
+ aide task list
225
+ ```
226
+
227
+ If more pending tasks: continue to next iteration (step 2)
228
+ If all complete: run full verification
229
+
230
+ ---
231
+
232
+ ## Failure Handling
233
+
234
+ ### Test Failures
235
+
236
+ When tests fail during backpressure checkpoint:
237
+
238
+ 1. **DO NOT** proceed to next task
239
+ 2. **DO NOT** skip the failing test
240
+ 3. **DO** analyze the error message
241
+ 4. **DO** fix and re-run until passing
242
+
243
+ Record blockers:
244
+ ```bash
245
+ aide memory add --category=blocker --tags=ralph "Test failure: <description>"
246
+ ```
247
+
248
+ ### Stuck Conditions
249
+
250
+ If blocked for more than 3 attempts:
251
+ ```bash
252
+ aide memory add --category=blocker --tags=ralph,needs-help "Stuck on: <description>"
253
+ ```
254
+ Then ask user for guidance. **DO NOT** proceed without resolution.
255
+
256
+ ---
257
+
258
+ ## Full Verification Protocol
259
+
260
+ Before claiming completion, ALL must pass:
261
+
262
+ ```bash
263
+ # 1. All tasks complete
264
+ aide task list # Should show all [done]
265
+
266
+ # 2. All tests
267
+ npm test
268
+
269
+ # 3. Build
270
+ npm run build
271
+
272
+ # 4. Lint
273
+ npm run lint
274
+ ```
275
+
276
+ Only proceed to completion when ALL verification passes.
277
+
278
+ ---
279
+
280
+ ## Completion
281
+
282
+ When all tasks complete and verification passes:
283
+
284
+ ### Update State
285
+
286
+ ```bash
287
+ aide state set ralph:phase complete
288
+ aide state set ralph:result "success"
289
+ ```
290
+
291
+ ### Record Session
292
+
293
+ ```bash
294
+ aide memory add --category=session --tags=ralph,implementation "
295
+ ## <Feature Name> Complete
296
+
297
+ Implemented using Ralph Wiggum methodology.
298
+
299
+ ### Tasks Completed
300
+ - Task 1: <description>
301
+ - Task 2: <description>
302
+
303
+ ### Verification
304
+ - Tests: passing
305
+ - Build: passing
306
+ - Lint: clean
307
+
308
+ ### Key Decisions
309
+ - <decision>: <rationale>
310
+ "
311
+ ```
312
+
313
+ ---
314
+
315
+ ## Anti-Patterns (AVOID)
316
+
317
+ - "I've made good progress, let me summarize..." (KEEP WORKING)
318
+ - "The main work is done, you can finish..." (VERIFY FIRST)
319
+ - "I'll skip this failing test for now..." (FIX IT NOW)
320
+ - "I assume this needs to be implemented..." (SEARCH FIRST)
321
+ - "I'll implement everything then test..." (TEST EACH TASK)
322
+ - Proceeding with red tests (NEVER)
323
+ - Implementing during planning phase (SEPARATE PHASES)
324
+ - Large commits with multiple tasks (ONE TASK PER COMMIT)
325
+
326
+ ---
327
+
328
+ ## Commands
329
+
330
+ - `ralph` or `ralph plan` - Start planning phase
331
+ - `ralph build` - Start building phase (requires tasks exist)
332
+ - `ralph status` - Show current state via aide
333
+ - `cancel` or `stop ralph` - Exit ralph mode
334
+
335
+ ---
336
+
337
+ ## Quick Reference
338
+
339
+ ```
340
+ PLANNING PHASE:
341
+ 1. aide state set ralph:phase planning
342
+ 2. Search code (don't assume!)
343
+ 3. aide memory add findings
344
+ 4. aide task create (atomic tasks)
345
+ 5. aide decision set (key decisions)
346
+ 6. aide state set ralph:phase building
347
+
348
+ BUILDING PHASE (per task):
349
+ 1. aide task list (find next)
350
+ 2. aide task claim <id>
351
+ 3. Re-verify gap exists
352
+ 4. Write failing tests
353
+ 5. Implement
354
+ 6. BACKPRESSURE: Tests MUST pass
355
+ 7. aide task complete <id>
356
+ 8. Atomic commit
357
+ 9. Repeat or verify completion
358
+ ```
359
+
360
+ ---
361
+
362
+ ## Swarm Compatibility
363
+
364
+ This skill is **swarm-compatible**. Multiple ralph agents can:
365
+ - Work on different tasks in parallel
366
+ - Share discoveries via `aide memory`
367
+ - Check decisions via `aide decision get`
368
+ - Claim tasks atomically via `aide task claim`
369
+
370
+ No file conflicts because all state is in aide's database.
371
+
372
+ ---
373
+
374
+ ## Phase 3: Final QA (Swarm Mode)
375
+
376
+ **MANDATORY** when ralph runs with swarm (multiple agents). After all tasks show `[done]`:
377
+
378
+ ### Step 1: Spawn QA Agent
379
+
380
+ The orchestrator spawns a **single** QA subagent:
381
+
382
+ ```
383
+ Spawn a final QA agent with instructions:
384
+ "You are the QA agent for a ralph swarm session. Your job is NOT to trust the task list.
385
+ Instead, independently verify the implementation against the original objective."
386
+ ```
387
+
388
+ ### Step 2: QA Agent Workflow
389
+
390
+ The QA agent must:
391
+
392
+ #### a) Load the Objective (not the task list)
393
+ ```bash
394
+ aide state get ralph:objective
395
+ ```
396
+
397
+ #### b) Independent Verification
398
+
399
+ **Ignore the task list.** Instead, verify from first principles:
400
+
401
+ 1. **Read the code** - Does it implement the objective?
402
+ 2. **Check for gaps** - Are there missing pieces the tasks didn't cover?
403
+ 3. **Run full test suite** - Not just individual task tests
404
+ ```bash
405
+ npm test
406
+ npm run build
407
+ npm run lint
408
+ ```
409
+ 4. **Integration check** - Does it work as a whole?
410
+
411
+ #### c) Find & Fix Gaps
412
+
413
+ If gaps are found:
414
+ ```bash
415
+ # Record the gap
416
+ aide memory add --category=discovery --tags=ralph,qa "QA found gap: <description>"
417
+
418
+ # Create fix task
419
+ aide task create "QA fix: <description>" --tags=ralph,qa-fix
420
+
421
+ # Implement the fix (follow standard backpressure rules)
422
+ # ...
423
+
424
+ # Mark complete
425
+ aide task complete <id>
426
+ ```
427
+
428
+ #### d) Final Sign-off
429
+
430
+ Only when QA agent confirms:
431
+ - All tests passing
432
+ - Build clean
433
+ - Lint clean
434
+ - Objective fully met (not just tasks)
435
+
436
+ ```bash
437
+ aide state set ralph:qa "passed"
438
+ aide state set ralph:phase complete
439
+ ```
440
+
441
+ ### Step 3: QA Failure Handling
442
+
443
+ If QA finds unfixable issues:
444
+ ```bash
445
+ aide state set ralph:qa "failed"
446
+ aide memory add --category=blocker --tags=ralph,qa "QA failed: <reason>"
447
+ ```
448
+
449
+ Report to user with specific failures. **DO NOT** mark complete.
450
+
451
+ ---
452
+
453
+ ## Swarm + Ralph Workflow Summary
454
+
455
+ ```
456
+ ORCHESTRATOR SWARM AGENTS QA AGENT
457
+ │ │ │
458
+ ├─► Planning phase │ │
459
+ │ (create tasks) │ │
460
+ │ │ │
461
+ ├─► Spawn N agents ────────────►│ │
462
+ │ ├─► Claim tasks │
463
+ │ ├─► Implement │
464
+ │ ├─► Backpressure tests │
465
+ │ ├─► Complete & commit │
466
+ │ │ │
467
+ │◄── All tasks [done] ──────────┤ │
468
+ │ │ │
469
+ ├─► Merge worktrees │ │
470
+ │ (worktree-resolve) │ │
471
+ │ │ │
472
+ ├─► Spawn QA agent ─────────────┼───────────────────────►│
473
+ │ │ ├─► Ignore task list
474
+ │ │ ├─► Verify objective
475
+ │ │ ├─► Fix gaps
476
+ │ │ ├─► Full test suite
477
+ │ │ │
478
+ │◄── QA passed ─────────────────┼────────────────────────┤
479
+ │ │ │
480
+ └─► Mark complete │ │
481
+ ```
482
+
483
+ The QA phase ensures swarm work is **truly complete**, not just task-list complete.
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: recall
3
+ description: Search memories and decisions to answer questions about past learnings, choices, and context
4
+ triggers:
5
+ - what did we
6
+ - what was
7
+ - what is the
8
+ - do you remember
9
+ - did we decide
10
+ - recall
11
+ - from memory
12
+ - previously
13
+ ---
14
+
15
+ # Recall
16
+
17
+ **Recommended model tier:** balanced (sonnet) - this skill performs straightforward operations
18
+
19
+ Search stored memories and decisions to answer questions about past learnings, architectural choices, patterns, and project context.
20
+
21
+ ## MCP Tools
22
+
23
+ ### Search Memories
24
+
25
+ | Tool | Purpose |
26
+ |------|---------|
27
+ | `mcp__plugin_aide_aide__memory_search` | Full-text search (fuzzy, prefix, substring matching) |
28
+ | `mcp__plugin_aide_aide__memory_list` | List memories, optionally filtered by category |
29
+
30
+ ### Get Decisions
31
+
32
+ | Tool | Purpose |
33
+ |------|---------|
34
+ | `mcp__plugin_aide_aide__decision_get` | Get specific decision by topic |
35
+ | `mcp__plugin_aide_aide__decision_list` | List all decisions |
36
+ | `mcp__plugin_aide_aide__decision_history` | Get all versions of a decision |
37
+
38
+ ## Workflow
39
+
40
+ 1. **Parse the question** - Extract key terms
41
+ 2. **Search both sources:**
42
+ - Use `mcp__plugin_aide_aide__memory_search` with relevant keywords
43
+ - Use `mcp__plugin_aide_aide__decision_get` with the topic, or `mcp__plugin_aide_aide__decision_list`
44
+ 3. **Analyze timestamps** - Prefer most recent (ULIDs are time-ordered)
45
+ 4. **Answer** - Combine relevant context from both sources
46
+
47
+ ## Instructions
48
+
49
+ When the user asks about previous context:
50
+
51
+ 1. **For architectural/design questions** (testing, auth, database, etc.):
52
+ - Use `mcp__plugin_aide_aide__decision_get` with topic (e.g., "testing")
53
+ - If unsure of topic name, use `mcp__plugin_aide_aide__decision_list`
54
+
55
+ 2. **For learnings/patterns/gotchas:**
56
+ - Use `mcp__plugin_aide_aide__memory_search` with query (e.g., "ESM imports")
57
+
58
+ 3. **When answering:**
59
+ - Cite the source (memory or decision)
60
+ - Include the date for context
61
+ - Note if something was updated/changed
62
+
63
+ ## Examples
64
+
65
+ **User:** "What testing framework did we decide on?"
66
+ → Use `mcp__plugin_aide_aide__decision_get` with topic="testing"
67
+ → Answer with the decision and rationale
68
+
69
+ **User:** "What was the issue with ESM imports?"
70
+ → Use `mcp__plugin_aide_aide__memory_search` with query="ESM imports"
71
+ → Answer with the learning
72
+
73
+ **User:** "What approach did we take for auth?"
74
+ → Use both `mcp__plugin_aide_aide__decision_get` (topic="auth") and `mcp__plugin_aide_aide__memory_search` (query="auth")
75
+ → Combine both sources in answer
76
+
77
+ ## Failure Handling
78
+
79
+ If no results found:
80
+
81
+ 1. **Try alternative terms** - search with synonyms or related keywords
82
+ 2. **Broaden the search** - use `mcp__plugin_aide_aide__memory_list` to browse all memories
83
+ 3. **Report clearly**: "No memories or decisions found for '<topic>'. This may not have been recorded previously."
84
+
85
+ ## Notes
86
+
87
+ - This skill is READ-ONLY - searches but doesn't modify
88
+ - Decisions are structured (topic → decision + rationale)
89
+ - Memories are freeform learnings, gotchas, patterns
90
+ - Always prefer the most recent when there are conflicts