@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.
Files changed (138) hide show
  1. package/.agents/skills/brainstorming/SKILL.md +13 -0
  2. package/.agents/skills/code_audit/SKILL.md +13 -0
  3. package/.agents/skills/epistemic_search/SKILL.md +13 -0
  4. package/.agents/skills/grilling/SKILL.md +13 -0
  5. package/.agents/skills/oss_scout/SKILL.md +13 -0
  6. package/.agents/skills/research_cache/SKILL.md +13 -0
  7. package/.agents/skills/swarm_config/SKILL.md +13 -0
  8. package/.claude-plugin/plugin.json +15 -5
  9. package/.omp/README.md +39 -0
  10. package/.omp/SYSTEM.md +12 -0
  11. package/.omp/commands/audit.md +10 -0
  12. package/.omp/commands/brainstorming.md +12 -0
  13. package/.omp/commands/grill.md +9 -0
  14. package/.omp/commands/scout.md +10 -0
  15. package/.omp/commands/swarm-config.md +10 -0
  16. package/.omp/commands/swarm.md +9 -0
  17. package/.omp/hooks/post/epistemic-audit.ts +16 -0
  18. package/.omp/hooks/pre/epistemic-redirect.ts +21 -0
  19. package/.omp/prompts/brainstorming.md +8 -0
  20. package/.omp/prompts/swarm.md +8 -0
  21. package/MARKETPLACE.md +8 -0
  22. package/README.md +53 -8
  23. package/bin/cli.js +27 -3
  24. package/config/domain_packs/biopharma.json +23 -0
  25. package/config/domain_packs/legal.json +19 -0
  26. package/config/domain_packs/quant.json +19 -0
  27. package/config/mcp-research-servers.json +7 -0
  28. package/config/mcp_launcher.py +48 -137
  29. package/config/opencode-snippet.json +58 -3
  30. package/config/searxng_mcp.py +42 -83
  31. package/extensions/pi/index.js +196 -28
  32. package/install.sh +20 -4
  33. package/package.json +40 -5
  34. package/plugins/antigravity/README.md +28 -0
  35. package/plugins/antigravity/agents/alpha-thesis.md +6 -0
  36. package/plugins/antigravity/agents/beta-antithesis.md +7 -0
  37. package/plugins/antigravity/agents/brainstormer.md +7 -0
  38. package/plugins/antigravity/agents/epistemic-auditor.md +5 -0
  39. package/plugins/antigravity/hooks.json +23 -0
  40. package/plugins/antigravity/mcp_config.json +33 -0
  41. package/plugins/antigravity/plugin.json +21 -0
  42. package/plugins/antigravity/rules/epistemic-integrity.md +6 -0
  43. package/plugins/antigravity/skills/brainstorming/SKILL.md +13 -0
  44. package/plugins/antigravity/skills/code_audit/SKILL.md +13 -0
  45. package/plugins/antigravity/skills/epistemic_search/SKILL.md +13 -0
  46. package/plugins/antigravity/skills/grilling/SKILL.md +13 -0
  47. package/plugins/antigravity/skills/oss_scout/SKILL.md +13 -0
  48. package/plugins/antigravity/skills/research_cache/SKILL.md +13 -0
  49. package/plugins/antigravity/skills/swarm_config/SKILL.md +13 -0
  50. package/plugins/codex/AGENTS.md.snippet +10 -0
  51. package/plugins/codex/README.md +37 -0
  52. package/plugins/codex/config.toml.snippet +28 -0
  53. package/plugins/codex/openai.yaml +24 -0
  54. package/plugins/codex/skills/brainstorming/SKILL.md +13 -0
  55. package/plugins/codex/skills/code_audit/SKILL.md +13 -0
  56. package/plugins/codex/skills/epistemic_search/SKILL.md +13 -0
  57. package/plugins/codex/skills/grilling/SKILL.md +13 -0
  58. package/plugins/codex/skills/oss_scout/SKILL.md +13 -0
  59. package/plugins/codex/skills/research_cache/SKILL.md +13 -0
  60. package/plugins/codex/skills/swarm_config/SKILL.md +13 -0
  61. package/plugins/gemini/GEMINI.md +15 -0
  62. package/plugins/gemini/README.md +19 -0
  63. package/plugins/gemini/commands/audit.toml +6 -0
  64. package/plugins/gemini/commands/brainstorming.toml +10 -0
  65. package/plugins/gemini/commands/grill.toml +6 -0
  66. package/plugins/gemini/commands/scout.toml +7 -0
  67. package/plugins/gemini/commands/swarm-config.toml +7 -0
  68. package/plugins/gemini/commands/swarm.toml +8 -0
  69. package/plugins/gemini/gemini-extension.json +38 -0
  70. package/plugins/gemini/hooks/hooks.json +11 -0
  71. package/plugins/gemini/skills/brainstorming/SKILL.md +13 -0
  72. package/plugins/gemini/skills/code_audit/SKILL.md +13 -0
  73. package/plugins/gemini/skills/epistemic_search/SKILL.md +13 -0
  74. package/plugins/gemini/skills/grilling/SKILL.md +13 -0
  75. package/plugins/gemini/skills/oss_scout/SKILL.md +13 -0
  76. package/plugins/gemini/skills/research_cache/SKILL.md +13 -0
  77. package/plugins/gemini/skills/swarm_config/SKILL.md +13 -0
  78. package/plugins/opencode/index.js +335 -118
  79. package/prompts/agent_brainstormer.md +97 -0
  80. package/runner/__pycache__/__init__.cpython-311.pyc +0 -0
  81. package/runner/__pycache__/auctioneer.cpython-311.pyc +0 -0
  82. package/runner/__pycache__/auditor_engine.cpython-311.pyc +0 -0
  83. package/runner/__pycache__/claim_store.cpython-311.pyc +0 -0
  84. package/runner/__pycache__/claim_witness.cpython-311.pyc +0 -0
  85. package/runner/__pycache__/living_dossiers.cpython-311.pyc +0 -0
  86. package/runner/__pycache__/mcp_protocol.cpython-311.pyc +0 -0
  87. package/runner/__pycache__/mcp_server.cpython-311.pyc +0 -0
  88. package/runner/__pycache__/pcrb.cpython-311.pyc +0 -0
  89. package/runner/__pycache__/pcrb_verify.cpython-311.pyc +0 -0
  90. package/runner/__pycache__/refinement.cpython-311.pyc +0 -0
  91. package/runner/__pycache__/research_swarm.cpython-311.pyc +0 -0
  92. package/runner/__pycache__/state_machine.cpython-311.pyc +0 -0
  93. package/runner/auctioneer.py +169 -0
  94. package/runner/auditor_engine.py +127 -12
  95. package/runner/claim_store.py +361 -0
  96. package/runner/claim_witness.py +183 -0
  97. package/runner/living_dossiers.py +355 -0
  98. package/runner/mcp_protocol.py +188 -0
  99. package/runner/mcp_server.py +567 -0
  100. package/runner/pcrb.py +212 -0
  101. package/runner/pcrb_verify.py +237 -0
  102. package/runner/refinement.py +335 -0
  103. package/runner/research_swarm.py +378 -94
  104. package/runner/tests/__pycache__/test_auction_order.cpython-311.pyc +0 -0
  105. package/runner/tests/__pycache__/test_claim_store.cpython-311.pyc +0 -0
  106. package/runner/tests/__pycache__/test_claim_witness.cpython-311.pyc +0 -0
  107. package/runner/tests/__pycache__/test_domain_packs.cpython-311.pyc +0 -0
  108. package/runner/tests/__pycache__/test_fleet_seam.cpython-311.pyc +0 -0
  109. package/runner/tests/__pycache__/test_living_dossiers.cpython-311.pyc +0 -0
  110. package/runner/tests/__pycache__/test_mcp_server.cpython-311.pyc +0 -0
  111. package/runner/tests/__pycache__/test_pcrb.cpython-311.pyc +0 -0
  112. package/runner/tests/__pycache__/test_refinement.cpython-311.pyc +0 -0
  113. package/runner/tests/__pycache__/test_swarm.cpython-311.pyc +0 -0
  114. package/runner/tests/fixtures/auction_objective.json +35 -0
  115. package/runner/tests/fixtures/borderline_claims.json +27 -0
  116. package/runner/tests/fixtures/divergence_objectives.json +31 -0
  117. package/runner/tests/test_auction_order.py +173 -0
  118. package/runner/tests/test_claim_store.py +162 -0
  119. package/runner/tests/test_claim_witness.py +186 -0
  120. package/runner/tests/test_domain_packs.py +217 -0
  121. package/runner/tests/test_fleet_seam.py +113 -0
  122. package/runner/tests/test_living_dossiers.py +204 -0
  123. package/runner/tests/test_mcp_server.py +212 -0
  124. package/runner/tests/test_pcrb.py +240 -0
  125. package/runner/tests/test_refinement.py +255 -0
  126. package/runner/tests/test_swarm.py +173 -15
  127. package/scripts/auction_experiment.py +180 -0
  128. package/scripts/build_adapters.py +183 -0
  129. package/scripts/divergence_experiment.py +184 -0
  130. package/skills/brainstorming/SKILL.md +106 -0
  131. package/skills/brainstorming/__init__.py +1 -0
  132. package/skills/brainstorming/scripts/brainstorm.py +200 -0
  133. package/skills/research_cache/__pycache__/__init__.cpython-311.pyc +0 -0
  134. package/skills/research_cache/__pycache__/hasher.cpython-311.pyc +0 -0
  135. package/skills/swarm_config/SKILL.md +1 -1
  136. package/skills/swarm_config/__pycache__/__init__.cpython-311.pyc +0 -0
  137. package/skills/swarm_config/__pycache__/configure.cpython-311.pyc +0 -0
  138. package/skills/swarm_config/configure.py +45 -11
@@ -0,0 +1,13 @@
1
+ # Brainstorming (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/brainstorming/`
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`
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
+ # Code Audit (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/code_audit/`
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_code_audit`
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
+ # Epistemic Search (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/epistemic_search/`
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: `brave_web_search / firecrawl_scrape (research MCP servers)`
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
+ # Socratic Grilling (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/grilling/`
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_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
+ # OSS Scout (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/oss_scout/`
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_oss_scout`
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
+ # Research Cache (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/research_cache/`
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_verify_quote`
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
+ # Swarm Config (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/swarm_config/`
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_config`
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/`.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "epistemic-swarm",
3
- "version": "0.2.2",
3
+ "version": "0.3.0",
4
4
  "description": "High-Integrity Dialectic Research Agent Harness for Claude Code enforcing empirical evidence over parametric hallucination.",
5
5
  "author": {
6
6
  "name": "Heretek AI",
@@ -42,15 +42,24 @@
42
42
  "mcpServers": {
43
43
  "brave-search": {
44
44
  "command": "python3",
45
- "args": ["${CLAUDE_PLUGIN_ROOT}/config/mcp_launcher.py", "brave-search"]
45
+ "args": [
46
+ "${CLAUDE_PLUGIN_ROOT}/config/mcp_launcher.py",
47
+ "brave-search"
48
+ ]
46
49
  },
47
50
  "firecrawl": {
48
51
  "command": "python3",
49
- "args": ["${CLAUDE_PLUGIN_ROOT}/config/mcp_launcher.py", "firecrawl"]
52
+ "args": [
53
+ "${CLAUDE_PLUGIN_ROOT}/config/mcp_launcher.py",
54
+ "firecrawl"
55
+ ]
50
56
  },
51
57
  "searxng": {
52
58
  "command": "python3",
53
- "args": ["${CLAUDE_PLUGIN_ROOT}/config/mcp_launcher.py", "searxng"]
59
+ "args": [
60
+ "${CLAUDE_PLUGIN_ROOT}/config/mcp_launcher.py",
61
+ "searxng"
62
+ ]
54
63
  }
55
64
  },
56
65
  "skills": [
@@ -59,6 +68,7 @@
59
68
  "./skills/epistemic_search",
60
69
  "./skills/swarm_config",
61
70
  "./skills/code_audit",
62
- "./skills/oss_scout"
71
+ "./skills/oss_scout",
72
+ "./skills/brainstorming"
63
73
  ]
64
74
  }
package/.omp/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # IUMBTEMS for OMP (oh-my-pi / `omp.sh`)
2
+
3
+ Project-local OMP surface. Global install mirrors live under
4
+ `~/.oh-omp/agent/{commands,prompts,hooks}/` (copy these files there for
5
+ every-project availability).
6
+
7
+ ## Install as OMP plugin package
8
+
9
+ This repo declares both manifest keys in `package.json`:
10
+
11
+ ```json
12
+ {
13
+ "pi": { "extensions": ["./extensions/pi/index.js"], "skills": [...], "prompts": [...] },
14
+ "omp": { "extensions": ["./extensions/pi/index.js"], "skills": [...], "prompts": [...] }
15
+ }
16
+ ```
17
+
18
+ ```bash
19
+ omp install npm:@heretek-ai/epistemic-swarm
20
+ # local dev:
21
+ omp -e ./extensions/pi/index.js
22
+ omp list
23
+ tail -F ~/.omp/logs/omp.$(date +%F).log # extension load errors land here, not the TUI
24
+ ```
25
+
26
+ ## Project-local surfaces in this directory
27
+
28
+ ```
29
+ .omp/
30
+ ├── README.md # this file
31
+ ├── SYSTEM.md # project system-prompt override (safe subset of base_epistemic_system.md)
32
+ ├── commands/*.md # reusable slash commands: /swarm /grill /audit /scout /brainstorming /swarm-config
33
+ ├── prompts/*.md # prompt templates with `description:` frontmatter + $1/$@ expansion
34
+ └── hooks/pre/*.ts # pre-tool hooks (epistemic redirect)
35
+ └── hooks/post/*.ts # post-tool hooks (audit-trail log)
36
+ ```
37
+
38
+ Commands return a string sent as the LLM prompt, or execute shell via the
39
+ Bun worker and return output. All runners write only under `.research/`.
package/.omp/SYSTEM.md ADDED
@@ -0,0 +1,12 @@
1
+ # IUMBTEMS project instructions (OMP SYSTEM.md override)
2
+
3
+ You operate under the Epistemic Integrity Protocol (see `prompts/base_epistemic_system.md`):
4
+
5
+ - Parametric memory is quarantined. Fetch, verify, then assert.
6
+ - Tag every factual claim: `[VERIFIED:<hash>]`, `[INFERRED:<chain>]`, `[HYPOTHESIS:<falsification>]`, `[NEGATIVE_KNOWLEDGE:<query>]`.
7
+ - Cache every source to `.research/sources/<sha256>.md` before citing
8
+ (`python3 skills/research-cache/hasher.py cache --url "<URL>" --content "$(cat file.md)"`).
9
+ - Skills: `skills/{grilling,research_cache,epistemic_search,swarm_config,code_audit,oss_scout,brainstorming}/SKILL.md`.
10
+ - Runners (Bun/Python kernels may call back into agent tools read/search/task):
11
+ `python3 runner/research_swarm.py --mode <research|audit|scout|hybrid|brainstorm> --objective "<...>"`.
12
+ - `/brainstorming` MUST produce feature vectors + lateral moves + falsifiable spikes, never bug-fix lists.
@@ -0,0 +1,10 @@
1
+ ---
2
+ description: Dialectic codebase architecture and security audit with line-level proof
3
+ ---
4
+
5
+ Run the IUMBTEMS dialectic codebase audit on `$1`:
6
+
7
+ `python3 runner/research_swarm.py --mode audit --objective "$1"`
8
+
9
+ Report: `.research/code_audit_report.md` with `file:///path#Lstart-Lend` pointers
10
+ and verbatim snippets. Every vulnerability needs a concrete patch blueprint.
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: Lateral brainstorming — novel feature vectors and speculative spikes
3
+ ---
4
+
5
+ Run IUMBTEMS lateral brainstorming on `$1` (see `skills/brainstorming/SKILL.md`
6
+ and `prompts/agent_brainstormer.md`):
7
+
8
+ 1. Ingest workspace context read-only (`python3 skills/brainstorming/scripts/brainstorm.py --objective "$1" --show-context`).
9
+ 2. Thesis / Radical Antithesis / Synthesis — never bug-fix lists.
10
+ 3. Output Novel Feature Vectors (3-5), Lateral Architectural Moves (2-3),
11
+ Experimental Hypotheses (2-3 with `[HYPOTHESIS:<falsification test>]`).
12
+ 4. Write `.research/brainstorm_report.md` (or run `python3 runner/research_swarm.py --mode brainstorm --objective "$1"`).
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: Socratic grilling and decision frontier exploration
3
+ ---
4
+
5
+ Launch IUMBTEMS Socratic grilling for `$1`.
6
+
7
+ Follow `skills/grilling/SKILL.md` (rounds, frontier, assumption inversion,
8
+ factual vs decisional separation). Persist with
9
+ `python3 skills/grilling/socratic_tree.py --export`.
@@ -0,0 +1,10 @@
1
+ ---
2
+ description: Scout open-source libraries and build clean-room blueprints
3
+ ---
4
+
5
+ Scout open-source solutions for `$1`:
6
+
7
+ `python3 runner/research_swarm.py --mode scout --objective "$1"`
8
+
9
+ Flag GPL/AGPL contamination, solo-maintainer risk, dependency weight, CVEs.
10
+ Report: `.research/oss_scout_report.md` plus a clean-room re-implementation blueprint.
@@ -0,0 +1,10 @@
1
+ ---
2
+ description: Inspect or tune Epistemic Swarm parameters (engine, depth, mode)
3
+ ---
4
+
5
+ Inspect or tune IUMBTEMS swarm parameters: `$1`.
6
+
7
+ `python3 skills/swarm_config/configure.py $1`
8
+
9
+ Engines: `duckduckgo` (zero-key default), `brave`, `firecrawl`, `searxng`.
10
+ Modes: `research`, `audit`, `scout`, `hybrid`, `brainstorm`. Depth: 1-4.
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: Run IUMBTEMS dialectic research swarm on an objective
3
+ ---
4
+
5
+ Run the IUMBTEMS dialectic research swarm on `$1`.
6
+
7
+ 1. If the objective is ambiguous, follow `skills/grilling/SKILL.md` first.
8
+ 2. Execute `python3 runner/research_swarm.py --objective "$1" $@[2:]`.
9
+ 3. Summarize `.research/final_synthesis.md`, preserving `[VERIFIED:<hash>]` pointers.
@@ -0,0 +1,16 @@
1
+ import type { HookAPI } from "@oh-my-pi/pi-coding-agent/hooks";
2
+
3
+ /**
4
+ * OMP post-tool hook: remind the agent to keep the epistemic audit trail.
5
+ * Every [VERIFIED:<hash>] quote must exist verbatim in .research/sources/<sha256>.md.
6
+ */
7
+ export async function postTool(api: HookAPI) {
8
+ api.on("tool:after", (event) => {
9
+ if (event?.ok === false) {
10
+ // Surface failures as negative knowledge, never parametric guesses.
11
+ event.note?.(
12
+ "Record tool failures as [NEGATIVE_KNOWLEDGE:<query>] with the exact query — do not hallucinate a substitute answer."
13
+ );
14
+ }
15
+ });
16
+ }
@@ -0,0 +1,21 @@
1
+ import type { HookAPI } from "@oh-my-pi/pi-coding-agent/hooks";
2
+
3
+ /**
4
+ * OMP pre-tool hook: redirect unverified web tools into the epistemic pipeline.
5
+ * Mirrors hooks/hooks.json (Claude Code) for the omp.sh hook layout.
6
+ */
7
+ export async function preTool(api: HookAPI) {
8
+ api.on("tool:before", (event) => {
9
+ const name = String(event?.tool ?? "").toLowerCase();
10
+ if (name.includes("websearch") || name.includes("web_search")) {
11
+ event.redirect?.(
12
+ 'Use epistemic search instead: python3 skills/epistemic_search/scripts/search.py "<query>" (SHA-256 cached, verifiable).'
13
+ );
14
+ }
15
+ if (name.includes("webfetch") || name.includes("web_fetch")) {
16
+ event.redirect?.(
17
+ 'Use epistemic fetch instead: python3 skills/epistemic_search/scripts/fetch.py "<url>" (content-addressed into .research/sources/).'
18
+ );
19
+ }
20
+ });
21
+ }
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: Lateral brainstorming prompt template — what-if features and spikes
3
+ ---
4
+
5
+ Brainstorm laterally on `$1` per `skills/brainstorming/SKILL.md`:
6
+ Novel Feature Vectors (3-5), Lateral Architectural Moves (2-3),
7
+ Experimental Hypotheses (2-3 with falsification criteria).
8
+ Context: `$@[2:]`. Never output bug-fix lists.
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: Run IUMBTEMS dialectic research swarm on an objective
3
+ ---
4
+
5
+ Run the IUMBTEMS dialectic research swarm on `$1`.
6
+
7
+ Execute `python3 runner/research_swarm.py --objective "$1" $@[2:]` and
8
+ summarize `.research/final_synthesis.md` with `[VERIFIED:<hash>]` pointers.
package/MARKETPLACE.md CHANGED
@@ -74,6 +74,14 @@ claude plugin marketplace list
74
74
 
75
75
  ---
76
76
 
77
+ ## 💡 Lateral Brainstorming (`/brainstorming`)
78
+
79
+ Divergent ideation subagent (Thesis / Radical Antithesis / Synthesis) producing
80
+ Novel Feature Vectors, Lateral Architectural Moves, and falsifiable spike hypotheses.
81
+ Skill: `skills/brainstorming/SKILL.md` (`/brainstorming <prompt>`), system prompt:
82
+ `prompts/agent_brainstormer.md`, runner: `python3 runner/research_swarm.py --mode brainstorm --objective "<prompt>" --mock-claude`.
83
+ Available on all seven harnesses (Claude Code, OpenCode `iumbtems_brainstorm`, Pi/OMP `/brainstorming`, Gemini `/brainstorming`, Codex `$brainstorming`, AntiGravity skill).
84
+
77
85
  ## 🔍 Inspecting Installed Plugins
78
86
 
79
87
  To view installed plugins and their active components:
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![Marketplace Validated](https://github.com/Heretek-AI/IUMBTEMS/actions/workflows/validate-marketplace.yml/badge.svg)](https://github.com/Heretek-AI/IUMBTEMS/actions)
7
7
 
8
8
  > **High-Integrity Dialectic Research Agent Harness**
9
- > *Universal support for Claude Code, Pi (pi.dev), and OpenCode V2.*
9
+ > *Universal support for Claude Code, OpenCode V2, Pi (pi.dev), OMP (oh-my-pi), Gemini CLI, Codex CLI, and AntiGravity.*
10
10
  > *Enforcing verified empirical evidence over parametric hallucination.*
11
11
 
12
12
  ---
@@ -26,7 +26,8 @@ Modern LLMs suffer from parametric hallucination, sycophancy, and premature narr
26
26
 
27
27
  ## 🌐 Universal Multi-Platform Support
28
28
 
29
- IUMBTEMS is packaged as a single universal npm package (`@heretek-ai/epistemic-swarm` with `iumbtems` binary) that runs across the three major autonomous agent platforms:
29
+ IUMBTEMS is packaged as a single universal npm package (`@heretek-ai/epistemic-swarm` with `iumbtems` binary) that runs across seven major autonomous agent harnesses.
30
+ Single source of truth: `skills/*` + `prompts/*`. The canonical programmatic surface is the first-party MCP server (`python3 runner/mcp_server.py`), which exposes the `iumbtems_*` tools in-process. Harness targets register that server and carry only thin skill stubs generated with `python3 scripts/build_adapters.py` (`iumbtems adapters`) into `plugins/*`, `.agents/skills` — stubs point at the canonical `skills/*` prose instead of copying code.
30
31
 
31
32
  ### 1. Claude Code (Native Marketplace & Overlay)
32
33
 
@@ -64,25 +65,66 @@ Install directly into Pi via its native package manager:
64
65
  ```bash
65
66
  pi install npm:@heretek-ai/epistemic-swarm
66
67
  ```
67
- - Exposes native `/swarm <objective>` and `/grill` slash commands in the Pi interactive terminal.
68
- - Discovers skills (`skills/grilling`, `skills/research-cache`) and prompts automatically via the `pi` manifest block.
68
+ - **Slash Commands**:
69
+ - `/swarm <objective>`: Run autonomous dialectic research swarm
70
+ - `/grill`: Launch Socratic assumption-inversion and decision trees
71
+ - `/swarm-config`: Inspect or tune search engine, depth (1-4), and mode
72
+ - `/audit <target>`: Run dialectic codebase architecture and security audit
73
+ - `/scout <feature>`: Scout open-source software and clean-room blueprints
74
+ - **Agent Tools**: `iumbtems_config`, `iumbtems_verify_quote`, `iumbtems_brainstorm`.
75
+ - OMP (`omp.sh`, oh-my-pi) shares the same entry point: `omp install npm:@heretek-ai/epistemic-swarm`, project commands in `.omp/commands/` (`/swarm`, `/grill`, `/audit`, `/scout`, `/brainstorming`, `/swarm-config`), prompts in `.omp/prompts/`, hooks in `.omp/hooks/pre|post/`.
76
+ - All commands automatically respect `.research/config.json`.
69
77
 
70
78
  ### 3. OpenCode V2 (`opencode.ai`)
71
- Enable IUMBTEMS in your `~/.config/opencode/opencode.json` or project `opencode.jsonc`:
79
+ Enable IUMBTEMS in your `~/.config/opencode/opencode.json` or project `opencode.jsonc`. You can configure settings declaratively:
72
80
  ```json
73
81
  {
74
82
  "plugin": [
75
- "@heretek-ai/epistemic-swarm"
83
+ [
84
+ "@heretek-ai/epistemic-swarm",
85
+ {
86
+ "search_engine": "duckduckgo",
87
+ "max_iterations": 2,
88
+ "mode": "research"
89
+ }
90
+ ]
76
91
  ]
77
92
  }
78
93
  ```
79
- OpenCode V2 automatically registers:
80
- - `iumbtems_swarm_research`: Dispatches dialectic researcher pairs.
94
+ OpenCode V2 automatically registers the full tool suite:
95
+ - `iumbtems_config`: Inspect or dynamically adjust active parameters in `.research/config.json`.
96
+ - `iumbtems_code_audit`: Dispatches dialectic codebase review (structural architect vs. red-team).
97
+ - `iumbtems_oss_scout`: Scouts open-source libraries, audits licenses, and builds clean-room blueprints.
98
+ - `iumbtems_swarm_research`: Dispatches dialectic researcher pairs (Thesis vs. Antithesis).
81
99
  - `iumbtems_verify_quote`: Audits verbatim citations against the SHA-256 source cache.
82
100
  - `iumbtems_socratic_frontier`: Advances the Socratic decision tree frontier.
101
+ - `iumbtems_brainstorm`: Lateral ideation portfolio (feature vectors + paradigm moves + falsifiable spikes).
83
102
 
84
103
  *(See [config/opencode-snippet.json](config/opencode-snippet.json) for custom agent definitions).*
85
104
 
105
+ ### 4. Gemini CLI
106
+ ```bash
107
+ gemini extensions install https://github.com/Heretek-AI/IUMBTEMS --path plugins/gemini
108
+ # local dev: gemini extensions link ./plugins/gemini
109
+ ```
110
+ Bundle: `plugins/gemini/gemini-extension.json` (MCP servers, incl. the canonical `iumbtems` server), `GEMINI.md` (context), `commands/*.toml` (`/swarm`, `/grill`, `/audit`, `/scout`, `/brainstorming`, `/swarm-config`), `hooks/hooks.json`, `skills/` thin stubs.
111
+
112
+ ### 5. Codex CLI
113
+ Codex reads repo-local `.agents/skills/*` (already generated in this repo) — `$brainstorming <prompt>` or implicit activation. Distributable pack in `plugins/codex/` (`openai.yaml`, `config.toml.snippet` for `[mcp_servers.*]`, `AGENTS.md.snippet`). Legacy `~/.codex/prompts/*.md` (`/prompts:<name>`) is deprecated; use skills.
114
+
115
+ ### 6. Google AntiGravity (`agy`)
116
+ ```bash
117
+ agy plugin install https://github.com/Heretek-AI/IUMBTEMS --path plugins/antigravity
118
+ agy plugin validate ./plugins/antigravity
119
+ ```
120
+ Bundle: `plugins/antigravity/plugin.json`, `mcp_config.json`, `hooks.json`, `skills/` thin stubs, `agents/` (alpha/beta/auditor/brainstormer), `rules/epistemic-integrity.md`.
121
+
122
+ ### 7. OMP (oh-my-pi, `omp.sh`)
123
+ ```bash
124
+ omp install npm:@heretek-ai/epistemic-swarm
125
+ ```
126
+ Shares the pi extension entry point (`package.json: {omp, pi}` blocks). Project-local slash commands (`.omp/commands/*.md`), prompt templates (`.omp/prompts/*.md`), hooks (`.omp/hooks/pre|post/*.ts`), system override (`.omp/SYSTEM.md`).
127
+
86
128
  ---
87
129
 
88
130
  ## ⚡ CLI Command Reference
@@ -101,6 +143,9 @@ iumbtems scout "Zero-dependency Raft consensus implementations in Rust"
101
143
  # Run the autonomous dialectic research swarm
102
144
  iumbtems run "Sub-millisecond ZK state updates on L1 rollups"
103
145
 
146
+ # Run lateral brainstorming (divergent what-if ideation, never bug fixes)
147
+ iumbtems brainstorm "Where do we go from here?"
148
+
104
149
  # Run Socratic grilling and decision frontier calculation
105
150
  iumbtems grill --objective "L1 vs L2 state verification trade-offs"
106
151
 
package/bin/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * IUMBTEMS CLI: I Use My Brain To Express My Self
5
- * High-Integrity Dialectic Research Harness for Claude Code, Pi, and OpenCode V2.
5
+ * High-Integrity Dialectic Research Harness for Claude Code, Pi, OMP, OpenCode V2, Gemini CLI, Codex CLI, AntiGravity.
6
6
  */
7
7
 
8
8
  const { spawnSync } = require('child_process');
@@ -17,7 +17,7 @@ function printHelp() {
17
17
  console.log(`
18
18
  🧠 IUMBTEMS: I Use My Brain To Express My Self
19
19
  🌟 Epistemic Swarm: High-Integrity Research Harness
20
- Platforms: Claude Code | Pi (pi.dev) | OpenCode V2
20
+ Platforms: Claude Code | Pi (pi.dev) | OMP (oh-my-pi) | OpenCode V2 | Gemini CLI | Codex CLI | AntiGravity
21
21
  Organization: @heretek-ai | Repository: Heretek-AI/IUMBTEMS
22
22
 
23
23
  Usage:
@@ -29,7 +29,9 @@ Commands:
29
29
  audit "<target>" Run dialectic codebase architectural & security audit
30
30
  scout "<feature>" Scout open-source software, libraries & clean-room blueprints
31
31
  run "<objective>" Run the dialectic multi-agent research swarm
32
+ brainstorm "<prompt>" Run lateral brainstorming (feature vectors + spikes)
32
33
  grill Launch interactive Socratic decision tree framing
34
+ adapters Rebuild harness adapter mirrors (skills -> plugins/*, .agents)
33
35
  install Install skills & MCP servers into ~/.claude/
34
36
  marketplace Show Claude Code marketplace catalog & install commands
35
37
  test Run test suite for hashing, state machine & auditor
@@ -38,13 +40,17 @@ Commands:
38
40
 
39
41
  Platform Extensions:
40
42
  Pi (pi.dev): pi install npm:@heretek-ai/epistemic-swarm
43
+ OMP (oh-my-pi): omp install npm:@heretek-ai/epistemic-swarm
41
44
  OpenCode V2: add "@heretek-ai/epistemic-swarm" to opencode.json plugins
45
+ Gemini CLI: gemini extensions install https://github.com/Heretek-AI/IUMBTEMS --path plugins/gemini
46
+ Codex CLI: copy plugins/codex/skills/* into .agents/skills/
47
+ AntiGravity: agy plugin install https://github.com/Heretek-AI/IUMBTEMS --path plugins/antigravity
42
48
  Claude Code: npx @heretek-ai/epistemic-swarm install
43
49
 
44
50
  Options:
45
51
  --mock-claude Run swarm with synthetic mock responses (zero API cost)
46
52
  --frontier <file> Path to settled frontier.json from Socratic grilling
47
- --mode <mode> Operating mode (research, audit, scout, hybrid)
53
+ --mode <mode> Operating mode (research, audit, scout, hybrid, brainstorm)
48
54
  --engine <engine> Search engine (duckduckgo, brave, firecrawl, searxng)
49
55
  --depth <n> Max dialectic iterations (1-4)
50
56
  --dir <path> Path to .research workspace directory (default: .research)
@@ -54,6 +60,7 @@ Examples:
54
60
  iumbtems audit "runner/ and skills/ concurrency & security"
55
61
  iumbtems scout "Zero-dependency Raft consensus in Rust"
56
62
  iumbtems run "Verify sub-millisecond ZK prover latency"
63
+ iumbtems brainstorm "Where do we go from here?"
57
64
  iumbtems grill --objective "Rollup architecture trade-offs"
58
65
  iumbtems doctor
59
66
  `);
@@ -122,11 +129,28 @@ switch (command) {
122
129
  break;
123
130
  }
124
131
 
132
+ case 'brainstorm': {
133
+ const objective = args[1];
134
+ if (!objective || objective.startsWith('--')) {
135
+ console.error('Error: Please provide a brainstorm prompt.');
136
+ console.error('Example: npx @heretek-ai/epistemic-swarm brainstorm "Where do we go from here?"');
137
+ process.exit(1);
138
+ }
139
+ const forwardArgs = ['--mode', 'brainstorm', '--objective', objective, ...args.slice(2)];
140
+ runPython('runner/research_swarm.py', forwardArgs);
141
+ break;
142
+ }
143
+
125
144
  case 'grill': {
126
145
  runPython('skills/grilling/socratic_tree.py', args.slice(1));
127
146
  break;
128
147
  }
129
148
 
149
+ case 'adapters': {
150
+ runPython('scripts/build_adapters.py', args.slice(1));
151
+ break;
152
+ }
153
+
130
154
  case 'install': {
131
155
  runBash('install.sh', args.slice(1));
132
156
  break;
@@ -0,0 +1,23 @@
1
+ {
2
+ "pack_id": "biopharma",
3
+ "description": "Biopharma regulatory research constitution: preprints heavily downweighted, retracted findings zero-tolerance, predatory/mirror domains banned. For FDA-facing dossiers and clinical evidence reviews.",
4
+ "tier_weights": {
5
+ "__default__": 1.0,
6
+ "PEER_REVIEWED": 1.0,
7
+ "TECHNICAL_DOCUMENTATION": 0.8,
8
+ "PRIMARY_PRESS": 0.7,
9
+ "PREPRINT": 0.3,
10
+ "SECONDARY_MEDIA": 0.2
11
+ },
12
+ "neg_bonus": 0.5,
13
+ "reject_penalty": 2.5,
14
+ "accept_threshold": 0.7,
15
+ "banned_domains": [
16
+ "predatory-journal.example",
17
+ "retracted-mirror.example",
18
+ "banned-preprint-mirror.example"
19
+ ],
20
+ "mandatory_tags": ["VERIFIED", "INFERRED", "HYPOTHESIS", "NEGATIVE_KNOWLEDGE"],
21
+ "retraction_policy": "zero_tolerance",
22
+ "export_template": "regulatory"
23
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "pack_id": "legal",
3
+ "description": "Legal research constitution: primary sources (statutes, filings, opinions) weighted above commentary; unverified secondary reporting heavily penalized.",
4
+ "tier_weights": {
5
+ "__default__": 1.0,
6
+ "PEER_REVIEWED": 0.8,
7
+ "TECHNICAL_DOCUMENTATION": 0.7,
8
+ "PRIMARY_PRESS": 1.0,
9
+ "PREPRINT": 0.2,
10
+ "SECONDARY_MEDIA": 0.3
11
+ },
12
+ "neg_bonus": 0.5,
13
+ "reject_penalty": 2.5,
14
+ "accept_threshold": 0.65,
15
+ "banned_domains": ["undisclosed-sponsored-content.example"],
16
+ "mandatory_tags": ["VERIFIED", "INFERRED", "HYPOTHESIS", "NEGATIVE_KNOWLEDGE"],
17
+ "retraction_policy": "standard",
18
+ "export_template": "regulatory"
19
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "pack_id": "quant",
3
+ "description": "Quantitative finance constitution: backtest claims must be reproducible; vendor marketing downweighted; live-trading failure postmortems valued as negative knowledge.",
4
+ "tier_weights": {
5
+ "__default__": 1.0,
6
+ "PEER_REVIEWED": 0.9,
7
+ "TECHNICAL_DOCUMENTATION": 1.0,
8
+ "PRIMARY_PRESS": 0.6,
9
+ "PREPRINT": 0.5,
10
+ "SECONDARY_MEDIA": 0.2
11
+ },
12
+ "neg_bonus": 0.75,
13
+ "reject_penalty": 3.0,
14
+ "accept_threshold": 0.7,
15
+ "banned_domains": ["vendor-whitepaper-mirror.example"],
16
+ "mandatory_tags": ["VERIFIED", "INFERRED", "HYPOTHESIS", "NEGATIVE_KNOWLEDGE"],
17
+ "retraction_policy": "standard",
18
+ "export_template": "regulatory"
19
+ }
@@ -1,5 +1,12 @@
1
1
  {
2
2
  "mcpServers": {
3
+ "iumbtems": {
4
+ "command": "python3",
5
+ "args": ["runner/mcp_server.py"],
6
+ "env": {
7
+ "PYTHONPATH": "${IUMBTEMS_ROOT}"
8
+ }
9
+ },
3
10
  "brave-search": {
4
11
  "command": "npx",
5
12
  "args": ["-y", "@modelcontextprotocol/server-brave-search"],