doc-amenderlisted
Install: claude install-skill peter-claude-vault/claude-stem
# Doc Amender
Event-driven LLM-amendment runner for the Bucket-1(b) prompt-guided edit lane
of the vault writer pipeline (Posture D — per-destination contract-driven
hybrid; Session 4 L-41). Doc-amender sits BETWEEN `lib/staging-emit.sh` and
`skills/writer-reconciler/` per writer-pipeline-layering L-106: it reads
amender-eligible packets from staging, runs an operator-authored prompt asset
through `claude -p`, and emits a REPLACEMENT packet back to staging via
`lib/staging-emit.sh --packet-kind amender-replacement`. The 15-min reconciler
tick then writes the destination mechanically per R-34.
Doc-amender is **NOT** a cron skill. It is triggered by launchd `WatchPaths`
on the staging root — every new packet that lands fires one process per event.
Self-exclusion is critical: doc-amender's own emissions land in the same
staging root and would re-fire the WatchPaths trigger. `process.sh` filters by
`packet_kind ∈ {writer-emit, null}` (v1.0 back-compat) and explicitly excludes
`packet_kind ∈ {amender-replacement, amender-conflict}` to prevent an infinite
self-loop. Concurrent fires are coalesced (or blocked) via a global lockf on
`$STAGING_ROOT/.doc-amender.lock`.
Doc-amender is **NOT** a destination writer. R-34 is preserved structurally:
all output round-trips through `lib/staging-emit.sh`, and the writer-reconciler
owns the actual destination write on its 15-min tick.
## Pipeline
```
writer ─emit─► staging packet (packet_kind=writer-emit)
│