# @nous/paper-studio

Paper drafting, review & replication for the Phase-178 autonomous-research stack
(TODOS/phase-178 §178.7).

## Components

| Module             | Summary                                                                                                                                                                                                                                             |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `authoring.py`     | **Sakana-v2 tree-search authoring** — ideation → hypothesis → design → hparam-tune → ablation → writeup, with an **Experiment-Progress-Manager** promotion gate and a **buggy-node classifier** (debug rather than build on failures). (§178.7.1.1) |
| `figure_critic.py` | **VLM figure critic** — caption clarity, axis labelling, unit hygiene, misleading-scale (truncated bar axis, undisclosed log), and a real **Machado-2009 colour-blind-safe palette** check; failing figures trigger regeneration. (§178.7.1.2)      |
| `build.py`         | **LaTeX + Typst build** from one spec, **deterministic bibliography** (sorted + hashed), and a paper-embedding **novelty gate** before emission; fail-loud PDF compile. (§178.7.1.3)                                                                |
| `release.py`       | **Reproducibility-bundle release** — Docker image / lock-file hash / seed / env / wall-clock / cost ledger, content-addressed into a Phase-111 store. (§178.7.1.4)                                                                                  |
| `integrity.py`     | **Plagiarism + LLM-regurgitation** n-gram checks against the lit-graph corpus and training-data lineage. (§178.7.1.5)                                                                                                                               |
| `review.py`        | **5-reviewer peer-review ensemble** on NeurIPS guidelines + **area-chair** accept/reject, a **review gate** (publish / auto-revise / human-review), and **balanced-accuracy** calibration. (§178.7.2.1–.2.2)                                        |
| `benchmarks.py`    | **PaperBench** (step-wise rubric replication rate), **ScienceAgentBench** (executable-deliverable success), **DiscoveryBench** (discovery rate by discipline, real vs synthetic). (§178.7.2.3–.5)                                                   |

The figure critic's colour checks and the deterministic build, novelty gate,
signed-bundle store, integrity n-gram checks, ensemble aggregation and benchmark
scoring are all fully local and tested. The VLM vision check, LLM reviewers,
LaTeX toolchain and benchmark paper corpora are plug-in seams.

## Testing

```bash
python3 -m pytest tests/ -q     # 21 tests
python3 -m ruff check .
```
