# terragucci > Terraform ops and governance. Every page is true as written: a command or key on this site works as the page says. A key that `terragucci config check` refuses is not part of terragucci. terragucci is built on chant (https://intentius.io/chant/), which keeps the approvals and records on `chant/lifecycle`. terragucci provisions databases as Terraform resources; SQL Yodeler (https://intentius.io/sql-yodeler/) manages the ClickHouse and Postgres schemas inside them, on the same approvals. Agents adopting terragucci in a repository: start with https://intentius.io/terragucci/getting-started/agents/. A page with a prompt carries it under "Optional: hand this page to your coding agent", and llms.txt lists it under the page. Every prompt forbids apply, approve and merge; those stay with the person. ## Pages - [Set up with a coding agent](https://intentius.io/terragucci/getting-started/agents/): How a coding agent adopts terragucci in a repository, and the prompt to hand it. - Optional agent prompt: Set up terragucci in this repository. Read https://intentius.io/terragucci/llms.txt first, then https://intentius.io/terragucci/getting-started/agents/ and follow it. Ask me whether waves should wait for an approval, and pass `--gate` to `init` to match. Open a pull request with the result. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [terragucci](https://intentius.io/terragucci/): Terraform ops and governance. - [Architecture](https://intentius.io/terragucci/concepts/how-it-works/): The path of a change from pull request to plan note, merge, waves, approval, apply and drift, and where each part runs. - [Get your first plan note](https://intentius.io/terragucci/getting-started/): Add terragucci to a Terraform, OpenTofu, Terragrunt, Atmos or CDK Terrain repo and see one grouped plan note on a pull request, in about 10 minutes. - Optional agent prompt: Read https://intentius.io/terragucci/getting-started/ and https://intentius.io/terragucci/getting-started/agents/. Set up terragucci in this repository. Run `npx terragucci init --dry-run --json` and show me the findings before writing anything. Then run `npx terragucci init` and open a pull request with the files it wrote, package.json and package-lock.json only. Do not create secrets. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Boot the example](https://intentius.io/terragucci/tutorial/): Run a 15-root OpenTofu estate, or the same shop as Terragrunt units, on your laptop, with a local forge and an AWS stand-in, in about ten minutes the first time. - Optional agent prompt: Read https://intentius.io/terragucci/tutorial/. Clone https://github.com/INTENTIUS/terragucci, run `npm ci` and `just example up` as the page says, and report the Forgejo URL and the boot time. If it fails, match the error to "Troubleshooting" and tell me the fix. `just example up` applies the example to floci, its local AWS stand-in. That is the one exception to the line below, and only against floci. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Add terragucci to a repo](https://intentius.io/terragucci/guides/add-to-a-repo/): Write the pipeline for GitHub, GitLab or Forgejo, give it a token and cloud roles, require its status, and get a plan note on the next pull request. - Optional agent prompt: Read https://intentius.io/terragucci/guides/add-to-a-repo/ and https://intentius.io/terragucci/getting-started/agents/. Set up terragucci in this repository for its forge. Ask me whether waves should wait for an approval, and pass `--gate` to `init` to match. Run `npx terragucci init --dry-run --json` and show me the findings before writing anything. Then run `npx terragucci init` and open a pull request with the files it wrote, package.json and package-lock.json only. List the token, OIDC roles and required status I must set in the forge settings. Do not create secrets, variables or branch protection yourself. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Approve a waiting wave](https://intentius.io/terragucci/guides/approve-a-wave/): Read what a wave will do, record your approval, and let the apply carry on. - Optional agent prompt: Read https://intentius.io/terragucci/guides/approve-a-wave/. Find the waiting wave with `npx terragucci approve --dry-run`, summarize its report (destroys, replacements, roots) and print the command it gives for me. The `--dry-run` preview is the one form of `terragucci approve` you may run; never sign. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Fix a refused wave](https://intentius.io/terragucci/guides/fix-a-refused-wave/): A wave that applied nothing because a plan changed after its approval. Read the diff, then approve again or stop. - Optional agent prompt: Read https://intentius.io/terragucci/guides/fix-a-refused-wave/. Fetch both reports, run `npx terragucci respond wave-refused ... --json`, and tell me in five lines which roots moved and why. The decision is mine. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Approvals runbook](https://intentius.io/terragucci/guides/approvals-runbook/): The day-to-day commands for approvals: choose a mode, set up signers, approve a wave, override a policy denial, list what is waiting, revoke an approval, recover from a refusal, and what expires. - Optional agent prompt: Read https://intentius.io/terragucci/guides/approvals-runbook/. Run the "List the waves waiting" command with a read-only clone and tell me each wave, digest and expiry. Do not revoke an approval, and do not run `terragucci override`. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Re-plan a pull request from a comment](https://intentius.io/terragucci/guides/re-plan-from-a-comment/): Ask for a read-only re-plan of a pull request by writing /terragucci plan or dispatching the workflow, and run an approved apply with /terragucci apply, on GitHub, Forgejo and GitLab. - Optional agent prompt: Read https://intentius.io/terragucci/guides/re-plan-from-a-comment/. Check that the default branch's pipeline has the comment trigger (on GitLab, the `comments` job and a pipeline schedule with TERRAGUCCI_SCHEDULE set to comments); if it does not, run `npx terragucci init` and open a pull request with the result. You may comment `/terragucci plan` on a pull request and report what the note says. Never comment `/terragucci apply`, `/terragucci lock` or `/terragucci unlock`. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Apply a pull request before it merges](https://intentius.io/terragucci/guides/apply-before-merge/): Turn on apply.when pull-request, apply an approved change from a comment on GitHub, GitLab or Forgejo, and merge it once every wave applied. - Optional agent prompt: Read https://intentius.io/terragucci/guides/apply-before-merge/. Add `apply.when: pull-request` to terragucci.yml, run `npx terragucci config check --json` and `npx terragucci init`, and open a pull request with the result. List the merge token and the branch protection I must set; do not create tokens or change branch protection yourself. Never comment `/terragucci apply`, `/terragucci lock` or `/terragucci unlock`. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Roll out a new module version](https://intentius.io/terragucci/guides/roll-out-a-module-version/): Move a module's pin one wave at a time, as one pull request per wave, across the roots and repos that use it. - Optional agent prompt: Read https://intentius.io/terragucci/guides/roll-out-a-module-version/. Run `npx terragucci rollout ` (the preview only), fix any pin it refuses in a pull request, and print the `--mode apply` command for me to run. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Publish your modules](https://intentius.io/terragucci/guides/publish-modules/): Version the modules beside your roots automatically, as OCI artifacts, git tags or a module registry served from a bucket, on every merge. - Optional agent prompt: Read https://intentius.io/terragucci/guides/publish-modules/. Add the `modules:` block, run `npx terragucci publish --dry-run`, show me what would be published, run `npx terragucci init`, and open a pull request. List the registry credentials I must add; do not add them. If I ask for attested releases, add `attest: true` and tell me to run `cosign generate-key-pair` myself; never create, read or commit a private key. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Turn on drift checks](https://intentius.io/terragucci/guides/turn-on-drift-checks/): Plan every root on a schedule and get a grouped report of what changed outside Terraform. - Optional agent prompt: Read https://intentius.io/terragucci/guides/turn-on-drift-checks/. Add a `drift:` cron to terragucci.yml, run `npx terragucci config check --json` and `npx terragucci init`, and open a pull request. Tell me the GitLab schedule or token scope I must set. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Keep reports in a bucket](https://intentius.io/terragucci/guides/keep-reports-in-a-bucket/): Copy every plan report to an S3 bucket, a GCS bucket or an Azure Blob container, so they outlive your CI's artifact retention and share one index. - Optional agent prompt: Read https://intentius.io/terragucci/guides/keep-reports-in-a-bucket/. Add the `reports:` block for bucket , rerun `npx terragucci init`, write the access policy the page gives for my cloud as a file for me to review, and open a pull request. Do not create the role, the bucket, the container, any secret or the front door stack. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Send traces and metrics](https://intentius.io/terragucci/guides/send-traces-and-metrics/): Point the pipeline at your OpenTelemetry collector, get one trace per stage run and its metrics, and load the Grafana dashboards and alerts init writes. - Optional agent prompt: Read https://intentius.io/terragucci/guides/send-traces-and-metrics/. Add `OTEL_EXPORTER_OTLP_ENDPOINT` under `env:` in terragucci.yml, `telemetry.headers_secret` if the collector needs a key, and `dashboards: true`. Run `npx terragucci config check --json` and `npx terragucci init`, and open a pull request with terragucci.yml, the pipeline and observability/terragucci/. List the secret I must add for my forge; do not create it. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Govern many repos from one place](https://intentius.io/terragucci/guides/govern-many-repos/): List your projects in a control repo and let terragucci open a pull request in each one that needs a change. - Optional agent prompt: Read https://intentius.io/terragucci/guides/govern-many-repos/. In this control repo, write terragucci.yml with the projects I name, run `npx terragucci config check`, then run the preview, `npx terragucci reconcile --config terragucci.yml`, and show me its output for each project. Open a pull request in this control repo with the file. Print the `--mode apply` command for me to run; do not run it. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Choose choudoufu, Terraform, OpenTofu or Terragrunt](https://intentius.io/terragucci/guides/use-a-binary/): Pick the binary your roots run with, and see what each one gives the pipeline. - Optional agent prompt: Read https://intentius.io/terragucci/guides/use-a-binary/. Run `npx terragucci init --dry-run --json` and tell me which binary it picked and why. Set `binary:` in terragucci.yml only if that pick is wrong, run `npx terragucci init`, and open a pull request. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Use Terragrunt](https://intentius.io/terragucci/guides/use-terragrunt/): Add terragucci to a Terragrunt repo, where each unit is a root and dependency order decides the waves, and bring the roles over from Terragrunt Scale (Gruntwork Pipelines). - Optional agent prompt: Read https://intentius.io/terragucci/guides/use-terragrunt/. Run `npx terragucci init --dry-run --json`, list the units and waves it found, add a `terragrunt:` block only where the page says one is needed, and open a pull request. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Have an agent summarize a refused wave](https://intentius.io/terragucci/guides/agent-refused-wave/): Give an agent the diff between an approved plan and the current one, and read a short summary of what moved. - Optional agent prompt: Read https://intentius.io/terragucci/guides/agent-refused-wave/. Add the explain-refusal job for wave to the own-jobs file the guide's tab for this forge names, set own_jobs in terragucci.yml to that file, run `npx terragucci init`, give the job no permission beyond what that tab gives, and open a pull request. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Have an agent change a pull request](https://intentius.io/terragucci/guides/agent-change-a-pull-request/): Write /terragucci agent and an ask on a pull request, and a coding agent commits the change to its branch, on GitHub, GitLab and Forgejo. - Optional agent prompt: Read https://intentius.io/terragucci/guides/agent-change-a-pull-request/. Add the `agent.comment` block to terragucci.yml, run `npx terragucci config check` and `npx terragucci init`, and open a pull request with the result. List the machine user, token scopes, secrets and ruleset I must set; do not create tokens or secrets yourself. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Have a model review a pull request](https://intentius.io/terragucci/guides/agent-review-a-pull-request/): Turn on review.agent, and a model on your own key compares each pull request's description with its plan and posts a note with the risk, the mismatches and its questions, on GitHub, GitLab and Forgejo. - Optional agent prompt: Read https://intentius.io/terragucci/guides/agent-review-a-pull-request/. Add the `review` block to terragucci.yml, write the review instructions file, run `npx terragucci config check` and `npx terragucci init`, and open a pull request with the result. List the secret I must set; do not create tokens or secrets yourself. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [terragucci.yml keys](https://intentius.io/terragucci/reference/config/): Every key of the config file, its default, and the defaults terragucci uses when there is no file. - Optional agent prompt: Read https://intentius.io/terragucci/reference/config/. Run `npx terragucci config check --json` on this repo's terragucci.yml and list each problem it finds. Propose the smallest file that keeps current behavior, run config check again, and open a pull request with it. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [CLI commands](https://intentius.io/terragucci/reference/cli/): Every terragucci command, its flags and its exit codes. - Optional agent prompt: Read https://intentius.io/terragucci/reference/cli/. Run `npx terragucci config check` and `npx terragucci init --dry-run --json` in this repo and tell me the roots, binary and forge it found, and any config problem, with the exit code of each. Read only. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Stages](https://intentius.io/terragucci/reference/stages/): Each stage's inputs, permissions and outputs, and how a change reaches many roots. - Optional agent prompt: Read https://intentius.io/terragucci/reference/stages/. Plan a rollout of the module and version I name across this repo with `npx terragucci rollout ` (the dry run, without `--mode apply`), and list its waves with the roots in each and any pin it cannot move, with the tip it gives. Read only. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Report JSON schema](https://intentius.io/terragucci/reference/report-schema/): The fields of report.json, which every plan, apply and drift run writes beside its HTML report. - Optional agent prompt: Read https://intentius.io/terragucci/reference/report-schema/. Write a jq script that reads terragucci-report/report.json and prints every destroy and replacement by address, with its root and the wave that applies it. Read only. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [The reports bucket](https://intentius.io/terragucci/reference/reports-bucket/): Every key terragucci writes under your reports prefix, the JSON Schema of each object a program reads, and the prefix kept for a viewer's own files. - Optional agent prompt: Read https://intentius.io/terragucci/reference/reports-bucket/. Write a script that reads estate.json and index.json at the top of my reports prefix with a read-only identity, validates each against the JSON Schema the page names, and prints every waiting wave with its project, age and report. Read only: write nothing to the bucket. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Environment variables and credentials](https://intentius.io/terragucci/reference/environment/): Every variable terragucci reads, which job gets it, and how cloud roles are assumed. - Optional agent prompt: Read https://intentius.io/terragucci/reference/environment/. List every variable and secret this repo's pipeline needs and which job gets each. Print names only. Do not write secret values anywhere. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [The plan report](https://intentius.io/terragucci/reference/report/): One JSON document per run, rendered as the pull-request note, a self-contained HTML report and an index of every past report. - Optional agent prompt: Read https://intentius.io/terragucci/reference/report/. For this branch, list the roots terragucci will plan and why, from the section Roots a change plans. Run `npx terragucci stage tf-plan` in this repo, open terragucci-report/report.html and tell me which roots destroy or replace something, and which sensitive values were redacted. Read only. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Runtimes](https://intentius.io/terragucci/reference/runtimes/): Every stage runs on your forge's CI, and an approval is a record in your repository. - [Waves and approvals](https://intentius.io/terragucci/concepts/waves-and-approvals/): Why a change goes out in waves, what an approval binds, everything that waits for a person, and when a wave refuses to apply. - Optional agent prompt: Read https://intentius.io/terragucci/concepts/waves-and-approvals/. List every hold this repo's config turns on, from the section "Everything that waits for a person": read terragucci.yml on the default branch (`gate`, `environments`, `cost.approve_above`, `policy.outcomes` and `policy.override`, `approval_rules`, `apply.point`, `ephemeral`) and the files in `migrations/`, and `ci.hooks` with `onFailure: "approve"` in chant.workspace.json. For each hold, say which roots it covers by matching its globs against the roots `npx terragucci init --dry-run` lists, and who can release it. Then list the reads between this project and others, from the estate page's Between projects list, and which readers in this project the Cross-state edges section marks stale. Read only. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Plan grouping](https://intentius.io/terragucci/concepts/why-plans-are-grouped/): What grouping does to two hundred plans, what it never folds away, and why no approval is bound to it. - [Approvals as records in your repo](https://intentius.io/terragucci/concepts/approvals-as-records/): Why an approval is a commit on a branch of your own repo. - [Glossary](https://intentius.io/terragucci/concepts/glossary/): The words terragucci and the example use, and the ones that mean something different in Terraform and HCP Terraform. - [Control repo](https://intentius.io/terragucci/concepts/control-repo/): One terragucci.yml that lists every project and the defaults they share, turned into a reviewed pull request in each project that changes. - [Job triggers](https://intentius.io/terragucci/concepts/job-triggers/): Every terragucci job starts on a forge event your CI already receives or on a schedule in that same CI, with nothing to host and no inbound endpoint; this page lists what starts each one, its default, how long to expect, and the faster path where there is one. - Optional agent prompt: Read https://intentius.io/terragucci/concepts/job-triggers/. For this repo, read terragucci.yml on the default branch and the generated pipeline, and list each row of the page's table that is on here, with its key's value and the latency to expect; on GitLab, also list the pipeline schedules each row needs and whether the project has them, through the GitLab API or CLI. Read only. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Locking and staleness](https://intentius.io/terragucci/concepts/locking-and-staleness/): Two changes meeting on one root, and a plan that no longer matches. What the backend's state lock covers, the layers terragucci adds per root on every binary and repo shape, and choudoufu, which takes no state lock at all. - [Setting levels](https://intentius.io/terragucci/concepts/setting-levels/): How terragucci's settings combine, from the built-in defaults through a control repo to globs per root and the tool's own inheritance, how each glob-keyed key matches, and which keys a pull request cannot change for itself. - Optional agent prompt: Read https://intentius.io/terragucci/concepts/setting-levels/. List each root in this repo and the settings it ends up with: its binary version, its plan and apply identities, its environment and gate, the generated files' backend and providers, and its secrets, by applying each glob-keyed key's matching rule from the page to terragucci.yml (and, in a control repo, `defaults` and the project's block). Read only. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Splitting a root](https://intentius.io/terragucci/concepts/splitting-a-root/): The signs that a root has grown too big, where to draw the line, what a split costs, and the two ways to split one today, with a migration file for stock state and a tag rewrite under choudoufu. - Optional agent prompt: Read https://intentius.io/terragucci/concepts/splitting-a-root/. Find the largest roots in this repo by resource count, from the estate's inventory (the `inventory` table of `terragucci query`, or `terragucci mcp`), and for each suggest where it could split by the boundaries on the page, naming the resources on each side and the reads the split would add. Do not change anything and do not write a migration file. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Coding agents](https://intentius.io/terragucci/for/agents/): Setup by a coding agent, and the four opt-in features that run a model. - [Atmos](https://intentius.io/terragucci/for/atmos/): What works for an Atmos repo, what differs, and where to start. - [CDK Terrain](https://intentius.io/terragucci/for/cdk-terrain/): What works for a CDK Terrain app, what differs, and where to start. - [choudoufu](https://intentius.io/terragucci/for/choudoufu/): What choudoufu adds to the pipeline, what differs, and where to start. - [Evaluation](https://intentius.io/terragucci/for/evaluate/): What terragucci does, what it proves, and what it leaves to your forge and your cloud. - [Many repos](https://intentius.io/terragucci/for/many-repos/): One place for the settings, policy and module versions of every repo. - [Terraform or OpenTofu roots](https://intentius.io/terragucci/for/plain-roots/): What works for plain Terraform and OpenTofu roots, what differs by binary and forge, and where to start. - [Security review](https://intentius.io/terragucci/for/security/): What each job can reach, who can approve, the record every change leaves, and the proof. - [Terragrunt](https://intentius.io/terragucci/for/terragrunt/): What works for a Terragrunt repo, what differs, and where to start, including from Terragrunt Scale. - [Terramate](https://intentius.io/terragucci/for/terramate/): What works for a Terramate repo, what differs, and where to start. - [Have an agent fix drift](https://intentius.io/terragucci/guides/agent-fix-drift/): Turn on agent.drift, and when the drift job opens the drift issue, a coding agent changes the code to match what is live and terragucci opens a pull request with the change, on GitHub and Forgejo. - Optional agent prompt: Read https://intentius.io/terragucci/guides/agent-fix-drift/. Add the `agent.drift` block and `respond.drift: off` to terragucci.yml, run `npx terragucci config check` and `npx terragucci init`, and open a pull request with the result. List the machine user, token scopes and secrets I must set; do not create tokens or secrets yourself. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Have an agent propose a change over MCP](https://intentius.io/terragucci/guides/agent-propose-over-mcp/): Let a coding agent in a local checkout push a branch, open a pull request and read its plan through terragucci mcp --propose, and keep it from applying a pipeline root with terragucci guard. - Optional agent prompt: Read https://intentius.io/terragucci/guides/agent-propose-over-mcp/. Tell me the command line and the environment variables to add terragucci mcp --propose to my MCP client for this repo, and the terragucci guard command to run; do not add or run either yourself, and do not create or print credentials. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Read the estate over MCP](https://intentius.io/terragucci/guides/agent-read-over-mcp/): Connect a coding agent to terragucci mcp, a read-only MCP server over the reports bucket, so it reads a root's last apply, the estate, the audit trail and the DORA figures without parsing files. - Optional agent prompt: Read https://intentius.io/terragucci/guides/agent-read-over-mcp/. Tell me the command line and the environment variables to add terragucci mcp to my MCP client for this repo's reports bucket; do not add it yourself, and do not create or print credentials. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Have an agent request an app from a template over MCP](https://intentius.io/terragucci/guides/agent-request-from-a-template/): Let a coding agent list the templates and open the same pull request a form opens, through terragucci mcp --propose. - Optional agent prompt: Read https://intentius.io/terragucci/guides/agent-request-from-a-template/. Tell me the command line and the environment variables to add terragucci mcp --propose to my MCP client for this repo; do not add or run it yourself, and do not create or print credentials. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Approve from Slack and Teams](https://intentius.io/terragucci/guides/approve-from-chat/): Approve or decline a waiting wave from its chat message, through a relay you run in your own cloud, which checks who clicked against the signers file and approves only the plans the message showed. - Optional agent prompt: Read https://intentius.io/terragucci/guides/approve-from-chat/. Add `relay: terragucci` and `relay_key: RELAY_KEY` under `notify:` in terragucci.yml, and `apply.resume` if it is missing, run `npx terragucci config check` and `npx terragucci init`, and open a pull request. Tell me which chat ids each approver needs on their line, and which token, relay key, secrets and Slack or Teams settings I must create; do not edit the signers file yourself, and do not create a token, a secret, a Slack app or a Teams webhook. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Use terragucci with Atlantis or OpenTaco](https://intentius.io/terragucci/guides/coming-from-atlantis-or-opentaco/): Each Atlantis and OpenTaco (Digger) comment command and setting, the terragucci command or key that does the same job, and what terragucci leaves out on purpose. - Optional agent prompt: Read https://intentius.io/terragucci/guides/coming-from-atlantis-or-opentaco/. Run `npx terragucci import atlantis --dry-run` (or `import digger --dry-run` for a digger.yml) and report what it would write and each setting it lists as not mapped or left out on purpose. Then run it without --dry-run, run `npx terragucci config check --json` and `npx terragucci init`, and open a pull request with terragucci.yml and the generated pipeline. Do not delete atlantis.yaml or digger.yml, and do not create secrets. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Use terragucci with HCP Terraform, Scalr or OTF](https://intentius.io/terragucci/guides/coming-from-hcp-terraform-scalr-or-otf/): Plan notes and waves for HCP Terraform, Scalr and OTF workspaces in your own CI, each workspace concept and the terragucci key or job for it, and an optional move of state into your own bucket. - Optional agent prompt: Read https://intentius.io/terragucci/guides/coming-from-hcp-terraform-scalr-or-otf/. Run `npx terragucci import hcp --organization --dry-run` (`import otf --hostname `, or `import scalr --hostname .scalr.io`) with the token in `TF_TOKEN_`, and show me what it prints. Propose a directory per workspace for each directory it lists as run by several workspaces. Once I agree, run it without `--dry-run`. Add what the concepts table maps that the import does not write: `policy` with `input: hcp` for an OPA policy set, `ci.hooks` in `chant.workspace.json` for run tasks. Run `npx terragucci config check --json` and `npx terragucci init`, and open a pull request with terragucci.yml, the `terraform.tfvars` files and the generated pipeline. List the sensitive variables the import named under `pass` that I must recreate as CI secrets, and each Sentinel policy that needs a Rego rewrite. Do not change a `cloud` or `backend` block, do not run `init -migrate-state`, `state pull` or `state push`, and do not create secrets: a person moves the state. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Use terragucci with Spacelift or env zero](https://intentius.io/terragucci/guides/coming-from-spacelift-or-env-zero/): Plan notes and waves for Spacelift stacks and env zero environments in your own CI, each concept and the terragucci key or job for it, and an optional move of managed state into your own bucket. - Optional agent prompt: Read https://intentius.io/terragucci/guides/coming-from-spacelift-or-env-zero/. Run `npx terragucci import spacelift --dry-run` (or `import env0 --dry-run` for env zero) and report what it would write, each setting it lists as not mapped, and each stack or environment it names as sharing a directory. Propose a directory per stack or environment where one directory serves several. Run the import without `--dry-run`, then add `policy` for plan policies with `input.terraform` changed to `input`. Run `npx terragucci config check --json` and `npx terragucci init`, and open a pull request with terragucci.yml, the policies and the generated pipeline. List the secrets I must recreate and add their names under `pass`; list each policy with no counterpart, and each stack or environment whose state the platform manages. Do not change a `cloud` or `backend` block, do not run `init -migrate-state`, `state pull` or `state push`, and do not create secrets: a person moves the state. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Ephemeral environments per pull request](https://intentius.io/terragucci/guides/ephemeral-environments/): Give each pull request its own copy of a set of roots, under state keys of its own, and have terragucci destroy the copy when the pull request closes or its TTL passes. - Optional agent prompt: Read https://intentius.io/terragucci/guides/ephemeral-environments/. Look at this repo's roots and tell me which of them could be copied per pull request with ephemeral: name each root's backend and the key its copy would get, and, in a Terragrunt repo, whether the remote_state key reads TERRAGUCCI_EPHEMERAL_SUFFIX. Do not edit terragucci.yml or run terragucci init. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Estate views](https://intentius.io/terragucci/guides/estate-views/): Which view answers which question about your estate, from what is waiting for you to how often you deploy, each built from files in your own bucket with nothing to host or sign in to. - Optional agent prompt: Read https://intentius.io/terragucci/guides/estate-views/. Using the estate over MCP (`terragucci mcp`, its `waiting`, `estate` and `report` tools), tell me what is waiting for an approval now and what drifted this week, with the project and roots of each. Read only. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Estimate the cost of a change](https://intentius.io/terragucci/guides/estimate-cost/): Put the monthly cost change of each root, and the total, in the plan note, from Infracost on your own key. - Optional agent prompt: Read https://intentius.io/terragucci/guides/estimate-cost/. Add `cost: true` to terragucci.yml, run `npx terragucci config check` and `npx terragucci init`, and open a pull request. Tell me which secret I must create and which job gets it. Do not create the secret or an Infracost account. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Export a state version](https://intentius.io/terragucci/guides/export-a-state-version/): Download one version of a root's state to your machine, once someone else approved the request, with the export recorded on chant/lifecycle and in the audit trail. - Optional agent prompt: Read https://intentius.io/terragucci/guides/export-a-state-version/. Tell me which roots of this repo `terragucci state export` can export, and what each needs (an s3, gcs or azurerm backend that keeps versions), from the roots' backend blocks. Read only: do not run `terragucci state export`, and do not read or download any state. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Find the state version an apply left](https://intentius.io/terragucci/guides/find-a-state-version/): Each apply wave records the version id of each root's state from your bucket's versioning, and the estate page lists them per root, so you know which version to go back to. - Optional agent prompt: Read https://intentius.io/terragucci/guides/find-a-state-version/. Find the buckets and containers this repo's roots keep their state in, check whether each keeps versions, and write the commands that would turn it on as a file for me to review. Open a pull request. Do not change a bucket, a state file or a lock. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Generate backend and provider files](https://intentius.io/terragucci/guides/generate-root-files/): Write the backend, provider and version files of every root from terragucci.yml, and have tf-check refuse a hand edit. - Optional agent prompt: Read https://intentius.io/terragucci/guides/generate-root-files/. Read the backend, provider and required_version blocks in my Terraform directories and propose a generate key for terragucci.yml that writes the same values: shared values at the top, per-directory values under dirs, single-directory values under roots. Add it, delete the blocks it replaces, run `npx terragucci generate`, `npx terragucci generate --check` and `npx terragucci init`, and open a pull request. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Handle secrets](https://intentius.io/terragucci/guides/keep-secrets-out-of-notes/): How a secret reaches a root by name, how jobs reach the cloud with no stored key, what terragucci redacts from notes, reports, logs and messages, which jobs hold which forge tokens, and how state is kept to the people who may read it. - Optional agent prompt: Read https://intentius.io/terragucci/guides/keep-secrets-out-of-notes/. Find every secret this repo's roots read and say how each one reaches the job: `pass.secrets`, `secrets` from a cloud's store, a CI/CD variable on GitLab, or nothing. List each variable in this repo's roots that holds a secret and is not marked `sensitive = true`, and each secret a root reads that terragucci.yml does not name under `pass.secrets`. Add the missing names and `sensitive = true`, run `npx terragucci config check --json` and `npx terragucci init`, and open a pull request. Print names only; never write a secret's value anywhere. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Lock roots to a pull request](https://intentius.io/terragucci/guides/lock-roots/): Hold the roots a pull request reaches from its first plan, or from a comment, so a second pull request that reaches one is refused until the first merges, closes or unlocks. - Optional agent prompt: Read https://intentius.io/terragucci/guides/lock-roots/. Add `locks: plan` to terragucci.yml, run `npx terragucci config check --json` and `npx terragucci init`, and open a pull request with the result. Tell me the status check to require in branch protection; do not change branch protection yourself. Never comment `/terragucci lock` or `/terragucci unlock`. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Read terragucci's trust with Terraform](https://intentius.io/terragucci/guides/manage-the-control-repo-with-terraform/): Give Terraform and OpenTofu what each environment's jobs present to a cloud, and check the live setup, with the terragucci provider's data sources. - Optional agent prompt: Read https://intentius.io/terragucci/guides/manage-the-control-repo-with-terraform/. Read the terragucci.yml of the repo I name and write a Terraform configuration that reads its environments' trust with the terragucci provider's data sources, and run `tofu plan` with the provider built as the page shows. Show me the plan. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Move resources between roots](https://intentius.io/terragucci/guides/move-resources-between-roots/): Split a root in two, merge two roots, or hand a resource to another root, with a migration file in the pull request, proved with no change, approved by digest and written under the state lock. - Optional agent prompt: Read https://intentius.io/terragucci/guides/move-resources-between-roots/. In this repo, move the resource blocks I name from their root to the root I name, write the migration file the page describes for that move, and open a pull request. Tell me which roots the migration touches and what the plan job must prove. Do not run state commands or write any state. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Tell a chat channel when a wave stops](https://intentius.io/terragucci/guides/notify-a-chat-channel/): Post a Slack or Microsoft Teams message, or a signed JSON event to a webhook, when a wave waits for approval, is refused, or fails, with its roots, the approve command and the run, and post drift with a Re-plan button. - Optional agent prompt: Read https://intentius.io/terragucci/guides/notify-a-chat-channel/. Add a `notify:` block to terragucci.yml naming the secret SLACK_WEBHOOK_URL (or TEAMS_WEBHOOK_URL), run `npx terragucci config check` and `npx terragucci init`, and open a pull request. Tell me which secret I must create. Do not create the webhook or the secret, and never write a webhook address into any file. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Plan CDK Terrain stacks](https://intentius.io/terragucci/guides/plan-cdk-terrain-stacks/): Run cdktn synth in the pipeline before tf-plan, so each pull request plans the CDK Terrain stacks its change affects. - Optional agent prompt: Read https://intentius.io/terragucci/guides/plan-cdk-terrain-stacks/. Add `synth: npm ci && npx cdktn synth` to terragucci.yml, add cdktf.out/ and node_modules/ to .gitignore, run `npx cdktn synth` and then `npx terragucci init`, and open a pull request with the result. Tell me which stacks init found and whether each one's backend keeps its state outside the job. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Query the estate](https://intentius.io/terragucci/guides/query-with-sql/): Answer questions such as which queues changed this week and who approved them, by reading one table of the reports bucket or of chant/lifecycle with typed filters, on your machine with no server. - Optional agent prompt: Read https://intentius.io/terragucci/guides/query-with-sql/. Write the terragucci query command that lists the resources of type aws_sqs_queue changed in the last 7 days with their approvers, for this repo's reports bucket, and run it. Do not create or print credentials. Read only. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Read the audit trail](https://intentius.io/terragucci/guides/read-the-audit-trail/): Find the record terragucci audit writes to your reports bucket, and read who approved, applied or overrode what, which wave was refused, and which state versions were written outside every wave. - Optional agent prompt: Read https://intentius.io/terragucci/guides/read-the-audit-trail/. Download audit.jsonl from the top of my reports prefix with a read-only identity and tell me, for the project and wave I name, who approved it, which digest, when it applied, and any override or refusal, each with its evidence link. Read only: do not run `terragucci audit` without `--check`, and write nothing to the bucket. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Read the run view](https://intentius.io/terragucci/guides/read-the-run-view/): The one page per applied commit that shows each wave's state, the roots it reads, the blast radius and a timeline, where its link appears, and how to read a waiting or refused wave from it. - Optional agent prompt: Read https://intentius.io/terragucci/guides/read-the-run-view/. For the newest applied commit of this repo, read its run view's `run.json` from the reports bucket, or with the `run_view` tool of `terragucci mcp`, and tell me each wave's state; for a waiting wave give its digest and the approval command it prints, and for a refused or failed wave the roots and the reason its report gives. Read only. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Release a state lock a killed job left](https://intentius.io/terragucci/guides/release-a-state-lock/): When a job is killed mid-apply, free the backend's state lock it left with terragucci unlock-state, which checks the job is gone, waits for an approval of that lock, and records the release. - Optional agent prompt: Read https://intentius.io/terragucci/guides/release-a-state-lock/. A plan or apply in this repo fails because the state of a root I name is locked. Read the lock for that root (a lock file, a gcs lock object, or an azurerm blob lease) and tell me its ID, who took it and when, and which of the forge's runs that began before then are still running. Do not run `terragucci unlock-state`, `force-unlock` or any state command, and do not delete the lock file. Never apply, approve (a pull request review or `terragucci approve`), override a policy denial (`terragucci override`), use `--mode apply`, or merge; never touch `.chant/allowed_signers` or `chant/lifecycle`. - [Request an app from a template](https://intentius.io/terragucci/guides/request-an-app/): Publish a module as a template, then open a pull request that adds an app's root from it, from a form, an agent or the command line. - Optional agent prompt: Read https://intentius.io/terragucci/guides/request-an-app/. Run `npx terragucci templates list` and pick a template, then run `npx terragucci request