@happycastle/oh-my-openclaw 0.3.0 → 0.3.1
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/dist/commands/workflow-commands.js +8 -3
- package/dist/index.js +2 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +2 -1
- package/workflows/plan.md +115 -0
- package/workflows/start-work.md +110 -0
- package/workflows/ultrawork.md +90 -0
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { readFileSync } from 'fs';
|
|
2
|
-
import { join } from 'path';
|
|
2
|
+
import { dirname, join } from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
5
|
+
const __dirname = dirname(__filename);
|
|
6
|
+
// From dist/commands/ → plugin root is ../../
|
|
7
|
+
const PLUGIN_ROOT = join(__dirname, '..', '..');
|
|
3
8
|
function readWorkflow(workflowName) {
|
|
4
9
|
try {
|
|
5
|
-
const workflowPath = join(
|
|
10
|
+
const workflowPath = join(PLUGIN_ROOT, 'workflows', `${workflowName}.md`);
|
|
6
11
|
return readFileSync(workflowPath, 'utf-8');
|
|
7
12
|
}
|
|
8
13
|
catch {
|
|
9
|
-
return `Error: Could not read workflow file 'workflows/${workflowName}.md'.
|
|
14
|
+
return `Error: Could not read workflow file 'workflows/${workflowName}.md'. Plugin root: ${PLUGIN_ROOT}`;
|
|
10
15
|
}
|
|
11
16
|
}
|
|
12
17
|
export function registerWorkflowCommands(api) {
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { registerWorkflowCommands } from './commands/workflow-commands.js';
|
|
|
11
11
|
import { registerRalphCommands } from './commands/ralph-commands.js';
|
|
12
12
|
export default function register(api) {
|
|
13
13
|
const config = getConfig(api);
|
|
14
|
-
api.logger.info(`[${PLUGIN_ID}] Initializing plugin v0.3.
|
|
14
|
+
api.logger.info(`[${PLUGIN_ID}] Initializing plugin v0.3.1`);
|
|
15
15
|
try {
|
|
16
16
|
registerTodoEnforcer(api);
|
|
17
17
|
api.logger.info(`[${PLUGIN_ID}] Todo Enforcer hook registered (enabled: ${config.todo_enforcer_enabled})`);
|
|
@@ -79,7 +79,7 @@ export default function register(api) {
|
|
|
79
79
|
return {
|
|
80
80
|
ok: true,
|
|
81
81
|
plugin: PLUGIN_ID,
|
|
82
|
-
version: '0.3.
|
|
82
|
+
version: '0.3.1',
|
|
83
83
|
hooks: ['todo-enforcer', 'comment-checker', 'message-monitor'],
|
|
84
84
|
services: ['ralph-loop'],
|
|
85
85
|
tools: ['omoc_delegate', 'omoc_look_at', 'omoc_checkpoint'],
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "oh-my-openclaw",
|
|
3
3
|
"name": "Oh-My-OpenClaw",
|
|
4
4
|
"description": "Multi-agent orchestration plugin \u2014 10 agents, category-based model routing, todo enforcer, ralph loop, and custom tools",
|
|
5
|
-
"version": "0.3.
|
|
5
|
+
"version": "0.3.1",
|
|
6
6
|
"skills": ["skills"],
|
|
7
7
|
"configSchema": {
|
|
8
8
|
"type": "object",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happycastle/oh-my-openclaw",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Oh-My-OpenClaw plugin — multi-agent orchestration, todo enforcer, ralph loop, and custom tools for OpenClaw",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"dist",
|
|
37
37
|
"bin",
|
|
38
38
|
"skills",
|
|
39
|
+
"workflows",
|
|
39
40
|
"openclaw.plugin.json"
|
|
40
41
|
],
|
|
41
42
|
"keywords": [
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Strategic planning workflow - analyze requirements and create execution plan
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Plan Workflow
|
|
6
|
+
|
|
7
|
+
Strategic planning workflow that analyzes requirements and creates a structured execution plan before any implementation begins.
|
|
8
|
+
|
|
9
|
+
## When to Use
|
|
10
|
+
|
|
11
|
+
- Starting a new feature or project
|
|
12
|
+
- Complex multi-step tasks
|
|
13
|
+
- When requirements are ambiguous and need clarification
|
|
14
|
+
- Before any `/ultrawork` or `/start-work` invocation
|
|
15
|
+
|
|
16
|
+
## Workflow Steps
|
|
17
|
+
|
|
18
|
+
### Phase 1: Context Gathering
|
|
19
|
+
|
|
20
|
+
1. **Read existing context**
|
|
21
|
+
- Check workspace for existing plans: `workspace/plans/`
|
|
22
|
+
- Check wisdom notepads: `workspace/notepads/`
|
|
23
|
+
- Review any relevant AGENTS.md or project documentation
|
|
24
|
+
|
|
25
|
+
2. **Analyze the request**
|
|
26
|
+
- What is the user asking for?
|
|
27
|
+
- What are the explicit requirements?
|
|
28
|
+
- What are the implicit requirements?
|
|
29
|
+
- What constraints exist?
|
|
30
|
+
|
|
31
|
+
### Phase 2: Gap Analysis
|
|
32
|
+
|
|
33
|
+
3. **Identify unknowns**
|
|
34
|
+
- What information is missing?
|
|
35
|
+
- What assumptions are being made?
|
|
36
|
+
- What dependencies exist?
|
|
37
|
+
|
|
38
|
+
4. **Ask clarifying questions** (if needed)
|
|
39
|
+
- Only ask questions that materially affect the plan
|
|
40
|
+
- Batch questions together, don't ask one at a time
|
|
41
|
+
- Provide default assumptions if the user doesn't respond
|
|
42
|
+
|
|
43
|
+
### Phase 3: Plan Creation
|
|
44
|
+
|
|
45
|
+
5. **Create the execution plan**
|
|
46
|
+
- Save to `workspace/plans/YYYY-MM-DD_<slug>.md`
|
|
47
|
+
- Use the following structure:
|
|
48
|
+
|
|
49
|
+
```markdown
|
|
50
|
+
# Plan: <Title>
|
|
51
|
+
|
|
52
|
+
**Created**: YYYY-MM-DD HH:MM
|
|
53
|
+
**Status**: draft | approved | in-progress | completed
|
|
54
|
+
**Category**: quick | deep | ultrabrain | visual-engineering
|
|
55
|
+
|
|
56
|
+
## Goal
|
|
57
|
+
<One sentence description of what we're building>
|
|
58
|
+
|
|
59
|
+
## Requirements
|
|
60
|
+
- [ ] Requirement 1
|
|
61
|
+
- [ ] Requirement 2
|
|
62
|
+
|
|
63
|
+
## Tasks
|
|
64
|
+
### Task 1: <Name>
|
|
65
|
+
- **Category**: quick | deep
|
|
66
|
+
- **Agent**: sisyphus-junior | oracle | explore | librarian
|
|
67
|
+
- **Dependencies**: none | Task N
|
|
68
|
+
- **Description**: What needs to be done
|
|
69
|
+
- **Acceptance Criteria**:
|
|
70
|
+
- [ ] Criterion 1
|
|
71
|
+
- [ ] Criterion 2
|
|
72
|
+
|
|
73
|
+
### Task 2: <Name>
|
|
74
|
+
...
|
|
75
|
+
|
|
76
|
+
## Execution Order
|
|
77
|
+
1. Task 1 (no dependencies)
|
|
78
|
+
2. Task 2, Task 3 (parallel, depend on Task 1)
|
|
79
|
+
3. Task 4 (depends on Task 2 + Task 3)
|
|
80
|
+
|
|
81
|
+
## Risks
|
|
82
|
+
- Risk 1: mitigation strategy
|
|
83
|
+
- Risk 2: mitigation strategy
|
|
84
|
+
|
|
85
|
+
## Verification
|
|
86
|
+
- [ ] All acceptance criteria met
|
|
87
|
+
- [ ] Code builds without errors
|
|
88
|
+
- [ ] Tests pass (if applicable)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Phase 4: Plan Review
|
|
92
|
+
|
|
93
|
+
6. **Self-review the plan**
|
|
94
|
+
- Is every task actionable and specific?
|
|
95
|
+
- Are dependencies correctly identified?
|
|
96
|
+
- Is the execution order optimal (maximize parallelism)?
|
|
97
|
+
- Are acceptance criteria measurable?
|
|
98
|
+
|
|
99
|
+
7. **Present plan to user**
|
|
100
|
+
- Show the plan summary
|
|
101
|
+
- Highlight any risks or assumptions
|
|
102
|
+
- Ask for approval before proceeding
|
|
103
|
+
|
|
104
|
+
## Integration with Other Workflows
|
|
105
|
+
|
|
106
|
+
- After plan approval, use `/start-work` to begin execution
|
|
107
|
+
- Or use `/ultrawork` for fully automated execution without stops
|
|
108
|
+
- Plan files persist in `workspace/plans/` for future reference
|
|
109
|
+
|
|
110
|
+
## Wisdom Integration
|
|
111
|
+
|
|
112
|
+
After planning, record any insights:
|
|
113
|
+
- New patterns discovered → `workspace/notepads/learnings.md`
|
|
114
|
+
- Key decisions made → `workspace/notepads/decisions.md`
|
|
115
|
+
- Potential issues identified → `workspace/notepads/issues.md`
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Start execution from an approved plan - delegate tasks to worker agents
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Start Work Workflow
|
|
6
|
+
|
|
7
|
+
Execute an approved plan by delegating tasks to appropriate worker agents, tracking progress, and verifying completion.
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
- An approved plan exists in `workspace/plans/`
|
|
12
|
+
- Plan status is "approved" or "in-progress"
|
|
13
|
+
|
|
14
|
+
## Workflow Steps
|
|
15
|
+
|
|
16
|
+
### Phase 1: Plan Loading
|
|
17
|
+
|
|
18
|
+
1. **Load the plan**
|
|
19
|
+
- Read the most recent plan from `workspace/plans/`
|
|
20
|
+
- Or specify a plan: `/start-work <plan-file>`
|
|
21
|
+
- Verify plan status is "approved"
|
|
22
|
+
- Update plan status to "in-progress"
|
|
23
|
+
|
|
24
|
+
2. **Initialize tracking**
|
|
25
|
+
- Create todo items for each task in the plan
|
|
26
|
+
- Set up wisdom notepads if not already present
|
|
27
|
+
|
|
28
|
+
### Phase 2: Task Execution
|
|
29
|
+
|
|
30
|
+
3. **Execute tasks in dependency order**
|
|
31
|
+
|
|
32
|
+
For each task (respecting execution order from plan):
|
|
33
|
+
|
|
34
|
+
a. **Mark task as in-progress** in todo list
|
|
35
|
+
|
|
36
|
+
b. **Select the right agent** based on task category:
|
|
37
|
+
|
|
38
|
+
| Category | Agent | Model |
|
|
39
|
+
|----------|-------|-------|
|
|
40
|
+
| quick | sisyphus-junior | claude-sonnet-4-6 |
|
|
41
|
+
| deep | sisyphus-junior | claude-opus-4-6-thinking |
|
|
42
|
+
| ultrabrain | oracle | claude-opus-4-5-thinking |
|
|
43
|
+
| visual-engineering | sisyphus-junior | claude-opus-4-6-thinking |
|
|
44
|
+
|
|
45
|
+
c. **Delegate the task** with clear instructions:
|
|
46
|
+
```
|
|
47
|
+
Task: <task name>
|
|
48
|
+
Description: <from plan>
|
|
49
|
+
Acceptance Criteria:
|
|
50
|
+
- <criterion 1>
|
|
51
|
+
- <criterion 2>
|
|
52
|
+
Context: <relevant files, dependencies>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
d. **Verify task completion** against acceptance criteria
|
|
56
|
+
|
|
57
|
+
e. **Mark task as completed** in todo list
|
|
58
|
+
|
|
59
|
+
f. **Record wisdom** if any insights were gained
|
|
60
|
+
|
|
61
|
+
4. **Handle parallel tasks**
|
|
62
|
+
- Tasks with no mutual dependencies can run in parallel
|
|
63
|
+
- Use multiple agent spawns simultaneously
|
|
64
|
+
- Wait for all parallel tasks before moving to dependent tasks
|
|
65
|
+
|
|
66
|
+
### Phase 3: Error Handling
|
|
67
|
+
|
|
68
|
+
5. **On task failure**
|
|
69
|
+
- Record the error in `workspace/notepads/issues.md`
|
|
70
|
+
- Attempt retry with more context (max 2 retries)
|
|
71
|
+
- If still failing, escalate to oracle agent for debugging
|
|
72
|
+
- If oracle can't resolve, pause and ask user
|
|
73
|
+
|
|
74
|
+
6. **On blocking dependency**
|
|
75
|
+
- Skip blocked tasks, continue with independent tasks
|
|
76
|
+
- Return to blocked tasks when dependency resolves
|
|
77
|
+
|
|
78
|
+
### Phase 4: Completion
|
|
79
|
+
|
|
80
|
+
7. **Verify all tasks**
|
|
81
|
+
- Check all acceptance criteria are met
|
|
82
|
+
- Run build/test verification if applicable
|
|
83
|
+
- Review overall coherence of changes
|
|
84
|
+
|
|
85
|
+
8. **Update plan status**
|
|
86
|
+
- Mark plan as "completed"
|
|
87
|
+
- Record completion time
|
|
88
|
+
- Summarize what was accomplished
|
|
89
|
+
|
|
90
|
+
9. **Final wisdom capture**
|
|
91
|
+
- Record learnings in `workspace/notepads/learnings.md`
|
|
92
|
+
- Record any decisions in `workspace/notepads/decisions.md`
|
|
93
|
+
- Note any remaining issues in `workspace/notepads/issues.md`
|
|
94
|
+
|
|
95
|
+
## Status Update Format
|
|
96
|
+
|
|
97
|
+
After each task completion, output:
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
[N/M] Task: <name> - COMPLETED
|
|
101
|
+
- <what was done>
|
|
102
|
+
- <files modified>
|
|
103
|
+
Next: <next task name>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Integration
|
|
107
|
+
|
|
108
|
+
- Plans come from `/plan` workflow
|
|
109
|
+
- `/ultrawork` combines `/plan` + `/start-work` automatically
|
|
110
|
+
- Wisdom notepads persist across sessions for future reference
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: One-command full automation workflow. Analyzes task, creates plan, executes all steps, verifies results.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Ultrawork Workflow
|
|
6
|
+
|
|
7
|
+
Complete automation workflow that takes a task from analysis to verified completion.
|
|
8
|
+
|
|
9
|
+
## Trigger
|
|
10
|
+
When the user invokes `/ultrawork [task description]` or ultrawork mode is activated.
|
|
11
|
+
|
|
12
|
+
## Prerequisites
|
|
13
|
+
- Task description must be clear and actionable
|
|
14
|
+
- Working directory must be a valid project
|
|
15
|
+
|
|
16
|
+
## Workflow Steps
|
|
17
|
+
|
|
18
|
+
### Phase 1: Analysis (Prometheus)
|
|
19
|
+
```
|
|
20
|
+
1. Read the task description carefully
|
|
21
|
+
2. Analyze the current codebase state
|
|
22
|
+
- Run `git status` to check working tree
|
|
23
|
+
- Read relevant files to understand context
|
|
24
|
+
- Identify affected modules and dependencies
|
|
25
|
+
3. Create a structured plan with:
|
|
26
|
+
- Clear task breakdown (numbered steps)
|
|
27
|
+
- Dependencies between steps
|
|
28
|
+
- Category assignment for each step (quick/deep/ultrabrain/visual-engineering)
|
|
29
|
+
- Verification criteria for each step
|
|
30
|
+
4. Save plan to `workspace/plans/ultrawork-[timestamp].md`
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Phase 2: Execution (Atlas + Workers)
|
|
34
|
+
```
|
|
35
|
+
5. For each step in the plan:
|
|
36
|
+
a. Mark step as in_progress in todo list
|
|
37
|
+
b. Execute the step using appropriate tools
|
|
38
|
+
c. Verify the step's completion criteria
|
|
39
|
+
d. Record any learnings in wisdom notepad
|
|
40
|
+
e. Mark step as completed
|
|
41
|
+
f. If step fails:
|
|
42
|
+
- Analyze the failure
|
|
43
|
+
- Attempt fix (max 3 retries)
|
|
44
|
+
- If still failing, record issue and continue with next independent step
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Phase 3: Verification
|
|
48
|
+
```
|
|
49
|
+
6. Run full verification:
|
|
50
|
+
- Build check (if applicable): `npm run build`, `cargo build`, `go build`, etc.
|
|
51
|
+
- Lint check (if applicable)
|
|
52
|
+
- Test check (if applicable)
|
|
53
|
+
- LSP diagnostics check
|
|
54
|
+
7. Fix any issues found during verification
|
|
55
|
+
8. Run verification again until clean
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Phase 4: Completion
|
|
59
|
+
```
|
|
60
|
+
9. Generate completion summary:
|
|
61
|
+
- What was done
|
|
62
|
+
- What was changed (files modified/created/deleted)
|
|
63
|
+
- Any issues encountered and how they were resolved
|
|
64
|
+
- Wisdom accumulated
|
|
65
|
+
10. Update wisdom notepads with final learnings
|
|
66
|
+
11. Mark all todos as completed
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Todo Enforcer Integration
|
|
70
|
+
|
|
71
|
+
During ultrawork execution, the following directive is active:
|
|
72
|
+
|
|
73
|
+
> You MUST use TodoWrite to track every task. Mark tasks in_progress when starting,
|
|
74
|
+
> completed when done. NEVER leave tasks unmarked. If you discover new subtasks,
|
|
75
|
+
> add them immediately. Do not stop until all tasks are completed.
|
|
76
|
+
|
|
77
|
+
## Error Handling
|
|
78
|
+
|
|
79
|
+
- **Build failures**: Fix immediately, re-verify
|
|
80
|
+
- **Test failures**: Fix the code, not the test (unless test is wrong)
|
|
81
|
+
- **Lint errors**: Auto-fix where possible, manual fix otherwise
|
|
82
|
+
- **Timeout**: Save progress, report partial completion with clear next steps
|
|
83
|
+
|
|
84
|
+
## Output
|
|
85
|
+
|
|
86
|
+
The workflow produces:
|
|
87
|
+
1. Completed task with all changes applied
|
|
88
|
+
2. Plan file in `workspace/plans/`
|
|
89
|
+
3. Updated wisdom notepads (if learnings occurred)
|
|
90
|
+
4. Completion summary in the conversation
|