workflow-supervisor 0.1.0 → 0.1.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 +375 -171
- package/adapters/claude-code/adapter.json +7 -1
- package/adapters/codex/adapter.json +7 -1
- package/bin/workflow-skills.mjs +1103 -20
- package/docs/artifacts.md +4 -2
- package/docs/cli.md +77 -15
- package/docs/compatibility.md +11 -37
- package/docs/portable-delegation.md +189 -0
- package/docs/skill-reference.md +4 -4
- package/docs/troubleshooting.md +1 -1
- package/package.json +3 -4
- package/schemas/dossier-v1.schema.json +139 -0
- package/schemas/worker-report-v1.schema.json +119 -0
- package/skills/acceptance-matrix/SKILL.md +2 -2
- package/skills/dossier-builder/SKILL.md +22 -8
- package/skills/dossier-builder/agents/openai.yaml +2 -2
- package/skills/loop-policy/SKILL.md +10 -10
- package/skills/loop-policy/agents/openai.yaml +1 -1
- package/skills/work-unit/SKILL.md +3 -3
- package/skills/worker-roles/SKILL.md +10 -10
- package/skills/worker-roles/agents/openai.yaml +2 -2
- package/skills/workflow-docs/SKILL.md +12 -9
- package/skills/workflow-docs/agents/openai.yaml +2 -2
- package/skills/workflow-docs/references/documentation-production.md +2 -0
- package/skills/workflow-docs/references/goal-resume.md +2 -0
- package/skills/workflow-docs/references/templates.md +4 -2
- package/skills/workflow-docs/references/workflow-control.md +16 -12
- package/skills/workflow-supervisor/SKILL.md +65 -43
- package/adapters/hermesagent/adapter.json +0 -8
- package/adapters/opencode/adapter.json +0 -8
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: workflow-supervisor
|
|
3
|
-
description: Coordinate open-ended, multi-step agent workflows when the user explicitly requests supervised or agent-loop coordination and at least one hard trigger is present, or when no explicit supervisor wording exists but two or more hard triggers are present. Hard triggers include multi-agent or
|
|
3
|
+
description: Coordinate open-ended, multi-step agent workflows when the user explicitly requests supervised or agent-loop coordination and at least one hard trigger is present, or when no explicit supervisor wording exists but two or more hard triggers are present. Hard triggers include multi-agent or worker delegation, durable resume need, high-risk independent verification, contradictory or missing sources, multi-unit scope, repair loops, approval gates, or workflow-state documentation. Do not use for simple single-turn answers, ordinary repo inspection, medium scoped edits, typo fixes, one-off tests, or narrowly scoped changes that can be completed directly.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Workflow Supervisor
|
|
7
7
|
|
|
8
|
-
Use this skill as the coordinating spine for complex work. The supervisor owns decomposition,
|
|
8
|
+
Use this skill as the coordinating spine for complex work. The supervisor owns decomposition, delegation quality, loop discipline, stop gates, and outcome reporting. It may do source discovery and reporting itself, but implementation, verification, repair-ticket writing, and documentation should be treated as separate roles when an automated worker path is available. Native threads or subagents are optional transport optimizations, not the workflow contract.
|
|
9
9
|
|
|
10
10
|
## Domain Neutrality
|
|
11
11
|
|
|
@@ -30,44 +30,45 @@ Use this lifecycle:
|
|
|
30
30
|
9. Use `update_goal` only for terminal `complete` or `blocked` states when the environment supports that action.
|
|
31
31
|
10. Mark the goal complete only after acceptance evidence supports completion and no required supervisor work remains.
|
|
32
32
|
11. Distinguish workflow/unit BLOCKED from Codex goal blocked. Mark a Codex goal blocked only after the same material blocker repeats across the required consecutive goal turns and no meaningful progress remains.
|
|
33
|
-
12. On resume after compaction or
|
|
33
|
+
12. On resume after compaction or continuation, read the active goal first, then reconcile workflow docs and current artifacts.
|
|
34
34
|
|
|
35
35
|
If the environment has no goal tool or goal creation is not permitted, state the intended goal objective in the supervisor report and continue with workflow docs or another state artifact as the fallback state container.
|
|
36
36
|
|
|
37
37
|
## Operating Contract
|
|
38
38
|
|
|
39
39
|
- After complete intake, ground the workflow in sources before creating work units.
|
|
40
|
-
- Treat skill use as instruction loading in the current agent, not as thread, subagent, goal, branch, commit, PR, publication, or other side-effect creation.
|
|
41
|
-
- Run the complete intake gate before goal creation,
|
|
40
|
+
- Treat skill use as instruction loading in the current agent, not as worker delegation, thread creation, subagent creation, goal, branch, commit, PR, publication, or other side-effect creation.
|
|
41
|
+
- Run the complete intake gate before goal creation, worker delegation, implementation, publication, or other irreversible action.
|
|
42
42
|
- Do not infer execution path, mode, delegation, final disposition, or boundaries from keywords, action verbs, or intent guesses.
|
|
43
|
-
- Classify the workflow as `autonomous_goal` or `human_in_loop` only from completed intake answers before
|
|
43
|
+
- Classify the workflow as `autonomous_goal` or `human_in_loop` only from completed intake answers before delegating workers or beginning implementation.
|
|
44
44
|
- Always produce a plan after complete intake. In `human_in_loop`, make it an approval packet and stop for approval. In `autonomous_goal`, make it an execution plan and continue only when the completed intake authorizes that path.
|
|
45
45
|
- Do not begin implementation until complete intake and the path gate are satisfied, at least one concrete dossier exists, and no stop gate applies.
|
|
46
|
-
-
|
|
47
|
-
- Do not start implementer, verifier, repair-author, or documenter
|
|
46
|
+
- Delegate workers only through an automated supported delegation transport after complete intake and the path gate authorize delegation. If no supported transport exists, use same-session phased mode only when intake allowed it; otherwise stop as `delegation_unavailable`.
|
|
47
|
+
- Do not start implementer, verifier, repair-author, or documenter workers before complete intake and the path gate are satisfied; role-specific start conditions are additional gates after that.
|
|
48
48
|
- Keep roles separate: implementers implement, verifiers verify, repair authors write tickets, documenters update workflow artifacts, and the supervisor coordinates.
|
|
49
|
-
- Treat same-
|
|
49
|
+
- Treat same-session verification as a self-check, not independent verification.
|
|
50
50
|
- Prefer explicit PASS/FAIL/BLOCKED states over soft completion language.
|
|
51
51
|
- Stop instead of improvising when sources are missing, contradictory, materially stale, or too vague to produce acceptance criteria.
|
|
52
52
|
- Keep provenance optional; require enough outcome detail for another agent to resume.
|
|
53
53
|
- Treat companion skills as optional phase tools, not an automatic cascade. Use the smallest set needed for the current risk.
|
|
54
54
|
|
|
55
|
-
## Skills
|
|
55
|
+
## Skills And Workers
|
|
56
56
|
|
|
57
|
-
Using this skill does not spawn a thread or subagent. It coordinates the current agent until a separate execution mechanism is explicitly available and authorized.
|
|
57
|
+
Using this skill does not spawn a worker, thread, or subagent. It coordinates the current agent until a separate automated execution mechanism is explicitly available and authorized.
|
|
58
58
|
|
|
59
59
|
Treat these as distinct mechanisms:
|
|
60
60
|
|
|
61
61
|
- Skill: reusable instructions loaded into the current agent.
|
|
62
|
-
- Worker
|
|
63
|
-
-
|
|
64
|
-
-
|
|
62
|
+
- Worker: a role-scoped automated execution run that receives one dossier and returns one terminal report.
|
|
63
|
+
- Portable worker delegation: the package helper command, `workflow-supervisor delegate --agent <agent> --role <role> --unit <unit-id> --cwd <workspace> --dossier <path>`, which invokes an installed platform CLI and normalizes its report.
|
|
64
|
+
- Native thread or subagent: an environment-specific transport a worker adapter may use when it is available and authorized.
|
|
65
|
+
- Same-session phased mode: the current agent performs roles sequentially. Verification in this mode is a self-check, not independent verification.
|
|
65
66
|
|
|
66
|
-
Start
|
|
67
|
+
Start workers only after complete intake and the path gate are satisfied, a concrete dossier exists, the loop policy authorizes delegation, and the environment exposes an automated supported transport. If environment rules require explicit user approval for user-visible native thread creation, obtain it before using that transport. Do not use manual copy/paste handoff as the primary path. If automated delegation is unavailable, mark the unit `delegation_unavailable` unless completed intake explicitly selected same-session phased work.
|
|
67
68
|
|
|
68
69
|
## Intake Gate
|
|
69
70
|
|
|
70
|
-
Every supervisor invocation must pass the complete intake gate before creating a goal, decomposing deeply,
|
|
71
|
+
Every supervisor invocation must pass the complete intake gate before creating a goal, decomposing deeply, delegating workers, implementing, publishing, or taking irreversible action. If the current conversation already contains explicit answers to every required intake decision, record those answers and proceed. Otherwise, ask the intake packet and stop.
|
|
71
72
|
|
|
72
73
|
Do not use keywords to skip intake. Words such as "autonomous", "agent loop", "work until done", "approval", "generate", or "create" are not substitutes for completed intake answers.
|
|
73
74
|
|
|
@@ -76,11 +77,13 @@ Required intake decisions:
|
|
|
76
77
|
- Objective and source: what artifact, spec, repo path, document, ticket, or source set controls the work.
|
|
77
78
|
- Execution path: `autonomous_goal` or `human_in_loop`.
|
|
78
79
|
- Execution mode: `sequential`, `parallel_where_safe`, or `staged_parallel`.
|
|
79
|
-
- Delegation: `
|
|
80
|
+
- Delegation: `automated_worker_delegation`, `native_threads_or_subagents_if_available`, or `same_session_phased`.
|
|
80
81
|
- Final disposition: `keep_local_when_green`, `open_pr_when_green`, `push_main_when_green`, `deploy_when_green`, `publish_when_green`, or `ask_at_end`.
|
|
81
82
|
- Mutation boundaries: local files, dependency installs, network calls, external services, credentials, destructive operations, and any forbidden surfaces.
|
|
82
83
|
- State artifacts: whether to create workflow docs under `<workspace>/.workflow/`, use another named artifact directory, or keep state inline.
|
|
83
84
|
|
|
85
|
+
If the completed intake selects `.workflow/` state artifacts in a Git-backed codebase, ensure `<workspace>/.gitignore` contains `.workflow/` before creating those artifacts. Create `.gitignore` if needed. Treat `.workflow/` as local supervisor memory that must not be staged, committed, pushed, or included in a PR unless the user explicitly names workflow state as a final deliverable.
|
|
86
|
+
|
|
84
87
|
Use this question shape for the first intake ask:
|
|
85
88
|
|
|
86
89
|
```text
|
|
@@ -88,7 +91,7 @@ Before I start the supervisor loop, answer every intake item:
|
|
|
88
91
|
1. Objective and source: what artifact, spec, repo path, document, ticket, or source set controls the work?
|
|
89
92
|
2. Execution path: autonomous_goal or human_in_loop?
|
|
90
93
|
3. Mode: sequential, parallel where safe, or staged parallel?
|
|
91
|
-
4. Delegation:
|
|
94
|
+
4. Delegation: automated worker delegation, native threads/subagents if available, or same-session phased?
|
|
92
95
|
5. Final disposition: keep local, open PR, push main, deploy/publish, or ask at the end?
|
|
93
96
|
6. Boundaries: may I install dependencies, call external services, use credentials, or only edit local files?
|
|
94
97
|
7. State artifacts: create `.workflow/` docs, use another artifact directory, or keep state inline?
|
|
@@ -108,26 +111,27 @@ Negative example: "Using Workflow Supervisor, generate an API and create the pro
|
|
|
108
111
|
4. Build or request a source corpus map. Use `$source-corpus` when source authority, freshness, or contradictions matter.
|
|
109
112
|
5. Split the objective into bounded work units. Use `$work-unit` for ambiguous or multi-phase goals.
|
|
110
113
|
6. Choose a loop policy before starting work: sequential or parallel, retry limits, approval gates, budgets, goal update cadence, and blocker rules. Use `$loop-policy` when the policy is not obvious.
|
|
111
|
-
7. Build dossiers for the first implementation units and any planned verification, repair, or documentation
|
|
112
|
-
8. Assign worker roles with explicit allowed and forbidden behavior. Use `$worker-roles` for multi-agent or
|
|
114
|
+
7. Build dossiers for the first implementation units and any planned verification, repair, or documentation workers. Use `$dossier-builder` when delegating work to another agent or when the task has boundaries.
|
|
115
|
+
8. Assign worker roles with explicit allowed and forbidden behavior. Use `$worker-roles` for multi-agent, native-thread, or portable-worker work.
|
|
113
116
|
9. Select the execution path:
|
|
114
117
|
- `human_in_loop`: use when selected in completed intake or when a higher-priority rule requires human approval after intake.
|
|
115
118
|
- `autonomous_goal`: use only when selected in completed intake and no higher-priority rule requires human approval.
|
|
116
|
-
10.
|
|
117
|
-
|
|
119
|
+
10. If `.workflow/` artifacts will be used in a Git-backed codebase, ensure `.gitignore` contains `.workflow/` before writing them.
|
|
120
|
+
11. Present the path-specific plan:
|
|
121
|
+
- `human_in_loop`: approval packet with plan, work units, worker delegation plan, approval gates, stop gates, and first dossiers. Stop until the human approves or revises it.
|
|
118
122
|
- `autonomous_goal`: execution plan with the same contents plus autonomous boundaries, allowed actions, stop gates, repair limits, and final disposition policy. Continue after recording it only when complete intake authorized that path.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
123
|
+
12. After the path gate is satisfied, delegate named workers from the worker delegation plan through the selected automated transport. Send each worker only its role, dossier, sources, acceptance rows, stop gates, and report schema.
|
|
124
|
+
13. Collect one terminal report from each worker. If a worker asks a human-facing question, convert it to `BLOCKED` and have the supervisor ask the user only when the path policy permits.
|
|
125
|
+
14. Verify independently where possible. Use `$acceptance-matrix` to map every requirement to evidence. Start verifier workers only after the relevant implementer report is available.
|
|
126
|
+
15. If verification FAILs, convert findings into repair tickets and route them to a repair-author or implementer repair worker. Do not expand scope during repair.
|
|
127
|
+
16. Re-run verification after repairs. Continue only until PASS, BLOCKED, repair limit, or path stop.
|
|
128
|
+
17. Start documenter workers only after source, implementation, verification, or repair evidence exists, unless the documenter is explicitly creating planning state.
|
|
129
|
+
18. If verification BLOCKs, report the blocker and stop or ask for the missing decision.
|
|
130
|
+
19. Use `$workflow-docs` to create or refresh reusable Markdown artifacts under `<workspace>/.workflow/` when the workflow must persist across context loss, agents, or sessions.
|
|
131
|
+
20. When all material acceptance rows are PASS or waived, apply the final disposition policy:
|
|
128
132
|
- `human_in_loop`: use the completed intake final disposition; if it is `ask_at_end`, ask the human to choose PR, push main, or keep local.
|
|
129
133
|
- `autonomous_goal`: use the completed intake final disposition. If it is `ask_at_end`, stop and ask before taking any final disposition action.
|
|
130
|
-
|
|
134
|
+
21. Finish with an outcome report that names execution path, goal status, sources, work units, delegated workers, checks, skipped checks, residual risks, final disposition decision, and next action.
|
|
131
135
|
|
|
132
136
|
## Execution Paths
|
|
133
137
|
|
|
@@ -140,7 +144,7 @@ The first supervisor deliverable is a plan for approval, not implementation. The
|
|
|
140
144
|
- objective and non-goals
|
|
141
145
|
- source corpus summary and gaps
|
|
142
146
|
- work units and sequence
|
|
143
|
-
-
|
|
147
|
+
- worker delegation plan with names, roles, dossiers, dependencies, start conditions, and transport
|
|
144
148
|
- acceptance matrix summary
|
|
145
149
|
- approval gates and stop gates
|
|
146
150
|
- expected final disposition choices: PR, push main, or keep local
|
|
@@ -154,7 +158,7 @@ Use `autonomous_goal` only when the completed intake selects it. Phrases such as
|
|
|
154
158
|
- objective and non-goals
|
|
155
159
|
- source corpus summary and gaps
|
|
156
160
|
- work units and sequence
|
|
157
|
-
-
|
|
161
|
+
- worker delegation plan with names, roles, dossiers, dependencies, start conditions, and transport
|
|
158
162
|
- acceptance matrix summary
|
|
159
163
|
- autonomous boundaries and forbidden actions
|
|
160
164
|
- stop gates, repair limits, budgets, and escalation rules
|
|
@@ -164,11 +168,25 @@ The final disposition must come from the completed intake. Direct push to the ma
|
|
|
164
168
|
|
|
165
169
|
Even in `autonomous_goal`, stop and ask when any required intake answer is missing or ambiguous, required sources are missing, acceptance cannot be verified, a worker needs scope expansion, an irreversible action lacks intake authorization, or higher-priority instructions require approval.
|
|
166
170
|
|
|
167
|
-
##
|
|
171
|
+
## Portable Worker Delegation
|
|
172
|
+
|
|
173
|
+
After the path gate is satisfied, use the selected automated worker transport. The portable default is the package helper:
|
|
174
|
+
|
|
175
|
+
```text
|
|
176
|
+
workflow-supervisor delegate --agent <agent> --role <role> --unit <unit-id> --cwd <workspace> --dossier <path>
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Before calling `delegate`, validate the dossier:
|
|
168
180
|
|
|
169
|
-
|
|
181
|
+
```text
|
|
182
|
+
workflow-supervisor validate-dossier <path> --role <role> --unit <unit-id> --json
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
If the dossier does not pass `DossierV1` validation, do not start the worker. Create a discovery dossier, ask for the missing decision, or mark the unit BLOCKED.
|
|
170
186
|
|
|
171
|
-
|
|
187
|
+
Adapters may use native threads, native subagents, or one-shot CLI execution underneath, but the supervisor consumes only the normalized worker report. Use `workflow-supervisor delegate-doctor --agent <agent> --probe` to test the installed local adapter before relying on it for a workflow. If automated delegation is unavailable, mark execution as `delegation_unavailable` unless completed intake selected `same_session_phased`.
|
|
188
|
+
|
|
189
|
+
Name workers deterministically from the workflow, unit, role, and dossier:
|
|
172
190
|
|
|
173
191
|
```text
|
|
174
192
|
wf/<workflow-slug>/<unit-id>-<role>-<dossier-slug>
|
|
@@ -180,16 +198,18 @@ Examples:
|
|
|
180
198
|
wf/better-auth/U1-implementer-backend-auth-instance
|
|
181
199
|
wf/better-auth/U1-verifier-backend-auth-instance
|
|
182
200
|
wf/better-auth/U1-repair-auth-route-order
|
|
183
|
-
wf/better-auth/U6-documenter-
|
|
201
|
+
wf/better-auth/U6-documenter-outcome-docs
|
|
184
202
|
```
|
|
185
203
|
|
|
186
|
-
Use one
|
|
204
|
+
Use one worker per role per work unit unless the loop policy explicitly allows batching. Worker prompts must be scoped:
|
|
187
205
|
|
|
188
206
|
- kickoff: role, dossier, sources, acceptance rows, stop gates, report schema
|
|
189
207
|
- checkpoint: request status, blockers, or clarification without expanding scope
|
|
190
|
-
- repair
|
|
208
|
+
- repair delegation: failed rows, verifier findings, allowed repair surfaces, checks
|
|
191
209
|
- closeout: collect terminal report and confirm no further action is expected
|
|
192
210
|
|
|
211
|
+
Workers must not ask the human questions directly, choose final disposition, approve plans, expand scope, or message each other. They return `PASS`, `FAIL`, or `BLOCKED` using the assigned report schema. The supervisor routes blockers, repairs, and human questions.
|
|
212
|
+
|
|
193
213
|
Final disposition prompt shape:
|
|
194
214
|
|
|
195
215
|
```text
|
|
@@ -211,7 +231,9 @@ Do not hand off or implement a work unit unless the dossier can name:
|
|
|
211
231
|
- adversarial checks
|
|
212
232
|
- stop gates
|
|
213
233
|
- worker report schema
|
|
214
|
-
-
|
|
234
|
+
- worker name, transport, and role start condition when delegation is planned
|
|
235
|
+
|
|
236
|
+
The dossier must be machine-checkable as `DossierV1`. The portable delegate command refuses missing or invalid dossiers with `reason: invalid_dossier`; no worker process should start when the gate fails.
|
|
215
237
|
|
|
216
238
|
Boundaries may be mutable artifacts, source claims, decisions, audiences, data fields, design areas, process steps, publication rights, or forbidden claims. For read-only advisory work, naming forbidden claims and decision limits can satisfy the boundary requirement.
|
|
217
239
|
|
|
@@ -232,7 +254,7 @@ Stop when:
|
|
|
232
254
|
- the user requires approval before continuing
|
|
233
255
|
- the selected path is `autonomous_goal` but it was inferred from prompt wording instead of a completed intake answer
|
|
234
256
|
- an irreversible action is requested without explicit authorization in the completed intake
|
|
235
|
-
- a worker
|
|
257
|
+
- a worker asks to expand scope without supervisor or human approval
|
|
236
258
|
- final verification is not green and no waiver evidence exists
|
|
237
259
|
|
|
238
260
|
## Final Report Shape
|
|
@@ -245,7 +267,7 @@ Report:
|
|
|
245
267
|
- Objective handled
|
|
246
268
|
- Sources used and gaps
|
|
247
269
|
- Work units completed or remaining
|
|
248
|
-
-
|
|
270
|
+
- Workers delegated, blocked, unavailable, or skipped
|
|
249
271
|
- Verification evidence
|
|
250
272
|
- Repairs performed or recommended
|
|
251
273
|
- Checks run and skipped
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"agent": "hermesagent",
|
|
3
|
-
"status": "portable",
|
|
4
|
-
"defaultTarget": "${HERMESAGENT_HOME:-${HERMES_HOME:-~/.hermes}}/skills",
|
|
5
|
-
"projectTarget": "<project>/.hermes/skills",
|
|
6
|
-
"metadata": "SKILL.md",
|
|
7
|
-
"fallback": "workflow-supervisor emit-context --agent hermesagent --out HERMES.md"
|
|
8
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"agent": "opencode",
|
|
3
|
-
"status": "portable",
|
|
4
|
-
"defaultTarget": "${OPENCODE_HOME:-~/.config/opencode}/skills",
|
|
5
|
-
"projectTarget": "<project>/.opencode/skills",
|
|
6
|
-
"metadata": "SKILL.md",
|
|
7
|
-
"fallback": "workflow-supervisor emit-context --agent opencode --out AGENTS.md"
|
|
8
|
-
}
|