@happycastle/oh-my-openclaw 0.8.1 → 0.8.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.
- package/dist/agents/persona-prompts.d.ts +2 -0
- package/dist/agents/persona-prompts.js +15 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/skills/delegation-prompt.md +12 -3
- package/workflows/plan.md +7 -0
- package/workflows/start-work.md +11 -0
- package/workflows/ultrawork.md +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { readFileSync } from 'fs';
|
|
1
|
+
import { readFileSync, statSync } from 'fs';
|
|
2
2
|
import { promises as fs } from 'fs';
|
|
3
3
|
import { dirname, join } from 'path';
|
|
4
4
|
import { fileURLToPath } from 'url';
|
|
@@ -7,6 +7,11 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
7
7
|
const __dirname = dirname(__filename);
|
|
8
8
|
// From dist/agents/ → plugin root is ../../ (same pattern as workflow-commands.ts)
|
|
9
9
|
const PLUGIN_ROOT = join(__dirname, '..', '..');
|
|
10
|
+
const personaCache = new Map();
|
|
11
|
+
/** Clear all cached persona file contents. Useful for testing. */
|
|
12
|
+
export function clearPersonaCache() {
|
|
13
|
+
personaCache.clear();
|
|
14
|
+
}
|
|
10
15
|
const AGENT_MD_MAP = {
|
|
11
16
|
omoc_atlas: 'atlas',
|
|
12
17
|
omoc_prometheus: 'prometheus',
|
|
@@ -43,9 +48,17 @@ export function readPersonaPromptSync(agentId) {
|
|
|
43
48
|
}
|
|
44
49
|
const agentPath = join(PLUGIN_ROOT, '..', 'agents', `${mdName}.md`);
|
|
45
50
|
try {
|
|
46
|
-
|
|
51
|
+
const stat = statSync(agentPath);
|
|
52
|
+
const cached = personaCache.get(agentPath);
|
|
53
|
+
if (cached && cached.mtimeMs === stat.mtimeMs) {
|
|
54
|
+
return cached.content;
|
|
55
|
+
}
|
|
56
|
+
const content = readFileSync(agentPath, 'utf-8');
|
|
57
|
+
personaCache.set(agentPath, { content, mtimeMs: stat.mtimeMs });
|
|
58
|
+
return content;
|
|
47
59
|
}
|
|
48
60
|
catch {
|
|
61
|
+
personaCache.delete(agentPath);
|
|
49
62
|
return `[OmOC] Could not read persona file: agents/${mdName}.md (looked in ${agentPath})`;
|
|
50
63
|
}
|
|
51
64
|
}
|
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 11 agents, category-based model routing, todo enforcer, ralph loop, agent setup CLI, and custom tools",
|
|
5
|
-
"version": "0.8.
|
|
5
|
+
"version": "0.8.3",
|
|
6
6
|
"skills": ["skills"],
|
|
7
7
|
"configSchema": {
|
|
8
8
|
"type": "object",
|
package/package.json
CHANGED
|
@@ -31,6 +31,8 @@ sessions_spawn(
|
|
|
31
31
|
|
|
32
32
|
## 위임 결정 기준
|
|
33
33
|
|
|
34
|
+
기본 원칙: **구현/수정/리팩토링/테스트/빌드 관련 작업은 기본적으로 sessions_spawn 위임이 필수**.
|
|
35
|
+
|
|
34
36
|
### sessions_spawn을 쓸 때 (서브에이전트)
|
|
35
37
|
- **병렬 가능한 독립 작업** (여러 파일 검증, 여러 리포 탐색)
|
|
36
38
|
- **시간이 오래 걸리는 작업** (대규모 리팩토링, 전체 코드 분석)
|
|
@@ -38,9 +40,15 @@ sessions_spawn(
|
|
|
38
40
|
- **background=true로 비동기 실행 후 결과 수신**
|
|
39
41
|
|
|
40
42
|
### 직접 처리할 때 (spawn 불필요)
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
43
|
+
- 순수 설명/요약/의사결정만 필요한 경우 (파일 변경 없음)
|
|
44
|
+
- 사용자 확인 질문에 대한 짧은 응답
|
|
45
|
+
- 플랜 문서 작성 자체 (구현 실행 전 단계)
|
|
46
|
+
|
|
47
|
+
### OmO 구현 위임 (강제)
|
|
48
|
+
|
|
49
|
+
- 코드 변경이 필요한 작업은 `opencode-controller` + `tmux` + `tmux-agents` 경로로 위임한다.
|
|
50
|
+
- 구현 단계에서 "직접 처리"는 예외가 아니라 **금지**다.
|
|
51
|
+
- 최소 1개의 실행 세션을 생성하고 결과를 수집/검증한다.
|
|
44
52
|
|
|
45
53
|
## 7 Required Elements (프롬프트 품질 = 위임 품질)
|
|
46
54
|
|
|
@@ -128,3 +136,4 @@ sessions_spawn(task="테스트 작성...", mode="run", model="claude-sonnet-4-6"
|
|
|
128
136
|
- 기대 산출물이 없는 위임
|
|
129
137
|
- spawn 후 poll 루프로 결과 대기
|
|
130
138
|
- 모든 작업을 직접 처리 (서브에이전트 미활용)
|
|
139
|
+
- 구현 작업인데 sessions_spawn 없이 직접 코드 수정
|
package/workflows/plan.md
CHANGED
|
@@ -6,6 +6,11 @@ description: Strategic planning workflow - analyze requirements and create execu
|
|
|
6
6
|
|
|
7
7
|
Strategic planning workflow that analyzes requirements and creates a structured execution plan before any implementation begins.
|
|
8
8
|
|
|
9
|
+
## Hard Boundary
|
|
10
|
+
|
|
11
|
+
- Planning role does not implement code.
|
|
12
|
+
- If execution is needed, plan MUST include OmO delegation steps using `sessions_spawn` and tmux orchestration (`opencode-controller`, `tmux`, `tmux-agents`).
|
|
13
|
+
|
|
9
14
|
## When to Use
|
|
10
15
|
|
|
11
16
|
- Starting a new feature or project
|
|
@@ -66,6 +71,7 @@ Strategic planning workflow that analyzes requirements and creates a structured
|
|
|
66
71
|
- **Agent**: sisyphus-junior | oracle | explore | librarian
|
|
67
72
|
- **Dependencies**: none | Task N
|
|
68
73
|
- **Description**: What needs to be done
|
|
74
|
+
- **Execution Mode**: `omoc-delegated` | `planning-only`
|
|
69
75
|
- **Acceptance Criteria**:
|
|
70
76
|
- [ ] Criterion 1
|
|
71
77
|
- [ ] Criterion 2
|
|
@@ -106,6 +112,7 @@ Strategic planning workflow that analyzes requirements and creates a structured
|
|
|
106
112
|
- After plan approval, use `/start_work` to begin execution
|
|
107
113
|
- Or use `/ultrawork` for fully automated execution without stops
|
|
108
114
|
- Plan files persist in `workspace/plans/` for future reference
|
|
115
|
+
- Implementation tasks must be executed through delegated OmO/tmux sessions, not direct planner execution
|
|
109
116
|
|
|
110
117
|
## Wisdom Integration
|
|
111
118
|
|
package/workflows/start-work.md
CHANGED
|
@@ -6,6 +6,12 @@ description: Start execution from an approved plan - delegate tasks to worker ag
|
|
|
6
6
|
|
|
7
7
|
Execute an approved plan by delegating tasks to appropriate worker agents, tracking progress, and verifying completion.
|
|
8
8
|
|
|
9
|
+
## Hard Boundary
|
|
10
|
+
|
|
11
|
+
- Implementation must run through delegated worker execution.
|
|
12
|
+
- Prefer OmO/OpenCode tmux orchestration for coding work (`opencode-controller`, `tmux`, `tmux-agents`).
|
|
13
|
+
- Do not complete coding phases via direct inline implementation by the orchestrator.
|
|
14
|
+
|
|
9
15
|
## Prerequisites
|
|
10
16
|
|
|
11
17
|
- An approved plan exists in `workspace/plans/`
|
|
@@ -52,6 +58,11 @@ Execute an approved plan by delegating tasks to appropriate worker agents, track
|
|
|
52
58
|
Context: <relevant files, dependencies>
|
|
53
59
|
```
|
|
54
60
|
|
|
61
|
+
c-1. **Mandatory execution path for coding tasks**
|
|
62
|
+
- Use `sessions_spawn` for worker execution
|
|
63
|
+
- For implementation-heavy tasks, route to OmO via tmux orchestration stack
|
|
64
|
+
- Require execution evidence (changed files, test/build outputs) before marking done
|
|
65
|
+
|
|
55
66
|
d. **Verify task completion** against acceptance criteria
|
|
56
67
|
|
|
57
68
|
e. **Mark task as completed** in todo list
|
package/workflows/ultrawork.md
CHANGED
|
@@ -34,7 +34,7 @@ When the user invokes `/ultrawork [task description]` or ultrawork mode is activ
|
|
|
34
34
|
```
|
|
35
35
|
5. For each step in the plan:
|
|
36
36
|
a. Mark step as in_progress in todo list
|
|
37
|
-
b.
|
|
37
|
+
b. Delegate coding execution to worker sessions (sessions_spawn; OmO/OpenCode tmux orchestration preferred)
|
|
38
38
|
c. Verify the step's completion criteria
|
|
39
39
|
d. Record any learnings in wisdom notepad
|
|
40
40
|
e. Mark step as completed
|