pi-extensions 0.1.9
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/.ralph/import-cc-codex.md +31 -0
- package/.ralph/import-cc-codex.state.json +14 -0
- package/.ralph/mario-not-impl.md +69 -0
- package/.ralph/mario-not-impl.state.json +14 -0
- package/.ralph/mario-not-spec.md +163 -0
- package/.ralph/mario-not-spec.state.json +14 -0
- package/LICENSE +21 -0
- package/README.md +65 -0
- package/RELEASING.md +34 -0
- package/agent-guidance/CHANGELOG.md +4 -0
- package/agent-guidance/README.md +102 -0
- package/agent-guidance/agent-guidance.ts +147 -0
- package/agent-guidance/package.json +22 -0
- package/agent-guidance/setup.sh +75 -0
- package/agent-guidance/templates/CLAUDE.md +5 -0
- package/agent-guidance/templates/CODEX.md +92 -0
- package/agent-guidance/templates/GEMINI.md +5 -0
- package/arcade/CHANGELOG.md +4 -0
- package/arcade/README.md +85 -0
- package/arcade/assets/picman.png +0 -0
- package/arcade/assets/ping.png +0 -0
- package/arcade/assets/spice-invaders.png +0 -0
- package/arcade/assets/tetris.png +0 -0
- package/arcade/mario-not/README.md +30 -0
- package/arcade/mario-not/boss.js +103 -0
- package/arcade/mario-not/camera.js +59 -0
- package/arcade/mario-not/collision.js +91 -0
- package/arcade/mario-not/colors.js +36 -0
- package/arcade/mario-not/constants.js +97 -0
- package/arcade/mario-not/core.js +39 -0
- package/arcade/mario-not/death.js +77 -0
- package/arcade/mario-not/effects.js +84 -0
- package/arcade/mario-not/enemies.js +31 -0
- package/arcade/mario-not/engine.js +171 -0
- package/arcade/mario-not/fireballs.js +98 -0
- package/arcade/mario-not/items.js +24 -0
- package/arcade/mario-not/levels.js +403 -0
- package/arcade/mario-not/logic.js +104 -0
- package/arcade/mario-not/mario-not.ts +297 -0
- package/arcade/mario-not/player.js +244 -0
- package/arcade/mario-not/render.js +257 -0
- package/arcade/mario-not/spec.md +548 -0
- package/arcade/mario-not/state.js +246 -0
- package/arcade/mario-not/tests/e2e.test.js +855 -0
- package/arcade/mario-not/tests/engine.test.js +888 -0
- package/arcade/mario-not/tests/fixtures/story0-frame.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story1-camera.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story1-glyphs.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story10-item.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story11-hazards.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story12-used-block.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story13-pipes.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story14-goal.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story15-hud-narrow.txt +2 -0
- package/arcade/mario-not/tests/fixtures/story16-unknown-tile.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story17-mix.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story18-hud-score.txt +2 -0
- package/arcade/mario-not/tests/fixtures/story19-cue.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story2-enemy.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story20-camera-offset.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story21-hud-zero.txt +2 -0
- package/arcade/mario-not/tests/fixtures/story22-big-viewport.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story23-camera-negative.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story24-camera-width.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story25-camera-positive.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story26-hud-lives.txt +2 -0
- package/arcade/mario-not/tests/fixtures/story27-hud-coins.txt +2 -0
- package/arcade/mario-not/tests/fixtures/story28-item-viewport.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story29-enemy-viewport.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story3-hud.txt +2 -0
- package/arcade/mario-not/tests/fixtures/story30-hud-score.txt +2 -0
- package/arcade/mario-not/tests/fixtures/story31-particles-viewport.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story32-paused-frame.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story4-big.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story5-resume-hud.txt +2 -0
- package/arcade/mario-not/tests/fixtures/story6-particles.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story6-paused.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story7-powerup.txt +4 -0
- package/arcade/mario-not/tests/fixtures/story8-hud-time.txt +2 -0
- package/arcade/mario-not/tests/fixtures/story9-hud-level.txt +2 -0
- package/arcade/mario-not/tiles.js +79 -0
- package/arcade/mario-not/tsconfig.json +14 -0
- package/arcade/mario-not/types.js +225 -0
- package/arcade/package.json +26 -0
- package/arcade/picman.ts +328 -0
- package/arcade/ping.ts +594 -0
- package/arcade/spice-invaders.ts +1104 -0
- package/arcade/tetris.ts +662 -0
- package/code-actions/CHANGELOG.md +4 -0
- package/code-actions/README.md +65 -0
- package/code-actions/actions.ts +107 -0
- package/code-actions/index.ts +148 -0
- package/code-actions/package.json +22 -0
- package/code-actions/search.ts +79 -0
- package/code-actions/snippets.ts +179 -0
- package/code-actions/ui.ts +120 -0
- package/files-widget/CHANGELOG.md +90 -0
- package/files-widget/DESIGN.md +452 -0
- package/files-widget/README.md +122 -0
- package/files-widget/TODO.md +141 -0
- package/files-widget/browser.ts +922 -0
- package/files-widget/comment.ts +5 -0
- package/files-widget/constants.ts +18 -0
- package/files-widget/demo.svg +1 -0
- package/files-widget/file-tree.ts +224 -0
- package/files-widget/file-viewer.ts +93 -0
- package/files-widget/git.ts +107 -0
- package/files-widget/index.ts +140 -0
- package/files-widget/input-utils.ts +3 -0
- package/files-widget/package.json +22 -0
- package/files-widget/types.ts +28 -0
- package/files-widget/utils.ts +26 -0
- package/files-widget/viewer.ts +424 -0
- package/import-cc-codex/research/import-chats-from-other-agents.md +135 -0
- package/import-cc-codex/spec.md +79 -0
- package/package.json +29 -0
- package/ralph-wiggum/CHANGELOG.md +7 -0
- package/ralph-wiggum/README.md +96 -0
- package/ralph-wiggum/SKILL.md +73 -0
- package/ralph-wiggum/index.ts +792 -0
- package/ralph-wiggum/package.json +25 -0
- package/raw-paste/CHANGELOG.md +7 -0
- package/raw-paste/README.md +52 -0
- package/raw-paste/index.ts +112 -0
- package/raw-paste/package.json +22 -0
- package/tab-status/CHANGELOG.md +4 -0
- package/tab-status/README.md +61 -0
- package/tab-status/assets/tab-status.png +0 -0
- package/tab-status/package.json +22 -0
- package/tab-status/tab-status.ts +179 -0
- package/usage-extension/CHANGELOG.md +17 -0
- package/usage-extension/README.md +120 -0
- package/usage-extension/index.ts +628 -0
- package/usage-extension/package.json +22 -0
- package/usage-extension/screenshot.png +0 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Ralph Wiggum Extension
|
|
2
|
+
|
|
3
|
+
Long-running agent loops for iterative development. Best for long-running-tasks that are verifiable. Builds on Geoffrey Huntley's ralph-loop for Claude Code and adapts it for Pi.
|
|
4
|
+
This one is cool because:
|
|
5
|
+
- You can ask Pi and it will set up and run the loop all by itself in-session. If you prefer, it can also invoke another Pi via tmux
|
|
6
|
+
- You can have multiple parallel loops at once in the same repo (unlike OG ralph-wiggum)
|
|
7
|
+
- You can ask Pi to self-reflect at regular intervals so it doesn't mindlessly grind through wrong instructions (optional)
|
|
8
|
+
|
|
9
|
+
<img width="432" height="357" alt="Screenshot 2026-01-07 at 17 16 24" src="https://github.com/user-attachments/assets/68cdab11-76c6-4aed-9ea1-558cbb267ea6" />
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pi install npm:@tmustier/pi-ralph-wiggum
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pi install git:github.com/tmustier/pi-extensions
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Then filter to just this extension in `~/.pi/agent/settings.json`:
|
|
23
|
+
|
|
24
|
+
```json
|
|
25
|
+
{
|
|
26
|
+
"packages": [
|
|
27
|
+
{
|
|
28
|
+
"source": "git:github.com/tmustier/pi-extensions",
|
|
29
|
+
"extensions": ["ralph-wiggum/index.ts"],
|
|
30
|
+
"skills": ["ralph-wiggum/SKILL.md"]
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Recommended usage: just ask Pi
|
|
37
|
+
You ask Pi to set up a ralph-wiggum loop.
|
|
38
|
+
- Pi sets up `.ralph/<name>.md` with goals and a checklist (like a list of features to build, errors to check, or files to refactor)
|
|
39
|
+
- You let Pi know:
|
|
40
|
+
1. What the task is and completion / tests to run
|
|
41
|
+
2. How many items to process per iteration
|
|
42
|
+
3. How often to commit
|
|
43
|
+
4. (optionally) After how many items it should take a step back and self-reflect
|
|
44
|
+
- Pi runs `ralph_start`, beginning iteration 1.
|
|
45
|
+
- It gets a prompt telling it to work on the task, update the task file, and call ralph_done when it finishes that iteration
|
|
46
|
+
- When the iteration is done, it calls `ralph_done`, resending the same prompt*
|
|
47
|
+
- Pi runs until either:
|
|
48
|
+
- All tasks are done (Pi sends `<promise>COMPLETE</promise>`)
|
|
49
|
+
- Max iterations (default 50)
|
|
50
|
+
- You hit `esc` (pausing the loop)
|
|
51
|
+
If you hit `esc`, you can run `/ralph-stop` to clear the loop. Alternatively, just tell Pi to continue to keep going.
|
|
52
|
+
|
|
53
|
+
## Commands
|
|
54
|
+
|
|
55
|
+
| Command | Description |
|
|
56
|
+
|---------|-------------|
|
|
57
|
+
| `/ralph start <name\|path>` | Start a new loop |
|
|
58
|
+
| `/ralph resume <name>` | Resume a paused loop |
|
|
59
|
+
| `/ralph stop` | Pause current loop |
|
|
60
|
+
| `/ralph-stop` | Stop active loop (idle only) |
|
|
61
|
+
| `/ralph status` | Show all loops |
|
|
62
|
+
| `/ralph list --archived` | Show archived loops |
|
|
63
|
+
| `/ralph archive <name>` | Move loop to archive |
|
|
64
|
+
| `/ralph clean [--all]` | Clean completed loops |
|
|
65
|
+
| `/ralph cancel <name>` | Delete a loop |
|
|
66
|
+
| `/ralph nuke [--yes]` | Delete all .ralph data |
|
|
67
|
+
|
|
68
|
+
### Options for start
|
|
69
|
+
|
|
70
|
+
| Option | Description |
|
|
71
|
+
|--------|-------------|
|
|
72
|
+
| `--max-iterations N` | Stop after N iterations (default 50) |
|
|
73
|
+
| `--items-per-iteration N` | Suggest N items per turn (prompt hint) |
|
|
74
|
+
| `--reflect-every N` | Reflect every N iterations |
|
|
75
|
+
|
|
76
|
+
## Agent Tool
|
|
77
|
+
|
|
78
|
+
The agent can self-start loops using `ralph_start`:
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
ralph_start({
|
|
82
|
+
name: "refactor-auth",
|
|
83
|
+
taskContent: "# Task\n\n## Checklist\n- [ ] Item 1",
|
|
84
|
+
maxIterations: 50,
|
|
85
|
+
itemsPerIteration: 3,
|
|
86
|
+
reflectEvery: 10
|
|
87
|
+
})
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Credits
|
|
91
|
+
|
|
92
|
+
Based on Geoffrey Huntley's Ralph Wiggum approach for long-running agent tasks.
|
|
93
|
+
|
|
94
|
+
## Changelog
|
|
95
|
+
|
|
96
|
+
See `CHANGELOG.md`.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ralph-wiggum
|
|
3
|
+
description: Long-running iterative development loops with pacing control and verifiable progress. Use when tasks require multiple iterations, many discrete steps, or periodic reflection with clear checkpoints; avoid for simple one-shot tasks or quick fixes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Ralph Wiggum - Long-Running Development Loops
|
|
7
|
+
|
|
8
|
+
Use the `ralph_start` tool to begin a loop:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
ralph_start({
|
|
12
|
+
name: "loop-name",
|
|
13
|
+
taskContent: "# Task\n\n## Goals\n- Goal 1\n\n## Checklist\n- [ ] Item 1\n- [ ] Item 2",
|
|
14
|
+
maxIterations: 50, // Default: 50
|
|
15
|
+
itemsPerIteration: 3, // Optional: suggest N items per turn
|
|
16
|
+
reflectEvery: 10 // Optional: reflect every N iterations
|
|
17
|
+
})
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Loop Behavior
|
|
21
|
+
|
|
22
|
+
1. **Write the task file**: Create `.ralph/<name>.md` with the task content. The tool does NOT create this file—you must write it yourself using the Write tool.
|
|
23
|
+
2. Work on the task and update the file each iteration.
|
|
24
|
+
3. Record verification evidence (commands run, file paths, outputs) in the task file.
|
|
25
|
+
4. Call `ralph_done` to proceed to the next iteration.
|
|
26
|
+
5. Output `<promise>COMPLETE</promise>` when finished.
|
|
27
|
+
6. Stop when complete or when max iterations is reached (default 50).
|
|
28
|
+
|
|
29
|
+
## User Commands
|
|
30
|
+
|
|
31
|
+
- `/ralph start <name|path>` - Start a new loop.
|
|
32
|
+
- `/ralph resume <name>` - Resume loop.
|
|
33
|
+
- `/ralph stop` - Pause loop (when agent idle).
|
|
34
|
+
- `/ralph-stop` - Stop active loop (idle only).
|
|
35
|
+
- `/ralph status` - Show loops.
|
|
36
|
+
- `/ralph list --archived` - Show archived loops.
|
|
37
|
+
- `/ralph archive <name>` - Move loop to archive.
|
|
38
|
+
- `/ralph clean [--all]` - Clean completed loops.
|
|
39
|
+
- `/ralph cancel <name>` - Delete loop.
|
|
40
|
+
- `/ralph nuke [--yes]` - Delete all .ralph data.
|
|
41
|
+
|
|
42
|
+
Press ESC to interrupt streaming, send a normal message to resume, and run `/ralph-stop` when idle to end the loop.
|
|
43
|
+
|
|
44
|
+
## Task File Format
|
|
45
|
+
|
|
46
|
+
```markdown
|
|
47
|
+
# Task Title
|
|
48
|
+
|
|
49
|
+
Brief description.
|
|
50
|
+
|
|
51
|
+
## Goals
|
|
52
|
+
- Goal 1
|
|
53
|
+
- Goal 2
|
|
54
|
+
|
|
55
|
+
## Checklist
|
|
56
|
+
- [ ] Item 1
|
|
57
|
+
- [ ] Item 2
|
|
58
|
+
- [x] Completed item
|
|
59
|
+
|
|
60
|
+
## Verification
|
|
61
|
+
- Evidence, commands run, or file paths
|
|
62
|
+
|
|
63
|
+
## Notes
|
|
64
|
+
(Update with progress, decisions, blockers)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Best Practices
|
|
68
|
+
|
|
69
|
+
1. Write a clear checklist with discrete items.
|
|
70
|
+
2. Update checklist and notes as you go.
|
|
71
|
+
3. Capture verification evidence for completed items.
|
|
72
|
+
4. Reflect when stuck to reassess approach.
|
|
73
|
+
5. Output the completion marker only when truly done.
|