|
8 | 8 | > |
9 | 9 | > The open target format and runtime for AI-written business apps. Your coding |
10 | 10 | > agent writes models, UI, workflows, and permissions as compact typed metadata — |
11 | | -> often around 1% of a traditional codebase — and strict TypeScript, Zod schemas, |
12 | | -> and a validation gate catch its mistakes at authoring time. The runtime derives |
13 | | -> the database, REST API, UI, and MCP server, and enforces permissions and audit |
14 | | -> on every call. |
| 11 | +> [a complete CRM is under 2,000 lines](#why-the-mistakes-dont-ship), so the whole |
| 12 | +> app fits in the agent's context — and strict TypeScript, Zod schemas, and a |
| 13 | +> validation gate catch its mistakes at authoring time. The runtime derives the |
| 14 | +> database, REST API, UI, and MCP server, and enforces permissions and audit on |
| 15 | +> every call. |
15 | 16 |
|
16 | | -`~1% code surface` · `Typed, validated, governed` · `Self-host anywhere` · Apache-2.0 |
| 17 | +`Fits in an agent's context` · `Typed, validated, governed` · `Self-host anywhere` · Apache-2.0 |
17 | 18 |
|
18 | 19 | <p align="center"> |
19 | 20 | <img src="docs/screenshots/architecture.png" width="940" alt="ObjectStack architecture: author typed Zod metadata (objects, flows, views, policies); the microkernel compiles it into a versioned JSON artifact and loads plugins, drivers, and services; it generates a REST API, client SDK, Console and Studio UI, and MCP tools used by developers and AI agents, governed by Auth, RBAC, RLS, FLS, and audit, over PostgreSQL, MySQL, SQLite, or MongoDB"> |
@@ -121,11 +122,20 @@ The reason this works is the same reason TypeScript was the right host language: |
121 | 122 | **an agent's errors become located, corrective text it can read and fix itself**, |
122 | 123 | in seconds — instead of a silent runtime failure nobody traces back. |
123 | 124 |
|
124 | | -And because the whole business system is a few hundred lines of typed metadata |
125 | | -rather than tens of thousands of lines of CRUD and glue, it **fits in an agent's |
126 | | -context window** — so the agent can load it end-to-end, reason about every |
127 | | -dependency, and refactor across data, API, UI, and permissions in one change. |
128 | | -That's the difference between AI as autocomplete and AI as a co-maintainer. |
| 125 | +The other half is size. The CRM in this repo — [`examples/app-crm`](./examples/app-crm): |
| 126 | +six objects, views, a dashboard, a lead-conversion flow, permission sets, actions, |
| 127 | +translations — is **31 files, 1,792 lines, roughly 16k tokens**. That's the whole |
| 128 | +business system, in about 8% of a 200k-token context window. Count it yourself: |
| 129 | + |
| 130 | +```bash |
| 131 | +find examples/app-crm/src -name '*.ts' -not -name '*.test.ts' | xargs cat | wc -l |
| 132 | +``` |
| 133 | + |
| 134 | +Because it **fits in an agent's context window**, the agent can load it |
| 135 | +end-to-end, reason about every dependency, and refactor across data, API, UI, and |
| 136 | +permissions in one change — it can answer *"what breaks if I change this?"* |
| 137 | +instead of grepping and hoping. That's the difference between AI as autocomplete |
| 138 | +and AI as a co-maintainer. |
129 | 139 |
|
130 | 140 | > Your objects, permissions, and flows are your business ontology — and the |
131 | 141 | > definition layer of the AI era should be an open protocol you own. |
|
0 commit comments