@aipper/aiws-spec 0.0.17 → 0.0.19

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 (36) hide show
  1. package/package.json +1 -1
  2. package/templates/workspace/.agents/skills/ws-bugfix/SKILL.md +88 -0
  3. package/templates/workspace/.claude/commands/aiws-change-archive.md +22 -0
  4. package/templates/workspace/.claude/commands/aiws-change-finish.md +22 -0
  5. package/templates/workspace/.claude/commands/aiws-change-list.md +21 -0
  6. package/templates/workspace/.claude/commands/aiws-change-new.md +22 -0
  7. package/templates/workspace/.claude/commands/aiws-change-next.md +22 -0
  8. package/templates/workspace/.claude/commands/aiws-change-start.md +22 -0
  9. package/templates/workspace/.claude/commands/aiws-change-status.md +22 -0
  10. package/templates/workspace/.claude/commands/aiws-change-sync.md +22 -0
  11. package/templates/workspace/.claude/commands/aiws-change-templates-init.md +21 -0
  12. package/templates/workspace/.claude/commands/aiws-change-templates-which.md +21 -0
  13. package/templates/workspace/.claude/commands/aiws-change-validate.md +22 -0
  14. package/templates/workspace/.claude/commands/aiws-hooks-install.md +21 -0
  15. package/templates/workspace/.claude/commands/aiws-hooks-status.md +21 -0
  16. package/templates/workspace/.claude/commands/ws-bugfix.md +27 -0
  17. package/templates/workspace/.claude/commands/ws-plan-verify.md +25 -0
  18. package/templates/workspace/.claude/commands/ws-plan.md +17 -0
  19. package/templates/workspace/.opencode/command/aiws-change-archive.md +25 -0
  20. package/templates/workspace/.opencode/command/aiws-change-finish.md +25 -0
  21. package/templates/workspace/.opencode/command/aiws-change-list.md +24 -0
  22. package/templates/workspace/.opencode/command/aiws-change-new.md +25 -0
  23. package/templates/workspace/.opencode/command/aiws-change-next.md +25 -0
  24. package/templates/workspace/.opencode/command/aiws-change-start.md +25 -0
  25. package/templates/workspace/.opencode/command/aiws-change-status.md +25 -0
  26. package/templates/workspace/.opencode/command/aiws-change-sync.md +25 -0
  27. package/templates/workspace/.opencode/command/aiws-change-templates-init.md +24 -0
  28. package/templates/workspace/.opencode/command/aiws-change-templates-which.md +24 -0
  29. package/templates/workspace/.opencode/command/aiws-change-validate.md +25 -0
  30. package/templates/workspace/.opencode/command/aiws-hooks-install.md +24 -0
  31. package/templates/workspace/.opencode/command/aiws-hooks-status.md +24 -0
  32. package/templates/workspace/.opencode/command/ws-bugfix.md +30 -0
  33. package/templates/workspace/.opencode/command/ws-plan-verify.md +28 -0
  34. package/templates/workspace/.opencode/command/ws-plan.md +20 -0
  35. package/templates/workspace/AGENTS.md +1 -0
  36. package/templates/workspace/manifest.json +310 -50
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aipper/aiws-spec",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "description": "AIWS spec and templates (single source of truth).",
5
5
  "type": "module",
6
6
  "files": [
@@ -0,0 +1,88 @@
1
+ ---
2
+ name: ws-bugfix
3
+ description: 缺陷修复(通过禅道 MCP 拉取 bug 与附件,下载图片证据,汇总到 issues/fix_bus_issues.csv,并绑定到 changes/<change-id>/)
4
+ ---
5
+
6
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
7
+
8
+ 目标:
9
+ - 用禅道 MCP 拉取 bug 详情与附件(尤其图片)
10
+ - 把证据落盘到 `changes/<change-id>/bug/`(避免只停留在对话)
11
+ - 把修复任务汇总/更新到 `issues/fix_bus_issues.csv`
12
+ - 与 `ws-dev` / `aiws change` 流程绑定,确保可追溯、可验证
13
+
14
+ 非目标(强制):
15
+ - 不自动 commit / push
16
+ - 不写入任何 secrets(token、cookie、内网地址)
17
+ - 不在无法复现时直接改代码(先产出阻塞信息)
18
+
19
+ 前置:
20
+ 1) 先运行 `$ws-preflight`。
21
+ 2) 准备 `change-id`(建议:`bug-<bug-id>` 或 `bugfix-<bug-id>-<slug>`)。
22
+ 3) 建立变更工件(推荐):
23
+ ```bash
24
+ aiws change start <change-id> --hooks
25
+ # superproject + submodule 推荐:
26
+ aiws change start <change-id> --hooks --worktree --submodules
27
+ ```
28
+
29
+ 建议流程(按顺序):
30
+
31
+ ## 1) 通过禅道 MCP 拉取 bug
32
+ - 使用当前会话中已启用的 zentao MCP 工具获取:
33
+ - `bug_id`、标题、优先级/严重级、模块、状态、指派人
34
+ - 重现步骤、期望结果、实际结果
35
+ - 附件列表(含图片 URL/文件名)
36
+ - 若当前环境没有 zentao MCP 工具:立即停止并提示用户先配置,不要猜数据。
37
+
38
+ ## 2) 证据落盘(强制)
39
+ 在 `changes/<change-id>/bug/` 下落盘:
40
+ - `zentao-bug-<bug-id>.json`:原始字段快照(避免信息丢失)
41
+ - `zentao-bug-<bug-id>.md`:人类可读摘要(复现步骤/期望/实际/风险)
42
+ - `images/<bug-id>/...`:下载的图片附件(保留原扩展名)
43
+
44
+ 建议目录:
45
+ ```text
46
+ changes/<change-id>/bug/
47
+ zentao-bug-<bug-id>.json
48
+ zentao-bug-<bug-id>.md
49
+ images/<bug-id>/
50
+ ```
51
+
52
+ ## 3) 汇总到 issues/fix_bus_issues.csv(upsert)
53
+ - 目标文件:`issues/fix_bus_issues.csv`
54
+ - 若文件不存在,先创建表头:
55
+ ```csv
56
+ Bug_ID,Title,Severity,Module,Status,Assigned_To,Change_ID,Image_Count,Image_Paths,Evidence_Path,Verify_Command,Fix_Status,Updated_At,Notes
57
+ ```
58
+ - 以 `Bug_ID` 为主键 upsert:
59
+ - 已存在:更新状态/证据/图片路径
60
+ - 不存在:新增一行
61
+
62
+ 字段约束:
63
+ - `Change_ID`:必须等于当前 `change-id`
64
+ - `Evidence_Path`:指向 `changes/<change-id>/bug/zentao-bug-<bug-id>.md`
65
+ - `Image_Paths`:多个路径用 `;` 分隔
66
+ - `Fix_Status`:`TODO|DOING|DONE|BLOCKED`
67
+
68
+ ## 4) 修复执行与回填
69
+ - 进入 `$ws-dev` 做最小改动修复。
70
+ - 完成后回填 `issues/fix_bus_issues.csv`:
71
+ - `Fix_Status`
72
+ - `Verify_Command`
73
+ - `Updated_At`
74
+ - `Notes`(必要时写阻塞原因)
75
+
76
+ ## 5) 验证与交付
77
+ ```bash
78
+ aiws change validate <change-id> --strict
79
+ aiws validate . --stamp
80
+ ```
81
+ - 需要提交时走 `$ws-commit`。
82
+ - 需要收尾合并时走 `$ws-finish`(或在 superproject + submodule 场景走 `$ws-deliver`)。
83
+
84
+ 输出要求:
85
+ - `Change_ID:` `<change-id>`
86
+ - `CSV:` `issues/fix_bus_issues.csv` 中对应 `Bug_ID` 行的关键字段
87
+ - `Evidence:` `changes/<change-id>/bug/zentao-bug-<bug-id>.md` + 图片目录
88
+ - `Verify:` 实际运行命令与结果(未运行不声称已运行)
@@ -0,0 +1,22 @@
1
+ <!-- AIWS_MANAGED_BEGIN:claude:aiws-change-archive -->
2
+ # aiws change archive
3
+
4
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
5
+
6
+ 目标:
7
+ - 归档已完成 change 工件
8
+
9
+ 执行(在仓库根目录):
10
+ ```bash
11
+ change_id="<change-id>"
12
+ if [[ -x "./node_modules/.bin/aiws" ]]; then
13
+ ./node_modules/.bin/aiws change archive "${change_id}"
14
+ elif command -v aiws >/dev/null 2>&1; then
15
+ aiws change archive "${change_id}"
16
+ else
17
+ npx @aipper/aiws change archive "${change_id}"
18
+ fi
19
+ ```
20
+ <!-- AIWS_MANAGED_END:claude:aiws-change-archive -->
21
+
22
+ 可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
@@ -0,0 +1,22 @@
1
+ <!-- AIWS_MANAGED_BEGIN:claude:aiws-change-finish -->
2
+ # aiws change finish
3
+
4
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
5
+
6
+ 目标:
7
+ - 将 change/<change-id> 安全 fast-forward 合并回目标分支
8
+
9
+ 执行(在仓库根目录):
10
+ ```bash
11
+ change_id="<change-id>" # 可留空(若当前分支可推断)
12
+ if [[ -x "./node_modules/.bin/aiws" ]]; then
13
+ ./node_modules/.bin/aiws change finish "${change_id}"
14
+ elif command -v aiws >/dev/null 2>&1; then
15
+ aiws change finish "${change_id}"
16
+ else
17
+ npx @aipper/aiws change finish "${change_id}"
18
+ fi
19
+ ```
20
+ <!-- AIWS_MANAGED_END:claude:aiws-change-finish -->
21
+
22
+ 可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
@@ -0,0 +1,21 @@
1
+ <!-- AIWS_MANAGED_BEGIN:claude:aiws-change-list -->
2
+ # aiws change list
3
+
4
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
5
+
6
+ 目标:
7
+ - 列出当前仓库 change 工件
8
+
9
+ 执行(在仓库根目录):
10
+ ```bash
11
+ if [[ -x "./node_modules/.bin/aiws" ]]; then
12
+ ./node_modules/.bin/aiws change list
13
+ elif command -v aiws >/dev/null 2>&1; then
14
+ aiws change list
15
+ else
16
+ npx @aipper/aiws change list
17
+ fi
18
+ ```
19
+ <!-- AIWS_MANAGED_END:claude:aiws-change-list -->
20
+
21
+ 可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
@@ -0,0 +1,22 @@
1
+ <!-- AIWS_MANAGED_BEGIN:claude:aiws-change-new -->
2
+ # aiws change new
3
+
4
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
5
+
6
+ 目标:
7
+ - 创建 changes/<change-id> 工件目录与基础文件
8
+
9
+ 执行(在仓库根目录):
10
+ ```bash
11
+ change_id="<change-id>"
12
+ if [[ -x "./node_modules/.bin/aiws" ]]; then
13
+ ./node_modules/.bin/aiws change new "${change_id}"
14
+ elif command -v aiws >/dev/null 2>&1; then
15
+ aiws change new "${change_id}"
16
+ else
17
+ npx @aipper/aiws change new "${change_id}"
18
+ fi
19
+ ```
20
+ <!-- AIWS_MANAGED_END:claude:aiws-change-new -->
21
+
22
+ 可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
@@ -0,0 +1,22 @@
1
+ <!-- AIWS_MANAGED_BEGIN:claude:aiws-change-next -->
2
+ # aiws change next
3
+
4
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
5
+
6
+ 目标:
7
+ - 输出 change 下一步建议动作
8
+
9
+ 执行(在仓库根目录):
10
+ ```bash
11
+ change_id="<change-id>" # 可留空(若当前分支可推断)
12
+ if [[ -x "./node_modules/.bin/aiws" ]]; then
13
+ ./node_modules/.bin/aiws change next "${change_id}"
14
+ elif command -v aiws >/dev/null 2>&1; then
15
+ aiws change next "${change_id}"
16
+ else
17
+ npx @aipper/aiws change next "${change_id}"
18
+ fi
19
+ ```
20
+ <!-- AIWS_MANAGED_END:claude:aiws-change-next -->
21
+
22
+ 可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
@@ -0,0 +1,22 @@
1
+ <!-- AIWS_MANAGED_BEGIN:claude:aiws-change-start -->
2
+ # aiws change start
3
+
4
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
5
+
6
+ 目标:
7
+ - 切到 change/<change-id> 并初始化变更工件
8
+
9
+ 执行(在仓库根目录):
10
+ ```bash
11
+ change_id="<change-id>"
12
+ if [[ -x "./node_modules/.bin/aiws" ]]; then
13
+ ./node_modules/.bin/aiws change start "${change_id}"
14
+ elif command -v aiws >/dev/null 2>&1; then
15
+ aiws change start "${change_id}"
16
+ else
17
+ npx @aipper/aiws change start "${change_id}"
18
+ fi
19
+ ```
20
+ <!-- AIWS_MANAGED_END:claude:aiws-change-start -->
21
+
22
+ 可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
@@ -0,0 +1,22 @@
1
+ <!-- AIWS_MANAGED_BEGIN:claude:aiws-change-status -->
2
+ # aiws change status
3
+
4
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
5
+
6
+ 目标:
7
+ - 查看 change 当前状态与阻断项
8
+
9
+ 执行(在仓库根目录):
10
+ ```bash
11
+ change_id="<change-id>" # 可留空(若当前分支可推断)
12
+ if [[ -x "./node_modules/.bin/aiws" ]]; then
13
+ ./node_modules/.bin/aiws change status "${change_id}"
14
+ elif command -v aiws >/dev/null 2>&1; then
15
+ aiws change status "${change_id}"
16
+ else
17
+ npx @aipper/aiws change status "${change_id}"
18
+ fi
19
+ ```
20
+ <!-- AIWS_MANAGED_END:claude:aiws-change-status -->
21
+
22
+ 可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
@@ -0,0 +1,22 @@
1
+ <!-- AIWS_MANAGED_BEGIN:claude:aiws-change-sync -->
2
+ # aiws change sync
3
+
4
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
5
+
6
+ 目标:
7
+ - 同步当前 change 与真值文件基线
8
+
9
+ 执行(在仓库根目录):
10
+ ```bash
11
+ change_id="<change-id>"
12
+ if [[ -x "./node_modules/.bin/aiws" ]]; then
13
+ ./node_modules/.bin/aiws change sync "${change_id}"
14
+ elif command -v aiws >/dev/null 2>&1; then
15
+ aiws change sync "${change_id}"
16
+ else
17
+ npx @aipper/aiws change sync "${change_id}"
18
+ fi
19
+ ```
20
+ <!-- AIWS_MANAGED_END:claude:aiws-change-sync -->
21
+
22
+ 可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
@@ -0,0 +1,21 @@
1
+ <!-- AIWS_MANAGED_BEGIN:claude:aiws-change-templates-init -->
2
+ # aiws change templates init
3
+
4
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
5
+
6
+ 目标:
7
+ - 初始化 changes/templates 覆盖模板
8
+
9
+ 执行(在仓库根目录):
10
+ ```bash
11
+ if [[ -x "./node_modules/.bin/aiws" ]]; then
12
+ ./node_modules/.bin/aiws change templates init
13
+ elif command -v aiws >/dev/null 2>&1; then
14
+ aiws change templates init
15
+ else
16
+ npx @aipper/aiws change templates init
17
+ fi
18
+ ```
19
+ <!-- AIWS_MANAGED_END:claude:aiws-change-templates-init -->
20
+
21
+ 可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
@@ -0,0 +1,21 @@
1
+ <!-- AIWS_MANAGED_BEGIN:claude:aiws-change-templates-which -->
2
+ # aiws change templates which
3
+
4
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
5
+
6
+ 目标:
7
+ - 查看 change 模板来源
8
+
9
+ 执行(在仓库根目录):
10
+ ```bash
11
+ if [[ -x "./node_modules/.bin/aiws" ]]; then
12
+ ./node_modules/.bin/aiws change templates which
13
+ elif command -v aiws >/dev/null 2>&1; then
14
+ aiws change templates which
15
+ else
16
+ npx @aipper/aiws change templates which
17
+ fi
18
+ ```
19
+ <!-- AIWS_MANAGED_END:claude:aiws-change-templates-which -->
20
+
21
+ 可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
@@ -0,0 +1,22 @@
1
+ <!-- AIWS_MANAGED_BEGIN:claude:aiws-change-validate -->
2
+ # aiws change validate
3
+
4
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
5
+
6
+ 目标:
7
+ - 按严格模式校验变更工件与绑定关系
8
+
9
+ 执行(在仓库根目录):
10
+ ```bash
11
+ change_id="<change-id>"
12
+ if [[ -x "./node_modules/.bin/aiws" ]]; then
13
+ ./node_modules/.bin/aiws change validate "${change_id}"
14
+ elif command -v aiws >/dev/null 2>&1; then
15
+ aiws change validate "${change_id}"
16
+ else
17
+ npx @aipper/aiws change validate "${change_id}"
18
+ fi
19
+ ```
20
+ <!-- AIWS_MANAGED_END:claude:aiws-change-validate -->
21
+
22
+ 可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
@@ -0,0 +1,21 @@
1
+ <!-- AIWS_MANAGED_BEGIN:claude:aiws-hooks-install -->
2
+ # aiws hooks install
3
+
4
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
5
+
6
+ 目标:
7
+ - 启用 git hooks 门禁(core.hooksPath=.githooks)
8
+
9
+ 执行(在仓库根目录):
10
+ ```bash
11
+ if [[ -x "./node_modules/.bin/aiws" ]]; then
12
+ ./node_modules/.bin/aiws hooks install .
13
+ elif command -v aiws >/dev/null 2>&1; then
14
+ aiws hooks install .
15
+ else
16
+ npx @aipper/aiws hooks install .
17
+ fi
18
+ ```
19
+ <!-- AIWS_MANAGED_END:claude:aiws-hooks-install -->
20
+
21
+ 可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
@@ -0,0 +1,21 @@
1
+ <!-- AIWS_MANAGED_BEGIN:claude:aiws-hooks-status -->
2
+ # aiws hooks status
3
+
4
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
5
+
6
+ 目标:
7
+ - 查看当前仓库 hooks 门禁状态(只读)
8
+
9
+ 执行(在仓库根目录):
10
+ ```bash
11
+ if [[ -x "./node_modules/.bin/aiws" ]]; then
12
+ ./node_modules/.bin/aiws hooks status .
13
+ elif command -v aiws >/dev/null 2>&1; then
14
+ aiws hooks status .
15
+ else
16
+ npx @aipper/aiws hooks status .
17
+ fi
18
+ ```
19
+ <!-- AIWS_MANAGED_END:claude:aiws-hooks-status -->
20
+
21
+ 可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
@@ -0,0 +1,27 @@
1
+ <!-- AIWS_MANAGED_BEGIN:claude:ws-bugfix -->
2
+ # ws bugfix
3
+
4
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
5
+
6
+ 目标:
7
+ - 通过禅道 MCP 拉单、图片证据落盘并汇总 `issues/fix_bus_issues.csv`。
8
+
9
+ 建议流程:
10
+ 1) 先运行 `/ws-preflight`。
11
+ 2) 建立变更工件(推荐):`aiws change start <change-id> --hooks`(superproject+submodule 可用 `--worktree --submodules`)。
12
+ 3) 通过已配置 zentao MCP 拉取 bug 字段与附件列表。
13
+ 4) 落盘证据到 `changes/<change-id>/bug/`:
14
+ - `zentao-bug-<bug-id>.json`
15
+ - `zentao-bug-<bug-id>.md`
16
+ - `images/<bug-id>/...`
17
+ 5) upsert `issues/fix_bus_issues.csv`(主键 `Bug_ID`)。
18
+ 6) 进入 `/ws-dev` 修复并回填 `Fix_Status/Verify_Command/Updated_At`。
19
+ 7) 质量门:`aiws change validate <change-id> --strict` + `aiws validate . --stamp`。
20
+
21
+ 强制约束:
22
+ - 不自动 commit / push。
23
+ - 不写入 secrets(token、cookie、内网地址)。
24
+ - 无法复现时先输出阻塞信息并落盘,不直接改代码。
25
+ <!-- AIWS_MANAGED_END:claude:ws-bugfix -->
26
+
27
+ 可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
@@ -0,0 +1,25 @@
1
+ <!-- AIWS_MANAGED_BEGIN:claude:ws-plan-verify -->
2
+ # ws plan verify
3
+
4
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
5
+
6
+ 目标:
7
+ - 执行前检查计划是否跑偏,并给出最小修正项。
8
+
9
+ 执行建议:
10
+ 1) 先运行 `/ws-preflight`。
11
+ 2) 运行严格门禁:
12
+ ```bash
13
+ if [[ -x "./node_modules/.bin/aiws" ]]; then
14
+ ./node_modules/.bin/aiws change validate <change-id> --strict
15
+ elif command -v aiws >/dev/null 2>&1; then
16
+ aiws change validate <change-id> --strict
17
+ else
18
+ npx @aipper/aiws change validate <change-id> --strict
19
+ fi
20
+ ```
21
+ 3) 若失败:先修 `proposal.md` / `plan` 的绑定字段与验证命令,再复跑。
22
+ 4) 通过后再进入 `/ws-dev`。
23
+ <!-- AIWS_MANAGED_END:claude:ws-plan-verify -->
24
+
25
+ 可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
@@ -0,0 +1,17 @@
1
+ <!-- AIWS_MANAGED_BEGIN:claude:ws-plan -->
2
+ # ws plan
3
+
4
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
5
+
6
+ 目标:
7
+ - 生成可落盘执行计划(供 /ws-dev 执行)。
8
+
9
+ 执行建议:
10
+ 1) 先运行 `/ws-preflight`(对齐 `AI_PROJECT.md` / `REQUIREMENTS.md` / `AI_WORKSPACE.md`)。
11
+ 2) 生成或更新计划文件:`plan/YYYY-MM-DD_HH-MM-SS-<slug>.md`。
12
+ 3) 计划至少包含:`Bindings`、`Goal`、`Non-goals`、`Scope`、`Plan`、`Verify`、`Risks & Rollback`、`Evidence`。
13
+ 4) 若已有 `changes/<change-id>/proposal.md`,对齐 `Plan_File` / `Contract_Row` / `Evidence_Path`。
14
+ 5) 完成后先运行 `/ws-plan-verify`,通过再进入 `/ws-dev`。
15
+ <!-- AIWS_MANAGED_END:claude:ws-plan -->
16
+
17
+ 可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
@@ -0,0 +1,25 @@
1
+ ---
2
+ description: 变更归档:归档已完成的 change 工件
3
+ ---
4
+ <!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-archive -->
5
+ # aiws change archive
6
+
7
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
+
9
+ 目标:
10
+ - 归档已完成 change 工件
11
+
12
+ 执行(在仓库根目录):
13
+ ```bash
14
+ change_id="<change-id>"
15
+ if [[ -x "./node_modules/.bin/aiws" ]]; then
16
+ ./node_modules/.bin/aiws change archive "${change_id}"
17
+ elif command -v aiws >/dev/null 2>&1; then
18
+ aiws change archive "${change_id}"
19
+ else
20
+ npx @aipper/aiws change archive "${change_id}"
21
+ fi
22
+ ```
23
+ <!-- AIWS_MANAGED_END:opencode:aiws-change-archive -->
24
+
25
+ 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -0,0 +1,25 @@
1
+ ---
2
+ description: 变更收尾:安全合并 change 分支回目标分支
3
+ ---
4
+ <!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-finish -->
5
+ # aiws change finish
6
+
7
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
+
9
+ 目标:
10
+ - 将 change/<change-id> 安全 fast-forward 合并回目标分支
11
+
12
+ 执行(在仓库根目录):
13
+ ```bash
14
+ change_id="<change-id>" # 可留空(若当前分支可推断)
15
+ if [[ -x "./node_modules/.bin/aiws" ]]; then
16
+ ./node_modules/.bin/aiws change finish "${change_id}"
17
+ elif command -v aiws >/dev/null 2>&1; then
18
+ aiws change finish "${change_id}"
19
+ else
20
+ npx @aipper/aiws change finish "${change_id}"
21
+ fi
22
+ ```
23
+ <!-- AIWS_MANAGED_END:opencode:aiws-change-finish -->
24
+
25
+ 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -0,0 +1,24 @@
1
+ ---
2
+ description: 变更列表:列出当前仓库 change 工件
3
+ ---
4
+ <!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-list -->
5
+ # aiws change list
6
+
7
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
+
9
+ 目标:
10
+ - 列出当前仓库 change 工件
11
+
12
+ 执行(在仓库根目录):
13
+ ```bash
14
+ if [[ -x "./node_modules/.bin/aiws" ]]; then
15
+ ./node_modules/.bin/aiws change list
16
+ elif command -v aiws >/dev/null 2>&1; then
17
+ aiws change list
18
+ else
19
+ npx @aipper/aiws change list
20
+ fi
21
+ ```
22
+ <!-- AIWS_MANAGED_END:opencode:aiws-change-list -->
23
+
24
+ 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -0,0 +1,25 @@
1
+ ---
2
+ description: 变更新建:创建 changes/<change-id> 工件
3
+ ---
4
+ <!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-new -->
5
+ # aiws change new
6
+
7
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
+
9
+ 目标:
10
+ - 创建 changes/<change-id> 工件目录与基础文件
11
+
12
+ 执行(在仓库根目录):
13
+ ```bash
14
+ change_id="<change-id>"
15
+ if [[ -x "./node_modules/.bin/aiws" ]]; then
16
+ ./node_modules/.bin/aiws change new "${change_id}"
17
+ elif command -v aiws >/dev/null 2>&1; then
18
+ aiws change new "${change_id}"
19
+ else
20
+ npx @aipper/aiws change new "${change_id}"
21
+ fi
22
+ ```
23
+ <!-- AIWS_MANAGED_END:opencode:aiws-change-new -->
24
+
25
+ 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -0,0 +1,25 @@
1
+ ---
2
+ description: 变更下一步:输出当前 change 的建议动作
3
+ ---
4
+ <!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-next -->
5
+ # aiws change next
6
+
7
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
+
9
+ 目标:
10
+ - 输出 change 下一步建议动作
11
+
12
+ 执行(在仓库根目录):
13
+ ```bash
14
+ change_id="<change-id>" # 可留空(若当前分支可推断)
15
+ if [[ -x "./node_modules/.bin/aiws" ]]; then
16
+ ./node_modules/.bin/aiws change next "${change_id}"
17
+ elif command -v aiws >/dev/null 2>&1; then
18
+ aiws change next "${change_id}"
19
+ else
20
+ npx @aipper/aiws change next "${change_id}"
21
+ fi
22
+ ```
23
+ <!-- AIWS_MANAGED_END:opencode:aiws-change-next -->
24
+
25
+ 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -0,0 +1,25 @@
1
+ ---
2
+ description: 变更开始:切到 change/<change-id> 并初始化工件
3
+ ---
4
+ <!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-start -->
5
+ # aiws change start
6
+
7
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
+
9
+ 目标:
10
+ - 切到 change/<change-id> 并初始化变更工件
11
+
12
+ 执行(在仓库根目录):
13
+ ```bash
14
+ change_id="<change-id>"
15
+ if [[ -x "./node_modules/.bin/aiws" ]]; then
16
+ ./node_modules/.bin/aiws change start "${change_id}"
17
+ elif command -v aiws >/dev/null 2>&1; then
18
+ aiws change start "${change_id}"
19
+ else
20
+ npx @aipper/aiws change start "${change_id}"
21
+ fi
22
+ ```
23
+ <!-- AIWS_MANAGED_END:opencode:aiws-change-start -->
24
+
25
+ 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -0,0 +1,25 @@
1
+ ---
2
+ description: 变更状态:查看 change 状态与阻断项
3
+ ---
4
+ <!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-status -->
5
+ # aiws change status
6
+
7
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
+
9
+ 目标:
10
+ - 查看 change 当前状态与阻断项
11
+
12
+ 执行(在仓库根目录):
13
+ ```bash
14
+ change_id="<change-id>" # 可留空(若当前分支可推断)
15
+ if [[ -x "./node_modules/.bin/aiws" ]]; then
16
+ ./node_modules/.bin/aiws change status "${change_id}"
17
+ elif command -v aiws >/dev/null 2>&1; then
18
+ aiws change status "${change_id}"
19
+ else
20
+ npx @aipper/aiws change status "${change_id}"
21
+ fi
22
+ ```
23
+ <!-- AIWS_MANAGED_END:opencode:aiws-change-status -->
24
+
25
+ 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。