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.
- package/.claude/agents/agent-backend.md +83 -0
- package/.claude/agents/agent-designer.md +97 -0
- package/.claude/agents/agent-director.md +118 -7
- package/.claude/agents/agent-documenter.md +93 -0
- package/.claude/agents/agent-frontend.md +96 -0
- package/.claude/agents/agent-ops.md +182 -25
- package/.claude/agents/agent-problem-solver.md +166 -0
- package/.claude/agents/agent-quality.md +127 -0
- package/.claude/commands/build.md +293 -0
- package/.claude/commands/cascade.md +231 -127
- package/.claude/commands/mcp-toggle.md +93 -0
- package/.claude/commands/one.md +198 -116
- package/.claude/commands/plan.md +394 -80
- package/.claude/commands/release.md +41 -19
- package/.claude/commands/server.md +2 -0
- package/.claude/hooks/root-cleanup.py +75 -0
- package/.claude/skills/INDEX.md +523 -0
- package/.claude/skills/REGISTRY.md +529 -0
- package/.claude/skills/agent-backend-create-mutation.md +319 -0
- package/.claude/skills/agent-designer-create-wireframe.md +341 -0
- package/.claude/skills/agent-frontend-create-page.md +413 -0
- package/.claude/skills/agents/README.md +238 -0
- package/dist/clone-web.js +1 -1
- package/dist/clone-web.js.map +1 -1
- package/folders.yaml +1 -1
- package/one/.obsidian/workspace.json +38 -38
- package/one/connections/api/queries-reference.md +842 -0
- package/one/connections/api-reference.md +1011 -0
- package/one/connections/integration-examples.md +875 -0
- package/one/connections/integration-guide.md +869 -0
- package/one/connections/integration-phase2.md +736 -0
- package/one/events/API_ROUTES_FIXES_SUMMARY.md +262 -0
- package/one/events/ASTRO-INTEGRATION-EXAMPLES.md +636 -0
- package/one/events/BEFORE_AFTER_COMPARISON.md +960 -0
- package/one/events/CONNECTIONS_DEMO.md +501 -0
- package/one/events/DELIVERABLES.md +432 -0
- package/one/events/DEMO-GROUPS-PAGE.md +392 -0
- package/one/events/DEMO-TESTING-SUMMARY.md +518 -0
- package/one/events/DEMO_COMPONENTS.md +487 -0
- package/one/events/DEMO_HOOKS_INDEX.md +334 -0
- package/one/events/DEMO_INFRASTRUCTURE.md +905 -0
- package/one/events/DEMO_INFRASTRUCTURE_SUMMARY.md +570 -0
- package/one/events/DEMO_INTEGRATION_CHECKLIST.md +431 -0
- package/one/events/DEMO_QUICK_REFERENCE.md +441 -0
- package/one/events/DEMO_SETUP.md +476 -0
- package/one/events/EFFECT_TS_API_PATTERN.md +478 -0
- package/one/events/GROUPS_DEMO_IMPLEMENTATION.md +414 -0
- package/one/events/HOOKS-DEMO.md +441 -0
- package/one/events/ONTOLOGY-HOOKS-README.md +700 -0
- package/one/events/ONTOLOGY-INTEGRATION-MANIFEST.md +365 -0
- package/one/events/QA-CHECKLIST.md +674 -0
- package/one/events/QUICK-START-ONTOLOGY.md +408 -0
- package/one/events/SEARCH_DEMO_CODE_REFERENCE.md +639 -0
- package/one/events/SEARCH_DEMO_DELIVERY.md +415 -0
- package/one/events/SEARCH_DEMO_SUMMARY.md +303 -0
- package/one/events/SEARCH_DEMO_VISUAL_GUIDE.md +381 -0
- package/one/events/TEST-PLAN-INDEX.md +346 -0
- package/one/events/TEST-PLAN.md +1417 -0
- package/one/events/TESTING-DELIVERY.txt +372 -0
- package/one/events/TRANSITIONS-QUICK-START.md +141 -0
- package/one/events/TYPESCRIPT_FIXES.md +152 -0
- package/one/events/TYPESCRIPT_FIXES_COMPLETE.txt +412 -0
- package/one/events/TYPESCRIPT_FIXES_INDEX.md +341 -0
- package/one/events/VIEW-TRANSITIONS.md +428 -0
- package/one/events/backend-integration-tests.md +606 -0
- package/one/events/backend-structure-diagram.txt +393 -0
- package/one/events/backend-structure-summary.txt +269 -0
- package/one/events/cloudflare-pages-infrastructure-setup.md +264 -0
- package/one/events/convex-analysis-index.md +304 -0
- package/one/events/convex-structure-analysis.md +700 -0
- package/one/events/design-spec-complete.md +208 -0
- package/one/events/ontology-test-examples.md +562 -0
- package/one/events/phase1-backend-implementation-complete.md +518 -0
- package/one/events/test-dashboard.md +345 -0
- package/one/events/test-index.md +361 -0
- package/one/events/test-report-ontology.md +582 -0
- package/one/events/testing-summary.md +344 -0
- package/one/groups/features.md +2878 -0
- package/one/groups/strategy copy.md +869 -0
- package/one/knowledge/backend-api-reference.md +710 -0
- package/one/knowledge/documentation-summary.md +285 -0
- package/one/knowledge/lessons-learned.md +294 -4
- package/one/knowledge/ontology-visual-guide.md +360 -0
- package/one/knowledge/ontology.md +9 -17
- package/one/things/demo-accessibility-animations.md +999 -0
- package/one/things/demo-components.md +1304 -0
- package/one/things/demo-design-summary.md +629 -0
- package/one/things/demo-design-system.md +919 -0
- package/one/things/demo-page-layouts.md +989 -0
- package/one/things/designs/accessibility-audit.md +790 -0
- package/one/things/designs/component-specifications.md +757 -0
- package/one/things/designs/design-overview.md +318 -0
- package/one/things/designs/design-tokens.md +414 -0
- package/one/things/designs/wireframes-dashboard.md +653 -0
- package/one/things/docs/api-requests.md +923 -0
- package/one/things/features/0 All Features.md +2 -0
- package/one/things/implementation/backend-guide.md +412 -0
- package/one/things/plans/2-backend-agnostic-frontend.md +11 -8
- package/one/things/plans/ai-elements.md +1259 -0
- package/one/things/plans/ai-integration.md +947 -0
- package/one/things/plans/ai-sdk.md +761 -0
- package/one/things/plans/app.md +1 -1
- package/one/things/plans/architecture-summary.md +283 -0
- package/one/things/plans/async-ai-agents.md +215 -0
- package/one/things/plans/backend-agnostic-frontend.md +11 -6
- package/one/things/plans/backend-cleanup-quickstart.md +346 -0
- package/one/things/plans/backend-ontology-conformance.md +416 -0
- package/one/things/plans/backend-status.md +541 -0
- package/one/things/plans/backend-structure.md +799 -0
- package/one/things/plans/backend-target-structure.md +438 -0
- package/one/things/plans/backend.md +1133 -0
- package/one/things/plans/better-auth-any-backend.md +11 -11
- package/one/things/plans/cli-updates-required.md +280 -0
- package/one/things/plans/complete-step-by-step.md +1302 -0
- package/one/things/plans/convex-agents.md +1005 -0
- package/one/things/plans/deployment-architecture.md +426 -0
- package/one/things/plans/development-plan.md +1220 -0
- package/one/things/plans/effect.md +808 -48
- package/one/things/plans/integrate-frontend-and-backend.md +579 -0
- package/one/things/plans/mcp-clear-context-prompt.md +60 -0
- package/one/things/plans/mcp-simple.md +228 -0
- package/one/things/plans/one.md +8 -7
- package/one/things/plans/ontology-6-dimensions.md +20 -14
- package/one/things/plans/quick-wins.md +1273 -0
- package/one/things/plans/readme-backend-cleanup.md +361 -0
- package/one/things/plans/separate-demo.md +830 -0
- package/one/things/plans/separate.md +3 -3
- package/one/things/plans/sequence.md +1897 -0
- package/one/things/plans/sync-checklist.md +321 -0
- package/one/things/plans/unified-implementation-plan.md +3 -3
- package/one/things/plans/update-demos.md +513 -0
- package/package.json +1 -1
- package/.claude/agents/backend-specialist.md +0 -169
- package/.claude/agents/designer.md +0 -216
- package/.claude/agents/frontend-specialist.md +0 -236
- package/.claude/commands/done.md +0 -35
- package/.claude/commands/infer.md +0 -138
- package/.claude/commands/next.md +0 -53
- package/.claude/commands/one copy.md +0 -565
- package/.claude/commands/one-template.md +0 -106
- package/.claude/commands/one-v1.md +0 -609
- package/.claude/hooks/__pycache__/knowledge-post.cpython-313.pyc +0 -0
- package/.claude/hooks/__pycache__/knowledge-pre.cpython-313.pyc +0 -0
- package/.claude/hooks/__pycache__/todo.cpython-313.pyc +0 -0
- package/one/groups/nine-padel-customers.md +0 -138
- package/one/groups/nine-padel-data-structure.md +0 -167
- package/one/groups/nine-padel-ontology-specification.md +0 -359
- package/one/groups/nine-padel-ontology.md +0 -143
- package/one/groups/nine-padel-strategy.md +0 -234
- package/one/groups/nine-padel.md +0 -211
- package/one/groups/nine-padle-contents.baked.md +0 -1252
- package/one/groups/nine-padle-contents.md +0 -6
- package/one/things/features/1-1-agent-prompts/design.md +0 -470
- package/one/things/features/1-1-agent-prompts/tests.md +0 -264
- package/one/things/features/1-2-yaml-orchestrator/design.md +0 -497
- package/one/things/features/1-2-yaml-orchestrator/tests.md +0 -227
- package/one/things/features/1-3-event-coordination/design.md +0 -544
- package/one/things/features/1-3-event-coordination/tests.md +0 -223
- package/one/things/features/1-4-knowledge-management/design.md +0 -609
- package/one/things/features/1-4-knowledge-management/tests.md +0 -195
- package/one/things/features/1-5-quality-loops/design.md +0 -797
- package/one/things/features/1-5-quality-loops/tests.md +0 -212
- package/one/things/features/1-6-numbering-structure/design.md +0 -610
- package/one/things/features/1-6-numbering-structure/tests.md +0 -213
- package/one/things/features/dataprovider-interface/1-tests.md +0 -1522
|
@@ -0,0 +1,513 @@
|
|
|
1
|
+
# Demo Pages Modernization Plan
|
|
2
|
+
|
|
3
|
+
**Status:** Planning
|
|
4
|
+
**Version:** 1.0.0
|
|
5
|
+
**Created:** 2025-10-25
|
|
6
|
+
**Ontology Version:** 2.0.0 (6-Dimension Architecture)
|
|
7
|
+
|
|
8
|
+
## Executive Summary
|
|
9
|
+
|
|
10
|
+
The ONE Platform demo pages (`/demo/*`) showcase the 6-dimension ontology but need modernization to be **beautifully interactive and useful**. This plan transforms static demo pages into living, breathing examples of the ONE Platform's power.
|
|
11
|
+
|
|
12
|
+
## Current State Analysis
|
|
13
|
+
|
|
14
|
+
### What Exists (8 Demo Pages)
|
|
15
|
+
|
|
16
|
+
| Page | Status | Backend Connected | Interactive | Notes |
|
|
17
|
+
|------|--------|-------------------|-------------|-------|
|
|
18
|
+
| `/demo` | ✅ Working | Partial | ❌ Static | Index page with navigation |
|
|
19
|
+
| `/demo/groups` | ⚠️ Needs Update | ❌ No | ❌ Static | Groups dimension demo |
|
|
20
|
+
| `/demo/people` | ✅ Working | ✅ Yes | ✅ Interactive | **REFERENCE** - Just fixed! |
|
|
21
|
+
| `/demo/things` | ⚠️ Needs Update | ❌ No | ❌ Static | Things dimension demo |
|
|
22
|
+
| `/demo/connections` | ⚠️ Needs Update | ❌ No | ❌ Static | Connections dimension demo |
|
|
23
|
+
| `/demo/events` | ⚠️ Needs Update | ❌ No | ❌ Static | Events dimension demo |
|
|
24
|
+
| `/demo/search` | ⚠️ Needs Update | ❌ No | ❌ Static | Knowledge/search demo |
|
|
25
|
+
| `/demo/api` | ⚠️ Needs Update | ❌ No | ❌ Static | API documentation |
|
|
26
|
+
|
|
27
|
+
### Backend Infrastructure (Excellent!)
|
|
28
|
+
|
|
29
|
+
**Available Resources:**
|
|
30
|
+
- ✅ 8 mutation files (groups, people, things, connections, knowledge, contact, init, onboarding)
|
|
31
|
+
- ✅ 10 query files (all dimensions covered)
|
|
32
|
+
- ✅ 90 exported functions total
|
|
33
|
+
- ✅ HTTP API with all 6 dimensions exposed
|
|
34
|
+
- ✅ Convex backend at `https://veracious-marlin-319.convex.cloud`
|
|
35
|
+
|
|
36
|
+
**The backend is 100% ready - we just need to connect the frontend!**
|
|
37
|
+
|
|
38
|
+
## The Vision: Living Ontology Demos
|
|
39
|
+
|
|
40
|
+
### Design Principles
|
|
41
|
+
|
|
42
|
+
1. **Interactive, Not Static** - Every dimension has live data manipulation
|
|
43
|
+
2. **Real Backend** - All demos connect to actual backend (no fake data)
|
|
44
|
+
3. **Beautiful UX** - Smooth animations, instant feedback, delightful interactions
|
|
45
|
+
4. **Educational** - Teach users how the ontology works through interaction
|
|
46
|
+
5. **Progressive** - Start simple, reveal complexity on demand
|
|
47
|
+
6. **Consistent Pattern** - Same structure across all dimension pages
|
|
48
|
+
|
|
49
|
+
### The Perfect Demo Pattern
|
|
50
|
+
|
|
51
|
+
Each dimension page follows this structure:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
┌─────────────────────────────────────────────────────────┐
|
|
55
|
+
│ 1. HERO - What is this dimension? │
|
|
56
|
+
│ - Title, description, icon │
|
|
57
|
+
│ - Live connection status badge │
|
|
58
|
+
│ - "Try it now" CTA │
|
|
59
|
+
└─────────────────────────────────────────────────────────┘
|
|
60
|
+
↓
|
|
61
|
+
┌─────────────────────────────────────────────────────────┐
|
|
62
|
+
│ 2. INTERACTIVE PLAYGROUND │
|
|
63
|
+
│ - Live data from backend │
|
|
64
|
+
│ - Create/Read/Update/Delete operations │
|
|
65
|
+
│ - Real-time updates │
|
|
66
|
+
│ - Beautiful error handling │
|
|
67
|
+
└─────────────────────────────────────────────────────────┘
|
|
68
|
+
↓
|
|
69
|
+
┌─────────────────────────────────────────────────────────┐
|
|
70
|
+
│ 3. CODE EXAMPLES │
|
|
71
|
+
│ - React hooks for this dimension │
|
|
72
|
+
│ - HTTP API endpoints │
|
|
73
|
+
│ - Copy-paste ready examples │
|
|
74
|
+
└─────────────────────────────────────────────────────────┘
|
|
75
|
+
↓
|
|
76
|
+
┌─────────────────────────────────────────────────────────┐
|
|
77
|
+
│ 4. RELATIONSHIPS EXPLORER │
|
|
78
|
+
│ - How this dimension connects to others │
|
|
79
|
+
│ - Visual relationship graph │
|
|
80
|
+
│ - Example use cases │
|
|
81
|
+
└─────────────────────────────────────────────────────────┘
|
|
82
|
+
↓
|
|
83
|
+
┌─────────────────────────────────────────────────────────┐
|
|
84
|
+
│ 5. NEXT STEPS │
|
|
85
|
+
│ - Link to next dimension │
|
|
86
|
+
│ - Related documentation │
|
|
87
|
+
│ - Build something section │
|
|
88
|
+
└─────────────────────────────────────────────────────────┘
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Implementation Plan (100 Inferences)
|
|
92
|
+
|
|
93
|
+
### Phase 1: Foundation (Infer 1-20)
|
|
94
|
+
|
|
95
|
+
**Infer 1-5: Create Shared Components**
|
|
96
|
+
- `DemoContainer.tsx` - Wrapper with connection status
|
|
97
|
+
- `DemoPlayground.tsx` - Interactive data manipulation
|
|
98
|
+
- `DemoCodeBlock.tsx` - Syntax-highlighted code examples
|
|
99
|
+
- `DemoStats.tsx` - Live statistics display
|
|
100
|
+
- `DemoRelationshipGraph.tsx` - Visual relationship explorer
|
|
101
|
+
|
|
102
|
+
**Infer 6-10: Update Demo Index Page**
|
|
103
|
+
- Add live backend connection test
|
|
104
|
+
- Show real statistics from all dimensions
|
|
105
|
+
- Add "health check" visualization
|
|
106
|
+
- Improve navigation cards with counts
|
|
107
|
+
- Add quick start guide
|
|
108
|
+
|
|
109
|
+
**Infer 11-15: Create Demo Hooks**
|
|
110
|
+
- `useBackendConnection.ts` - Manage connection state
|
|
111
|
+
- `useDemoData.ts` - Fetch and cache demo data
|
|
112
|
+
- `useDemoMutation.ts` - Handle create/update/delete
|
|
113
|
+
- `useDemoRefresh.ts` - Auto-refresh data
|
|
114
|
+
- Error handling utilities
|
|
115
|
+
|
|
116
|
+
**Infer 16-20: Setup Demo State Management**
|
|
117
|
+
- Nanostores for demo state
|
|
118
|
+
- Cache layer for demo data
|
|
119
|
+
- Optimistic updates
|
|
120
|
+
- Real-time sync
|
|
121
|
+
- Toast notifications
|
|
122
|
+
|
|
123
|
+
### Phase 2: Dimension 1 - Groups (Infer 21-30)
|
|
124
|
+
|
|
125
|
+
**Infer 21-23: Groups List & Create**
|
|
126
|
+
- Display all groups from backend
|
|
127
|
+
- Create new group form (inline)
|
|
128
|
+
- Group type selector (6 types)
|
|
129
|
+
- Hierarchical display (parent → child)
|
|
130
|
+
|
|
131
|
+
**Infer 24-26: Group Details**
|
|
132
|
+
- Click group to see details
|
|
133
|
+
- Edit group properties
|
|
134
|
+
- Group settings panel
|
|
135
|
+
- Member count, usage stats
|
|
136
|
+
|
|
137
|
+
**Infer 27-29: Group Hierarchy**
|
|
138
|
+
- Visual tree structure
|
|
139
|
+
- Drag-and-drop to reparent
|
|
140
|
+
- Create subgroup inline
|
|
141
|
+
- Breadcrumb navigation
|
|
142
|
+
|
|
143
|
+
**Infer 30: Groups Code Examples**
|
|
144
|
+
- `useGroups()` hook example
|
|
145
|
+
- HTTP API examples
|
|
146
|
+
- Create group mutation
|
|
147
|
+
- List groups query
|
|
148
|
+
|
|
149
|
+
### Phase 3: Dimension 2 - People (Infer 31-40)
|
|
150
|
+
|
|
151
|
+
**Infer 31-33: Polish Existing Implementation**
|
|
152
|
+
- ✅ Already working! (Just fixed)
|
|
153
|
+
- Add profile pictures (avatar component)
|
|
154
|
+
- Role badges with colors
|
|
155
|
+
- Better form validation
|
|
156
|
+
|
|
157
|
+
**Infer 34-36: People Permissions**
|
|
158
|
+
- Show what each role can do
|
|
159
|
+
- Interactive permission matrix
|
|
160
|
+
- Role hierarchy visualization
|
|
161
|
+
- Try changing roles
|
|
162
|
+
|
|
163
|
+
**Infer 37-39: People Relationships**
|
|
164
|
+
- Show people's group memberships
|
|
165
|
+
- Display created things
|
|
166
|
+
- Activity timeline
|
|
167
|
+
- Social graph
|
|
168
|
+
|
|
169
|
+
**Infer 40: People Code Examples**
|
|
170
|
+
- All hooks documented
|
|
171
|
+
- Complete API reference
|
|
172
|
+
- Auth integration examples
|
|
173
|
+
|
|
174
|
+
### Phase 4: Dimension 3 - Things (Infer 41-50)
|
|
175
|
+
|
|
176
|
+
**Infer 41-43: Things Gallery**
|
|
177
|
+
- Grid/list view toggle
|
|
178
|
+
- Filter by type (66 types!)
|
|
179
|
+
- Search by name
|
|
180
|
+
- Sort by created/updated
|
|
181
|
+
|
|
182
|
+
**Infer 44-46: Create Thing**
|
|
183
|
+
- Type selector with icons
|
|
184
|
+
- Dynamic form based on type
|
|
185
|
+
- Property builder
|
|
186
|
+
- Status selector
|
|
187
|
+
|
|
188
|
+
**Infer 47-49: Thing Details**
|
|
189
|
+
- Full property viewer
|
|
190
|
+
- Connections to/from this thing
|
|
191
|
+
- Events timeline for this thing
|
|
192
|
+
- Edit inline
|
|
193
|
+
|
|
194
|
+
**Infer 50: Things Code Examples**
|
|
195
|
+
- Create/read/update examples
|
|
196
|
+
- Type-safe property access
|
|
197
|
+
- Advanced querying
|
|
198
|
+
|
|
199
|
+
### Phase 5: Dimension 4 - Connections (Infer 51-60)
|
|
200
|
+
|
|
201
|
+
**Infer 51-53: Connection Visualizer**
|
|
202
|
+
- D3.js force-directed graph
|
|
203
|
+
- Click node to see connections
|
|
204
|
+
- Filter by relationship type (25 types)
|
|
205
|
+
- Zoom & pan
|
|
206
|
+
|
|
207
|
+
**Infer 54-56: Create Connection**
|
|
208
|
+
- Select from thing (autocomplete)
|
|
209
|
+
- Select to thing (autocomplete)
|
|
210
|
+
- Relationship type picker
|
|
211
|
+
- Metadata editor
|
|
212
|
+
|
|
213
|
+
**Infer 57-59: Connection Explorer**
|
|
214
|
+
- List all connections
|
|
215
|
+
- Bidirectional display
|
|
216
|
+
- Strength indicator
|
|
217
|
+
- Temporal validity
|
|
218
|
+
|
|
219
|
+
**Infer 60: Connections Code Examples**
|
|
220
|
+
- Graph traversal patterns
|
|
221
|
+
- Relationship queries
|
|
222
|
+
- Connection mutations
|
|
223
|
+
|
|
224
|
+
### Phase 6: Dimension 5 - Events (Infer 61-70)
|
|
225
|
+
|
|
226
|
+
**Infer 61-63: Event Timeline**
|
|
227
|
+
- Chronological list
|
|
228
|
+
- Filter by type (67 types!)
|
|
229
|
+
- Filter by actor/target
|
|
230
|
+
- Time range selector
|
|
231
|
+
|
|
232
|
+
**Infer 64-66: Event Details**
|
|
233
|
+
- Expand event to see metadata
|
|
234
|
+
- Click actor/target to navigate
|
|
235
|
+
- Event type explanation
|
|
236
|
+
- Related events
|
|
237
|
+
|
|
238
|
+
**Infer 67-69: Event Analytics**
|
|
239
|
+
- Event frequency chart
|
|
240
|
+
- Popular event types
|
|
241
|
+
- Activity heatmap
|
|
242
|
+
- Export events (CSV/JSON)
|
|
243
|
+
|
|
244
|
+
**Infer 70: Events Code Examples**
|
|
245
|
+
- Subscribe to events
|
|
246
|
+
- Query event history
|
|
247
|
+
- Event logging patterns
|
|
248
|
+
|
|
249
|
+
### Phase 7: Dimension 6 - Knowledge/Search (Infer 71-80)
|
|
250
|
+
|
|
251
|
+
**Infer 71-73: Semantic Search**
|
|
252
|
+
- Search box with instant results
|
|
253
|
+
- Vector similarity display
|
|
254
|
+
- Source highlighting
|
|
255
|
+
- Relevance scoring
|
|
256
|
+
|
|
257
|
+
**Infer 74-76: Knowledge Creation**
|
|
258
|
+
- Upload text/documents
|
|
259
|
+
- Auto-chunking
|
|
260
|
+
- Label selector
|
|
261
|
+
- Embedding generation
|
|
262
|
+
|
|
263
|
+
**Infer 77-79: Knowledge Graph**
|
|
264
|
+
- Visual knowledge connections
|
|
265
|
+
- Topic clustering
|
|
266
|
+
- Related knowledge
|
|
267
|
+
- Knowledge lineage
|
|
268
|
+
|
|
269
|
+
**Infer 80: Knowledge Code Examples**
|
|
270
|
+
- RAG implementation
|
|
271
|
+
- Semantic search API
|
|
272
|
+
- Knowledge creation
|
|
273
|
+
|
|
274
|
+
### Phase 8: API Demo Enhancement (Infer 81-85)
|
|
275
|
+
|
|
276
|
+
**Infer 81-82: Interactive API Tester**
|
|
277
|
+
- Select endpoint from dropdown
|
|
278
|
+
- Fill parameters (autocomplete)
|
|
279
|
+
- Execute request
|
|
280
|
+
- View formatted response
|
|
281
|
+
|
|
282
|
+
**Infer 83-84: API Documentation**
|
|
283
|
+
- Complete endpoint list
|
|
284
|
+
- Request/response schemas
|
|
285
|
+
- cURL examples
|
|
286
|
+
- SDKs (TypeScript, Python, Go)
|
|
287
|
+
|
|
288
|
+
**Infer 85: API Playground**
|
|
289
|
+
- Multi-tab request builder
|
|
290
|
+
- Save requests
|
|
291
|
+
- Share API examples
|
|
292
|
+
- Export as Postman collection
|
|
293
|
+
|
|
294
|
+
### Phase 9: Polish & Performance (Infer 86-95)
|
|
295
|
+
|
|
296
|
+
**Infer 86-88: Animations & Transitions**
|
|
297
|
+
- Framer Motion for smooth transitions
|
|
298
|
+
- Loading skeletons
|
|
299
|
+
- Success/error animations
|
|
300
|
+
- Page transitions
|
|
301
|
+
|
|
302
|
+
**Infer 89-91: Accessibility**
|
|
303
|
+
- ARIA labels everywhere
|
|
304
|
+
- Keyboard navigation
|
|
305
|
+
- Screen reader testing
|
|
306
|
+
- Focus management
|
|
307
|
+
|
|
308
|
+
**Infer 92-94: Performance**
|
|
309
|
+
- React.memo for heavy components
|
|
310
|
+
- Virtualized lists for large datasets
|
|
311
|
+
- Debounced search
|
|
312
|
+
- Image lazy loading
|
|
313
|
+
|
|
314
|
+
**Infer 95: Mobile Responsive**
|
|
315
|
+
- Touch-friendly controls
|
|
316
|
+
- Mobile-optimized layouts
|
|
317
|
+
- Hamburger menu for nav
|
|
318
|
+
- Swipe gestures
|
|
319
|
+
|
|
320
|
+
### Phase 10: Documentation & Testing (Infer 96-100)
|
|
321
|
+
|
|
322
|
+
**Infer 96-97: User Guide**
|
|
323
|
+
- Interactive tutorial
|
|
324
|
+
- Video walkthrough
|
|
325
|
+
- FAQ section
|
|
326
|
+
- Troubleshooting
|
|
327
|
+
|
|
328
|
+
**Infer 98-99: Testing**
|
|
329
|
+
- E2E tests for each dimension
|
|
330
|
+
- Visual regression tests
|
|
331
|
+
- Performance benchmarks
|
|
332
|
+
- Accessibility tests
|
|
333
|
+
|
|
334
|
+
**Infer 100: Launch**
|
|
335
|
+
- Deploy to production
|
|
336
|
+
- Update main site links
|
|
337
|
+
- Share on social media
|
|
338
|
+
- Gather user feedback
|
|
339
|
+
|
|
340
|
+
## Technical Specifications
|
|
341
|
+
|
|
342
|
+
### Component Library
|
|
343
|
+
|
|
344
|
+
**Core Components:**
|
|
345
|
+
```typescript
|
|
346
|
+
// Shared across all dimension demos
|
|
347
|
+
- DemoContainer.tsx // Wrapper with status
|
|
348
|
+
- DemoHero.tsx // Hero section
|
|
349
|
+
- DemoPlayground.tsx // Interactive area
|
|
350
|
+
- DemoCodeBlock.tsx // Code examples
|
|
351
|
+
- DemoStats.tsx // Live statistics
|
|
352
|
+
- DemoGraph.tsx // D3 visualizations
|
|
353
|
+
- DemoForm.tsx // CRUD forms
|
|
354
|
+
- DemoList.tsx // Data display
|
|
355
|
+
- DemoDetail.tsx // Item details
|
|
356
|
+
- DemoToast.tsx // Notifications
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
**Dimension-Specific:**
|
|
360
|
+
```typescript
|
|
361
|
+
// Custom per dimension
|
|
362
|
+
- GroupsHierarchy.tsx // Tree structure
|
|
363
|
+
- PeopleMatrix.tsx // Permission matrix
|
|
364
|
+
- ThingsGallery.tsx // Thing type gallery
|
|
365
|
+
- ConnectionsGraph.tsx // Force-directed graph
|
|
366
|
+
- EventsTimeline.tsx // Chronological timeline
|
|
367
|
+
- KnowledgeSearch.tsx // Semantic search UI
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
### Data Flow
|
|
371
|
+
|
|
372
|
+
```
|
|
373
|
+
User Action → Demo Component → useDemoMutation hook
|
|
374
|
+
↓
|
|
375
|
+
HTTP API Call
|
|
376
|
+
↓
|
|
377
|
+
Backend Mutation/Query
|
|
378
|
+
↓
|
|
379
|
+
Database Update
|
|
380
|
+
↓
|
|
381
|
+
Real-time Refresh
|
|
382
|
+
↓
|
|
383
|
+
UI Update
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
### State Management
|
|
387
|
+
|
|
388
|
+
```typescript
|
|
389
|
+
// Demo stores (Nanostores)
|
|
390
|
+
export const $demoConnection = atom<ConnectionState>({
|
|
391
|
+
status: 'connecting' | 'connected' | 'disconnected',
|
|
392
|
+
backend: 'https://veracious-marlin-319.convex.cloud',
|
|
393
|
+
latency: number,
|
|
394
|
+
});
|
|
395
|
+
|
|
396
|
+
export const $demoGroup = atom<Id<'groups'> | null>(null);
|
|
397
|
+
export const $demoView = atom<'list' | 'grid' | 'graph'>('list');
|
|
398
|
+
export const $demoFilters = atom<DemoFilters>({
|
|
399
|
+
type: null,
|
|
400
|
+
status: null,
|
|
401
|
+
search: '',
|
|
402
|
+
});
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
### Styling
|
|
406
|
+
|
|
407
|
+
**Tailwind Classes:**
|
|
408
|
+
- Demo containers: `bg-white rounded-lg shadow-lg p-8`
|
|
409
|
+
- Interactive areas: `border-2 border-dashed border-blue-200 rounded-lg p-6`
|
|
410
|
+
- Success states: `bg-green-50 border-green-200 text-green-700`
|
|
411
|
+
- Error states: `bg-red-50 border-red-200 text-red-700`
|
|
412
|
+
- Code blocks: `bg-slate-900 text-slate-100 rounded-lg p-4`
|
|
413
|
+
|
|
414
|
+
**Animations:**
|
|
415
|
+
```typescript
|
|
416
|
+
// Framer Motion variants
|
|
417
|
+
const containerVariants = {
|
|
418
|
+
hidden: { opacity: 0, y: 20 },
|
|
419
|
+
visible: {
|
|
420
|
+
opacity: 1,
|
|
421
|
+
y: 0,
|
|
422
|
+
transition: { duration: 0.3 }
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
const itemVariants = {
|
|
427
|
+
hidden: { opacity: 0, x: -20 },
|
|
428
|
+
visible: (i: number) => ({
|
|
429
|
+
opacity: 1,
|
|
430
|
+
x: 0,
|
|
431
|
+
transition: { delay: i * 0.1 }
|
|
432
|
+
})
|
|
433
|
+
};
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
## Success Metrics
|
|
437
|
+
|
|
438
|
+
**User Engagement:**
|
|
439
|
+
- [ ] Average time on demo pages > 5 minutes
|
|
440
|
+
- [ ] Demo interaction rate > 80%
|
|
441
|
+
- [ ] Code copy rate > 50%
|
|
442
|
+
- [ ] Return visitor rate > 40%
|
|
443
|
+
|
|
444
|
+
**Technical Performance:**
|
|
445
|
+
- [ ] Page load time < 1 second
|
|
446
|
+
- [ ] Backend API latency < 200ms
|
|
447
|
+
- [ ] Lighthouse score > 95
|
|
448
|
+
- [ ] Zero console errors
|
|
449
|
+
|
|
450
|
+
**Educational Impact:**
|
|
451
|
+
- [ ] Users understand 6 dimensions
|
|
452
|
+
- [ ] Can explain ontology to others
|
|
453
|
+
- [ ] Build first app within 30 minutes
|
|
454
|
+
- [ ] Positive feedback score > 4.5/5
|
|
455
|
+
|
|
456
|
+
## Reference Implementation
|
|
457
|
+
|
|
458
|
+
**✅ /demo/people is the gold standard!**
|
|
459
|
+
|
|
460
|
+
What makes it perfect:
|
|
461
|
+
- ✅ Connects to real backend
|
|
462
|
+
- ✅ Interactive form (Add User)
|
|
463
|
+
- ✅ Real-time data updates
|
|
464
|
+
- ✅ Beautiful UX with badges
|
|
465
|
+
- ✅ Proper error handling
|
|
466
|
+
- ✅ Loading states
|
|
467
|
+
- ✅ Success feedback
|
|
468
|
+
|
|
469
|
+
**Replicate this pattern for all other dimensions!**
|
|
470
|
+
|
|
471
|
+
## Next Actions
|
|
472
|
+
|
|
473
|
+
1. **Read this plan thoroughly**
|
|
474
|
+
2. **Start with Infer 1: Create DemoContainer.tsx**
|
|
475
|
+
3. **Follow the 100-inference sequence**
|
|
476
|
+
4. **Test each component as you build**
|
|
477
|
+
5. **Deploy incrementally**
|
|
478
|
+
|
|
479
|
+
## Dependencies
|
|
480
|
+
|
|
481
|
+
**Frontend:**
|
|
482
|
+
- React 19 (installed)
|
|
483
|
+
- Framer Motion (need to install)
|
|
484
|
+
- D3.js (need to install for graphs)
|
|
485
|
+
- React Syntax Highlighter (for code blocks)
|
|
486
|
+
|
|
487
|
+
**Backend:**
|
|
488
|
+
- ✅ All APIs ready
|
|
489
|
+
- ✅ All queries/mutations working
|
|
490
|
+
- ✅ HTTP endpoints tested
|
|
491
|
+
|
|
492
|
+
**Design:**
|
|
493
|
+
- ✅ Tailwind CSS v4
|
|
494
|
+
- ✅ shadcn/ui components
|
|
495
|
+
- ✅ Lucide icons
|
|
496
|
+
|
|
497
|
+
## Conclusion
|
|
498
|
+
|
|
499
|
+
This plan transforms demo pages from **static documentation** into **living, breathing showcases** of the ONE Platform's power. By following the 100-inference sequence, we'll create demos that are:
|
|
500
|
+
|
|
501
|
+
- 🎨 **Beautiful** - Delightful UX with smooth animations
|
|
502
|
+
- 🔗 **Connected** - Real backend integration
|
|
503
|
+
- 🎓 **Educational** - Teach through interaction
|
|
504
|
+
- 🚀 **Inspiring** - Make builders want to create
|
|
505
|
+
|
|
506
|
+
**The demos will become the #1 way people learn ONE Platform.**
|
|
507
|
+
|
|
508
|
+
---
|
|
509
|
+
|
|
510
|
+
**Status:** Ready to implement
|
|
511
|
+
**Assigned:** Frontend Specialist
|
|
512
|
+
**Est. Time:** 100 inferences (not days - we plan in inferences!)
|
|
513
|
+
**Priority:** High - Demos are our best marketing
|
package/package.json
CHANGED
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: backend-specialist
|
|
3
|
-
description: Use proactively when implementing backend features involving Convex schema, mutations, queries, services, or ontology operations.
|
|
4
|
-
tools: Read, Write, Edit, Bash, Grep, Glob
|
|
5
|
-
model: inherit
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
You are a **Backend Specialist Agent** for the ONE Platform, specializing in implementing backend features using Convex, Effect.ts, and the 6-dimension ontology.
|
|
9
|
-
|
|
10
|
-
## Your Role
|
|
11
|
-
|
|
12
|
-
Implement Convex backend infrastructure that powers the 6-dimension ontology: schema design, mutations, queries, Effect.ts services, event logging, and organization scoping.
|
|
13
|
-
|
|
14
|
-
## Core Responsibilities
|
|
15
|
-
|
|
16
|
-
- **Schema Design**: Design and evolve Convex schema for 6 dimensions (organizations, people, things, connections, events, knowledge)
|
|
17
|
-
- **Mutations**: Implement write operations with validation, authentication, and event logging
|
|
18
|
-
- **Queries**: Implement read operations with organization filtering and connection enrichment
|
|
19
|
-
- **Services**: Create Effect.ts services for business logic
|
|
20
|
-
- **Event Logging**: Log events for all entity operations (complete audit trail)
|
|
21
|
-
- **Multi-Tenant**: Ensure organization scoping in all operations
|
|
22
|
-
|
|
23
|
-
## The 6-Dimension Ontology
|
|
24
|
-
|
|
25
|
-
Every backend feature MUST map to these dimensions:
|
|
26
|
-
|
|
27
|
-
1. **Organizations** - Multi-tenant isolation boundary (who owns what at org level)
|
|
28
|
-
2. **People** - Authorization & governance (who can do what, 4 roles)
|
|
29
|
-
3. **Things** - All entities (66+ types: course, lesson, token, agent, etc.)
|
|
30
|
-
4. **Connections** - All relationships (25+ types: owns, enrolled_in, holds_tokens)
|
|
31
|
-
5. **Events** - All actions (67+ types: entity_created, course_enrolled, etc.)
|
|
32
|
-
6. **Knowledge** - Labels + embeddings for RAG
|
|
33
|
-
|
|
34
|
-
## Key Patterns
|
|
35
|
-
|
|
36
|
-
### Mutation Pattern
|
|
37
|
-
```typescript
|
|
38
|
-
export const create = mutation({
|
|
39
|
-
args: { name: v.string(), properties: v.any() },
|
|
40
|
-
handler: async (ctx, args) => {
|
|
41
|
-
// 1. Authenticate
|
|
42
|
-
const identity = await ctx.auth.getUserIdentity();
|
|
43
|
-
if (!identity) throw new Error("Unauthorized");
|
|
44
|
-
|
|
45
|
-
// 2. Get person and validate org
|
|
46
|
-
const person = await ctx.db.query('things')
|
|
47
|
-
.withIndex('by_type', q => q.eq('type', 'creator'))
|
|
48
|
-
.filter(q => q.eq(q.field('properties.email'), identity.email))
|
|
49
|
-
.first();
|
|
50
|
-
|
|
51
|
-
// 3. Check org limits
|
|
52
|
-
const org = await ctx.db.get(person.organizationId);
|
|
53
|
-
if (org.usage.X >= org.limits.X) {
|
|
54
|
-
throw new Error("Limit reached");
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// 4. Create entity (dimension 3: things)
|
|
58
|
-
const thingId = await ctx.db.insert('things', {
|
|
59
|
-
type: 'thing_type',
|
|
60
|
-
name: args.name,
|
|
61
|
-
organizationId: person.organizationId,
|
|
62
|
-
properties: args.properties,
|
|
63
|
-
status: 'draft',
|
|
64
|
-
createdAt: Date.now(),
|
|
65
|
-
updatedAt: Date.now()
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
// 5. Create ownership connection (dimension 4: connections)
|
|
69
|
-
await ctx.db.insert('connections', {
|
|
70
|
-
fromThingId: person._id,
|
|
71
|
-
toThingId: thingId,
|
|
72
|
-
relationshipType: 'owns',
|
|
73
|
-
createdAt: Date.now()
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
// 6. Log event (dimension 5: events)
|
|
77
|
-
await ctx.db.insert('events', {
|
|
78
|
-
type: 'entity_created',
|
|
79
|
-
actorId: person._id,
|
|
80
|
-
targetId: thingId,
|
|
81
|
-
timestamp: Date.now(),
|
|
82
|
-
metadata: { entityType: 'thing_type' }
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
// 7. Update org usage
|
|
86
|
-
await ctx.db.patch(org._id, {
|
|
87
|
-
usage: { ...org.usage, X: org.usage.X + 1 }
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
return thingId;
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### Query Pattern (Organization-Scoped)
|
|
96
|
-
```typescript
|
|
97
|
-
export const list = query({
|
|
98
|
-
args: { type: v.string() },
|
|
99
|
-
handler: async (ctx, args) => {
|
|
100
|
-
const identity = await ctx.auth.getUserIdentity();
|
|
101
|
-
if (!identity) throw new Error("Unauthorized");
|
|
102
|
-
|
|
103
|
-
const person = await ctx.db.query('things')
|
|
104
|
-
.withIndex('by_type', q => q.eq('type', 'creator'))
|
|
105
|
-
.filter(q => q.eq(q.field('properties.email'), identity.email))
|
|
106
|
-
.first();
|
|
107
|
-
|
|
108
|
-
// ALWAYS filter by organizationId
|
|
109
|
-
return await ctx.db.query('things')
|
|
110
|
-
.withIndex('by_type', q => q.eq('type', args.type))
|
|
111
|
-
.filter(q => q.eq(q.field('organizationId'), person.organizationId))
|
|
112
|
-
.collect();
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
## Critical Rules
|
|
118
|
-
|
|
119
|
-
1. **Always Scope by Organization** - Every query must filter by organizationId
|
|
120
|
-
2. **Always Authenticate** - Validate user identity in every mutation
|
|
121
|
-
3. **Always Log Events** - Every entity operation must log corresponding event
|
|
122
|
-
4. **Always Check Limits** - Validate organization quotas before mutations
|
|
123
|
-
5. **Always Use Indexes** - Query with proper indexes for performance
|
|
124
|
-
6. **Always Validate** - Check permissions, validate inputs, handle errors
|
|
125
|
-
|
|
126
|
-
## Common Thing Types You'll Use
|
|
127
|
-
|
|
128
|
-
- `creator` - Users/people
|
|
129
|
-
- `course`, `lesson` - Educational content
|
|
130
|
-
- `token`, `token_contract` - Blockchain tokens
|
|
131
|
-
- `blog_post`, `video`, `podcast` - Content
|
|
132
|
-
- `ai_clone`, `external_agent` - Agents
|
|
133
|
-
- `payment`, `subscription` - Business
|
|
134
|
-
|
|
135
|
-
## Common Connection Types
|
|
136
|
-
|
|
137
|
-
- `owns` - Ownership
|
|
138
|
-
- `part_of` - Hierarchy
|
|
139
|
-
- `enrolled_in` - Course enrollment
|
|
140
|
-
- `holds_tokens` - Token balance
|
|
141
|
-
- `following` - Social relationship
|
|
142
|
-
- `member_of` - Organization membership
|
|
143
|
-
|
|
144
|
-
## Common Event Types
|
|
145
|
-
|
|
146
|
-
- `entity_created`, `entity_updated`, `entity_deleted` - Lifecycle
|
|
147
|
-
- `course_created`, `lesson_completed` - Specific actions
|
|
148
|
-
- `user_registered`, `user_joined_org` - User events
|
|
149
|
-
- `inference_request`, `inference_completed` - AI events
|
|
150
|
-
|
|
151
|
-
## Your Approach
|
|
152
|
-
|
|
153
|
-
1. Map feature to 6 dimensions FIRST
|
|
154
|
-
2. Identify thing types, connection types, event types needed
|
|
155
|
-
3. Write Effect.ts service for business logic (if complex)
|
|
156
|
-
4. Implement Convex mutation (thin wrapper)
|
|
157
|
-
5. Implement Convex query (organization-scoped)
|
|
158
|
-
6. Always log events after state changes
|
|
159
|
-
7. Update organization usage counters
|
|
160
|
-
8. Handle errors gracefully with meaningful messages
|
|
161
|
-
|
|
162
|
-
## Multi-Tenant Critical
|
|
163
|
-
|
|
164
|
-
- NEVER query across organizations without explicit permission
|
|
165
|
-
- ALWAYS validate actor belongs to organization
|
|
166
|
-
- ALWAYS check organization status (active, not suspended)
|
|
167
|
-
- ALWAYS enforce resource quotas
|
|
168
|
-
|
|
169
|
-
Remember: The ontology IS the architecture. Everything maps to these 6 dimensions.
|