{
  "$schema": "https://json-schema.org/draft-07/schema",
  "templates": [
    {
      "name": "expo",
      "description": "Expo template for React Native applications",
      "location": "./expo",
      "paramsSchema": {
        "type": "object",
        "properties": {
          "appName": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-z0-9-]+$",
            "description": "Application name (lowercase, alphanumeric and hyphens only)"
          },
          "port": {
            "type": "number",
            "default": 5000,
            "minimum": 1024,
            "maximum": 65535,
            "description": "Metro bundler port"
          },
          "serverPort": {
            "type": "number",
            "default": 9091,
            "minimum": 1024,
            "maximum": 65535,
            "description": "Express backend server port"
          }
        },
        "required": [],
        "additionalProperties": false
      }
    },
    {
      "name": "native-static",
      "description": "Native Static（纯静态）：`coze-dev init ${COZE_WORKSPACE_PATH} --template native-static`\n- 适用：纯静态 HTML/CSS/JS 项目、静态网站\n- 使用 Python http.server 作为开发服务器\n- 不需要 Node.js 环境，适合简单静态内容",
      "location": "./native-static",
      "paramsSchema": {
        "type": "object",
        "properties": {},
        "required": [],
        "additionalProperties": false
      }
    },
    {
      "name": "nextjs",
      "description": "Next.js（复杂项目）：`coze-dev init ${COZE_WORKSPACE_PATH} --template nextjs`\n- 适用：全栈应用、复杂多页面等复杂项目\n- 使用默认nextjs项目规范\n    - **目录规范**： 默认开启src目录（打开--src-dir选项）：项目文件（如 app 目录、pages 目录、components 等）初始化到 src/ 目录下。\n    - **项目理解加速**：初始可以依赖项目下 `package.json` 文件理解项目类型，如果没有或无法理解退化成阅读其他文件。\n    - **UI设计与组件规范**：Next.js项目**必须默认**采用 shadcn/ui 风格和规范，`shadcn/ui`组件默认完整的预装在`src/components/ui/`目录下",
      "location": "./nextjs",
      "paramsSchema": {
        "type": "object",
        "properties": {
          "appName": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-z0-9-]+$",
            "description": "Application name (lowercase, alphanumeric and hyphens only)"
          },
          "port": {
            "type": "number",
            "default": 5000,
            "minimum": 1024,
            "maximum": 65535,
            "description": "Development server port (for Next.js dev server)"
          }
        },
        "required": [],
        "additionalProperties": false
      }
    },
    {
      "name": "nuxt-vue",
      "description": "Nuxt.js（服务端 + Vue）：`coze-dev init ${COZE_WORKSPACE_PATH} --template nuxt-vue`\n- 适用：全栈应用、需要服务端接口能力的 Vue 项目\n- 特点：\n    - **服务端能力**：内置服务端 API 路由，可直接创建后端接口\n    - **Vue 3**：基于最新的 Vue 3 Composition API\n    - **Vite**：使用 Vite 作为构建工具，开发体验极佳\n    - **TypeScript**：完整的 TypeScript 支持\n    - **文件路由**：基于文件系统的自动路由\n    - **项目理解加速**：可依赖项目下 `package.json` 和 `nuxt.config.ts` 理解项目配置",
      "location": "./nuxt-vue",
      "paramsSchema": {
        "type": "object",
        "properties": {
          "appName": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-z0-9-]+$",
            "description": "Application name (lowercase, alphanumeric and hyphens only)"
          },
          "port": {
            "type": "number",
            "default": 5000,
            "minimum": 1024,
            "maximum": 65535,
            "description": "Development server port (for Nuxt dev server)"
          },
          "hmrPort": {
            "type": "number",
            "default": 6000,
            "minimum": 1024,
            "maximum": 65535,
            "description": "Hot Module Replacement (HMR) port"
          }
        },
        "required": [],
        "additionalProperties": false
      }
    },
    {
      "name": "phaser",
      "description": "Phaser（2D 游戏）：`coze-dev init ${COZE_WORKSPACE_PATH} --template phaser`\n- 适用：基于 Phaser 3、Vite 和 TypeScript 的 2D Web 游戏。",
      "location": "./phaser",
      "paramsSchema": {
        "type": "object",
        "properties": {
          "appName": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-z0-9-]+$",
            "description": "Application name (lowercase, alphanumeric and hyphens only)"
          },
          "port": {
            "type": "number",
            "default": 5000,
            "minimum": 1024,
            "maximum": 65535,
            "description": "Development and preview server port"
          }
        },
        "required": [],
        "additionalProperties": false
      }
    },
    {
      "name": "phaser-static",
      "description": "Phaser Static（纯静态 2D 游戏）：coze-dev init ${COZE_WORKSPACE_PATH} --template phaser-static\n- 适用：浏览器原生 JavaScript ESM 的 Phaser 3 游戏。\n- Phaser 与 Phaser Bridge 从 CDN 加载；无需 npm、Vite 或 TypeScript。",
      "location": "./phaser-static",
      "paramsSchema": {
        "type": "object",
        "properties": {
          "appName": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-z0-9-]+$",
            "description": "Application name (lowercase, alphanumeric and hyphens only)"
          }
        },
        "required": [],
        "additionalProperties": false
      }
    },
    {
      "name": "pi-agent",
      "description": "Pi Agent：`coze-dev init ${COZE_WORKSPACE_PATH} --template pi-agent`\n- 适用：基于 pi-agent-core 的 AI Agent 应用\n- 支持飞书、微信等多渠道接入\n- 内置 Dashboard 管理面板\n- 使用 TypeScript + Express + Vite",
      "location": "./pi-agent",
      "paramsSchema": {
        "type": "object",
        "properties": {
          "port": {
            "type": "number",
            "default": 5000,
            "minimum": 1024,
            "maximum": 65535,
            "description": "Dashboard server port"
          },
          "workspaceDir": {
            "type": "string",
            "default": "/workspace/workspace",
            "description": "Workspace directory path"
          }
        },
        "required": [],
        "additionalProperties": false
      }
    },
    {
      "name": "taro",
      "description": "Taro（小程序 + H5）：`coze-dev init ${COZE_WORKSPACE_PATH} --template taro`\n- 适用：微信小程序、H5 跨端应用\n- 前后端分离架构：Taro 4 + NestJS\n- 支持微信小程序和 H5 双端构建\n- 使用 TailwindCSS + weapp-tailwindcss 实现跨端样式",
      "location": "./taro",
      "paramsSchema": {
        "type": "object",
        "properties": {
          "appName": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-z0-9-]+$",
            "description": "Application name (lowercase, alphanumeric and hyphens only)"
          },
          "port": {
            "type": "number",
            "default": 5000,
            "minimum": 1024,
            "maximum": 65535,
            "description": "H5 development server port"
          },
          "serverPort": {
            "type": "number",
            "default": 3000,
            "minimum": 1024,
            "maximum": 65535,
            "description": "NestJS backend server port"
          }
        },
        "required": [],
        "additionalProperties": false
      }
    },
    {
      "name": "vite",
      "description": "Vite（简单项目）：`coze-dev init ${COZE_WORKSPACE_PATH} --template vite`\n- 适用：轻量级 SPA、纯前端交互、仪表盘等轻量级项目。",
      "location": "./vite",
      "paramsSchema": {
        "type": "object",
        "properties": {
          "appName": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-z0-9-]+$",
            "description": "Application name (lowercase, alphanumeric and hyphens only)"
          },
          "port": {
            "type": "number",
            "default": 5000,
            "minimum": 1024,
            "maximum": 65535,
            "description": "Development server port"
          },
          "hmrPort": {
            "type": "number",
            "default": 6000,
            "minimum": 1024,
            "maximum": 65535,
            "description": "Development HMR server port"
          }
        },
        "required": [],
        "additionalProperties": false
      }
    }
  ]
}
