acidnet

amenoacids’ working estate: the apps he runs, the records of what he runs and pays for, and the Effect + Alchemy stack under them. VISION.md says what belongs here. AGENTS.md is the law for agents.

acidnet grew out of rat-stack at b8df5c2. Sections from “Create a repository” down still describe that inherited template, and they stay accurate for the stack.

What acidnet adds

PathWhat it is
apps/session-reviewPrivate session review program: journaled batches, hash-bound human approval, cheap-mode reviews
apps/stewardOperational work in Amp. Slice 1 is the thread janitor: it plans, and a person approves the plan’s hash
packages/journalAppend-only JSONL journal and actor conventions shared by the apps
packages/workspaceWorktree-backed Workspace port for eval trials
packages/usage, apps/infra/alchemy.railway.tsRailway usage service and its guarded deploy wrapper
registers/Machines and subscriptions registers
scripts/eval, results/Assay eval suite and its baseline results

Checks run locally

Lefthook runs pnpm check and pnpm test before every commit. The agent hooks in .amp/plugins/hook-fence.ts, .claude/settings.json, .cursor/ and .pi/ call scripts/vcs-command-policy.js, which blocks --no-verify and every other way of skipping the hook. The CI workflows run only when started by hand (workflow_dispatch); ratstack-publish.yml still runs on ratstack-v* tags.

Apps that run in Amp orbs get their dependencies from .agents/setup. Private data belongs under the git-ignored .amp/in/ and never enters a commit.

Create a repository

gh repo create <name> --template joelhooks/rat-stack

Clone the new repository, then install and verify it:

nvm use
pnpm install
pnpm vendor:agent-sources
pnpm sources:fetch
pnpm turbo run check test build

Node 24.18.0 and pnpm 11.3.0 are required. The requirement is declared in .nvmrc, engines, devEngines, and packageManager.

Workspace layout

Try the example CLI

The included stats command counts bytes, Unicode characters, words, and lines in a file:

pnpm cli stats README.md
pnpm cli stats README.md --json

After pnpm build, you can run the built entrypoint directly:

node apps/cli/dist/cli.js stats README.md

The same capability on the other surfaces:

pnpm cli openapi                 # OpenAPI 3.1 document for the REST projection
pnpm cli serve --port 3000       # POST /inspectFile, GET /openapi.json, GET /docs
pnpm cli mcp                     # MCP server over stdio, one tool per capability
pnpm cli mcp --code-mode         # MCP server with two tools: search and execute
pnpm cli catalog --types         # the `tools` declarations a code-mode program sees

Code mode23 is another projection. The model gets search for ranked matches with TypeScript signatures and execute for JavaScript with tools in scope35. The program runs in a fresh Node subprocess under --permission. It cannot touch the file system or spawn processes. To call the host, it uses tools.<name>(input). The host validates the input schema and runs the same handler used by every other surface26. Node’s permission model allows network egress. Put a Worker or Deno runtime behind the same Sandbox service to isolate the network too.

packages/capability/src is where a capability becomes a Command, an HttpApiEndpoint, a Tool, and a catalog entry. packages/core/src/inspect-file.ts supplies the CLI’s example capability. Hosted content has its own registry in apps/site/src/capabilities/index.ts. Provider adapters stay outside core (rat-stack-boundaries/no-core-adapters); apps provide them to core’s job-shaped ports at composition. Add another to capabilities28, then verify every projection you keep; CLI command registration lives in apps/cli/src/command.ts.

What is in the stack?

Every dependency is pinned exactly. Review pin upgrades as stack changes.

Commands

Agentic surface

Every clone includes AGENTS.md for repo law and commands, CLAUDE.md as Claude Code’s pointer to that law, and VISION.md for project intent. Source mirrors live under .agent_sources/ after you run the vendor script. Repo-local Pi extensions belong in .pi/extensions/.

Make it yours

Start with the template:

gh repo create <name> --template joelhooks/rat-stack

Clone the new repository, then install it:

pnpm install
pnpm sources:fetch

pnpm sources:fetch imports missing pinned source commits from the configured repository remotes once, including in template children. Generation reads only local Git objects and never fetches. Re-run the command when adding a new pin that is not present locally.

Rename the workspace package names before you build on the example. These are examples, not the full package inventory:

Rename the bin entry in apps/cli/package.json, the root command in apps/cli/src/command.ts, and the version in apps/cli/src/version.ts. Then change every matching import and workspace manifest reference. Find the current @rat-stack/ names with:

rg -n '@rat-stack/' --glob '*.json' --glob '*.ts' -l

A new scope changes line lengths, so run the formatter once after the rename:

pnpm fix

Replace inspectFile in packages/core with one useful capability. Add it to capabilities28, then verify each surface you keep. Rewrite the Project law, Architecture, and Boundaries sections of AGENTS.md and the top of .pi/APPEND_SYSTEM.md; they describe rat-stack until you do. Keep expected failures typed and map them to deliberate exit codes.

apps/site is the public site and Worker. apps/infra is its Alchemy Stack. The browser reader and content build also depend on apps/site; deleting those directories alone is not a supported cut. Trace the dependencies in Keep or cut first. If you keep the site, change the Cloudflare Zone name and the DNS names and targets derived from it in apps/infra/alchemy.run.ts. Change the Worker domain and redirects in apps/site/src/worker.ts. Choose an Alchemy stage for each plan or deploy. The stage is a command-line choice, for example --stage <stage>. Configure credentials with:

pnpm alchemy profile edit --add Cloudflare

Run the acceptance gate before the first push:

pnpm turbo run check test build

What it promises and how to check

Keep or cut

Choose a feature cut below. Combined package names mean the dependent features go together; the Keep entries name shared build dependencies, not independent removal recipes. After each cut, update the package list in AGENTS.md and run pnpm install, pnpm fix, pnpm git-snapshot, and pnpm turbo run check test build. For projection cuts, trim packages/capability/src/index.ts too. These are local-source cuts, not instructions to destroy deployed resources or data.

defineContract, implement, and toCommand are the minimum that keep stats working. The contract module has no dependency on the other projections.

License

MIT


Last changed 2026-11-11 in 08d6482. Source on GitHub. Change log.

Linked from

  1. Agent rules for rat-stack (AGENTS.md). What you may change, which commands to run, and which changes need approval.
  2. Effect + Alchemy peer patterns. Source-grounded patterns from repos on nearby Effect and Alchemy pins.
  3. gardener. Keep rat-stack current and clean. Update exact dependency versions, learn from repos on the same versions, and add lint rules before cleanup.
  4. Learn mode presents concepts at useful depths. An agent presents source-derived concepts during real work and keeps learning events in a private local log.
  5. model-a-protocol. Check a protocol with a small TLA+ model before you build or change it. Use when steps can interleave or die halfway, such as a crash between two writes, a retry after an unknown outcome, an alarm or sweep that redrives work, or two writers on one record. Also use when asked "can this race?", "what if it dies here?", or "model this", or before a durability design review.