@heretyc/subagent-mcp 2.8.0 → 2.8.1
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.
- package/README.md +6 -0
- package/directives/orchestration-claude.md +7 -14
- package/directives/orchestration-codex.md +7 -14
- package/directives/reminder-on.md +6 -0
- package/dist/index.js +1 -1
- package/dist/routing-table.json +1725 -533
- package/dist/routing.js +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -69,8 +69,14 @@ For manual wiring, developer install from source, Gemini CLI, and Claude Desktop
|
|
|
69
69
|
| `coding` | bounded runnable code artifact, one-pass (implement, test, refactor) |
|
|
70
70
|
| `knowledge_synthesis` | novel integrated prose over sources (synthesize, summarize, draft) |
|
|
71
71
|
| `mechanical` | deterministic single-pass transform, exact-match checkable (grep, rename, reformat) |
|
|
72
|
+
| `prompt_engineering` | designed/optimized prompt or prompt-system steering an LLM/agent (composite-inferred) |
|
|
73
|
+
| `vulnerability_research` | discovery + PoC of a novel vulnerability (composite-inferred) |
|
|
74
|
+
| `molecular_biology` | reasoned molecular/computational-biology result over sequences, structures, or -omics data (composite-inferred) |
|
|
75
|
+
| `ml_accelerator_design` | hardware/software design for ML acceleration — dataflow, kernel, roofline (composite-inferred) |
|
|
72
76
|
| `fallback_default` | no category matches with confidence; prefer splitting work instead |
|
|
73
77
|
|
|
78
|
+
The last four are **composite-inferred**: they carry no dedicated benchmark and their routing competency is composed from parent categories rather than measured directly.
|
|
79
|
+
|
|
74
80
|
**Atomic-split guidance:** if you are unsure which category fits, do NOT submit one large amorphous task. Break the work into smaller atomic steps each mapping to a single category and launch one agent per step.
|
|
75
81
|
|
|
76
82
|
---
|
|
@@ -1,21 +1,14 @@
|
|
|
1
|
-
<!-- INJECTED PRE-PROMPT DIRECTIVE
|
|
1
|
+
<!-- INJECTED PRE-PROMPT DIRECTIVE - BINDING, NON-NEGOTIABLE -->
|
|
2
2
|
<SUB-AGENT-INVARIANT priority="CRITICAL" override="NONE">
|
|
3
|
+
ORCHESTRATION MODE ON: ORCHESTRATOR; default=DELEGATE.
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
INLINE BY RIGHT only for main-session-only capability: user interaction/consent, agent control, tiny audits, final git/PR, irreducible verify loops. State which+why. Direct tool calls spend main context; keep to that set.
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
MCP tools sub-agents can't inherit, interactive/consent tools, tight verify
|
|
8
|
-
loops. State which + why, one line.
|
|
7
|
+
Clarification/consent: subagents surface questions to orchestrator. Orchestrator asks with AskUserQuestion, sends answer back. Question/gate/audit duty does not justify adjacent discovery or edits inline.
|
|
9
8
|
|
|
10
|
-
MUST DELEGATE/OFFLOAD (
|
|
11
|
-
any payload >50KB or >200 lines → scratch file, hand off the PATH.
|
|
12
|
-
Mixed task = SPLIT. One MCP-bound step never makes the whole task inline.
|
|
9
|
+
MUST DELEGATE/OFFLOAD: pure compute; implementation/integration edits; mixed tasks split. One MCP-bound step never makes all inline. Payload >50KB or >200 lines -> scratch path (%TEMP% or /tmp), hand off PATH. Orchestrator audits diffs/results before commit.
|
|
13
10
|
|
|
14
|
-
CONFLICT ORDER: safety-scope > user instruction this turn > delegate-default.
|
|
15
|
-
User tool-pin re-partitions work; does not suspend mode.
|
|
16
|
-
|
|
17
|
-
IPC = temp scratch files ONLY. Windows: %TEMP%. POSIX: /tmp.
|
|
18
|
-
Full model + governance: server MCP instructions.
|
|
19
|
-
DISABLE: never on own initiative. Propose via AskUserQuestion only.
|
|
11
|
+
CONFLICT ORDER: safety-scope > user instruction this turn > delegate-default. Tool-pin repartitions work, does not suspend mode. IPC=temp scratch files only. Full model/governance: server MCP instructions.
|
|
20
12
|
|
|
13
|
+
DISABLE: never on own initiative. Propose via AskUserQuestion only; disable only after explicit user permission.
|
|
21
14
|
</SUB-AGENT-INVARIANT>
|
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
<!-- INJECTED PRE-PROMPT DIRECTIVE — BINDING, NON-NEGOTIABLE -->
|
|
2
1
|
<SUB-AGENT-INVARIANT priority="CRITICAL" override="NONE">
|
|
3
|
-
SCOPE:
|
|
2
|
+
SCOPE: if prompt begins "<this is a request from a parent process>", skip rest.
|
|
4
3
|
|
|
5
|
-
ORCHESTRATION MODE ON
|
|
4
|
+
ORCHESTRATION MODE ON: ORCHESTRATOR; default=DELEGATE.
|
|
6
5
|
|
|
7
|
-
INLINE BY RIGHT
|
|
8
|
-
MCP tools sub-agents can't inherit, interactive/consent tools, tight verify
|
|
9
|
-
loops. State which + why, one line.
|
|
6
|
+
INLINE BY RIGHT only for main-session-only capability: user interaction/consent, agent control, tiny audits, final git/PR, irreducible verify loops. State which+why. Direct calls spend main context; keep to that set.
|
|
10
7
|
|
|
11
|
-
|
|
12
|
-
any payload >50KB or >200 lines → scratch file, hand off the PATH.
|
|
13
|
-
Mixed task = SPLIT. One MCP-bound step never makes the whole task inline.
|
|
8
|
+
Clarification/consent: subagents surface questions to orchestrator. Orchestrator asks with request-user-input, sends answer back. Question/gate/audit duty does not justify adjacent discovery or edits inline.
|
|
14
9
|
|
|
15
|
-
|
|
16
|
-
User tool-pin re-partitions work; does not suspend mode.
|
|
10
|
+
MUST DELEGATE/OFFLOAD: pure compute; implementation/integration edits; mixed tasks split. One MCP-bound step never makes all inline. Payload >50KB or >200 lines -> scratch path (%TEMP% or /tmp), hand off PATH. Orchestrator audits diffs/results before commit.
|
|
17
11
|
|
|
18
|
-
IPC
|
|
19
|
-
Full model + governance: server MCP instructions.
|
|
20
|
-
DISABLE: never on own initiative. Propose via request-user-input only.
|
|
12
|
+
CONFLICT ORDER: safety-scope > user instruction this turn > delegate-default. Tool-pin repartitions work, does not suspend mode. IPC=temp scratch files only. Full governance: server MCP instructions.
|
|
21
13
|
|
|
14
|
+
DISABLE: never on own initiative. Propose via request-user-input only; disable only after explicit permission.
|
|
22
15
|
</SUB-AGENT-INVARIANT>
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
ORCHESTRATION ON. Delegate-default: decompose; delegate; keep orchestrator
|
|
5
5
|
context lean. The 5-CALL RULE is satisfied by delegation.
|
|
6
|
+
Subagents may ask for clarification/consent through the orchestrator; answers
|
|
7
|
+
return to subagents. Questions, gates, and audits do not justify adjacent
|
|
8
|
+
inline discovery/edits. Orchestrator tool use is limited to user interaction,
|
|
9
|
+
agent control, tiny audits, final git/PR actions, and irreducible verify loops.
|
|
10
|
+
Implementation/integration edits remain delegated by default; audit before
|
|
11
|
+
commit.
|
|
6
12
|
<SUB-AGENT-INVARIANT> governance applies — full model: server MCP instructions.
|
|
7
13
|
Sub-agent sessions: ignore this block.
|
|
8
14
|
|
package/dist/index.js
CHANGED
|
@@ -45,7 +45,7 @@ const SPAWN_GRACE_MS = (() => {
|
|
|
45
45
|
// so the handler-validation test can exercise them without importing this entry
|
|
46
46
|
// module (which would open the stdio transport).
|
|
47
47
|
// Caveman self-classification gloss for the task_category param (tool-description.md).
|
|
48
|
-
const TASK_CATEGORY_GLOSS = "REQUIRED. Task shape -> routing category (
|
|
48
|
+
const TASK_CATEGORY_GLOSS = "REQUIRED. Task shape -> routing category (server picks best model for it). Pick ONE: math_proof: deliverable=proof/derivation/formally-checkable result; proof IS deliverable; deductive step-validity under axioms; verified by proof-checker not tests. security_review: deliverable=security verdict/threat-assessment/demonstrated-exploit; adversarial reasoning over attack surface; vuln, auth/authz, crypto, exploitability. debugging: deliverable=verified fix/root-cause; ONLY observed failure (error, crash, red test, regression, flake) preconditions work; done when symptom resolved. quality_review: deliverable=evaluative verdict on existing NON-security artifact, NO observed failure; review diff/PR, compare A-vs-B, validate-vs-spec; never self-review. architecture: deliverable=cross-module design/plan, NO code, NO execution loop; system structure, interface/migration strategy, decompose-into-tasks; >2 files or public API. agentic_execution: deliverable=target end-state via iterate in mutating env (act/observe/adapt loop); run/deploy/provision/browse, tool/function-call, iterate-until-tests-pass. data_analysis: deliverable=empirical finding/model ABOUT structured dataset; query/SQL/dataframe answer, statistic, fit-model-report-drivers; finding scored even if code runs. coding: deliverable=bounded runnable code artifact, one-pass; implement function/module/feature/script, write tests, single-module refactor; compiles/passes-tests. knowledge_synthesis: deliverable=novel integrated prose over sources; synthesize/summarize/translate/draft/explain-across-files; verified by faithfulness/coherence not exact-match. mechanical: deliverable=deterministic single-pass transform/leaf op, exact-match checkable; find/grep/list/rename/reformat/format-convert/extract-to-fixed-schema; minimal reasoning. prompt_engineering: deliverable=designed/optimized prompt or prompt-system steering an LLM/agent; author/refine/eval instructions; system prompt, few-shot, template, prompt rubric; comp-infer parents knowledge_synthesis+coding+quality_review; no direct benchmark. vulnerability_research: deliverable=NOVEL vuln discovery/root-cause/PoC, NOT broad CVE summary; find flaw, root-cause, build PoC; fuzzing, reverse-engineer, exploit primitive; comp-infer parents security_review+debugging+coding; no direct benchmark. molecular_biology: deliverable=reasoned molecular/computational-biology result; sequences, structures, pathways, -omics data; comp-infer parents knowledge_synthesis+data_analysis+math_proof; no direct benchmark. ml_accelerator_design: deliverable=hardware/software design for ML acceleration; dataflow, tiling, memory hierarchy, kernel, roofline; comp-infer parents architecture+coding+math_proof; no direct benchmark. fallback_default: no category matches with confidence (under-specified/mixed/tied); read-only; PREFER splitting work into smaller atomic steps each mapping to one category.";
|
|
49
49
|
function errorResult(text) {
|
|
50
50
|
return { content: [{ type: "text", text }], isError: true };
|
|
51
51
|
}
|