Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
b8a6ebd
wip
ryanatkn Feb 21, 2026
539f690
wip
ryanatkn Feb 21, 2026
e67dd44
wip
ryanatkn Feb 21, 2026
64abc74
wip
ryanatkn Feb 21, 2026
8248c94
wip
ryanatkn Feb 21, 2026
c99056b
wip
ryanatkn Feb 21, 2026
696a54b
wip
ryanatkn Feb 22, 2026
750ffd3
wip
ryanatkn Feb 22, 2026
32c8fb4
wip
ryanatkn Feb 23, 2026
9a4c36b
wip
ryanatkn Feb 23, 2026
da9b473
wip
ryanatkn Feb 23, 2026
a4b1053
wip
ryanatkn Feb 23, 2026
ce873fa
wip
ryanatkn Feb 24, 2026
682524b
wip
ryanatkn Feb 24, 2026
75de40d
wip
ryanatkn Feb 24, 2026
86f998c
wip
ryanatkn Feb 24, 2026
1b72fce
wip
ryanatkn Feb 24, 2026
852ade8
wip
ryanatkn Feb 24, 2026
f3e0efc
wip
ryanatkn Feb 24, 2026
7a326dd
wip
ryanatkn Feb 24, 2026
401e05c
wip
ryanatkn Feb 25, 2026
ae905da
wip
ryanatkn Feb 28, 2026
f3c0238
wip
ryanatkn Feb 28, 2026
a7b82ae
wip
ryanatkn Feb 28, 2026
0cc5084
wip
ryanatkn Feb 28, 2026
9ce0ee0
wip
ryanatkn Feb 28, 2026
48ecf48
wip
ryanatkn Feb 28, 2026
664debf
wip
ryanatkn Feb 28, 2026
9d99266
wip
ryanatkn Feb 28, 2026
c6c7c58
wip
ryanatkn Feb 28, 2026
6c400f4
wip
ryanatkn Feb 28, 2026
7b24362
wip
ryanatkn Feb 28, 2026
52c0e97
wip
ryanatkn Mar 2, 2026
2378d22
wip
ryanatkn Mar 3, 2026
9c2b12b
wip
ryanatkn Mar 3, 2026
82464e2
wip
ryanatkn Mar 3, 2026
2e98abc
wip
ryanatkn Mar 4, 2026
bd26255
Merge branch 'main' into fuz-app
ryanatkn Mar 4, 2026
ee4573e
wip
ryanatkn Mar 4, 2026
982ef3a
wip
ryanatkn Mar 5, 2026
c734081
wip
ryanatkn Mar 6, 2026
7d3774d
wip
ryanatkn Mar 6, 2026
c02ba10
wip
ryanatkn Mar 6, 2026
65ff52e
wip
ryanatkn Mar 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 40 additions & 6 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,33 @@ For coding conventions, see [`fuz-stack`](../fuz-stack/CLAUDE.md).

## Development Stage

Early development, v0.0.1. Breaking changes are expected and welcome. No authentication — development use only. All state is in-memory (no database yet). The Hono/Node.js backend is a reference implementation that may be replaced by a Rust daemon (`fuzd`).
Early development, v0.0.1. Breaking changes are expected and welcome. No authentication — development use only. All state is in-memory (no database yet). The Hono/Node.js backend is a reference implementation that may be replaced by a Rust daemon (`fuzd`). Deno is a shortcut for the CLI and production server — long-term both migrate to Rust fuz/fuzd.

See [GitHub issues](https://github.com/fuzdev/zzz/issues) for planned work.

## CLI

zzz has a Deno-compiled CLI binary for daemon management and browser launching.
See [src/lib/zzz/CLAUDE.md](src/lib/zzz/CLAUDE.md) for full CLI architecture.

```bash
zzz # start daemon if needed, open browser
zzz ~/dev/ # open workspace at ~/dev/
zzz daemon start # start daemon (foreground)
zzz daemon status # show daemon info
zzz init # initialize ~/.zzz/
```

The global daemon runs on port 4460 with state at `~/.zzz/`. Built via
`gro_plugin_deno_compile` (see `gro.config.ts` and `deno.json`).

## Docs

- [docs/architecture.md](docs/architecture.md) — Action system, Cell system, content model, data flow
- [docs/development.md](docs/development.md) — Development workflow, extension points, patterns
- [docs/providers.md](docs/providers.md) — AI provider integration, adding new providers
- [src/lib/server/CLAUDE.md](src/lib/server/CLAUDE.md) — Backend server architecture, providers, security
- [src/lib/zzz/CLAUDE.md](src/lib/zzz/CLAUDE.md) — CLI architecture, commands, runtime abstraction

## Repository Structure

Expand All @@ -43,16 +60,24 @@ src/
├── lib/ # Published as @fuzdev/zzz
│ ├── server/ # Backend (Hono/Node.js reference impl)
│ │ ├── backend.ts
│ │ ├── server.ts
│ │ ├── server.ts # Node.js entry (dev mode)
│ │ ├── server_deno.ts # Deno entry (production/CLI)
│ │ ├── backend_action_handlers.ts
│ │ ├── backend_provider_*.ts # Ollama, Claude, ChatGPT, Gemini
│ │ ├── scoped_fs.ts
│ │ ├── security.ts
│ │ └── backend_action_types.gen.ts
│ │
│ ├── zzz/ # CLI (Deno compiled binary)
│ │ ├── main.ts # Entry point (deno compile target)
│ │ ├── cli.ts # Arg parsing wrapper
│ │ ├── cli_config.ts # ~/.zzz/config.json
│ │ ├── runtime/ # ZzzRuntime abstraction
│ │ ├── cli/ # CLI infrastructure
│ │ └── commands/ # init, daemon, open, status
│ │
│ ├── *.svelte.ts # Cell state classes (26 classes)
│ ├── action_specs.ts # All 20 action spec definitions
│ ├── action_spec.ts # ActionSpec schema
│ ├── action_event.ts # Action lifecycle state machine
│ ├── action_peer.ts # Symmetric send/receive
│ ├── cell.svelte.ts # Base Cell class
Expand Down Expand Up @@ -233,6 +258,7 @@ Each action is a plain object with Zod schemas for input/output:
```typescript
export const diskfile_update_action_spec = {
method: 'diskfile_update',
description: 'Write content to a file on disk',
kind: 'request_response',
initiator: 'frontend',
auth: 'public',
Expand Down Expand Up @@ -285,7 +311,7 @@ The `.zzz/` directory stores app data. Configured via `PUBLIC_ZZZ_DIR`.
| ------------ | -------------------------------------- |
| `state/` | Persistent data (completions logs) |
| `cache/` | Regenerable data, safe to delete |
| `run/` | Runtime ephemeral (server.json: PID, port) |
| `run/` | Runtime ephemeral (daemon.json: PID, port) |

All filesystem access goes through `ScopedFs` — path validation, no symlinks, absolute paths only.

Expand Down Expand Up @@ -332,6 +358,14 @@ From `src/lib/server/.env.development.example`:

## fuz_app

zzz is the primary source for the Cell and Action patterns that will become the `fuz_app` package — a shared foundation for Fuz ecosystem apps.
zzz is the reference implementation for Cell and Action patterns. ActionSpec
types have been extracted to `@fuzdev/fuz_app` — zzz imports them from
`@fuzdev/fuz_app/actions/action_spec.js` and `@fuzdev/fuz_app/actions/action_registry.js`.
Cell patterns and the full SAES runtime (ActionEvent, ActionPeer, transports)
remain in zzz until a second consumer needs them (DA-5).

The CLI and daemon lifecycle use `@fuzdev/fuz_app/cli/*` helpers: `DaemonInfo`
schema, `write_daemon_info`, `read_daemon_info`, `is_daemon_running`,
`stop_daemon`. The server writes `~/.zzz/run/daemon.json` (not `server.json`).

Last updated: 2026-02-10
Last updated: 2026-02-24
31 changes: 31 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"nodeModulesDir": "manual",
"unstable": ["sloppy-imports"],
"exclude": ["**/*.test.ts", "**/*.svelte.ts", "**/*.gen.ts", "src/test/"],
"tasks": {
"dev:start": "NODE_ENV=development deno run --allow-all src/lib/zzz/main.ts daemon start",
"install": "gro build && mkdir -p ~/.zzz/bin && cp dist_cli/zzz ~/.zzz/bin/zzz",
"check": "deno check src/lib/zzz/**/*.ts"
},
"imports": {
"@std/": "jsr:@std/",
"esm-env": "npm:esm-env@^1",
"hono": "npm:hono@^4",
"svelte": "npm:svelte@^5",
"zod": "npm:zod@^4",
"@electric-sql/pglite": "npm:@electric-sql/pglite@^0.3",
"@fuzdev/fuz_app/": "../fuz_app/src/lib/",
"@fuzdev/fuz_util/": "npm:/@fuzdev/fuz_util@^0.52.0/",
"@fuzdev/gro/": "npm:/@fuzdev/gro@^0.195.2/",
"ollama": "npm:ollama@^0.6",
"@anthropic-ai/sdk": "npm:@anthropic-ai/sdk@^0.71.2",
"openai": "npm:openai@^6.10.0",
"@google/generative-ai": "npm:@google/generative-ai@^0.24.1"
},
"fmt": {
"useTabs": true,
"lineWidth": 100,
"indentWidth": 2,
"singleQuote": true
}
}
Loading
Loading