oneie 2.0.3 → 2.0.6
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.md +220 -29
- package/LICENSE.md +84 -0
- package/README.md +489 -931
- package/dist/copy-claude-config.d.ts.map +1 -1
- package/dist/copy-claude-config.js +3 -1
- package/dist/copy-claude-config.js.map +1 -1
- package/dist/sync-agents.d.ts.map +1 -1
- package/dist/sync-agents.js +3 -1
- package/dist/sync-agents.js.map +1 -1
- package/dist/sync-ontology.d.ts.map +1 -1
- package/dist/sync-ontology.js +9 -7
- package/dist/sync-ontology.js.map +1 -1
- package/folders.yaml +78 -17
- package/one/.obsidian/workspace.json +6 -6
- package/one/events/CASCADE-2-BACKEND-AGNOSTIC.md +412 -0
- package/one/events/FEATURE-2-4-COMPLETE.md +302 -0
- package/one/events/FEATURE_2_3_COMPLETE.md +575 -0
- package/one/events/GROUPS-MIGRATION.md +625 -0
- package/one/events/INSTALL-TESTS.md +293 -0
- package/one/events/INTEGRATION-ARCHITECTURE.md +561 -0
- package/one/events/INTEGRATION-CHECKLIST.md +1234 -0
- package/one/events/INTEGRATION-ORCHESTRATION.md +2623 -0
- package/one/events/INTEGRATION-SUMMARY.md +653 -0
- package/one/events/MIGRATION-REPORT.md +435 -0
- package/one/events/MIGRATION.md +69 -0
- package/one/events/README-archived.md +519 -0
- package/one/events/TEST-SUMMARY.md +393 -0
- package/one/events/TESTS-QUICK-REF.md +262 -0
- package/one/groups/groups.md +543 -0
- package/one/knowledge/CLOUDFLARE_ENV_SETUP.md +49 -0
- package/one/knowledge/architecture-any-backend.md +1366 -0
- package/one/knowledge/docs/flow.md +0 -0
- package/one/knowledge/ontology-documentation.md +18 -18
- package/one/knowledge/ontology.md +154 -143
- package/one/knowledge/ontology.md.backup +2822 -0
- package/one/knowledge/ontology.yaml +87 -87
- package/one/knowledge/provider-creation-guide.md +1064 -0
- package/one/knowledge/todo.md +251 -0
- package/one/license.md +84 -0
- package/one/things/CHECKLIST.md +356 -0
- package/one/things/ONE.md +510 -0
- package/one/things/{cli.md → cli/cli.md} +27 -4
- package/one/things/features/2-1-dataprovider-interface.md +2358 -0
- package/one/things/features/2-2-config-system.md +3075 -0
- package/one/things/features/2-3-effectts-services.md +1498 -0
- package/one/things/features/2-4-react-hooks.md +2120 -0
- package/one/things/features/2-5-auth-migration.md +2046 -0
- package/one/things/features/2-6-dashboard-migration.md +1985 -0
- package/one/things/features/2-7-alternative-providers.md +2505 -0
- package/one/things/features/2-7-implementation-report.md +680 -0
- package/one/things/features/2-cli.md +39 -39
- package/one/things/features/2-design.md +1738 -0
- package/one/things/features/2-tests.md +520 -0
- package/one/things/features/AUTH_HOOKS_IMPLEMENTATION.md +521 -0
- package/one/things/features/DECOUPLING.md +272 -0
- package/one/things/features/DEPLOYMENT.md +452 -0
- package/one/things/features/IMPLEMENTATION_SUMMARY.md +316 -0
- package/one/things/features/dataprovider-interface/1-tests.md +1522 -0
- package/one/things/features/improve.md +843 -0
- package/one/things/features/remove-convex-deps.md +45 -0
- package/one/things/features/top-features.md +79 -0
- package/one/things/ideas/2-backend-agnostic-frontend.md +384 -0
- package/one/things/plans/2-backend-agnostic-frontend.md +543 -0
- package/one/things/plans/3-groups.md +502 -0
- package/one/things/plans/backend-agnostic-frontend.md +323 -0
- package/one/things/plans/deploy-to-cloudflare.md +581 -0
- package/one/things/plans/organizations-to-groups.md +705 -0
- package/one/things/plans/release.md +432 -0
- package/one/things/products/ontology.md +1 -1
- package/one/things/system.md +600 -0
- package/one/things/tests/2-1-dataprovider-interface.md +1144 -0
- package/one/things/tests/2-1-test-analysis.md +496 -0
- package/one/things/vision/elegant-interface.md +214 -0
- package/package.json +1 -1
- package/one/organisation/organisation.md +0 -438
- package/one/repomix-output.md +0 -92634
- /package/one/{things → connections}/agentkit.md +0 -0
- /package/one/{things → connections}/copilotkit.md +0 -0
- /package/one/{organisation → groups}/one.md +0 -0
- /package/one/{organisation → groups}/revenue.md +0 -0
- /package/one/{organisation → groups}/strategy.md +0 -0
- /package/one/{organisation → groups}/vision.md +0 -0
- /package/one/things/{cli-code.md → cli/cli-code.md} +0 -0
- /package/one/things/{cli-compiler-code.md → cli/cli-compiler-code.md} +0 -0
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
# Plan: Backend-Agnostic Frontend Architecture
|
|
2
|
+
|
|
3
|
+
**Plan ID:** `2-backend-agnostic-frontend`
|
|
4
|
+
**Idea:** `2-backend-agnostic-frontend`
|
|
5
|
+
**Status:** Active
|
|
6
|
+
**Priority:** High (Strategic Enhancement)
|
|
7
|
+
**Duration:** 4-6 weeks
|
|
8
|
+
**Team Size:** 3 specialists (Backend, Frontend, Integration)
|
|
9
|
+
**Created:** 2025-10-13
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Executive Summary
|
|
14
|
+
|
|
15
|
+
Transform the current tightly-coupled Astro/React frontend + Convex backend architecture into a fully backend-agnostic system using the DataProvider interface pattern. This enables organizations to use ANY backend (Convex, WordPress, Notion, Supabase, custom APIs) by changing ONE line of configuration.
|
|
16
|
+
|
|
17
|
+
**Strategic Value:** Removes vendor lock-in, enables multi-backend federation, supports organizations with existing infrastructure, proves ontology is truly protocol-agnostic.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Ontology Validation
|
|
22
|
+
|
|
23
|
+
### ✅ Organizations (Dimension 1)
|
|
24
|
+
- Each organization configures `properties.backendProvider`
|
|
25
|
+
- Multi-tenant isolation maintained across all providers
|
|
26
|
+
- Organizations can swap providers independently
|
|
27
|
+
|
|
28
|
+
### ✅ People (Dimension 2)
|
|
29
|
+
- Only `org_owner` role can configure backend providers
|
|
30
|
+
- Authorization enforced at backend, not frontend
|
|
31
|
+
- All 4 roles work identically across providers
|
|
32
|
+
|
|
33
|
+
### ✅ Things (Dimension 3)
|
|
34
|
+
- New thing type: `external_connection` (backend configurations)
|
|
35
|
+
- All 66 thing types work through DataProvider interface
|
|
36
|
+
- Generic ThingService handles all types uniformly
|
|
37
|
+
|
|
38
|
+
### ✅ Connections (Dimension 4)
|
|
39
|
+
- New relationship: `configured_by` (org → external_connection)
|
|
40
|
+
- Uses consolidated type: `communicated` with protocol metadata
|
|
41
|
+
- Cross-backend connections supported
|
|
42
|
+
|
|
43
|
+
### ✅ Events (Dimension 5)
|
|
44
|
+
- New event: `provider_changed` (when backend swaps)
|
|
45
|
+
- Uses consolidated type: `communication_event` with protocol metadata
|
|
46
|
+
- Complete audit trail preserved
|
|
47
|
+
|
|
48
|
+
### ✅ Knowledge (Dimension 6)
|
|
49
|
+
- Labels: Backend provider capabilities
|
|
50
|
+
- Tags: `protocol:data_provider`, `provider:convex`, `status:active`
|
|
51
|
+
- RAG can index provider documentation
|
|
52
|
+
|
|
53
|
+
**Verdict:** ✅ PASS - All 6 dimensions successfully mapped
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Feature Collection
|
|
58
|
+
|
|
59
|
+
This plan breaks down into **7 features** assigned to specialists:
|
|
60
|
+
|
|
61
|
+
### Feature 2-1: DataProvider Interface & ConvexProvider
|
|
62
|
+
**ID:** `2-1-dataprovider-interface`
|
|
63
|
+
**Owner:** Backend Specialist
|
|
64
|
+
**Duration:** 1 week
|
|
65
|
+
**Dependencies:** None
|
|
66
|
+
**Status:** Not Started
|
|
67
|
+
**File:** `one/things/features/2-1-dataprovider-interface.md`
|
|
68
|
+
|
|
69
|
+
**Scope:**
|
|
70
|
+
- Define TypeScript interface for 6-dimension ontology operations
|
|
71
|
+
- Implement ConvexProvider (wraps existing Convex SDK)
|
|
72
|
+
- Create provider factory pattern
|
|
73
|
+
- Write comprehensive tests
|
|
74
|
+
|
|
75
|
+
**Success Criteria:**
|
|
76
|
+
- [ ] DataProvider interface fully typed
|
|
77
|
+
- [ ] ConvexProvider passes all unit tests
|
|
78
|
+
- [ ] Zero TypeScript errors
|
|
79
|
+
- [ ] Documentation complete
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### Feature 2-2: Configuration System
|
|
84
|
+
**ID:** `2-2-config-system`
|
|
85
|
+
**Owner:** Backend Specialist
|
|
86
|
+
**Duration:** 3 days
|
|
87
|
+
**Dependencies:** Feature 2-1
|
|
88
|
+
**Status:** Not Started
|
|
89
|
+
**File:** `one/things/features/2-2-config-system.md`
|
|
90
|
+
|
|
91
|
+
**Scope:**
|
|
92
|
+
- Environment-based provider configuration
|
|
93
|
+
- Runtime provider switching
|
|
94
|
+
- Multi-tenant provider isolation
|
|
95
|
+
- Configuration validation
|
|
96
|
+
|
|
97
|
+
**Success Criteria:**
|
|
98
|
+
- [ ] Organizations can configure backend via .env
|
|
99
|
+
- [ ] Provider switching works at runtime
|
|
100
|
+
- [ ] Multi-tenant isolation maintained
|
|
101
|
+
- [ ] Configuration errors caught early
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
### Feature 2-3: Effect.ts Service Layer
|
|
106
|
+
**ID:** `2-3-effectts-services`
|
|
107
|
+
**Owner:** Backend Specialist
|
|
108
|
+
**Duration:** 1 week
|
|
109
|
+
**Dependencies:** Features 2-1, 2-2
|
|
110
|
+
**Status:** Not Started
|
|
111
|
+
**File:** `one/things/features/2-3-effectts-services.md`
|
|
112
|
+
|
|
113
|
+
**Scope:**
|
|
114
|
+
- ThingService, ConnectionService, EventService
|
|
115
|
+
- Pure business logic (backend-agnostic)
|
|
116
|
+
- Error handling with Effect.ts patterns
|
|
117
|
+
- Service composition and dependencies
|
|
118
|
+
|
|
119
|
+
**Success Criteria:**
|
|
120
|
+
- [ ] All 6-dimension services implemented
|
|
121
|
+
- [ ] Services work with any DataProvider
|
|
122
|
+
- [ ] Business logic isolated from backend
|
|
123
|
+
- [ ] Error handling comprehensive
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
### Feature 2-4: React Hooks
|
|
128
|
+
**ID:** `2-4-react-hooks`
|
|
129
|
+
**Owner:** Frontend Specialist
|
|
130
|
+
**Duration:** 3 days
|
|
131
|
+
**Dependencies:** Feature 2-1
|
|
132
|
+
**Status:** Not Started
|
|
133
|
+
**File:** `one/things/features/2-4-react-hooks.md`
|
|
134
|
+
|
|
135
|
+
**Scope:**
|
|
136
|
+
- Generic hooks: `useThings`, `useConnections`, `useEvents`
|
|
137
|
+
- Loading and error states
|
|
138
|
+
- Real-time subscription handling
|
|
139
|
+
- TypeScript type inference
|
|
140
|
+
|
|
141
|
+
**Success Criteria:**
|
|
142
|
+
- [ ] Hooks match Convex API ergonomics
|
|
143
|
+
- [ ] Work with any DataProvider
|
|
144
|
+
- [ ] Type-safe with full inference
|
|
145
|
+
- [ ] Documentation and examples complete
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
### Feature 2-5: Auth Component Migration
|
|
150
|
+
**ID:** `2-5-auth-migration`
|
|
151
|
+
**Owner:** Frontend Specialist
|
|
152
|
+
**Duration:** 1 week
|
|
153
|
+
**Dependencies:** Features 2-1, 2-4
|
|
154
|
+
**Status:** Not Started
|
|
155
|
+
**File:** `one/things/features/2-5-auth-migration.md`
|
|
156
|
+
|
|
157
|
+
**Scope:**
|
|
158
|
+
- Migrate all auth components to use DataProvider
|
|
159
|
+
- Maintain 6 authentication methods
|
|
160
|
+
- Preserve 50+ passing tests
|
|
161
|
+
- Zero functionality regression
|
|
162
|
+
|
|
163
|
+
**Success Criteria:**
|
|
164
|
+
- [ ] All 50+ auth tests pass
|
|
165
|
+
- [ ] No direct Convex imports in auth components
|
|
166
|
+
- [ ] Performance within 10% of baseline
|
|
167
|
+
- [ ] Zero TypeScript errors
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
### Feature 2-6: Dashboard Component Migration
|
|
172
|
+
**ID:** `2-6-dashboard-migration`
|
|
173
|
+
**Owner:** Frontend Specialist
|
|
174
|
+
**Duration:** 1 week
|
|
175
|
+
**Dependencies:** Feature 2-5
|
|
176
|
+
**Status:** Not Started
|
|
177
|
+
**File:** `one/things/features/2-6-dashboard-migration.md`
|
|
178
|
+
|
|
179
|
+
**Scope:**
|
|
180
|
+
- Migrate dashboard components to DataProvider
|
|
181
|
+
- Preserve all functionality
|
|
182
|
+
- Maintain loading/error states
|
|
183
|
+
- Update component tests
|
|
184
|
+
|
|
185
|
+
**Success Criteria:**
|
|
186
|
+
- [ ] All dashboard components migrated
|
|
187
|
+
- [ ] No direct Convex imports
|
|
188
|
+
- [ ] All tests pass
|
|
189
|
+
- [ ] Performance maintained
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
### Feature 2-7: Alternative Providers (WordPress + Notion)
|
|
194
|
+
**ID:** `2-7-alternative-providers`
|
|
195
|
+
**Owner:** Integration Specialist
|
|
196
|
+
**Duration:** 2 weeks
|
|
197
|
+
**Dependencies:** Feature 2-6
|
|
198
|
+
**Status:** Not Started
|
|
199
|
+
**File:** `one/things/features/2-7-alternative-providers.md`
|
|
200
|
+
|
|
201
|
+
**Scope:**
|
|
202
|
+
- Implement WordPressProvider (WP REST API + ACF)
|
|
203
|
+
- Implement NotionProvider (Notion API)
|
|
204
|
+
- Test multi-backend scenarios
|
|
205
|
+
- Document provider creation guide
|
|
206
|
+
|
|
207
|
+
**Success Criteria:**
|
|
208
|
+
- [ ] WordPress provider functional
|
|
209
|
+
- [ ] Notion provider functional
|
|
210
|
+
- [ ] Organizations can swap backends
|
|
211
|
+
- [ ] Provider creation guide complete
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Parallel Execution Strategy
|
|
216
|
+
|
|
217
|
+
### Phase 1: Foundation (Week 1-2)
|
|
218
|
+
**Parallel Tracks:**
|
|
219
|
+
- Track A: Backend Specialist → Feature 2-1 → Feature 2-2
|
|
220
|
+
- Track B: Backend Specialist → Feature 2-3 (starts after 2-1)
|
|
221
|
+
- Track C: Frontend Specialist → Feature 2-4 (starts after 2-1)
|
|
222
|
+
|
|
223
|
+
**Critical Path:** Feature 2-1 (blocks all others)
|
|
224
|
+
|
|
225
|
+
### Phase 2: Migration (Week 3-4)
|
|
226
|
+
**Parallel Tracks:**
|
|
227
|
+
- Track A: Frontend Specialist → Feature 2-5 (Auth)
|
|
228
|
+
- Track B: Frontend Specialist → Feature 2-6 (Dashboard, sequential after 2-5)
|
|
229
|
+
|
|
230
|
+
**Can Run Concurrently:** No - auth must complete first (risk mitigation)
|
|
231
|
+
|
|
232
|
+
### Phase 3: Expansion (Week 5-6)
|
|
233
|
+
**Sequential:**
|
|
234
|
+
- Feature 2-7 (Alternative Providers) - Proves flexibility
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## Risk Analysis
|
|
239
|
+
|
|
240
|
+
### Risk 1: Auth Tests Break During Migration
|
|
241
|
+
**Probability:** High
|
|
242
|
+
**Impact:** Critical (50+ tests, user-facing functionality)
|
|
243
|
+
**Mitigation:**
|
|
244
|
+
- Run auth test suite after EVERY component migration
|
|
245
|
+
- Keep rollback branch at each milestone
|
|
246
|
+
- Feature flag system to toggle implementations
|
|
247
|
+
- Incremental migration (one component at a time)
|
|
248
|
+
|
|
249
|
+
### Risk 2: Performance Regression
|
|
250
|
+
**Probability:** Medium
|
|
251
|
+
**Impact:** High (user experience degradation)
|
|
252
|
+
**Mitigation:**
|
|
253
|
+
- Benchmark current performance (baseline)
|
|
254
|
+
- Add performance tests for DataProvider
|
|
255
|
+
- Implement request caching
|
|
256
|
+
- Target: <10ms overhead per operation
|
|
257
|
+
|
|
258
|
+
### Risk 3: TypeScript Errors Proliferate
|
|
259
|
+
**Probability:** Medium
|
|
260
|
+
**Impact:** Medium (development velocity impact)
|
|
261
|
+
**Mitigation:**
|
|
262
|
+
- Strong interface types from day 1
|
|
263
|
+
- Incremental migration (component by component)
|
|
264
|
+
- ESLint rule to prevent `any` types
|
|
265
|
+
- Type-safe test utilities
|
|
266
|
+
|
|
267
|
+
### Risk 4: Context Budget Explosion
|
|
268
|
+
**Probability:** Medium
|
|
269
|
+
**Impact:** Medium (AI costs, development efficiency)
|
|
270
|
+
**Mitigation:**
|
|
271
|
+
- Keep DataProvider interface minimal
|
|
272
|
+
- Use code generation for boilerplate
|
|
273
|
+
- Target: 98% context reduction (150K → 3K tokens)
|
|
274
|
+
- Document patterns clearly
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Quality Gates
|
|
279
|
+
|
|
280
|
+
### Gate 1: Interface Complete (End of Week 1)
|
|
281
|
+
- [ ] DataProvider interface defined
|
|
282
|
+
- [ ] ConvexProvider implemented
|
|
283
|
+
- [ ] All unit tests pass
|
|
284
|
+
- [ ] TypeScript compiles with no errors
|
|
285
|
+
- [ ] Performance baseline established
|
|
286
|
+
|
|
287
|
+
### Gate 2: Services Complete (End of Week 2)
|
|
288
|
+
- [ ] All 6-dimension services implemented
|
|
289
|
+
- [ ] Configuration system working
|
|
290
|
+
- [ ] Integration tests pass
|
|
291
|
+
- [ ] Documentation updated
|
|
292
|
+
|
|
293
|
+
### Gate 3: Auth Migration Complete (End of Week 3)
|
|
294
|
+
- [ ] All 50+ auth tests pass
|
|
295
|
+
- [ ] Zero regression in functionality
|
|
296
|
+
- [ ] Performance within 10% of baseline
|
|
297
|
+
- [ ] No TypeScript errors
|
|
298
|
+
- [ ] No direct Convex imports in auth
|
|
299
|
+
|
|
300
|
+
### Gate 4: Full Migration Complete (End of Week 4)
|
|
301
|
+
- [ ] All components use DataProvider
|
|
302
|
+
- [ ] No direct Convex imports in components
|
|
303
|
+
- [ ] Full test suite passes
|
|
304
|
+
- [ ] Documentation updated
|
|
305
|
+
- [ ] Migration guide published
|
|
306
|
+
|
|
307
|
+
### Gate 5: Alternative Providers Working (End of Week 6)
|
|
308
|
+
- [ ] WordPress provider functional
|
|
309
|
+
- [ ] Notion provider functional
|
|
310
|
+
- [ ] Provider switching works
|
|
311
|
+
- [ ] Multi-tenant support validated
|
|
312
|
+
- [ ] Provider creation guide complete
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
## Success Metrics
|
|
317
|
+
|
|
318
|
+
### Technical Metrics
|
|
319
|
+
- **Context Reduction:** 98% (150K → 3K tokens)
|
|
320
|
+
- **Code Reduction:** 30% fewer LOC (via abstraction)
|
|
321
|
+
- **Type Safety:** 100% typed (no `any` except entity properties)
|
|
322
|
+
- **Test Coverage:** 90%+ unit, 80%+ integration
|
|
323
|
+
- **Performance:** <10ms DataProvider overhead
|
|
324
|
+
|
|
325
|
+
### Strategic Metrics
|
|
326
|
+
- **Backend Flexibility:** 3+ providers supported
|
|
327
|
+
- **Organization Adoption:** Organizations can choose their backend
|
|
328
|
+
- **Developer Velocity:** 50% faster to add new providers
|
|
329
|
+
- **Migration Time:** 4-6 weeks (efficient execution)
|
|
330
|
+
- **Market Expansion:** Ready for enterprise customers
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## Timeline
|
|
335
|
+
|
|
336
|
+
| Week | Phase | Features | Deliverables | Owner |
|
|
337
|
+
|------|-------|----------|--------------|-------|
|
|
338
|
+
| 1 | Foundation | 2-1, 2-2 | DataProvider interface, ConvexProvider, Config system | Backend Specialist |
|
|
339
|
+
| 2 | Foundation | 2-3, 2-4 | Effect.ts services, React hooks | Backend + Frontend Specialists |
|
|
340
|
+
| 3 | Migration | 2-5 | Auth components migrated, 50+ tests pass | Frontend Specialist |
|
|
341
|
+
| 4 | Migration | 2-6 | Dashboard components migrated | Frontend Specialist |
|
|
342
|
+
| 5-6 | Expansion | 2-7 | WordPress + Notion providers | Integration Specialist |
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## Rollback Strategy
|
|
347
|
+
|
|
348
|
+
### Rollback Points
|
|
349
|
+
1. **After Feature 2-1:** Revert to direct Convex hooks (easy)
|
|
350
|
+
2. **After Feature 2-5:** Keep auth on DataProvider, rollback dashboard (medium)
|
|
351
|
+
3. **After Feature 2-6:** Full rollback not possible (breaking change)
|
|
352
|
+
|
|
353
|
+
### Rollback Procedure
|
|
354
|
+
```bash
|
|
355
|
+
# 1. Revert to previous commit
|
|
356
|
+
git revert <feature_commit_range>
|
|
357
|
+
|
|
358
|
+
# 2. Re-enable ConvexClientProvider
|
|
359
|
+
# Edit: frontend/src/app.tsx
|
|
360
|
+
|
|
361
|
+
# 3. Restore direct Convex hook imports
|
|
362
|
+
# Edit: Affected component files
|
|
363
|
+
|
|
364
|
+
# 4. Run full test suite
|
|
365
|
+
cd frontend/
|
|
366
|
+
bun test
|
|
367
|
+
bunx astro check
|
|
368
|
+
|
|
369
|
+
# 5. Verify auth still works
|
|
370
|
+
bun test test/auth
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
**Rollback Time:** <5 minutes at each gate
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## Dependencies
|
|
378
|
+
|
|
379
|
+
### External Dependencies
|
|
380
|
+
- ✅ Effect.ts library (already installed)
|
|
381
|
+
- ✅ Convex SDK (already installed)
|
|
382
|
+
- ✅ Better Auth (already configured)
|
|
383
|
+
- ✅ Astro 5 + React 19 (already configured)
|
|
384
|
+
|
|
385
|
+
### Team Dependencies
|
|
386
|
+
- Backend Specialist available (Features 2-1, 2-2, 2-3)
|
|
387
|
+
- Frontend Specialist available (Features 2-4, 2-5, 2-6)
|
|
388
|
+
- Integration Specialist available (Feature 2-7)
|
|
389
|
+
- Quality Agent validates after each feature
|
|
390
|
+
- Documenter writes docs after completion
|
|
391
|
+
|
|
392
|
+
### Infrastructure Dependencies
|
|
393
|
+
- Test Convex deployment (for testing)
|
|
394
|
+
- CI/CD pipeline configured
|
|
395
|
+
- Feature flag system (for rollback)
|
|
396
|
+
- Performance monitoring setup
|
|
397
|
+
|
|
398
|
+
---
|
|
399
|
+
|
|
400
|
+
## Communication Plan
|
|
401
|
+
|
|
402
|
+
### Daily Standups
|
|
403
|
+
- What: Quick sync on progress and blockers
|
|
404
|
+
- When: 9:00 AM daily
|
|
405
|
+
- Who: All 3 specialists + Director
|
|
406
|
+
- Duration: 15 minutes
|
|
407
|
+
|
|
408
|
+
### Weekly Status Updates
|
|
409
|
+
- Monday: Sprint planning with all specialists
|
|
410
|
+
- Wednesday: Mid-week sync on blockers
|
|
411
|
+
- Friday: Demo + retrospective
|
|
412
|
+
|
|
413
|
+
### Stakeholder Updates
|
|
414
|
+
- Weekly email update to platform owner
|
|
415
|
+
- Bi-weekly demo to org_owners
|
|
416
|
+
- Monthly metrics report
|
|
417
|
+
|
|
418
|
+
### Documentation Updates
|
|
419
|
+
- Feature docs updated after each feature completion
|
|
420
|
+
- Migration guide updated after each phase
|
|
421
|
+
- Knowledge base updated with lessons learned
|
|
422
|
+
- API reference auto-generated from types
|
|
423
|
+
|
|
424
|
+
---
|
|
425
|
+
|
|
426
|
+
## Event Coordination
|
|
427
|
+
|
|
428
|
+
### Events Emitted by Director
|
|
429
|
+
|
|
430
|
+
**Plan Started:**
|
|
431
|
+
```typescript
|
|
432
|
+
{
|
|
433
|
+
type: "plan_started",
|
|
434
|
+
actorId: directorId,
|
|
435
|
+
targetId: "2-backend-agnostic-frontend",
|
|
436
|
+
metadata: {
|
|
437
|
+
featureCount: 7,
|
|
438
|
+
estimatedDuration: 3628800000, // 6 weeks in ms
|
|
439
|
+
priority: "high",
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
**Feature Assigned:**
|
|
445
|
+
```typescript
|
|
446
|
+
{
|
|
447
|
+
type: "feature_assigned",
|
|
448
|
+
actorId: directorId,
|
|
449
|
+
targetId: "2-1-dataprovider-interface",
|
|
450
|
+
metadata: {
|
|
451
|
+
assignedTo: backendSpecialistId,
|
|
452
|
+
planId: "2-backend-agnostic-frontend",
|
|
453
|
+
priority: "high",
|
|
454
|
+
dependencies: [],
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
**Plan Complete:**
|
|
460
|
+
```typescript
|
|
461
|
+
{
|
|
462
|
+
type: "plan_complete",
|
|
463
|
+
actorId: directorId,
|
|
464
|
+
targetId: "2-backend-agnostic-frontend",
|
|
465
|
+
metadata: {
|
|
466
|
+
totalFeatures: 7,
|
|
467
|
+
completedFeatures: 7,
|
|
468
|
+
totalDuration: 3542400000, // Actual duration
|
|
469
|
+
qualityScore: 94,
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
### Events Monitored by Director
|
|
475
|
+
|
|
476
|
+
- `feature_started` - Track progress
|
|
477
|
+
- `implementation_complete` - Trigger quality check
|
|
478
|
+
- `quality_check_complete` (approved) - Mark feature done
|
|
479
|
+
- `quality_check_complete` (rejected) - Delegate to problem solver
|
|
480
|
+
- `documentation_complete` - Final completion check
|
|
481
|
+
|
|
482
|
+
---
|
|
483
|
+
|
|
484
|
+
## Next Actions
|
|
485
|
+
|
|
486
|
+
### Immediate (Today)
|
|
487
|
+
1. ✅ Plan created and validated
|
|
488
|
+
2. Create 7 feature specification documents
|
|
489
|
+
3. Assign features to specialists
|
|
490
|
+
4. Set up feature branch: `feature/2-backend-agnostic-frontend`
|
|
491
|
+
5. Emit `plan_started` event
|
|
492
|
+
|
|
493
|
+
### Week 1
|
|
494
|
+
1. Backend Specialist begins Feature 2-1
|
|
495
|
+
2. Set up performance benchmarking infrastructure
|
|
496
|
+
3. Create rollback branch strategy
|
|
497
|
+
4. Document migration patterns
|
|
498
|
+
|
|
499
|
+
### Week 2-4
|
|
500
|
+
1. Implement DataProvider + ConvexProvider
|
|
501
|
+
2. Migrate auth components (critical path)
|
|
502
|
+
3. Run auth tests continuously
|
|
503
|
+
4. Document lessons learned
|
|
504
|
+
|
|
505
|
+
### Week 5-6
|
|
506
|
+
1. Complete dashboard migration
|
|
507
|
+
2. Implement alternative providers
|
|
508
|
+
3. Update all documentation
|
|
509
|
+
4. Prepare launch communication
|
|
510
|
+
|
|
511
|
+
---
|
|
512
|
+
|
|
513
|
+
## Related Documents
|
|
514
|
+
|
|
515
|
+
- **Idea:** `one/things/ideas/2-backend-agnostic-frontend.md`
|
|
516
|
+
- **Features:** `one/things/features/2-{1-7}-*.md` (7 feature specs)
|
|
517
|
+
- **Implementation:** `frontend/src/providers/` (code location)
|
|
518
|
+
- **Tests:** `frontend/tests/integration/dataProvider.test.ts`
|
|
519
|
+
- **Migration Guide:** `frontend/MIGRATION.md`
|
|
520
|
+
- **CASCADE Tracker:** `CASCADE-2-BACKEND-AGNOSTIC.md`
|
|
521
|
+
|
|
522
|
+
---
|
|
523
|
+
|
|
524
|
+
## Lessons Learned (To Be Updated)
|
|
525
|
+
|
|
526
|
+
This section will be populated with lessons learned during implementation:
|
|
527
|
+
|
|
528
|
+
- Patterns that worked well
|
|
529
|
+
- Patterns that didn't work
|
|
530
|
+
- Performance insights
|
|
531
|
+
- TypeScript tips and tricks
|
|
532
|
+
- Migration gotchas
|
|
533
|
+
- Best practices for future providers
|
|
534
|
+
|
|
535
|
+
---
|
|
536
|
+
|
|
537
|
+
**Plan Status:** ✅ Validated and Ready for Implementation
|
|
538
|
+
**Created:** 2025-10-13
|
|
539
|
+
**Validated By:** Engineering Director Agent
|
|
540
|
+
**Ontology Check:** ✅ PASS (all 6 dimensions mapped)
|
|
541
|
+
**Risk Level:** Medium (mitigated)
|
|
542
|
+
**Strategic Value:** High
|
|
543
|
+
**Team:** Backend + Frontend + Integration Specialists
|