workflow-supervisor 0.1.0 → 0.1.2

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 CHANGED
@@ -1,266 +1,532 @@
1
1
  # Workflow Supervisor
2
2
 
3
- Portable workflow skills for supervising messy agent work.
3
+ Workflow Supervisor is a strict supervision skill pack for agent work that needs to stay organized, resumable, and evidence-backed.
4
+
5
+ It is for moments when you do not want an agent to jump straight into implementation, lose the thread halfway through, verify its own work, or quietly skip important handoffs. You ask for the supervisor, the supervisor asks the right setup questions, turns the work into small units, creates worker dossiers, delegates scoped work to real worker agents when possible, verifies the results, and leaves a clear outcome trail.
6
+
7
+ Example prompt:
8
+
9
+ ```text
10
+ Use $workflow-supervisor to build a FastAPI Naive RAG demo for a healthcare specialist agent.
11
+ ```
12
+
13
+ The correct first response is not code. The correct first response is an intake packet. That is intentional.
4
14
 
5
15
  ![Workflow Supervisor hero image showing the supervisor coordinating source corpus, work units, dossiers, roles, loop policy, acceptance, repair, workflow docs, and final outputs](assets/workflow-supervisor-hero.png)
6
16
 
7
- This repository contains an installable skill pack for Codex, Claude Code, OpenCode, HermesAgent, and other agents that can read Markdown instructions. It is built for work that is too broad, risky, ambiguous, or long-running to handle as one ordinary prompt.
17
+ ## What You Get
18
+
19
+ Workflow Supervisor gives you a repeatable workflow for serious agent tasks:
20
+
21
+ - a complete intake before work starts
22
+ - a source map, even when the only source is the user prompt
23
+ - bounded work units, including `WU-001` for tiny tasks
24
+ - dossiers that tell each worker exactly what to do and what not to touch
25
+ - separate implementer, verifier, repair, and documenter responsibilities
26
+ - structured worker reports instead of loose prose
27
+ - evidence-based verification
28
+ - repair loops that stay tied to failed acceptance rows
29
+ - durable `.workflow/` state when the work needs to survive context loss
30
+ - a final report with checks, risks, workers, and next actions
31
+
32
+ The main design choice is simple: the supervisor coordinates, workers do scoped work, and the CLI stays small.
33
+
34
+ ## The Mental Model
35
+
36
+ Think of Workflow Supervisor as a project lead inside the current agent conversation.
37
+
38
+ The supervisor:
39
+
40
+ - asks the user for missing decisions
41
+ - decides when work is ready to start
42
+ - creates the plan, units, dossiers, and acceptance rows
43
+ - hands work to role-specific workers
44
+ - reads worker reports
45
+ - routes blockers and repairs
46
+ - decides when verification is good enough
47
+ - applies the final disposition policy
48
+
49
+ Workers:
50
+
51
+ - receive one scoped dossier
52
+ - perform one role
53
+ - return one structured report
54
+ - do not talk to the human directly
55
+ - do not choose final disposition
56
+ - do not message each other
57
+
58
+ The CLI:
59
+
60
+ - installs the skills
61
+ - validates skill and schema files
62
+ - validates `DossierV1`
63
+ - invokes one worker process
64
+ - validates `WorkerReportV1`
65
+ - returns a normalized report to the supervisor
66
+
67
+ It is not a daemon, queue, dashboard, scheduler, or full agent harness.
68
+
69
+ ```mermaid
70
+ flowchart TB
71
+ User["User"] --> Supervisor["Supervisor agent in the current chat"]
72
+ Supervisor --> Intake["Complete intake"]
73
+ Supervisor --> Sources["Source corpus"]
74
+ Supervisor --> Units["Work units"]
75
+ Supervisor --> Matrix["Acceptance matrix"]
76
+ Supervisor --> Dossiers["DossierV1 files"]
77
+ Supervisor --> CLI["workflow-supervisor CLI"]
78
+ CLI --> Codex["Codex worker"]
79
+ CLI --> Claude["Claude Code worker"]
80
+ Codex --> Report["WorkerReportV1"]
81
+ Claude --> Report
82
+ Report --> Supervisor
83
+ Supervisor --> Docs[".workflow/ state"]
84
+ Supervisor --> Outcome["Final report"]
85
+ ```
86
+
87
+ ## What Happens When You Invoke It
88
+
89
+ When you explicitly invoke `workflow-supervisor`, `$workflow-supervisor`, or say to use the skill, the workflow enters `strict_full_workflow`.
8
90
 
9
- Use it when an agent needs to:
91
+ Strict mode means task size does not matter. Even if the request is "make a function that adds two numbers", explicit supervisor invocation still means the full workflow:
10
92
 
11
- - ground work in source material before acting
12
- - split a fuzzy goal into bounded work units
13
- - create concrete handoffs between agents or threads
14
- - choose between autonomous goal execution and human-in-the-loop execution
15
- - fan out path-gated dossiers into named worker threads
16
- - separate implementation from verification
17
- - turn acceptance criteria into evidence-backed checks
18
- - control repair loops, retries, budgets, and stop gates
19
- - leave reusable Markdown state so another agent can resume
93
+ 1. Ask the complete intake packet.
94
+ 2. Build or record the source corpus.
95
+ 3. Create at least one work unit.
96
+ 4. Create acceptance rows.
97
+ 5. Create dossiers for the planned workers.
98
+ 6. Create a worker-agent plan.
99
+ 7. Ask for approval when the selected path is human-in-loop.
100
+ 8. Delegate scoped work to real workers when the environment supports it.
101
+ 9. Verify with evidence.
102
+ 10. Route repair work if verification fails.
103
+ 11. Refresh docs or outcome state.
104
+ 12. Report final status and next action.
20
105
 
21
- Do not use it for tiny edits, one-off commands, ordinary README wording, or a task that already has clear files and clear acceptance criteria.
106
+ This rule exists to prevent the agent from deciding that a task is "too simple" and quietly skipping the supervisor.
22
107
 
23
- ## The Idea
108
+ ## Intake
24
109
 
25
- The pack treats open-ended work as a supervised loop:
110
+ The supervisor must get explicit answers to these seven items before planning deeply, creating a goal, delegating workers, implementing, publishing, or taking irreversible action:
26
111
 
27
112
  ```text
28
- sources -> work units -> execution path -> named threads -> verification -> repair -> disposition
113
+ 1. Objective and source: what artifact, spec, repo path, document, ticket, or source set controls the work?
114
+ 2. Execution path: autonomous_goal or human_in_loop?
115
+ 3. Mode: sequential, parallel where safe, or staged parallel?
116
+ 4. Delegation: automated worker delegation, native threads/subagents if available, or same-session phased?
117
+ 5. Final disposition: keep local, open PR, push main, deploy/publish, or ask at the end?
118
+ 6. Boundaries: may I install dependencies, call external services, use credentials, or only edit local files?
119
+ 7. State artifacts: create .workflow docs, use another artifact directory, or keep state inline?
29
120
  ```
30
121
 
31
- `$workflow-supervisor` is the spine. The other skills are phase tools the supervisor can call when the workflow needs more structure.
122
+ If any answer is missing or vague, the supervisor asks only for the missing pieces and stops. Phrases like "work autonomously", "just do it", or "use your judgment" do not fill in the missing intake fields.
123
+
124
+ Expected human pauses are normal. A workflow can move from `WAITING_FOR_HUMAN` back to `ACTIVE` after the user approves a plan or answers a blocker question.
125
+
126
+ ## The Workflow
127
+
128
+ The full loop looks like this:
32
129
 
33
130
  ```text
34
- source-corpus
35
- |
36
- workflow-supervisor --+-- work-unit
37
- | |
38
- | +-- dossier-builder
39
- | |
40
- | +-- worker-roles
41
- | |
42
- | +-- acceptance-matrix
43
- | |
44
- | +-- loop-policy
45
- |
46
- +-- workflow-docs
131
+ complete intake
132
+ -> source corpus
133
+ -> work units
134
+ -> loop policy
135
+ -> acceptance matrix
136
+ -> dossiers
137
+ -> approval or autonomous path gate
138
+ -> worker handoff
139
+ -> worker report
140
+ -> verification
141
+ -> repair if needed
142
+ -> re-verification
143
+ -> documentation
144
+ -> final disposition
47
145
  ```
48
146
 
49
- The goal is not bureaucracy. The goal is to stop agents from drifting, guessing, rubber-stamping their own work, or losing state after a long context window.
50
-
51
- ## Execution Paths
147
+ The worker lifecycle is tracked separately:
52
148
 
53
- The supervisor enforces complete intake before it chooses a path or starts work:
149
+ ```text
150
+ planned -> handed_off -> acknowledged -> reported -> verified -> closed
151
+ ```
54
152
 
55
- - `human_in_loop`: after complete intake, the agent produces an approval packet first, then waits for a human decision before implementation, worker thread creation, publication, direct push, or other irreversible action.
56
- - `autonomous_goal`: after complete intake, the agent can continue through planning, implementation, verification, repair, and final disposition only when the execution-path intake answer selects `autonomous_goal`.
153
+ This makes it possible to see where the workflow is, which worker owns which piece, what evidence exists, and what should happen next.
57
154
 
58
- `$workflow-supervisor` does not skip intake from keywords such as "autonomous", "work until done", "approval", "generate", or "create". The user must answer every intake item. If any answer is missing, vague, or delegated to judgment, the supervisor prompts for the unresolved item(s) again and stops before planning or implementation.
155
+ ## Skills In The Pack
59
156
 
60
- Both paths use the same core controls after intake: source grounding, bounded work units, dossiers, role separation, acceptance evidence, repair limits, stop gates, and final disposition choices. In Codex-style environments, the supervisor can bind the loop to a goal only after complete intake and any required environment authorization, mirror state into workflow artifacts, and resume without losing the active objective.
157
+ The skill pack is made of small focused skills. The supervisor can use them as phase instructions.
61
158
 
62
- The pack is domain-neutral. A "surface" can be a repository path, document section, design, dataset, ticket, process, prompt, or other mutable artifact. When prerequisites are missing, the skills create a discovery or intake unit instead of inventing repo-only requirements.
159
+ | Skill | What it does |
160
+ |---|---|
161
+ | `workflow-supervisor` | Coordinates the whole workflow, gates, workers, verification, repair, and final disposition. |
162
+ | `source-corpus` | Lists and ranks sources, gaps, contradictions, authority, freshness, and allowed next action. |
163
+ | `work-unit` | Turns the objective into bounded units with dependencies, surfaces, readiness, and done criteria. |
164
+ | `loop-policy` | Defines execution path, mode, approval gates, repair limits, budgets, goal policy, and resume behavior. |
165
+ | `acceptance-matrix` | Turns requirements into evidence rows with PASS, FAIL, BLOCKED, and waiver handling. |
166
+ | `dossier-builder` | Creates concrete `DossierV1` contracts for workers. |
167
+ | `worker-roles` | Defines role boundaries so implementers, verifiers, repair authors, and documenters do not blur together. |
168
+ | `workflow-docs` | Creates or refreshes durable `.workflow/` artifacts when state needs to persist. |
63
169
 
64
- ## Skills, Threads, And Subagents
170
+ Loading a skill does not spawn a worker. A skill is instruction context for the current supervisor. A worker is a separate role-scoped execution run.
65
171
 
66
- Using a skill loads instructions into the current agent. It does not automatically create a new thread, subagent, goal, branch, commit, PR, publication, or other side effect.
172
+ ## Files The Workflow Creates
67
173
 
68
- Worker threads or subagents are separate execution mechanisms. `$workflow-supervisor` may plan them, but creation happens only after the selected execution path is authorized, a concrete dossier exists, the environment exposes the needed tool, and no stop gate applies. If thread or subagent tools are unavailable, the supervisor emits ready-to-send handoff prompts or workflow docs instead.
174
+ Workflow state lives under `.workflow/` by default. The directory is local supervisor memory, not product code.
69
175
 
70
- In Codex-style environments, user-visible thread creation may require an explicit user request or approval even when the supervisor has prepared a thread plan. Treat same-thread verification as a self-check, not independent verification.
176
+ In a Git-backed project, `.workflow/` must be in `.gitignore` before these files are written. Project installs do this automatically.
71
177
 
72
- ## Quick Example
178
+ Common workflow files:
73
179
 
74
- Ask the agent to use the supervisor for work that needs a real loop:
180
+ | File | Created from | Purpose |
181
+ |---|---|---|
182
+ | `.workflow/WORKFLOW.md` | `workflow-supervisor`, `loop-policy`, `workflow-docs` | Main state, objective, execution path, policy, stop gates, next action. |
183
+ | `.workflow/SOURCE-CORPUS.md` | `source-corpus`, `workflow-docs` | Source ranking, missing sources, contradictions, assumptions. |
184
+ | `.workflow/WORK-UNITS.md` | `work-unit`, `workflow-docs` | Unit list, dependencies, sequencing, blocked units. |
185
+ | `.workflow/DOSSIER.md` or `.workflow/dossiers/*.yaml` | `dossier-builder`, `workflow-docs` | Worker contracts for implementation, verification, repair, or documentation. |
186
+ | `.workflow/WORKER-MAP.md` | `workflow-supervisor`, `worker-roles`, `workflow-docs` | Worker names, roles, transports, lifecycle, reports, blockers. |
187
+ | `.workflow/ACCEPTANCE-MATRIX.md` | `acceptance-matrix`, `workflow-docs` | Evidence rows and material PASS, FAIL, BLOCKED states. |
188
+ | `.workflow/VERIFICATION-REPORT.md` | verifier worker, `acceptance-matrix`, `workflow-docs` | Verification evidence, findings, skipped checks, residual risks. |
189
+ | `.workflow/REPAIR-TICKETS.md` | repair worker, `workflow-docs` | Repair tasks tied to failed rows or verifier findings. |
190
+ | `.workflow/DECISIONS.md` | supervisor, `workflow-docs` | User decisions, assumptions, reversals, unresolved questions. |
191
+ | `.workflow/HANDOFF.md` | supervisor, `workflow-docs` | Resume pack for another agent or later session. |
192
+ | `.workflow/OUTCOME.md` | supervisor, documenter worker, `workflow-docs` | Final status, checks, risks, disposition, next action. |
193
+ | `.workflow/GOAL-STATE.md` | supervisor, `workflow-docs` | Codex goal mirror when goal state needs durable backup. |
194
+
195
+ For documentation-heavy workflows, `workflow-docs` can also create:
75
196
 
76
197
  ```text
77
- Use $workflow-supervisor.
198
+ .workflow/DOCUMENTATION-BRIEF.md
199
+ .workflow/CONTENT-INVENTORY.md
200
+ .workflow/OUTLINE.md
201
+ .workflow/CONTENT-DRAFT.md
202
+ .workflow/CLAIMS-REGISTER.md
203
+ .workflow/STYLE-GUIDE.md
204
+ .workflow/GLOSSARY.md
205
+ .workflow/ASSET-REGISTER.md
206
+ .workflow/REVIEW-PLAN.md
207
+ .workflow/REVISION-QUEUE.md
208
+ .workflow/PUBLISHING-CHECKLIST.md
209
+ .workflow/PUBLICATION-LOG.md
210
+ .workflow/MAINTENANCE-PLAN.md
211
+ ```
212
+
213
+ It should not create all of these by default. It should create the smallest useful set.
214
+
215
+ ## Dossiers
216
+
217
+ A dossier is the worker contract. It is how the supervisor prevents vague delegation.
218
+
219
+ Before any worker starts, the supervisor creates a concrete `DossierV1` with:
220
+
221
+ - workflow name
222
+ - work unit
223
+ - dossier id
224
+ - worker name
225
+ - worker role
226
+ - delegation transport
227
+ - start condition
228
+ - objective and non-goals
229
+ - source corpus and must-read sources
230
+ - allowed surfaces
231
+ - forbidden surfaces
232
+ - acceptance rows
233
+ - adversarial checks
234
+ - required commands or evidence
235
+ - worker prompt
236
+ - supervisor checkpoints
237
+ - report schemas
238
+ - stop gates
239
+ - assumptions
240
+ - open questions
241
+
242
+ Validate a dossier before delegation:
78
243
 
79
- Migrate this repo's docs to the new API shape.
244
+ ```bash
245
+ workflow-supervisor validate-dossier .workflow/dossiers/WU-001-implementer.yaml --role implementer --unit WU-001 --json
80
246
  ```
81
247
 
82
- The supervisor should ask the complete intake before work starts:
248
+ The validator rejects things like `TBD`, `unknown`, `all files`, `entire repo`, unresolved open questions, role mismatches, unit mismatches, missing forbidden surfaces, and prompts that do not require `WorkerReportV1`.
83
249
 
84
- ```text
85
- Before I start the supervisor loop, answer every intake item:
86
- 1. Objective and source: what artifact, spec, repo path, document, ticket, or source set controls the work?
87
- 2. Execution path: autonomous_goal or human_in_loop?
88
- 3. Mode: sequential, parallel where safe, or staged parallel?
89
- 4. Delegation: same-thread only, use threads/subagents if available, or handoff prompts only?
90
- 5. Final disposition: keep local, open PR, push main, deploy/publish, or ask at the end?
91
- 6. Boundaries: may I install dependencies, call external services, use credentials, or only edit local files?
92
- 7. State artifacts: create `.workflow/` docs, use another artifact directory, or keep state inline?
250
+ ## Workers
251
+
252
+ The required worker responsibilities are:
253
+
254
+ | Responsibility | CLI role value | What it does |
255
+ |---|---|---|
256
+ | Implementer | `implementer` | Changes only the allowed surfaces named in the dossier. |
257
+ | Verifier | `verifier` | Checks the work against acceptance rows and must not edit implementation. |
258
+ | Repair author | `repair` | Converts failed rows or verifier findings into actionable repair work. |
259
+ | Documenter | `documenter` | Updates workflow or outcome docs from evidence. |
260
+
261
+ The skill text may say "repair-author" because that is the human role. The CLI schema uses `repair`.
262
+
263
+ Workers receive only their scoped handoff:
264
+
265
+ - role
266
+ - dossier
267
+ - sources
268
+ - acceptance rows
269
+ - stop gates
270
+ - report schema
271
+
272
+ They return one terminal `WorkerReportV1`.
273
+
274
+ ## Worker Reports
275
+
276
+ Every delegated worker returns this machine-shaped report:
277
+
278
+ ```json
279
+ {
280
+ "schema": "WorkerReportV1",
281
+ "status": "PASS",
282
+ "role": "verifier",
283
+ "unit_id": "WU-001",
284
+ "summary": "Verified the API responses and retrieval behavior against the acceptance rows.",
285
+ "changed_surfaces": [],
286
+ "evidence": ["pytest tests/test_api.py passed", "manual inspection of /health response"],
287
+ "checks_run": ["pytest tests/test_api.py"],
288
+ "skipped_checks": [],
289
+ "findings": [],
290
+ "blocking_question": null,
291
+ "next_action": "supervisor_review",
292
+ "adapter": null,
293
+ "guard": null,
294
+ "reason": null
295
+ }
93
296
  ```
94
297
 
95
- If the reply skips any item, the supervisor asks for the missing item(s) and stops again.
298
+ The supervisor trusts the report shape, not loose prose. A PASS without evidence is invalid. A verifier that edits implementation is invalid. A worker that asks the human directly is converted into a blocker for the supervisor to route.
96
299
 
97
- For a narrower phase, invoke the specific skill:
300
+ ## How The Supervisor Talks To Workers
98
301
 
99
- ```text
100
- Use $source-corpus to identify the sources of truth for this migration and flag contradictions.
302
+ The portable worker path is one CLI command:
303
+
304
+ ```bash
305
+ workflow-supervisor delegate \
306
+ --agent <codex|claude-code> \
307
+ --role <implementer|verifier|repair|documenter> \
308
+ --unit <unit-id> \
309
+ --cwd <workspace> \
310
+ --dossier <path>
101
311
  ```
102
312
 
103
- ```text
104
- Use $acceptance-matrix to turn this launch checklist into PASS, FAIL, and BLOCKED criteria with evidence requirements.
313
+ The command:
314
+
315
+ 1. Validates the dossier as `DossierV1`.
316
+ 2. Builds a scoped worker prompt.
317
+ 3. Starts the selected agent CLI with an adapter command array.
318
+ 4. Captures stdout, stderr, exit code, and timeout.
319
+ 5. Extracts and validates `WorkerReportV1`.
320
+ 6. Runs surface and role guards.
321
+ 7. Prints one normalized JSON report for the supervisor.
322
+
323
+ Certified worker adapters:
324
+
325
+ - `codex`
326
+ - `claude-code`
327
+
328
+ The `generic` target is for Markdown instruction export. It is not a certified automated worker adapter.
329
+
330
+ Check local adapter readiness:
331
+
332
+ ```bash
333
+ workflow-supervisor delegate-doctor --agent all --probe --require-pass
105
334
  ```
106
335
 
336
+ If a worker adapter is missing, unauthenticated, times out, returns invalid output, edits forbidden surfaces, or returns PASS without evidence, the delegate command returns a structured `BLOCKED` report.
337
+
338
+ ## No Silent Fallbacks
339
+
340
+ If the environment can create, message, or delegate to worker agents, the supervisor must use real workers for implementation, verification, repair, and documentation responsibilities.
341
+
342
+ If it cannot, it must record:
343
+
107
344
  ```text
108
- Use $workflow-docs to create a reusable HANDOFF.md and OUTCOME.md for the next agent.
345
+ worker_agent_unavailable
109
346
  ```
110
347
 
348
+ Then it must stop for a human decision unless complete intake explicitly selected `same_session_phased`.
349
+
350
+ Same-session phased work is allowed only when selected. Verification in that mode is a `self-check`, not an `independent-verifier`.
351
+
111
352
  ## Install
112
353
 
113
- From a local checkout:
354
+ Install from npm once published:
114
355
 
115
356
  ```bash
116
- git clone https://github.com/NikolaCehic/workflow-supervisor.git
117
- cd workflow-supervisor
118
- npm run validate
119
- node ./bin/workflow-skills.mjs install --agent codex --scope user
357
+ npm install -g workflow-supervisor
358
+ workflow-supervisor validate
120
359
  ```
121
360
 
122
- After npm publication, the same installer can be run through `npx`:
361
+ Use with `npx`:
123
362
 
124
363
  ```bash
125
- npx workflow-supervisor install --agent codex --scope user
364
+ npx workflow-supervisor list
126
365
  ```
127
366
 
128
- Install into a project-local skill directory for all supported agents:
367
+ Install skills for Codex:
129
368
 
130
369
  ```bash
131
- node ./bin/workflow-skills.mjs install --agent all --scope project --project /path/to/project
370
+ npx workflow-supervisor install --agent codex --scope user
132
371
  ```
133
372
 
134
- Install into any custom directory:
373
+ Install skills for Claude Code:
135
374
 
136
375
  ```bash
137
- node ./bin/workflow-skills.mjs install --agent generic --target ./agent-skills
376
+ npx workflow-supervisor install --agent claude-code --scope user
138
377
  ```
139
378
 
140
- Install only selected skills:
379
+ Install both certified targets into a project:
141
380
 
142
381
  ```bash
143
- node ./bin/workflow-skills.mjs install --agent codex --skills workflow-supervisor,loop-policy,workflow-docs
382
+ npx workflow-supervisor install --agent all --scope project --project .
144
383
  ```
145
384
 
146
- Remove an install:
385
+ Project installs copy the skill folders into project-level agent directories and ensure the target project `.gitignore` contains:
147
386
 
148
- ```bash
149
- node ./bin/workflow-skills.mjs uninstall --agent codex --scope user
387
+ ```gitignore
388
+ .workflow/
150
389
  ```
151
390
 
152
- Emit a portable context file for agents that do not natively discover skill folders. This embeds the selected `SKILL.md` files and bundled Markdown references:
391
+ From a local checkout:
153
392
 
154
393
  ```bash
155
- npx workflow-supervisor emit-context --agent opencode --skills workflow-supervisor,workflow-docs --out AGENTS.md
394
+ git clone https://github.com/NikolaCehic/workflow-supervisor.git
395
+ cd workflow-supervisor
396
+ npm install
397
+ npm run validate
156
398
  ```
157
399
 
158
- Each install writes:
400
+ ## Basic Use
159
401
 
160
- - the selected skill folders
161
- - `WORKFLOW_SKILL_PACK.md`
162
- - `.workflow-skills-install.json` with installed skills and checksums
402
+ After installing the skills, ask your agent:
163
403
 
164
- ## Supported Agents
404
+ ```text
405
+ Use $workflow-supervisor to implement a healthcare specialist FastAPI Naive RAG demo.
406
+ ```
165
407
 
166
- | Agent | User Install | Project Install |
167
- |---|---|---|
168
- | Codex | `~/.agents/skills` | `<project>/.agents/skills` |
169
- | Claude Code | `${CLAUDE_HOME:-~/.claude}/skills` | `<project>/.claude/skills` |
170
- | OpenCode | `${OPENCODE_HOME:-~/.config/opencode}/skills` | `<project>/.opencode/skills` |
171
- | HermesAgent | `${HERMESAGENT_HOME:-${HERMES_HOME:-~/.hermes}}/skills` | `<project>/.hermes/skills` |
172
- | Generic | custom `--target` | custom `--target` |
408
+ You should expect:
173
409
 
174
- Use `emit-context` to create `AGENTS.md`, `CLAUDE.md`, `HERMES.md`, or another portable instruction file when an agent does not read `SKILL.md` folders directly. See [docs/compatibility.md](docs/compatibility.md) for adapter notes.
410
+ 1. The supervisor asks the complete intake packet.
411
+ 2. You answer every intake item.
412
+ 3. If the path is `human_in_loop`, the supervisor gives you an approval packet before implementation.
413
+ 4. The supervisor creates work units, acceptance rows, and dossiers.
414
+ 5. The supervisor delegates scoped work to workers when supported.
415
+ 6. Workers return structured reports.
416
+ 7. The supervisor verifies, routes repairs if needed, and gives you the final result.
175
417
 
176
- ## Included Skills
418
+ If you only want a normal quick edit, do not invoke `$workflow-supervisor`.
177
419
 
178
- | Skill | What It Does |
179
- |---|---|
180
- | `$workflow-supervisor` | Coordinates the whole loop: source grounding, work units, autonomous or human-in-loop execution path, thread orchestration, dossiers, verification, repair, stop gates, goal state, final PR/push/local disposition, and outcome reporting. |
181
- | `$source-corpus` | Identifies and ranks sources of truth, then flags stale, missing, contradictory, inaccessible, or non-blocking evidence gaps. |
182
- | `$work-unit` | Turns broad goals into bounded units with objective, dependencies, scope, done criteria, and sequencing. |
183
- | `$dossier-builder` | Creates a concrete handoff contract for one unit: sources, allowed surfaces, forbidden surfaces, checks, stop gates, and report shape. |
184
- | `$worker-roles` | Defines narrow role contracts for implementer, verifier, researcher, repair author, documenter, reviewer, and synthesizer. |
185
- | `$acceptance-matrix` | Converts goals into testable criteria with evidence requirements, adversarial checks, PASS/FAIL/BLOCKED states, and residual risk. |
186
- | `$loop-policy` | Controls autonomous vs human-in-loop execution, sequential/parallel mode, retry limits, approvals, budgets, escalation, no-progress detection, and continuation rules. |
187
- | `$workflow-docs` | Generates the smallest useful set of durable workflow-state and documentation-production artifacts. |
188
-
189
- ## Documentation Artifacts
190
-
191
- `$workflow-docs` supports two lanes.
192
-
193
- Markdown workflow artifacts are created under `<workspace>/.workflow/` by default. Use another directory only when the user names one, the project already has a clearer workflow-state convention, or the artifact is a final deliverable that belongs elsewhere.
194
-
195
- Workflow state:
196
-
197
- - `.workflow/WORKFLOW.md`
198
- - `.workflow/SOURCE-CORPUS.md`
199
- - `.workflow/WORK-UNITS.md`
200
- - `.workflow/DOSSIER.md`
201
- - `.workflow/THREAD-MAP.md`
202
- - `.workflow/ACCEPTANCE-MATRIX.md`
203
- - `.workflow/VERIFICATION-REPORT.md`
204
- - `.workflow/REPAIR-TICKETS.md`
205
- - `.workflow/DECISIONS.md`
206
- - `.workflow/HANDOFF.md`
207
- - `.workflow/OUTCOME.md`
208
- - `.workflow/GOAL-STATE.md`
209
-
210
- Documentation production:
211
-
212
- - `.workflow/DOCUMENTATION-BRIEF.md`
213
- - `.workflow/CONTENT-INVENTORY.md`
214
- - `.workflow/OUTLINE.md`
215
- - `.workflow/CONTENT-DRAFT.md`
216
- - `.workflow/CLAIMS-REGISTER.md`
217
- - `.workflow/STYLE-GUIDE.md`
218
- - `.workflow/GLOSSARY.md`
219
- - `.workflow/ASSET-REGISTER.md`
220
- - `.workflow/REVIEW-PLAN.md`
221
- - `.workflow/REVISION-QUEUE.md`
222
- - `.workflow/PUBLISHING-CHECKLIST.md`
223
- - `.workflow/PUBLICATION-LOG.md`
224
- - `.workflow/MAINTENANCE-PLAN.md`
225
-
226
- Markdown is the default, but the skills can also produce inline handoffs, ticket outlines, runbooks, spreadsheet-ready tables, design review notes, or other state that a human or agent can reuse.
227
-
228
- `$workflow-docs` is intentionally selective: it can scaffold, refresh, or preserve only the artifacts a workflow actually needs, including resume packs, verification reports, repair tickets, content briefs, claims registers, review plans, publishing checklists, and maintenance plans.
229
-
230
- ## CLI
420
+ ## CLI Reference
421
+
422
+ Common commands:
231
423
 
232
424
  ```bash
233
425
  workflow-supervisor list
234
426
  workflow-supervisor validate
235
- workflow-supervisor doctor --agent codex
236
- workflow-supervisor install --agent codex --dry-run
427
+ workflow-supervisor doctor --agent all
428
+ workflow-supervisor install --agent codex --scope user
429
+ workflow-supervisor install --agent claude-code --scope user
237
430
  workflow-supervisor install --agent all --scope project --project .
238
- workflow-supervisor install --agent generic --target ./agent-skills
239
- workflow-supervisor install --agent codex --skills workflow-supervisor,loop-policy
240
- workflow-supervisor uninstall --agent codex --scope user
241
- workflow-supervisor emit-context --agent opencode --skills workflow-supervisor,workflow-docs --out AGENTS.md
431
+ workflow-supervisor emit-context --agent generic --out AGENTS.md
432
+ workflow-supervisor validate-dossier .workflow/dossiers/WU-001-implementer.yaml --role implementer --unit WU-001 --json
433
+ workflow-supervisor delegate --agent codex --role implementer --unit WU-001 --cwd . --dossier .workflow/dossiers/WU-001-implementer.yaml
434
+ workflow-supervisor delegate --agent claude-code --role verifier --unit WU-001 --cwd . --dossier .workflow/dossiers/WU-001-verifier.yaml
435
+ workflow-supervisor delegate-doctor --agent all --probe --require-pass
436
+ ```
437
+
438
+ The package exposes two binary names:
439
+
440
+ ```text
441
+ workflow-supervisor
442
+ workflow-skills
242
443
  ```
243
444
 
244
- See [docs/cli.md](docs/cli.md) for the full command reference.
445
+ `workflow-skills` is kept as an alias. Prefer `workflow-supervisor` in user-facing instructions.
245
446
 
246
- ## Validation
447
+ ## Codex, Claude Code, And Generic Targets
247
448
 
248
- Run the built-in validator before installing from a local checkout:
449
+ Codex support uses:
450
+
451
+ - `SKILL.md`
452
+ - `agents/openai.yaml`
453
+ - the `codex` CLI adapter for delegated workers
454
+
455
+ Claude Code support uses:
456
+
457
+ - the same `SKILL.md` folders
458
+ - the `claude` CLI adapter for delegated workers
459
+ - optional emitted context through `CLAUDE.md`
460
+
461
+ The presence of `agents/openai.yaml` does not mean Claude Code is unsupported. It only means Codex has a specific metadata format.
462
+
463
+ Generic support is for custom Markdown-reading agent setups:
249
464
 
250
465
  ```bash
251
- npm run validate
252
- node ./bin/workflow-skills.mjs install --agent generic --target ./agent-skills --dry-run
466
+ npx workflow-supervisor emit-context --agent generic --skills workflow-supervisor,workflow-docs --out AGENTS.md
253
467
  ```
254
468
 
255
- ## Repository Layout
469
+ Generic is not a certified worker delegation target.
470
+
471
+ ## Package Layout
472
+
473
+ ```text
474
+ skills/ Skill instructions
475
+ skills/*/agents/ Agent metadata, including Codex openai.yaml files
476
+ schemas/ DossierV1 and WorkerReportV1 schemas
477
+ adapters/ Codex and Claude Code delegate command arrays
478
+ docs/ CLI, artifact, compatibility, and troubleshooting docs
479
+ assets/ README image assets
480
+ bin/workflow-skills.mjs Installer, validator, delegation wrapper, and command dispatch
481
+ ```
482
+
483
+ The npm package includes:
256
484
 
257
485
  ```text
258
- skills/ production skill folders
259
- adapters/ agent adapter metadata
260
- bin/ workflow-supervisor CLI
261
- docs/ user documentation
486
+ skills
487
+ adapters
488
+ schemas
489
+ docs
490
+ assets
491
+ bin
492
+ README.md
493
+ LICENSE
262
494
  ```
263
495
 
264
- ## Status
496
+ ## Publishing Checklist
497
+
498
+ Before publishing:
499
+
500
+ ```bash
501
+ npm run validate
502
+ npm pack --dry-run
503
+ ```
504
+
505
+ `npm run validate` checks skill structure, adapter metadata, schema artifacts, and the test suite.
506
+
507
+ `npm pack --dry-run` shows exactly what will be included in the npm package.
508
+
509
+ The package also has:
510
+
511
+ - `prepublishOnly`: runs `npm run validate`
512
+ - `engines.node`: `>=18`
513
+ - `license`: `MIT`
514
+ - `bin.workflow-supervisor`: `bin/workflow-skills`
515
+ - `bin.workflow-skills`: `bin/workflow-skills`
516
+
517
+ ## Rules For Agents Reading This README
518
+
519
+ If you are an agent using this package:
520
+
521
+ 1. Do not start work before complete intake.
522
+ 2. Do not infer missing permissions from words like "autonomous", "generate", or "work until done".
523
+ 3. If `$workflow-supervisor` is explicit, always create at least one work unit.
524
+ 4. Do not delegate without a valid `DossierV1`.
525
+ 5. Use separate worker agents when supported by the environment.
526
+ 6. Do not silently collapse worker agents into same-session roleplay.
527
+ 7. Treat same-session verification as `self-check`, not `independent-verifier`.
528
+ 8. Trust only structured `WorkerReportV1` results from delegated workers.
529
+ 9. Treat verifier edits as invalid.
530
+ 10. Keep `.workflow/` ignored and local unless the user explicitly asks to publish it.
265
531
 
266
- The package is ready for local installation and explicit skill invocation. Keep implicit invocation disabled unless your environment has proven routing precision for these skills.
532
+ The promise is not magic autonomy. The promise is disciplined supervision: clear setup, bounded work, scoped workers, structured reports, evidence, repair, and a clean final handoff.