CLI workspace orchestrator for the papersmith-ai scientific paper engineering framework
pip install papersmith-ai==0.61.3 Copy PIP instructions
A paper forge: turns reference PDFs into high-fidelity Markdown that an agent can read (equations in LaTeX, tables as tables, figures as files), and drives the formal deliberation —mathematics and experimental design— through to the code that tests itself and the compiled paper.
This README is the way in: what papersmith is, how to install it, the order of the work, the workspace from the inside, development and troubleshooting. The reference pages live under docs/: every skill in docs/skills.md and every smith command in docs/cli.md.
Welcome. This forge is built to take a PDF to a compiled paper without guessing the order. The minimum path:
Not every skill has to be used, or in this order: each one declares what it needs first and refuses before doing something half-done. If an input is missing it doesn't invent it: it exits with a rejection code that names what's missing. A PAPER_ABSENT reports a missing input, not an operator error.
The full map is in Use flow; the detailed route, in How it works — the order. If an AI agent is used as a copilot, the ones already defined are in The agents.
Every skill is invoked by name in Claude Code (/paper-ingestion) or requested in Spanish ("ingiere los papers"). Not all of them have to be used, or in this order: each one declares what it needs first and refuses if it's missing, so an invocation from the middle of the flow reports which input is missing.
The full path, from a PDF to a compiled paper:
The diagram shows the full flow: every stage in this order with its command, its agents (with the tools each one declares in Pi), its human gates and what it leaves on disk. The interactive version, with links to the source of each node, is in docs/diagrams/papersmith-pi-flow.html (opens in the browser; generated with Archify, and its source and its recipe are versioned in docs/diagrams/). Its numbered lanes are the eleven dashboard phases below, with the two Phase 5 gates (G-EXP-POC and G-NOVELTY) drawn in place.
The dashboard (smith ui) opens on this flow and shows the same order as eleven phases under Pipeline y Avance. Below the diagram, the Flujo Archify tab lists every agent the workspace ships (/api/agents): its role, the skill it loads, its stretch, its tools, the phase(s) it acts in and the harnesses it is projected to, in a table you can sort and filter. Clicking a phase opens its console: a text box with the stage's rules as a guide that sends / to an agent in the support terminal (for /plausibility, the idea in at least two sentences, or the optional Ayuda temática described under Step 1), the real smith command for the phase, or a link to the panel that owns the work: the concept map, the math tutor, the PoC board, the sections, the PDF preview or the gates. After "Ejecutar", the drawer tracks the run step by step until the server finds the phase's evidence on disk and marks it verified; the next phase then unlocks and lights up. Each phase is locked until the one before it passes (override available). A running phase also shows in a dock at the bottom left on every tab. A click opens its tracking panel in place, with the checkpoints, the agent's terminal and ⏹ Detener proceso, which interrupts the agent's turn and keeps its session. Closing the CLI, changing tabs or reloading the page never ends the session of a running phase: a reload reattaches to it. The same eleven phases are written into every harness entrypoint (CLAUDE.md, OPENCODE.md, .pi/APPEND_SYSTEM.md, .agents/AGENTS.md) under "Paper construction flow".
The dashboard has twelve tabs; the tab names below are the Spanish ones the dashboard shows (the interface also has an English catalogue):
The novelty assessment and its gates. Novedad & Hallazgos sits between the experiments and the manuscript. Once a proof of concept closes with a complete discussion, a verification card comes first: you approve its results and contrasted hypotheses, or send it back (smith novelty approve|iterate --gate poc), and that decision is G-EXP-POC, which unlocks the full experiments. The rest has four parts: a matrix of hypotheses against the empirical evidence of both stages (metric, criterion, observed result, test, rationale and verdict badge, read from each product's Results/discussion.json); the novelty claims contrasted with the sota-pool/candidates.json candidates and the baselines; a checklist for defending the work before reviewers (leakage-free partitioning, significance tests, empirical support, SOTA contrast), derived from what the discussions record; and the decision gate. G-NOVELTY ("Novelty & Findings Gate") turns ACTIVE once Phase 5 passes — which needs the verified proof of concept — and PASS when you approve. You decide from the panel's buttons or from the terminal with smith novelty {status,approve,iterate,reset}: approve records that the evidence supports the novelty, and iterate records that the work returns to experiments, proposal or plausibility. The decision and its history go to .papersmith/novelty_gate.json. Phase 6 stays locked until you approve it, so nothing is written over an undecided novelty.
Phase 5 gating. The sub-phases that close the experiments read the results discussion, not just a folder. 5.8 (proof of concept) and 5.12 (full experiments) pass only when a product of that stage holds a complete Results/discussion.json — a bare Results/ folder reads as active. Between them, 5.9 is the operator's verification of the proof of concept (G-EXP-POC), and 5.12 stays LOCKED until it passes. Phase 5 passes only with the published protocol, the discussed and verified proof of concept and a discussed full experiment, so no later phase unlocks over an unverified one; 5.13 (code review) reads Results/reviewer_report.json. Scaffold and check the discussion with python skills/_core/results/discussion_cli.py scaffold|check|status --product implementations/ / . scaffold copies each experiment's hypotheses and success criteria verbatim and leaves every verdict pending; check rejects an evidence path that does not exist and, at the full stage, a decided hypothesis that cites no significance test. The schema is in skills/_core/results/README.md.
Where a paper goes is a decision of its own, and it gets evidence rather than a hunch. From the Previsualización PDF tab you choose a quartile range and press Buscar revistas (or press Analizar con agente, which types /journal-finder into the CLI assistant). The CLI turns the paper's title, abstract, keywords and references into a ranked shortlist of journals that already publish work like it. Nothing is ever submitted.
The skill's contract is skills/journal-finder/SKILL.md, the venue verbs' is the "Venue adaptation" section of skills/paper-writing/SKILL.md, and the guided tour is in docs/skills.md.
None of this requires keys or external services: the forge runs locally.
Two runtimes, and both are mandatory: the forge uses Python for the CLI and Node for the deliberation engine, and without the second one half the framework won't start.
python3 --version && node --version && npm --version If Node is missing, smith init doesn't fail: it warns with npm was not found; deliberate requires npm install for jiti/typebox and moves on, because the rest of the workspace can be created. But proposal-deliberation and experimental-deliberation —the two skills that propose and discuss before writing— don't run without those dependencies. To create the workspace without them, init --no-npm does so explicitly.
The ingestion runtime from step 2 is separate and is optional: it's only needed to extract PDFs with OCR.
# 1a. The CLI, from the latest version published on PyPI pipx install papersmith-ai # the same with pip, for setups without pipx pip install papersmith-ai # or the tip of `main`, without waiting for a release pipx install git+https://github.com/LIAUNAL/papersmith-ai.git # 1b. Or from a clone of `main` (for framework development) git clone https://github.com/LIAUNAL/papersmith-ai.git && cd papersmith-ai pipx install . # with pip: pip install . # 1c. Update the CLI when a new release comes out pipx upgrade papersmith-ai # `upgrade` doesn't see a git-URL install: reinstall pipx install --force git+https://github.com/LIAUNAL/papersmith-ai.git # with pip, `--upgrade` over a git URL doesn't always re-clone pip install --upgrade --force-reinstall "papersmith-ai @ git+https://github.com/LIAUNAL/papersmith-ai.git" # 1d. Bring existing workspaces up to that version smith upgrade --plan-migrations ~/papers/sparse-ae # which artifacts are missing, without writing anything smith upgrade ~/papers/sparse-ae # syncs the files and migrates the artifacts smith status ~/papers/sparse-ae # drift and pending migrations # 2. Isolated ingestion runtime (micromamba: Python 3.12, PyTorch, Surya OCR, llama-server) python3 scripts/setup_env.py install # 3. Node dependencies and projection of skills to the harnesses npm install npm run setup:harnesses The command is smith. Installing papersmith-ai puts smith on PATH, and every command in this README uses it (smith init, smith upgrade, smith status, …). The older papersmith entry point is still installed as a compatibility alias for existing scripts; it runs the same CLI and reports itself as smith.
The package is published on PyPI. pipx install papersmith-ai brings the latest release, which pipx upgrade papersmith-ai in 1c updates. The git URL in 1a brings the tip of main, for framework development. The neighbouring name papersmith —without the -ai— is also on PyPI, but it's another project (Word document generation), so pip install papersmith doesn't install this forge.
main is the only branch that's maintained, and each release also gets its tag, so an exact build is frozen by pinning it in the URL — for example pipx install --force "git+https://github.com/LIAUNAL/papersmith-ai@v0.61.3". 1b takes the clone as it is, including uncommitted changes; a reproducible build comes from 1a or a tag. The changelog is in CHANGELOG.md.
Updating is two steps and they're two different objects. 1c reinstalls the CLI from main; smith --version confirms the installed version. 1d moves each workspace that already exists, and it isn't optional: a release can change the shape of an artifact a workspace has already produced —the graph pool's atlas.html, for example—, so syncing the framework files without migrating the artifacts leaves the new scaffolding reading old state.
smith upgrade syncs the workspace with the installed version and applies that version's artifact migrations. The version the workspace records doesn't advance until those migrations are done, so smith status may report that it hasn't yet reached the release just installed. --plan-migrations reports what's pending and finishes without writing anything; it isn't called --dry-run, because it doesn't preview the kit copy. --no-migrate syncs the files and leaves the artifacts as they are, with the version marker where it was.
Which workspaces can be upgraded. Re-initializing a live workspace is never the answer: smith init in a fresh directory leaves behind every ledger, receipt, seal, managed revision and lock the paper has accumulated. Workspaces recorded at 0.12.0 or later are supported, and since 0.14.0 every release that changes the shape of something a workspace already has ships its migration in the same release (or a compatible read that keeps reading the old shape). A workspace older than 0.12.0 also upgrades —the files are synced and the convergence migrations run—, but shape changes from before 0.12.0 shipped no migration and leftovers may remain (the .antigravity/ folders of 0.8.0 are not removed). With no recorded version, the version-gated migrations stay undetermined and are not applied; a version that cannot be ordered, or one newer than the kit, is refused unless you pass --allow-downgrade. The maintainer-side policy is in docs/releasing.md.
The two upgrades are separate: neither one touches the other. smith upgrade refuses to take a workspace to a version older than the one it records, unless --allow-downgrade is passed.
scripts/setup_env.py install provisions the whole ingestion stack in a separate micromamba environment (CPU or CUDA, depending on what it detects), including the llama-server binary that the OCR needs — it is not Ollama nor a Homebrew installation. The micromamba it bootstraps is a pinned release whose SHA-256 is checked before it runs; the comment above MICROMAMBA_VERSION in scripts/setup_env.py is the procedure for moving the pin. npm run setup:harnesses symlinks the canonical skills/ tree into .claude/skills, .pi/skills, .opencode/skills and .agents/skills, with relative, idempotent symlinks (see Harnesses and skill projection). The first run of smith ingest downloads ~1.5 GB of Surya weights if the environment wasn't pre-provisioned.
smith init ~/papers/sparse-ae \ --title "Sparse Autoencoder Audit" \ --topic "mechanistic interpretability" \ --remote kaggle cd ~/papers/sparse-ae smith ui # the dashboard; works right after init smith status smith status --json # machine-readable snapshot smith ui needs nothing else after init: when the workspace has no Python environment yet, its first run installs the dashboard's own runtime (fastapi, uvicorn, watchfiles, PyYAML) once into $XDG_CACHE_HOME/papersmith/ui-env-py , outside every workspace, and serves from it (docs/cli.md).
The workspace stays decoupled from the framework checkout: the scaffolding is synced with smith upgrade, and the research artifacts are protected by contract. What init creates exactly —and what gets versioned— in Inside the workspace.
smith deliberate . --action status # state of the managed proposal smith implement . --action verify --target implementations/my-repo # over an already materialized repo smith run smoke_and_invariants --dry-run # plans; dispatches nothing smith novelty status # hypotheses vs evidence, G-EXP-POC and G-NOVELTY smith novelty approve --gate poc --notes "PoC verdicts hold" # verify the proof of concept: unlocks the full experiments python skills/_core/results/discussion_cli.py check --product implementations/my-repo/MyPaper # a stage's results discussion smith novelty also takes approve, iterate --stage {experiments,proposal,plausibility} and reset, each with --gate {poc,full} (default full); the discussion tool takes scaffold, check and status. Both are described in The dashboard above and in docs/cli.md.
Inside a harness, the same capabilities are requested by skill name: /paper-ingestion, /proposal-deliberation, /experimental-deliberation, /proposal-implementation, /experimental-implementation, /paper-writing. The ones that don't depend on a domain — /kaggle-accounts, /remote-execution, /skill-audit — act as gatekeeper, memory and auditor of what is sent out.
Before there is anything to ingest there is an idea, and this is the step that tests it. It needs no PDFs, which is why it comes first: all three stretches work from the idea and from what can be found about it.
Everything lands in sota-pool/, which is ignored like guidance/. Nothing here files into guidance/: this step reads the literature, it does not collect it. The pool it leaves behind is what proposal-deliberation shows alongside the mathematics, and its ranked top 5 is what tells the ingestion step which PDFs are worth having.
An idea stated in fewer than two sentences is refused before the search starts: scouting an unstated idea invents its own question. A claim with no abstract passage behind it does not become a planet — a quoteless planet is a drawing.
Thematic help, when the idea is not clear yet. In the dashboard, the box that opens when you click phase 2 carries an optional Ayuda temática. Type 3 to 5 keywords and the server asks the lab's banco-lia MCP (its search_bank tool) for the best matches; the panel lists the ranked LIA items (projects and articles), the topics they fall under and a proposed /plausibility idea, composed from your keywords and those matches, in an editable text area. Nothing runs until you press Aprobar y lanzar, which sends /plausibility through the same launch path as any other phase-2 prompt, so the two-sentence rule still applies. The bank items are LIA continuity context, never SOTA evidence. It needs uv/uvx on PATH and the banco-lia entry of the workspace's .mcp.json; the first run downloads the package and later runs work offline. If the bank cannot be reached the panel says why and you write the idea yourself. Details and the endpoint (POST /api/plausibility/suggest) are in docs/mcp.md.
All three folders travel empty. Each one arrives in a clone with its .gitkeep and nothing more: guidance/*/* is ignored, with !guidance/*/.gitkeep as the only escape hatch. The scaffolding is versioned, the PDFs and their Markdown are not. tests/test_forge_scaffolding.py derives both halves —what the profile.ts declare as source against what git actually tracks— and goes red if a declared folder stops travelling.
/paper-ingestion (or, in Spanish: "ingiere los papers"). For each loose PDF, it creates a folder with the paper's name, moves the PDF inside and writes a lightweight .md (text + LaTeX + tables, with the bibliography stripped) together with the images of the figures:
/proposal-deliberation On the first turn it automatically loads the Markdown from guidance/paper-guide/ as context and acts as a mathematics tutor. The available actions:
The proposal is built in one order, and the dashboard holds it: the central problem and its pillars, then the hypotheses each pillar predicts, then the mathematics in $$ … \tag{N} $$ blocks. Each step stays locked until the one before it exists on disk (.papersmith/model_spec.json or the revision's .sky.json overlay, then a numbered equation in the latest revision), and the Mapa Conceptual & Modelo tab shows the three with a Generar y deliberar button that types the step's /proposal-deliberation into the agent. Once the hypotheses are discussed and the mathematics and novelty proposed, the paper-reviewer agent classifies the proposal's NeurIPS contribution type (General, Theory, Use-Inspired, Concept & Feasibility or Negative Results), shown right after the hypotheses. This NeurIPS judge is the fifth step: the Lanzar el juez NeurIPS button on that card launches it, and Phase 5 stays locked until it records a type.
The fourth step comes before the judge, so it reads justified ideas: every pillar, hypothesis, concept-map layer and numbered equation names 2 to 5 references of sota-pool/candidates.json, each with the reason it supports the idea, in .papersmith/citations.json. The same file justifies each experiment of the latest protocol: until they are cited, /proposal-implementation and /experimental-implementation stay locked, G-EXP-POC refuses its approval (SOTA_CITATIONS_OWED) and Phase 5 cannot pass. The buttons in the stepper and in the Experimentos tab ask the agent for them, and each panel shows them beside the idea. python skills/_core/results/citations_cli.py check --root . prints what is owed and exits non-zero. A valid citation is in the pool and states a reason; that does not prove the reference supports the idea, so existing workspaces lose their Phase 4 PASS until they are cited.
Discuss the concept map and the equations with /math-tutor before implementing the revision.
Proposals live in proposals/, one per managed revision (research-concept- -rNN.md).
Each published revision travels with its own constellation: the SOTA's with the proposal inside, in proposals/research-concept- -rNN.graph.html, drawn by the same 3D viewer as the atlas and named from the revision. The deliberation's publication stretch produces it, from the proposals/research-concept- -rNN.sky.json overlay written during the discussion: there the main idea, the topics the proposal takes from the SOTA papers, its novelty, the problem it would solve and three to five concepts remain as nodes and edges instead of as sentences. If that overlay doesn't exist, the stretch reports it as pending instead of drawing relationships nobody agreed on.
/experimental-deliberation Before any code, the protocol: every experiment declares the claim of the proposal it tests, its metric and its SOTA baseline, and the deliberation publishes it as a managed revision in experiments/ only after you accept it. It needs the data paper in guidance/data-paper/ (the ceiling of what can be claimed). /experiments-tutor, from the Experimentos tab, questions each design decision with you; a change of decision goes back to this skill.
/datasets synth gives the proof of concept a seeded toy set, always; search, license, qc, prepare and publish find, license, measure and prepare the one official dataset the full experiments read (publishing is private and only with your consent). /proposal-implementation then hands each baseline paper to the paper-replicator agent, which adopts and audits the paper's published code when it exists and reimplements the method otherwise, leaving a REPLICATION.md correspondence table.
/proposal-implementation It takes the current revision and materializes it in a target repository, which lives in implementations/ with its own git and its own virtual environment. The flow has two separate phases:
/ ├── / Notebooks/ Data/ Results/ Models/ ├── src/ / one implementation per mathematical object ├── tests/ smoke · invariants · synthetic · audit · remedies └── pyproject.toml The ladder has five levels, from the cheapest to the most expensive: smoke, invariants (each claim of the proposal anchored to a test), synthetic (deterministic, fixed seed), audit (findings about the mathematics, measured over 200 random configurations) and remedies (each proposed fix validated with the same rigour). A finding without a validated remedy isn't reported.
The proof of concept is done when its Results/discussion.json is complete (python skills/_core/results/discussion_cli.py scaffold|check --product implementations/ / ): a verdict per hypothesis backed by its test, the novelty and the qualitative analysis. The paper-reviewer agent then classifies the NeurIPS contribution type of those findings: launch it with the judge button in the Novedad & Hallazgos tab, because G-EXP-POC and G-NOVELTY refuse their approval until each complete discussion has its type.
You, not an agent, verify the proof of concept's results and the hypotheses it contrasted: in the Novedad & Hallazgos tab's verification card, from the Experimentos stepper's verify step, or with smith novelty approve --gate poc (iterate --gate poc sends it back). Until then the full experiments stay locked: sub-phase 5.12, the /experimental-implementation action and the stepper's full-experiment button.
/experimental-implementation turns the protocol into code and measures it, after a timing probe (Results/timing.json) and, only when the deliberation judged it worthwhile, a nested hyperparameter search (/hyperparameter-search). experiments-reviewer reviews the code before any rehearsal. A run whose local estimate exceeds 20 minutes goes to Colab or Kaggle: /kaggle-accounts validate, then /remote-execution (rehearsal, then the launch only you authorize). /experiment-diagrams draws the approved proof of concept and experiments, and you validate each drawing. The run closes with its own complete Results/discussion.json.
Novedad & Hallazgos contrasts every hypothesis verdict with the SOTA pool, shows the findings' NeurIPS contribution type and the reviewer-defense checklist, and records your decision with smith novelty approve or iterate (back to experiments, proposal or plausibility). It opens once Phase 5 has passed.
/paper-writing opens the paper/ tree and its section contracts (scaffolding), records each decision of the paper with mark (declarations) and then writes one named block at a time; every claim needs a source that holds it. /figure-review checks each compiled figure.
The Previsualización PDF tab compiles paper/main.tex to paper/main.pdf, scores each section's style and redundancy from 0 to 100, and ranks journals for a quartile range you choose (Choosing and adapting to a journal). smith audit . and /skill-audit report across every phase; they never repair.
That is all that is needed to use the forge. What goes on inside each skill —its steps, its pieces, how they connect to each other and what limitations each one has— is detailed in Anatomy of each skill. For the literal contract, each one's SKILL.md.
smith init creates a self-contained directory —with no git initialized and without touching the framework checkout— with this shape:
The file comes with three example targets and three execution profiles. The targets declare where the work runs; the profiles, what runs and how it is split up:
compute_targets: default: "kaggle-gpu-pool" targets: local-workstation: { provider: "local", device: "cuda:0" } kaggle-gpu-pool: { provider: "kaggle", accelerator: "GPU_T4_X2", ... } slurm-cluster: { provider: "remote-ssh", host: "hpc.university.edu", ... } execution_profiles: smoke_and_invariants: { target: "local-workstation", entrypoint: "{target_python} -m pytest {target}/tests/test_invariants.py" } sweep_training: { target: "kaggle-gpu-pool", sharding: { … }, artifacts: { … } } benchmark_evaluation: { target: "kaggle-gpu-pool", entrypoint: "papermill …/benchmark.ipynb" } paper_ingestion: engine: auto # route each page: pypdfium2 fast path, Docling only where needed mode: fast # fast (route pages) | balanced (every page through Docling) strip_references: true source_base: guidance The active target and profile live in .papersmith/config.json; papersmith target set changes them. The paper_ingestion block is owned by the ingestion skill and the orchestrator treats it as opaque (it is edited with the skill, not by hand).
smith upgrade's preservation contract is explicit: it never touches guidance/, proposals/, paper/, experiments/, implementations/, kaggle-inbox/, papersmith.yaml, package.json, README.md nor the .env* files. Everything else is framework scaffolding and upgrade syncs it —with --force if needed— leaving the artifacts intact.
In this repository the same rule holds for Git: the scaffolding is versioned, the content is not. Research folders travel with their .gitkeep and nothing else; guidance/ versions the folders and never the PDFs nor the ingested Markdown. sota-pool/ follows the same contract: the folder travels, and candidates.json, atlas.json and atlas.html —which inlines the full 3D viewer— stay on the machine that produced them.
Preserving is not migrating. Not touching an artifact protects it while its shape does not change; the day a release changes that shape, something is needed to carry it up to it. That is the job of artifact migrations, and it is also the reason .papersmith/version stopped advancing just because files had been copied.
skills/ at the repository root is the single source of truth. Each harness reads skills from its own folder, so the projection script symlinks the canonical tree into each one with relative and idempotent symlinks: running it again converges to the same layout and the checkout stays relocatable.
npm run setup:harnesses # = bash scripts/setup-harnesses.sh Harness Where it reads skills from Routing document (workspace) Claude Code .claude/skills/ CLAUDE.md Pi .pi/skills/ .pi/APPEND_SYSTEM.md OpenCode .opencode/skills/ OPENCODE.md Google Antigravity .agents/skills/ .agents/AGENTS.md What each harness wires smith init and smith upgrade generate, for each harness the workspace declares, what this table shows. It is the same matrix as HARNESS_CAPABILITIES in src/papersmith/generators.py, and a test (tests/test_harness_parity.py) verifies that both match. wired is what gets generated; unsupported is what does not get generated; opt-in is only documented, and it is enabled manually.
When it finishes, init and upgrade print one line per active harness with the state of each capability (wired, unsupported, failed or blocked) and add the wiring key to its result. If a skill symlink could not be created, or there is a real directory where the symlink would go, they report it as a warning (failed / blocked) instead of silently omitting it.
Pi's agents use the web tools web_search and fetch_content from the pi-web-access package. The workspace declares it in .pi/settings.json, which Pi reads once you trust the project and installs from there; nothing needs installing by hand. init writes that file, upgrade adds it to an older workspace that lacks it, and neither touches an existing one (add packages to it with pi install -l ).
Summary of docs/harness-support-matrix.md, read against each tool's documentation on 2026-10-02. It is what the tool documents, not what Papersmith generates (that is the table above). unverified means no primary source was read.
The sources of each cell are in docs/harness-support-matrix.md.
Inside a generated workspace, the behavior is slightly different: the workspace ships the full skills/ tree and the agent tree (.claude/agents/), and its routing docs point at the canonical tree skills/*/SKILL.md. The routing documents are generated projections: the real source of each agent is .claude/agents/*.md and the source of each skill is its SKILL.md. The projections must not be edited by hand; they regenerate (and smith audit --check-drift warns if one drifted). init and upgrade generate one slash command per skill in .claude/commands/, .opencode/commands/ and .pi/prompts/; Antigravity does not receive command files and reads skills through its symlinks. Agents are projected from .claude/agents/ to .opencode/agents/, .pi/agents/ and .agents/agents/. For a harness to list the skills as / commands, npm run setup:harnesses must be run inside the workspace: it symlinks the shipped tree into .claude/skills, .pi/skills, .opencode/skills and .agents/skills, just as relative and idempotent as in the checkout. In this checkout, the slash command projections (.claude/commands/, .opencode/commands/, .pi/prompts/), the agent projections (.opencode/agents/, .pi/agents/, .agents/agents/) and the OpenCode and Pi guards are synced with python scripts/sync-repo-harness.py (--check for CI; it has no script in package.json because the kit ships it and the script is repo-only).
A workspace ships twenty-nine subagents in .claude/agents/. They are short bursts of work that a harness launches (for example, with the Task tool) on request, not replacements for the CLI. The shape is always the same — one burst between two operator gates: the agent decides nothing, asks nothing, and ends up reporting what it found and how much it cost to establish it. The operator opens and closes the gates.
Which model runs each agent. An agent with no model: line runs on the session's model. Three agents only read (Read, Glob, Grep) and hold no gate — math-tutor, insumos-observer and style-sampler — so they carry model: sonnet. Claude Code reads that line straight from .claude/agents/, because the workspace copies that directory rather than rendering it. The projections for the other harnesses drop the line. Pi has no cited per-agent model field; OpenCode (provider/model) and Antigravity (inherit, flash, pro) have one, but nothing cited says which of their values matches sonnet, so writing one would be a guess. On those three harnesses every agent runs on the session's model.
Agents read only the stage they are in. proposal-implementation keeps each probe state's section in its own file, skills/proposal-implementation/references/next-step- .md, and its SKILL.md leaves a Stage reference: line where the section stood. implementation-build, implementation-walk and paper-replicator read SKILL.md, then only the reference for the nextStep that probe reports.
The guided tour of every skill, with its flow diagram, is in docs/skills.md. The workspace ships nineteen skills; each one's SKILL.md is its source of truth:
Every smith command, with its options and examples, is in docs/cli.md; smith --help is the source of truth.
Before a job touches a real worker, the forge offers a ladder of cheap rehearsals, worked down in order and not skipped:
The targets and profiles are those of the workspace's papersmith.yaml (see Inside the workspace). The ledger .papersmith/runs_ledger.jsonl is append-only: every dispatched run is recorded with its target, its profile and its outcome. And smith remote status / pull is the memory of what was sent out and what came back — the detail of that contract lives in the remote-execution section of the Anatomy.
Credentials and backends. remote-execution supports several backends (kaggle, colab):
Jobs checked before they run. remote_cli.py generate-jobs writes one job folder per remote step a product declares in __steps__ (generate-job --dataset and generate-jobs --dataset declare a workspace dataset as the job's input, uploading nothing), and remote_cli.py preflight checks every generated job locally before its first remote rehearsal: pin, diagrams, interpreter, code reachability, inputs, a local rehearsal of the smoke, each account, the accelerator and session fit, one pass/warn/fail row each. It never submits.
Placement by measurement. Before a proof of concept or a full experiment runs, remote-parallelism's timing probe measures each candidate way to run it (local CPU with N processes, a local accelerator, each account's machine, a CPU-only remote session, batch and loader settings), and plan recommends the fastest affordable one with its reason. A GPU is never the default: it is chosen only when measured faster, and generate-job --accelerator-kind cpu writes a CPU-only remote job when the plan says so.
Runs longer than one session. A run whose estimate exceeds a service's continuous session is planned as a chain of sessions that checkpoint every epoch or trial and resume: plan --resumable and schedule cost the chain, with the setup paid again in every session and the wait for each weekly quota reset counted (quotaWeeks). preflight --unit ... rehearses it locally before the first remote rehearsal: the job must stop at a deadline that has already arrived, leave partial.json and its checkpoints, and finish only the remaining units in a second session. submit --unit then carries the declared checkpoints to each continuation on the same account (Kaggle mounts the earlier output; Colab uploads it into the new session). The rule lives in remote-execution's "The session-chain rule".
Campaigns larger than the pool. distribute and campaign submit place every unit: past the granted slots, units join per-slot queues that each job runs in order, cut into chained sessions on the same account when a timing record says so, and schedule and plan report the same queues. Units already returned complete (done) or still running (inFlight) are never placed again, so the campaign's full unit list can be passed every time, and remaining names the units still owed.
Real quota. A real submission spends quota and GPU hours. The house rule is simple: everything that can be rehearsed with --dry-run and --smoke is rehearsed; what is left after that is a decision for the operator.
papersmith-ai/ ├── docs/ # supporting documentation (MCP server) ├── src/papersmith/ # the orchestrator CLI (Python) and its runtime bridges │ ├── core/ # init, status, ingest, upgrade, executor, ledger │ ├── bridges/ # Node, Python, deliberation, remote execution │ └── mcp/ # stdio Model Context Protocol server ├── skills/ # canonical skill tree, projected to the harnesses │ ├── _core/ # shared deliberation and implementation engines │ ├── paper-ingestion/ # Marker + Surya OCR + llama-server │ ├── proposal-deliberation/ # TypeScript engine: AST verification and state machine │ ├── proposal-implementation/# reproducible code generation and its tests │ ├── experimental-deliberation/ # second domain; same engine, a different aim │ ├── experimental-implementation/ # second implementation host; two documents, one engine │ ├── paper-writing/ # section contracts → PDF, assuming nothing │ ├── remote-execution/ # dispatch to distributed compute (Kaggle T4/P100 / local) │ ├── kaggle-accounts/ # credentials gatekeeper: identities, never values │ └── skill-audit/ # meta-auditor of surfaces and promises ├── guidance/ # reference papers and domain guidelines ├── tests/ # Node.js + pytest suites (meta-audits included) └── scripts/ # environment provisioning and harness setup smith team {list,add,remove} and smith colab {login,status} smith team add --owner ana --name "Ana" --kaggle-username ana_k --colab --colab-tier pro --attest smith team list smith colab login --owner ana smith colab status Several remote accounts are supported as a team: multiple accounts per service are accepted provided each account is associated with a distinct email address. team add records an owner in .papersmith/team.json (git-ignored, no secrets, with optional --email ) and refuses without --attest, the confirmation that each account is operated under a distinct registered email, and refuses duplicate accounts sharing an email under the same service. Google's Colab FAQ disallows "using multiple accounts to work around access or resource usage restrictions", and on free runtimes without compute units "running distributed computing workers". A Colab owner on the free tier may run interactive or proof-of-concept work in one session, never a worker of a split campaign.
colab login --owner runs the official google-colab-cli (pinned 0.6.0) consent for that owner under a private HOME of its own (~/.config/papersmith/colab/ /, mode 0700): the CLI keeps its token under HOME, so a private HOME is what isolates one person's account from another's, and papersmith never opens a file inside it. colab status reports, per owner, the CLI version, whether the sign-in still answers, the tier and whether the owner may take part in a split campaign. smith init and smith upgrade also register Google's official Colab MCP server (colab), which drives a notebook the person has open in the browser.
There are two suites, not one. Running a single one and giving a verdict is a mistake this repository has already made, so both are here with their exact invocation:
npm test # shared deliberation engine .venv/bin/python -m pytest # everything else npm run test:all # both, in order A fast loop, not a gate. npm run test:fast (python3 scripts/fast_tests.py) runs the tests that touch the uncommitted work (staged, unstaged and untracked; non-code files such as .md or .json select nothing) plus a fixed set of guards. The guards alone take about 40 seconds and the selection adds to that. Three measured slow tests are deselected by default (--with-slow includes them; the full gate always runs them). --since REF adds what is already committed since REF, --list shows the selection, its base and why, and --guards-only runs the guards alone. It is a textual heuristic that can miss tests exercising a module indirectly: it does not replace npm run test:all, which remains what is run before integrating.
Python in parallel. npm run test:py:par runs the same suite with pytest -n 8 --dist loadfile (it needs pytest-xdist, which setup_env.py already provisions). Measured on 2026-10-01: 5455 passed in 5 min 9 s against 10 min 17 s in series. Only loadfile is safe: load and loadscope compete for the shared implementations/ directory. A single test (waiting for a killed process, 120 s) sets the time floor.
npm run typecheck runs tsc over the deliberation engine and comes out clean.
Two traps that look like repository defects and are not.
The npm script sets the domain profile. npm test exports DELIBERATION_DOMAIN_PROFILE before invoking node --test. Calling bare node --test fails closed, because the engine serves no domain of its own and refuses to start without one. It is the invocation that is wrong, not the engine. The same holds on the Python side: the implementation engines require IMPLEMENTATION_DOMAIN_PROFILE, which is why the CLI that launches them sets it — and why tests/domain_profile.py seeds and restores it by import.
tests/ has no __init__.py. The form one would write from memory, discover -s tests -t ., dies with ImportError: Start directory is not importable. The form that works is the one above, without -t ..
What tests what. tests/ covers the forge's tooling: the two shared engines, every skill's SKILL.md and its scripts, the tie between each skill and its agents in both directions, and a from-scratch series that generates a workspace with the CLI and walks every command, every embedded skill and every subagent inside it (tests/test_workspace_{commands,skills,agents}_e2e.py). The tests of a materialized implementation live in its destination repository and nowhere else; deleting it deletes its tests.
One live rehearsal, opt-in. Everything above is hermetic. To exercise the real engines — npm install, environment provisioning, an ingestion and an agent — there is scripts/cli-paper-live-smoke.sh, which refuses to run without PAPERSMITH_LIVE=1 (and accepts PAPERSMITH_LIVE_INGEST= and PAPERSMITH_LIVE_AGENT= to extend the walk).
Two sealed corpora. tests/seal/ and tests/experiments_seal/ keep the exact output of a battery of commands as golden digests. They are not unit tests: they exist so that a change in the shared engine cannot silently alter what each host produces. They are worth what they cost — during the last fix, four digests moved and said the correction was wrong, in a direction no unit test was seeing.
proposal-implementation was also validated with its own scenario harness — the situations a clone can fall into, plus the full cycle up to publishing the revision that produces a finding — built to close v1.5 and retired when it closed. It was scaffolding, not part of the forge. It stays in the history: the commit that removes it says so, and git revert brings it back if it ever has to run again.
"The skill refused to start." That is the expected behaviour: each skill declares what it needs first and exits with a refusal code that names what is missing, rather than inventing it or skipping it. The code reads as a to-do list — it says exactly which input is missing. It is not a mistake on the reader's part.
"Bare node --test fails." By design: the deliberation engine refuses to serve without a domain profile. npm test sets it, and so does the skill's CLI. The same holds for the implementation engines: IMPLEMENTATION_DOMAIN_PROFILE_REQUIRED means they are being invoked directly instead of through implementation_cli.py, which is what starts them with their profile. If you invoke them directly on purpose, set the variable to an absolute path: a relative one is refused with IMPLEMENTATION_DOMAIN_PROFILE_NOT_ABSOLUTE.
"The workspace has no .claude/skills." That is the default state: a workspace ships the whole skills/ tree and .claude/agents/, and its routing documents point at the canonical skills/*/SKILL.md tree; the agents read the skills from there. For a harness to list them as / commands, run npm run setup:harnesses inside the workspace: it creates the projections of the four harnesses, relative and idempotent.
"smith audit reports drift." Some generated file changed with respect to the manifest. It is not edited by hand: run smith upgrade (and --force if needed) to return to the framework's version.
"papersmith accounts cannot be run." It does not exist yet (recorded follow-up). Use python3 skills/kaggle-accounts/scripts/accounts_cli.py {list,discover,validate,remove,materialize}.
"status exits 0 even when there is drift." A known, recorded gap: the exit code is not strict today. For a CI gate, read the JSON (--json) rather than the exit code.
"The first ingestion downloads ~1.5 GB." Those are the Surya weights when the environment was not pre-provisioned. smith init already provisions the environment unless --no-env was passed; in that case, run python3 scripts/setup_env.py install before the first ingestion.
Author: Laboratorio de Inteligencia Artificial UNAL
All 2 files in this release have provenance metadata.
research academic-writing latex literature-review agents llm
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
All 2 files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




