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,432 @@
1
+ # Release Strategy for ONE Platform
2
+
3
+ **Version:** 1.0.0
4
+ **Status:** Draft
5
+ **Owner:** Platform Team
6
+ **Last Updated:** 2025-10-14
7
+
8
+ ## Overview
9
+
10
+ This document outlines the release and distribution strategy for the ONE platform across multiple repositories and packages. The goal is to maintain a single source of truth while distributing components to specialized repositories for different use cases.
11
+
12
+ ## Repository Structure
13
+
14
+ ### Primary Repositories
15
+
16
+ 1. **one-ie/one** (Main CLI/SDK Package)
17
+ - Core platform logic
18
+ - CLI tool (`npx oneie`)
19
+ - Ontology documentation
20
+ - Configuration templates
21
+ - License and core documentation
22
+
23
+ 2. **one-ie/web** (Web Application)
24
+ - Astro + React frontend
25
+ - Standalone web application
26
+ - Can be used independently or with CLI
27
+
28
+ 3. **one-ie/docs** (Documentation Site)
29
+ - Public-facing documentation
30
+ - API reference
31
+ - Tutorials and guides
32
+ - Examples and case studies
33
+
34
+ ### Workspace Structure
35
+
36
+ ```
37
+ ONE/ # Main development workspace (private/local)
38
+ ├── one/ # Ontology docs → one-ie/one
39
+ ├── .claude/ # AI config → one-ie/one
40
+ ├── AGENTS.md # → one-ie/one, apps/one
41
+ ├── CLAUDE.md # → one-ie/one, apps/one
42
+ ├── README.md # → one-ie/one, apps/one
43
+ ├── LICENSE.md # → one-ie/one, apps/one
44
+ ├── web/ # → one-ie/web
45
+ ├── apps/
46
+ │ └── one/ # Build target for one-ie/one
47
+ │ ├── one/ # (synced from /one)
48
+ │ ├── .claude/ # (synced from /.claude)
49
+ │ ├── web/ # (linked to one-ie/web)
50
+ │ └── docs/ # (linked to one-ie/docs)
51
+ ├── cli/ # Build target for CLI package
52
+ └── scripts/
53
+ └── release.sh # Release automation
54
+ ```
55
+
56
+ ## Sync Strategy
57
+
58
+ ### 1. Core Documentation Sync
59
+
60
+ **Source → Targets:**
61
+ - `/one/*` → `cli/one/*` and `apps/one/one/*`
62
+ - `/.claude/*` → `cli/.claude/*` and `apps/one/.claude/*`
63
+ - `/AGENTS.md`, `/CLAUDE.md`, `/README.md`, `/LICENSE.md` → `cli/` and `apps/one/`
64
+
65
+ **Rationale:**
66
+ - Keep ontology and configuration in sync across distributions
67
+ - CLI package contains everything needed for `npx oneie`
68
+ - Apps directory is staging area for multi-repo coordination
69
+
70
+ ### 2. Web Application Strategy
71
+
72
+ **Options for web sync:**
73
+
74
+ #### Option A: Git Submodule (Recommended)
75
+ ```bash
76
+ cd apps/one
77
+ git submodule add https://github.com/one-ie/web.git web
78
+ ```
79
+
80
+ **Pros:**
81
+ - Clean separation of concerns
82
+ - Independent versioning
83
+ - Explicit version pinning
84
+ - Easy to update: `git submodule update --remote`
85
+ - One-ie/web can be used standalone
86
+
87
+ **Cons:**
88
+ - Requires submodule knowledge
89
+ - Extra step during clone: `git clone --recursive`
90
+ - Can be confusing for contributors
91
+
92
+ #### Option B: Directory Sync
93
+ ```bash
94
+ rsync -av --delete web/ apps/one/web/
95
+ ```
96
+
97
+ **Pros:**
98
+ - Simple, no git complexity
99
+ - Everything in one repo
100
+ - Easy for contributors
101
+
102
+ **Cons:**
103
+ - Duplicate code maintenance
104
+ - No independent versioning
105
+ - Harder to keep in sync
106
+ - Bloats repository size
107
+
108
+ #### Option C: Symbolic Link (Development Only)
109
+ ```bash
110
+ ln -s ../../web apps/one/web
111
+ ```
112
+
113
+ **Pros:**
114
+ - Perfect for local development
115
+ - No duplication
116
+ - Instant sync
117
+
118
+ **Cons:**
119
+ - Doesn't work in git
120
+ - Local development only
121
+
122
+ **Recommendation:** Use **Option A (Git Submodule)** for `apps/one/web` linking to `one-ie/web`. This provides clean separation while maintaining the ability to use the web app independently.
123
+
124
+ ### 3. Documentation Strategy
125
+
126
+ **Same as web - use Git Submodule:**
127
+ ```bash
128
+ cd apps/one
129
+ git submodule add https://github.com/one-ie/docs.git docs
130
+ ```
131
+
132
+ ## Release Workflow
133
+
134
+ ### Phase 1: Preparation
135
+ 1. Ensure all changes committed in development workspace
136
+ 2. Run tests and validation
137
+ 3. Update version numbers
138
+ 4. Update CHANGELOG.md
139
+
140
+ ### Phase 2: Sync to Staging
141
+ 1. Sync `/one` → `cli/one` and `apps/one/one`
142
+ 2. Sync `/.claude` → `cli/.claude` and `apps/one/.claude`
143
+ 3. Sync core docs → `cli/` and `apps/one/`
144
+ 4. Update submodules in `apps/one/`:
145
+ - `git submodule update --remote web`
146
+ - `git submodule update --remote docs`
147
+
148
+ ### Phase 3: Publish CLI Package
149
+ 1. `cd cli`
150
+ 2. `npm version [major|minor|patch]`
151
+ 3. `npm publish`
152
+ 4. Create git tag
153
+ 5. Push to one-ie/one
154
+
155
+ ### Phase 4: Publish Web Application
156
+ 1. `cd web` (or `apps/one/web` if using submodule)
157
+ 2. Update version
158
+ 3. Build and test
159
+ 4. Push to one-ie/web
160
+ 5. Deploy to Cloudflare Pages
161
+
162
+ ### Phase 5: Publish Documentation
163
+ 1. `cd docs` (or `apps/one/docs` if using submodule)
164
+ 2. Update version
165
+ 3. Build and test
166
+ 4. Push to one-ie/docs
167
+ 5. Deploy to docs site
168
+
169
+ ### Phase 6: Update Main Package
170
+ 1. `cd apps/one`
171
+ 2. Commit all changes
172
+ 3. Create release tag
173
+ 4. Push to one-ie/one
174
+ 5. Create GitHub release with notes
175
+
176
+ ## Release Script
177
+
178
+ The `scripts/release.sh` script automates phases 1-2:
179
+
180
+ ```bash
181
+ ./scripts/release.sh [major|minor|patch]
182
+ ```
183
+
184
+ **What it does:**
185
+ 1. Validates git status (clean working directory)
186
+ 2. Runs tests
187
+ 3. Syncs all files to staging areas
188
+ 4. Updates submodules
189
+ 5. Creates commit with version bump
190
+ 6. Pushes to remotes
191
+ 7. Creates release tags
192
+
193
+ **What it does NOT do:**
194
+ - Publish to npm (manual step for safety)
195
+ - Deploy to production (CI/CD handles this)
196
+ - Create GitHub releases (manual step for release notes)
197
+
198
+ ## Version Strategy
199
+
200
+ ### Semantic Versioning
201
+ - **Major (1.0.0):** Breaking changes to ontology or APIs
202
+ - **Minor (0.1.0):** New features, backward compatible
203
+ - **Patch (0.0.1):** Bug fixes, no API changes
204
+
205
+ ### Synchronized Releases
206
+ - CLI, Web, and Docs share the same version number
207
+ - Ontology version (in `one/knowledge/ontology.md`) is independent
208
+ - Example: ONE Platform v1.2.3 can use Ontology v2.0.0
209
+
210
+ ### Release Channels
211
+ - **stable:** Production releases (main branch)
212
+ - **beta:** Testing releases (beta branch)
213
+ - **canary:** Nightly builds (dev branch)
214
+
215
+ ## Git Submodule Commands
216
+
217
+ ### Initial Setup
218
+ ```bash
219
+ # In apps/one directory
220
+ git submodule add https://github.com/one-ie/web.git web
221
+ git submodule add https://github.com/one-ie/docs.git docs
222
+ git commit -m "Add web and docs as submodules"
223
+ ```
224
+
225
+ ### Cloning with Submodules
226
+ ```bash
227
+ git clone --recursive https://github.com/one-ie/one.git
228
+ # Or after regular clone:
229
+ git submodule init
230
+ git submodule update
231
+ ```
232
+
233
+ ### Updating Submodules
234
+ ```bash
235
+ # Update to latest from remote
236
+ git submodule update --remote web
237
+ git submodule update --remote docs
238
+
239
+ # Commit the submodule pointer updates
240
+ git add web docs
241
+ git commit -m "Update web and docs submodules"
242
+ ```
243
+
244
+ ### Working in Submodules
245
+ ```bash
246
+ # Make changes in submodule
247
+ cd web
248
+ git checkout main
249
+ git pull
250
+ # make changes...
251
+ git add .
252
+ git commit -m "Update web"
253
+ git push
254
+
255
+ # Update parent repo to point to new commit
256
+ cd ../..
257
+ git add web
258
+ git commit -m "Update web submodule pointer"
259
+ git push
260
+ ```
261
+
262
+ ## CI/CD Integration
263
+
264
+ ### GitHub Actions Workflow
265
+
266
+ **.github/workflows/release.yml:**
267
+ ```yaml
268
+ name: Release
269
+
270
+ on:
271
+ push:
272
+ tags:
273
+ - 'v*'
274
+
275
+ jobs:
276
+ release:
277
+ runs-on: ubuntu-latest
278
+ steps:
279
+ - uses: actions/checkout@v4
280
+ with:
281
+ submodules: recursive
282
+
283
+ - name: Setup Node
284
+ uses: actions/setup-node@v4
285
+ with:
286
+ node-version: '20'
287
+
288
+ - name: Install dependencies
289
+ run: npm install
290
+
291
+ - name: Run tests
292
+ run: npm test
293
+
294
+ - name: Build
295
+ run: npm run build
296
+
297
+ - name: Publish to npm
298
+ run: npm publish
299
+ env:
300
+ NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
301
+
302
+ - name: Create GitHub Release
303
+ uses: actions/create-release@v1
304
+ env:
305
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
306
+ ```
307
+
308
+ ## Security Considerations
309
+
310
+ ### Sensitive Files
311
+ **Never sync these:**
312
+ - `.env*` files
313
+ - `node_modules/`
314
+ - Build artifacts (`dist/`, `.astro/`)
315
+ - User data or secrets
316
+ - Private keys
317
+
318
+ ### Access Control
319
+ - CLI repo: Public (open source)
320
+ - Web repo: Public (open source)
321
+ - Docs repo: Public (open source)
322
+ - Main workspace: Private (development only)
323
+
324
+ ## Rollback Strategy
325
+
326
+ ### If Release Fails
327
+
328
+ 1. **Revert npm publish:**
329
+ ```bash
330
+ npm unpublish one@1.2.3
331
+ npm publish --tag latest one@1.2.2
332
+ ```
333
+
334
+ 2. **Revert git tag:**
335
+ ```bash
336
+ git tag -d v1.2.3
337
+ git push origin :refs/tags/v1.2.3
338
+ ```
339
+
340
+ 3. **Redeploy previous version:**
341
+ ```bash
342
+ git revert HEAD
343
+ git push
344
+ ```
345
+
346
+ ## Testing Before Release
347
+
348
+ ### Checklist
349
+ - [ ] All tests pass (`bun test`)
350
+ - [ ] Build succeeds (`bun run build`)
351
+ - [ ] Type checking passes (`bunx astro check`)
352
+ - [ ] Lint passes (`bun run lint`)
353
+ - [ ] Documentation is up to date
354
+ - [ ] CHANGELOG.md updated
355
+ - [ ] Version numbers bumped
356
+ - [ ] Breaking changes documented
357
+ - [ ] Migration guide written (if needed)
358
+
359
+ ### Local Testing
360
+ ```bash
361
+ # Test CLI locally before publishing
362
+ cd cli
363
+ npm link
364
+ oneie --version
365
+ oneie --help
366
+
367
+ # Test in fresh directory
368
+ cd /tmp
369
+ oneie init test-project
370
+ cd test-project
371
+ oneie dev
372
+ ```
373
+
374
+ ## Future Enhancements
375
+
376
+ ### Planned Improvements
377
+ 1. **Automated testing in release script**
378
+ 2. **Automated CHANGELOG generation**
379
+ 3. **Release candidate (RC) builds**
380
+ 4. **Automated deployment to Cloudflare**
381
+ 5. **Slack/Discord notifications on release**
382
+ 6. **Release metrics and monitoring**
383
+ 7. **A/B testing for new features**
384
+
385
+ ### Monorepo Consideration
386
+ **Future option:** Migrate to a monorepo using Turborepo or Nx
387
+ - Single repository for all packages
388
+ - Shared dependencies
389
+ - Atomic commits across packages
390
+ - Simplified version management
391
+
392
+ **Not recommended now because:**
393
+ - Current structure is simple and working
394
+ - Want to validate separation of concerns first
395
+ - Monorepo adds complexity during early development
396
+
397
+ ## Questions to Resolve
398
+
399
+ 1. **Submodule vs Directory Sync for Web?**
400
+ - Recommendation: Submodule for clean separation
401
+
402
+ 2. **Should CLI include web?**
403
+ - Recommendation: No, keep separate. CLI can scaffold projects that use web.
404
+
405
+ 3. **Versioning strategy for submodules?**
406
+ - Recommendation: Pin to specific commits, update deliberately
407
+
408
+ 4. **How to handle breaking changes?**
409
+ - Recommendation: Semantic versioning + deprecation warnings
410
+
411
+ 5. **Release frequency?**
412
+ - Recommendation: Weekly minor releases, daily patches if needed
413
+
414
+ ## Conclusion
415
+
416
+ This release strategy provides:
417
+ - **Clear separation** between CLI, Web, and Docs
418
+ - **Single source of truth** in main workspace
419
+ - **Automated syncing** via release script
420
+ - **Independent versioning** where needed
421
+ - **Clean git history** across repositories
422
+
423
+ The use of git submodules for `web` and `docs` is recommended to maintain independence while keeping everything coordinated in `apps/one`.
424
+
425
+ ## Next Steps
426
+
427
+ 1. Review this plan
428
+ 2. Create `scripts/release.sh`
429
+ 3. Set up git submodules in `apps/one`
430
+ 4. Create CI/CD workflows
431
+ 5. Perform first release (v1.0.0)
432
+ 6. Document lessons learned
@@ -209,7 +209,7 @@ Everything begins with identity and organizational scope. This isn't just metada
209
209
  ### Ownership Hierarchy Example
210
210
 
211
211
  ```
212
- organisations/acme-corp (the container)
212
+ groups/acme-corp (the container - type: organization)
213
213
  ├─ owned_by → people/anthony-o-connell (the owner)
214
214
  ├─ member_of → people/sarah-thompson (member, role: analyst)
215
215
  │