@aipper/aiws-spec 0.0.25 → 0.0.27

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 (101) hide show
  1. package/docs/aiws-governance-positioning.md +1 -1
  2. package/docs/cli-interface.md +10 -5
  3. package/docs/collaboration-artifacts.md +1 -1
  4. package/docs/spec-contract.md +5 -12
  5. package/docs/workflow-governance-rules.json +18 -4
  6. package/docs/workflow-governance-rules.md +8 -6
  7. package/docs/workflow-router-rules.json +2 -2
  8. package/docs/workflow-router-rules.md +2 -2
  9. package/docs/workflow-stage-contracts.json +9 -9
  10. package/docs/workflow-stage-contracts.md +5 -5
  11. package/package.json +1 -1
  12. package/templates/workspace/.agents/skills/using-aiws/SKILL.md +5 -1
  13. package/templates/workspace/.agents/skills/ws-commit/SKILL.md +4 -1
  14. package/templates/workspace/.agents/skills/ws-deliver/SKILL.md +3 -4
  15. package/templates/workspace/.agents/skills/ws-dev-lite/SKILL.md +58 -0
  16. package/templates/workspace/.agents/skills/ws-finish/SKILL.md +13 -16
  17. package/templates/workspace/.agents/skills/ws-handoff/SKILL.md +8 -8
  18. package/templates/workspace/.aiws/manifest.json +2 -6
  19. package/templates/workspace/.claude/commands/using-aiws.md +3 -2
  20. package/templates/workspace/.claude/commands/ws-dev-lite.md +31 -0
  21. package/templates/workspace/.claude/commands/ws-finish.md +9 -5
  22. package/templates/workspace/.claude/commands/ws-handoff.md +3 -2
  23. package/templates/workspace/.claude/commands/ws-review.md +2 -2
  24. package/templates/workspace/.claude/skills/using-aiws/SKILL.md +5 -1
  25. package/templates/workspace/.claude/skills/ws-commit/SKILL.md +4 -1
  26. package/templates/workspace/.claude/skills/ws-deliver/SKILL.md +3 -4
  27. package/templates/workspace/.claude/skills/ws-dev-lite/SKILL.md +58 -0
  28. package/templates/workspace/.claude/skills/ws-finish/SKILL.md +13 -16
  29. package/templates/workspace/.claude/skills/ws-handoff/SKILL.md +8 -8
  30. package/templates/workspace/.githooks/commit-msg +10 -0
  31. package/templates/workspace/.opencode/command/using-aiws.md +3 -2
  32. package/templates/workspace/.opencode/command/ws-dev-lite.md +34 -0
  33. package/templates/workspace/.opencode/command/ws-finish.md +9 -5
  34. package/templates/workspace/.opencode/command/ws-handoff.md +4 -3
  35. package/templates/workspace/.opencode/command/ws-review.md +2 -2
  36. package/templates/workspace/.opencode/commands/using-aiws.md +3 -2
  37. package/templates/workspace/.opencode/commands/ws-dev-lite.md +34 -0
  38. package/templates/workspace/.opencode/commands/ws-finish.md +9 -5
  39. package/templates/workspace/.opencode/commands/ws-handoff.md +4 -3
  40. package/templates/workspace/.opencode/commands/ws-review.md +2 -2
  41. package/templates/workspace/.opencode/skills/using-aiws/SKILL.md +5 -1
  42. package/templates/workspace/.opencode/skills/ws-commit/SKILL.md +4 -1
  43. package/templates/workspace/.opencode/skills/ws-deliver/SKILL.md +3 -4
  44. package/templates/workspace/.opencode/skills/ws-dev-lite/SKILL.md +58 -0
  45. package/templates/workspace/.opencode/skills/ws-finish/SKILL.md +13 -16
  46. package/templates/workspace/.opencode/skills/ws-handoff/SKILL.md +8 -8
  47. package/templates/workspace/AGENTS.md +5 -3
  48. package/templates/workspace/AI_PROJECT.md +1 -1
  49. package/templates/workspace/AI_WORKSPACE.md +1 -1
  50. package/templates/workspace/changes/README.md +10 -6
  51. package/templates/workspace/changes/templates/tasks.md +1 -1
  52. package/templates/workspace/manifest.json +63 -80
  53. package/templates/workspace/memory-bank/README.md +1 -2
  54. package/templates/workspace/tools/ws_change_check.py +224 -7
  55. package/templates/workspace/.iflow/agents/feature-reviewer.md +0 -27
  56. package/templates/workspace/.iflow/agents/requirements-analyst.md +0 -24
  57. package/templates/workspace/.iflow/agents/server-commit-manager.md +0 -28
  58. package/templates/workspace/.iflow/agents/server-fix-implementer.md +0 -31
  59. package/templates/workspace/.iflow/agents/server-test-planner.md +0 -28
  60. package/templates/workspace/.iflow/agents/server-test-triager.md +0 -30
  61. package/templates/workspace/.iflow/commands/aiws-init.toml +0 -24
  62. package/templates/workspace/.iflow/commands/aiws-rollback.toml +0 -18
  63. package/templates/workspace/.iflow/commands/aiws-update.toml +0 -23
  64. package/templates/workspace/.iflow/commands/aiws-validate.toml +0 -18
  65. package/templates/workspace/.iflow/commands/server-commit.toml +0 -27
  66. package/templates/workspace/.iflow/commands/server-drain.toml +0 -99
  67. package/templates/workspace/.iflow/commands/server-fix-and-commit.toml +0 -27
  68. package/templates/workspace/.iflow/commands/server-fix.toml +0 -65
  69. package/templates/workspace/.iflow/commands/server-test-plan.toml +0 -62
  70. package/templates/workspace/.iflow/commands/server-test.toml +0 -58
  71. package/templates/workspace/.iflow/commands/server-triage.toml +0 -38
  72. package/templates/workspace/.iflow/commands/server_test-plan.toml +0 -12
  73. package/templates/workspace/.iflow/commands/server_test.toml +0 -12
  74. package/templates/workspace/.iflow/commands/ws-analyze.toml +0 -33
  75. package/templates/workspace/.iflow/commands/ws-commit.toml +0 -46
  76. package/templates/workspace/.iflow/commands/ws-contract-check.toml +0 -69
  77. package/templates/workspace/.iflow/commands/ws-deliver.toml +0 -58
  78. package/templates/workspace/.iflow/commands/ws-dev.toml +0 -34
  79. package/templates/workspace/.iflow/commands/ws-doctor.toml +0 -141
  80. package/templates/workspace/.iflow/commands/ws-env-doctor.toml +0 -74
  81. package/templates/workspace/.iflow/commands/ws-feature-deliver.toml +0 -44
  82. package/templates/workspace/.iflow/commands/ws-feature-plan.toml +0 -47
  83. package/templates/workspace/.iflow/commands/ws-finish.toml +0 -54
  84. package/templates/workspace/.iflow/commands/ws-init.toml +0 -53
  85. package/templates/workspace/.iflow/commands/ws-memory-bank-init.toml +0 -100
  86. package/templates/workspace/.iflow/commands/ws-migrate.toml +0 -59
  87. package/templates/workspace/.iflow/commands/ws-preflight.toml +0 -30
  88. package/templates/workspace/.iflow/commands/ws-pull.toml +0 -47
  89. package/templates/workspace/.iflow/commands/ws-push.toml +0 -40
  90. package/templates/workspace/.iflow/commands/ws-req-change.toml +0 -64
  91. package/templates/workspace/.iflow/commands/ws-req-contract-sync.toml +0 -25
  92. package/templates/workspace/.iflow/commands/ws-req-contract-validate.toml +0 -16
  93. package/templates/workspace/.iflow/commands/ws-req-flow-sync.toml +0 -36
  94. package/templates/workspace/.iflow/commands/ws-req-review.toml +0 -56
  95. package/templates/workspace/.iflow/commands/ws-review.toml +0 -33
  96. package/templates/workspace/.iflow/commands/ws-rule.toml +0 -43
  97. package/templates/workspace/.iflow/commands/ws-submodule-setup.toml +0 -32
  98. package/templates/workspace/tools/iflow_watchdog.sh +0 -138
  99. package/templates/workspace/tools/install_iflow_watchdog_systemd_user.sh +0 -118
  100. package/templates/workspace/tools/systemd/iflow-watchdog@.service +0 -16
  101. package/templates/workspace/tools/systemd/iflow-watchdog@.timer +0 -11
@@ -56,7 +56,7 @@ description: 默认 workflow bootstrap/router:先读真值,再路由到正
56
56
  - finish / merge / push / cleanup:`$ws-finish`
57
57
  - handoff / archive summary:`$ws-handoff`
58
58
  - 中大型实现、需要方案、需要 change/worktree:`$ws-plan`
59
- - 小步明确实现/修复/配置调整:`$ws-dev`
59
+ - 小步明确实现/修复/配置调整:`$ws-dev`(若是 simple/local 单点修复,且用户明确希望走轻量入口,可显式进入 `$ws-dev-lite`)
60
60
  4) 若任务意图或归因不明确:
61
61
  - 只问 1-3 个关键澄清问题
62
62
  - 明确写出缺的是什么:意图、`Req_ID` / `Problem_ID`、verify、change 上下文
@@ -67,6 +67,10 @@ description: 默认 workflow bootstrap/router:先读真值,再路由到正
67
67
  - `Binding:`
68
68
  - `Route:`
69
69
  - `Why:`
70
+ - 若 `Route: $ws-dev` 且任务属于 simple/local 单点修复:
71
+ - `Next:` 可优先进入 `$ws-dev-lite`
72
+ - 否则:
73
+ - `Next:` 进入对应主 skill
70
74
  - 然后在同一轮中继续遵循对应 skill 的契约
71
75
  6) 路由约束:
72
76
  - router 自己不是实现阶段;不要在给出 route 之前直接改代码
@@ -19,7 +19,10 @@ description: 提交(当前分支可直提;submodule 感知;先审计/门
19
19
  - 不写入任何 secrets
20
20
  - 检测到 submodule 有未提交改动时,不允许直接提交 superproject(先处理 submodule)
21
21
  - commit message 优先使用中文(命令/路径/代码标识符保持原样不翻译);格式建议:`<类型>: <简述>`(例如 `修复: 登录页空指针`、`功能: 新增 submodule targets 校验`、`重构: 提取共享脚本`)
22
- - 若启用了 `.githooks/commit-msg`:默认会提示优先中文;只有在 `git config aiws.commitMessagePolicy strict` 时才会拒绝全英文首行(`Merge/Revert/fixup!/squash!` 例外)
22
+ - 若启用了 `.githooks/commit-msg`:默认按仓库角色区分
23
+ - superproject / root 仓库(存在 `.gitmodules`)默认允许自由 commit message
24
+ - submodule / 普通仓库默认提示优先中文
25
+ - 只有在 `git config aiws.commitMessagePolicy strict` 时才会拒绝全英文首行(`Merge/Revert/fixup!/squash!` 例外)
23
26
 
24
27
  阶段定位:
25
28
  - commit gate;负责在提交前收敛 review、validate 和 message 确认,不允许跳过 hooks。
@@ -218,10 +218,9 @@ aiws change state "${change_id}" --write
218
218
  aiws change finish <change-id> --into <base-branch>
219
219
  ```
220
220
 
221
- ## F) (可选)归档变更工件
222
- ```bash
223
- aiws change archive <change-id>
224
- ```
221
+ ## F) 归档说明
222
+ - 标准链路下不需要再单独执行 `aiws change archive <change-id>`。
223
+ - 进入 `$ws-finish` 并使用 `aiws change finish --push` 时,会自动完成 archive + handoff。
225
224
 
226
225
  输出要求:
227
226
  - `Submodules:` 每个 submodule 的分支/提交摘要(repo → commit sha → message)
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: ws-dev-lite
3
+ description: 轻量开发(simple/local 单点修复;最小改动 + 最小验证)
4
+ ---
5
+
6
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
7
+
8
+ 目标:在不引入完整重流程的前提下,完成一次 simple/local 小问题修复,并保持可验证、可追溯。
9
+
10
+ 定位:
11
+ - `ws-dev` 的轻量入口,不是新的 workflow stage。
12
+ - 适用于单点修复、局部配置调整、明确回归修复;不适用于中大型任务。
13
+
14
+ 适用前提:
15
+ - 目标明确,且能归因到 `Req_ID` 或 `Problem_ID`
16
+ - 验证入口明确,且能做最小可复现验证
17
+ - 一般只影响单文件或紧密相关的小范围文件
18
+ - 不需要先改 `REQUIREMENTS.md`,也不需要先单独做 review
19
+
20
+ 立即升级回主流程的情形:
21
+ - 发现任务其实是 medium/complex、跨模块、跨目录或需要方案设计
22
+ - 无法明确归因、verify、change 上下文
23
+ - 需要新建复杂 change/worktree 或处理 submodule 目标分支真值
24
+ - 修复过程中出现连锁改动、需要补系统性测试或需求调整
25
+
26
+ 默认约束:
27
+ - 先做 `$ws-preflight`
28
+ - 默认不创建 `plan/...`
29
+ - 默认不跑 `$ws-plan-verify`
30
+ - 默认不要求先做双 review
31
+ - 若后续准备提交/交付,仍需进入 `$ws-review` / `$ws-commit` / `$ws-finish`
32
+
33
+ 执行步骤:
34
+ 1) 先读取 `AI_PROJECT.md` / `REQUIREMENTS.md` / `AI_WORKSPACE.md`,输出约束摘要。
35
+ 2) 先判断自己是否真的属于 lite:
36
+ - 用一句话写清 `Goal`
37
+ - 用一句话写清 `Why lite`
38
+ - 若说不清,立刻回退到 `$ws-dev` 或 `$ws-plan`
39
+ 3) 在当前 change 上下文内实施最小改动:
40
+ - 不为“形式完整”额外扩 scope
41
+ - 不默认补与本问题无关的重构或测试矩阵
42
+ 4) 运行最小可复现验证:
43
+ - 优先使用 `AI_WORKSPACE.md` 已声明的命令
44
+ - 若只需局部回归,允许运行更窄的验证,但要说明为什么足够
45
+ 5) 留下至少一个可追溯证据:
46
+ - 实际改动文件
47
+ - 或 `.agentdocs/tmp/...`
48
+ - 或 `changes/<change-id>/...`
49
+ 6) 输出:
50
+ - `变更文件(Changed):`
51
+ - `验证(Verify):`
52
+ - `证据(Evidence):`
53
+ - `Next:` 若准备提交,进入 `$ws-review` 或 `$ws-commit`
54
+
55
+ 输出要求:
56
+ - 明确说明为什么这是 lite,而不是完整 `ws-dev`
57
+ - 未运行不声称已运行
58
+ - 一旦发现复杂度升高,立刻停止 lite 叙事,切回 `$ws-dev` 或 `$ws-plan`
@@ -14,7 +14,8 @@ description: 收尾(门禁 + 安全合并 + submodule→主仓库顺序 push
14
14
  前置(必须):
15
15
  - 工作区是干净的:`git status --porcelain` 无输出(若有未提交改动:先 commit 或 stash)
16
16
  - change 分支已存在:`change/<change-id>`(也支持 `changes/`、`ws/`、`ws-change/`)
17
- - 若使用 worktree:在目标分支所在 worktree 执行(`aiws change finish` 会提示正确的 worktree)
17
+ - 若使用 worktree:普通 finish 的 `validate/evidence/state` 先在 `change/<change-id>` worktree 完成;真正执行 `aiws change finish` 时再切到目标分支所在 worktree(命令会提示正确的 worktree
18
+ - 若 `aiws change status <change-id>` 输出 `governance_rule: finish_resume_required`:说明 merge 已发生,只剩 push / archive / cleanup closeout;直接在该 worktree 运行 `aiws change finish <change-id> --push`,不要先跑 `aiws validate . --stamp`
18
19
  - 若存在 `.gitmodules`:必须为每个 submodule 配置 `submodule.<name>.branch`(否则无法确定性减少 detached;先运行 `$ws-submodule-setup` 并提交 `.gitmodules`)
19
20
 
20
21
  阶段定位:
@@ -60,7 +61,11 @@ if [[ -f .gitmodules ]]; then
60
61
  fi
61
62
  fi
62
63
  ```
63
- 1) (推荐)先跑一次门禁并落盘证据:
64
+ 0.5) 先运行 `aiws change status <change-id>`,优先看稳定字段 `governance_rule:`:
65
+ - 若为 `finish_resume_required`:直接跳到步骤 2 执行 `aiws change finish <change-id> --push`
66
+ - 若不是该值:按普通 finish 继续;不要依赖自然语言提示句做分支判断
67
+
68
+ 1) (推荐,仅适用于普通 finish,且应在 `change/<change-id>` worktree 执行)先跑一次门禁并落盘证据:
64
69
  ```bash
65
70
  if [[ -x "./node_modules/.bin/aiws" ]]; then
66
71
  ./node_modules/.bin/aiws validate . --stamp
@@ -70,7 +75,10 @@ else
70
75
  npx @aipper/aiws validate . --stamp
71
76
  fi
72
77
  ```
73
- 1.1) (强烈建议)收敛持久证据并回填 `Evidence_Path`:
78
+ 若你已经位于目标分支 worktree,且 `governance_rule` 不是 `finish_resume_required`:
79
+ - 不要在这里跑 `aiws validate . --stamp`
80
+ - 先回 `change/<change-id>` worktree 补齐 finish gate,或先跑 `$ws-verify-before-complete`
81
+ 1.1) (强烈建议,仅适用于普通 finish)收敛持久证据并回填 `Evidence_Path`:
74
82
  ```bash
75
83
  change_id="<change-id>"
76
84
  if [[ -x "./node_modules/.bin/aiws" ]]; then
@@ -81,7 +89,7 @@ else
81
89
  npx @aipper/aiws change evidence "${change_id}"
82
90
  fi
83
91
  ```
84
- 1.2) (可选)生成状态快照(建议):
92
+ 1.2) (可选,仅适用于普通 finish)生成状态快照(建议):
85
93
  ```bash
86
94
  aiws change state "${change_id}" --write
87
95
  ```
@@ -206,15 +214,4 @@ fi
206
214
  ```
207
215
  说明:
208
216
  - 该命令内部已经包含主仓库 push 成功后安全清理独立 change worktree 的逻辑。
209
-
210
- 7) (可选)归档变更工件(完成交付后推荐):
211
- ```bash
212
- change_id="<change-id>"
213
- if [[ -x "./node_modules/.bin/aiws" ]]; then
214
- ./node_modules/.bin/aiws change archive "${change_id}"
215
- elif command -v aiws >/dev/null 2>&1; then
216
- aiws change archive "${change_id}"
217
- else
218
- npx @aipper/aiws change archive "${change_id}"
219
- fi
220
- ```
217
+ - 当 `--push` 完整成功时,还会自动把 `changes/<change-id>/` 归档到 `changes/archive/...`,生成 `handoff.md`,并补一个 `归档: <change-id>` commit。
@@ -11,15 +11,15 @@ description: 交接(归档后生成/查看 changes/archive/.../handoff.md)
11
11
  - 指引在归档与依赖场景下如何使用 handoff
12
12
 
13
13
  说明:
14
- - `handoff.md` `aiws change archive` 自动生成:`changes/archive/<date>-<change-id>/handoff.md`
14
+ - `handoff.md` 默认由 `aiws change finish --push` 自动归档时生成:`changes/archive/<date>-<change-id>/handoff.md`
15
15
  - `Depends_On` 依赖若已归档,`aiws change start` 会尝试读取依赖的 `handoff.md` 并输出摘要
16
16
 
17
17
  阶段定位:
18
- - handoff / archive 阶段;负责把已完成 change 的上下文压缩成后续协作者可直接接手的说明。
18
+ - handoff / archive 阶段;负责查看或补充已归档 change 的交接说明。
19
19
 
20
20
  必需输入:
21
- - 当前或已归档的 `change/<change-id>`
22
- - 对应 archive 目录或准备归档的 change 工件
21
+ - 已归档的 `change/<change-id>`
22
+ - 对应 archive 目录
23
23
 
24
24
  必需输出:
25
25
  - `Change_ID:` 当前交接对象
@@ -28,7 +28,6 @@ description: 交接(归档后生成/查看 changes/archive/.../handoff.md)
28
28
 
29
29
  阻断条件:
30
30
  - 无法定位目标 change
31
- - 未归档且无法执行 `aiws change archive <change-id>`
32
31
  - `handoff.md` 无法生成或读取
33
32
 
34
33
  完成判定:
@@ -36,15 +35,16 @@ description: 交接(归档后生成/查看 changes/archive/.../handoff.md)
36
35
 
37
36
  执行建议:
38
37
  1) 先运行 `$ws-preflight`。
39
- 2) 若本 change 已完成并准备归档:运行 `aiws change archive <change-id>`(会先做严格校验,并移动目录到 `changes/archive/`,同时生成 `handoff.md`)。
38
+ 2) 先确认本 change 已通过 `aiws change finish <change-id> --push` 完成自动归档。
40
39
  3) 查看 handoff:
41
40
  ```bash
42
41
  change_id="<change-id>"
43
42
  ls -1 changes/archive/*-"${change_id}"/handoff.md
44
43
  sed -n '1,160p' changes/archive/*-"${change_id}"/handoff.md
45
44
  ```
46
- 4) 若要让后续 change 可接力:在 `proposal.md` 里声明 `Blocks`(下一步建议会据此生成)。
47
- 5) 若本 change 使用了外部 / 子 agent 协作:确认关键结论已经进入 `review/` `evidence/`,避免 handoff 只留下原始 patch/分析文件而没有最终结论。
45
+ 4) 若是历史/异常场景,尚未归档且需要手工恢复,再运行 `aiws change archive <change-id>`。
46
+ 5) 若要让后续 change 可接力:在 `proposal.md` 里声明 `Blocks`(下一步建议会据此生成)。
47
+ 6) 若本 change 使用了外部 / 子 agent 协作:确认关键结论已经进入 `review/` 或 `evidence/`,避免 handoff 只留下原始 patch/分析文件而没有最终结论。
48
48
 
49
49
  输出要求:
50
50
  - `Change_ID:` <change-id>
@@ -19,14 +19,15 @@
19
19
  - `ws-plan`:建立 `change/<change-id>` 绑定,落盘 `plan/...`,明确 Verify / Risks / Evidence。
20
20
  - `ws-plan-verify`:在编码前做计划质检;不过门禁就先修 plan,不跳步进实现。
21
21
  - `ws-dev`:只做可归因、可验证的小步实现;输出 Changed / Verify / Evidence。
22
+ - `ws-dev-lite`:`ws-dev` 的轻量入口;适用于 simple/local 单点修复,默认不建 `plan/...`、不跑 `ws-plan-verify`,治理归属仍收敛到 `ws-dev`。
22
23
  - `ws-delegate`:仅在任务已绑定且 scope 可控时,使用原生多 agent / sub-agent;否则明确降级为单 agent + 协同工件模式。
23
24
  - `ws-review`:对当前改动做通用审计;高风险或准备交付时,继续细化到 `ws-spec-review` + `ws-quality-review`。
24
25
  - `ws-spec-review`:审查 requirements 归因、plan/change 绑定、evidence 与 workflow gate 完整性。
25
26
  - `ws-quality-review`:审查行为回归、边界条件、测试覆盖与实现质量。
26
27
  - `ws-commit`:串联 review + validate stamp + commit message 确认;不跳过 hooks。
27
28
  - `ws-verify-before-complete`:在 finish / handoff 前检查双审查、validate stamp 与交付证据是否齐全。
28
- - `ws-deliver` / `ws-finish`:做交付收尾、fast-forward 合并、submodule 感知 push 与证据收敛。
29
- - `ws-handoff`:在归档后输出 handoff,给下一次会话或下一位协作者接力。
29
+ - `ws-deliver` / `ws-finish`:做交付收尾、fast-forward 合并、submodule 感知 push,并在完整 finish 后自动归档。
30
+ - `ws-handoff`:查看/补充归档后的 handoff,给下一次会话或下一位协作者接力。
30
31
 
31
32
  阶段产物(最少):
32
33
  - planning:`plan/...`、`changes/<change-id>/proposal.md`、`tasks.md`
@@ -45,6 +46,7 @@ OpenCode(如果你主要用 OpenCode,优先):
45
46
  - `/ws-preflight`:读取真值文件并输出约束摘要
46
47
  - `/ws-plan` / `/ws-plan-verify`:先生成计划,再做执行前质检
47
48
  - `/ws-dev`:常规实现/改配置/改测试
49
+ - `/ws-dev-lite`:小问题直修;若复杂度升高,立刻回到 `/ws-dev` 或 `/ws-plan`
48
50
  - `/ws-delegate`:按 AIWS 委托合同拆分子任务,并优先借用 oMo agent
49
51
  - `/ws-bugfix`:缺陷修复 + 证据落盘 + CSV 汇总
50
52
  - `/ws-review` / `/ws-commit`:提交前审计、门禁与 commit
@@ -64,7 +66,7 @@ Codex(对应入口,可选):
64
66
  - 若你不想先记住阶段,先用 `$using-aiws` 让 router 判定下一步
65
67
  - 对应入口在 `.agents/skills/`;显式调用时使用 `$ws-*`
66
68
  - `$using-aiws`
67
- - `$ws-preflight` / `$ws-plan` / `$ws-plan-verify` / `$ws-dev` / `$ws-delegate` / `$ws-frontend-design`
69
+ - `$ws-preflight` / `$ws-plan` / `$ws-plan-verify` / `$ws-dev` / `$ws-dev-lite` / `$ws-delegate` / `$ws-frontend-design`
68
70
  - `$ws-review` / `$ws-spec-review` / `$ws-quality-review` / `$ws-commit`
69
71
  - `$ws-verify-before-complete` / `$ws-finish` / `$ws-deliver`
70
72
  - `$ws-pull` / `$ws-push` / `$ws-submodule-setup`
@@ -3,7 +3,7 @@
3
3
  <!-- AIWS_MANAGED_BEGIN:ai-project:core -->
4
4
  <!-- AI_PROJECT_VERSION: 2 -->
5
5
 
6
- 本文件用于在**具体项目/工作区**内统一 Codex / Claude / OpenCode / iFlow 的执行约束与协作方式,避免多套规则各写一份导致漂移。
6
+ 本文件用于在**具体项目/工作区**内统一 Codex / Claude / OpenCode 的执行约束与协作方式,避免多套规则各写一份导致漂移。
7
7
 
8
8
  定位:
9
9
  - `REQUIREMENTS.md`:定义“要做什么/验收是什么”(需求真值)
@@ -32,7 +32,7 @@
32
32
 
33
33
  <!-- AIWS_MANAGED_BEGIN:ai-workspace:core -->
34
34
 
35
- 本文件描述“AI Workspace(多子项目工作区)”的结构与运行方式,供 Codex / Claude / OpenCode / iFlow 共同读取。
35
+ 本文件描述“AI Workspace(多子项目工作区)”的结构与运行方式,供 Codex / Claude / OpenCode 共同读取。
36
36
 
37
37
  ## 1) 目录发现规则
38
38
 
@@ -34,24 +34,25 @@ changes/
34
34
  常用命令(推荐使用 `aiws`;不依赖 dotfiles):
35
35
  - `aiws change start <change-id>`(默认:切到 `change/<change-id>` 并初始化工件目录;若检测到 `.gitmodules` 则默认优先使用 worktree,失败则回退为不切分支,避免 submodule 状态混乱)
36
36
  - `aiws change start <change-id> --no-switch`(superproject + submodule 场景:不切分支,仅准备 `change/<change-id>` 分支与工件目录)
37
- - `aiws change start <change-id> --switch`(显式允许切换 superproject 分支;仅在存在 `.gitmodules` 时有意义)
37
+ - `aiws change start <change-id> --switch`(显式允许切换 superproject 分支;仅切 superproject,不递归切换 submodule;仅在存在 `.gitmodules` 时有意义)
38
38
  - `aiws change start <change-id> --worktree`(推荐用于 superproject + submodule:创建独立 worktree;当前目录分支保持不变)
39
39
  - 可选:`--worktree-dir <path>` 覆盖 worktree 目录
40
40
  - 可选:`--submodules` 在 worktree 内执行 `git submodule update --init --recursive`
41
41
  - `aiws change finish <change-id>`(安全合并:fast-forward 合并回目标分支;在 `change/<change-id>` 分支上执行时会尝试使用 `.ws-change.json` 的 `base_branch` 作为目标分支)
42
- - `aiws change finish <change-id> --push [--remote <name>]`(最小收尾闭环:若存在 `.gitmodules` 则先按 `changes/<id>/submodules.targets` 顺序 push submodule,再 push 目标分支;默认优先遵循 upstream 配置;若 `change/<change-id>` 位于独立 worktree,且该 worktree 干净,则在 push 成功后自动执行 worktree cleanup;含 submodule worktree 会因 Git 原生限制在 clean-check 后内部走 `git worktree remove --force`)
42
+ - `aiws change finish <change-id> --push [--remote <name>]`(最小收尾闭环:若存在 `.gitmodules` 则先按 `changes/<id>/submodules.targets` 顺序 push submodule,再 push 目标分支;默认优先遵循 upstream 配置;若 `change/<change-id>` 位于独立 worktree,且该 worktree 干净,则在 push 成功后自动执行 worktree cleanup,并把 `changes/<id>/` 自动归档到 `changes/archive/...`,同时生成 `handoff.md` archive commit)
43
+ - 已 archive 的 `change/<change-id>` 才算真正终态;若只是“已 finish 但仍有 active `changes/<id>/` 未归档”,默认应重跑 `aiws change finish <change-id> --push` 续完收尾,而不是继续开发或复用旧 branch 做新需求。
43
44
  - `aiws change new <change-id>`
44
45
  - `aiws change list`
45
46
  - `aiws change status <change-id>`
46
47
  - `aiws change next <change-id>`
47
48
  - `aiws change validate <change-id>`
48
49
  - `aiws change sync <change-id>`
49
- - `aiws change archive <change-id>`
50
+ - `aiws change archive <change-id>`(手工恢复 / 历史兼容入口;标准链路一般不需要单独执行)
50
51
  - `aiws change evidence <change-id>`(收敛 review / validate / collaboration summary 到 `changes/<id>/evidence/`)
51
52
 
52
53
  Active change(推荐,团队共享):
53
54
  - 使用分支名声明当前变更:`change/<change-id>`(也支持 `changes/`、`ws/`、`ws-change/`)
54
- - 切到该分支后,可省略 `<change-id>` 执行:`aiws change status|next|validate|sync|archive`
55
+ - 切到该分支后,可省略 `<change-id>` 执行:`aiws change status|next|validate|sync`
55
56
 
56
57
  计划质量门(推荐,执行前):
57
58
  - 先生成计划:`$ws-plan`(若尚未进入 `change/<change-id>` 上下文,应先由它调用 `aiws change start <change-id>` 建立分支 / worktree,再在该上下文内写 `plan/...`)
@@ -74,7 +75,10 @@ Active change(推荐,团队共享):
74
75
 
75
76
  Hooks/CI(推荐,硬约束):
76
77
  - 工作区会安装 `.githooks/{commit-msg,pre-commit,pre-push}`:
77
- - `commit-msg`:默认提示优先使用中文 commit message;若执行 `git config aiws.commitMessagePolicy strict`,则会拒绝全英文首行(`Merge/Revert/fixup!/squash!` 例外)
78
+ - `commit-msg`:默认行为按仓库角色区分
79
+ - superproject / root 仓库(存在 `.gitmodules`):默认 `off`,允许自由 commit message
80
+ - submodule / 普通仓库:默认 `warn`,提示优先使用中文 commit message
81
+ - 若执行 `git config aiws.commitMessagePolicy strict`,则会拒绝全英文首行(`Merge/Revert/fixup!/squash!` 例外)
78
82
  - `pre-commit` / `pre-push`:默认执行 `aiws validate .`
79
83
  - 还会安装门禁脚本(`tools/ws_change_check.py`、`tools/requirements_contract.py`)。
80
84
  - **启用 hooks 需要本地配置**(不会自动提交到 git):
@@ -93,4 +97,4 @@ Hooks/CI(推荐,硬约束):
93
97
  - 委托分析先落到 `changes/<id>/analysis/`,由主 agent 在 `ws-review` 或 `review/*.md` 中收敛结论。
94
98
  - patch 草案先落到 `changes/<id>/patches/`,未经审查不要直接应用。
95
99
  - 交付前建议执行:`aiws change evidence <change-id>`,让 `delivery-summary` 与 `collaboration-summary` 一起落到 `changes/<id>/evidence/`。
96
- - 归档后 `handoff.md` 会包含协同工件摘要,便于下一次会话继续接力。
100
+ - finish 自动归档后生成的 `handoff.md` 会包含协同工件摘要,便于下一次会话继续接力。
@@ -41,4 +41,4 @@
41
41
  - [ ] 4.1 证据落盘到 `.agentdocs/tmp/...`(报告/日志/请求响应等)
42
42
  - [ ] 4.2 生成持久证据:`aiws change evidence {{CHANGE_ID}}`
43
43
  - [ ] 4.3 交叉审计(可选但推荐):在 AI 工具内运行 `/ws-review`(或按 `AI_PROJECT.md` 手工审计)
44
- - [ ] 4.4 归档:`aiws change archive {{CHANGE_ID}}`
44
+ - [ ] 4.4 收尾:`aiws change finish {{CHANGE_ID}} --push`(成功后自动归档并生成 handoff)
@@ -6,8 +6,7 @@
6
6
  "tools": [
7
7
  "claude",
8
8
  "opencode",
9
- "codex",
10
- "iflow"
9
+ "codex"
11
10
  ]
12
11
  },
13
12
  "required": [
@@ -35,6 +34,7 @@
35
34
  ".claude/commands/ws-preflight.md",
36
35
  ".claude/commands/ws-migrate.md",
37
36
  ".claude/commands/ws-dev.md",
37
+ ".claude/commands/ws-dev-lite.md",
38
38
  ".claude/commands/ws-deliver.md",
39
39
  ".claude/commands/ws-analyze.md",
40
40
  ".claude/commands/ws-pull.md",
@@ -56,6 +56,7 @@
56
56
  ".opencode/command/ws-preflight.md",
57
57
  ".opencode/command/ws-migrate.md",
58
58
  ".opencode/command/ws-dev.md",
59
+ ".opencode/command/ws-dev-lite.md",
59
60
  ".opencode/command/ws-deliver.md",
60
61
  ".opencode/command/ws-analyze.md",
61
62
  ".opencode/command/ws-bugfix.md",
@@ -72,43 +73,6 @@
72
73
  ".opencode/command/ws-req-contract-sync.md",
73
74
  ".opencode/command/ws-req-contract-validate.md",
74
75
  ".opencode/command/ws-req-flow-sync.md",
75
- ".iflow/commands/aiws-init.toml",
76
- ".iflow/commands/aiws-update.toml",
77
- ".iflow/commands/aiws-validate.toml",
78
- ".iflow/commands/aiws-rollback.toml",
79
- ".iflow/commands/server-test-plan.toml",
80
- ".iflow/commands/server-test.toml",
81
- ".iflow/commands/server-triage.toml",
82
- ".iflow/commands/server-fix.toml",
83
- ".iflow/commands/server-fix-and-commit.toml",
84
- ".iflow/commands/server-drain.toml",
85
- ".iflow/commands/server-commit.toml",
86
- ".iflow/commands/server_test-plan.toml",
87
- ".iflow/commands/server_test.toml",
88
- ".iflow/commands/ws-preflight.toml",
89
- ".iflow/commands/ws-migrate.toml",
90
- ".iflow/commands/ws-dev.toml",
91
- ".iflow/commands/ws-analyze.toml",
92
- ".iflow/commands/ws-deliver.toml",
93
- ".iflow/commands/ws-pull.toml",
94
- ".iflow/commands/ws-push.toml",
95
- ".iflow/commands/ws-finish.toml",
96
- ".iflow/commands/ws-submodule-setup.toml",
97
- ".iflow/commands/ws-review.toml",
98
- ".iflow/commands/ws-commit.toml",
99
- ".iflow/commands/ws-rule.toml",
100
- ".iflow/commands/ws-contract-check.toml",
101
- ".iflow/commands/ws-doctor.toml",
102
- ".iflow/commands/ws-env-doctor.toml",
103
- ".iflow/commands/ws-init.toml",
104
- ".iflow/commands/ws-memory-bank-init.toml",
105
- ".iflow/commands/ws-feature-plan.toml",
106
- ".iflow/commands/ws-feature-deliver.toml",
107
- ".iflow/commands/ws-req-review.toml",
108
- ".iflow/commands/ws-req-change.toml",
109
- ".iflow/commands/ws-req-contract-sync.toml",
110
- ".iflow/commands/ws-req-contract-validate.toml",
111
- ".iflow/commands/ws-req-flow-sync.toml",
112
76
  ".claude/commands/p-aiws-change-archive.md",
113
77
  ".claude/commands/p-aiws-change-finish.md",
114
78
  ".claude/commands/p-aiws-change-list.md",
@@ -156,7 +120,6 @@
156
120
  ".opencode/commands/**"
157
121
  ],
158
122
  "optional": [
159
- ".iflow/agents/**",
160
123
  "memory-bank/**",
161
124
  "secrets/test-accounts.example.json",
162
125
  ".opencode/oh-my-opencode.json.example",
@@ -166,8 +129,6 @@
166
129
  "tools/requirements_contract_sync.py",
167
130
  "tools/requirements_flow_gen.py",
168
131
  "tools/server_test_runner.py",
169
- "tools/iflow_watchdog.sh",
170
- "tools/install_iflow_watchdog_systemd_user.sh",
171
132
  "tools/ws_resolve_sub_target.sh"
172
133
  ],
173
134
  "update": {
@@ -223,7 +184,54 @@
223
184
  ".opencode/command/aiws-change-archive.md",
224
185
  ".opencode/command/aiws-change-templates-which.md",
225
186
  ".opencode/command/aiws-change-templates-init.md",
226
- ".agents/skills/ws-tasks-plan/SKILL.md"
187
+ ".agents/skills/ws-tasks-plan/SKILL.md",
188
+ ".iflow/agents/feature-reviewer.md",
189
+ ".iflow/agents/requirements-analyst.md",
190
+ ".iflow/agents/server-commit-manager.md",
191
+ ".iflow/agents/server-fix-implementer.md",
192
+ ".iflow/agents/server-test-planner.md",
193
+ ".iflow/agents/server-test-triager.md",
194
+ ".iflow/commands/aiws-init.toml",
195
+ ".iflow/commands/aiws-rollback.toml",
196
+ ".iflow/commands/aiws-update.toml",
197
+ ".iflow/commands/aiws-validate.toml",
198
+ ".iflow/commands/server-commit.toml",
199
+ ".iflow/commands/server-drain.toml",
200
+ ".iflow/commands/server-fix-and-commit.toml",
201
+ ".iflow/commands/server-fix.toml",
202
+ ".iflow/commands/server-test-plan.toml",
203
+ ".iflow/commands/server-test.toml",
204
+ ".iflow/commands/server-triage.toml",
205
+ ".iflow/commands/server_test-plan.toml",
206
+ ".iflow/commands/server_test.toml",
207
+ ".iflow/commands/ws-analyze.toml",
208
+ ".iflow/commands/ws-commit.toml",
209
+ ".iflow/commands/ws-contract-check.toml",
210
+ ".iflow/commands/ws-deliver.toml",
211
+ ".iflow/commands/ws-dev.toml",
212
+ ".iflow/commands/ws-doctor.toml",
213
+ ".iflow/commands/ws-env-doctor.toml",
214
+ ".iflow/commands/ws-feature-deliver.toml",
215
+ ".iflow/commands/ws-feature-plan.toml",
216
+ ".iflow/commands/ws-finish.toml",
217
+ ".iflow/commands/ws-init.toml",
218
+ ".iflow/commands/ws-memory-bank-init.toml",
219
+ ".iflow/commands/ws-migrate.toml",
220
+ ".iflow/commands/ws-preflight.toml",
221
+ ".iflow/commands/ws-pull.toml",
222
+ ".iflow/commands/ws-push.toml",
223
+ ".iflow/commands/ws-req-change.toml",
224
+ ".iflow/commands/ws-req-contract-sync.toml",
225
+ ".iflow/commands/ws-req-contract-validate.toml",
226
+ ".iflow/commands/ws-req-flow-sync.toml",
227
+ ".iflow/commands/ws-req-review.toml",
228
+ ".iflow/commands/ws-review.toml",
229
+ ".iflow/commands/ws-rule.toml",
230
+ ".iflow/commands/ws-submodule-setup.toml",
231
+ "tools/iflow_watchdog.sh",
232
+ "tools/install_iflow_watchdog_systemd_user.sh",
233
+ "tools/systemd/iflow-watchdog@.service",
234
+ "tools/systemd/iflow-watchdog@.timer"
227
235
  ],
228
236
  "replace_file": [
229
237
  ".aiws/manifest.json",
@@ -256,6 +264,7 @@
256
264
  ".agents/skills/ws-bugfix/SKILL.md",
257
265
  ".agents/skills/ws-commit/SKILL.md",
258
266
  ".agents/skills/ws-dev/SKILL.md",
267
+ ".agents/skills/ws-dev-lite/SKILL.md",
259
268
  ".agents/skills/ws-delegate/SKILL.md",
260
269
  ".agents/skills/ws-frontend-design/SKILL.md",
261
270
  ".agents/skills/ws-deliver/SKILL.md",
@@ -280,43 +289,6 @@
280
289
  ".agents/skills/ws-verify-before-complete/SKILL.md",
281
290
  ".agents/skills/ws-rule/SKILL.md",
282
291
  ".opencode/command/ws-bugfix.md",
283
- ".iflow/commands/aiws-init.toml",
284
- ".iflow/commands/aiws-update.toml",
285
- ".iflow/commands/aiws-validate.toml",
286
- ".iflow/commands/aiws-rollback.toml",
287
- ".iflow/commands/server-test-plan.toml",
288
- ".iflow/commands/server-test.toml",
289
- ".iflow/commands/server-triage.toml",
290
- ".iflow/commands/server-fix.toml",
291
- ".iflow/commands/server-fix-and-commit.toml",
292
- ".iflow/commands/server-drain.toml",
293
- ".iflow/commands/server-commit.toml",
294
- ".iflow/commands/server_test-plan.toml",
295
- ".iflow/commands/server_test.toml",
296
- ".iflow/commands/ws-preflight.toml",
297
- ".iflow/commands/ws-migrate.toml",
298
- ".iflow/commands/ws-dev.toml",
299
- ".iflow/commands/ws-analyze.toml",
300
- ".iflow/commands/ws-deliver.toml",
301
- ".iflow/commands/ws-pull.toml",
302
- ".iflow/commands/ws-push.toml",
303
- ".iflow/commands/ws-finish.toml",
304
- ".iflow/commands/ws-submodule-setup.toml",
305
- ".iflow/commands/ws-review.toml",
306
- ".iflow/commands/ws-commit.toml",
307
- ".iflow/commands/ws-rule.toml",
308
- ".iflow/commands/ws-contract-check.toml",
309
- ".iflow/commands/ws-doctor.toml",
310
- ".iflow/commands/ws-env-doctor.toml",
311
- ".iflow/commands/ws-init.toml",
312
- ".iflow/commands/ws-memory-bank-init.toml",
313
- ".iflow/commands/ws-feature-plan.toml",
314
- ".iflow/commands/ws-feature-deliver.toml",
315
- ".iflow/commands/ws-req-review.toml",
316
- ".iflow/commands/ws-req-change.toml",
317
- ".iflow/commands/ws-req-contract-sync.toml",
318
- ".iflow/commands/ws-req-contract-validate.toml",
319
- ".iflow/commands/ws-req-flow-sync.toml",
320
292
  ".claude/commands/p-aiws-change-archive.md",
321
293
  ".claude/commands/p-aiws-change-finish.md",
322
294
  ".claude/commands/p-aiws-change-list.md",
@@ -405,6 +377,8 @@
405
377
  ".opencode/skills/ws-deliver/SKILL.md",
406
378
  ".claude/skills/ws-dev/SKILL.md",
407
379
  ".opencode/skills/ws-dev/SKILL.md",
380
+ ".claude/skills/ws-dev-lite/SKILL.md",
381
+ ".opencode/skills/ws-dev-lite/SKILL.md",
408
382
  ".opencode/skills/ws-delegate/SKILL.md",
409
383
  ".opencode/oh-my-opencode.json.example",
410
384
  ".claude/skills/ws-finish/SKILL.md",
@@ -485,6 +459,9 @@
485
459
  ".claude/commands/ws-dev.md": [
486
460
  "claude:ws-dev"
487
461
  ],
462
+ ".claude/commands/ws-dev-lite.md": [
463
+ "claude:ws-dev-lite"
464
+ ],
488
465
  ".claude/commands/ws-deliver.md": [
489
466
  "claude:ws-deliver"
490
467
  ],
@@ -548,6 +525,9 @@
548
525
  ".opencode/command/ws-dev.md": [
549
526
  "opencode:ws-dev"
550
527
  ],
528
+ ".opencode/command/ws-dev-lite.md": [
529
+ "opencode:ws-dev-lite"
530
+ ],
551
531
  ".opencode/command/ws-deliver.md": [
552
532
  "opencode:ws-deliver"
553
533
  ],
@@ -788,6 +768,9 @@
788
768
  ".opencode/commands/ws-dev.md": [
789
769
  "opencode:ws-dev"
790
770
  ],
771
+ ".opencode/commands/ws-dev-lite.md": [
772
+ "opencode:ws-dev-lite"
773
+ ],
791
774
  ".opencode/commands/ws-finish.md": [
792
775
  "opencode:ws-finish"
793
776
  ],
@@ -1,6 +1,6 @@
1
1
  # Memory Bank(工作区上下文)
2
2
 
3
- 目的:给 iFlow/Codex/Claude 一个“固定且可持续更新”的上下文集合,避免每次会话重新讲一遍导致跑偏。
3
+ 目的:给 OpenCode/Codex/Claude 一个“固定且可持续更新”的上下文集合,避免每次会话重新讲一遍导致跑偏。
4
4
 
5
5
  在你的工作区中:
6
6
  - `REQUIREMENTS.md` 仍是**需求真值**(不要复制到这里)。
@@ -11,4 +11,3 @@
11
11
  - 改代码前:先看 `REQUIREMENTS.md` + `AI_PROJECT.md` + `AI_WORKSPACE.md`,再结合本目录的 `architecture.md`/`progress.md`。
12
12
  - 每次完成一个可验证的小步:更新 `progress.md`(写清:做了什么、证据路径、下一步)。
13
13
  - 发生重大结构变化:更新 `architecture.md`(只写高层关系,不要堆细节)。
14
-