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.2%
  • Shell 0.7%
  • Dockerfile 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-08 07:29:54 +00:00
.forgejo/workflows Scaffold sluice: spec, service skeleton, fakes, harness, deploy manifests 2026-10-07 23:42:20 -04:00
docs /terragucci agent <ask>: a coding agent answers or changes a pull request from a sandbox with a read-only token and the asker's own model credential 2026-10-08 03:29:25 -04:00
drizzle /terragucci agent <ask>: a coding agent answers or changes a pull request from a sandbox with a read-only token and the asker's own model credential 2026-10-08 03:29:25 -04:00
k8s deploy: pin image sha-4cc04d4 2026-10-08 07:29:54 +00:00
scripts sandbox-bootstrap: no head -1 in pipelines (SIGPIPE under pipefail was exit 141) 2026-10-08 02:05:28 -04:00
src /terragucci agent <ask>: a coding agent answers or changes a pull request from a sandbox with a read-only token and the asker's own model credential 2026-10-08 03:29:25 -04:00
test /terragucci agent <ask>: a coding agent answers or changes a pull request from a sandbox with a read-only token and the asker's own model credential 2026-10-08 03:29:25 -04:00
.dockerignore Scaffold sluice: spec, service skeleton, fakes, harness, deploy manifests 2026-10-07 23:42:20 -04:00
.env.example /terragucci agent <ask>: a coding agent answers or changes a pull request from a sandbox with a read-only token and the asker's own model credential 2026-10-08 03:29:25 -04: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 README: the gated wave and drift smoke passed 2026-10-08 03:29:25 -04: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 moor 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 moor sandbox, and the log streams live (executor.ts, apply; src/runner/moor.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=moor with a MOOR_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/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), the moor template (sandboxes cold-bootstrap, about 25 s), a design partner. For what only Jake can do, see docs/plans/sluice.md §8; for the deploy, docs/home-cloud.md.