oneie 3.3.4 → 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.
@@ -0,0 +1,187 @@
1
+ ### New Feature Examples, Written in Plain English
2
+
3
+ #### 1. Automated Content Repurposing Engine
4
+
5
+ This feature creates an intelligent content flywheel, maximizing the value of every video a creator produces.
6
+
7
+ **FEATURE:** Repurpose high-performing videos into a blog post and social media thread
8
+
9
+ **WHEN** a creator's video reaches 10,000 views
10
+
11
+ **FLOW:**
12
+
13
+ GET the video WHERE view count is 10,000
14
+
15
+ SAVE AS source video
16
+
17
+ CALL OpenAI to transcribe the video
18
+
19
+ WITH source video audio
20
+
21
+ SAVE AS transcript
22
+
23
+ CALL OpenAI to identify the 5 key takeaways
24
+
25
+ WITH the transcript
26
+
27
+ SAVE AS key takeaways
28
+
29
+ CALL OpenAI to write a detailed blog post
30
+
31
+ WITH the transcript and key takeaways
32
+
33
+ IN THE STYLE OF the creator's previous blog posts
34
+
35
+ SAVE AS blog post content
36
+
37
+ CREATE blog post called "Insights from my Latest Video"
38
+
39
+ WITH blog post content
40
+
41
+ WITH a link to the source video
42
+
43
+ WITH status "draft"
44
+
45
+ SAVE AS new post
46
+
47
+ **CONNECT** creator to new post as **authored**
48
+
49
+ CALL OpenAI to write a 5-part social media thread
50
+
51
+ WITH the key takeaways
52
+
53
+ SAVE AS social thread content
54
+
55
+ CREATE social post called "Thread: 5 Key Ideas from my New Video"
56
+
57
+ WITH social thread content
58
+
59
+ SAVE AS new thread
60
+
61
+ **CONNECT** new post to new thread as **references**
62
+
63
+ NOTIFY creator ABOUT the new draft content
64
+
65
+ VIA in-app message
66
+
67
+ WITH a link to review and publish
68
+
69
+ ---
70
+
71
+ #### 2. Proactive Student Engagement Journey
72
+
73
+ This feature acts as an automated teaching assistant, ensuring students stay engaged and get help when they need it.
74
+
75
+ **FEATURE:** Onboard and nurture new course students
76
+
77
+ **WHEN** a student enrolls in a course
78
+
79
+ **FLOW:**
80
+
81
+ **WAIT** 1 hour
82
+
83
+ NOTIFY the student ABOUT their enrollment
84
+
85
+ VIA email
86
+
87
+ WITH a welcome message and a link to the first lesson
88
+
89
+ **WAIT** 3 days
90
+
91
+ GET the student's progress WHERE they are enrolled in the course
92
+
93
+ SAVE AS course progress
94
+
95
+ CHECK course progress is greater than 0
96
+
97
+ OTHERWISE NOTIFY the student ABOUT getting started
98
+
99
+ VIA push notification
100
+
101
+ WITH a motivational message: "Ready to dive in? Your first lesson is waiting for you!"
102
+
103
+ **WAIT** 7 days
104
+
105
+ GET the student's completed lessons
106
+
107
+ SAVE AS completed lessons
108
+
109
+ CHECK completed lessons is greater than 2
110
+
111
+ THEN GIVE the student 50 tokens as a reward for their progress
112
+
113
+ AND NOTIFY them about the reward
114
+
115
+ ---
116
+
117
+ #### 3. Dynamic, AI-Generated Personalized Course
118
+
119
+ This is a premium, high-value feature that demonstrates the full power of the AI-native ontology.
120
+
121
+ **FEATURE:** Generate a personalized learning path for a fan
122
+
123
+ **INPUT:**
124
+
125
+ - fan: who is the course for
126
+
127
+ - topic: what they want to learn
128
+
129
+
130
+ **OUTPUT:**
131
+
132
+ - course ID: the new, personalized course
133
+
134
+
135
+ **FLOW:**
136
+
137
+ CHECK fan owns at least 1000 tokens
138
+
139
+ OTHERWISE say "This feature requires 1000 tokens to create a custom course."
140
+
141
+ GET all of the creator's content WHERE the knowledge label is the fan's topic
142
+
143
+ SAVE AS source materials
144
+
145
+ CALL OpenAI to analyze and structure a 5-part curriculum
146
+
147
+ WITH the source materials
148
+
149
+ SAVE AS curriculum
150
+
151
+ CREATE course called "Your Personal Path to Mastering [topic]"
152
+
153
+ WITH the fan's name in the description
154
+
155
+ SAVE AS new course
156
+
157
+ CONNECT fan to new course as enrolled
158
+
159
+ CONNECT creator to new course as teaching
160
+
161
+ FOR EACH chapter IN the curriculum
162
+
163
+ DO CREATE a lesson WITH the chapter's content
164
+
165
+ AND CONNECT the lesson to new course as part_of
166
+
167
+ RECORD personalized course generated
168
+
169
+ BY fan
170
+
171
+ WITH the topic
172
+
173
+ WITH the number of lessons created
174
+
175
+ **GIVE** the course ID and a success message
176
+
177
+ ---
178
+
179
+ ### Strategic Implications of This System
180
+
181
+ This Plain English DSL unlocks three transformative business capabilities:
182
+
183
+ 1. **The Creator App Store:** Creators can now write and package their own features. A power user could write a sophisticated "Automated Substack Newsletter" feature and _sell or share it_ with other creators on the ONE platform. The platform evolves from a tool into a self-sustaining ecosystem and marketplace.
184
+
185
+ 2. **The Rise of the "AI Feature Engineer":** You can give a high-level business goal to an AI agent (e.g., "Increase fan-to-token-holder conversion by 10%"). The agent can analyze existing data, hypothesize a solution, write a new feature in Plain English (like a "first-time buyer discount"), and deploy it. The system becomes self-optimizing.
186
+
187
+ 3. **Zero-Ambiguity Auditing and Governance:** When business logic is written in auditable, version-controlled English, compliance and governance become trivial. You can prove exactly how the system works for any given feature by simply reading its specification, which is always in sync with the live code.
@@ -247,10 +247,12 @@ export const migrate = mutation({
247
247
 
248
248
  ## Hierarchical Groups (New Capability)
249
249
 
250
- Once groups are live, you can nest them:
250
+ Once groups are live, you can nest them in **both database AND filesystem**:
251
251
 
252
252
  ### Example 1: Company with Teams
253
253
 
254
+ **Database (Runtime Isolation):**
255
+
254
256
  ```typescript
255
257
  // Parent: Acme Corporation
256
258
  const acme = await createGroup({
@@ -276,8 +278,47 @@ const backend = await createGroup({
276
278
  });
277
279
  ```
278
280
 
281
+ **Filesystem (Documentation & AI Context):**
282
+
283
+ After creating groups in database, generate hierarchical documentation:
284
+
285
+ ```bash
286
+ npx oneie create-group-docs
287
+
288
+ # Creates:
289
+ /acme/ # Installation folder
290
+ ├── groups/
291
+ │ ├── acme-corp/
292
+ │ │ └── README.md
293
+ │ ├── acme-corp-engineering/
294
+ │ │ └── README.md
295
+ │ └── acme-corp-engineering-backend/
296
+ │ └── README.md
297
+ ```
298
+
299
+ Add custom documentation that inherits from parent groups:
300
+
301
+ ```bash
302
+ # Backend-specific practices
303
+ echo "# Backend Practices" > /acme/groups/acme-corp-engineering-backend/practices.md
304
+
305
+ # Engineering-wide patterns (inherited by backend)
306
+ echo "# Engineering Patterns" > /acme/groups/acme-corp-engineering/patterns.md
307
+ ```
308
+
309
+ **File Resolution Example:**
310
+
311
+ When AI or web app loads `practices.md` for backend team:
312
+
313
+ 1. `/acme/groups/acme-corp-engineering-backend/practices.md` ✅ (most specific)
314
+ 2. `/acme/groups/acme-corp-engineering/practices.md` (parent group)
315
+ 3. `/acme/practices.md` (installation-wide)
316
+ 4. `/one/practices.md` (global fallback)
317
+
279
318
  ### Example 2: DAO with Committees
280
319
 
320
+ **Database:**
321
+
281
322
  ```typescript
282
323
  // Parent: Main DAO
283
324
  const dao = await createGroup({
@@ -302,6 +343,22 @@ const governance = await createGroup({
302
343
  });
303
344
  ```
304
345
 
346
+ **Filesystem:**
347
+
348
+ ```bash
349
+ /cooldao/ # Installation folder
350
+ ├── groups/
351
+ │ ├── cooldao/
352
+ │ │ ├── README.md
353
+ │ │ └── governance.md # DAO-wide governance rules
354
+ │ ├── cooldao-treasury/
355
+ │ │ ├── README.md
356
+ │ │ └── multisig-setup.md # Treasury-specific docs
357
+ │ └── cooldao-governance/
358
+ │ ├── README.md
359
+ │ └── proposal-process.md # Governance-specific docs
360
+ ```
361
+
305
362
  **Query hierarchy:**
306
363
  ```typescript
307
364
  // Get all subgroups recursively
@@ -500,3 +557,179 @@ const allEntities = await getEntitiesInHierarchy({
500
557
  - ✅ Backward compatible (organizations become group type)
501
558
 
502
559
  **Organizations don't disappear. They evolve into groups.**
560
+
561
+ ---
562
+
563
+ ## Installation Folder Integration (v2.0.0)
564
+
565
+ Groups now span **two layers**:
566
+
567
+ ### 1. Database Layer (Runtime)
568
+
569
+ ```typescript
570
+ // Groups table with hierarchical support
571
+ groups: defineTable({
572
+ name: v.string(),
573
+ type: v.union(...), // 6 types
574
+ parentGroupId: v.optional(v.id("groups")), // Hierarchical nesting
575
+ properties: v.any(),
576
+ status: v.string(),
577
+ createdAt: v.number(),
578
+ updatedAt: v.number(),
579
+ })
580
+ ```
581
+
582
+ **Purpose:** Runtime data isolation via `groupId`
583
+
584
+ ### 2. Filesystem Layer (Documentation)
585
+
586
+ ```
587
+ /<installation-name>/ # Installation folder
588
+ ├── groups/ # Group documentation (mirrors hierarchy)
589
+ │ ├── <parent-slug>/
590
+ │ │ ├── README.md
591
+ │ │ ├── <child-slug>/
592
+ │ │ │ └── README.md
593
+ │ │ └── practices.md
594
+ │ └── <sibling-slug>/
595
+ │ └── README.md
596
+ ├── people/
597
+ ├── things/
598
+ ├── connections/
599
+ ├── events/
600
+ └── knowledge/
601
+ ```
602
+
603
+ **Purpose:** Private documentation that overrides global `/one/` templates
604
+
605
+ ### Complete Workflow
606
+
607
+ **Step 1: Initialize Installation**
608
+ ```bash
609
+ npx oneie init
610
+
611
+ # Prompts:
612
+ # - Your name: Anthony O'Connell
613
+ # - Your email: anthony@one.ie
614
+ # - Organization name: Acme Corp
615
+ # - Installation identifier: acme
616
+ # - Domain: acme.com
617
+
618
+ # Creates:
619
+ # - /one/ (global ontology)
620
+ # - /acme/ (installation folder with 6-dimension structure)
621
+ # - /web/ (frontend)
622
+ # - /backend/ (backend)
623
+ ```
624
+
625
+ **Step 2: Create Groups in Database**
626
+ ```bash
627
+ cd web && bun run dev
628
+ # Visit /groups/new in browser
629
+ # Create groups: "acme-corp", "engineering", "engineering/frontend"
630
+ ```
631
+
632
+ **Step 3: Generate Group Documentation**
633
+ ```bash
634
+ npx oneie create-group-docs
635
+
636
+ # Fetches groups from database
637
+ # Creates hierarchical folders:
638
+ # - /acme/groups/acme-corp/README.md
639
+ # - /acme/groups/engineering/README.md
640
+ # - /acme/groups/engineering/frontend/README.md
641
+ ```
642
+
643
+ **Step 4: Add Custom Documentation**
644
+ ```bash
645
+ # Frontend-specific practices
646
+ echo "# Frontend Practices" > /acme/groups/engineering/frontend/practices.md
647
+
648
+ # Engineering-wide patterns (inherited by frontend)
649
+ echo "# Engineering Patterns" > /acme/groups/engineering/patterns.md
650
+
651
+ # Installation-wide rules
652
+ echo "# Acme Corp Rules" > /acme/knowledge/company-rules.md
653
+ ```
654
+
655
+ **Step 5: File Resolution in Action**
656
+
657
+ When AI or web app loads `practices.md` for frontend group:
658
+
659
+ ```typescript
660
+ // File resolution hierarchy:
661
+ const content = await resolveFile("practices.md", {
662
+ installationName: "acme",
663
+ groupId: frontendGroupId,
664
+ convexClient: convex
665
+ });
666
+
667
+ // Checks in order:
668
+ // 1. /acme/groups/engineering/frontend/practices.md ✅ (found!)
669
+ // 2. /acme/groups/engineering/practices.md (parent group)
670
+ // 3. /acme/practices.md (installation-wide)
671
+ // 4. /one/practices.md (global fallback)
672
+ ```
673
+
674
+ ### Key Benefits
675
+
676
+ **1. Multi-Tenancy**
677
+ - One installation serves many database groups
678
+ - Each group can have custom documentation
679
+ - Perfect data isolation via `groupId`
680
+
681
+ **2. Hierarchical Documentation**
682
+ - Child groups inherit parent documentation
683
+ - Override at any level (group, parent, installation, global)
684
+ - Walk up hierarchy automatically
685
+
686
+ **3. Private Customizations**
687
+ - Installation folder = your private docs
688
+ - Never released (stays in your repo)
689
+ - Overrides global `/one/` templates
690
+
691
+ **4. AI Context**
692
+ - AI agents read group-specific docs
693
+ - Hierarchical resolution provides context
694
+ - Group practices inform feature generation
695
+
696
+ ### Architecture Diagram
697
+
698
+ ```
699
+ ┌─────────────────────────────────────────────────────────────┐
700
+ │ DATABASE (Runtime Isolation) │
701
+ ├─────────────────────────────────────────────────────────────┤
702
+ │ groups │
703
+ │ ├── acme-corp (parentGroupId: null) │
704
+ │ ├── engineering (parentGroupId: acme-corp) │
705
+ │ └── frontend (parentGroupId: engineering) │
706
+ │ │
707
+ │ things / connections / events / knowledge │
708
+ │ ├── groupId: acme-corp → Acme-wide data │
709
+ │ ├── groupId: engineering → Engineering data │
710
+ │ └── groupId: frontend → Frontend-only data │
711
+ └─────────────────────────────────────────────────────────────┘
712
+ ↓
713
+ ┌─────────────────────────────────────────────────────────────┐
714
+ │ FILESYSTEM (Documentation & AI Context) │
715
+ ├─────────────────────────────────────────────────────────────┤
716
+ │ /one/ → Global templates (public) │
717
+ │ /acme/ → Installation folder (private)│
718
+ │ └── groups/ │
719
+ │ ├── acme-corp/ → Org-wide docs │
720
+ │ └── engineering/ → Team-wide docs │
721
+ │ └── frontend/ → Team-specific docs │
722
+ │ │
723
+ │ File Resolution: frontend → engineering → installation → one│
724
+ └─────────────────────────────────────────────────────────────┘
725
+ ```
726
+
727
+ ### See Also
728
+
729
+ - **[Installation Folder Multi-Tenancy Plan](./group-folder-multi-tenancy.md)** - Complete architecture
730
+ - **[Feature 2: CLI](../features/2-cli.md)** - Implementation details
731
+ - **[CLI Overview](../cli/cli.md)** - User-facing documentation
732
+
733
+ ---
734
+
735
+ **The evolution:** Organizations → Groups + Installation Folders = Enterprise-grade multi-tenancy with hierarchical documentation
@@ -0,0 +1,17 @@
1
+ This is the plan to get the complete system working
2
+
3
+ Everything works
4
+
5
+ npx oneie
6
+ claude
7
+ /one
8
+
9
+ now we need to optimise the .claude/commands/one.md
10
+
11
+ first check if there is a /web directory ... no there isn't it's called /frontend we need to edit the /cli script to change the downloaded system to clone into /web not frontend and update all references to frontend to point to web
12
+
13
+ then check if the server is running. if not offer to start i.e. cd web && bun dev
14
+
15
+ also you are not copying /.mcp.json to /apps/one/.mcp json update releease script
16
+
17
+ also the cli should create a new folder for the group name filled in the cli
@@ -3,6 +3,10 @@
3
3
  Now
4
4
 
5
5
  - [ ] This is calculated automatically.
6
+ - [ ] Create a folder with the group name
7
+ - [ ]
8
+ - [ ] Have Cli ask for a name
9
+ - [ ] Start Server automatically - start cd web in /one
6
10
 
7
11
  ---
8
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oneie",
3
- "version": "3.3.4",
3
+ "version": "3.3.5",
4
4
  "type": "module",
5
5
  "description": "Build apps, websites, and AI agents in English. Download to your computer, run in the cloud, deploy to the edge. Open source and free forever.",
6
6
  "bin": {
File without changes
File without changes