---
name: annotated-writing
description: >
  Use this skill when the user says "make a content map" for any piece of writing,
  OR when the agent receives a completed content map file as input. Two distinct tasks:
  (1) content mapping: read source text, produce structured annotation data;
  (2) building: receive content map, produce single-file interactive HTML.
  These are separate agent tasks. Never attempt both in one context.
---

## This Skill Has Two Modes

**Mode 1 — Content Mapping** is triggered by: "make a content map"
Read `content-mapping-fiction.md` or `content-mapping-non-fiction.md` depending on source type. Produce a `.md` content map file as output.

**Mode 2 — Build** is triggered by: receiving a content map `.md` file as input.
Read `annotated-writing-build.md`. Produce a single-file `.html` artefact as output.

Never conflate the two. A content-mapping agent should not write HTML. A build agent should not perform literary analysis.

## Files in This Skill

| File | Used By | Purpose |
|---|---|---|
| `content-mapping-fiction.md` | Mapping agent | How to map fiction and historically-situated writing |
| `content-mapping-non-fiction.md` | Mapping agent | How to map essays, journalism, documents |
| `annotated-writing-build.md` | Build agent | Component library, TOON parsing, HTML output rules |
| `SKILL.md` (this file) | Both agents | Entry point, routing |

## Routing Logic

```
input received
│
├─ source text .md
│   └─ is source fictional? → content-mapping-fiction.md
│      is source non-fiction? → content-mapping-non-fiction.md
│
├─ "make a content map" + source text
│   └─ is source fictional? → content-mapping-fiction.md
│      is source non-fiction? → content-mapping-non-fiction.md
│
└─ content map .md file received
    └─ annotated-writing-build.md
```
