oneie 2.0.3 → 2.0.6

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.
Files changed (84) hide show
  1. package/CLAUDE.md +220 -29
  2. package/LICENSE.md +84 -0
  3. package/README.md +489 -931
  4. package/dist/copy-claude-config.d.ts.map +1 -1
  5. package/dist/copy-claude-config.js +3 -1
  6. package/dist/copy-claude-config.js.map +1 -1
  7. package/dist/sync-agents.d.ts.map +1 -1
  8. package/dist/sync-agents.js +3 -1
  9. package/dist/sync-agents.js.map +1 -1
  10. package/dist/sync-ontology.d.ts.map +1 -1
  11. package/dist/sync-ontology.js +9 -7
  12. package/dist/sync-ontology.js.map +1 -1
  13. package/folders.yaml +78 -17
  14. package/one/.obsidian/workspace.json +6 -6
  15. package/one/events/CASCADE-2-BACKEND-AGNOSTIC.md +412 -0
  16. package/one/events/FEATURE-2-4-COMPLETE.md +302 -0
  17. package/one/events/FEATURE_2_3_COMPLETE.md +575 -0
  18. package/one/events/GROUPS-MIGRATION.md +625 -0
  19. package/one/events/INSTALL-TESTS.md +293 -0
  20. package/one/events/INTEGRATION-ARCHITECTURE.md +561 -0
  21. package/one/events/INTEGRATION-CHECKLIST.md +1234 -0
  22. package/one/events/INTEGRATION-ORCHESTRATION.md +2623 -0
  23. package/one/events/INTEGRATION-SUMMARY.md +653 -0
  24. package/one/events/MIGRATION-REPORT.md +435 -0
  25. package/one/events/MIGRATION.md +69 -0
  26. package/one/events/README-archived.md +519 -0
  27. package/one/events/TEST-SUMMARY.md +393 -0
  28. package/one/events/TESTS-QUICK-REF.md +262 -0
  29. package/one/groups/groups.md +543 -0
  30. package/one/knowledge/CLOUDFLARE_ENV_SETUP.md +49 -0
  31. package/one/knowledge/architecture-any-backend.md +1366 -0
  32. package/one/knowledge/docs/flow.md +0 -0
  33. package/one/knowledge/ontology-documentation.md +18 -18
  34. package/one/knowledge/ontology.md +154 -143
  35. package/one/knowledge/ontology.md.backup +2822 -0
  36. package/one/knowledge/ontology.yaml +87 -87
  37. package/one/knowledge/provider-creation-guide.md +1064 -0
  38. package/one/knowledge/todo.md +251 -0
  39. package/one/license.md +84 -0
  40. package/one/things/CHECKLIST.md +356 -0
  41. package/one/things/ONE.md +510 -0
  42. package/one/things/{cli.md → cli/cli.md} +27 -4
  43. package/one/things/features/2-1-dataprovider-interface.md +2358 -0
  44. package/one/things/features/2-2-config-system.md +3075 -0
  45. package/one/things/features/2-3-effectts-services.md +1498 -0
  46. package/one/things/features/2-4-react-hooks.md +2120 -0
  47. package/one/things/features/2-5-auth-migration.md +2046 -0
  48. package/one/things/features/2-6-dashboard-migration.md +1985 -0
  49. package/one/things/features/2-7-alternative-providers.md +2505 -0
  50. package/one/things/features/2-7-implementation-report.md +680 -0
  51. package/one/things/features/2-cli.md +39 -39
  52. package/one/things/features/2-design.md +1738 -0
  53. package/one/things/features/2-tests.md +520 -0
  54. package/one/things/features/AUTH_HOOKS_IMPLEMENTATION.md +521 -0
  55. package/one/things/features/DECOUPLING.md +272 -0
  56. package/one/things/features/DEPLOYMENT.md +452 -0
  57. package/one/things/features/IMPLEMENTATION_SUMMARY.md +316 -0
  58. package/one/things/features/dataprovider-interface/1-tests.md +1522 -0
  59. package/one/things/features/improve.md +843 -0
  60. package/one/things/features/remove-convex-deps.md +45 -0
  61. package/one/things/features/top-features.md +79 -0
  62. package/one/things/ideas/2-backend-agnostic-frontend.md +384 -0
  63. package/one/things/plans/2-backend-agnostic-frontend.md +543 -0
  64. package/one/things/plans/3-groups.md +502 -0
  65. package/one/things/plans/backend-agnostic-frontend.md +323 -0
  66. package/one/things/plans/deploy-to-cloudflare.md +581 -0
  67. package/one/things/plans/organizations-to-groups.md +705 -0
  68. package/one/things/plans/release.md +432 -0
  69. package/one/things/products/ontology.md +1 -1
  70. package/one/things/system.md +600 -0
  71. package/one/things/tests/2-1-dataprovider-interface.md +1144 -0
  72. package/one/things/tests/2-1-test-analysis.md +496 -0
  73. package/one/things/vision/elegant-interface.md +214 -0
  74. package/package.json +1 -1
  75. package/one/organisation/organisation.md +0 -438
  76. package/one/repomix-output.md +0 -92634
  77. /package/one/{things → connections}/agentkit.md +0 -0
  78. /package/one/{things → connections}/copilotkit.md +0 -0
  79. /package/one/{organisation → groups}/one.md +0 -0
  80. /package/one/{organisation → groups}/revenue.md +0 -0
  81. /package/one/{organisation → groups}/strategy.md +0 -0
  82. /package/one/{organisation → groups}/vision.md +0 -0
  83. /package/one/things/{cli-code.md → cli/cli-code.md} +0 -0
  84. /package/one/things/{cli-compiler-code.md → cli/cli-compiler-code.md} +0 -0
@@ -0,0 +1,600 @@
1
+ # ONE CLI System Architecture
2
+
3
+ **Version:** 2.0.3
4
+ **Package:** `oneie` on npm
5
+ **Repository:** `one-ie/one` on GitHub
6
+
7
+ ---
8
+
9
+ ## Overview
10
+
11
+ The ONE CLI (`npx oneie`) packages the ONE Platform's 6-dimension ontology, documentation, and AI configuration into a distributable npm package that bootstraps production-ready projects in 30 seconds.
12
+
13
+ **Core Principle:** Everything AI needs to understand and build with ONE is included in the package—no web fetches, no external dependencies for documentation.
14
+
15
+ ---
16
+
17
+ ## Package Structure
18
+
19
+ ### Deployed Package (`oneie` on npm)
20
+
21
+ ```
22
+ oneie/
23
+ ├── dist/ # Compiled CLI code (TypeScript → JavaScript)
24
+ │ └── index.js # Entry point (executable)
25
+ │
26
+ ├── .claude/ # Claude Code integration (copied from source)
27
+ │ ├── agents/ # AI agent configurations
28
+ │ ├── commands/ # Custom slash commands
29
+ │ └── hooks/ # Pre/post tool-use hooks
30
+ │
31
+ ├── one/ # 6-Dimension ontology docs (copied from source)
32
+ │ ├── connections/ # Ontology, protocols, patterns
33
+ │ ├── things/ # Architecture, specifications
34
+ │ ├── events/ # Event specifications
35
+ │ ├── knowledge/ # RAG, AI, implementation
36
+ │ └── people/ # Roles, groups, governance
37
+ │
38
+ ├── web/ # Astro 5 + React 19 starter (copied from source)
39
+ │ ├── src/
40
+ │ │ ├── pages/ # File-based routing
41
+ │ │ ├── components/ # React components + shadcn/ui
42
+ │ │ ├── layouts/ # Page layouts
43
+ │ │ ├── content/ # Content collections (blog, etc.)
44
+ │ │ └── styles/ # Tailwind v4 + global CSS
45
+ │ ├── public/ # Static assets
46
+ │ └── astro.config.mjs # Astro configuration
47
+ │
48
+ ├── data/ # Sample data and migrations (optional)
49
+ │ └── ... # JSON/YAML data files
50
+ │
51
+ ├── CLAUDE.md # AI agent instructions (root level)
52
+ ├── AGENTS.md # Convex patterns quick reference
53
+ ├── README.md # Package documentation
54
+ ├── LICENSE.md # License information
55
+ ├── folders.yaml # Copy configuration
56
+ └── package.json # NPM package metadata
57
+ ```
58
+
59
+ ---
60
+
61
+ ## Copy Configuration (`folders.yaml`)
62
+
63
+ The CLI uses `folders.yaml` to define what gets copied from the source repository to the user's project:
64
+
65
+ ```yaml
66
+ # ONE CLI - Folder Copy Configuration
67
+ # Defines what gets packaged and deployed to npm
68
+
69
+ # Claude Code Integration (AI agent configs)
70
+ claude_folders:
71
+ - .claude/agents
72
+ - .claude/commands
73
+ - .claude/hooks
74
+
75
+ # ONE Ontology (complete documentation)
76
+ one_folders:
77
+ - one/**/*
78
+
79
+ # Web starter (Astro 5 + React 19)
80
+ web_folders:
81
+ - web/
82
+
83
+ # Sample data (optional)
84
+ data_folders:
85
+ - data/
86
+
87
+ # Root documentation files
88
+ root_files:
89
+ - CLAUDE.md
90
+ - AGENTS.md
91
+ - README.md
92
+ - LICENSE.md
93
+
94
+ # File extensions to copy
95
+ allowed_extensions:
96
+ - .md
97
+ - .yaml
98
+ - .yml
99
+ - .sh
100
+ - .astro
101
+ - .ts
102
+ - .tsx
103
+ - .js
104
+ - .jsx
105
+ - .json
106
+ - .css
107
+
108
+ # Exclude patterns (never copy)
109
+ exclude_patterns:
110
+ - "*/node_modules/*"
111
+ - "*/.git/*"
112
+ - "*/dist/*"
113
+ - "*/build/*"
114
+ - "*/.DS_Store"
115
+ - "*/package-lock.json"
116
+ - "*/bun.lockb"
117
+ - "*/.env*"
118
+ ```
119
+
120
+ ---
121
+
122
+ ## Deployment Pipeline
123
+
124
+ ### 1. Development (Source Repository)
125
+
126
+ ```
127
+ ONE/ # Source monorepo
128
+ ├── .claude/ # → Copied to package
129
+ ├── one/ # → Copied to package
130
+ ├── web/ # → Copied to package
131
+ ├── data/ # → Copied to package
132
+ ├── cli/ # → Built and packaged
133
+ │ ├── src/ # TypeScript source
134
+ │ ├── dist/ # Compiled output
135
+ │ ├── package.json # NPM metadata
136
+ │ └── folders.yaml # Copy config
137
+ ├── CLAUDE.md # → Copied to package root
138
+ ├── AGENTS.md # → Copied to package root
139
+ ├── README.md # → Copied to package root
140
+ └── LICENSE.md # → Copied to package root
141
+ ```
142
+
143
+ ### 2. Build Process
144
+
145
+ ```bash
146
+ cd cli/
147
+
148
+ # 1. Build TypeScript to JavaScript
149
+ npm run build
150
+ # → Compiles src/*.ts → dist/*.js
151
+
152
+ # 2. Copy files according to folders.yaml
153
+ # → Copies .claude/, one/, web/, data/ into cli/ directory
154
+ # → Copies CLAUDE.md, AGENTS.md, README.md, LICENSE.md to cli/ directory
155
+
156
+ # 3. Package for npm
157
+ npm pack
158
+ # → Creates oneie-2.0.3.tgz with:
159
+ # - dist/ (compiled CLI)
160
+ # - .claude/ (AI config)
161
+ # - one/ (docs)
162
+ # - web/ (starter)
163
+ # - data/ (sample data)
164
+ # - *.md files (root docs)
165
+ ```
166
+
167
+ ### 3. NPM Publish
168
+
169
+ ```bash
170
+ # Publish to npm registry
171
+ npm publish
172
+ # → Deploys package as "oneie" on npm
173
+ # → Users run: npx oneie
174
+ ```
175
+
176
+ ### 4. GitHub Release
177
+
178
+ ```bash
179
+ # Tag and push
180
+ git tag v2.0.3
181
+ git push origin v2.0.3
182
+
183
+ # GitHub Actions automatically:
184
+ # 1. Builds package
185
+ # 2. Runs tests
186
+ # 3. Publishes to npm
187
+ # 4. Creates GitHub release
188
+ ```
189
+
190
+ ---
191
+
192
+ ## Package Manifest (`package.json`)
193
+
194
+ ```json
195
+ {
196
+ "name": "oneie",
197
+ "version": "2.0.3",
198
+ "type": "module",
199
+ "description": "Transform ideas into production-ready websites using the ONE 6-dimension ontology and 8 AI agents. From idea to website in 3 commands: npx oneie, claude, /one",
200
+ "bin": {
201
+ "oneie": "./dist/index.js"
202
+ },
203
+ "files": [
204
+ "dist",
205
+ ".claude",
206
+ "one",
207
+ "web",
208
+ "data",
209
+ "README.md",
210
+ "CLAUDE.md",
211
+ "AGENTS.md",
212
+ "LICENSE.md",
213
+ "folders.yaml"
214
+ ],
215
+ "keywords": [
216
+ "one",
217
+ "ontology",
218
+ "cli",
219
+ "bootstrap",
220
+ "6-dimension",
221
+ "ai-agents",
222
+ "cascade",
223
+ "astro",
224
+ "react",
225
+ "convex",
226
+ "website-builder",
227
+ "no-code",
228
+ "low-code",
229
+ "claude",
230
+ "ai"
231
+ ],
232
+ "repository": {
233
+ "type": "git",
234
+ "url": "git+https://github.com/one-ie/one.git",
235
+ "directory": "cli"
236
+ },
237
+ "homepage": "https://one.ie",
238
+ "license": "SEE LICENSE IN https://one.ie/free-license"
239
+ }
240
+ ```
241
+
242
+ **Key Fields:**
243
+
244
+ - **`bin`**: Makes `oneie` executable via `npx oneie`
245
+ - **`files`**: Defines what gets included in the npm package (everything AI needs)
246
+ - **`type: "module"`**: Uses ES modules (import/export)
247
+ - **`repository.directory`**: Points to `/cli` subdirectory in monorepo
248
+
249
+ ---
250
+
251
+ ## User Experience Flow
252
+
253
+ ### Bootstrap New Project
254
+
255
+ ```bash
256
+ # User runs
257
+ npx oneie
258
+
259
+ # CLI does:
260
+ # 1. Copies .claude/ → user-project/.claude/
261
+ # 2. Copies one/ → user-project/one/
262
+ # 3. Copies web/ → user-project/web/
263
+ # 4. Copies data/ → user-project/data/
264
+ # 5. Copies CLAUDE.md, AGENTS.md, README.md to user-project/
265
+ # 6. Runs bun install in web/
266
+ # 7. Creates .env with defaults
267
+ # 8. Prints success message with next steps
268
+ ```
269
+
270
+ ### Generated Project Structure
271
+
272
+ ```
273
+ my-project/ # User's new project
274
+ ├── .claude/ # ✅ Claude Code config (from package)
275
+ │ ├── agents/
276
+ │ ├── commands/
277
+ │ └── hooks/
278
+ │
279
+ ├── one/ # ✅ Complete ontology docs (from package)
280
+ │ ├── connections/
281
+ │ ├── things/
282
+ │ ├── events/
283
+ │ ├── knowledge/
284
+ │ └── people/
285
+ │
286
+ ├── web/ # ✅ Astro + React starter (from package)
287
+ │ ├── src/
288
+ │ ├── public/
289
+ │ ├── astro.config.mjs
290
+ │ └── package.json
291
+ │
292
+ ├── data/ # ✅ Sample data (from package)
293
+ │
294
+ ├── .env # ✅ Generated by CLI
295
+ ├── CLAUDE.md # ✅ AI instructions (from package)
296
+ ├── AGENTS.md # ✅ Quick reference (from package)
297
+ └── README.md # ✅ Project docs (from package)
298
+ ```
299
+
300
+ **Result:** User has complete, self-contained project with all documentation and AI configuration ready.
301
+
302
+ ---
303
+
304
+ ## AI Integration Features
305
+
306
+ ### 1. Claude Code Integration (`.claude/`)
307
+
308
+ **What It Provides:**
309
+
310
+ - **Agents:** Pre-configured AI specialists (backend, frontend, integration, quality, design, etc.)
311
+ - **Commands:** Custom slash commands (`/now`, `/next`, `/todo`, `/done`, `/build`, `/design`, `/deploy`)
312
+ - **Hooks:** Pre/post tool-use validation hooks
313
+
314
+ **Why It Matters:**
315
+
316
+ - AI agents understand the 6-dimension ontology
317
+ - Developers get intelligent assistance for every phase
318
+ - Code generation follows proven patterns automatically
319
+
320
+ ### 2. Complete Documentation (`one/`)
321
+
322
+ **What It Provides:**
323
+
324
+ - 41 documentation files across 8 layers
325
+ - Complete ontology specification (groups, people, things, connections, events, knowledge)
326
+ - Protocol specs (A2A, ACP, AP2, X402, AG-UI)
327
+ - Implementation patterns and examples
328
+
329
+ **Why It Matters:**
330
+
331
+ - AI agents read documentation locally (no web fetches)
332
+ - Semantic search over ontology
333
+ - MCP servers can query ontology structure
334
+
335
+ ### 3. Starter App (`web/`)
336
+
337
+ **What It Provides:**
338
+
339
+ - Astro 5.14+ with React 19
340
+ - shadcn/ui components (50+)
341
+ - Tailwind v4 configuration
342
+ - Better Auth setup
343
+ - Content collections (blog, etc.)
344
+
345
+ **Why It Matters:**
346
+
347
+ - User gets production-ready frontend immediately
348
+ - All best practices pre-configured
349
+ - Ontology-aligned component structure
350
+
351
+ ---
352
+
353
+ ## Version Management
354
+
355
+ ### Semantic Versioning
356
+
357
+ ```
358
+ 2.0.3
359
+ │ │ │
360
+ │ │ └─ PATCH: Bug fixes, doc updates
361
+ │ └─── MINOR: New features, backwards-compatible
362
+ └───── MAJOR: Breaking changes
363
+ ```
364
+
365
+ ### Release Process
366
+
367
+ ```bash
368
+ # 1. Update version in package.json
369
+ npm version patch # or minor, major
370
+
371
+ # 2. Build package
372
+ npm run build
373
+
374
+ # 3. Test locally
375
+ npm pack
376
+ npm install -g oneie-2.0.3.tgz
377
+ oneie --version
378
+
379
+ # 4. Publish to npm
380
+ npm publish
381
+
382
+ # 5. Tag and push
383
+ git tag v2.0.3
384
+ git push origin v2.0.3
385
+ ```
386
+
387
+ ---
388
+
389
+ ## Maintenance Commands
390
+
391
+ ### Update Documentation
392
+
393
+ ```bash
394
+ # Sync latest ontology docs from source
395
+ cd ONE/one/
396
+ # Edit files...
397
+
398
+ # Rebuild CLI package
399
+ cd ONE/cli/
400
+ npm run build
401
+ npm publish
402
+ ```
403
+
404
+ ### Update Starter App
405
+
406
+ ```bash
407
+ # Update web/ directory in source
408
+ cd ONE/web/
409
+ # Add new components, update dependencies...
410
+
411
+ # Rebuild CLI package
412
+ cd ONE/cli/
413
+ npm run build
414
+ npm publish
415
+ ```
416
+
417
+ ### Update AI Configuration
418
+
419
+ ```bash
420
+ # Update .claude/ directory in source
421
+ cd ONE/.claude/
422
+ # Add new agents, commands, hooks...
423
+
424
+ # Rebuild CLI package
425
+ cd ONE/cli/
426
+ npm run build
427
+ npm publish
428
+ ```
429
+
430
+ ---
431
+
432
+ ## Distribution Channels
433
+
434
+ ### 1. NPM Registry
435
+
436
+ **URL:** `https://www.npmjs.com/package/oneie`
437
+
438
+ **Install:**
439
+
440
+ ```bash
441
+ npm install -g oneie
442
+ # or
443
+ npx oneie
444
+ ```
445
+
446
+ ### 2. GitHub Repository
447
+
448
+ **URL:** `https://github.com/one-ie/one`
449
+
450
+ **Clone:**
451
+
452
+ ```bash
453
+ git clone https://github.com/one-ie/one.git
454
+ cd one/cli
455
+ npm install
456
+ npm run build
457
+ npm link
458
+ ```
459
+
460
+ ### 3. Direct Download
461
+
462
+ **URL:** `https://one.ie/download`
463
+
464
+ **Usage:**
465
+
466
+ ```bash
467
+ curl -o oneie.tgz https://one.ie/download/oneie-latest.tgz
468
+ npm install -g oneie.tgz
469
+ ```
470
+
471
+ ---
472
+
473
+ ## Security Considerations
474
+
475
+ ### Package Integrity
476
+
477
+ - **Signed releases:** All npm packages signed with GPG
478
+ - **Checksums:** SHA256 checksums published with releases
479
+ - **Audit:** Regular `npm audit` checks for vulnerabilities
480
+
481
+ ### User Privacy
482
+
483
+ - **No telemetry:** CLI does not collect usage data
484
+ - **Local-first:** All documentation and AI config stored locally
485
+ - **Offline-capable:** Works without internet after initial install
486
+
487
+ ### License Compliance
488
+
489
+ - **MIT License:** Permissive open-source license
490
+ - **Attribution:** Credit required in derivative works
491
+ - **Commercial use:** Allowed without restrictions
492
+
493
+ ---
494
+
495
+ ## Troubleshooting
496
+
497
+ ### Issue: CLI not found after install
498
+
499
+ ```bash
500
+ # Fix: Ensure npm global bin directory is in PATH
501
+ npm config get prefix
502
+ export PATH="$(npm config get prefix)/bin:$PATH"
503
+ ```
504
+
505
+ ### Issue: Permission errors on Linux/Mac
506
+
507
+ ```bash
508
+ # Fix: Use npm's built-in permissions
509
+ npx oneie # Uses local install, no global permissions needed
510
+ ```
511
+
512
+ ### Issue: Old version cached
513
+
514
+ ```bash
515
+ # Fix: Clear npm cache and reinstall
516
+ npm cache clean --force
517
+ npx clear-npx-cache
518
+ npx oneie@latest
519
+ ```
520
+
521
+ ---
522
+
523
+ ## Development Workflow
524
+
525
+ ### Local Testing
526
+
527
+ ```bash
528
+ # 1. Make changes to CLI source
529
+ cd ONE/cli/src/
530
+ # Edit files...
531
+
532
+ # 2. Rebuild
533
+ npm run build
534
+
535
+ # 3. Link locally
536
+ npm link
537
+
538
+ # 4. Test in new directory
539
+ cd /tmp/test-project/
540
+ oneie
541
+ ```
542
+
543
+ ### CI/CD Pipeline (GitHub Actions)
544
+
545
+ ```yaml
546
+ # .github/workflows/publish-cli.yml
547
+ name: Publish CLI
548
+ on:
549
+ push:
550
+ tags:
551
+ - "v*"
552
+
553
+ jobs:
554
+ publish:
555
+ runs-on: ubuntu-latest
556
+ steps:
557
+ - uses: actions/checkout@v3
558
+ - uses: actions/setup-node@v3
559
+ with:
560
+ node-version: 18
561
+ registry-url: https://registry.npmjs.org/
562
+
563
+ - name: Install dependencies
564
+ run: cd cli && npm install
565
+
566
+ - name: Build
567
+ run: cd cli && npm run build
568
+
569
+ - name: Publish to npm
570
+ run: cd cli && npm publish
571
+ env:
572
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
573
+ ```
574
+
575
+ ---
576
+
577
+ ## Related Documentation
578
+
579
+ - **[CLI Documentation](./cli.md)** - Complete CLI command reference
580
+ - **[Ontology](../knowledge/ontology.md)** - 6-dimension data model
581
+ - **[Architecture](../knowledge/architecture.md)** - Platform architecture
582
+ - **[Workflow](../connections/workflow.md)** - Development process
583
+
584
+ ---
585
+
586
+ ## Summary
587
+
588
+ The ONE CLI packaging system:
589
+
590
+ 1. **Bundles** everything AI needs (docs, config, starter code)
591
+ 2. **Deploys** to npm as `oneie` package
592
+ 3. **Distributes** via `npx oneie` (no install required)
593
+ 4. **Bootstraps** complete projects in 30 seconds
594
+ 5. **Updates** seamlessly via version bumps
595
+
596
+ **Core Innovation:** Self-contained, AI-ready packages that work offline and include complete ontology knowledge.
597
+
598
+ ---
599
+
600
+ **Built for simplicity, portability, and AI-first development.**