/** * Repository Structure Manager * * Handles various repository architectures for SpecWeave projects: * - Single repository * - Multi-repository (polyrepo/microservices) - all repos are equal, first is default * - Monorepo (single repo with multiple projects) * * v1.0.13: REMOVED parent repo concept - all repos are equal. * * Provides capabilities to: * - Create GitHub repositories via API * - Initialize git repositories locally * - Configure proper folder structure * - Organize specs per project/team * - Split tasks between repositories */ import { type ArchitectureChoice } from './prompt-consolidator.js'; import type { GitProvider, GitPlatformType } from './git-provider.js'; /** v1.0.13: 'parent' is deprecated - kept for backward compatibility */ export type RepoArchitecture = 'multi-repo' | 'monorepo' | 'parent'; export interface RepoStructureConfig { architecture: RepoArchitecture; urlType: 'ssh' | 'https'; platform: GitPlatformType; provider: GitProvider; /** @deprecated v1.0.13 - Parent repo concept removed. Kept for backward compatibility. */ parentRepo?: { name: string; owner: string; description: string; visibility: 'private' | 'public'; createOnGitHub: boolean; }; repositories: Array<{ id: string; name: string; owner: string; description: string; path: string; visibility: 'private' | 'public'; createOnGitHub: boolean; isNested: boolean; role?: string; storyPrefix?: string; }>; /** Parent repo ID for centralized issue tracking (set during role/prefix collection) */ parentRepoId?: string; monorepoProjects?: string[]; } export declare class RepoStructureManager { private projectPath; private githubToken?; private stateManager; constructor(projectPath: string, githubToken?: string); /** * Prompt user for repository structure decisions * * @param preSelectedArchitecture - Optional pre-selected architecture to skip duplicate prompts * @param preSelectedPlatform - Optional pre-selected platform to skip duplicate prompts (v1.0.7) * @param preSelectedUrlType - Optional pre-selected URL type to skip duplicate prompts (v1.0.7) */ promptStructure(preSelectedArchitecture?: ArchitectureChoice, preSelectedPlatform?: GitPlatformType, preSelectedUrlType?: 'ssh' | 'https'): Promise; /** * Map ArchitectureChoice to internal RepoArchitecture * v0581: Always multi-repo (single removed) */ private mapArchitectureChoice; /** * Format architecture choice for display * * @param choice - Architecture choice * @returns Human-readable format */ private formatArchitectureForDisplay; /** * Resume setup from saved state */ private resumeSetup; /** * Configure single repository */ private configureSingleRepo; /** * Configure monorepo */ private configureMonorepo; /** * Create repositories on Git hosting platform via API */ createRepositories(config: RepoStructureConfig): Promise; /** * Generate .env file with GitHub token (only when gh CLI not available) */ private generateEnvFile; /** * Show setup completion summary */ private showSetupSummary; /** * Create a single GitHub repository via API */ private createGitHubRepo; /** * Check if a GitHub account is an organization */ private isGitHubOrganization; /** * Initialize local git repositories * Delegates to extracted repo-initializer module */ initializeLocalRepos(config: RepoStructureConfig): Promise; /** * Create SpecWeave project structure * Delegates to extracted repo-initializer module */ createSpecWeaveStructure(config: RepoStructureConfig): Promise; } //# sourceMappingURL=repo-structure-manager.d.ts.map