@aipper/aiws-spec 0.0.24 → 0.0.26

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 (252) hide show
  1. package/README.md +22 -0
  2. package/docs/aiws-bootstrap-routing-design.md +138 -0
  3. package/docs/aiws-governance-positioning.md +69 -0
  4. package/docs/cli-interface.md +91 -6
  5. package/docs/collaboration-artifacts.md +62 -0
  6. package/docs/opencode-omo-adapter.md +135 -0
  7. package/docs/opencode-omo-validation-checklist.md +90 -0
  8. package/docs/spec-contract.md +30 -22
  9. package/docs/superpowers-collaboration-adoption.md +92 -0
  10. package/docs/workflow-delegation-contracts.json +274 -0
  11. package/docs/workflow-delegation-contracts.md +248 -0
  12. package/docs/workflow-delegation-contracts.schema.json +176 -0
  13. package/docs/workflow-governance-rules.json +294 -0
  14. package/docs/workflow-governance-rules.md +63 -0
  15. package/docs/workflow-governance-rules.schema.json +182 -0
  16. package/docs/workflow-review-gates.json +72 -0
  17. package/docs/workflow-review-gates.md +36 -0
  18. package/docs/workflow-review-gates.schema.json +67 -0
  19. package/docs/workflow-router-rules.json +196 -0
  20. package/docs/workflow-router-rules.md +83 -0
  21. package/docs/workflow-router-rules.schema.json +119 -0
  22. package/docs/workflow-stage-contracts.json +148 -0
  23. package/docs/workflow-stage-contracts.md +70 -0
  24. package/docs/workflow-stage-contracts.schema.json +98 -0
  25. package/package.json +1 -1
  26. package/templates/workspace/.agents/skills/using-aiws/SKILL.md +87 -0
  27. package/templates/workspace/.agents/skills/ws-commit/SKILL.md +27 -1
  28. package/templates/workspace/.agents/skills/ws-delegate/SKILL.md +75 -0
  29. package/templates/workspace/.agents/skills/ws-deliver/SKILL.md +25 -4
  30. package/templates/workspace/.agents/skills/ws-dev/SKILL.md +35 -6
  31. package/templates/workspace/.agents/skills/ws-dev-lite/SKILL.md +58 -0
  32. package/templates/workspace/.agents/skills/ws-finish/SKILL.md +25 -12
  33. package/templates/workspace/.agents/skills/ws-frontend-design/SKILL.md +126 -0
  34. package/templates/workspace/.agents/skills/ws-handoff/SKILL.md +25 -4
  35. package/templates/workspace/.agents/skills/ws-plan/SKILL.md +25 -1
  36. package/templates/workspace/.agents/skills/ws-plan-verify/SKILL.md +20 -0
  37. package/templates/workspace/.agents/skills/ws-preflight/SKILL.md +23 -0
  38. package/templates/workspace/.agents/skills/ws-quality-review/SKILL.md +56 -0
  39. package/templates/workspace/.agents/skills/ws-review/SKILL.md +24 -0
  40. package/templates/workspace/.agents/skills/ws-spec-review/SKILL.md +57 -0
  41. package/templates/workspace/.agents/skills/ws-verify-before-complete/SKILL.md +59 -0
  42. package/templates/workspace/.aiws/manifest.json +2 -6
  43. package/templates/workspace/.claude/commands/using-aiws.md +25 -0
  44. package/templates/workspace/.claude/commands/ws-dev-lite.md +31 -0
  45. package/templates/workspace/.claude/commands/ws-finish.md +1 -1
  46. package/templates/workspace/.claude/commands/ws-handoff.md +3 -2
  47. package/templates/workspace/.claude/commands/ws-quality-review.md +24 -0
  48. package/templates/workspace/.claude/commands/ws-review.md +2 -2
  49. package/templates/workspace/.claude/commands/ws-spec-review.md +24 -0
  50. package/templates/workspace/.claude/commands/ws-verify-before-complete.md +24 -0
  51. package/templates/workspace/.claude/skills/p-aiws-change-archive/SKILL.md +24 -0
  52. package/templates/workspace/.claude/skills/p-aiws-change-finish/SKILL.md +24 -0
  53. package/templates/workspace/.claude/skills/p-aiws-change-list/SKILL.md +18 -0
  54. package/templates/workspace/.claude/skills/p-aiws-change-new/SKILL.md +26 -0
  55. package/templates/workspace/.claude/skills/p-aiws-change-next/SKILL.md +19 -0
  56. package/templates/workspace/.claude/skills/p-aiws-change-start/SKILL.md +33 -0
  57. package/templates/workspace/.claude/skills/p-aiws-change-status/SKILL.md +19 -0
  58. package/templates/workspace/.claude/skills/p-aiws-change-sync/SKILL.md +19 -0
  59. package/templates/workspace/.claude/skills/p-aiws-change-templates-init/SKILL.md +18 -0
  60. package/templates/workspace/.claude/skills/p-aiws-change-templates-which/SKILL.md +18 -0
  61. package/templates/workspace/.claude/skills/p-aiws-change-validate/SKILL.md +23 -0
  62. package/templates/workspace/.claude/skills/p-aiws-hooks-install/SKILL.md +30 -0
  63. package/templates/workspace/.claude/skills/p-aiws-hooks-status/SKILL.md +18 -0
  64. package/templates/workspace/.claude/skills/p-aiws-init/SKILL.md +27 -0
  65. package/templates/workspace/.claude/skills/p-aiws-rollback/SKILL.md +18 -0
  66. package/templates/workspace/.claude/skills/p-aiws-update/SKILL.md +26 -0
  67. package/templates/workspace/.claude/skills/p-aiws-validate/SKILL.md +22 -0
  68. package/templates/workspace/.claude/skills/p-tasks-plan/SKILL.md +37 -0
  69. package/templates/workspace/.claude/skills/using-aiws/SKILL.md +87 -0
  70. package/templates/workspace/.claude/skills/ws-analyze/SKILL.md +26 -0
  71. package/templates/workspace/.claude/skills/ws-bugfix/SKILL.md +111 -0
  72. package/templates/workspace/.claude/skills/ws-commit/SKILL.md +130 -0
  73. package/templates/workspace/.claude/skills/ws-deliver/SKILL.md +230 -0
  74. package/templates/workspace/.claude/skills/ws-dev/SKILL.md +168 -0
  75. package/templates/workspace/.claude/skills/ws-dev-lite/SKILL.md +58 -0
  76. package/templates/workspace/.claude/skills/ws-finish/SKILL.md +209 -0
  77. package/templates/workspace/.claude/skills/ws-frontend-design/SKILL.md +126 -0
  78. package/templates/workspace/.claude/skills/ws-handoff/SKILL.md +52 -0
  79. package/templates/workspace/.claude/skills/ws-migrate/SKILL.md +54 -0
  80. package/templates/workspace/.claude/skills/ws-plan/SKILL.md +138 -0
  81. package/templates/workspace/.claude/skills/ws-plan-verify/SKILL.md +61 -0
  82. package/templates/workspace/.claude/skills/ws-preflight/SKILL.md +55 -0
  83. package/templates/workspace/.claude/skills/ws-pull/SKILL.md +119 -0
  84. package/templates/workspace/.claude/skills/ws-push/SKILL.md +110 -0
  85. package/templates/workspace/.claude/skills/ws-quality-review/SKILL.md +56 -0
  86. package/templates/workspace/.claude/skills/ws-req-change/SKILL.md +41 -0
  87. package/templates/workspace/.claude/skills/ws-req-contract-sync/SKILL.md +17 -0
  88. package/templates/workspace/.claude/skills/ws-req-contract-validate/SKILL.md +12 -0
  89. package/templates/workspace/.claude/skills/ws-req-flow-sync/SKILL.md +28 -0
  90. package/templates/workspace/.claude/skills/ws-req-review/SKILL.md +32 -0
  91. package/templates/workspace/.claude/skills/ws-review/SKILL.md +50 -0
  92. package/templates/workspace/.claude/skills/ws-rule/SKILL.md +23 -0
  93. package/templates/workspace/.claude/skills/ws-spec-review/SKILL.md +57 -0
  94. package/templates/workspace/.claude/skills/ws-submodule-setup/SKILL.md +65 -0
  95. package/templates/workspace/.claude/skills/ws-verify-before-complete/SKILL.md +59 -0
  96. package/templates/workspace/.githooks/commit-msg +10 -0
  97. package/templates/workspace/.opencode/command/using-aiws.md +30 -0
  98. package/templates/workspace/.opencode/command/ws-delegate.md +33 -0
  99. package/templates/workspace/.opencode/command/ws-dev-lite.md +34 -0
  100. package/templates/workspace/.opencode/command/ws-finish.md +1 -1
  101. package/templates/workspace/.opencode/command/ws-handoff.md +4 -3
  102. package/templates/workspace/.opencode/command/ws-plan.md +3 -0
  103. package/templates/workspace/.opencode/command/ws-preflight.md +4 -0
  104. package/templates/workspace/.opencode/command/ws-quality-review.md +30 -0
  105. package/templates/workspace/.opencode/command/ws-review.md +5 -2
  106. package/templates/workspace/.opencode/command/ws-spec-review.md +30 -0
  107. package/templates/workspace/.opencode/command/ws-verify-before-complete.md +27 -0
  108. package/templates/workspace/.opencode/commands/p-aiws-change-archive.md +27 -0
  109. package/templates/workspace/.opencode/commands/p-aiws-change-finish.md +27 -0
  110. package/templates/workspace/.opencode/commands/p-aiws-change-list.md +26 -0
  111. package/templates/workspace/.opencode/commands/p-aiws-change-new.md +27 -0
  112. package/templates/workspace/.opencode/commands/p-aiws-change-next.md +27 -0
  113. package/templates/workspace/.opencode/commands/p-aiws-change-start.md +27 -0
  114. package/templates/workspace/.opencode/commands/p-aiws-change-status.md +27 -0
  115. package/templates/workspace/.opencode/commands/p-aiws-change-sync.md +27 -0
  116. package/templates/workspace/.opencode/commands/p-aiws-change-templates-init.md +26 -0
  117. package/templates/workspace/.opencode/commands/p-aiws-change-templates-which.md +26 -0
  118. package/templates/workspace/.opencode/commands/p-aiws-change-validate.md +27 -0
  119. package/templates/workspace/.opencode/commands/p-aiws-hooks-install.md +26 -0
  120. package/templates/workspace/.opencode/commands/p-aiws-hooks-status.md +26 -0
  121. package/templates/workspace/.opencode/commands/p-aiws-init.md +23 -0
  122. package/templates/workspace/.opencode/commands/p-aiws-rollback.md +16 -0
  123. package/templates/workspace/.opencode/commands/p-aiws-update.md +22 -0
  124. package/templates/workspace/.opencode/commands/p-aiws-validate.md +17 -0
  125. package/templates/workspace/.opencode/commands/using-aiws.md +30 -0
  126. package/templates/workspace/.opencode/commands/ws-analyze.md +30 -0
  127. package/templates/workspace/.opencode/commands/ws-bugfix.md +35 -0
  128. package/templates/workspace/.opencode/commands/ws-commit.md +70 -0
  129. package/templates/workspace/.opencode/commands/ws-delegate.md +33 -0
  130. package/templates/workspace/{.iflow/commands/ws-deliver.toml → .opencode/commands/ws-deliver.md} +13 -13
  131. package/templates/workspace/.opencode/commands/ws-dev-lite.md +34 -0
  132. package/templates/workspace/.opencode/commands/ws-dev.md +36 -0
  133. package/templates/workspace/{.iflow/commands/ws-finish.toml → .opencode/commands/ws-finish.md} +46 -29
  134. package/templates/workspace/.opencode/commands/ws-handoff.md +26 -0
  135. package/templates/workspace/.opencode/commands/ws-migrate.md +25 -0
  136. package/templates/workspace/.opencode/commands/ws-plan-verify.md +28 -0
  137. package/templates/workspace/.opencode/commands/ws-plan.md +27 -0
  138. package/templates/workspace/.opencode/commands/ws-preflight.md +34 -0
  139. package/templates/workspace/.opencode/commands/ws-pull.md +87 -0
  140. package/templates/workspace/.opencode/commands/ws-push.md +93 -0
  141. package/templates/workspace/.opencode/commands/ws-quality-review.md +30 -0
  142. package/templates/workspace/.opencode/commands/ws-req-change.md +45 -0
  143. package/templates/workspace/.opencode/commands/ws-req-contract-sync.md +21 -0
  144. package/templates/workspace/.opencode/commands/ws-req-contract-validate.md +16 -0
  145. package/templates/workspace/.opencode/commands/ws-req-flow-sync.md +23 -0
  146. package/templates/workspace/.opencode/commands/ws-req-review.md +36 -0
  147. package/templates/workspace/.opencode/commands/ws-review.md +33 -0
  148. package/templates/workspace/.opencode/commands/ws-rule.md +27 -0
  149. package/templates/workspace/.opencode/commands/ws-spec-review.md +30 -0
  150. package/templates/workspace/.opencode/commands/ws-submodule-setup.md +57 -0
  151. package/templates/workspace/.opencode/commands/ws-verify-before-complete.md +27 -0
  152. package/templates/workspace/.opencode/oh-my-opencode.json.example +17 -0
  153. package/templates/workspace/.opencode/skills/p-aiws-change-archive/SKILL.md +24 -0
  154. package/templates/workspace/.opencode/skills/p-aiws-change-finish/SKILL.md +24 -0
  155. package/templates/workspace/.opencode/skills/p-aiws-change-list/SKILL.md +18 -0
  156. package/templates/workspace/.opencode/skills/p-aiws-change-new/SKILL.md +26 -0
  157. package/templates/workspace/.opencode/skills/p-aiws-change-next/SKILL.md +19 -0
  158. package/templates/workspace/.opencode/skills/p-aiws-change-start/SKILL.md +33 -0
  159. package/templates/workspace/.opencode/skills/p-aiws-change-status/SKILL.md +19 -0
  160. package/templates/workspace/.opencode/skills/p-aiws-change-sync/SKILL.md +19 -0
  161. package/templates/workspace/.opencode/skills/p-aiws-change-templates-init/SKILL.md +18 -0
  162. package/templates/workspace/.opencode/skills/p-aiws-change-templates-which/SKILL.md +18 -0
  163. package/templates/workspace/.opencode/skills/p-aiws-change-validate/SKILL.md +23 -0
  164. package/templates/workspace/.opencode/skills/p-aiws-hooks-install/SKILL.md +30 -0
  165. package/templates/workspace/.opencode/skills/p-aiws-hooks-status/SKILL.md +18 -0
  166. package/templates/workspace/.opencode/skills/p-aiws-init/SKILL.md +27 -0
  167. package/templates/workspace/.opencode/skills/p-aiws-rollback/SKILL.md +18 -0
  168. package/templates/workspace/.opencode/skills/p-aiws-update/SKILL.md +26 -0
  169. package/templates/workspace/.opencode/skills/p-aiws-validate/SKILL.md +22 -0
  170. package/templates/workspace/.opencode/skills/p-tasks-plan/SKILL.md +37 -0
  171. package/templates/workspace/.opencode/skills/using-aiws/SKILL.md +91 -0
  172. package/templates/workspace/.opencode/skills/ws-analyze/SKILL.md +26 -0
  173. package/templates/workspace/.opencode/skills/ws-bugfix/SKILL.md +111 -0
  174. package/templates/workspace/.opencode/skills/ws-commit/SKILL.md +130 -0
  175. package/templates/workspace/.opencode/skills/ws-delegate/SKILL.md +63 -0
  176. package/templates/workspace/.opencode/skills/ws-deliver/SKILL.md +230 -0
  177. package/templates/workspace/.opencode/skills/ws-dev/SKILL.md +168 -0
  178. package/templates/workspace/.opencode/skills/ws-dev-lite/SKILL.md +58 -0
  179. package/templates/workspace/.opencode/skills/ws-finish/SKILL.md +209 -0
  180. package/templates/workspace/.opencode/skills/ws-frontend-design/SKILL.md +126 -0
  181. package/templates/workspace/.opencode/skills/ws-handoff/SKILL.md +52 -0
  182. package/templates/workspace/.opencode/skills/ws-migrate/SKILL.md +54 -0
  183. package/templates/workspace/.opencode/skills/ws-plan/SKILL.md +148 -0
  184. package/templates/workspace/.opencode/skills/ws-plan-verify/SKILL.md +61 -0
  185. package/templates/workspace/.opencode/skills/ws-preflight/SKILL.md +60 -0
  186. package/templates/workspace/.opencode/skills/ws-pull/SKILL.md +119 -0
  187. package/templates/workspace/.opencode/skills/ws-push/SKILL.md +110 -0
  188. package/templates/workspace/.opencode/skills/ws-quality-review/SKILL.md +63 -0
  189. package/templates/workspace/.opencode/skills/ws-req-change/SKILL.md +41 -0
  190. package/templates/workspace/.opencode/skills/ws-req-contract-sync/SKILL.md +17 -0
  191. package/templates/workspace/.opencode/skills/ws-req-contract-validate/SKILL.md +12 -0
  192. package/templates/workspace/.opencode/skills/ws-req-flow-sync/SKILL.md +28 -0
  193. package/templates/workspace/.opencode/skills/ws-req-review/SKILL.md +32 -0
  194. package/templates/workspace/.opencode/skills/ws-review/SKILL.md +57 -0
  195. package/templates/workspace/.opencode/skills/ws-rule/SKILL.md +23 -0
  196. package/templates/workspace/.opencode/skills/ws-spec-review/SKILL.md +64 -0
  197. package/templates/workspace/.opencode/skills/ws-submodule-setup/SKILL.md +65 -0
  198. package/templates/workspace/.opencode/skills/ws-verify-before-complete/SKILL.md +59 -0
  199. package/templates/workspace/AGENTS.md +74 -30
  200. package/templates/workspace/AI_PROJECT.md +1 -1
  201. package/templates/workspace/AI_WORKSPACE.md +1 -1
  202. package/templates/workspace/changes/README.md +25 -4
  203. package/templates/workspace/changes/templates/proposal.md +15 -0
  204. package/templates/workspace/changes/templates/tasks.md +9 -2
  205. package/templates/workspace/manifest.json +340 -82
  206. package/templates/workspace/memory-bank/README.md +1 -2
  207. package/templates/workspace/tools/ws_change_check.py +26 -4
  208. package/templates/workspace/.iflow/agents/feature-reviewer.md +0 -27
  209. package/templates/workspace/.iflow/agents/requirements-analyst.md +0 -24
  210. package/templates/workspace/.iflow/agents/server-commit-manager.md +0 -28
  211. package/templates/workspace/.iflow/agents/server-fix-implementer.md +0 -31
  212. package/templates/workspace/.iflow/agents/server-test-planner.md +0 -28
  213. package/templates/workspace/.iflow/agents/server-test-triager.md +0 -30
  214. package/templates/workspace/.iflow/commands/aiws-init.toml +0 -24
  215. package/templates/workspace/.iflow/commands/aiws-rollback.toml +0 -18
  216. package/templates/workspace/.iflow/commands/aiws-update.toml +0 -23
  217. package/templates/workspace/.iflow/commands/aiws-validate.toml +0 -18
  218. package/templates/workspace/.iflow/commands/server-commit.toml +0 -27
  219. package/templates/workspace/.iflow/commands/server-drain.toml +0 -99
  220. package/templates/workspace/.iflow/commands/server-fix-and-commit.toml +0 -27
  221. package/templates/workspace/.iflow/commands/server-fix.toml +0 -65
  222. package/templates/workspace/.iflow/commands/server-test-plan.toml +0 -62
  223. package/templates/workspace/.iflow/commands/server-test.toml +0 -58
  224. package/templates/workspace/.iflow/commands/server-triage.toml +0 -38
  225. package/templates/workspace/.iflow/commands/server_test-plan.toml +0 -12
  226. package/templates/workspace/.iflow/commands/server_test.toml +0 -12
  227. package/templates/workspace/.iflow/commands/ws-analyze.toml +0 -33
  228. package/templates/workspace/.iflow/commands/ws-commit.toml +0 -46
  229. package/templates/workspace/.iflow/commands/ws-contract-check.toml +0 -69
  230. package/templates/workspace/.iflow/commands/ws-dev.toml +0 -34
  231. package/templates/workspace/.iflow/commands/ws-doctor.toml +0 -141
  232. package/templates/workspace/.iflow/commands/ws-env-doctor.toml +0 -74
  233. package/templates/workspace/.iflow/commands/ws-feature-deliver.toml +0 -44
  234. package/templates/workspace/.iflow/commands/ws-feature-plan.toml +0 -47
  235. package/templates/workspace/.iflow/commands/ws-init.toml +0 -53
  236. package/templates/workspace/.iflow/commands/ws-memory-bank-init.toml +0 -100
  237. package/templates/workspace/.iflow/commands/ws-migrate.toml +0 -59
  238. package/templates/workspace/.iflow/commands/ws-preflight.toml +0 -30
  239. package/templates/workspace/.iflow/commands/ws-pull.toml +0 -47
  240. package/templates/workspace/.iflow/commands/ws-push.toml +0 -40
  241. package/templates/workspace/.iflow/commands/ws-req-change.toml +0 -64
  242. package/templates/workspace/.iflow/commands/ws-req-contract-sync.toml +0 -25
  243. package/templates/workspace/.iflow/commands/ws-req-contract-validate.toml +0 -16
  244. package/templates/workspace/.iflow/commands/ws-req-flow-sync.toml +0 -36
  245. package/templates/workspace/.iflow/commands/ws-req-review.toml +0 -56
  246. package/templates/workspace/.iflow/commands/ws-review.toml +0 -33
  247. package/templates/workspace/.iflow/commands/ws-rule.toml +0 -43
  248. package/templates/workspace/.iflow/commands/ws-submodule-setup.toml +0 -32
  249. package/templates/workspace/tools/iflow_watchdog.sh +0 -138
  250. package/templates/workspace/tools/install_iflow_watchdog_systemd_user.sh +0 -118
  251. package/templates/workspace/tools/systemd/iflow-watchdog@.service +0 -16
  252. package/templates/workspace/tools/systemd/iflow-watchdog@.timer +0 -11
@@ -1,12 +0,0 @@
1
- # Command: server_test-plan
2
- # Description: 与 /server-test-plan 等价的下划线别名
3
- # Category: server
4
- # Version: 1
5
-
6
- description = "与 /server-test-plan 等价的下划线别名"
7
-
8
- prompt = """
9
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
10
-
11
- 等价于 `/server-test-plan`:请按相同规则生成工作区后端接口测试计划(OpenAPI -> issues CSV -> 闭环执行)。
12
- """
@@ -1,12 +0,0 @@
1
- # Command: server_test
2
- # Description: 与 /server-test 等价的下划线别名
3
- # Category: server
4
- # Version: 1
5
-
6
- description = "与 /server-test 等价的下划线别名"
7
-
8
- prompt = """
9
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
10
-
11
- 等价于 `/server-test`:请按相同规则在当前工作区执行接口测试闭环(runner 优先,BLOCKED 自动进入修复建议/闭环)。
12
- """
@@ -1,33 +0,0 @@
1
- # Command: ws:analyze
2
- # Description: AI Workspace 多模型技术分析(Claude + Codex + Gemini),证据落盘到 .agentdocs/tmp/analyze/
3
- # Category: workspace
4
- # Version: 1
5
-
6
- description = "AI Workspace 多模型技术分析(Claude + Codex + Gemini),证据落盘到 .agentdocs/tmp/analyze/"
7
-
8
- prompt = """
9
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
10
-
11
- 目标:在实现/修复前,对当前工作区做技术分析,形成可验证行动清单,并把结果落盘到 `.agentdocs/tmp/analyze/` 便于回放。
12
-
13
- 输入:
14
- - 本命令参数(如有)视为分析主题(topic)。
15
-
16
- 强制步骤:
17
- 1) 预检:读取 `AI_PROJECT.md`、`REQUIREMENTS.md`、`AI_WORKSPACE.md`。
18
- 2) 若 iFlow 拦截写入:先执行 `/ws-contract-check`,再继续。
19
- 3) 输出(必须):
20
- - GOALS / NON-GOALS(必须映射到 `REQUIREMENTS.md`)
21
- - Top risks(3–8 条,按高→低)
22
- - Next actions(最小可验证步骤清单;每步包含 Verify 命令与 Expected)
23
- 4) 证据落盘(必须):
24
- - 在 `.agentdocs/tmp/analyze/` 写入一份 `analysis.<timestamp>.md`(或等价文件)
25
- - 文件中必须包含:本次读取到的真值文件列表、以及上述输出
26
- 5) 建议下一步(择一):
27
- - 进入交付闭环:`/ws-dev`
28
- - 需求对齐:`/ws-req-review` 或 `/ws-req-change`
29
-
30
- 边界:
31
- - 不打印任何 secrets(尤其是 `secrets/test-accounts.json`)。
32
- - 不执行破坏性命令。
33
- """
@@ -1,46 +0,0 @@
1
- # Command: ws:commit
2
- # Description: 提交(先审计/门禁并落盘证据;submodule 感知;当前分支可直提)
3
- # Category: workspace
4
- # Version: 1
5
-
6
- description = "提交(先审计/门禁并落盘证据;submodule 感知;当前分支可直提)"
7
-
8
- prompt = """
9
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
10
-
11
- 目标:在不要求切换 `change/<change-id>` 的前提下,在当前分支完成一次安全提交:先审计与门禁,再检查 staging,最后 `git commit`;若仓库含 submodule,必须先处理 submodule 再提交 superproject 的 gitlink。
12
- 补充:若你经常遇到 submodule detached,建议日常拉取优先使用 `ws:pull`(尽量把 submodule “挂回分支”且不改变 gitlink commit)。
13
-
14
- 安全约束(强制):
15
- - 不自动 `git add -A`;只在用户明确指示时才做 staging
16
- - 不使用 `--no-verify` 绕过 hooks
17
- - 不自动 push
18
- - 不打印 secrets
19
- - commit message 优先使用中文;若启用了 `.githooks/commit-msg`,默认仅提示,只有 strict 模式才会拒绝全英文首行(`Merge/Revert/fixup!/squash!` 例外)
20
-
21
- 强制步骤:
22
- 1) 读取真值文件:`AI_PROJECT.md`、`REQUIREMENTS.md`、`AI_WORKSPACE.md`(缺失则先运行 `/aiws-init` 或 `aiws init .`)。
23
- 2) 若 iFlow 拦截写入:先执行 `/ws-contract-check`,再继续。
24
- 3) 先运行 `/ws-review`(优先落盘审计证据到 `changes/<change-id>/review/`)。
25
- 4) 运行门禁并写 stamp:`aiws validate . --stamp`(未安装全局 aiws 时可用 `npx @aipper/aiws validate . --stamp`)。
26
- 5) 输出提交上下文(必须输出给用户确认):
27
- - `git branch --show-current`
28
- - `git status --porcelain`
29
- 6) submodule 感知检查(必须):
30
- - 若存在 `.gitmodules`:输出 submodule 列表:`git config --file .gitmodules --get-regexp '^submodule\\..*\\.path$'`
31
- - 对每个 `<sub_path>` 输出:
32
- - `git -C "<sub_path>" rev-parse --abbrev-ref HEAD`
33
- - `git -C "<sub_path>" status --porcelain`
34
- - 判定规则:任一 submodule `git status --porcelain` 非空 → **停止提交 superproject**,先在该 submodule 完成 commit,再回到 superproject 更新并提交 gitlink。
35
- - 若该 submodule 当前为 detached HEAD:先按 `.gitmodules` 的目标分支挂到 `aiws/pin/<target-branch>`;不要直接切 `change/<change-id>` / `main` / `master`。
36
- 7) 检查 staging(必须输出给用户确认):
37
- - `git status --porcelain`
38
- - `git diff --staged --submodule=short`
39
- 8) 若没有 staged changes:停止并提示用户先明确要提交哪些文件(例如 `git add -p` 或 `git add <path>`)。
40
- 9) 优先生成并确认中文 commit message(格式建议:`<类型>: <简述>`;若用户明确要求英文也可保留,但 strict 模式下会被 hook 拒绝)。
41
- 10) 执行提交(不带 `--no-verify`):`git commit -m "<message>"`。
42
-
43
- 输出必须包含:
44
- - 证据(Evidence):`changes/<change-id>/review/*`(无 change-id 时回退 `.agentdocs/tmp/review/*`) + `.agentdocs/tmp/aiws-validate/*`
45
- - 上下文(Context):当前分支 + 是否检测到 submodule + 若阻断则给出阻断原因
46
- """
@@ -1,69 +0,0 @@
1
- # Command: ws:contract-check
2
- # Description: 在任何写入前确认已读取需求/规则(生成 stamp 供 pre_tool_guard 放行)
3
- # Category: workspace
4
- # Version: 1
5
-
6
- description = "在任何写入前确认已读取需求/规则(生成 stamp 供 pre_tool_guard 放行)"
7
-
8
- prompt = """
9
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
10
-
11
- 目标:在开始任何代码/配置写入前,强制完成一次“工作区 contract 预检”,并写入 stamp 文件供 iFlow `pre_tool_guard.sh` 放行。
12
-
13
- 执行(会检查/提示缺失项,并写入 `.agentdocs/tmp/.iflow-contract-checked`):
14
- !{bash -lc '
15
- set -euo pipefail
16
-
17
- ws_root="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
18
- cd "$ws_root"
19
-
20
- if ! command -v python3 >/dev/null 2>&1; then
21
- echo "error: python3 not found (required for contract-check stamp)" >&2
22
- exit 2
23
- fi
24
-
25
- mkdir -p .agentdocs/tmp
26
-
27
- python3 - <<'PY'
28
- import datetime
29
- import hashlib
30
- import json
31
- import os
32
- import pathlib
33
-
34
- ws_root = pathlib.Path(os.getcwd()).resolve()
35
-
36
- def sha256(p: pathlib.Path) -> str:
37
- return hashlib.sha256(p.read_bytes()).hexdigest()
38
-
39
- truth_files = {}
40
- missing = []
41
- for name in ("REQUIREMENTS.md", "AI_PROJECT.md", "AI_WORKSPACE.md"):
42
- p = ws_root / name
43
- key = f"{name}_sha256"
44
- if p.exists():
45
- truth_files[key] = sha256(p)
46
- else:
47
- truth_files[key] = ""
48
- missing.append(name)
49
-
50
- data = {
51
- "generated_at": datetime.datetime.utcnow().replace(microsecond=0).isoformat() + "Z",
52
- "workspace_root": str(ws_root),
53
- "truth_files": truth_files,
54
- }
55
-
56
- stamp = ws_root / ".agentdocs" / "tmp" / ".iflow-contract-checked"
57
- stamp.write_text(json.dumps(data, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
58
-
59
- print(f"OK: wrote {stamp}")
60
- if missing:
61
- print("WARN: missing truth files: " + ", ".join(missing))
62
- print("HINT: run aiws init to bootstrap (e.g. `npx @aipper/aiws init .`)")
63
- PY
64
- '}
65
-
66
- 边界:
67
- - 不打印任何 secrets(尤其是 `secrets/test-accounts.json`)。
68
- - 本命令只负责预检与写 stamp,不做实现、不跑测试、不提交。
69
- """
@@ -1,34 +0,0 @@
1
- # Command: ws:dev
2
- # Description: AI Workspace Claude-first 开发闭环(分析→确认→实施→审计→证据落盘)
3
- # Category: workspace
4
- # Version: 1
5
-
6
- description = "AI Workspace Claude-first 开发闭环(分析→确认→实施→审计→证据落盘)"
7
-
8
- prompt = """
9
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
10
-
11
- 目标:在 AI Workspace 约束下完成一个可回放、可验证的小步交付。
12
-
13
- 输入:
14
- - 本命令参数(如有)视为本次交付主题(topic)。
15
-
16
- 强制流程:
17
- 1) 预检:读取 `AI_PROJECT.md`、`REQUIREMENTS.md`、`AI_WORKSPACE.md`(缺失则先运行 `/aiws-init`,或在 shell 执行 `aiws init .`)。
18
- 2) 若 iFlow 拦截写入(缺少 contract-check stamp):先执行 `/ws-contract-check`,再继续。
19
- 3) 明确 GOALS / NON-GOALS,并把改动归因到:
20
- - `requirements/requirements-issues.csv` 的 `Req_ID`,或
21
- - `issues/problem-issues.csv` 的 `Problem_ID`。
22
- 4) 先输出“将改动的文件清单 + 回滚方案 + 验证命令”,并等待用户确认继续(Y/N)。
23
- 5) 用户确认后再实施最小改动(遵守 `AI_PROJECT.md` 的安全边界;不要引入任何 secrets)。
24
- 6) 运行门禁并给出结果:
25
- - `aiws validate .`(若未安装全局 aiws,可用 `npx @aipper/aiws validate .`)
26
- 7) 产出证据(至少一个):
27
- - 更新 `changes/<change-id>/...`,或
28
- - 更新 `issues/*.csv` 的状态机,或
29
- - 写入 `.agentdocs/tmp/...` 的 report/log/resp(不要包含 secrets)。
30
-
31
- 边界:
32
- - 不打印任何 secrets(尤其是 `secrets/test-accounts.json`)。
33
- - 不执行破坏性命令。
34
- """
@@ -1,141 +0,0 @@
1
- # Command: ws:doctor
2
- # Description: 检查 workspace-A 约定并给出可执行的下一步
3
- # Category: workspace
4
- # Version: 1
5
-
6
- description = "检查 workspace-A 约定并给出可执行的下一步"
7
-
8
- prompt = """
9
- 用中文输出。检查当前目录是否符合 AIWS workspace 约定,并给出可执行的下一步建议。
10
-
11
- Rules:
12
- - Do not print secrets (especially secrets/test-accounts.json).
13
- - Only report presence/absence and safe guidance.
14
- - Prefer Linux-first commands.
15
-
16
- Execute:
17
- !{bash -lc '
18
- set -euo pipefail
19
-
20
- ok() { printf "OK: %s\n" "$*"; }
21
- warn() { printf "警告: %s\n" "$*"; }
22
- miss() { printf "缺失: %s\n" "$*"; }
23
- note() { printf "说明: %s\n" "$*"; }
24
-
25
- project_root() {
26
- local root
27
- root="$(git rev-parse --show-toplevel 2>/dev/null || true)"
28
- if [[ -n "${root:-}" ]]; then
29
- echo "$root"
30
- else
31
- pwd
32
- fi
33
- }
34
-
35
- workspace_root() {
36
- local d="$PWD"
37
- while true; do
38
- if [[ -f "$d/AI_WORKSPACE.md" || -f "$d/REQUIREMENTS.md" || -f "$d/AI_PROJECT.md" ]]; then
39
- echo "$d"
40
- return 0
41
- fi
42
- [[ "$d" == "/" ]] && break
43
- d="$(dirname "$d")"
44
- done
45
- project_root
46
- }
47
-
48
- workspace_env() {
49
- [[ -f AI_WORKSPACE.md ]] || return 0
50
- local line
51
- line="$(grep -m1 -E "^[[:space:]]*- environment:[[:space:]]*" AI_WORKSPACE.md 2>/dev/null || true)"
52
- [[ -n "${line:-}" ]] || return 0
53
- printf "%s\n" "$line" | sed -E "s/.*environment:[[:space:]]*\\\"?([^\\\"#[:space:]]+).*/\\1/"
54
- }
55
-
56
- subdir="$(pwd)"
57
- root="$(workspace_root)"
58
- cd "$root"
59
-
60
- echo "工作目录: $root"
61
- if [[ "$subdir" != "$root" ]]; then
62
- echo "当前子目录: $subdir"
63
- fi
64
- echo
65
-
66
- need_init=0
67
-
68
- if [[ -f AGENTS.md ]]; then ok "AGENTS.md"; else warn "AGENTS.md 未发现(建议运行 /aiws-init 补齐)"; fi
69
- if [[ -f AI_PROJECT.md ]]; then ok "AI_PROJECT.md"; else miss "AI_PROJECT.md"; need_init=1; fi
70
- if [[ -f AI_WORKSPACE.md ]]; then ok "AI_WORKSPACE.md"; else miss "AI_WORKSPACE.md"; need_init=1; fi
71
- if [[ -f REQUIREMENTS.md ]]; then ok "REQUIREMENTS.md"; else miss "REQUIREMENTS.md"; need_init=1; fi
72
-
73
- if [[ -f requirements/CHANGELOG.md ]]; then ok "requirements/CHANGELOG.md"; else warn "requirements/CHANGELOG.md 未发现"; fi
74
- if [[ -f requirements/requirements-issues.csv ]]; then ok "requirements/requirements-issues.csv"; else warn "requirements/requirements-issues.csv 未发现"; fi
75
- if [[ -f issues/problem-issues.csv ]]; then ok "issues/problem-issues.csv"; else warn "issues/problem-issues.csv 未发现"; fi
76
-
77
- if [[ -f .aiws/manifest.json ]]; then ok ".aiws/manifest.json"; else miss ".aiws/manifest.json"; need_init=1; fi
78
- if [[ -f .githooks/pre-commit ]]; then ok ".githooks/pre-commit"; else warn ".githooks/pre-commit 未发现"; fi
79
- if [[ -f .githooks/pre-push ]]; then ok ".githooks/pre-push"; else warn ".githooks/pre-push 未发现"; fi
80
-
81
- echo
82
- echo "工具链:"
83
- if command -v python3 >/dev/null 2>&1; then ok "python3"; else warn "python3 未发现(aiws validate 需要)"; fi
84
- if command -v uv >/dev/null 2>&1; then ok "uv"; else note "uv 未发现(可选;用于运行 tools/server_test_runner.py)"; fi
85
- if command -v aiws >/dev/null 2>&1; then ok "aiws"; else note "aiws 未发现(可用 npx @aipper/aiws ...)"; fi
86
-
87
- echo
88
- echo "git hooks:"
89
- git_root="$(git rev-parse --show-toplevel 2>/dev/null || true)"
90
- if [[ -n "${git_root:-}" ]]; then
91
- hooks_path="$(git config --get core.hooksPath 2>/dev/null || true)"
92
- if [[ "$hooks_path" == ".githooks" ]]; then
93
- ok "core.hooksPath=.githooks(提交/推送将自动运行 aiws validate)"
94
- else
95
- warn "core.hooksPath 未设置为 .githooks(当前:${hooks_path:-<unset>})"
96
- note "可执行:git config core.hooksPath .githooks"
97
- fi
98
- else
99
- note "未检测到 git 仓库(跳过 hooks 检查)"
100
- fi
101
-
102
- echo
103
- echo ".gitignore:"
104
- if [[ -f .gitignore ]]; then
105
- if grep -qF "# AIWS_MANAGED_BEGIN:gitignore" .gitignore; then
106
- ok ".gitignore 已包含 AIWS managed block"
107
- else
108
- warn ".gitignore 缺少 AIWS managed block(建议运行 /aiws-init 或 /aiws-update 修复)"
109
- fi
110
- else
111
- warn "未找到 .gitignore"
112
- fi
113
-
114
- echo
115
- env="$(workspace_env || true)"
116
- if [[ -n "${env:-}" ]]; then
117
- echo "environment: ${env}"
118
- fi
119
-
120
- echo
121
- echo "下一步建议:"
122
- if [[ "$need_init" -eq 1 ]]; then
123
- echo " - 执行: /aiws-init(或 `npx @aipper/aiws init .`)"
124
- else
125
- echo " - 运行门禁: aiws validate .(或 `npx @aipper/aiws validate .`)"
126
- fi
127
- echo " - 如 iFlow 拦截写入:/ws-contract-check(写入 stamp)"
128
- if [[ ! -f secrets/test-accounts.json && -f secrets/test-accounts.example.json ]]; then
129
- echo " - 创建 secrets:cp -n secrets/test-accounts.example.json secrets/test-accounts.json"
130
- fi
131
- if [[ -f tools/server_test_runner.py ]]; then
132
- echo " - 接口闭环(自动修复):/server-fix"
133
- echo " - 仅执行 runner:uv run tools/server_test_runner.py --workspace . --manage-service"
134
- fi
135
- if [[ -d memory-bank ]]; then
136
- echo " - 固定上下文:更新 memory-bank/progress.md"
137
- else
138
- echo " - 初始化 memory-bank:/ws-memory-bank-init"
139
- fi
140
- '}
141
- """
@@ -1,74 +0,0 @@
1
- # Command: ws:env-doctor
2
- # Description: 检查工具链并给出 node/java/python/uv 切换建议(workspace-A)
3
- # Category: workspace
4
- # Version: 1
5
-
6
- description = "检查工具链并给出 node/java/python/uv 切换建议(workspace-A)"
7
-
8
- prompt = """
9
- 用中文输出。检查当前环境的工具链与版本,并根据 AI_WORKSPACE.md 给出可执行的切换建议。
10
-
11
- 规则:
12
- - 只读检查,不修改系统状态
13
- - 优先 Linux-first
14
-
15
- Execute:
16
- !{bash -lc '
17
- set -euo pipefail
18
-
19
- say() { printf "%s\n" "$*"; }
20
- have() { command -v "$1" >/dev/null 2>&1; }
21
-
22
- ws="$(pwd)"
23
- say "工作目录: $ws"
24
-
25
- if [[ -f AI_WORKSPACE.md ]]; then
26
- say "OK: 发现 AI_WORKSPACE.md"
27
- else
28
- say "警告: 未发现 AI_WORKSPACE.md(建议先 /aiws-init)"
29
- fi
30
-
31
- say ""
32
- say "== 工具可用性 =="
33
- for c in git uv node npm pnpm yarn java javac mvn gradle python3 mise asdf nvm sdk jenv; do
34
- if have "$c"; then
35
- say "OK: $c"
36
- else
37
- say "缺失: $c"
38
- fi
39
- done
40
-
41
- say ""
42
- say "== 版本信息 =="
43
- have node && say "node: $(node -v 2>/dev/null || true)" || true
44
- have npm && say "npm: $(npm -v 2>/dev/null || true)" || true
45
- have pnpm && say "pnpm: $(pnpm -v 2>/dev/null || true)" || true
46
- have java && say "java: $(java -version 2>&1 | head -n 1)" || true
47
- have javac && say "javac: $(javac -version 2>&1 | head -n 1)" || true
48
- have python3 && say "python3: $(python3 -V 2>/dev/null || true)" || true
49
- have uv && say "uv: $(uv --version 2>/dev/null || true)" || true
50
-
51
- say ""
52
- say "== AI_WORKSPACE.md 建议执行的切换命令(如果已配置) =="
53
- extract_cmd() {
54
- local key="$1"
55
- rg -n \"^\\s*-\\s*${key}\\s*:\\s*\\\"(.*)\\\"\\s*$\" AI_WORKSPACE.md 2>/dev/null | sed -E \"s/.*\\\"(.*)\\\".*/\\1/\" | head -n 1
56
- }
57
-
58
- if [[ -f AI_WORKSPACE.md ]]; then
59
- boot="$(extract_cmd toolchain_bootstrap_cmd || true)"
60
- node_use="$(extract_cmd node_use_cmd || true)"
61
- java_use="$(extract_cmd java_use_cmd || true)"
62
-
63
- [[ -n \"$boot\" ]] && say \"toolchain_bootstrap_cmd: $boot\"
64
- [[ -n \"$node_use\" ]] && say \"node_use_cmd: $node_use\"
65
- [[ -n \"$java_use\" ]] && say \"java_use_cmd: $java_use\"
66
- fi
67
-
68
- say ""
69
- say "下一步建议:"
70
- say "- 若版本不匹配:把 node/java 的版本与切换命令写进 AI_WORKSPACE.md 的 3.3 节"
71
- say "- 跑服务端接口测试:uv run tools/server_test_runner.py --workspace . --manage-service"
72
- say "- 跑需求交付闭环:/ws-feature-plan -> /ws-feature-deliver"
73
- '}
74
- """
@@ -1,44 +0,0 @@
1
- # Command: ws:feature-deliver
2
- # Description: 执行跨子项目交付闭环(需求 -> 代码 -> 测试 -> Review -> 提交)
3
- # Category: workspace
4
- # Version: 1
5
-
6
- description = "执行跨子项目交付闭环(需求 -> 代码 -> 测试 -> Review -> 提交)"
7
-
8
- prompt = """
9
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
10
-
11
- 目标:在工作区根目录执行“需求->实现->测试->审核->提交”的闭环,尽量减少人工干预,但严格遵守边界与可回滚。
12
-
13
- 必须遵守:
14
- - REQUIREMENTS.md 为唯一真值;若发现需求缺口,先补齐“可验收字段”,不要擅自改语义
15
- - 需求变更必须通过 `/ws-req-change` 处理,并写入 `requirements/CHANGELOG.md`,再同步 issues 执行合同(避免需求漂移)
16
- - AI_WORKSPACE.md policy 为硬边界(默认 environment=test、base_url_allowlist=localhost);不满足时不得执行自动化测试/自动提交
17
- - secrets/test-accounts.json 为敏感文件,禁止输出内容
18
- - 反死循环:连续 2 轮无法减少 BLOCKED 或无法推进 issues 状态,必须缩小范围或先修环境/补齐 REQUIREMENTS,不能继续盲改
19
-
20
- 步骤(按顺序):
21
- 1) 预检(缺失则补齐):
22
- - 若不存在 `issues/feature-issues.csv`:先执行 `/ws-feature-plan` 生成计划与执行合同
23
- - 检查 AI_WORKSPACE.md 是否有 environment/test 与 base_url_allowlist;缺失则用默认安全值并提示用户确认
24
- - 若 AI_WORKSPACE.md 定义了 toolchain_bootstrap_cmd / node_use_cmd / java_use_cmd:在任何 build/test 前必须先执行(用 bash -lc 保证加载 shell 环境)
25
- 2) 执行(每次只推进 1~3 个 TODO):
26
- - 从 issues/feature-issues.csv 选取 TODO,标为 DOING
27
- - 先做“现状验证”:检查该 issue 对应能力是否已存在(避免重复实现/冲突);若已满足则记录证据并直接标 DONE
28
- - 否则实现最小代码修改(只改与该 issue 相关的文件)
29
- - 运行对应 Tests(按 issue 的 Tests 字段或 AI_WORKSPACE.md 的 *_test_cmd)
30
- - 通过则标 DONE;失败则标 BLOCKED 并写 Notes(含复现命令与证据路径)
31
- 3) 如果涉及服务端 API 或你检测到存在 tools/server_test_runner.py:
32
- - 运行 runner 生成证据包与接口合同:
33
- `uv run tools/server_test_runner.py --workspace . --manage-service`
34
- - 若存在 BLOCKED:执行 `/server-fix`(或 `/server-triage` 输出修复清单),直到接口验收通过或达到迭代上限
35
- 4) 审核:
36
- - 对照 REQUIREMENTS.md 验收标准逐项确认(不满足就回到步骤2/3)
37
- 5) 提交:
38
- - 若工作区使用 git submodule:优先 `/server-commit`(仅提交 server_dirs),或用 `/server-fix-and-commit`
39
- - 其它 submodule(web/app)若需要提交:先给出“将提交哪些目录/文件”的清单,再执行对应子仓库 commit(不要 push)
40
-
41
- 输出要求:
42
- - 每轮输出:本轮处理的 Issue_ID、改动文件、测试命令与结果摘要、下一步
43
- - 全部完成时输出:可以 merge/提 PR 的最小检查清单
44
- """
@@ -1,47 +0,0 @@
1
- # Command: ws:feature-plan
2
- # Description: 规划跨子项目的交付(需求 -> 代码 -> 测试 -> Review -> 提交)
3
- # Category: workspace
4
- # Version: 1
5
-
6
- description = "规划跨子项目的交付(需求 -> 代码 -> 测试 -> Review -> 提交)"
7
-
8
- prompt = """
9
- 用中文输出(命令/路径/代码标识符保持原样不翻译)。
10
-
11
- 目标:在“目录A工作区”(可能包含 server/web/app 等多个 submodule 目录)为本次需求变更产出一个可执行计划,并把计划落到可追踪的执行合同里。
12
-
13
- 输入(按优先级读取):
14
- - REQUIREMENTS.md:需求与验收标准(唯一真值来源)
15
- - AI_WORKSPACE.md:工作区结构、目录发现、policy(environment/base_url_allowlist 等)、启动/测试覆盖方式
16
- - docs/openapi.json(若涉及服务端 API)
17
-
18
- 进行中项目(必须先做,不允许“从零假设”):
19
- 1) 代码现状盘点:扫描当前工作区(server/web/app)已有实现与现有接口(OpenAPI/路由/关键模块)。
20
- 2) 需求对比:将 REQUIREMENTS.md 的目标逐项映射到“已有/缺失/部分完成”,并给证据(文件路径/接口路径)。
21
- 3) 只为“缺失/部分完成”的项创建 issues;已有项要么标 DONE(需有证据),要么标 SKIP(说明理由)。
22
-
23
- 输出必须包含:
24
- 1) GOALS / NON-GOALS(必须与 REQUIREMENTS.md 一致)
25
- 2) 影响范围(按 subproject 列出:server/web/app;给出候选目录与识别依据)
26
- 3) 执行合同(写入/维护这些文件):
27
- - issues/feature-issues.csv:任务分解(TODO/DOING/DONE/BLOCKED/SKIP)
28
- - (如涉及 API)issues/server-api-issues.csv:接口验收合同(由 runner 维护)
29
- 4) 测试策略(按 subproject):
30
- - server:优先 runner(uv),并遵守 AI_WORKSPACE.md policy(base_url_allowlist/allow_mutations)
31
- - web/app:优先使用 AI_WORKSPACE.md 指定的 *_test_cmd;若缺失则基于常见标记提出建议但不臆测结果
32
- - 工具链准备:如果 AI_WORKSPACE.md 定义了 toolchain_bootstrap_cmd / node_use_cmd / java_use_cmd,必须在 build/test 前执行
33
- 5) 风险/边界:
34
- - 不改需求语义;需求不清先补 REQUIREMENTS.md(只补可验收字段)
35
- - 需求变更必须通过 `/ws-req-change` 处理,并写入 `requirements/CHANGELOG.md`,再同步 issues 执行合同
36
- - 不触发破坏性数据操作(除非 environment=test 且 allow_mutations=true 且 REQUIREMENTS 明确允许)
37
- 6) 回滚方案(按 submodule/根仓库分别写)
38
- 7) 完成条件:满足 REQUIREMENTS.md 的验收 + 所有相关测试通过 + 无未解释错误日志
39
-
40
- 执行合同 CSV(必须创建或更新):
41
- - 文件:issues/feature-issues.csv
42
- - 列(固定):Issue_ID, Subproject, Title, Files, Tests, Status, Notes
43
- - Status:TODO | DOING | DONE | BLOCKED | SKIP
44
-
45
- 最后给出下一步命令(建议):
46
- - 运行交付闭环:`/ws-feature-deliver`
47
- """
@@ -1,53 +0,0 @@
1
- # Command: ws:init
2
- # Description: 初始化当前目录为 workspace-A(AI_WORKSPACE/REQUIREMENTS/tools/secrets 示例)
3
- # Category: workspace
4
- # Version: 1
5
-
6
- description = "初始化当前目录为 workspace-A(AI_WORKSPACE/REQUIREMENTS/tools/secrets 示例)"
7
-
8
- prompt = """
9
- 用中文输出;命令与路径保持原样不翻译。
10
-
11
- 目标:把“当前目录”初始化为 aiws `workspace` 模板(真值文件 + 门禁 + tool-native commands)。
12
-
13
- 约束:
14
- - 不创建/不打印真实 secrets;只生成 `secrets/test-accounts.example.json` 示例文件。
15
- - 默认不做破坏性操作。
16
-
17
- 执行:
18
- !{bash -lc '
19
- set -euo pipefail
20
-
21
- root="$(pwd)"
22
-
23
- run_aiws() {
24
- local subcmd="$1"
25
- shift
26
-
27
- if [[ -x "$root/node_modules/.bin/aiws" ]]; then
28
- "$root/node_modules/.bin/aiws" "$subcmd" "$@"
29
- return 0
30
- fi
31
- if command -v aiws >/dev/null 2>&1; then
32
- aiws "$subcmd" "$@"
33
- return 0
34
- fi
35
- if command -v npx >/dev/null 2>&1; then
36
- npx -y @aipper/aiws "$subcmd" "$@"
37
- return 0
38
- fi
39
-
40
- echo "error: aiws not found (install @aipper/aiws or ensure npx is available)" >&2
41
- exit 2
42
- }
43
-
44
- run_aiws init .
45
- run_aiws validate .
46
-
47
- echo "下一步:"
48
- echo " - 启用本机 hooks:git config core.hooksPath .githooks"
49
- echo " - 如启用了 iFlow pre_tool_guard:执行 /ws-contract-check(写入 stamp)"
50
- echo " - 创建 secrets:cp -n secrets/test-accounts.example.json secrets/test-accounts.json"
51
- echo " - 重新运行门禁:aiws validate ."
52
- '}
53
- """