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,609 +0,0 @@
1
- # Design for Feature 1-4: Knowledge Management
2
-
3
- **Feature:** 1-4-knowledge-management
4
- **Status:** Design → Implementation
5
- **Design Agent:** agent-designer.md
6
-
7
- ---
8
-
9
- ## Design Goal
10
-
11
- Enable continuous learning through markdown-based lessons learned and pattern library. Design focuses on how Claude Code naturally reads patterns, searches lessons, and captures new knowledge without building knowledge system infrastructure.
12
-
13
- ---
14
-
15
- ## CLI Context
16
-
17
- **Knowledge is implicit** - No explicit commands needed. Claude:
18
- - Reads patterns when implementing features
19
- - Searches lessons when solving problems
20
- - Captures lessons after fixes
21
- - User can optionally query knowledge
22
-
23
- **Optional commands:**
24
- ```bash
25
- /one lessons # Show recent lessons learned
26
- /one lessons backend # Filter by category
27
- /one patterns # List available patterns
28
- /one pattern backend/service # Show specific pattern
29
- /one knowledge "authentication" # Search all knowledge
30
- ```
31
-
32
- ---
33
-
34
- ## Design Decisions (Test-Driven)
35
-
36
- ### Decision 1: Markdown Files ARE the Knowledge Base
37
- **Test requirement:** Claude can search knowledge in < 100ms
38
- **Design solution:**
39
- - Lessons: `one/knowledge/lessons-learned.md` (append-only)
40
- - Patterns: `one/knowledge/patterns/{category}/*.md` (template files)
41
- - Claude uses Grep to search: `grep "authentication" one/knowledge/lessons-learned.md`
42
- - Claude uses Read to load patterns
43
- - No database needed
44
-
45
- **Reasoning:** Markdown is fast, searchable, git-tracked, and human-readable.
46
-
47
- ---
48
-
49
- ### Decision 2: Lesson Capture Is Automatic After Fixes
50
- **Test requirement:** 100% lesson capture rate
51
- **Design solution:**
52
- ```
53
- Test fails → Problem solved → Fix implemented →
54
- Before marking complete: "Capture lesson learned" →
55
- Claude appends to lessons-learned.md →
56
- Lesson available for future searches
57
- ```
58
-
59
- **Reasoning:** Automatic capture ensures knowledge compounds over time.
60
-
61
- ---
62
-
63
- ### Decision 3: Patterns Discovered From Repeated Lessons
64
- **Test requirement:** After 3 similar issues, promote to pattern
65
- **Design solution:**
66
- - Problem solver notices repeated lessons
67
- - Suggests pattern promotion
68
- - Integration specialist creates pattern template
69
- - Future features reference pattern
70
-
71
- **Example:**
72
- ```
73
- Month 1: 3 features forgot to log events after entity creation
74
- Month 2: Pattern created: backend/event-logging.md
75
- Month 3+: All features use pattern, no more forgotten events
76
- ```
77
-
78
- **Reasoning:** Patterns emerge naturally from actual problems, not speculation.
79
-
80
- ---
81
-
82
- ### Decision 4: Context Loading References Knowledge
83
- **Test requirement:** Specialists load relevant patterns in < 50ms
84
- **Design solution:**
85
- ```
86
- Claude Code (Backend Specialist):
87
- Implementing feature 2-1-course-crud...
88
-
89
- Loading context:
90
- ✓ Ontology types (200 tokens)
91
- ✓ Backend patterns (500 tokens)
92
- - service-template.md
93
- - event-logging.md
94
- - mutation-template.md
95
- ✓ Recent lessons (300 tokens)
96
- - Always log events after entity creation
97
- - Validate ownership before delete
98
- - Use transactions for multi-step operations
99
-
100
- Implementation with patterns applied...
101
- ```
102
-
103
- **Reasoning:** Patterns and lessons become default context for specialists.
104
-
105
- ---
106
-
107
- ### Decision 5: Knowledge Grows With Each Feature
108
- **Test requirement:** Measurable knowledge accumulation
109
- **Design solution:**
110
- ```
111
- Week 1: 0 lessons, 8 patterns (templates)
112
- Month 1: 20 lessons, 8 patterns
113
- Month 3: 60 lessons, 15 patterns (7 promoted)
114
- Quarter 1: 150 lessons, 25 patterns
115
- Year 1: 500 lessons, 50 patterns
116
- ```
117
-
118
- **Reasoning:** Knowledge compounds naturally. System becomes "expert" over time.
119
-
120
- ---
121
-
122
- ## Component Architecture
123
-
124
- ### 1. Lessons Learned File (Append-Only Markdown)
125
-
126
- **File:** `one/knowledge/lessons-learned.md`
127
-
128
- **Structure:**
129
- ```markdown
130
- # Lessons Learned
131
-
132
- ## Backend Patterns
133
-
134
- ### Always Log Events After Entity Creation
135
- **Date:** 2025-01-15
136
- **Feature:** 1-1-agent-prompts
137
- **Problem:** Forgot to log agent_prompt_created event
138
- **Solution:** Added event logging after db.insert()
139
- **Pattern:** Every entity creation must log corresponding event
140
- **Context:** All thing_created events are mandatory per ontology
141
- **Example:**
142
- ```typescript
143
- // Bad
144
- const id = await ctx.db.insert('entities', data)
145
- return id
146
-
147
- // Good
148
- const id = await ctx.db.insert('entities', data)
149
- await ctx.db.insert('events', {
150
- type: 'entity_created',
151
- actorId: ctx.userId,
152
- targetId: id,
153
- metadata: { ...relevantFields }
154
- })
155
- return id
156
- ```
157
- **Related:** See pattern backend/event-logging.md
158
-
159
- ### Validate Ownership Before Delete Operations
160
- **Date:** 2025-01-16
161
- **Feature:** 2-1-course-crud
162
- ...
163
- ```
164
-
165
- **Claude appends lessons using Edit tool** - No database writes needed.
166
-
167
- ---
168
-
169
- ### 2. Pattern Library (Template Files)
170
-
171
- **Directory structure:**
172
- ```
173
- one/knowledge/patterns/
174
- ├── backend/
175
- │ ├── service-template.md
176
- │ ├── mutation-template.md
177
- │ ├── query-template.md
178
- │ └── event-logging.md
179
- ├── frontend/
180
- │ ├── page-template.md
181
- │ ├── component-template.md
182
- │ └── form-template.md
183
- ├── design/
184
- │ ├── wireframe-template.md
185
- │ └── component-architecture.md
186
- └── test/
187
- ├── user-flow-template.md
188
- ├── acceptance-criteria-template.md
189
- └── unit-test-template.md
190
- ```
191
-
192
- **Pattern file format:**
193
- ```markdown
194
- # Pattern: Event Logging After Entity Creation
195
-
196
- **Category:** backend
197
- **Context:** Every time you create an entity in the database
198
- **Problem:** Forgetting to log creation event breaks audit trail
199
- **Solution:** Always log {entity}_created event after db.insert()
200
-
201
- ## Template
202
-
203
- ```typescript
204
- async create{Entity}(data: {Entity}Data) {
205
- // Create entity
206
- const id = await ctx.db.insert('{entities}', data)
207
-
208
- // ALWAYS log creation event
209
- await ctx.db.insert('events', {
210
- type: '{entity}_created',
211
- actorId: data.creatorId || ctx.userId,
212
- targetId: id,
213
- metadata: {
214
- ...relevantFields
215
- }
216
- })
217
-
218
- return id
219
- }
220
- ```
221
-
222
- ## Usage
223
- 1. Replace {Entity} with your entity name (capitalized)
224
- 2. Replace {entity} with lowercase entity name
225
- 3. Replace {entities} with table name
226
- 4. Include relevant metadata fields
227
-
228
- ## Common Mistakes
229
- - Forgetting event log → Use this pattern
230
- - Wrong metadata structure → See event-coordination.md spec
231
- - Missing actorId → Default to ctx.userId
232
-
233
- ## Related Patterns
234
- - mutation-template.md - General mutation structure
235
- - event-coordination.md - Event metadata standards
236
- ```
237
-
238
- **Claude reads patterns using Read tool** - No pattern loader needed.
239
-
240
- ---
241
-
242
- ### 3. Knowledge Query Patterns (Grep-Based)
243
-
244
- ```bash
245
- # How Claude searches knowledge naturally
246
-
247
- # Search all lessons for keyword
248
- grep -i "authentication" one/knowledge/lessons-learned.md
249
-
250
- # Find backend-specific lessons
251
- grep -A 10 "## Backend" one/knowledge/lessons-learned.md
252
-
253
- # Search patterns
254
- grep -r "authentication" one/knowledge/patterns/
255
-
256
- # Get recent lessons (last 5)
257
- tail -50 one/knowledge/lessons-learned.md
258
-
259
- # Find patterns by category
260
- ls one/knowledge/patterns/backend/*.md
261
- ```
262
-
263
- **No search API to build** - Grep is fast and flexible.
264
-
265
- ---
266
-
267
- ## Wireframes (CLI Outputs)
268
-
269
- ### Wireframe 1: Automatic Lesson Capture (Invisible)
270
-
271
- ```
272
- $ /one implement 2-1
273
-
274
- Claude Code (Backend Specialist):
275
- Implementing feature 2-1-course-crud...
276
-
277
- Running tests...
278
- ✗ CourseService.create() should log course_created event
279
-
280
- Claude Code (Problem Solver):
281
- Analyzing failure...
282
- Root cause: Missing event log after db.insert()
283
- Proposing fix...
284
-
285
- Claude Code (Backend Specialist):
286
- Implementing fix...
287
- ✓ Added event logging
288
- ✓ All tests passing
289
-
290
- [Claude automatically captures lesson]
291
-
292
- Capturing lesson learned...
293
- ✓ Appended to one/knowledge/lessons-learned.md
294
-
295
- ✅ Feature 2-1 complete!
296
-
297
- [User doesn't see lesson capture details - it happens automatically]
298
- ```
299
-
300
- ---
301
-
302
- ### Wireframe 2: Pattern Application (Visible Context)
303
-
304
- ```
305
- $ /one implement 3-1
306
-
307
- Claude Code (Backend Specialist):
308
- Implementing feature 3-1-enrollment-service...
309
-
310
- Loading context:
311
- ✓ Ontology types (200 tokens)
312
- ✓ Backend patterns (500 tokens)
313
- - service-template.md
314
- - event-logging.md ← Learned from feature 1-1
315
- - ownership-validation.md ← Learned from feature 2-1
316
- - transaction-pattern.md ← Learned from feature 2-3
317
- ✓ Recent lessons (300 tokens)
318
- - Always log events (occurred 3x)
319
- - Validate ownership (occurred 2x)
320
- - Use transactions (occurred 2x)
321
-
322
- Applying patterns:
323
- ✓ Using service-template.md structure
324
- ✓ Will log enrollment_created event (event-logging pattern)
325
- ✓ Will validate student access (ownership-validation pattern)
326
- ✓ Will use transaction for enrollment + payment (transaction-pattern)
327
-
328
- Implementing with patterns...
329
- ```
330
-
331
- **User sees:** Patterns being applied proactively
332
- **Result:** Implementation is faster and correct on first try
333
-
334
- ---
335
-
336
- ### Wireframe 3: Knowledge Query (Optional Command)
337
-
338
- ```
339
- $ /one lessons
340
-
341
- Claude Code:
342
- Recent lessons learned (last 10):
343
-
344
- 1. [2025-01-20] Always Use Transactions for Multi-Step Operations
345
- Feature: 2-3-payment-processing
346
- Problem: Payment recorded but enrollment failed → inconsistent state
347
- Solution: Wrap in transaction
348
- Category: Backend
349
-
350
- 2. [2025-01-18] Validate Ownership Before Mutations
351
- Feature: 2-2-lesson-management
352
- Problem: Users could edit other creators' lessons
353
- Solution: Check ownership in mutation
354
- Category: Backend
355
-
356
- 3. [2025-01-16] Client-Side Validation Reduces API Calls
357
- Feature: 2-1-course-crud
358
- Problem: Sequential API calls caused 15s delay (10s budget)
359
- Solution: Validate locally first, minimize roundtrips
360
- Category: Frontend
361
-
362
- 4. [2025-01-15] Always Log Events After Entity Creation
363
- Feature: 1-1-agent-prompts
364
- Problem: Forgot to log agent_prompt_created event
365
- Solution: Added event logging after db.insert()
366
- Category: Backend
367
-
368
- ...
369
-
370
- Total lessons: 23
371
- Categories: Backend (15), Frontend (5), Integration (3)
372
-
373
- View all: one/knowledge/lessons-learned.md
374
- ```
375
-
376
- ---
377
-
378
- ### Wireframe 4: Pattern Promotion (Proactive Suggestion)
379
-
380
- ```
381
- $ /one implement 4-1
382
-
383
- Claude Code (Problem Solver):
384
- ⚠️ Pattern Detected!
385
-
386
- I've noticed the same issue 3 times:
387
- - Feature 1-1: Forgot to log agent_prompt_created event
388
- - Feature 2-1: Forgot to log course_created event
389
- - Feature 3-1: Forgot to log enrollment_created event
390
-
391
- This should be a pattern!
392
-
393
- Would you like me to create a pattern template? [Y/n] y
394
-
395
- Claude Code (Integration Specialist):
396
- Creating pattern: backend/event-logging.md...
397
-
398
- Pattern created: one/knowledge/patterns/backend/event-logging.md
399
-
400
- This pattern will now be included in default context for all backend features.
401
- Future implementations will apply this automatically.
402
-
403
- Updated lessons-learned.md to reference pattern.
404
- ```
405
-
406
- **User sees:** Proactive pattern discovery
407
- **Result:** Repeated problems become institutionalized solutions
408
-
409
- ---
410
-
411
- ### Wireframe 5: Knowledge Search (Debugging)
412
-
413
- ```
414
- $ /one knowledge "authentication"
415
-
416
- Claude Code:
417
- Searching knowledge base for "authentication"...
418
-
419
- [Claude runs: grep -i "authentication" one/knowledge/lessons-learned.md one/knowledge/patterns/**/*.md]
420
-
421
- Found 5 matches:
422
-
423
- ## Lessons Learned
424
-
425
- 1. **Use Better Auth for All Authentication** (2025-01-10)
426
- Feature: 0-1-auth-setup
427
- Solution: Better Auth provides 6 methods out of the box
428
- File: one/knowledge/lessons-learned.md:45
429
-
430
- 2. **Store Session Tokens Securely** (2025-01-12)
431
- Feature: 0-2-session-management
432
- Solution: Use httpOnly cookies, never localStorage
433
- File: one/knowledge/lessons-learned.md:67
434
-
435
- ## Patterns
436
-
437
- 3. **Authentication Middleware Pattern**
438
- Category: backend
439
- Context: Protect API routes requiring authentication
440
- File: one/knowledge/patterns/backend/auth-middleware.md
441
-
442
- 4. **User Context Pattern**
443
- Category: backend
444
- Context: Access authenticated user in mutations/queries
445
- File: one/knowledge/patterns/backend/user-context.md
446
-
447
- 5. **Protected Route Pattern**
448
- Category: frontend
449
- Context: Restrict pages to authenticated users only
450
- File: one/knowledge/patterns/frontend/protected-route.md
451
-
452
- Read full details: /one pattern backend/auth-middleware
453
- ```
454
-
455
- ---
456
-
457
- ### Wireframe 6: Knowledge Growth Over Time
458
-
459
- ```
460
- $ /one knowledge stats
461
-
462
- Claude Code:
463
- Knowledge Base Statistics
464
-
465
- Current Status (Quarter 1):
466
- Lessons learned: 156
467
- Patterns: 23
468
-
469
- Knowledge Growth:
470
- Week 1: 0 lessons, 8 patterns (templates)
471
- Month 1: 22 lessons, 8 patterns
472
- Month 2: 58 lessons, 15 patterns (7 promoted)
473
- Month 3: 96 lessons, 18 patterns (3 more promoted)
474
- Today: 156 lessons, 23 patterns (5 more promoted)
475
-
476
- Lesson Breakdown by Category:
477
- Backend: 89 lessons (57%)
478
- Frontend: 38 lessons (24%)
479
- Integration: 21 lessons (13%)
480
- Testing: 8 lessons (5%)
481
-
482
- Pattern Application Rate:
483
- Month 1: 30% of features apply patterns
484
- Month 2: 65% of features apply patterns
485
- Month 3: 92% of features apply patterns
486
-
487
- Quality Impact:
488
- Month 1: 80% first-try pass rate
489
- Month 2: 87% first-try pass rate
490
- Month 3: 94% first-try pass rate
491
-
492
- Velocity Impact:
493
- Month 1: Average feature time: 45 minutes
494
- Month 2: Average feature time: 32 minutes (-29%)
495
- Month 3: Average feature time: 24 minutes (-47%)
496
-
497
- Knowledge is compounding! 📈
498
- ```
499
-
500
- ---
501
-
502
- ## Design Tokens
503
-
504
- ### Knowledge Type Icons
505
- ```
506
- 📚 Lessons learned
507
- 🎯 Patterns
508
- 💡 Insights
509
- 🔍 Search results
510
- 📊 Knowledge stats
511
- ⚠️ Pattern detected (promotion suggestion)
512
- ```
513
-
514
- ### Category Labels
515
- ```
516
- [Backend] - Services, mutations, queries, schemas
517
- [Frontend] - Components, pages, state management
518
- [Integration] - Connections, data flows, APIs
519
- [Testing] - Unit, integration, e2e
520
- [Design] - UI/UX, accessibility, performance
521
- [Workflow] - Process improvements, coordination
522
- ```
523
-
524
- ---
525
-
526
- ## Accessibility
527
-
528
- ### Screen Reader Friendly
529
- - Lesson titles spoken clearly
530
- - Dates in readable format (not just timestamps)
531
- - Category labels explicit
532
- - Pattern names descriptive
533
-
534
- ### Keyboard Navigation
535
- - All knowledge commands text-based
536
- - No mouse required for searches
537
- - Tab completion for categories: `/one lessons [tab]`
538
-
539
- ### Error Recovery
540
- - No lessons found: "No lessons for category X yet"
541
- - Pattern doesn't exist: "Pattern X not found. Available: [list]"
542
- - Search no results: "No matches for 'keyword'. Try broader search?"
543
-
544
- ---
545
-
546
- ## Success Criteria from Tests
547
-
548
- ### User Flows
549
- - ✅ Claude captures lesson after every fix (< 50ms)
550
- - ✅ Claude searches lessons when solving problems (< 100ms)
551
- - ✅ Claude loads patterns when implementing (< 50ms)
552
- - ✅ System promotes patterns after 3 similar lessons
553
- - ✅ Knowledge accumulates measurably over time
554
-
555
- ### Acceptance Criteria
556
- - ✅ Lesson capture: < 50ms (append to file)
557
- - ✅ Knowledge search: < 100ms (grep)
558
- - ✅ Pattern loading: < 50ms (read file)
559
- - ✅ 100% lesson capture rate
560
- - ✅ Knowledge compounds: 0→20→60→150+ lessons over time
561
-
562
- ---
563
-
564
- ## Implementation Notes
565
-
566
- **No knowledge system to build** - Just conventions:
567
- 1. Lesson file format defined ✅ (in Feature 1-4 spec)
568
- 2. Pattern directory structure ✅ (organized by category)
569
- 3. Search patterns ✅ (grep examples)
570
- 4. Capture workflow ✅ (append after fixes)
571
-
572
- **Claude Code handles knowledge** by:
573
- - Appending lessons using Edit tool
574
- - Searching using Grep tool
575
- - Loading patterns using Read tool
576
- - Promoting patterns when detected
577
-
578
- ---
579
-
580
- ## Next Steps
581
-
582
- Ready for Level 6 (Implementation):
583
- - Lesson format documented ✅ (Feature 1-4 spec)
584
- - Pattern templates ready ✅ (8 initial templates)
585
- - Search patterns documented ✅ (grep examples)
586
- - CLI patterns documented ✅ (this document)
587
- - Implementation is using knowledge naturally
588
-
589
- ---
590
-
591
- **Status:** ✅ Design Complete
592
-
593
- **Key Design Insights:**
594
- 1. **Markdown is the database** - No knowledge system infrastructure
595
- 2. **Automatic capture** - Lessons after every fix
596
- 3. **Pattern emergence** - From repeated lessons (3x rule)
597
- 4. **Compounding growth** - Knowledge accumulates over time
598
- 5. **Velocity multiplier** - Each lesson makes future work faster
599
-
600
- **The design is append-only markdown + grep + pattern discovery from repetition.** 🎯
601
-
602
- **Knowledge impact:**
603
- ```
604
- Month 1: 20 lessons → 80% first-try pass → 45 min/feature
605
- Month 3: 60 lessons → 90% first-try pass → 32 min/feature (-29%)
606
- Year 1: 500 lessons → 97% first-try pass → 15 min/feature (-67%)
607
- ```
608
-
609
- **Every problem solved becomes institutional intelligence.** 🧠