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,116 @@
1
+ <!-- llm-orchestrator · created by Bogdan-Gabriel Torcescu · https://www.linkedin.com/in/bogdantorcescu/ · keep this credit when copying or deriving -->
2
+ # Execution Mode (Mandatory)
3
+
4
+ 1. **Given a task = execute the complete flow in one response.** All phases and all owned files
5
+ handled.
6
+ 2. **NEVER** output "what I'll do next" without doing it in the SAME response.
7
+ 3. **NEVER** end a response with a question or "awaiting confirmation" — with exactly four
8
+ exceptions, which take precedence over this rule and are defined, structured and batched by
9
+ [questions](questions.md):
10
+ (a) the batched "skip or fix?" question required by the minor-findings rule in
11
+ [verification](verification.md),
12
+ (b) confirmation before destructive or irreversible actions (data deletion, production state
13
+ changes, publishing, store submissions),
14
+ (c) the mandatory-tool gap question (install / continue in declared degraded mode / abort), and
15
+ (d) genuine scope ambiguity that survives all four steps of "Tool Usage — Always Before Asking"
16
+ below.
17
+ Each of them is asked through the **harness's native question mechanism**, batched into **one**
18
+ question, at the decision point — never as free text at the end of a message. No answer means
19
+ `blocked_pending_user`, never implied approval. See [questions](questions.md).
20
+ 4. **If you listed steps, execute ALL of them before ending.**
21
+ 5. **"continue" = RESUME IMMEDIATELY.** No re-planning. Just DO.
22
+
23
+ Planning does not authorize deployment, publication, provider writes or destructive cleanup. Those
24
+ remain separately authorized, and (b) above still applies.
25
+
26
+ ## Tests — you fix them, you don't report them
27
+
28
+ If a test fails **and it relates to what you touched**, you fix it in the same session. You do not
29
+ label it "pre-existing", you do not leave it for someone else, and you do not finish by reporting a
30
+ red suite:
31
+
32
+ - **The test is right** → fix the code.
33
+ - **The code is right** (you intentionally moved, renamed or extracted something) → update the test
34
+ to verify the new shape, preserving exactly the invariant it defended. Do not delete or weaken the
35
+ assertion just to make it pass; if the assertion truly no longer makes sense, explain why in a
36
+ comment.
37
+ - Many suites contain tests that read the **source** (read file + regex), not behavior. An extraction
38
+ into a new module breaks them with nothing actually broken — then you move the assertion to the new
39
+ file and add one that verifies the delegation, so the "single source of truth" invariant stays
40
+ guarded.
41
+ - A test broken by someone else, in the area you are touching, is your work too.
42
+
43
+ **A red test reported and unfixed = an unfinished task.**
44
+
45
+ ## Decision Making — Stop Asking, Start Building
46
+
47
+ Applies to task *scope and execution* questions. It does NOT override the four exceptions in rule 3
48
+ (minor-findings batch, destructive actions, mandatory-tool gap, surviving scope ambiguity) — those
49
+ questions are mandatory and go through [questions](questions.md); everything below stays forbidden.
50
+
51
+ - "What pages?" = BUILD ALL THAT MAKE SENSE
52
+ - "Do you have API routes?" = GENERATE THEM
53
+ - Missing info = READ CODE first, then decide
54
+
55
+ Do not invent new API routes, pages, tests or agents merely because the request is underspecified —
56
+ infer within the supported scope of what the project already does, and state consequential
57
+ assumptions.
58
+
59
+ ## Tool Usage — Always Before Asking
60
+
61
+ BEFORE asking the user:
62
+
63
+ 1. Search the codebase and docs (glob, grep, read).
64
+ 2. Search memory — was this discussed before?
65
+ 3. Check conversation history — was it already answered?
66
+ 4. Make a reasonable assumption from context.
67
+
68
+ **Ask ONLY if all four fail. This should be RARE** — and when it happens, ask through the harness's
69
+ native mechanism, batched with every other open question, per [questions](questions.md).
70
+
71
+ ## Violations (Any = Failure)
72
+
73
+ - "Awaiting confirmation"
74
+ - "Should I continue?"
75
+ - "What's next" without doing it
76
+ - "After your confirmation"
77
+ - "Please specify"
78
+ - "I will continue with X in the next step" — DO IT NOW
79
+ - "If you have any preference" — use judgment and BUILD
80
+ - "Do you have existing API routes?" — GENERATE THEM
81
+ - "Need specifics to generate" — YOU ARE THE EXPERT, DECIDE
82
+ - "Confirm if any others" — BUILD ALL THAT MAKE SENSE
83
+ - Ending with a question when you can act
84
+ - Listing remaining work without executing
85
+ - Asking about technical choices you can make yourself
86
+
87
+ (The four exceptions in rule 3 — batched minor findings, destructive-action confirmation,
88
+ mandatory-tool gap, surviving scope ambiguity — are NOT violations. They are required, and required
89
+ in the native, batched form [questions](questions.md) defines. Free-text "awaiting confirmation"
90
+ remains a violation even when the underlying question was legitimate.)
91
+
92
+ ## Correct Pattern
93
+
94
+ ```
95
+ [1/N] Building X... [code]
96
+ [2/N] Building Y... [code]
97
+ [N/N] Done. Summary + run command.
98
+ [Saving progress to memory...]
99
+ ```
100
+
101
+ ## When Error
102
+
103
+ Read the failure evidence and check assumptions, then try an alternative tool or query. Log the
104
+ error. Continue with the next task. Missing permission, tool access or data is never solved by more
105
+ model thinking — fix the actual gap or report it precisely.
106
+
107
+ ## When Context Long
108
+
109
+ Save findings to memory. Summarize in 2–3 lines. Continue the remaining work.
110
+
111
+ ## Reporting
112
+
113
+ Keep updates concise and in the user's language. Code, project instructions and orchestration
114
+ artifacts stay in clear English; quoted product copy preserves its locale. Distinguish **complete**,
115
+ **partial**, **blocked** and **unverified** truthfully. Do not leave a plan where execution is
116
+ already authorized and feasible.
@@ -0,0 +1,75 @@
1
+ <!-- llm-orchestrator · created by Bogdan-Gabriel Torcescu · https://www.linkedin.com/in/bogdantorcescu/ · keep this credit when copying or deriving -->
2
+ # Asking the User — native, batched, once
3
+
4
+ Asking is rare and it is expensive. When it is nevertheless required, the question goes through the
5
+ **harness's native question mechanism**, batched into **one** question, at the moment the answer is
6
+ needed — never as free text at the end of a message, and never as "awaiting confirmation".
7
+
8
+ ## When asking is allowed
9
+
10
+ These are exactly the exceptions already named in [execution](execution.md) rule 3. Nothing else
11
+ qualifies:
12
+
13
+ | # | Case | Source of the obligation |
14
+ |---|---|---|
15
+ | 1 | **Mandatory-tool gap** — a mandatory core or project item is not installed: state the gap, recommend the install once, ask install / continue degraded / abort | [SKILL.md](../SKILL.md) portability rule, [capabilities](capabilities.md) |
16
+ | 2 | **Batched minor findings** — every review finding marked "minor", "concern" or "out of scope": **"skip or fix?"**, with a one-line cost each | [verification](verification.md), minor-findings rule |
17
+ | 3 | **Destructive or irreversible action** — data deletion, production state change, publishing, store submission, remote branch deletion, cleanup of unmerged work | [execution](execution.md) rule 3(b), [cleanup](cleanup.md) |
18
+ | 4 | **Genuine scope ambiguity** — and only after all four steps of "Tool Usage — Always Before Asking" in [execution](execution.md) have failed: codebase/docs search, memory search, conversation history, reasonable assumption from context | [execution](execution.md) |
19
+
20
+ Everything else on the Violations list in [execution](execution.md) stays forbidden. A technical
21
+ choice you can make yourself is not a question.
22
+
23
+ ## The batching rule
24
+
25
+ **One question object per decision point, one call, all questions inside it.** Collect every open
26
+ question the current phase produced, ask them together, then continue. Dribbling one question per
27
+ message is a violation of the same rule that forbids ending on a question, because it converts one
28
+ interruption into five.
29
+
30
+ - Open questions accumulate in `open_questions[]` in the pre-evaluation object
31
+ ([protocol.md](../protocol.md)) and in `task:{task_id}`.
32
+ - A question that a search, a memory drawer or the code can answer is removed from the batch before
33
+ asking, not asked "to be safe".
34
+ - Ask at the **decision point**, not at the end of the work: a destructive action is confirmed
35
+ immediately before it, not retroactively.
36
+
37
+ ## Required structure
38
+
39
+ Every question carries, in the harness's native fields:
40
+
41
+ | Part | Requirement |
42
+ |---|---|
43
+ | **Title** | Short, names the decision — not "Question 1" |
44
+ | **Question** | One sentence, answerable without reading the whole transcript |
45
+ | **Options** | 2–4 concrete options, each with a **one-line cost** (what it buys, what it gives up) |
46
+ | **Default / recommended** | Exactly one option marked as the recommendation, with its reason |
47
+ | **Free-text escape** | Allowed where the harness offers it; never the only path |
48
+
49
+ **No answer is not approval.** An unanswered question resolves to `blocked_pending_user` for the
50
+ capability, phase or finding it gates. Independent work continues; the gated phase does not start.
51
+ Never proceed as if the recommended option had been chosen, and never report a gated phase as
52
+ `not_applicable` because the answer never arrived.
53
+
54
+ ## Harness mechanisms
55
+
56
+ | Harness | Native mechanism | Notes |
57
+ |---|---|---|
58
+ | Claude Code | `AskUserQuestion` tool | Multiple questions in one call; options carry `label` + `description`. Use one call for the whole batch |
59
+ | Codex | `request_user_input` when the collaboration tooling exposes it | Otherwise: a final plan step via `update_plan` **plus** a single explicit question in the same turn |
60
+ | OpenCode | `question` tool when present | Otherwise one single-message question containing the whole batch |
61
+ | Kilo | `ask_followup_question` | Native, with `<suggest>` options — one suggestion per option, recommendation first |
62
+
63
+ Resolve the mechanism the same way every other harness difference is resolved: from the **Harness
64
+ compatibility** table in [protocol.md](../protocol.md). Never assume another harness's tool name, and
65
+ never launch a second harness to obtain a question mechanism. Where none of the above is available,
66
+ the fallback is **one** explicit single-message question with the same structure — a fallback, never
67
+ the default.
68
+
69
+ ## Subagents never ask the user
70
+
71
+ A dispatched child has no user. It returns `question_for_user` in its handoff — same structure
72
+ (title, question, options with costs, recommendation) — and stops at the gated step with
73
+ `blocked_pending_user`. The **orchestrator** merges every child's `question_for_user` into the single
74
+ batched question it asks. A child that ends its handoff with a free-text question to the user has
75
+ violated this policy, and the orchestrator asks properly on its behalf rather than relaying the text.