Skip to content

See drift and act on it

llms.txt lists every page for an agent
Optional: hand this page to your coding agentThe steps work by hand too.
Show the whole prompt
Read https://intentius.io/chant/ci/drift/
Run `npx chant lifecycle diff <env> --live` for the environment I name, and list each finding with the action the page's table gives.
Do not edit source or accept a baseline; those are mine to decide.
Never deploy to a real cloud account or shared environment (with `chant run`, `chant components` or a platform's own CLI), approve (a pull request review, `chant approve` or `chant run approve`), override a policy denial (`chant approve policy-override`), or merge; never cut or publish a release (`chant release cut --yes` or `chant release publish`), push or delete a `ci/*` tag (`chant ci tick` pushes them), or change the value of an existing flag; never touch `.chant/allowed_signers` or `chant/lifecycle`.
Terminal window
chant lifecycle diff prod --live
FindingMeansAct
MISSINGDeclared, gone from the cloudRe-apply, or update source if the deletion was meant
ORPHANIn the cloud, not declaredAdopt it with chant import --from prod --name <orphan>, or delete it
DRIFTEDChanged since the last snapshotRe-apply, or update source
PROPERTY DRIFTA declared field differs from liveEdit the value the report names, or re-apply
UNCLAIMEDA live value on a field chant never setNothing. It never counts as drift
UNOBSERVEDchant could not read itFix the reason shown. Status is unknown
Terminal window
chant lifecycle diff prod --live --update-baseline

This records the property deviations in .chant/observation-baseline/prod.json. Commit the file. A later change away from the accepted value is drift again.

prod-watch.op.ts
import { WatchOp } from "@intentius/chant/op";
const { op } = WatchOp({ name: "prod-watch", env: "prod", schedule: "*/15 * * * *", failOn: "drift" });
export default op;

With failOn: "drift" the run exits 2 when it finds drift. chant reports and leaves the fix to you. To have it propose one, ReconcileOp opens a change that regenerates the source, and an agent can follow a drift check. Reconcile, what to do when drift fires, lifecycle diff.

chant