|
| 1 | +# Epistemic Forge |
| 2 | + |
| 3 | +**An ARSENAL-powered kit for turning messy questions into claim lattices, dialectic briefs, freelance scopes, and Kaggle notebook spines.** |
| 4 | + |
| 5 | +[](https://www.python.org/downloads/) |
| 6 | +[](LICENSE) |
| 7 | +[](https://github.com/faresrafat3/arsenal-unified-master-pipeline) |
| 8 | + |
| 9 | +Epistemic Forge is a **local-first Python package** (no paid API required) that implements a faithful, practical slice of the [ARSENAL](https://github.com/faresrafat3/arsenal-unified-master-pipeline) unified agent pipeline: |
| 10 | + |
| 11 | +| Layer | ARSENAL idea | In this repo | |
| 12 | +|---|---|---| |
| 13 | +| **L0** | Technique routing | Domain → families + layer flags | |
| 14 | +| **L1** | APE + OPRO | Seed instructions + score-history climb | |
| 15 | +| **L2** | Meta conductor | Claim / dialectic / writing / freelance / Kaggle experts | |
| 16 | +| **L3** | ToT (+ LATS cascade) | Beam search over framings; optional rollout polish | |
| 17 | +| **L4** | Self-Refine | Multi-aspect critique → revise loop | |
| 18 | +| **L5** | Reflexion + Voyager | Verbal trial memory + skill library | |
| 19 | +| **L6** | Stage shell | Artifacts, executive summary, peer-review rubric | |
| 20 | + |
| 21 | +> Novel angle: a **claim lattice** as the shared intermediate representation across philosophy, research writing, freelancing, and Kaggle planning—so epistemic humility travels with the deliverable. |
| 22 | +
|
| 23 | +--- |
| 24 | + |
| 25 | +## Install |
| 26 | + |
| 27 | +```bash |
| 28 | +git clone https://github.com/faresrafat3/epistemic-forge.git |
| 29 | +cd epistemic-forge |
| 30 | +pip install -e ".[dev]" |
| 31 | +``` |
| 32 | + |
| 33 | +## Quick start (CLI) |
| 34 | + |
| 35 | +```bash |
| 36 | +epistemic-forge \ |
| 37 | + --title "Predictive minds and blame" \ |
| 38 | + --question "If the brain is a prediction machine, what happens to moral responsibility?" \ |
| 39 | + --domain philosophy \ |
| 40 | + --keywords "predictive processing,agency,responsibility" \ |
| 41 | + --out runs/philosophy_demo |
| 42 | +``` |
| 43 | + |
| 44 | +```bash |
| 45 | +epistemic-forge \ |
| 46 | + --title "Imbalanced tabular baseline" \ |
| 47 | + --question "What is an honest baseline plan for a noisy imbalanced Kaggle table?" \ |
| 48 | + --domain kaggle \ |
| 49 | + --keywords "imbalance,cv,leakage,baseline" \ |
| 50 | + --out runs/kaggle_demo |
| 51 | +``` |
| 52 | + |
| 53 | +```bash |
| 54 | +epistemic-forge \ |
| 55 | + --title "Climate-tech research sprint" \ |
| 56 | + --question "How do I scope a 2-week research sprint for a climate-tech founder?" \ |
| 57 | + --domain freelance \ |
| 58 | + --keywords "sprint,scope,founder" \ |
| 59 | + --out runs/freelance_demo |
| 60 | +``` |
| 61 | + |
| 62 | +## Python API |
| 63 | + |
| 64 | +```python |
| 65 | +from epistemic_forge import run_pipeline |
| 66 | +from epistemic_forge.io.export import export_result |
| 67 | + |
| 68 | +result = run_pipeline( |
| 69 | + title="Epistemic freelancing", |
| 70 | + question="How can freelancers package uncertain research without overclaiming?", |
| 71 | + domain="hybrid", |
| 72 | + keywords=["freelance", "research", "claims"], |
| 73 | +) |
| 74 | +print(result.final_score, result.peer_review["verdict"]) |
| 75 | +export_result(result, "runs/hybrid_demo") |
| 76 | +``` |
| 77 | + |
| 78 | +## What you get in `--out` |
| 79 | + |
| 80 | +| File | Purpose | |
| 81 | +|---|---| |
| 82 | +| `executive_summary.md` | One-pager | |
| 83 | +| `research_memo.md` | Full lattice + framing + limits + actions | |
| 84 | +| `client_brief.json` | Freelance pack (when domain fits) | |
| 85 | +| `kaggle_spine.md` | Notebook spine (when domain fits) | |
| 86 | +| `result.json` | Full machine-readable trace (route, trials, search nodes) | |
| 87 | +| `MANIFEST.json` | Score, review, file list | |
| 88 | + |
| 89 | +## Domains |
| 90 | + |
| 91 | +`research` · `philosophy` · `writing` · `freelance` · `kaggle` · `hybrid` |
| 92 | + |
| 93 | +## Why this is not “another prompt dump” |
| 94 | + |
| 95 | +1. **Executable pipeline** with tests (`pytest`) |
| 96 | +2. **Shared IR** (claims) across domains |
| 97 | +3. **Explicit ARSENAL mapping** with a run log: [`docs/ARSENAL_RUN_LOG.md`](docs/ARSENAL_RUN_LOG.md) |
| 98 | +4. **Memory**: verbal lessons + reusable skills |
| 99 | +5. **Publishable packaging**: `pyproject.toml`, CLI entrypoint, MIT license |
| 100 | + |
| 101 | +## Project layout |
| 102 | + |
| 103 | +```text |
| 104 | +epistemic_forge/ |
| 105 | + pipeline/ # L0–L6 orchestration |
| 106 | + experts/ # L2 specialist modules |
| 107 | + memory/ # Reflexion + skill library |
| 108 | + io/ # export |
| 109 | + data/samples/ # demo specs |
| 110 | +tests/ |
| 111 | +docs/ARSENAL_RUN_LOG.md |
| 112 | +examples/ |
| 113 | +``` |
| 114 | + |
| 115 | +## Tests |
| 116 | + |
| 117 | +```bash |
| 118 | +pytest -q |
| 119 | +``` |
| 120 | + |
| 121 | +## Design principles (from ARSENAL) |
| 122 | + |
| 123 | +1. Router first |
| 124 | +2. Optimize the instruction (APE / OPRO cascade) |
| 125 | +3. Conduct via experts |
| 126 | +4. Search framings deliberately (ToT; cascade when code-like) |
| 127 | +5. Refine with multi-aspect feedback |
| 128 | +6. Remember failures and skills |
| 129 | +7. Ship staged artifacts + review |
| 130 | + |
| 131 | +## Related work |
| 132 | + |
| 133 | +- ARSENAL master pipeline: https://github.com/faresrafat3/arsenal-unified-master-pipeline |
| 134 | +- Extractions archive: https://github.com/faresrafat3/llm-agent-research-extractions |
| 135 | + |
| 136 | +## License |
| 137 | + |
| 138 | +MIT — see [LICENSE](LICENSE). |
| 139 | + |
| 140 | +## Disclaimer |
| 141 | + |
| 142 | +Epistemic Forge **scaffolds thinking and packaging**. It does not replace domain expertise, human ethics review, or competition rules. Treat outputs as **provisional** claims with explicit limits. |
0 commit comments