mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-02 13:39:41 +02:00
- Remove unused validateTokenCounts/validateTokensAndCost exports and PlanPhase type alias - Add execPattern() helper to eliminate 8 repetitive .lastIndex=0 + exec() loops - Centralize 11 magic number constants into config/ai-defaults.ts and config/server-timing.ts - Remove stale src/tui from tsconfig.json exclude - Fix CLAUDE.md inaccuracies (session helpers, app.js line count, module count) - Add 316 new tests: LRUMap (38), StaleExpirationMap (42), BufferAccumulator (33), respawn helpers (142), system-routes expansion (11→61) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
46 lines
1.5 KiB
TypeScript
46 lines
1.5 KiB
TypeScript
/**
|
|
* @fileoverview Plan orchestrator type definitions.
|
|
*
|
|
* Types for the 2-agent plan generation system (optional research agent → planner agent).
|
|
*
|
|
* Key exports:
|
|
* - PlanItem — a single task with priority (P0/P1/P2), TDD phase, dependencies, verification criteria
|
|
* - PlanTaskStatus — 'pending' | 'in_progress' | 'completed' | 'failed' | 'blocked'
|
|
* - TddPhase — 'setup' | 'test' | 'impl' | 'verify' | 'review'
|
|
*
|
|
* Used by PlanOrchestrator (`src/plan-orchestrator.ts`) and the plan API routes
|
|
* (`src/web/routes/plan-routes.ts`). Served at `GET /api/sessions/:id/plan/tasks`.
|
|
*
|
|
* PlanItem was moved here from plan-orchestrator.ts to break a circular dependency.
|
|
* No dependencies on other domain modules.
|
|
*/
|
|
|
|
/** Task execution status for plan tracking */
|
|
export type PlanTaskStatus = 'pending' | 'in_progress' | 'completed' | 'failed' | 'blocked';
|
|
|
|
/** TDD phase categories */
|
|
export type TddPhase = 'setup' | 'test' | 'impl' | 'verify' | 'review';
|
|
|
|
/**
|
|
* A single plan item for plan orchestration.
|
|
* Moved here from plan-orchestrator.ts to break circular dependency.
|
|
*/
|
|
export interface PlanItem {
|
|
id?: string;
|
|
content: string;
|
|
priority: 'P0' | 'P1' | 'P2' | null;
|
|
source?: string;
|
|
rationale?: string;
|
|
verificationCriteria?: string;
|
|
testCommand?: string;
|
|
dependencies?: string[];
|
|
status?: PlanTaskStatus;
|
|
attempts?: number;
|
|
lastError?: string;
|
|
completedAt?: number;
|
|
complexity?: 'low' | 'medium' | 'high';
|
|
tddPhase?: TddPhase;
|
|
pairedWith?: string;
|
|
reviewChecklist?: string[];
|
|
}
|