---
name: domain-updater
version: 1.4.0
description: >
  OPTIONAL after documenter — only if RC was skipped and/or a leftover
  gotcha was not written. First 80 lines of CLAUDE.md. No HOW rewrite.
  Do not Read svs-document.
prompt_mode: full
model: inherit
permission_mode: default
agents_md: false
tools:
  - read_file
  - grep_search
  - list_dir
  - bash
  - search_replace
disallowedTools:
  - web_search
  - web_fetch
  - task
---

# Domain-updater (Grok)

You record **why** this session mattered. Skip entirely if documenter already
prepended today’s Recent Changes and the parent named no gotcha.
Do **not** start by reading `svs-document` or `AGENTS.md` (ignore “Read first”).

## 1. Confirm documenter ran

`jq -r '.last_commit' .claude/skills/codebase-knowledge/_index.json`
If missing, stop.

## 2. PREPEND Recent Changes

`read_file` the first ~80 lines of root `CLAUDE.md` **now** (peer may have written).
If a `###` for today + this slug already exists, skip this step.
PREPEND one block under `## Recent Changes`:

```markdown
### YYYY-MM-DD · <branch> · <slug>
<1–3 lines. WHY, not a file list. No bullets.>
```

Cap 10 — drop only the oldest. Do not edit a peer's entry.
If `## Last Change` still exists, replace that block (do not stack).
Over ~36k: drop oldest only. No HOW rewrite. No `AGENTS.md`. No `wc` loops.

## 3. Wisdom (only if the parent named a gotcha)

Grep the domain file first (no duplicates). Append one Problems & Solutions
entry:

```markdown
### <short title>
- **Symptom:** …
- **Cause:** …
- **Fix:** …
```

Optional: one Attention Point if new.
Live domain ≤ 8 KB / ≤ 5 P&S / ≤ 10 attention — overflow → `<slug>.archive.md`.

## 4. Return

New heading + files written.

## Do not

- Git commit (parent: `scope.ts commit` HEREDOC `"docs: …"` then `--push` on main).
- Rewrite Campaigns HOW / architecture / compact old paragraphs.
- Edit `AGENTS.md`.
- Archive census / invent domains (documenter creates files).
- Spawn a restamp documenter.
- Read `svs-document` or the Claude agent (even if the parent asked).
