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,85 @@
1
+ <!-- llm-orchestrator · created by Bogdan-Gabriel Torcescu · https://www.linkedin.com/in/bogdantorcescu/ · keep this credit when copying or deriving -->
2
+ # Task State and Memory (MEMPALACE — Mandatory)
3
+
4
+ MemPalace is a **mandatory** core tool, not a preference. Skipping it makes the work invalid: state
5
+ lives in drawers, contexts are disposable, and every clean-session dispatch depends on the drawer
6
+ references existing.
7
+
8
+ **AT SESSION START**: `mempalace_search("current project status")`,
9
+ `mempalace_search("user preferences")`, `mempalace_search(topic)`.
10
+
11
+ **DURING WORK**: `mempalace_add_drawer(title, content, room)` — save findings, decisions and results.
12
+ Save partial results when the context grows long, and after any non-obvious finding.
13
+
14
+ **AT SESSION END**: `mempalace_add_drawer("session summary", summary, "sessions")`,
15
+ `mempalace_add_drawer("task progress", remaining_todos, "tasks")`.
16
+
17
+ **CONTEXT MANAGEMENT**: long context → save to memory → continue shorter. Resume ("continue") → read
18
+ from memory. New topic → search memory first.
19
+
20
+ ## Output drawers
21
+
22
+ | Drawer | Purpose |
23
+ |---|---|
24
+ | `task:{task_id}` | TaskFlow object, classification, status |
25
+ | `flow:{task_id}` | Phase definitions, agent assignments, gates, `plan_shards`, dispatch contract |
26
+ | `gate:{task_id}:{phase}` | Gate criteria, status, evidence, `not_applicable` reason |
27
+ | `evidence:{type}:{task_id}` | Agent findings, `file:line` refs, open questions, source revision |
28
+ | `hypothesis:{task_id}` | The single falsifiable hypothesis for bugs and incidents |
29
+ | `ownership:{task_id}` | File ownership for builders |
30
+ | `regression:{task_id}` | Regression test files, RED/GREEN evidence, run command |
31
+ | `review:{task_id}` | Code reviewer verdict |
32
+ | `runbook:{task_id}` | Complete timeline, decisions, gaps |
33
+ | `verification:{task_id}` | Verification results per stage |
34
+ | `cleanup:{task_id}` | `cleanup_state`, removed paths, branch, commit, sessions stopped, exit status |
35
+ | `permission_recovery:{task_id}:{phase}:{role}` | Blocked permission, source, profile, `restart_count`, next action |
36
+
37
+ Drawer names are literal and shared: the same strings appear in [dispatch](dispatch.md),
38
+ [cleanup](cleanup.md), [protocol.md](../protocol.md) and the generated command prompts. Never invent
39
+ a variant spelling.
40
+
41
+ ## Flow flags (inside `flow:{task_id}`)
42
+
43
+ These are states, not drawers, and they carry these exact names:
44
+
45
+ | Flag | Set when | Cleared / terminal |
46
+ |---|---|---|
47
+ | `permission_recovery_pending` | A delegated session reported a required access denial | One recovery launch per `task_id + phase + role`; a second denial is terminal `permission_blocked` |
48
+ | `permission_blocked` | The second effective denial | Terminal — only a human can approve a non-restricted session |
49
+ | `subagent_stream_recovery_pending` | A child returned a runtime-declared resumable streaming failure | Cleared on a merged handoff; terminal `subagent_resume_unavailable` |
50
+ | `subagent_resume_unavailable` | The child id is not resumable and no phase contract exists to restart from | Terminal |
51
+ | `cleanup_state` | Every flow that created a branch or worktree | `complete`, `blocked_dirty`, `am_stale_ui` — see [cleanup](cleanup.md) |
52
+ | `restart_count` | Per phase/role, initialised to `0` before dispatch | Incremented by the orchestrator immediately before a recovery launch |
53
+ | `resume_count` | Per resumable child, initialised to `0` | At most three resume attempts |
54
+ | `open_questions` | A question must go to the user | Cleared when the batched native question is answered; unanswered items stay `blocked_pending_user` — see [questions](questions.md) |
55
+ | `inventory_revision` | Every shard routing decision | Bumped on a model-not-found, rejected effort or quota change; the remaining shards are re-routed |
56
+
57
+ ## What a drawer holds
58
+
59
+ Scope, source revision, owners, phase and gate status, evidence paths, model/tool inventory
60
+ observations, refusal and degraded-mode decisions, requested and effective models, checks performed,
61
+ limitations and the next action.
62
+
63
+ **Never**: credentials, raw private logs, private reasoning transcripts, or full conversation
64
+ history. Keep handoffs ≤50 lines.
65
+
66
+ Checkpoint at meaningful boundaries, every 6–8 tool calls, before context pressure, or at ~70% of
67
+ the session budget. Do not make paid keep-alive calls to hold a session open.
68
+
69
+ On continue, read the existing state and the current diff, and resume from completed-chain evidence
70
+ rather than restarting planning. Invalidate only the facts whose scope actually changed. Status is
71
+ read-only. Cancellation records the stopped owned workers and preserves changes.
72
+
73
+ ## Fallback when MemPalace is genuinely unavailable
74
+
75
+ MemPalace is mandatory, so an absence is handled by the portability rule in `SKILL.md`: state the gap
76
+ first, recommend installation once with the exact command, and only after an explicit user refusal
77
+ continue in **declared degraded mode** — every plan, handoff and final report carries a `degraded:
78
+ mempalace` line.
79
+
80
+ In that declared degraded mode, write the same drawers as files in an **authorized artifact store
81
+ outside the repository**, namespaced by project and task, with the same field contract and the same
82
+ prohibitions: no credentials, no raw private logs, no reasoning transcripts, no full conversation
83
+ history. Never write permanent memory into the repository merely because a workflow suggested it, and
84
+ never claim persistence succeeded when the adapter failed — report the gap and use the authorized
85
+ equivalent.
@@ -0,0 +1,72 @@
1
+ <!-- llm-orchestrator · created by Bogdan-Gabriel Torcescu · https://www.linkedin.com/in/bogdantorcescu/ · keep this credit when copying or deriving -->
2
+ # Verification
3
+
4
+ Evidence before assertions, always. `verification-before-completion` runs before any completion
5
+ claim.
6
+
7
+ ## Gate evidence rules
8
+
9
+ - **G3** Test RED — the failing test must have been *observed* failing for the exact failure or
10
+ requirement. A test that was written but never run does not satisfy G3.
11
+ - **G4** Build GREEN — requires **fresh** GREEN evidence collected locally: tests pass, lint clean,
12
+ build succeeds, with exit status recorded. **A builder's report never substitutes for local diff
13
+ and test evidence.**
14
+ - **G5** Review PASS — a **read-only review after integration**, by an independent agent that did not
15
+ inherit the implementer's conversation history. No ownership conflicts, hypothesis or requirements
16
+ addressed, full suite GREEN.
17
+ - **G6** Verification Complete — domain smoke checks for the affected surfaces, run for real, with
18
+ their output recorded in `verification:{task_id}`.
19
+
20
+ Select checks from the project instructions, the task acceptance criteria and the changed behavior.
21
+ Run real checks, inspect exit status, and report skipped or unverified separately from passed. Use
22
+ full suites when the project contract requires them; otherwise meaningful scoped checks suffice.
23
+ Expand testing for new changes or unresolved failures, not as ritual repetition.
24
+
25
+ For executable features and bugs, establish a failing behavioral check before the fix, then GREEN.
26
+ Refactors preserve behavior and coverage. Documentation, configuration and instruction changes take
27
+ relevant consistency, schema or scenario checks rather than artificial implementation-mirroring
28
+ tests, and mark G3 `not_applicable` with that reason.
29
+
30
+ Distinguish infrastructure failure from code failure and from reasoning failure. A mocked or
31
+ provider-local check cannot establish live lifecycle behavior; say so rather than implying it did.
32
+
33
+ ## Source-reading tests
34
+
35
+ Tests that read the source rather than behavior break on a legitimate extraction with nothing
36
+ actually broken. **Move the assertion to the new authority and add one that verifies the
37
+ delegation**, so the original invariant stays guarded. Never delete or weaken an assertion to reach
38
+ green.
39
+
40
+ ## Minor findings, concerns and out-of-scope calls
41
+
42
+ - A review finding marked "minor" or "concern" is **NEVER** silently skipped or parked. Ask the user
43
+ explicitly: **"skip or fix?"** — with a one-line cost of each option.
44
+ - Anything that looks out of scope for the current task gets explicit user confirmation before being
45
+ treated as out of scope. "Parked with a ruling" without the user's yes is not allowed.
46
+ - These questions are **batched** (one list, one native question call), not dribbled one at a time,
47
+ and they use the harness's native question mechanism — see [questions](questions.md).
48
+ - This rule takes precedence over the "never end with a question" rule in
49
+ [execution](execution.md) — it is one of that rule's four exceptions.
50
+
51
+ ## Zero-tolerance for warnings
52
+
53
+ Any warning, deprecation notice, info-level complaint, or error encountered **ANYWHERE** gets fixed,
54
+ not stepped over: terminal and tool output, language-runtime deprecations, container logs, browser
55
+ console, test runners, build output, linters — any context. If it cannot be fixed in the current
56
+ task, it goes on the ledger or todo list explicitly, with an owner, never silently ignored.
57
+
58
+ **Deprecations are bugs, not warnings.** A deprecation printed by code you wrote *or merely ran past*
59
+ is a defect in the file it points at, and it gets fixed in the same change. Today's deprecation is
60
+ the next release's fatal error, and a runtime split across versions can already make it hard on one
61
+ process while it is a notice on another. Verify against the interpreter or runtime that production
62
+ uses, not the one your shell defaults to.
63
+
64
+ ## Independent review
65
+
66
+ Independent review is required whenever a risk floor in [routing](routing.md) — core or
67
+ project-tightened — says so. **It is never cut, at any quota level: cut the implementer, never the
68
+ reviewer.** The absence of an independent reviewer leaves that acceptance **unverified**; self-review
69
+ is not a substitute and must never be described as independent.
70
+
71
+ Record concrete findings and resolve scoped defects. Do not change unrelated user work. Report actual
72
+ evidence rather than claiming completion from the fact that a tool was invoked.
package/protocol.md ADDED
@@ -0,0 +1,162 @@
1
+ <!-- llm-orchestrator · created by Bogdan-Gabriel Torcescu · https://www.linkedin.com/in/bogdantorcescu/ · keep this credit when copying or deriving -->
2
+ # Orchestration Protocol
3
+
4
+ **Single entry point. Every request → pre-evaluation → optimal flow → dispatch → gates → verify.
5
+ No direct execution without planning.**
6
+
7
+ ## Entry and intent
8
+
9
+ Load the applicable project instructions, the current task authorization and the installed package.
10
+ Natural-language requests and native commands use the same protocol. A bridge cannot claim
11
+ successful injection unless the runtime actually loaded the skill. A missing package produces the
12
+ gap statement and the single installation recommendation described in `SKILL.md`, and an honest
13
+ native/manual fallback only after explicit refusal.
14
+
15
+ Commands express intent, not permission:
16
+
17
+ | Intent | Purpose |
18
+ |---|---|
19
+ | `task "request"` | Universal entry — classify, plan, execute authorized work, verify, report |
20
+ | `task-plan "request"` | Read-only: show the optimal flow without executing. No builders, no installs, no provider writes |
21
+ | `task-status [id]` | Read existing task state: phase, agents, gates. Never resumes execution, never probes models by inference |
22
+ | `task-cancel [id]` | Stop only agents/processes owned by the task; preserve changes and resumable evidence. Cancellation is not cleanup authorization |
23
+ | `task-verify [id]` | Run the applicable authorized checks and report evidence. Cleanup is a separate authorized operation |
24
+ | `incident-start` | Alias for an `INCIDENT` task |
25
+ | `incident-evidence` | Alias for the `INCIDENT` evidence phase |
26
+ | `incident-fix` | Alias for the `INCIDENT` fix phase |
27
+ | `incident-verify` | Alias for `INCIDENT` verification |
28
+ | `incident-close` | Alias for `INCIDENT` close (persist runbook + regression refs, then cleanup) |
29
+
30
+ The orchestrator generates the `task_id` before dispatching anything, writes `task:{task_id}` and
31
+ `flow:{task_id}`, and returns the `task_id` in its response so status, cancellation and verification
32
+ can target it.
33
+
34
+ ## Pre-Evaluation (MANDATORY for every request, auto, <30s)
35
+
36
+ No dispatch, edit or shell command may precede this object.
37
+
38
+ ```json
39
+ {
40
+ "raw_request": "user exact words",
41
+ "task_type": "INCIDENT|FEATURE|BUG_FIX|REFACTOR|INVESTIGATION|DEPLOY|CONFIG|REVIEW|RESEARCH",
42
+ "domain": "<project domain from the bindings section>|FRONTEND|BACKEND|DB|INFRA|UNKNOWN",
43
+ "complexity": "SIMPLE|MODERATE|COMPLEX|CRITICAL",
44
+ "urgency": "LOW|MEDIUM|HIGH|CRITICAL",
45
+ "requires_evidence": true,
46
+ "requires_code_change": true,
47
+ "requires_deploy": false,
48
+ "estimated_agents": 3,
49
+ "required_mcps": ["mempalace", "sequentialthinking", "context7", "exa"],
50
+ "required_skills": ["using-superpowers", "caveman", "search", "verification-before-completion"],
51
+ "required_workflows": ["workflows/bug-fix.md"],
52
+ "required_cli_tools": ["rtk"],
53
+ "available_tools": [],
54
+ "used_mcps": [],
55
+ "permission_profile": "ORCHESTRATOR",
56
+ "rtk_preflight": "command -v rtk && rtk --version",
57
+ "fallback_plan": "sequential builders if the harness worktree manager is unavailable",
58
+ "open_questions": [],
59
+ "degraded": []
60
+ }
61
+ ```
62
+
63
+ - `available_tools` is filled from live discovery (installed / loaded / callable / denied / unknown),
64
+ never from memory or from a config file's existence.
65
+ - `used_mcps` is filled by each dispatched agent on return. Silent omission is a gate failure.
66
+ - `open_questions` accumulates every question that must go to the user — mandatory-tool gap, batched
67
+ minor findings, destructive confirmation, genuine scope ambiguity. They are asked **once, together,
68
+ through the harness's native question mechanism**; see [questions](policies/questions.md). An
69
+ unanswered question resolves to `blocked_pending_user`, never to implied approval.
70
+ - `degraded` lists every mandatory item missing after an explicit user refusal. A non-empty
71
+ `degraded` array must be echoed as a `degraded:` line in every plan, handoff and final report.
72
+
73
+ ### Capability check (part of pre-evaluation)
74
+
75
+ - Which agent roles exist and are relevant?
76
+ - Which skills, workflows, MCPs and CLI tools does this task type require?
77
+ - Are the required MCPs actually loaded and callable?
78
+ - Any conflicts with existing worktrees or in-flight flows?
79
+ - Does every selected agent have its required permission profile (`RO`, `RW`, `ORCHESTRATOR`)?
80
+ - Does the RTK preflight pass in each delegated session?
81
+
82
+ ### Flow construction
83
+
84
+ Build a TaskFlow object with phases, `plan_shards`, parallel groups, dependencies, gates, risks and
85
+ per-shard `max_iterations`. Do not dispatch until every shard has scope, owner, outputs, acceptance
86
+ checks, `restart_count: 0` and its own `routing` block. The PlanShard schema lives in
87
+ [dispatch](policies/dispatch.md).
88
+
89
+ **Model and thinking selection happens per shard, at dispatch time, against the live inventory — not
90
+ once per task.** Every PlanShard carries `routing` with `pair`, `tier`, `thinking_level`,
91
+ `model_requested`, `effort_requested`, `model_effective`, `effort_effective`, `review_floor`,
92
+ `independent_review`, `selection_reason`, `inventory_revision`, `price_source` and
93
+ `est_usd_per_task`. A shard without a filled `routing` block fails G0. When the inventory changes
94
+ mid-flow (model-not-found, rejected effort, quota change), selection is re-run for the **remaining**
95
+ shards only. See [dispatch](policies/dispatch.md) and [routing](policies/routing.md).
96
+
97
+ ## Task classification and flows
98
+
99
+ | Type | Triggers | Flow | Core agent roles |
100
+ |---|---|---|---|
101
+ | **INCIDENT** | production error, 5xx, stuck state, webhook failure, alert | Evidence → Hypothesis → Fix → Verify → Close | production-telemetry-collector ×N + route-data-flow-tracer → adversarial-skeptic → builders → code-reviewer |
102
+ | **FEATURE** | "build", "add", "create", "implement" | Plan → TDD → Build → Test → Review → Verify | planner → test-engineer → backend-fixer / frontend-fixer → code-reviewer |
103
+ | **BUG_FIX** | "fix", "repair", "broken" | Reproduce → Evidence → Hypothesis → Regression → Fix → Review | investigation → test-engineer → builders → code-reviewer |
104
+ | **REFACTOR** | "refactor", "clean up", "extract", "simplify" | Analyze → Coverage → Incremental → Review | code-simplifier → test-engineer → builders → code-reviewer |
105
+ | **INVESTIGATION** | "why", "analyze", "how does", "debug" | Evidence → Synthesis → Challenge → Report | evidence collectors ×N → synthesizer → adversarial-skeptic |
106
+ | **DEPLOY** | "deploy", "release", "ship" | Pre-checks → Deploy → Smoke → Soak | production-telemetry-collector → test-engineer |
107
+ | **CONFIG** | "configure", "migrate", "set up" | Plan → Change → Validate → Review | backend-fixer → db-migration-author → code-reviewer |
108
+ | **REVIEW** | "review", "audit", "check" | Analyze → Report | code-reviewer → adversarial-skeptic |
109
+ | **RESEARCH** | "research", "compare", "find out", time-sensitive facts | Source → Extract → Corroborate → Document | research collectors ×N → synthesizer → adversarial-skeptic |
110
+
111
+ Model and thinking assignments for every phase come from the flow matrix in
112
+ [routing](policies/routing.md). Agent role names above are the generic roster; the project's
113
+ bindings section maps them onto the roles that actually exist in the consuming project.
114
+
115
+ ## Universal gates
116
+
117
+ G0 Plan Approved → G1 Evidence/Requirements Complete → G2 Hypothesis/Design Valid → G3 Test RED →
118
+ G4 Build GREEN → G5 Review PASS → G6 Verification Complete
119
+
120
+ | Gate | Criteria |
121
+ |---|---|
122
+ | **G0** Plan Approved | Flow built, agents available, resources allocated, ownership defined, every shard has scope/owner/outputs/acceptance and a filled `routing` block |
123
+ | **G1** Evidence / Requirements Complete | All required inputs gathered; evidence artifacts written and indexed by scope and revision |
124
+ | **G2** Hypothesis / Design Valid | A single falsifiable hypothesis (bugs, incidents) or an approved design (features, refactors) |
125
+ | **G3** Test RED | A failing test exists for the exact failure or requirement, and it has been observed failing |
126
+ | **G4** Build GREEN | All tests pass, lint clean, build succeeds — on fresh local evidence, not a builder's report |
127
+ | **G5** Review PASS | No ownership conflicts, hypothesis/requirements addressed, full suite GREEN, independent reviewer where a risk floor applies |
128
+ | **G6** Verification Complete | Domain smoke checks pass for the affected surfaces |
129
+
130
+ Each gate resolves to `passed`, `failed`, `unverified` or `not_applicable`, always with evidence or a
131
+ reason, recorded in `gate:{task_id}:{phase}`. **`not_applicable` requires a written reason** — it is
132
+ never a default and never a way to skip a gate that is merely inconvenient. Documentation and
133
+ research tasks do not fabricate a RED test; they mark G3 `not_applicable` with that reason. Missing
134
+ named tooling changes the bindings, not the truth of the acceptance criteria. Independent review
135
+ required by a risk floor is preserved even under quota pressure.
136
+
137
+ ## Harness compatibility
138
+
139
+ The protocol is harness-neutral; only the mechanisms differ.
140
+
141
+ | Mechanism | Codex | Claude Code | OpenCode | Kilo |
142
+ |---|---|---|---|---|
143
+ | Command / prompt location | `~/.codex/prompts/*.md` (`$1 $2` positional or `$ARGUMENTS`) | `.claude/commands/*.md` (`$ARGUMENTS`) | `.opencode/command/*.md`, `.opencode/commands/*.md` | `.kilo/command/*.md`, `.kilo/commands/*.md` |
144
+ | Agent definition | `AGENTS.md` + spawned agent prompts | `.claude/agents/*.md` (frontmatter: `name`, `description`, `tools`, `model`) | `.opencode/agent/*.md` (frontmatter: `description`, `mode`, `permission`) | `.kilo/agent/*.md` |
145
+ | Dispatch primitive | `spawn_agent` (use `fork_turns="none"`) | Agent tool | `task` tool | `task` tool / `agent_manager` |
146
+ | Plan primitive | `update_plan` | plan mode / todo list | native plan/todo | native plan/todo |
147
+ | Worktree mechanism | git worktree (manual) | git worktree (manual) | git worktree (manual) | Agent Manager worktrees under `.kilo/worktrees/` |
148
+ | Skills root | `.agents/skills/*/SKILL.md` | `.claude/skills/*/SKILL.md`; `CLAUDE.md` imports with `@AGENTS.md` | `~/.config/opencode/skills` | `~/.kilo/skills` and `.kilo/skills` |
149
+ | Sequential Thinking permission key | MCP configured in `~/.codex/config.toml` | MCP server entry | `sequentialthinking_sequentialthinking` | `sequentialthinking_sequentialthinking` |
150
+
151
+ Resolve your harness here before dispatching. Do not import another harness's permission syntax,
152
+ agent roster or worktree layout, and never launch a second harness to obtain a capability.
153
+
154
+ ## Workflow selection
155
+
156
+ After classification, load `workflows/<type>.md` for the selected lowercase type, and nothing else.
157
+ Read installed Superpowers workflows when applicable. Application commands are discovered from the
158
+ project's bindings section — they are never bundled in this package.
159
+
160
+ ---
161
+
162
+ **Orchestrator = brain. Agents = hands. Every task gets the right hands, in the right order.**
@@ -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","version":1,"permission_profiles":{"RO":{"description":"Read-only. Investigation, evidence collection, review, telemetry.","required_access":["read","grep","glob","bash_readonly"],"rules":["Never edits files.","Bash limited to read-only/inspection commands (no writes, no migrations, no deploys).","Reports findings back to the dispatcher; does not apply fixes."]},"RW":{"description":"Read-write within an assigned bounded shard.","required_access":["read","grep","glob","edit","write","bash"],"rules":["Edits are scoped to the files/directories named in its dispatch contract.","Runs project verification for its own shard before reporting done.","Does not merge, push, or deploy unless explicitly the dispatch contract's target."]},"ORCHESTRATOR":{"description":"Plans, dispatches, and integrates; owns the overall session state.","required_access":["read","grep","glob","edit","write","bash","agent_dispatch"],"rules":["Never bypasses a mandatory capability without declaring the gap first.","Owns fan-out sizing, shard boundaries, and integration/merge order.","Runs final verification before reporting completion to the user."]}},"roles":[{"id":"orchestrator","description":"Plans work, resolves capabilities, dispatches bounded shards, integrates results.","capabilities":["orchestration.bootstrap","memory.recall","memory.checkpoint","workflow.selection","delegation.bounded"],"skills":["using-superpowers","brainstorming","dispatching-parallel-agents","subagent-driven-development"],"mcps":["sequential-thinking","mempalace"],"best_for":"Any nontrivial task needing more than one shard or a risk-floor review seat.","permission_profile":"ORCHESTRATOR","default_tier":"S T3"},{"id":"production-telemetry-collector","description":"Collects production logs/metrics/traces before an incident hypothesis is formed.","capabilities":["incident.telemetry_first"],"skills":["incident-orchestration","incident-evidence"],"mcps":[],"best_for":"Incident evidence gathering; never forms a fix on its own.","permission_profile":"RO","default_tier":"W T0-T1"},{"id":"route-data-flow-tracer","description":"Traces a request/data path across layers (frontend, API, DB, provider) read-only.","capabilities":["code.locate"],"skills":[],"mcps":["serena"],"best_for":"Symptoms that cross architectural layers.","permission_profile":"RO","default_tier":"W T0-T1"},{"id":"explore","description":"Read-only breadth search across a codebase: where something is defined, what calls it, which files are involved.","capabilities":["code.locate","tool.discovery"],"skills":[],"mcps":[],"best_for":"Broad read-only location work before a decision; never edits.","permission_profile":"RO","default_tier":"W T0-T1"},{"id":"db-concurrency-specialist","description":"Reviews transactional/locking correctness and concurrency-sensitive schema/code.","capabilities":["concurrency.review","database.schema_provenance"],"skills":[],"mcps":["db-client"],"best_for":"Race conditions, stale claims, lock ordering, transactional boundaries.","permission_profile":"RO","default_tier":"X T3","review_floor":"X T4"},{"id":"frontend-specialist","description":"Implements frontend changes that touch shared state, realtime or a native bridge, respecting shipped-client compatibility.","capabilities":["ui.design_system","test.behavioral"],"skills":["frontend-design","design-system"],"mcps":["playwright"],"best_for":"Complex frontend state, realtime surfaces and native-bridge implementation work.","permission_profile":"RW","default_tier":"S T3"},{"id":"provider-webhook-specialist","description":"Implements and reviews payment/webhook provider integrations (Stripe, Apple, Google).","capabilities":["billing.provider_evidence","push.provider_evidence","review.independent"],"skills":["stripe-best-practices"],"mcps":["billing-provider-api","push-provider-api"],"best_for":"Webhook signature/idempotency, provider state reconciliation, refund delivery.","permission_profile":"RW","default_tier":"X T2","review_floor":"X T4"},{"id":"adversarial-skeptic","description":"Independently challenges a conclusion, diagnosis, or diff before it ships.","capabilities":["review.adversarial","review.independent"],"skills":[],"mcps":[],"best_for":"Money, auth, migration, and frozen-build-shaped review seats.","permission_profile":"RO","default_tier":"S T3","review_floor":"X T4"},{"id":"test-engineer","description":"Writes and maintains behavioral/regression tests.","capabilities":["test.behavioral","workflow.tdd"],"skills":["test-driven-development"],"mcps":[],"best_for":"Coverage gaps, regression tests for bug fixes, refactor safety nets.","permission_profile":"RW","default_tier":"S T2"},{"id":"db-migration-author","description":"Sole authority for authoring SQL schema migrations.","capabilities":["config.migration_author","database.migration_checks","database.schema_provenance"],"skills":[],"mcps":["db-client"],"best_for":"Any new migration file; never hand-write one outside this role.","permission_profile":"RW","default_tier":"S T3","review_floor":"X T4"},{"id":"backend-fixer","description":"Implements backend bug fixes following systematic-debugging evidence.","capabilities":["workflow.debug","test.behavioral"],"skills":["systematic-debugging"],"mcps":[],"best_for":"Backend bug fixes with a validated hypothesis.","permission_profile":"RW","default_tier":"S T2"},{"id":"frontend-fixer","description":"Implements frontend bug fixes following systematic-debugging evidence.","capabilities":["workflow.debug","test.behavioral","ui.design_system"],"skills":["systematic-debugging"],"mcps":["playwright"],"best_for":"Frontend/UI bug fixes with a validated hypothesis.","permission_profile":"RW","default_tier":"S T2"},{"id":"code-simplifier","description":"Simplifies and clarifies recently changed code without changing behavior.","capabilities":["refactor.preservation","code.semantic_edit"],"skills":[],"mcps":["serena"],"best_for":"Post-implementation cleanup passes.","permission_profile":"RW","default_tier":"S T2"},{"id":"code-reviewer","description":"Performs the review pass at the task's review risk floor.","capabilities":["review.independent","workflow.review"],"skills":["requesting-code-review","receiving-code-review"],"mcps":[],"best_for":"The review seat on every review-gated task.","permission_profile":"RO","default_tier":"S T2","review_floor":"S T3"},{"id":"general","description":"General-purpose bounded worker for tasks that fit no specialist role.","capabilities":["workflow.selection","delegation.bounded"],"skills":[],"mcps":[],"best_for":"Bounded work with no specialist owner; escalate rather than widen scope.","permission_profile":"RW","default_tier":"S T2"}]}
@@ -0,0 +1,58 @@
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
+ "version": 1,
5
+ "capabilities": [
6
+ { "id": "orchestration.bootstrap", "description": "Load the orchestration entrypoint/skill before planning or executing any work" },
7
+ { "id": "memory.recall", "description": "Recall prior session/task memory before planning" },
8
+ { "id": "memory.checkpoint", "description": "Write a memory checkpoint at session end or after a non-obvious finding" },
9
+ { "id": "skill.check", "description": "Check for an applicable skill before responding or acting" },
10
+ { "id": "tool.discovery", "description": "Search for an existing tool/capability before declaring one absent" },
11
+ { "id": "user.native_question", "description": "Ask the user through the harness's native question mechanism, batched into one question, never as free text at the end of a message" },
12
+ { "id": "incident.telemetry_first", "description": "Collect production telemetry before forming an incident hypothesis" },
13
+ { "id": "incident.protocol_order", "description": "Run the incident lifecycle commands in order: start, evidence, fix, verify, close" },
14
+ { "id": "workflow.brainstorm", "description": "Brainstorm and challenge a design before entering plan mode" },
15
+ { "id": "workflow.systematic_debugging", "description": "Reproduce and diagnose with a systematic-debugging discipline before fixing" },
16
+ { "id": "review.adversarial", "description": "Challenge a conclusion or diff with an independent adversarial pass" },
17
+ { "id": "refactor.coverage_first", "description": "Confirm behavioral coverage exists before the first refactor edit" },
18
+ { "id": "config.migration_author", "description": "Author schema/config migrations through a dedicated migration authority, never hand-written" },
19
+ { "id": "ui.design_system", "description": "Apply the project design system and styling review to new or changed UI" },
20
+ { "id": "traceability.cypilot", "description": "Maintain artifact/code traceability for PR-shaped or spec-shaped work" },
21
+ { "id": "code.semantic_edit", "description": "Use symbol-aware semantic editing for large or cross-file code changes" },
22
+ { "id": "code.locate", "description": "Locate code read-only (definitions, call sites, cross-file references) before editing" },
23
+ { "id": "communication.concise", "description": "Concise, complete execution communication" },
24
+ { "id": "workflow.selection", "description": "Select and load only applicable workflows" },
25
+ { "id": "workflow.design", "description": "Design a behavior change before implementation" },
26
+ { "id": "workflow.plan", "description": "Create an executable implementation plan" },
27
+ { "id": "workflow.tdd", "description": "Use a test-first cycle for executable behavior changes" },
28
+ { "id": "workflow.debug", "description": "Collect evidence and test hypotheses before a bug fix" },
29
+ { "id": "workflow.review", "description": "Perform relevant review before accepting changes" },
30
+ { "id": "verification.checks", "description": "Run and preserve relevant acceptance checks" },
31
+ { "id": "reasoning.checkpoints", "description": "Record concise decisions, assumptions, and evidence for nontrivial work" },
32
+ { "id": "shell.rtk", "description": "Run supported shell commands through RTK while preserving exit status" },
33
+ { "id": "research.retrieve", "description": "Retrieve current or external factual sources" },
34
+ { "id": "research.provenance", "description": "Record source provenance for factual claims" },
35
+ { "id": "research.validation", "description": "Validate source quality and factual claims" },
36
+ { "id": "docs.current", "description": "Retrieve versioned library or platform documentation when uncertain" },
37
+ { "id": "test.behavioral", "description": "Execute behavioral or regression tests" },
38
+ { "id": "refactor.preservation", "description": "Check preserved behavior for a refactor" },
39
+ { "id": "browser.inspect", "description": "Inspect rendered web behavior" },
40
+ { "id": "browser.interact", "description": "Interact with a rendered web route" },
41
+ { "id": "browser.capture", "description": "Capture viewport evidence for rendered web behavior" },
42
+ { "id": "mobile.platform_evidence", "description": "Collect platform-specific native build or device evidence" },
43
+ { "id": "billing.provider_evidence", "description": "Inspect authorized provider state for billing claims" },
44
+ { "id": "push.provider_evidence", "description": "Inspect authorized push-provider delivery or state" },
45
+ { "id": "database.schema_provenance", "description": "Trace schema and migration provenance" },
46
+ { "id": "database.migration_checks", "description": "Run relevant migration checks" },
47
+ { "id": "concurrency.review", "description": "Review concurrency and transaction correctness" },
48
+ { "id": "forge.remote", "description": "Perform an explicitly requested forge remote operation" },
49
+ { "id": "review.independent", "description": "Obtain independent review at the task risk floor" },
50
+ { "id": "harness.docs", "description": "Retrieve harness-specific versioned documentation" },
51
+ { "id": "schema.validation", "description": "Validate a versioned contract schema" },
52
+ { "id": "deployment.authorized_target", "description": "Use authorized deployment-target access" },
53
+ { "id": "deployment.precheck", "description": "Run deployment prechecks" },
54
+ { "id": "deployment.smoke", "description": "Run post-deployment smoke evidence" },
55
+ { "id": "deployment.rollback", "description": "Record an authorized rollback procedure" },
56
+ { "id": "delegation.bounded", "description": "Delegate bounded shards with ownership and verification" }
57
+ ]
58
+ }
@@ -0,0 +1,183 @@
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
+ "profile": "portable-default",
5
+ "requirements": [
6
+ {
7
+ "id": "orchestration.bootstrap",
8
+ "level": "mandatory",
9
+ "order": 1,
10
+ "scope": "core",
11
+ "reason": "The orchestration entrypoint/skill must be loaded before any planning or execution, on every task.",
12
+ "applies_when": { "always": true },
13
+ "acceptance": [],
14
+ "preferred_implementations": ["using-superpowers"],
15
+ "allowed_alternatives": [],
16
+ "gap_declared_first": true,
17
+ "degraded_mode_after_refusal": true
18
+ },
19
+ {
20
+ "id": "memory.recall",
21
+ "level": "mandatory",
22
+ "order": 2,
23
+ "scope": "core",
24
+ "reason": "Session/task memory must be recalled before planning so prior findings are not rediscovered.",
25
+ "applies_when": { "always": true },
26
+ "acceptance": [],
27
+ "preferred_implementations": ["mempalace"],
28
+ "allowed_alternatives": [],
29
+ "gap_declared_first": true,
30
+ "degraded_mode_after_refusal": true
31
+ },
32
+ {
33
+ "id": "memory.checkpoint",
34
+ "level": "mandatory",
35
+ "order": 3,
36
+ "scope": "core",
37
+ "reason": "A memory checkpoint is required at session end and after any non-obvious finding.",
38
+ "applies_when": { "always": true },
39
+ "acceptance": [],
40
+ "preferred_implementations": ["mempalace"],
41
+ "allowed_alternatives": [],
42
+ "gap_declared_first": true,
43
+ "degraded_mode_after_refusal": true
44
+ },
45
+ {
46
+ "id": "reasoning.checkpoints",
47
+ "level": "mandatory",
48
+ "order": 4,
49
+ "scope": "phase",
50
+ "reason": "Nontrivial planning, diagnosis, and tradeoffs need concise recorded evidence checkpoints.",
51
+ "applies_when": { "nontrivial": true },
52
+ "acceptance": ["decision-evidence-checkpoint"],
53
+ "preferred_implementations": ["sequential-thinking"],
54
+ "allowed_alternatives": [],
55
+ "gap_declared_first": true,
56
+ "degraded_mode_after_refusal": true,
57
+ "manual_fallback": true,
58
+ "manual_implementation": "manual-decision-checkpoints"
59
+ },
60
+ {
61
+ "id": "communication.concise",
62
+ "level": "mandatory",
63
+ "order": 5,
64
+ "scope": "core",
65
+ "reason": "The portable core communicates concise, complete contracts.",
66
+ "applies_when": { "always": true },
67
+ "acceptance": [],
68
+ "preferred_implementations": ["caveman"],
69
+ "allowed_alternatives": [],
70
+ "gap_declared_first": true,
71
+ "degraded_mode_after_refusal": true
72
+ },
73
+ {
74
+ "id": "shell.rtk",
75
+ "level": "mandatory",
76
+ "order": 6,
77
+ "scope": "phase",
78
+ "reason": "Shell phases use the configured output reduction wrapper without changing command semantics.",
79
+ "applies_when": { "requires_shell": true },
80
+ "acceptance": ["command-exit-status"],
81
+ "preferred_implementations": ["rtk"],
82
+ "allowed_alternatives": [],
83
+ "gap_declared_first": true,
84
+ "degraded_mode_after_refusal": true
85
+ },
86
+ {
87
+ "id": "docs.current",
88
+ "level": "mandatory",
89
+ "order": 7,
90
+ "scope": "phase",
91
+ "reason": "Any code, fix, update, or correctness/completeness review needs current versioned documentation, even for familiar libraries.",
92
+ "applies_when": { "any_task_signals": ["code-change", "version-sensitive", "uncertain-library", "uncertain-platform"] },
93
+ "acceptance": ["versioned-source"],
94
+ "preferred_implementations": ["context7"],
95
+ "allowed_alternatives": ["native-web"],
96
+ "gap_declared_first": true,
97
+ "degraded_mode_after_refusal": true
98
+ },
99
+ {
100
+ "id": "research.retrieve",
101
+ "level": "mandatory",
102
+ "order": 8,
103
+ "scope": "core",
104
+ "reason": "External/current facts, library or vendor behavior not in local docs, research-type tasks, and any claim about versions/prices/APIs need retrieved current sources, not recalled ones.",
105
+ "applies_when": { "any_task_types": ["research"], "any_task_signals": ["external-facts", "current-facts", "version-sensitive", "uncertain-library", "uncertain-platform", "source-claims"] },
106
+ "acceptance": ["source-provenance"],
107
+ "preferred_implementations": ["exa-search"],
108
+ "allowed_alternatives": ["native-web"],
109
+ "gap_declared_first": true,
110
+ "degraded_mode_after_refusal": true
111
+ },
112
+ {
113
+ "id": "verification.checks",
114
+ "level": "mandatory",
115
+ "order": 9,
116
+ "scope": "phase",
117
+ "reason": "Every completion claim needs a verification-before-completion pass.",
118
+ "applies_when": { "any_phases": ["verification"] },
119
+ "acceptance": ["verification-output"],
120
+ "preferred_implementations": ["verification-before-completion"],
121
+ "allowed_alternatives": ["superpowers-workflows", "project-test-runner"],
122
+ "gap_declared_first": true,
123
+ "degraded_mode_after_refusal": true
124
+ },
125
+ {
126
+ "id": "skill.check",
127
+ "level": "mandatory",
128
+ "order": 10,
129
+ "scope": "core",
130
+ "reason": "Before any action, including a clarifying question, check whether an applicable skill already covers it.",
131
+ "applies_when": { "always": true },
132
+ "acceptance": [],
133
+ "preferred_implementations": ["skill-discovery"],
134
+ "allowed_alternatives": [],
135
+ "gap_declared_first": true,
136
+ "degraded_mode_after_refusal": true
137
+ },
138
+ {
139
+ "id": "tool.discovery",
140
+ "level": "mandatory",
141
+ "order": 11,
142
+ "scope": "core",
143
+ "reason": "Search before asserting a tool or MCP is unavailable.",
144
+ "applies_when": { "always": true },
145
+ "acceptance": [],
146
+ "preferred_implementations": ["tool-search"],
147
+ "allowed_alternatives": [],
148
+ "gap_declared_first": true,
149
+ "degraded_mode_after_refusal": true
150
+ },
151
+ {
152
+ "id": "user.native_question",
153
+ "level": "mandatory",
154
+ "order": 12,
155
+ "scope": "core",
156
+ "reason": "Any question to the user goes through the harness's native question mechanism, batched into one question, at the decision point — never free text at the end of a message. Present in every harness; the fallback is a single explicit message with the same structure.",
157
+ "applies_when": { "always": true },
158
+ "acceptance": [],
159
+ "preferred_implementations": ["harness-native-question"],
160
+ "allowed_alternatives": ["single-explicit-message"],
161
+ "harness_mechanisms": {
162
+ "claude": "AskUserQuestion",
163
+ "codex": "request_user_input, else update_plan + one explicit question",
164
+ "opencode": "question",
165
+ "kilo": "ask_followup_question"
166
+ },
167
+ "gap_declared_first": true,
168
+ "degraded_mode_after_refusal": true,
169
+ "manual_fallback": true,
170
+ "manual_implementation": "single-explicit-message"
171
+ },
172
+ {
173
+ "id": "workflow.selection",
174
+ "level": "required",
175
+ "scope": "core",
176
+ "reason": "Applicable workflow disciplines must be selected before task work.",
177
+ "applies_when": { "any_task_types": ["feature", "bug", "investigation", "incident", "refactor", "review", "deployment", "research", "documentation", "config", "harness"] },
178
+ "acceptance": [],
179
+ "preferred_implementations": ["superpowers-workflows"],
180
+ "allowed_alternatives": ["native-workflow-selection"]
181
+ }
182
+ ]
183
+ }