@heretek-ai/epistemic-swarm 0.2.0 → 0.2.3
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/.claude-plugin/marketplace.json +36 -9
- package/.claude-plugin/plugin.json +47 -41
- package/MARKETPLACE.md +93 -0
- package/README.md +61 -8
- package/bin/cli.js +58 -0
- package/config/mcp_launcher.py +215 -0
- package/config/opencode-snippet.json +39 -3
- package/extensions/pi/index.js +107 -4
- package/hooks/hooks.json +24 -0
- package/package.json +26 -3
- package/plugins/opencode/index.js +159 -5
- package/plugins/research-cache/.claude-plugin/plugin.json +15 -0
- package/plugins/socratic-grilling/.claude-plugin/plugin.json +15 -0
- package/plugins/socratic-grilling/skills/grilling/SKILL.md +48 -0
- package/plugins/socratic-grilling/skills/grilling/__init__.py +0 -0
- package/plugins/socratic-grilling/skills/grilling/socratic_tree.py +148 -0
- package/prompts/agent_code_auditor.md +88 -0
- package/prompts/agent_oss_scout.md +78 -0
- package/runner/__pycache__/__init__.cpython-311.pyc +0 -0
- package/runner/__pycache__/auditor_engine.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/research_swarm.py +230 -81
- package/runner/tests/__pycache__/test_swarm.cpython-311.pyc +0 -0
- package/runner/tests/test_swarm.py +88 -0
- package/skills/code_audit/SKILL.md +45 -0
- package/skills/epistemic_search/SKILL.md +35 -0
- package/skills/epistemic_search/__init__.py +1 -0
- package/skills/epistemic_search/scripts/fetch.py +157 -0
- package/skills/epistemic_search/scripts/search.py +162 -0
- package/skills/oss_scout/SKILL.md +49 -0
- package/skills/research_cache/SKILL.md +36 -0
- package/skills/research_cache/__init__.py +0 -0
- package/skills/research_cache/__pycache__/__init__.cpython-311.pyc +0 -0
- package/skills/{research-cache → research_cache}/__pycache__/hasher.cpython-311.pyc +0 -0
- package/skills/research_cache/hasher.py +195 -0
- package/skills/swarm_config/SKILL.md +72 -0
- package/skills/swarm_config/__init__.py +4 -0
- 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 +167 -0
- package/skills/research-cache/__pycache__/__init__.cpython-311.pyc +0 -0
- /package/{skills/research-cache → plugins/research-cache/skills/research_cache}/SKILL.md +0 -0
- /package/{skills/research-cache → plugins/research-cache/skills/research_cache}/__init__.py +0 -0
- /package/{skills/research-cache → plugins/research-cache/skills/research_cache}/hasher.py +0 -0
|
@@ -1,9 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://opencode.ai/config.json",
|
|
3
3
|
"plugin": [
|
|
4
|
-
|
|
4
|
+
[
|
|
5
|
+
"@heretek-ai/epistemic-swarm",
|
|
6
|
+
{
|
|
7
|
+
"search_engine": "duckduckgo",
|
|
8
|
+
"max_iterations": 2,
|
|
9
|
+
"mode": "research"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
5
12
|
],
|
|
6
13
|
"agent": {
|
|
14
|
+
"code-auditor": {
|
|
15
|
+
"description": "IUMBTEMS Codebase Auditor: Dialectic architecture mapping and vulnerability red-teaming with line-level proof.",
|
|
16
|
+
"tools": {
|
|
17
|
+
"read": true,
|
|
18
|
+
"write": true,
|
|
19
|
+
"grep": true,
|
|
20
|
+
"glob": true,
|
|
21
|
+
"iumbtems_code_audit": true,
|
|
22
|
+
"iumbtems_config": true
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"oss-scout": {
|
|
26
|
+
"description": "IUMBTEMS Open Source Scout: Discovers mature OSS packages, audits copyleft licensing, and generates clean-room blueprints.",
|
|
27
|
+
"tools": {
|
|
28
|
+
"read": true,
|
|
29
|
+
"write": true,
|
|
30
|
+
"grep": true,
|
|
31
|
+
"glob": true,
|
|
32
|
+
"iumbtems_oss_scout": true,
|
|
33
|
+
"iumbtems_config": true
|
|
34
|
+
}
|
|
35
|
+
},
|
|
7
36
|
"alpha-thesis": {
|
|
8
37
|
"description": "IUMBTEMS Proponent Agent: Gathers corroborating primary sources, benchmark results, and empirical proofs.",
|
|
9
38
|
"tools": {
|
|
@@ -13,7 +42,9 @@
|
|
|
13
42
|
"grep": true,
|
|
14
43
|
"glob": true,
|
|
15
44
|
"task": true,
|
|
16
|
-
"
|
|
45
|
+
"iumbtems_swarm_research": true,
|
|
46
|
+
"iumbtems_verify_quote": true,
|
|
47
|
+
"iumbtems_config": true
|
|
17
48
|
}
|
|
18
49
|
},
|
|
19
50
|
"beta-redteam": {
|
|
@@ -25,6 +56,7 @@
|
|
|
25
56
|
"grep": true,
|
|
26
57
|
"glob": true,
|
|
27
58
|
"task": true,
|
|
59
|
+
"iumbtems_swarm_research": true,
|
|
28
60
|
"iumbtems_verify_quote": true
|
|
29
61
|
}
|
|
30
62
|
},
|
|
@@ -42,7 +74,11 @@
|
|
|
42
74
|
"skills": {
|
|
43
75
|
"paths": [
|
|
44
76
|
"./skills/grilling",
|
|
45
|
-
"./skills/
|
|
77
|
+
"./skills/research_cache",
|
|
78
|
+
"./skills/epistemic_search",
|
|
79
|
+
"./skills/swarm_config",
|
|
80
|
+
"./skills/code_audit",
|
|
81
|
+
"./skills/oss_scout"
|
|
46
82
|
]
|
|
47
83
|
}
|
|
48
84
|
}
|
package/extensions/pi/index.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* IUMBTEMS: I Use My Brain To Express My Self
|
|
3
3
|
* Native Extension for Pi (pi.dev)
|
|
4
4
|
*
|
|
5
|
-
* Exposes /grill
|
|
5
|
+
* Exposes /swarm, /grill, /swarm-config, /audit, and /scout slash commands
|
|
6
|
+
* along with epistemic verification and configuration tools in Pi.
|
|
6
7
|
*/
|
|
7
8
|
|
|
8
9
|
import { spawnSync } from 'child_process';
|
|
@@ -17,8 +18,9 @@ export default function initPiExtension(pi) {
|
|
|
17
18
|
// Check if Pi extension API is available
|
|
18
19
|
if (!pi) return;
|
|
19
20
|
|
|
20
|
-
// 1. Register
|
|
21
|
+
// 1. Register Slash Commands
|
|
21
22
|
if (typeof pi.registerCommand === 'function') {
|
|
23
|
+
// /swarm: autonomous dialectic research
|
|
22
24
|
pi.registerCommand('swarm', {
|
|
23
25
|
description: 'Run IUMBTEMS dialectic research swarm on an objective',
|
|
24
26
|
usage: '/swarm <objective>',
|
|
@@ -46,7 +48,7 @@ export default function initPiExtension(pi) {
|
|
|
46
48
|
}
|
|
47
49
|
});
|
|
48
50
|
|
|
49
|
-
//
|
|
51
|
+
// /grill: Socratic assumption-inversion
|
|
50
52
|
pi.registerCommand('grill', {
|
|
51
53
|
description: 'Launch Socratic grilling and decision tree frontier exploration',
|
|
52
54
|
usage: '/grill [--objective <text>]',
|
|
@@ -61,10 +63,75 @@ export default function initPiExtension(pi) {
|
|
|
61
63
|
ctx.output?.(res.stdout || res.stderr);
|
|
62
64
|
}
|
|
63
65
|
});
|
|
66
|
+
|
|
67
|
+
// /swarm-config: Inspect and tune research parameters
|
|
68
|
+
pi.registerCommand('swarm-config', {
|
|
69
|
+
description: 'Inspect or update Epistemic Swarm parameters (engine, depth, mode)',
|
|
70
|
+
usage: '/swarm-config [--engine <e>] [--depth <d>] [--mode <m>] [--show]',
|
|
71
|
+
handler: async (args, ctx) => {
|
|
72
|
+
const configScript = path.join(PKG_ROOT, 'skills/swarm_config/configure.py');
|
|
73
|
+
const rawArgs = args.trim() ? args.trim().split(/\s+/) : ['--show'];
|
|
74
|
+
const res = spawnSync('python3', [configScript, ...rawArgs], {
|
|
75
|
+
encoding: 'utf-8',
|
|
76
|
+
cwd: ctx.cwd || process.cwd(),
|
|
77
|
+
env: { ...process.env, PYTHONPATH: PKG_ROOT }
|
|
78
|
+
});
|
|
79
|
+
ctx.output?.(res.stdout || res.stderr);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
// /audit: Dialectic codebase architecture & security audit
|
|
84
|
+
pi.registerCommand('audit', {
|
|
85
|
+
description: 'Run dialectic codebase architectural and security audit with line-level proof',
|
|
86
|
+
usage: '/audit <target_path_or_scope>',
|
|
87
|
+
handler: async (args, ctx) => {
|
|
88
|
+
const target = args.trim() || 'Full repository architecture and vulnerability audit';
|
|
89
|
+
ctx.output?.(`🛡️ [IUMBTEMS Audit] Launching Codebase Audit for: "${target}"...`);
|
|
90
|
+
const runnerPath = path.join(PKG_ROOT, 'runner/research_swarm.py');
|
|
91
|
+
const res = spawnSync('python3', [runnerPath, '--mode', 'audit', '--objective', target], {
|
|
92
|
+
encoding: 'utf-8',
|
|
93
|
+
cwd: ctx.cwd || process.cwd(),
|
|
94
|
+
env: { ...process.env, PYTHONPATH: PKG_ROOT }
|
|
95
|
+
});
|
|
96
|
+
if (res.status === 0) {
|
|
97
|
+
ctx.output?.(res.stdout);
|
|
98
|
+
ctx.output?.('\n✅ Audit complete! Report written to .research/code_audit_report.md');
|
|
99
|
+
} else {
|
|
100
|
+
ctx.output?.(`❌ Audit failed:\n${res.stderr || res.stdout}`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
// /scout: Open-source software discovery & clean-room harvesting
|
|
106
|
+
pi.registerCommand('scout', {
|
|
107
|
+
description: 'Scout open-source software libraries, audit copyleft licenses & generate clean-room blueprints',
|
|
108
|
+
usage: '/scout <feature_or_algorithm>',
|
|
109
|
+
handler: async (args, ctx) => {
|
|
110
|
+
const feature = args.trim();
|
|
111
|
+
if (!feature) {
|
|
112
|
+
ctx.output?.('⚠️ Please provide a feature to scout. Example: /scout "Zero-dependency Raft consensus in Rust"');
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
ctx.output?.(`🔭 [IUMBTEMS Scout] Scouting open-source solutions for: "${feature}"...`);
|
|
116
|
+
const runnerPath = path.join(PKG_ROOT, 'runner/research_swarm.py');
|
|
117
|
+
const res = spawnSync('python3', [runnerPath, '--mode', 'scout', '--objective', feature], {
|
|
118
|
+
encoding: 'utf-8',
|
|
119
|
+
cwd: ctx.cwd || process.cwd(),
|
|
120
|
+
env: { ...process.env, PYTHONPATH: PKG_ROOT }
|
|
121
|
+
});
|
|
122
|
+
if (res.status === 0) {
|
|
123
|
+
ctx.output?.(res.stdout);
|
|
124
|
+
ctx.output?.('\n✅ Scout complete! Blueprint written to .research/oss_scout_report.md');
|
|
125
|
+
} else {
|
|
126
|
+
ctx.output?.(`❌ Scout failed:\n${res.stderr || res.stdout}`);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
});
|
|
64
130
|
}
|
|
65
131
|
|
|
66
|
-
//
|
|
132
|
+
// 2. Register Agent Tools
|
|
67
133
|
if (typeof pi.registerTool === 'function') {
|
|
134
|
+
// Tool: iumbtems_verify_quote
|
|
68
135
|
pi.registerTool({
|
|
69
136
|
name: 'iumbtems_verify_quote',
|
|
70
137
|
description: 'Verify that an empirical claim quote matches verbatim text in the source cache',
|
|
@@ -86,5 +153,41 @@ export default function initPiExtension(pi) {
|
|
|
86
153
|
};
|
|
87
154
|
}
|
|
88
155
|
});
|
|
156
|
+
|
|
157
|
+
// Tool: iumbtems_config
|
|
158
|
+
pi.registerTool({
|
|
159
|
+
name: 'iumbtems_config',
|
|
160
|
+
description: 'Inspect or modify Epistemic Swarm configuration parameters (search engine, depth, mode) in .research/config.json',
|
|
161
|
+
parameters: {
|
|
162
|
+
type: 'object',
|
|
163
|
+
properties: {
|
|
164
|
+
search_engine: { type: 'string', enum: ['duckduckgo', 'brave', 'firecrawl', 'searxng'] },
|
|
165
|
+
max_iterations: { type: 'integer', minimum: 1, maximum: 4 },
|
|
166
|
+
mode: { type: 'string', enum: ['research', 'audit', 'scout', 'hybrid'] },
|
|
167
|
+
divergence_threshold: { type: 'number', minimum: 0, maximum: 1 },
|
|
168
|
+
show: { type: 'boolean', default: false }
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
execute: async (args = {}) => {
|
|
172
|
+
const configScript = path.join(PKG_ROOT, 'skills/swarm_config/configure.py');
|
|
173
|
+
const cmdArgs = [configScript];
|
|
174
|
+
if (args.show || (!args.search_engine && !args.max_iterations && !args.mode && args.divergence_threshold === undefined)) {
|
|
175
|
+
cmdArgs.push('--show');
|
|
176
|
+
} else {
|
|
177
|
+
if (args.search_engine) cmdArgs.push('--engine', args.search_engine);
|
|
178
|
+
if (args.max_iterations) cmdArgs.push('--depth', String(args.max_iterations));
|
|
179
|
+
if (args.mode) cmdArgs.push('--mode', args.mode);
|
|
180
|
+
if (args.divergence_threshold !== undefined) cmdArgs.push('--divergence', String(args.divergence_threshold));
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
const res = spawnSync('python3', cmdArgs, {
|
|
184
|
+
encoding: 'utf-8',
|
|
185
|
+
env: { ...process.env, PYTHONPATH: PKG_ROOT }
|
|
186
|
+
});
|
|
187
|
+
return {
|
|
188
|
+
content: [{ type: 'text', text: res.stdout || res.stderr }]
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
});
|
|
89
192
|
}
|
|
90
193
|
}
|
package/hooks/hooks.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"PreToolUse": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "WebSearch",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"deny\",\"permissionDecisionReason\":\"WebSearch intercepted by epistemic-swarm to enforce verified citation integrity. Use epistemic search (python3 ${CLAUDE_PLUGIN_ROOT}/skills/epistemic_search/scripts/search.py \\\"<query>\\\") instead.\"}}'"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"matcher": "WebFetch",
|
|
15
|
+
"hooks": [
|
|
16
|
+
{
|
|
17
|
+
"type": "command",
|
|
18
|
+
"command": "echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"deny\",\"permissionDecisionReason\":\"WebFetch intercepted by epistemic-swarm to enforce content-addressed caching. Use epistemic fetch (python3 ${CLAUDE_PLUGIN_ROOT}/skills/epistemic_search/scripts/fetch.py \\\"<url>\\\") which automatically stores documents in .research/sources/<sha256>.md for mathematical auditability.\"}}'"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heretek-ai/epistemic-swarm",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "IUMBTEMS: I Use My Brain To Express My Self — High-Integrity Dialectic Research Agent Harness for Claude Code, Pi (pi.dev), and OpenCode V2",
|
|
5
5
|
"main": "bin/cli.js",
|
|
6
6
|
"bin": {
|
|
@@ -26,17 +26,33 @@
|
|
|
26
26
|
"homepage": "https://github.com/Heretek-AI/IUMBTEMS#readme",
|
|
27
27
|
"keywords": [
|
|
28
28
|
"iumbtems",
|
|
29
|
+
"i-use-my-brain-to-express-my-self",
|
|
29
30
|
"pi-package",
|
|
30
31
|
"opencode",
|
|
31
32
|
"opencode-plugin",
|
|
32
33
|
"claude-code",
|
|
33
34
|
"ai-agents",
|
|
35
|
+
"autonomous-agents",
|
|
36
|
+
"multi-agent-systems",
|
|
34
37
|
"dialectic-swarm",
|
|
38
|
+
"dialectic",
|
|
35
39
|
"epistemic-integrity",
|
|
36
40
|
"research-harness",
|
|
41
|
+
"research-agent",
|
|
37
42
|
"mcp",
|
|
43
|
+
"model-context-protocol",
|
|
44
|
+
"mcp-servers",
|
|
38
45
|
"deep-research",
|
|
39
|
-
"socratic-grilling"
|
|
46
|
+
"socratic-grilling",
|
|
47
|
+
"socratic-questioning",
|
|
48
|
+
"fact-checking",
|
|
49
|
+
"red-teaming",
|
|
50
|
+
"citation-validation",
|
|
51
|
+
"hallucination-prevention",
|
|
52
|
+
"swarm-intelligence",
|
|
53
|
+
"code-audit",
|
|
54
|
+
"oss-scout",
|
|
55
|
+
"clean-room-engineering"
|
|
40
56
|
],
|
|
41
57
|
"pi": {
|
|
42
58
|
"extensions": [
|
|
@@ -44,7 +60,11 @@
|
|
|
44
60
|
],
|
|
45
61
|
"skills": [
|
|
46
62
|
"./skills/grilling",
|
|
47
|
-
"./skills/
|
|
63
|
+
"./skills/research_cache",
|
|
64
|
+
"./skills/epistemic_search",
|
|
65
|
+
"./skills/swarm_config",
|
|
66
|
+
"./skills/code_audit",
|
|
67
|
+
"./skills/oss_scout"
|
|
48
68
|
],
|
|
49
69
|
"prompts": [
|
|
50
70
|
"./prompts/*.md"
|
|
@@ -56,6 +76,7 @@
|
|
|
56
76
|
"bin",
|
|
57
77
|
"prompts",
|
|
58
78
|
"skills",
|
|
79
|
+
"hooks",
|
|
59
80
|
"config",
|
|
60
81
|
"runner",
|
|
61
82
|
"extensions",
|
|
@@ -63,6 +84,7 @@
|
|
|
63
84
|
".claude-plugin",
|
|
64
85
|
"install.sh",
|
|
65
86
|
"README.md",
|
|
87
|
+
"MARKETPLACE.md",
|
|
66
88
|
"LICENSE"
|
|
67
89
|
],
|
|
68
90
|
"engines": {
|
|
@@ -70,6 +92,7 @@
|
|
|
70
92
|
},
|
|
71
93
|
"scripts": {
|
|
72
94
|
"test": "python3 -m unittest discover -s runner/tests",
|
|
95
|
+
"validate:claude": "claude plugin validate --strict .claude-plugin/marketplace.json && claude plugin validate --strict .",
|
|
73
96
|
"prepack": "python3 -m unittest discover -s runner/tests",
|
|
74
97
|
"install-local": "bash install.sh"
|
|
75
98
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* IUMBTEMS: I Use My Brain To Express My Self
|
|
3
3
|
* Native Plugin for OpenCode V2 (opencode.ai)
|
|
4
4
|
*
|
|
5
|
-
* Exposes dialectic swarm research tools,
|
|
6
|
-
* and content-addressed quote verification directly into OpenCode V2 agents.
|
|
5
|
+
* Exposes dialectic swarm research tools, codebase auditing, open-source scouting,
|
|
6
|
+
* configuration management, and content-addressed quote verification directly into OpenCode V2 agents.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { spawnSync } from 'child_process';
|
|
@@ -18,10 +18,150 @@ export function createOpenCodePlugin(context = {}) {
|
|
|
18
18
|
return {
|
|
19
19
|
id: "heretek.iumbtems.epistemic-swarm",
|
|
20
20
|
name: "IUMBTEMS Epistemic Swarm",
|
|
21
|
-
version: "0.
|
|
22
|
-
description: "I Use My Brain To Express My Self:
|
|
21
|
+
version: "0.2.3",
|
|
22
|
+
description: "I Use My Brain To Express My Self: High-integrity dialectic research, code audits, and open-source scouting",
|
|
23
23
|
|
|
24
24
|
server: (toolContext) => [
|
|
25
|
+
{
|
|
26
|
+
name: "iumbtems_config",
|
|
27
|
+
description: "Inspect or modify the active Epistemic Swarm configuration (search engine, depth/iterations, operating mode, divergence threshold) in .research/config.json.",
|
|
28
|
+
input: {
|
|
29
|
+
type: "object",
|
|
30
|
+
properties: {
|
|
31
|
+
search_engine: {
|
|
32
|
+
type: "string",
|
|
33
|
+
enum: ["duckduckgo", "brave", "firecrawl", "searxng"],
|
|
34
|
+
description: "Primary search engine (duckduckgo is the zero-key free default)"
|
|
35
|
+
},
|
|
36
|
+
max_iterations: {
|
|
37
|
+
type: "integer",
|
|
38
|
+
minimum: 1,
|
|
39
|
+
maximum: 4,
|
|
40
|
+
description: "Maximum dialectic research iterations / depth (1-4)"
|
|
41
|
+
},
|
|
42
|
+
mode: {
|
|
43
|
+
type: "string",
|
|
44
|
+
enum: ["research", "audit", "scout", "hybrid"],
|
|
45
|
+
description: "Operating mode: research (literature), audit (codebase), scout (OSS), hybrid"
|
|
46
|
+
},
|
|
47
|
+
divergence_threshold: {
|
|
48
|
+
type: "number",
|
|
49
|
+
minimum: 0.0,
|
|
50
|
+
maximum: 1.0,
|
|
51
|
+
description: "Auditor divergence threshold (default 0.75)"
|
|
52
|
+
},
|
|
53
|
+
show: {
|
|
54
|
+
type: "boolean",
|
|
55
|
+
description: "Just inspect current configuration without modifying",
|
|
56
|
+
default: false
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
options: { codemode: false },
|
|
61
|
+
execute: async (args = {}) => {
|
|
62
|
+
const configScript = path.join(PKG_ROOT, "skills/swarm_config/configure.py");
|
|
63
|
+
const cmdArgs = [configScript];
|
|
64
|
+
|
|
65
|
+
if (args.show || (!args.search_engine && !args.max_iterations && !args.mode && args.divergence_threshold === undefined)) {
|
|
66
|
+
cmdArgs.push("--show");
|
|
67
|
+
} else {
|
|
68
|
+
if (args.search_engine) cmdArgs.push("--engine", args.search_engine);
|
|
69
|
+
if (args.max_iterations) cmdArgs.push("--depth", String(args.max_iterations));
|
|
70
|
+
if (args.mode) cmdArgs.push("--mode", args.mode);
|
|
71
|
+
if (args.divergence_threshold !== undefined) cmdArgs.push("--divergence", String(args.divergence_threshold));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const res = spawnSync("python3", cmdArgs, {
|
|
75
|
+
encoding: "utf-8",
|
|
76
|
+
cwd: toolContext?.cwd || process.cwd(),
|
|
77
|
+
env: { ...process.env, PYTHONPATH: PKG_ROOT }
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
content: res.stdout || res.stderr,
|
|
82
|
+
status: res.status === 0 ? "success" : "error"
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
{
|
|
88
|
+
name: "iumbtems_code_audit",
|
|
89
|
+
description: "Run a dialectic codebase architectural and security audit pairing a structural architect with an adversarial red-teamer.",
|
|
90
|
+
input: {
|
|
91
|
+
type: "object",
|
|
92
|
+
properties: {
|
|
93
|
+
target: {
|
|
94
|
+
type: "string",
|
|
95
|
+
description: "Target directory, file, or architectural component to audit"
|
|
96
|
+
},
|
|
97
|
+
mock_mode: {
|
|
98
|
+
type: "boolean",
|
|
99
|
+
description: "Run in mock mode without invoking LLM tokens",
|
|
100
|
+
default: false
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
required: ["target"]
|
|
104
|
+
},
|
|
105
|
+
options: { codemode: false },
|
|
106
|
+
execute: async (args) => {
|
|
107
|
+
const runnerPath = path.join(PKG_ROOT, "runner/research_swarm.py");
|
|
108
|
+
const cmdArgs = [runnerPath, "--mode", "audit", "--objective", args.target];
|
|
109
|
+
if (args.mock_mode) {
|
|
110
|
+
cmdArgs.push("--mock-claude");
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const res = spawnSync("python3", cmdArgs, {
|
|
114
|
+
encoding: "utf-8",
|
|
115
|
+
cwd: toolContext?.cwd || process.cwd(),
|
|
116
|
+
env: { ...process.env, PYTHONPATH: PKG_ROOT }
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
return {
|
|
120
|
+
content: res.stdout || res.stderr,
|
|
121
|
+
status: res.status === 0 ? "success" : "error"
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
{
|
|
127
|
+
name: "iumbtems_oss_scout",
|
|
128
|
+
description: "Scout open-source software libraries, benchmark candidate implementations, red-team viral copyleft (GPL/AGPL), and produce clean-room implementation blueprints.",
|
|
129
|
+
input: {
|
|
130
|
+
type: "object",
|
|
131
|
+
properties: {
|
|
132
|
+
feature: {
|
|
133
|
+
type: "string",
|
|
134
|
+
description: "The feature, algorithm, or capability to scout in open source"
|
|
135
|
+
},
|
|
136
|
+
mock_mode: {
|
|
137
|
+
type: "boolean",
|
|
138
|
+
description: "Run in mock mode without invoking LLM tokens",
|
|
139
|
+
default: false
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
required: ["feature"]
|
|
143
|
+
},
|
|
144
|
+
options: { codemode: false },
|
|
145
|
+
execute: async (args) => {
|
|
146
|
+
const runnerPath = path.join(PKG_ROOT, "runner/research_swarm.py");
|
|
147
|
+
const cmdArgs = [runnerPath, "--mode", "scout", "--objective", args.feature];
|
|
148
|
+
if (args.mock_mode) {
|
|
149
|
+
cmdArgs.push("--mock-claude");
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const res = spawnSync("python3", cmdArgs, {
|
|
153
|
+
encoding: "utf-8",
|
|
154
|
+
cwd: toolContext?.cwd || process.cwd(),
|
|
155
|
+
env: { ...process.env, PYTHONPATH: PKG_ROOT }
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
return {
|
|
159
|
+
content: res.stdout || res.stderr,
|
|
160
|
+
status: res.status === 0 ? "success" : "error"
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
|
|
25
165
|
{
|
|
26
166
|
name: "iumbtems_swarm_research",
|
|
27
167
|
description: "Execute an autonomous dialectic research swarm on an objective using Agent Alpha (Thesis) and Agent Beta (Red Team).",
|
|
@@ -139,7 +279,21 @@ export function createOpenCodePlugin(context = {}) {
|
|
|
139
279
|
],
|
|
140
280
|
|
|
141
281
|
setup: async (appContext) => {
|
|
142
|
-
|
|
282
|
+
const opts = context.options || appContext?.options;
|
|
283
|
+
if (opts && typeof opts === "object") {
|
|
284
|
+
const configScript = path.join(PKG_ROOT, "skills/swarm_config/configure.py");
|
|
285
|
+
const cmdArgs = [configScript];
|
|
286
|
+
if (opts.search_engine) cmdArgs.push("--engine", opts.search_engine);
|
|
287
|
+
if (opts.max_iterations) cmdArgs.push("--depth", String(opts.max_iterations));
|
|
288
|
+
if (opts.mode) cmdArgs.push("--mode", opts.mode);
|
|
289
|
+
if (opts.divergence_threshold !== undefined) cmdArgs.push("--divergence", String(opts.divergence_threshold));
|
|
290
|
+
if (cmdArgs.length > 1) {
|
|
291
|
+
spawnSync("python3", cmdArgs, {
|
|
292
|
+
cwd: appContext?.cwd || toolContext?.cwd || process.cwd(),
|
|
293
|
+
env: { ...process.env, PYTHONPATH: PKG_ROOT }
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
}
|
|
143
297
|
return { initialized: true, platform: "opencode-v2" };
|
|
144
298
|
}
|
|
145
299
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "research-cache",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Content-addressed SHA256 Markdown source hashing and verbatim quote verification engine.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Heretek AI",
|
|
7
|
+
"email": "dev@heretek.ai"
|
|
8
|
+
},
|
|
9
|
+
"license": "Apache-2.0",
|
|
10
|
+
"repository": "https://github.com/Heretek-AI/IUMBTEMS",
|
|
11
|
+
"homepage": "https://github.com/Heretek-AI/IUMBTEMS#readme",
|
|
12
|
+
"skills": [
|
|
13
|
+
"./skills/research_cache"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "socratic-grilling",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Matt Pocock-style Socratic interrogation, premise inversion, and lateral exploration skill for Claude Code.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Heretek AI",
|
|
7
|
+
"email": "dev@heretek.ai"
|
|
8
|
+
},
|
|
9
|
+
"license": "Apache-2.0",
|
|
10
|
+
"repository": "https://github.com/Heretek-AI/IUMBTEMS",
|
|
11
|
+
"homepage": "https://github.com/Heretek-AI/IUMBTEMS#readme",
|
|
12
|
+
"skills": [
|
|
13
|
+
"./skills/grilling"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: grilling
|
|
3
|
+
description: Socratic grilling and assumption-inversion skill for deep research. Uses Matt Pocock-style design trees to explore the problem frontier divergently before committing to search queries.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Socratic Grilling & Divergent Research Framing
|
|
7
|
+
|
|
8
|
+
Interview the user relentlessly until you reach an airtight, shared understanding of the research scope. Map the problem as a **design tree**: every foundational assumption branches into the technical decisions and empirical hypotheses that hang off it.
|
|
9
|
+
|
|
10
|
+
## 1. THE FRONTIER METHODOLOGY
|
|
11
|
+
|
|
12
|
+
1. Work the tree in **rounds**.
|
|
13
|
+
2. The **frontier** is every decision whose prerequisites are already settled: the questions you can ask *now* without guessing at answers you haven't heard yet.
|
|
14
|
+
3. Ask the whole frontier in one round: number each question and provide your recommended answer.
|
|
15
|
+
4. Then wait for the user's answers before moving to the next round.
|
|
16
|
+
|
|
17
|
+
## 2. FORMATTING A ROUND
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
❓ **Q1 - <Question Title>**: <Question context, premise inversion, trade-offs, multiple options>
|
|
21
|
+
|
|
22
|
+
➡️ **Recommended**: <Your recommended answer with rationale>
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
❓ **Q2 - <Question Title>**: <Question context, trade-offs>
|
|
27
|
+
|
|
28
|
+
➡️ **Recommended**: <Your recommended answer with rationale>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## 3. FACTUAL VS. DECISIONAL SEPARATION
|
|
32
|
+
|
|
33
|
+
- **Facts are the agent's job**: When a frontier question hinges on an empirical fact (e.g. library benchmarks, API specs, hardware limits), **DO NOT ASK THE USER**. Dispatch a tool call or subagent to look it up in the codebase or online.
|
|
34
|
+
- **Decisions are the user's**: High-level trade-offs, architectural philosophy, threat models, and priority ranking belong to the user. Put each decision to them clearly.
|
|
35
|
+
|
|
36
|
+
## 4. ASSUMPTION INVERSION TACTICS
|
|
37
|
+
|
|
38
|
+
Always challenge default premises in Round 1:
|
|
39
|
+
- *Inversion*: What if the primary objective is rendered obsolete by a radical alternative?
|
|
40
|
+
- *Scale Extremes*: What breaks at 100x scale? What breaks at 0 resources?
|
|
41
|
+
- *Adversarial Posture*: How would an intelligent adversary exploit or falsify this design?
|
|
42
|
+
|
|
43
|
+
## 5. FRONTIER RESOLUTION & FREEZING
|
|
44
|
+
|
|
45
|
+
When every branch of the design tree has been visited and the frontier is empty:
|
|
46
|
+
1. Summarize the settled constraints.
|
|
47
|
+
2. Save the settled state to `.research/frontier.json` using `python3 skills/grilling/socratic_tree.py --export`.
|
|
48
|
+
3. Hand off the settled frontier to the **Swarm Orchestrator** to begin empirical dialectic execution.
|
|
File without changes
|