@heretek-ai/epistemic-swarm 0.2.2 → 0.3.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.
- package/.agents/skills/brainstorming/SKILL.md +13 -0
- package/.agents/skills/code_audit/SKILL.md +13 -0
- package/.agents/skills/epistemic_search/SKILL.md +13 -0
- package/.agents/skills/grilling/SKILL.md +13 -0
- package/.agents/skills/oss_scout/SKILL.md +13 -0
- package/.agents/skills/research_cache/SKILL.md +13 -0
- package/.agents/skills/swarm_config/SKILL.md +13 -0
- package/.claude-plugin/plugin.json +15 -5
- package/.omp/README.md +39 -0
- package/.omp/SYSTEM.md +12 -0
- package/.omp/commands/audit.md +10 -0
- package/.omp/commands/brainstorming.md +12 -0
- package/.omp/commands/grill.md +9 -0
- package/.omp/commands/scout.md +10 -0
- package/.omp/commands/swarm-config.md +10 -0
- package/.omp/commands/swarm.md +9 -0
- package/.omp/hooks/post/epistemic-audit.ts +16 -0
- package/.omp/hooks/pre/epistemic-redirect.ts +21 -0
- package/.omp/prompts/brainstorming.md +8 -0
- package/.omp/prompts/swarm.md +8 -0
- package/MARKETPLACE.md +8 -0
- package/README.md +53 -8
- package/bin/cli.js +27 -3
- package/config/domain_packs/biopharma.json +23 -0
- package/config/domain_packs/legal.json +19 -0
- package/config/domain_packs/quant.json +19 -0
- package/config/mcp-research-servers.json +7 -0
- package/config/mcp_launcher.py +48 -137
- package/config/opencode-snippet.json +58 -3
- package/config/searxng_mcp.py +42 -83
- package/extensions/pi/index.js +196 -28
- package/install.sh +20 -4
- package/package.json +40 -5
- package/plugins/antigravity/README.md +28 -0
- package/plugins/antigravity/agents/alpha-thesis.md +6 -0
- package/plugins/antigravity/agents/beta-antithesis.md +7 -0
- package/plugins/antigravity/agents/brainstormer.md +7 -0
- package/plugins/antigravity/agents/epistemic-auditor.md +5 -0
- package/plugins/antigravity/hooks.json +23 -0
- package/plugins/antigravity/mcp_config.json +33 -0
- package/plugins/antigravity/plugin.json +21 -0
- package/plugins/antigravity/rules/epistemic-integrity.md +6 -0
- package/plugins/antigravity/skills/brainstorming/SKILL.md +13 -0
- package/plugins/antigravity/skills/code_audit/SKILL.md +13 -0
- package/plugins/antigravity/skills/epistemic_search/SKILL.md +13 -0
- package/plugins/antigravity/skills/grilling/SKILL.md +13 -0
- package/plugins/antigravity/skills/oss_scout/SKILL.md +13 -0
- package/plugins/antigravity/skills/research_cache/SKILL.md +13 -0
- package/plugins/antigravity/skills/swarm_config/SKILL.md +13 -0
- package/plugins/codex/AGENTS.md.snippet +10 -0
- package/plugins/codex/README.md +37 -0
- package/plugins/codex/config.toml.snippet +28 -0
- package/plugins/codex/openai.yaml +24 -0
- package/plugins/codex/skills/brainstorming/SKILL.md +13 -0
- package/plugins/codex/skills/code_audit/SKILL.md +13 -0
- package/plugins/codex/skills/epistemic_search/SKILL.md +13 -0
- package/plugins/codex/skills/grilling/SKILL.md +13 -0
- package/plugins/codex/skills/oss_scout/SKILL.md +13 -0
- package/plugins/codex/skills/research_cache/SKILL.md +13 -0
- package/plugins/codex/skills/swarm_config/SKILL.md +13 -0
- package/plugins/gemini/GEMINI.md +15 -0
- package/plugins/gemini/README.md +19 -0
- package/plugins/gemini/commands/audit.toml +6 -0
- package/plugins/gemini/commands/brainstorming.toml +10 -0
- package/plugins/gemini/commands/grill.toml +6 -0
- package/plugins/gemini/commands/scout.toml +7 -0
- package/plugins/gemini/commands/swarm-config.toml +7 -0
- package/plugins/gemini/commands/swarm.toml +8 -0
- package/plugins/gemini/gemini-extension.json +38 -0
- package/plugins/gemini/hooks/hooks.json +11 -0
- package/plugins/gemini/skills/brainstorming/SKILL.md +13 -0
- package/plugins/gemini/skills/code_audit/SKILL.md +13 -0
- package/plugins/gemini/skills/epistemic_search/SKILL.md +13 -0
- package/plugins/gemini/skills/grilling/SKILL.md +13 -0
- package/plugins/gemini/skills/oss_scout/SKILL.md +13 -0
- package/plugins/gemini/skills/research_cache/SKILL.md +13 -0
- package/plugins/gemini/skills/swarm_config/SKILL.md +13 -0
- package/plugins/opencode/index.js +335 -118
- package/prompts/agent_brainstormer.md +97 -0
- package/runner/__pycache__/__init__.cpython-311.pyc +0 -0
- package/runner/__pycache__/auctioneer.cpython-311.pyc +0 -0
- package/runner/__pycache__/auditor_engine.cpython-311.pyc +0 -0
- package/runner/__pycache__/claim_store.cpython-311.pyc +0 -0
- package/runner/__pycache__/claim_witness.cpython-311.pyc +0 -0
- package/runner/__pycache__/living_dossiers.cpython-311.pyc +0 -0
- package/runner/__pycache__/mcp_protocol.cpython-311.pyc +0 -0
- package/runner/__pycache__/mcp_server.cpython-311.pyc +0 -0
- package/runner/__pycache__/pcrb.cpython-311.pyc +0 -0
- package/runner/__pycache__/pcrb_verify.cpython-311.pyc +0 -0
- package/runner/__pycache__/refinement.cpython-311.pyc +0 -0
- package/runner/__pycache__/research_swarm.cpython-311.pyc +0 -0
- package/runner/__pycache__/state_machine.cpython-311.pyc +0 -0
- package/runner/auctioneer.py +169 -0
- package/runner/auditor_engine.py +127 -12
- package/runner/claim_store.py +361 -0
- package/runner/claim_witness.py +183 -0
- package/runner/living_dossiers.py +355 -0
- package/runner/mcp_protocol.py +188 -0
- package/runner/mcp_server.py +567 -0
- package/runner/pcrb.py +212 -0
- package/runner/pcrb_verify.py +237 -0
- package/runner/refinement.py +335 -0
- package/runner/research_swarm.py +378 -94
- package/runner/tests/__pycache__/test_auction_order.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_claim_store.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_claim_witness.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_domain_packs.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_fleet_seam.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_living_dossiers.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_mcp_server.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_pcrb.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_refinement.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_swarm.cpython-311.pyc +0 -0
- package/runner/tests/fixtures/auction_objective.json +35 -0
- package/runner/tests/fixtures/borderline_claims.json +27 -0
- package/runner/tests/fixtures/divergence_objectives.json +31 -0
- package/runner/tests/test_auction_order.py +173 -0
- package/runner/tests/test_claim_store.py +162 -0
- package/runner/tests/test_claim_witness.py +186 -0
- package/runner/tests/test_domain_packs.py +217 -0
- package/runner/tests/test_fleet_seam.py +113 -0
- package/runner/tests/test_living_dossiers.py +204 -0
- package/runner/tests/test_mcp_server.py +212 -0
- package/runner/tests/test_pcrb.py +240 -0
- package/runner/tests/test_refinement.py +255 -0
- package/runner/tests/test_swarm.py +173 -15
- package/scripts/auction_experiment.py +180 -0
- package/scripts/build_adapters.py +183 -0
- package/scripts/divergence_experiment.py +184 -0
- package/skills/brainstorming/SKILL.md +106 -0
- package/skills/brainstorming/__init__.py +1 -0
- package/skills/brainstorming/scripts/brainstorm.py +200 -0
- package/skills/research_cache/__pycache__/__init__.cpython-311.pyc +0 -0
- package/skills/research_cache/__pycache__/hasher.cpython-311.pyc +0 -0
- package/skills/swarm_config/SKILL.md +1 -1
- package/skills/swarm_config/__pycache__/__init__.cpython-311.pyc +0 -0
- package/skills/swarm_config/__pycache__/configure.cpython-311.pyc +0 -0
- package/skills/swarm_config/configure.py +45 -11
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* IUMBTEMS: I Use My Brain To Express My Self
|
|
3
3
|
* Native Plugin for OpenCode V2 (opencode.ai)
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
*
|
|
5
|
+
* THIN REGISTRATION (Stream A2b): this plugin no longer implements tools.
|
|
6
|
+
* Every tool forwards to the canonical first-party MCP surface:
|
|
7
|
+
*
|
|
8
|
+
* python3 runner/mcp_server.py call <tool> '<json>'
|
|
9
|
+
*
|
|
10
|
+
* The plugin exists only so OpenCode V2 hosts can discover the iumbtems_*
|
|
11
|
+
* catalog. Schemas mirror runner/mcp_server.py build_tools() — keep in sync.
|
|
7
12
|
*/
|
|
8
13
|
|
|
9
14
|
import { spawnSync } from 'child_process';
|
|
@@ -13,135 +18,347 @@ import { fileURLToPath } from 'url';
|
|
|
13
18
|
const __filename = fileURLToPath(import.meta.url);
|
|
14
19
|
const __dirname = path.dirname(__filename);
|
|
15
20
|
const PKG_ROOT = path.resolve(__dirname, '../..');
|
|
21
|
+
const MCP_SERVER = path.join(PKG_ROOT, 'runner', 'mcp_server.py');
|
|
16
22
|
|
|
17
|
-
|
|
23
|
+
/** Uniform dispatch: one-shot MCP call, return OpenCode's {content, status}. */
|
|
24
|
+
function callMcp(tool, args = {}, cwd) {
|
|
25
|
+
const res = spawnSync(
|
|
26
|
+
'python3',
|
|
27
|
+
[MCP_SERVER, 'call', tool, JSON.stringify(args || {})],
|
|
28
|
+
{
|
|
29
|
+
encoding: 'utf-8',
|
|
30
|
+
cwd: cwd || process.cwd(),
|
|
31
|
+
env: { ...process.env, PYTHONPATH: PKG_ROOT },
|
|
32
|
+
}
|
|
33
|
+
);
|
|
18
34
|
return {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
35
|
+
content: res.stdout || res.stderr,
|
|
36
|
+
status: res.status === 0 ? 'success' : 'error',
|
|
37
|
+
};
|
|
38
|
+
}
|
|
23
39
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
required: ["objective"]
|
|
42
|
-
},
|
|
43
|
-
options: { codemode: false },
|
|
44
|
-
execute: async (args) => {
|
|
45
|
-
const runnerPath = path.join(PKG_ROOT, "runner/research_swarm.py");
|
|
46
|
-
const cmdArgs = [runnerPath, "--objective", args.objective];
|
|
47
|
-
if (args.mock_mode) {
|
|
48
|
-
cmdArgs.push("--mock-claude");
|
|
49
|
-
}
|
|
40
|
+
/** Catalog mirrors runner/mcp_server.py build_tools(). */
|
|
41
|
+
export const IUMBTEMS_TOOL_NAMES = [
|
|
42
|
+
'iumbtems_config',
|
|
43
|
+
'iumbtems_swarm_research',
|
|
44
|
+
'iumbtems_code_audit',
|
|
45
|
+
'iumbtems_oss_scout',
|
|
46
|
+
'iumbtems_brainstorm',
|
|
47
|
+
'iumbtems_verify_quote',
|
|
48
|
+
'iumbtems_socratic_frontier',
|
|
49
|
+
'iumbtems_reindex_claims',
|
|
50
|
+
'iumbtems_report_retraction',
|
|
51
|
+
'iumbtems_check_staleness',
|
|
52
|
+
'iumbtems_set_domain_pack',
|
|
53
|
+
'iumbtems_export_brief',
|
|
54
|
+
'iumbtems_verify_brief',
|
|
55
|
+
];
|
|
50
56
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
cwd: toolContext?.cwd || process.cwd(),
|
|
54
|
-
env: { ...process.env, PYTHONPATH: PKG_ROOT }
|
|
55
|
-
});
|
|
57
|
+
// Deprecated misspelled alias (pre-A2b export). Remove in a semver-major.
|
|
58
|
+
export const IUMBEMS_TOOL_NAMES = IUMBTEMS_TOOL_NAMES;
|
|
56
59
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
const TOOL_CATALOG = [
|
|
61
|
+
{
|
|
62
|
+
name: 'iumbtems_config',
|
|
63
|
+
description:
|
|
64
|
+
'Inspect or modify the active Epistemic Swarm configuration (search engine, depth/iterations, operating mode, divergence threshold) in .research/config.json.',
|
|
65
|
+
input: {
|
|
66
|
+
type: 'object',
|
|
67
|
+
properties: {
|
|
68
|
+
search_engine: {
|
|
69
|
+
type: 'string',
|
|
70
|
+
enum: ['duckduckgo', 'brave', 'firecrawl', 'searxng'],
|
|
71
|
+
description: 'Primary search engine (duckduckgo is the zero-key free default)',
|
|
72
|
+
},
|
|
73
|
+
max_iterations: {
|
|
74
|
+
type: 'integer',
|
|
75
|
+
minimum: 1,
|
|
76
|
+
maximum: 4,
|
|
77
|
+
description: 'Maximum dialectic research iterations / depth (1-4)',
|
|
78
|
+
},
|
|
79
|
+
mode: {
|
|
80
|
+
type: 'string',
|
|
81
|
+
enum: ['research', 'audit', 'scout', 'hybrid', 'brainstorm'],
|
|
82
|
+
description: 'Operating mode: research (literature), audit (codebase), scout (OSS), hybrid, brainstorm (lateral ideation)',
|
|
83
|
+
},
|
|
84
|
+
divergence_threshold: {
|
|
85
|
+
type: 'number',
|
|
86
|
+
minimum: 0.0,
|
|
87
|
+
maximum: 1.0,
|
|
88
|
+
description: 'Auditor divergence threshold (default 0.75)',
|
|
89
|
+
},
|
|
90
|
+
show: {
|
|
91
|
+
type: 'boolean',
|
|
92
|
+
description: 'Just inspect current configuration without modifying',
|
|
93
|
+
default: false,
|
|
94
|
+
},
|
|
62
95
|
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'iumbtems_swarm_research',
|
|
100
|
+
description:
|
|
101
|
+
'Execute an autonomous dialectic research swarm on an objective using Agent Alpha (Thesis) and Agent Beta (Red Team). Long-running; blocks until the swarm completes.',
|
|
102
|
+
input: {
|
|
103
|
+
type: 'object',
|
|
104
|
+
properties: {
|
|
105
|
+
objective: {
|
|
106
|
+
type: 'string',
|
|
107
|
+
description: 'The research question or hypothesis to investigate',
|
|
108
|
+
},
|
|
109
|
+
mock_mode: {
|
|
110
|
+
type: 'boolean',
|
|
111
|
+
description: 'Run in mock/dry-run mode without external API charges',
|
|
112
|
+
default: false,
|
|
80
113
|
},
|
|
81
|
-
options: { codemode: false },
|
|
82
|
-
execute: async (args) => {
|
|
83
|
-
const hasherPath = path.join(PKG_ROOT, "skills/research-cache/hasher.py");
|
|
84
|
-
const res = spawnSync("python3", [hasherPath, "verify", "--hash", args.hash, "--quote", args.quote], {
|
|
85
|
-
encoding: "utf-8",
|
|
86
|
-
cwd: toolContext?.cwd || process.cwd()
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
return {
|
|
90
|
-
content: res.stdout || res.stderr,
|
|
91
|
-
status: res.status === 0 ? "verified" : "failed"
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
114
|
},
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
description: "Optional node ID to settle with an answer"
|
|
109
|
-
},
|
|
110
|
-
settle_answer: {
|
|
111
|
-
type: "string",
|
|
112
|
-
description: "Answer for the settled node"
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
+
required: ['objective'],
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: 'iumbtems_code_audit',
|
|
120
|
+
description:
|
|
121
|
+
'Run a dialectic codebase architectural and security audit pairing a structural architect with an adversarial red-teamer.',
|
|
122
|
+
input: {
|
|
123
|
+
type: 'object',
|
|
124
|
+
properties: {
|
|
125
|
+
target: {
|
|
126
|
+
type: 'string',
|
|
127
|
+
description: 'Target directory, file, or architectural component to audit',
|
|
115
128
|
},
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
129
|
+
mock_mode: {
|
|
130
|
+
type: 'boolean',
|
|
131
|
+
description: 'Run in mock mode without invoking LLM tokens',
|
|
132
|
+
default: false,
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
required: ['target'],
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: 'iumbtems_oss_scout',
|
|
140
|
+
description:
|
|
141
|
+
'Scout open-source software libraries, benchmark candidate implementations, red-team viral copyleft (GPL/AGPL), and produce clean-room implementation blueprints.',
|
|
142
|
+
input: {
|
|
143
|
+
type: 'object',
|
|
144
|
+
properties: {
|
|
145
|
+
feature: {
|
|
146
|
+
type: 'string',
|
|
147
|
+
description: 'The feature, algorithm, or capability to scout in open source',
|
|
148
|
+
},
|
|
149
|
+
mock_mode: {
|
|
150
|
+
type: 'boolean',
|
|
151
|
+
description: 'Run in mock mode without invoking LLM tokens',
|
|
152
|
+
default: false,
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
required: ['feature'],
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: 'iumbtems_brainstorm',
|
|
160
|
+
description:
|
|
161
|
+
'Run lateral brainstorming: novel feature vectors, paradigm inversions, and falsifiable spike hypotheses (never bug-fix lists).',
|
|
162
|
+
input: {
|
|
163
|
+
type: 'object',
|
|
164
|
+
properties: {
|
|
165
|
+
objective: {
|
|
166
|
+
type: 'string',
|
|
167
|
+
description: "Ambiguous exploration prompt (e.g. 'Where do we go from here?')",
|
|
168
|
+
},
|
|
169
|
+
mock_mode: {
|
|
170
|
+
type: 'boolean',
|
|
171
|
+
description: 'Run in mock/dry-run mode without external API charges',
|
|
172
|
+
default: false,
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
required: ['objective'],
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
name: 'iumbtems_verify_quote',
|
|
180
|
+
description:
|
|
181
|
+
'Cryptographically verify whether a cited quote matches verbatim text inside the content-addressed source cache.',
|
|
182
|
+
input: {
|
|
183
|
+
type: 'object',
|
|
184
|
+
properties: {
|
|
185
|
+
hash: {
|
|
186
|
+
type: 'string',
|
|
187
|
+
description: 'SHA-256 hash or prefix of the cached source',
|
|
188
|
+
},
|
|
189
|
+
quote: {
|
|
190
|
+
type: 'string',
|
|
191
|
+
description: 'The verbatim excerpt to verify',
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
required: ['hash', 'quote'],
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: 'iumbtems_socratic_frontier',
|
|
199
|
+
description: 'Inspect or advance the Socratic grilling decision frontier for research framing.',
|
|
200
|
+
input: {
|
|
201
|
+
type: 'object',
|
|
202
|
+
properties: {
|
|
203
|
+
objective: {
|
|
204
|
+
type: 'string',
|
|
205
|
+
description: 'Research objective to inspect',
|
|
206
|
+
},
|
|
207
|
+
settle_node: {
|
|
208
|
+
type: 'string',
|
|
209
|
+
description: 'Optional node ID to settle with an answer',
|
|
210
|
+
},
|
|
211
|
+
settle_answer: {
|
|
212
|
+
type: 'string',
|
|
213
|
+
description: 'Answer for the settled node',
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
name: 'iumbtems_reindex_claims',
|
|
220
|
+
description:
|
|
221
|
+
'Rebuild the derived claims.sqlite index from .research flat files (idempotent; flat files are source of truth).',
|
|
222
|
+
input: {
|
|
223
|
+
type: 'object',
|
|
224
|
+
properties: {
|
|
225
|
+
base_dir: {
|
|
226
|
+
type: 'string',
|
|
227
|
+
description: 'Path to .research workspace',
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
name: 'iumbtems_report_retraction',
|
|
234
|
+
description:
|
|
235
|
+
'Record a RETRACTED/REVISED event for a cached source; dependent VERIFIED claims degrade to STALE/SUSPECT on the next audit (Living Dossiers).',
|
|
236
|
+
input: {
|
|
237
|
+
type: 'object',
|
|
238
|
+
properties: {
|
|
239
|
+
hash: { type: 'string', description: 'Content-addressed SHA-256 of the affected source' },
|
|
240
|
+
event: { type: 'string', enum: ['RETRACTED', 'REVISED'] },
|
|
241
|
+
note: { type: 'string', description: 'Why the source was retracted/revised' },
|
|
242
|
+
base_dir: { type: 'string' },
|
|
243
|
+
},
|
|
244
|
+
required: ['hash', 'event'],
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
name: 'iumbtems_check_staleness',
|
|
249
|
+
description:
|
|
250
|
+
'Run one claim-degradation pass: join claims against retraction events, write the status ledger, and queue re-runs for degraded scopes. Never mutates dossiers.',
|
|
251
|
+
input: {
|
|
252
|
+
type: 'object',
|
|
253
|
+
properties: {
|
|
254
|
+
base_dir: { type: 'string' },
|
|
255
|
+
scope_ids: {
|
|
256
|
+
type: 'array',
|
|
257
|
+
items: { type: 'string' },
|
|
258
|
+
description: 'Limit the pass to specific scopes',
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
name: 'iumbtems_set_domain_pack',
|
|
265
|
+
description:
|
|
266
|
+
'Activate a Regulated Domain Pack (biopharma/quant/legal epistemic constitution) for subsequent audits.',
|
|
267
|
+
input: {
|
|
268
|
+
type: 'object',
|
|
269
|
+
properties: {
|
|
270
|
+
pack: { type: 'string', description: 'Pack id: biopharma | quant | legal (or a path)' },
|
|
271
|
+
base_dir: { type: 'string' },
|
|
272
|
+
},
|
|
273
|
+
required: ['pack'],
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
name: 'iumbtems_export_brief',
|
|
278
|
+
description:
|
|
279
|
+
'Export a proof-carrying research brief (PCRB): self-contained signed bundle of synthesis, claims, quote witnesses, and full source texts.',
|
|
280
|
+
input: {
|
|
281
|
+
type: 'object',
|
|
282
|
+
properties: {
|
|
283
|
+
base_dir: { type: 'string' },
|
|
284
|
+
out: { type: 'string', description: 'Output path (default <base_dir>/brief.pcrb.json)' },
|
|
285
|
+
objective: { type: 'string' },
|
|
286
|
+
key: { type: 'string', description: 'HMAC key (prefer key_file or env IUMBTEMS_PCRB_KEY)' },
|
|
287
|
+
key_file: { type: 'string' },
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
name: 'iumbtems_verify_brief',
|
|
293
|
+
description:
|
|
294
|
+
'Verify a proof-carrying brief against its BUNDLED sources: manifest integrity, HMAC signature, and every quote re-checked. Exit-fail semantics; no trust in the producing LLM.',
|
|
295
|
+
input: {
|
|
296
|
+
type: 'object',
|
|
297
|
+
properties: {
|
|
298
|
+
brief: { type: 'string', description: 'Path to brief.pcrb.json' },
|
|
299
|
+
key: { type: 'string' },
|
|
300
|
+
key_file: { type: 'string' },
|
|
301
|
+
},
|
|
302
|
+
required: ['brief'],
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
];
|
|
120
306
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
307
|
+
/** Legacy arg shims -> MCP handler contract. */
|
|
308
|
+
function normalizeArgs(tool, args = {}) {
|
|
309
|
+
const a = { ...args };
|
|
310
|
+
if (a.mock_mode && a.mock_claude === undefined) {
|
|
311
|
+
a.mock_claude = a.mock_mode;
|
|
312
|
+
delete a.mock_mode;
|
|
313
|
+
}
|
|
314
|
+
if (a.show) {
|
|
315
|
+
delete a.show; // read-only inspect is the no-op default of iumbtems_config
|
|
316
|
+
}
|
|
317
|
+
if (tool === 'iumbtems_socratic_frontier') {
|
|
318
|
+
if (a.settle_node && a.settle_answer) {
|
|
319
|
+
a.settle = [a.settle_node, a.settle_answer];
|
|
320
|
+
delete a.settle_node;
|
|
321
|
+
delete a.settle_answer;
|
|
322
|
+
}
|
|
323
|
+
if (!a.file) {
|
|
324
|
+
a.file = '.research/frontier.json';
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
return a;
|
|
328
|
+
}
|
|
128
329
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
330
|
+
export function createOpenCodePlugin(context = {}) {
|
|
331
|
+
return {
|
|
332
|
+
id: 'heretek.iumbtems.epistemic-swarm',
|
|
333
|
+
name: 'IUMBTEMS Epistemic Swarm',
|
|
334
|
+
version: '0.3.0',
|
|
335
|
+
description:
|
|
336
|
+
'I Use My Brain To Express My Self: High-integrity dialectic research, code audits, and open-source scouting',
|
|
133
337
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
338
|
+
server: (toolContext) =>
|
|
339
|
+
TOOL_CATALOG.map((tool) => ({
|
|
340
|
+
...tool,
|
|
341
|
+
options: { codemode: false },
|
|
342
|
+
execute: async (args = {}) =>
|
|
343
|
+
callMcp(tool.name, normalizeArgs(tool.name, args), toolContext?.cwd),
|
|
344
|
+
})),
|
|
140
345
|
|
|
141
346
|
setup: async (appContext) => {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
347
|
+
const opts = context.options || appContext?.options;
|
|
348
|
+
if (opts && typeof opts === 'object') {
|
|
349
|
+
const updates = {};
|
|
350
|
+
if (opts.search_engine) updates.search_engine = opts.search_engine;
|
|
351
|
+
if (opts.max_iterations) updates.max_iterations = opts.max_iterations;
|
|
352
|
+
if (opts.mode) updates.mode = opts.mode;
|
|
353
|
+
if (opts.divergence_threshold !== undefined) {
|
|
354
|
+
updates.divergence_threshold = opts.divergence_threshold;
|
|
355
|
+
}
|
|
356
|
+
if (Object.keys(updates).length > 0) {
|
|
357
|
+
callMcp('iumbtems_config', updates, appContext?.cwd);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
return { initialized: true, platform: 'opencode-v2' };
|
|
361
|
+
},
|
|
145
362
|
};
|
|
146
363
|
}
|
|
147
364
|
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# BRAINSTORMER: LATERAL CREATIVE SUBAGENT SPECIFICATION
|
|
2
|
+
|
|
3
|
+
You are the **Brainstormer** within the IUMBTEMS harness. Your job is NOT to
|
|
4
|
+
fix bugs, close tickets, or propose incremental refactors. Your job is to
|
|
5
|
+
produce divergent, speculative, lateral product and systems ideas that a
|
|
6
|
+
functional code-completion assistant would never generate.
|
|
7
|
+
|
|
8
|
+
Trigger: `/brainstorming <ambiguous-prompt>` (alias `/brainstorm`).
|
|
9
|
+
Calibration: `temperature 1.0-1.2`, `top_p 0.92`, `max_iterations 1-2`.
|
|
10
|
+
Budget: context ingestion MUST NOT exceed ~30% of the window. If free
|
|
11
|
+
context < 40%, use shallow mode (README + top-level tree only) and say so.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 1. DYNAMIC CONTEXT INGESTION (read-only)
|
|
16
|
+
|
|
17
|
+
1. Scaffold with `python3 skills/brainstorming/scripts/brainstorm.py
|
|
18
|
+
--objective "<objective>" --show-context`. Reuse its `domain_model.json`
|
|
19
|
+
if present at `.research/scratchpads/brainstorm_<slug>/domain_model.json`.
|
|
20
|
+
2. Abstract the domain model in your own words:
|
|
21
|
+
- Domain: game mechanics / data pipeline / compiler toolchain /
|
|
22
|
+
multi-agent runtime / developer tooling / other (name it).
|
|
23
|
+
- Entities: the 3-7 core nouns the system manipulates.
|
|
24
|
+
- Constraints: hard limits (latency, license, sandbox, scale, trust).
|
|
25
|
+
- Stack: detected dependencies and their lock-in surface.
|
|
26
|
+
- Open loops: TODOs, failing tests, stale branches.
|
|
27
|
+
3. NEVER invent file contents. If a file was not ingested, mark the claim
|
|
28
|
+
`[HYPOTHESIS: <how to check>]`, never `[VERIFIED]`.
|
|
29
|
+
|
|
30
|
+
## 2. DIALECTICAL DIVERGENCE (mandatory, in order)
|
|
31
|
+
|
|
32
|
+
### Thesis — Wild Proponent (no feasibility filter)
|
|
33
|
+
Propose the most ambitious affirmative vision: 10x features, new mechanics,
|
|
34
|
+
new workflows, new user promises. Optimize for surprise and upside.
|
|
35
|
+
|
|
36
|
+
### Radical Antithesis — Paradigm Inverter
|
|
37
|
+
Attack every Thesis premise. Use at least three of:
|
|
38
|
+
- **Inversion**: What if the core objective is obsolete? What replaces it?
|
|
39
|
+
- **Subtraction**: What if the most "essential" component is deleted?
|
|
40
|
+
- **Scale extremes**: What breaks at 100x scale? At zero resources?
|
|
41
|
+
- **Adversarial posture**: How would an intelligent adversary exploit this?
|
|
42
|
+
- **Adjacent domains**: What would biology / compilers / markets / games /
|
|
43
|
+
distributed systems do here? Name the analogy explicitly.
|
|
44
|
+
- **Cutting-edge OSS**: Which new library, protocol, model, or runtime
|
|
45
|
+
unlocks a shortcut? Name versions, licenses (flag GPL/AGPL), maturity risk.
|
|
46
|
+
- **Counter-intuition**: Which deliberately "wrong" trade-off wins
|
|
47
|
+
(more latency, more duplication, less abstraction)?
|
|
48
|
+
|
|
49
|
+
### Synthesis — Portfolio Builder
|
|
50
|
+
Converge to a bet portfolio. Output EXACTLY these sections:
|
|
51
|
+
|
|
52
|
+
## Novel Feature Vectors (3-5)
|
|
53
|
+
Each: **Name** — one-line pitch. Why now. Falsification probe as
|
|
54
|
+
`[HYPOTHESIS: <measurable test>]`.
|
|
55
|
+
|
|
56
|
+
## Lateral Architectural Moves (2-3)
|
|
57
|
+
Each: Current → Lateral. Trade-off. Migration spike (< 1 day).
|
|
58
|
+
Flag license/contamination risk where relevant.
|
|
59
|
+
|
|
60
|
+
## Experimental Hypotheses (2-3)
|
|
61
|
+
Rapid spikes, each completable in < 1 day. Each MUST carry
|
|
62
|
+
`[HYPOTHESIS: <measurable falsification criterion>]`. Rank by
|
|
63
|
+
upside-per-hour.
|
|
64
|
+
|
|
65
|
+
## 3. OUTPUT SPECIFICATION
|
|
66
|
+
|
|
67
|
+
Write `.research/brainstorm_<slug>.md`:
|
|
68
|
+
|
|
69
|
+
```markdown
|
|
70
|
+
# Brainstorm: <objective>
|
|
71
|
+
**Generated**: `<ISO-8601>` | **Mode**: `brainstorm` | **Calibration**: `t=1.1/top_p=0.92`
|
|
72
|
+
## Domain Model
|
|
73
|
+
<entities, constraints, stack, open loops>
|
|
74
|
+
## Novel Feature Vectors
|
|
75
|
+
...
|
|
76
|
+
## Lateral Architectural Moves
|
|
77
|
+
...
|
|
78
|
+
## Experimental Hypotheses
|
|
79
|
+
...
|
|
80
|
+
## Explicit Non-Goals
|
|
81
|
+
<what you deliberately did NOT propose: bug fixes, chores, refactors>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Also write `alpha_dossier.json`-compatible brainstorm dossier when running
|
|
85
|
+
under `runner/research_swarm.py --mode brainstorm` (claims use tag
|
|
86
|
+
`HYPOTHESIS` with `falsification` field; `VERIFIED` only for ingested
|
|
87
|
+
workspace facts with `file://` pointers and verbatim snippets).
|
|
88
|
+
|
|
89
|
+
## 4. HARD BANS
|
|
90
|
+
|
|
91
|
+
1. No bug-fix / chore / incremental-refactor lists disguised as ideas.
|
|
92
|
+
2. No sycophantic convergence. Keep tensions explicit.
|
|
93
|
+
3. No parametric citations as `[VERIFIED]`. Workspace facts need
|
|
94
|
+
`file://<path>#L<start>-L<end>` + verbatim snippet. Everything else is
|
|
95
|
+
`[HYPOTHESIS]` or `[INFERRED: <parents>]`.
|
|
96
|
+
4. No writes outside `.research/`.
|
|
97
|
+
5. No scope creep past 2 dialectic iterations without user confirmation.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|