/** * Model tiering for the algorithm's leaf steps. The orchestrator is * deterministic code; every leaf step (write a test, move logic into an * aggregate, extend a repository) is executed by Claude Code — but not * every step deserves the same model. Hard design work goes to the * strongest model, routine construction to a mid-tier one, and * mechanical work to a cheap backend. * * Like RepoLayout, this is configuration carried to the roles: each role * implementation looks up its step's WorkKind in the policy, resolves * the tier to a backend via the roster, and launches Claude Code * accordingly. */ export type ModelTier = "hard" | "intermediate" | "easy"; export interface ModelBackend { /** Model id, e.g. "claude-fable-5", "claude-opus-5", "deepseek-v4-pro". */ model: string; /** * Where Claude Code sends requests for this backend: omit for the * native Anthropic API; set to a router/proxy base URL to drive * Claude Code with a non-Anthropic model such as DeepSeek. */ baseUrl?: string; } export interface ModelRoster { hard: ModelBackend; intermediate: ModelBackend; easy: ModelBackend; } /** * The kinds of leaf work the algorithm delegates to a model. Coarse on * purpose: fine enough to tier meaningfully, coarse enough that the * policy stays readable. */ export type WorkKind = "scenario-quality-review" | "slice-planning" | "acceptance-authoring" | "failure-judgment" | "contract-design" | "fake-api-implementation" | "client-test-authoring" | "client-implementation" | "backend-work-classification" | "use-case-implementation" | "query-implementation" | "event-handler-implementation" | "domain-design" | "domain-unit-tests" | "persistence-ripple" | "repo-equivalence-tests" | "controller-wiring" | "feature-removal" | "project-identity" | "bootstrap-sweep" | "coverage-review" | "distillation-review" | "smoke-weaving" | "defect-repair"; export type ModelPolicy = Record; /** * Default assignment. The principle: design judgment → hard; routine * construction and review → intermediate; mechanical, well-patterned * work → easy. */ export declare const DEFAULT_MODEL_POLICY: ModelPolicy; /** * Default roster: Fable for the hard tier (domain design, aggregate * sizing), Opus for the intermediate tier (use cases, tests, UI), and * DeepSeek for the easy tier (repositories and other mechanical work) * through DeepSeek's own Anthropic-compatible endpoint — no proxy * needed. Sessions on that backend authenticate with the DeepSeek API * key (export it as ANTHROPIC_AUTH_TOKEN) and bill DeepSeek's * pay-per-token rates, not the Claude subscription. */ export declare const DEFAULT_MODEL_ROSTER: ModelRoster; export interface ModelConfiguration { roster: ModelRoster; /** Per-work-kind tier assignment; DEFAULT_MODEL_POLICY when omitted. */ policy?: ModelPolicy; }