sandbox - writing pre-work for clarify items
Clarify items often hang on a knowledge gap that is NOT a product decision: a missing
measurement, a mockup, or a proof that something is feasible. The plan / clarify role
(role-plan) must not touch production code and must not commit. The sandbox gives it a place
to do writing pre-work OFF to the side - no production code, no git, no interference with the
task / build agent - so the clarify question can be answered with evidence instead of guesswork.
Two folders
.credo/sandbox-tmp/ = UNVERSIONED work in progress. One folder per item:
.credo/sandbox-tmp/<id>-<slug>/ with a README.md. This is where pre-work is built.
.credo/sandbox/ = the PROMOTION TARGET for accepted, version-worthy artifacts. It follows
the credo folder-versioning policy: in an untracked repo it stays local; in a version-tracked
repo (CREDO_VERSION_TRACKED=1) it IS versioned.
docs/ is NOT the promotion target. Extracting a promoted artifact into docs/ is a
SEPARATE step the user prompts for explicitly; it never happens automatically.
exclude behavior (owned by credo-init)
The git-exclude is managed by credo-init in a single managed block in .git/info/exclude
(see the credo-init policy). Do not write that block from anywhere else.
- Default (untracked,
CREDO_VERSION_TRACKED unset): all of .credo/** is excluded, so both
sandbox-tmp/ and sandbox/ stay local. Nothing extra is needed.
- Tracked (
CREDO_VERSION_TRACKED=1): .credo/** is versioned EXCEPT the entries credo-init
lists, which include .credo/sandbox-tmp/. So WIP stays local even in a tracked repo, while
the promoted sandbox/ is versioned.
The helper scripts/credo-sandbox-init.sh never writes the managed block; it only WARNS when
sandbox-tmp is not effectively git-excluded and points at /credo:setup to refresh it.
Reference search order
When resolving a sandbox reference for an item, ALWAYS look in this order:
.credo/sandbox/<name>/ (promoted, accepted artifact) - use this if present.
.credo/sandbox-tmp/<name>/ (WIP) - fall back to this.
The promoted copy wins because promotion is the signal that the artifact was accepted.
INDEX per folder
Each folder carries its own INDEX, kept separate (do not merge them):
sandbox-tmp/INDEX.md = the WIP map.
sandbox/INDEX.md = the promoted map.
The same principle holds for any other collection file that lives outside a single item folder:
keep one per folder, never a shared one spanning both. An INDEX entry records, per item:
the item -> its deliverables -> the key finding -> which clarify question it unblocks. It also
lists the NO items (clarify items with no pre-work) with the reason (a pure product decision has
nothing to measure).
Item pointer
Every clarify item that has pre-work gets a ## Sandbox pre-work section in the item file. It
records the sandbox path plus the search order above, so anyone reading the item finds the
evidence. (The item file is credo item content and follows the item language; the section header
is that fixed pointer name.)
Lifecycle
- Triage all
1_clarify items into JA (has a buildable deliverable) / NEIN (nothing to
measure), naming the concrete deliverable for each JA item. This triage is delegatable to a
subagent. A NEIN item is justified explicitly (a pure product decision - answer it by asking
the user, do not build anything).
- Build each JA item in
.credo/sandbox-tmp/<id>-<slug>/ via the helper
scripts/credo-sandbox-init.sh <id>-<slug> (it creates the folder, a README template, and
the WIP INDEX). One subagent per folder, parallelizable on disjoint folders (credo
orchestration).
- Record the
sandbox-tmp/INDEX.md entry and the item's ## Sandbox pre-work pointer.
- Clarify with the user. When an artifact is accepted and version-worthy, promote it via
/credo:sandbox-promote <slug> (Ask + move + fix up references).
- Extract to docs/ only when the user explicitly prompts for it - a separate manual step.
- Resolve references always in the search order above (promoted first, WIP fallback).
Guardrails (hard)
- Write ONLY under
.credo/sandbox-tmp/ (and, at promotion, .credo/sandbox/). NEVER production
code, NEVER git, NEVER an install. Use only devDeps that already exist; if a tool is missing,
hand-roll it install-free or flag it as a recommendation - do not install anything.
- Do not disturb the task / build agent:
sandbox-tmp is git-excluded, so it never lands in that
agent's git add.
- Node / tooling version: before running any node / npm / pnpm / yarn tooling, activate the
repo's Node version - see the credo
orchestration skill's Node-version precheck. Do not
duplicate that rule here; just follow it.
- Honesty: label every measurement with what it does NOT measure, so a partial proof is never
read as a full one.
Role and mode
- This fits the plan / clarify role (
role-plan): the clarify owner does the pre-work but does
NOT commit. It is also valuable in autonomous / AFK runs, which are read-heavy - the sandbox
lets such a run do isolated writing pre-work without touching production code.
- The promotion commit is made by the task / build role (
role-task), never by the plan agent -
a single index owner avoids the .git/index.lock race (credo orchestration).
1---2name: sandbox3description: Do WRITING pre-work for a clarify item that is blocked by a knowledge gap - a missing measurement, a mockup, or a feasibility proof - WITHOUT touching production code, without git, and without disturbing the task / build agent. Use when a 1_clarify item cannot be answered by a product decision alone but needs something built or measured first; when working in the plan / clarify role and a clarify question needs evidence; and for isolated read-and-write pre-work in autonomous / AFK runs. Triggers on clarify pre-work such as "measure this before we decide", "build a quick mockup to clarify", "prove this is feasible", "sandbox this", "Messung / Mockup / Machbarkeit vor der Klaerung", "bau eine Sandbox dafuer". Do NOT use for a pure product decision (nothing to measure - that is answered by asking the user), and never for production code or commits.4---56# sandbox - writing pre-work for clarify items78Clarify items often hang on a knowledge gap that is NOT a product decision: a missing9measurement, a mockup, or a proof that something is feasible. The plan / clarify role10(`role-plan`) must not touch production code and must not commit. The sandbox gives it a place11to do writing pre-work OFF to the side - no production code, no git, no interference with the12task / build agent - so the clarify question can be answered with evidence instead of guesswork.1314## Two folders1516- `.credo/sandbox-tmp/` = UNVERSIONED work in progress. One folder per item:17 `.credo/sandbox-tmp/<id>-<slug>/` with a `README.md`. This is where pre-work is built.18- `.credo/sandbox/` = the PROMOTION TARGET for accepted, version-worthy artifacts. It follows19 the credo folder-versioning policy: in an untracked repo it stays local; in a version-tracked20 repo (`CREDO_VERSION_TRACKED=1`) it IS versioned.21- `docs/` is NOT the promotion target. Extracting a promoted artifact into `docs/` is a22 SEPARATE step the user prompts for explicitly; it never happens automatically.2324### exclude behavior (owned by credo-init)2526The git-exclude is managed by `credo-init` in a single managed block in `.git/info/exclude`27(see the credo-init policy). Do not write that block from anywhere else.2829- Default (untracked, `CREDO_VERSION_TRACKED` unset): all of `.credo/**` is excluded, so both30 `sandbox-tmp/` and `sandbox/` stay local. Nothing extra is needed.31- Tracked (`CREDO_VERSION_TRACKED=1`): `.credo/**` is versioned EXCEPT the entries credo-init32 lists, which include `.credo/sandbox-tmp/`. So WIP stays local even in a tracked repo, while33 the promoted `sandbox/` is versioned.3435The helper `scripts/credo-sandbox-init.sh` never writes the managed block; it only WARNS when36`sandbox-tmp` is not effectively git-excluded and points at `/credo:setup` to refresh it.3738## Reference search order3940When resolving a sandbox reference for an item, ALWAYS look in this order:41421. `.credo/sandbox/<name>/` (promoted, accepted artifact) - use this if present.432. `.credo/sandbox-tmp/<name>/` (WIP) - fall back to this.4445The promoted copy wins because promotion is the signal that the artifact was accepted.4647## INDEX per folder4849Each folder carries its own INDEX, kept separate (do not merge them):5051- `sandbox-tmp/INDEX.md` = the WIP map.52- `sandbox/INDEX.md` = the promoted map.5354The same principle holds for any other collection file that lives outside a single item folder:55keep one per folder, never a shared one spanning both. An INDEX entry records, per item:56the item -> its deliverables -> the key finding -> which clarify question it unblocks. It also57lists the NO items (clarify items with no pre-work) with the reason (a pure product decision has58nothing to measure).5960## Item pointer6162Every clarify item that has pre-work gets a `## Sandbox pre-work` section in the item file. It63records the sandbox path plus the search order above, so anyone reading the item finds the64evidence. (The item file is credo item content and follows the item language; the section header65is that fixed pointer name.)6667## Lifecycle68691. **Triage** all `1_clarify` items into JA (has a buildable deliverable) / NEIN (nothing to70 measure), naming the concrete deliverable for each JA item. This triage is delegatable to a71 subagent. A NEIN item is justified explicitly (a pure product decision - answer it by asking72 the user, do not build anything).732. **Build** each JA item in `.credo/sandbox-tmp/<id>-<slug>/` via the helper74 `scripts/credo-sandbox-init.sh <id>-<slug>` (it creates the folder, a README template, and75 the WIP INDEX). One subagent per folder, parallelizable on disjoint folders (credo76 `orchestration`).773. **Record** the `sandbox-tmp/INDEX.md` entry and the item's `## Sandbox pre-work` pointer.784. **Clarify** with the user. When an artifact is accepted and version-worthy, promote it via79 `/credo:sandbox-promote <slug>` (Ask + move + fix up references).805. **Extract to docs/** only when the user explicitly prompts for it - a separate manual step.816. **Resolve references** always in the search order above (promoted first, WIP fallback).8283## Guardrails (hard)8485- Write ONLY under `.credo/sandbox-tmp/` (and, at promotion, `.credo/sandbox/`). NEVER production86 code, NEVER git, NEVER an install. Use only devDeps that already exist; if a tool is missing,87 hand-roll it install-free or flag it as a recommendation - do not install anything.88- Do not disturb the task / build agent: `sandbox-tmp` is git-excluded, so it never lands in that89 agent's `git add`.90- Node / tooling version: before running any node / npm / pnpm / yarn tooling, activate the91 repo's Node version - see the credo `orchestration` skill's Node-version precheck. Do not92 duplicate that rule here; just follow it.93- Honesty: label every measurement with what it does NOT measure, so a partial proof is never94 read as a full one.9596## Role and mode9798- This fits the plan / clarify role (`role-plan`): the clarify owner does the pre-work but does99 NOT commit. It is also valuable in autonomous / AFK runs, which are read-heavy - the sandbox100 lets such a run do isolated writing pre-work without touching production code.101- The promotion commit is made by the task / build role (`role-task`), never by the plan agent -102 a single index owner avoids the `.git/index.lock` race (credo `orchestration`).