A hosted change plane for Terraform and OpenTofu: plans on pull requests, gated applies in waves, approvals on your own chant/lifecycle branch, no stored cloud credential.
  • TypeScript 99%
  • Shell 0.7%
  • Dockerfile 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-12 06:48:46 +00:00
.forgejo/workflows Add a loam runner and make it sluice's runner (#13) 2026-10-12 06:46:30 +00:00
docs Add a loam runner and make it sluice's runner (#13) 2026-10-12 06:46:30 +00:00
drizzle Run terragucci 0.4, and honour an estate's terragucci version in a templated sandbox 2026-10-08 01:56:17 -06:00
images/sandbox Add a loam runner and make it sluice's runner (#13) 2026-10-12 06:46:30 +00:00
k8s deploy: pin image sha-a88bccd 2026-10-12 06:48:46 +00:00
scripts Add a loam runner and make it sluice's runner (#13) 2026-10-12 06:46:30 +00:00
src Add a loam runner and make it sluice's runner (#13) 2026-10-12 06:46:30 +00:00
test Add a loam runner and make it sluice's runner (#13) 2026-10-12 06:46:30 +00:00
.dockerignore Scaffold sluice: spec, service skeleton, fakes, harness, deploy manifests 2026-10-07 23:42:20 -04:00
.env.example Add a loam runner and make it sluice's runner (#13) 2026-10-12 06:46:30 +00:00
.gitignore Scaffold sluice: spec, service skeleton, fakes, harness, deploy manifests 2026-10-07 23:42:20 -04:00
bun.lock Scaffold sluice: spec, service skeleton, fakes, harness, deploy manifests 2026-10-07 23:42:20 -04:00
bunfig.toml Scaffold sluice: spec, service skeleton, fakes, harness, deploy manifests 2026-10-07 23:42:20 -04:00
Dockerfile Scaffold sluice: spec, service skeleton, fakes, harness, deploy manifests 2026-10-07 23:42:20 -04:00
drizzle.config.ts Scaffold sluice: spec, service skeleton, fakes, harness, deploy manifests 2026-10-07 23:42:20 -04:00
mise.toml Scaffold sluice: spec, service skeleton, fakes, harness, deploy manifests 2026-10-07 23:42:20 -04:00
package.json Scaffold sluice: spec, service skeleton, fakes, harness, deploy manifests 2026-10-07 23:42:20 -04:00
README.md Add a loam runner and make it sluice's runner (#13) 2026-10-12 06:46:30 +00:00
tsconfig.json Scaffold sluice: spec, service skeleton, fakes, harness, deploy manifests 2026-10-07 23:42:20 -04:00

sluice

A hosted change plane for Terraform and OpenTofu: terragucci as a service. In the plan's words: the AI writes the plan; something else holds the keys (docs/plans/sluice.md §2).

sluice holds nothing hostage. Approvals are records on the customer's own chant/lifecycle branch. Plans and reports go to a bucket. State stays in the customer's backend. Every run executes in a throwaway loam sandbox that holds a five-minute OIDC token for one estate and one phase, and nothing else that outlives it.

The MVP loop

  1. Install the GitHub App on a repo of roots. The repo becomes an estate (src/webhooks/github.ts, src/services/estates.ts).
  2. Open a pull request. You get one grouped plan note and a terragucci/plan status (src/services/executor.ts, plan).
  3. Merge. Waves apply in order in a loam sandbox, and the log streams live (executor.ts, apply; src/runner/loam.ts).
  4. When a wave stops at the gate, it shows up in the inbox. Approving it writes a resolution to chant/lifecycle and resumes the wave (src/services/approvals.ts, src/services/watcher.ts).
  5. A nightly drift run keeps one issue updated (src/services/drift.ts, executor.ts, drift).

Run it locally

mise install          # Bun 1.4.2 (mise.toml)
bun install
bun test              # no network, no env
bun run typecheck
bun run dev           # http://localhost:3000

With no env set, bun run dev uses in-memory PGlite, the FakeRunner, FakeForge, the MemoryReportStore and an ephemeral OIDC key (src/deps.ts). To sign in without GitHub, open http://localhost:3000/console/login?dev=<login>. This works when the GitHub client id or secret is unset and NODE_ENV is not production (src/console/github.ts devLoginEnabled). A dev login sees every installation. docs/SPEC.md §10 lists the console's pages.

A real run

A real run needs the GitHub App values, RUNNER=loam with a LOAM_TOKEN, OIDC_SIGNING_KEYS, a reports bucket and a real SESSION_SECRET. Every variable is in docs/SPEC.md §3. assertProductionConfig() in src/config.ts refuses to boot in production without them. Where each secret lives and how to rotate it is in docs/OPERATIONS.md.

Docs

File What it covers
docs/plans/sluice.md The plan: thesis, architecture, MVP, milestones, risks, market
docs/SPEC.md The engineering contract: config, schema, interfaces, workstreams
docs/ARCHITECTURE.md How the code works today: run lifecycle, queue, watcher, tokens, deviations from the plan
docs/approvals.md What an approval in sluice is, and what it is not, in each mode (written for customers)
docs/report-links.md Who can open the report and plans a pull request note links, how the signed links work, what a leaked one exposes
docs/oidc.md The trust-policy statements a customer pastes into AWS, GCP or Azure, and the authentication config for a Kubernetes cluster
docs/runbook-design-partner.md Onboarding one design partner through the MVP definition
docs/OPERATIONS.md Deploy, secrets, backups, alerts, known limits
docs/home-cloud.md The one-time checklist for putting sluice on home-cloud

Status

Deployed at https://sluice.inevitable.fyi on home-cloud since 2026-10-08 (image built by .forgejo/workflows/build.yml, rolled out by Flux). The GitHub App sluice-by-jhgaylor is installed; the dogfood estate jhgaylor/terragucci-hello-world has had a plan note on a pull request, a check and a wave applied on merge, a gated wave approved from the inbox (the resolution landed on chant/lifecycle), and a scheduled drift run, all in moor sandboxes. Not yet: an AWS trust policy (no cloud estate), a design partner. Runs move from moor to loam with RUNNER=loam (docs/OPERATIONS.md, "The runner: loam"), since moor is being retired. For what only Jake can do, see docs/plans/sluice.md §8; for the deploy, docs/home-cloud.md.