@heretek-ai/epistemic-swarm 0.4.8 → 0.6.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/darkharvest/SKILL.md +13 -0
- package/.agents/skills/factory/SKILL.md +13 -0
- package/.omp/commands/darkharvest.md +11 -0
- package/.omp/commands/domainexpansion.md +9 -0
- package/.omp/commands/factory.md +9 -0
- package/README.md +13 -0
- package/bin/cli.js +35 -0
- package/config/opencode-snippet.json +101 -1
- package/extensions/pi/index.js +47 -1
- package/package.json +7 -3
- package/plugins/antigravity/skills/darkharvest/SKILL.md +13 -0
- package/plugins/antigravity/skills/factory/SKILL.md +13 -0
- package/plugins/codex/skills/darkharvest/SKILL.md +13 -0
- package/plugins/codex/skills/factory/SKILL.md +13 -0
- package/plugins/gemini/commands/darkharvest.toml +8 -0
- package/plugins/gemini/commands/domainexpansion.toml +7 -0
- package/plugins/gemini/commands/factory.toml +8 -0
- package/plugins/gemini/skills/darkharvest/SKILL.md +13 -0
- package/plugins/gemini/skills/factory/SKILL.md +13 -0
- package/plugins/opencode/index.js +84 -2
- package/prompts/agent_darkharvest.md +91 -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__/path_safety.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/mcp_server.py +202 -62
- package/runner/research_swarm.py +138 -16
- package/runner/tests/__pycache__/test_auction_order.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_bet1_spike.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_factory.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_opencode_ux.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/__pycache__/test_sweep_regressions.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_webcache.cpython-311.pyc +0 -0
- package/runner/tests/test_factory.py +199 -0
- package/runner/tests/test_mcp_server.py +80 -37
- package/runner/tests/test_opencode_ux.py +35 -8
- package/runner/tests/test_swarm.py +14 -0
- package/runner/tests/test_sweep_regressions.py +47 -0
- package/scripts/__pycache__/bet1_advisory_spike.cpython-311.pyc +0 -0
- package/scripts/__pycache__/build_adapters.cpython-311.pyc +0 -0
- package/scripts/__pycache__/divergence_experiment.cpython-311.pyc +0 -0
- package/scripts/build_adapters.py +16 -2
- package/skills/darkharvest/SKILL.md +70 -0
- package/skills/darkharvest/scripts/harvest.py +252 -0
- package/skills/epistemic_search/scripts/__pycache__/search.cpython-311.pyc +0 -0
- package/skills/factory/SKILL.md +51 -0
- package/skills/factory/scripts/factory.py +212 -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/__pycache__/__init__.cpython-311.pyc +0 -0
- package/skills/swarm_config/__pycache__/configure.cpython-311.pyc +0 -0
- package/skills/swarm_config/configure.py +12 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Darkharvest (thin adapter stub)
|
|
2
|
+
|
|
3
|
+
This file is a POINTER, not the implementation. It exists so harness skill
|
|
4
|
+
discovery finds an entry; the real skill lives in the IUMBTEMS repo.
|
|
5
|
+
|
|
6
|
+
- Canonical prose & scripts: `skills/darkharvest/`
|
|
7
|
+
- Canonical programmatic surface: `python3 runner/mcp_server.py` (stdio MCP),
|
|
8
|
+
or one-shot: `python3 runner/mcp_server.py call <tool> '{...json...}'`
|
|
9
|
+
- MCP tools for this skill: `iumbtems_darkharvest`
|
|
10
|
+
|
|
11
|
+
Epistemic rules apply regardless of harness: tag claims as
|
|
12
|
+
`[VERIFIED: <hash>]`, `[INFERRED: <reasoning>]`, `[HYPOTHESIS: <test>]`, or
|
|
13
|
+
`[NEGATIVE_KNOWLEDGE: <query>]`. Writes go only to `.research/`.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Factory (thin adapter stub)
|
|
2
|
+
|
|
3
|
+
This file is a POINTER, not the implementation. It exists so harness skill
|
|
4
|
+
discovery finds an entry; the real skill lives in the IUMBTEMS repo.
|
|
5
|
+
|
|
6
|
+
- Canonical prose & scripts: `skills/factory/`
|
|
7
|
+
- Canonical programmatic surface: `python3 runner/mcp_server.py` (stdio MCP),
|
|
8
|
+
or one-shot: `python3 runner/mcp_server.py call <tool> '{...json...}'`
|
|
9
|
+
- MCP tools for this skill: `iumbtems_brainstorm`, `iumbtems_darkharvest`, `iumbtems_socratic_frontier`
|
|
10
|
+
|
|
11
|
+
Epistemic rules apply regardless of harness: tag claims as
|
|
12
|
+
`[VERIFIED: <hash>]`, `[INFERRED: <reasoning>]`, `[HYPOTHESIS: <test>]`, or
|
|
13
|
+
`[NEGATIVE_KNOWLEDGE: <query>]`. Writes go only to `.research/`.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Product competitor teardown with per-feature harvest verdicts
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Run a product competitor teardown for `$1`:
|
|
6
|
+
|
|
7
|
+
`python3 runner/research_swarm.py --mode darkharvest --objective "$1"`
|
|
8
|
+
|
|
9
|
+
Seeds may be embedded as repo URLs; cap live runs at `--max-repos 6`.
|
|
10
|
+
Permissive-only vendor; GPL/AGPL clean-room-rebuild only; workflows clonable, assets never.
|
|
11
|
+
Report: `.research/darkharvest_report.md` (matrix + white-space gaps + SPDX backlog).
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Autonomous agent-guided self-improvement loop (count-flagged)
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Run the IUMBTEMS domain-expansion loop for `$1` loops (max 10):
|
|
6
|
+
|
|
7
|
+
Bypasses per-loop gates; stops on count OR `.factory/STOP` file OR user kill.
|
|
8
|
+
Each loop: agents propose direction, quick swarm check, implement, dual-QA verify.
|
|
9
|
+
Enforce via `python3 skills/factory/scripts/factory.py expansion --run <run> --loops $1`.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Coding-factory Manager loop with grill-gated phased builds
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Run the IUMBTEMS coding-factory Manager loop for `$1`:
|
|
6
|
+
|
|
7
|
+
1. Grill until `.factory/frontier.json` is settled (max 5 swarm cycles per gate); explicit user approve advances each gate.
|
|
8
|
+
2. Per gate: `python3 runner/research_swarm.py --mode brainstorm` plus `--mode darkharvest` (mock-first), then synthesize `.roadmap/<phase>/` GOAL.md + dossier.json.
|
|
9
|
+
3. Programmer subagent per phase; qa-a plus qa-b per phase; retries tracked via `python3 skills/factory/scripts/factory.py` (3 failures escalate).
|
package/README.md
CHANGED
|
@@ -146,6 +146,16 @@ iumbtems run "Sub-millisecond ZK state updates on L1 rollups"
|
|
|
146
146
|
# Run lateral brainstorming (divergent what-if ideation, never bug fixes)
|
|
147
147
|
iumbtems brainstorm "Where do we go from here?"
|
|
148
148
|
|
|
149
|
+
# Product competitor teardown with per-feature harvest verdicts
|
|
150
|
+
iumbtems darkharvest "Paseo-class agent harness competitor" --seeds https://github.com/a/b,https://github.com/c/d --max-repos 6 --mock-claude
|
|
151
|
+
|
|
152
|
+
# Coding-factory run-state helper (init, phase-add, qa-record, expansion, stop)
|
|
153
|
+
iumbtems factory init --run arena
|
|
154
|
+
iumbtems factory phase-add --run arena --phase 01-handoff --goal "Session handoff" --accept "round-trips;STOP kills loop"
|
|
155
|
+
iumbtems factory expansion --run arena --loops 10
|
|
156
|
+
|
|
157
|
+
# OpenCode slash commands (also Pi/OMP/Gemini): /factory, /domainexpansion, /darkharvest, /scout, /audit, /grill, /swarm
|
|
158
|
+
|
|
149
159
|
# Run Socratic grilling and decision frontier calculation
|
|
150
160
|
iumbtems grill --objective "L1 vs L2 state verification trade-offs"
|
|
151
161
|
|
|
@@ -160,6 +170,9 @@ iumbtems test
|
|
|
160
170
|
- **`/swarm-config`**: Interactive tuning of search engines (DuckDuckGo, Brave, Firecrawl, SearXNG), iteration depth, divergence thresholds, and operating modes.
|
|
161
171
|
- **`/code-audit`**: Dialectic codebase review pairing a Structural Architect (thesis) with a Vulnerability Red-Teamer (antithesis) enforcing line-number proofs (`file:///path#L10-25`).
|
|
162
172
|
- **`/oss-scout`**: Evaluates GitHub repositories, package ecosystems (npm, crates.io, PyPI), license contamination (GPL/AGPL copyleft vs MIT/Apache), and outputs clean-room re-implementation blueprints.
|
|
173
|
+
- **`/darkharvest`**: Product competitor teardown (seed inspirations + prompt, expand to adjacents). Competitor × capability matrix, both-ways white-space gaps, per-feature `depend|vendor|clean-room-rebuild|skip` verdicts with SPDX attribution. Permissive-only vendoring; GPL/AGPL spec-rebuild only.
|
|
174
|
+
- **`/factory`**: Coding-factory Manager loop — grill-gated phased build (manager profile), per-phase programmer spawns, dual QA (3 retries then escalate), explicit sign-off per phase.
|
|
175
|
+
- **`/domainexpansion`**: Autonomous agent-guided self-improvement loop (`/domainexpansion <n>`, max 10); bypasses gates, stops on count OR `.factory/STOP` OR user kill.
|
|
163
176
|
- **`/grilling`**: Socratic assumption-inversion and Matt Pocock-style design tree frontier discovery.
|
|
164
177
|
- **`epistemic_search`**: Zero-key DuckDuckGo Lite search and content-addressed fetch with automatic SHA-256 caching.
|
|
165
178
|
|
package/bin/cli.js
CHANGED
|
@@ -49,6 +49,8 @@ Commands:
|
|
|
49
49
|
scout "<feature>" Scout open-source software, libraries & clean-room blueprints
|
|
50
50
|
run "<objective>" Run the dialectic multi-agent research swarm
|
|
51
51
|
brainstorm "<prompt>" Run lateral brainstorming (feature vectors + spikes)
|
|
52
|
+
darkharvest "<arena>" Product competitor teardown with harvest verdicts
|
|
53
|
+
factory <subcommand> Factory run-state helper (init, phase-add, qa-record, expansion, stop)
|
|
52
54
|
grill Launch interactive Socratic decision tree framing
|
|
53
55
|
adapters Rebuild harness adapter mirrors (skills -> plugins/*, .agents)
|
|
54
56
|
install Install skills & MCP servers into ~/.claude/
|
|
@@ -80,6 +82,8 @@ Examples:
|
|
|
80
82
|
iumbtems scout "Zero-dependency Raft consensus in Rust"
|
|
81
83
|
iumbtems run "Verify sub-millisecond ZK prover latency"
|
|
82
84
|
iumbtems brainstorm "Where do we go from here?"
|
|
85
|
+
iumbtems darkharvest "Paseo-class agent harness competitor" --seeds https://github.com/a/b,https://github.com/c/d --max-repos 6 --mock-claude
|
|
86
|
+
iumbtems factory init --run arena && iumbtems factory phase-add --run arena --phase 01-x --goal "..." --accept "a;b"
|
|
83
87
|
iumbtems grill --objective "Rollup architecture trade-offs"
|
|
84
88
|
iumbtems doctor
|
|
85
89
|
`);
|
|
@@ -160,6 +164,37 @@ switch (command) {
|
|
|
160
164
|
break;
|
|
161
165
|
}
|
|
162
166
|
|
|
167
|
+
case 'darkharvest': {
|
|
168
|
+
const objective = args[1];
|
|
169
|
+
if (!objective || objective.startsWith('--')) {
|
|
170
|
+
console.error('Error: Please provide a product arena to tear down.');
|
|
171
|
+
console.error('Example: npx @heretek-ai/epistemic-swarm darkharvest "Paseo-class harness" --seeds https://github.com/a/b --max-repos 6');
|
|
172
|
+
process.exit(1);
|
|
173
|
+
}
|
|
174
|
+
const forwardArgs = ['--mode', 'darkharvest', '--objective', objective, ...args.slice(2)];
|
|
175
|
+
runPython('runner/research_swarm.py', forwardArgs);
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
case 'factory': {
|
|
180
|
+
// Factory run-state helper: forward subcommands to skills/factory/scripts/factory.py
|
|
181
|
+
// e.g. iumbtems factory init --run arena
|
|
182
|
+
// iumbtems factory qa-record --run arena --phase 01-x --seat qa-a --verdict pass
|
|
183
|
+
if (args[1] === '--help' || !args[1]) {
|
|
184
|
+
console.log([
|
|
185
|
+
'Usage: iumbtems factory <init|phase-add|qa-record|expansion|stop> [options]',
|
|
186
|
+
' init --run <name>',
|
|
187
|
+
' phase-add --run <name> --phase <id> --goal "<goal>" --accept "a;b"',
|
|
188
|
+
' qa-record --run <name> --phase <id> --seat <qa-a|qa-b> --verdict <pass|fail|conditional> [--reason "..."]',
|
|
189
|
+
' expansion --run <name> --loops <n> [--max-loops 10]',
|
|
190
|
+
' stop --run <name> (writes .factory/STOP kill-file)',
|
|
191
|
+
].join('\n'));
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
runPython('skills/factory/scripts/factory.py', args.slice(1));
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
|
|
163
198
|
case 'grill': {
|
|
164
199
|
runPython('skills/grilling/socratic_tree.py', args.slice(1));
|
|
165
200
|
break;
|
|
@@ -87,6 +87,104 @@
|
|
|
87
87
|
"iumbtems_brainstorm": true,
|
|
88
88
|
"iumbtems_config": true
|
|
89
89
|
}
|
|
90
|
+
},
|
|
91
|
+
"darkharvester": {
|
|
92
|
+
"description": "IUMBTEMS Competitor Teardown: seed plus expand, product plus code matrix, per-feature harvest verdicts with SPDX attribution.",
|
|
93
|
+
"tools": {
|
|
94
|
+
"read": true,
|
|
95
|
+
"write": true,
|
|
96
|
+
"grep": true,
|
|
97
|
+
"glob": true,
|
|
98
|
+
"iumbtems_darkharvest": true,
|
|
99
|
+
"iumbtems_verify_quote": true,
|
|
100
|
+
"iumbtems_config": true
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"manager": {
|
|
104
|
+
"description": "IUMBTEMS Factory Manager: grill-gated phased builds. Owns gates, swarm dispatch, roadmap synthesis, QA tiebreaks. Never writes code.",
|
|
105
|
+
"mode": "primary",
|
|
106
|
+
"temperature": 0.2,
|
|
107
|
+
"permission": {
|
|
108
|
+
"edit": "deny",
|
|
109
|
+
"bash": "ask",
|
|
110
|
+
"task": {
|
|
111
|
+
"*": "deny",
|
|
112
|
+
"factory-*": "allow",
|
|
113
|
+
"programmer": "allow",
|
|
114
|
+
"qa-a": "allow",
|
|
115
|
+
"qa-b": "allow",
|
|
116
|
+
"brainstormer": "allow",
|
|
117
|
+
"darkharvester": "allow"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"tools": {
|
|
121
|
+
"read": true,
|
|
122
|
+
"write": true,
|
|
123
|
+
"grep": true,
|
|
124
|
+
"glob": true,
|
|
125
|
+
"task": true,
|
|
126
|
+
"iumbtems_brainstorm": true,
|
|
127
|
+
"iumbtems_darkharvest": true,
|
|
128
|
+
"iumbtems_verify_quote": true,
|
|
129
|
+
"iumbtems_socratic_frontier": true,
|
|
130
|
+
"iumbtems_config": true
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"programmer": {
|
|
134
|
+
"description": "IUMBTEMS Factory Programmer: implements exactly one phase brief per spawn. Cites phase evidence hashes. Never invokes swarms or other programmers.",
|
|
135
|
+
"mode": "subagent",
|
|
136
|
+
"temperature": 0.3,
|
|
137
|
+
"permission": {
|
|
138
|
+
"edit": "allow",
|
|
139
|
+
"bash": "ask",
|
|
140
|
+
"task": {
|
|
141
|
+
"*": "deny"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"tools": {
|
|
145
|
+
"read": true,
|
|
146
|
+
"write": true,
|
|
147
|
+
"bash": true,
|
|
148
|
+
"grep": true,
|
|
149
|
+
"glob": true,
|
|
150
|
+
"iumbtems_verify_quote": true
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"qa-a": {
|
|
154
|
+
"description": "IUMBTEMS Factory QA (functional): verifies phase acceptance criteria pass on the real surface. Read-only plus test execution. Diverged prompt from qa-b.",
|
|
155
|
+
"mode": "subagent",
|
|
156
|
+
"temperature": 0.1,
|
|
157
|
+
"permission": {
|
|
158
|
+
"edit": "deny",
|
|
159
|
+
"bash": "ask",
|
|
160
|
+
"task": {
|
|
161
|
+
"*": "deny"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"tools": {
|
|
165
|
+
"read": true,
|
|
166
|
+
"bash": true,
|
|
167
|
+
"grep": true,
|
|
168
|
+
"glob": true
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"qa-b": {
|
|
172
|
+
"description": "IUMBTEMS Factory QA (adversarial): hunts edge cases, regressions, and acceptance loopholes the functional pass missed. Read-only plus test execution. Diverged prompt from qa-a.",
|
|
173
|
+
"mode": "subagent",
|
|
174
|
+
"temperature": 0.4,
|
|
175
|
+
"permission": {
|
|
176
|
+
"edit": "deny",
|
|
177
|
+
"bash": "ask",
|
|
178
|
+
"task": {
|
|
179
|
+
"*": "deny"
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"tools": {
|
|
183
|
+
"read": true,
|
|
184
|
+
"bash": true,
|
|
185
|
+
"grep": true,
|
|
186
|
+
"glob": true
|
|
187
|
+
}
|
|
90
188
|
}
|
|
91
189
|
},
|
|
92
190
|
"skills": {
|
|
@@ -97,7 +195,9 @@
|
|
|
97
195
|
"./skills/swarm_config",
|
|
98
196
|
"./skills/code_audit",
|
|
99
197
|
"./skills/oss_scout",
|
|
100
|
-
"./skills/brainstorming"
|
|
198
|
+
"./skills/brainstorming",
|
|
199
|
+
"./skills/darkharvest",
|
|
200
|
+
"./skills/factory"
|
|
101
201
|
]
|
|
102
202
|
}
|
|
103
203
|
}
|
package/extensions/pi/index.js
CHANGED
|
@@ -202,6 +202,27 @@ export default function initPiExtension(pi) {
|
|
|
202
202
|
}
|
|
203
203
|
});
|
|
204
204
|
} catch { /* alias is best-effort across pi/omp versions */ }
|
|
205
|
+
|
|
206
|
+
// /darkharvest: Product competitor teardown with harvest verdicts
|
|
207
|
+
pi.registerCommand('darkharvest', {
|
|
208
|
+
description: 'Product competitor teardown: seed inspirations, expand to adjacents, emit harvest verdicts',
|
|
209
|
+
usage: '/darkharvest <product-arena> [--seeds <urls>]',
|
|
210
|
+
handler: async (args, ctx) => {
|
|
211
|
+
const objective = args.trim();
|
|
212
|
+
if (!objective) {
|
|
213
|
+
ctx.output?.('⚠️ Please provide a product arena. Example: /darkharvest "Paseo-class agent harness" --seeds https://github.com/a/b');
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
ctx.output?.(`🌑 [IUMBTEMS Darkharvest] Tearing down: "${objective}"...`);
|
|
217
|
+
const r = callMcp('iumbtems_darkharvest', { objective }, ctx);
|
|
218
|
+
if (r.ok) {
|
|
219
|
+
ctx.output?.(r.text);
|
|
220
|
+
ctx.output?.('\n✅ Darkharvest complete! Matrix written to .research/darkharvest_report.md');
|
|
221
|
+
} else {
|
|
222
|
+
ctx.output?.(`❌ Darkharvest failed:\n${r.text}`);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
});
|
|
205
226
|
}
|
|
206
227
|
|
|
207
228
|
// 2. Register Agent Tools (thin forwarders)
|
|
@@ -233,7 +254,7 @@ export default function initPiExtension(pi) {
|
|
|
233
254
|
properties: {
|
|
234
255
|
search_engine: { type: 'string', enum: ['duckduckgo', 'brave', 'firecrawl', 'searxng'] },
|
|
235
256
|
max_iterations: { type: 'integer', minimum: 1, maximum: 4 },
|
|
236
|
-
mode: { type: 'string', enum: ['research', 'audit', 'scout', 'hybrid', 'brainstorm'] },
|
|
257
|
+
mode: { type: 'string', enum: ['research', 'audit', 'scout', 'hybrid', 'brainstorm', 'darkharvest'] },
|
|
237
258
|
divergence_threshold: { type: 'number', minimum: 0, maximum: 1 },
|
|
238
259
|
show: { type: 'boolean', default: false }
|
|
239
260
|
}
|
|
@@ -264,6 +285,31 @@ export default function initPiExtension(pi) {
|
|
|
264
285
|
return { content: [{ type: 'text', text: r.text }] };
|
|
265
286
|
}
|
|
266
287
|
});
|
|
288
|
+
|
|
289
|
+
// Tool: iumbtems_darkharvest (competitor teardown)
|
|
290
|
+
pi.registerTool({
|
|
291
|
+
name: 'iumbtems_darkharvest',
|
|
292
|
+
description: 'Product competitor teardown with per-feature harvest verdicts and SPDX attribution',
|
|
293
|
+
parameters: {
|
|
294
|
+
type: 'object',
|
|
295
|
+
properties: {
|
|
296
|
+
objective: { type: 'string', description: 'Product arena to tear down' },
|
|
297
|
+
seeds: { type: 'array', items: { type: 'string' }, description: 'Seed inspiration repo URLs' },
|
|
298
|
+
maxRepos: { type: 'integer', description: 'Cap on total competitors', default: 10 },
|
|
299
|
+
mock_mode: { type: 'boolean', description: 'Mock mode without LLM tokens', default: false }
|
|
300
|
+
},
|
|
301
|
+
required: ['objective']
|
|
302
|
+
},
|
|
303
|
+
execute: async (args = {}) => {
|
|
304
|
+
const r = callMcp('iumbtems_darkharvest', {
|
|
305
|
+
objective: args.objective,
|
|
306
|
+
seeds: args.seeds,
|
|
307
|
+
maxRepos: args.maxRepos,
|
|
308
|
+
mock_claude: Boolean(args.mock_mode)
|
|
309
|
+
}, {});
|
|
310
|
+
return { content: [{ type: 'text', text: r.text }] };
|
|
311
|
+
}
|
|
312
|
+
});
|
|
267
313
|
}
|
|
268
314
|
}
|
|
269
315
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heretek-ai/epistemic-swarm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "IUMBTEMS: I Use My Brain To Express My Self — High-Integrity Dialectic Research Agent Harness for Claude Code, OpenCode V2, Pi, OMP (oh-my-pi), Gemini CLI, Codex CLI, and AntiGravity",
|
|
5
5
|
"main": "bin/cli.js",
|
|
6
6
|
"bin": {
|
|
@@ -79,7 +79,9 @@
|
|
|
79
79
|
"./skills/swarm_config",
|
|
80
80
|
"./skills/code_audit",
|
|
81
81
|
"./skills/oss_scout",
|
|
82
|
-
"./skills/brainstorming"
|
|
82
|
+
"./skills/brainstorming",
|
|
83
|
+
"./skills/darkharvest",
|
|
84
|
+
"./skills/factory"
|
|
83
85
|
],
|
|
84
86
|
"prompts": [
|
|
85
87
|
"./prompts/*.md"
|
|
@@ -96,7 +98,9 @@
|
|
|
96
98
|
"./skills/swarm_config",
|
|
97
99
|
"./skills/code_audit",
|
|
98
100
|
"./skills/oss_scout",
|
|
99
|
-
"./skills/brainstorming"
|
|
101
|
+
"./skills/brainstorming",
|
|
102
|
+
"./skills/darkharvest",
|
|
103
|
+
"./skills/factory"
|
|
100
104
|
],
|
|
101
105
|
"prompts": [
|
|
102
106
|
"./prompts/*.md"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Darkharvest (thin adapter stub)
|
|
2
|
+
|
|
3
|
+
This file is a POINTER, not the implementation. It exists so harness skill
|
|
4
|
+
discovery finds an entry; the real skill lives in the IUMBTEMS repo.
|
|
5
|
+
|
|
6
|
+
- Canonical prose & scripts: `skills/darkharvest/`
|
|
7
|
+
- Canonical programmatic surface: `python3 runner/mcp_server.py` (stdio MCP),
|
|
8
|
+
or one-shot: `python3 runner/mcp_server.py call <tool> '{...json...}'`
|
|
9
|
+
- MCP tools for this skill: `iumbtems_darkharvest`
|
|
10
|
+
|
|
11
|
+
Epistemic rules apply regardless of harness: tag claims as
|
|
12
|
+
`[VERIFIED: <hash>]`, `[INFERRED: <reasoning>]`, `[HYPOTHESIS: <test>]`, or
|
|
13
|
+
`[NEGATIVE_KNOWLEDGE: <query>]`. Writes go only to `.research/`.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Factory (thin adapter stub)
|
|
2
|
+
|
|
3
|
+
This file is a POINTER, not the implementation. It exists so harness skill
|
|
4
|
+
discovery finds an entry; the real skill lives in the IUMBTEMS repo.
|
|
5
|
+
|
|
6
|
+
- Canonical prose & scripts: `skills/factory/`
|
|
7
|
+
- Canonical programmatic surface: `python3 runner/mcp_server.py` (stdio MCP),
|
|
8
|
+
or one-shot: `python3 runner/mcp_server.py call <tool> '{...json...}'`
|
|
9
|
+
- MCP tools for this skill: `iumbtems_brainstorm`, `iumbtems_darkharvest`, `iumbtems_socratic_frontier`
|
|
10
|
+
|
|
11
|
+
Epistemic rules apply regardless of harness: tag claims as
|
|
12
|
+
`[VERIFIED: <hash>]`, `[INFERRED: <reasoning>]`, `[HYPOTHESIS: <test>]`, or
|
|
13
|
+
`[NEGATIVE_KNOWLEDGE: <query>]`. Writes go only to `.research/`.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Darkharvest (thin adapter stub)
|
|
2
|
+
|
|
3
|
+
This file is a POINTER, not the implementation. It exists so harness skill
|
|
4
|
+
discovery finds an entry; the real skill lives in the IUMBTEMS repo.
|
|
5
|
+
|
|
6
|
+
- Canonical prose & scripts: `skills/darkharvest/`
|
|
7
|
+
- Canonical programmatic surface: `python3 runner/mcp_server.py` (stdio MCP),
|
|
8
|
+
or one-shot: `python3 runner/mcp_server.py call <tool> '{...json...}'`
|
|
9
|
+
- MCP tools for this skill: `iumbtems_darkharvest`
|
|
10
|
+
|
|
11
|
+
Epistemic rules apply regardless of harness: tag claims as
|
|
12
|
+
`[VERIFIED: <hash>]`, `[INFERRED: <reasoning>]`, `[HYPOTHESIS: <test>]`, or
|
|
13
|
+
`[NEGATIVE_KNOWLEDGE: <query>]`. Writes go only to `.research/`.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Factory (thin adapter stub)
|
|
2
|
+
|
|
3
|
+
This file is a POINTER, not the implementation. It exists so harness skill
|
|
4
|
+
discovery finds an entry; the real skill lives in the IUMBTEMS repo.
|
|
5
|
+
|
|
6
|
+
- Canonical prose & scripts: `skills/factory/`
|
|
7
|
+
- Canonical programmatic surface: `python3 runner/mcp_server.py` (stdio MCP),
|
|
8
|
+
or one-shot: `python3 runner/mcp_server.py call <tool> '{...json...}'`
|
|
9
|
+
- MCP tools for this skill: `iumbtems_brainstorm`, `iumbtems_darkharvest`, `iumbtems_socratic_frontier`
|
|
10
|
+
|
|
11
|
+
Epistemic rules apply regardless of harness: tag claims as
|
|
12
|
+
`[VERIFIED: <hash>]`, `[INFERRED: <reasoning>]`, `[HYPOTHESIS: <test>]`, or
|
|
13
|
+
`[NEGATIVE_KNOWLEDGE: <query>]`. Writes go only to `.research/`.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
description = "Product competitor teardown with per-feature harvest verdicts"
|
|
2
|
+
prompt = """Run a product competitor teardown for: {{args}}.
|
|
3
|
+
|
|
4
|
+
Execute: python3 runner/research_swarm.py --mode darkharvest --objective "{{args}}"
|
|
5
|
+
Seeds may be embedded as repo URLs in the objective; cap at --max-repos 6 live.
|
|
6
|
+
Legal rule: permissive-only vendor; GPL/AGPL clean-room-rebuild only; workflows clonable, assets never.
|
|
7
|
+
Report: .research/darkharvest_report.md (competitor x capability matrix + harvest backlog + SPDX blocks).
|
|
8
|
+
"""
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
description = "Autonomous agent-guided self-improvement loop (count-flagged)"
|
|
2
|
+
prompt = """Run the IUMBTEMS domain-expansion loop for {{args}} loops (max 10).
|
|
3
|
+
|
|
4
|
+
Bypasses per-loop gates; stops on count OR .factory/STOP file OR user kill.
|
|
5
|
+
Each loop: agents propose direction, quick swarm check, implement, dual-QA verify.
|
|
6
|
+
Enforce via: python3 skills/factory/scripts/factory.py expansion --run <run> --loops {{args}}.
|
|
7
|
+
"""
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
description = "Coding-factory Manager loop with grill-gated phased builds"
|
|
2
|
+
prompt = """Run the IUMBTEMS coding-factory Manager loop for: {{args}}.
|
|
3
|
+
|
|
4
|
+
1. Grill until .factory/frontier.json is settled (max 5 swarm cycles per gate); explicit user approve advances each gate.
|
|
5
|
+
2. Per gate: python3 runner/research_swarm.py --mode brainstorm plus --mode darkharvest (mock-first), then synthesize .roadmap/<phase>/ GOAL.md + dossier.json.
|
|
6
|
+
3. Programmer subagent per phase; qa-a plus qa-b per phase; retries via python3 skills/factory/scripts/factory.py (3 failures escalate).
|
|
7
|
+
Report: .roadmap/ phases plus .factory/state.json.
|
|
8
|
+
"""
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Darkharvest (thin adapter stub)
|
|
2
|
+
|
|
3
|
+
This file is a POINTER, not the implementation. It exists so harness skill
|
|
4
|
+
discovery finds an entry; the real skill lives in the IUMBTEMS repo.
|
|
5
|
+
|
|
6
|
+
- Canonical prose & scripts: `skills/darkharvest/`
|
|
7
|
+
- Canonical programmatic surface: `python3 runner/mcp_server.py` (stdio MCP),
|
|
8
|
+
or one-shot: `python3 runner/mcp_server.py call <tool> '{...json...}'`
|
|
9
|
+
- MCP tools for this skill: `iumbtems_darkharvest`
|
|
10
|
+
|
|
11
|
+
Epistemic rules apply regardless of harness: tag claims as
|
|
12
|
+
`[VERIFIED: <hash>]`, `[INFERRED: <reasoning>]`, `[HYPOTHESIS: <test>]`, or
|
|
13
|
+
`[NEGATIVE_KNOWLEDGE: <query>]`. Writes go only to `.research/`.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Factory (thin adapter stub)
|
|
2
|
+
|
|
3
|
+
This file is a POINTER, not the implementation. It exists so harness skill
|
|
4
|
+
discovery finds an entry; the real skill lives in the IUMBTEMS repo.
|
|
5
|
+
|
|
6
|
+
- Canonical prose & scripts: `skills/factory/`
|
|
7
|
+
- Canonical programmatic surface: `python3 runner/mcp_server.py` (stdio MCP),
|
|
8
|
+
or one-shot: `python3 runner/mcp_server.py call <tool> '{...json...}'`
|
|
9
|
+
- MCP tools for this skill: `iumbtems_brainstorm`, `iumbtems_darkharvest`, `iumbtems_socratic_frontier`
|
|
10
|
+
|
|
11
|
+
Epistemic rules apply regardless of harness: tag claims as
|
|
12
|
+
`[VERIFIED: <hash>]`, `[INFERRED: <reasoning>]`, `[HYPOTHESIS: <test>]`, or
|
|
13
|
+
`[NEGATIVE_KNOWLEDGE: <query>]`. Writes go only to `.research/`.
|
|
@@ -92,6 +92,7 @@ export const IUMBTEMS_TOOL_NAMES = [
|
|
|
92
92
|
'iumbtems_code_audit',
|
|
93
93
|
'iumbtems_oss_scout',
|
|
94
94
|
'iumbtems_brainstorm',
|
|
95
|
+
'iumbtems_darkharvest',
|
|
95
96
|
'iumbtems_verify_quote',
|
|
96
97
|
'iumbtems_socratic_frontier',
|
|
97
98
|
'iumbtems_reindex_claims',
|
|
@@ -126,8 +127,8 @@ const TOOL_CATALOG = [
|
|
|
126
127
|
},
|
|
127
128
|
mode: {
|
|
128
129
|
type: 'string',
|
|
129
|
-
enum: ['research', 'audit', 'scout', 'hybrid', 'brainstorm'],
|
|
130
|
-
description: 'Operating mode: research (literature), audit (codebase), scout (OSS), hybrid, brainstorm (lateral ideation)',
|
|
130
|
+
enum: ['research', 'audit', 'scout', 'hybrid', 'brainstorm', 'darkharvest'],
|
|
131
|
+
description: 'Operating mode: research (literature), audit (codebase), scout (OSS), hybrid, brainstorm (lateral ideation), darkharvest (competitor teardown)',
|
|
131
132
|
},
|
|
132
133
|
divergence_threshold: {
|
|
133
134
|
type: 'number',
|
|
@@ -223,6 +224,39 @@ const TOOL_CATALOG = [
|
|
|
223
224
|
required: ['objective'],
|
|
224
225
|
},
|
|
225
226
|
},
|
|
227
|
+
{
|
|
228
|
+
name: 'iumbtems_darkharvest',
|
|
229
|
+
description:
|
|
230
|
+
'Product competitor teardown: seed inspirations plus prompt, expand to adjacents, emit per-feature depend/vendor/clean-room/skip verdicts with SPDX attribution.',
|
|
231
|
+
input: {
|
|
232
|
+
type: 'object',
|
|
233
|
+
properties: {
|
|
234
|
+
objective: {
|
|
235
|
+
type: 'string',
|
|
236
|
+
description: 'Product arena to tear down (e.g. Paseo-class agent harness competitor)',
|
|
237
|
+
},
|
|
238
|
+
seeds: {
|
|
239
|
+
type: 'array',
|
|
240
|
+
items: { type: 'string' },
|
|
241
|
+
description: 'Seed inspiration repo URLs',
|
|
242
|
+
},
|
|
243
|
+
maxRepos: {
|
|
244
|
+
type: 'integer',
|
|
245
|
+
description: 'Cap on total competitors (default 10)',
|
|
246
|
+
},
|
|
247
|
+
depth: {
|
|
248
|
+
type: 'integer',
|
|
249
|
+
description: 'Dialectic depth 1-4',
|
|
250
|
+
},
|
|
251
|
+
mock_mode: {
|
|
252
|
+
type: 'boolean',
|
|
253
|
+
description: 'Run in mock mode without invoking LLM tokens',
|
|
254
|
+
default: false,
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
required: ['objective'],
|
|
258
|
+
},
|
|
259
|
+
},
|
|
226
260
|
{
|
|
227
261
|
name: 'iumbtems_verify_quote',
|
|
228
262
|
description:
|
|
@@ -465,6 +499,50 @@ export const OPENCODE_COMMANDS = [
|
|
|
465
499
|
'Execute iumbtems_brainstorm with {"objective": "<prompt>"} and report feature vectors, paradigm inversions, and falsifiable spikes.',
|
|
466
500
|
].join('\n'),
|
|
467
501
|
},
|
|
502
|
+
{
|
|
503
|
+
name: 'darkharvest',
|
|
504
|
+
description: 'Product competitor teardown with per-feature harvest verdicts',
|
|
505
|
+
usage: '/darkharvest <objective> [--seeds <urls>] [--max-repos <n>]',
|
|
506
|
+
template: [
|
|
507
|
+
'Run a product competitor teardown (seed inspirations plus prompt, expand to adjacents).',
|
|
508
|
+
'Objective: $ARGUMENTS (product arena; seeds may be embedded as URLs)',
|
|
509
|
+
'If $ARGUMENTS is empty, ask the user for the product arena and seed URLs first; never call the tool with placeholder arguments.',
|
|
510
|
+
'1. Execute iumbtems_darkharvest with {"objective": "<objective>", "seeds": ["<url>", "..."]} (pass "mock_mode": true only for dry runs).',
|
|
511
|
+
'2. Report the competitor x capability matrix, white-space gaps both ways, and the SPDX-attributed harvest backlog in .research/darkharvest_report.md.',
|
|
512
|
+
'3. Legal rule: permissive-only vendor; GPL/AGPL clean-room-rebuild only; workflows clonable, assets never.',
|
|
513
|
+
].join('\n'),
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
name: 'factory',
|
|
517
|
+
description: 'Coding-factory Manager loop: grill-gated phased build with programmer spawns and dual QA',
|
|
518
|
+
usage: '/factory <product-arena>',
|
|
519
|
+
agent: 'manager',
|
|
520
|
+
subtask: false,
|
|
521
|
+
template: [
|
|
522
|
+
'Run the IUMBTEMS coding-factory Manager loop as the manager agent.',
|
|
523
|
+
'Arena: $ARGUMENTS',
|
|
524
|
+
'If $ARGUMENTS is empty, ask the user what to build first; never proceed on placeholder input.',
|
|
525
|
+
'1. Grill the user until .factory/frontier.json is settled (max 5 brainstorm+darkharvest swarm cycles per gate); explicit user approve advances each gate.',
|
|
526
|
+
'2. Per gate run iumbtems_brainstorm and iumbtems_darkharvest (mock_mode only for dry runs), then synthesize .roadmap/<phase>/ GOAL.md + dossier.json (goal/evidence/acceptance/brief/verdict/hashes; every claim needs a VERIFIED hash).',
|
|
527
|
+
'3. Spawn the programmer subagent per phase with the phase dossier (cite phase hashes); run qa-a and qa-b (diverged prompts) per phase; track retries with skills/factory/scripts/factory.py (3 failures escalate to manager).',
|
|
528
|
+
'4. Manager tiebreaks QA disagreements; explicit user sign-off closes each phase.',
|
|
529
|
+
].join('\n'),
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
name: 'domainexpansion',
|
|
533
|
+
description: 'Autonomous agent-guided self-improvement loop over the codebase (count-flagged)',
|
|
534
|
+
usage: '/domainexpansion <n>',
|
|
535
|
+
agent: 'manager',
|
|
536
|
+
subtask: false,
|
|
537
|
+
template: [
|
|
538
|
+
'Run the IUMBTEMS domain-expansion loop as the manager agent.',
|
|
539
|
+
'Loops: $ARGUMENTS (integer count, max 10)',
|
|
540
|
+
'If $ARGUMENTS is not a positive integer, ask the user for the loop count first.',
|
|
541
|
+
'1. Bypass per-loop gates; stop on count OR .factory/STOP file OR user kill, whichever first (enforce via skills/factory/scripts/factory.py expansion).',
|
|
542
|
+
'2. Each loop: agents propose direction, quick iumbtems_brainstorm/iumbtems_darkharvest check, implement via programmer spawn, dual-QA verify.',
|
|
543
|
+
'3. All expansion proposals carry the strict VERIFIED evidence bar; log every loop to .factory/state.json.',
|
|
544
|
+
].join('\n'),
|
|
545
|
+
},
|
|
468
546
|
];
|
|
469
547
|
|
|
470
548
|
/**
|
|
@@ -480,6 +558,8 @@ export function commandCatalog() {
|
|
|
480
558
|
for (const cmd of OPENCODE_COMMANDS) {
|
|
481
559
|
if (!cmd?.name) continue;
|
|
482
560
|
out[cmd.name] = { description: cmd.description, template: cmd.template };
|
|
561
|
+
if (cmd.agent) out[cmd.name].agent = cmd.agent;
|
|
562
|
+
if (cmd.subtask !== undefined) out[cmd.name].subtask = cmd.subtask;
|
|
483
563
|
}
|
|
484
564
|
return out;
|
|
485
565
|
}
|
|
@@ -738,6 +818,8 @@ async function registerHostCommands(host) {
|
|
|
738
818
|
draft.add({
|
|
739
819
|
name: cmd.name,
|
|
740
820
|
description: cmd.description,
|
|
821
|
+
...(cmd.agent ? { agent: cmd.agent } : {}),
|
|
822
|
+
...(cmd.subtask !== undefined ? { subtask: cmd.subtask } : {}),
|
|
741
823
|
execute: async (input) => {
|
|
742
824
|
const args = input?.prompt?.text || '';
|
|
743
825
|
const prompt = (typeof input?.prompt === 'object' && input?.prompt !== null) ? input.prompt : {};
|