/** * Squad Initialization Module (M2-6, PRD #98) * * Creates new Squad projects with typed configuration. * Generates squad.config.ts or squad.config.json with agent definitions. * Scaffolds directory structure, templates, workflows, and agent files. * * @module config/init */ import type { StorageProvider } from '../storage/index.js'; import type { SubSquadDefinition } from '../streams/types.js'; /** * The curated built-in skills shipped on init. * Only these skills are installed — not the full templates/skills/ directory. * * Drift policy: every entry MUST have a corresponding directory under * packages/squad-sdk/templates/skills/. The install loop (below) throws on * missing source dirs instead of silently skipping — see bradygaster/squad#1289 * for the prior silent-skip bug that shipped two missing skills in v0.10.0. */ export declare const MANIFEST_SKILL_NAMES: readonly ["squad-conventions", "error-recovery", "secret-handling", "git-workflow", "session-recovery", "reviewer-protocol", "test-discipline", "agent-collaboration", "squad", "squad-version-check", "squad-help", "cross-squad-communication", "tiered-memory", "iterative-retrieval", "reflect", "cross-squad", "coordinator-source-of-truth", "coordinator-response-mode", "coordinator-init-mode"]; /** * Get the SDK templates directory path. */ export declare function getSDKTemplatesDir(storage?: StorageProvider): string | null; /** * Agent specification for initialization. */ export interface InitAgentSpec { /** Agent name (kebab-case) */ name: string; /** Agent role identifier */ role: string; /** Display name (optional, defaults to titlecased name) */ displayName?: string; } /** * Initialization options. */ export interface InitOptions { /** Root directory for Squad team files */ teamRoot: string; /** Project name */ projectName: string; /** Project description (optional) */ projectDescription?: string; /** Agents to create */ agents: InitAgentSpec[]; /** Config format (typescript or json for old format, sdk for new builder syntax, markdown for no config file) */ configFormat?: 'typescript' | 'json' | 'sdk' | 'markdown'; /** User name for initial history entries */ userName?: string; /** Skip files that already exist (default: true) */ skipExisting?: boolean; /** Include GitHub workflows (default: true) */ includeWorkflows?: boolean; /** Include .squad/templates/ copy (default: true) */ includeTemplates?: boolean; /** Include sample MCP config (default: true) */ includeMcpConfig?: boolean; /** Where to write sample MCP config (default: copilot-file when includeMcpConfig is true) */ mcpConfigMode?: McpConfigMode; /** Project type for workflow customization */ projectType?: 'node' | 'python' | 'go' | 'rust' | 'java' | 'csharp' | 'unknown'; /** Version to stamp in squad.agent.md */ version?: string; /** Project description prompt — stored for REPL auto-casting. */ prompt?: string; /** If true, disable extraction from consult sessions (read-only consultations) */ extractionDisabled?: boolean; /** Optional SubSquad definitions — generates .squad/workstreams.json when provided */ streams?: SubSquadDefinition[]; /** If true, use built-in base roles with useRole() in SDK config (default: false) */ roles?: boolean; /** Root directory for the .github/agents/squad.agent.md file. * Defaults to teamRoot. In monorepos, this should be the git root * so Copilot can discover the agent file, while teamRoot stays in * the subfolder where .squad/ lives. */ agentFileRoot?: string; /** ADO work item configuration — used when platform is azure-devops */ adoConfig?: { defaultWorkItemType?: string; areaPath?: string; iterationPath?: string; }; /** * State backend to use for this project. * When 'orphan' or 'two-layer', adds a marker-delimited block to .gitignore * so .squad/decisions.md and .squad/agents/*\/history.md are not accidentally * staged into the working-tree commit graph. * When 'local' (or undefined), removes the marker block if present. */ stateBackend?: 'local' | 'orphan' | 'two-layer' | 'external-stub' | string; } /** * Initialization result. */ export interface InitResult { /** List of created file paths (relative to teamRoot) */ createdFiles: string[]; /** List of skipped file paths (already existed) */ skippedFiles: string[]; /** Warnings for degraded operations (e.g. missing templates) */ warnings?: string[]; /** Configuration file path */ configPath: string; /** Agent directory paths */ agentDirs: string[]; /** Path to squad.agent.md */ agentFile: string; /** Path to .squad/ directory */ squadDir: string; } type McpConfigMode = 'copilot-file' | 'agent-frontmatter' | 'none'; export declare function initSquad(options: InitOptions, storage?: StorageProvider): Promise; /** * Clean up orphan .init-prompt file. * Called by CLI on Ctrl+C abort to remove partial state. * * @param squadDir - Path to the .squad directory */ export declare function cleanupOrphanInitPrompt(squadDir: string, storage?: StorageProvider): Promise; export {}; //# sourceMappingURL=init.d.ts.map