---
name: paper-to-doc
description: Turn a working paper note into the one worth keeping — shaped by the user's own template, front-matter tagged, indexed, with the reading scaffolding stripped. Run when asked to finalise a note, file what has been read, or produce a keepable write-up of a paper.
---

The note a later self opens. Reading leaves scaffolding — `— confirm?` markers, `## Stuck`, triage rows — earning its place while you read and nothing a year on. A write-up keeps what still pays.

## Ground rules

- **Notes or stop.** A write-up is made from a finished note. Where none exists, say so and offer the `three-pass-read` skill first.
- **Carry the source tag forward.** Each factual line keeps the note's own tag: `§4.2`, `Fig. 3`, `Table 1`.
- **Follow the user's language.** Write prose in the language the user is writing in. Keep technical terms, quoted phrases, and source tags in their original form.

## Steps

1. **Take the shape from the template.** `note-template.md` in the working directory decides it; without one, use the default below. **Its headings are the anchors**: fill under every heading it carries, in its order, and add no section it lacks. Where a heading has nothing worth putting under it, write `—`.
2. **Read the working note** `papers/<key>.md`.
3. **Keep only what pays.** Every line either carries a source tag or is marked as the reader's judgement; a line that is neither is exposition, and exposition stays out. Concretely:
   - A `— confirm?` candidate the user answered: the answer stays, the marker goes.
   - One never answered: the candidate stays, and the front matter's `unconfirmed` field names its question.
   - A `## Stuck` entry pass 3 resolved: the resolution stays, the entry goes.
   - Restatements of the abstract, and the triage row: out.
4. **Fill the front matter**, then write the file as `<key>.md` in the working directory.
5. **Index it.** Append one row to `INDEX.md` — key, one-line take-away, tags, date read, link. A row already there for that key is replaced rather than doubled.

## Default template

Copy this to `note-template.md` and edit it to own the shape.

```markdown
---
title:
authors:
year:
venue:
source:
key:
tags:
read:
unconfirmed:
---

## Take-away
## Problem
## Method
## Evidence
## Judgement
## Open questions
## Sources
```

## Done when

- The write-up carries every heading the template carries, in its order, and none it lacks.
- Every line in it carries a source tag or is marked as judgement.
- `INDEX.md` holds exactly one row for this key.
