Skip to content

j-mauro-r/SAT-Dengue-V2 / .agents/skills/deepworkplan/onboard

deepworkplan-onboard

Verified

Make any repository AI-first — reason (never template) an adapted AGENTS.md, docs/, per-module docs and .agents/ kit from the real repo, discover and verify its full and scoped validation commands and source-to-test mapping, install the DeepWorkPlan skill, and, for a repository onboarded under an earlier version, perform a targeted, non-destructive, idempotent harness upgrade. Use when the developer wants to onboard or upgrade a repository for AI agents.

FileKindSize
SKILL.mdskill md59.7 KB
addons.mdmarkdown18.0 KB
all-addons.mdmarkdown10.2 KB
command-templates/agent-create.mdmarkdown904 B
command-templates/dwp-create.mdmarkdown1.3 KB
command-templates/dwp-execute.mdmarkdown884 B
command-templates/dwp-refine.mdmarkdown943 B
command-templates/dwp-resume.mdmarkdown891 B
command-templates/dwp-status.mdmarkdown881 B
command-templates/dwp-upgrade.mdmarkdown911 B
command-templates/dwp-verify.mdmarkdown889 B
command-templates/skill-create.mdmarkdown889 B
presets/README.mdmarkdown7.0 KB
presets/angular.mdmarkdown7.5 KB
presets/astro-svelte.mdmarkdown6.7 KB
presets/django.mdmarkdown7.8 KB
presets/fastapi.mdmarkdown7.8 KB
presets/flutter.mdmarkdown7.1 KB
presets/generic.mdmarkdown6.5 KB
presets/go.mdmarkdown6.7 KB
presets/laravel.mdmarkdown6.8 KB
presets/nestjs.mdmarkdown7.0 KB
presets/nextjs.mdmarkdown7.8 KB
presets/node-ts-service.mdmarkdown6.7 KB
presets/nuxt.mdmarkdown7.2 KB
presets/python-package-cli.mdmarkdown6.8 KB
presets/rails.mdmarkdown6.8 KB
presets/react-native.mdmarkdown7.2 KB
presets/rust.mdmarkdown6.7 KB
presets/spring-boot.mdmarkdown7.4 KB
presets/sveltekit.mdmarkdown7.0 KB
presets/swift-ios.mdmarkdown7.6 KB
presets/terraform.mdmarkdown7.8 KB
presets/ts-lambda.mdmarkdown7.5 KB
presets/vue-vite.mdmarkdown6.7 KB
templates/onboarding-plan.mdmarkdown9.1 KB
v6.mdmarkdown4.7 KB

presets/terraform.md

View on GitHub
# Preset — Terraform / IaC (Terraform / OpenTofu)

> Reasoning aid, not a template. Verify every assumption against the live repo;
> detected reality wins. Capture the **real** validation command, not the
> example below.

## Signals that identify this stack

- `*.tf` files (HCL) — conventionally split into `main.tf`, `variables.tf`,
  `outputs.tf`, and `providers.tf`/`versions.tf` — plus a committed
  `.terraform.lock.hcl` (provider lock).
- Reusable code under `modules/`, each module exposing `variables.tf` and
  `outputs.tf`; root configs that call modules with `module "x" { source = ... }`.
- A `terraform { backend "..." }` block declaring **remote state** (S3 +
  DynamoDB lock, GCS, azurerm, Terraform Cloud / HCP, or a Tofu equivalent), and
  one or more `provider` blocks with version constraints.
- Variable inputs via `*.tfvars` / `*.auto.tfvars`; the `.terraform/` directory
  is local cache and is git-ignored. **Infer the real backend from the code.**
- **OpenTofu** variant: the same `.tf`/HCL files but driven by the `tofu` CLI
  (often a `.terraform-version`/`.tool-versions` or CI hints at which binary).

## What to look for in recon

- The **real** validation gate: `terraform fmt -check -recursive`,
  `terraform validate`, `tflint` (read `.tflint.hcl`), and `terraform plan`
  (read-only). Security/policy scanners may be present: `tfsec`, `checkov`,
  `terraform-compliance`. Substitute `tofu` for `terraform` if OpenTofu is used.
- **Never** treat `terraform apply` as a validation gate — it mutates real
  infrastructure. `plan` is the safe, read-only check.
- How **environments** are separated: workspaces (`terraform workspace`), or
  per-environment directories (`envs/dev`, `envs/staging`, `envs/prod`), or
  layered `*.tfvars`. Identify which pattern this repo uses.
- Backend/state location and locking, provider/version pinning, and where
  **secrets** live (never in state-readable plaintext — vars, a secrets manager,
  Vault, env). `terraform init` is required before validate/plan.

## Stack-specific skills/agents/commands to generate

- Skills: `module-add` (new reusable module with `variables.tf`/`outputs.tf`),
  `resource-add` (resource + variables + outputs wired in), `env-add` (new
  environment dir/workspace + tfvars), optionally `provider-pin` and a
  `plan-review` helper that summarizes a `plan` diff.
- Agents: baseline roles + a `iac-reviewer` / `state-safety` persona aware of
  state mutation, drift, blast radius, and least-privilege provider creds.
- Commands: the five DWP commands + `code-review`, `pr`, `commit`.

## Doc emphases

- `ARCHITECTURE.md` — module composition, root configs vs modules, the
  provider/backend topology, environment separation strategy.
- `SECURITY.md` — state secrecy (remote state can contain secrets), least-
  privilege provider credentials, secrets handling, policy scanning
  (`tfsec`/`checkov`), and who can `apply`.
- `OPERATIONS.md`/runbook — the init → fmt → validate → plan → (gated) apply
  flow, state locking, and rollback/import procedures.
- Per-module docs: one per reusable module (its inputs, outputs, side effects).

## Typical validation command (FIND the real one)

Often `terraform init -backend=false && terraform fmt -check -recursive &&
terraform validate && tflint`, with `terraform plan` as the change preview
(substitute `tofu` for OpenTofu). **Do not assume** the backend, environment
layout, or scanner set — read the `Makefile`/`.tflint.hcl`/CI and capture the
exact command.

## Testing and validation (verified vs example)

The uniform section every preset carries (`README.md` → "The testing section
every preset carries"). Everything below is an **illustrative example until it
is verified against the target repository** in Phase 1 — run the scoped example
on a real path and record the selected/executed count. Items marked *reference
run* were verified once in this skill's contributor environment with the tool
version stated; items marked *documented example* were **not** run here —
confirm the exit code and the selection count in the target repo before trusting
them in a gate.

### 1. Full commands
- Validation (there is no unit suite in the usual sense): `terraform fmt -check -recursive` from the repo root; per **root module** directory (cwd matters): `terraform init -backend=false` then `terraform validate`; `tflint --recursive` (or per dir); `terraform plan` read-only per environment (needs credentials/backend — often CI-only; **never** `apply` as a gate).
- Tests where present: `terraform test` (≥ 1.6, `*.tftest.hcl`), Terratest (`go test ./test/...`), policy/security scanners (`checkov -d .`, `tfsec .`, `trivy config .`). Substitute `tofu` for OpenTofu.

### 2. Scoped invocation
**Scoping is per directory / root module** (inherent — documented example, Terraform is not available in the contributor environment): `cd modules/orders && terraform init -backend=false && terraform validate`; `tflint --chdir=modules/orders` (≥ 0.47; older: `tflint modules/orders`); `terraform fmt -check modules/orders`; `terraform test -filter=tests/orders.tftest.hcl` (one test file; `-filter` may repeat); Terratest: `go test ./test -run TestOrdersModule`; `checkov -d modules/orders`. `terraform plan` in `envs/<env>/` scopes to that root's state. **Evidence:** `Success! The configuration is valid.`, tflint's issue count, `terraform test` pass/fail counts, Terratest's `ok`.

### 3. Scoped static checks
- `fmt`, `validate`, `tflint`, `checkov`/`tfsec` all accept a directory — that *is* the scoped form; there is no per-file validate (HCL files in a module are one configuration). `terraform validate` requires `init` (providers/modules) even with `-backend=false`.

### 4. Source-to-test mapping
`modules/<name>/` ↔ `modules/<name>/tests/*.tftest.hcl` (native tests) or `test/<name>_test.go` (Terratest); environments/roots under `envs/<env>/` or `live/<env>/` (Terragrunt) call modules by `source`. A module change maps to its own tests **and** to a `validate`/`plan` of every root that calls it.

### 5. Affected consumers
Find callers with `grep -rn 'source *= *"[^"]*modules/orders' --include='*.tf'` (or `terragrunt graph-dependencies`); `terraform graph` inside a root shows resource/module edges. **Blind spots:** provider version pins and `.terraform.lock.hcl`, backend/remote-state configuration, `*.tfvars`/`*.auto.tfvars`, workspaces, data sources reading live infrastructure, registry module versions, variable defaults, `terraform.tf` required_version. A shared module or provider-pin change ⇒ `validate` (and ideally `plan`) on **every** calling root.

### 6. Escalation and fallback
Shared/core: `modules/` used by several roots, provider/version constraints, backend config, shared `locals`/naming modules. Always full run (every root): `versions.tf`/`providers.tf`, `.terraform.lock.hcl`, backend blocks, `.tflint.hcl`, `.terraform-version`, CI workflow that runs plans. **Fallback:** `terraform fmt -check -recursive && for every root: terraform init -backend=false && terraform validate && tflint` (+ `plan` in CI).

### 7. Layers and posture
Static checks (`fmt`, `validate`, `tflint`, policy scanners) — the fast base; `terraform test` with `mock_provider` (≥ 1.7) / Terratest with mocks as the unit-like layer; `terraform test`/Terratest against real providers and `plan` against the real backend as the slow integration layer (credentials, CI); `apply` is never a test. Static-first; keep real-provider tests few and isolated.

### 8. Zero-selection behavior
`terraform validate` in a directory with **no** `.tf` files prints `Success!` and exits **0** — a silent empty run: confirm the directory has configuration (`ls *.tf`). `terraform test -filter=<missing file>` errors out (documented; confirm). `tflint --chdir` on an empty dir reports no issues (exit 0). Terratest follows `go test` semantics (`-run` miss → `no tests to run`, exit 0).
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall