@aipper/aiws-spec 0.0.51 → 0.0.53

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 (102) hide show
  1. package/docs/pi-plugins-manifest.json +10 -9
  2. package/docs/pi-plugins-manifest.md +6 -6
  3. package/docs/skill-manifest.json +18 -0
  4. package/package.json +1 -1
  5. package/templates/workspace/.opencode/README.md +49 -0
  6. package/templates/workspace/.opencode/command/ws-frontend-design.md +17 -0
  7. package/templates/workspace/.opencode/commands/using-aiws.md +18 -7
  8. package/templates/workspace/.opencode/plugins/memory-autoload.js +185 -0
  9. package/templates/workspace/.opencode/skills/codebase-design/SKILL.md +114 -0
  10. package/templates/workspace/.opencode/skills/domain-modeling/SKILL.md +74 -0
  11. package/templates/workspace/.opencode/skills/grill-with-docs/SKILL.md +7 -0
  12. package/templates/workspace/.opencode/skills/tdd/SKILL.md +36 -0
  13. package/templates/workspace/.opencode/skills/using-aiws/SKILL.md +2 -1
  14. package/templates/workspace/.opencode/skills/ws-dev/SKILL.md +24 -3
  15. package/templates/workspace/.opencode/skills/ws-plan/SKILL.md +15 -1
  16. package/templates/workspace/.opencode/skills/ws-review/SKILL.md +22 -0
  17. package/templates/workspace/AGENTS.md +13 -0
  18. package/templates/workspace/manifest.json +9 -121
  19. package/templates/workspace/.opencode/command/p-aiws-change-archive.md +0 -27
  20. package/templates/workspace/.opencode/command/p-aiws-change-finish.md +0 -27
  21. package/templates/workspace/.opencode/command/p-aiws-change-list.md +0 -26
  22. package/templates/workspace/.opencode/command/p-aiws-change-new.md +0 -27
  23. package/templates/workspace/.opencode/command/p-aiws-change-next.md +0 -27
  24. package/templates/workspace/.opencode/command/p-aiws-change-start.md +0 -27
  25. package/templates/workspace/.opencode/command/p-aiws-change-status.md +0 -27
  26. package/templates/workspace/.opencode/command/p-aiws-change-sync.md +0 -27
  27. package/templates/workspace/.opencode/command/p-aiws-change-templates-init.md +0 -26
  28. package/templates/workspace/.opencode/command/p-aiws-change-templates-which.md +0 -26
  29. package/templates/workspace/.opencode/command/p-aiws-change-validate.md +0 -27
  30. package/templates/workspace/.opencode/command/p-aiws-hooks-install.md +0 -26
  31. package/templates/workspace/.opencode/command/p-aiws-hooks-status.md +0 -26
  32. package/templates/workspace/.opencode/command/p-aiws-init.md +0 -23
  33. package/templates/workspace/.opencode/command/p-aiws-rollback.md +0 -16
  34. package/templates/workspace/.opencode/command/p-aiws-update.md +0 -22
  35. package/templates/workspace/.opencode/command/p-aiws-validate.md +0 -17
  36. package/templates/workspace/.opencode/command/ws-analyze.md +0 -30
  37. package/templates/workspace/.opencode/command/ws-auto.md +0 -33
  38. package/templates/workspace/.opencode/command/ws-autonomy.md +0 -25
  39. package/templates/workspace/.opencode/command/ws-bugfix.md +0 -35
  40. package/templates/workspace/.opencode/command/ws-commit.md +0 -87
  41. package/templates/workspace/.opencode/command/ws-delegate.md +0 -33
  42. package/templates/workspace/.opencode/command/ws-deliver.md +0 -75
  43. package/templates/workspace/.opencode/command/ws-handoff.md +0 -43
  44. package/templates/workspace/.opencode/command/ws-intake.md +0 -22
  45. package/templates/workspace/.opencode/command/ws-migrate.md +0 -25
  46. package/templates/workspace/.opencode/command/ws-plan-verify.md +0 -28
  47. package/templates/workspace/.opencode/command/ws-preflight.md +0 -35
  48. package/templates/workspace/.opencode/command/ws-pull.md +0 -87
  49. package/templates/workspace/.opencode/command/ws-push.md +0 -93
  50. package/templates/workspace/.opencode/command/ws-quality-review.md +0 -30
  51. package/templates/workspace/.opencode/command/ws-req-change.md +0 -45
  52. package/templates/workspace/.opencode/command/ws-req-contract-sync.md +0 -21
  53. package/templates/workspace/.opencode/command/ws-req-contract-validate.md +0 -16
  54. package/templates/workspace/.opencode/command/ws-req-flow-sync.md +0 -23
  55. package/templates/workspace/.opencode/command/ws-req-review.md +0 -36
  56. package/templates/workspace/.opencode/command/ws-rule.md +0 -27
  57. package/templates/workspace/.opencode/command/ws-spec-review.md +0 -30
  58. package/templates/workspace/.opencode/command/ws-submodule-setup.md +0 -57
  59. package/templates/workspace/.opencode/command/ws-verify-before-complete.md +0 -27
  60. package/templates/workspace/.opencode/commands/p-aiws-change-archive.md +0 -27
  61. package/templates/workspace/.opencode/commands/p-aiws-change-finish.md +0 -27
  62. package/templates/workspace/.opencode/commands/p-aiws-change-list.md +0 -26
  63. package/templates/workspace/.opencode/commands/p-aiws-change-new.md +0 -27
  64. package/templates/workspace/.opencode/commands/p-aiws-change-next.md +0 -27
  65. package/templates/workspace/.opencode/commands/p-aiws-change-start.md +0 -27
  66. package/templates/workspace/.opencode/commands/p-aiws-change-status.md +0 -27
  67. package/templates/workspace/.opencode/commands/p-aiws-change-sync.md +0 -27
  68. package/templates/workspace/.opencode/commands/p-aiws-change-templates-init.md +0 -26
  69. package/templates/workspace/.opencode/commands/p-aiws-change-templates-which.md +0 -26
  70. package/templates/workspace/.opencode/commands/p-aiws-change-validate.md +0 -27
  71. package/templates/workspace/.opencode/commands/p-aiws-hooks-install.md +0 -26
  72. package/templates/workspace/.opencode/commands/p-aiws-hooks-status.md +0 -26
  73. package/templates/workspace/.opencode/commands/p-aiws-init.md +0 -23
  74. package/templates/workspace/.opencode/commands/p-aiws-rollback.md +0 -16
  75. package/templates/workspace/.opencode/commands/p-aiws-update.md +0 -22
  76. package/templates/workspace/.opencode/commands/p-aiws-validate.md +0 -17
  77. package/templates/workspace/.opencode/commands/ws-analyze.md +0 -30
  78. package/templates/workspace/.opencode/commands/ws-auto.md +0 -33
  79. package/templates/workspace/.opencode/commands/ws-autonomy.md +0 -25
  80. package/templates/workspace/.opencode/commands/ws-bugfix.md +0 -35
  81. package/templates/workspace/.opencode/commands/ws-commit.md +0 -18
  82. package/templates/workspace/.opencode/commands/ws-delegate.md +0 -33
  83. package/templates/workspace/.opencode/commands/ws-deliver.md +0 -18
  84. package/templates/workspace/.opencode/commands/ws-handoff.md +0 -18
  85. package/templates/workspace/.opencode/commands/ws-intake.md +0 -22
  86. package/templates/workspace/.opencode/commands/ws-migrate.md +0 -18
  87. package/templates/workspace/.opencode/commands/ws-plan-verify.md +0 -18
  88. package/templates/workspace/.opencode/commands/ws-preflight.md +0 -35
  89. package/templates/workspace/.opencode/commands/ws-pull.md +0 -18
  90. package/templates/workspace/.opencode/commands/ws-push.md +0 -18
  91. package/templates/workspace/.opencode/commands/ws-quality-review.md +0 -30
  92. package/templates/workspace/.opencode/commands/ws-req-change.md +0 -45
  93. package/templates/workspace/.opencode/commands/ws-req-contract-sync.md +0 -21
  94. package/templates/workspace/.opencode/commands/ws-req-contract-validate.md +0 -16
  95. package/templates/workspace/.opencode/commands/ws-req-flow-sync.md +0 -23
  96. package/templates/workspace/.opencode/commands/ws-req-review.md +0 -36
  97. package/templates/workspace/.opencode/commands/ws-rule.md +0 -27
  98. package/templates/workspace/.opencode/commands/ws-spec-review.md +0 -30
  99. package/templates/workspace/.opencode/commands/ws-submodule-setup.md +0 -18
  100. package/templates/workspace/.opencode/commands/ws-verify-before-complete.md +0 -18
  101. package/templates/workspace/.opencode/skills/ws-handoff/SKILL.md +0 -18
  102. package/templates/workspace/.opencode/skills/ws-intake/SKILL.md +0 -80
@@ -1,27 +0,0 @@
1
- ---
2
- description: 私有:变更开始:切到 change/<change-id> 并初始化工件
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-start -->
5
- # aiws change start
6
-
7
- (私有原子入口;日常优先用 ws-* 链路。)
8
-
9
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
10
-
11
- 目标:
12
- - 切到 change/<change-id> 并初始化变更工件
13
-
14
- 执行(在仓库根目录):
15
- ```bash
16
- change_id="<change-id>"
17
- if [[ -x "./node_modules/.bin/aiws" ]]; then
18
- ./node_modules/.bin/aiws change start "${change_id}"
19
- elif command -v aiws >/dev/null 2>&1; then
20
- aiws change start "${change_id}"
21
- else
22
- npx @aipper/aiws change start "${change_id}"
23
- fi
24
- ```
25
- <!-- AIWS_MANAGED_END:opencode:aiws-change-start -->
26
-
27
- 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -1,27 +0,0 @@
1
- ---
2
- description: 私有:变更状态:查看 change 状态与阻断项
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-status -->
5
- # aiws change status
6
-
7
- (私有原子入口;日常优先用 ws-* 链路。)
8
-
9
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
10
-
11
- 目标:
12
- - 查看 change 当前状态与阻断项
13
-
14
- 执行(在仓库根目录):
15
- ```bash
16
- change_id="<change-id>" # 可留空(若当前分支可推断)
17
- if [[ -x "./node_modules/.bin/aiws" ]]; then
18
- ./node_modules/.bin/aiws change status "${change_id}"
19
- elif command -v aiws >/dev/null 2>&1; then
20
- aiws change status "${change_id}"
21
- else
22
- npx @aipper/aiws change status "${change_id}"
23
- fi
24
- ```
25
- <!-- AIWS_MANAGED_END:opencode:aiws-change-status -->
26
-
27
- 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -1,27 +0,0 @@
1
- ---
2
- description: 私有:变更同步:同步 change 与真值基线
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-sync -->
5
- # aiws change sync
6
-
7
- (私有原子入口;日常优先用 ws-* 链路。)
8
-
9
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
10
-
11
- 目标:
12
- - 同步当前 change 与真值文件基线
13
-
14
- 执行(在仓库根目录):
15
- ```bash
16
- change_id="<change-id>"
17
- if [[ -x "./node_modules/.bin/aiws" ]]; then
18
- ./node_modules/.bin/aiws change sync "${change_id}"
19
- elif command -v aiws >/dev/null 2>&1; then
20
- aiws change sync "${change_id}"
21
- else
22
- npx @aipper/aiws change sync "${change_id}"
23
- fi
24
- ```
25
- <!-- AIWS_MANAGED_END:opencode:aiws-change-sync -->
26
-
27
- 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -1,26 +0,0 @@
1
- ---
2
- description: 私有:模板初始化:初始化 changes/templates 覆盖模板
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-templates-init -->
5
- # aiws change templates init
6
-
7
- (私有原子入口;日常优先用 ws-* 链路。)
8
-
9
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
10
-
11
- 目标:
12
- - 初始化 changes/templates 覆盖模板
13
-
14
- 执行(在仓库根目录):
15
- ```bash
16
- if [[ -x "./node_modules/.bin/aiws" ]]; then
17
- ./node_modules/.bin/aiws change templates init
18
- elif command -v aiws >/dev/null 2>&1; then
19
- aiws change templates init
20
- else
21
- npx @aipper/aiws change templates init
22
- fi
23
- ```
24
- <!-- AIWS_MANAGED_END:opencode:aiws-change-templates-init -->
25
-
26
- 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -1,26 +0,0 @@
1
- ---
2
- description: 私有:模板来源:查看 change templates 来源
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-templates-which -->
5
- # aiws change templates which
6
-
7
- (私有原子入口;日常优先用 ws-* 链路。)
8
-
9
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
10
-
11
- 目标:
12
- - 查看 change 模板来源
13
-
14
- 执行(在仓库根目录):
15
- ```bash
16
- if [[ -x "./node_modules/.bin/aiws" ]]; then
17
- ./node_modules/.bin/aiws change templates which
18
- elif command -v aiws >/dev/null 2>&1; then
19
- aiws change templates which
20
- else
21
- npx @aipper/aiws change templates which
22
- fi
23
- ```
24
- <!-- AIWS_MANAGED_END:opencode:aiws-change-templates-which -->
25
-
26
- 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -1,27 +0,0 @@
1
- ---
2
- description: 私有:变更校验:按 strict 校验变更工件与绑定
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-validate -->
5
- # aiws change validate
6
-
7
- (私有原子入口;日常优先用 ws-* 链路。)
8
-
9
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
10
-
11
- 目标:
12
- - 按严格模式校验变更工件与绑定关系
13
-
14
- 执行(在仓库根目录):
15
- ```bash
16
- change_id="<change-id>"
17
- if [[ -x "./node_modules/.bin/aiws" ]]; then
18
- ./node_modules/.bin/aiws change validate "${change_id}"
19
- elif command -v aiws >/dev/null 2>&1; then
20
- aiws change validate "${change_id}"
21
- else
22
- npx @aipper/aiws change validate "${change_id}"
23
- fi
24
- ```
25
- <!-- AIWS_MANAGED_END:opencode:aiws-change-validate -->
26
-
27
- 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -1,26 +0,0 @@
1
- ---
2
- description: 私有:Hooks 启用:启用 git hooks 门禁
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:aiws-hooks-install -->
5
- # aiws hooks install
6
-
7
- (私有原子入口;日常优先用 ws-* 链路。)
8
-
9
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
10
-
11
- 目标:
12
- - 启用 git hooks 门禁(core.hooksPath=.githooks)
13
-
14
- 执行(在仓库根目录):
15
- ```bash
16
- if [[ -x "./node_modules/.bin/aiws" ]]; then
17
- ./node_modules/.bin/aiws hooks install .
18
- elif command -v aiws >/dev/null 2>&1; then
19
- aiws hooks install .
20
- else
21
- npx @aipper/aiws hooks install .
22
- fi
23
- ```
24
- <!-- AIWS_MANAGED_END:opencode:aiws-hooks-install -->
25
-
26
- 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -1,26 +0,0 @@
1
- ---
2
- description: 私有:Hooks 状态:查看当前仓库 hooks 门禁状态
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:aiws-hooks-status -->
5
- # aiws hooks status
6
-
7
- (私有原子入口;日常优先用 ws-* 链路。)
8
-
9
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
10
-
11
- 目标:
12
- - 查看当前仓库 hooks 门禁状态(只读)
13
-
14
- 执行(在仓库根目录):
15
- ```bash
16
- if [[ -x "./node_modules/.bin/aiws" ]]; then
17
- ./node_modules/.bin/aiws hooks status .
18
- elif command -v aiws >/dev/null 2>&1; then
19
- aiws hooks status .
20
- else
21
- npx @aipper/aiws hooks status .
22
- fi
23
- ```
24
- <!-- AIWS_MANAGED_END:opencode:aiws-hooks-status -->
25
-
26
- 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -1,23 +0,0 @@
1
- ---
2
- description: 私有:初始化:落盘 AIWS 真值与门禁文件
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:aiws-init -->
5
- # aiws init
6
-
7
- (私有原子入口;日常优先用 ws-* 链路。)
8
-
9
- 目标:
10
- - 生成/补齐真值文件与门禁文件(以 `AI_PROJECT.md` / `REQUIREMENTS.md` / `AI_WORKSPACE.md` 为准)
11
- - 写入/更新 `.gitignore` 的 aiws 托管块
12
- - 生成/更新 `.aiws/manifest.json`(用于漂移检测)
13
-
14
- 建议执行:
15
- 1) `npx @aipper/aiws init`
16
- 2) `npx @aipper/aiws validate`
17
-
18
- 约束:
19
- - 不写入任何 secrets
20
- - 只允许更新托管块(`AIWS_MANAGED_BEGIN/END`)或 spec 指定的 `replace_file` 文件
21
- <!-- AIWS_MANAGED_END:opencode:aiws-init -->
22
-
23
- 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -1,16 +0,0 @@
1
- ---
2
- description: 私有:回滚:从 .aiws/backups 恢复快照
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:aiws-rollback -->
5
- # aiws rollback
6
-
7
- (私有原子入口;日常优先用 ws-* 链路。)
8
-
9
- 目标:
10
- - 从 `.aiws/backups/` 恢复到某次备份快照
11
-
12
- 建议执行:
13
- - `npx @aipper/aiws rollback latest`
14
- <!-- AIWS_MANAGED_END:opencode:aiws-rollback -->
15
-
16
- 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -1,22 +0,0 @@
1
- ---
2
- description: 私有:更新:刷新模板与 tool-native 文件(先备份)
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:aiws-update -->
5
- # aiws update
6
-
7
- (私有原子入口;日常优先用 ws-* 链路。)
8
-
9
- 目标:
10
- - 基于当前 `@aipper/aiws-spec` 刷新模板与 tool-native 文件
11
- - 更新前备份到 `.aiws/backups/<timestamp>/`
12
-
13
- 建议执行:
14
- 1) `npx @aipper/aiws update`
15
- 2) `npx @aipper/aiws validate`
16
-
17
- 约束:
18
- - 不写入任何 secrets
19
- - 只更新托管块或 spec 指定的 `replace_file` 文件
20
- <!-- AIWS_MANAGED_END:opencode:aiws-update -->
21
-
22
- 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -1,17 +0,0 @@
1
- ---
2
- description: 私有:门禁:校验 required/托管块/漂移(可落盘 stamp)
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:aiws-validate -->
5
- # aiws validate
6
-
7
- (私有原子入口;日常优先用 ws-* 链路。)
8
-
9
- 目标:
10
- - 作为 CI/本地门禁:校验 required 文件结构、托管块、`.aiws/manifest.json` 漂移
11
- - 强门禁:缺 `python3`/缺 required 脚本也应失败
12
-
13
- 建议执行:
14
- - `npx @aipper/aiws validate`
15
- <!-- AIWS_MANAGED_END:opencode:aiws-validate -->
16
-
17
- 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -1,30 +0,0 @@
1
- ---
2
- description: 分析:实现前技术分析并落盘证据
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:ws-analyze -->
5
- # ws analyze
6
-
7
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
-
9
- 目标:在开始实现/修复前做一次技术分析,产出可执行的最小行动清单,并把证据落盘到 `.agentdocs/tmp/analyze/`。
10
-
11
- 输入:
12
- - 主题/需求:`$ARGUMENTS`(若为空,先问用户一句“本次分析主题是什么?”)
13
-
14
- 步骤(建议):
15
- 1) 先运行 `/ws-preflight`。
16
- 2) 基于真值文件与当前代码现状,输出:
17
- - 目标 / 非目标
18
- - 现状证据(文件路径/接口路径)
19
- - 推荐方案(1 个)+ 备选(可选)
20
- - 风险与回滚(3–8 条)
21
- - 最小验证命令(可复现)
22
- 3) 将分析落盘到:`.agentdocs/tmp/analyze/opencode-analysis.md`(目录不存在则创建)。
23
- 4) 回复中必须包含:`Evidence:` 证据文件路径。
24
-
25
- 安全:
26
- - 不打印 secrets(尤其 `secrets/test-accounts.json`)。
27
- - 不执行破坏性命令。
28
- <!-- AIWS_MANAGED_END:opencode:ws-analyze -->
29
-
30
- 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -1,33 +0,0 @@
1
- ---
2
- description: 自动 bootstrap:检查 update、确保 watchdog 已启动,并给出下一步
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:ws-auto -->
5
- # ws auto
6
-
7
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
-
9
- 目标:为当前 OpenCode 工作区执行一次显式 auto bootstrap,先补齐托管内容,再按条件启动 watchdog。
10
-
11
- 执行建议:
12
- 1) 先运行 `/ws-preflight`,确认 `AI_PROJECT.md` / `REQUIREMENTS.md` / `AI_WORKSPACE.md` 已读取。
13
- 2) 在项目根运行 `aiws opencode auto .`。
14
- 3) 输出:
15
- - `Auto Bootstrap:`
16
- - `Update:`
17
- - `OpenCode mode:`
18
- - `Watchdog:`
19
- - `Next:`
20
- 4) 若输出 `watchdog:` 为已启动状态:
21
- - 若当前任务意图明确:继续 `/using-aiws`、`/ws-plan`、`/ws-dev` 或 `/ws-review`
22
- - 若当前只是要声明自主协作合同:继续 `/ws-autonomy`
23
- 5) 若输出 `watchdog: skipped (...)`:
24
- - 明确写出原因
25
- - 不要假装已经进入 autonomous 模式
26
-
27
- 边界:
28
- - 允许通过 `aiws update .` 刷新 AIWS 托管内容。
29
- - 不自动复制 `.opencode/oh-my-opencode.json.example` 成真实配置。
30
- - 不自动批准 host permission,不自动执行 tmux rescue。
31
- <!-- AIWS_MANAGED_END:opencode:ws-auto -->
32
-
33
- 可在下方追加本项目对 auto bootstrap 的额外说明(托管块外内容会被保留)。
@@ -1,25 +0,0 @@
1
- ---
2
- description: 自主协作实验:声明 completion/retry/rescue 合同,并按需启用 tmux helper
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:ws-autonomy -->
5
- # ws autonomy
6
-
7
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
-
9
- 目标:声明当前 OpenCode/oMo 任务的 autonomous execution mode,并写清 completion/retry/rescue 合同。
10
-
11
- 执行建议:
12
- 1) 先运行 `/ws-preflight`,再读取 `packages/spec/docs/opencode-autonomous-swarm.md` 与 `packages/spec/docs/opencode-omo-adapter.md`。
13
- 2) 输出:
14
- - `Execution Mode: single-agent / omo-native / omo-native + tmux-swarm`
15
- - `Completion Contract:`
16
- - `Retry Contract:`
17
- - `Rescue Policy:`
18
- - `Evidence:`
19
- 3) 若选择 `omo-native + tmux-swarm`:
20
- - 先运行 `.opencode/helpers/tmux-swarm-scan.sh`
21
- - 仅在需要安全白名单救援时运行 `.opencode/helpers/tmux-swarm-rescue.sh`
22
- 4) 明确这是实验层,不接管 runtime controller,不替代 `ws-plan` / `ws-dev` / `ws-review`。
23
- <!-- AIWS_MANAGED_END:opencode:ws-autonomy -->
24
-
25
- 可在下方追加本项目对 autonomous swarm 的额外说明(托管块外内容会被保留)。
@@ -1,35 +0,0 @@
1
- ---
2
- description: 缺陷修复:禅道 MCP 拉单、图片证据落盘并汇总 fix_bus_issues.csv
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:ws-bugfix -->
5
- # ws bugfix
6
-
7
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
-
9
- 目标:
10
- - 通过禅道 MCP 拉单、图片证据落盘并汇总 `issues/fix_bus_issues.csv`。
11
-
12
- 建议流程:
13
- 1) 先运行 `/ws-preflight`。
14
- 2) 若当前不在 `change/<change-id>` 分支 / worktree,先建立 change 上下文:
15
- - 工作区先保持干净
16
- - 仓库已有提交:优先 `aiws change start <change-id> --hooks --switch`
17
- - superproject + submodule:优先 `aiws change start <change-id> --hooks --switch`
18
- - 仓库尚无提交 / 不满足 worktree 前置条件:回退 `aiws change start <change-id> --hooks --no-switch`
19
- 3) 若上一步创建了 worktree:后续 bug 证据、CSV 更新、`/ws-dev` 修复都必须在该 worktree 中继续。
20
- 4) 通过已配置 zentao MCP 拉取 bug 字段与附件列表。
21
- 5) 落盘证据到当前 active change 上下文的 `changes/<change-id>/bug/`:
22
- - `zentao-bug-<bug-id>.json`
23
- - `zentao-bug-<bug-id>.md`
24
- - `images/<bug-id>/...`
25
- 6) upsert 当前 active change 上下文中的 `issues/fix_bus_issues.csv`(主键 `Bug_ID`)。
26
- 7) 进入 `/ws-dev` 修复并回填 `Fix_Status/Verify_Command/Updated_At`。
27
- 8) 质量门:`aiws change validate <change-id> --strict` + `aiws validate . --stamp`。
28
-
29
- 强制约束:
30
- - 不自动 commit / push。
31
- - 不写入 secrets(token、cookie、内网地址)。
32
- - 无法复现时先输出阻塞信息并落盘,不直接改代码。
33
- <!-- AIWS_MANAGED_END:opencode:ws-bugfix -->
34
-
35
- 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -1,18 +0,0 @@
1
- ---
2
- description: 提交:门禁/审计后提交(submodule 感知)
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:ws-commit -->
5
- # ws commit
6
-
7
- Thin CLI wrapper. Delegates to `aiws commit`.
8
-
9
- ```bash
10
- if [[ -x "./node_modules/.bin/aiws" ]]; then
11
- ./node_modules/.bin/aiws commit -m "<message>"
12
- elif command -v aiws >/dev/null 2>&1; then
13
- aiws commit -m "<message>"
14
- else
15
- npx @aipper/aiws commit -m "<message>"
16
- fi
17
- ```
18
- <!-- AIWS_MANAGED_END:opencode:ws-commit -->
@@ -1,33 +0,0 @@
1
- ---
2
- description: 委托:按 AIWS 合同拆分子任务,并优先借用 oMo agent
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:ws-delegate -->
5
- # ws delegate
6
-
7
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
-
9
- 目标:先写清 delegation plan,再决定是否优先借用 `oh-my-opencode` 的 `planner-sisyphus` / `explore` / `librarian` / `oracle`;若不可用则回退,不阻断流程。
10
-
11
- 执行建议:
12
- 1) 先运行 `/ws-preflight`,再读取 `packages/spec/docs/workflow-delegation-contracts.md` 与 `packages/spec/docs/opencode-omo-adapter.md`。
13
- 2) 先写 `Delegation Plan:`,至少包含:
14
- - `role`
15
- - `preferred agent`
16
- - `task`
17
- - `readScope`
18
- - `writeScope`
19
- - `artifactTargets`
20
- - `fallback`
21
- 3) 若检测到 `.opencode/oh-my-opencode.json` 或当前会话明确可用相关 agent:
22
- - planning 优先 `planner-sisyphus`
23
- - 探索优先 `@explore` / `@librarian`
24
- - 独立审查优先 `@oracle`
25
- 4) 主 agent 统一收敛结果,并把产物回收到:
26
- - `changes/<id>/analysis/`
27
- - `changes/<id>/patches/`
28
- - `changes/<id>/review/`
29
- - `changes/<id>/evidence/`
30
- 5) 若 oMo agent 不可用:明确回退为普通 OpenCode delegation / 单 agent 执行。
31
- <!-- AIWS_MANAGED_END:opencode:ws-delegate -->
32
-
33
- 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -1,18 +0,0 @@
1
- ---
2
- description: 交付:submodules+superproject 分步提交并安全合并回 base
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:ws-deliver -->
5
- # ws deliver
6
-
7
- Thin CLI wrapper. Delegates to `aiws deliver`.
8
-
9
- ```bash
10
- if [[ -x "./node_modules/.bin/aiws" ]]; then
11
- ./node_modules/.bin/aiws deliver -m "<message>"
12
- elif command -v aiws >/dev/null 2>&1; then
13
- aiws deliver -m "<message>"
14
- else
15
- npx @aipper/aiws deliver -m "<message>"
16
- fi
17
- ```
18
- <!-- AIWS_MANAGED_END:opencode:ws-deliver -->
@@ -1,18 +0,0 @@
1
- ---
2
- description: 交接:查看归档 change 的 handoff.md
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:ws-handoff -->
5
- # ws handoff
6
-
7
- Thin CLI wrapper. Delegates to `aiws handoff`.
8
-
9
- ```bash
10
- if [[ -x "./node_modules/.bin/aiws" ]]; then
11
- ./node_modules/.bin/aiws handoff
12
- elif command -v aiws >/dev/null 2>&1; then
13
- aiws handoff
14
- else
15
- npx @aipper/aiws handoff
16
- fi
17
- ```
18
- <!-- AIWS_MANAGED_END:opencode:ws-handoff -->
@@ -1,22 +0,0 @@
1
- ---
2
- description: 计划前置澄清:逐条冻结问题并写入 intake 草案,再交给 ws-plan
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:ws-intake -->
5
- # ws intake
6
-
7
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
-
9
- 目标:
10
- - 在正式 `/ws-plan` 前,先把需求里的待确认问题逐条澄清并冻结。
11
-
12
- 执行建议:
13
- 1) 先读取 `AI_PROJECT.md` / `REQUIREMENTS.md` / `AI_WORKSPACE.md`。
14
- 2) 若存在最新 `plan/*.intake.md`,先续写;否则创建新的 intake 草案。
15
- 3) 把问题写成 `Open Questions`,状态只允许 `open / in_discussion / frozen / deferred`。
16
- 4) 每次只推进 1 条 `Current question`,允许围绕这 1 条问题多轮沟通。
17
- 5) 当前问题未标记为 `frozen` 或 `deferred` 前,不进入下一题。
18
- 6) 每轮都要把结论落到 `plan/<timestamp>-<slug>.intake.md`,并输出 `Ready for ws-plan: yes/no`。
19
- 7) 只有关键问题已冻结时,`Next` 才能进入 `/ws-plan`;否则继续 `/ws-intake`。
20
- <!-- AIWS_MANAGED_END:opencode:ws-intake -->
21
-
22
- 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -1,18 +0,0 @@
1
- ---
2
- description: 迁移:把仓库对齐到 aiws workspace 模板
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:ws-migrate -->
5
- # ws migrate
6
-
7
- Thin CLI wrapper. Delegates to `aiws migrate`.
8
-
9
- ```bash
10
- if [[ -x "./node_modules/.bin/aiws" ]]; then
11
- ./node_modules/.bin/aiws migrate
12
- elif command -v aiws >/dev/null 2>&1; then
13
- aiws migrate
14
- else
15
- npx @aipper/aiws migrate
16
- fi
17
- ```
18
- <!-- AIWS_MANAGED_END:opencode:ws-migrate -->
@@ -1,18 +0,0 @@
1
- ---
2
- description: 计划质检:执行前检查并给出最小修正项。通过后标记 plan 阶段为 DONE
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:ws-plan-verify -->
5
- # ws plan verify
6
-
7
- Thin CLI wrapper. Delegates to `aiws plan-verify`.
8
-
9
- ```bash
10
- if [[ -x "./node_modules/.bin/aiws" ]]; then
11
- ./node_modules/.bin/aiws plan-verify
12
- elif command -v aiws >/dev/null 2>&1; then
13
- aiws plan-verify
14
- else
15
- npx @aipper/aiws plan-verify
16
- fi
17
- ```
18
- <!-- AIWS_MANAGED_END:opencode:ws-plan-verify -->
@@ -1,35 +0,0 @@
1
- ---
2
- description: 预检:读取真值文件并输出约束摘要
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:ws-preflight -->
5
- # ws preflight
6
-
7
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
-
9
- 目标:在开始任何“写代码/改配置/落盘文件”之前,对齐工作区真值文件,避免规则漂移。
10
-
11
- 执行步骤(强制):
12
- 1) 定位项目根目录(submodule 感知):
13
- - 优先:`git rev-parse --show-superproject-working-tree`(submodule 内上溯到 superproject 根)
14
- - 若为空:`git rev-parse --show-toplevel`
15
- - 若两者都失败:停止并让用户确认当前目录是否为项目根(不要猜测)。
16
- 2) 在项目根目录读取以下文件(存在则必须读取;缺失则明确报告缺失项,不要臆测内容):
17
- - `AI_PROJECT.md`
18
- - `REQUIREMENTS.md`
19
- - `AI_WORKSPACE.md`
20
- 3) 输出:
21
- - `Root:` <项目根路径>
22
- - `Found:` <实际读取到的文件列表>
23
- - `Missing:` <缺失文件列表>
24
- - `OpenCode mode:`
25
- - 若检测到 `.opencode/oh-my-opencode.json`:`oMo-enabled`
26
- - 否则:`standard-opencode`
27
- - 若为 `oMo-enabled`:附一句说明后续 `ws-plan` / `ws-review` / `ws-spec-review` / `ws-quality-review` / `ws-delegate` 会优先借用 oMo agent
28
- - `Key rules:` 3–8 条 bullet(范围/禁止项/必须产物/必须验证命令)
29
-
30
- 安全:
31
- - 不打印 secrets;遇到疑似敏感值只提示“存在风险”但不要复述原文。
32
- - 不执行破坏性命令。
33
- <!-- AIWS_MANAGED_END:opencode:ws-preflight -->
34
-
35
- 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -1,18 +0,0 @@
1
- ---
2
- description: 拉取:fast-forward 拉取并对齐 submodules(尽量避免 detached)
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:ws-pull -->
5
- # ws pull
6
-
7
- Thin CLI wrapper. Delegates to `aiws pull`.
8
-
9
- ```bash
10
- if [[ -x "./node_modules/.bin/aiws" ]]; then
11
- ./node_modules/.bin/aiws pull
12
- elif command -v aiws >/dev/null 2>&1; then
13
- aiws pull
14
- else
15
- npx @aipper/aiws pull
16
- fi
17
- ```
18
- <!-- AIWS_MANAGED_END:opencode:ws-pull -->
@@ -1,18 +0,0 @@
1
- ---
2
- description: 推送:submodule 感知(先 submodules 后 superproject;fast-forward;不 force)
3
- ---
4
- <!-- AIWS_MANAGED_BEGIN:opencode:ws-push -->
5
- # ws push
6
-
7
- Thin CLI wrapper. Delegates to `aiws push`.
8
-
9
- ```bash
10
- if [[ -x "./node_modules/.bin/aiws" ]]; then
11
- ./node_modules/.bin/aiws push
12
- elif command -v aiws >/dev/null 2>&1; then
13
- aiws push
14
- else
15
- npx @aipper/aiws push
16
- fi
17
- ```
18
- <!-- AIWS_MANAGED_END:opencode:ws-push -->