# Extraction Protocol — Behaviour Graph v0

**Scope:** Defines how each Go Pro chapter is read, decomposed, and audited before its artifacts are committed.
**Applies to:** All chapters (ch.0 dry-run through ch.7). Follow this protocol in every extraction session.

---

## 1. Two-stage gap-driven flow

Extraction happens in exactly two passes over the chapter. Do not merge them.

**Stage 1 — Emit.** Read the chapter sequentially. For every paragraph (or tight group of related paragraphs) that carries a substantive idea, emit one or more artifacts: any of the five node types, any applicable edges, plus all script variants. Record `source_ref` on every emitted node. Continue until end of chapter. Do not self-censor at this stage; prefer over-emission to under-emission.

**Stage 2 — Gap audit.** Re-walk the chapter with the Stage 1 artifact set in hand. For every paragraph that did *not* produce an artifact, record an explicit reason-tagged entry in the gap list (see §5). Coverage proof = no paragraph is left without either an artifact id or a gap-list reason tag. This is the mechanism that makes "we didn't miss anything" verifiable by Roma / Maks / Dmitry.

Reference: spec §4 defines the two-stage protocol. This document operationalises it.

---

## 2. Node-type decision rules

When a paragraph emits an artifact, apply these rules in order to determine the correct type. Stop at the first match.

| Question | Yes → type | Guidance |
|---|---|---|
| Does it describe a discrete stage a user is in, with no instruction attached — just "the user is here"? | `user_state` | States are places on the journey map, not actions. They receive triggers and are entered by loop transitions. |
| Does it describe a repeatable unit: something triggers, the user acts, Kai responds, and an outcome follows? | `loop` | A loop is a behavioural cycle with an observable in/out. If it only describes the trigger or only the outcome, it may be a `user_state` instead. |
| Does it articulate a framework truth, a named lesson, or a general principle that explains *why* a loop works? | `principle` | Principles are backing logic. They do not have a trigger — they are referenced by loops via `backed_by` edges. If it reads as "here is a rule about how this business works", it is a principle. |
| Does it describe the instinctive wrong behaviour that the principle corrects? | `anti_pattern` | Anti-patterns are first-class nodes, not inline notes. Every anti-pattern is paired with its correcting principle via a `corrects` edge. If you find a principle, look immediately for the corresponding anti-pattern (often in adjacent paragraphs). |
| Does it give concrete words, a script structure, or a dialogue sequence meant to be used directly? | `script` | Scripts are operational language units. They reference the book's structural beats but are authored in Kai's voice. A script that is a variant of another links via `paraphrase_of`. |

**Ambiguous case — principle vs loop:** Ask: "Does this require a trigger to activate?" If yes, it is a loop. If it is a standing truth that does not require a trigger — it is a principle.

**Ambiguous case — script vs loop:** A loop describes what happens (trigger, action, response, outcome). A script is the actual words. A loop may reference several scripts; a script always references at least one loop step via `implements_step`.

Edges are not documented here. See `protocols/edge-cheatsheet.md` (Task 2) for the full set of 10 edge types with examples.

---

## 3. source_ref semantics

Every emitted node carries a `source_ref` field. This field is **internal only** — it is never shown to the user, never surfaces in Kai's output, and never appears in the FigJam canvas voice boxes.

**What to record:**

- The page number or paragraph identifier within the chapter (e.g., `ch.1 p.34 para.2`).
- A verbatim grounding snippet of **≤ 30 words** drawn directly from the source text, enclosed in quotes.

**Format:**

```
source_ref: "ch.1 p.34 para.2 | \"<≤30-word verbatim snippet>\""
```

**Why it exists:** During review, Roma, Maks, or Dmitry may challenge whether a node faithfully represents the source. The `source_ref` lets the reviewer locate the exact passage and verify that the paraphrased `body` is accurate — without needing to search the whole chapter. It is an audit anchor, not a reproduction of content.

**Sub-paragraph numbering.** When a structural paragraph contains a distinct nested beat (e.g., an anecdote, sub-list, or callout that is itself a meaningful unit), suffix the paragraph number with a lowercase letter: `para.10b`, `para.10c`, etc. The base `para.10` always refers to the outermost paragraph as printed in the source. Use sub-letters sparingly — only when the nested beat would otherwise lose its own grounding anchor.

**IP discipline:** The ≤30-word cap is intentional. See §7 for the full IP-clean rule. `source_ref` is the *only* location in the artifact where verbatim source text is permitted.

---

## 4. kai_voice_draft semantics

Every node — regardless of type — gets a `kai_voice_draft` field.

**What it is:** A short sample of how a seasoned Anakai top-KOL operator would express this idea to a user. It is a voice sketch, not a final production string. Its purpose is to ground the voice persona in the actual content so that Maks can validate tone at the same time as Roma validates substance.

**Voice persona authority:** The voice register, vocabulary, anti-patterns of tone, and per-language notes are all defined in `voice/kai-voice-persona.md`. Write every `kai_voice_draft` consistent with that document. When in doubt, check the persona doc first; do not improvise.

**Minimal viable draft:** One to three sentences is enough for a principle or user_state. Scripts get fuller drafts because they are operational language. Anti-pattern drafts can be a brief reframe ("Here's what usually happens instead — and why it costs you").

**This field is what Maks reviews.** Voice-sample boxes in the FigJam canvas are populated from `kai_voice_draft`. If the draft is absent, Maks cannot complete the voice review pass.

Each node also carries `voice_context_tags` (e.g., `warm-market`, `cold-market`, `onboarding`) — see spec §3.3 for the full tag vocabulary. Choose tags that describe the contexts in which this node would be activated.

---

## 5. Gap-list format and canonical tags

Every paragraph in the chapter must appear either as an artifact or in the gap list. The gap list is a flat bullet list appended to the chapter markdown file under the heading `# gap_list`.

**Entry format:**

```
- [para identifier] <reason-tag>: <one-sentence explanation if needed>
```

**Canonical reason tags:**

| Tag | When to use |
|---|---|
| `restatement-of-<id>` | Paragraph restates content already captured in artifact `<id>`. Use the artifact id (e.g., `restatement-of-P-01-02`). |
| `anecdote` | Personal story or illustrative example with no new framework content. |
| `transitional` | Connective tissue between sections (e.g., "In the next chapter we will…"). |
| `recap` | Summary or review of content already emitted earlier in the same chapter. |
| `meta-commentary` | Author speaks about the book, the reader, or the process of reading rather than the subject matter. |
| `forward-reference` | References content that belongs to a later chapter; flag for pre-flight of that chapter. |

**Precedence:** when a paragraph restates a single prior artifact, prefer `restatement-of-<id>` over `recap`. Use `recap` when the paragraph summarises multiple prior artifacts where no single id is primary.

**Multi-artifact source paragraph.** When a single source paragraph yields multiple artifacts of different types (e.g., p.32 para.20 yielded a principle, anti-pattern, loop, and script in ch.1 extraction): cite the same paragraph in each artifact's `source_ref`. There is no de-duplication penalty — one paragraph can ground many artifacts. The gap-list entry for that paragraph is unnecessary (it's emitted, not skipped).

**Non-fitting paragraphs = real gaps.** If a paragraph carries substantive content and none of the six tags fit, do not force a tag. Treat it as a missed artifact: go back to Stage 1 and emit it. A gap list entry that reads "doesn't fit any tag" is a signal to re-extract, not a valid gap-list entry.

---

## 6. Stopping condition

Stage 2 is complete — and the chapter extraction is complete — when and only when:

> Every paragraph in the chapter has either an artifact id assigned to it (was emitted in Stage 1) **or** a gap-list entry with one of the six canonical reason tags.

No paragraph may be silently skipped. If a paragraph is genuinely ambiguous (could be tagged two ways), pick the tag that best describes it and add a brief inline note. The goal is a complete, auditable account of every unit of text in the chapter.

This stopping condition is the mechanism that allows Roma / Maks / Dmitry to audit coverage without re-reading the full source.

---

## 7. IP-clean rule

The Go Pro frameworks and principles are not copyrightable as ideas. The surface text is.

**Rule:**
- **Paraphrase** all frameworks, principles, and structural beats into our own wording. The `body` field of every node must be in our language, not Worre's.
- **Do not reproduce** extended passages. Even paraphrasing must reflect genuine re-expression, not light synonym substitution.
- **Verbatim text is permitted in one location only:** the `source_ref` field, capped at ≤ 30 words, for internal review grounding. It never appears in user-facing output.
- **Scripts** reference the book's structural beats (the *what* of a sequence) but are fully authored in Kai's voice. No script node should read as a close paraphrase of a Worre script.
- **`kai_voice_draft`** is entirely our authored text. No direct Worre wording.

**In practice:** After writing a `body`, ask: "Could this sentence appear word-for-word in the book?" If yes, rewrite it. The test is whether the idea is preserved while the expression is genuinely ours.

---

## 8. Worked micro-example (one paragraph extracted)

**Hypothetical source paragraph (invented for illustration — not a real Worre extract):**

> "Most people approach a prospect as if they need something from them. The moment you adopt that energy, you've already lost. The professional moves from a place of abundance: they have something valuable, and the prospect either wants it or doesn't."

---

**Stage 1 emission:**

```yaml
id: P-01-03
type: principle
title: Abundance posture in prospect contact
body: >
  A professional approaches every prospect from a position of surplus, not
  need. The interaction starts from the assumption that value is being
  offered — the prospect's decision either way does not diminish the offer.
  Neediness in posture is detectable and closes the conversation before it
  opens.
source_ref: "ch.1 p.28 para.3 | \"The professional moves from a place of abundance: they have something valuable, and the prospect either wants it or doesn't.\""
kai_voice_draft: >
  When you reach out, come in as someone who has something worth offering —
  not as someone who needs a yes. The person you're talking to will feel
  the difference immediately. Your posture is part of the message.
voice_context_tags: [warm-market, cold-market, onboarding]
linked_corrects: AP-01-03
```

```yaml
id: AP-01-03
type: anti_pattern
title: Neediness signalling during outreach
body: >
  Approaching a prospect with visible anxiety about their answer — following
  up too quickly, over-explaining, seeking reassurance — signals scarcity.
  It triggers social reversal: the prospect pulls back because the dynamic
  feels off-balance.
source_ref: "ch.1 p.28 para.3 | \"Most people approach a prospect as if they need something from them.\""
kai_voice_draft: >
  Here's the trap most people fall into: they reach out hoping for a yes,
  and the prospect can feel it. That energy pushes people away before
  the conversation even starts.
voice_context_tags: [warm-market, cold-market]
linked_corrected_by: P-01-03
```

**Edges emitted:**
- `P-01-03 corrects AP-01-03`

---

**Stage 2 gap audit — adjacent transitional sentence:**

Assume the paragraph is immediately preceded by: *"Now let's look at the most important mindset shift in prospecting."*

```
Gap list:
- [ch.1 p.28 para.2] transitional: Section header sentence introducing the prospecting mindset topic; no extractable content.
```
