oneie 3.6.26 → 3.6.28

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 (37) hide show
  1. package/.claude/agents/TROUBLESHOOTING.md +530 -0
  2. package/.claude/agents/agent-claude.md +645 -0
  3. package/.claude/agents/agent-clone.md +2 -0
  4. package/.claude/agents/agent-frontend.md +162 -21
  5. package/.claude/agents/agent-writer.md +722 -0
  6. package/.claude/commands/chat.md +504 -0
  7. package/.claude/commands/create.md +134 -18
  8. package/.claude/commands/fast.md +531 -0
  9. package/.claude/commands/one.md +79 -90
  10. package/.claude/commands/optimize.md +74 -0
  11. package/.claude/commands/plan.md +420 -373
  12. package/.claude/commands/review.md +99 -0
  13. package/.claude/commands/server.md +97 -48
  14. package/.claude/commands/start.md +182 -0
  15. package/.claude/commands/test.md +197 -0
  16. package/.claude/commands/validate.md +140 -0
  17. package/.claude/hooks/__pycache__/todo.cpython-312.pyc +0 -0
  18. package/.claude/hooks/auto-format.sh +106 -0
  19. package/.claude/hooks/formatting.py +187 -0
  20. package/.claude/hooks/ontology-validation.py +255 -0
  21. package/.claude/hooks/validate-imports.py +182 -0
  22. package/.claude/hooks/validate-ontology.py +140 -0
  23. package/.claude/hooks/write-news.sh +194 -0
  24. package/CLAUDE.md +150 -1057
  25. package/one/knowledge/cascading-context-specification.md +1617 -0
  26. package/one/knowledge/claude-code-integration.md +1293 -0
  27. package/one/knowledge/development-commands.md +251 -0
  28. package/one/knowledge/guidelines.md +314 -0
  29. package/one/knowledge/parallel-agents.md +932 -0
  30. package/one/knowledge/performance.md +459 -0
  31. package/one/knowledge/troubleshooting.md +434 -0
  32. package/one/things/plans/dsl-claude-code.md +1011 -0
  33. package/one/things/plans/video-backend.md +638 -0
  34. package/one/things/plans/video-frontend.md +432 -0
  35. package/one/things/plans/video-old-archived.md +656 -0
  36. package/package.json +1 -1
  37. package/.claude/agents/AUDIT-agent-ops-alignment.md +0 -379
@@ -6,135 +6,122 @@ When user types `/one`, follow this workflow:
6
6
 
7
7
  ---
8
8
 
9
- ## Step 1: Server Status Check (< 1 second)
9
+ ## Step 1: Server Status Check & Auto-Start (< 3 seconds)
10
+
11
+ ### Check if Running
10
12
 
11
13
  ```bash
12
14
  lsof -ti:4321 2>/dev/null && echo "RUNNING" || echo "STOPPED"
13
15
  ```
14
16
 
15
17
  **If RUNNING:**
16
- ```
17
- ✅ Dev Server: http://localhost:4321
18
- ```
18
+ - Show "✅ Dev Server: http://localhost:4321" in the interface below
19
+ - Skip to Step 2
19
20
 
20
21
  **If STOPPED:**
21
- - Check if installed: `[ -d web/node_modules ] && echo "installed" || echo "missing"`
22
- - If missing: Run `cd web && bun install`
23
- - Then: Run `cd web && bun run dev > /dev/null 2>&1 &`
24
- - Show: "🚀 Starting server..." then wait 2 seconds
25
- - Final: "✅ Dev Server: http://localhost:4321"
26
22
 
27
- ---
28
-
29
- ## Step 2: Display ONE Platform Interface
30
-
31
- Show this minimal interface:
23
+ ### Determine Working Directory
32
24
 
25
+ ```bash
26
+ pwd | grep -q '/web$' && echo "IN_WEB" || echo "IN_ROOT"
33
27
  ```
34
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
35
28
 
36
- ██████╗ ███╗ ██╗███████╗
37
- ██╔═══██╗████╗ ██║██╔════╝
38
- ██║ ██║██╔██╗ ██║█████╗
39
- ██║ ██║██║╚██╗██║██╔══╝
40
- ╚██████╔╝██║ ╚████║███████╗
41
- ╚═════╝ ╚═╝ ╚═══╝╚══════╝
29
+ ### Check if Dependencies Installed
42
30
 
43
- ONE Platform v1.0.0
44
- Make Your Ideas Real
31
+ **If IN_ROOT:**
32
+ ```bash
33
+ [ -d web/node_modules ] && echo "installed" || echo "missing"
34
+ ```
45
35
 
46
- Dev Server: ✅ http://localhost:4321
36
+ **If IN_WEB:**
37
+ ```bash
38
+ [ -d node_modules ] && echo "installed" || echo "missing"
39
+ ```
47
40
 
48
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
41
+ ### Install if Missing
49
42
 
50
- 🎯 CORE COMMANDS
43
+ **If missing, show progress and install:**
51
44
 
52
- /server Check/start/stop dev server
53
- /chat Onboard, strategy, market positioning
54
- /plan Create 100-cycle implementation plan
55
- /create Build features with specialists
56
- /push Commit & push changes
57
- /deploy Ship to production (Cloudflare + Convex)
45
+ ```
46
+ 📦 Installing dependencies...
47
+ ```
58
48
 
59
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
49
+ **If IN_ROOT:**
50
+ ```bash
51
+ cd web && bun install
52
+ ```
60
53
 
61
- 📊 WORKFLOW
54
+ **If IN_WEB:**
55
+ ```bash
56
+ bun install
57
+ ```
62
58
 
63
- 1. /chat [idea] → Understand your vision, onboard brand
64
- 2. /plan convert → Create 100-cycle implementation plan
65
- 3. /now → See current cycle & assigned agent
66
- 4. /next → Advance to next cycle
67
- 5. /done → Mark complete, capture lessons
68
- 6. /create [task] → Build with specialists in parallel
69
- 7. /push → Commit & push changes
70
- 8. /deploy → Deploy to production
59
+ ### Start Server
71
60
 
72
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
61
+ **If IN_ROOT:**
62
+ ```bash
63
+ cd web && bun run dev > /dev/null 2>&1 &
64
+ ```
73
65
 
74
- 🤖 SPECIALIST AGENTS (Auto-Assigned by /plan)
66
+ **If IN_WEB:**
67
+ ```bash
68
+ bun run dev > /dev/null 2>&1 &
69
+ ```
75
70
 
76
- agent-director Orchestrates your 100-cycle plan
77
- agent-backend Convex schema, mutations, queries
78
- agent-frontend Astro pages, React components
79
- agent-designer Wireframes, design tokens, specs
80
- agent-quality Tests, acceptance criteria, validation
81
- agent-ops CI/CD, deployments, infrastructure
82
- agent-clean Code quality, refactoring
83
- agent-clone Legacy migration, AI clones
71
+ ### Wait and Verify
84
72
 
85
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
73
+ ```bash
74
+ sleep 3 && lsof -ti:4321 2>/dev/null
75
+ ```
86
76
 
87
- ⚡ QUICK START
77
+ ### Open Start Page
88
78
 
89
- /chat "I want to build a course platform with AI tutors"
90
- → Onboard your idea, understand requirements
79
+ ```bash
80
+ open http://localhost:4321/start 2>/dev/null || xdg-open http://localhost:4321/start 2>/dev/null || start http://localhost:4321/start 2>/dev/null
81
+ ```
91
82
 
92
- /plan convert "Build a course platform with AI tutors"
93
- → Creates 100-cycle plan, assigns agents, shows timeline
83
+ **Final Output:**
84
+ ```
85
+ ✅ Dev Server: http://localhost:4321
86
+ 🚀 Opening /start page in browser...
87
+ ```
94
88
 
95
- /now
96
- → See Cycle 1 task and assigned specialist
89
+ ---
97
90
 
98
- /next
99
- → Advance through cycles step-by-step
91
+ ## Step 2: Display ONE Platform Interface
100
92
 
101
- /create [feature]
102
- → Build specific features with parallel agents
93
+ **CRITICAL: ALWAYS display this interface exactly as shown below. No variations. No summaries. Show the full output every time.**
103
94
 
95
+ ```
104
96
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
105
97
 
106
- 🎓 LEARN MORE
98
+ ██████╗ ███╗ ██╗███████╗
99
+ ██╔═══██╗████╗ ██║██╔════╝
100
+ ██║ ██║██╔██╗ ██║█████╗
101
+ ██║ ██║██║╚██╗██║██╔══╝
102
+ ╚██████╔╝██║ ╚████║███████╗
103
+ ╚═════╝ ╚═╝ ╚═══╝╚══════╝
104
+
105
+ ONE Platform v1.0.0
106
+ Make Your Ideas Real
107
107
 
108
- /help Command reference & tutorials
109
- /see Analytics & insights
110
- /onboard Analyze your website (brand, features)
108
+ Dev Server: ✅ http://localhost:4321
111
109
 
112
110
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
113
- ```
114
111
 
115
- ---
116
-
117
- ## Step 3: Engage User
112
+ 🎯 CORE COMMANDS
118
113
 
119
- After showing interface, engage with the user conversationally:
114
+ /chat Onboard your idea
115
+ /plan [idea] Generate optimized plan
116
+ /fast [feature] Build in minutes
117
+ /create [type] Build with specialists
118
+ /push Commit & push
119
+ /deploy Ship to production
120
120
 
121
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
121
122
  ```
122
- 💬 How can I help?
123
-
124
- Option 1: /chat [your-idea]
125
- Let's onboard your vision. I'll understand your brand, market
126
- positioning, and craft a strategy.
127
123
 
128
- Option 2: /plan convert [your-idea]
129
- Jump straight to implementation. I'll create a 100-cycle plan
130
- with task assignments and timeline.
131
-
132
- Option 3: /create [feature-name]
133
- Build something specific. Specialists execute in parallel.
134
-
135
- Option 4: Just describe what you want to build
136
- We'll have a conversation and figure out the best approach.
137
- ```
124
+ **DO NOT add any sections, workflow steps, or explanations after the commands.**
138
125
 
139
126
  ---
140
127
 
@@ -285,7 +272,9 @@ Ship to production:
285
272
 
286
273
  ## Context Optimization Notes
287
274
 
288
- **This file (one.md): ~300 tokens**
275
+ **This file (one.md): ~200 tokens for display**
276
+
277
+ **CRITICAL RULE:** The interface display is MANDATORY regardless of which model is being used (Haiku, Sonnet, Opus). Always show the full ASCII logo and command list. Never summarize or skip this output.
289
278
 
290
279
  By keeping `/one.md` minimal and using cascade system:
291
280
  - Load CLAUDE.md files only when needed
@@ -294,7 +283,7 @@ By keeping `/one.md` minimal and using cascade system:
294
283
  - Full plan stored in `.claude/state/plan.json` (auto-generated)
295
284
 
296
285
  **Total context usage:**
297
- - `/one` display: 300 tokens
286
+ - `/one` display: 200 tokens (mandatory output)
298
287
  - `/chat` flow: 500 tokens
299
288
  - `/plan` flow: 2K tokens
300
289
  - `/now` + agent: 1-3K tokens
@@ -0,0 +1,74 @@
1
+ # /optimize - Performance analysis with 6-dimension ontology compliance
2
+
3
+ Analyze `$ARGUMENTS` for performance and 6-dimension ontology compliance.
4
+
5
+ ## Analysis Checklist
6
+
7
+ ### 1. Query Optimization
8
+ - **Database Indexes**: Check if queries use proper indexes (by_type, by_groupId, etc.)
9
+ - **N+1 Prevention**: Identify potential N+1 query patterns
10
+ - **Batch Operations**: Recommend batching when fetching multiple entities
11
+ - **Query Complexity**: Measure query depth and suggest optimizations
12
+
13
+ ### 2. Entity Mapping Validation
14
+ - **Dimension Assignment**: Verify all entities map to correct dimensions:
15
+ - Groups: Multi-tenant containers
16
+ - People: Authorization via role metadata
17
+ - Things: Entity types from 66+ defined types
18
+ - Connections: Relationships from 25+ defined types
19
+ - Events: Actions from 67+ defined event types
20
+ - Knowledge: Embeddings and labels
21
+ - **Schema Compliance**: Ensure properties follow schema patterns
22
+
23
+ ### 3. Event Logging Coverage
24
+ - **Critical Actions**: Every mutation should log events
25
+ - **Audit Trail**: Verify actor, target, timestamp, metadata
26
+ - **Event Types**: Use correct event types from ontology
27
+ - **Performance**: Batch event logging when possible
28
+
29
+ ### 4. Multi-tenant Scoping
30
+ - **GroupId Filtering**: All queries MUST filter by groupId
31
+ - **Data Isolation**: Verify no cross-group data leakage
32
+ - **Hierarchical Access**: Check parent group access patterns
33
+ - **Index Usage**: Ensure groupId indexes are used
34
+
35
+ ### 5. Frontend Performance
36
+ - **Loading States**: Check for proper loading/error states
37
+ - **Client Hydration**: Verify `client:load` directives
38
+ - **Bundle Size**: Analyze component imports
39
+ - **Caching Strategy**: Review query caching patterns
40
+
41
+ ## Output Format
42
+
43
+ Provide recommendations in this format:
44
+
45
+ ```
46
+ PERFORMANCE ANALYSIS: [file/component name]
47
+
48
+ Critical Issues (must fix):
49
+ - [Issue with specific line numbers and impact]
50
+
51
+ Warnings (should fix):
52
+ - [Issue with explanation]
53
+
54
+ Optimizations (nice to have):
55
+ - [Suggestion with expected benefit]
56
+
57
+ Ontology Compliance:
58
+ ✓ Groups: [status]
59
+ ✓ People: [status]
60
+ ✓ Things: [status]
61
+ ✓ Connections: [status]
62
+ ✓ Events: [status]
63
+ ✓ Knowledge: [status]
64
+
65
+ Estimated Performance Gain: [percentage or metric]
66
+ ```
67
+
68
+ ## Example Usage
69
+
70
+ ```bash
71
+ /optimize backend/convex/queries/entities.ts
72
+ /optimize web/src/components/features/EntityList.tsx
73
+ /optimize backend/convex/mutations/
74
+ ```