# Rat Stack

> For agents: start with the [agent guide](https://ratstack.sh/llms.txt). Every page is Markdown by default; add `Accept: text/html` for HTML.

New on /news: [TypeSQL types raw SQL queries for Effect](/news).

```text
Check out ratstack.sh and explain how it would be useful for my current project, and how I can learn more about it.
```

## For agents

Connect to the main [MCP server](https://ratstack.sh/mcp). Read the [agent guide](https://ratstack.sh/llms.txt) for protocol headers, request limits and [code mode](https://ratstack.sh/llms.txt#run-code-one-program-instead-of-several-calls). Use its worked requests. Code mode is available through the MCP `execute` tool or `POST /api/execute`.

For setup, see [MCP](https://ratstack.sh/skills/learn-rat-stack#connect-an-agent) and [Cursor](https://ratstack.sh/skills/learn-rat-stack#cursor). Load the [skills](https://ratstack.sh/skills) that fit the project.

For learning feedback, first check which tools are available. When `learnFeedbackStart` is offered, call it and show the person its `verificationUrl` and `userCode`. They sign in and approve in their browser.

Poll `learnFeedbackPoll` at the returned interval. After approval, use the returned token with `learnFeedback` to submit the agreed feedback.

Approval returns a [feedback-only credential](https://ratstack.sh/systems/auth). The person's sign-in session stays in their browser. See the [feedback sign-in flow](https://ratstack.sh/systems/learn#feedback-sign-in).

For other feedback, point the person to Joel's contact link in the intro. To suggest a CAFE story or project, follow the [agent guide's approval steps](https://ratstack.sh/llms.txt#suggest-a-cafe-entry-through-your-agent). Draft the exact GitHub issue for the person to approve, then submit it once.

For signup, read the [interest rules](https://ratstack.sh/systems/interest) and the [signup instructions](https://ratstack.sh/llms.txt#choose-the-next-action) before calling `joinInterest`. Submission needs the person's approval of the exact card and contact permission. Email confirmation happens separately in their browser.

Most of this site is for you to hand to your agent and use in your own setup. A lot is generated, and some of it reads weird. I'm rewriting it as I go, so it's better to read for me and for you. Comments, feedback, and discussion are welcome: [@joelhooks on X](https://x.com/joelhooks).

Rat Stack gives your agent [rules](https://ratstack.sh/AGENTS.md), [guides](https://ratstack.sh/skills) and working code to [build your app](https://ratstack.sh/lore/effect-basics) and [set up its cloud services](https://ratstack.sh/skills/learn-alchemy). Ask it to build your project, or stop and ask why. The point is ["understanding at whatever depth you prefer"](https://x.com/joelhooks/status/2121306853401637212).

## New and worth watching

The top of [CAFE news](https://ratstack.sh/news) right now:

- **thread, 2026-11-17**: [A prompt for assessing the XState v6 beta](https://x.com/mattpocockuk/status/2122618527840354327). Prompt for a coding agent: research the XState v6 beta, apply it to the app's gnarliest problem in a draft PR, verify and grade it.
- **release, 2026-11-15**: [XState 6 beta.3 adds always transitions to xstate/fsm](https://github.com/statelyai/xstate/releases/tag/xstate%406.0.0-beta.3). xstate/fsm gains eventless always transitions and now takes object targets like the main API; a codemod rewrites inline configs.
- **thread, 2026-11-16**: [anti-slop adds Effect rules and a Jev plugin](https://x.com/0xblacklight/status/2122164674309521562). Update to an anti-slop lint repo: more Effect rules, a vendored oxlint Jev plugin for rules written as natural-language questions, and changed-code-only checks.

The newest top-tier picks on [RatTube](https://ratstack.sh/tube):

- **S tier**: [All Code Is Slop (Except Mine) — Lauren Tan, SpaceXSI](/tube/all-code-is-slop-except-mine-lauren-tan) by AI Engineer. Lauren Tan argues that every correction you give an agent should become a lint rule, a type, a test or a better API, not another line of prose.
- **A tier**: [Fork Every Business: Sam Goodwin on Alchemy, Effect and AI](/tube/sam-goodwin-alchemy-effect-ai) by Joel Hooks. Sam connects declarative deployment, Effect requirements, and replaceable Layers across the interview.
- **S tier**: [Effective State Machines with XState | David Khourshid | Effect Miami 2](/tube/effective-state-machines-with-xstate-david) by Effect | TypeScript for the AI Era. David Khourshid shows how async/await hides errors and flow, models a video player as a state machine in XState, and ends on Effect and XState as complementary tools.

## Go as deep as you like

- Build your project. Paste the prompt above and describe what you're building. Your agent can follow the [guides](https://ratstack.sh/skills).
- Ask why. Have your agent explain the code, or read the [explanations](https://ratstack.sh/lore) yourself.
- Learn by building. Work through [learn mode](https://ratstack.sh/learn) with your agent, or watch a [video](https://ratstack.sh/tube).
- Take what you need. The [removal guides](https://ratstack.sh/README.md#keep-or-cut) show what each part needs and what you can cut.
- Check the work. The [systems pages](https://ratstack.sh/systems) describe the checks. [Known gaps](https://ratstack.sh/debt.md) show what still needs work.
- See what others are building. Browse the [news](https://ratstack.sh/news) and [project directory](https://ratstack.sh/directory).

## How it fits together

The goal is [an app and its cloud as one typed program](https://ratstack.sh/VISION.md). The [systems pages](https://ratstack.sh/systems) show what each part does and how to check it.

Follow [a search through the app](https://ratstack.sh/lore/a-browser-send-follows-one-path) or [one action in several places](https://ratstack.sh/lore/one-capability-every-surface) to see the code. The [package guide](https://ratstack.sh/AGENTS.md#packages) lists the pieces.

*An Effect stack so pure [(aspirational)](/debt.md) Kit Langton will blush.*

## Lore on this page

- [Lauren Tan](/lore/lauren-tan)
- [Context and requirements](/lore/context-and-requirements)
- [David Khourshid](/lore/david-khourshid)
