oneie 3.3.3 → 3.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@
13
13
  https://one.ie • npx oneie
14
14
  ```
15
15
 
16
- **Version:** 1.0.0 | **Bootstrap AI-first projects in 30 seconds**
16
+ **Version:** 2.0.0 | **Bootstrap AI-first projects in 30 seconds**
17
17
 
18
18
  </div>
19
19
 
@@ -22,7 +22,7 @@
22
22
  ## ✨ Get Started
23
23
 
24
24
  ```bash
25
- npx oneie
25
+ npx oneie init
26
26
  ```
27
27
 
28
28
  That's it. Your complete ontology-driven platform is ready.
@@ -31,317 +31,294 @@ That's it. Your complete ontology-driven platform is ready.
31
31
 
32
32
  ## Core Concept
33
33
 
34
- The ONE CLI creates **living, ontology-driven codebases** that AI agents can understand and extend:
34
+ The ONE CLI creates **living, ontology-driven codebases** with installation folder architecture for multi-tenancy:
35
35
 
36
36
  ```
37
- npx oneie
37
+ npx oneie init
38
38
  ↓
39
- Downloads /one/ → Generates Frontend → Generates Backend → Configures AI → Ready!
39
+ Global Ontology + Installation Folder + Web App + Backend → Ready!
40
40
  ```
41
41
 
42
- **Result:** A complete Astro + Effect.ts + Backend-of-Choice project where:
42
+ **Result:** A complete system where:
43
43
 
44
- - Every organization, person, thing, connection, event, and knowledge maps to the 6-dimension ontology
45
- - **Backend-agnostic frontend** works with Convex, WordPress, Notion, Supabase, or custom APIs
46
- - AI agents (Claude, GPT, MCPs) can generate features using the DSL
47
- - Code is type-safe, tested, and production-ready
48
- - Organizations can use their **existing infrastructure**
44
+ - `/one/` - Global ontology templates (6-dimension architecture)
45
+ - `/<installation-name>/` - Your private customizations (overrides `/one/`)
46
+ - `/web/` - Astro 5 + React 19 frontend
47
+ - `/backend/` - Convex backend with 6-dimension schema
48
+ - AI agents understand the ontology and can generate features
49
+ - Groups support hierarchical documentation
49
50
 
50
51
  ---
51
52
 
52
- ## Bootstrap Architecture
53
-
54
- ```
55
- ┌─────────────────────────────────────────────────────────────┐
56
- │ 1. CLONE ONTOLOGY & DOCS │
57
- │ │
58
- │ Creates 2 directories: │
59
- │ │
60
- │ /one/ - Ontology documentation (from source repo): │
61
- │ • Ontology.md (6-dimension universe) │
62
- │ • ontology-frontend.md (backend-agnostic patterns) │
63
- │ • ontology-backend.md (Convex + Effect.ts) │
64
- │ • Rules.md, Patterns.md, Workflow.md │
65
- │ • Protocol specs (A2A, ACP, AP2, X402, AGUI) │
66
- │ • DSL specs, Architecture docs │
67
- │ │
68
- │ /docs/ - 3rd party documentation (cloned for AI): │
69
- │ • Astro docs │
70
- │ • Convex docs │
71
- │ • Effect.ts docs │
72
- │ • React docs │
73
- └─────────────────────────────────────────────────────────────┘
53
+ ## Installation Folder Architecture
54
+
55
+ ```
56
+ ┌──────────────────────────────────────────────────────────────┐
57
+ │ 1. GLOBAL ONTOLOGY (Template) │
58
+ │ │
59
+ │ /one/ - Global ontology documentation: │
60
+ │ ├── groups/ # Multi-tenancy & hierarchies │
61
+ │ ├── people/ # Authorization & roles │
62
+ │ ├── things/ # 66+ entity types │
63
+ │ ├── connections/ # 25+ relationship types │
64
+ │ ├── events/ # 67+ event types │
65
+ │ └── knowledge/ # RAG, embeddings, search │
66
+ │ │
67
+ │ This is the SOURCE OF TRUTH - never edited directly │
68
+ └──────────────────────────────────────────────────────────────┘
74
69
  ↓
75
- ┌─────────────────────────────────────────────────────────────┐
76
- │ 2. GENERATE FRONTEND (Astro 5 + React 19 + Effect.ts) │
77
- │ 📖 See: one/knowledge/ontology-frontend.md │
78
- │ │
79
- │ frontend/ │
80
- │ ├── src/ │
81
- │ │ ├── pages/*.astro # SSR pages │
82
- │ │ ├── components/ui/* # shadcn/ui (50+) │
83
- │ │ ├── components/features/* # Feature components │
84
- │ │ ├── providers/ # Backend-agnostic layer │
85
- │ │ │ ├── DataProvider.ts # Universal ontology API │
86
- │ │ │ ├── convex/ # Convex implementation │
87
- │ │ │ ├── wordpress/ # WordPress provider │
88
- │ │ │ └── notion/ # Notion provider │
89
- │ │ ├── services/ # Effect.ts client layer │
90
- │ │ │ ├── ThingClientService.ts # Generic thing ops │
91
- │ │ │ └── ConnectionClientService.ts # Connection ops │
92
- │ │ ├── styles/global.css # Tailwind v4 │
93
- │ │ └── layouts/Layout.astro # Base layout │
94
- │ ├── public/ # Static assets │
95
- │ └── astro.config.mjs # Provider selection │
96
- └─────────────────────────────────────────────────────────────┘
70
+ ┌──────────────────────────────────────────────────────────────┐
71
+ │ 2. INSTALLATION FOLDER (Your Customizations) │
72
+ │ │
73
+ │ /<installation-name>/ - Private docs that override /one/: │
74
+ │ ├── README.md # Installation overview │
75
+ │ ├── groups/ # Hierarchical group docs │
76
+ │ │ ├── engineering/ │
77
+ │ │ │ ├── frontend/ # Nested subgroup │
78
+ │ │ │ │ └── practices.md │
79
+ │ │ │ └── backend/ │
80
+ │ │ │ └── api-patterns.md │
81
+ │ │ └── marketing/ │
82
+ │ │ └── campaign-playbook.md │
83
+ │ ├── people/ # People profiles │
84
+ │ ├── things/ # Custom entity definitions │
85
+ │ ├── connections/ # Custom relationships │
86
+ │ ├── events/ # Custom events │
87
+ │ └── knowledge/ # Custom knowledge/RAG │
88
+ │ │
89
+ │ File Resolution: installation → global fallback │
90
+ │ Hierarchical: frontend → engineering → installation → global│
91
+ └──────────────────────────────────────────────────────────────┘
97
92
  ↓
98
- ┌─────────────────────────────────────────────────────────────┐
99
- │ 3. GENERATE BACKEND (Convex + Effect.ts) │
100
- │ 📖 See: one/knowledge/ontology-backend.md │
101
- │ │
102
- │ backend/ │
103
- │ ├── convex/ │
104
- │ │ ├── schema.ts # 6-dimension schema │
105
- │ │ ├── services/ # Effect.ts services │
106
- │ │ ├── mutations/ # Convex mutations │
107
- │ │ ├── queries/ # Convex queries │
108
- │ │ ├── actions/ # Convex actions │
109
- │ │ └── providers/ # External integrations │
110
- │ └── package.json # Backend dependencies │
111
- └─────────────────────────────────────────────────────────────┘
93
+ ┌──────────────────────────────────────────────────────────────┐
94
+ │ 3. WEB APP (Astro 5 + React 19) │
95
+ │ │
96
+ │ /web/ │
97
+ │ ├── src/ │
98
+ │ │ ├── pages/*.astro # SSR pages │
99
+ │ │ ├── components/ui/* # shadcn/ui (50+) │
100
+ │ │ ├── components/features/* # Feature components │
101
+ │ │ ├── services/ # Effect.ts client services │
102
+ │ │ ├── styles/global.css # Tailwind v4 │
103
+ │ │ └── layouts/Layout.astro # Base layout │
104
+ │ ├── public/ # Static assets │
105
+ │ └── astro.config.mjs # Configuration │
106
+ └──────────────────────────────────────────────────────────────┘
112
107
  ↓
113
- ┌─────────────────────────────────────────────────────────────┐
114
- │ 4. CREATE IMPORT UTILITIES │
115
- │ │
116
- │ import/ │
117
- │ └── ... # Data import scripts │
118
- └─────────────────────────────────────────────────────────────┘
108
+ ┌──────────────────────────────────────────────────────────────┐
109
+ │ 4. BACKEND (Convex + Effect.ts) │
110
+ │ │
111
+ │ /backend/ │
112
+ │ └── convex/ │
113
+ │ ├── schema.ts # 6-dimension schema │
114
+ │ ├── services/ # Effect.ts business logic │
115
+ │ ├── mutations/ # Convex mutations │
116
+ │ ├── queries/ # Convex queries │
117
+ │ ├── actions/ # Convex actions │
118
+ │ └── providers/ # External integrations │
119
+ └──────────────────────────────────────────────────────────────┘
119
120
  ↓
120
- ┌─────────────────────────────────────────────────────────────┐
121
- │ 5. CONFIGURE AI INTEGRATION │
122
- │ │
123
- │ • CLAUDE.md (instructions for Claude Code) │
124
- │ • AGENTS.md (Convex patterns) │
125
- │ • .claude/hooks/ (pre/post hooks) │
126
- │ • .mcp.json (MCP server config) │
127
- │ • scripts/mcp-ontology-server.js (ontology API) │
128
- └─────────────────────────────────────────────────────────────┘
121
+ ┌──────────────────────────────────────────────────────────────┐
122
+ │ 5. AI INTEGRATION │
123
+ │ │
124
+ │ • CLAUDE.md (Claude Code instructions) │
125
+ │ • AGENTS.md (Convex patterns) │
126
+ │ • .claude/hooks/ (pre/post hooks) │
127
+ │ • .mcp.json (MCP server config) │
128
+ └──────────────────────────────────────────────────────────────┘
129
129
  ```
130
130
 
131
131
  ---
132
132
 
133
133
  ## Usage
134
134
 
135
- ### Bootstrap New Project
135
+ ### Bootstrap New Installation
136
136
 
137
137
  ```bash
138
- npx oneie create my-creator-platform
139
- cd my-creator-platform
138
+ npx oneie init
139
+ ```
140
+
141
+ **Interactive prompts:**
142
+
143
+ ```
144
+ ✨ Welcome to ONE!
145
+
146
+ ONE is organized by groups which have their own people, things,
147
+ connections, events, and knowledge. Groups can have subgroups.
148
+
149
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
150
+
151
+ 📥 Downloading ONE Framework...
152
+
153
+ ✓ Copied 100+ ontology files from /one/
154
+ ✓ Synced 12 agent definitions to .claude/agents/
155
+ ✓ Copied Claude Code hooks and commands
156
+
157
+ ONE Setup Complete! 🎉
158
+
159
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
160
+
161
+ 👤 Account Setup
162
+
163
+ What's your name? Anthony O'Connell
164
+ What's your email? anthony@one.ie
165
+
166
+ ✓ Created your profile in one/people/anthony-o-connell.md
167
+
168
+ Account Setup Complete! 🎉
169
+
170
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
171
+
172
+ 🏢 Organization Setup
173
+
174
+ What's your organization name? Acme Corp
175
+ Installation identifier: acme
176
+ Domain: acme.com
177
+
178
+ Creating your installation folder...
179
+ ✓ /acme/groups/
180
+ ✓ /acme/people/
181
+ ✓ /acme/things/
182
+ ✓ /acme/connections/
183
+ ✓ /acme/events/
184
+ ✓ /acme/knowledge/
185
+
186
+ ✓ Created installation README
187
+ ✓ Updated .env.local with INSTALLATION_NAME=acme
188
+
189
+ Organization Setup Complete! 🎉
190
+
191
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
192
+
193
+ 🌐 Next: Create Your First Group
194
+
195
+ Visit your web app to create groups in the database:
196
+ cd web && bun run dev
197
+
198
+ Then run this to generate group documentation:
199
+ npx oneie create-group-docs
200
+
201
+ You're all set! 🚀
140
202
  ```
141
203
 
142
204
  **Generated structure:**
143
205
 
144
206
  ```
145
- my-creator-platform/
146
- ├── one/ # ⭐ Ontology (cloned from source)
147
- │ ├── people/ # Dimension 2: Authorization & intent
148
- │ ├── things/ # Dimension 3: Entities (66 types)
149
- │ ├── connections/ # Dimension 4: Relationships (25 types)
150
- │ │ └── ontology-frontend.md # 🔑 Frontend implementation guide
151
- │ ├── events/ # Dimension 5: Behavior patterns (67 types)
152
- │ └── knowledge/ # Dimension 6: Embeddings & search
153
- │
154
- ├── frontend/ # ⭐ Generated Astro + React app
155
- │ ├── src/
156
- │ │ ├── pages/ # Astro pages
157
- │ │ ├── components/ # React components
158
- │ │ ├── providers/ # Backend-agnostic layer
159
- │ │ ├── services/ # Effect.ts client services
160
- │ │ ├── hooks/ # React hooks
161
- │ │ ├── ontology/ # UI config
162
- │ │ └── styles/ # CSS/Tailwind
163
- │ ├── public/ # Static assets
164
- │ └── astro.config.mjs # Config (provider selection)
165
- │
166
- ├── backend/ # ⭐ Generated Convex backend
167
- │ ├── convex/
168
- │ │ ├── schema.ts # 6-dimension schema
169
- │ │ ├── services/ # Effect.ts services
170
- │ │ ├── queries/ # Convex queries
171
- │ │ ├── mutations/ # Convex mutations
172
- │ │ ├── actions/ # Convex actions
173
- │ │ └── providers/ # External services
174
- │ └── package.json
207
+ my-project/
208
+ ├── one/ # ⭐ Global ontology (source of truth)
209
+ │ ├── groups/ # Multi-tenancy & hierarchies
210
+ │ ├── people/ # Authorization & roles
211
+ │ ├── things/ # Entity definitions
212
+ │ ├── connections/ # Relationship definitions
213
+ │ ├── events/ # Event specifications
214
+ │ └── knowledge/ # RAG, AI, embeddings
175
215
  │
176
- ├── docs/ # ⭐ 3rd party docs (cloned)
177
- │ ├── astro/ # Astro documentation
178
- │ ├── convex/ # Convex documentation
179
- │ ├── effect/ # Effect.ts documentation
180
- │ └── react/ # React documentation
216
+ ├── acme/ # ⭐ Installation folder (private)
217
+ │ ├── README.md # Installation overview
218
+ │ ├── groups/ # Hierarchical group docs
219
+ │ ├── people/ # People profiles
220
+ │ ├── things/ # Custom entities
221
+ │ ├── connections/ # Custom relationships
222
+ │ ├── events/ # Custom events
223
+ │ └── knowledge/ # Custom knowledge
181
224
  │
182
- ├── import/ # ⭐ Import utilities
183
- │ └── ... # Data import scripts
225
+ ├── web/ # ⭐ Web application
226
+ │ ├── src/
227
+ │ │ ├── pages/ # Astro pages
228
+ │ │ ├── components/ # React components
229
+ │ │ ├── services/ # Effect.ts services
230
+ │ │ └── styles/ # CSS/Tailwind
231
+ │ └── astro.config.mjs
184
232
  │
185
- ├── .claude/ # Claude Code config
186
- │ └── hooks/
233
+ ├── backend/ # ⭐ Convex backend
234
+ │ └── convex/
235
+ │ ├── schema.ts # 6-dimension schema
236
+ │ ├── services/ # Effect.ts services
237
+ │ ├── queries/ # Convex queries
238
+ │ ├── mutations/ # Convex mutations
239
+ │ └── providers/ # External services
187
240
  │
188
- ├── .env # Environment variables
189
- ├── CLAUDE.md # AI agent instructions
190
- ├── .mcp.json # MCP server config
191
- └── package.json # Root dependencies
241
+ ├── .claude/ # Claude Code config
242
+ ├── .env.local # Environment (INSTALLATION_NAME=acme)
243
+ ├── CLAUDE.md # AI agent instructions
244
+ ├── AGENTS.md # Convex patterns
245
+ └── package.json
192
246
  ```
193
247
 
194
248
  **Key Features:**
195
249
 
196
- - **5 Core Directories:** `/one/`, `/frontend/`, `/backend/`, `/docs/`, `/import/`
197
- - **Self-Contained:** All docs (ontology + 3rd party) included for offline AI access
198
- - **Backend-Agnostic:** Frontend works with Convex, WordPress, Notion, or custom backends
199
- - **AI-Ready:** MCP server, Claude Code config, complete documentation
200
- - **Portable:** Clone and deploy anywhere
250
+ - **Installation Folder:** `/<installation-name>/` for private customizations
251
+ - **Hierarchical Groups:** Nested folders mirror database structure
252
+ - **File Resolution:** Installation → Global fallback
253
+ - **Multi-Tenancy:** One installation serves many database groups
254
+ - **AI-Ready:** Complete documentation for offline AI
201
255
 
202
256
  ---
203
257
 
204
- ## Frontend Architecture (Backend-Agnostic)
258
+ ## Hierarchical Group Documentation
205
259
 
206
- **See: `one/knowledge/ontology-frontend.md` for complete implementation guide.**
260
+ ### Create Groups in Database First
207
261
 
208
- ### DataProvider Pattern (Inspired by Astro Content Layer)
209
-
210
- The CLI generates a **backend-agnostic frontend** using the DataProvider pattern:
262
+ ```bash
263
+ # 1. Start web app
264
+ cd web && bun run dev
211
265
 
212
- ```typescript
213
- // astro.config.ts - Swap backends by changing ONE line
214
- import { defineConfig } from "astro/config";
215
- import { one } from "@one/astro-integration";
216
- import { convexProvider } from "./src/providers/convex";
217
- // import { wordpressProvider } from './src/providers/wordpress'
218
- // import { notionProvider } from './src/providers/notion'
219
-
220
- export default defineConfig({
221
- integrations: [
222
- one({
223
- // ✅ Change this ONE line to swap backends
224
- provider: convexProvider({
225
- url: import.meta.env.PUBLIC_BACKEND_URL,
226
- }),
227
- }),
228
- ],
229
- });
266
+ # 2. Visit /groups/new in browser
267
+ # 3. Create groups: "engineering", "engineering/frontend", "engineering/backend"
230
268
  ```
231
269
 
232
- ### Universal Ontology API
270
+ ### Generate Group Documentation
233
271
 
234
- Every provider implements the same 6-dimension interface:
235
-
236
- ```typescript
237
- // src/providers/DataProvider.ts
238
- export interface DataProvider {
239
- organizations: {
240
- get: (id: string) => Effect.Effect<Organization, Error>;
241
- list: (params) => Effect.Effect<Organization[], Error>;
242
- update: (id: string, updates) => Effect.Effect<void, Error>;
243
- };
244
- people: {
245
- get;
246
- list;
247
- create;
248
- update;
249
- delete;
250
- };
251
- things: {
252
- get;
253
- list;
254
- create;
255
- update;
256
- delete;
257
- };
258
- connections: {
259
- create;
260
- getRelated;
261
- getCount;
262
- delete;
263
- };
264
- events: {
265
- log;
266
- query;
267
- };
268
- knowledge: {
269
- embed;
270
- search;
271
- };
272
- }
272
+ ```bash
273
+ npx oneie create-group-docs
273
274
  ```
274
275
 
275
- **Result:**
276
-
277
- - Frontend works with **any backend** (Convex, WordPress, Notion, Supabase)
278
- - Organizations can use their **existing infrastructure**
279
- - Swap backends without changing frontend code
280
- - ONE ontology = universal API
276
+ **Interactive:**
281
277
 
282
- ### Generated Providers
278
+ ```
279
+ Fetching groups from database...
280
+ Found 5 groups.
283
281
 
284
- The CLI generates provider implementations for popular backends:
282
+ Select groups to create documentation for:
283
+ ❯ ◉ Acme Corp (acme) → top-level
284
+ ◉ Engineering (engineering) → subgroup
285
+ ◉ Frontend Team (frontend) → subgroup of engineering
286
+ ◉ Backend Team (backend) → subgroup of engineering
287
+ ◉ Marketing (marketing) → subgroup
285
288
 
286
- #### Convex Provider (Default)
289
+ ✓ Created /acme/groups/acme/README.md
290
+ ✓ Created /acme/groups/engineering/README.md
291
+ ✓ Created /acme/groups/engineering/frontend/README.md
292
+ ✓ Created /acme/groups/engineering/backend/README.md
293
+ ✓ Created /acme/groups/marketing/README.md
287
294
 
288
- ```typescript
289
- // src/providers/convex/ConvexProvider.ts
290
- export class ConvexProvider implements DataProvider {
291
- things = {
292
- get: (id) =>
293
- Effect.tryPromise(() =>
294
- this.client.query(api.queries.things.get, { id })
295
- ),
296
- list: (params) =>
297
- Effect.tryPromise(() =>
298
- this.client.query(api.queries.things.list, params)
299
- ),
300
- // ... all 6 dimensions
301
- };
302
- }
295
+ Group documentation created!
296
+ Add custom markdown files to these folders to override global templates.
303
297
  ```
304
298
 
305
- #### WordPress Provider
299
+ ### Add Custom Documentation
306
300
 
307
- ```typescript
308
- // src/providers/wordpress/WordPressProvider.ts
309
- export class WordPressProvider implements DataProvider {
310
- things = {
311
- get: (id) =>
312
- Effect.gen(function* () {
313
- // Map ONE thing → WordPress post
314
- const response = yield* fetch(
315
- `${this.baseUrl}/wp-json/wp/v2/posts/${id}`
316
- );
317
- const post = yield* response.json();
318
- return transformToThing(post);
319
- }),
320
- };
321
- }
301
+ ```bash
302
+ # Frontend-specific practices
303
+ mkdir -p /acme/groups/engineering/frontend
304
+ echo "# Frontend Practices" > /acme/groups/engineering/frontend/practices.md
305
+
306
+ # Engineering-wide patterns
307
+ echo "# Engineering Patterns" > /acme/groups/engineering/patterns.md
322
308
  ```
323
309
 
324
- #### Notion Provider
310
+ ### File Resolution Example
325
311
 
326
- ```typescript
327
- // src/providers/notion/NotionProvider.ts
328
- export class NotionProvider implements DataProvider {
329
- things = {
330
- get: (id) =>
331
- Effect.gen(function* () {
332
- // Map ONE thing → Notion page
333
- const page = yield* this.notion.pages.retrieve({ page_id: id });
334
- return transformToThing(page);
335
- }),
336
- };
337
- }
338
- ```
312
+ When AI or web app loads `practices.md` for the frontend group:
339
313
 
340
- **All providers implement the same interface** → Frontend code stays identical.
314
+ 1. `/acme/groups/engineering/frontend/practices.md` ✅ (most specific - found!)
315
+ 2. `/acme/groups/engineering/practices.md` (parent group)
316
+ 3. `/acme/practices.md` (installation-wide)
317
+ 4. `/one/practices.md` (global fallback)
341
318
 
342
319
  ---
343
320
 
344
- ## Feature Generation (DSL-Driven)
321
+ ## Feature Generation
345
322
 
346
323
  ### Create Feature from Plain English
347
324
 
@@ -383,144 +360,52 @@ npx oneie generate features/token-purchase.english
383
360
  **Generated files:**
384
361
 
385
362
  ```
386
- convex/services/tokens/token-purchase.ts # Effect.ts service
387
- convex/mutations/tokens.ts # Convex wrapper
388
- src/components/features/TokenPurchase.tsx # React component
389
- tests/unit/services/token-purchase.test.ts # Tests
363
+ backend/convex/services/token-purchase.ts # Effect.ts service
364
+ backend/convex/mutations/tokens.ts # Convex wrapper
365
+ web/src/components/features/TokenPurchase.tsx # React component
366
+ tests/unit/services/token-purchase.test.ts # Tests
390
367
  ```
391
368
 
392
369
  ---
393
370
 
394
- ### Conversational Mode
395
-
396
- ```bash
397
- npx oneie chat
398
- ```
399
-
400
- **Interactive session:**
401
-
402
- ```
403
- Welcome to ONE! 🎉
404
-
405
- What would you like to build?
406
- > Let fans chat with my AI clone
407
-
408
- Great! A few questions:
409
-
410
- 1. Should fans need tokens? (yes/no)
411
- > yes
412
-
413
- 2. Tokens per message?
414
- > 10
415
-
416
- 3. Train AI on videos? (yes/no)
417
- > yes
418
-
419
- ┌───────────────────────────────┐
420
- │ Feature: Chat with AI Clone │
421
- ├───────────────────────────────┤
422
- │ ✓ Token-gated │
423
- │ ✓ 10 tokens per message │
424
- │ ✓ AI trained on videos │
425
- │ ✓ Real-time chat │
426
- └───────────────────────────────┘
427
-
428
- Sound good? (yes/edit/cancel)
429
- > yes
430
-
431
- Building...
432
- ✓ Training AI personality... (3s)
433
- ✓ Creating chat system... (2s)
434
- ✓ Building UI... (2s)
435
- ✓ Testing... (1s)
371
+ ## Command Reference
436
372
 
437
- 🎉 Done! Try it: https://localhost:4321/chat
438
- ```
373
+ ### `npx oneie init`
439
374
 
440
- ---
375
+ Initialize new ONE installation with installation folder architecture.
441
376
 
442
- ## MCP Integration
443
-
444
- The CLI generates `.mcp.json` with ontology server and local docs access:
445
-
446
- ```json
447
- {
448
- "mcpServers": {
449
- "ontology": {
450
- "command": "node",
451
- "args": ["scripts/mcp-ontology-server.js"]
452
- },
453
- "shadcn": {
454
- "command": "npx",
455
- "args": ["-y", "@shadowsu/mcp-shadcn"]
456
- },
457
- "convex": {
458
- "command": "npx",
459
- "args": ["@convex-dev/mcp-server"]
460
- }
461
- }
462
- }
377
+ ```bash
378
+ npx oneie init
463
379
  ```
464
380
 
465
- **MCP Tools:**
381
+ **Prompts for:**
382
+ - User name and email
383
+ - Organization name and domain
384
+ - Installation identifier
466
385
 
467
- - `ontology.read` → Full Ontology.md from `/one/`
468
- - `ontology.query` → Query entities/connections/events/knowledge from `/one/`
469
- - `ontology.validate` → Validate feature specs
470
- - `dsl.parse` → Plain English → Technical DSL
471
- - `dsl.compile` → Technical DSL → TypeScript
472
- - `docs.read` → Read 3rd party docs from `/docs/` (Astro, Convex, Effect.ts, React)
473
-
474
- **AI Usage (Offline):**
475
-
476
- ```typescript
477
- // Claude Code reads from local /one/ directory:
478
- await mcp.ontology.query("entities", { filter: "token" });
479
- // → Returns: token entity type with properties (no web fetch)
480
-
481
- await mcp.dsl.parse(plainEnglishSpec);
482
- // → Returns: Technical DSL structure
483
-
484
- await mcp.ontology.validate(technicalDSL);
485
- // → Returns: { valid: true, errors: [] }
486
-
487
- // Read 3rd party docs locally from /docs/:
488
- await mcp.docs.read("convex", "mutations");
489
- // → Returns: Convex mutation docs (no web fetch)
490
- ```
491
-
492
- **Key Benefit:** All documentation (ontology + 3rd party) is **cloned into the project**, enabling fast offline AI operation.
386
+ **Creates:**
387
+ - `/one/` - Global ontology
388
+ - `/<installation-name>/` - Installation folder
389
+ - `/web/` - Web application
390
+ - `/backend/` - Convex backend
391
+ - `.claude/` - AI configuration
392
+ - `.env.local` - Environment variables
493
393
 
494
394
  ---
495
395
 
496
- ## Command Reference
497
-
498
- ### `npx oneie create <name>`
499
-
500
- Bootstrap new project with 5-directory structure.
396
+ ### `npx oneie create-group-docs`
501
397
 
502
- **Options:**
503
-
504
- - `--backend <type>` - Backend: `convex` (default), `wordpress`, `notion`, `supabase`, `none`
505
- - `--no-docs` - Skip cloning 3rd party docs to `/docs/`
506
- - `--no-install` - Skip `bun install`
507
- - `--ai <provider>` - AI provider: `claude`, `gpt`, `cursor`
398
+ Generate markdown documentation for database groups.
508
399
 
509
400
  ```bash
510
- # Full stack with Convex backend (default)
511
- npx oneie create my-platform
512
-
513
- # Frontend + WordPress backend
514
- npx oneie create my-platform --backend wordpress
515
-
516
- # Frontend only (bring your own backend)
517
- npx oneie create my-platform --backend none
518
-
519
- # Skip docs cloning (smaller project size)
520
- npx oneie create my-platform --no-docs
401
+ npx oneie create-group-docs
521
402
  ```
522
403
 
523
- **Generated Structure:** Always creates 5 directories (`/one/`, `/frontend/`, `/backend/`, `/docs/`, `/import/`)
404
+ **Features:**
405
+ - Fetches groups from Convex database
406
+ - Creates hierarchical folder structure
407
+ - Generates README with file resolution info
408
+ - Supports nested subgroups
524
409
 
525
410
  ---
526
411
 
@@ -528,456 +413,249 @@ npx oneie create my-platform --no-docs
528
413
 
529
414
  Generate feature from DSL.
530
415
 
531
- **Options:**
416
+ ```bash
417
+ npx oneie generate features/token-purchase.english --dry-run
418
+ ```
532
419
 
420
+ **Options:**
533
421
  - `--validate-only` - Only validate
534
422
  - `--dry-run` - Show what would be generated
535
423
  - `--output <dir>` - Custom output directory
536
424
 
537
- ```bash
538
- npx oneie generate features/token-purchase.english --dry-run
539
- ```
540
-
541
425
  ---
542
426
 
543
- ### `npx oneie chat`
427
+ ### `npx oneie ontology sync`
544
428
 
545
- Interactive conversational mode.
429
+ Sync global ontology from upstream.
546
430
 
547
431
  ```bash
548
- npx oneie chat
549
-
550
- > Let fans buy tokens
551
- > $0.10 per token
552
- > Accept crypto
553
- > Building...
554
- > ✓ Done!
432
+ npx oneie ontology sync
555
433
  ```
556
434
 
435
+ **Preserves installation folder customizations.**
436
+
557
437
  ---
558
438
 
559
- ### `npx oneie ontology`
439
+ ## Installation Folder Benefits
440
+
441
+ ### 1. Multi-Tenancy
442
+
443
+ One installation serves many database groups:
560
444
 
561
- Query/update ontology.
445
+ ```
446
+ Database:
447
+ - groups table with groupId and parentGroupId
448
+ - "acme" (parent)
449
+ - "engineering" (child)
450
+ - "frontend" (grandchild)
451
+
452
+ Filesystem:
453
+ - /acme/ (installation folder)
454
+ - /groups/engineering/frontend/ (mirrors hierarchy)
455
+ ```
562
456
 
563
- **Commands:**
457
+ ### 2. Private Documentation
564
458
 
565
- - `npx oneie ontology show` - Show full ontology
566
- - `npx oneie ontology query <type>` - Query types
567
- - `npx oneie ontology sync` - Sync from GitHub
568
- - `npx oneie ontology stats` - Statistics
459
+ Keep internal docs separate from open-source templates:
569
460
 
570
461
  ```bash
571
- npx oneie ontology query entities
572
- # Returns: 66 entity types
462
+ # Global template (public)
463
+ /one/things/architecture.md
573
464
 
574
- npx oneie ontology sync
575
- # ✓ Synced with one@latest (v1.0.0)
465
+ # Your private override
466
+ /acme/things/architecture.md
576
467
  ```
577
468
 
578
- ---
579
-
580
- ### `npx oneie add <component>`
469
+ ### 3. Hierarchical Resolution
581
470
 
582
- Add shadcn/ui component.
471
+ Documentation inherits from parent groups:
583
472
 
584
- ```bash
585
- npx oneie add button card dialog
586
- npx oneie add --all
473
+ ```
474
+ Frontend team loads "sprint-guide.md":
475
+ 1. /acme/groups/engineering/frontend/sprint-guide.md ✅
476
+ 2. /acme/groups/engineering/sprint-guide.md (parent)
477
+ 3. /acme/sprint-guide.md (installation)
478
+ 4. /one/sprint-guide.md (global)
587
479
  ```
588
480
 
589
- ---
481
+ ### 4. Git Strategy
590
482
 
591
- ### `npx oneie validate`
483
+ ```gitignore
484
+ # Track global templates
485
+ /one/
592
486
 
593
- Validate project against ontology.
487
+ # Exclude private installations (or use separate repo)
488
+ /acme/
489
+ /customer-*/
594
490
 
595
- ```bash
596
- npx oneie validate
597
- npx oneie validate --fix
491
+ # Always exclude
492
+ .env.local
598
493
  ```
599
494
 
600
495
  ---
601
496
 
602
- ## Generated Files
603
-
604
- ### Convex Schema (6-Dimension Ontology)
497
+ ## Generated Backend Schema (6-Dimension)
605
498
 
606
499
  ```typescript
607
- // convex/schema.ts
500
+ // backend/convex/schema.ts
608
501
  export default defineSchema({
609
- // DIMENSION 1: ORGANIZATIONS (multi-tenancy)
610
- organizations: defineTable({
502
+ // DIMENSION 1: GROUPS (multi-tenancy, hierarchical)
503
+ groups: defineTable({
611
504
  name: v.string(),
612
- slug: v.string(),
613
- status: v.union(
614
- v.literal("active"),
615
- v.literal("suspended"),
616
- v.literal("trial")
617
- ),
618
- plan: v.union(
619
- v.literal("starter"),
620
- v.literal("pro"),
621
- v.literal("enterprise")
505
+ type: v.union(
506
+ v.literal("friend_circle"),
507
+ v.literal("business"),
508
+ v.literal("community"),
509
+ v.literal("dao"),
510
+ v.literal("government"),
511
+ v.literal("organization")
622
512
  ),
623
- }).index("by_slug", ["slug"]),
513
+ parentGroupId: v.optional(v.id("groups")), // Hierarchical nesting
514
+ properties: v.any(),
515
+ status: v.string(),
516
+ createdAt: v.number(),
517
+ updatedAt: v.number(),
518
+ }).index("by_slug", ["properties.slug"]),
624
519
 
625
520
  // DIMENSION 2: PEOPLE (authorization, intent)
626
- people: defineTable({
627
- email: v.string(),
628
- username: v.string(),
629
- displayName: v.string(),
630
- role: v.union(
631
- v.literal("platform_owner"),
632
- v.literal("org_owner"),
633
- v.literal("org_user"),
634
- v.literal("customer")
635
- ),
636
- organizationId: v.id("organizations"),
637
- }).index("by_email", ["email"]),
521
+ // (Represented as things with type: "creator" and role metadata)
638
522
 
639
523
  // DIMENSION 3: THINGS (all entities)
640
524
  things: defineTable({
641
- type: v.union(
642
- v.literal("course"),
643
- v.literal("lesson"),
644
- v.literal("product"),
645
- v.literal("token"),
646
- v.literal("ai_clone")
647
- // ... 66 total types
648
- ),
525
+ groupId: v.id("groups"), // Scoped to group
526
+ type: v.string(), // 66+ types
649
527
  name: v.string(),
650
- organizationId: v.id("organizations"),
651
- properties: v.any(), // JSON blob for type-specific fields
528
+ properties: v.any(),
652
529
  status: v.string(),
653
530
  createdAt: v.number(),
654
531
  updatedAt: v.number(),
655
532
  })
656
533
  .index("by_type", ["type"])
657
- .index("by_org", ["organizationId"]),
534
+ .index("by_group", ["groupId"]),
658
535
 
659
536
  // DIMENSION 4: CONNECTIONS (all relationships)
660
537
  connections: defineTable({
538
+ groupId: v.id("groups"),
661
539
  fromThingId: v.id("things"),
662
540
  toThingId: v.id("things"),
663
- relationshipType: v.union(
664
- v.literal("part_of"),
665
- v.literal("enrolled_in"),
666
- v.literal("owns"),
667
- v.literal("following"),
668
- v.literal("member_of")
669
- // ... 25 total types
670
- ),
541
+ relationshipType: v.string(), // 25+ types
671
542
  metadata: v.optional(v.any()),
672
543
  createdAt: v.number(),
673
544
  })
674
545
  .index("from_type", ["fromThingId", "relationshipType"])
675
- .index("to_type", ["toThingId", "relationshipType"]),
546
+ .index("to_type", ["toThingId", "relationshipType"])
547
+ .index("by_group", ["groupId"]),
676
548
 
677
549
  // DIMENSION 5: EVENTS (all behavior)
678
550
  events: defineTable({
679
- type: v.union(
680
- v.literal("thing_created"),
681
- v.literal("connection_created"),
682
- v.literal("tokens_purchased"),
683
- v.literal("chat_interaction"),
684
- v.literal("course_completed")
685
- // ... 67 total types
686
- ),
687
- actorId: v.id("people"), // Person who did it
688
- targetId: v.optional(v.string()), // Thing/Person/Connection ID
689
- organizationId: v.id("organizations"),
551
+ groupId: v.id("groups"),
552
+ type: v.string(), // 67+ types
553
+ actorId: v.optional(v.string()),
554
+ targetId: v.optional(v.string()),
690
555
  timestamp: v.number(),
691
556
  metadata: v.optional(v.any()),
692
557
  })
693
558
  .index("by_actor", ["actorId"])
694
- .index("by_org", ["organizationId"])
559
+ .index("by_group", ["groupId"])
695
560
  .index("by_type", ["type"]),
696
561
 
697
562
  // DIMENSION 6: KNOWLEDGE (embeddings, search)
698
563
  knowledge: defineTable({
564
+ groupId: v.id("groups"),
699
565
  text: v.string(),
700
566
  embedding: v.array(v.float64()),
701
567
  sourceThingId: v.optional(v.id("things")),
702
- sourcePersonId: v.optional(v.id("people")),
703
- organizationId: v.id("organizations"),
704
568
  labels: v.optional(v.array(v.string())),
705
569
  })
706
570
  .vectorIndex("by_embedding", {
707
571
  vectorField: "embedding",
708
572
  dimensions: 1536,
709
573
  })
710
- .index("by_org", ["organizationId"]),
574
+ .index("by_group", ["groupId"]),
711
575
  });
712
576
  ```
713
577
 
714
578
  ---
715
579
 
716
- ### Effect.ts Service Pattern
717
-
718
- ```typescript
719
- // convex/services/tokens/token-purchase.ts
720
- import { Effect } from "effect";
721
- import { ConvexDatabase } from "../core/database";
722
- import { StripeProvider, BlockchainProvider } from "../providers";
723
-
724
- export class TokenPurchaseService extends Effect.Service<TokenPurchaseService>()(
725
- "TokenPurchaseService",
726
- {
727
- effect: Effect.gen(function* () {
728
- const db = yield* ConvexDatabase;
729
- const stripe = yield* StripeProvider;
730
- const blockchain = yield* BlockchainProvider;
731
-
732
- return {
733
- execute: (
734
- fanId: Id<"entities">,
735
- tokenId: Id<"entities">,
736
- amount: number
737
- ) =>
738
- Effect.gen(function* () {
739
- // Validation
740
- const fan = yield* Effect.tryPromise(() => db.get(fanId));
741
- if (!fan)
742
- return yield* Effect.fail({ _tag: "NotFound", entity: "fan" });
743
-
744
- const token = yield* Effect.tryPromise(() => db.get(tokenId));
745
- if (!token)
746
- return yield* Effect.fail({ _tag: "NotFound", entity: "token" });
747
-
748
- if (amount <= 0)
749
- return yield* Effect.fail({ _tag: "InvalidAmount" });
750
-
751
- // Parallel execution
752
- const [payment, mintTx] = yield* Effect.all([
753
- stripe.charge({ amount: amount * 100 }),
754
- blockchain.mint({ tokenId, toAddress: fanId, amount }),
755
- ]);
756
-
757
- // Record event
758
- yield* Effect.tryPromise(() =>
759
- db.insert("events", {
760
- entityId: tokenId,
761
- eventType: "tokens_purchased",
762
- timestamp: Date.now(),
763
- actorType: "user",
764
- actorId: fanId,
765
- metadata: {
766
- amount,
767
- paymentId: payment.id,
768
- txHash: mintTx.hash,
769
- },
770
- })
771
- );
772
-
773
- return { paymentId: payment.id, txHash: mintTx.hash };
774
- }),
775
- };
776
- }),
777
- dependencies: [
778
- ConvexDatabase.Default,
779
- StripeProvider.Default,
780
- BlockchainProvider.Default,
781
- ],
782
- }
783
- ) {}
784
- ```
785
-
786
- ---
787
-
788
- ### Convex Mutation Wrapper
789
-
790
- ```typescript
791
- // convex/mutations/tokens.ts
792
- import { confect } from "confect";
793
- import { v } from "convex/values";
794
- import { TokenPurchaseService } from "../services/tokens/token-purchase";
795
- import { MainLayer } from "../layers";
796
-
797
- export const purchase = confect.mutation({
798
- args: {
799
- fanId: v.id("entities"),
800
- tokenId: v.id("entities"),
801
- amount: v.number(),
802
- },
803
- handler: (ctx, args) =>
804
- Effect.gen(function* () {
805
- const service = yield* TokenPurchaseService;
806
- return yield* service.execute(args.fanId, args.tokenId, args.amount);
807
- }).pipe(Effect.provide(MainLayer)),
808
- });
809
- ```
810
-
811
- ---
812
-
813
- ### React Component
814
-
815
- ```typescript
816
- // src/components/features/TokenPurchase.tsx
817
- import { useMutation } from "convex/react";
818
- import { api } from "@/convex/_generated/api";
819
- import { Button } from "@/components/ui/button";
820
- import { Input } from "@/components/ui/input";
821
- import { useState } from "react";
822
-
823
- export function TokenPurchase({ tokenId }: { tokenId: Id<"entities"> }) {
824
- const [amount, setAmount] = useState(100);
825
- const purchase = useMutation(api.tokens.purchase);
826
-
827
- const handlePurchase = async () => {
828
- try {
829
- const result = await purchase({ tokenId, amount });
830
- alert(`Success! TX: ${result.txHash}`);
831
- } catch (error) {
832
- alert(`Error: ${error.message}`);
833
- }
834
- };
835
-
836
- return (
837
- <div className="flex gap-2">
838
- <Input
839
- type="number"
840
- value={amount}
841
- onChange={(e) => setAmount(Number(e.target.value))}
842
- />
843
- <Button onClick={handlePurchase}>Buy {amount} Tokens</Button>
844
- </div>
845
- );
846
- }
847
- ```
848
-
849
- ---
850
-
851
580
  ## Environment Variables
852
581
 
853
- Generated `.env.example`:
582
+ Generated `.env.local`:
854
583
 
855
584
  ```bash
585
+ # Installation
586
+ INSTALLATION_NAME=acme
587
+ INSTALLATION_ENV=dev
588
+
856
589
  # Convex
857
- CONVEX_DEPLOYMENT=<your-deployment>
858
- CONVEX_URL=https://<your-deployment>.convex.cloud
590
+ PUBLIC_CONVEX_URL=https://shocking-falcon-870.convex.cloud
591
+ CONVEX_DEPLOYMENT=prod:shocking-falcon-870
859
592
 
860
593
  # Better Auth
861
594
  BETTER_AUTH_SECRET=<generate-with-openssl>
862
595
  BETTER_AUTH_URL=http://localhost:4321
863
596
 
864
- # OAuth
597
+ # OAuth (optional)
865
598
  GITHUB_CLIENT_ID=<your-github-oauth>
866
599
  GITHUB_CLIENT_SECRET=<your-github-secret>
867
- GOOGLE_CLIENT_ID=<your-google-oauth>
868
- GOOGLE_CLIENT_SECRET=<your-google-secret>
869
600
 
870
601
  # External Services (optional)
871
602
  OPENAI_API_KEY=sk-...
872
- ANTHROPIC_API_KEY=sk-ant-...
873
603
  STRIPE_SECRET_KEY=sk_test_...
874
- BLOCKCHAIN_RPC_URL=https://mainnet.base.org
875
604
  ```
876
605
 
877
606
  ---
878
607
 
879
- ## Claude Code Integration
880
-
881
- Generated `.claude/settings.local.json`:
882
-
883
- ```json
884
- {
885
- "hooks": {
886
- "PreToolUse": [
887
- {
888
- "matcher": "Edit",
889
- "hooks": [
890
- {
891
- "type": "command",
892
- "command": "bash .claude/hooks/pre.sh"
893
- }
894
- ]
895
- }
896
- ],
897
- "PostToolUse": [
898
- {
899
- "matcher": "Edit",
900
- "hooks": [
901
- {
902
- "type": "command",
903
- "command": "bash .claude/hooks/post.sh"
904
- }
905
- ]
906
- }
907
- ]
908
- },
909
- "permissions": {
910
- "allow": ["Bash(bun:*)", "Bash(bunx:*)", "Bash(git:*)", "mcp__*"]
911
- }
912
- }
913
- ```
914
-
915
- **Hooks track ontology changes (inference score):**
916
-
917
- ```bash
918
- # .claude/hooks/pre.sh
919
- # Calculates hash of one/knowledge/ontology.md
920
- # If changed → increment inference score
921
- # Logs to one/things/inference_score.md
922
- ```
923
-
924
- ---
925
-
926
- ## Why This Works
608
+ ## Why This Architecture Works
927
609
 
928
610
  **Traditional approach:**
929
611
 
930
612
  1. Manual setup (hours)
931
- 2. Configure 10+ tools (days)
932
- 3. Learn patterns (weeks)
933
- 4. Write boilerplate (hours per feature)
934
- 5. Locked into one backend forever
613
+ 2. Configure tools (days)
614
+ 3. Write boilerplate (hours per feature)
615
+ 4. No multi-tenancy support
616
+ 5. No hierarchical documentation
935
617
 
936
618
  **ONE CLI approach:**
937
619
 
938
- 1. `npx oneie create` (5 minutes)
939
- 2. Everything pre-configured ✅
940
- 3. AI learns from patterns ✅
941
- 4. `npx oneie generate` (1 minute)
942
- 5. Backend-agnostic (swap anytime) ✅
620
+ 1. `npx oneie init` (5 minutes) ✅
621
+ 2. Installation folder for customizations ✅
622
+ 3. Hierarchical groups with documentation ✅
623
+ 4. AI-ready with complete ontology ✅
624
+ 5. Multi-tenant from day one ✅
943
625
 
944
626
  **Key Innovations:**
945
627
 
946
- 1. **5-Directory Structure**
947
-
948
- - `/one/` - Ontology docs cloned into project (AI can read)
949
- - `/frontend/` - Backend-agnostic Astro + React app
950
- - `/backend/` - Convex backend (or generate for any backend)
951
- - `/docs/` - 3rd party docs cloned locally (offline AI access)
952
- - `/import/` - Data import utilities
628
+ 1. **Installation Folder Architecture**
629
+ - Global templates in `/one/`
630
+ - Private customizations in `/<installation-name>/`
631
+ - Hierarchical file resolution
632
+ - Supports nested groups
953
633
 
954
- 2. **Universal Ontology API**
634
+ 2. **Database + Filesystem Sync**
635
+ - Groups in database (runtime isolation)
636
+ - Documentation in filesystem (AI context)
637
+ - Hierarchical structure mirrored in both
955
638
 
956
- - Frontend only knows 6 dimensions (organizations, people, things, connections, events, knowledge)
957
- - Backend provider pattern = swap Convex ↔ WordPress ↔ Notion
958
- - Same frontend code works with ANY backend
639
+ 3. **Multi-Tenancy Built-In**
640
+ - One installation serves many groups
641
+ - Each group has private docs folder
642
+ - File resolution walks up hierarchy
959
643
 
960
- 3. **Self-Contained & Portable**
961
- - All documentation included (ontology + 3rd party)
962
- - AI agents work offline (no web fetches needed)
963
- - Clone project = clone complete knowledge base
964
-
965
- **Result:** 100x faster, higher quality, AI-ready, backend-flexible, fully portable.
644
+ **Result:** 100x faster, organized, multi-tenant, AI-ready, fully scalable.
966
645
 
967
646
  ---
968
647
 
969
648
  ## Roadmap
970
649
 
971
- ### Phase 1: Core Bootstrap (Q1 2025)
650
+ ### Phase 1: Core Bootstrap (v2.0.0 - Q1 2025)
972
651
 
973
- - ✅ `npx oneie create` - Full scaffolding
974
- - ✅ 5-directory structure (`/one/`, `/frontend/`, `/backend/`, `/docs/`, `/import/`)
975
- - ✅ Ontology cloning from GitHub
976
- - ✅ 3rd party docs cloning (Astro, Convex, Effect.ts, React)
977
- - ✅ Backend-agnostic frontend (Astro + React + DataProvider)
978
- - ✅ Convex backend generation (6-dimension schema)
979
- - ✅ shadcn/ui installation
980
- - ✅ Better Auth configuration
652
+ - ✅ `npx oneie init` - Installation folder setup
653
+ - ✅ Global ontology sync
654
+ - ✅ Installation folder creation
655
+ - ✅ Web app generation (Astro + React)
656
+ - ✅ Backend generation (Convex + Effect.ts)
657
+ - ✅ Hierarchical group documentation
658
+ - ✅ File resolution logic
981
659
  - ✅ MCP server setup
982
660
 
983
661
  ### Phase 2: Feature Generation (Q2 2025)
@@ -985,16 +663,15 @@ Generated `.claude/settings.local.json`:
985
663
  - ⏳ `npx oneie generate` - DSL compilation
986
664
  - ⏳ Plain English parser
987
665
  - ⏳ Ontology validator
988
- - ⏳ Claude Code SDK integration
666
+ - ⏳ Multi-file generation
989
667
 
990
- ### Phase 3: Conversational CLI (Q2 2025)
668
+ ### Phase 3: Advanced Multi-Tenancy (Q2 2025)
991
669
 
992
- - ⏳ `npx oneie chat` - Interactive mode
993
- - ⏳ Intent recognition
994
- - ⏳ Smart questions
995
- - ⏳ Progress feedback
670
+ - ⏳ Multi-installation support (dev/staging/prod)
671
+ - ⏳ Group documentation templates
672
+ - ⏳ Cloud sync (KV/R2 for runtime updates)
996
673
 
997
- ### Phase 4: Advanced (Q3 2025)
674
+ ### Phase 4: Enterprise (Q3 2025)
998
675
 
999
676
  - 📋 `npx oneie deploy` - One-command deployment
1000
677
  - 📋 `npx oneie upgrade` - Update ontology
@@ -1006,63 +683,68 @@ Generated `.claude/settings.local.json`:
1006
683
 
1007
684
  **For Developers:**
1008
685
 
1009
- - ⏱️ 5 minutes → Project bootstrap to first feature
1010
- - 🎯 100% type-safe → Generated code passes strict TypeScript
1011
- - ✅ Tests included → Every feature has unit tests
1012
- - 📖 AI-ready → Claude, GPT, Cursor understand it
686
+ - ⏱️ 5 minutes → Project bootstrap
687
+ - 🎯 100% type-safe → Generated code
688
+ - ✅ Multi-tenant → Group isolation
689
+ - 📖 AI-ready → Complete ontology
1013
690
 
1014
- **For Non-Technical Users:**
691
+ **For Organizations:**
1015
692
 
1016
- - 💬 Conversational → No commands to memorize
1017
- - 🚀 1 minute → Feature idea to working code
1018
- - 📱 Browser preview → See it immediately
1019
- - ❌ No code shown → Never see TypeScript
693
+ - 🏢 Installation folder → Private docs
694
+ - 📁 Hierarchical groups → Nested documentation
695
+ - 🔄 File resolution → Smart overrides
696
+ - 🚀 Scalable → Friend circles to governments
1020
697
 
1021
698
  ---
1022
699
 
1023
700
  ## Related Documentation
1024
701
 
1025
- ### Architecture Guides
702
+ ### Installation Folder Architecture
703
+
704
+ - **[Installation Folder Multi-Tenancy Plan](../plans/group-folder-multi-tenancy.md)** - Complete architecture
705
+ - **[Feature 2: CLI](../features/2-cli.md)** - Detailed implementation guide
1026
706
 
1027
- - **[structure.md](../connections/structure.md)** - 📁 Repository & project structure (5-directory architecture)
1028
- - **[ontology-frontend.md](../knowledge/ontology-frontend.md)** - 🔑 Frontend implementation (backend-agnostic)
1029
- - **[ontology-backend.md](../knowledge/ontology-backend.md)** - Backend implementation (Convex + Effect.ts)
1030
- - **[Ontology.md](./ontology.md)** - 6-dimension data model (source of truth)
707
+ ### 6-Dimension Ontology
708
+
709
+ - **[Ontology.md](../../knowledge/ontology.md)** - 6-dimension data model
710
+ - **[Groups](../../groups/groups.md)** - Group types and hierarchies
711
+ - **[People](../../people/people.md)** - Roles and authorization
712
+ - **[Things](../../things/things.md)** - 66+ entity types
713
+ - **[Connections](../../connections/connections.md)** - 25+ relationship types
714
+ - **[Events](../../events/events.md)** - 67+ event types
715
+ - **[Knowledge](../../knowledge/knowledge.md)** - RAG and embeddings
1031
716
 
1032
717
  ### Development Guides
1033
718
 
1034
- - **[dsl.md](./dsl.md)** - Technical DSL specification
1035
- - **[dsl-english.md](./dsl-english.md)** - Plain English DSL
1036
- - **[Rules.md](./rules.md)** - Golden rules for AI agents
1037
- - **[Patterns.md](./patterns.md)** - Proven code patterns
1038
- - **[Workflow.md](../connections/workflow.md)** - Ontology-driven development flow
1039
- - **[CLAUDE.md](../CLAUDE.md)** - Instructions for Claude Code
719
+ - **[Rules.md](../../knowledge/rules.md)** - Golden rules for AI agents
720
+ - **[Patterns.md](../../knowledge/patterns.md)** - Proven code patterns
721
+ - **[Workflow.md](../../connections/workflow.md)** - Development flow
722
+ - **[CLAUDE.md](../../../CLAUDE.md)** - Claude Code instructions
1040
723
 
1041
724
  ---
1042
725
 
1043
- ## Summary: The 5-Directory Architecture
726
+ ## Summary
1044
727
 
1045
- Every generated project has exactly **5 core directories**:
728
+ The ONE CLI v2.0.0 introduces **installation folder architecture** for enterprise-grade multi-tenancy:
1046
729
 
1047
730
  ```
1048
- my-project/
1049
- ├── one/ → 📖 Ontology documentation (AI knowledge base)
1050
- ├── frontend/ → 🎨 Backend-agnostic UI (Astro + React + DataProvider)
1051
- ├── backend/ → ⚙️ Data & logic (Convex by default, swap to WordPress/Notion/etc)
1052
- ├── docs/ → 📚 3rd party docs (Astro, Convex, Effect.ts, React)
1053
- └── import/ → 📥 Data import utilities
731
+ /one/ → Global templates (source of truth)
732
+ /<installation-name>/ → Private customizations (overrides global)
733
+ └── groups/ → Hierarchical documentation (mirrors database)
734
+ /web/ → Astro 5 + React 19 frontend
735
+ /backend/ → Convex backend (6-dimension schema)
1054
736
  ```
1055
737
 
1056
- **Why This Structure?**
738
+ **Why It Matters:**
1057
739
 
1058
- 1. **`/one/`** - AI agents read ontology to understand your domain
1059
- 2. **`/frontend/`** - Works with ANY backend via DataProvider pattern
1060
- 3. **`/backend/`** - Implements 6-dimension schema (organizations, people, things, connections, events, knowledge)
1061
- 4. **`/docs/`** - AI agents reference official docs without web fetches
1062
- 5. **`/import/`** - Utilities to import existing data
740
+ - **Multi-Tenant:** One installation serves many database groups
741
+ - **Hierarchical:** Groups can have subgroups with inherited documentation
742
+ - **Private:** Installation folder for internal docs
743
+ - **AI-Ready:** Complete ontology for offline AI operation
744
+ - **Scalable:** From friend circles (2 people) to governments (billions)
1063
745
 
1064
- **Result:** Self-contained, portable, AI-ready projects where frontend ↔ backend communication follows the universal 6-dimension ontology API.
746
+ **Core Principle:** The CLI makes it **easier for AI agents to build features** than humans. When that's true, we've succeeded.
1065
747
 
1066
748
  ---
1067
749
 
1068
- **Core Principle:** The CLI makes it **easier for AI agents to build features** than humans. When that's true, we've succeeded.
750
+ **Built with simplicity, clarity, and infinite scale in mind.**