Skip to content

Save Riley v0.0.5 — Drop-In Framework + Claude Brain

Choose a tag to compare

@ctavolazzi ctavolazzi released this 22 Feb 16:21
· 6 commits to main since this release

Save Riley is now a real drop-in framework.

This release delivers the two things that turn a great game into a deployable platform: a config system the app actually reads, and Riley powered by a live Claude API.


The Drop-In Framework

fogsift.config.js — The API

One file. This is all it takes to make Save Riley yours:

```js
export default {
project: {
name: "Acme Backend",
techStack: ["Node.js", "PostgreSQL", "Redis"],
},
riley: {
brain: "claude", // 'static' (default) or 'claude'
personality: "sardonic",
secrets: [
"The auth module hasn't been audited since 2022.",
"One of the 'legacy' services is still in prod.",
],
},
};
```

  • `project.name` appears in boot logs: `BOOT: ACME_BACKEND_v5.2`
  • Forked repos without a config file build cleanly via fallback defaults
  • Generate one from any real codebase: `node fogsift-init.cjs --repo /your/project`

CLAUDE.md — Claude Code Context File

Fork the repo, run `claude`, start asking questions. CLAUDE.md tells Claude Code:

  • Full architecture map (every concern → file → notes)
  • How to add dialogue nodes, stages, state fields, skill checks
  • The Claude brain configuration + lore + narrative rules
  • The fogsift.config.js schema reference

Workflow:
```bash
gh repo fork FogSift/Save-Riley --fork-name my-project-arg
cd my-project-arg
node fogsift-init.cjs --repo /my-actual-project
claude "add 3 secrets about our auth module to fogsift.config.js"
```


Riley's Claude Brain

Set `riley.brain: 'claude'` and provide an API key. Riley responds in real-time between FSM plot beats.

Setup

```js
// fogsift.config.js
riley: {
brain: 'claude',
personality: 'glitching',
}
```

Then: `VITE_ANTHROPIC_API_KEY=sk-ant-...` in `.env.local`
OR: Main Menu → ▸ CLAUDE BRAIN → enter key → SAVE

Architecture

  • No backend. Browser → Anthropic API directly via native fetch + SSE.
  • Model: `claude-haiku-4-5-20251001` — fast, cheap, stays in character.
  • Rapport-tiered system prompt: 4 levels that change what Riley will and won't say.
  • Personality modes: corporate (clipped), sardonic (dry contempt), warm (invested, hiding something), glitching (degrades mid-conversation).
  • Secrets injection: `riley.secrets` enters the system prompt at rapport 7+. She hints. Never confirms.
  • Static mode unchanged: zero API calls when brain is 'static' or no key is set.

In-game UI

  • ⚡ LIVE badge in the chat header when Claude mode is active
  • Free-form text input appears when the FSM queue is empty
  • Streaming tokens character-by-character with pulse cursor
  • API key in localStorage only — never in game save, never committed

What Didn't Change

The base game is identical. All 16 stages, boss fight, all endings. Static DIALOGUE_TREE still drives every plot beat.


Build: 404 kB · Zero errors · `npm run build` ✓
Commit: `6ba1a30`
13 files changed, 790 insertions