draftgo-cli 3.0.56 → 4.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/README.md +169 -297
  2. package/package.json +12 -7
  3. package/resources/custom-service-sdk/ai.go +520 -0
  4. package/resources/custom-service-sdk/ai_test.go +156 -0
  5. package/resources/custom-service-sdk/billing.go +596 -0
  6. package/resources/custom-service-sdk/billing_test.go +150 -0
  7. package/resources/custom-service-sdk/go.mod +3 -0
  8. package/resources/custom-service-sdk/manifest.json +72 -0
  9. package/resources/custom-service-sdk/platform.go +360 -0
  10. package/resources/custom-service-sdk/platform_logger_test.go +24 -0
  11. package/resources/custom-service-sdk/registration_test.go +39 -0
  12. package/resources/custom-service-sdk/resources.go +246 -0
  13. package/resources/custom-service-sdk/resources_billing_test.go +115 -0
  14. package/resources/custom-service-sdk/resources_files_test.go +57 -0
  15. package/resources/custom-service-sdk/resources_scope_test.go +87 -0
  16. package/resources/custom-service-sdk/sdk.go +208 -0
  17. package/resources/skill/SKILL.md +36 -87
  18. package/resources/skill/init/SKILL.md +9 -14
  19. package/resources/skill/manifest.json +6 -2
  20. package/resources/skill/references/aihub.md +28 -5
  21. package/resources/skill/references/app-api.md +56 -6
  22. package/resources/skill/references/architecture.md +2 -2
  23. package/resources/skill/references/chat-sdk.md +4 -2
  24. package/resources/skill/references/checkout.md +21 -7
  25. package/resources/skill/references/custom-services.md +124 -222
  26. package/resources/skill/references/data.md +22 -6
  27. package/resources/skill/references/delivery.md +33 -0
  28. package/resources/skill/references/diagnostics.md +51 -0
  29. package/resources/skill/references/frontend.md +93 -499
  30. package/resources/skill/references/mcp.md +65 -101
  31. package/resources/skill/references/methods.md +189 -0
  32. package/resources/skill/references/modules.md +36 -8
  33. package/resources/skill/references/runtime.md +26 -3
  34. package/resources/skill/story/SKILL.md +1 -2
  35. package/src/apiContractCache.js +112 -0
  36. package/src/cli.js +24 -20
  37. package/src/commandRegistry.js +15 -12
  38. package/src/commands/api.js +41 -10
  39. package/src/commands/apiKey.js +34 -0
  40. package/src/commands/capabilities.js +93 -0
  41. package/src/commands/check.js +1 -10
  42. package/src/commands/checkout.js +1 -1
  43. package/src/commands/commit.js +1 -1
  44. package/src/commands/components.js +550 -0
  45. package/src/commands/conflict.js +1 -1
  46. package/src/commands/connect.js +18 -8
  47. package/src/commands/customService.js +22 -8
  48. package/src/commands/dataRange.js +33 -0
  49. package/src/commands/delete.js +34 -46
  50. package/src/commands/deploy.js +1 -1
  51. package/src/commands/diff.js +18 -2
  52. package/src/commands/grant.js +29 -0
  53. package/src/commands/group.js +38 -0
  54. package/src/commands/help.js +80 -51
  55. package/src/commands/init.js +6 -12
  56. package/src/commands/listTargets.js +1 -1
  57. package/src/commands/local.js +2 -6
  58. package/src/commands/map.js +145 -28
  59. package/src/commands/mcp.js +2 -2
  60. package/src/commands/reconcile.js +1 -1
  61. package/src/commands/role.js +32 -0
  62. package/src/commands/space.js +41 -0
  63. package/src/commands/status.js +111 -8
  64. package/src/commands/uninstall.js +3 -3
  65. package/src/commands/update.js +24 -12
  66. package/src/commands/verify.js +118 -21
  67. package/src/commands/{verifyUi.js → visualVerify.js} +28 -116
  68. package/src/commands/worklog.js +90 -0
  69. package/src/consoleEncoding.js +34 -0
  70. package/src/contractCompatibility.js +57 -0
  71. package/src/customServices.js +278 -41
  72. package/src/diffReport.js +106 -0
  73. package/src/index.js +2 -0
  74. package/src/{localdev → localRuntime}/compose.js +14 -17
  75. package/src/{localdev → localRuntime}/detect.js +1 -1
  76. package/src/{localdev → localRuntime}/index.js +22 -23
  77. package/src/{localdev → localRuntime}/mysqlClient.js +1 -1
  78. package/src/{localdev → localRuntime}/services.js +28 -37
  79. package/src/mcp/client.js +11 -2
  80. package/src/mcp/protocol.js +2 -2
  81. package/src/mcp/tools.js +14 -1
  82. package/src/platforms.js +9 -0
  83. package/src/projectConfig.js +8 -4
  84. package/src/releaseInstall.js +105 -0
  85. package/src/{installers/index.js → targets.js} +3 -5
  86. package/src/updateCheck.js +48 -28
  87. package/src/worklog.js +275 -0
  88. package/src/workspaceHealth.js +1 -1
  89. package/src/worktree/backend.js +1 -1
  90. package/src/worktree/index.js +86 -51
  91. package/src/changelog.js +0 -276
  92. package/src/commands/changelog.js +0 -24
  93. package/src/commands/localDev.js +0 -9
  94. package/src/commands/sync.js +0 -46
  95. package/src/commands/task.js +0 -408
  96. package/src/commands/verifyUiCompat.js +0 -16
package/README.md CHANGED
@@ -1,381 +1,253 @@
1
- # draftgo-cli
1
+ # DraftGo CLI 4
2
2
 
3
- ## Workflow 2.0
3
+ 面向 AI 编码工具的 DraftGo 工作台 CLI。它负责 Skill 安装、项目连接、MCP 发现、长正文 checkout/commit、自定义服务草稿、统一本地验收和 worklog 记录。
4
4
 
5
- The root DraftGo Skill loads automatically in supported AI hosts. Agents read the smallest task-specific Reference set first, then query current project state through precise MCP tools instead of generating an aggregate context bundle.
5
+ ## 核心规则
6
6
 
7
- Pages, navigations, documents, and custom services are long-content resources. Custom services use `draftgo checkout custom-services <id>` and a four-file worktree (`service.go`, `go.mod`, `go.sum`, `service.json`). `commit` saves the shared cloud draft, `test` validates or executes it in the DraftGo Runner, and `publish` explicitly promotes a validated draft without interrupting the current live version. Start later work with `refresh`; it stops when local edits exist. Cloud versions are the only history, while local storage keeps only current content and one base.
7
+ - Skill 自动加载;Agent 只读取当前任务需要的 Reference。
8
+ - pages、navigations、docs/articles 和 custom services 的完整正文使用 `checkout`、worktree、`diff`、`commit`;结构化资源使用 MCP/API。
9
+ - MCP schema 是服务端实时契约。已知 operation 优先使用项目私有缓存;首次使用或 `registry_revision` 变化时 describe。schema 不写入 Skill 或聊天上下文。
10
+ - 不同资源、operation 和 owner 的工作全部并发;同一资源的依赖步骤保持串行。
11
+ - 每个任务开始记录到 `.draftgo/worklog.md`,验证和交付成功后再标记完成。
12
+ - 已知页面使用 `draftgo map --type pages --route <path>` 或 `--title <title>` 精确定位;只需范围和状态时使用 `--summary`,浏览列表时使用 `--limit`(默认 20)/`--cursor`,不默认全量 map。
13
+ - `--output json` 的 stdout 只包含 UTF-8 JSON;诊断和进度写入 stderr。大变更先用 `draftgo diff --stat` 或 `--summary`。
8
14
 
9
- Small, single-point changes do not need Task overhead. Cross-module, cross-session, or multi-Agent work uses one authoritative `.draftgo/Task/[YYYY-MM-DD]<slug>/Task.md` and `draftgo task create|add|claim|start|complete|block|reopen|accept|finish`. The file keeps the user's original request, the clarified executable requirement, expected effects, scope, checklist, decisions, blockers, and final acceptance together. Legacy `task.yaml + plan.md + items/` tasks remain readable and migrate only through an explicit `draftgo task migrate`. `.draftgo/tmp/` is entirely disposable; user-facing evidence belongs in registered `.draftgo/artifacts/`, and `draftgo clean` removes all tmp plus registered artifacts. UI smoke checks remain single viewport and use `--screenshot never` by default. Supply `on-failure` or `always` only for explicit strong visual verification.
15
+ 跨板块任务先看[极简方法指南](resources/skill/references/methods.md):它按 AIHub、知识库/记忆、页面/内容、动态数据、自定义服务、MCP、运行诊断和交付验收给出“适用场景 + 最短正确命令链 + 失败定位 + 完成条件”。动态 operation 不写死;未知契约统一用 `draftgo api search`、`draftgo api describe`、`draftgo api call` 实时发现。
10
16
 
11
- 面向 AI 编码工具的 DraftGo 工作台 CLI:分发 DraftGo Skill,通过 MCP 发现和操作实时资源,并为页面、导航和文档提供可校验的 `checkout` / `commit` 工作流。
17
+ ## 验收策略
12
18
 
13
- DraftGo Next 壳层使用 React + Vite;数据库页面可按任务使用原生 Web 技术、Tailwind CSS 或平台内置组件库。CLI 仍提供 Docker 本地运行、项目检查和浏览器验证能力。
19
+ 普通交付只运行:
14
20
 
15
- 支持安装 Skill 的宿主:Claude Code、Codex CLI、Cursor、Windsurf、Antigravity、GitHub Copilot、Gemini CLI、Kiro。
16
-
17
- ## 前置条件
18
-
19
- - Node.js >=20.19
20
- - 使用 `draftgo local ...` 时需要 Docker 和 Docker Compose
21
-
22
- CLI 不再依赖 Python 同步脚本,也不会创建 DraftGo 业务资源的全量本地镜像。
23
-
24
- ## 工作模型
25
-
26
- ```text
27
- 根 SKILL.md -> Agent 按任务读取最少必要的 Reference
28
- AI 宿主 -> draftgo mcp serve -> DraftGo /mcp
29
- |
30
- +-> 结构化资源、元数据、搜索和正文片段
31
-
32
- draftgo checkout/commit -> DraftGo 专用 HTTP 正文端点
33
- (完整 HTML/Markdown 不经过 MCP 上下文)
21
+ ```bash
22
+ draftgo verify
34
23
  ```
35
24
 
36
- - Agent 负责理解任务语义、选择 Reference,并通过精确 MCP 工具逐步定位相关资源;CLI 不生成聚合上下文包。
37
- - MCP 用于项目概览、资源搜索/列表、元数据、正文片段和实时 API 调用。
38
- - `pages`、`navigations` 和 `docs/articles` 的完整正文使用 `checkout` / `commit`。
39
- - `db_meta`、AIHub、`system_config`、角色、用户、文档分类、自定义服务等结构化资源直接通过 MCP/API 操作,不生成本地索引。
40
- - `.draftgo/pages/`、`.draftgo/navigations/` 等旧 `index.json` 缓存只视为 legacy 数据;CLI 不删除它们,但 `map` 和 `check` 会忽略它们。
41
- - DraftGo Skill 继续提供资源关系、前端运行能力与实践、数据和权限、安全规则、自定义服务经验以及验证流程;MCP 不替代 Skill。
42
- - CLI 不提供页面模板,也不替 Agent 选择页面结构或视觉风格。
25
+ 默认验收只做本地检查,不启动浏览器,也不生成截图。只有用户明确要求视觉验收时才访问浏览器或截图;两者同时要求时先截图并查看结果,再做交互或 DOM 检查。
43
26
 
44
- ## Agent 阅读顺序
27
+ ```bash
28
+ # 截图验收,默认 desktop 1440x900
29
+ draftgo verify --url http://localhost:3000/path --screenshot always
45
30
 
46
- DraftGo Skill 不能被 MCP 替代。根 `SKILL.md` 会在 Skill 触发时自动加载;Agent 按任务路由渐进读取相关 Reference:
31
+ # 用户明确要求交互或 DOM 验收
32
+ draftgo verify --url http://localhost:3000/path --ui always
47
33
 
48
- ```text
49
- 已加载的 SKILL.md
50
- -> 读取任务所需的最少 Reference
51
- -> 用 resource_search / api_search 精确定位
52
- -> 按需 describe、读取 metadata 或片段
53
- -> 必要时 checkout 正文
34
+ # 仅在用户要求时增加移动端
35
+ draftgo verify --url http://localhost:3000/path --screenshot always --viewport both
54
36
  ```
55
37
 
56
- 页面任务读取 `frontend.md`,按需补读 `runtime.md` / `app-api.md`;数据、自定义服务和 AIHub 任务分别读取对应 Reference。目标明确时不要全量枚举无关资源。`mcp test` 是连接诊断,不是每次资源查询的前置步骤。
57
-
58
- 页面需求先结合用户意图和 MCP 实时资源判断是修改已有页面还是新增页面。已有页面在确认唯一 ID 后 checkout;独立新页面先通过实时 API 创建并取得 ID,再 checkout 完整正文。“做一个功能页面”本身不预设新建或修改,只有不同判断会产生明显不同结果时才需要向用户澄清。
59
-
60
- 只回答无需实时状态的本地规则问题时,不必调用 MCP。静态资源须先区分:平台内置目录由 `frontend.md` 说明,指定页面依赖经 MCP 定位、checkout 后本地搜索,服务器全量文件不能凭现有 Skill、MCP 摘要或 checkout 声称已枚举。
61
-
62
- Skill 说明产品约束、内置能力和操作规则;MCP 说明当前远端状态;checkout 正文才能证明某个页面完整引用了哪些静态资源。汇报时应明确标注这三类证据,不能互相替代。
38
+ `--ui` 和 `--screenshot` 的默认值都是 `never`;截图模式只有 `always` `never`。默认视口是 desktop `1440x900`,移动端为 `390x844`。
63
39
 
64
40
  ## 安装与连接
65
41
 
66
42
  ```bash
67
43
  npm install -g draftgo-cli
68
-
69
- cd /path/to/your/project
70
- draftgo init # 自动识别宿主并安装 DraftGo Skill
71
- draftgo connect codex # 输入 server 和 SAT,验证 MCP,并配置 Codex
44
+ cd /path/to/project
45
+ draftgo init
46
+ draftgo connect --server https://draftgo.example --api-key "$DRAFTGO_API_KEY"
47
+ draftgo mcp setup
48
+ draftgo mcp test
72
49
  ```
73
50
 
74
- 也可以非交互连接:
51
+ `connect` 会验证当前用户的 DraftGo API Key、MCP initialize、tools/list 和关键工具调用,然后把连接写入项目私有的 `.draftgo/config.json`。宿主 MCP 配置只包含 `draftgo mcp serve`,不会保存 API Key。需要开发 space 资源时增加 `--scope-type space --space-id <id>`;平台组件和系统配置仍按 operation 契约使用 platform 上下文。
52
+
53
+ 本地底座:
75
54
 
76
55
  ```bash
77
- draftgo connect codex --server https://draftgo.example --token "$DRAFTGO_SAT"
56
+ draftgo local setup
57
+ draftgo local start
58
+ draftgo local status
59
+ draftgo local logs app
60
+ draftgo local stop
78
61
  ```
79
62
 
80
- `--server` 始终表示 DraftGo 基础地址。直接连接 MCP endpoint 时使用 `--mcp-url https://draftgo.example/mcp`;CLI 会显式保存 `mcp_url`,若未同时传 `--server`,则从标准 `/mcp` 后缀推导基础地址,避免猜测已有 base URL 的语义。
81
-
82
- `connect` 会先验证 SAT、MCP `initialize`、`tools/list` 和关键 `tools/call`,成功后写入项目私有配置 `.draftgo/config.json`,并尝试为指定或自动检测到的宿主执行 MCP setup。`init` / `connect` 不会预建 Task、lessons、changelog、worktree、conflicts 等运行时内容;这些文件和目录只在对应能力首次使用时按需创建。它不会 pull 页面、导航、文档或任何其他业务资源。
63
+ ## 命令
83
64
 
84
- 远端暂不可用时,只有显式传入 `--allow-offline` 才会保存配置;恢复后运行 `draftgo mcp test`。使用 `--no-mcp-setup` 可跳过宿主配置。
85
-
86
- `connect` 会把以下运行时路径加入项目 `.gitignore`:
65
+ ### 项目与 Skill
87
66
 
88
67
  ```text
89
- .draftgo/config.json
90
- .draftgo/token
91
- .draftgo/worktree/
92
- .draftgo/conflicts/
68
+ draftgo init [target...]
69
+ draftgo update [target...]
70
+ draftgo uninstall <target|all> [--purge]
71
+ draftgo status
72
+ draftgo list-targets
73
+ draftgo connect [target...]
93
74
  ```
94
75
 
95
- SAT 只从 `.draftgo/config.json` 读取。宿主 MCP 配置、命令输出和错误信息都不应包含 SAT。
76
+ `draftgo status` 会通过只读 MCP/API 诊断显示服务连接健康状态、服务版本和当前用户 API Key 的 `platform`/`space` 上下文;`--output json` 适合读取 `connection.health`、`workspace_id` `space_id`。
96
77
 
97
- ## MCP 命令
78
+ ### 发现与正文
98
79
 
99
- ```bash
100
- draftgo mcp setup [target...] # 写入或合并项目级 MCP 配置
101
- draftgo mcp status [target...] # 检查配置是否存在且不含敏感连接参数
102
- draftgo mcp test # 验证 initialize、tools/list、项目/正文/API 三条调用路径
103
- draftgo mcp serve # 启动 stdio -> 远端 Streamable HTTP bridge
80
+ ```text
81
+ draftgo map [--type pages|nav|docs|custom-services] [--route <path>] [--title <title>] [--summary] [--limit <1-100>] [--cursor <opaque>] [--output json]
82
+ draftgo checkout <pages|nav|docs|custom-services> <id...> [--force]
83
+ draftgo check [custom-services <id...>] [--remote]
84
+ draftgo verify [<type> <id...>] [visual flags]
85
+ draftgo diff <type> <id> [--stat|--summary] [--output json]
86
+ draftgo commit <type> <id...>
87
+ draftgo refresh <type> <id...>
88
+ draftgo reconcile <type> <id...>
89
+ draftgo conflicts [--all]
90
+ draftgo conflict show <type> <id>
91
+ draftgo conflict resolve <type> <id>
104
92
  ```
105
93
 
106
- `mcp serve` 会保留远端 `Mcp-Session-Id`。服务重启或 session 过期后,它会自动重新 initialize,并只重试一次被明确拒绝为 session 无效的当前请求;普通工具失败、超时和 5xx 不会自动重试。`mcp test` 使用独立的新连接,只证明当前配置能够建立新 session,不能直接证明宿主此前持有的 session 仍有效。
94
+ `checkout` 下载正文和经过 hash 校验的 base。`commit` 先并发完成所有目标的本地与远端 preflight,全部通过后再并发上传;任何 409/412 都保留 base/local/remote 冲突材料,不 force、不覆盖、不自动合并。
95
+
96
+ `--route`、`--title` 为精确匹配,同时给出时取交集。CLI 可用资源搜索缩小候选,但最终在本地做精确判定;服务端 `resource_search` 只接受通用 `query`,不能传 route/title。`map --summary` 不输出 project overview、资源列表或 hash。`diff --stat` 输出文件与增删行数,`--summary` 输出资源、版本和变更概要;只有不带这两个参数的 diff 才展开正文。
107
97
 
108
- `setup` 不传 target 时自动检测当前项目的宿主。可用 `--target codex,cursor` 传入多个目标。
98
+ ### Page 组件库
109
99
 
110
- 当前 MCP 宿主支持:
100
+ ```bash
101
+ draftgo components search <query> --output json
102
+ draftgo components show <library/component> --output json
103
+ draftgo components expand --page <id> --instance <data-dg-instance>
104
+ draftgo verify pages <id>
105
+
106
+ # 开发组件:commit 保存草稿,publish 显式上线
107
+ draftgo components checkout <library/component>
108
+ draftgo components diff <library/component>
109
+ draftgo components verify <library/component>
110
+ draftgo components commit <library/component>
111
+ draftgo components publish <library/component>
112
+
113
+ # 库管理和标准 ZIP 迁移
114
+ draftgo components libraries list|show|create|update|delete
115
+ draftgo components import <archive.zip> --dry-run
116
+ draftgo components export <library> --file <archive.zip>
117
+ ```
111
118
 
112
- | 宿主 | 项目配置 | 状态 |
113
- |---|---|---|
114
- | Codex CLI | `.codex/config.toml` | 支持 |
115
- | Claude Code | `.mcp.json` | 支持 |
116
- | Cursor | `.cursor/mcp.json` | 支持 |
117
- | Gemini CLI | `.gemini/settings.json` | 支持 |
118
- | Kiro | `.kiro/settings/mcp.json` | 支持 |
119
- | GitHub Copilot | `.vscode/mcp.json` | 支持 |
120
- | Windsurf | - | 不支持项目级 MCP setup |
121
- | Antigravity | - | 不支持项目级 MCP setup |
119
+ `search` `show` 始终读取当前 DraftGo 实例的组件目录,AI 不得按名称猜写 props/slots。Page 以真实根标签和 `data-dg-use="library/component"` 保存活引用,发布新 revision 后刷新自动升级。高度个性化时先 checkout Page,再用 `expand` 固化当前 props、slots、组件/库 CSS、公共资产和 mount 初始化;展开实例变成普通 HTML/CSS/JavaScript,不再随组件升级,仍需经过 `diff -> verify -> commit`。
122
120
 
123
- Codex 配置由 `draftgo mcp setup codex` 合并为:
121
+ ### Custom service
124
122
 
125
- ```toml
126
- [mcp_servers.draftgo]
127
- command = "draftgo"
128
- args = ["mcp", "serve"]
129
- ```
123
+ 最短开发闭环:
130
124
 
131
- 其他支持的宿主同样只保存 stdio 命令。例如 Claude Code、Cursor、Gemini 和 Kiro 使用 `mcpServers.draftgo`:
132
-
133
- ```json
134
- {
135
- "mcpServers": {
136
- "draftgo": {
137
- "command": "draftgo",
138
- "args": ["mcp", "serve"]
139
- }
140
- }
141
- }
125
+ ```bash
126
+ # 先用 MCP 定位或创建服务并取得 ID
127
+ draftgo checkout custom-services <id...>
128
+ draftgo diff custom-services <id> --stat
129
+ draftgo commit custom-services <id...>
130
+ draftgo test custom-services <id> --source draft --handler route:POST:/path --input request.json
142
131
  ```
143
132
 
144
- GitHub Copilot 使用 `.vscode/mcp.json` `servers.draftgo`,并额外写入 `"type": "stdio"`。这些文件不包含 serverSAT、header 或环境变量;bridge 在运行时从当前项目读取私有配置。
133
+ 每个 worktree 只有 `service.go` 与 `service.json` 是用户内容;Route/Event/Scheduled handler 仅由 `Register` 自动发现。CLI 另生成带 `DO NOT EDIT` 标记的 `go.mod/go.sum`、本地编译入口和 SDK 副本,供 gopls、`go build` 使用;它们会在 checkout 和 commit 时重建,且永不进入 diffhash、归档、冲突材料或云端。第三方依赖只在源码顶部用 `//draftgo:require module@version` 固定。旧四文件 worktree 不受支持,请删除后用当前 CLI 重新 checkout。
145
134
 
146
- DraftGo MCP 预期提供以下工具:
135
+ `commit custom-services` 会自动完成提交、验证和发布,并输出明确的 published 提示;`validate`、`test`、`publish` 仍可作为单独的兼容入口。`test` 只运行 cloud draft,不调用线上版本;发布后如需再试运行,先修改并提交形成新草稿。默认拒绝外部副作用;外部调用用 `--side-effect-policy mock` 模拟,只有明确需要真实副作用时才组合 `--side-effect-policy live --test-write`。数据库等写操作也必须显式加 `--test-write`。
147
136
 
148
- - `draftgo_project_overview`
149
- - `draftgo_resource_list`
150
- - `draftgo_resource_search`
151
- - `draftgo_resource_get_metadata`
152
- - `draftgo_resource_read_fragment`
153
- - `draftgo_api_search`
154
- - `draftgo_api_describe`
155
- - `draftgo_api_call`
137
+ `--source` 支持 `draft`(默认)、`auto`、`published`。Selector 支持 `route:METHOD:/path`、`event:name`、`scheduled:name` 或 handler 名;`--input`、`--headers`、`--user` 都读取 UTF-8 JSON object。普通 SDK 调用继承已验证的 `platform` 或 `space` 上下文;可信服务可对单次操作显式使用 `ctx.Admin.*`,该提升会审计且不会泄漏到后续调用。余额扣款、权益、支付和订阅使用 `ctx.Billing` / `ctx.Admin.Billing`,精确签名查看 checkout 后只读的 `.draftgo-sdk/billing.go`。完整字段与规则见[自定义服务方法指南](resources/skill/references/custom-services.md)。
156
138
 
157
- ## 标准工作流
139
+ ### MCP/API
158
140
 
159
141
  ```text
160
- Agent 按任务读取相关 Reference
161
- MCP 精确定位
162
- Agent 自主设计并批量 checkout
163
- 独立资源按需并行开发
164
- Agent 一次统一验证
165
- commit
166
- draftgo changelog add "<完成结果>"
142
+ draftgo mcp setup [target...]
143
+ draftgo mcp status [target...]
144
+ draftgo mcp test
145
+ draftgo mcp serve
146
+ draftgo api <query>
147
+ draftgo api search <query>
148
+ draftgo api describe <operation_id>
149
+ draftgo api call <operation_id> --input <json-file>
150
+ draftgo delete <operation_id> [id] [--params JSON]
151
+ draftgo capabilities list [--module <name>] [--type <resource>] [--method <method>]
152
+ draftgo capabilities search <query> [--risk <level>] [--permission <permission>]
153
+ draftgo capabilities show <operation_id>
154
+ draftgo capabilities audit --output json
167
155
  ```
168
156
 
169
- 无依赖且修改不同资源的工作可以并行;同一文件或 DraftGo 资源全程只分配给一个 Agent。开始并行实现前先确定共享 schema、接口、权限和路由。单页面、强依赖或仍共享主要资源的任务由一个 Agent 完成。主 Agent 负责 Reference/MCP 路由、资源 owner、汇总回读、统一验证、commit 和最终 changelog
170
-
171
- 前端任务先读取 `references/frontend.md`,涉及 iframe、路由、认证或全局层时补读 `runtime.md` / `app-api.md`,再通过 MCP 定位目标资源。
157
+ `api call` 对已缓存 operation 直接调用并携带 `registry_revision`。服务端返回 `CONTRACT_CHANGED` 时重新 describe;只读或 operation 契约未变化时最多重试一次,危险 operation 自身契约变化时阻断调用并提示升级 CLI 后重新确认。调用输入必须是 UTF-8 JSON object;输出包含 HTTP status、服务端 code 和 request ID
172
158
 
173
- 确定全部正文资源后批量 checkout,自主设计并按唯一 owner 编辑,最后统一验证和交付:
159
+ 权限快捷命令:
174
160
 
175
161
  ```bash
176
- draftgo checkout pages 42 43
177
- # 独立资源可并行编辑;同一资源只由一个 Agent 修改
178
- draftgo check
179
- draftgo verify pages 42 --remote --url http://localhost:5173/example
180
- draftgo diff pages 42
181
- draftgo diff pages 43
182
- draftgo commit pages 42 43
183
- draftgo changelog add "完成文档管理系统及角色权限"
162
+ draftgo role list
163
+ draftgo space list
164
+ draftgo space members list --input request.json
165
+ draftgo group members add --input request.json
166
+ draftgo grant create --input request.json
167
+ draftgo api-key status
168
+ draftgo api-key rotate
169
+ draftgo data-range list
184
170
  ```
185
171
 
186
- 只查询长内容时,优先使用 MCP 搜索和片段工具;需要全文分析或编辑时才 checkout。不要要求 MCP 返回完整 HTMLMarkdown。
187
-
188
- 结构化资源使用 `draftgo_api_search` / `draftgo_api_describe` 查实时契约,再用 `draftgo_api_call` 操作。AIHub Agent、Prompt、MCP、Skill、供应商和模型路由也属于实时结构化资源,不写本地快照;供应商密钥或 header 值不得出现在 Agent 输出中。
189
-
190
- 只有整个任务统一验证并且所有 commit/MCP 写入成功后才执行一次 `changelog add`。验证失败、409/412 或任一交付失败时不得写入。
191
-
192
- ## 命令清单
172
+ `role` 管理无作用域的 Role 模板;授权使用 `grant` 创建带 `platform``space` 范围的 AccessGrant。工作区成员关系不直接授予权限。资源归属由服务端持久化 ResourceOwnership 决定,DB 的 DataRange
173
+ 只在该范围内应用 `none`、`owner` 或 `all` 记录策略。交互式 CLI、MCP 和普通 HTTP API 均使用当前用户的
174
+ API Key,并始终按该用户的 AccessGrant 授权;API Key 不能创建或伪造服务身份。CI、定时任务和共享服务等
175
+ 无人值守自动化使用平台提供的独立服务凭据通道及服务主体 AccessGrant,不复用个人 API Key。
193
176
 
194
- ### Skill 与连接
177
+ ### 交付与记录
195
178
 
196
- | 命令 | 说明 |
197
- |---|---|
198
- | `draftgo init [target]...` | 安装 Skill;不传 target 时自动识别,`all` 表示全部。 |
199
- | `draftgo update [target]...` | 更新全局 CLI,并原子刷新已安装或检测到的 Skill。 |
200
- | `draftgo uninstall <target|all>` | 移除指定宿主的 Skill;`--purge` 还会删除整个 `.draftgo/`。 |
201
- | `draftgo status` | 显示已安装宿主和 Skill 版本。 |
202
- | `draftgo connect [target]...` | 验证并保存 server/SAT,随后配置宿主 MCP;不下载业务资源。 |
203
- | `draftgo list-targets` | 列出可安装 Skill 的 AI 宿主。 |
204
-
205
- ### 发现、正文和冲突
206
-
207
- | 命令 | 说明 |
208
- |---|---|
209
- | `draftgo map` | 并行读取 pages、navigations、docs/articles 元数据,再叠加本地 checkout 状态;`--type` 可限制一种类型。 |
210
- | `draftgo checkout <pages|nav|docs> <id...>` | 下载完整正文和 base,校验 hash 后原子落盘;`--force` 可显式覆盖已修改的本地正文。 |
211
- | `draftgo check` | 默认只检查本地 checkout;`--remote` 额外对比 local/base/manifest/remote 的版本和 hash。 |
212
- | `draftgo verify [<type> <id...>]` | 统一执行静态检查;`--remote` 增加远端比较,`--url` 增加 iframe-aware 浏览器验证。 |
213
- | `draftgo diff <pages|nav|docs> <id>` | 显示 checkout base 与当前本地正文的差异。 |
214
- | `draftgo commit <pages|nav|docs> <id...>` | 本地校验后,通过专用 HTTP 上传完整正文并更新 base/manifest。 |
215
- | `draftgo reconcile <pages|nav|docs> <id...>` | 仅当 local 与经校验的 remote 字节一致时,安全修复落后的 base/manifest 元数据。 |
216
- | `draftgo conflicts` | 列出未解决冲突;存在冲突时返回非零。`--all` 包括已解决记录。 |
217
- | `draftgo conflict show <type> <id>` | 显示冲突的 base/local/remote/worktree 路径。 |
218
- | `draftgo conflict resolve <type> <id>` | 确认 worktree 已合并,把保留的 remote 设为新 base;随后重新 check、diff、commit。 |
219
- | `draftgo verify-ui <url>` | `verify --url <url> --ui always` 的弃用兼容入口。 |
220
-
221
- `pages`、`page`,`nav`、`navigation`、`navigations`,以及 `docs`、`doc`、`article`、`articles`、`docs/articles` 都会规范化到三个支持的正文类型。
222
-
223
- ### 实时 API 与交付
224
-
225
- | 命令 | 说明 |
226
- |---|---|
227
- | `draftgo api <query>` | 通过 MCP `api_search` 查询实时 API 契约。 |
228
- | `draftgo api search <query>` | `draftgo api <query>` 的显式搜索形式。 |
229
- | `draftgo api describe <operation_id>` | 通过 MCP `api_describe` 查看指定操作。 |
230
- | `draftgo api call <operation_id> --input <file>` | 描述后调用实时 operation;JSON 文件严格按 UTF-8 解码并输出状态码、服务端 code 和 request ID。 |
231
- | `draftgo delete <operation_id> [id]` | 描述并确认后调用实时 MCP `api_call`;支持 `--params JSON`、`--input file` 和 `--yes`。 |
232
- | `draftgo deploy [<type> <id...>]` | 先 `check`,再按 delivery 模式检查 diff 或 commit。仅 `--delivery local` 可省略 type/id。 |
233
- | `draftgo auto-push [<type> <id...>]` | `auto_push: true` 时检查并 commit 已 checkout 的变更;有冲突立即停止。 |
234
- | `draftgo changelog add "<完成结果>"` | 在整个任务统一验证并全部交付成功后追加一条完成结果。 |
235
- | `draftgo pull` | 仅输出迁移提示并返回非零;永不下载资源。 |
236
- | `draftgo push <type> <id...>` | 已弃用;仅对 pages/nav/docs 显示提示后转发到 `commit`。不支持 push-all 或结构化资源。 |
237
-
238
- `deploy` 的 `--delivery local` 只运行检查,`preview` 运行检查并显示 diff,`deploy` 运行检查后 commit 指定正文。它不会遍历旧索引。`push --dry-run` 只显示指定正文的 diff。
179
+ ```text
180
+ draftgo deploy <type> <id...> [--delivery local|preview|deploy]
181
+ draftgo auto-push [<type> <id...>]
182
+ draftgo work start <item>
183
+ draftgo work add <item>
184
+ draftgo work start-item <number|date#number>
185
+ draftgo work complete <number|date#number> [--note <evidence>]
186
+ draftgo work show|list
187
+ draftgo clean [--dry-run|--yes]
188
+ ```
239
189
 
240
- `auto-push` 不传 id 时只处理 manifest 中已修改的 checkout;项目未连接或 `auto_push` 未启用时安全跳过。
190
+ `draftgo work start <item>` 的文本输出会返回可直接传给后续命令的引用,例如 `Started work item #21 (2026-08-20#21)`。
241
191
 
242
- ### 更新日志
192
+ ## Worklog
243
193
 
244
- `draftgo changelog add` 写入 `.draftgo/changelog.md`。同一天继续编号;本地日期变化后追加新区块并从 `1` 开始。命令只接受单行、非空的完成结果;现有文件不符合固定格式时拒绝改写。
194
+ `.draftgo/worklog.md` 是任务、进度和完成证据的唯一记录。格式如下:
245
195
 
246
196
  ```markdown
247
- 2026-07-31
248
- ===
249
- 1. 完成文档管理系统及角色权限
250
- 2. 修复文档编辑权限问题
251
-
252
- 2026-08-01
253
- ===
254
- 1. 增加文档分类功能
197
+ [ 2026-08-09 ]
198
+ 1. [ ● ] 实现页面权限
199
+ // 正在开发
200
+ 2. [ ] 补充验收
201
+
202
+ [ 2026-08-10 ]
203
+ 1. [ √ ] 完成文档
204
+ // draftgo verify、commit 已通过
255
205
  ```
256
206
 
257
- 只记录已完成结果,不记录排查过程。统一验证、409/412 或任一交付失败时不运行该命令。
258
-
259
- ### 本地 DraftGo
260
-
261
- | 命令 | 说明 |
262
- |---|---|
263
- | `draftgo local setup` | 生成 `.draftgo/docker/docker-compose.yaml`,初始化并启动本地 DraftGo 栈。 |
264
- | `draftgo local start` | 启动本地栈;`up` 是兼容别名。 |
265
- | `draftgo local stop` | 停止本地栈;`down` 是兼容别名。 |
266
- | `draftgo local logs [service...]` | 查看日志;不传服务时跟随 `app`。 |
267
- | `draftgo local status` | 显示容器状态;`ps` 是兼容别名。 |
268
- | `draftgo local-dev` | `draftgo local setup` 的兼容入口。 |
269
-
270
- 本地 Docker、MySQL、Redis、Milvus 和 app 生命周期与 MCP/checkout 工作流相互独立。
207
+ 空状态表示待开发,`●` 表示开发中,`√` 表示开发完成。任务开始就写入记录;验证、冲突或交付失败时不能标记为完成。
271
208
 
272
- ## Worktree 与 manifest
209
+ ## 运行时目录
273
210
 
274
211
  ```text
275
212
  .draftgo/
276
213
  ├── config.json
214
+ ├── api-contract-cache.json
215
+ ├── worklog.md
277
216
  ├── worktree/
278
- ├── manifest.json
279
- ├── pages/
280
- │ ├── navigations/
281
- │ ├── docs/
282
- │ └── .base/
283
- └── conflicts/
217
+ ├── conflicts/
218
+ ├── artifacts/
219
+ └── tmp/
284
220
  ```
285
221
 
286
- `.draftgo/worktree/manifest.json` 使用 `schema_version: 1`,条目键为规范化类型和 id,例如 `pages:42`。每个条目记录:
287
-
288
- - `server`、`resource_type`、`resource_id`
289
- - `title`、`route` / `code` / `slug`
290
- - `local_path`、`base_path`
291
- - `content_type`、`file_extension`、`content_size`
292
- - `base_version`、`base_revision`、`base_etag`、`base_hash`
293
- - `checked_out_at`,commit 后还会记录更新时间
294
-
295
- 已知正文类型保持原始字节和语义:`text/html` 使用 `.html`,Markdown 使用 `.md`,纯文本使用 `.txt`,其他类型使用底座返回且通过安全校验的扩展名。CLI 不转换 HTML、Markdown 或正文编码。
296
-
297
- checkout 会通过 MCP 获取元数据和专用下载地址,流式写入临时文件,同时校验 content type、大小和 SHA-256,再原子安装 local/base 并写 manifest。commit 会校验本地结构,携带 checkout 时的 version/revision/ETag,通过专用 HTTP 上传原始正文;完整正文不会成为 MCP tool 参数。
222
+ 连接配置、契约缓存、worktree、冲突材料和截图都属于项目运行时数据并写入 `.gitignore`。`.draftgo/tmp/` 可由 `draftgo clean` 清理;需要用户查看的证据放在已注册的 `.draftgo/artifacts/` 下。
298
223
 
299
- ## 冲突处理
224
+ ## Skill 与 Reference
300
225
 
301
- 远端对 commit 返回 HTTP 409/412 时,CLI 不重试、不 force,也不会覆盖 worktree local。它会在以下目录保存冲突材料并返回非零:
226
+ Skill 只放稳定的领域知识、项目边界和操作规则;动态 operation schema MCP 提供并缓存在项目运行时。Reference 不拆成更小文件,保留按任务路由、前端运行时、安全、自定义服务、checkout MCP 契约所需的完整上下文,避免过度拆分损失效果。
302
227
 
303
- ```text
304
- .draftgo/conflicts/<pages|navigations|docs>/<id>/
305
- ├── conflict.json
306
- ├── base.<ext>
307
- ├── local.<ext>
308
- └── remote.<ext>
309
- ```
310
-
311
- 处理流程:
312
-
313
- 1. `draftgo conflict show <type> <id>` 定位三份材料和 worktree 文件。
314
- 2. 在 worktree 文件中人工或借助可靠的三方合并工具完成合并。
315
- 3. `draftgo conflict resolve <type> <id>` 校验 worktree,并把冲突时保存的 remote 版本设为新 base。
316
- 4. 重新运行 `draftgo check`、必要时 `draftgo verify`、`draftgo diff`,最后 `draftgo commit`。
228
+ 支持的 Skill target 包括 Claude Code、Cursor、Windsurf、Antigravity、Kiro、GitHub Copilot、Codex CLI、Gemini CLI 和 Pi。Pi 的项目级 Skill 安装到 `.agents/skills/draftgo/`,可被 Pi 按 Agent Skills 标准自动发现。
317
229
 
318
- ## map 与 check 输出
230
+ ## 开发与测试
319
231
 
320
- `draftgo map --output json` 返回:
321
-
322
- ```json
323
- {
324
- "server": "https://draftgo.example",
325
- "overview": {},
326
- "resources": [],
327
- "checkouts": [],
328
- "legacy_cache": { "ignored": true, "detected": [] }
329
- }
232
+ ```bash
233
+ npm run validate:skill
234
+ npm test
330
235
  ```
331
236
 
332
- `draftgo check --output json` 返回结构化的本地、远端和工作区检查结果。它以声明的 charset(默认 UTF-8)严格解码 HTML,并在内存中检查内联 JavaScript,错误直接映射到原 HTML 行列,不生成 `.draftgo/tmp/syntax/*.js`。`--strict` 会把 warnings 也视为失败。默认 `check` 不访问远端;显式使用 `--remote` 时读取实时 metadata,并把 `committed_unrecorded` 等可恢复状态指向 `draftgo reconcile`。
333
-
334
- `draftgo verify` 是交付前统一入口。无参数时只运行快速本地 `check`;`--remote` 才联网,`--url` 才启动浏览器。浏览器检查默认使用 `--frame auto`,同时检查顶层页面和可见 iframe,因此 `--selector` 可匹配 `iframe.srcdoc` 中的业务 DOM。`--viewport mobile|desktop|both` 控制目标视口,截图默认关闭。
237
+ 本地开发要求 Node.js `>=20.19`。浏览器依赖仅在显式视觉验收时使用;普通 `npm test` 不会启动浏览器。
335
238
 
336
- `.draftgo/tmp/` 是统一临时区,CLI 和 AI 产生的可丢弃中间文件必须位于 `.draftgo/tmp/<owner>/<run-id>/`;AI 自建文件使用 `.draftgo/tmp/ai/<run-id>/`。`draftgo clean --dry-run` 会列出全部 tmp 文件和已注册 artifacts,`draftgo clean --yes` 负责回收并删除空运行目录。需要保留供用户查看的截图或报告应进入 `.draftgo/artifacts/`,而不是 tmp。
239
+ 许可证:MIT
337
240
 
338
- ## Skill 与领域约定
241
+ ## Install without npm
339
242
 
340
- 安装到每个宿主的 DraftGo Skill 包含主 `SKILL.md`、`init` / `story` 子技能和按需 references。实时 API 契约以 MCP `api_search` / `api_describe` 为准;references 只保留 API 无法表达的领域知识和实践约束。
243
+ DraftGo can be installed from the China download endpoint. The installer falls back to a GitHub mirror and the official GitHub Release when the primary endpoint is unavailable.
341
244
 
342
- 前端和自定义服务的关键约定仍然适用:
343
-
344
- - 壳层源码使用 React 19 + Vite 8 + Tailwind CSS 4;数据库页面和导航以 HTML 文档运行,可加载平台内置组件库,但不进入壳层的 TSX、ESM 或 npm 构建链。
345
- - 内置 UI、图标、Chat SDK、AIHub 结构化输出以及前端运行、交互和验收规则见 `resources/skill/references/`;CLI 和 Skill 不提供页面模板。
346
- - 自定义服务使用 Go `draftgo/sdk`,通过 `Register(app *sdk.App)` 注册 Route、事件和定时任务;管理权限、调用权限、并发和出站请求约束见 `resources/skill/references/custom-services.md`。
347
- - 自定义服务、数据、AIHub、权限和系统配置通过实时 MCP/API 操作,不从 `.draftgo/*/index.json` 推断远端状态。
348
-
349
- `draftgo update` 只刷新 CLI 和 Skill 资源,不覆盖项目的 `.draftgo/config.json`、worktree、冲突材料、Task、lessons 或 changelog。渲染 Skill 时,`{{SKILL_DIR}}` / `{{SKILL_SCRIPTS}}` 会替换为当前宿主目录;CLI 不改写项目的 `AGENTS.md` 或 `GEMINI.md`。
350
-
351
- ## 常用选项
352
-
353
- - `--project <dir>`:操作指定项目目录,默认当前目录。
354
- - `--output json`:为 map、check、checkout、commit、diff、conflicts、conflict、api 或 delete 输出 JSON。
355
- - `--type <type>`:限制 `map` 查询一种正文资源类型;支持 pages、nav/navigations、docs/articles 及其别名。
356
- - `--strict`:check/deploy/auto-push 将 warnings 视为失败。
357
- - `--remote`:让 check 按需对比 checkout 的远端版本和 hash;默认仍为快速离线检查。
358
- - `--force`:init 覆盖已有 Skill;checkout 显式覆盖已修改的本地正文。update 始终刷新目标 Skill。
359
- - `--purge`:uninstall 时同时删除整个 `.draftgo/` 运行时目录。
360
- - `--skip-update-check`:update 不访问 npm,直接用当前 CLI 刷新 Skill。
361
- - `--connect` / `--local-dev` / `--no-setup`:控制 init 安装 Skill 后的基座处理流程。
362
- - `--target <name,...>`:为 MCP setup/status 指定一个或多个宿主。
363
- - `--server <url>` / `--token <sat>`:非交互 connect;不传时安全提示输入。
364
- - `--mcp-url <url>`:为 connect 显式指定完整 MCP endpoint;标准 `/mcp` 可自动推导基础地址,自定义路径需同时传 `--server`。
365
- - `--allow-offline` / `--no-mcp-setup`:允许 connect 在 MCP 暂不可用时保存,或跳过宿主配置。
366
- - `--yes`:跳过支持该选项的交互确认。
367
- - `--ui auto|always|never`:控制 verify 的浏览器验证;默认 auto,只在提供 `--url` 时运行。
368
- - `--viewport mobile|desktop|both`:控制 verify 的目标视口;不传时使用 `--width/--height` 或 390x844。
369
- - `--frame auto|top|all|<iframe-selector>`:控制 verify 检查哪些 frame;默认检查顶层与可见 iframe。
370
- - `--resource <type:id>`:兼容入口使用;推荐直接写 `draftgo verify pages 42 --url ...`。
371
- - `--browser-path <file>`:verify 显式使用浏览器可执行文件;也可设置 `DRAFTGO_BROWSER_PATH`,否则自动查找系统浏览器和 Playwright 缓存。
372
- - `--token auto|never`:verify 默认读取 `.draftgo/config.json`,对与 `server` 同源的地址自动附加 `token=<SAT>`;配置无 SAT、跨源地址或 `never` 模式均不附加。
373
- - `--screenshot on-failure|always|never`:控制 UI 截图。
374
- - `--delivery local|preview|deploy`:控制 deploy 行为。
375
- - `--timeout <ms>`:控制 connect 或 MCP test 的远端请求超时。
376
-
377
- 设置 `DRAFTGO_NO_UPDATE_CHECK=1` 可关闭 npm 版本检查,适用于离线或 CI 环境。
245
+ ```bash
246
+ # macOS / Linux
247
+ curl -fsSL https://draftgo.cn/draftgo-cli/install.sh | sh
378
248
 
379
- ## 许可证
249
+ # Windows PowerShell
250
+ irm https://draftgo.cn/draftgo-cli/install.ps1 | iex
251
+ ```
380
252
 
381
- MIT
253
+ The download source can be overridden with `DRAFTGO_INSTALL_BASE_URL`, the GitHub Release mirror with `DRAFTGO_GITHUB_MIRROR`, and the version with `DRAFTGO_VERSION`. The CLI archive includes its npm dependencies but currently requires Node.js >=20.19.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "draftgo-cli",
3
- "version": "3.0.56",
4
- "description": "Install and manage the DraftGo skill across AI coding agents (Claude Code, Codex, Cursor, Windsurf, Antigravity, Copilot, Gemini, Kiro).",
3
+ "version": "4.0.22",
4
+ "description": "Install and manage the DraftGo skill across AI coding agents (Claude Code, Codex, Cursor, Windsurf, Antigravity, Copilot, Gemini, Kiro, Pi).",
5
5
  "bin": {
6
6
  "draftgo": "bin/draftgo.js"
7
7
  },
@@ -29,7 +29,8 @@
29
29
  "antigravity",
30
30
  "copilot",
31
31
  "gemini",
32
- "kiro"
32
+ "kiro",
33
+ "pi"
33
34
  ],
34
35
  "author": "draftgo <cabinai@163.com> (https://github.com/draftgo)",
35
36
  "license": "MIT",
@@ -44,14 +45,18 @@
44
45
  "scripts": {
45
46
  "lint": "node scripts/check-syntax.js",
46
47
  "validate:skill": "node scripts/validate-skill.js",
48
+ "sync:custom-service-sdk": "node scripts/sync-custom-service-sdk.js",
49
+ "build:release": "node scripts/build-release.js",
47
50
  "verify:package": "node scripts/verify-package.js",
48
- "test": "npm run lint && npm run validate:skill && npm run verify:package && npm run test:unit && npm run test:workflow && npm run test:changelog && npm run test:mcp && npm run test:worktree && npm run test:migration && npm run test:local && npm run test:e2e",
51
+ "test": "npm run lint && npm run validate:skill && npm run verify:package && npm run test:unit && npm run test:components && npm run test:capabilities && npm run test:workflow && npm run test:worklog && npm run test:mcp && npm run test:worktree && npm run test:integration && npm run test:local && npm run test:e2e",
49
52
  "test:unit": "node tests/unit.js",
50
- "test:workflow": "node tests/workflow-upgrade.test.js",
51
- "test:changelog": "node tests/changelog.test.js",
53
+ "test:components": "node --test tests/components.test.js",
54
+ "test:capabilities": "node --test tests/capabilities.test.js",
55
+ "test:workflow": "node tests/workflow.test.js",
56
+ "test:worklog": "node tests/worklog.test.js",
52
57
  "test:mcp": "node tests/mcp.test.js",
53
58
  "test:worktree": "node tests/worktree.test.js",
54
- "test:migration": "node tests/migration.test.js",
59
+ "test:integration": "node tests/integration.test.js",
55
60
  "test:local": "node tests/local-runtime.js",
56
61
  "test:e2e": "node tests/e2e.js"
57
62
  },