/**
 * 可消费资产注册表 — 类型定义与辅助工厂函数。
 */
// ── 辅助工厂函数 ──
/** 创建验收模板资产引用的辅助函数 */
export function acc(name, mode = "copy_only", overrides) {
    return {
        id: `acc-${name}`,
        path: `templates/artifacts/shared/${name}.md`,
        asset_kind: "acceptance_template",
        owner: "cli_init",
        consumers: ["copyKnowledgeTemplates"],
        trigger: "init:copy",
        consumption_mode: mode,
        required_tests: [],
        owner_mechanism_id: "mc-verifier",
        ...overrides,
    };
}
/** 创建流水线流程资产引用的辅助函数 */
export function proc(name, mechanismId) {
    return {
        id: `proc-${name}`,
        path: `templates/procedures/${name}.md`,
        asset_kind: "procedure",
        owner: "knowledge_engine",
        consumers: ["knowledgeIndex.query"],
        trigger: "knowledge:match",
        consumption_mode: "supporting",
        required_tests: ["tests/engine/intent_expander_integration.test.ts"],
        ...(mechanismId ? { owner_mechanism_id: mechanismId } : {}),
    };
}
/** 创建能力知识文档资产引用的辅助函数 */
export function corePattern(name, mechanismId) {
    return {
        id: `cap-kdoc-${name}`,
        path: `templates/internal/patterns/${name}.md`,
        asset_kind: "capability_knowledge_doc",
        owner: "capability_registry",
        consumers: ["knowledgeIndex.query", "capability_registry"],
        trigger: "capability:enrich",
        consumption_mode: "advisory",
        required_tests: ["tests/engine/capability_registry.test.ts"],
        ...(mechanismId ? { owner_mechanism_id: mechanismId } : { owner_mechanism_id: "mc-knowledge-injection-boundary" }),
    };
}
/** 创建领域规则资产引用的辅助函数 */
export function domainRule(name, mechanismId) {
    return {
        id: `domain-${name}`,
        path: `templates/domain/${name}.md`,
        asset_kind: "domain_rule",
        owner: "knowledge_engine",
        consumers: ["knowledgeIndex.query"],
        trigger: "knowledge:match",
        consumption_mode: "supporting",
        required_tests: ["tests/engine/intent_expander_integration.test.ts"],
        ...(mechanismId ? { owner_mechanism_id: mechanismId } : { owner_mechanism_id: "mc-knowledge-injection-boundary" }),
    };
}
/** 创建审查规则资产引用的辅助函数 */
export function reviewRule(name, mechanismId) {
    return {
        id: `review-${name}`,
        path: `templates/rules/shared/${name}.md`,
        asset_kind: "review_rule",
        owner: "code_reviewer",
        consumers: ["reviewCode"],
        trigger: "review:enrich",
        consumption_mode: "supporting",
        required_tests: ["tests/engine/code_reviewer.test.ts"],
        ...(mechanismId ? { owner_mechanism_id: mechanismId } : {}),
    };
}
/** 创建骨架模板资产引用的辅助函数 */
export function scaffold(framework, file) {
    return {
        id: `scaffold-${framework}-${file}`,
        path: `templates/scaffolds/${framework}/${file}.hbs`,
        asset_kind: "scaffold_template",
        owner: "sf_scaffold",
        consumers: ["generateScaffold"],
        trigger: "scaffold:generate",
        consumption_mode: "required",
        required_tests: ["tests/engine/scaffolder.test.ts"],
        owner_mechanism_id: "mc-workflow-contract",
    };
}
/** 创建全局模式资产引用的辅助函数 */
export function globalPattern(name) {
    return {
        id: `gpat-${name}`,
        path: `templates/patterns/${name}.md`,
        asset_kind: "global_pattern",
        owner: "cli_init",
        consumers: ["copyGlobalPatterns"],
        trigger: "init:copy_global_patterns",
        consumption_mode: "copy_only",
        required_tests: ["tests/bin/soloforge_init.test.ts"],
        owner_mechanism_id: "mc-knowledge-injection-boundary",
    };
}
/** 创建检查清单资产引用的辅助函数 */
export function checklist(name, mechanismId) {
    return {
        id: `checklist-${name}`,
        path: `templates/checklists/${name}.md`,
        asset_kind: "checklist",
        owner: "knowledge_engine",
        consumers: ["knowledgeIndex.query"],
        trigger: "knowledge:match",
        consumption_mode: "supporting",
        required_tests: ["tests/engine/intent_expander_integration.test.ts"],
        ...(mechanismId ? { owner_mechanism_id: mechanismId } : { owner_mechanism_id: "mc-verifier" }),
    };
}
/** 创建流程规则资产引用的辅助函数 */
export function flowRule(name, mechanismId) {
    return {
        id: `rule-${name}`,
        path: `templates/internal/rules/${name}.md`,
        asset_kind: "domain_rule",
        owner: "knowledge_engine",
        consumers: ["knowledgeIndex.query"],
        trigger: "knowledge:match",
        consumption_mode: "supporting",
        required_tests: ["tests/engine/intent_expander_integration.test.ts"],
        ...(mechanismId ? { owner_mechanism_id: mechanismId } : { owner_mechanism_id: "mc-workflow-contract" }),
    };
}
// ── 管线模板工厂函数（阶段5） ──
/** 创建共享管线产物模板资产引用 */
export function sharedArtifact(name) {
    const ext = name.endsWith(".json") ? "" : ".md";
    return {
        id: `pipe-shared-art-${name}`,
        path: `templates/artifacts/shared/${name}${ext}`,
        asset_kind: "pipeline_artifact",
        owner: "pipeline_init",
        consumers: ["copyPipelineTemplates"],
        trigger: "init:pipeline",
        consumption_mode: "copy_only",
        required_tests: [],
        owner_mechanism_id: "mc-workflow-contract",
    };
}
/** 创建共享管线规则资产引用 */
export function sharedRule(name) {
    return {
        id: `pipe-shared-rule-${name}`,
        path: `templates/rules/shared/${name}.md`,
        asset_kind: "pipeline_rule",
        owner: "pipeline_init",
        consumers: ["copyPipelineTemplates"],
        trigger: "init:pipeline",
        consumption_mode: "copy_only",
        required_tests: [],
        owner_mechanism_id: "mc-workflow-contract",
    };
}
/** 创建共享门禁 YAML 资产引用 */
export function sharedGate(name) {
    return {
        id: `pipe-shared-gate-${name}`,
        path: `templates/gates/shared/${name}.yaml`,
        asset_kind: "stage_gate",
        owner: "pipeline_init",
        consumers: ["copyPipelineTemplates"],
        trigger: "init:pipeline",
        consumption_mode: "copy_only",
        required_tests: [],
        owner_mechanism_id: "mc-stage-gate-engine",
    };
}
/** 创建新系统管线产物模板资产引用 */
export function newSystemArtifact(name) {
    return {
        id: `pipe-new-art-${name}`,
        path: `templates/artifacts/new-system/${name}.md`,
        asset_kind: "pipeline_artifact",
        owner: "pipeline_init",
        consumers: ["copyPipelineTemplates"],
        trigger: "init:pipeline:新系统",
        consumption_mode: "copy_only",
        required_tests: [],
        owner_mechanism_id: "mc-workflow-contract",
    };
}
/** 创建新系统管线规则资产引用 */
export function newSystemRule(name) {
    return {
        id: `pipe-new-rule-${name}`,
        path: `templates/rules/new-system/${name}.md`,
        asset_kind: "pipeline_rule",
        owner: "pipeline_init",
        consumers: ["copyPipelineTemplates"],
        trigger: "init:pipeline:新系统",
        consumption_mode: "copy_only",
        required_tests: [],
        owner_mechanism_id: "mc-workflow-contract",
    };
}
/** 创建老系统管线产物模板资产引用 */
export function existingArtifact(name, ext = ".md") {
    return {
        id: `pipe-existing-art-${name}`,
        path: `templates/artifacts/existing-system/${name}${ext}`,
        asset_kind: "pipeline_artifact",
        owner: "pipeline_init",
        consumers: ["copyPipelineTemplates"],
        trigger: "init:pipeline:老系统",
        consumption_mode: "copy_only",
        required_tests: [],
        owner_mechanism_id: "mc-workflow-contract",
    };
}
/** 创建老系统管线规则资产引用 */
export function existingRule(name) {
    return {
        id: `pipe-existing-rule-${name}`,
        path: `templates/rules/existing-system/${name}.md`,
        asset_kind: "pipeline_rule",
        owner: "pipeline_init",
        consumers: ["copyPipelineTemplates"],
        trigger: "init:pipeline:老系统",
        consumption_mode: "copy_only",
        required_tests: [],
        owner_mechanism_id: "mc-workflow-contract",
    };
}
/** 创建老系统门禁 YAML 资产引用 */
export function existingGate(name) {
    return {
        id: `pipe-existing-gate-${name}`,
        path: `templates/gates/existing-system/${name}.yaml`,
        asset_kind: "stage_gate",
        owner: "pipeline_init",
        consumers: ["copyPipelineTemplates"],
        trigger: "init:pipeline:老系统",
        consumption_mode: "copy_only",
        required_tests: [],
        owner_mechanism_id: "mc-stage-gate-engine",
    };
}
//# sourceMappingURL=types.js.map