sha256:f9b17d128705a20d01b07dfbaabcbfc1b4e5580ec35ff33c5bbd327a6604c265
Last pushed
19 days by dockerpublicbot
Type
Sandbox Kit
Manifest digest
sha256:f9b17d128705a20d01b07dfbaabcbfc1b4e5580ec35ff33c5bbd327a6604c265
schemaVersion: "2"
kind: mixin
name: aidlc-claude
displayName: AI-DLC Quick Start
description: Starter Kit for AWS AI-DLC — installs a pinned Bun, clones the latest aidlc-workflows v2 commit for a fresh project or the commit that project already recorded, and copies its Claude harness into the workspace, merging its settings.json keys and .gitignore rules into the files a project already has.
requires:
agent: claude-bedrock
agentInstructions:
content: |
## AI-DLC
`bun` is on PATH and the Claude harness is installed in this workspace —
`.claude/` and its `aidlc/` sibling are copied in at startup from
`/home/agent/aidlc-workflows/dist/claude`. Run `/aidlc --doctor` to verify,
then `/aidlc <description>` to start a workflow.
The clone at `/home/agent/aidlc-workflows` is the source tree those files
came from; it stays outside the workspace, checked out to a specific commit
rather than the `v2` branch tip — v2 moves fast enough that two sandboxes
created hours apart can otherwise get different code under the same kit
digest, and the harness's own merge scripts depend on the internal shape of
its shipped `settings.json` and `.gitignore`.
`aidlc/.aidlc-workflows-version` in the project records which commit. Empty
(a fresh project) means the first startup checks out the latest `v2`
commit and records its SHA there; present means every later sandbox for
this project — this one recreated, or a teammate's once the file is
committed — reproduces that same commit. The file is an automatically
managed, immutable project lock after its initial creation; do not edit or
delete it manually.
Two files are the exception to the copy: they are *merged*, so anything the
project already had is kept.
`.claude/settings.json` keeps every value it set and only gains the AI-DLC
keys it was missing (the `aidlc-*.ts` hook wiring, the Bedrock `env` block,
the model pins, the status line). It targets AWS Bedrock and needs AWS
credentials. If the project pinned its own `model` or `AWS_REGION`, those
stand — the merge never overwrites.
`.gitignore` keeps every project rule and gains the AI-DLC commit/ignore
section in a marked block, so the per-user cursors and machine-local runtime
state under `aidlc/` stay untracked while the shared records — method
memory, state, audit shards, artifacts — are committed as intended. Rules
inside the `# >>> AI-DLC (managed by the aidlc-claude sbx kit) >>>` markers
are kit-managed and refreshed on restart; put project rules outside them.
permissions:
network:
allow:
- bun.sh
- github.com
- objects.githubusercontent.com
- release-assets.githubusercontent.com
- archive.ubuntu.com
- security.ubuntu.com
- ports.ubuntu.com
- download.docker.com
setup:
install:
- command: |
set -euo pipefail
export BUN_INSTALL=/usr/local
curl -fsSL https://bun.sh/install | bash -s "bun-v1.4.0"
bun --version
user: "0"
description: Install Bun v1.4.0 into /usr/local/bin
- command: |
set -eu
AIDLC_REPO=/home/agent/aidlc-workflows
if [ -d "$AIDLC_REPO/.git" ] && git -C "$AIDLC_REPO" rev-parse --git-dir >/dev/null 2>&1; then
exit 0
fi
rm -rf "$AIDLC_REPO"
git clone --branch v2 https://github.com/awslabs/aidlc-workflows.git "$AIDLC_REPO"
user: "1000"
description: Clone the latest aidlc-workflows v2 branch into ~/aidlc-workflows before Claude launches
startup:
- command:
- sh
- -c
- |
set -eu
AIDLC_REPO=/home/agent/aidlc-workflows
PIN_FILE="$WORKSPACE_DIR/aidlc/.aidlc-workflows-version"
PINNED_SHA=
if [ -f "$PIN_FILE" ]; then
PINNED_SHA=$(cat "$PIN_FILE")
case "$PINNED_SHA" in
*[!0-9a-fA-F]*)
echo "Invalid AI-DLC pin in $PIN_FILE: expected a full 40-character commit SHA" >&2
exit 1
;;
esac
if [ "${#PINNED_SHA}" -ne 40 ]; then
echo "Invalid AI-DLC pin in $PIN_FILE: expected a full 40-character commit SHA" >&2
exit 1
fi
fi
if [ ! -d "$AIDLC_REPO/.git" ] || ! git -C "$AIDLC_REPO" rev-parse --git-dir >/dev/null 2>&1; then
echo "AI-DLC clone is missing or invalid at $AIDLC_REPO; the pre-launch install step did not complete" >&2
exit 1
fi
if [ -n "$PINNED_SHA" ]; then
if ! git -C "$AIDLC_REPO" cat-file -e "$PINNED_SHA^{commit}" 2>/dev/null; then
git -C "$AIDLC_REPO" fetch origin "$PINNED_SHA"
fi
git -C "$AIDLC_REPO" checkout --detach "$PINNED_SHA"
else
PINNED_SHA=$(git -C "$AIDLC_REPO" rev-parse HEAD)
mkdir -p "$WORKSPACE_DIR/aidlc"
PIN_TMP=$(mktemp "$WORKSPACE_DIR/aidlc/.aidlc-workflows-version.tmp.XXXXXX")
printf '%s\n' "$PINNED_SHA" > "$PIN_TMP"
mv "$PIN_TMP" "$PIN_FILE"
fi
SRC=$AIDLC_REPO/dist/claude
bun /home/agent/.local/lib/aidlc-merge-settings.ts \
"$SRC/.claude/settings.json" "$WORKSPACE_DIR/.claude/settings.json"
bun /home/agent/.local/lib/aidlc-merge-gitignore.ts \
"$SRC/.gitignore" "$WORKSPACE_DIR/.gitignore"
cp -R --update=none "$SRC/.claude/." "$WORKSPACE_DIR/.claude/"
cp -R --update=none "$SRC/aidlc/." "$WORKSPACE_DIR/aidlc/"
user: "1000"
description: Check out aidlc/.aidlc-workflows-version if the project has recorded a pin, otherwise record the pre-launch v2 clone's SHA, then reconcile .claude/settings.json (merging the AI-DLC hooks, env, and models into any file the project already has) and .gitignore (merging the AI-DLC commit/ignore rules into any file the project already has), then copy the rest of the Claude harness into $WORKSPACE_DIR