Type System Gap
Limitation: Types Can Drift from Implementation
The Issue
The types package (@thearchitech.xyz/types) is separate from the CLI implementation.
Risk
// CLI adds new action type
case 'NEW_ACTION':
return newActionHandler.handle(action);
// But types package not updated
export type BlueprintAction =
| CreateFileAction
| EnhanceFileAction;
// Missing: NewAction
// Result: TypeScript doesn't know about NEW_ACTIONCurrent Mitigation
Manual synchronization:
- Update CLI implementation
- Update types package
- Update marketplace types
Problem: Easy to forget a step, causing drift.
Proposed Solution
Auto-Generate Types from CLI
// CLI is single source of truth
// Types generated automatically:
npm run generate:types
// Scans CLI action handlers
// Generates TypeScript types
// Updates types packageBenefits:
- ✅ No drift possible
- ✅ Types always accurate
- ✅ Single source of truth
Timeline: Q4 2024