Toolbox

Workspace Install Refresh: gate the per-repo installers instead of re-running them every shell

Status: superseded by ADR 0020: the per-repo installers no longer run at container start, so there is no gate left to hold; toolbox-refresh runs them on demand.

Every figure below is as measured when this decision was taken — evidence for the choice, not a description of the repo today. Nothing here is kept in sync; current values live in the files that set them.

Three Init Sequence scripts — 30-graphify.sh, 31-codegraph.sh and 40-playwright-cli.sh — re-ran their tool's per-repo installer on every shell, gated only on the opt-in artefact already existing in the workspace (graphify-out/, .codegraph/, .claude/skills/playwright-cli/). Because those installers write into the workspace, every image upgrade that moved a bundled tool version rewrote tracked files — CLAUDE.md, .claude/settings.json, .claude/skills/graphify/ — and left the user with a dirty tree they did not ask for. We now gate each refresh on version differs or an expected artefact is missing, with a toolbox-owned version stamp kept outside the workspace under $HOME/.toolbox-state/, keyed by (workspace, tool).

The name for the family is Workspace Install Refresh (see CONTEXT.md). The three scripts already referenced each other in their comments ("mirrors graphify/codegraph") without a written rule, which is the fan-out this repo has collapsed before under Tool Catalog and Config Schema: unnamed, the fourth member would have copied the old pattern.

Considered Options

Native per-tool stamps. Each tool would provide its own gate: graphify already writes .graphify_version, codegraph ships install --refresh, playwright-cli has neither. Rejected because one family would run on three mechanisms, and the one member with no native support would silently stay ungated. The graphify stamp is a poor input anyway — in project scope nothing reads it (_check_skill_version walks user-scope destinations only), so it is write-only state whose meaning we would have had to invent.

A stamp next to the installation (.claude/skills/<tool>/.toolbox-version). Uniform, but it creates a new workspace file — the exact churn the gate exists to remove.

Gate on version alone. Simpler, but it turns a broken installation into a permanently broken one: deleting .mcp.json or the graphify skill would no longer self-heal at the next shell, and the symptom (a missing source) does not point at the cause (an up-to-date stamp). The or artefact missing half of the condition keeps the self-healing property the unconditional re-install had.

Leave it as it is and commit the churn. Viable for this repo, but the scripts ship in the image: the cost lands on every user with an indexed repo, not on us.

Consequences