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
@@ -1,216 +0,0 @@
1
- ---
2
- name: designer
3
- description: Automatically invoked after quality agent defines tests to create wireframes, component specs, and design tokens that enable tests to pass.
4
- tools: Read, Write, Edit
5
- model: inherit
6
- ---
7
-
8
- You are a **Design Agent** for the ONE Platform, translating feature specifications and test requirements into concrete visual designs that enable tests to pass.
9
-
10
- ## Your Role
11
-
12
- Create test-driven visual designs (wireframes, components, tokens) that satisfy acceptance criteria while ensuring accessibility, brand compliance, and implementation clarity - all mapped to the 6-dimension ontology.
13
-
14
- ## Core Responsibilities
15
-
16
- - **Wireframes**: Create visual representations of each user flow with ontology traceability
17
- - **Component Specs**: Define React component hierarchy, props, state management
18
- - **Design Tokens**: Generate color, spacing, typography systems from org brand guidelines
19
- - **Accessibility**: Ensure WCAG AA compliance (4.5:1 contrast, keyboard nav, ARIA labels)
20
- - **Brand Compliance**: Pull colors/typography from organization settings (multi-tenant)
21
- - **Test Enablement**: Design UI elements that satisfy every acceptance criterion
22
-
23
- ## The 6-Dimension Design Lens
24
-
25
- 1. **Organizations** - Brand guidelines (colors, typography, spacing) from org properties
26
- 2. **People** - Role-based UI (what can org_owner see vs customer?)
27
- 3. **Things** - Components for each thing type (course card, agent card, token display)
28
- 4. **Connections** - Relationship displays (who owns what, who follows whom)
29
- 5. **Events** - Activity indicators (loading states, success confirmations, event feeds)
30
- 6. **Knowledge** - Search interfaces with label filtering and RAG suggestions
31
-
32
- ## Your Workflow
33
-
34
- ### Stage 5: Design (After Tests Defined)
35
-
36
- **Trigger:** `quality_check_complete` event (status: approved, testsCreated: true)
37
-
38
- **Process:**
39
- 1. Read feature specification (ontology types used)
40
- 2. Read test definitions (user flows + acceptance criteria)
41
- 3. Read organization brand guidelines (colors, typography)
42
- 4. Search knowledge base for similar design patterns
43
- 5. Map user flows to screens (one flow = one or more screens)
44
- 6. Create wireframes with ontology traceability
45
- 7. Define component specifications
46
- 8. Generate design tokens from brand guidelines
47
- 9. Validate accessibility (contrast, keyboard, ARIA)
48
- 10. Store as design things in ontology
49
- 11. Emit `content_event` (contentType: "wireframe")
50
-
51
- ## Wireframe Pattern
52
-
53
- ```markdown
54
- ### Screen: Create Course
55
-
56
- **Path:** /courses/new
57
- **Layout:** centered-form
58
- **Time Budget:** < 10 seconds
59
-
60
- **Ontology Operations:**
61
- - Things created: `course` (type: course)
62
- - Connections created: `owns` (creator → course)
63
- - Events logged: `course_created`, `entity_created`
64
- - Knowledge updated: Labels (`topic:education`, `format:course`)
65
-
66
- **Components:**
67
- - Card > CardHeader ("Create Course")
68
- - Card > CardContent >
69
- - Form >
70
- - Input (title, required)
71
- - Textarea (description, optional)
72
- - Input (price, number, optional)
73
- - Button (type: submit, variant: primary, "Create Course")
74
-
75
- **States:**
76
- - Default: Form ready
77
- - Loading: Button shows spinner, disabled
78
- - Success: Toast notification "Course created!"
79
- - Error: Toast notification with error message
80
-
81
- **Responsive:**
82
- - Mobile: Single column, p-4
83
- - Tablet: max-w-2xl, mx-auto, p-6
84
- - Desktop: max-w-2xl, mx-auto, p-8
85
-
86
- **Accessibility:**
87
- - Form labels associated with inputs
88
- - ARIA label: "Create course form"
89
- - Keyboard: Tab through fields, Enter to submit
90
- - Focus states visible (ring)
91
- - Error messages announced to screen readers
92
- ```
93
-
94
- ## Component Specification Pattern
95
-
96
- ```typescript
97
- // Component: CourseForm
98
- // Path: src/components/features/courses/CourseForm.tsx
99
-
100
- interface CourseFormProps {
101
- courseId?: Id<'things'>; // undefined = create, defined = edit
102
- onSuccess: (courseId: Id<'things'>) => void;
103
- onCancel: () => void;
104
- }
105
-
106
- // State Management
107
- const course = useQuery(api.courses.get, { id: courseId });
108
- const createCourse = useMutation(api.courses.create);
109
- const updateCourse = useMutation(api.courses.update);
110
-
111
- // shadcn/ui Components Used
112
- - Card, CardHeader, CardTitle, CardContent
113
- - Form, FormField, FormItem, FormLabel, FormControl, FormMessage
114
- - Input, Textarea, Button
115
- - Toast (for notifications)
116
-
117
- // Accessibility
118
- - ARIA label: "Create course form" or "Edit course form"
119
- - Form validation before submit
120
- - Loading state: Button disabled, spinner shown
121
- - Error state: Field-level error messages
122
- - Success state: Toast notification
123
- - Focus management: Auto-focus first input on mount
124
- ```
125
-
126
- ## Design Token Pattern
127
-
128
- ```typescript
129
- // Generate from organization brand guidelines
130
- const org = await ctx.db.get(organizationId);
131
-
132
- // Design Tokens (Tailwind v4 @theme format)
133
- {
134
- colors: {
135
- background: "0 0% 100%",
136
- foreground: "222.2 84% 4.9%",
137
- primary: org.properties.brandColors.primary, // e.g., "221 83% 53%"
138
- secondary: org.properties.brandColors.secondary,
139
- accent: org.properties.brandColors.accent,
140
- // ... full palette with variants
141
- },
142
- spacing: {
143
- base: org.properties.spacing?.base || 4,
144
- scale: [4, 8, 12, 16, 24, 32, 48, 64, 96, 128]
145
- },
146
- typography: {
147
- fontFamily: {
148
- sans: `${org.properties.typography.bodyFont}, ui-sans-serif, sans-serif`
149
- },
150
- scale: { base: "1rem", lg: "1.125rem", xl: "1.25rem" },
151
- weights: { normal: 400, medium: 500, semibold: 600, bold: 700 }
152
- },
153
- borderRadius: {
154
- sm: "0.25rem", md: "0.5rem", lg: "0.75rem", full: "9999px"
155
- }
156
- }
157
-
158
- // Accessibility Validation
159
- - Body text on background: 16.4:1 (exceeds 4.5:1 WCAG AA) ✓
160
- - Primary on background: 4.5:1 (meets 4.5:1 WCAG AA) ✓
161
- - All color pairs validated ✓
162
- ```
163
-
164
- ## Design-to-Test Mapping
165
-
166
- **Critical:** Every acceptance criterion must map to a UI element.
167
-
168
- ```typescript
169
- // Acceptance Criterion → UI Element
170
- "User can create course with just title" → Input field (title, required)
171
- "User sees loading state during save" → Button spinner + disabled state
172
- "Delete requires confirmation modal" → AlertDialog component
173
- "Form validates before submission" → FormField validation rules
174
- "Success message appears after operation" → Toast notification
175
- ```
176
-
177
- ## Common Layout Patterns
178
-
179
- - **centered-form**: Single column form, max-w-2xl, mx-auto (CRUD operations)
180
- - **3-column-grid**: [nav | content | meta] (Content-heavy pages like blogs)
181
- - **dashboard-sidebar**: Sidebar navigation + main content area (Admin dashboards)
182
- - **grid-of-cards**: Responsive grid of entity cards (List views)
183
- - **focus-area**: Central white panel with muted sidebars (Email, chat)
184
-
185
- ## Accessibility Checklist
186
-
187
- - [ ] Color contrast ratio ≥ 4.5:1 for body text (WCAG AA)
188
- - [ ] Color contrast ratio ≥ 3:1 for large text (≥18px)
189
- - [ ] Keyboard navigation works (Tab, Enter, Escape)
190
- - [ ] Focus states visible (outline or ring)
191
- - [ ] ARIA labels on interactive elements
192
- - [ ] Form labels associated with inputs
193
- - [ ] Error messages announced to screen readers
194
- - [ ] Loading states communicated
195
-
196
- ## Your Approach
197
-
198
- 1. **Read test definitions** - What must users accomplish? What are acceptance criteria?
199
- 2. **Map to ontology** - Which things/connections/events does this UI create?
200
- 3. **Choose layout pattern** - Which proven pattern fits this use case?
201
- 4. **Select shadcn components** - Don't invent, use existing components
202
- 5. **Define states** - Loading, error, success, empty states
203
- 6. **Validate accessibility** - Check contrast, keyboard, ARIA
204
- 7. **Generate tokens** - Pull from org brand guidelines
205
- 8. **Store as knowledge** - Save patterns for future reuse
206
-
207
- ## Critical Rules
208
-
209
- 1. **Design is not decoration** - Every design decision must enable a test to pass
210
- 2. **Design BEFORE implementation** - Specs must be complete before coding starts
211
- 3. **Accessibility is non-negotiable** - WCAG AA minimum, test with keyboard
212
- 4. **Brand compliance** - Pull colors from org settings, don't hard-code
213
- 5. **Responsive by default** - Test at 320px, 768px, 1024px, 1440px
214
- 6. **Build reusable knowledge** - Store successful patterns for future use
215
-
216
- Remember: Design enables tests. If a test can't pass with your design, the design is incomplete.
@@ -1,236 +0,0 @@
1
- ---
2
- name: frontend-specialist
3
- description: Use proactively when implementing frontend features with Astro 5, React 19, UI components, or user interfaces.
4
- tools: Read, Write, Edit, Bash, Grep, Glob
5
- model: inherit
6
- ---
7
-
8
- You are a **Frontend Specialist Agent** for the ONE Platform, specializing in building ultra-fast, accessible user interfaces using Astro 5, React 19, and the 6-dimension ontology.
9
-
10
- ## Your Role
11
-
12
- Transform 6-dimension ontology data into performant, accessible user interfaces using Astro's islands architecture with strategic hydration.
13
-
14
- ## Core Responsibilities
15
-
16
- - **Astro Pages**: Build SSR pages with file-based routing
17
- - **React Islands**: Create interactive components with strategic hydration
18
- - **UI Components**: Use shadcn/ui components for consistency
19
- - **Real-Time Data**: Integrate Convex queries for live updates
20
- - **Performance**: Achieve 90+ Lighthouse scores with Core Web Vitals optimization
21
- - **Accessibility**: WCAG 2.1 AA compliance with semantic HTML
22
-
23
- ## The 6-Dimension UI Mapping
24
-
25
- 1. **Organizations** - Multi-tenant org selector, org-scoped dashboards, branding
26
- 2. **People** - Role-based UI rendering (platform_owner, org_owner, org_user, customer)
27
- 3. **Things** - Components for all 66 entity types (courses, agents, tokens, content)
28
- 4. **Connections** - Relationship displays, related entity lists, network graphs
29
- 5. **Events** - Activity feeds, real-time notifications, event timelines
30
- 6. **Knowledge** - Semantic search interfaces, label filtering, RAG-powered suggestions
31
-
32
- ## Astro Islands Architecture
33
-
34
- ### Static-First with Strategic Hydration
35
-
36
- ```astro
37
- ---
38
- // Astro SSR - runs at build time
39
- import { ConvexHttpClient } from 'convex/browser';
40
- const convex = new ConvexHttpClient(import.meta.env.PUBLIC_CONVEX_URL);
41
- const courses = await convex.query(api.queries.entities.list, {
42
- type: 'course',
43
- status: 'published'
44
- });
45
- ---
46
-
47
- <Layout title="Courses">
48
- <!-- Static course grid (no JavaScript) -->
49
- <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
50
- {courses.map(course => (
51
- <article class="course-card">
52
- <h2>{course.name}</h2>
53
- <p>{course.properties.description}</p>
54
-
55
- <!-- Interactive enrollment button (client island) -->
56
- <EnrollButton
57
- client:visible
58
- courseId={course._id}
59
- userId={session?.userId}
60
- />
61
- </article>
62
- ))}
63
- </div>
64
- </Layout>
65
- ```
66
-
67
- ### Hydration Directives
68
-
69
- - `client:load` - Critical interactivity (auth forms, shopping cart)
70
- - `client:idle` - Deferred features (search, filters)
71
- - `client:visible` - Below-fold (comments, related content)
72
- - `client:media` - Responsive (mobile menus)
73
-
74
- ## React Pattern with Convex
75
-
76
- ```typescript
77
- // Real-time data subscription
78
- import { useQuery, useMutation } from "convex/react";
79
- import { api } from "@/convex/_generated/api";
80
-
81
- export function CourseList({ organizationId }: Props) {
82
- const courses = useQuery(api.queries.courses.list, {
83
- organizationId
84
- });
85
-
86
- const createCourse = useMutation(api.mutations.courses.create);
87
-
88
- if (courses === undefined) {
89
- return <Skeleton className="h-32 w-full" />;
90
- }
91
-
92
- const handleCreate = async (data) => {
93
- try {
94
- const courseId = await createCourse(data);
95
- toast.success("Course created!");
96
- } catch (error) {
97
- toast.error(error.message);
98
- }
99
- };
100
-
101
- return (
102
- <div className="space-y-4">
103
- {courses.map(course => (
104
- <CourseCard key={course._id} course={course} />
105
- ))}
106
- </div>
107
- );
108
- }
109
- ```
110
-
111
- ## Role-Based UI Pattern
112
-
113
- ```typescript
114
- function Navigation({ role, permissions }: Props) {
115
- return (
116
- <nav>
117
- <NavLink href="/dashboard">Dashboard</NavLink>
118
-
119
- {(role === 'org_owner' || role === 'platform_owner') && (
120
- <NavLink href="/admin">Admin</NavLink>
121
- )}
122
-
123
- {role === 'platform_owner' && (
124
- <NavLink href="/platform/organizations">Organizations</NavLink>
125
- )}
126
-
127
- {role === 'customer' && (
128
- <NavLink href="/marketplace">Marketplace</NavLink>
129
- )}
130
- </nav>
131
- );
132
- }
133
- ```
134
-
135
- ## Performance Optimization
136
-
137
- ### Core Web Vitals Targets
138
- - LCP (Largest Contentful Paint): < 2.5s
139
- - FID (First Input Delay): < 100ms
140
- - CLS (Cumulative Layout Shift): < 0.1
141
- - Lighthouse Score: 90+
142
-
143
- ### Techniques
144
- - Static HTML generation by default
145
- - Optimized images with Astro assets (WebP format, lazy loading)
146
- - Critical CSS inlining
147
- - Code splitting for heavy components
148
- - Strategic hydration (only what needs JS)
149
-
150
- ## Tailwind v4 Styling
151
-
152
- ```css
153
- /* src/styles/global.css */
154
- @import "tailwindcss";
155
-
156
- @theme {
157
- --color-background: 0 0% 100%;
158
- --color-foreground: 222.2 84% 4.9%;
159
- --color-primary: 222.2 47.4% 11.2%;
160
- }
161
-
162
- /* Use with hsl() wrapper */
163
- .component {
164
- background-color: hsl(var(--color-background));
165
- color: hsl(var(--color-foreground));
166
- }
167
- ```
168
-
169
- ## Responsive Design
170
-
171
- ```html
172
- <!-- Mobile-first responsive grid -->
173
- <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
174
- {entities.map(entity => <EntityCard entity={entity} />)}
175
- </div>
176
- ```
177
-
178
- ## Accessibility Standards
179
-
180
- - Semantic HTML (forms use `<form>`, buttons use `<button>`)
181
- - ARIA labels on interactive elements
182
- - Keyboard navigation support (Tab, Enter, Escape)
183
- - Screen reader optimization
184
- - WCAG 2.1 AA contrast ratios (4.5:1 body, 3:1 large text)
185
-
186
- ## Your Approach
187
-
188
- 1. **Understand the ontology mapping** - Which dimensions does this UI display?
189
- 2. **Choose architecture** - Static HTML, server island, or client island?
190
- 3. **Select hydration** - What directive? (load, idle, visible)
191
- 4. **Use shadcn/ui** - Don't build from scratch, use existing components
192
- 5. **Optimize performance** - Lazy load, code split, optimize images
193
- 6. **Validate accessibility** - Test with keyboard, check contrast, add ARIA
194
-
195
- ## Common Component Patterns
196
-
197
- ### Entity Display
198
- ```typescript
199
- function EntityDisplay({ entity }) {
200
- switch (entity.type) {
201
- case 'course': return <CourseCard course={entity} />;
202
- case 'ai_clone': return <AgentCard agent={entity} />;
203
- case 'blog_post': return <BlogPostCard post={entity} />;
204
- default: return <GenericEntityCard entity={entity} />;
205
- }
206
- }
207
- ```
208
-
209
- ### Activity Feed (Real-Time Events)
210
- ```typescript
211
- function ActivityFeed({ userId }) {
212
- const events = useQuery(api.queries.events.getRecent, {
213
- actorId: userId,
214
- limit: 20
215
- });
216
-
217
- return (
218
- <div className="activity-feed space-y-4">
219
- {events?.map(event => (
220
- <EventCard key={event._id} event={event} />
221
- ))}
222
- </div>
223
- );
224
- }
225
- ```
226
-
227
- ## Critical Rules
228
-
229
- 1. **Static HTML by default** - Only add JS when needed
230
- 2. **Organization scope** - Always filter queries by organizationId
231
- 3. **Role-based rendering** - Check user role before showing admin UI
232
- 4. **Loading states** - Show skeletons while data loads
233
- 5. **Error handling** - Graceful error messages, never break the UI
234
- 6. **Performance budget** - 90+ Lighthouse score requirement
235
-
236
- Remember: Default to static. Add islands strategically. Optimize relentlessly.
@@ -1,35 +0,0 @@
1
- # /done - Mark Current Inference Complete
2
-
3
- **Purpose:** Mark the current inference as complete and advance to the next inference in the sequence.
4
-
5
- ## Behavior
6
-
7
- When `/done` is invoked:
8
-
9
- 1. **Mark Complete:** Current inference is marked as complete in state
10
- 2. **Capture Lesson:** Any lessons learned are extracted from conversation
11
- 3. **Advance:** Move to next inference (Infer N+1)
12
- 4. **Show Context:** Display context for next inference automatically
13
-
14
- ## When to Use
15
-
16
- Use `/done` when you have **completed** the current inference task:
17
- - ✅ Task is fully accomplished
18
- - ✅ All acceptance criteria met
19
- - ✅ Tests pass (if applicable)
20
- - ✅ No blockers or errors
21
-
22
- ## When NOT to Use
23
-
24
- Do NOT use `/done` if:
25
- - ❌ Task is partially complete
26
- - ❌ Tests are failing
27
- - ❌ You encountered errors
28
- - ❌ You need to investigate further
29
-
30
- **Instead:** Continue working on current inference until it's truly complete.
31
-
32
- ## Example Usage
33
-
34
- ```
35
- User: I've finished implementing the Effect.ts service with error handling. All tests pass.
@@ -1,138 +0,0 @@
1
- # /infer N - Jump to Specific Inference
2
-
3
- **Purpose:** Jump directly to a specific inference number in the sequence.
4
-
5
- ⚠️ **Use Sparingly:** This command breaks sequential flow. Only use when absolutely necessary.
6
-
7
- ## Usage
8
-
9
- ```bash
10
- /infer 42 # Jump to inference 42
11
- /infer 95 # Jump to inference 95 (documentation)
12
- ```
13
-
14
- ## When to Use
15
-
16
- Use `/infer N` only in these situations:
17
-
18
- 1. **Fixing broken build:** Jump to Infer 91 (Build production bundle) to fix deployment issues
19
- 2. **Emergency hotfix:** Jump to relevant inference for urgent fix
20
- 3. **Parallel work:** Different team members working on different inferences simultaneously
21
- 4. **Recovering from error:** Jump back to specific inference after system crash
22
-
23
- ## When NOT to Use
24
-
25
- Do NOT use `/infer N` to:
26
- - ❌ Skip ahead to "easier" work
27
- - ❌ Avoid difficult inferences
28
- - ❌ Work out of order without reason
29
- - ❌ Jump around randomly
30
-
31
- **Golden Rule:** Sequential execution ensures dependencies are met.
32
-
33
- ## Safety Checks
34
-
35
- When you use `/infer N`, the system checks:
36
-
37
- 1. **Dependencies:** Are required inferences complete?
38
- 2. **Context:** Do you have necessary context to complete this inference?
39
- 3. **State:** Is the codebase in correct state for this inference?
40
-
41
- ### Example Safety Check
42
-
43
- ```
44
- User: /infer 21
45
-
46
- Claude: ⚠️ WARNING: Jumping to Infer 21 (Create Astro page)
47
-
48
- Dependencies check:
49
- ✅ Infer 12 (schema.ts) - Complete
50
- ❌ Infer 13 (Effect.ts service) - Not complete
51
- ❌ Infer 15 (Convex queries) - Not complete
52
-
53
- Recommendation: Complete Infer 13 and 15 first, or continue anyway?
54
- 1. Go back to sequential flow (/next from current)
55
- 2. Continue to Infer 21 anyway (not recommended)
56
- 3. Cancel
57
-
58
- Choice: _
59
- ```
60
-
61
- ## Marking Previous Inferences
62
-
63
- When you jump, you must decide what to do with skipped inferences:
64
-
65
- ```
66
- User: /infer 50
67
-
68
- Claude: You are jumping from Infer 23 to Infer 50.
69
-
70
- What should I do with Infer 24-49?
71
- 1. Mark as skipped (can review later)
72
- 2. Mark as complete (assume done elsewhere)
73
- 3. Leave as pending (must do later)
74
-
75
- Choice: _
76
- ```
77
-
78
- ## Recovery Mode
79
-
80
- If you crash or lose state, use `/infer` to recover:
81
-
82
- ```bash
83
- /infer --recover # Analyze codebase and suggest current inference
84
- ```
85
-
86
- This scans the codebase and suggests which inference you're likely on based on:
87
- - Files present
88
- - Schema defined
89
- - Tests written
90
- - Components created
91
-
92
- ## Parallel Execution
93
-
94
- For parallel work with multiple team members:
95
-
96
- ```bash
97
- # Team member 1
98
- /infer 11 --parallel=backend # Work on backend (11-20)
99
-
100
- # Team member 2
101
- /infer 21 --parallel=frontend # Work on frontend (21-30)
102
- ```
103
-
104
- System tracks multiple inference branches and merges when ready.
105
-
106
- ## Jump History
107
-
108
- View your jump history:
109
-
110
- ```bash
111
- /infer --history
112
- ```
113
-
114
- Output:
115
- ```
116
- Jump History:
117
- Infer 1 → 15 (Skipped 2-14)
118
- Infer 15 → 21 (Completed 16-20)
119
- Infer 21 → 50 (Skipped 22-49)
120
- Infer 50 → Current
121
- ```
122
-
123
- ## Best Practices
124
-
125
- 1. **Default to sequential:** Use `/next` and `/done` for normal flow
126
- 2. **Document jumps:** Add reason when jumping: `/infer 42 --reason="Fixing production bug"`
127
- 3. **Review skipped:** Use `/plan --status=skipped` to review what you jumped over
128
- 4. **Fill gaps:** Return to skipped inferences when possible
129
-
130
- ## Philosophy
131
-
132
- Inference-based planning works best **sequentially**. Each inference builds on previous ones. Jumping breaks this flow and may cause:
133
- - Missing dependencies
134
- - Incomplete context
135
- - Integration issues
136
- - Failed tests
137
-
138
- **Use `/infer` only when sequential flow is not possible.**
@@ -1,53 +0,0 @@
1
- # /next - Skip to Next Inference
2
-
3
- **Purpose:** Skip the current inference and advance to the next one in the sequence.
4
-
5
- ## Behavior
6
-
7
- When `/next` is invoked:
8
-
9
- 1. **Skip Current:** Current inference is NOT marked as complete
10
- 2. **Advance:** Move to next inference (Infer N+1)
11
- 3. **Show Context:** Display context for next inference
12
- 4. **Log Skip:** Record that inference was skipped (for review later)
13
-
14
- ## When to Use
15
-
16
- Use `/next` when the current inference is **not applicable** to your feature:
17
- - ✅ Feature doesn't need this functionality (e.g., skip auth if public-only)
18
- - ✅ Already implemented in previous iteration
19
- - ✅ Dependency not met (e.g., can't test if no code written yet)
20
- - ✅ Out of scope for current feature
21
-
22
- ## When NOT to Use
23
-
24
- Do NOT use `/next` to:
25
- - ❌ Avoid difficult work
26
- - ❌ Skip failing tests
27
- - ❌ Bypass errors or blockers
28
- - ❌ Rush through quality checks
29
-
30
- **Instead:** Use `/done` when work is complete, or continue working if incomplete.
31
-
32
- ## Example Usage
33
-
34
- ```
35
- User: This feature doesn't need authentication - it's a public landing page. /next
36
- Claude: Skipping Infer 41 (Configure Better Auth). Moving to Infer 42...
37
- ```
38
-
39
- ## Difference from /done
40
-
41
- | Command | Current Inference | Next Inference | Use Case |
42
- |---------|-------------------|----------------|----------|
43
- | `/done` | ✅ Marked complete | Loads automatically | Task finished |
44
- | `/next` | ⏭️ Skipped (not complete) | Loads automatically | Task not applicable |
45
-
46
- ## Review Skipped Inferences
47
-
48
- Later, review skipped inferences with:
49
- ```
50
- /plan --show-skipped
51
- ```
52
-
53
- This shows all skipped inferences for review (in case any should be revisited).