cralph 1.0.0-beta.6 → 1.0.0-beta.7
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 +8 -4
- package/package.json +1 -1
- package/src/prompt.ts +9 -18
package/README.md
CHANGED
|
@@ -62,8 +62,9 @@ cralph --yes
|
|
|
62
62
|
2. Looks for `.ralph/` in current directory only (not subdirectories)
|
|
63
63
|
3. Loads config from `.ralph/paths.json` or creates starter structure
|
|
64
64
|
4. Runs `claude -p --dangerously-skip-permissions` in a loop
|
|
65
|
-
5. Claude
|
|
66
|
-
6.
|
|
65
|
+
5. Claude completes **ONE task per iteration**, marks it done, then stops
|
|
66
|
+
6. Auto-commits progress after each iteration (fails gracefully if no git)
|
|
67
|
+
7. Stops when Claude outputs `<promise>COMPLETE</promise>`
|
|
67
68
|
|
|
68
69
|
## Config
|
|
69
70
|
|
|
@@ -90,7 +91,7 @@ Save as `.ralph/paths.json`. Refs are optional reference material (read-only).
|
|
|
90
91
|
|
|
91
92
|
### TODO Format
|
|
92
93
|
|
|
93
|
-
Claude maintains this structure:
|
|
94
|
+
Claude maintains this structure (one task per iteration):
|
|
94
95
|
|
|
95
96
|
```markdown
|
|
96
97
|
# Tasks
|
|
@@ -102,10 +103,13 @@ Claude maintains this structure:
|
|
|
102
103
|
|
|
103
104
|
# Notes
|
|
104
105
|
|
|
105
|
-
## Task
|
|
106
|
+
## Task 1 - Done
|
|
106
107
|
- What was implemented
|
|
107
108
|
- Files changed
|
|
108
109
|
- Learnings: patterns discovered, gotchas encountered
|
|
110
|
+
|
|
111
|
+
## Task 2 - Done
|
|
112
|
+
- ...
|
|
109
113
|
```
|
|
110
114
|
|
|
111
115
|
## First Run (No .ralph/ in cwd)
|
package/package.json
CHANGED
package/src/prompt.ts
CHANGED
|
@@ -8,33 +8,22 @@ const BASE_PROMPT = `You are an autonomous coding agent running in a loop.
|
|
|
8
8
|
|
|
9
9
|
FIRST: Read and internalize the rules provided below.
|
|
10
10
|
|
|
11
|
-
## Your Task
|
|
11
|
+
## Your Task This Iteration
|
|
12
12
|
|
|
13
13
|
1. Read the TODO file
|
|
14
14
|
2. Pick the FIRST uncompleted task (marked with [ ])
|
|
15
15
|
3. Implement that SINGLE task
|
|
16
16
|
4. Run quality checks (typecheck, lint, test - whatever the project requires)
|
|
17
17
|
5. If checks pass, mark the task [x] complete
|
|
18
|
-
6. Append your progress to the Notes section
|
|
19
|
-
7.
|
|
18
|
+
6. Append your progress to the Notes section
|
|
19
|
+
7. **STOP** - End your response. Another iteration will handle the next task.
|
|
20
20
|
|
|
21
21
|
## Critical Rules
|
|
22
22
|
|
|
23
|
-
- **ONE task per iteration** - Do
|
|
23
|
+
- **ONE task per iteration** - Complete exactly ONE task, then STOP. Do NOT continue to the next task.
|
|
24
24
|
- **Quality first** - Do NOT mark a task complete if tests/typecheck fail
|
|
25
25
|
- **Keep changes focused** - Minimal, targeted changes only
|
|
26
26
|
- **Follow existing patterns** - Match the codebase style
|
|
27
|
-
- **Commit after completing** - Commit your changes with a meaningful message
|
|
28
|
-
|
|
29
|
-
## Commit Format
|
|
30
|
-
|
|
31
|
-
After completing a task and quality checks pass, commit ALL changes with:
|
|
32
|
-
|
|
33
|
-
\`\`\`
|
|
34
|
-
feat: [Task Title]
|
|
35
|
-
\`\`\`
|
|
36
|
-
|
|
37
|
-
Use \`feat:\` for new features, \`fix:\` for bug fixes, \`refactor:\` for refactoring, \`docs:\` for documentation.
|
|
38
27
|
|
|
39
28
|
## Progress Format
|
|
40
29
|
|
|
@@ -55,13 +44,15 @@ If refs paths are provided, they are READ-ONLY reference material. Never modify
|
|
|
55
44
|
|
|
56
45
|
## Stop Condition
|
|
57
46
|
|
|
58
|
-
After completing
|
|
47
|
+
After completing ONE task, check the TODO file:
|
|
48
|
+
|
|
49
|
+
- If there are still tasks marked [ ] (pending): **END your response normally.** Another iteration will pick up the next task.
|
|
59
50
|
|
|
60
|
-
If ALL tasks are
|
|
51
|
+
- If ALL tasks are marked [x] (complete): Output exactly:
|
|
61
52
|
|
|
62
53
|
<promise>COMPLETE</promise>
|
|
63
54
|
|
|
64
|
-
|
|
55
|
+
**IMPORTANT:** Do NOT continue to the next task. Complete ONE task, then STOP.`;
|
|
65
56
|
|
|
66
57
|
/**
|
|
67
58
|
* Build the complete prompt with config and rules injected
|