@herbcaudill/ralph 1.0.2 → 1.2.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@herbcaudill/ralph",
3
- "version": "1.0.2",
3
+ "version": "1.2.0",
4
4
  "description": "Autonomous AI session engine for Claude CLI",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "url": "https://github.com/HerbCaudill/ralph.git"
29
29
  },
30
30
  "dependencies": {
31
- "@anthropic-ai/claude-agent-sdk": "^0.2.7",
31
+ "@anthropic-ai/claude-agent-sdk": "^0.2.29",
32
32
  "chalk": "^5.6.2",
33
33
  "commander": "^14.0.2",
34
34
  "ink": "^6.6.0",
@@ -40,6 +40,7 @@
40
40
  "react": "^19.2.3"
41
41
  },
42
42
  "devDependencies": {
43
+ "@herbcaudill/beads-sdk": "link:../../../beads-sdk",
43
44
  "@types/node": "^24.10.1",
44
45
  "@types/react": "^19.2.8",
45
46
  "@vitest/ui": "^4.0.17",
@@ -50,7 +51,7 @@
50
51
  "tsx": "^4.21.0",
51
52
  "typescript": "~5.9.3",
52
53
  "vitest": "^4.0.17",
53
- "@herbcaudill/ralph-shared": "1.0.2"
54
+ "@herbcaudill/ralph-shared": "1.2.0"
54
55
  },
55
56
  "engines": {
56
57
  "node": ">=18.0.0"
@@ -60,9 +61,8 @@
60
61
  "dev": "tsc --watch",
61
62
  "typecheck": "tsc --noEmit",
62
63
  "ralph": "tsx src/index.ts",
63
- "test:all": "pnpm typecheck && vitest run",
64
64
  "test": "vitest run",
65
- "test:e2e": "vitest --config vitest.e2e.config.ts",
65
+ "test:pw": "vitest --config vitest.e2e.config.ts",
66
66
  "test:watch": "vitest --watch",
67
67
  "test:ui": "vitest --ui",
68
68
  "format": "prettier --write . --log-level silent"
@@ -1,16 +1,6 @@
1
1
  ---
2
2
  name: manage-tasks
3
3
  description: Create and manage beads issues. Uses judgment for priority, type, dependencies, and hierarchy.
4
- user_invocation: manage-tasks
5
- model: sonnet
6
- allowed-tools:
7
- - Read
8
- - Bash
9
- - Grep
10
- - Glob
11
- - TodoWrite
12
- - WebFetch
13
- - WebSearch
14
4
  ---
15
5
 
16
6
  You are a task management assistant. Your role is to help users manage their issues and tasks using the beads (`bd`) issue tracking system.
@@ -76,12 +66,28 @@ If the user specifically asks you to investigate the causes of a problem, do a t
76
66
  > **Assistant**: It looks like the submit button has vertical margins that differ from the other buttons. Want me to file an issue?
77
67
  > ✅ It is also the assistant's job to investigate problems when asked
78
68
 
69
+ ## Responding to user input
70
+
71
+ If the user describes a problem, do a little research before creating the issue. Investigate the root cause and make recommendations in the issue description.
72
+
73
+ If the user says something is "still" happening or otherwise indicates that they expected something to already be fixed, look for previous issues related to the problem, as well as any recent commits that might have been intended to fix it. Use this information to inform the investigation.
74
+
79
75
  ## Creating issues
80
76
 
81
77
  - Short title, details in description
82
78
  - Use the right type: `task` (default), `bug`, or `epic`. Don't use `feature`.
83
- - Set appropriate priorities: P0-P4 (P0 is highest)
84
- - Keep tasks granular - break complex work into subtasks under a parent
79
+ - Set appropriate priorities: P0-P4 (P2 is default, P0 is highest priority)
80
+ - Set blocking dependencies between issues when appropriate (using `bd dep add <issue> <depends-on>`)
81
+ - If there are previous issues on the same topic, link to them (using `--deps related:<id>`)
82
+
83
+ ### Subtasks vs epics
84
+
85
+ There are two ways to break down work:
86
+
87
+ - **Subtasks** (non-epic parent): Create children with `--parent={id}`. IDs are `{parentId}.1`, `{parentId}.2`, etc. Ralph treats the parent + all subtasks as a single unit of work, completing them in one session.
88
+ - **Epics** (type `epic`): Create children with `--parent={id}`. Children get their own random IDs. Each child is an independent task that Ralph works on in a separate session.
89
+
90
+ Use subtasks for granular steps within a single task. Use epics when work is large enough to span multiple sessions.
85
91
 
86
92
  ## Updating issues
87
93
 
@@ -1,77 +0,0 @@
1
- # Ralph Session Protocol
2
-
3
- You are running as an autonomous session agent. Follow this protocol exactly.
4
-
5
- ## Session lifecycle
6
-
7
- ### Step 1: Check for errors
8
-
9
- Run the project's build/test command (defined in your workflow instructions below).
10
-
11
- - If errors exist: create a P1 bug issue documenting them. Skip to Step 4.
12
- - If no errors: proceed to Step 2.
13
-
14
- ### Step 2: Find available work
15
-
16
- Run `bd ready --assignee {agentName} --assignee ""` to list issues that are either:
17
-
18
- - Unassigned, or
19
- - Assigned to you
20
-
21
- If no issues are ready, output `<promise>COMPLETE</promise>` and end your turn.
22
-
23
- ### Step 3: Claim and work on one task
24
-
25
- Select the highest-priority issue. Finish in-progress tasks first. Bugs take priority.
26
-
27
- - Output `<start_task>{id}</start_task>`
28
- - Assign the issue to yourself: `bd update {id} --status=in_progress --assignee={agentName}`
29
- - Work only on this single task.
30
- - If the task is complex, break it into subtasks and end your turn.
31
-
32
- ### Step 4: Complete the task
33
-
34
- When finished:
35
-
36
- - Run wrap-up steps (see workflow instructions)
37
- - Close the issue: `bd close {id}`
38
- - Record a summary: `bd comments add {id} "..." --author=Ralph`
39
- - Output `<end_task>{id}</end_task>`
40
- - End your turn.
41
-
42
- ---
43
-
44
- ## Subagents (optional)
45
-
46
- You can delegate certain tasks to subagents that run on cheaper/faster models. To use a subagent:
47
-
48
- 1. Read the agent prompt from `.claude/agents/`
49
- 2. Use the Task tool with `subagent_type: "general-purpose"` and `model: "haiku"`
50
- 3. Pass the agent prompt content plus your specific instructions
51
-
52
- Available agents:
53
-
54
- - **run-tests** - Runs tests and returns a summarized result
55
- - **make-tests** - Generates tests for specified code
56
- - **write-docs** - Writes documentation for specified code
57
-
58
- ---
59
-
60
- ## Beads quick reference
61
-
62
- ```bash
63
- bd ready # Show issues ready to work
64
- bd show {id} # Detailed issue view
65
- bd update {id} --status=in_progress --assignee={agentName}
66
- bd close {id} # Mark complete
67
- bd create --title="..." --type=task|bug|epic --priority=2
68
- bd comments add {id} "..." --author=Ralph # Add comment
69
- ```
70
-
71
- Priority: 0-4 (0=critical, 2=medium, 4=backlog). Use P0-P4 format.
72
-
73
- ---
74
-
75
- # Workflow instructions
76
-
77
- {WORKFLOW}
@@ -1,46 +0,0 @@
1
- # Project Workflow
2
-
3
- ## Build and test
4
-
5
- Use the **run-tests** agent to check for errors. The test command for this project is:
6
-
7
- ```bash
8
- pnpm test:all
9
- ```
10
-
11
- ## Task selection
12
-
13
- When choosing which task to work on:
14
-
15
- - Finish in-progress tasks first
16
- - Bugs take priority over features
17
- - Higher priority (lower number) takes precedence
18
- - Otherwise use your judgment
19
-
20
- ## Breaking down tasks
21
-
22
- If a task will take more than a few minutes of focused work, break it into subtasks:
23
-
24
- - Create child issues under the parent with `--parent={id}`
25
- - Apply the parent's priority to all children
26
- - End your turn after creating subtasks (you'll pick one up next session)
27
-
28
- ## Wrap-up steps
29
-
30
- Before completing a task:
31
-
32
- 1. Run `pnpm format` to format code
33
- 2. Use the **run-tests** agent to verify everything works
34
- 3. Use the **make-tests** agent to add tests where applicable
35
- 4. Use the **write-docs** agent to update CLAUDE.md or README.md with relevant changes
36
- 5. Commit and push your changes (only files you modified)
37
-
38
- ## When to delegate
39
-
40
- Delegate to subagents for:
41
-
42
- - **Running tests**: Use the run-tests agent to check builds and get summarized failure info
43
- - **Writing tests**: Use the make-tests agent to generate tests for new or existing code
44
- - **Documentation**: Use the write-docs agent to document APIs or update README sections
45
-
46
- These run on faster/cheaper models and keep verbose output out of your context.