# Source Stack: Diagram element for AI agents

> Two or three receipts fanned on the desk (articles or posts). Each comes to the front on its cue and the pen marks its line; they settle back into the fan with every underline kept, and a count chip says how many sources agree.

Canonical page: https://agentframes.ai/elements/receipts/source-stack/
Markdown: https://agentframes.ai/elements/receipts/source-stack.md

## Overview

- Name: Source Stack (`sourceStack`), an element: one HyperFrames block per size
- Part of: the [Receipts](https://agentframes.ai/packs/receipts.md) pack (11 of 50). Available only through the All-access subscription.
- Category: Diagram
- Purpose: Two or three receipts fanned on the desk (articles or posts). Each comes to the front on its cue and the pen marks its line; they settle back into the fan with every underline kept, and a count chip says how many sources agree.
- Pack: [Receipts](https://agentframes.ai/packs/receipts.md), included in All-access (from $14/month billed annually ($168/year), or $19 monthly)
- Subscribe: POST https://agentframes.ai/api/checkout/subscribe with interval=month or interval=year (optional currency=USD|GBP|EUR|AUD|CAD; 303 redirect to Stripe checkout; a human pays there). Then download any pack with the subscriber key: https://agentframes.ai/account.md
- Aspects: 16:9 (native), 9:16 (native), 4:5 (native), 1:1 (native)
- Canvases: works on Ember (graphite desk, red-orange pen) (`ember`), Ink (midnight desk, blue pen) (`ink`), Marker (warm stone desk, yellow highlighter) (`marker`); avoid none
- Typical duration: 17.5s
- Speaker-safe: no
- Preview video (watermarked): https://agentframes.ai/media/receipts/source-stack.mp4
- Poster: https://agentframes.ai/media/receipts/source-stack.jpg
- Licence: [AgentFrames Licence](https://agentframes.ai/licence.md)

## Paste this into Claude Code

```text
Use the AgentFrames Receipts pack. Add a `sourceStack` beat to plan.json on a `ember` canvas with slots `sources`, `chip`, `cues` and `pace` from my script. Then run validate → build → qa and show me qa/contact.jpg.
```

## Variables

| Variable | Type | Label | Description | Default |
|---|---|---|---|---|
| `sources` | string | sources | JSON string. {"type":"array","minItems":2,"maxItems":3,"items":{"type":"object","properties":{"kind":{"type":"string","enum":["article","post"]},"outlet":{"type":"string","minLength":0,"maxLength":30},"title":{"type":"string","minLength":0,"maxLength":80},"name":{"type":"string","minLength":0,"maxLength":32},"handle":{"type":"string","minLength":0,"maxLength":24},"verified":{"type":"boolean"},"text":{"type":"string","minLength":10,"maxLength":220},"url":{"type":"string","minLength":0,"maxLength":60},"date":{"type":"string","minLength":0,"maxLength":24}},"required":["kind","text"]}} | [{"kind":"article","outlet":"The Northline","title":"Nine in ten firms keep the four-day week","text":"Most companies in the pilot have chosen to [[keep the shorter week]].","url":"northline.example/work","date":"Mar 14"},{"kind":"post","name":"Grace Whitfield","handle":"gracewhitfield","text":"Six months in, [[our sick days fell by a third]].","url":"network.example/posts","date":"Mar 11"},{"kind":"article","outlet":"Ledgerline","title":"Six months on","text":"Across the group, [[revenue held steady]] through the winter.","url":"ledgerline.example/analysis","date":"Mar 16"}] |
| `chip` | string | chip | {"type":"string","minLength":0,"maxLength":30} | 3 sources |
| `cues` | string | cues | when each source comes to the front (s); one per source, empty = automatic. JSON string. {"type":"array","items":{"type":"number","minimum":0,"maximum":40},"maxItems":8} | [] |
| `pace` | number | pace | spoken words per second (default 2.4); each underlined word draws in its own 1/pace slot. {"type":"number","minimum":1,"maximum":6} | 2.4 |

## What your agent can change

**Source Stack**. Native 1920×1080, 17.5s at 30fps.

Two or three receipts fanned on the desk (articles or posts). Each comes to the front on its cue and the pen marks its line; they settle back into the fan with every underline kept, and a count chip says how many sources agree.

**Motion.** Cards rise into a fan one after another; on each cue a card slides to the front and scales up while the others dim, its quote underlines, then it slides back; the chip pops in (small overshoot) at the end.
**Why it moves.** change + character: several receipts, one claim, the recap of the evidence.

### Mount

Copy every manifest file into your project (plus `af-receipts-runtime`). Mount with a unique host id, `data-composition-id="af-receipts-source-stack-16x9"`,
`data-composition-src="compositions/af-receipts-source-stack-16x9.html"`, `data-duration` and `data-variable-values`.
Use the variant whose size matches your project (16x9, 9x16, 4x5, 1x1): each is laid out natively, never scaled.

### Content slots

Nested slots are JSON strings. Every slot is checked against `constraints.json` and measured against the layout before anything
draws; the block stops with a message naming the slot and the fix (it never truncates or shrinks text).

- `sources` (required): {"type":"array","minItems":2,"maxItems":3,"items":{"type":"object","properties":{"kind":{"type":"string","enum":["article","post"]},"outlet":{"type":"string","minLength":0,"maxLength":30},"title":{"type":"string","minLength":0,"maxLength":80},"name":{"type":"string","minLength":0,"maxLength":32},"handle":{"type":"string","minLength":0,"maxLength":24},"verified":{"type":"boolean"},"text":{"type":"string","minLength":10,"maxLength":220},"url":{"type":"string","minLength":0,"maxLength":60},"date":{"type":"string","minLength":0,"maxLength":24}},"required":["kind","text"]}}
- `chip`: {"type":"string","minLength":0,"maxLength":30}
- `cues`: when each source comes to the front (s); one per source, empty = automatic. {"type":"array","items":{"type":"number","minimum":0,"maximum":40},"maxItems":8}
- `pace`: spoken words per second (default 2.4); each underlined word draws in its own 1/pace slot. {"type":"number","minimum":1,"maximum":6}

- Mark one quote per source with `[[ ]]`.

Style: `colourway` (ember, ink, marker), `accent` (optional pen hex), `mark` (underline or highlight), `page` (paper, cream, night), `exit` (drop or cut), `duration` (seconds).

### Syncing to the narration

Give `cues` the second (from the scene start) at which the speaker starts each quote, and `pace` their speaking rate in
words per second; each quoted word then draws its stroke in its own 1/pace slot, so the line keeps time with the voice. Raise
`duration` (and the mount's `data-duration`) to fit long narration: every reveal must land by 60% of the scene, which leaves the rest
as a still, readable hold.

### Timing

17.5s by default. The window rises in the first 0.7 s, the reveals land by 60%, the lamp glow keeps breathing during the hold (text stays still), and with `exit: drop` the window sinks off the desk over the last 0.45 s.

### Example

```json
{
  "sources": "[{\"kind\":\"article\",\"outlet\":\"The Northline\",\"title\":\"Nine in ten firms keep the four-day week\",\"text\":\"Most companies in the pilot have chosen to [[keep the shorter week]].\",\"url\":\"northline.example/work\",\"date\":\"Mar 14\"},{\"kind\":\"post\",\"name\":\"Grace Whitfield\",\"handle\":\"gracewhitfield\",\"text\":\"Six months in, [[our sick days fell by a third]].\",\"url\":\"network.example/posts\",\"date\":\"Mar 11\"},{\"kind\":\"article\",\"outlet\":\"Ledgerline\",\"title\":\"Six months on\",\"text\":\"Across the group, [[revenue held steady]] through the winter.\",\"url\":\"ledgerline.example/analysis\",\"date\":\"Mar 16\"}]",
  "chip": "3 sources",
  "cues": "[]",
  "pace": 2.4
}
```

## FAQ

### What can my AI agent change in Source Stack?

Your agent fills the `sources`, `chip`, `cues` and `pace` slots through the block's data-variable-values (or the starter project's variables). Motion, timing, palette, fonts and the internal layout are protected, so the result keeps the Receipts look.

### Which aspect ratios does Source Stack support?

Source Stack is designed natively for 16:9, 9:16, 4:5 and 1:1. A typical beat lasts 17.5s.

### How do I get Source Stack?

Source Stack is included in the Receipts pack, which is part of the AgentFrames All-access subscription along with 49 other templates in this pack and every other pack on the store. You get the full source, the editing contracts and the agent instructions.

## More in Receipts

- [Correction Strike](https://agentframes.ai/elements/receipts/correction-strike.md): The original line struck through in red and dimmed, then the correction box rises under it and the pen underlines the corrected words.
- [Then / Now](https://agentframes.ai/elements/receipts/then-now.md): Two dated versions of a page side by side (stacked on the tall sizes): "then" lands first, "now" second, and each has its line underlined in turn.
- [Claim Check](https://agentframes.ai/elements/receipts/claim-check.md): Fact-check: the claim on a dark card, the source page beside it with the evidence underlined, then a verdict stamp (TRUE, FALSE, MISLEADING, MIXED) slams onto the claim.
- [Two Sources](https://agentframes.ai/elements/receipts/two-sources.md): Two outlets on the same story side by side (stacked on the tall sizes), each with a different line underlined in turn.

## Community

Coming soon.
