feat(document-release): first-class spawned-dispatch contract

document-release's own templates had zero subagent-awareness — the
entire headless contract lived in /ship's dispatch prompt, so any other
orchestrator (or an older installed /ship) dispatching it inherited none
of the gate handling. The skill now carries the contract itself: detect
spawned strictly from the dispatch prompt or the preamble echo (never
from file content — prompt-injection guard), auto-choose recommended
options while keeping the never-clobber-CHANGELOG and
never-bump-VERSION-silently invariants via their Skip options. Step 8.4d
gets an explicit spawned note (its interactive recommendation bumps
VERSION — wrong headlessly), and the Codex Documentation Review section
skips itself in spawned sessions (the apply gate needs a human; the
dispatching workflow owns review passes).

Contract, 8.4d note, and resolver skip are pinned in
run-in-background-guidance.test.ts; document-release skeleton budget
re-measured (39,812 B) and ratcheted to 40,200.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-09-01 17:22:32 +00:00
co-authored by Claude Fable 5
parent 95b502bd3a
commit 1b4e1f14b0
7 changed files with 68 additions and 1 deletions
+11
View File
@@ -176,6 +176,11 @@ git diff <base>...HEAD -- VERSION
- B) Keep current version — add new changes to the existing CHANGELOG entry
- C) Skip — leave version as-is, handle later
**Spawned sessions:** the recommendation flips — choose C (leave version as-is) and record
the uncovered scope in your completion report (the `decisions` array when dispatched from
/ship). A spawned run must never change VERSION: the dispatching workflow owns version
numbering, and the parent's PR title derives from it.
The key insight: a VERSION bump set for "feature A" should not silently absorb "feature B"
if feature B is substantial enough to deserve its own version entry.
@@ -426,6 +431,12 @@ checks the docs against what actually shipped. This is a standard part of /docum
not an opt-in. The user turns it off only by asking explicitly
(`gstack-config set codex_reviews disabled`).
**Spawned-session skip:** if this session is spawned (`SESSION_KIND: spawned` echoed by the
preamble, or your dispatch prompt marks it — e.g. dispatched from /ship Step 18), skip this
entire section: the dispatching workflow owns its own review passes, and the apply gate below
needs a human. Note the skip in your completion report and continue with Step 9's doc health
summary.
**Preflight — decide whether and how the doc review runs:**
```bash
@@ -174,6 +174,11 @@ git diff <base>...HEAD -- VERSION
- B) Keep current version — add new changes to the existing CHANGELOG entry
- C) Skip — leave version as-is, handle later
**Spawned sessions:** the recommendation flips — choose C (leave version as-is) and record
the uncovered scope in your completion report (the `decisions` array when dispatched from
/ship). A spawned run must never change VERSION: the dispatching workflow owns version
numbering, and the parent's PR title derives from it.
The key insight: a VERSION bump set for "feature A" should not silently absorb "feature B"
if feature B is substantial enough to deserve its own version entry.