llm-orchestrator 1.0.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 (70) hide show
  1. package/.claude-plugin/marketplace.json +14 -0
  2. package/.claude-plugin/plugin.json +19 -0
  3. package/COMPATIBILITY.md +27 -0
  4. package/IMPLEMENTATION.md +26 -0
  5. package/LICENSE +31 -0
  6. package/NOTICE +17 -0
  7. package/README.md +291 -0
  8. package/SKILL.md +125 -0
  9. package/adapters/agents.mjs +46 -0
  10. package/adapters/claude/index.mjs +9 -0
  11. package/adapters/codex/index.mjs +15 -0
  12. package/adapters/commands.mjs +117 -0
  13. package/adapters/kilo/index.mjs +5 -0
  14. package/adapters/opencode/index.mjs +5 -0
  15. package/bin/attribution-check.mjs +136 -0
  16. package/bin/cli-options.mjs +90 -0
  17. package/bin/discover-models.mjs +271 -0
  18. package/bin/doctor.mjs +191 -0
  19. package/bin/install.mjs +48 -0
  20. package/bin/llm-orchestrator.mjs +103 -0
  21. package/bin/model-thinking-report.mjs +165 -0
  22. package/bin/render.mjs +22 -0
  23. package/bin/route.mjs +139 -0
  24. package/bin/uninstall.mjs +15 -0
  25. package/lib/adapter-renderer.mjs +114 -0
  26. package/lib/capability-resolver.mjs +343 -0
  27. package/lib/dispatch-contract.mjs +583 -0
  28. package/lib/first-run.mjs +299 -0
  29. package/lib/harness.mjs +6 -0
  30. package/lib/installation.mjs +550 -0
  31. package/lib/project-discovery.mjs +434 -0
  32. package/lib/router.mjs +660 -0
  33. package/lib/tool-discovery.mjs +162 -0
  34. package/models/example-model-inventory.json +82 -0
  35. package/models/model-thinking-data.json +580 -0
  36. package/models/model-thinking-matrix.md +157 -0
  37. package/models/top-models.json +1299 -0
  38. package/package.json +65 -0
  39. package/policies/capabilities.md +144 -0
  40. package/policies/cleanup.md +51 -0
  41. package/policies/dispatch.md +284 -0
  42. package/policies/execution.md +116 -0
  43. package/policies/questions.md +75 -0
  44. package/policies/routing.md +677 -0
  45. package/policies/state.md +85 -0
  46. package/policies/verification.md +72 -0
  47. package/protocol.md +162 -0
  48. package/registries/agent-roles.json +1 -0
  49. package/registries/capabilities.json +58 -0
  50. package/registries/core-profile.json +183 -0
  51. package/registries/preferred-tools.json +595 -0
  52. package/registries/routing-matrix.json +394 -0
  53. package/registries/task-mappings.json +259 -0
  54. package/schemas/agent-roles.schema.json +1 -0
  55. package/schemas/capability-contract.schema.json +209 -0
  56. package/schemas/installation-manifest.schema.json +57 -0
  57. package/schemas/project-profile.schema.json +70 -0
  58. package/schemas/routing-matrix.schema.json +237 -0
  59. package/schemas/tool-inventory.schema.json +127 -0
  60. package/schemas/top-models.schema.json +235 -0
  61. package/skills/orchestrate-core/SKILL.md +18 -0
  62. package/workflows/bug-fix.md +59 -0
  63. package/workflows/config.md +57 -0
  64. package/workflows/deploy.md +57 -0
  65. package/workflows/feature.md +61 -0
  66. package/workflows/incident.md +61 -0
  67. package/workflows/investigation.md +62 -0
  68. package/workflows/refactor.md +53 -0
  69. package/workflows/research.md +61 -0
  70. package/workflows/review.md +58 -0
@@ -0,0 +1,259 @@
1
+ {
2
+ "_attribution": "llm-orchestrator · created by Bogdan-Gabriel Torcescu · https://www.linkedin.com/in/bogdantorcescu/ · keep this credit when copying or deriving",
3
+ "version": 2,
4
+ "obligation_levels": {
5
+ "mandatory": "Skipping it makes the work invalid, not merely worse. It is a gate. If it cannot run, stop and say so; do not proceed and mention it afterwards.",
6
+ "optional": "Use when the stated trigger holds. Judgment call, but the trigger is not.",
7
+ "available": "Exists, costs nothing to ignore, reach for it when it fits."
8
+ },
9
+ "task_type_vocabulary_note": "protocol.md, registries/routing-matrix.json and bin/route.mjs speak the UPPER_SNAKE task type; this registry and lib/capability-resolver.mjs speak the lowercase id. task_types is the single map between them, and it also names the workflow file for each type. Never add a task type in one place only.",
10
+ "task_types": [
11
+ { "type": "INCIDENT", "id": "incident", "workflow": "workflows/incident.md" },
12
+ { "type": "FEATURE", "id": "feature", "workflow": "workflows/feature.md" },
13
+ { "type": "BUG_FIX", "id": "bug", "workflow": "workflows/bug-fix.md" },
14
+ { "type": "REFACTOR", "id": "refactor", "workflow": "workflows/refactor.md" },
15
+ { "type": "INVESTIGATION", "id": "investigation", "workflow": "workflows/investigation.md" },
16
+ { "type": "DEPLOY", "id": "deployment", "workflow": "workflows/deploy.md" },
17
+ { "type": "CONFIG", "id": "config", "workflow": "workflows/config.md" },
18
+ { "type": "REVIEW", "id": "review", "workflow": "workflows/review.md" },
19
+ { "type": "RESEARCH", "id": "research", "workflow": "workflows/research.md" }
20
+ ],
21
+ "mappings": [
22
+ {
23
+ "id": "research-documentation",
24
+ "when": { "any_task_types": ["research", "documentation"], "any_task_signals": ["current-facts", "external-facts", "source-claims"] },
25
+ "requirements": [
26
+ { "id": "research.retrieve", "level": "required", "scope": "task", "reason": "Current or external factual claims need source retrieval.", "acceptance": ["source-provenance"], "preferred_implementations": ["exa-search"], "allowed_alternatives": ["native-web"] },
27
+ { "id": "research.provenance", "level": "required", "scope": "task", "reason": "Factual claims need attributed provenance.", "acceptance": ["source-provenance"], "preferred_implementations": ["exa-search"], "allowed_alternatives": ["native-web"] },
28
+ { "id": "research.validation", "level": "optional", "scope": "task", "reason": "An additional source-quality pass improves external factual claims.", "acceptance": ["source-validation"], "preferred_implementations": ["exa-search"], "allowed_alternatives": ["native-web"] }
29
+ ],
30
+ "obligations": {
31
+ "mandatory": [
32
+ { "capability": "research.retrieve", "trigger": "Any current or external factual claim.", "preferred_implementations": ["exa-search"], "allowed_alternatives": ["native-web"] }
33
+ ],
34
+ "optional": [
35
+ { "capability": "research.validation", "trigger": "External/recent source-quality needs a second pass.", "preferred_implementations": ["exa-search"], "allowed_alternatives": ["native-web"] }
36
+ ],
37
+ "available": [
38
+ { "capability": "research.provenance", "trigger": "Any factual write-up benefits from attributed sources.", "preferred_implementations": ["exa-search"], "allowed_alternatives": ["native-web"] }
39
+ ]
40
+ }
41
+ },
42
+ {
43
+ "id": "feature",
44
+ "when": { "any_task_types": ["feature"] },
45
+ "requirements": [
46
+ { "id": "workflow.design", "level": "required", "scope": "phase", "reason": "Behavior changes need an explicit design before implementation.", "applies_when": { "any_phases": ["planning"] }, "acceptance": ["approved-design"], "preferred_implementations": ["superpowers-workflows"], "allowed_alternatives": ["native-workflow-selection"] },
47
+ { "id": "workflow.plan", "level": "required", "scope": "phase", "reason": "Multi-step feature work needs a plan.", "applies_when": { "any_phases": ["planning"] }, "acceptance": ["implementation-plan"], "preferred_implementations": ["superpowers-workflows"], "allowed_alternatives": ["native-workflow-selection"] },
48
+ { "id": "workflow.tdd", "level": "required", "scope": "phase", "reason": "Executable changes need behavior tests.", "applies_when": { "any_phases": ["implementation"] }, "acceptance": ["behavioral-test"], "preferred_implementations": ["superpowers-workflows"], "allowed_alternatives": ["native-workflow-selection"] },
49
+ { "id": "verification.checks", "level": "required", "scope": "phase", "reason": "Acceptance checks must be run before completion.", "applies_when": { "any_phases": ["verification"] }, "acceptance": ["verification-output"], "preferred_implementations": ["superpowers-workflows"], "allowed_alternatives": ["project-test-runner"] },
50
+ { "id": "test.behavioral", "level": "required", "scope": "task", "reason": "Executable feature behavior needs a test or equivalent check.", "applies_when": { "any_phases": ["implementation", "verification"] }, "acceptance": ["behavioral-test"], "preferred_implementations": ["project-test-runner"], "allowed_alternatives": [] }
51
+ ],
52
+ "obligations": {
53
+ "mandatory": [
54
+ { "capability": "workflow.brainstorm", "trigger": "Before entering plan mode.", "preferred_implementations": ["superpowers-workflows"], "allowed_alternatives": ["native-workflow-selection"] },
55
+ { "capability": "workflow.tdd", "trigger": "The failing test is written before implementation.", "preferred_implementations": ["superpowers-workflows"], "allowed_alternatives": ["native-workflow-selection"] }
56
+ ],
57
+ "optional": [
58
+ { "capability": "docs.current", "trigger": "Any library/SDK API surface, even a familiar one.", "preferred_implementations": ["context7"], "allowed_alternatives": ["native-web"] },
59
+ { "capability": "ui.design_system", "trigger": "Any new UI.", "preferred_implementations": ["design-system", "ui-styling"], "allowed_alternatives": [] },
60
+ { "capability": "billing.provider_evidence", "trigger": "A money path is touched.", "preferred_implementations": ["stripe-best-practices"], "allowed_alternatives": [] },
61
+ { "capability": "code.semantic_edit", "trigger": "A large cross-file edit is planned.", "preferred_implementations": ["serena"], "allowed_alternatives": [] }
62
+ ],
63
+ "available": [
64
+ { "capability": "workflow.plan", "trigger": "Architecture-shaped feature planning.", "preferred_implementations": ["feature-dev-code-architect"], "allowed_alternatives": [] }
65
+ ]
66
+ }
67
+ },
68
+ {
69
+ "id": "bug-incident",
70
+ "when": { "any_task_types": ["bug", "incident"] },
71
+ "requirements": [
72
+ { "id": "workflow.debug", "level": "required", "scope": "phase", "reason": "Bug fixes require evidence and a tested hypothesis.", "applies_when": { "any_phases": ["investigation", "implementation"] }, "acceptance": ["reproduction-evidence", "hypothesis-evidence"], "preferred_implementations": ["superpowers-workflows"], "allowed_alternatives": ["native-workflow-selection"] },
73
+ { "id": "test.behavioral", "level": "required", "scope": "task", "reason": "A bug fix needs a regression check.", "applies_when": { "any_phases": ["implementation", "verification"] }, "acceptance": ["regression-check"], "preferred_implementations": ["project-test-runner"], "allowed_alternatives": [] },
74
+ { "id": "review.independent", "level": "optional", "scope": "role", "reason": "Ambiguous or high-risk diagnosis benefits from an adversarial challenge.", "applies_when": { "any_phases": ["review"] }, "acceptance": ["independent-review"], "preferred_implementations": ["independent-reviewer"], "allowed_alternatives": [] }
75
+ ],
76
+ "obligations": {
77
+ "mandatory": [
78
+ { "capability": "workflow.systematic_debugging", "trigger": "Reproduce before fixing (BUG_FIX).", "preferred_implementations": ["superpowers-workflows"], "allowed_alternatives": ["native-workflow-selection"] },
79
+ { "capability": "incident.telemetry_first", "trigger": "INCIDENT: before any hypothesis.", "preferred_implementations": ["production-telemetry-collector"], "allowed_alternatives": [] },
80
+ { "capability": "incident.protocol_order", "trigger": "INCIDENT: start -> evidence -> fix -> verify -> close, in order.", "preferred_implementations": ["incident-orchestration"], "allowed_alternatives": [] }
81
+ ],
82
+ "optional": [
83
+ { "capability": "code.locate", "trigger": "Symptom crosses layers.", "preferred_implementations": ["route-data-flow-tracer"], "allowed_alternatives": [] },
84
+ { "capability": "concurrency.review", "trigger": "An interleaving is suspected.", "preferred_implementations": ["db-concurrency-specialist"], "allowed_alternatives": [] },
85
+ { "capability": "browser.inspect", "trigger": "The symptom is UI-visible.", "preferred_implementations": ["playwright"], "allowed_alternatives": ["native-browser"] },
86
+ { "capability": "memory.recall", "trigger": "The symptom rhymes with a prior incident.", "preferred_implementations": ["mempalace"], "allowed_alternatives": [] }
87
+ ],
88
+ "available": [
89
+ { "capability": "code.locate", "trigger": "Locate-only, before deciding a fix approach.", "preferred_implementations": ["caveman-cavecrew-investigator"], "allowed_alternatives": [] },
90
+ { "capability": "review.adversarial", "trigger": "A second opinion on the hypothesis is cheap and available.", "preferred_implementations": ["adversarial-skeptic"], "allowed_alternatives": [] }
91
+ ]
92
+ }
93
+ },
94
+ {
95
+ "id": "refactor",
96
+ "when": { "any_task_types": ["refactor"] },
97
+ "requirements": [
98
+ { "id": "refactor.preservation", "level": "required", "scope": "task", "reason": "A refactor must preserve observable behavior.", "acceptance": ["preservation-check"], "preferred_implementations": ["project-test-runner"], "allowed_alternatives": [] },
99
+ { "id": "workflow.review", "level": "required", "scope": "phase", "reason": "Ownership and scope need review.", "acceptance": ["scoped-review"], "preferred_implementations": ["superpowers-workflows"], "allowed_alternatives": ["native-workflow-selection"] }
100
+ ],
101
+ "obligations": {
102
+ "mandatory": [
103
+ { "capability": "refactor.coverage_first", "trigger": "Coverage must exist before the first edit.", "preferred_implementations": ["project-test-runner"], "allowed_alternatives": [] }
104
+ ],
105
+ "optional": [
106
+ { "capability": "code.semantic_edit", "trigger": "Symbol-level moves across many files.", "preferred_implementations": ["serena"], "allowed_alternatives": [] }
107
+ ],
108
+ "available": [
109
+ { "capability": "code.locate", "trigger": "Bounded (<=2 files) mechanical edits.", "preferred_implementations": ["caveman-cavecrew-builder"], "allowed_alternatives": [] }
110
+ ]
111
+ }
112
+ },
113
+ {
114
+ "id": "investigation",
115
+ "when": { "any_task_types": ["investigation"] },
116
+ "requirements": [
117
+ { "id": "review.independent", "level": "required", "scope": "role", "reason": "A synthesis never ships from a single source.", "applies_when": { "any_phases": ["review", "synthesis"] }, "acceptance": ["independent-review"], "preferred_implementations": ["independent-reviewer"], "allowed_alternatives": [] }
118
+ ],
119
+ "obligations": {
120
+ "mandatory": [
121
+ { "capability": "review.adversarial", "trigger": "On the synthesis — never ship a single-source conclusion.", "preferred_implementations": ["adversarial-skeptic"], "allowed_alternatives": [] }
122
+ ],
123
+ "optional": [
124
+ { "capability": "code.semantic_edit", "trigger": "Symbol-aware exploration of a large codebase.", "preferred_implementations": ["serena"], "allowed_alternatives": [] },
125
+ { "capability": "research.retrieve", "trigger": "An external/recent search is relevant.", "preferred_implementations": ["exa-search"], "allowed_alternatives": ["native-web"] },
126
+ { "capability": "memory.recall", "trigger": "Before fanning out — the answer may already be filed.", "preferred_implementations": ["mempalace"], "allowed_alternatives": [] }
127
+ ],
128
+ "available": [
129
+ { "capability": "code.locate", "trigger": "Broad read-only location work.", "preferred_implementations": ["caveman-cavecrew-investigator"], "allowed_alternatives": [] }
130
+ ]
131
+ }
132
+ },
133
+ {
134
+ "id": "code-library-api-docs",
135
+ "when": { "any_task_signals": ["version-sensitive", "uncertain-library", "uncertain-platform"] },
136
+ "requirements": [
137
+ { "id": "docs.current", "level": "required", "scope": "task", "reason": "Version-sensitive or uncertain API work needs current documentation.", "acceptance": ["versioned-source"], "preferred_implementations": ["context7"], "allowed_alternatives": ["native-web"] }
138
+ ]
139
+ },
140
+ {
141
+ "id": "web-ui",
142
+ "when": { "any_task_signals": ["web-ui", "visual-bug", "rendered-behavior"] },
143
+ "requirements": [
144
+ { "id": "browser.inspect", "level": "required", "scope": "phase", "reason": "Rendered web acceptance needs browser inspection.", "applies_when": { "any_phases": ["verification"] }, "acceptance": ["rendered-ui-acceptance"], "preferred_implementations": ["playwright"], "allowed_alternatives": ["native-browser"] },
145
+ { "id": "browser.interact", "level": "required", "scope": "phase", "reason": "Rendered web acceptance needs route interaction.", "applies_when": { "any_phases": ["verification"] }, "acceptance": ["rendered-ui-acceptance"], "preferred_implementations": ["playwright"], "allowed_alternatives": ["native-browser"] },
146
+ { "id": "browser.capture", "level": "optional", "scope": "phase", "reason": "A captured viewport makes rendered behavior reviewable.", "applies_when": { "any_phases": ["verification"] }, "acceptance": ["rendered-ui-acceptance"], "preferred_implementations": ["playwright"], "allowed_alternatives": ["native-browser"] }
147
+ ]
148
+ },
149
+ {
150
+ "id": "mobile-native",
151
+ "when": { "any_task_signals": ["ios", "android", "native-bridge", "mobile-native"] },
152
+ "requirements": [
153
+ { "id": "mobile.platform_evidence", "level": "required", "scope": "phase", "reason": "Native acceptance needs platform-specific build or device evidence.", "applies_when": { "any_phases": ["verification"] }, "acceptance": ["native-platform-evidence"], "preferred_implementations": ["ios-debugger-agent", "android-performance"], "allowed_alternatives": ["mobile-platform-cli"] }
154
+ ]
155
+ },
156
+ {
157
+ "id": "billing",
158
+ "when": { "any_project_domains": ["billing", "stripe", "apple-iap", "google-iap"], "any_task_signals": ["stripe", "apple-iap", "google-iap", "refund", "entitlement", "price", "promotion"] },
159
+ "requirements": [
160
+ { "id": "review.independent", "level": "required", "scope": "role", "reason": "Billing, entitlement, and refund work needs independent critical review.", "applies_when": { "any_phases": ["review"] }, "acceptance": ["independent-review"], "preferred_implementations": ["independent-reviewer"], "allowed_alternatives": [] },
161
+ { "id": "billing.provider_evidence", "level": "required", "scope": "task", "reason": "A provider-state or live-lifecycle claim needs authorized provider evidence.", "applies_when": { "any_task_signals": ["provider-state", "live-lifecycle-claim"], "any_phases": ["investigation", "verification"] }, "acceptance": ["provider-state-evidence"], "preferred_implementations": ["billing-provider-api"], "allowed_alternatives": [] }
162
+ ]
163
+ },
164
+ {
165
+ "id": "push-firebase",
166
+ "when": { "any_project_domains": ["push", "firebase"], "any_task_signals": ["push", "firebase", "provider-delivery"] },
167
+ "requirements": [
168
+ { "id": "push.provider_evidence", "level": "required", "scope": "task", "reason": "Provider delivery or state diagnosis needs authorized provider evidence.", "applies_when": { "any_task_signals": ["provider-state", "provider-delivery"], "any_phases": ["investigation", "verification"] }, "acceptance": ["provider-state-evidence"], "preferred_implementations": ["push-provider-api"], "allowed_alternatives": [] }
169
+ ]
170
+ },
171
+ {
172
+ "id": "database-migration",
173
+ "when": { "any_project_domains": ["database"], "any_task_signals": ["database", "migration", "schema", "concurrency"] },
174
+ "requirements": [
175
+ { "id": "database.schema_provenance", "level": "required", "scope": "project", "reason": "Database work needs schema provenance.", "applies_when": { "any_phases": ["planning", "investigation", "implementation"] }, "acceptance": ["schema-provenance"], "preferred_implementations": ["db-client"], "allowed_alternatives": [] },
176
+ { "id": "database.migration_checks", "level": "required", "scope": "task", "reason": "Migration work needs relevant checks.", "applies_when": { "any_task_signals": ["migration", "schema"], "any_phases": ["implementation", "verification"] }, "acceptance": ["migration-check"], "preferred_implementations": ["project-test-runner"], "allowed_alternatives": ["db-client"] },
177
+ { "id": "concurrency.review", "level": "required", "scope": "role", "reason": "Concurrency or transactional work needs a relevant review.", "applies_when": { "any_task_signals": ["concurrency"], "any_phases": ["review"] }, "acceptance": ["concurrency-review"], "preferred_implementations": ["db-concurrency-specialist"], "allowed_alternatives": [] }
178
+ ]
179
+ },
180
+ {
181
+ "id": "forge-remote",
182
+ "when": { "any_task_signals": ["forge-remote", "github-remote", "pull-request"] },
183
+ "requirements": [
184
+ { "id": "forge.remote", "level": "required", "scope": "task", "reason": "A requested forge remote operation needs an authorized forge capability.", "acceptance": ["forge-operation-evidence"], "preferred_implementations": ["gh"], "allowed_alternatives": [] }
185
+ ]
186
+ },
187
+ {
188
+ "id": "review",
189
+ "when": { "any_task_types": ["review"] },
190
+ "requirements": [
191
+ { "id": "review.independent", "level": "required", "scope": "role", "reason": "Review needs an independent relevant checker.", "acceptance": ["independent-review"], "preferred_implementations": ["independent-reviewer"], "allowed_alternatives": [] }
192
+ ],
193
+ "obligations": {
194
+ "mandatory": [
195
+ { "capability": "review.independent", "trigger": "Every review. An independent-reviewer seat if a risk floor applies — cut the implementer, never the reviewer.", "preferred_implementations": ["independent-reviewer"], "allowed_alternatives": [] }
196
+ ],
197
+ "optional": [
198
+ { "capability": "review.adversarial", "trigger": "Money, auth, or frozen-build-shaped diffs.", "preferred_implementations": ["adversarial-skeptic"], "allowed_alternatives": [] },
199
+ { "capability": "traceability.cypilot", "trigger": "The change is PR-shaped.", "preferred_implementations": ["cypilot-pr-review"], "allowed_alternatives": [] }
200
+ ],
201
+ "available": [
202
+ { "capability": "review.independent", "trigger": "A quick second-pass reviewer is available.", "preferred_implementations": ["caveman-cavecrew-reviewer"], "allowed_alternatives": [] }
203
+ ]
204
+ }
205
+ },
206
+ {
207
+ "id": "harness-config-skill",
208
+ "when": { "any_task_types": ["harness", "config", "skill"] },
209
+ "requirements": [
210
+ { "id": "harness.docs", "level": "required", "scope": "task", "reason": "Harness or skill work needs relevant versioned documentation.", "acceptance": ["versioned-source"], "preferred_implementations": ["harness-docs"], "allowed_alternatives": ["native-web"] },
211
+ { "id": "schema.validation", "level": "required", "scope": "task", "reason": "Versioned harness contracts need schema validation.", "acceptance": ["schema-validation"], "preferred_implementations": ["schema-validator"], "allowed_alternatives": ["harness-docs"] }
212
+ ]
213
+ },
214
+ {
215
+ "id": "config",
216
+ "when": { "any_task_types": ["config"] },
217
+ "requirements": [],
218
+ "obligations": {
219
+ "mandatory": [
220
+ { "capability": "config.migration_author", "trigger": "Any schema change — never hand-write a migration.", "preferred_implementations": ["db-migration-author"], "allowed_alternatives": [] }
221
+ ],
222
+ "optional": [
223
+ { "capability": "review.independent", "trigger": "A Stripe/Apple/Google webhook is touched.", "preferred_implementations": ["provider-webhook-specialist"], "allowed_alternatives": [] }
224
+ ],
225
+ "available": [
226
+ { "capability": "docs.current", "trigger": "Provider API/config docs are useful context.", "preferred_implementations": ["context7"], "allowed_alternatives": ["native-web"] }
227
+ ]
228
+ }
229
+ },
230
+ {
231
+ "id": "deployment",
232
+ "when": { "any_task_types": ["deployment"] },
233
+ "requirements": [
234
+ { "id": "deployment.authorized_target", "level": "required", "scope": "task", "reason": "Deployment requires an authorized target.", "applies_when": { "any_phases": ["precheck"] }, "acceptance": ["authorized-target-evidence"], "preferred_implementations": ["deployment-tool"], "allowed_alternatives": [] },
235
+ { "id": "deployment.precheck", "level": "required", "scope": "phase", "reason": "Deployment needs prechecks.", "applies_when": { "any_phases": ["precheck"] }, "acceptance": ["deployment-precheck"], "preferred_implementations": ["deployment-tool"], "allowed_alternatives": [] },
236
+ { "id": "deployment.smoke", "level": "required", "scope": "phase", "reason": "Deployment needs smoke evidence.", "applies_when": { "any_phases": ["verification"] }, "acceptance": ["deployment-smoke"], "preferred_implementations": ["deployment-tool"], "allowed_alternatives": [] },
237
+ { "id": "deployment.rollback", "level": "required", "scope": "phase", "reason": "Deployment needs rollback evidence.", "applies_when": { "any_phases": ["planning"] }, "acceptance": ["rollback-procedure"], "preferred_implementations": ["deployment-tool"], "allowed_alternatives": [] }
238
+ ],
239
+ "obligations": {
240
+ "mandatory": [
241
+ { "capability": "deployment.smoke", "trigger": "Every deployment needs post-deploy smoke evidence.", "preferred_implementations": ["deployment-tool"], "allowed_alternatives": [] }
242
+ ],
243
+ "optional": [
244
+ { "capability": "mobile.platform_evidence", "trigger": "A native build is part of the release.", "preferred_implementations": ["xcodebuildmcp", "android-performance"], "allowed_alternatives": [] }
245
+ ],
246
+ "available": [
247
+ { "capability": "deployment.authorized_target", "trigger": "Edge/worker deploy tooling is available.", "preferred_implementations": ["cloudflare-builds"], "allowed_alternatives": [] }
248
+ ]
249
+ }
250
+ },
251
+ {
252
+ "id": "parallel-work",
253
+ "when": { "any_task_signals": ["parallel-work", "delegation"] },
254
+ "requirements": [
255
+ { "id": "delegation.bounded", "level": "required", "scope": "task", "reason": "Parallel work needs bounded ownership and verification.", "acceptance": ["delegation-contract"], "preferred_implementations": ["delegation-runtime"], "allowed_alternatives": [] }
256
+ ]
257
+ }
258
+ ]
259
+ }
@@ -0,0 +1 @@
1
+ {"_attribution":"llm-orchestrator · created by Bogdan-Gabriel Torcescu · https://www.linkedin.com/in/bogdantorcescu/ · keep this credit when copying or deriving","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://portable-orchestrator.dev/schemas/agent-roles.schema.json","title":"Agent role roster and permission profiles","type":"object","required":["version","permission_profiles","roles"],"properties":{"version":{"type":"integer","minimum":1},"permission_profiles":{"type":"object","additionalProperties":{"type":"object","required":["description","required_access","rules"],"properties":{"description":{"type":"string"},"required_access":{"type":"array","items":{"type":"string"}},"rules":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}},"roles":{"type":"array","items":{"type":"object","required":["id","description","capabilities","skills","mcps","best_for","permission_profile","default_tier"],"properties":{"id":{"type":"string","minLength":1},"description":{"type":"string"},"capabilities":{"type":"array","items":{"type":"string"}},"skills":{"type":"array","items":{"type":"string"}},"mcps":{"type":"array","items":{"type":"string"}},"best_for":{"type":"string"},"permission_profile":{"type":"string"},"default_tier":{"type":"string","pattern":"^[WSXF] T[0-5](-T[0-5])?$","description":"Tier and thinking level pair resolved by registries/routing-matrix.json."},"review_floor":{"type":"string","pattern":"^[WSXF] T[0-5](-T[0-5])?$","description":"Minimum review pair for this role domain, where policies/routing.md states one."}},"additionalProperties":false}}}}
@@ -0,0 +1,209 @@
1
+ {
2
+ "_attribution": "llm-orchestrator · created by Bogdan-Gabriel Torcescu · https://www.linkedin.com/in/bogdantorcescu/ · keep this credit when copying or deriving",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "$id": "https://portable-orchestrator.dev/schemas/capability-contract.schema.json",
5
+ "title": "Portable capability and dispatch contract",
6
+ "type": "object",
7
+ "required": ["mandatory", "required", "optional", "bindings", "recommendations", "degraded", "gaps", "warnings", "unverified_acceptance", "prohibited_operations"],
8
+ "properties": {
9
+ "mandatory": { "type": "array", "items": { "$ref": "#/$defs/requirement" } },
10
+ "required": { "type": "array", "items": { "$ref": "#/$defs/requirement" } },
11
+ "optional": { "type": "array", "items": { "$ref": "#/$defs/requirement" } },
12
+ "bindings": { "type": "object", "additionalProperties": { "$ref": "#/$defs/binding" } },
13
+ "recommendations": { "type": "array", "items": { "$ref": "#/$defs/recommendation" } },
14
+ "degraded": { "type": "boolean" },
15
+ "gaps": { "type": "array", "items": { "type": "object", "required": ["capability", "reason"], "properties": { "capability": { "type": "string" }, "reason": { "type": "string" }, "recommendation": { "type": "string" }, "status": { "enum": ["blocked_pending_user", "degraded"] } } } },
16
+ "warnings": { "type": "array", "items": { "type": "string" } },
17
+ "unverified_acceptance": { "type": "array", "items": { "type": "string" } },
18
+ "prohibited_operations": { "type": "array", "items": { "$ref": "#/$defs/prohibitedOperation" } }
19
+ },
20
+ "$defs": {
21
+ "task": {
22
+ "title": "Task input",
23
+ "description": "Portable task classification. type is a stable task category; signals are evidence-backed labels such as web-ui, migration, android, provider-state, or deployment. requires_shell marks a phase that will run shell commands. nontrivial marks work requiring structured decision checkpoints. acceptance names observable acceptance conditions.",
24
+ "type": "object",
25
+ "required": ["type"],
26
+ "properties": {
27
+ "type": { "type": "string", "minLength": 1 },
28
+ "signals": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
29
+ "requires_shell": { "type": "boolean" },
30
+ "nontrivial": { "type": "boolean" },
31
+ "acceptance": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }
32
+ },
33
+ "additionalProperties": true
34
+ },
35
+ "projectProfile": {
36
+ "type": "object",
37
+ "required": ["facts", "languages", "frameworks", "domains", "commands"],
38
+ "properties": {
39
+ "facts": { "type": "array", "items": { "type": "object", "required": ["kind", "value", "evidence", "confidence"], "properties": { "kind": { "type": "string" }, "value": { "type": "string" }, "evidence": { "type": "array", "items": { "type": "string" } }, "confidence": { "enum": ["low", "medium", "high"] } }, "additionalProperties": false } },
40
+ "languages": { "type": "array", "items": { "type": "string" } },
41
+ "frameworks": { "type": "array", "items": { "type": "string" } },
42
+ "domains": { "type": "array", "items": { "type": "string" } },
43
+ "commands": { "type": "array", "items": { "type": "object", "required": ["command", "cwd", "package_manager", "evidence", "confidence"], "properties": { "command": { "type": "string" }, "cwd": { "type": "string" }, "package_manager": { "type": "string" }, "evidence": { "type": "array", "items": { "type": "string" } }, "confidence": { "enum": ["low", "medium", "high"] } }, "additionalProperties": false } },
44
+ "bindings": { "type": "object", "additionalProperties": { "type": "string" } },
45
+ "required_capabilities": { "description": "Explicit project invariants and risk floors. A value is a capability id or a project requirement object; this field is deliberate project policy, never inferred from incidental keywords.", "type": "array", "items": { "oneOf": [{ "type": "string" }, { "$ref": "#/$defs/projectRequiredCapability" }] } }
46
+ },
47
+ "additionalProperties": true
48
+ },
49
+ "toolEntry": {
50
+ "type": "object",
51
+ "required": ["id", "kind", "capabilities", "scope", "source", "status", "permission", "evidence", "limitations"],
52
+ "properties": {
53
+ "id": { "type": "string", "minLength": 1 },
54
+ "kind": { "enum": ["skill", "workflow", "mcp", "native_tool", "cli", "agent_role"] },
55
+ "capabilities": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
56
+ "scope": { "enum": ["core", "project", "user", "harness", "task", "phase", "role"] },
57
+ "source": { "type": "string", "minLength": 1 },
58
+ "status": { "enum": ["installed", "loaded", "callable", "denied", "unknown"] },
59
+ "permission": { "enum": ["read_only", "read_write", "denied", "unknown"] },
60
+ "evidence": { "type": "array", "items": { "type": "string" } },
61
+ "limitations": { "type": "array", "items": { "type": "string" } },
62
+ "operation_denied": { "type": "boolean" },
63
+ "denied_capabilities": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }
64
+ },
65
+ "additionalProperties": false
66
+ },
67
+ "requirement": {
68
+ "type": "object",
69
+ "required": ["id", "level", "scope", "reason", "acceptance", "status"],
70
+ "properties": {
71
+ "id": { "type": "string" },
72
+ "level": { "enum": ["mandatory", "required", "optional"] },
73
+ "scope": { "enum": ["core", "project", "task", "phase", "role"] },
74
+ "reason": { "type": "string" },
75
+ "applies_when": { "type": "object" },
76
+ "acceptance": { "type": "array", "items": { "type": "string" } },
77
+ "preferred_implementations": { "type": "array", "items": { "type": "string" } },
78
+ "allowed_alternatives": { "type": "array", "items": { "type": "string" } },
79
+ "binding": { "type": ["string", "null"] },
80
+ "evidence": { "type": "array", "items": { "type": "string" } },
81
+ "status": { "enum": ["satisfied", "missing", "denied", "not_applicable", "blocked_pending_user", "degraded"] },
82
+ "provenance": { "type": "array", "items": { "type": "string" } },
83
+ "gap_declared_first": { "type": "boolean" },
84
+ "degraded_mode_after_refusal": { "type": "boolean" }
85
+ },
86
+ "additionalProperties": true
87
+ },
88
+ "projectRequiredCapability": {
89
+ "type": "object",
90
+ "required": ["id"],
91
+ "properties": {
92
+ "id": { "type": "string" },
93
+ "scope": { "enum": ["core", "project", "task", "phase", "role"] },
94
+ "reason": { "type": "string" },
95
+ "applies_when": { "type": "object" },
96
+ "acceptance": { "type": "array", "items": { "type": "string" } },
97
+ "preferred_implementations": { "type": "array", "items": { "type": "string" } },
98
+ "allowed_alternatives": { "type": "array", "items": { "type": "string" } }
99
+ },
100
+ "additionalProperties": false
101
+ },
102
+ "binding": {
103
+ "type": "object",
104
+ "required": ["capability", "implementation", "kind", "source", "permission", "evidence"],
105
+ "properties": {
106
+ "capability": { "type": "string" },
107
+ "implementation": { "type": "string" },
108
+ "kind": { "enum": ["skill", "workflow", "mcp", "native_tool", "cli", "agent_role", "manual"] },
109
+ "source": { "type": "string" },
110
+ "permission": { "enum": ["read_only", "read_write", "denied", "unknown"] },
111
+ "evidence": { "type": "array", "items": { "type": "string" } },
112
+ "limitations": { "type": "array", "items": { "type": "string" } }
113
+ },
114
+ "additionalProperties": true
115
+ },
116
+ "recommendation": {
117
+ "type": "object",
118
+ "required": ["capability", "implementation", "kind", "level", "reason", "phase", "blocks"],
119
+ "properties": {
120
+ "capability": { "type": "string" },
121
+ "implementation": { "type": "string" },
122
+ "kind": { "enum": ["skill", "workflow", "mcp", "native_tool", "cli", "agent_role"] },
123
+ "level": { "enum": ["required", "optional"] },
124
+ "reason": { "type": "string" },
125
+ "phase": { "type": "string" },
126
+ "alternatives": { "type": "array", "items": { "type": "string" } },
127
+ "evidence_impact": { "type": "array", "items": { "type": "string" } },
128
+ "blocks": { "type": "boolean" },
129
+ "display_name": { "type": "string" },
130
+ "recommendation_kind": { "enum": ["product", "capability_gap"] },
131
+ "installable": { "type": "boolean" },
132
+ "source_url": { "type": "string", "format": "uri" }
133
+ },
134
+ "additionalProperties": true
135
+ },
136
+ "dispatchContract": {
137
+ "title": "Child dispatch contract",
138
+ "description": "A child-specific projection of a CapabilityPlan. The child receives only shard-relevant facts, bindings, permissions, fallbacks, and acceptance conditions.",
139
+ "type": "object",
140
+ "required": ["shard", "routing", "required_capabilities", "optional_capabilities", "bindings", "project_evidence", "inventory_revision", "required_mcps", "required_skills", "required_workflows", "required_cli_tools", "available_tools", "permission_profile", "rtk_preflight", "fallback_plan"],
141
+ "properties": {
142
+ "shard": { "type": "object", "required": ["id", "ownership", "acceptance"], "properties": { "id": { "type": "string" }, "ownership": { "type": "array", "items": { "type": "string" } }, "acceptance": { "type": "array", "items": { "type": "string" } }, "parent_agent_id": { "type": "string" }, "child_agent_id": { "type": "string" } } },
143
+ "routing": { "oneOf": [{ "$ref": "#/$defs/shardRouting" }, { "type": "null" }] },
144
+ "required_capabilities": { "type": "array", "items": { "$ref": "#/$defs/requirement" } },
145
+ "optional_capabilities": { "type": "array", "items": { "$ref": "#/$defs/requirement" } },
146
+ "bindings": { "type": "object", "additionalProperties": { "$ref": "#/$defs/binding" } },
147
+ "project_evidence": { "type": "array", "items": { "type": "object" } },
148
+ "inventory_ref": { "type": "string" },
149
+ "inventory_revision": { "type": ["number", "string"] },
150
+ "required_mcps": { "type": "array", "items": { "type": "string" } },
151
+ "required_skills": { "type": "array", "items": { "type": "string" } },
152
+ "required_workflows": { "type": "array", "items": { "type": "string" } },
153
+ "required_cli_tools": { "type": "array", "items": { "type": "string" } },
154
+ "available_tools": { "type": "array", "items": { "type": "object" } },
155
+ "permission_profile": { "type": "object", "additionalProperties": { "enum": ["read_only", "read_write", "denied", "unknown"] } },
156
+ "rtk_preflight": { "type": "object", "required": ["required"], "properties": { "required": { "type": "boolean" }, "implementation": { "type": "string" }, "command": { "type": "string" }, "non_mutating": { "type": "boolean" } } },
157
+ "fallback_plan": { "type": "array", "items": { "type": "object", "required": ["capability", "implementation", "reason"], "properties": { "capability": { "type": "string" }, "implementation": { "type": "string" }, "reason": { "type": "string" } } } },
158
+ "not_applicable": { "type": "array", "items": { "type": "object" } },
159
+ "prohibited_operations": { "type": "array", "items": { "$ref": "#/$defs/prohibitedOperation" } }
160
+ }
161
+ },
162
+ "shardRouting": {
163
+ "title": "PlanShard routing block",
164
+ "description": "Per-shard cost-aware model selection, resolved at dispatch time against the live inventory. These thirteen field names are canonical: the same names appear in policies/dispatch.md (PlanShard schema), policies/routing.md (Dispatch metadata), protocol.md (flow construction) and lib/dispatch-contract.mjs (SHARD_ROUTING_FIELDS). model_effective is null only when the shard is blocked — the tier floor is never lowered to fit an inventory.",
165
+ "type": "object",
166
+ "required": ["pair", "tier", "thinking_level", "model_requested", "effort_requested", "model_effective", "effort_effective", "review_floor", "independent_review", "selection_reason", "inventory_revision", "price_source", "est_usd_per_task"],
167
+ "properties": {
168
+ "pair": { "type": "string" },
169
+ "tier": { "enum": ["W", "S", "X", "F"] },
170
+ "thinking_level": { "enum": ["T0", "T1", "T2", "T3", "T4", "T5"] },
171
+ "model_requested": { "type": ["string", "null"] },
172
+ "effort_requested": { "type": ["string", "null"] },
173
+ "model_effective": { "type": ["string", "null"] },
174
+ "effort_effective": { "type": ["string", "null"] },
175
+ "review_floor": { "type": ["string", "null"] },
176
+ "independent_review": { "type": "boolean" },
177
+ "selection_reason": { "type": "string" },
178
+ "inventory_revision": { "type": ["number", "string", "null"] },
179
+ "price_source": { "type": "string" },
180
+ "est_usd_per_task": { "type": ["number", "null"] },
181
+ "blocked": { "type": ["string", "null"] }
182
+ },
183
+ "additionalProperties": true
184
+ },
185
+ "dispatchEvidenceReport": {
186
+ "title": "Child dispatch evidence report",
187
+ "description": "Actual phase observations. Loaded workflows and skills, tool calls, substitutions, and concrete acceptance evidence are separate facts.",
188
+ "type": "object",
189
+ "properties": {
190
+ "loaded_skills": { "type": "array", "items": { "type": "string" } },
191
+ "loaded_workflows": { "type": "array", "items": { "type": "string" } },
192
+ "used_capabilities": { "type": "array", "items": { "type": "string" } },
193
+ "used_mcps": { "description": "Every required MCP the child called, or its explicit unavailable/error result. Silent omission is a gate failure (protocol.md, policies/dispatch.md).", "type": "array", "items": { "oneOf": [{ "type": "string" }, { "type": "object", "required": ["id"], "properties": { "id": { "type": "string" }, "result": { "type": "string" }, "error": { "type": "string" } } }] } },
194
+ "question_for_user": { "description": "A child never asks the user directly; it returns the question here and the orchestrator batches it into one native question (policies/questions.md).", "type": "array", "items": { "type": "object", "required": ["title", "question", "options"], "properties": { "title": { "type": "string" }, "question": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "required": ["label", "cost"], "properties": { "label": { "type": "string" }, "cost": { "type": "string" }, "recommended": { "type": "boolean" } } } }, "blocks": { "type": "string" } } } },
195
+ "tool_calls": { "type": "array", "items": { "type": "object", "required": ["tool", "capability"], "properties": { "tool": { "type": "string" }, "capability": { "type": "string" }, "evidence": { "type": "array", "items": { "type": "string" } } } } },
196
+ "agent_role_invocations": { "type": "array", "items": { "type": "object", "required": ["id", "capability", "agent_id"], "properties": { "id": { "type": "string" }, "capability": { "type": "string" }, "agent_id": { "type": "string" }, "artifact": { "type": "string" }, "path": { "type": "string" } } } },
197
+ "substitutions": { "type": "array", "items": { "type": "object", "required": ["capability", "implementation"], "properties": { "capability": { "type": "string" }, "implementation": { "type": "string" }, "reason": { "type": "string" } } } },
198
+ "skipped_optional_capabilities": { "type": "array", "items": { "type": "string" } },
199
+ "effective_permissions": { "type": "object", "additionalProperties": { "enum": ["read_only", "read_write", "denied", "unknown"] } },
200
+ "acceptance_evidence": { "type": "array", "items": { "type": "object", "required": ["id"], "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "command": { "type": "string" }, "exit_code": { "type": "integer" }, "artifact": { "type": "string" }, "path": { "type": "string" }, "screenshot": { "type": "string" }, "capture": { "type": "string" }, "source": { "type": "string" }, "summary": { "type": "string" }, "reviewer": { "type": "string" }, "route": { "type": "string" }, "viewport": { "type": "string" } } } }
201
+ }
202
+ },
203
+ "prohibitedOperation": {
204
+ "type": "object",
205
+ "required": ["capability", "tool", "reason"],
206
+ "properties": { "capability": { "type": "string" }, "tool": { "type": "string" }, "reason": { "type": "string" } }
207
+ }
208
+ }
209
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "_attribution": "llm-orchestrator · created by Bogdan-Gabriel Torcescu · https://www.linkedin.com/in/bogdantorcescu/ · keep this credit when copying or deriving",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "$id": "https://portable-orchestrator.dev/schemas/installation-manifest.schema.json",
5
+ "title": "Portable Orchestrator installation manifest",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["version", "project_id", "harnesses", "skill_resolution", "files", "spans"],
9
+ "properties": {
10
+ "_attribution": {"type": "string"},
11
+ "version": {"const": 1},
12
+ "project_id": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
13
+ "harnesses": {"type": "array", "uniqueItems": true, "items": {"enum": ["codex", "claude", "opencode", "kilo"]}},
14
+ "skill_resolution": {
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "required": ["skills_root_source", "native_discovery"],
18
+ "properties": {
19
+ "skills_root_source": {"enum": ["operator_provided", "default"]},
20
+ "native_discovery": {"const": "unverified"}
21
+ }
22
+ },
23
+ "files": {
24
+ "type": "array",
25
+ "items": {
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": ["scope", "path", "hash", "kind"],
29
+ "properties": {
30
+ "scope": {"enum": ["project", "skills"]},
31
+ "path": {"type": "string", "minLength": 1, "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$)).+$"},
32
+ "hash": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
33
+ "kind": {"enum": ["runtime", "bridge", "native-command"]}
34
+ }
35
+ }
36
+ },
37
+ "spans": {
38
+ "type": "array",
39
+ "items": {
40
+ "type": "object",
41
+ "additionalProperties": false,
42
+ "required": ["scope", "path", "span", "hash", "begin", "end", "before", "after", "created_file"],
43
+ "properties": {
44
+ "scope": {"const": "project"},
45
+ "path": {"type": "string", "minLength": 1},
46
+ "span": {"type": "string", "minLength": 1},
47
+ "hash": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
48
+ "begin": {"type": "string", "minLength": 1},
49
+ "end": {"type": "string", "minLength": 1},
50
+ "before": {"type": "string"},
51
+ "after": {"type": "string"},
52
+ "created_file": {"type": "boolean"}
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }