oneie 3.6.7 → 3.6.11

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 (165) hide show
  1. package/.claude/agents/agent-backend.md +83 -0
  2. package/.claude/agents/agent-designer.md +97 -0
  3. package/.claude/agents/agent-director.md +118 -7
  4. package/.claude/agents/agent-documenter.md +93 -0
  5. package/.claude/agents/agent-frontend.md +96 -0
  6. package/.claude/agents/agent-ops.md +182 -25
  7. package/.claude/agents/agent-problem-solver.md +166 -0
  8. package/.claude/agents/agent-quality.md +127 -0
  9. package/.claude/commands/build.md +293 -0
  10. package/.claude/commands/cascade.md +231 -127
  11. package/.claude/commands/mcp-toggle.md +93 -0
  12. package/.claude/commands/one.md +198 -116
  13. package/.claude/commands/plan.md +394 -80
  14. package/.claude/commands/release.md +41 -19
  15. package/.claude/commands/server.md +2 -0
  16. package/.claude/hooks/root-cleanup.py +75 -0
  17. package/.claude/skills/INDEX.md +523 -0
  18. package/.claude/skills/REGISTRY.md +529 -0
  19. package/.claude/skills/agent-backend-create-mutation.md +319 -0
  20. package/.claude/skills/agent-designer-create-wireframe.md +341 -0
  21. package/.claude/skills/agent-frontend-create-page.md +413 -0
  22. package/.claude/skills/agents/README.md +238 -0
  23. package/dist/clone-web.js +1 -1
  24. package/dist/clone-web.js.map +1 -1
  25. package/folders.yaml +1 -1
  26. package/one/.obsidian/workspace.json +38 -38
  27. package/one/connections/api/queries-reference.md +842 -0
  28. package/one/connections/api-reference.md +1011 -0
  29. package/one/connections/integration-examples.md +875 -0
  30. package/one/connections/integration-guide.md +869 -0
  31. package/one/connections/integration-phase2.md +736 -0
  32. package/one/events/API_ROUTES_FIXES_SUMMARY.md +262 -0
  33. package/one/events/ASTRO-INTEGRATION-EXAMPLES.md +636 -0
  34. package/one/events/BEFORE_AFTER_COMPARISON.md +960 -0
  35. package/one/events/CONNECTIONS_DEMO.md +501 -0
  36. package/one/events/DELIVERABLES.md +432 -0
  37. package/one/events/DEMO-GROUPS-PAGE.md +392 -0
  38. package/one/events/DEMO-TESTING-SUMMARY.md +518 -0
  39. package/one/events/DEMO_COMPONENTS.md +487 -0
  40. package/one/events/DEMO_HOOKS_INDEX.md +334 -0
  41. package/one/events/DEMO_INFRASTRUCTURE.md +905 -0
  42. package/one/events/DEMO_INFRASTRUCTURE_SUMMARY.md +570 -0
  43. package/one/events/DEMO_INTEGRATION_CHECKLIST.md +431 -0
  44. package/one/events/DEMO_QUICK_REFERENCE.md +441 -0
  45. package/one/events/DEMO_SETUP.md +476 -0
  46. package/one/events/EFFECT_TS_API_PATTERN.md +478 -0
  47. package/one/events/GROUPS_DEMO_IMPLEMENTATION.md +414 -0
  48. package/one/events/HOOKS-DEMO.md +441 -0
  49. package/one/events/ONTOLOGY-HOOKS-README.md +700 -0
  50. package/one/events/ONTOLOGY-INTEGRATION-MANIFEST.md +365 -0
  51. package/one/events/QA-CHECKLIST.md +674 -0
  52. package/one/events/QUICK-START-ONTOLOGY.md +408 -0
  53. package/one/events/SEARCH_DEMO_CODE_REFERENCE.md +639 -0
  54. package/one/events/SEARCH_DEMO_DELIVERY.md +415 -0
  55. package/one/events/SEARCH_DEMO_SUMMARY.md +303 -0
  56. package/one/events/SEARCH_DEMO_VISUAL_GUIDE.md +381 -0
  57. package/one/events/TEST-PLAN-INDEX.md +346 -0
  58. package/one/events/TEST-PLAN.md +1417 -0
  59. package/one/events/TESTING-DELIVERY.txt +372 -0
  60. package/one/events/TRANSITIONS-QUICK-START.md +141 -0
  61. package/one/events/TYPESCRIPT_FIXES.md +152 -0
  62. package/one/events/TYPESCRIPT_FIXES_COMPLETE.txt +412 -0
  63. package/one/events/TYPESCRIPT_FIXES_INDEX.md +341 -0
  64. package/one/events/VIEW-TRANSITIONS.md +428 -0
  65. package/one/events/backend-integration-tests.md +606 -0
  66. package/one/events/backend-structure-diagram.txt +393 -0
  67. package/one/events/backend-structure-summary.txt +269 -0
  68. package/one/events/cloudflare-pages-infrastructure-setup.md +264 -0
  69. package/one/events/convex-analysis-index.md +304 -0
  70. package/one/events/convex-structure-analysis.md +700 -0
  71. package/one/events/design-spec-complete.md +208 -0
  72. package/one/events/ontology-test-examples.md +562 -0
  73. package/one/events/phase1-backend-implementation-complete.md +518 -0
  74. package/one/events/test-dashboard.md +345 -0
  75. package/one/events/test-index.md +361 -0
  76. package/one/events/test-report-ontology.md +582 -0
  77. package/one/events/testing-summary.md +344 -0
  78. package/one/groups/features.md +2878 -0
  79. package/one/groups/strategy copy.md +869 -0
  80. package/one/knowledge/backend-api-reference.md +710 -0
  81. package/one/knowledge/documentation-summary.md +285 -0
  82. package/one/knowledge/lessons-learned.md +294 -4
  83. package/one/knowledge/ontology-visual-guide.md +360 -0
  84. package/one/knowledge/ontology.md +9 -17
  85. package/one/things/demo-accessibility-animations.md +999 -0
  86. package/one/things/demo-components.md +1304 -0
  87. package/one/things/demo-design-summary.md +629 -0
  88. package/one/things/demo-design-system.md +919 -0
  89. package/one/things/demo-page-layouts.md +989 -0
  90. package/one/things/designs/accessibility-audit.md +790 -0
  91. package/one/things/designs/component-specifications.md +757 -0
  92. package/one/things/designs/design-overview.md +318 -0
  93. package/one/things/designs/design-tokens.md +414 -0
  94. package/one/things/designs/wireframes-dashboard.md +653 -0
  95. package/one/things/docs/api-requests.md +923 -0
  96. package/one/things/features/0 All Features.md +2 -0
  97. package/one/things/implementation/backend-guide.md +412 -0
  98. package/one/things/plans/2-backend-agnostic-frontend.md +11 -8
  99. package/one/things/plans/ai-elements.md +1259 -0
  100. package/one/things/plans/ai-integration.md +947 -0
  101. package/one/things/plans/ai-sdk.md +761 -0
  102. package/one/things/plans/app.md +1 -1
  103. package/one/things/plans/architecture-summary.md +283 -0
  104. package/one/things/plans/async-ai-agents.md +215 -0
  105. package/one/things/plans/backend-agnostic-frontend.md +11 -6
  106. package/one/things/plans/backend-cleanup-quickstart.md +346 -0
  107. package/one/things/plans/backend-ontology-conformance.md +416 -0
  108. package/one/things/plans/backend-status.md +541 -0
  109. package/one/things/plans/backend-structure.md +799 -0
  110. package/one/things/plans/backend-target-structure.md +438 -0
  111. package/one/things/plans/backend.md +1133 -0
  112. package/one/things/plans/better-auth-any-backend.md +11 -11
  113. package/one/things/plans/cli-updates-required.md +280 -0
  114. package/one/things/plans/complete-step-by-step.md +1302 -0
  115. package/one/things/plans/convex-agents.md +1005 -0
  116. package/one/things/plans/deployment-architecture.md +426 -0
  117. package/one/things/plans/development-plan.md +1220 -0
  118. package/one/things/plans/effect.md +808 -48
  119. package/one/things/plans/integrate-frontend-and-backend.md +579 -0
  120. package/one/things/plans/mcp-clear-context-prompt.md +60 -0
  121. package/one/things/plans/mcp-simple.md +228 -0
  122. package/one/things/plans/one.md +8 -7
  123. package/one/things/plans/ontology-6-dimensions.md +20 -14
  124. package/one/things/plans/quick-wins.md +1273 -0
  125. package/one/things/plans/readme-backend-cleanup.md +361 -0
  126. package/one/things/plans/separate-demo.md +830 -0
  127. package/one/things/plans/separate.md +3 -3
  128. package/one/things/plans/sequence.md +1897 -0
  129. package/one/things/plans/sync-checklist.md +321 -0
  130. package/one/things/plans/unified-implementation-plan.md +3 -3
  131. package/one/things/plans/update-demos.md +513 -0
  132. package/package.json +1 -1
  133. package/.claude/agents/backend-specialist.md +0 -169
  134. package/.claude/agents/designer.md +0 -216
  135. package/.claude/agents/frontend-specialist.md +0 -236
  136. package/.claude/commands/done.md +0 -35
  137. package/.claude/commands/infer.md +0 -138
  138. package/.claude/commands/next.md +0 -53
  139. package/.claude/commands/one copy.md +0 -565
  140. package/.claude/commands/one-template.md +0 -106
  141. package/.claude/commands/one-v1.md +0 -609
  142. package/.claude/hooks/__pycache__/knowledge-post.cpython-313.pyc +0 -0
  143. package/.claude/hooks/__pycache__/knowledge-pre.cpython-313.pyc +0 -0
  144. package/.claude/hooks/__pycache__/todo.cpython-313.pyc +0 -0
  145. package/one/groups/nine-padel-customers.md +0 -138
  146. package/one/groups/nine-padel-data-structure.md +0 -167
  147. package/one/groups/nine-padel-ontology-specification.md +0 -359
  148. package/one/groups/nine-padel-ontology.md +0 -143
  149. package/one/groups/nine-padel-strategy.md +0 -234
  150. package/one/groups/nine-padel.md +0 -211
  151. package/one/groups/nine-padle-contents.baked.md +0 -1252
  152. package/one/groups/nine-padle-contents.md +0 -6
  153. package/one/things/features/1-1-agent-prompts/design.md +0 -470
  154. package/one/things/features/1-1-agent-prompts/tests.md +0 -264
  155. package/one/things/features/1-2-yaml-orchestrator/design.md +0 -497
  156. package/one/things/features/1-2-yaml-orchestrator/tests.md +0 -227
  157. package/one/things/features/1-3-event-coordination/design.md +0 -544
  158. package/one/things/features/1-3-event-coordination/tests.md +0 -223
  159. package/one/things/features/1-4-knowledge-management/design.md +0 -609
  160. package/one/things/features/1-4-knowledge-management/tests.md +0 -195
  161. package/one/things/features/1-5-quality-loops/design.md +0 -797
  162. package/one/things/features/1-5-quality-loops/tests.md +0 -212
  163. package/one/things/features/1-6-numbering-structure/design.md +0 -610
  164. package/one/things/features/1-6-numbering-structure/tests.md +0 -213
  165. package/one/things/features/dataprovider-interface/1-tests.md +0 -1522
@@ -0,0 +1,989 @@
1
+ # ONE Platform Demo Page Layouts
2
+
3
+ ## Version 1.0.0 - Page Structure Specification
4
+
5
+ This document defines the complete layout structure for all ONE Platform demo pages. Every demo page follows a consistent 5-section pattern that teaches the 6-dimension ontology through interactive examples.
6
+
7
+ ---
8
+
9
+ ## Standard Demo Page Structure
10
+
11
+ ### 5-Section Pattern (Every Page)
12
+
13
+ ```
14
+ ┌─────────────────────────────────────────┐
15
+ │ SECTION 1: HERO │ Hero introduction
16
+ ├─────────────────────────────────────────┤
17
+ │ SECTION 2: PLAYGROUND │ Interactive demo
18
+ ├─────────────────────────────────────────┤
19
+ │ SECTION 3: CODE EXAMPLES │ Implementation patterns
20
+ ├─────────────────────────────────────────┤
21
+ │ SECTION 4: RELATIONSHIP EXPLORER │ Visualize connections
22
+ ├─────────────────────────────────────────┤
23
+ │ SECTION 5: CTA SECTION │ Call to action
24
+ └─────────────────────────────────────────┘
25
+ ```
26
+
27
+ ---
28
+
29
+ ## Section 1: Hero Section
30
+
31
+ ### Purpose
32
+
33
+ Introduce the dimension with a compelling headline, description, and visual hierarchy that prepares users for hands-on exploration.
34
+
35
+ ### Structure
36
+
37
+ ```astro
38
+ <section class="
39
+ relative overflow-hidden
40
+ px-4 py-20 sm:px-6 sm:py-24 md:px-8 md:py-32
41
+ bg-gradient-to-br from-primary/5 via-background to-background
42
+ ">
43
+ <!-- Background visual elements -->
44
+ <div class="absolute inset-0 -z-10">
45
+ <!-- Gradient orbs -->
46
+ <div class="absolute left-1/4 top-0 h-96 w-96 rounded-full
47
+ bg-primary/10 blur-[120px]"></div>
48
+ </div>
49
+
50
+ <!-- Content container -->
51
+ <div class="max-w-4xl mx-auto text-center">
52
+ <!-- Icon or small badge -->
53
+ <div class="inline-flex items-center gap-2 mb-6
54
+ px-3 py-1.5 rounded-full bg-primary/10 text-primary">
55
+ <span class="text-sm font-medium">Dimension Name</span>
56
+ </div>
57
+
58
+ <!-- Main headline -->
59
+ <h1 class="text-4xl md:text-5xl lg:text-6xl
60
+ font-bold leading-tight tracking-tight
61
+ mb-6 text-foreground">
62
+ The {Dimension} Layer of Reality
63
+ </h1>
64
+
65
+ <!-- Subheading -->
66
+ <p class="text-xl md:text-2xl text-muted-foreground
67
+ mb-12 max-w-2xl mx-auto leading-relaxed">
68
+ {One-sentence description of what this dimension represents}
69
+ </p>
70
+
71
+ <!-- CTA buttons -->
72
+ <div class="flex flex-col sm:flex-row gap-4 justify-center">
73
+ <!-- Primary CTA: Start playground -->
74
+ <button class="
75
+ px-6 py-3.5 rounded-md font-semibold
76
+ bg-primary text-primary-foreground
77
+ hover:bg-primary/90
78
+ transition-all duration-200
79
+ focus-visible:outline-2 focus-visible:outline-offset-2
80
+ focus-visible:outline-ring
81
+ h-12
82
+ ">
83
+ Explore Playground <span class="ml-2">→</span>
84
+ </button>
85
+
86
+ <!-- Secondary CTA: Learn more -->
87
+ <button class="
88
+ px-6 py-3.5 rounded-md font-semibold
89
+ border border-border
90
+ bg-background hover:bg-muted
91
+ transition-colors duration-200
92
+ h-12
93
+ ">
94
+ Read Documentation
95
+ </button>
96
+ </div>
97
+ </div>
98
+
99
+ <!-- Scroll indicator (optional) -->
100
+ <div class="flex justify-center mt-12 text-muted-foreground">
101
+ <svg class="w-6 h-6 animate-bounce" fill="none" stroke="currentColor">
102
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 14l-7 7m0 0l-7-7m7 7V3"></path>
103
+ </svg>
104
+ </div>
105
+ </section>
106
+ ```
107
+
108
+ ### Responsive Behavior
109
+
110
+ | Breakpoint | Width | Padding | Font Size |
111
+ |-----------|-------|---------|-----------|
112
+ | Mobile (320px) | 100% | px-4 py-20 | 28px title |
113
+ | Tablet (768px) | 100% | px-6 py-24 | 36px title |
114
+ | Desktop (1024px+) | max-w-4xl | px-8 py-32 | 48px title |
115
+
116
+ ### Hero Section Specifications
117
+
118
+ | Element | Font Size | Line Height | Max Width |
119
+ |---------|-----------|-------------|-----------|
120
+ | Badge | text-sm | normal | auto |
121
+ | Headline (h1) | text-4xl→6xl | 1.2 | 100% |
122
+ | Subheading (p) | text-xl→2xl | 1.5 | 560px |
123
+ | Button text | text-base | normal | auto |
124
+
125
+ ---
126
+
127
+ ## Section 2: Playground Section
128
+
129
+ ### Purpose
130
+
131
+ Provide **interactive, hands-on experience** with the dimension through a form + live data display pattern.
132
+
133
+ ### Structure
134
+
135
+ ```astro
136
+ <section class="px-4 py-16 md:px-6 md:py-20 bg-card border-y border-border">
137
+ <div class="max-w-7xl mx-auto">
138
+ <!-- Section title -->
139
+ <h2 class="text-3xl md:text-4xl font-bold mb-3">
140
+ Try It Yourself
141
+ </h2>
142
+ <p class="text-muted-foreground mb-12 max-w-xl">
143
+ Use the playground below to create and explore {dimension} entities
144
+ in real time.
145
+ </p>
146
+
147
+ <!-- Two-column layout: Form | Data Display -->
148
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
149
+ <!-- LEFT: Form Input -->
150
+ <div class="space-y-6">
151
+ <div class="bg-background rounded-lg p-6 border border-border">
152
+ <h3 class="text-lg font-semibold mb-4">Create New {Entity}</h3>
153
+
154
+ <!-- Form fields -->
155
+ <form class="space-y-4" client:load>
156
+ <!-- Text input -->
157
+ <div class="flex flex-col">
158
+ <label for="entity-name" class="mb-2 text-sm font-medium">
159
+ Entity Name
160
+ </label>
161
+ <input
162
+ id="entity-name"
163
+ type="text"
164
+ placeholder="Enter a unique name"
165
+ class="
166
+ px-4 py-2.5 rounded-md
167
+ border border-input
168
+ bg-background text-foreground
169
+ placeholder:text-muted-foreground
170
+ focus-visible:outline-2 focus-visible:outline-offset-2
171
+ focus-visible:outline-ring
172
+ transition-colors duration-200
173
+ "
174
+ />
175
+ </div>
176
+
177
+ <!-- Select dropdown -->
178
+ <div class="flex flex-col">
179
+ <label for="entity-type" class="mb-2 text-sm font-medium">
180
+ Entity Type
181
+ </label>
182
+ <select
183
+ id="entity-type"
184
+ class="
185
+ px-4 py-2.5 rounded-md
186
+ border border-input
187
+ bg-background text-foreground
188
+ focus-visible:outline-2 focus-visible:outline-offset-2
189
+ focus-visible:outline-ring
190
+ "
191
+ >
192
+ <option>Select type...</option>
193
+ <option value="type1">Type 1</option>
194
+ <option value="type2">Type 2</option>
195
+ </select>
196
+ </div>
197
+
198
+ <!-- Textarea -->
199
+ <div class="flex flex-col">
200
+ <label for="entity-desc" class="mb-2 text-sm font-medium">
201
+ Description
202
+ </label>
203
+ <textarea
204
+ id="entity-desc"
205
+ placeholder="Describe this entity..."
206
+ rows={4}
207
+ class="
208
+ px-4 py-2.5 rounded-md
209
+ border border-input
210
+ bg-background text-foreground
211
+ placeholder:text-muted-foreground
212
+ focus-visible:outline-2 focus-visible:outline-offset-2
213
+ focus-visible:outline-ring
214
+ font-mono text-sm
215
+ resize-none
216
+ "
217
+ ></textarea>
218
+ </div>
219
+
220
+ <!-- Submit button -->
221
+ <button
222
+ type="submit"
223
+ class="
224
+ w-full px-4 py-2.5 rounded-md
225
+ bg-primary text-primary-foreground
226
+ font-semibold
227
+ hover:bg-primary/90
228
+ active:scale-95
229
+ transition-all duration-200
230
+ focus-visible:outline-2 focus-visible:outline-offset-2
231
+ focus-visible:outline-ring
232
+ "
233
+ >
234
+ Create Entity <span class="ml-2">→</span>
235
+ </button>
236
+ </form>
237
+ </div>
238
+ </div>
239
+
240
+ <!-- RIGHT: Live Data Display -->
241
+ <div class="space-y-6">
242
+ <div class="bg-background rounded-lg p-6 border border-border">
243
+ <h3 class="text-lg font-semibold mb-4">Live Data (JSON)</h3>
244
+
245
+ <!-- Output code block -->
246
+ <div class="
247
+ bg-foreground/5 rounded-md p-4
248
+ border border-border
249
+ overflow-x-auto
250
+ max-h-80 overflow-y-auto
251
+ font-mono text-sm
252
+ text-foreground/80
253
+ ">
254
+ <pre>{`{
255
+ "id": "entity_123",
256
+ "name": "Example Entity",
257
+ "type": "thing",
258
+ "properties": {
259
+ "key": "value"
260
+ },
261
+ "createdAt": 1729880400000,
262
+ "status": "active"
263
+ }`}</pre>
264
+ </div>
265
+
266
+ <!-- Info badge -->
267
+ <p class="mt-4 text-xs text-muted-foreground flex items-center gap-2">
268
+ <span class="inline-block w-2 h-2 rounded-full bg-green-500"></span>
269
+ Data updates in real-time as you interact with the playground
270
+ </p>
271
+ </div>
272
+
273
+ <!-- Stats cards -->
274
+ <div class="grid grid-cols-2 gap-4">
275
+ <div class="bg-background rounded-lg p-4 border border-border text-center">
276
+ <p class="text-2xl font-bold text-primary">42</p>
277
+ <p class="text-xs text-muted-foreground mt-1">Entities Created</p>
278
+ </div>
279
+ <div class="bg-background rounded-lg p-4 border border-border text-center">
280
+ <p class="text-2xl font-bold text-accent">18</p>
281
+ <p class="text-xs text-muted-foreground mt-1">Relationships</p>
282
+ </div>
283
+ </div>
284
+ </div>
285
+ </div>
286
+
287
+ <!-- Tips section -->
288
+ <div class="mt-8 p-4 rounded-lg bg-accent/5 border border-accent/20">
289
+ <p class="text-sm text-foreground">
290
+ <strong>Pro Tip:</strong> Click "Create Entity" to see real-time updates in the JSON viewer on the right.
291
+ Watch how the ontology captures your input.
292
+ </p>
293
+ </div>
294
+ </div>
295
+ </section>
296
+ ```
297
+
298
+ ### Playground Variations by Dimension
299
+
300
+ #### Groups Demo Playground
301
+
302
+ ```astro
303
+ <!-- Create hierarchical groups -->
304
+ <form class="space-y-4">
305
+ <div class="flex flex-col">
306
+ <label class="mb-2 text-sm font-medium">Group Name</label>
307
+ <input type="text" placeholder="e.g., Engineering Team" />
308
+ </div>
309
+
310
+ <div class="flex flex-col">
311
+ <label class="mb-2 text-sm font-medium">Group Type</label>
312
+ <select>
313
+ <option value="organization">Organization</option>
314
+ <option value="business">Business</option>
315
+ <option value="community">Community</option>
316
+ <option value="dao">DAO</option>
317
+ <option value="friend_circle">Friend Circle</option>
318
+ <option value="government">Government</option>
319
+ </select>
320
+ </div>
321
+
322
+ <div class="flex flex-col">
323
+ <label class="mb-2 text-sm font-medium">Parent Group (Optional)</label>
324
+ <select>
325
+ <option>Select parent...</option>
326
+ <option value="parent1">Parent Org 1</option>
327
+ <option value="parent2">Parent Org 2</option>
328
+ </select>
329
+ </div>
330
+
331
+ <button type="submit">Create Group</button>
332
+ </form>
333
+ ```
334
+
335
+ #### Things Demo Playground
336
+
337
+ ```astro
338
+ <!-- Create entities with flexible properties -->
339
+ <form class="space-y-4">
340
+ <div class="flex flex-col">
341
+ <label class="mb-2 text-sm font-medium">Entity Name</label>
342
+ <input type="text" placeholder="Name of the thing..." />
343
+ </div>
344
+
345
+ <div class="flex flex-col">
346
+ <label class="mb-2 text-sm font-medium">Entity Type (66+ types)</label>
347
+ <select>
348
+ <option value="creator">Creator / Person</option>
349
+ <option value="course">Course</option>
350
+ <option value="product">Product</option>
351
+ <option value="token">Token</option>
352
+ <option value="agent">Agent</option>
353
+ </select>
354
+ </div>
355
+
356
+ <div class="flex flex-col">
357
+ <label class="mb-2 text-sm font-medium">Properties (JSON)</label>
358
+ <textarea
359
+ placeholder={'{\n "customField": "value"\n}'}
360
+ rows={4}
361
+ class="font-mono text-sm"
362
+ ></textarea>
363
+ </div>
364
+
365
+ <button type="submit">Create Thing</button>
366
+ </form>
367
+ ```
368
+
369
+ ### Responsive Grid
370
+
371
+ | Breakpoint | Layout | Gap |
372
+ |-----------|--------|-----|
373
+ | Mobile (< 1024px) | 1 column | 6 spacing units |
374
+ | Desktop (1024px+) | 2 columns | 8 spacing units |
375
+
376
+ ---
377
+
378
+ ## Section 3: Code Examples Section
379
+
380
+ ### Purpose
381
+
382
+ Show **developers exactly how** to implement features using the ontology through progressive, copy-paste-ready code examples.
383
+
384
+ ### Structure
385
+
386
+ ```astro
387
+ <section class="px-4 py-16 md:px-6 md:py-20">
388
+ <div class="max-w-7xl mx-auto">
389
+ <!-- Section title -->
390
+ <h2 class="text-3xl md:text-4xl font-bold mb-3">
391
+ Implementation Patterns
392
+ </h2>
393
+ <p class="text-muted-foreground mb-12 max-w-2xl">
394
+ Copy-paste ready examples for common {dimension} tasks.
395
+ </p>
396
+
397
+ <!-- Tabs: Different examples -->
398
+ <div class="space-y-8">
399
+ <!-- Example 1 -->
400
+ <div class="rounded-lg border border-border overflow-hidden">
401
+ <!-- Header -->
402
+ <div class="bg-muted px-6 py-4 border-b border-border flex items-center justify-between">
403
+ <h3 class="font-semibold text-foreground">Create {Entity}</h3>
404
+ <span class="text-xs font-mono text-muted-foreground">TypeScript</span>
405
+ </div>
406
+
407
+ <!-- Code block -->
408
+ <div class="relative">
409
+ <pre class="
410
+ p-6 bg-foreground/5 border-t border-border
411
+ overflow-x-auto
412
+ text-sm font-mono text-foreground/80
413
+ "><code>{`// Create a new thing in the ontology
414
+ export const create = mutation({
415
+ args: {
416
+ name: v.string(),
417
+ type: v.string(),
418
+ properties: v.any(),
419
+ },
420
+ handler: async (ctx, args) => {
421
+ const thingId = await ctx.db.insert('things', {
422
+ groupId: args.groupId,
423
+ type: args.type,
424
+ name: args.name,
425
+ properties: args.properties,
426
+ status: 'draft',
427
+ createdAt: Date.now(),
428
+ updatedAt: Date.now(),
429
+ });
430
+
431
+ // Log the creation event
432
+ await ctx.db.insert('events', {
433
+ groupId: args.groupId,
434
+ type: 'thing_created',
435
+ targetId: thingId,
436
+ actorId: ctx.auth?.getUserIdentity()?.tokenIdentifier,
437
+ timestamp: Date.now(),
438
+ metadata: { entityType: args.type },
439
+ });
440
+
441
+ return thingId;
442
+ },
443
+ });`}</code></pre>
444
+
445
+ <!-- Copy button -->
446
+ <button
447
+ class="
448
+ absolute top-4 right-4
449
+ px-3 py-1.5 rounded-md
450
+ bg-primary text-primary-foreground
451
+ text-xs font-medium
452
+ hover:bg-primary/90
453
+ transition-colors duration-200
454
+ focus-visible:outline-2 focus-visible:outline-ring
455
+ "
456
+ aria-label="Copy code to clipboard"
457
+ >
458
+ Copy
459
+ </button>
460
+ </div>
461
+
462
+ <!-- Details -->
463
+ <div class="px-6 py-4 bg-background border-t border-border text-sm text-muted-foreground">
464
+ <p><strong>Location:</strong> <code class="font-mono">convex/mutations/things.ts</code></p>
465
+ <p class="mt-2"><strong>Key Points:</strong></p>
466
+ <ul class="mt-2 ml-4 list-disc space-y-1">
467
+ <li>All entities stored in the <code class="font-mono">things</code> table</li>
468
+ <li>Every creation logs an event for audit trail</li>
469
+ <li>Properties field is flexible JSON</li>
470
+ <li>Status lifecycle: draft → active → published → archived</li>
471
+ </ul>
472
+ </div>
473
+ </div>
474
+
475
+ <!-- Example 2 -->
476
+ <div class="rounded-lg border border-border overflow-hidden">
477
+ <!-- Similar structure -->
478
+ </div>
479
+
480
+ <!-- Example 3 -->
481
+ <div class="rounded-lg border border-border overflow-hidden">
482
+ <!-- Similar structure -->
483
+ </div>
484
+ </div>
485
+
486
+ <!-- All examples CTA -->
487
+ <div class="mt-12 text-center">
488
+ <button class="
489
+ px-6 py-3 rounded-md
490
+ bg-secondary text-secondary-foreground
491
+ font-semibold
492
+ hover:bg-secondary/90
493
+ transition-colors
494
+ ">
495
+ View All Examples <span class="ml-2">→</span>
496
+ </button>
497
+ </div>
498
+ </div>
499
+ </section>
500
+ ```
501
+
502
+ ### Code Example Template
503
+
504
+ Each code example should include:
505
+
506
+ 1. **File location** (where to put the code)
507
+ 2. **Language** (TypeScript, SQL, etc.)
508
+ 3. **Syntax-highlighted code** (copy-paste ready)
509
+ 4. **Key points** (what to understand)
510
+ 5. **Related patterns** (see also links)
511
+
512
+ ### Code Themes
513
+
514
+ ```css
515
+ /* Light theme */
516
+ .code-light {
517
+ background: hsl(var(--color-background));
518
+ color: hsl(var(--color-foreground));
519
+ border: 1px solid hsl(var(--color-border));
520
+ }
521
+
522
+ /* Dark theme */
523
+ .code-dark {
524
+ background: hsl(0 0% 13%);
525
+ color: hsl(210 40% 98%);
526
+ border: 1px solid hsl(215 16.3% 20%);
527
+ }
528
+ ```
529
+
530
+ ---
531
+
532
+ ## Section 4: Relationship Explorer Section
533
+
534
+ ### Purpose
535
+
536
+ Visualize **how entities connect** through an interactive network graph that demonstrates the power of relationships in the ontology.
537
+
538
+ ### Structure
539
+
540
+ ```astro
541
+ <section class="px-4 py-16 md:px-6 md:py-20 bg-card border-y border-border">
542
+ <div class="max-w-7xl mx-auto">
543
+ <!-- Section title -->
544
+ <h2 class="text-3xl md:text-4xl font-bold mb-3">
545
+ Visualize Relationships
546
+ </h2>
547
+ <p class="text-muted-foreground mb-12 max-w-2xl">
548
+ See how {dimension} entities connect and relate to each other.
549
+ </p>
550
+
551
+ <!-- Two-column layout: Graph | Properties -->
552
+ <div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
553
+ <!-- LEFT: Graph visualization (takes 2 columns on desktop) -->
554
+ <div class="lg:col-span-2">
555
+ <div class="
556
+ rounded-lg border border-border
557
+ bg-background
558
+ aspect-square md:aspect-auto md:h-[500px]
559
+ flex items-center justify-center
560
+ overflow-hidden
561
+ ">
562
+ <!-- Relationship graph component -->
563
+ <DemoRelationshipGraph client:load />
564
+ <!-- Or SVG/Canvas for non-interactive demo -->
565
+ </div>
566
+
567
+ <!-- Legend -->
568
+ <div class="mt-4 flex flex-wrap gap-4 text-sm">
569
+ <div class="flex items-center gap-2">
570
+ <div class="w-3 h-3 rounded-full bg-primary"></div>
571
+ <span>Thing</span>
572
+ </div>
573
+ <div class="flex items-center gap-2">
574
+ <div class="w-3 h-3 rounded-full bg-accent"></div>
575
+ <span>Connection</span>
576
+ </div>
577
+ <div class="flex items-center gap-2">
578
+ <div class="w-3 h-3 rounded-full bg-secondary"></div>
579
+ <span>Event</span>
580
+ </div>
581
+ </div>
582
+ </div>
583
+
584
+ <!-- RIGHT: Entity properties -->
585
+ <div class="flex flex-col gap-4">
586
+ <!-- Selected entity info -->
587
+ <div class="rounded-lg border border-border bg-background p-6">
588
+ <p class="text-xs text-muted-foreground uppercase tracking-wide mb-2">
589
+ Selected Entity
590
+ </p>
591
+ <h3 class="text-xl font-bold text-foreground mb-4">
592
+ Entity Name
593
+ </h3>
594
+
595
+ <!-- Properties list -->
596
+ <div class="space-y-3 text-sm">
597
+ <div>
598
+ <p class="text-xs text-muted-foreground uppercase">Type</p>
599
+ <p class="font-mono text-foreground">thing</p>
600
+ </div>
601
+ <div>
602
+ <p class="text-xs text-muted-foreground uppercase">Status</p>
603
+ <span class="inline-block px-2 py-1 rounded-md bg-green-500/10 text-green-700 text-xs font-medium">
604
+ active
605
+ </span>
606
+ </div>
607
+ <div>
608
+ <p class="text-xs text-muted-foreground uppercase">Created</p>
609
+ <p class="font-mono text-foreground">Oct 25, 2024</p>
610
+ </div>
611
+ <div>
612
+ <p class="text-xs text-muted-foreground uppercase">Group</p>
613
+ <p class="font-mono text-foreground">org_demo_123</p>
614
+ </div>
615
+ </div>
616
+
617
+ <!-- Related connections -->
618
+ <div class="mt-6 pt-6 border-t border-border">
619
+ <p class="text-xs text-muted-foreground uppercase tracking-wide mb-3">
620
+ Connected To
621
+ </p>
622
+ <div class="space-y-2">
623
+ <div class="flex items-center gap-2 text-sm">
624
+ <div class="w-2 h-2 rounded-full bg-accent"></div>
625
+ <span class="font-mono">owns</span>
626
+ <span class="text-muted-foreground">→ 3 items</span>
627
+ </div>
628
+ <div class="flex items-center gap-2 text-sm">
629
+ <div class="w-2 h-2 rounded-full bg-accent"></div>
630
+ <span class="font-mono">authored_by</span>
631
+ <span class="text-muted-foreground">← 1 item</span>
632
+ </div>
633
+ </div>
634
+ </div>
635
+ </div>
636
+
637
+ <!-- Tips -->
638
+ <div class="rounded-lg p-4 bg-primary/5 border border-primary/20">
639
+ <p class="text-sm text-foreground">
640
+ <strong>Try:</strong> Click nodes in the graph to explore relationships.
641
+ </p>
642
+ </div>
643
+ </div>
644
+ </div>
645
+ </div>
646
+ </section>
647
+ ```
648
+
649
+ ### Relationship Graph Component
650
+
651
+ **Requirements:**
652
+
653
+ - Interactive node-link diagram
654
+ - Click nodes to select and show properties
655
+ - Hover to highlight connections
656
+ - Zoom and pan support (desktop)
657
+ - Touch-friendly (mobile)
658
+ - Legend showing connection types
659
+ - Responsive canvas sizing
660
+
661
+ **Libraries:**
662
+
663
+ - Recommended: Vis.js, D3.js, or Three.js
664
+ - Alternative: Canvas/SVG with Framer Motion
665
+
666
+ ### Graph Data Structure
667
+
668
+ ```typescript
669
+ interface GraphData {
670
+ nodes: Array<{
671
+ id: string;
672
+ label: string;
673
+ type: 'thing' | 'connection' | 'event';
674
+ color: string;
675
+ size: number;
676
+ }>;
677
+ edges: Array<{
678
+ from: string;
679
+ to: string;
680
+ label: string;
681
+ relationship: 'owns' | 'authored' | 'holds' | 'connected';
682
+ }>;
683
+ }
684
+ ```
685
+
686
+ ---
687
+
688
+ ## Section 5: CTA Section
689
+
690
+ ### Purpose
691
+
692
+ Close with a clear **call to action** and next steps to encourage user engagement.
693
+
694
+ ### Structure
695
+
696
+ ```astro
697
+ <section class="
698
+ relative overflow-hidden
699
+ px-4 py-20 md:px-6 md:py-28
700
+ bg-gradient-to-br from-primary to-primary/80
701
+ text-primary-foreground
702
+ ">
703
+ <!-- Background element -->
704
+ <div class="absolute inset-0 -z-10 opacity-10">
705
+ <svg class="absolute inset-0 w-full h-full">
706
+ <defs>
707
+ <pattern id="dots" x="20" y="20" width="20" height="20" patternUnits="userSpaceOnUse">
708
+ <circle cx="2" cy="2" r="2" fill="currentColor" />
709
+ </pattern>
710
+ </defs>
711
+ <rect width="100%" height="100%" fill="url(#dots)" />
712
+ </svg>
713
+ </div>
714
+
715
+ <!-- Content -->
716
+ <div class="max-w-4xl mx-auto text-center relative z-10">
717
+ <!-- Icon -->
718
+ <div class="mb-6 flex justify-center">
719
+ <div class="p-3 rounded-lg bg-primary-foreground/10 backdrop-blur-sm">
720
+ <svg class="w-8 h-8" fill="none" stroke="currentColor">
721
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z" />
722
+ </svg>
723
+ </div>
724
+ </div>
725
+
726
+ <!-- Headline -->
727
+ <h2 class="text-4xl md:text-5xl font-bold leading-tight mb-6">
728
+ Ready to build with the ONE Ontology?
729
+ </h2>
730
+
731
+ <!-- Description -->
732
+ <p class="text-xl opacity-90 mb-8 max-w-2xl mx-auto">
733
+ The playground above is just the beginning. Create your own applications
734
+ with the complete ontology framework.
735
+ </p>
736
+
737
+ <!-- CTAs -->
738
+ <div class="flex flex-col sm:flex-row gap-4 justify-center mb-8">
739
+ <!-- Primary CTA -->
740
+ <a
741
+ href="/docs/getting-started"
742
+ class="
743
+ inline-flex items-center justify-center
744
+ px-8 py-4 rounded-md
745
+ bg-primary-foreground text-primary
746
+ font-semibold
747
+ hover:shadow-lg hover:scale-105
748
+ transition-all duration-200
749
+ focus-visible:outline-2 focus-visible:outline-offset-2
750
+ focus-visible:outline-primary-foreground
751
+ "
752
+ >
753
+ Get Started <span class="ml-2">→</span>
754
+ </a>
755
+
756
+ <!-- Secondary CTA -->
757
+ <a
758
+ href="/docs"
759
+ class="
760
+ inline-flex items-center justify-center
761
+ px-8 py-4 rounded-md
762
+ border-2 border-primary-foreground
763
+ text-primary-foreground
764
+ font-semibold
765
+ hover:bg-primary-foreground/10
766
+ transition-colors duration-200
767
+ focus-visible:outline-2 focus-visible:outline-offset-2
768
+ focus-visible:outline-primary-foreground
769
+ "
770
+ >
771
+ Read Docs
772
+ </a>
773
+ </div>
774
+
775
+ <!-- Quick stats -->
776
+ <div class="grid grid-cols-1 sm:grid-cols-3 gap-6 pt-8 border-t border-primary-foreground/20">
777
+ <div>
778
+ <p class="text-3xl font-bold">66+</p>
779
+ <p class="text-sm opacity-75 mt-2">Thing Types</p>
780
+ </div>
781
+ <div>
782
+ <p class="text-3xl font-bold">25+</p>
783
+ <p class="text-sm opacity-75 mt-2">Connection Types</p>
784
+ </div>
785
+ <div>
786
+ <p class="text-3xl font-bold">6</p>
787
+ <p class="text-sm opacity-75 mt-2">Dimensions</p>
788
+ </div>
789
+ </div>
790
+ </div>
791
+ </section>
792
+ ```
793
+
794
+ ### CTA Variations
795
+
796
+ **For "Groups" page:**
797
+ ```
798
+ "Ready to organize your community?"
799
+ "Create your first group and start collaborating"
800
+ ```
801
+
802
+ **For "Things" page:**
803
+ ```
804
+ "Ready to model your domain?"
805
+ "Define your first entity type and start building"
806
+ ```
807
+
808
+ **For "Connections" page:**
809
+ ```
810
+ "Ready to define relationships?"
811
+ "Create your first connection and discover patterns"
812
+ ```
813
+
814
+ ---
815
+
816
+ ## Dimension-Specific Pages
817
+
818
+ ### /ontology/groups
819
+
820
+ **Hero:** "The Groups Dimension - Containers for Collaboration"
821
+
822
+ **Playground:** Create hierarchical groups with parent-child relationships
823
+
824
+ **Examples:**
825
+ 1. Create organization with child departments
826
+ 2. List all groups in hierarchy
827
+ 3. Move group between parents
828
+
829
+ **Graph:** Show organization tree structure
830
+
831
+ **CTA:** "Organize Your Community"
832
+
833
+ ### /ontology/people
834
+
835
+ **Hero:** "The People Dimension - Authorization & Governance"
836
+
837
+ **Playground:** Assign roles (org_owner, org_user, customer, platform_owner) to people
838
+
839
+ **Examples:**
840
+ 1. Create user with role
841
+ 2. Update user permissions
842
+ 3. Query users by role
843
+
844
+ **Graph:** Show role hierarchy and access patterns
845
+
846
+ **CTA:** "Manage Your Team"
847
+
848
+ ### /ontology/things
849
+
850
+ **Hero:** "The Things Dimension - All Entities"
851
+
852
+ **Playground:** Create entities (66+ types) with custom properties
853
+
854
+ **Examples:**
855
+ 1. Create course entity with metadata
856
+ 2. Create token with balance properties
857
+ 3. Create agent with capabilities
858
+
859
+ **Graph:** Show entity types and their relationships
860
+
861
+ **CTA:** "Model Your Domain"
862
+
863
+ ### /ontology/connections
864
+
865
+ **Hero:** "The Connections Dimension - Relationships Matter"
866
+
867
+ **Playground:** Create relationships (25+ types) between things
868
+
869
+ **Examples:**
870
+ 1. Create "owns" connection with metadata
871
+ 2. Create "enrolled_in" with dates
872
+ 3. Create bidirectional "follows"
873
+
874
+ **Graph:** Visualize connection network
875
+
876
+ **CTA:** "Define Your Relationships"
877
+
878
+ ### /ontology/events
879
+
880
+ **Hero:** "The Events Dimension - Complete Audit Trail"
881
+
882
+ **Playground:** Create events (67+ types) logging all actions
883
+
884
+ **Examples:**
885
+ 1. Log entity creation event
886
+ 2. Log transaction event with amount
887
+ 3. Log user action with timestamp
888
+
889
+ **Graph:** Show event timeline
890
+
891
+ **CTA:** "Track Your History"
892
+
893
+ ### /ontology/knowledge
894
+
895
+ **Hero:** "The Knowledge Dimension - RAG & Search"
896
+
897
+ **Playground:** Create embeddings and semantic search
898
+
899
+ **Examples:**
900
+ 1. Create knowledge chunk with embedding
901
+ 2. Search similar documents
902
+ 3. Build taxonomy of topics
903
+
904
+ **Graph:** Show knowledge graph connections
905
+
906
+ **CTA:** "Build Your Knowledge Base"
907
+
908
+ ---
909
+
910
+ ## Page Layout Implementation
911
+
912
+ ### Astro Page Template
913
+
914
+ ```astro
915
+ ---
916
+ // src/pages/ontology/[dimension].astro
917
+ import Layout from '../../layouts/Layout.astro';
918
+ import DemoHero from '../../components/demo/DemoHero.astro';
919
+ import DemoPlayground from '../../components/demo/DemoPlayground.astro';
920
+ import DemoCodeExamples from '../../components/demo/DemoCodeExamples.astro';
921
+ import DemoRelationshipGraph from '../../components/demo/DemoRelationshipGraph.tsx';
922
+ import DemoCTA from '../../components/demo/DemoCTA.astro';
923
+
924
+ const { dimension } = Astro.params;
925
+ const dimensionData = getDimensionData(dimension);
926
+ ---
927
+
928
+ <Layout title={`${dimensionData.title} - ONE Platform`}>
929
+ <DemoHero {...dimensionData.hero} />
930
+ <DemoPlayground {...dimensionData.playground} client:load />
931
+ <DemoCodeExamples {...dimensionData.examples} />
932
+
933
+ <section class="px-4 py-16 md:px-6 md:py-20 bg-card border-y border-border">
934
+ <div class="max-w-7xl mx-auto">
935
+ <DemoRelationshipGraph {...dimensionData.graph} client:load />
936
+ </div>
937
+ </section>
938
+
939
+ <DemoCTA {...dimensionData.cta} />
940
+ </Layout>
941
+ ```
942
+
943
+ ---
944
+
945
+ ## Responsive Design Matrix
946
+
947
+ | Section | Mobile | Tablet | Desktop |
948
+ |---------|--------|--------|---------|
949
+ | Hero | 1-col, 20px v-padding | 1-col, 24px | 1-col, 32px |
950
+ | Playground | Stack (1 col) | Stack (1 col) | 2-col grid |
951
+ | Code | 1-col, scroll-x | 1-col | 1-col |
952
+ | Graph | Full width | Full width | 2/3 width |
953
+ | CTA | 1-col buttons | 2-col buttons | 2-col buttons |
954
+
955
+ ---
956
+
957
+ ## Accessibility Checklist
958
+
959
+ - [ ] All headings have proper hierarchy (h1 → h2 → h3)
960
+ - [ ] Form labels associated with inputs
961
+ - [ ] Error messages announced
962
+ - [ ] Code blocks have `lang` attribute for syntax highlighting
963
+ - [ ] Images have alt text
964
+ - [ ] Interactive elements have focus states
965
+ - [ ] Colors meet WCAG AAA contrast
966
+ - [ ] Touch targets minimum 44px height
967
+
968
+ ---
969
+
970
+ ## Performance Targets
971
+
972
+ - **Largest Contentful Paint (LCP):** < 2.5 seconds
973
+ - **Cumulative Layout Shift (CLS):** < 0.1
974
+ - **First Input Delay (FID):** < 100ms
975
+ - **Lighthouse Score:** 95+ across all metrics
976
+
977
+ ---
978
+
979
+ ## Version History
980
+
981
+ | Version | Date | Changes |
982
+ |---------|------|---------|
983
+ | 1.0.0 | Oct 2024 | Initial page layout specifications |
984
+
985
+ ---
986
+
987
+ **Page Layouts Maintained By:** Design Agent
988
+ **Last Updated:** October 25, 2024
989
+ **Status:** Production Ready