@heretek-ai/epistemic-swarm 0.7.16 → 0.7.18

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 (168) hide show
  1. package/.agents/skills/brainstorming/SKILL.md +6 -0
  2. package/.agents/skills/code_audit/SKILL.md +6 -0
  3. package/.agents/skills/darkharvest/SKILL.md +6 -0
  4. package/.agents/skills/epistemic_search/SKILL.md +6 -0
  5. package/.agents/skills/factory/SKILL.md +6 -0
  6. package/.agents/skills/grilling/SKILL.md +6 -0
  7. package/.agents/skills/oss_scout/SKILL.md +6 -0
  8. package/.agents/skills/research_cache/SKILL.md +6 -0
  9. package/.agents/skills/swarm_config/SKILL.md +6 -0
  10. package/.claude-plugin/plugin.json +1 -1
  11. package/README.md +20 -0
  12. package/install.sh +233 -14
  13. package/package.json +2 -2
  14. package/plugins/antigravity/README.md +50 -15
  15. package/plugins/antigravity/agents/alpha-thesis.md +35 -5
  16. package/plugins/antigravity/agents/beta-antithesis.md +34 -6
  17. package/plugins/antigravity/agents/brainstormer.md +26 -6
  18. package/plugins/antigravity/agents/code-auditor.md +28 -0
  19. package/plugins/antigravity/agents/darkharvester.md +30 -0
  20. package/plugins/antigravity/agents/epistemic-auditor.md +27 -4
  21. package/plugins/antigravity/agents/manager.md +26 -0
  22. package/plugins/antigravity/agents/oss-scout.md +27 -0
  23. package/plugins/antigravity/agents/programmer.md +25 -0
  24. package/plugins/antigravity/agents/qa-a.md +22 -0
  25. package/plugins/antigravity/agents/qa-b.md +22 -0
  26. package/plugins/antigravity/antigravity_hooks.py +167 -0
  27. package/plugins/antigravity/commands/audit.md +10 -0
  28. package/plugins/antigravity/commands/brainstorming.md +12 -0
  29. package/plugins/antigravity/commands/darkharvest.md +11 -0
  30. package/plugins/antigravity/commands/domainexpansion.md +9 -0
  31. package/plugins/antigravity/commands/factory.md +9 -0
  32. package/plugins/antigravity/commands/grill.md +9 -0
  33. package/plugins/antigravity/commands/scout.md +10 -0
  34. package/plugins/antigravity/commands/swarm-config.md +10 -0
  35. package/plugins/antigravity/commands/swarm.md +9 -0
  36. package/plugins/antigravity/hooks.json +34 -13
  37. package/plugins/antigravity/mcp_config.json +11 -11
  38. package/plugins/antigravity/mcp_launcher.py +58 -0
  39. package/plugins/antigravity/plugin.json +7 -17
  40. package/plugins/antigravity/rules/AGENTS.md +125 -0
  41. package/plugins/antigravity/rules/epistemic-integrity.md +15 -5
  42. package/plugins/antigravity/skills/brainstorming/SKILL.md +6 -0
  43. package/plugins/antigravity/skills/code_audit/SKILL.md +6 -0
  44. package/plugins/antigravity/skills/darkharvest/SKILL.md +6 -0
  45. package/plugins/antigravity/skills/epistemic_search/SKILL.md +6 -0
  46. package/plugins/antigravity/skills/factory/SKILL.md +6 -0
  47. package/plugins/antigravity/skills/grilling/SKILL.md +6 -0
  48. package/plugins/antigravity/skills/oss_scout/SKILL.md +6 -0
  49. package/plugins/antigravity/skills/research_cache/SKILL.md +6 -0
  50. package/plugins/antigravity/skills/swarm_config/SKILL.md +6 -0
  51. package/plugins/codex/skills/brainstorming/SKILL.md +6 -0
  52. package/plugins/codex/skills/code_audit/SKILL.md +6 -0
  53. package/plugins/codex/skills/darkharvest/SKILL.md +6 -0
  54. package/plugins/codex/skills/epistemic_search/SKILL.md +6 -0
  55. package/plugins/codex/skills/factory/SKILL.md +6 -0
  56. package/plugins/codex/skills/grilling/SKILL.md +6 -0
  57. package/plugins/codex/skills/oss_scout/SKILL.md +6 -0
  58. package/plugins/codex/skills/research_cache/SKILL.md +6 -0
  59. package/plugins/codex/skills/swarm_config/SKILL.md +6 -0
  60. package/plugins/gemini/skills/brainstorming/SKILL.md +6 -0
  61. package/plugins/gemini/skills/code_audit/SKILL.md +6 -0
  62. package/plugins/gemini/skills/darkharvest/SKILL.md +6 -0
  63. package/plugins/gemini/skills/epistemic_search/SKILL.md +6 -0
  64. package/plugins/gemini/skills/factory/SKILL.md +6 -0
  65. package/plugins/gemini/skills/grilling/SKILL.md +6 -0
  66. package/plugins/gemini/skills/oss_scout/SKILL.md +6 -0
  67. package/plugins/gemini/skills/research_cache/SKILL.md +6 -0
  68. package/plugins/gemini/skills/swarm_config/SKILL.md +6 -0
  69. package/plugins/opencode/index.js +598 -1
  70. package/plugins/research-cache/skills/research_cache/hasher.py +25 -3
  71. package/plugins/socratic-grilling/skills/grilling/socratic_tree.py +159 -24
  72. package/runner/__pycache__/__init__.cpython-311.pyc +0 -0
  73. package/runner/__pycache__/auctioneer.cpython-311.pyc +0 -0
  74. package/runner/__pycache__/auditor_engine.cpython-311.pyc +0 -0
  75. package/runner/__pycache__/claim_store.cpython-311.pyc +0 -0
  76. package/runner/__pycache__/claim_witness.cpython-311.pyc +0 -0
  77. package/runner/__pycache__/darkharvest_claims.cpython-311.pyc +0 -0
  78. package/runner/__pycache__/errors.cpython-311.pyc +0 -0
  79. package/runner/__pycache__/living_dossiers.cpython-311.pyc +0 -0
  80. package/runner/__pycache__/mcp_protocol.cpython-311.pyc +0 -0
  81. package/runner/__pycache__/mcp_server.cpython-311.pyc +0 -0
  82. package/runner/__pycache__/path_safety.cpython-311.pyc +0 -0
  83. package/runner/__pycache__/pcrb.cpython-311.pyc +0 -0
  84. package/runner/__pycache__/pcrb_verify.cpython-311.pyc +0 -0
  85. package/runner/__pycache__/preflight.cpython-311.pyc +0 -0
  86. package/runner/__pycache__/refinement.cpython-311.pyc +0 -0
  87. package/runner/__pycache__/research_swarm.cpython-311.pyc +0 -0
  88. package/runner/__pycache__/retrieval_log.cpython-311.pyc +0 -0
  89. package/runner/__pycache__/schema_validate.cpython-311.pyc +0 -0
  90. package/runner/__pycache__/schemas.cpython-311.pyc +0 -0
  91. package/runner/__pycache__/state_machine.cpython-311.pyc +0 -0
  92. package/runner/antigravity_hooks.py +167 -0
  93. package/runner/auditor_engine.py +19 -2
  94. package/runner/darkharvest_claims.py +42 -10
  95. package/runner/mcp_server.py +291 -88
  96. package/runner/preflight.py +867 -13
  97. package/runner/research_swarm.py +174 -13
  98. package/runner/schema_validate.py +40 -2
  99. package/runner/schemas.py +335 -0
  100. package/runner/state_machine.py +28 -2
  101. package/runner/tests/__pycache__/test_antigravity_plugin.cpython-311.pyc +0 -0
  102. package/runner/tests/__pycache__/test_auction_order.cpython-311.pyc +0 -0
  103. package/runner/tests/__pycache__/test_backends.cpython-311.pyc +0 -0
  104. package/runner/tests/__pycache__/test_bet1_spike.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_claude_plugin.cpython-311.pyc +0 -0
  108. package/runner/tests/__pycache__/test_config_schema.cpython-311.pyc +0 -0
  109. package/runner/tests/__pycache__/test_contract_tooling.cpython-311.pyc +0 -0
  110. package/runner/tests/__pycache__/test_darkharvest_audit.cpython-311.pyc +0 -0
  111. package/runner/tests/__pycache__/test_domain_packs.cpython-311.pyc +0 -0
  112. package/runner/tests/__pycache__/test_dossier_contract.cpython-311.pyc +0 -0
  113. package/runner/tests/__pycache__/test_factory.cpython-311.pyc +0 -0
  114. package/runner/tests/__pycache__/test_fleet_seam.cpython-311.pyc +0 -0
  115. package/runner/tests/__pycache__/test_frontier_concurrency.cpython-311.pyc +0 -0
  116. package/runner/tests/__pycache__/test_frontier_mirror_standalone.cpython-311.pyc +0 -0
  117. package/runner/tests/__pycache__/test_grounding.cpython-311.pyc +0 -0
  118. package/runner/tests/__pycache__/test_living_dossiers.cpython-311.pyc +0 -0
  119. package/runner/tests/__pycache__/test_manifest_concurrency.cpython-311.pyc +0 -0
  120. package/runner/tests/__pycache__/test_mcp_server.cpython-311.pyc +0 -0
  121. package/runner/tests/__pycache__/test_opencode_ux.cpython-311.pyc +0 -0
  122. package/runner/tests/__pycache__/test_opencode_v2_registrars.cpython-311.pyc +0 -0
  123. package/runner/tests/__pycache__/test_pcrb.cpython-311.pyc +0 -0
  124. package/runner/tests/__pycache__/test_refinement.cpython-311.pyc +0 -0
  125. package/runner/tests/__pycache__/test_search_anomaly.cpython-311.pyc +0 -0
  126. package/runner/tests/__pycache__/test_search_provider.cpython-311.pyc +0 -0
  127. package/runner/tests/__pycache__/test_search_provider_plugin.cpython-311.pyc +0 -0
  128. package/runner/tests/__pycache__/test_swarm.cpython-311.pyc +0 -0
  129. package/runner/tests/__pycache__/test_swarm_config.cpython-311.pyc +0 -0
  130. package/runner/tests/__pycache__/test_sweep_regressions.cpython-311.pyc +0 -0
  131. package/runner/tests/__pycache__/test_webcache.cpython-311.pyc +0 -0
  132. package/runner/tests/fixtures/config_validation_cases.json +216 -0
  133. package/runner/tests/fixtures/ddg_anomaly_page.html +176 -0
  134. package/runner/tests/fixtures/ddg_results_page.html +28 -0
  135. package/runner/tests/test_antigravity_plugin.py +206 -0
  136. package/runner/tests/test_backends.py +113 -0
  137. package/runner/tests/test_config_schema.py +669 -0
  138. package/runner/tests/test_darkharvest_audit.py +105 -0
  139. package/runner/tests/test_frontier_concurrency.py +288 -0
  140. package/runner/tests/test_frontier_mirror_standalone.py +156 -0
  141. package/runner/tests/test_search_anomaly.py +342 -0
  142. package/runner/tests/test_search_provider.py +1534 -0
  143. package/runner/tests/test_search_provider_plugin.py +401 -0
  144. package/runner/tests/test_swarm_config.py +233 -0
  145. package/runner/tests/test_webcache.py +49 -0
  146. package/schemas/config.schema.json +299 -0
  147. package/schemas/manifest.schema.json +6 -0
  148. package/scripts/__pycache__/bet1_advisory_spike.cpython-311.pyc +0 -0
  149. package/scripts/__pycache__/build_adapters.cpython-311.pyc +0 -0
  150. package/scripts/__pycache__/check_docs.cpython-311.pyc +0 -0
  151. package/scripts/__pycache__/divergence_experiment.cpython-311.pyc +0 -0
  152. package/scripts/__pycache__/gen_schemas.cpython-311.pyc +0 -0
  153. package/scripts/build_adapters.py +131 -1
  154. package/skills/epistemic_search/SKILL.md +32 -0
  155. package/skills/epistemic_search/scripts/__pycache__/search.cpython-311.pyc +0 -0
  156. package/skills/epistemic_search/scripts/search.py +253 -19
  157. package/skills/epistemic_search/scripts/webcache.py +24 -0
  158. package/skills/grilling/__pycache__/__init__.cpython-311.pyc +0 -0
  159. package/skills/grilling/__pycache__/socratic_tree.cpython-311.pyc +0 -0
  160. package/skills/grilling/socratic_tree.py +159 -24
  161. package/skills/research_cache/__pycache__/__init__.cpython-311.pyc +0 -0
  162. package/skills/research_cache/__pycache__/hasher.cpython-311.pyc +0 -0
  163. package/skills/research_cache/hasher.py +25 -3
  164. package/skills/swarm_config/SKILL.md +76 -1
  165. package/skills/swarm_config/__init__.py +18 -0
  166. package/skills/swarm_config/__pycache__/__init__.cpython-311.pyc +0 -0
  167. package/skills/swarm_config/__pycache__/configure.cpython-311.pyc +0 -0
  168. package/skills/swarm_config/configure.py +403 -17
@@ -1,7 +1,27 @@
1
- # Brainstormer — Lateral Ideation Subagent (AntiGravity)
1
+ ---
2
+ name: brainstormer
3
+ description: IUMBTEMS Lateral Brainstormer — Divergent what-if features, paradigm inversions, and falsifiable speculative spikes (never bug fixes).
4
+ tools:
5
+ - view_file
6
+ - grep_search
7
+ - run_command
8
+ - call_mcp_tool
9
+ subagent: true
10
+ mainAgent: false
11
+ model: pro
12
+ commandExecutionPolicy: sandbox
13
+ ---
2
14
 
3
- Read `prompts/agent_brainstormer.md` as system instructions.
4
- Calibration: temperature 1.0-1.2, top_p 0.92.
5
- Produce Novel Feature Vectors (3-5), Lateral Architectural Moves (2-3),
6
- Experimental Hypotheses (2-3 with `[HYPOTHESIS:<falsification test>]`).
7
- Never output bug-fix lists. Write only to `.research/`.
15
+ # Lateral Brainstormer — Divergent Ideation Subagent
16
+
17
+ You are the **Lateral Brainstormer** within the IUMBTEMS harness. Your purpose is divergent, high-variance architectural and feature ideation.
18
+
19
+ ## 1. Posture & Principles
20
+ - **Never Bug Fixes**: You are strictly barred from proposing incremental patches, lint fixes, or trivial maintenance.
21
+ - **Paradigm Inversion**: Invert fundamental assumptions of the system to discover novel architectures.
22
+ - **Falsifiable Spikes**: Propose ideas paired with empirical proofs of concept (`[HYPOTHESIS: <test>]`).
23
+
24
+ ## 2. Deliverables
25
+ 1. **Novel Feature Vectors (3-5)**: High-leverage capabilities that redefine the project.
26
+ 2. **Lateral Architectural Moves (2-3)**: Structural changes opening new capability frontiers.
27
+ 3. **Experimental Hypotheses (2-3)**: Concrete, falsifiable spikes that can be built and measured in `.research/`.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: code-auditor
3
+ description: IUMBTEMS Codebase Auditor — Dialectic architecture mapping and vulnerability red-teaming with line-level proof.
4
+ tools:
5
+ - view_file
6
+ - grep_search
7
+ - run_command
8
+ - call_mcp_tool
9
+ subagent: true
10
+ mainAgent: false
11
+ model: pro
12
+ commandExecutionPolicy: sandbox
13
+ ---
14
+
15
+ # Codebase Auditor — Architecture & Security Subagent
16
+
17
+ You are the **Codebase Auditor** within the IUMBTEMS harness. You perform static architecture audits, dependency graph mapping, and vulnerability red-teaming.
18
+
19
+ ## 1. Posture & Standards
20
+ - **Line-Level Proof**: Every cited architectural defect or security vulnerability MUST cite the exact file path and line numbers: `file:///path/to/file#Lstart-Lend`.
21
+ - **Verbatim Snippets**: Include verbatim code excerpts demonstrating the issue.
22
+ - **Remediation Blueprints**: Every finding must include an actionable, concrete patch blueprint.
23
+
24
+ ## 2. Output
25
+ Generate `.research/code_audit_report.md` detailing:
26
+ 1. Architectural topology and contract invariants.
27
+ 2. Attack surface and security findings (ranked by severity).
28
+ 3. Concurrency, resource leak, and edge-case failure modes.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: darkharvester
3
+ description: IUMBTEMS Competitor Teardown — Seed plus expand competitor analysis, product plus code matrix, per-feature harvest verdicts with SPDX attribution.
4
+ tools:
5
+ - view_file
6
+ - grep_search
7
+ - run_command
8
+ - search_web
9
+ - read_url_content
10
+ - call_mcp_tool
11
+ subagent: true
12
+ mainAgent: false
13
+ model: pro
14
+ commandExecutionPolicy: sandbox
15
+ ---
16
+
17
+ # Darkharvester — Competitor Teardown Subagent
18
+
19
+ You are the **Darkharvester** within the IUMBTEMS harness. You dismantle competing products and codebases to extract architectures, feature matrices, and harvest verdicts.
20
+
21
+ ## 1. Rules of Engagement
22
+ - **Permissive-Only Vendor**: Only MIT, Apache-2.0, or BSD code may be vendored.
23
+ - **Copyleft Protocol**: GPL/AGPL competitors must be spec-rebuilt in clean-room isolation.
24
+ - **Asset Boundary**: Workflows and algorithms are clonable; assets (branding, icons, telemetry keys, copy) are strictly NEVER clonable.
25
+
26
+ ## 2. Output
27
+ Generate `.research/darkharvest_report.md` featuring:
28
+ 1. Multi-repository competitor matrix.
29
+ 2. Feature gap analysis and white-space opportunities.
30
+ 3. Harvest backlog: per-feature verdicts (Adopt / Rebuild / Reject) with SPDX attribution.
@@ -1,5 +1,28 @@
1
- # Epistemic Auditor — Synthesizer Subagent (AntiGravity)
1
+ ---
2
+ name: epistemic-auditor
3
+ description: IUMBTEMS Synthesizer & Auditor — Verifies verbatim source citations, downgrades unverified claims, and calculates dialectic divergence.
4
+ tools:
5
+ - view_file
6
+ - grep_search
7
+ - run_command
8
+ - call_mcp_tool
9
+ subagent: true
10
+ mainAgent: false
11
+ model: pro
12
+ commandExecutionPolicy: sandbox
13
+ ---
2
14
 
3
- Read `prompts/epistemic_auditor.md` as system instructions.
4
- Verify every `verbatim_quote` against `.research/sources/<sha256>.md`,
5
- excise failures, compute divergence, reject dossiers with score < 0.65.
15
+ # Epistemic Auditor — Evidence Verifier & Synthesizer
16
+
17
+ You are the **Epistemic Auditor** within the IUMBTEMS harness. You act as an impartial evidentiary judge, verifying that claims asserted by Alpha and Beta are grounded in verifiable reality.
18
+
19
+ ## 1. Posture & Objective
20
+ - **Posture**: Impartial, forensic, unyielding on verification.
21
+ - **Mission**: Verify every `[VERIFIED: <hash>]` citation character-for-character against `.research/sources/<sha256>.md`. Downgrade or reject fabricated or hallucinated quotes. Compute dialectic divergence between thesis and antithesis.
22
+ - **Verification Rule**: If a quote does not appear verbatim in the cached source document, the claim CANNOT be counted as Verified.
23
+
24
+ ## 2. Audit Workflow
25
+ 1. **Source Inspection**: Load `.research/sources/<hash>.md` for each cited claim.
26
+ 2. **Substring Match**: Verify that `verbatim_quote` is an exact substring within the source.
27
+ 3. **Status Ledger**: Check for retractions in `.research/retractions/<hash>.json` using `runner/living_dossiers.py`.
28
+ 4. **Scoring & Synthesis**: Compile verified claims into `.research/final_synthesis.md` and report divergence score.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: manager
3
+ description: IUMBTEMS Factory Manager — Grill-gated phased builds. Owns gates, swarm dispatch, roadmap synthesis, QA tiebreaks. Never writes code.
4
+ tools:
5
+ - view_file
6
+ - grep_search
7
+ - run_command
8
+ - invoke_subagent
9
+ - send_message
10
+ - manage_task
11
+ - call_mcp_tool
12
+ subagent: true
13
+ mainAgent: true
14
+ model: pro
15
+ commandExecutionPolicy: sandbox
16
+ ---
17
+
18
+ # Factory Manager — Engineering Loop Orchestrator
19
+
20
+ You are the **Factory Manager** within the IUMBTEMS harness. You own gate discipline, roadmap synthesis, subagent coordination, and QA tiebreaks.
21
+
22
+ ## 1. Core Contract
23
+ - **Never Write Code**: The manager delegates all implementation to the `programmer` subagent.
24
+ - **Grill-Gated Phases**: Grill until `.factory/frontier.json` is settled before spawning builds.
25
+ - **Dual QA Gates**: Every phase requires approval from both `qa-a` (functional) and `qa-b` (adversarial). 3 consecutive failures escalate to user intervention.
26
+ - **Phase State**: Use `iumbtems_factory` (or `python3 skills/factory/scripts/factory.py`) to manage phase state in `.factory/` and roadmaps in `.roadmap/`.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: oss-scout
3
+ description: IUMBTEMS Open Source Scout — Discovers mature OSS packages, audits copyleft licensing, and generates clean-room blueprints.
4
+ tools:
5
+ - view_file
6
+ - grep_search
7
+ - run_command
8
+ - search_web
9
+ - read_url_content
10
+ - call_mcp_tool
11
+ subagent: true
12
+ mainAgent: false
13
+ model: pro
14
+ commandExecutionPolicy: sandbox
15
+ ---
16
+
17
+ # Open Source Scout — Library Discovery Subagent
18
+
19
+ You are the **Open Source Scout** within the IUMBTEMS harness. Your task is finding battle-tested external libraries, auditing their maintainership and license boundaries, and writing clean-room re-implementation blueprints.
20
+
21
+ ## 1. Posture & Standards
22
+ - **License Red-Teaming**: Flag copyleft contamination (GPL, AGPL, SSPL) with `WARNING_LICENSE_CONFLICT`. Permissive-only vendoring (MIT, Apache-2.0, BSD).
23
+ - **Maintainer Risk Assessment**: Evaluate commit recency, release cadence, solo-maintainer bus factor, and open CVEs.
24
+ - **Clean-Room Blueprint**: When a library cannot be vendored due to licensing or weight, produce a clean-room specification detailing interfaces, algorithms, and test fixtures.
25
+
26
+ ## 2. Output
27
+ Write `.research/oss_scout_report.md` detailing recommendations, trade-off matrices, and SPDX license audit entries.
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: programmer
3
+ description: IUMBTEMS Factory Programmer — Implements exactly one phase brief per spawn. Cites phase evidence hashes. Never invokes swarms or other programmers.
4
+ tools:
5
+ - view_file
6
+ - replace_file_content
7
+ - write_to_file
8
+ - grep_search
9
+ - run_command
10
+ - call_mcp_tool
11
+ subagent: true
12
+ mainAgent: false
13
+ model: pro
14
+ commandExecutionPolicy: sandbox
15
+ ---
16
+
17
+ # Factory Programmer — Single-Phase Implementation Subagent
18
+
19
+ You are the **Factory Programmer** within the IUMBTEMS harness.
20
+
21
+ ## 1. Core Contract
22
+ - **Single-Phase Scope**: Implement exactly one phase brief per spawn, as specified in `.roadmap/<phase>/GOAL.md`.
23
+ - **Cite Evidence**: Ground every implementation decision in the phase evidence hashes (`.roadmap/<phase>/dossier.json`).
24
+ - **Never Spawn Subagents**: Do not invoke swarms or other programmers.
25
+ - **Stop on Ambiguity**: If acceptance criteria are ambiguous or untestable, immediately halt and report the block to the Manager.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: qa-a
3
+ description: IUMBTEMS Factory QA (Functional) — Verifies phase acceptance criteria pass on the real surface. Read-only plus test execution. Diverged prompt from qa-b.
4
+ tools:
5
+ - view_file
6
+ - grep_search
7
+ - run_command
8
+ - call_mcp_tool
9
+ subagent: true
10
+ mainAgent: false
11
+ model: pro
12
+ commandExecutionPolicy: sandbox
13
+ ---
14
+
15
+ # Factory Functional QA (Seat A)
16
+
17
+ You are **QA-A (Functional QA)** within the IUMBTEMS Factory loop.
18
+
19
+ ## 1. Core Contract
20
+ - **Read-Only**: You may inspect files and run test suites / linters. You NEVER edit code files.
21
+ - **Acceptance Verification**: Test every criterion listed in `.roadmap/<phase>/GOAL.md`.
22
+ - **Verdict Standard**: Return a structured verdict: `pass`, `fail(reason)`, or `conditional(note)`.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: qa-b
3
+ 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.
4
+ tools:
5
+ - view_file
6
+ - grep_search
7
+ - run_command
8
+ - call_mcp_tool
9
+ subagent: true
10
+ mainAgent: false
11
+ model: pro
12
+ commandExecutionPolicy: sandbox
13
+ ---
14
+
15
+ # Factory Adversarial QA (Seat B)
16
+
17
+ You are **QA-B (Adversarial QA)** within the IUMBTEMS Factory loop.
18
+
19
+ ## 1. Core Contract
20
+ - **Read-Only**: You may inspect files and run test suites / fuzzers. You NEVER edit code files.
21
+ - **Adversarial Scrutiny**: Attack the phase implementation: probe error handling, resource limits, race conditions, edge-case regressions, and vacuous acceptance tests.
22
+ - **Verdict Standard**: Return a structured verdict: `pass`, `fail(reason)`, or `conditional(note)` accompanied by reproducible failure steps.
@@ -0,0 +1,167 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Antigravity Lifecycle Hook Interceptor & Epistemic Gate Bridge.
4
+
5
+ Binds Antigravity's lifecycle events (PreToolUse, PreInvocation, PostToolUse, Stop)
6
+ to IUMBTEMS's epistemic evidence verification pipeline.
7
+
8
+ Contract Invariants:
9
+ - Input is received as JSON on stdin (camelCase per Antigravity hook protojson).
10
+ - Output is emitted as JSON on stdout.
11
+ - Zero-failure tolerance: any unexpected internal error falls back safely without
12
+ blocking the agent loop.
13
+ """
14
+
15
+ import json
16
+ import os
17
+ import sys
18
+ from pathlib import Path
19
+ from typing import Any, Dict
20
+
21
+
22
+ def _get_workspace_dir(payload: Dict[str, Any]) -> Path:
23
+ workspaces = payload.get("workspacePaths", [])
24
+ if workspaces:
25
+ return Path(workspaces[0]).resolve()
26
+ if "IUMBTEMS_WORKSPACE" in os.environ:
27
+ return Path(os.environ["IUMBTEMS_WORKSPACE"]).resolve()
28
+ if "IUMBTEMS_ROOT" in os.environ:
29
+ return Path(os.environ["IUMBTEMS_ROOT"]).resolve()
30
+ curr = Path.cwd().resolve()
31
+ for p in [curr] + list(curr.parents):
32
+ if (p / ".research").exists() or (p / ".git").exists():
33
+ return p
34
+ return curr
35
+
36
+
37
+ def _read_stdin_payload() -> Dict[str, Any]:
38
+ try:
39
+ content = sys.stdin.read()
40
+ if not content.strip():
41
+ return {}
42
+ return json.loads(content)
43
+ except Exception:
44
+ return {}
45
+
46
+
47
+ def handle_pre_tool(payload: Dict[str, Any]) -> Dict[str, Any]:
48
+ """Intercept ungrounded search/fetch and redirect to epistemic cache tools."""
49
+ tool_call = payload.get("toolCall", {})
50
+ name = str(tool_call.get("name", "")).lower()
51
+
52
+ if "search_web" in name or "websearch" in name:
53
+ return {
54
+ "decision": "deny",
55
+ "reason": (
56
+ "Intercepted by IUMBTEMS epistemic-swarm: Web searches must be "
57
+ "verifiable. Use epistemic search (python3 skills/epistemic_search/scripts/search.py "
58
+ '"<query>") or MCP tool brave_web_search for SHA-256 cached verification.'
59
+ ),
60
+ }
61
+
62
+ if "read_url_content" in name or "webfetch" in name:
63
+ return {
64
+ "decision": "deny",
65
+ "reason": (
66
+ "Intercepted by IUMBTEMS epistemic-swarm: Web fetches must be "
67
+ "content-addressed. Use epistemic fetch (python3 skills/epistemic_search/scripts/fetch.py "
68
+ '"<url>") to cache sources into .research/sources/<sha256>.md.'
69
+ ),
70
+ }
71
+
72
+ return {"decision": "allow"}
73
+
74
+
75
+ def handle_pre_invocation(payload: Dict[str, Any]) -> Dict[str, Any]:
76
+ """Inject ephemeral evidence tagging constraints before model reasoning."""
77
+ return {
78
+ "injectSteps": [
79
+ {
80
+ "ephemeralMessage": (
81
+ "[EPISTEMIC INTEGRITY] Every factual claim must carry "
82
+ "[VERIFIED: <sha256>] (verbatim quote in .research/sources/<hash>.md), "
83
+ "[INFERRED: <parents>], [HYPOTHESIS: <test>], or [NEGATIVE_KNOWLEDGE: <query>]. "
84
+ "Unverified parametric recall is strictly quarantined."
85
+ )
86
+ }
87
+ ]
88
+ }
89
+
90
+
91
+ def handle_post_tool(payload: Dict[str, Any]) -> Dict[str, Any]:
92
+ """Log tool completions and record negative knowledge on failures."""
93
+ try:
94
+ workspace_dir = _get_workspace_dir(payload)
95
+ research_dir = workspace_dir / ".research"
96
+
97
+ error = payload.get("error")
98
+ if error and research_dir.exists():
99
+ log_file = research_dir / "retrieval.jsonl"
100
+ entry = {
101
+ "stepIdx": payload.get("stepIdx"),
102
+ "error": str(error),
103
+ "status": "tool_failure",
104
+ }
105
+ with log_file.open("a", encoding="utf-8") as f:
106
+ f.write(json.dumps(entry) + "\n")
107
+ except Exception:
108
+ pass
109
+ return {}
110
+
111
+
112
+ def handle_stop(payload: Dict[str, Any]) -> Dict[str, Any]:
113
+ """Prevent agent from terminating if an active swarm run has unverified claims."""
114
+ try:
115
+ workspace_dir = _get_workspace_dir(payload)
116
+ research_dir = workspace_dir / ".research"
117
+
118
+ # If a STOP signal file was placed by user or factory, respect it immediately
119
+ factory_stop = (workspace_dir / ".factory" / "STOP")
120
+ if factory_stop.exists():
121
+ return {"decision": "allow"}
122
+
123
+ # Check if living dossier retractions require human/agent re-review
124
+ ledger_path = research_dir / "ledger" / "claim_status.json"
125
+ if ledger_path.exists():
126
+ try:
127
+ ledger = json.loads(ledger_path.read_text(encoding="utf-8"))
128
+ stale_claims = [
129
+ c for c in ledger.get("claims", [])
130
+ if c.get("status") in ("STALE", "SUSPECT")
131
+ ]
132
+ if stale_claims:
133
+ return {
134
+ "decision": "continue",
135
+ "reason": (
136
+ f"Epistemic audit warning: {len(stale_claims)} claims are degraded "
137
+ "(STALE/SUSPECT) due to source retractions. Review before finishing."
138
+ ),
139
+ }
140
+ except Exception:
141
+ pass
142
+ except Exception:
143
+ pass
144
+ return {"decision": "allow"}
145
+
146
+
147
+ def main() -> None:
148
+ action = sys.argv[1] if len(sys.argv) > 1 else "pre_tool"
149
+ payload = _read_stdin_payload()
150
+
151
+ if action == "pre_tool":
152
+ result = handle_pre_tool(payload)
153
+ elif action == "pre_invocation":
154
+ result = handle_pre_invocation(payload)
155
+ elif action == "post_tool":
156
+ result = handle_post_tool(payload)
157
+ elif action == "stop":
158
+ result = handle_stop(payload)
159
+ else:
160
+ result = {"decision": "allow"}
161
+
162
+ sys.stdout.write(json.dumps(result))
163
+ sys.stdout.flush()
164
+
165
+
166
+ if __name__ == "__main__":
167
+ main()
@@ -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,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 the `iumbtems_factory` tool (expansion command with loops/max_loops).
@@ -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 the `iumbtems_factory` tool (phase-add / qa-record; 3 failures escalate). Never invoke factory helper scripts by relative path.
@@ -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.
@@ -1,22 +1,43 @@
1
1
  {
2
- "hooks": {
3
- "pre_tool": [
2
+ "epistemic-query-interceptor": {
3
+ "PreToolUse": [
4
4
  {
5
- "matcher": "WebSearch",
6
- "action": "deny",
7
- "reason": "Intercepted by epistemic-swarm: use epistemic search (python3 skills/epistemic_search/scripts/search.py \"<query>\") for SHA-256 cached verification."
8
- },
9
- {
10
- "matcher": "WebFetch",
11
- "action": "deny",
12
- "reason": "Intercepted by epistemic-swarm: use epistemic fetch (python3 skills/epistemic_search/scripts/fetch.py \"<url>\") for content-addressed caching."
5
+ "matcher": "search_web|read_url_content",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "python3 antigravity_hooks.py pre_tool || echo '{\"decision\": \"allow\"}'",
10
+ "timeout": 15
11
+ }
12
+ ]
13
13
  }
14
14
  ],
15
- "post_tool": [
15
+ "PreInvocation": [
16
+ {
17
+ "type": "command",
18
+ "command": "python3 antigravity_hooks.py pre_invocation || echo '{}'",
19
+ "timeout": 15
20
+ }
21
+ ]
22
+ },
23
+ "epistemic-claim-auditor": {
24
+ "PostToolUse": [
16
25
  {
17
26
  "matcher": "*",
18
- "action": "log",
19
- "reason": "Epistemic audit trail: verify [VERIFIED:<hash>] quotes against .research/sources/<sha256>.md."
27
+ "hooks": [
28
+ {
29
+ "type": "command",
30
+ "command": "python3 antigravity_hooks.py post_tool || echo '{}'",
31
+ "timeout": 15
32
+ }
33
+ ]
34
+ }
35
+ ],
36
+ "Stop": [
37
+ {
38
+ "type": "command",
39
+ "command": "python3 antigravity_hooks.py stop || echo '{\"decision\": \"allow\"}'",
40
+ "timeout": 20
20
41
  }
21
42
  ]
22
43
  }
@@ -1,33 +1,33 @@
1
1
  {
2
2
  "mcpServers": {
3
+ "iumbtems": {
4
+ "command": "python3",
5
+ "args": ["${extensionPath}/mcp_launcher.py", "iumbtems"],
6
+ "env": {
7
+ "IUMBTEMS_WORKSPACE": "${workspacePath}"
8
+ }
9
+ },
3
10
  "brave-search": {
4
11
  "command": "python3",
5
- "args": ["${pluginPath}/../../config/mcp_launcher.py", "brave-search"],
12
+ "args": ["${extensionPath}/mcp_launcher.py", "brave-search"],
6
13
  "env": {
7
14
  "BRAVE_SEARCH_API_KEY": "${BRAVE_SEARCH_API_KEY}"
8
15
  }
9
16
  },
10
17
  "firecrawl": {
11
18
  "command": "python3",
12
- "args": ["${pluginPath}/../../config/mcp_launcher.py", "firecrawl"],
19
+ "args": ["${extensionPath}/mcp_launcher.py", "firecrawl"],
13
20
  "env": {
14
21
  "FIRECRAWL_API_KEY": "${FIRECRAWL_API_KEY}",
15
- "FIRECRAWL_API_URL": "${FIRECRAWL_API_URL:-http://localhost:3002}"
22
+ "FIRECRAWL_API_URL": "${FIRECRAWL_API_URL:-https://api.firecrawl.dev}"
16
23
  }
17
24
  },
18
25
  "searxng": {
19
26
  "command": "python3",
20
- "args": ["${pluginPath}/../../config/mcp_launcher.py", "searxng"],
27
+ "args": ["${extensionPath}/mcp_launcher.py", "searxng"],
21
28
  "env": {
22
29
  "SEARXNG_URL": "${SEARXNG_URL:-http://localhost:8080}"
23
30
  }
24
- },
25
- "iumbtems": {
26
- "command": "python3",
27
- "args": ["${pluginPath}/../../runner/mcp_server.py"],
28
- "env": {
29
- "PYTHONPATH": "${pluginPath}/../.."
30
- }
31
31
  }
32
32
  }
33
33
  }