# Task Template: 抽取插件（library/plugins/*）

task:
  id: extract-plugin
  intent: "从本仓库抽取一个或多个插件到目标项目，确保注入点与依赖闭包完整"

inputs:
  required:
    - plugins              # 例如 ["vab", "directive", "errorLog", "support"]
    - target_project_type
    - extraction_style

scope:
  base_dir: "library/plugins"

dependency_closure_checklist:
  runtime:
    - "vab：Element Plus 的 ElMessage/ElLoading/ElMessageBox/ElNotification 是否全局可用"
    - "directive：src/utils/permission 与权限数据来源是否齐全"
    - "errorLog：src/store/modules/errorLog 与 config/errorLog 是否齐全"
    - "support：__APP_INFO__ 注入方式是否一致"
  wiring:
    - "是否通过 setupVab(library/index.ts) 自动 app.use() 安装；若非自动，需要在入口手动 app.use()"

outputs:
  required_sections:
    - changed_files
    - extracted_modules
    - dependency_closure
    - acceptance_commands
    - risks

acceptance:
  - "插件安装后，不影响应用启动"
  - "涉及的注入能力/指令/错误捕获按模块规格验收"
