Skip to content

Ops

llms.txt lists every page for a coding agent.

Each Op is ops/<name>.op.ts, built by npm run ops:build and run with chant run <name>. Every Op reads the deployment it acts on from LOOM_PROJECT, LOOM_ENV, LOOM_INSTANCE, LOOM_TIER and AWS_REGION, the same values you deployed with. How gates work is in Gated Ops.

OpWhat it doesGateInputs beyond the deployment’s
loom-watchDrift detection: chant lifecycle diff --live across every stack; schedule every 15 minutesnone
loom-reconcileOn drift, opens a pull request that brings the source in line with the cloud, for chant-owned resources only; never changes the cloud. Hourly schedule on the production tiersnoneGITHUB_TOKEN in CI
loom-upgrade-lightSnapshot RDS, apply the pending schema migrations (SQL Yodeler, behind its own plan-bound gate), roll the backend, roll the frontendyodel’s approve-migrate-<deployment> when a migration is pending
loom-upgrade-productionAs above, plus an approval gate before the schema migration, one-time Loom scripts, and an RDS restore on failureapprove-loom-upgrade-production, and yodel’sLOOM_UPGRADE_SCRIPTS
loom-upgrade-production-haThe same for production-haapprove-loom-upgrade-production-haLOOM_UPGRADE_SCRIPTS
loom-rotate-productionRotate the Cognito M2M client, the RDS credential (a manual swap) and, with a custom domain, the ALB’s ACM certificateapprove-loom-rotate-productionLOOM_DOMAIN_NAME, LOOM_DB_USERNAME, LOOM_DB_NAME
loom-rotate-production-haThe same, rotating the RDS credential through its Secrets Manager rotationapprove-loom-rotate-production-haLOOM_DOMAIN_NAME
loom-backupLabelled RDS snapshot, plus a cross-region copynoneLOOM_DR_REGION, LOOM_DR_KMS_KEY_ID
loom-restore-drillRestore a backup to a throwaway instance, check it comes up healthy, delete itnoneLOOM_RESTORE_SNAPSHOT_ID
loom-restoreRestore the database from a snapshot or a point in time to a new instance, then cut the backend over to itapprove-loom-restore, before the cutoverLOOM_RESTORE_SNAPSHOT_ID or LOOM_RESTORE_TIME
loom-cognito-exportExport the pool’s users, groups and memberships to stdout, or to S3. Read-onlynoneLOOM_BACKUP_BUCKET
loom-teardownDelete the AgentCore credential providers this Loom’s database records, then the tunnel host if deployed, then this instance’s component stacks, consumers first; only what it ownsapprove-loom-teardown
loom-bootstrapOnce per account: create the ECS and AgentCore runtime-identity service-linked roles if they are missingnone
loom-tunnel-hostDeploy the optional SSM tunnel host ({project}-{env}-{instance}-tunnel-host) in the private subnets, with ingress on the database’s security groupnoneLOOM_TUNNEL_VPC_ID, LOOM_TUNNEL_SUBNET_IDS, LOOM_TUNNEL_DB_SG_ID, LOOM_TUNNEL_DB_PORT, LOOM_TUNNEL_INSTANCE_TYPE, LOOM_TUNNEL_SSM_ENDPOINTS (all optional)
loom-import-sqliteUpload a SQLite Loom database, import it into Postgres from a backend task, fix the sequences, delete the uploadapprove-loom-import-sqliteLOOM_IMPORT_SQLITE, LOOM_IMPORT_SKIP_EXISTING
loom-fix-sequencesReset Postgres id sequences to each table’s highest id, from a backend tasknone
loom-reset-dbSnapshot, then drop and recreate the schema and roll the backendapprove-loom-reset-db
loom-credentialsList the AgentCore credential providers in the region and the ones this Loom recorded. Read-onlynone
loom-credentials-deleteDelete the credential providers this Loom recorded, and no othersapprove-loom-credentials-delete
loom-memoryInspect AgentCore memory: list, get, records, records by namespace, extraction jobs. Read-onlynoneLOOM_MEMORY_QUERY, LOOM_MEMORY_ID, LOOM_MEMORY_ACTOR_ID, LOOM_MEMORY_NAMESPACE
loom-cognito-set-passwordsSet a permanent password for named users, or every user still in FORCE_CHANGE_PASSWORDnoneLOOM_COGNITO_PASSWORD, LOOM_COGNITO_USERS
loom-seedRegister the agent role and a Cognito authorizer in Loom, plus demo content on the demo profile, through Loom’s APInoneLOOM_API_BASE_URL, LOOM_API_TOKEN, LOOM_SEED_PROFILE, LOOM_SEED_GROUP, LOOM_SEED_MODEL_ID, LOOM_DEMO_A2A_URL, LOOM_REGISTRY_ID
loom-agent-roleDeploy one agent’s execution role stack the way Loom’s role.yaml does, and register it in Loom tagged into a groupnoneLOOM_AGENT_ROLE_AGENT, LOOM_AGENT_ROLE_GROUP, LOOM_API_BASE_URL, LOOM_API_TOKEN; optional LOOM_AGENT_ROLE_MEMORY_ARN, LOOM_AGENT_ROLE_CODE_INTERPRETER, LOOM_AGENT_ROLE_BEDROCK_MODEL_ARNS
loom-dns-setupCreate the Route53 zone for a custom domain, print its NS records, and poll public DNS until the delegation resolvesnoneLOOM_DOMAIN_NAME
loom-auditCheck every pinned uses: reference in .github/workflows/ against upstream; report onlynoneGITHUB_TOKEN for the API rate limit

db/ is SQL Yodeler’s project for Loom’s Postgres schema, with its own two Ops, named for the deployment ({project}-{env}-{instance}). just db runs them; they aren’t in ops/ or chant run list.

OpWhat it doesGate
migrate-<deployment>Plan the pending migrations, then apply them as the master user. just db apply, and the upgrade Ops’ Schema phaseapprove-migrate-<deployment>, bound to the plan digest; approve with just db approve
watch-<deployment>Report declared tables and columns changed out of band or gone, as the read-only user. just db watchnone

Migrate Loom’s database has the whole workflow.

chant run loom-backup # no gate
chant run loom-upgrade-production # stops at the gate, exit 3
chant approve loom-upgrade-production approve-loom-upgrade-production
chant run loom-upgrade-production # continues past the approved gate
chant run list # every Op and its last run

Several have npm run aliases: watch, reconcile, audit, backup, cognito-export, restore, restore-drill, dns-setup and seed. just has watch, reconcile, audit, policy, agent-role <agent> <group>, bootstrap, tunnel-host, tunnel [port], import-sqlite <file>, fix-sequences, reset-db, credentials, credentials-delete, memory [query] [id] [who], set-passwords [users], cognito-client-id, cognito-token, db <command>, db-schema and db-replay. Loom make targets maps each to the make target it replaces.

Every gated Op, and the ungated ones that change a deployment (loom-upgrade-light, loom-restore-drill, loom-tunnel-host, loom-cognito-export, loom-cognito-set-passwords), is never run over chant’s MCP server: a coding agent connected to it can’t run them or approve their gates. The repository’s .mcp.json registers that server.

The mutating Ops start with a Preflight phase: the AWS credentials must resolve (and match AWS_ACCOUNT_ID when it’s set), and the stacks the Op touches must be settled, not mid-change or failed. The upgrade Op also checks the schema step can run, and on the production tiers checks its templates against policies/production.guard with CloudFormation Guard (just policy). Upgrade Loom has the details, and the Op waves in ops/waves/ that roll an upgrade or a rotation tier by tier.