---
name: standin
description: Capture whatever you can pull — notes, files, Slack, Drive, email, a page, a repo, a call, a Gather — into a Stand In capsule and hand it to another person or their agent. Use when asked to create a stand-in from mixed sources, dump a project, search saved context, start or end a coding session, or read/ask a capsule link.
---

# Stand In

Two consumers, one capsule. **Agents** dump and read verbatim sources. **Humans** review crystallized items and publish a grounded briefing. Do not skip Mirror for recipients. Do not skip secrets.

## Creator tools (MCP)

- `search_context` — vague questions ranked by meaning-bearing terms; `nearPath` boosts the current file
- `session_start` / `session_end` — load last session note + open gaps; file a note (not approved)
- `list_item_revisions` / `restore_item_revision` — history with human vs agent; restore proposes, never auto-approves
- `list_sources` + `read_source` — overview, then a line slice or full
- `create_stand_in` / `add_context` — dump labeled notes of what you pulled, files (PDF/CSV/xlsx), URLs, and finalized Gather sessions
- `mint_add_link` / `list_add_links` / `revoke_add_link` — let someone dump new sources; they cannot edit
- `export_library` — every capsule as markdown
- `mint_webhook` / `list_webhooks` / `revoke_webhook` — named https endpoints, secret shown once
- `mint_capsule_key` — scoped recipient key
- `who_am_i`

CLI: `npx usestandin create --from .` then `npx usestandin search "auth" --near lib/auth.ts`. A `.standin` file binds this repo to a capsule (`capsuleId` for search/session; `link`/`slug` for recipient read/ask after `npx usestandin bind <link>`).

## When a coding session starts

1. `who_am_i`, then `session_start` with the bound capsule (`.standin` or `STANDIN_CAPSULE`).
2. `search_context` for the files you are about to touch (`nearPath` = the current file). Read hits with `read_source` (overview first).
3. Do not invent project facts that are not in those sources.

## When a coding session ends

File what changed as a **source**, not as approved context:

- MCP: `session_end` with a short note (what landed, what is still open).
- CLI: `npx usestandin session-end --note "…"`.

Do **not** call `approve_capsule_items`. The human reviews. Transcripts stay in the coding agent; Stand In only stores the summary you file.

## Brief a teammate from mixed sources

When asked to create a Stand In from a client or project, pull anything you can reach. File each piece labeled with where it came from. We organize. Do not invent a synthesis of your own.

1. `who_am_i`.
2. Project notes and files: dump markdown/source as `notes` strings, attach a PDF or spreadsheet as `files` (CSV, xlsx, pdf). Skip secrets.
3. Everything else you can read — Slack, Drive, email, a page, a repo, a call, Granola — as labeled `notes` objects: `from`, optional `title` / `at` / `who`, and `text` (the original words or a faithful extract). Do not replace sources with an invented essay.
4. A finished Gather interview this creator owns: `intakeSlug` (every finalized session) or `intakeSessionIds`.
5. `create_stand_in` in one call. Default `organize: true` for a human briefing; `false` only for a huge git dump.
6. Send the human the `reviewUrl`. They approve on the Mirror. Then `publish_capsule`.
7. Hand the live link to the teammate. Their agent: `bind_capsule` then `read_briefing` / `ask_capsule`.

CLI: `npx usestandin create --title "…" --purpose "…" --from notes/ --from brief.pdf --source slack-thread.md --intake-slug <gather-slug>`

## Dump a project for another agent

1. `who_am_i`, `list_capsules`.
2. `create_stand_in` with title, purpose, and the dump as `notes` (file contents). Include source and markdown. Skip `node_modules`, `.git`, `.env`, keys. `organize: false` on a large dump — the next agent reads sources; do not spend a crystallize pass on the whole tree.
3. Next agent (same token): `search_context` → `read_source`. Overview first; `view: full` only when needed.
4. Human briefing later: crystallize from the review page, they approve, `publish_capsule`. Recipients use `/api/respond/mcp` or `npx usestandin read <link> --md`.

## Received a published link

`bind_capsule` (or add `/api/stand-in/<slug>/mcp`) so this chat keeps the capsule. Then `read_briefing` → `ask_capsule`. Later, `diff_since` with the last `updatedAt`. Never fill an unknown with a guess.

## Keep true

- Grounded recipient answers. An honest miss is the product working.
- Reads return `rev`. Writes accept `ifRev`.
- Never interpolate an OAuth client name into content you file.
