workflow-supervisor 0.1.0

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.
Files changed (35) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +266 -0
  3. package/adapters/claude-code/adapter.json +7 -0
  4. package/adapters/codex/adapter.json +8 -0
  5. package/adapters/hermesagent/adapter.json +8 -0
  6. package/adapters/opencode/adapter.json +8 -0
  7. package/assets/workflow-supervisor-hero.png +0 -0
  8. package/bin/workflow-skills +2 -0
  9. package/bin/workflow-skills.mjs +452 -0
  10. package/docs/artifacts.md +40 -0
  11. package/docs/cli.md +119 -0
  12. package/docs/compatibility.md +85 -0
  13. package/docs/skill-reference.md +33 -0
  14. package/docs/troubleshooting.md +38 -0
  15. package/package.json +45 -0
  16. package/skills/acceptance-matrix/SKILL.md +77 -0
  17. package/skills/acceptance-matrix/agents/openai.yaml +7 -0
  18. package/skills/dossier-builder/SKILL.md +93 -0
  19. package/skills/dossier-builder/agents/openai.yaml +7 -0
  20. package/skills/loop-policy/SKILL.md +103 -0
  21. package/skills/loop-policy/agents/openai.yaml +7 -0
  22. package/skills/source-corpus/SKILL.md +92 -0
  23. package/skills/source-corpus/agents/openai.yaml +7 -0
  24. package/skills/work-unit/SKILL.md +72 -0
  25. package/skills/work-unit/agents/openai.yaml +7 -0
  26. package/skills/worker-roles/SKILL.md +115 -0
  27. package/skills/worker-roles/agents/openai.yaml +7 -0
  28. package/skills/workflow-docs/SKILL.md +88 -0
  29. package/skills/workflow-docs/agents/openai.yaml +7 -0
  30. package/skills/workflow-docs/references/documentation-production.md +230 -0
  31. package/skills/workflow-docs/references/goal-resume.md +62 -0
  32. package/skills/workflow-docs/references/templates.md +53 -0
  33. package/skills/workflow-docs/references/workflow-control.md +276 -0
  34. package/skills/workflow-supervisor/SKILL.md +254 -0
  35. package/skills/workflow-supervisor/agents/openai.yaml +7 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nikola Cehic
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,266 @@
1
+ # Workflow Supervisor
2
+
3
+ Portable workflow skills for supervising messy agent work.
4
+
5
+ ![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
+
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.
8
+
9
+ Use it when an agent needs to:
10
+
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
20
+
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.
22
+
23
+ ## The Idea
24
+
25
+ The pack treats open-ended work as a supervised loop:
26
+
27
+ ```text
28
+ sources -> work units -> execution path -> named threads -> verification -> repair -> disposition
29
+ ```
30
+
31
+ `$workflow-supervisor` is the spine. The other skills are phase tools the supervisor can call when the workflow needs more structure.
32
+
33
+ ```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
47
+ ```
48
+
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
52
+
53
+ The supervisor enforces complete intake before it chooses a path or starts work:
54
+
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`.
57
+
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.
59
+
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.
61
+
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.
63
+
64
+ ## Skills, Threads, And Subagents
65
+
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.
67
+
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.
69
+
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.
71
+
72
+ ## Quick Example
73
+
74
+ Ask the agent to use the supervisor for work that needs a real loop:
75
+
76
+ ```text
77
+ Use $workflow-supervisor.
78
+
79
+ Migrate this repo's docs to the new API shape.
80
+ ```
81
+
82
+ The supervisor should ask the complete intake before work starts:
83
+
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?
93
+ ```
94
+
95
+ If the reply skips any item, the supervisor asks for the missing item(s) and stops again.
96
+
97
+ For a narrower phase, invoke the specific skill:
98
+
99
+ ```text
100
+ Use $source-corpus to identify the sources of truth for this migration and flag contradictions.
101
+ ```
102
+
103
+ ```text
104
+ Use $acceptance-matrix to turn this launch checklist into PASS, FAIL, and BLOCKED criteria with evidence requirements.
105
+ ```
106
+
107
+ ```text
108
+ Use $workflow-docs to create a reusable HANDOFF.md and OUTCOME.md for the next agent.
109
+ ```
110
+
111
+ ## Install
112
+
113
+ From a local checkout:
114
+
115
+ ```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
120
+ ```
121
+
122
+ After npm publication, the same installer can be run through `npx`:
123
+
124
+ ```bash
125
+ npx workflow-supervisor install --agent codex --scope user
126
+ ```
127
+
128
+ Install into a project-local skill directory for all supported agents:
129
+
130
+ ```bash
131
+ node ./bin/workflow-skills.mjs install --agent all --scope project --project /path/to/project
132
+ ```
133
+
134
+ Install into any custom directory:
135
+
136
+ ```bash
137
+ node ./bin/workflow-skills.mjs install --agent generic --target ./agent-skills
138
+ ```
139
+
140
+ Install only selected skills:
141
+
142
+ ```bash
143
+ node ./bin/workflow-skills.mjs install --agent codex --skills workflow-supervisor,loop-policy,workflow-docs
144
+ ```
145
+
146
+ Remove an install:
147
+
148
+ ```bash
149
+ node ./bin/workflow-skills.mjs uninstall --agent codex --scope user
150
+ ```
151
+
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:
153
+
154
+ ```bash
155
+ npx workflow-supervisor emit-context --agent opencode --skills workflow-supervisor,workflow-docs --out AGENTS.md
156
+ ```
157
+
158
+ Each install writes:
159
+
160
+ - the selected skill folders
161
+ - `WORKFLOW_SKILL_PACK.md`
162
+ - `.workflow-skills-install.json` with installed skills and checksums
163
+
164
+ ## Supported Agents
165
+
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` |
173
+
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.
175
+
176
+ ## Included Skills
177
+
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
231
+
232
+ ```bash
233
+ workflow-supervisor list
234
+ workflow-supervisor validate
235
+ workflow-supervisor doctor --agent codex
236
+ workflow-supervisor install --agent codex --dry-run
237
+ 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
242
+ ```
243
+
244
+ See [docs/cli.md](docs/cli.md) for the full command reference.
245
+
246
+ ## Validation
247
+
248
+ Run the built-in validator before installing from a local checkout:
249
+
250
+ ```bash
251
+ npm run validate
252
+ node ./bin/workflow-skills.mjs install --agent generic --target ./agent-skills --dry-run
253
+ ```
254
+
255
+ ## Repository Layout
256
+
257
+ ```text
258
+ skills/ production skill folders
259
+ adapters/ agent adapter metadata
260
+ bin/ workflow-supervisor CLI
261
+ docs/ user documentation
262
+ ```
263
+
264
+ ## Status
265
+
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.
@@ -0,0 +1,7 @@
1
+ {
2
+ "agent": "claude-code",
3
+ "status": "portable",
4
+ "defaultTarget": "${CLAUDE_HOME:-~/.claude}/skills",
5
+ "metadata": "SKILL.md",
6
+ "fallback": "workflow-supervisor emit-context --agent claude-code --out CLAUDE.md"
7
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "agent": "codex",
3
+ "status": "native",
4
+ "defaultTarget": "~/.agents/skills",
5
+ "projectTarget": "<project>/.agents/skills",
6
+ "metadata": "agents/openai.yaml",
7
+ "invocation": "Use $workflow-supervisor ..."
8
+ }
@@ -0,0 +1,8 @@
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
+ }
@@ -0,0 +1,8 @@
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
+ }
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import "./workflow-skills.mjs";