--- name: autoresearch-scaffold description: Use when the user wants to stand up a self-updating, trajectory-aware research ledger for a topic domain — an "autoresearch" workspace that sweeps sources, ingests them into an accreting evidence vault with a moves-both-ways status lifecycle, reasons across the corpus (interactions/connections), gates every change behind an audit, and optionally writes synthesis articles and a personal regimen. Triggers: "autoresearch workspace for X", "self-updating research ledger", "nightly research system for X", "build the Memory-Atlas / research-radar pattern for a new domain", "trajectory-aware knowledge vault". --- # autoresearch-scaffold Scaffold an **autoresearch workspace**: an ICM workspace whose `vault/` is a plain-markdown MOC ledger of a domain's evidence, refreshed by an agent that sweeps → ingests → reconciles status → connects across the corpus → (optionally) writes articles and a personal decision layer, all hard-gated by an audit script. Proven twice: **Memory Atlas** (`~/source/memory-aggregator`, AI-memory research) and **Healthspan Atlas** (`~/source/healthspan-atlas`, health interventions). This skill generalizes that shape to **any topic**. **This is a specialization ("preset") of `icm-workspace-builder`, not a replacement.** Use that skill for the generic ICM shell and non-developer interview; this skill overlays the autoresearch machinery that `icm-workspace-builder` doesn't know about: a persistent accreting vault, an evidence-grade lifecycle, the cross-corpus connect layer, a scripted audit gate, PDF archival, and the optional nightly `auto` runner. ## When this is the right pattern (filter check) Autoresearch fits a domain where **all** of these hold — confirm before scaffolding: - New primary sources arrive **over time** (papers, filings, releases, posts) and you want to track how understanding *moves*, not just snapshot it. - Claims can be **graded and can flip** — a stronger source should be able to *downgrade* an earlier belief. (If facts don't contest each other, you want a wiki, not this.) - The value is in the **accreting trajectory + cross-source connections**, not a one-shot report. If it's a linear, run-once, no-memory workflow → plain `icm-workspace-builder` (or a skill) is the better tool. Say so and stop. ## The two beyond-ICM extensions (name them honestly) Vanilla ICM is human-checkpointed *linear* pipelines. Autoresearch pushes past that in exactly two ways — call them out to the user so nobody pretends this is stock ICM: 1. **A persistent, accreting vault** — a mutable Layer-3/4 store stages read *and* write, whose statuses move both ways. Not a one-way stage→stage handoff. 2. **An (optional) authorized unattended runner** — the nightly `auto` mode replaces human checkpoints with the audit gate + caps + an emailed audit trail. Interactive modes keep the human checkpoint (textbook ICM). ## Workflow Create a TodoWrite list with these phases. **Do not skip the gate or the two verify steps** — a scaffold that looks right but whose audit gate doesn't actually run is worse than none. ``` Phase 0 Confirm fit + target → filter check above; get the destination repo path Phase 1 Interview the domain → references/interview.md (the axes that specialize the shape) ─ GATE Present the plan → the shape you'll emit + the domain-specific choices; get a go Phase 2 Emit the workspace → stamp the tree from references/workspace-templates.md + copy scripts/ Phase 3 Verify the gate runs → `python3 scripts/audit.py` must exit 0 on the empty vault Phase 4 Seed one real source → ingest ONE source by hand end-to-end; re-run the gate Phase 5 Report + stop → summarize; leave everything UNCOMMITTED for the human ``` ### Phase 0 — Confirm fit + target Run the filter check. Get the absolute destination path (e.g. `~/source/-atlas`). If the user hasn't `git init`'d it, offer to. Run `date` (fresh datestamps). ### Phase 1 — Interview the domain Read `references/interview.md` and walk it. It asks only the questions that *specialize* the shape — the domain name + one-sentence purpose, the primary sources (the "arXiv equivalent") and their fetch ladder, the **claim/evidence model** (what a graded claim looks like in this field and what its tier hierarchy is), whether the domain has **interactions/connections worth a connect layer**, and which optional surfaces are wanted (**regimen** decision layer? **articles**? **nightly auto**?). Lift the user's own words. For the generic ICM shell questions (cadence, who runs it, stage naming) you may hand off to `icm-workspace-builder` and come back — or ask them inline. Don't re-derive ICM theory for the user. ### GATE — Present the plan (before writing files) Show, concisely: the folder shape you'll emit, the evidence-model frontmatter you'll use for this domain, the tier hierarchy, whether a connect layer / regimen / articles / nightly-auto are in, and any domain-specific naming. Call out the two beyond-ICM extensions. Then **stop for a go** (unless the user already said "just build it"). ### Phase 2 — Emit the workspace Read `references/architecture.md` (the canonical shape + what earned its keep) and `references/workspace-templates.md` (every file's template with `## File:` headers). Then write the tree: ``` -atlas/ CLAUDE.md Layer 0: map + routing table + trigger keywords + rails GOAL.md Layer 3: north-star (ONLY if a regimen/decision layer is wanted) shared/ Layer 3 reference, loaded per stage evidence-model.md the grading rubric + status lifecycle + highest-tier-wins aggregation decision-rule.md the regimen scoring rule (only if regimen) voice-rules.md article voice do/don'ts (only if articles) safety.md domain safety/quality contract (if the domain needs one) premise.md why this exists pdf-archival.md the fetch ladder recipe (if archiving source PDFs) stages/ the pipeline as ICM stage contracts (Layer 2) 01-sweep/CONTEXT.md 02-ingest/CONTEXT.md carries the connect checks (§6.5) from day one 03-audit/CONTEXT.md runs scripts/audit.py — the ICM Audit table 04-synthesis-article/CONTEXT.md (only if articles) 05-refresh-regimen/CONTEXT.md (only if regimen) 06-commit-and-email/CONTEXT.md (only if nightly auto) 07-connect/CONTEXT.md (only if a connect layer) vault/ Layer 4 + persistent store index.md field map: groups + entries + Status + "Recently ingested" + Open gaps maps/ concepts/ sources/ raw/(git-lfs) regimen/current-protocol.md (only if regimen) articles/index.md (only if articles) scripts/audit.py copied VERBATIM from this skill's scripts/ scripts/fetch-pdf.py copied if archiving PDFs (swap the resolver per domain — see file header) scripts/-radar-nightly.sh the nightly driver (only if nightly auto — references/scheduling.md) deploy/