{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "version": 1,
  "description": "loom template schema — defines templates, their variables, and rendering rules",
  "variableSyntax": "{{VAR_NAME}}",
  "templates": [
    {
      "id": "constitution",
      "sourceFile": "templates/constitution.md",
      "outputPath": ".loom/rules/constitution.md",
      "description": "项目宪章 — 编码准则、核心原则、技术栈、编码红线",
      "requiredVariables": [
        "ARCH_PRINCIPLE",
        "ARCH_DESC",
        "DI_PRINCIPLE",
        "DI_DESC",
        "CONFIG_PRINCIPLE",
        "CONFIG_DESC",
        "ERROR_PRINCIPLE",
        "ERROR_DESC",
        "CODEGEN_PRINCIPLE",
        "CODEGEN_DESC",
        "ARCH_PATTERN",
        "DIRECTORY_TREE",
        "LANGUAGE",
        "LANGUAGE_VERSION",
        "WEB_FRAMEWORK",
        "FRAMEWORK_VERSION",
        "ORM",
        "ORM_VERSION",
        "DATABASE",
        "DATABASE_VERSION",
        "CACHE",
        "CACHE_VERSION",
        "LOGGING",
        "LOGGING_VERSION",
        "DI",
        "DI_VERSION",
        "CODING_REDLINES",
        "BUILD_CMD",
        "VET_CMD",
        "TEST_CMD"
      ],
      "optionalVariables": []
    },
    {
      "id": "agents",
      "sourceFile": "templates/agents.md",
      "outputPath": "AGENTS.md",
      "description": "AGENTS.md 标准入口文档",
      "requiredVariables": [],
      "optionalVariables": []
    },
    {
      "id": "memory",
      "sourceFile": "templates/memory.md",
      "outputPath": ".loom/memory/MEMORY.md",
      "description": "记忆文件 — 踩坑、偏好、状态、变更记录",
      "requiredVariables": [
        "INIT_DATE",
        "TECH_STACK_SUMMARY"
      ],
      "optionalVariables": []
    },
    {
      "id": "workflow",
      "sourceFile": "templates/workflow.yaml",
      "outputPath": ".loom/workflow.yaml",
      "description": "开发流水线定义",
      "requiredVariables": [],
      "optionalVariables": []
    },
    {
      "id": "subagent-context",
      "sourceFile": "templates/subagent-context.md",
      "outputPath": ".loom/contexts/subagent-context.md",
      "description": "Subagent 紧凑事实上下文的格式与可信度说明；实际文件由 init-project 直接生成",
      "requiredVariables": [],
      "optionalVariables": []
    }
  ]
}
