All plugins

plansift

Exact, local review of OpenTofu and Terraform plans before apply, from the JSON of a saved plan (tofu show -json / terraform show -json). tf_plan_summary gives exact counts per action, every delete, replace and forget with the plan's reason and the attributes forcing the replacement, drift detected outside the tool, changed outputs, failing checks and the modules and resource types with the most changes; tf_plan_changes gives an attribute-level before/after diff (JSON policies stored in strings are diffed inside), filterable by action and address and paged; tf_plan_check gates the plan on denied actions for address patterns, a change budget, drift and failing checks. Sensitive values, text under secret-like attribute names, variable values and output values are never returned. Standard library only: no network, no credentials, no subprocess (never runs tofu or terraform), no third-party dependencies, no self-update. Disclosure: reads the local plan file you pass it (read-only), only regular files, and honours Hermes' core read denylist.

rodricksz4h5Toolsv1.0.0Updated 5 days ago

About

Exact, local review of OpenTofu and Terraform plans before apply, from the JSON of a saved plan (tofu show -json / terraform show -json). tf_plan_summary gives exact counts per action, every delete, replace and forget with the plan's reason and the attributes forcing the replacement, drift detected outside the tool, changed outputs, failing checks and the modules and resource types with the most changes; tf_plan_changes gives an attribute-level before/after diff (JSON policies stored in strings are diffed inside), filterable by action and address and paged; tf_plan_check gates the plan on denied actions for address patterns, a change budget, drift and failing checks. Sensitive values, text under secret-like attribute names, variable values and output values are never returned. Standard library only: no network, no credentials, no subprocess (never runs tofu or terraform), no third-party dependencies, no self-update. Disclosure: reads the local plan file you pass it (read-only), only regular files, and honours Hermes' core read denylist.

plansift

Exact, local review of OpenTofu and Terraform plans before apply, as three
Hermes tools.

tofu plan / terraform plan is the last chance to see that a change will
destroy a database, replace every instance in a module or quietly drop a
bucket. On real infrastructure the plan is thousands of resources and
megabytes of JSON, far too much to put in a model's context, and the
dangerous line is easy to miss in the human-readable output. plansift reads the
plan's JSON on disk and returns exact answers: what is deleted or replaced
and why, which attribute forces each replacement, what changed outside the
tool, and whether the plan passes the rules you set.

It reads the JSON of a saved plan:

tofu plan -out=plan.tfplan            # or: terraform plan -out=plan.tfplan
tofu show -json plan.tfplan > plan.json   # or: terraform show -json plan.tfplan > plan.json

plansift never runs tofu or terraform itself. A saved binary plan or the
event stream of plan -json is recognised and refused with the command that
converts it, and a state file (show -json without a plan) is refused too.
UTF-16 files, which Windows PowerShell 5.1's > writes, are read like UTF-8 ones.

Why a tool and not a prompt or skill

  • Exact counts and nothing missed. Every delete, replace and forget is
    listed, with the plan's own reason (replace_because_cannot_update,
    replace_because_tainted, delete_because_each_key, ...) in plain words,
    the replacement order (destroy before create, or create before destroy) and
    the attributes that force it. Real output on OpenTofu's requires-replace fixture:

    {"address": "test_instance.test", "action": "replace",
     "order": "destroy_before_create",
     "reason": "replace_because_cannot_update",
     "why": "an attribute that cannot be changed in place changed",
     "forced_by": ["ami"]}
    
  • Attribute-level diffs a model can read. before -> after per changed
    attribute, (known after apply) for unknown values, and a
    forces_replacement flag on the attribute that causes the replacement. JSON
    documents stored in strings (IAM policies, task definitions) are diffed
    inside, so one added action shows as policy (json) Statement[0].Action[1]
    rather than two 2 KB strings.

  • Secrets stay out of the context. Values the provider marks sensitive are
    replaced by (sensitive value), before or after the change, at any depth. As a
    second line of defence, text under attribute names that look like secrets
    (password, secret, token, private_key, api_key, access_key,
    credential, connection_string, ...) is replaced by
    (redacted: secret-like attribute name) even when the provider did not mark
    it. Numbers and booleans under such names stay visible
    (get_password_data = false). The same applies inside JSON documents stored
    in strings and to the HCL generated for imports. Input variable values and output
    values are never returned (outputs by name and action only), and a set element
    in a replacement path is shown as […], not by its value.

  • A deterministic gate. tf_plan_check turns "don't let the agent destroy
    production" into a rule that returns passed: false with each violation.

Tools

All three always return a JSON string. A bad path or a file that is not a plan
returns { "ok": false, "error": "..." } rather than raising. Each result
starts with file, format_version, version (the terraform_version
field, which OpenTofu also writes), errored, and complete, applyable and
timestamp when the plan has them.

Actions are create, update, replace, delete, forget (removed from
state and the real object kept), read (data sources) and no-op. import
and move are tags that combine with an action: an import is often a
no-op, and a move may be one as well. Unrecognised action lists from a newer
version are kept as other:<actions> and flagged, not dropped.

Address patterns (address, only, except): * matches any run of
characters, including dots and brackets; ? matches one character; everything
else is literal. So module.db.*, *aws_db_instance.* and
aws_instance.web[0] mean what they say. A pattern also matches a moved
resource's previous address.

tf_plan_summary

argtyperequireddefaultmeaning
pathstringyes-plan JSON file
max_itemsintegerno25entries per list (cap 500)
topintegerno10modules and resource types to rank (cap 100)

Returns:

  • counts: per action, plus import and move.
  • resources_changing.
  • destructive: every delete, replace and forget, with reason, why, order and forced_by.
  • drift: resources changed or deleted outside OpenTofu/Terraform. affects_plan is set when the plan lists which drift matters.
  • outputs_changing: names, actions and sensitive flags.
  • checks: status counts, and failing checks with their messages.
  • values_known_after_apply.
  • by_module and by_type.
  • variables: a count only.
  • deferred_changes, when present.

tf_plan_changes

argtyperequireddefaultmeaning
pathstringyes-plan JSON file
actionsstring[]noall but no-op and readonly these actions/tags
addressstring[]no-only addresses matching one of these patterns
sourcestringnochangesdrift lists changes made outside the tool instead
max_attributesintegerno50changed attributes per resource (cap 500)
offsetintegerno0matching resources to skip
limitintegerno20resources to return (cap 200)

Each change has address, action, type and the same fields as the summary,
plus moved_from, import_id and generated_config (for imports, first 2,000
chars) when present. It also has attributes: [{path, before, after, forces_replacement?}]. Deletes and forgets carry a note instead of an attribute
dump. Values longer than 300 characters are cut, with the remaining length
noted. next_offset is present when more results remain.

tf_plan_check

argtyperequireddefaultmeaning
pathstringyes-plan JSON file
denystring[]no["delete","replace","forget"]actions/tags that fail the gate ([] = none)
onlystring[]noallapply deny only to matching addresses
exceptstring[]no-never apply deny to matching addresses
max_changesintegernono limitfail when more resources would change
fail_on_driftbooleannofalsefail on changes made outside the tool
fail_on_failed_checksbooleannotruefail on failed or errored checks and conditions

Returns passed, violation_count, violations (the first 200; each has a
rule: denied_action, max_changes, drift, check_failed or
plan_errored), the rules applied and how many changes were evaluated.
An errored plan is always a violation.

Example: block any destroy or replacement in the database module, but allow
everything elsewhere:

{"path": "plan.json", "only": ["module.database.*"]}

Safety

  • Read-only. It reads only the plan file you pass, and only if it is a regular
    file of at most 128 MiB.
  • No network, no credentials, no subprocess (it never runs tofu or
    terraform), no background work, no self-update. Standard library only.
  • Honours Hermes' core read denylist (credential stores, project .env files,
    NT/device namespace paths). The path is checked as given and as an absolute
    path before anything is opened. Device, fd and /proc paths are refused,
    including through symlinks.
  • Sensitive values, text under secret-like names, the plan's variables section and
    output values are not returned. Everything else is returned as the plan shows
    it, just as tofu show would. That includes ordinary attributes with ordinary names,
    YAML in strings (e.g. Helm values), check failure messages (which
    OpenTofu/Terraform already refuse to build from sensitive values) and the
    instance keys in addresses (aws_iam_user.u["alice"]). A secret a provider stores
    in one of those will therefore be visible.

Compatibility

Plan JSON format_version 0.1 through 1.2, from Terraform 0.12 to 1.15 and
OpenTofu. A newer format_version is read on a best-effort basis and noted
in the result.

Install

hermes plugins install rodricksz4h5/plansift --enable

License

MIT

README from the reviewed commit efb8865; it updates when the author re-pins.

More by rodricksz4h5

8 plugins by rodricksz4h5 in the catalog.

rodricksz4h5covsiftExact, local analysis of code coverage reports: LCOV (c8, nyc, Jest, Vitest, cargo-llvm-cov, lcov), Cobertura XML (coverage.py, Jest/Vitest, coverlet, gcovr, PHPUnit), JaCoCo XML, Clover XML, SonarQube generic XML, coverage.py, gcovr and Coveralls JSON, and Go cover profiles, from one file or a directory of them. coverage_diff takes a unified diff (git diff) and returns the added lines no test ran, per file, with diff coverage and an optional fail_under gate; coverage_summary gives exact line, branch and Go statement coverage, the least covered files with their uncovered lines and a per-directory rollup; coverage_file lists one file's uncovered lines and partial branches; coverage_compare shows which files lost coverage between two runs. Standard library only: no network, no credentials, no subprocess (never runs git or tests; the diff is passed in), no third-party dependencies, no self-update; XML entity declarations are refused. Disclosure: reads the local report and diff paths you pass it (read-only), only regular files, and honours Hermes' core read denylist.Communitytoolsrodricksz4h5dataprobeExact, local structure and quality checks over large CSV/TSV and JSONL data files that don't fit in a model's context. data_profile reports per-column inferred type, null rate, distinct count, numeric statistics and top values (for JSONL, the inferred union schema with per-field presence); data_validate reports only the actionable problems — mixed-type columns with the offending line numbers, ragged rows, duplicate rows, non-unique key candidates, constant or all-empty columns and malformed JSONL lines; data_head returns a clean parsed preview that handles quoted CSV and JSON correctly. Streamed, standard library only: no network, no credentials, no third-party dependencies, no self-update. Disclosure: reads the local data path you pass it (read-only) and honours Hermes' core read denylist.Communitytoolsrodricksz4h5layersiftExact, local reading of saved container images: docker save and podman save tars (classic and Docker 25+ layouts) and OCI image archives, including multi-platform indexes and gzip, bzip2 or xz compression. image_summary says where the size goes: each layer with the Dockerfile instruction that made it, the final filesystem size, bytes still shipped after a later layer deletes or overwrites them (which layer added them, which removed them), caches and archives left behind (apt lists, apk/yum/dnf, pip/uv/npm/yarn, Go and Cargo caches, temp directories, .git, compilers) with the fix, and the biggest directories and files; image_layer opens one layer; image_compare compares two images before and after a Dockerfile change. Standard library only: no network, never runs docker or contacts a registry, no credentials, no subprocess, never extracts to disk, no third-party dependencies, no self-update. Disclosure: reads the local image archives you pass it (read-only), only regular files, and honours Hermes' core read denylist.Communitytoolsrodricksz4h5locksiftExact, local review of dependency lockfiles: npm package-lock.json, pnpm-lock.yaml, yarn.lock (v1 and Berry), uv.lock, poetry.lock, Pipfile.lock, Cargo.lock, composer.lock, Gemfile.lock and go.sum. lock_diff compares two versions of a lockfile (a branch against main) and returns the dependency changes instead of thousands of lines of churn, with supply-chain signals per installed copy: a source that moved (registry to git or URL, another registry host, a different tarball or commit at the same version, an alias or patch that changed, a tarball that belongs to another package), checksums changed, removed or weakened, new install scripts, new registries. lock_summary gives counts, packages at several versions, non-registry sources and install scripts; lock_why shows the dependency chains that pull a package in. Standard library only: no network, no credentials, no subprocess (never runs git or a package manager), no third-party dependencies, no self-update. Disclosure: reads the local lockfile paths you pass it (read-only), only regular files, and honours Hermes' core read denylist.Communitytools

Developer Mode

Explore built-in Hermes toolsets and actions.

HermesAgent

Developer?

Create a Hermes extension for Desktop or agent workflows.

Developer Section