docs: surface sandcastle image-build step (one-time setup)

Closes the gap the user hit running `pnpm work decompose --execute`:
sandcastle errored with `Image 'sandcastle:template-vertical' not
found locally. Build it first with 'sandcastle docker build-image'`,
but neither the README nor the runbook documented this step.

README.md: new "Sandcastle setup (one-time)" section after Quick
reference. Three commands (docker info, build-image, auth) — the
minimum needed to make dispatch work. Links to the runbook for the
full lifecycle.

docs/guides/runbook.md: Prerequisites in "Using Sandcastle" grow
from 4 to 5 items. New step 2 walks through `sandcastle docker
build-image`, quotes the exact "Image not found locally" error so
agents searching for the string land on the fix, and shows the
remove-image + rebuild flow for Dockerfile edits.

.sandcastle/README.md: new "Build the sandbox image (one-time)"
section parallel to the env section, cross-linking to the runbook.

scripts/work/decompose.mjs + scripts/work/dispatch.mjs: when the
sandcastle error message matches the "Image '.+' not found locally"
pattern, the dispatcher now prints the build-image command inline
above the generic "See runbook" line. The error stack itself remains
unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-13 17:51:30 +02:00
parent 014578c9a8
commit cd0a332443
4 changed files with 81 additions and 3 deletions

View File

@@ -30,6 +30,26 @@ than starting from scratch.
Configure runtime tokens via `.env` (gitignored). Copy `.env.example`
and fill values for the providers you use.
## Build the sandbox image (one-time)
Sandcastle dispatches into a Docker image tagged `sandcastle:<root-package-name>`.
Build it once per clone before `pnpm work dispatch --execute` or
`pnpm work decompose <id> --execute` will work:
```bash
pnpm exec sandcastle docker build-image
# Tags: sandcastle:template-vertical
```
Rebuild after editing this `Dockerfile`:
```bash
pnpm exec sandcastle docker remove-image
pnpm exec sandcastle docker build-image
```
See [`docs/guides/runbook.md` → Using Sandcastle → Prerequisites](../docs/guides/runbook.md#using-sandcastle-for-agent-dispatch) for the full setup.
## Manual usage
Until the orchestrator ships, these templates are usable manually: copy