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
@@ -0,0 +1,33 @@
1
+ # Skill Reference
2
+
3
+ ## `workflow-supervisor`
4
+
5
+ Coordinate explicit supervised or agent-loop workflows. It always starts with a complete intake gate before planning, implementation, goal binding, worker creation, or final disposition. The user must answer every intake item; the supervisor must not infer or skip steps from keywords. After complete intake, it selects either autonomous goal execution or human-in-the-loop execution, then orchestrates named worker threads or subagents from dossiers when the environment supports and authorizes delegation. Loading the skill itself does not spawn workers. It binds Codex goals only after complete intake and when the user or environment authorizes goal-oriented work, checks active goal state first, and avoids unrelated active-goal collisions.
6
+
7
+ ## `source-corpus`
8
+
9
+ Rank and reconcile sources when authority, freshness, contradictions, access rights, or evidence gaps change the safe next action. It supports `allowed_next_action`: discovery, provisional draft, production change, or blocked.
10
+
11
+ ## `work-unit`
12
+
13
+ Split broad work into bounded units with objective, scope, dependencies, readiness, done criteria, verification, sequencing, and parallel-safety notes.
14
+
15
+ ## `dossier-builder`
16
+
17
+ Create a handoff contract for one already-bounded work unit. Use it for another agent, thread, future session, or formal worker prompt, not ordinary same-thread direct work. Dossiers can include deterministic thread names, start conditions, handoff messages, checkpoints, and report schemas.
18
+
19
+ ## `worker-roles`
20
+
21
+ Define role contracts and solo-mode phase separation. It prevents role bleed: verifiers editing implementation, implementers self-approving, repair authors inventing scope, and documenters turning unresolved questions into facts.
22
+
23
+ ## `acceptance-matrix`
24
+
25
+ Create formal evidence-mapped acceptance rows for high-risk, supervised, ambiguous, resumable, or handoff workflows.
26
+
27
+ ## `loop-policy`
28
+
29
+ Define execution path, execution mode, thread or subagent orchestration, approval gates, repair limits, parallel safety, no-progress rules, and Codex goal tool policy.
30
+
31
+ ## `workflow-docs`
32
+
33
+ Create durable workflow-state or documentation-production artifacts. Markdown artifacts default to `<workspace>/.workflow/` unless the user or project convention says otherwise. It also supports inline briefs, tickets, design annotations, runbooks, decision logs, and other usable state media.
@@ -0,0 +1,38 @@
1
+ # Troubleshooting
2
+
3
+ ## The skills trigger too often
4
+
5
+ Keep `policy.allow_implicit_invocation: false`. Use explicit `$skill-name` invocation until live routing tests prove trigger precision.
6
+
7
+ ## The agent cannot find the skills
8
+
9
+ Run:
10
+
11
+ ```bash
12
+ workflow-skills doctor --agent codex
13
+ workflow-skills install --agent generic --target ./agent-skills --dry-run
14
+ ```
15
+
16
+ Then verify the target directory contains folders such as `workflow-supervisor/SKILL.md`.
17
+
18
+ ## Goal tools are unavailable
19
+
20
+ Use `.workflow/GOAL-STATE.md` or a workflow handoff document. The supervisor skill explicitly falls back to workflow docs when goal tools are unavailable or not permitted.
21
+
22
+ ## Too many docs are created
23
+
24
+ Use `$workflow-docs` with a minimal artifact request. The skill must reject "create every document just in case."
25
+
26
+ ## Verification rubber-stamps the result
27
+
28
+ Use `$acceptance-matrix` for formal evidence rows. A PASS requires row-by-row evidence or explicit waiver evidence.
29
+
30
+ ## An existing skill folder blocks install
31
+
32
+ Use:
33
+
34
+ ```bash
35
+ workflow-skills install --agent codex --force
36
+ ```
37
+
38
+ Use `--dry-run` first if you want to inspect the target.
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "workflow-supervisor",
3
+ "version": "0.1.0",
4
+ "description": "Installable workflow supervision skills for Codex, Claude Code, OpenCode, HermesAgent, and generic agent workspaces.",
5
+ "type": "module",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/NikolaCehic/workflow-supervisor.git"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/NikolaCehic/workflow-supervisor/issues"
12
+ },
13
+ "homepage": "https://github.com/NikolaCehic/workflow-supervisor#readme",
14
+ "bin": {
15
+ "workflow-supervisor": "bin/workflow-skills",
16
+ "workflow-skills": "bin/workflow-skills"
17
+ },
18
+ "files": [
19
+ "skills",
20
+ "adapters",
21
+ "docs",
22
+ "assets",
23
+ "bin",
24
+ "README.md",
25
+ "LICENSE"
26
+ ],
27
+ "scripts": {
28
+ "test": "node --test tests/*.test.mjs",
29
+ "validate": "node ./bin/workflow-skills.mjs validate && npm test",
30
+ "prepublishOnly": "npm run validate"
31
+ },
32
+ "keywords": [
33
+ "codex",
34
+ "claude-code",
35
+ "opencode",
36
+ "hermesagent",
37
+ "skills",
38
+ "workflow",
39
+ "agent"
40
+ ],
41
+ "license": "MIT",
42
+ "engines": {
43
+ "node": ">=18"
44
+ }
45
+ }
@@ -0,0 +1,77 @@
1
+ ---
2
+ name: acceptance-matrix
3
+ description: Convert requirements into formal, evidence-mapped acceptance criteria only for supervised, high-risk, ambiguous, resumable, or handoff workflows. Use when verification must map each requirement to evidence, adversarial cases, PASS/FAIL/BLOCKED states, review states, and residual risk. Do not use for ordinary code review, small scoped edits, routine test runs, trivial explicit acceptance, or declaring completion unless the user asks for an acceptance matrix or evidence-mapped verification.
4
+ ---
5
+
6
+ # Acceptance Matrix
7
+
8
+ Use this skill to define what counts as done and what evidence proves it.
9
+
10
+ ## Ownership Boundary
11
+
12
+ This skill owns evidence rows and supervisor verdict mapping. `$work-unit` may draft coarse done criteria, `$dossier-builder` may embed or reference rows, and `$workflow-docs` may preserve the matrix. Those skills should not reinterpret evidence or silently change verdicts.
13
+
14
+ ## Matrix Rules
15
+
16
+ - Every requirement needs evidence.
17
+ - Evidence must name a source, command, artifact, UI state, test, inspection, or user decision.
18
+ - PASS requires all material rows to be satisfied or explicitly waived by the user.
19
+ - FAIL requires at least one material row with unmet evidence.
20
+ - BLOCKED applies when evidence cannot be obtained or sources conflict.
21
+ - Residual risks must not be hidden inside PASS.
22
+
23
+ ## Row Shape
24
+
25
+ | ID | Requirement | Evidence Required | Verification Method | Adversarial Check | Status | Evidence |
26
+ |---|---|---|---|---|---|---|
27
+
28
+ Use statuses: Pending, PASS, FAIL, BLOCKED, Waived.
29
+
30
+ For documentation and review workflows, also record a domain-specific review state when useful: Needs Revision, Approved With Caveats, Ready To Publish, SME Review Needed, Legal Review Needed, Stale, or Deferred. Map it back to PASS/FAIL/BLOCKED for supervisor decisions.
31
+
32
+ ## Adversarial Checks
33
+
34
+ Consider:
35
+
36
+ - malformed or missing input
37
+ - stale source or version mismatch
38
+ - unauthorized capability
39
+ - schema or contract drift
40
+ - unsupported kind or mode
41
+ - no-op implementation
42
+ - hardcoded fixture output
43
+ - hidden network or filesystem dependency
44
+ - ambiguous user approval
45
+ - skipped required check
46
+ - missing citation or unsupported claim
47
+ - document structure regression
48
+ - stakeholder requirement omitted
49
+ - artifact cannot be reused by a fresh agent or human
50
+
51
+ ## Verification Report Shape
52
+
53
+ ```yaml
54
+ status: PASS|FAIL|BLOCKED
55
+ verified_work_unit:
56
+ verified_thread:
57
+ matrix:
58
+ - id:
59
+ requirement:
60
+ status:
61
+ evidence:
62
+ verification_method:
63
+ finding:
64
+ findings:
65
+ residual_risks:
66
+ skipped_checks:
67
+ repair_recommendations:
68
+ reverify_required: true|false
69
+ ```
70
+
71
+ Repair recommendations must link to the failed or blocked matrix row ID. Do not recommend repairs for requirements that were not in scope unless the verifier first records a separate scope gap.
72
+
73
+ After repairs, verification must rerun against the affected rows and any regression rows. The supervisor may mark the workflow green only when material rows are PASS or explicitly waived with evidence.
74
+
75
+ ## Rubber-Stamp Guard
76
+
77
+ Reject verification that says only "looks good", "tests pass", or "implemented" without row-by-row evidence. Ask for exact evidence or mark BLOCKED.
@@ -0,0 +1,7 @@
1
+ interface:
2
+ display_name: "Acceptance Matrix"
3
+ short_description: "Turn goals into verifiable criteria"
4
+ default_prompt: "Use $acceptance-matrix to define evidence-backed pass, fail, and blocked criteria."
5
+
6
+ policy:
7
+ allow_implicit_invocation: false
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: dossier-builder
3
+ description: Create a concrete handoff contract only when one already-bounded work unit needs a dossier for another agent, thread, future session, formal worker prompt, or durable handoff. Use when objective, sources, boundaries, acceptance rows, checks or evidence, stop gates, thread naming, start conditions, and report schemas must be captured before delegation. Do not use to plan work Codex will perform directly in the current turn, for unbounded work, or for ordinary same-thread implementation.
4
+ ---
5
+
6
+ # Dossier Builder
7
+
8
+ Use this skill to prevent vague handoffs. A dossier is the contract between the supervisor and a worker.
9
+
10
+ ## Domain Neutral Inputs
11
+
12
+ Use repository fields only when the task is repository-shaped. For documentation, research, design, operations, or planning work, translate "surface" into the relevant mutable artifact: document section, source set, decision area, dataset, prompt, workflow, design, or deliverable.
13
+
14
+ For documentation production, the dossier may be a content brief. It should name audience, reader task, document type, required sections, source requirements, tone, reviewers, publication target, and maintenance needs.
15
+
16
+ The dossier does not own acceptance design. It references or embeds acceptance rows produced by `$acceptance-matrix`, or marks acceptance as draft when rows still need evidence.
17
+
18
+ ## Required Inputs
19
+
20
+ - bounded work unit
21
+ - source corpus or source list
22
+ - known allowed and forbidden surfaces or artifacts
23
+ - acceptance criteria or acceptance draft
24
+ - required checks or evidence
25
+ - worker role and report expectations
26
+
27
+ If these inputs are missing, create a discovery dossier or return BLOCKED.
28
+
29
+ For early discovery, the only source may be conversation context and the only allowed surface may be a planned brief, doc, or question list. Do not require repository paths or existing files.
30
+
31
+ Use a provisional dossier for low-risk drafts, plans, outlines, rubrics, and options when sources are thin but the output can clearly mark assumptions. Use BLOCKED for factual, irreversible, regulated, publication, or production changes that lack material sources or boundaries.
32
+
33
+ ## Dossier Shape
34
+
35
+ ```yaml
36
+ workflow:
37
+ work_unit:
38
+ dossier_id:
39
+ thread_name:
40
+ thread_role:
41
+ start_condition:
42
+ title:
43
+ objective:
44
+ non_goals:
45
+ source_corpus:
46
+ must_read:
47
+ allowed_surfaces:
48
+ forbidden_surfaces:
49
+ read_only_neighbors:
50
+ work_points:
51
+ audience:
52
+ reader_task:
53
+ document_type:
54
+ publication_target:
55
+ reviewers:
56
+ acceptance_matrix:
57
+ adversarial_checks:
58
+ required_commands_or_evidence:
59
+ worker_role:
60
+ handoff_message:
61
+ supervisor_checkpoints:
62
+ completion_report_schema:
63
+ verification_report_schema:
64
+ stop_gates:
65
+ assumptions:
66
+ open_questions:
67
+ ```
68
+
69
+ ## Handoff Rules
70
+
71
+ - Name exact files, docs, systems, or artifact paths when available.
72
+ - Prefer concrete boundaries over broad module names.
73
+ - Include forbidden surfaces even when the worker seems trustworthy.
74
+ - Convert unknowns into open questions, not hidden assumptions.
75
+ - Include adversarial checks for malformed input, stale state, authorization, schema drift, replay, no-op implementation, and untrusted sources when relevant.
76
+ - Require workers to report skipped checks and assumptions.
77
+ - For non-code work, use evidence such as citations, before/after excerpts, review rubrics, examples, artifact diffs, or explicit user decisions instead of commands.
78
+ - Require repair tickets to cite the verification finding or acceptance row they repair.
79
+ - Include a deterministic `thread_name` when delegation is planned. Use `wf/<workflow-slug>/<unit-id>-<role>-<dossier-slug>`.
80
+ - Include `start_condition`, such as `after path gate`, `after human plan approval`, `after autonomous execution plan`, `after implementer report`, `after verification FAIL`, or `after repairs complete`.
81
+ - Include a ready-to-send `handoff_message` that contains only the worker's role, dossier, sources, acceptance rows, stop gates, and report schema.
82
+ - Include supervisor checkpoints for kickoff acknowledgement, blocker questions, terminal report, and closeout.
83
+
84
+ ## Failure Modes
85
+
86
+ Return BLOCKED rather than producing a dossier when:
87
+
88
+ - material sources are absent or contradictory for the proposed next action
89
+ - the work unit is unbounded and cannot be converted into discovery or provisional drafting
90
+ - allowed and forbidden surfaces cannot be named
91
+ - acceptance cannot be verified
92
+ - the worker role would need to make product decisions
93
+ - a waiver or approval is remembered but not evidenced by a user decision, artifact, or source
@@ -0,0 +1,7 @@
1
+ interface:
2
+ display_name: "Dossier Builder"
3
+ short_description: "Create concrete thread handoff contracts"
4
+ default_prompt: "Use $dossier-builder to create a grounded handoff dossier with thread name, start condition, and report schema for this work unit."
5
+
6
+ policy:
7
+ allow_implicit_invocation: false
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: loop-policy
3
+ description: Define execution policy only for supervised, multi-agent, multi-thread, long-running, resumable, autonomous-goal, human-in-loop, approval-gated, or repair-loop workflows. Use for execution path selection, sequential or parallel execution, thread orchestration, retry and repair limits, budgets, escalation, Codex goal binding, blocking rules, continuation criteria, and no-progress detection. Do not use for one failing command, normal retrying, routine user approval, or a one-shot task with obvious completion.
4
+ ---
5
+
6
+ # Loop Policy
7
+
8
+ Use this skill to decide how the workflow moves before the loop starts.
9
+
10
+ ## No-Prerequisite Rule
11
+
12
+ The policy must not require a repository, test suite, issue tracker, or documentation folder unless the task itself does. When prerequisites are missing, choose discovery-first mode or require a lightweight intake artifact before production work.
13
+
14
+ ## Goal Policy
15
+
16
+ For loop-oriented supervisor work, define how the workflow uses Codex goals after complete intake is satisfied:
17
+
18
+ - goal_start: create, reuse, skip, or ask
19
+ - execution_path: `autonomous_goal` or `human_in_loop`, from completed intake only
20
+ - codex_goal_tool_actions: `get_goal` at start/resume, `create_goal` at most once when explicitly allowed, `update_goal` only for terminal complete or blocked
21
+ - goal_state_mirror_cadence: each work unit, each verification result, each repair loop, and final outcome
22
+ - goal_completion_rule: evidence required before completion
23
+ - goal_blocked_rule: same material blocker across the required consecutive goal turns and no meaningful progress
24
+ - goal_resume_rule: read active goal before workflow docs, then reconcile
25
+
26
+ Do not create goals for small direct tasks. A goal is the state container for open-ended loops, not a wrapper around every command.
27
+
28
+ ## Policy Dimensions
29
+
30
+ - Intake: whether every required intake decision has an explicit user answer, and which unanswered items must be re-asked before any work can start.
31
+ - Execution path: autonomous_goal or human_in_loop, from completed intake only.
32
+ - Mode: sequential, parallel, staged parallel, or discovery-first, from completed intake only.
33
+ - Approval: none, before thread creation, before implementation, before verification, before repair, before publication, before irreversible action, before each unit, or path-gated.
34
+ - Delegation orchestration: thread or subagent availability, naming scheme, spawn timing, supervisor checkpoint cadence, terminal report collection, and fallback when delegation tools are unavailable.
35
+ - Repair limit: maximum repair loops per unit.
36
+ - Budget: time, token, command, cost, or file-change limits.
37
+ - Escalation: when to ask the user, spawn a specialist, or stop.
38
+ - Completion: evidence required before marking done.
39
+ - Resume: artifacts needed before pausing or compacting.
40
+ - Mutation conflict: whether units touch the same mutable surfaces or decisions.
41
+
42
+ ## Default Policy
43
+
44
+ Use this default unless the task says otherwise:
45
+
46
+ ```yaml
47
+ intake_required_when: every supervisor invocation before goal creation, planning beyond intake, thread or subagent creation, implementation, verification, repair, final disposition, publication, or irreversible action
48
+ intake_question_count: ask the complete intake packet first; on follow-up ask every unanswered or ambiguous item
49
+ required_intake_decisions: objective_and_source, execution_path, mode, delegation, final_disposition, mutation_boundaries, state_artifacts
50
+ use_judgment_defaults: none; user must answer every required intake decision explicitly
51
+ keyword_shortcuts: forbidden; do not infer path, mode, delegation, final disposition, or boundaries from prompt keywords
52
+ mode: from completed intake only
53
+ execution_path: from completed intake only
54
+ approval_gate: path-gated; complete intake before any path-specific plan; human approval for human_in_loop plans; explicit completed-intake authorization for autonomous_goal; explicit completed-intake authorization for irreversible or user-visible publication
55
+ repair_limit_per_unit: 2
56
+ parallel_allowed_when: units do not share mutable surfaces
57
+ thread_spawn_rule: after complete intake, path gate, and concrete dossier
58
+ subagent_spawn_rule: after complete intake, path gate, and concrete dossier when the environment exposes subagent tools
59
+ thread_name_template: wf/<workflow-slug>/<unit-id>-<role>-<dossier-slug>
60
+ supervisor_checkpoint_cadence: after handoff acknowledgement, terminal report, repair ticket creation, re-verification, and final disposition
61
+ final_disposition_policy: from completed intake only; if set to ask_at_end, stop and ask at final disposition
62
+ workflow_unit_blocked_after: first material blocker may stop the unit while the Codex goal remains active
63
+ codex_goal_blocked_after: same material blocker across 3 consecutive goal turns and no meaningful progress
64
+ completion_requires: acceptance evidence plus residual risk report
65
+ resume_requires: handoff or outcome doc for long workflows
66
+ missing_prerequisites: discovery-first, not failure
67
+ goal_start: after complete intake only; create only when completed intake and environment authorize goal binding, otherwise mirror state in docs
68
+ goal_state_mirror_cadence: after unit terminal states and final outcome
69
+ ```
70
+
71
+ ## No-Progress Detection
72
+
73
+ Treat the loop as no-progress when:
74
+
75
+ - the same missing input recurs
76
+ - repairs do not address verifier findings
77
+ - verification repeats without new evidence
78
+ - scope keeps expanding to avoid completion
79
+ - checks cannot run and no substitute evidence exists
80
+
81
+ ## Parallel Safety
82
+
83
+ Do not run units in parallel when they edit the same files, documents, datasets, decisions, workflows, design surfaces, or publication artifacts. If overlap is unclear, run sequentially or create a discovery unit to map ownership first.
84
+
85
+ ## Output Shape
86
+
87
+ ```yaml
88
+ workflow:
89
+ intake:
90
+ execution_path:
91
+ mode:
92
+ approval_gates:
93
+ delegation_policy:
94
+ repair_limit:
95
+ parallel_rules:
96
+ budgets:
97
+ escalation_rules:
98
+ stop_gates:
99
+ completion_rule:
100
+ resume_artifacts:
101
+ goal_policy:
102
+ final_disposition_policy:
103
+ ```
@@ -0,0 +1,7 @@
1
+ interface:
2
+ display_name: "Loop Policy"
3
+ short_description: "Control path, threads, retries, and gates"
4
+ default_prompt: "Use $loop-policy to enforce complete intake before work starts, forbid keyword shortcuts, require explicit user answers for every intake field, then define execution path, delegation, retry, approval, and stopping rules."
5
+
6
+ policy:
7
+ allow_implicit_invocation: false
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: source-corpus
3
+ description: Identify, rank, and reconcile sources of truth only when choosing, ranking, or reconciling authoritative sources is material to whether work can proceed. Use when source authority, freshness, contradictions, access rights, citation requirements, or evidence gaps change the safe next action. Do not use for routine citation gathering, straightforward file inspection, simple web lookup, ordinary repo inspection for a scoped change, self-contained answers, or obvious uncontested source grounding.
4
+ ---
5
+
6
+ # Source Corpus
7
+
8
+ Use this skill to turn scattered context into a source map that a workflow can trust.
9
+
10
+ ## No-Prerequisite Mode
11
+
12
+ Do not assume a repository, wiki, ticket tracker, or documentation folder exists. If the only available source is the user's prompt, classify it as conversation context and mark missing sources explicitly.
13
+
14
+ Use `allowed_next_action` instead of treating missing sources as a universal block:
15
+
16
+ - `discovery_only`: enough to ask questions or gather sources
17
+ - `provisional_draft`: enough for a low-risk draft, outline, rubric, plan, or options list with assumptions marked
18
+ - `production_change`: enough for a material edit, implementation, publication, or decision
19
+ - `blocked`: not enough because the next action would make factual, irreversible, regulated, or high-risk claims
20
+
21
+ Block only when the missing source is material to the proposed next action.
22
+
23
+ ## Source Classes
24
+
25
+ - Primary executable: code, tests, schemas, configs, fixtures, generated lockfiles.
26
+ - Primary written: product specs, RFCs, architecture docs, contracts, tickets with owner decisions.
27
+ - Operational evidence: logs, CI output, metrics, customer reports, previous run artifacts.
28
+ - Conversation context: user instructions, chat summaries, design decisions.
29
+ - Created artifacts: drafts, outlines, diagrams, slide decks, spreadsheets, screenshots, prototypes, decision records.
30
+ - External references: web docs, standards, vendor docs. Verify freshness when unstable.
31
+ - Inference: model reasoning from sources. Mark clearly as inference, not evidence.
32
+
33
+ For documentation work, also capture source owner, access constraints, usage rights, citation requirement, confidentiality, last reviewed date, coverage, and review risk when known.
34
+
35
+ ## Ranking Rules
36
+
37
+ Rank each source by:
38
+
39
+ - authority: who or what owns the truth
40
+ - proximity: how close it is to the behavior or decision
41
+ - freshness: whether it may have changed
42
+ - specificity: whether it directly addresses the task
43
+ - executability: whether it can be tested or inspected
44
+ - conflict risk: whether another source disagrees
45
+
46
+ Prefer executable repo reality over stale prose for current behavior. Prefer explicit user constraints over inferred product intent.
47
+ For documentation, research, design, and planning workflows, prefer the artifact under revision and explicit stakeholder instructions over generic best practices.
48
+
49
+ ## Process
50
+
51
+ 1. List candidate sources and how they were found.
52
+ 2. Classify each source.
53
+ 3. Read the minimum authoritative set before recommending action.
54
+ 4. Identify missing sources and whether they block progress.
55
+ 5. Detect contradictions and label them material or non-material.
56
+ 6. Extract only task-relevant claims.
57
+ 7. Produce a source corpus map with evidence gaps.
58
+
59
+ ## Output Shape
60
+
61
+ ```yaml
62
+ objective:
63
+ sources:
64
+ - path_or_ref:
65
+ class:
66
+ authority:
67
+ freshness:
68
+ relevant_claims:
69
+ owner:
70
+ access:
71
+ usage_rights:
72
+ citation_needed:
73
+ last_reviewed:
74
+ coverage:
75
+ risk:
76
+ confidence:
77
+ missing_sources:
78
+ contradictions:
79
+ - source_a:
80
+ source_b:
81
+ issue:
82
+ material: true|false
83
+ evidence_gaps:
84
+ must_read_before_action:
85
+ safe_to_proceed: true|false
86
+ allowed_next_action: discovery_only|provisional_draft|production_change|blocked
87
+ blocking_question:
88
+ ```
89
+
90
+ ## Stop Gates
91
+
92
+ Stop when the task depends on a source that is missing, inaccessible, contradicted by a higher-authority source, or likely stale and unstable. Continue only if the missing source is non-material and the output states the assumption.
@@ -0,0 +1,7 @@
1
+ interface:
2
+ display_name: "Source Corpus"
3
+ short_description: "Rank and reconcile sources of truth"
4
+ default_prompt: "Use $source-corpus to map and reconcile the sources of truth for this task."
5
+
6
+ policy:
7
+ allow_implicit_invocation: false
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: work-unit
3
+ description: Decompose fuzzy or broad objectives into bounded, sequenced, verifiable work units. Use when a task is too large, ambiguous, multi-phase, dependency-heavy, or risky to execute as one edit; when a supervisor needs packets, milestones, slices, tickets, or agent handoffs; or when scope must be narrowed before implementation. Do not use for already-small tasks with clear files and acceptance.
4
+ ---
5
+
6
+ # Work Unit
7
+
8
+ Use this skill to make work small enough that another agent can complete and verify it without guessing.
9
+
10
+ ## Boundary Types
11
+
12
+ Work units can be bounded by code package, document section, source set, stakeholder decision, research question, design screen, workflow step, data slice, risk class, or output artifact. Do not force repository terminology onto non-code work.
13
+
14
+ ## Unit Quality Bar
15
+
16
+ A good work unit has:
17
+
18
+ - one objective
19
+ - a stable unit ID suitable for dossier and thread naming
20
+ - named dependencies
21
+ - explicit in-scope and out-of-scope surfaces
22
+ - known sources or source gaps
23
+ - readiness criteria
24
+ - done criteria
25
+ - verification strategy
26
+ - estimated sequencing position
27
+ - a stop condition
28
+
29
+ Reject units that are just themes, vague phases, or lists of unrelated work.
30
+
31
+ Work-unit drafts coarse done criteria only. Use `$acceptance-matrix` when those criteria need evidence rows, PASS/FAIL/BLOCKED mapping, or adversarial verification.
32
+
33
+ ## Decomposition Process
34
+
35
+ 1. Restate the parent objective.
36
+ 2. Identify natural boundaries: user workflow, package, document, API contract, risk class, or dependency layer.
37
+ 3. Split into units that can be verified independently.
38
+ 4. Mark dependencies and ordering constraints.
39
+ 5. Mark which units can run in parallel only when they do not mutate the same surfaces.
40
+ 6. Define readiness and done criteria for each unit.
41
+ 7. If sources are absent, create a discovery/intake unit before production work.
42
+ 8. Identify the first unit that is safe to dossier.
43
+
44
+ For over-broad one-pass requests, produce a sequencing recommendation and invoke or mirror `$loop-policy` fields for mode, parallel safety, approval gates, and repair limits.
45
+
46
+ ## Output Shape
47
+
48
+ ```yaml
49
+ parent_objective:
50
+ units:
51
+ - id:
52
+ thread_slug:
53
+ title:
54
+ objective:
55
+ in_scope:
56
+ out_of_scope:
57
+ dependencies:
58
+ sources_needed:
59
+ allowed_surfaces:
60
+ forbidden_surfaces:
61
+ readiness:
62
+ done_criteria:
63
+ verification:
64
+ sequence:
65
+ parallel_groups:
66
+ blocked_units:
67
+ first_recommended_unit:
68
+ ```
69
+
70
+ ## Stop Gates
71
+
72
+ Stop when a unit cannot name a done criterion, required source, or boundary. Ask for a decision or return a smaller discovery unit.
@@ -0,0 +1,7 @@
1
+ interface:
2
+ display_name: "Work Unit"
3
+ short_description: "Decompose fuzzy goals into bounded units"
4
+ default_prompt: "Use $work-unit to split this goal into bounded, verifiable work units."
5
+
6
+ policy:
7
+ allow_implicit_invocation: false