- TypeScript 99%
- Shell 0.7%
- Dockerfile 0.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| docs | ||
| drizzle | ||
| images/sandbox | ||
| k8s | ||
| scripts | ||
| src | ||
| test | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| bun.lock | ||
| bunfig.toml | ||
| Dockerfile | ||
| drizzle.config.ts | ||
| mise.toml | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
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
- Install the GitHub App on a repo of roots. The repo becomes an estate (
src/webhooks/github.ts,src/services/estates.ts). - Open a pull request. You get one grouped plan note and a
terragucci/planstatus (src/services/executor.ts,plan). - Merge. Waves apply in order in a loam sandbox, and the log streams live (
executor.ts,apply;src/runner/loam.ts). - When a wave stops at the gate, it shows up in the inbox. Approving it writes a resolution to
chant/lifecycleand resumes the wave (src/services/approvals.ts,src/services/watcher.ts). - 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.