/**
 * 集中路径常量 — 统一管理所有 .soloforge/ 相关路径。
 *
 * 消除 50+ 个文件中分散的硬编码路径字符串。
 * 使用方式: import { getProjectPaths, SOLOFORGE_DIR } from "../core/paths.js"
 */
import path from "node:path";
/** .soloforge 目录名 */
export const SOLOFORGE_DIR = ".soloforge";
/** 项目级路径集合 — 基于 projectPath 动态生成 */
export function getProjectPaths(projectPath) {
    const root = path.join(projectPath, SOLOFORGE_DIR);
    return {
        /** .soloforge/ 根目录 */
        root,
        // ── 配置文件 ──
        /** .soloforge/config.yaml */
        configYaml: path.join(root, "config.yaml"),
        /** .soloforge/config.evidence.json */
        configEvidence: path.join(root, "config.evidence.json"),
        /** .soloforge/policy.yaml */
        policyYaml: path.join(root, "policy.yaml"),
        /** .soloforge/blueprint.yaml */
        blueprintYaml: path.join(root, "blueprint.yaml"),
        // ── 状态目录 ──
        /** .soloforge/state/ */
        stateDir: path.join(root, "state"),
        /** .soloforge/state/current-task.json */
        currentTaskPointer: path.join(root, "state", "current-task.json"),
        /** .soloforge/state/debt/ */
        debtDir: path.join(root, "state", "debt"),
        /** .soloforge/state/onboarding-session.json */
        onboardingSession: path.join(root, "state", "onboarding-session.json"),
        // ── 知识库 ──
        /** .soloforge/knowledge/ */
        knowledgeDir: path.join(root, "knowledge"),
        /** .soloforge/knowledge/patterns/ */
        knowledgePatterns: path.join(root, "knowledge", "patterns"),
        /** .soloforge/knowledge/patterns/core/ */
        knowledgePatternsCore: path.join(root, "knowledge", "patterns", "core"),
        /** .soloforge/knowledge/patterns/temp/ */
        knowledgePatternsTemp: path.join(root, "knowledge", "patterns", "temp"),
        /** .soloforge/knowledge/procedures/ */
        knowledgeProcedures: path.join(root, "knowledge", "procedures"),
        /** .soloforge/knowledge/domain/backend/ */
        knowledgeDomainBackend: path.join(root, "knowledge", "domain", "backend"),
        /** .soloforge/knowledge/domain/frontend/ */
        knowledgeDomainFrontend: path.join(root, "knowledge", "domain", "frontend"),
        /** .soloforge/knowledge/acceptance_templates/ */
        knowledgeAcceptanceTemplates: path.join(root, "knowledge", "acceptance_templates"),
        /** .soloforge/knowledge/review_rules/ */
        knowledgeReviewRules: path.join(root, "knowledge", "review_rules"),
        /** .soloforge/knowledge/product_profiles/ */
        knowledgeProductProfiles: path.join(root, "knowledge", "product_profiles"),
        /** .soloforge/knowledge/checklists/ */
        knowledgeChecklists: path.join(root, "knowledge", "checklists"),
        /** .soloforge/knowledge/defaults.yaml */
        knowledgeDefaults: path.join(root, "knowledge", "defaults.yaml"),
        // ── 暂存区 ──
        /** .soloforge/staged/ */
        stagedDir: path.join(root, "staged"),
        // ── 其他文件 ──
        /** .soloforge/navigation-snapshot.json */
        navigationSnapshot: path.join(root, "navigation-snapshot.json"),
        /** .soloforge/template-manifest.json */
        templateManifest: path.join(root, "template-manifest.json"),
        /** .soloforge/adapter_hashes.json */
        adapterHashes: path.join(root, "adapter_hashes.json"),
        /** .soloforge/version.json */
        versionJson: path.join(root, "version.json"),
        /** .soloforge/manifest.json */
        manifestJson: path.join(root, "manifest.json"),
        /** .soloforge/sync-manifest.json */
        syncManifest: path.join(root, "sync-manifest.json"),
        /** .soloforge/advisory-report.json */
        advisoryReport: path.join(root, "advisory-report.json"),
        // ── 输出目录 ──
        /** .soloforge/output/ */
        outputDir: path.join(root, "output"),
        /** .soloforge/tmp/ingest/ */
        tmpIngest: path.join(root, "tmp", "ingest"),
        // ── 设计产物 ──
        /** .soloforge/design-artifacts/ */
        designArtifactsDir: path.join(root, "design-artifacts"),
        // ── 备份 ──
        /** .soloforge/config-backups/ */
        configBackups: path.join(root, "config-backups"),
        /** .soloforge/backups/ */
        backupsDir: path.join(root, "backups"),
        // ── 模板 ──
        /** .soloforge/templates/ */
        templatesDir: path.join(root, "templates"),
    };
}
/** 项目根目录下的锁文件（不在 .soloforge/ 内） */
export function getLockFilePath(projectPath) {
    return path.join(projectPath, ".soloforge.lock");
}
/** 全局用户目录下的 patterns 路径 */
export function getGlobalPatternsPath() {
    return path.join(process.env.HOME ?? "", SOLOFORGE_DIR, "patterns");
}
//# sourceMappingURL=paths.js.map