zigrix 0.2.0 → 0.2.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/README.md +10 -2
- package/dist/dashboard/.next/BUILD_ID +1 -1
- package/dist/dashboard/.next/app-build-manifest.json +24 -24
- package/dist/dashboard/.next/app-path-routes-manifest.json +2 -2
- package/dist/dashboard/.next/build-manifest.json +5 -5
- package/dist/dashboard/.next/server/app/_not-found.html +1 -1
- package/dist/dashboard/.next/server/app/_not-found.rsc +1 -1
- package/dist/dashboard/.next/server/app/login.html +1 -1
- package/dist/dashboard/.next/server/app/login.rsc +1 -1
- package/dist/dashboard/.next/server/app/setup.html +1 -1
- package/dist/dashboard/.next/server/app/setup.rsc +1 -1
- package/dist/dashboard/.next/server/app-paths-manifest.json +2 -2
- package/dist/dashboard/.next/server/chunks/331.js +1 -1
- package/dist/dashboard/.next/server/functions-config-manifest.json +3 -3
- package/dist/dashboard/.next/server/middleware-build-manifest.js +1 -1
- package/dist/dashboard/.next/server/middleware.js +1 -1
- package/dist/dashboard/.next/server/pages/404.html +1 -1
- package/dist/dashboard/.next/server/pages/500.html +1 -1
- package/dist/dashboard/.next/server/pages/_error.js +1 -1
- package/dist/dashboard/.next/static/chunks/{255-ebd51be49873d76c.js → 255-4f212684648fcab9.js} +1 -1
- package/dist/dashboard/.next/static/chunks/main-cec07dc17fdd452c.js +1 -0
- package/dist/dashboard/package.json +2 -2
- package/dist/index.js +25 -2
- package/dist/onboard.d.ts +1 -1
- package/dist/onboard.js +2 -2
- package/dist/orchestration/dispatch.js +16 -71
- package/dist/orchestration/prompt-compose.d.ts +35 -0
- package/dist/orchestration/prompt-compose.js +172 -0
- package/dist/orchestration/worker.d.ts +4 -1
- package/dist/orchestration/worker.js +132 -52
- package/dist/state/tasks.d.ts +6 -0
- package/dist/state/tasks.js +39 -0
- package/package.json +3 -3
- package/rules/defaults/orchestrator-agent.md +4 -2
- package/rules/defaults/worker-common.md +3 -0
- package/skills/oz/SKILL.md +117 -0
- package/skills/oz/references/examples.md +44 -0
- package/skills/oz/references/routing-rubric.md +71 -0
- package/skills/zigrix-main-agent-guide/SKILL.md +37 -7
- package/dist/dashboard/.next/static/chunks/main-da2d845a416cfa3f.js +0 -1
- /package/dist/dashboard/.next/static/{EZjkAnODdTglaMXuBw76E → dOjvoQUj-mqwJ8kKG4peU}/_buildManifest.js +0 -0
- /package/dist/dashboard/.next/static/{EZjkAnODdTglaMXuBw76E → dOjvoQUj-mqwJ8kKG4peU}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oz
|
|
3
|
+
version: 0.2.0
|
|
4
|
+
description: Official OpenClaw Zigrix entrypoint. Force Zigrix delegation when a message starts with `/oz`, and semantically route plain-language requests to hand work off, assign it, or have Zigrix take it instead of doing the work directly.
|
|
5
|
+
metadata:
|
|
6
|
+
openclaw:
|
|
7
|
+
requires:
|
|
8
|
+
bins: ["zigrix"]
|
|
9
|
+
cliHelp: "zigrix task dispatch --help"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# /oz — OpenClaw Zigrix Entrypoint
|
|
13
|
+
|
|
14
|
+
Use this skill when either of the following is true:
|
|
15
|
+
|
|
16
|
+
1. the user message starts with `/oz `
|
|
17
|
+
2. the user is clearly asking, in natural language, to have work **delegated / handed off / assigned / orchestrated through Zigrix** instead of having the current main agent do it directly
|
|
18
|
+
|
|
19
|
+
This skill is the public OpenClaw-facing entrypoint for Zigrix after `zigrix onboard` installs bundled skills.
|
|
20
|
+
|
|
21
|
+
## 1) Route selection
|
|
22
|
+
|
|
23
|
+
### `/oz` prefix
|
|
24
|
+
If the message starts with `/oz `, treat it as:
|
|
25
|
+
- `route = delegate`
|
|
26
|
+
- `delegateMode = force`
|
|
27
|
+
|
|
28
|
+
Remove the `/oz` prefix and use the remaining text as the delegation payload.
|
|
29
|
+
|
|
30
|
+
### Natural-language delegation
|
|
31
|
+
If there is no `/oz` prefix, judge the user's intent **semantically**.
|
|
32
|
+
|
|
33
|
+
- Use the full meaning of the request and nearby context.
|
|
34
|
+
- Do **not** rely on keyword tables or regex lists as the decision mechanism.
|
|
35
|
+
- When helpful, read:
|
|
36
|
+
- `references/routing-rubric.md`
|
|
37
|
+
- `references/examples.md`
|
|
38
|
+
|
|
39
|
+
Classify the turn into one of:
|
|
40
|
+
- `delegate`
|
|
41
|
+
- `direct`
|
|
42
|
+
- `answer`
|
|
43
|
+
|
|
44
|
+
### Semantic routing policy
|
|
45
|
+
- Choose **`delegate`** when the user wants work to be handed off, assigned, orchestrated, or otherwise run through Zigrix rather than performed directly by the current main agent.
|
|
46
|
+
- Choose **`direct`** only when the user explicitly wants the current agent to do it directly.
|
|
47
|
+
- Choose **`answer`** when the user is asking for explanation, status, architecture, policy, or other non-execution discussion.
|
|
48
|
+
- If the request is ambiguous but points toward tracked execution / implementation / multi-step change, bias toward `delegate` unless the user explicitly asked for direct execution.
|
|
49
|
+
|
|
50
|
+
## 2) Delegate flow
|
|
51
|
+
|
|
52
|
+
If `route = delegate`, use the canonical Zigrix handoff chain:
|
|
53
|
+
|
|
54
|
+
1. Turn the user request into:
|
|
55
|
+
- `title`
|
|
56
|
+
- `description`
|
|
57
|
+
- `scale`
|
|
58
|
+
- optional `projectDir`
|
|
59
|
+
2. Run:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
zigrix task dispatch \
|
|
63
|
+
--title "..." \
|
|
64
|
+
--description "..." \
|
|
65
|
+
--scale simple|normal|risky|large \
|
|
66
|
+
--project-dir /path/to/project \
|
|
67
|
+
--json
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
3. Read the JSON result and extract:
|
|
71
|
+
- `taskId`
|
|
72
|
+
- `orchestratorId`
|
|
73
|
+
- `orchestratorPrompt`
|
|
74
|
+
- `projectDir`
|
|
75
|
+
4. Spawn the orchestrator with the returned prompt.
|
|
76
|
+
|
|
77
|
+
Preferred pattern:
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
sessions_spawn(
|
|
81
|
+
agentId: <orchestratorId>,
|
|
82
|
+
mode: "session",
|
|
83
|
+
thread: true when the current surface supports stable Zigrix thread orchestration, otherwise false,
|
|
84
|
+
label: "[<orchestratorId>] <taskId>",
|
|
85
|
+
task: <orchestratorPrompt>,
|
|
86
|
+
cwd: <projectDir when present>
|
|
87
|
+
)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
5. Reply briefly with the handoff result (`taskId`, orchestrator/session/thread info).
|
|
91
|
+
|
|
92
|
+
## 3) Delegate-only guard
|
|
93
|
+
|
|
94
|
+
Once this skill decides `route = delegate`:
|
|
95
|
+
- do **not** directly implement the task
|
|
96
|
+
- do **not** directly edit/write project files as a substitute for Zigrix handoff
|
|
97
|
+
- do **not** fallback to direct execution if dispatch or spawn fails
|
|
98
|
+
|
|
99
|
+
If dispatch or spawn fails:
|
|
100
|
+
- report the failure clearly
|
|
101
|
+
- include the failing step
|
|
102
|
+
- stop there
|
|
103
|
+
|
|
104
|
+
## 4) Empty or underspecified payloads
|
|
105
|
+
|
|
106
|
+
If `/oz` is used but the remaining payload is empty or too underspecified to create a task:
|
|
107
|
+
- ask the user to restate the task in one clear sentence
|
|
108
|
+
- do not silently guess
|
|
109
|
+
- do not direct-execute instead
|
|
110
|
+
|
|
111
|
+
## 5) Direct / answer cases
|
|
112
|
+
|
|
113
|
+
If semantic routing chooses:
|
|
114
|
+
- `direct` → current agent may proceed with direct execution
|
|
115
|
+
- `answer` → answer normally without creating a Zigrix task
|
|
116
|
+
|
|
117
|
+
This skill exists to decide **whether the request should enter Zigrix orchestration** and, when yes, to force the canonical delegation path.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# `/oz` Routing Examples
|
|
2
|
+
|
|
3
|
+
These examples are here to anchor semantic routing. They are examples, not an exhaustive phrase list.
|
|
4
|
+
|
|
5
|
+
## Force delegate
|
|
6
|
+
- `/oz 로그인 세션 버그 고쳐`
|
|
7
|
+
- `/oz hand this to Zigrix and fix the auth flow`
|
|
8
|
+
- `/oz investigate why onboard is skipping skills`
|
|
9
|
+
|
|
10
|
+
Expected route: `delegate`
|
|
11
|
+
|
|
12
|
+
## Natural-language delegate
|
|
13
|
+
- `이거 맡겨`
|
|
14
|
+
- `이 작업 위임해라`
|
|
15
|
+
- `오케스트레이터로 넘겨서 처리해`
|
|
16
|
+
- `이건 네가 직접 하지 말고 Zigrix로 태워`
|
|
17
|
+
- `hand this off`
|
|
18
|
+
- `route this through Zigrix`
|
|
19
|
+
- `assign this to the orchestrator`
|
|
20
|
+
|
|
21
|
+
Expected route: `delegate`
|
|
22
|
+
|
|
23
|
+
## Direct execution
|
|
24
|
+
- `이건 네가 직접 해`
|
|
25
|
+
- `위임하지 말고 지금 네가 수정해`
|
|
26
|
+
- `don’t delegate this, do it yourself`
|
|
27
|
+
|
|
28
|
+
Expected route: `direct`
|
|
29
|
+
|
|
30
|
+
## Answer only
|
|
31
|
+
- `왜 task dispatch 다음에 sessions_spawn이 필요한데?`
|
|
32
|
+
- `현재 Zigrix/OpenClaw 통합 구조 설명해라`
|
|
33
|
+
- `what does zigrix onboard actually register?`
|
|
34
|
+
|
|
35
|
+
Expected route: `answer`
|
|
36
|
+
|
|
37
|
+
## Ambiguous but execution-oriented
|
|
38
|
+
- `로그인 버그 고쳐`
|
|
39
|
+
- `이 이슈 조사해서 정리해`
|
|
40
|
+
- `세션/thread 진입점 구조 정리하고 필요한 수정 진행해`
|
|
41
|
+
|
|
42
|
+
Default bias:
|
|
43
|
+
- if the surrounding context implies tracked orchestration / handoff, choose `delegate`
|
|
44
|
+
- if the surrounding context clearly asks the current agent to do it directly, choose `direct`
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# `/oz` Semantic Routing Rubric
|
|
2
|
+
|
|
3
|
+
This reference exists to keep natural-language delegation routing **semantic-first**.
|
|
4
|
+
|
|
5
|
+
## Core principle
|
|
6
|
+
Do **not** implement delegation routing as a keyword table or regex checklist.
|
|
7
|
+
|
|
8
|
+
Instead, decide from the user's **meaning**:
|
|
9
|
+
- who should own the work
|
|
10
|
+
- whether execution is being requested
|
|
11
|
+
- whether the user wants Zigrix/orchestration/another agent to take the task
|
|
12
|
+
- whether the user is explicitly asking for direct execution instead
|
|
13
|
+
|
|
14
|
+
## Route categories
|
|
15
|
+
|
|
16
|
+
### 1) `delegate`
|
|
17
|
+
Choose `delegate` when the user wants work to be:
|
|
18
|
+
- handed off
|
|
19
|
+
- assigned
|
|
20
|
+
- orchestrated
|
|
21
|
+
- run through Zigrix
|
|
22
|
+
- taken by another agent / worker / orchestrator
|
|
23
|
+
|
|
24
|
+
Also choose `delegate` when the request is clearly about **tracked execution** and the intent is to kick off work rather than just discuss it.
|
|
25
|
+
|
|
26
|
+
Typical shapes:
|
|
27
|
+
- implementation / bug fix / refactor / investigation / multi-step execution
|
|
28
|
+
- “don’t do this yourself — pass it through the orchestration flow”
|
|
29
|
+
- “make Zigrix take this task”
|
|
30
|
+
|
|
31
|
+
### 2) `direct`
|
|
32
|
+
Choose `direct` only when the user clearly wants the **current main agent** to do the work directly.
|
|
33
|
+
|
|
34
|
+
Typical signs:
|
|
35
|
+
- explicit direct instruction
|
|
36
|
+
- explicit anti-delegation instruction
|
|
37
|
+
- small bounded task with no request to hand it off
|
|
38
|
+
|
|
39
|
+
### 3) `answer`
|
|
40
|
+
Choose `answer` when the user is not asking to execute or hand off work, but instead wants:
|
|
41
|
+
- explanation
|
|
42
|
+
- architecture discussion
|
|
43
|
+
- status
|
|
44
|
+
- comparison
|
|
45
|
+
- policy/design reasoning
|
|
46
|
+
- review of an idea without starting execution
|
|
47
|
+
|
|
48
|
+
## Bias rule
|
|
49
|
+
If the request is ambiguous but points toward:
|
|
50
|
+
- state-changing work
|
|
51
|
+
- multi-step implementation
|
|
52
|
+
- tracked execution
|
|
53
|
+
- “someone else / Zigrix should take this”
|
|
54
|
+
|
|
55
|
+
bias toward `delegate` unless the user clearly requested direct execution.
|
|
56
|
+
|
|
57
|
+
## Hard rules
|
|
58
|
+
- `/oz ...` is always `delegate`.
|
|
59
|
+
- Once `delegate` is chosen, do not direct-execute as a fallback.
|
|
60
|
+
- If the task text is too thin to dispatch safely, ask for clarification instead of direct-executing.
|
|
61
|
+
- Use the existing canonical Zigrix chain:
|
|
62
|
+
- `zigrix task dispatch --json`
|
|
63
|
+
- `sessions_spawn(... orchestratorPrompt ...)`
|
|
64
|
+
|
|
65
|
+
## What this rubric is not
|
|
66
|
+
This rubric is not:
|
|
67
|
+
- a regex spec
|
|
68
|
+
- an exhaustive phrase list
|
|
69
|
+
- a locale-locked keyword matcher
|
|
70
|
+
|
|
71
|
+
It is a semantic decision guide for LLM-based routing.
|
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: zigrix-main-agent-guide
|
|
3
|
-
version: 0.
|
|
4
|
-
description: Main-agent guide for
|
|
3
|
+
version: 0.3.0
|
|
4
|
+
description: Main-agent-only guide for Zigrix CLI (task issuance, orchestrator spawn, `/oz` handoff guard, dashboard, and path resolution). Never use this skill as orchestrator/worker runtime instruction.
|
|
5
5
|
metadata:
|
|
6
6
|
openclaw:
|
|
7
7
|
requires:
|
|
8
8
|
bins: ["zigrix"]
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
# Zigrix Main Agent Guide
|
|
11
|
+
# Zigrix Main Agent Guide (MAIN-ONLY)
|
|
12
12
|
|
|
13
13
|
메인 에이전트가 Zigrix를 사용할 때의 표준 흐름.
|
|
14
14
|
|
|
15
|
+
## 0) Scope Guard (Critical)
|
|
16
|
+
|
|
17
|
+
이 스킬은 **main agent 전용**이다.
|
|
18
|
+
|
|
19
|
+
- 허용 주체: 사용자 요청을 받아 `dispatch/spawn/report`를 수행하는 **main agent**
|
|
20
|
+
- 금지 주체: orchestrator/worker runtime 세션(역할 워커 세션 전반)
|
|
21
|
+
|
|
22
|
+
오케스트레이터/워커는 이 스킬을 런타임 규칙으로 사용하지 않는다.
|
|
23
|
+
오케스트레이터/워커의 canonical instruction은 `zigrix/rules/defaults/*` + dispatch/worker overlay prompt다.
|
|
24
|
+
|
|
15
25
|
## 1) 기본 명령
|
|
16
26
|
|
|
17
27
|
```bash
|
|
@@ -47,6 +57,7 @@ zigrix task dispatch \
|
|
|
47
57
|
- `baselineRequiredAgents`
|
|
48
58
|
- `candidateAgents`
|
|
49
59
|
- `orchestratorPrompt`
|
|
60
|
+
- `orchestratorLabel`
|
|
50
61
|
- `specPath` — resolved absolute path to spec markdown
|
|
51
62
|
- `metaPath` — resolved absolute path to metadata JSON
|
|
52
63
|
- `promptPath` — resolved absolute path to dispatch prompt
|
|
@@ -59,20 +70,39 @@ zigrix task dispatch \
|
|
|
59
70
|
```text
|
|
60
71
|
sessions_spawn(
|
|
61
72
|
agentId: <orchestratorId>,
|
|
73
|
+
label: <dispatchResult.orchestratorLabel>,
|
|
74
|
+
cwd: <dispatchResult.projectDir>,
|
|
62
75
|
task: <dispatchResult.orchestratorPrompt>
|
|
63
76
|
)
|
|
64
77
|
```
|
|
65
78
|
|
|
79
|
+
spawn 직후 main agent는 반환된 실제 세션 ref를 즉시 바인딩한다.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
zigrix task bind-orchestrator --task-id <taskId> --agent-id <orchestratorId> --session-key <childSessionKey> --session-id <childSessionId> --json
|
|
83
|
+
```
|
|
84
|
+
|
|
66
85
|
오케스트레이터는 이후 워커를 `zigrix worker prepare/register/complete` 체인으로 관리한다.
|
|
67
86
|
|
|
87
|
+
### `/oz` and delegation guard
|
|
88
|
+
|
|
89
|
+
`/oz` skill 또는 자연어 위임 라우팅이 현재 턴을 **delegate** 로 판정했다면, 메인 에이전트는 실행자가 아니라 **router** 다.
|
|
90
|
+
|
|
91
|
+
이 경우:
|
|
92
|
+
- 허용: `zigrix task dispatch`, dispatch 결과 확인, `sessions_spawn`, 상태/실패 보고
|
|
93
|
+
- 금지: 직접 구현, 직접 파일 수정으로 우회, direct fallback
|
|
94
|
+
- dispatch/spawn 실패 시: 실패를 보고하고 중단
|
|
95
|
+
|
|
96
|
+
즉, Zigrix handoff가 시작된 이후에는 메인 에이전트가 로컬 직접 작업으로 대체하지 않는다.
|
|
97
|
+
|
|
68
98
|
## 4) 워커/검증/최종 보고 체인
|
|
69
99
|
|
|
70
100
|
```bash
|
|
71
|
-
# 워커 준비 (returns promptPath, specPath, metaPath, projectDir)
|
|
101
|
+
# 워커 준비 (returns promptPath, specPath, metaPath, projectDir, spawnLabel)
|
|
72
102
|
zigrix worker prepare --task-id <taskId> --agent-id <agentId> --description "..." --json
|
|
73
103
|
|
|
74
104
|
# 워커 세션 등록
|
|
75
|
-
zigrix worker register --task-id <taskId> --agent-id <agentId> --session-key <sessionKey> --run-id <runId> --json
|
|
105
|
+
zigrix worker register --task-id <taskId> --agent-id <agentId> --session-key <sessionKey> --label <spawnLabel> --project-dir <projectDir> --run-id <runId> --json
|
|
76
106
|
|
|
77
107
|
# 워커 완료
|
|
78
108
|
zigrix worker complete --task-id <taskId> --agent-id <agentId> --session-key <sessionKey> --run-id <runId> --json
|
|
@@ -116,9 +146,9 @@ bare symbolic key(`paths.tasksDir`, `workspace.projectsBaseDir`)를 파일 경
|
|
|
116
146
|
|
|
117
147
|
| Step | Command | Key resolved path fields |
|
|
118
148
|
|------|---------|--------------------------|
|
|
119
|
-
| Dispatch | `zigrix task dispatch` | `specPath`, `metaPath`, `promptPath`, `projectDir` |
|
|
149
|
+
| Dispatch | `zigrix task dispatch` | `specPath`, `metaPath`, `promptPath`, `projectDir`, `orchestratorLabel` |
|
|
120
150
|
| Start | `zigrix task start` | |
|
|
121
|
-
| Worker prepare | `zigrix worker prepare` | `promptPath`, `specPath`, `metaPath`, `projectDir` |
|
|
151
|
+
| Worker prepare | `zigrix worker prepare` | `promptPath`, `specPath`, `metaPath`, `projectDir`, `spawnLabel` |
|
|
122
152
|
| Worker register | `zigrix worker register` | |
|
|
123
153
|
| Worker complete | `zigrix worker complete` | |
|
|
124
154
|
| Evidence collect | `zigrix evidence collect` | `evidencePath` |
|