DeepWorkPlan — Devcontainer Addon
Add a reproducible, isolated dev container to the target repo so any human or
AI agent gets the same environment, with AI-CLI auth that survives rebuilds.
This is the methodology's first opt-in addon — it is never required for a
repo to be AI-first.
The rule that overrides everything: REASON about the repo, then generate
~85% of every Dailybot devcontainer is identical — that common skeleton is
the stable part you carry forward. ~15% is repo-specific — base image, user,
workspaceFolder, supporting services, ports, secrets — and that part you
reason out from the target repo's actual stack, never by copying one
reference repo. The one near-verbatim exception is the AI-CLI persistence
entrypoint (templates/entrypoint.md): it is stable enough to copy with only
the home-path / user adjusted.
Read these first (all relative inside the skill)
SPEC.md — the normative (RFC-2119) contract: common skeleton,
per-repo reasoning checklist, project-identity precedence, validation rule,
public-OSS variant.
templates/presets.md — the 7 reasoning presets
(node-web, node-service, node-lambda, python-service, python-cli-oss,
static-site, orchestrator-hub). Match one as a starting checklist, then
verify every assumption against the real repo — detected reality wins.
- The other
templates/*.md — reasoning guides for each file you generate.
../README.md — the addon mechanism (opt-in, reconcile-don't-clobber, contract).
When this runs
- From
onboard Phase 7b — after the core AI-first scaffolding, onboard
offers this addon; if accepted it reads this SKILL and runs the flow below.
- Directly —
/deepworkplan-addon-devcontainer on an already-onboarded repo
to add or reconcile a devcontainer.
The flow
Step 0 — Consent + reconcile check
- Confirm the developer wants a devcontainer (skip silently if declined — the
repo stays baseline-conformant).
- Detect existing setup. Look for
.devcontainer/, docker/,
docker-compose.{yml,yaml}, a Dockerfile. If any exist, you are in
reconcile mode: you MUST preserve working values and MUST NOT overwrite or
delete files without explicit approval (see SPEC §Reconcile).
Step 1 — Reason about the stack (reuse onboard's RECON)
If onboard already produced .dwp/onboard/RECON.md, read it. Otherwise detect:
language/runtime, package manager (from the lockfile that exists), build/test/
lint/typecheck commands, supporting services implied by the app's dependencies
(DB / cache / queue / emulators), exposed ports, and whether the repo is
public (OSS) or private. Pick the matching preset from
templates/presets.md as a checklist.
Step 2 — Decide the reasoned ~15% (SPEC §3 checklist)
- Base image + user +
workspaceFolder from the language (Node vs Python; a
node vs created dev-user; /app vs /workspace vs /code/js).
- Supporting services from real dependencies — only those the app actually
uses (postgres / pgvector / redis / mailpit / dynamodb / localstack / chromium).
- Ports, secrets handling (public vs private), multi-stage build need,
locales, extra CLIs (AWS, Lighthouse/chromium).
Step 3 — Generate / reconcile the files
Using the templates, produce or reconcile:
.devcontainer/devcontainer.json, docker/local/docker-compose.{yaml,yml},
docker/local/{service}/Dockerfile, docker/local/{service}/entrypoint.sh
(the near-verbatim AI-CLI persistence piece), docker/custom_commands.sh, and —
for public repos — .dockerignore + a secret-free .env.example. Always:
keep the common skeleton (AI-CLI persistence volumes, dailybot-project-network,
DOCKER_DEV_ENV=vscode→sleep infinity, codecheck/check/fix/test).
Step 4 — Project identity
Set identity by the precedence in SPEC §4
(.dailybot/profile.json → DAILYBOT_PROJECT_NAME → devcontainer.json name).
Do not invent a new name if one already resolves.
Step 5 — Validate (SPEC §6)
Run the validation checklist. Report what was created/reconciled, the chosen
base image + services + ports, identity source, and any deferred items. If a
container build/smoke test cannot run here, say why (don't silently skip).
Failure-mode guardrails
- Never required, never blocking. If the developer declines, stop cleanly.
- No clobber. Existing devcontainer/docker files are reconciled or
backed-up-and-asked, never silently overwritten.
- No phantom services. Only add a service the app actually depends on.
- No secrets in images or in
.env.example — especially for public repos.
- Reason wins over preset. If the preset and the real repo disagree,
re-derive from the repo.
1---2name: deepworkplan-addon-devcontainer3description: Optional DeepWorkPlan addon that adds (or reconciles) a compose-based devcontainer to a repo — base image and supporting services reasoned from the detected stack, with persistent AI-CLI auth, the dailybot-project-network, the DOCKER_DEV_ENV=vscode convention, and project-identity precedence. Opt-in, never required, reconciles existing setups instead of clobbering them. Use when the developer wants a reproducible isolated dev container for an AI-first repo.4---56# DeepWorkPlan — Devcontainer Addon78Add a **reproducible, isolated dev container** to the target repo so any human or9AI agent gets the same environment, with **AI-CLI auth that survives rebuilds**.10This is the methodology's **first opt-in addon** — it is **never** required for a11repo to be AI-first.1213> ## The rule that overrides everything: REASON about the repo, then generate14>15> ~85% of every Dailybot devcontainer is identical — that **common skeleton** is16> the stable part you carry forward. ~15% is repo-specific — base image, user,17> `workspaceFolder`, supporting services, ports, secrets — and that part you18> **reason out from the target repo's actual stack**, never by copying one19> reference repo. The one near-verbatim exception is the **AI-CLI persistence20> entrypoint** (`templates/entrypoint.md`): it is stable enough to copy with only21> the home-path / user adjusted.2223## Read these first (all relative inside the skill)2425- [`SPEC.md`](SPEC.md) — the normative (RFC-2119) contract: common skeleton,26 per-repo reasoning checklist, project-identity precedence, validation rule,27 public-OSS variant.28- [`templates/presets.md`](templates/presets.md) — the **7 reasoning presets**29 (node-web, node-service, node-lambda, python-service, python-cli-oss,30 static-site, orchestrator-hub). Match one as a *starting checklist*, then31 verify every assumption against the real repo — **detected reality wins**.32- The other `templates/*.md` — reasoning guides for each file you generate.33- `../README.md` — the addon mechanism (opt-in, reconcile-don't-clobber, contract).3435## When this runs3637- From **`onboard` Phase 7b** — after the core AI-first scaffolding, `onboard`38 offers this addon; if accepted it reads this SKILL and runs the flow below.39- **Directly** — `/deepworkplan-addon-devcontainer` on an already-onboarded repo40 to add or reconcile a devcontainer.4142## The flow4344### Step 0 — Consent + reconcile check451. Confirm the developer wants a devcontainer (skip silently if declined — the46 repo stays baseline-conformant).472. **Detect existing setup.** Look for `.devcontainer/`, `docker/`,48 `docker-compose.{yml,yaml}`, a `Dockerfile`. If any exist, you are in49 **reconcile mode**: you MUST preserve working values and MUST NOT overwrite or50 delete files without explicit approval (see SPEC §Reconcile).5152### Step 1 — Reason about the stack (reuse onboard's RECON)53If `onboard` already produced `.dwp/onboard/RECON.md`, read it. Otherwise detect:54language/runtime, package manager (from the lockfile that exists), build/test/55lint/typecheck commands, supporting services implied by the app's dependencies56(DB / cache / queue / emulators), exposed ports, and whether the repo is57**public** (OSS) or private. Pick the matching **preset** from58`templates/presets.md` as a checklist.5960### Step 2 — Decide the reasoned ~15% (SPEC §3 checklist)61- **Base image + user + `workspaceFolder`** from the language (Node vs Python; a62 `node` vs created `dev-user`; `/app` vs `/workspace` vs `/code/js`).63- **Supporting services** from real dependencies — only those the app actually64 uses (postgres / pgvector / redis / mailpit / dynamodb / localstack / chromium).65- **Ports**, **secrets handling** (public vs private), **multi-stage** build need,66 locales, extra CLIs (AWS, Lighthouse/chromium).6768### Step 3 — Generate / reconcile the files69Using the templates, produce or reconcile:70`.devcontainer/devcontainer.json`, `docker/local/docker-compose.{yaml,yml}`,71`docker/local/{service}/Dockerfile`, `docker/local/{service}/entrypoint.sh`72(the near-verbatim AI-CLI persistence piece), `docker/custom_commands.sh`, and —73**for public repos** — `.dockerignore` + a secret-free `.env.example`. Always:74keep the **common skeleton** (AI-CLI persistence volumes, `dailybot-project-network`,75`DOCKER_DEV_ENV=vscode`→`sleep infinity`, `codecheck`/`check`/`fix`/`test`).7677### Step 4 — Project identity78Set identity by the precedence in SPEC §479(`.dailybot/profile.json` → `DAILYBOT_PROJECT_NAME` → `devcontainer.json name`).80Do not invent a new name if one already resolves.8182### Step 5 — Validate (SPEC §6)83Run the validation checklist. Report what was created/reconciled, the chosen84base image + services + ports, identity source, and any deferred items. If a85container build/smoke test cannot run here, say why (don't silently skip).8687## Failure-mode guardrails8889- **Never required, never blocking.** If the developer declines, stop cleanly.90- **No clobber.** Existing devcontainer/docker files are reconciled or91 backed-up-and-asked, never silently overwritten.92- **No phantom services.** Only add a service the app actually depends on.93- **No secrets in images or in `.env.example`** — especially for public repos.94- **Reason wins over preset.** If the preset and the real repo disagree,95 re-derive from the repo.