/** * Agent Teams Configuration Types * * Defines interfaces for the Agent Teams integration sections * of the .specforge.json configuration file. These extend the * existing ProjectConfig without breaking backward compatibility. * * @see docs/agent-teams/blueprints/04-config-schema.md */ import type { ProjectConfig } from './types.js'; /** * Execution strategy for Agent Teams. * * - `auto` – Analyzer picks based on spec structure (default) * - `single` – Sequential, one worker at a time (<=3 tickets, no epic deps) * - `parallel` – All epic teams run concurrently (independent epics) * - `phased` – Epics run in dependency-ordered phases (cross-epic deps) */ export type AgentTeamsStrategy = 'auto' | 'single' | 'parallel' | 'phased'; /** * Behavior when a worker encounters a blocker. * * - `pause` – Stop the worker and wait for manual intervention * - `skip` – Skip the blocked ticket and move to the next one * - `ask` – Prompt the user for a decision (default) */ export type EscalationPolicy = 'pause' | 'skip' | 'ask'; /** * Supported monorepo tools for workspace detection. */ export type MonorepoTool = 'turborepo' | 'nx' | 'lerna' | 'pnpm' | 'npm'; /** * Currently active specification for Agent Teams implementation. * * Set automatically by `sf spec activate`. Tells Agent Teams * which specification to work on. */ export interface ActiveSpecification { /** SpecForge specification UUID */ id: string; /** Human-readable spec title (for display) */ title: string; /** * ISO 8601 timestamp of activation. * Set automatically by `sf spec activate`. */ activatedAt: string; } /** * A discovered workspace package within a monorepo. */ export interface WorkspaceEntry { /** Package name from package.json */ name: string; /** Relative path from root (e.g., "packages/api") */ path: string; /** Internal workspace dependency names */ dependencies: string[]; } /** * Monorepo detection results and workspace layout. * * Populated automatically by the monorepo detector. * Used by Agent Teams to scope workers to specific workspaces. */ export interface MonorepoConfig { /** Whether a monorepo was auto-detected */ detected: boolean; /** * Detected monorepo tool. * @default null */ tool: MonorepoTool | null; /** * Discovered workspace packages. * @default [] */ workspaces: WorkspaceEntry[]; /** * Absolute path to monorepo root. * @default "." */ rootDir: string; } /** * Validation commands that can override spec-level validation. */ export interface ValidationCommands { /** Test command (e.g., "cd mcp && npm test") */ test?: string; /** Lint command (e.g., "cd mcp && npm run lint") */ lint?: string; /** Type check command (e.g., "cd mcp && npx tsc --noEmit") */ typeCheck?: string; /** Build command (e.g., "cd mcp && npm run build") */ build?: string; } /** * Agent Teams execution settings. * * Controls how Agent Teams orchestrate spec implementation. * All fields are optional — sensible defaults are applied. */ export interface AgentTeamsConfig { /** * Master toggle for Agent Teams. * @default false */ enabled?: boolean; /** * Execution strategy selection. * @default "auto" */ strategy?: AgentTeamsStrategy; /** * Maximum number of concurrent worker teams (1-10). * @default 3 */ maxParallelTeams?: number; /** * Token budget per worker (10000-200000). * @default 50000 */ maxTokensPerWorker?: number; /** * Git branch naming prefix. * @default "ticket/" */ branchPrefix?: string; /** * Branch name template. Must contain `{prefix}` placeholder. * @default "{prefix}E{epic}-T{ticket}-{slug}" */ branchPattern?: string; /** * Whether to auto-run validation after each ticket. * @default true */ autoValidate?: boolean; /** * Override spec-level validation commands. * When omitted, inherits from the specification's validationCommands. */ validationCommands?: ValidationCommands; /** * Per-worker timeout in minutes (5-60). * @default 15 */ timeoutMinutes?: number; /** * Behavior when a worker encounters a blocker. * @default "ask" */ escalationPolicy?: EscalationPolicy; } /** * Extended .specforge.json configuration with Agent Teams support. * * Extends the existing {@link ProjectConfig} with optional sections * for Agent Teams integration. All new fields are optional to maintain * full backward compatibility with existing config files. */ export interface SpecforgeJsonConfig extends ProjectConfig { /** Currently active specification for implementation */ activeSpecification?: ActiveSpecification; /** Monorepo detection results and workspace layout */ monorepo?: MonorepoConfig; /** Agent Teams execution settings */ agentTeams?: AgentTeamsConfig; } /** * Default values for AgentTeamsConfig fields. */ export declare const AGENT_TEAMS_DEFAULTS: { readonly enabled: false; readonly strategy: AgentTeamsStrategy; readonly maxParallelTeams: 3; readonly maxTokensPerWorker: 50000; readonly branchPrefix: "ticket/"; readonly branchPattern: "{prefix}E{epic}-T{ticket}-{slug}"; readonly autoValidate: true; readonly timeoutMinutes: 15; readonly escalationPolicy: EscalationPolicy; }; /** * Default values for MonorepoConfig fields. */ export declare const MONOREPO_DEFAULTS: { readonly detected: false; readonly tool: null; readonly workspaces: WorkspaceEntry[]; readonly rootDir: "."; }; //# sourceMappingURL=agent-teams.types.d.ts.map