Compile skills

Three skills turn raw papers into wiki entities. Extract, resolve, merge.

Extract

Reads one paper (store/raw/papers/PMC.../paper.md). Picks 5-8 intelligence dimensions from the canonical 21. Emits structured JSON fragments with verbatim source quotes, source IDs, and implications.

The extract skill is the bottleneck phase. It reads the full paper, identifies entities (cohorts, institutions, investigators, platforms), and produces fragments that the resolve skill will match against the wiki.

Source: .claude/skills/compile/extract/SKILL.md

Resolve

Reads fragments from extract plus the wiki index. Decides for each proposed entity: NEW, MERGE_INTO, or AMBIGUOUS.

Source: .claude/skills/compile/resolve/SKILL.md

Merge

Reads the resolution plan. Writes new entity articles and updates existing ones. Hook-gated -- every write passes through pre-write-entity.sh for schema validation.

Source: .claude/skills/compile/merge/SKILL.md

Pipeline flow

paper.md  -->  extract  -->  fragments.json
                               |
                               v
wiki/index/  +  fragments  -->  resolve  -->  resolution_plan.json
                                                |
                                                v
resolution_plan  -->  merge  -->  store/wiki/{type}/{slug}.md
                                  (hook-validated)