> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nika.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Transcript show-notes

> T2 chain · podcasts / meetings: raw transcript → typed show-notes (chapters, quotes, summary) in ONE bounded infer.

> **T2 chain · podcasts / meetings**: `nika:read` loads the raw
> transcript, ONE `infer:` with a strict `schema:` extracts chapters +
> pull-quotes + summary as typed data, `nika:jq` shapes the sections,
> and `nika:write` renders the publishable page. The model is called
> exactly once, and its output is schema-validated before anything
> downstream touches it.

## The job

Show-notes are the chore between "episode recorded" and "episode
published": an hour of scrubbing for chapter marks and quotes. This
workflow does the extraction in one bounded model call — bounded in
*shape* (the schema rejects free-form prose) and in *count* (one
infer, so the cost of an episode is the cost of one call, visible in
`nika check` before you run).

## The shape

```mermaid theme={"system"}
flowchart LR
  raw["raw · nika:read"]:::invoke
  notes["notes · typed"]:::infer
  sections["sections · nika:jq"]:::invoke
  page["page · nika:write"]:::invoke
  raw --> notes
  notes --> sections
  notes --> page
  sections --> page
  classDef infer fill:#5b8cff22,stroke:#5b8cff,color:#5b8cff
  classDef invoke fill:#22d3ee22,stroke:#22d3ee,color:#22d3ee
```

## The file

```yaml transcript-shownotes.nika theme={"system"}
nika: transcript-shownotes

model: ollama/qwen3.5:4b # local · zero key · the house seat — a THINKING model: the think block and the JSON both count against `max_tokens` (engine#428), so the ceiling below is sized for think + show-notes, not the notes alone

const:
  transcript: "examples/fixtures/episode-transcript.txt"

permits:
  exec: false
  tools: ["nika:jq", "nika:read", "nika:write"]
  fs:
    # One file in, one page out — each named exactly. `data/**` would have
    # handed a whole tree to a workflow that reads a single transcript.
    read: ["examples/fixtures/episode-transcript.txt"]
    write: ["out/show-notes.md"]

tasks:
  raw:
    invoke:
      tool: "nika:read"
      args: { path: "${{ const.transcript }}" }

  # ONE bounded model call · the schema is the contract, not a suggestion.
  notes:
    with:
      raw: ${{ tasks.raw.output }}
    infer:
      prompt: |
        Turn this transcript into show-notes. Ground every chapter title
        and quote in the text — invent nothing.

        Transcript ·
        ${{ with.raw }}
      # a reasoning model needs 16384 here, or a documented run.reasoning.effort: low
      max_tokens: 3000   # think block + the show-notes JSON
      schema:
        type: object
        additionalProperties: false # a deterministic shape across providers (the checker's strictness hint)
        required: [summary, chapters, quotes]
        properties:
          summary: { type: string }
          chapters:
            type: array
            items:
              type: object
              additionalProperties: false
              required: [title, gist]
              properties:
                title: { type: string }
                gist: { type: string }
          quotes:
            type: array
            items: { type: string }

  # Typed JSON → markdown lines · mechanical, zero second model call.
  sections:
    with:
      notes: ${{ tasks.notes.output }}
    invoke:
      tool: "nika:jq"
      args:
        input: "${{ with.notes }}"
        expression: >-
          {
            chapters: (.chapters | map("- **\(.title)** — \(.gist)") | join("\n")),
            quotes: (.quotes | map("> \(.)") | join("\n\n"))
          }

  page:
    with:
      notes_summary: ${{ tasks.notes.output.summary }}
      sections_chapters: ${{ tasks.sections.output.chapters }}
      sections_quotes: ${{ tasks.sections.output.quotes }}
    invoke:
      tool: "nika:write"
      args:
        path: out/show-notes.md
        content: |
          # Show notes

          ${{ with.notes_summary }}

          ## Chapters

          ${{ with.sections_chapters }}

          ## Pull quotes

          ${{ with.sections_quotes }}

          *Generated by [nika](https://nika.sh) · one bounded infer, typed output · the run's trace is the receipt.*

outputs:
  notes:
    value: ${{ tasks.notes.output }}
    description: "The typed show-notes · summary + chapters + quotes"
```

## The model choice is part of the lesson

The envelope pins `ollama/qwen3.5:4b` — the same local house seat as
the other showcases. This file is a **strict-schema** job: the think
block and the JSON both count against `max_tokens`, so the ceiling is
sized for think + notes, not the notes alone. If the visible answer
comes back empty, raise `max_tokens` before swapping models.

The typed seam is the other half: because `notes` is schema-shaped,
the jq step reads `.chapters[]` and `.quotes[]` as data — no regex
over model prose, no "hopefully it used the same markdown headings
this time".

## Run it

> [!NOTE]
>
> **What it needs:** A local model ([Ollama](https://ollama.com) serving `qwen3.5:4b`) and the sample episode transcript.

**1. Rehearse it**

```bash theme={"system"}
nika try transcript-shownotes
```

A mock model answers, the sample files come with it, and nothing is written in your folder.

**2. Get your own copy**

Save the file above as `transcript-shownotes.nika` in a new folder, then download the sample it reads:

```bash theme={"system"}
FIXTURES=https://raw.githubusercontent.com/supernovae-st/nika/v0.124.3/crates/nika-pack/pack/examples/fixtures
mkdir -p examples/fixtures
curl -fsSLo examples/fixtures/episode-transcript.txt "$FIXTURES/episode-transcript.txt"
```

**3. Check it, then run it**

```bash theme={"system"}
nika check transcript-shownotes.nika
nika run transcript-shownotes.nika --model mock/echo   # a mock model, no key
ollama pull qwen3.5:4b   # once, for the real run
nika run transcript-shownotes.nika
```

The run writes `out/show-notes.md`.

Any other model works: pass `--model <provider>/<name>` with its key, and cap a cloud model with `--max-cost-usd`.

Feed it any meeting transcript instead: point `const.transcript` at it and move the read permit with it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.