en un clic
env-contractctl
// Maintain env contract SSOT (env/contract.yaml), validate env/values + env/secrets refs coverage, and generate env/.env.example + docs/context/env/*. Use when adding/renaming/deprecating config keys.
// Maintain env contract SSOT (env/contract.yaml), validate env/values + env/secrets refs coverage, and generate env/.env.example + docs/context/env/*. Use when adding/renaming/deprecating config keys.
Treat convex/schema.ts as the database Single Source of Truth, initialize Convex scaffolding, regenerate docs/context/db/schema.json and docs/context/convex/functions.json, and verify the repository stays aligned with Convex mode.
Mirror schema changes from a real database (SSOT) into repo artifacts (prisma/schema.prisma + db/schema/tables.json) and refresh LLM context (docs/context/db/schema.json).
Apply schema changes from repo SSOT (prisma/schema.prisma) to a target DB via Prisma migrations, with diff preview + approval gate; then refresh LLM context (docs/context/db/schema.json).
Enable and operate the Deployment feature (ops/deploy conventions + deploy scripts) for multi-environment delivery.
Plan/apply/verify cloud environment config and secret references using env contract + policy/inventory routing; detect drift, rotate secrets, and decommission environments with approval gates. Use for staging/prod deployments and maintenance.
Bootstrap, diagnose (doctor), and reconcile local dev environment from env contract/values/secret refs; generate .env.local and redacted docs/context/env/effective-*. Use when local env is broken or needs syncing.
| name | env-contractctl |
| description | Maintain env contract SSOT (env/contract.yaml), validate env/values + env/secrets refs coverage, and generate env/.env.example + docs/context/env/*. Use when adding/renaming/deprecating config keys. |
Treat env/contract.yaml as the configuration contract Single Source of Truth (SSOT). Use the env-contractctl skill to:
env/values/*, env/secrets/*)env/.env.exampledocs/env.mddocs/context/env/contract.json (LLM-readable contract)The env-contractctl skill is designed for LLM-led development:
.env tribal knowledgeUse the skill only when the project env SSOT mode is repo-env-contract.
To check the mode, read:
docs/project/env-ssot.jsonIf the project is not in the required mode, STOP and do not apply the workflow.
If the file does not exist (first-time setup), you can scaffold the required structure using:
python3 -B -S .ai/skills/features/environment/env-contractctl/scripts/env_contractctl.py init --root . --out <EVIDENCE_DIR>/00-bootstrap.md
The command scaffolds a minimal safe template (no secret values) and will not overwrite existing files unless you pass --force.
Use when the user asks to:
env/.env.example and environment docs are accurateAvoid when:
env-localctl)env-cloudctl)secret: true variable must use a secret_ref.env/contract.yamlenv/values/*.yamlenv/.env.exampleenv/.env.exampledocs/env.mddocs/context/env/contract.jsonenv/contract.yamlenv/values/<env>.yamlenv/secrets/<env>.ref.yamlChoose one evidence location (no secrets):
dev-docs/active/<task-slug>/artifacts/env/.ai/.tmp/env-contract/<run-id>/Evidence files (templates available in ./templates/):
00-change-intent.md01-contract-diff.md02-compat-migration-plan.md03-validation-log.md04-context-refresh.mdenv/.env.exampledocs/env.mddocs/context/env/contract.jsonrepo-env-contract via docs/project/env-ssot.json.
env/contract.yaml:
secret: truesecret_ref: <logical_name>env/values/<env>.yaml only for non-secret keys.env/secrets/<env>.ref.yaml only for secret refs (no values).python3 -B -S .ai/skills/features/environment/env-contractctl/scripts/env_contractctl.py validate --root . --out <EVIDENCE_DIR>/03-validation-log.md
01-contract-diff.md and 02-compat-migration-plan.md:
env/.env.example, docs/env.md, and LLM context:python3 -B -S .ai/skills/features/environment/env-contractctl/scripts/env_contractctl.py generate --root . --out <EVIDENCE_DIR>/04-context-refresh.md
env-localctl (compile/doctor/reconcile)env-cloudctl (plan/apply/verify)repo-env-contractenv/.env.example regenerateddocs/context/env/contract.json regeneratednode .ai/tests/run.mjs --suite environmentenv-contractctl workflow.