@heretek-ai/epistemic-swarm 0.1.0 → 0.2.2

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 (51) hide show
  1. package/.claude-plugin/marketplace.json +36 -9
  2. package/.claude-plugin/plugin.json +47 -41
  3. package/MARKETPLACE.md +93 -0
  4. package/README.md +117 -74
  5. package/bin/cli.js +73 -8
  6. package/config/mcp_launcher.py +215 -0
  7. package/config/opencode-snippet.json +48 -0
  8. package/extensions/pi/index.js +90 -0
  9. package/hooks/hooks.json +24 -0
  10. package/package.json +52 -5
  11. package/plugins/opencode/index.js +149 -0
  12. package/plugins/research-cache/.claude-plugin/plugin.json +15 -0
  13. package/plugins/socratic-grilling/.claude-plugin/plugin.json +15 -0
  14. package/plugins/socratic-grilling/skills/grilling/SKILL.md +48 -0
  15. package/plugins/socratic-grilling/skills/grilling/__init__.py +0 -0
  16. package/plugins/socratic-grilling/skills/grilling/socratic_tree.py +148 -0
  17. package/prompts/agent_code_auditor.md +88 -0
  18. package/prompts/agent_oss_scout.md +78 -0
  19. package/runner/__pycache__/__init__.cpython-311.pyc +0 -0
  20. package/runner/__pycache__/auditor_engine.cpython-311.pyc +0 -0
  21. package/runner/__pycache__/research_swarm.cpython-311.pyc +0 -0
  22. package/runner/__pycache__/state_machine.cpython-311.pyc +0 -0
  23. package/runner/research_swarm.py +230 -81
  24. package/runner/tests/__pycache__/test_swarm.cpython-311.pyc +0 -0
  25. package/runner/tests/test_swarm.py +66 -0
  26. package/skills/code_audit/SKILL.md +45 -0
  27. package/skills/epistemic_search/SKILL.md +35 -0
  28. package/skills/epistemic_search/__init__.py +1 -0
  29. package/skills/epistemic_search/scripts/fetch.py +157 -0
  30. package/skills/epistemic_search/scripts/search.py +162 -0
  31. package/skills/oss_scout/SKILL.md +49 -0
  32. package/skills/research_cache/SKILL.md +36 -0
  33. package/skills/research_cache/__init__.py +0 -0
  34. package/skills/research_cache/__pycache__/__init__.cpython-311.pyc +0 -0
  35. package/skills/research_cache/__pycache__/hasher.cpython-311.pyc +0 -0
  36. package/skills/research_cache/hasher.py +195 -0
  37. package/skills/swarm_config/SKILL.md +72 -0
  38. package/skills/swarm_config/__init__.py +4 -0
  39. package/skills/swarm_config/__pycache__/__init__.cpython-311.pyc +0 -0
  40. package/skills/swarm_config/__pycache__/configure.cpython-311.pyc +0 -0
  41. package/skills/swarm_config/configure.py +167 -0
  42. package/runner/__pycache__/__init__.cpython-314.pyc +0 -0
  43. package/runner/__pycache__/auditor_engine.cpython-314.pyc +0 -0
  44. package/runner/__pycache__/research_swarm.cpython-314.pyc +0 -0
  45. package/runner/__pycache__/state_machine.cpython-314.pyc +0 -0
  46. package/runner/tests/__pycache__/test_swarm.cpython-314.pyc +0 -0
  47. package/skills/research-cache/__pycache__/__init__.cpython-314.pyc +0 -0
  48. package/skills/research-cache/__pycache__/hasher.cpython-314.pyc +0 -0
  49. /package/{skills/research-cache → plugins/research-cache/skills/research_cache}/SKILL.md +0 -0
  50. /package/{skills/research-cache → plugins/research-cache/skills/research_cache}/__init__.py +0 -0
  51. /package/{skills/research-cache → plugins/research-cache/skills/research_cache}/hasher.py +0 -0
@@ -1,14 +1,41 @@
1
1
  {
2
+ "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
2
3
  "name": "heretek-official",
3
- "owner": "Heretek AI",
4
- "description": "Official plugins and agent harnesses from Heretek AI",
5
- "plugins": {
6
- "epistemic-swarm": {
7
- "source": {
8
- "source": "github",
9
- "repo": "Heretek-AI/IUMBTEMS"
4
+ "description": "Official high-integrity research agents and epistemic skills from Heretek AI",
5
+ "owner": {
6
+ "name": "Heretek AI",
7
+ "email": "dev@heretek.ai"
8
+ },
9
+ "plugins": [
10
+ {
11
+ "name": "epistemic-swarm",
12
+ "description": "High-Integrity Dialectic Research Agent Harness enforcing verified empirical evidence over parametric hallucination.",
13
+ "author": {
14
+ "name": "Heretek AI"
10
15
  },
11
- "description": "High-Integrity Dialectic Research Agent Harness for Claude Code"
16
+ "category": "research",
17
+ "source": "./",
18
+ "homepage": "https://github.com/Heretek-AI/IUMBTEMS"
19
+ },
20
+ {
21
+ "name": "socratic-grilling",
22
+ "description": "Matt Pocock-style Socratic interrogation, premise inversion, and lateral exploration skill for Claude Code.",
23
+ "author": {
24
+ "name": "Heretek AI"
25
+ },
26
+ "category": "agents",
27
+ "source": "./plugins/socratic-grilling",
28
+ "homepage": "https://github.com/Heretek-AI/IUMBTEMS"
29
+ },
30
+ {
31
+ "name": "research-cache",
32
+ "description": "Content-addressed SHA256 Markdown source hashing and verbatim quote verification engine.",
33
+ "author": {
34
+ "name": "Heretek AI"
35
+ },
36
+ "category": "research",
37
+ "source": "./plugins/research-cache",
38
+ "homepage": "https://github.com/Heretek-AI/IUMBTEMS"
12
39
  }
13
- }
40
+ ]
14
41
  }
@@ -1,58 +1,64 @@
1
1
  {
2
2
  "name": "epistemic-swarm",
3
- "version": "0.1.0",
3
+ "version": "0.2.2",
4
4
  "description": "High-Integrity Dialectic Research Agent Harness for Claude Code enforcing empirical evidence over parametric hallucination.",
5
- "author": "Heretek AI",
5
+ "author": {
6
+ "name": "Heretek AI",
7
+ "email": "dev@heretek.ai"
8
+ },
6
9
  "license": "Apache-2.0",
7
10
  "repository": "https://github.com/Heretek-AI/IUMBTEMS",
11
+ "homepage": "https://github.com/Heretek-AI/IUMBTEMS#readme",
12
+ "userConfig": {
13
+ "brave_api_key": {
14
+ "type": "string",
15
+ "title": "Brave Search API Key",
16
+ "description": "API key for Brave Search discovery (optional; zero-key DuckDuckGo fallback is used when unset)",
17
+ "sensitive": true,
18
+ "required": false
19
+ },
20
+ "firecrawl_api_key": {
21
+ "type": "string",
22
+ "title": "Firecrawl API Key",
23
+ "description": "API key for Firecrawl deep web extraction (optional; zero-key readability fallback is used when unset)",
24
+ "sensitive": true,
25
+ "required": false
26
+ },
27
+ "firecrawl_api_url": {
28
+ "type": "string",
29
+ "title": "Firecrawl API URL",
30
+ "description": "Endpoint for Firecrawl API or self-hosted instance",
31
+ "default": "https://api.firecrawl.dev",
32
+ "required": false
33
+ },
34
+ "searxng_url": {
35
+ "type": "string",
36
+ "title": "SearXNG URL",
37
+ "description": "Endpoint for self-hosted SearXNG metasearch instance",
38
+ "default": "http://localhost:8080",
39
+ "required": false
40
+ }
41
+ },
8
42
  "mcpServers": {
9
43
  "brave-search": {
10
- "command": "npx",
11
- "args": ["-y", "@modelcontextprotocol/server-brave-search"],
12
- "env": {
13
- "BRAVE_SEARCH_API_KEY": "${BRAVE_SEARCH_API_KEY}"
14
- }
44
+ "command": "python3",
45
+ "args": ["${CLAUDE_PLUGIN_ROOT}/config/mcp_launcher.py", "brave-search"]
15
46
  },
16
47
  "firecrawl": {
17
- "command": "npx",
18
- "args": ["-y", "firecrawl-mcp"],
19
- "env": {
20
- "FIRECRAWL_API_KEY": "${FIRECRAWL_API_KEY}",
21
- "FIRECRAWL_API_URL": "${FIRECRAWL_API_URL:-http://localhost:3002}"
22
- }
48
+ "command": "python3",
49
+ "args": ["${CLAUDE_PLUGIN_ROOT}/config/mcp_launcher.py", "firecrawl"]
23
50
  },
24
51
  "searxng": {
25
52
  "command": "python3",
26
- "args": ["${PLUGIN_DIR}/config/searxng_mcp.py"],
27
- "env": {
28
- "SEARXNG_URL": "${SEARXNG_URL:-http://localhost:8080}"
29
- }
53
+ "args": ["${CLAUDE_PLUGIN_ROOT}/config/mcp_launcher.py", "searxng"]
30
54
  }
31
55
  },
32
56
  "skills": [
33
57
  "./skills/grilling",
34
- "./skills/research-cache"
35
- ],
36
- "configuration": {
37
- "SEARXNG_URL": {
38
- "type": "string",
39
- "description": "SearXNG metasearch instance URL",
40
- "default": "http://localhost:8080"
41
- },
42
- "FIRECRAWL_API_URL": {
43
- "type": "string",
44
- "description": "Firecrawl API endpoint for JS/Markdown extraction",
45
- "default": "http://localhost:3002"
46
- },
47
- "FIRECRAWL_API_KEY": {
48
- "type": "string",
49
- "description": "Firecrawl API Key (optional for self-hosted instances)",
50
- "default": ""
51
- },
52
- "BRAVE_SEARCH_API_KEY": {
53
- "type": "string",
54
- "description": "Brave Search API Key for discovery",
55
- "default": ""
56
- }
57
- }
58
+ "./skills/research_cache",
59
+ "./skills/epistemic_search",
60
+ "./skills/swarm_config",
61
+ "./skills/code_audit",
62
+ "./skills/oss_scout"
63
+ ]
58
64
  }
package/MARKETPLACE.md ADDED
@@ -0,0 +1,93 @@
1
+ # Heretek AI Claude Code Marketplace 🏪
2
+
3
+ Official marketplace catalog for Claude Code plugins, skills, and autonomous agent harnesses developed by [Heretek AI](https://github.com/Heretek-AI).
4
+
5
+ [![Claude Code Compatible](https://img.shields.io/badge/Claude_Code-2.1+-blue.svg)](https://claude.com)
6
+ [![Marketplace Validated](https://img.shields.io/badge/Marketplace-Validated_Strict-success.svg)](https://github.com/Heretek-AI/IUMBTEMS/actions/workflows/validate-marketplace.yml)
7
+ [![npm version](https://img.shields.io/npm/v/@heretek-ai/epistemic-swarm.svg)](https://www.npmjs.com/package/@heretek-ai/epistemic-swarm)
8
+
9
+ ---
10
+
11
+ ## 🚀 Quick Start: Adding the Marketplace
12
+
13
+ To register the **`heretek-official`** marketplace in Claude Code, run:
14
+
15
+ ```bash
16
+ claude plugin marketplace add Heretek-AI/IUMBTEMS
17
+ ```
18
+
19
+ Verify that the marketplace is configured:
20
+ ```bash
21
+ claude plugin marketplace list
22
+ ```
23
+
24
+ ---
25
+
26
+ ## 📦 Available Plugins
27
+
28
+ | Plugin Name | Category | Description | Install Command |
29
+ |---|---|---|---|
30
+ | **`epistemic-swarm`** | `research` | **Flagship Swarm Harness**: Multi-agent dialectic research harness pairing Agent Alpha (Thesis) against Agent Beta (Red Team), audited by an Epistemic Auditor with verbatim empirical quote validation. | `claude plugin install epistemic-swarm@heretek-official` |
31
+ | **`socratic-grilling`** | `agents` | **Socratic Ideation**: Matt Pocock-style Socratic interrogation, premise inversion, and lateral exploration skill. | `claude plugin install socratic-grilling@heretek-official` |
32
+ | **`research-cache`** | `research` | **Source Hasher**: Content-addressed SHA256 Markdown source hashing and verbatim quote verification engine. | `claude plugin install research-cache@heretek-official` |
33
+
34
+ ---
35
+
36
+ ## 🛠️ Plugin Details & Component Breakdown
37
+
38
+ ### 1. `epistemic-swarm` (Flagship Harness)
39
+ - **Manifest**: [`.claude-plugin/plugin.json`](file:///.claude-plugin/plugin.json)
40
+ - **Components**:
41
+ - **Skills**: `skills/grilling`, `skills/research_cache`, `skills/epistemic_search`
42
+ - **Hooks**: `hooks/hooks.json` (`PreToolUse` hook intercepting ungrounded `WebSearch` and `WebFetch` to enforce verifiable SHA-256 caching)
43
+ - **Zero-Key Search**: DuckDuckGo Lite search and automated content-addressed document caching out of the box (zero API key required).
44
+ - **Safe MCP Servers & Accelerators**:
45
+ - `brave-search`: Optional Brave SERP discovery (falls back smoothly to DuckDuckGo when unconfigured).
46
+ - `firecrawl`: Optional Firecrawl JS extraction (falls back smoothly to clean readability reader when unconfigured).
47
+ - `searxng`: Optional self-hosted metasearch instance proxy.
48
+ - **System Prompts**: Base Epistemic System Override, Agent Alpha, Agent Beta, Epistemic Auditor, Orchestrator.
49
+ - **Install & Configuration**:
50
+ ```bash
51
+ claude plugin install epistemic-swarm@heretek-official
52
+ # Configure optional API keys and endpoints interactively:
53
+ claude plugin configure epistemic-swarm
54
+ # Or inside Claude Code interactive session: /plugin configure
55
+ ```
56
+
57
+ ### 2. `socratic-grilling` (Modular Skill)
58
+ - **Manifest**: [`plugins/socratic-grilling/.claude-plugin/plugin.json`](file:///plugins/socratic-grilling/.claude-plugin/plugin.json)
59
+ - **Components**:
60
+ - **Skill**: `skills/grilling` (`/grilling` slash command and interactive decision tree).
61
+ - **Install**:
62
+ ```bash
63
+ claude plugin install socratic-grilling@heretek-official
64
+ ```
65
+
66
+ ### 3. `research-cache` (Modular Tool)
67
+ - **Manifest**: [`plugins/research-cache/.claude-plugin/plugin.json`](file:///plugins/research-cache/.claude-plugin/plugin.json)
68
+ - **Components**:
69
+ - **Skill & Engine**: `skills/research-cache` (Content-addressed SHA256 raw source storage and quote validation).
70
+ - **Install**:
71
+ ```bash
72
+ claude plugin install research-cache@heretek-official
73
+ ```
74
+
75
+ ---
76
+
77
+ ## 🔍 Inspecting Installed Plugins
78
+
79
+ To view installed plugins and their active components:
80
+ ```bash
81
+ claude plugin list
82
+ claude plugin details epistemic-swarm@heretek-official
83
+ ```
84
+
85
+ To update all installed plugins to their latest versions:
86
+ ```bash
87
+ claude plugin update epistemic-swarm
88
+ ```
89
+
90
+ To uninstall:
91
+ ```bash
92
+ claude plugin uninstall epistemic-swarm
93
+ ```
package/README.md CHANGED
@@ -1,127 +1,170 @@
1
- # Epistemic Swarm 🌟
1
+ # IUMBTEMS: I Use My Brain To Express My Self 🧠
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@heretek-ai/epistemic-swarm.svg)](https://www.npmjs.com/package/@heretek-ai/epistemic-swarm)
4
4
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
5
5
  [![CI/CD](https://github.com/Heretek-AI/IUMBTEMS/actions/workflows/publish.yml/badge.svg)](https://github.com/Heretek-AI/IUMBTEMS/actions)
6
+ [![Marketplace Validated](https://github.com/Heretek-AI/IUMBTEMS/actions/workflows/validate-marketplace.yml/badge.svg)](https://github.com/Heretek-AI/IUMBTEMS/actions)
6
7
 
7
- > **High-Integrity Dialectic Research Agent Harness for Claude Code**
8
+ > **High-Integrity Dialectic Research Agent Harness**
9
+ > *Universal support for Claude Code, Pi (pi.dev), and OpenCode V2.*
8
10
  > *Enforcing verified empirical evidence over parametric hallucination.*
9
11
 
10
12
  ---
11
13
 
12
- ## 🎯 The Epistemic Mandate
14
+ ## 💡 The Philosophy of IUMBTEMS
13
15
 
14
- Current AI research assistants suffer from parametric hallucination, sycophancy, and premature narrative consensus. They invent citations, smooth over technical contradictions, and extrapolate beyond empirical bounds.
16
+ **IUMBTEMS** (**I Use My Brain To Express My Self**) is grounded in a singular design mandate: **Epistemic Sovereignty**.
15
17
 
16
- **Epistemic Swarm** is an autonomous, dialectic research harness built on top of [Claude Code](https://claude.ai/code) (`~/.claude/` and `~/.claude.json`). It enforces **evidentiary primacy** through:
17
- 1. **Mathematical Evidentiary Tags**: Every factual claim is tagged `[VERIFIED: <hash>]`, `[INFERRED: ...]`, `[HYPOTHESIS: ...]`, or `[NEGATIVE_KNOWLEDGE: ...]`.
18
- 2. **Dialectic Swarm Architecture**: Competitively dispatches **Agent Alpha** (The Thesis / Primary Literature Proponent) and **Agent Beta** (The Antithesis / Hostile Red Team / Active Falsifier).
19
- 3. **Content-Addressed Source Caching**: Web pages and papers are hashed to SHA-256 (`.research/sources/<sha256>.md`).
20
- 4. **Algorithmic Epistemic Auditor**: Verifies cited quotes verbatim against the raw source cache, downgrades fabricated claims, scores divergence, and synthesizes the unvarnished empirical truth.
21
- 5. **Socratic Grilling & Divergent Ideation**: Matt Pocock-style design tree traversal that explores assumption inversions and clarifies constraints *before* committing to search queries.
18
+ Modern LLMs suffer from parametric hallucination, sycophancy, and premature narrative consensus. They invent citations, smooth over technical contradictions, and extrapolate beyond empirical bounds.
19
+
20
+ **IUMBTEMS** restores rigorous empirical grounding by pairing an unconstrained divergent exploration phase (Matt Pocock-style Socratic grilling and assumption inversion) with a multi-agent dialectic swarm:
21
+ 1. **Agent Alpha (The Proponent / Thesis)**: Gathers corroborating primary sources, empirical proofs, and implementation benchmarks.
22
+ 2. **Agent Beta (The Adversary / Antithesis / Red Team)**: Hunts for counter-arguments, retracted data, methodology flaws, and edge-case failures.
23
+ 3. **Epistemic Auditor**: Verifies cited quotes verbatim against content-addressed raw markdown caches (`.research/sources/<sha256>.md`), prunes ungrounded assertions, and scores dialectic divergence.
22
24
 
23
25
  ---
24
26
 
25
- ## 🏗️ System Architecture
26
-
27
- ```mermaid
28
- flowchart TD
29
- User([Research Objective]) --> Grilling["Phase 1: Socratic Grilling (/grilling)\n(Assumption Inversion & Frontier Resolution)"]
30
- Grilling --> SettledFrontier[Settled Problem Frontier & Constraints]
31
- SettledFrontier --> Orchestrator["Phase 2: Swarm Orchestrator\n(Scope Decomposition & DAG Planner)"]
32
-
33
- Orchestrator --> Scope1[Scope 1: Technical Mechanisms]
34
- Orchestrator --> Scope2[Scope 2: Scalability & Economics]
35
-
36
- subgraph DialecticLoop [Parallel Dialectic Execution per Scope]
37
- Scope1 --> Alpha["Agent Alpha: The Proponent\n(Empirical Evidence, Primary Literature)"]
38
- Scope1 --> Beta["Agent Beta: The Adversary\n(Active Falsification, Red-Teaming)"]
39
-
40
- Alpha -->|Writes| AlphaDossier[alpha_dossier.json + Cached Sources]
41
- Beta -->|Writes| BetaDossier[beta_dossier.json + Cached Sources]
42
-
43
- AlphaDossier --> Auditor["Phase 3: Epistemic Auditor\n(Verbatim Quote Hash Verification & Divergence Scoring)"]
44
- BetaDossier --> Auditor
45
- Auditor --> ScopeSynth[Scope Synthesis & Audit Report]
46
- end
47
-
48
- ScopeSynth --> MasterSynth["Phase 4: Master Synthesis (.research/final_synthesis.md)"]
49
- ```
27
+ ## 🌐 Universal Multi-Platform Support
50
28
 
51
- ---
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:
52
30
 
53
- ## ⚡ Quickstart
31
+ ### 1. Claude Code (Native Marketplace & Overlay)
54
32
 
55
- ### Option 1: Run via NPX (Zero Setup)
33
+ #### Native Marketplace (Recommended)
34
+ Add the official Heretek AI marketplace to Claude Code:
56
35
  ```bash
57
- # Execute deep research swarm directly
58
- npx @heretek-ai/epistemic-swarm run "Evaluate FPGA Poseidon prover latency bounds"
36
+ claude plugin marketplace add Heretek-AI/IUMBTEMS
37
+ ```
38
+ Then install either the flagship harness or modular standalone plugins:
39
+ ```bash
40
+ # Flagship dialectic research harness:
41
+ claude plugin install epistemic-swarm@heretek-official
59
42
 
60
- # Run Socratic decision tree framing
61
- npx @heretek-ai/epistemic-swarm grill --objective "L1 vs L2 state verification trade-offs"
43
+ # Or install standalone modular plugins:
44
+ claude plugin install socratic-grilling@heretek-official
45
+ claude plugin install research-cache@heretek-official
62
46
  ```
47
+ See [MARKETPLACE.md](MARKETPLACE.md) for full component specifications.
63
48
 
64
- ### Option 2: Install into Claude Code Environment
49
+ #### CLI Overlay Installer
50
+ Install skills and MCP servers directly into `~/.claude/` and `~/.claude.json`:
65
51
  ```bash
66
- git clone https://github.com/Heretek-AI/IUMBTEMS.git
67
- cd IUMBTEMS
52
+ npx @heretek-ai/epistemic-swarm install
53
+ # or from local repo:
68
54
  npm run install-local
69
55
  ```
70
- This automatically symlinks the `/grilling` and `/research-cache` skills into `~/.claude/skills/` and configures MCP servers in `~/.claude.json`.
56
+ - Run `/grilling` inside any interactive Claude Code session.
57
+ - Run headless dialectic research:
58
+ ```bash
59
+ iumbtems run "Evaluate FPGA Poseidon prover latency bounds"
60
+ ```
61
+
62
+ ### 2. Pi (`pi.dev`)
63
+ Install directly into Pi via its native package manager:
64
+ ```bash
65
+ pi install npm:@heretek-ai/epistemic-swarm
66
+ ```
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.
69
+
70
+ ### 3. OpenCode V2 (`opencode.ai`)
71
+ Enable IUMBTEMS in your `~/.config/opencode/opencode.json` or project `opencode.jsonc`:
72
+ ```json
73
+ {
74
+ "plugin": [
75
+ "@heretek-ai/epistemic-swarm"
76
+ ]
77
+ }
78
+ ```
79
+ OpenCode V2 automatically registers:
80
+ - `iumbtems_swarm_research`: Dispatches dialectic researcher pairs.
81
+ - `iumbtems_verify_quote`: Audits verbatim citations against the SHA-256 source cache.
82
+ - `iumbtems_socratic_frontier`: Advances the Socratic decision tree frontier.
83
+
84
+ *(See [config/opencode-snippet.json](config/opencode-snippet.json) for custom agent definitions).*
85
+
86
+ ---
87
+
88
+ ## ⚡ CLI Command Reference
89
+
90
+ ```bash
91
+ # Inspect or update active configuration (search engine, depth, mode)
92
+ iumbtems config
93
+ iumbtems config --engine duckduckgo --depth 3 --mode audit
94
+
95
+ # Run dialectic codebase architecture & security audit
96
+ iumbtems audit "runner/ and skills/ concurrency and injection security"
97
+
98
+ # Scout open-source software, mature libraries & clean-room blueprints
99
+ iumbtems scout "Zero-dependency Raft consensus implementations in Rust"
100
+
101
+ # Run the autonomous dialectic research swarm
102
+ iumbtems run "Sub-millisecond ZK state updates on L1 rollups"
103
+
104
+ # Run Socratic grilling and decision frontier calculation
105
+ iumbtems grill --objective "L1 vs L2 state verification trade-offs"
106
+
107
+ # Environment diagnostics (Claude Code, Node, Python)
108
+ iumbtems doctor
109
+
110
+ # Run automated test suite
111
+ iumbtems test
112
+ ```
113
+
114
+ ### Specialized Dialectic Skills & Slash Commands
115
+ - **`/swarm-config`**: Interactive tuning of search engines (DuckDuckGo, Brave, Firecrawl, SearXNG), iteration depth, divergence thresholds, and operating modes.
116
+ - **`/code-audit`**: Dialectic codebase review pairing a Structural Architect (thesis) with a Vulnerability Red-Teamer (antithesis) enforcing line-number proofs (`file:///path#L10-25`).
117
+ - **`/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.
118
+ - **`/grilling`**: Socratic assumption-inversion and Matt Pocock-style design tree frontier discovery.
119
+ - **`epistemic_search`**: Zero-key DuckDuckGo Lite search and content-addressed fetch with automatic SHA-256 caching.
120
+
71
121
 
72
122
  ---
73
123
 
74
124
  ## 🏷️ Epistemic Tagging Taxonomy
75
125
 
76
- | Tag | Meaning | Requirement |
126
+ Every factual claim in IUMBTEMS carries an explicit evidentiary tag:
127
+
128
+ | Tag | Formal Definition | Verification Standard |
77
129
  | :--- | :--- | :--- |
78
- | `[VERIFIED: <hash>]` | Direct empirical fact backed by primary source. | Verbatim quote must exist in `.research/sources/<hash>.md`. |
79
- | `[INFERRED: <reasoning>]` | Deductive conclusion from verified facts. | Must list parent verified claims and deductive step. |
130
+ | `[VERIFIED: <hash>]` | Direct empirical fact from primary source. | Verbatim quote must exist in `.research/sources/<hash>.md`. |
131
+ | `[INFERRED: <reasoning>]` | Deductive conclusion from verified facts. | Explicit list of parent verified premises and bridging logic. |
80
132
  | `[HYPOTHESIS: <test>]` | Speculative assertion or projection. | Must define a measurable falsification criterion. |
81
- | `[NEGATIVE_KNOWLEDGE: <query>]` | Verified absence of empirical evidence. | Records exact search query and confirmed literature gap. |
133
+ | `[NEGATIVE_KNOWLEDGE: <query>]` | Verified absence of empirical evidence. | Records exact search query and literature gap. |
82
134
 
83
135
  ---
84
136
 
85
137
  ## 🔍 Multi-Tier OSINT & Search Pipeline
86
138
 
87
- 1. **Discovery Tier**: SearXNG (metasearch) and Brave Search API.
139
+ 1. **Discovery Tier**: SearXNG (unbiased metasearch) and Brave Search API.
88
140
  2. **Extraction Tier**: Firecrawl (headless JavaScript rendering, DOM cleaning, Markdown extraction).
89
- 3. **Academic Tier**: Semantic Scholar / arXiv MCPs for DOI resolution.
141
+ 3. **Academic Tier**: Semantic Scholar / arXiv MCPs for DOI citation resolution.
90
142
  4. **Caching Tier**: Content-addressed SHA-256 storage (`skills/research-cache/hasher.py`).
91
143
 
92
- ### Optional Turnkey Infrastructure (SearXNG + Firecrawl)
93
- To run your own unbiased metasearch and headless extractor locally:
144
+ ### Local Infrastructure (Optional)
145
+ Run local SearXNG and Firecrawl instances via Docker Compose:
94
146
  ```bash
95
147
  docker compose -f config/docker-compose.infra.yml up -d
96
148
  ```
97
149
 
98
150
  ---
99
151
 
100
- ## 🧪 Testing
152
+ ## 📦 CI/CD & Trusted Publishing
101
153
 
102
- Epistemic Swarm comes with an automated test suite verifying source hashing, quote substring matching, IPC state transitions, and mock swarm dispatch:
154
+ This package is distributed on npm under `@heretek-ai` with [npm Trusted Publishing (OIDC)](https://docs.npmjs.com/trusted-publishers) and GitHub Actions.
103
155
 
156
+ ### First-Time CLI Bootstrap
104
157
  ```bash
105
- npm test
158
+ git pull origin main
159
+ npm publish --access public
106
160
  ```
107
161
 
108
- ---
109
-
110
- ## 📦 Deployment & CI/CD
111
-
112
- This package is distributed via npm under `@heretek-ai` with [npm Trusted Publishing (OIDC)](https://docs.npmjs.com/trusted-publishers) and GitHub Actions.
113
-
114
- ### First-Time Publication (One-Time Bootstrap)
115
- 1. Authenticate locally:
116
- ```bash
117
- npm login
118
- ```
119
- 2. Publish initial version:
120
- ```bash
121
- npm publish --access public
122
- ```
123
- 3. In `npmjs.com/package/@heretek-ai/epistemic-swarm/access`, add **GitHub Actions** as a Trusted Publisher for repository `Heretek-AI/IUMBTEMS` and workflow `.github/workflows/publish.yml`.
124
- 4. Subsequent releases publish automatically upon pushing a GitHub Release or git tag!
162
+ ### GitHub Actions OIDC Setup
163
+ 1. In `npmjs.com/package/@heretek-ai/epistemic-swarm/access`, add **GitHub Actions** as a Trusted Publisher:
164
+ - **Repository Owner**: `Heretek-AI`
165
+ - **Repository Name**: `IUMBTEMS`
166
+ - **Workflow Pattern**: `.github/workflows/publish.yml`
167
+ 2. Future releases publish automatically upon pushing a GitHub Release or version tag (`v*.*.*`)!
125
168
 
126
169
  ---
127
170
 
package/bin/cli.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /**
4
- * Epistemic Swarm CLI
5
- * Multi-agent dialectic research harness for Claude Code.
4
+ * IUMBTEMS CLI: I Use My Brain To Express My Self
5
+ * High-Integrity Dialectic Research Harness for Claude Code, Pi, and OpenCode V2.
6
6
  */
7
7
 
8
8
  const { spawnSync } = require('child_process');
@@ -15,30 +15,47 @@ const command = args[0] || 'help';
15
15
 
16
16
  function printHelp() {
17
17
  console.log(`
18
- 🌟 Epistemic Swarm: High-Integrity Research Harness for Claude Code
18
+ 🧠 IUMBTEMS: I Use My Brain To Express My Self
19
+ 🌟 Epistemic Swarm: High-Integrity Research Harness
20
+ Platforms: Claude Code | Pi (pi.dev) | OpenCode V2
19
21
  Organization: @heretek-ai | Repository: Heretek-AI/IUMBTEMS
20
22
 
21
23
  Usage:
22
- npx @heretek-ai/epistemic-swarm <command> [options]
23
24
  iumbtems <command> [options]
25
+ npx @heretek-ai/epistemic-swarm <command> [options]
24
26
 
25
27
  Commands:
28
+ config [options] Inspect or modify swarm parameters (engine, depth, mode)
29
+ audit "<target>" Run dialectic codebase architectural & security audit
30
+ scout "<feature>" Scout open-source software, libraries & clean-room blueprints
26
31
  run "<objective>" Run the dialectic multi-agent research swarm
27
32
  grill Launch interactive Socratic decision tree framing
28
33
  install Install skills & MCP servers into ~/.claude/
34
+ marketplace Show Claude Code marketplace catalog & install commands
29
35
  test Run test suite for hashing, state machine & auditor
30
- doctor Check environment requirements (Claude Code, Python, Node)
36
+ doctor Check environment requirements (Claude Code, Pi, OpenCode)
31
37
  help Show this help message
32
38
 
39
+ Platform Extensions:
40
+ Pi (pi.dev): pi install npm:@heretek-ai/epistemic-swarm
41
+ OpenCode V2: add "@heretek-ai/epistemic-swarm" to opencode.json plugins
42
+ Claude Code: npx @heretek-ai/epistemic-swarm install
43
+
33
44
  Options:
34
45
  --mock-claude Run swarm with synthetic mock responses (zero API cost)
35
46
  --frontier <file> Path to settled frontier.json from Socratic grilling
47
+ --mode <mode> Operating mode (research, audit, scout, hybrid)
48
+ --engine <engine> Search engine (duckduckgo, brave, firecrawl, searxng)
49
+ --depth <n> Max dialectic iterations (1-4)
36
50
  --dir <path> Path to .research workspace directory (default: .research)
37
51
 
38
52
  Examples:
39
- npx @heretek-ai/epistemic-swarm run "Verify sub-millisecond ZK prover latency"
40
- npx @heretek-ai/epistemic-swarm grill --objective "Rollup architecture trade-offs"
41
- npx @heretek-ai/epistemic-swarm install
53
+ iumbtems config --engine duckduckgo --depth 3
54
+ iumbtems audit "runner/ and skills/ concurrency & security"
55
+ iumbtems scout "Zero-dependency Raft consensus in Rust"
56
+ iumbtems run "Verify sub-millisecond ZK prover latency"
57
+ iumbtems grill --objective "Rollup architecture trade-offs"
58
+ iumbtems doctor
42
59
  `);
43
60
  }
44
61
 
@@ -68,6 +85,31 @@ function runBash(scriptRelPath, extraArgs = []) {
68
85
  }
69
86
 
70
87
  switch (command) {
88
+ case 'config': {
89
+ runPython('skills/swarm_config/configure.py', args.slice(1));
90
+ break;
91
+ }
92
+
93
+ case 'audit': {
94
+ const targetObj = args[1] && !args[1].startsWith('--') ? args[1] : 'Full codebase architectural and security audit';
95
+ const restArgs = args[1] && !args[1].startsWith('--') ? args.slice(2) : args.slice(1);
96
+ const forwardArgs = ['--mode', 'audit', '--objective', targetObj, ...restArgs];
97
+ runPython('runner/research_swarm.py', forwardArgs);
98
+ break;
99
+ }
100
+
101
+ case 'scout': {
102
+ const objective = args[1];
103
+ if (!objective || objective.startsWith('--')) {
104
+ console.error('Error: Please provide a feature or library to scout.');
105
+ console.error('Example: npx @heretek-ai/epistemic-swarm scout "Zero-dependency Raft in Rust"');
106
+ process.exit(1);
107
+ }
108
+ const forwardArgs = ['--mode', 'scout', '--objective', objective, ...args.slice(2)];
109
+ runPython('runner/research_swarm.py', forwardArgs);
110
+ break;
111
+ }
112
+
71
113
  case 'run': {
72
114
  const objective = args[1];
73
115
  if (!objective || objective.startsWith('--')) {
@@ -90,6 +132,29 @@ switch (command) {
90
132
  break;
91
133
  }
92
134
 
135
+ case 'marketplace': {
136
+ const mktPath = path.join(PKG_ROOT, '.claude-plugin', 'marketplace.json');
137
+ if (!fs.existsSync(mktPath)) {
138
+ console.error('Marketplace manifest not found.');
139
+ process.exit(1);
140
+ }
141
+ const mkt = JSON.parse(fs.readFileSync(mktPath, 'utf8'));
142
+ console.log(`\n🏪 CLAUDE CODE MARKETPLACE: ${mkt.name.toUpperCase()}`);
143
+ console.log(`================================================`);
144
+ console.log(`Owner: ${mkt.owner ? mkt.owner.name : 'Unknown'} <${mkt.owner ? mkt.owner.email : ''}>`);
145
+ console.log(`Description: ${mkt.description}\n`);
146
+ console.log(`🚀 Add this marketplace to Claude Code:`);
147
+ console.log(` claude plugin marketplace add Heretek-AI/IUMBTEMS\n`);
148
+ console.log(`📦 Available Plugins in Marketplace:`);
149
+ (mkt.plugins || []).forEach((p, idx) => {
150
+ console.log(` ${idx + 1}. ${p.name} [${p.category || 'plugin'}]`);
151
+ console.log(` Description: ${p.description}`);
152
+ console.log(` Install: claude plugin install ${p.name}@${mkt.name}`);
153
+ console.log(` Configure: claude plugin configure ${p.name}@${mkt.name}\n`);
154
+ });
155
+ break;
156
+ }
157
+
93
158
  case 'test': {
94
159
  runPython('-m', ['unittest', 'discover', '-s', 'runner/tests']);
95
160
  break;