refresh · git:20260702.53fb444 · 2026-07-02 · sha256 ce9a934e58a553a3

refresh git:20260702.53fb444A

Immutable. This exact content never changes and is served at /api/v1/blob/ce9a934e58a553a3.

---
name: refresh
description: Maintain the repo's knowledge — `index` rebuilds the ticket catalog (INDEX.md), `context` rebuilds the domain knowledge pack (documentation/). Day-to-day, hooks keep these fresh automatically.
argument-hint: index [--all | TICKET-ID ...] | context [--refresh] [schema-or-scope] | all
allowed-tools: [Read, Write, Bash, Glob, Grep]
---

# /refresh

One maintenance skill for the two knowledge stores the other skills read:

- **`/refresh index`** — the ticket catalog: `tickets/INDEX.md` (every ticket, status, one-line
  summary, tags, cross-refs) + `tickets/OBJECTS.md` (object → tickets reverse map). This is what
  `/ticket`'s recall mines. Details: [index.md](index.md).
- **`/refresh context`** — the domain knowledge pack in `documentation/`: data catalog, DDL, ERD,
  dependency graph, business glossary. This is what `/ticket`'s domain + warehouse priming reads.
  Details: [context-pack.md](context-pack.md).
- **`/refresh all`** — both.

## You rarely need this
Day-to-day the index maintains itself: the PostToolUse hook re-renders `INDEX.md` on every ticket
folder change, the SessionStart hook surfaces the catalog, and `/ship` curates each ticket's
summary at close. Invoke `/refresh` to:
- **bootstrap** an existing backlog (`/refresh index --all` — render every ticket, then enrich);
- **re-enrich** a batch after bulk edits (`/refresh index ID1 ID2 …`);
- **build or update the knowledge pack** (`/refresh context`, scoped to a schema if given;
  `--refresh` updates in place — overwrite, don't sprawl).

## Mode: `index`
Follow [index.md](index.md): render deterministically (`bin/build_ticket_index.py` — stdlib, no
model), enrich the un-enriched/stale set (the model writes one curated record per ticket, ingested
via `bin/ingest_index_records.py`), re-render, then verify with `--check` and commit all three
index files together (`INDEX.md`, `OBJECTS.md`, `index_data.json`).

## Mode: `context`
Follow [context-pack.md](context-pack.md): verify the warehouse seam, introspect via the adapter
(inventory → DDL → dependencies → usage ranking), generate `data_catalog.md` / `erd.md` /
`glossary.md` into `documentation/` with freshness stamps, and update
`documentation/AI_LAYER_INDEX.md`. Don't invent business meaning — flag glossary gaps for a human
(`reduce_assumptions`).