Local first
Always on for every agent that loads HeyEddi skills (Cursor, Claude, Codex, Cloud Run, or any other host). Edit code and Terraform in the repo. Check the plan. Do not change live systems.
This is the same kind of gate as verify_setup --check. The script exits 1 on a live mutation. Do not run that command.
Hard gate
Before any Terraform, OpenTofu, Pulumi, gcloud, GAM, Firebase, kubectl, Helm, aws, gsutil, bq, or Google API write, run:
python .agents/skills/heyeddi-local-first/scripts/classify_command.py --check --command "<the exact command>"
From this hub, the script path is skills/heyeddi-local-first/scripts/classify_command.py.
| Exit |
Meaning |
0 and "action": "allow" |
Run it. Reads and local config only. |
0 and "action": "plan" |
Run it. Then warn the user with what the plan would create, change, or destroy. Stop. |
1 and "blocked": true |
Do not run it. Edit the files instead. |
A plan command is terraform plan, tofu plan, pulumi preview, or ansible-playbook --check.
Process
- Change the Terraform, config, or app code in the working tree.
- Run the checker on the plan command. Exit 0 with
action: plan means run the plan.
- Warn the user. Quote the resource addresses the plan would add, change, or destroy.
- Commit and review that diff. Live apply stays in the project's deploy pipeline (Cloud Build
terraform-release for HeyEddi CI) or in a terminal the human runs.
What exits 1
terraform / tofu apply, destroy, import, refresh, state rm, workspace delete
gcloud writes (delete, deploy, create, submit, IAM changes). list, describe, get, config, and auth stay allowed.
- GAM writes, including calendar account changes.
gam info and gam print stay allowed.
firebase deploy, kubectl writes, helm upgrade, aws writes, gsutil rm, bq queries that are not --dry_run
curl -X POST, PUT, PATCH, or DELETE to a Google API
- The same commands inside
bash -c, python -c, $(...), or a local .sh / .py script
firebase emulators:start is local and stays allowed.
Tools
| Script |
Purpose |
classify_command.py --check |
Exit 1 on a live mutation. Plan prints a warning and exits 0. |
Related
@heyeddi always-on list
@engineering-excellence for the code change gate
- HeyEddi CI
cloudbuild.yaml step terraform-release is the reviewed apply path
1---2name: heyeddi-local-first3description: "ALWAYS-ON local-first gate for every agent. Prepare Terraform and config locally. terraform plan is allowed and must be summarized as a warning. classify_command.py --check exits 1 on terraform apply and other live cloud mutations. Use on any infra, Terraform, gcloud, Firebase, Kubernetes, or Google account change."4version: 1.0.05product-version: 3.8.186author: HeyEddi-com7metadata:8 source: https://skillmd.com/skills/heyeddi-com/heyeddi-local-first9---1011# Local first1213**Always on** for every agent that loads HeyEddi skills (Cursor, Claude, Codex, Cloud Run, or any other host). Edit code and Terraform in the repo. Check the plan. Do not change live systems.1415This is the same kind of gate as `verify_setup --check`. The script exits 1 on a live mutation. Do not run that command.1617## Hard gate1819Before any Terraform, OpenTofu, Pulumi, gcloud, GAM, Firebase, kubectl, Helm, aws, gsutil, bq, or Google API write, run:2021```bash22python .agents/skills/heyeddi-local-first/scripts/classify_command.py --check --command "<the exact command>"23```2425From this hub, the script path is `skills/heyeddi-local-first/scripts/classify_command.py`.2627| Exit | Meaning |28|------|---------|29| 0 and `"action": "allow"` | Run it. Reads and local config only. |30| 0 and `"action": "plan"` | Run it. Then warn the user with what the plan would create, change, or destroy. Stop. |31| 1 and `"blocked": true` | Do not run it. Edit the files instead. |3233A plan command is `terraform plan`, `tofu plan`, `pulumi preview`, or `ansible-playbook --check`.3435## Process36371. Change the Terraform, config, or app code in the working tree.382. Run the checker on the plan command. Exit 0 with `action: plan` means run the plan.393. Warn the user. Quote the resource addresses the plan would add, change, or destroy.404. Commit and review that diff. Live apply stays in the project's deploy pipeline (Cloud Build `terraform-release` for HeyEddi CI) or in a terminal the human runs.4142## What exits 14344- `terraform` / `tofu` `apply`, `destroy`, `import`, `refresh`, `state rm`, `workspace delete`45- `gcloud` writes (`delete`, `deploy`, `create`, `submit`, IAM changes). `list`, `describe`, `get`, `config`, and `auth` stay allowed.46- GAM writes, including calendar account changes. `gam info` and `gam print` stay allowed.47- `firebase deploy`, kubectl writes, `helm upgrade`, aws writes, `gsutil rm`, `bq` queries that are not `--dry_run`48- `curl -X POST`, PUT, PATCH, or DELETE to a Google API49- The same commands inside `bash -c`, `python -c`, `$(...)`, or a local `.sh` / `.py` script5051`firebase emulators:start` is local and stays allowed.5253## Tools5455| Script | Purpose |56|--------|---------|57| `classify_command.py --check` | Exit 1 on a live mutation. Plan prints a warning and exits 0. |5859## Related6061- `@heyeddi` always-on list62- `@engineering-excellence` for the code change gate63- HeyEddi CI `cloudbuild.yaml` step `terraform-release` is the reviewed apply path