CLI Internals
Limitations & Future
Type System Gap

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_ACTION

Current Mitigation

Manual synchronization:

  1. Update CLI implementation
  2. Update types package
  3. 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 package

Benefits:

  • ✅ No drift possible
  • ✅ Types always accurate
  • ✅ Single source of truth

Timeline: Q4 2024


See All Limitations →