/** * Pure, idempotent setup computation. * * `computeSetup(existing, answers)` merges an existing config with user * answers. The function is idempotent: applying the same answers twice * yields the same result without duplicating array entries. * * Requirements: 21.10 */ import type { TeamDefaults } from '../autopilot/team.js'; import type { CycleScope } from '../core/types.js'; import type { Host } from '../core/host.js'; /** Answers collected from the setup wizard (interactive or CLI flags). */ export interface SetupAnswers { /** e.g., "web-app", "library", "cli", "api" */ projectType?: string; /** e.g., "simple", "moderate", "complex" */ complexity?: string; /** Platforms to support (e.g., ["claude-code", "kiro"]) */ platforms?: string[]; /** Built-in actions to enable (e.g., ["git-branch", "doc-update"]) */ actions?: string[]; /** Default workflow template name */ template?: string; /** Default lifecycle scope */ scope?: CycleScope; /** * Compliance pack the wizard selected, or `null` for none. * * `undefined` and `null` mean different things here, which is the whole reason the * field is three-valued. `undefined` is "the wizard did not ask" — a non-prompting * path — and must leave any existing selection alone. `null` is "the user answered * none", which must remove the selection. Collapsing them would make a skipped * question silently clear a project's pack. */ compliancePack?: string | null; /** * Statuses the wizard chose for `roadmap.sync`, or `null` for "do not project". * * Three-valued for the same reason `compliancePack` is, and the three values are not * interchangeable. `undefined` is "the wizard did not ask" — `--non-interactive`, * `--platform`, `--dry-run`, no TTY — and must leave an existing section exactly as it * was. `null` is "the user was asked and said no", which removes the section. A list * writes it. * * Typed `string[]`, not `RoadmapStatus[]`: this module is the pure merge layer and takes * no dependency on the roadmap module. The wizard validates against the config reader's * own `validateStatuses` before the answer gets here. */ roadmapSyncStatuses?: string[] | null; /** * How implementation tasks run in this repo, or `undefined` when the question was not * put — no platform with sub-agents, `--non-interactive`, `--platform` — which keeps * whatever the file says (init-sets-work-mode/AC-4, AC-13). */ taskAgents?: TaskAgents; /** * The team half of the autopilot answers. Only the keys present are written, so a * question answered "(current)" leaves its key as it was (init-sets-work-mode/AC-16). */ autopilotTeam?: TeamDefaults; /** * Where the repository is hosted, or `undefined` to leave the file's `host` as it is — * a saved value, or none, which reads as `github` (gitlab-and-plain-git/AC-9, AC-12). */ host?: Host; } /** * `task_agents` in `.aidlc/config.yaml`; absent means one session. The task-agents * rule names these same two values, and a test holds them together. */ export declare const TASK_AGENTS_VALUES: readonly ["one-session", "per-task"]; export type TaskAgents = (typeof TASK_AGENTS_VALUES)[number]; /** Configuration produced/consumed by the setup wizard. */ export interface SetupConfig { version: number; defaults: { scope: CycleScope; template: string; }; platforms: string[]; actions: string[]; stalled_threshold_days: number; claim_timeout_minutes: number; /** * Sections computeSetup does not own (cost, orchestrator, secret_patterns, * anything future) carry through rebuilds untouched — re-running init must * never drop a hand-added config section. */ [key: string]: unknown; } export declare function computeSetup(existing: SetupConfig | null, answers: SetupAnswers): SetupConfig; //# sourceMappingURL=setup-compute.d.ts.map