STOP - Read before ANY tool call
- Read
E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/codex/rules/guardrails.md
- Read
E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/codex/plugin/skills/_shared/sdd-artifacts/SESSION.md; load session-state for $Cwd
- If the relevant gate is not approved: STOP - ask user (pt-BR) - do NOT Write/Shell
- SDD/develop skills: after ONE step/task, STOP session - handoff only
- This skill body is English; user-facing prompts may be (pt-BR)
Step -1 - Gate check (report in chat before continuing)
Gate check:
[ ] guardrails.mdc read
[ ] SESSION.md read; session-state loaded
[ ] PIPELINE.md read (SDD skills only)
[ ] User confirmed current action (sim)
-> If any unchecked: STOP
Skill: containerize
Trigger
Invoke when the user requests: /containerize, dockerize project, /containerize, or asks to containerize the workspace.
Arguments (optional):
| Input |
Meaning |
| Runtime port |
The primary network port to expose in the container |
Outcome
A set of production-ready container configurations:
- Dockerfile: Multi-stage build leveraging minimal base images (alpine or distroless), strict layer caching, and non-root execution.
- .dockerignore: Clean file excluding local packages, builds, git, and sensitive secrets.
- docker-compose.yml: Orchestrated configuration for local testing, binding the application port and spinning up required database/caching services.
Lazy-load
| When |
Path (after scripts/sync-cursor.ps1) |
| DevOps context |
E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/codex/plugin/skills/_shared/devops-guidelines/deployment-process.md |
| Caveman Mode (if active) |
E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/codex/plugin/skills/_shared/caveman/CAVEMAN.md - Full cap |
Process
Step -1b - Caveman Mode (Full cap)
- Read
E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/codex/sdd/preferences.json (create { "caveman_mode": false, "caveman_level": "full" } if missing).
- If
caveman_mode is false: continue without compression.
- If true: load
E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/codex/plugin/skills/_shared/caveman/CAVEMAN.md; apply Full participation cap + prefs caveman_level (Lite skills never escalate); show once: [Caveman] Modo ativo (respostas compactas, level={effective}). Digite caveman off para desativar.
- Honor
caveman on|off|status|lite|full|ultra (and stop caveman / normal mode) during the session.
- Auto-Clarity + never-compress gates/drafts/paths per
CAVEMAN.md.
-1. Re-check guardrails and session
Confirm guardrails.mdc and SESSION.md are loaded.
If missing, ask user (pt-BR):
Antes de containerizar, confirme:
- guardrails.mdc lido
- SESSION.md carregado
Posso seguir? (sim / ajustar / cancelar)
0. Workspace Inspection
- Identify the programming language/platform (C#, Node.js, Python, static frontend).
- Scan for configuration files (
appsettings.json, .env, package.json, requirements.txt) to determine:
- Excluded files and build outputs.
- Internal network ports.
- Dependent services (e.g., PostgreSQL, MS SQL, Redis, RabbitMQ).
1. Draft the Configuration & Workflow Decision
- Explain the proposed container strategy:
- Base images to use (e.g.
mcr.microsoft.com/dotnet/aspnet:8.0-alpine or node:20-alpine).
- Port maps and network parameters.
- Required local services in compose.
- Stop and ask the user to choose the workflow execution path to build and verify these configurations:
- Option A - Direct Developer Skill (
/developer): For straightforward local creation of Dockerfiles/Compose.
- Option B - Classic SDD (
/sdd-spec -> sdd-plan -> sdd-develop): For complex environment containerization requiring formal specifications (PRD) and a detailed plan (PLAN) in Portuguese.
- Option D - Plain Chat Plan: Establish a simple task list directly in the chat, executing steps one by one without extra file creations.
- Wait for explicit user choice before writing code or initializing another workflow.
2. Generate Dockerfile
- Write
Dockerfile using multi-stage build patterns:
- Build stage: Copy package manifests (
.csproj, package.json, requirements.txt) and restore first to leverage layer caching. Then copy code and compile.
- Runtime stage: Copy only build artifacts from the build stage.
- Enforce security: create and switch to a non-root system user inside the runtime image.
- Define
EXPOSE and a stable ENTRYPOINT or CMD.
3. Generate .dockerignore
- Write
.dockerignore. Standard exclusions:
- Dotnet:
**/bin, **/obj, **/.vs, **/.git, *.user.
- Node:
node_modules, npm-debug.log, dist, build.
- Python:
__pycache__, *.pyc, *.pyo, *.pyd, .venv, .env.
4. Generate docker-compose.yml
- Write
docker-compose.yml for local development:
- Declare the application service built from the local
Dockerfile.
- Declare secondary database or cache services identified in step 0.
- Configure persistent volumes for database data.
- Setup environment variables to link the application with the companion services.
5. Local Syntax Validation
- Validate file formats (ensure correct YAML spacing in compose).
- Recommend the user run a local test build:
docker compose build
docker compose up -d
6. Handoff
- Offer committing the configurations:
/commit
Must not
- Use heavy, development-only base images for runtimes.
- Expose sensitive environment variables, tokens, or credentials inside checked-in files. Use env templates or volumes.
1---2name: containerize-33description: Write multi-stage Dockerfiles, .dockerignore, and docker-compose for local dev. Use when dockerizing a project or invoking /containerize.4---567## STOP - Read before ANY tool call891. Read `E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/codex/rules/guardrails.md`102. Read `E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/codex/plugin/skills/_shared/sdd-artifacts/SESSION.md`; load session-state for `$Cwd`113. If the relevant gate is not approved: **STOP** - ask user **(pt-BR)** - do **NOT** Write/Shell124. SDD/develop skills: after **ONE** step/task, **STOP** session - handoff only135. This skill body is **English**; user-facing prompts may be **(pt-BR)**1415### Step -1 - Gate check (report in chat before continuing)1617```18Gate check:19[ ] guardrails.mdc read20[ ] SESSION.md read; session-state loaded21[ ] PIPELINE.md read (SDD skills only)22[ ] User confirmed current action (sim)23-> If any unchecked: STOP24```2526---2728# Skill: containerize2930## Trigger3132Invoke when the user requests: `/containerize`, `dockerize project`, `/containerize`, or asks to containerize the workspace.3334**Arguments (optional):**3536| Input | Meaning |37|-------|---------|38| Runtime port | The primary network port to expose in the container |3940## Outcome4142A set of production-ready container configurations:43441. **Dockerfile:** Multi-stage build leveraging minimal base images (alpine or distroless), strict layer caching, and non-root execution.452. **.dockerignore:** Clean file excluding local packages, builds, git, and sensitive secrets.463. **docker-compose.yml:** Orchestrated configuration for local testing, binding the application port and spinning up required database/caching services.4748## Lazy-load4950| When | Path (after `scripts/sync-cursor.ps1`) |51|------|----------------------------------------|52| DevOps context | `E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/codex/plugin/skills/_shared/devops-guidelines/deployment-process.md` |53| Caveman Mode (if active) | `E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/codex/plugin/skills/_shared/caveman/CAVEMAN.md` - **Full cap** |5455## Process5657### Step -1b - Caveman Mode (Full cap)581. Read `E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/codex/sdd/preferences.json` (create `{ "caveman_mode": false, "caveman_level": "full" }` if missing).592. If `caveman_mode` is false: continue without compression.603. If true: load `E:/Source/Repos/agent-dev-toolkit/scripts/validation/fixtures/codex/plugin/skills/_shared/caveman/CAVEMAN.md`; apply **Full** participation cap + prefs `caveman_level` (Lite skills never escalate); show once: `[Caveman] Modo ativo (respostas compactas, level={effective}). Digite caveman off para desativar.`614. Honor `caveman on|off|status|lite|full|ultra` (and `stop caveman` / `normal mode`) during the session.625. Auto-Clarity + never-compress gates/drafts/paths per `CAVEMAN.md`.6364### -1. Re-check guardrails and session6566Confirm `guardrails.mdc` and `SESSION.md` are loaded.67If missing, ask user (pt-BR):6869```text70Antes de containerizar, confirme:71- guardrails.mdc lido72- SESSION.md carregado7374Posso seguir? (sim / ajustar / cancelar)75```767778### 0. Workspace Inspection7980* Identify the programming language/platform (C#, Node.js, Python, static frontend).81* Scan for configuration files (`appsettings.json`, `.env`, `package.json`, `requirements.txt`) to determine:82 * Excluded files and build outputs.83 * Internal network ports.84 * Dependent services (e.g., PostgreSQL, MS SQL, Redis, RabbitMQ).8586### 1. Draft the Configuration & Workflow Decision8788* Explain the proposed container strategy:89 * Base images to use (e.g. `mcr.microsoft.com/dotnet/aspnet:8.0-alpine` or `node:20-alpine`).90 * Port maps and network parameters.91 * Required local services in compose.92* Stop and ask the user to choose the workflow execution path to build and verify these configurations:93 * **Option A - Direct Developer Skill (`/developer`):** For straightforward local creation of Dockerfiles/Compose.94 * **Option B - Classic SDD (`/sdd-spec` -> `sdd-plan` -> `sdd-develop`):** For complex environment containerization requiring formal specifications (PRD) and a detailed plan (PLAN) in Portuguese.95 * **Option D - Plain Chat Plan:** Establish a simple task list directly in the chat, executing steps one by one without extra file creations.96* **Wait for explicit user choice** before writing code or initializing another workflow.9798### 2. Generate Dockerfile99100* Write `Dockerfile` using multi-stage build patterns:101 * **Build stage:** Copy package manifests (`.csproj`, `package.json`, `requirements.txt`) and restore first to leverage layer caching. Then copy code and compile.102 * **Runtime stage:** Copy only build artifacts from the build stage.103 * Enforce security: create and switch to a non-root system user inside the runtime image.104 * Define `EXPOSE` and a stable `ENTRYPOINT` or `CMD`.105106### 3. Generate .dockerignore107108* Write `.dockerignore`. Standard exclusions:109 * Dotnet: `**/bin`, `**/obj`, `**/.vs`, `**/.git`, `*.user`.110 * Node: `node_modules`, `npm-debug.log`, `dist`, `build`.111 * Python: `__pycache__`, `*.pyc`, `*.pyo`, `*.pyd`, `.venv`, `.env`.112113### 4. Generate docker-compose.yml114115* Write `docker-compose.yml` for local development:116 * Declare the application service built from the local `Dockerfile`.117 * Declare secondary database or cache services identified in step 0.118 * Configure persistent volumes for database data.119 * Setup environment variables to link the application with the companion services.120121### 5. Local Syntax Validation122123* Validate file formats (ensure correct YAML spacing in compose).124* Recommend the user run a local test build:125126```bash127docker compose build128docker compose up -d129```130131### 6. Handoff132133* Offer committing the configurations:134135```136/commit137```138139## Must not140141* Use heavy, development-only base images for runtimes.142* Expose sensitive environment variables, tokens, or credentials inside checked-in files. Use env templates or volumes.