@canivel/ralph 0.2.0 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/.agents/ralph/PROMPT_build.md +126 -126
  2. package/.agents/ralph/agents.sh +17 -15
  3. package/.agents/ralph/config.sh +25 -25
  4. package/.agents/ralph/log-activity.sh +15 -15
  5. package/.agents/ralph/loop.sh +1027 -1001
  6. package/.agents/ralph/references/CONTEXT_ENGINEERING.md +126 -126
  7. package/.agents/ralph/references/GUARDRAILS.md +174 -174
  8. package/AGENTS.md +20 -20
  9. package/README.md +270 -266
  10. package/bin/ralph +766 -765
  11. package/diagram.svg +55 -55
  12. package/examples/commands.md +46 -46
  13. package/package.json +39 -39
  14. package/skills/commit/SKILL.md +219 -219
  15. package/skills/commit/references/commit_examples.md +292 -292
  16. package/skills/dev-browser/SKILL.md +211 -211
  17. package/skills/dev-browser/bun.lock +443 -443
  18. package/skills/dev-browser/package-lock.json +2988 -2988
  19. package/skills/dev-browser/package.json +31 -31
  20. package/skills/dev-browser/references/scraping.md +155 -155
  21. package/skills/dev-browser/scripts/start-relay.ts +32 -32
  22. package/skills/dev-browser/scripts/start-server.ts +117 -117
  23. package/skills/dev-browser/server.sh +24 -24
  24. package/skills/dev-browser/src/client.ts +474 -474
  25. package/skills/dev-browser/src/index.ts +287 -287
  26. package/skills/dev-browser/src/relay.ts +731 -731
  27. package/skills/dev-browser/src/snapshot/__tests__/snapshot.test.ts +223 -223
  28. package/skills/dev-browser/src/snapshot/browser-script.ts +877 -877
  29. package/skills/dev-browser/src/snapshot/index.ts +14 -14
  30. package/skills/dev-browser/src/snapshot/inject.ts +13 -13
  31. package/skills/dev-browser/src/types.ts +34 -34
  32. package/skills/dev-browser/tsconfig.json +36 -36
  33. package/skills/dev-browser/vitest.config.ts +12 -12
  34. package/skills/prd/SKILL.md +235 -235
  35. package/tests/agent-loops.mjs +79 -79
  36. package/tests/agent-ping.mjs +39 -39
  37. package/tests/audit.md +56 -56
  38. package/tests/cli-smoke.mjs +47 -47
  39. package/tests/real-agents.mjs +127 -127
package/diagram.svg CHANGED
@@ -1,55 +1,55 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 520" role="img" aria-label="Ralph architecture diagram">
2
- <style>
3
- .bg { fill: #0f1218; }
4
- .box { fill: #141a23; stroke: #e6e6e6; stroke-width: 1.5; }
5
- .line { stroke: #e6e6e6; stroke-width: 1.5; }
6
- .text { fill: #f3f3f3; font-family: Menlo, Consolas, Monaco, monospace; font-size: 16px; }
7
- .small { font-size: 13px; opacity: 0.9; }
8
- .muted { opacity: 0.7; }
9
- </style>
10
-
11
- <rect class="bg" x="0" y="0" width="1000" height="520" rx="0" />
12
-
13
- <!-- Top boxes -->
14
- <rect class="box" x="390" y="30" width="220" height="44" rx="0" />
15
- <text class="text" x="500" y="58" text-anchor="middle">ralph CLI</text>
16
-
17
- <rect class="box" x="240" y="114" width="520" height="48" rx="0" />
18
- <text class="text small muted" x="500" y="144" text-anchor="middle">agent CLI: codex | claude | droid</text>
19
-
20
- <!-- Arrow from top to agent (gap matches lower arrows) -->
21
- <line class="line" x1="500" y1="74" x2="500" y2="96" />
22
- <polygon points="496,96 500,104 504,96" fill="#e6e6e6" />
23
-
24
- <!-- Branch lines (gap for heads) -->
25
- <line class="line" x1="500" y1="162" x2="500" y2="200" />
26
- <line class="line" x1="500" y1="200" x2="280" y2="200" />
27
- <line class="line" x1="500" y1="200" x2="720" y2="200" />
28
- <line class="line" x1="280" y1="200" x2="280" y2="214" />
29
- <line class="line" x1="720" y1="200" x2="720" y2="214" />
30
- <polygon points="276,214 280,222 284,214" fill="#e6e6e6" />
31
- <polygon points="716,214 720,222 724,214" fill="#e6e6e6" />
32
-
33
- <!-- Bottom boxes -->
34
- <rect class="box" x="90" y="226" width="380" height="230" rx="0" />
35
- <text class="text" x="110" y="256">.agents/ralph/</text>
36
- <text class="text small muted" x="110" y="278">local overrides (optional)</text>
37
- <text class="text small" x="110" y="306">loop.sh</text>
38
- <text class="text small" x="110" y="328">PROMPT_build.md</text>
39
- <text class="text small" x="110" y="350">references/</text>
40
- <text class="text small" x="110" y="372">log-activity.sh</text>
41
- <text class="text small" x="110" y="394">config.sh (optional)</text>
42
-
43
- <rect class="box" x="530" y="226" width="380" height="230" rx="0" />
44
- <text class="text" x="550" y="256">.ralph/</text>
45
- <text class="text small muted" x="550" y="278">state + logs</text>
46
- <text class="text small" x="550" y="306">errors.log</text>
47
- <text class="text small" x="550" y="328">progress.md</text>
48
- <text class="text small" x="550" y="350">guardrails.md</text>
49
- <text class="text small" x="550" y="372">activity.log</text>
50
- <text class="text small" x="550" y="394">runs/</text>
51
-
52
- <text class="text small muted" x="500" y="500" text-anchor="middle">
53
- Local templates override bundled defaults. State persists between runs.
54
- </text>
55
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 520" role="img" aria-label="Ralph architecture diagram">
2
+ <style>
3
+ .bg { fill: #0f1218; }
4
+ .box { fill: #141a23; stroke: #e6e6e6; stroke-width: 1.5; }
5
+ .line { stroke: #e6e6e6; stroke-width: 1.5; }
6
+ .text { fill: #f3f3f3; font-family: Menlo, Consolas, Monaco, monospace; font-size: 16px; }
7
+ .small { font-size: 13px; opacity: 0.9; }
8
+ .muted { opacity: 0.7; }
9
+ </style>
10
+
11
+ <rect class="bg" x="0" y="0" width="1000" height="520" rx="0" />
12
+
13
+ <!-- Top boxes -->
14
+ <rect class="box" x="390" y="30" width="220" height="44" rx="0" />
15
+ <text class="text" x="500" y="58" text-anchor="middle">ralph CLI</text>
16
+
17
+ <rect class="box" x="240" y="114" width="520" height="48" rx="0" />
18
+ <text class="text small muted" x="500" y="144" text-anchor="middle">agent CLI: codex | claude | droid</text>
19
+
20
+ <!-- Arrow from top to agent (gap matches lower arrows) -->
21
+ <line class="line" x1="500" y1="74" x2="500" y2="96" />
22
+ <polygon points="496,96 500,104 504,96" fill="#e6e6e6" />
23
+
24
+ <!-- Branch lines (gap for heads) -->
25
+ <line class="line" x1="500" y1="162" x2="500" y2="200" />
26
+ <line class="line" x1="500" y1="200" x2="280" y2="200" />
27
+ <line class="line" x1="500" y1="200" x2="720" y2="200" />
28
+ <line class="line" x1="280" y1="200" x2="280" y2="214" />
29
+ <line class="line" x1="720" y1="200" x2="720" y2="214" />
30
+ <polygon points="276,214 280,222 284,214" fill="#e6e6e6" />
31
+ <polygon points="716,214 720,222 724,214" fill="#e6e6e6" />
32
+
33
+ <!-- Bottom boxes -->
34
+ <rect class="box" x="90" y="226" width="380" height="230" rx="0" />
35
+ <text class="text" x="110" y="256">.agents/ralph/</text>
36
+ <text class="text small muted" x="110" y="278">local overrides (optional)</text>
37
+ <text class="text small" x="110" y="306">loop.sh</text>
38
+ <text class="text small" x="110" y="328">PROMPT_build.md</text>
39
+ <text class="text small" x="110" y="350">references/</text>
40
+ <text class="text small" x="110" y="372">log-activity.sh</text>
41
+ <text class="text small" x="110" y="394">config.sh (optional)</text>
42
+
43
+ <rect class="box" x="530" y="226" width="380" height="230" rx="0" />
44
+ <text class="text" x="550" y="256">.ralph/</text>
45
+ <text class="text small muted" x="550" y="278">state + logs</text>
46
+ <text class="text small" x="550" y="306">errors.log</text>
47
+ <text class="text small" x="550" y="328">progress.md</text>
48
+ <text class="text small" x="550" y="350">guardrails.md</text>
49
+ <text class="text small" x="550" y="372">activity.log</text>
50
+ <text class="text small" x="550" y="394">runs/</text>
51
+
52
+ <text class="text small muted" x="500" y="500" text-anchor="middle">
53
+ Local templates override bundled defaults. State persists between runs.
54
+ </text>
55
+ </svg>
@@ -1,46 +1,46 @@
1
- # Ralph CLI Examples
2
-
3
- Basic usage:
4
-
5
- ```bash
6
- ralph prd "A lightweight uptime monitor (Hono app), deployed on Cloudflare, with email alerts via AWS SES"
7
- ralph build 1 # one Ralph run
8
- ralph build 1 --no-commit # one Ralph run
9
- ralph overview
10
- ```
11
-
12
- Agent override:
13
-
14
- ```bash
15
- ralph ping --agent=codex # check agent is installed + responsive
16
- ralph build 1 --agent=codex # one Ralph run
17
- ralph build 1 --agent=claude # one Ralph run
18
- ralph build 1 --agent=droid # one Ralph run
19
- ```
20
-
21
- PRD overrides:
22
-
23
- ```bash
24
- ralph prd "..." --out .agents/tasks/prd-api.json
25
- ralph build 1 --prd .agents/tasks/prd-api.json # one Ralph run
26
- ralph overview --prd .agents/tasks/prd-api.json
27
- ```
28
-
29
- Progress override:
30
-
31
- ```bash
32
- ralph build 1 --progress .ralph/progress-api.md # one Ralph run
33
- ```
34
-
35
- Install templates:
36
-
37
- ```bash
38
- ralph install
39
- ralph install --force
40
- ```
41
-
42
- Install skills:
43
-
44
- ```bash
45
- ralph install --skills
46
- ```
1
+ # Ralph CLI Examples
2
+
3
+ Basic usage:
4
+
5
+ ```bash
6
+ ralph prd "A lightweight uptime monitor (Hono app), deployed on Cloudflare, with email alerts via AWS SES"
7
+ ralph build 1 # one Ralph run
8
+ ralph build 1 --no-commit # one Ralph run
9
+ ralph overview
10
+ ```
11
+
12
+ Agent override:
13
+
14
+ ```bash
15
+ ralph ping --agent=codex # check agent is installed + responsive
16
+ ralph build 1 --agent=codex # one Ralph run
17
+ ralph build 1 --agent=claude # one Ralph run
18
+ ralph build 1 --agent=droid # one Ralph run
19
+ ```
20
+
21
+ PRD overrides:
22
+
23
+ ```bash
24
+ ralph prd "..." --out .agents/tasks/prd-api.json
25
+ ralph build 1 --prd .agents/tasks/prd-api.json # one Ralph run
26
+ ralph overview --prd .agents/tasks/prd-api.json
27
+ ```
28
+
29
+ Progress override:
30
+
31
+ ```bash
32
+ ralph build 1 --progress .ralph/progress-api.md # one Ralph run
33
+ ```
34
+
35
+ Install templates:
36
+
37
+ ```bash
38
+ ralph install
39
+ ralph install --force
40
+ ```
41
+
42
+ Install skills:
43
+
44
+ ```bash
45
+ ralph install --skills
46
+ ```
package/package.json CHANGED
@@ -1,39 +1,39 @@
1
- {
2
- "name": "@canivel/ralph",
3
- "version": "0.2.0",
4
- "description": "Minimal, file-based agent loop for autonomous coding. Fork with improved Claude support and first-run configuration.",
5
- "bin": {
6
- "ralph": "bin/ralph"
7
- },
8
- "scripts": {
9
- "test": "node tests/cli-smoke.mjs && node tests/agent-loops.mjs",
10
- "test:real": "node tests/real-agents.mjs",
11
- "test:ping": "node tests/agent-ping.mjs"
12
- },
13
- "dependencies": {
14
- "@clack/prompts": "^0.7.0"
15
- },
16
- "repository": {
17
- "type": "git",
18
- "url": "git+https://github.com/canivel/ralph.git"
19
- },
20
- "keywords": [
21
- "ai",
22
- "agent",
23
- "coding",
24
- "autonomous",
25
- "claude",
26
- "codex",
27
- "prd",
28
- "cli"
29
- ],
30
- "author": "Danilo Canivel",
31
- "bugs": {
32
- "url": "https://github.com/canivel/ralph/issues"
33
- },
34
- "homepage": "https://github.com/canivel/ralph#readme",
35
- "license": "MIT",
36
- "engines": {
37
- "node": ">=18.0.0"
38
- }
39
- }
1
+ {
2
+ "name": "@canivel/ralph",
3
+ "version": "0.2.3",
4
+ "description": "Minimal, file-based agent loop for autonomous coding. Fork with improved Claude support and first-run configuration.",
5
+ "bin": {
6
+ "ralph": "bin/ralph"
7
+ },
8
+ "scripts": {
9
+ "test": "node tests/cli-smoke.mjs && node tests/agent-loops.mjs",
10
+ "test:real": "node tests/real-agents.mjs",
11
+ "test:ping": "node tests/agent-ping.mjs"
12
+ },
13
+ "dependencies": {
14
+ "@clack/prompts": "^0.7.0"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/canivel/ralph.git"
19
+ },
20
+ "keywords": [
21
+ "ai",
22
+ "agent",
23
+ "coding",
24
+ "autonomous",
25
+ "claude",
26
+ "codex",
27
+ "prd",
28
+ "cli"
29
+ ],
30
+ "author": "Danilo Canivel",
31
+ "bugs": {
32
+ "url": "https://github.com/canivel/ralph/issues"
33
+ },
34
+ "homepage": "https://github.com/canivel/ralph#readme",
35
+ "license": "MIT",
36
+ "engines": {
37
+ "node": ">=18.0.0"
38
+ }
39
+ }