@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.
- package/README.md +22 -0
- package/docs/aiws-bootstrap-routing-design.md +138 -0
- package/docs/aiws-governance-positioning.md +69 -0
- package/docs/cli-interface.md +91 -6
- package/docs/collaboration-artifacts.md +62 -0
- package/docs/opencode-omo-adapter.md +135 -0
- package/docs/opencode-omo-validation-checklist.md +90 -0
- package/docs/spec-contract.md +30 -22
- package/docs/superpowers-collaboration-adoption.md +92 -0
- package/docs/workflow-delegation-contracts.json +274 -0
- package/docs/workflow-delegation-contracts.md +248 -0
- package/docs/workflow-delegation-contracts.schema.json +176 -0
- package/docs/workflow-governance-rules.json +294 -0
- package/docs/workflow-governance-rules.md +63 -0
- package/docs/workflow-governance-rules.schema.json +182 -0
- package/docs/workflow-review-gates.json +72 -0
- package/docs/workflow-review-gates.md +36 -0
- package/docs/workflow-review-gates.schema.json +67 -0
- package/docs/workflow-router-rules.json +196 -0
- package/docs/workflow-router-rules.md +83 -0
- package/docs/workflow-router-rules.schema.json +119 -0
- package/docs/workflow-stage-contracts.json +148 -0
- package/docs/workflow-stage-contracts.md +70 -0
- package/docs/workflow-stage-contracts.schema.json +98 -0
- package/package.json +1 -1
- package/templates/workspace/.agents/skills/using-aiws/SKILL.md +87 -0
- package/templates/workspace/.agents/skills/ws-commit/SKILL.md +27 -1
- package/templates/workspace/.agents/skills/ws-delegate/SKILL.md +75 -0
- package/templates/workspace/.agents/skills/ws-deliver/SKILL.md +25 -4
- package/templates/workspace/.agents/skills/ws-dev/SKILL.md +35 -6
- package/templates/workspace/.agents/skills/ws-dev-lite/SKILL.md +58 -0
- package/templates/workspace/.agents/skills/ws-finish/SKILL.md +25 -12
- package/templates/workspace/.agents/skills/ws-frontend-design/SKILL.md +126 -0
- package/templates/workspace/.agents/skills/ws-handoff/SKILL.md +25 -4
- package/templates/workspace/.agents/skills/ws-plan/SKILL.md +25 -1
- package/templates/workspace/.agents/skills/ws-plan-verify/SKILL.md +20 -0
- package/templates/workspace/.agents/skills/ws-preflight/SKILL.md +23 -0
- package/templates/workspace/.agents/skills/ws-quality-review/SKILL.md +56 -0
- package/templates/workspace/.agents/skills/ws-review/SKILL.md +24 -0
- package/templates/workspace/.agents/skills/ws-spec-review/SKILL.md +57 -0
- package/templates/workspace/.agents/skills/ws-verify-before-complete/SKILL.md +59 -0
- package/templates/workspace/.aiws/manifest.json +2 -6
- package/templates/workspace/.claude/commands/using-aiws.md +25 -0
- package/templates/workspace/.claude/commands/ws-dev-lite.md +31 -0
- package/templates/workspace/.claude/commands/ws-finish.md +1 -1
- package/templates/workspace/.claude/commands/ws-handoff.md +3 -2
- package/templates/workspace/.claude/commands/ws-quality-review.md +24 -0
- package/templates/workspace/.claude/commands/ws-review.md +2 -2
- package/templates/workspace/.claude/commands/ws-spec-review.md +24 -0
- package/templates/workspace/.claude/commands/ws-verify-before-complete.md +24 -0
- package/templates/workspace/.claude/skills/p-aiws-change-archive/SKILL.md +24 -0
- package/templates/workspace/.claude/skills/p-aiws-change-finish/SKILL.md +24 -0
- package/templates/workspace/.claude/skills/p-aiws-change-list/SKILL.md +18 -0
- package/templates/workspace/.claude/skills/p-aiws-change-new/SKILL.md +26 -0
- package/templates/workspace/.claude/skills/p-aiws-change-next/SKILL.md +19 -0
- package/templates/workspace/.claude/skills/p-aiws-change-start/SKILL.md +33 -0
- package/templates/workspace/.claude/skills/p-aiws-change-status/SKILL.md +19 -0
- package/templates/workspace/.claude/skills/p-aiws-change-sync/SKILL.md +19 -0
- package/templates/workspace/.claude/skills/p-aiws-change-templates-init/SKILL.md +18 -0
- package/templates/workspace/.claude/skills/p-aiws-change-templates-which/SKILL.md +18 -0
- package/templates/workspace/.claude/skills/p-aiws-change-validate/SKILL.md +23 -0
- package/templates/workspace/.claude/skills/p-aiws-hooks-install/SKILL.md +30 -0
- package/templates/workspace/.claude/skills/p-aiws-hooks-status/SKILL.md +18 -0
- package/templates/workspace/.claude/skills/p-aiws-init/SKILL.md +27 -0
- package/templates/workspace/.claude/skills/p-aiws-rollback/SKILL.md +18 -0
- package/templates/workspace/.claude/skills/p-aiws-update/SKILL.md +26 -0
- package/templates/workspace/.claude/skills/p-aiws-validate/SKILL.md +22 -0
- package/templates/workspace/.claude/skills/p-tasks-plan/SKILL.md +37 -0
- package/templates/workspace/.claude/skills/using-aiws/SKILL.md +87 -0
- package/templates/workspace/.claude/skills/ws-analyze/SKILL.md +26 -0
- package/templates/workspace/.claude/skills/ws-bugfix/SKILL.md +111 -0
- package/templates/workspace/.claude/skills/ws-commit/SKILL.md +130 -0
- package/templates/workspace/.claude/skills/ws-deliver/SKILL.md +230 -0
- package/templates/workspace/.claude/skills/ws-dev/SKILL.md +168 -0
- package/templates/workspace/.claude/skills/ws-dev-lite/SKILL.md +58 -0
- package/templates/workspace/.claude/skills/ws-finish/SKILL.md +209 -0
- package/templates/workspace/.claude/skills/ws-frontend-design/SKILL.md +126 -0
- package/templates/workspace/.claude/skills/ws-handoff/SKILL.md +52 -0
- package/templates/workspace/.claude/skills/ws-migrate/SKILL.md +54 -0
- package/templates/workspace/.claude/skills/ws-plan/SKILL.md +138 -0
- package/templates/workspace/.claude/skills/ws-plan-verify/SKILL.md +61 -0
- package/templates/workspace/.claude/skills/ws-preflight/SKILL.md +55 -0
- package/templates/workspace/.claude/skills/ws-pull/SKILL.md +119 -0
- package/templates/workspace/.claude/skills/ws-push/SKILL.md +110 -0
- package/templates/workspace/.claude/skills/ws-quality-review/SKILL.md +56 -0
- package/templates/workspace/.claude/skills/ws-req-change/SKILL.md +41 -0
- package/templates/workspace/.claude/skills/ws-req-contract-sync/SKILL.md +17 -0
- package/templates/workspace/.claude/skills/ws-req-contract-validate/SKILL.md +12 -0
- package/templates/workspace/.claude/skills/ws-req-flow-sync/SKILL.md +28 -0
- package/templates/workspace/.claude/skills/ws-req-review/SKILL.md +32 -0
- package/templates/workspace/.claude/skills/ws-review/SKILL.md +50 -0
- package/templates/workspace/.claude/skills/ws-rule/SKILL.md +23 -0
- package/templates/workspace/.claude/skills/ws-spec-review/SKILL.md +57 -0
- package/templates/workspace/.claude/skills/ws-submodule-setup/SKILL.md +65 -0
- package/templates/workspace/.claude/skills/ws-verify-before-complete/SKILL.md +59 -0
- package/templates/workspace/.githooks/commit-msg +10 -0
- package/templates/workspace/.opencode/command/using-aiws.md +30 -0
- package/templates/workspace/.opencode/command/ws-delegate.md +33 -0
- package/templates/workspace/.opencode/command/ws-dev-lite.md +34 -0
- package/templates/workspace/.opencode/command/ws-finish.md +1 -1
- package/templates/workspace/.opencode/command/ws-handoff.md +4 -3
- package/templates/workspace/.opencode/command/ws-plan.md +3 -0
- package/templates/workspace/.opencode/command/ws-preflight.md +4 -0
- package/templates/workspace/.opencode/command/ws-quality-review.md +30 -0
- package/templates/workspace/.opencode/command/ws-review.md +5 -2
- package/templates/workspace/.opencode/command/ws-spec-review.md +30 -0
- package/templates/workspace/.opencode/command/ws-verify-before-complete.md +27 -0
- package/templates/workspace/.opencode/commands/p-aiws-change-archive.md +27 -0
- package/templates/workspace/.opencode/commands/p-aiws-change-finish.md +27 -0
- package/templates/workspace/.opencode/commands/p-aiws-change-list.md +26 -0
- package/templates/workspace/.opencode/commands/p-aiws-change-new.md +27 -0
- package/templates/workspace/.opencode/commands/p-aiws-change-next.md +27 -0
- package/templates/workspace/.opencode/commands/p-aiws-change-start.md +27 -0
- package/templates/workspace/.opencode/commands/p-aiws-change-status.md +27 -0
- package/templates/workspace/.opencode/commands/p-aiws-change-sync.md +27 -0
- package/templates/workspace/.opencode/commands/p-aiws-change-templates-init.md +26 -0
- package/templates/workspace/.opencode/commands/p-aiws-change-templates-which.md +26 -0
- package/templates/workspace/.opencode/commands/p-aiws-change-validate.md +27 -0
- package/templates/workspace/.opencode/commands/p-aiws-hooks-install.md +26 -0
- package/templates/workspace/.opencode/commands/p-aiws-hooks-status.md +26 -0
- package/templates/workspace/.opencode/commands/p-aiws-init.md +23 -0
- package/templates/workspace/.opencode/commands/p-aiws-rollback.md +16 -0
- package/templates/workspace/.opencode/commands/p-aiws-update.md +22 -0
- package/templates/workspace/.opencode/commands/p-aiws-validate.md +17 -0
- package/templates/workspace/.opencode/commands/using-aiws.md +30 -0
- package/templates/workspace/.opencode/commands/ws-analyze.md +30 -0
- package/templates/workspace/.opencode/commands/ws-bugfix.md +35 -0
- package/templates/workspace/.opencode/commands/ws-commit.md +70 -0
- package/templates/workspace/.opencode/commands/ws-delegate.md +33 -0
- package/templates/workspace/{.iflow/commands/ws-deliver.toml → .opencode/commands/ws-deliver.md} +13 -13
- package/templates/workspace/.opencode/commands/ws-dev-lite.md +34 -0
- package/templates/workspace/.opencode/commands/ws-dev.md +36 -0
- package/templates/workspace/{.iflow/commands/ws-finish.toml → .opencode/commands/ws-finish.md} +46 -29
- package/templates/workspace/.opencode/commands/ws-handoff.md +26 -0
- package/templates/workspace/.opencode/commands/ws-migrate.md +25 -0
- package/templates/workspace/.opencode/commands/ws-plan-verify.md +28 -0
- package/templates/workspace/.opencode/commands/ws-plan.md +27 -0
- package/templates/workspace/.opencode/commands/ws-preflight.md +34 -0
- package/templates/workspace/.opencode/commands/ws-pull.md +87 -0
- package/templates/workspace/.opencode/commands/ws-push.md +93 -0
- package/templates/workspace/.opencode/commands/ws-quality-review.md +30 -0
- package/templates/workspace/.opencode/commands/ws-req-change.md +45 -0
- package/templates/workspace/.opencode/commands/ws-req-contract-sync.md +21 -0
- package/templates/workspace/.opencode/commands/ws-req-contract-validate.md +16 -0
- package/templates/workspace/.opencode/commands/ws-req-flow-sync.md +23 -0
- package/templates/workspace/.opencode/commands/ws-req-review.md +36 -0
- package/templates/workspace/.opencode/commands/ws-review.md +33 -0
- package/templates/workspace/.opencode/commands/ws-rule.md +27 -0
- package/templates/workspace/.opencode/commands/ws-spec-review.md +30 -0
- package/templates/workspace/.opencode/commands/ws-submodule-setup.md +57 -0
- package/templates/workspace/.opencode/commands/ws-verify-before-complete.md +27 -0
- package/templates/workspace/.opencode/oh-my-opencode.json.example +17 -0
- package/templates/workspace/.opencode/skills/p-aiws-change-archive/SKILL.md +24 -0
- package/templates/workspace/.opencode/skills/p-aiws-change-finish/SKILL.md +24 -0
- package/templates/workspace/.opencode/skills/p-aiws-change-list/SKILL.md +18 -0
- package/templates/workspace/.opencode/skills/p-aiws-change-new/SKILL.md +26 -0
- package/templates/workspace/.opencode/skills/p-aiws-change-next/SKILL.md +19 -0
- package/templates/workspace/.opencode/skills/p-aiws-change-start/SKILL.md +33 -0
- package/templates/workspace/.opencode/skills/p-aiws-change-status/SKILL.md +19 -0
- package/templates/workspace/.opencode/skills/p-aiws-change-sync/SKILL.md +19 -0
- package/templates/workspace/.opencode/skills/p-aiws-change-templates-init/SKILL.md +18 -0
- package/templates/workspace/.opencode/skills/p-aiws-change-templates-which/SKILL.md +18 -0
- package/templates/workspace/.opencode/skills/p-aiws-change-validate/SKILL.md +23 -0
- package/templates/workspace/.opencode/skills/p-aiws-hooks-install/SKILL.md +30 -0
- package/templates/workspace/.opencode/skills/p-aiws-hooks-status/SKILL.md +18 -0
- package/templates/workspace/.opencode/skills/p-aiws-init/SKILL.md +27 -0
- package/templates/workspace/.opencode/skills/p-aiws-rollback/SKILL.md +18 -0
- package/templates/workspace/.opencode/skills/p-aiws-update/SKILL.md +26 -0
- package/templates/workspace/.opencode/skills/p-aiws-validate/SKILL.md +22 -0
- package/templates/workspace/.opencode/skills/p-tasks-plan/SKILL.md +37 -0
- package/templates/workspace/.opencode/skills/using-aiws/SKILL.md +91 -0
- package/templates/workspace/.opencode/skills/ws-analyze/SKILL.md +26 -0
- package/templates/workspace/.opencode/skills/ws-bugfix/SKILL.md +111 -0
- package/templates/workspace/.opencode/skills/ws-commit/SKILL.md +130 -0
- package/templates/workspace/.opencode/skills/ws-delegate/SKILL.md +63 -0
- package/templates/workspace/.opencode/skills/ws-deliver/SKILL.md +230 -0
- package/templates/workspace/.opencode/skills/ws-dev/SKILL.md +168 -0
- package/templates/workspace/.opencode/skills/ws-dev-lite/SKILL.md +58 -0
- package/templates/workspace/.opencode/skills/ws-finish/SKILL.md +209 -0
- package/templates/workspace/.opencode/skills/ws-frontend-design/SKILL.md +126 -0
- package/templates/workspace/.opencode/skills/ws-handoff/SKILL.md +52 -0
- package/templates/workspace/.opencode/skills/ws-migrate/SKILL.md +54 -0
- package/templates/workspace/.opencode/skills/ws-plan/SKILL.md +148 -0
- package/templates/workspace/.opencode/skills/ws-plan-verify/SKILL.md +61 -0
- package/templates/workspace/.opencode/skills/ws-preflight/SKILL.md +60 -0
- package/templates/workspace/.opencode/skills/ws-pull/SKILL.md +119 -0
- package/templates/workspace/.opencode/skills/ws-push/SKILL.md +110 -0
- package/templates/workspace/.opencode/skills/ws-quality-review/SKILL.md +63 -0
- package/templates/workspace/.opencode/skills/ws-req-change/SKILL.md +41 -0
- package/templates/workspace/.opencode/skills/ws-req-contract-sync/SKILL.md +17 -0
- package/templates/workspace/.opencode/skills/ws-req-contract-validate/SKILL.md +12 -0
- package/templates/workspace/.opencode/skills/ws-req-flow-sync/SKILL.md +28 -0
- package/templates/workspace/.opencode/skills/ws-req-review/SKILL.md +32 -0
- package/templates/workspace/.opencode/skills/ws-review/SKILL.md +57 -0
- package/templates/workspace/.opencode/skills/ws-rule/SKILL.md +23 -0
- package/templates/workspace/.opencode/skills/ws-spec-review/SKILL.md +64 -0
- package/templates/workspace/.opencode/skills/ws-submodule-setup/SKILL.md +65 -0
- package/templates/workspace/.opencode/skills/ws-verify-before-complete/SKILL.md +59 -0
- package/templates/workspace/AGENTS.md +74 -30
- package/templates/workspace/AI_PROJECT.md +1 -1
- package/templates/workspace/AI_WORKSPACE.md +1 -1
- package/templates/workspace/changes/README.md +25 -4
- package/templates/workspace/changes/templates/proposal.md +15 -0
- package/templates/workspace/changes/templates/tasks.md +9 -2
- package/templates/workspace/manifest.json +340 -82
- package/templates/workspace/memory-bank/README.md +1 -2
- package/templates/workspace/tools/ws_change_check.py +26 -4
- package/templates/workspace/.iflow/agents/feature-reviewer.md +0 -27
- package/templates/workspace/.iflow/agents/requirements-analyst.md +0 -24
- package/templates/workspace/.iflow/agents/server-commit-manager.md +0 -28
- package/templates/workspace/.iflow/agents/server-fix-implementer.md +0 -31
- package/templates/workspace/.iflow/agents/server-test-planner.md +0 -28
- package/templates/workspace/.iflow/agents/server-test-triager.md +0 -30
- package/templates/workspace/.iflow/commands/aiws-init.toml +0 -24
- package/templates/workspace/.iflow/commands/aiws-rollback.toml +0 -18
- package/templates/workspace/.iflow/commands/aiws-update.toml +0 -23
- package/templates/workspace/.iflow/commands/aiws-validate.toml +0 -18
- package/templates/workspace/.iflow/commands/server-commit.toml +0 -27
- package/templates/workspace/.iflow/commands/server-drain.toml +0 -99
- package/templates/workspace/.iflow/commands/server-fix-and-commit.toml +0 -27
- package/templates/workspace/.iflow/commands/server-fix.toml +0 -65
- package/templates/workspace/.iflow/commands/server-test-plan.toml +0 -62
- package/templates/workspace/.iflow/commands/server-test.toml +0 -58
- package/templates/workspace/.iflow/commands/server-triage.toml +0 -38
- package/templates/workspace/.iflow/commands/server_test-plan.toml +0 -12
- package/templates/workspace/.iflow/commands/server_test.toml +0 -12
- package/templates/workspace/.iflow/commands/ws-analyze.toml +0 -33
- package/templates/workspace/.iflow/commands/ws-commit.toml +0 -46
- package/templates/workspace/.iflow/commands/ws-contract-check.toml +0 -69
- package/templates/workspace/.iflow/commands/ws-dev.toml +0 -34
- package/templates/workspace/.iflow/commands/ws-doctor.toml +0 -141
- package/templates/workspace/.iflow/commands/ws-env-doctor.toml +0 -74
- package/templates/workspace/.iflow/commands/ws-feature-deliver.toml +0 -44
- package/templates/workspace/.iflow/commands/ws-feature-plan.toml +0 -47
- package/templates/workspace/.iflow/commands/ws-init.toml +0 -53
- package/templates/workspace/.iflow/commands/ws-memory-bank-init.toml +0 -100
- package/templates/workspace/.iflow/commands/ws-migrate.toml +0 -59
- package/templates/workspace/.iflow/commands/ws-preflight.toml +0 -30
- package/templates/workspace/.iflow/commands/ws-pull.toml +0 -47
- package/templates/workspace/.iflow/commands/ws-push.toml +0 -40
- package/templates/workspace/.iflow/commands/ws-req-change.toml +0 -64
- package/templates/workspace/.iflow/commands/ws-req-contract-sync.toml +0 -25
- package/templates/workspace/.iflow/commands/ws-req-contract-validate.toml +0 -16
- package/templates/workspace/.iflow/commands/ws-req-flow-sync.toml +0 -36
- package/templates/workspace/.iflow/commands/ws-req-review.toml +0 -56
- package/templates/workspace/.iflow/commands/ws-review.toml +0 -33
- package/templates/workspace/.iflow/commands/ws-rule.toml +0 -43
- package/templates/workspace/.iflow/commands/ws-submodule-setup.toml +0 -32
- package/templates/workspace/tools/iflow_watchdog.sh +0 -138
- package/templates/workspace/tools/install_iflow_watchdog_systemd_user.sh +0 -118
- package/templates/workspace/tools/systemd/iflow-watchdog@.service +0 -16
- package/templates/workspace/tools/systemd/iflow-watchdog@.timer +0 -11
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ws-submodule-setup
|
|
3
|
+
description: 子模块分支对齐(写入 .gitmodules 的 submodule.<name>.branch;减少 detached 与人为差异)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
用中文输出(命令/路径/代码标识符保持原样不翻译)。
|
|
7
|
+
|
|
8
|
+
目标:
|
|
9
|
+
- 为每个 submodule 写入 `.gitmodules` 的 `submodule.<name>.branch`,让 `ws-pull` / `ws-finish` 能确定性地“挂回分支/fast-forward push”,避免 origin 多分支时靠猜导致偏差。
|
|
10
|
+
- 该变更是 **superproject 的团队真值**:需要提交 `.gitmodules`。
|
|
11
|
+
|
|
12
|
+
安全约束(强制):
|
|
13
|
+
- 不自动提交、不自动 push(必须先输出 diff 并让用户确认)
|
|
14
|
+
- 不在 submodule 中做破坏性操作(不 `reset --hard` / 不改动远端)
|
|
15
|
+
|
|
16
|
+
步骤(建议):
|
|
17
|
+
1) 确认工作区干净(否则停止):
|
|
18
|
+
```bash
|
|
19
|
+
git status --porcelain
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
2) 列出 submodules(没有则停止并说明无需配置):
|
|
23
|
+
```bash
|
|
24
|
+
test -f .gitmodules || { echo "no .gitmodules"; exit 0; }
|
|
25
|
+
git config --file .gitmodules --get-regexp '^submodule\\..*\\.path$'
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
3) 对每个 submodule,输出当前配置与建议分支(让用户确认每个 submodule 的 branch):
|
|
29
|
+
```bash
|
|
30
|
+
while read -r key sub_path; do
|
|
31
|
+
name="${key#submodule.}"; name="${name%.path}"
|
|
32
|
+
echo "== submodule: ${name} path=${sub_path} =="
|
|
33
|
+
echo "[current] branch=$(git config --file .gitmodules --get submodule.${name}.branch || true)"
|
|
34
|
+
echo "[origin] HEAD=$(git -C \"${sub_path}\" symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null || true)"
|
|
35
|
+
git -C "${sub_path}" branch -r --list "origin/*" | sed -n '1,30p' || true
|
|
36
|
+
echo "[choose] set one of:"
|
|
37
|
+
echo " - a concrete branch, e.g. main / master / release/x.y"
|
|
38
|
+
echo " - '.' to follow superproject current branch name (only if your team uses matching branch names)"
|
|
39
|
+
done < <(git config --file .gitmodules --get-regexp '^submodule\\..*\\.path$')
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
4) 逐个写入分支配置(每次写完都回显,避免误配):
|
|
43
|
+
```bash
|
|
44
|
+
# Example:
|
|
45
|
+
# git submodule set-branch --branch main path/to/submodule
|
|
46
|
+
# git submodule set-branch --branch . path/to/submodule
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
5) 输出变更并让用户确认是否提交:
|
|
50
|
+
```bash
|
|
51
|
+
git diff -- .gitmodules
|
|
52
|
+
git status --porcelain
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
6) 若用户确认要提交:
|
|
56
|
+
```bash
|
|
57
|
+
git add .gitmodules
|
|
58
|
+
git commit -m "chore(submodule): set tracking branches"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
输出要求:
|
|
62
|
+
- `Submodules:` name/path + 选择的 branch(每个都列出)
|
|
63
|
+
- `Diff:` `.gitmodules` 的 diff(或至少 `git diff -- .gitmodules` 的摘要)
|
|
64
|
+
- `Next:` 提示后续用 `$ws-pull` 拉取可自动减少 detached;`aiws validate` 会检查该配置是否齐全
|
|
65
|
+
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ws-verify-before-complete
|
|
3
|
+
description: 完成前验证(finish / handoff 前检查双审查与 validate/evidence 是否齐全)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
用中文输出(命令/路径/代码标识符保持原样不翻译)。
|
|
7
|
+
|
|
8
|
+
目标:
|
|
9
|
+
- 在进入 `$ws-finish` / `$ws-handoff` 前,检查 review、validate stamp 和证据是否齐全
|
|
10
|
+
- 输出明确的 pass/fail 结论,避免“看起来完成了但 gate 没过”的伪完成
|
|
11
|
+
|
|
12
|
+
阶段定位:
|
|
13
|
+
- finish 前 gate;负责 completion readiness 检查,不直接做 merge / push / handoff。
|
|
14
|
+
|
|
15
|
+
必需输入:
|
|
16
|
+
- `changes/<change-id>/review/spec-review.md`
|
|
17
|
+
- `changes/<change-id>/review/quality-review.md`
|
|
18
|
+
- `.agentdocs/tmp/aiws-validate/*.json`
|
|
19
|
+
- 若存在:`changes/<change-id>/evidence/...`、`git status`
|
|
20
|
+
|
|
21
|
+
必需输出:
|
|
22
|
+
- `证据(Evidence):` `changes/<change-id>/evidence/verify-before-complete.md` 或回退 `.agentdocs/tmp/review/verify-before-complete.md`
|
|
23
|
+
- `结论(Result):` pass / fail
|
|
24
|
+
- `缺失项(Missing):` 未满足的 gate
|
|
25
|
+
- `下一步(Next):` 进入 `$ws-finish` / `$ws-handoff`,或回退前置 gate
|
|
26
|
+
|
|
27
|
+
阻断条件:
|
|
28
|
+
- 缺少 spec review
|
|
29
|
+
- 缺少 quality review
|
|
30
|
+
- 缺少 validate stamp
|
|
31
|
+
- review 中仍有未关闭 blocker
|
|
32
|
+
- 无法写 verification 证据
|
|
33
|
+
|
|
34
|
+
完成判定:
|
|
35
|
+
- 已落盘 verify-before-complete 证据,并明确能否进入 `$ws-finish` / `$ws-handoff`。
|
|
36
|
+
|
|
37
|
+
步骤(建议):
|
|
38
|
+
1) 识别当前 `change/<change-id>`。
|
|
39
|
+
2) 检查以下最小 gate:
|
|
40
|
+
- `changes/<change-id>/review/spec-review.md`
|
|
41
|
+
- `changes/<change-id>/review/quality-review.md`
|
|
42
|
+
- `.agentdocs/tmp/aiws-validate/*.json`
|
|
43
|
+
3) 若存在 `changes/<change-id>/evidence/`,检查是否已经收敛 review / validate / collaboration summary。
|
|
44
|
+
4) 将结果落盘到:
|
|
45
|
+
- 默认:`changes/<change-id>/evidence/verify-before-complete.md`
|
|
46
|
+
- 回退:`.agentdocs/tmp/review/verify-before-complete.md`
|
|
47
|
+
5) 输出:
|
|
48
|
+
- `证据(Evidence):`
|
|
49
|
+
- `结论(Result): pass|fail`
|
|
50
|
+
- `缺失项(Missing):`
|
|
51
|
+
- `下一步(Next):`
|
|
52
|
+
|
|
53
|
+
重点:
|
|
54
|
+
- 这个 gate 不替代 `$ws-finish`;它只判断“是否具备进入 finish / handoff 的前置条件”。
|
|
55
|
+
- 若 fail,必须明确回退到哪个 gate:`$ws-spec-review`、`$ws-quality-review`、`aiws validate . --stamp` 或 `aiws change evidence <change-id>`。
|
|
56
|
+
|
|
57
|
+
安全:
|
|
58
|
+
- 不打印 secrets。
|
|
59
|
+
- 不执行破坏性命令。
|
|
@@ -13,6 +13,16 @@ policy="${AIWS_COMMIT_MSG_POLICY:-}"
|
|
|
13
13
|
if [[ -z "${policy:-}" ]]; then
|
|
14
14
|
policy="$(git config --get aiws.commitMessagePolicy 2>/dev/null || true)"
|
|
15
15
|
fi
|
|
16
|
+
if [[ -z "${policy:-}" ]]; then
|
|
17
|
+
superproject_root="$(git rev-parse --show-superproject-working-tree 2>/dev/null || true)"
|
|
18
|
+
if [[ -n "${superproject_root:-}" ]]; then
|
|
19
|
+
policy="warn"
|
|
20
|
+
elif [[ -f ".gitmodules" ]]; then
|
|
21
|
+
policy="off"
|
|
22
|
+
else
|
|
23
|
+
policy="warn"
|
|
24
|
+
fi
|
|
25
|
+
fi
|
|
16
26
|
policy="${policy:-warn}"
|
|
17
27
|
|
|
18
28
|
case "$policy" in
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 默认 workflow router:先判定阶段,再进入具体 ws-* 入口
|
|
3
|
+
---
|
|
4
|
+
<!-- AIWS_MANAGED_BEGIN:opencode:using-aiws -->
|
|
5
|
+
# using aiws
|
|
6
|
+
|
|
7
|
+
用中文输出(命令/路径/代码标识符保持原样不翻译)。
|
|
8
|
+
|
|
9
|
+
目标:
|
|
10
|
+
- 把当前任务先路由到正确的 AIWS workflow,而不是直接跳进实现。
|
|
11
|
+
|
|
12
|
+
执行建议:
|
|
13
|
+
1) 先读取 `AI_PROJECT.md` / `REQUIREMENTS.md` / `AI_WORKSPACE.md`。
|
|
14
|
+
- 若检测到 `.opencode/oh-my-opencode.json`:输出 `OpenCode mode: oMo-enabled`,并注明后续会优先借用 `planner-sisyphus` / `explore` / `librarian` / `oracle`
|
|
15
|
+
- 若未检测到:输出 `OpenCode mode: standard-opencode`
|
|
16
|
+
2) 若缺失任一真值文件:先 `/ws-preflight`,必要时运行 `aiws init .`,不要继续实现。
|
|
17
|
+
3) 若任务意图、归因或验证入口不明确:先提 1-3 个关键澄清问题并停止。
|
|
18
|
+
4) 路由规则:
|
|
19
|
+
- 需求/验收/合同变更:`/ws-req-review`
|
|
20
|
+
- 中大型实现或需要 change/worktree:`/ws-plan`
|
|
21
|
+
- 小步明确实现:`/ws-dev`(若是 simple/local 单点修复,可显式进入 `/ws-dev-lite`)
|
|
22
|
+
- 评审/审计:`/ws-review`
|
|
23
|
+
- finish / merge / push / cleanup:`/ws-finish`
|
|
24
|
+
- handoff / archive summary:`/ws-handoff`
|
|
25
|
+
5) 输出 `OpenCode mode:` / `Task intent:` / `Binding:` / `Route:` / `Why:` / `Next:`。
|
|
26
|
+
6) 若 `Route: ws-dev` 且任务属于 simple/local 单点修复:`Next` 可显式建议 `/ws-dev-lite`。
|
|
27
|
+
7) 除非用户只要路由判断,否则给出 route 后继续遵循对应入口的契约。
|
|
28
|
+
<!-- AIWS_MANAGED_END:opencode:using-aiws -->
|
|
29
|
+
|
|
30
|
+
可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
|
|
@@ -0,0 +1,33 @@
|
|
|
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 的额外说明(托管块外内容会被保留)。
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 轻量开发:simple/local 单点修复;最小改动 + 最小验证
|
|
3
|
+
---
|
|
4
|
+
<!-- AIWS_MANAGED_BEGIN:opencode:ws-dev-lite -->
|
|
5
|
+
# ws dev lite
|
|
6
|
+
|
|
7
|
+
用中文输出(命令/路径/代码标识符保持原样不翻译)。
|
|
8
|
+
|
|
9
|
+
目标:处理 simple/local 单点修复,走最小改动 + 最小验证,不默认拉起完整重流程。
|
|
10
|
+
|
|
11
|
+
使用条件:
|
|
12
|
+
- 目标明确、归因明确、验证入口明确
|
|
13
|
+
- 一般只影响单文件或紧密相关的小范围文件
|
|
14
|
+
- 不需要先改 `REQUIREMENTS.md`
|
|
15
|
+
|
|
16
|
+
强制流程:
|
|
17
|
+
1) 先运行 `/ws-preflight`。
|
|
18
|
+
2) 先说明:
|
|
19
|
+
- `Goal:`
|
|
20
|
+
- `Why lite:`
|
|
21
|
+
- 若说不清,立刻回到 `/ws-dev` 或 `/ws-plan`
|
|
22
|
+
3) 实施最小改动;不要为形式完整额外扩 scope。
|
|
23
|
+
4) 运行最小可复现验证;允许比全量更窄,但必须说明为什么足够。
|
|
24
|
+
5) 输出 `Changed / Verify / Evidence / Next`。
|
|
25
|
+
6) 若准备提交或交付:后续仍进入 `/ws-review`、`/ws-commit`、`/ws-finish`。
|
|
26
|
+
|
|
27
|
+
边界:
|
|
28
|
+
- 默认不创建 `plan/...`
|
|
29
|
+
- 默认不跑 `ws-plan-verify`
|
|
30
|
+
- 默认不要求先做双 review
|
|
31
|
+
- 一旦复杂度升高,停止 lite,切回主流程
|
|
32
|
+
<!-- AIWS_MANAGED_END:opencode:ws-dev-lite -->
|
|
33
|
+
|
|
34
|
+
可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
|
|
@@ -61,7 +61,7 @@ fi
|
|
|
61
61
|
6) 任一 submodule 不满足 fast-forward 条件时立即停止(不要继续 push 主仓库)。
|
|
62
62
|
7) submodules 全部成功后,再回到主仓库执行:
|
|
63
63
|
- `aiws change finish <change-id> --push`
|
|
64
|
-
8)
|
|
64
|
+
8) `aiws change finish --push` 成功后会自动归档并生成 handoff;只有历史/异常场景才需要手工运行 `aiws change archive <change-id>`。
|
|
65
65
|
|
|
66
66
|
安全:
|
|
67
67
|
- push 前先输出状态并说明远端/分支。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: 交接:查看归档 change 的 handoff.md
|
|
2
|
+
description: 交接:查看归档 change 的 handoff.md(标准由 aiws change finish --push 自动归档生成)
|
|
3
3
|
---
|
|
4
4
|
<!-- AIWS_MANAGED_BEGIN:opencode:ws-handoff -->
|
|
5
5
|
# ws handoff
|
|
@@ -8,10 +8,10 @@ description: 交接:查看归档 change 的 handoff.md(由 aiws change archi
|
|
|
8
8
|
|
|
9
9
|
目标:
|
|
10
10
|
- 交接与回放:通过 `handoff.md` 让已归档的 change 可被下一位/下一次会话快速接力。
|
|
11
|
-
- handoff 文件位置:`changes/archive/<date>-<change-id>/handoff.md
|
|
11
|
+
- handoff 文件位置:`changes/archive/<date>-<change-id>/handoff.md`(默认由 `aiws change finish --push` 自动归档时生成)。
|
|
12
12
|
|
|
13
13
|
执行建议:
|
|
14
|
-
1)
|
|
14
|
+
1) 先确认 change 已通过 `/ws-finish` 或 `aiws change finish --push` 完成自动归档。
|
|
15
15
|
2) 查看 handoff:
|
|
16
16
|
```bash
|
|
17
17
|
change_id="<change-id>"
|
|
@@ -20,6 +20,7 @@ sed -n '1,160p' changes/archive/*-"${change_id}"/handoff.md
|
|
|
20
20
|
```
|
|
21
21
|
3) 依赖提示:
|
|
22
22
|
- 若你在某个 change 的 `proposal.md` 声明了 `Depends_On`,`aiws change start` 会尝试读取依赖 change 的 `handoff.md` 并输出摘要(前提:依赖已归档且 handoff 存在)。
|
|
23
|
+
- 若是历史/异常场景尚未归档,再手工运行 `/p-aiws-change-archive`。
|
|
23
24
|
<!-- AIWS_MANAGED_END:opencode:ws-handoff -->
|
|
24
25
|
|
|
25
26
|
可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
|
|
@@ -11,6 +11,8 @@ description: 规划:生成可落盘 plan 工件
|
|
|
11
11
|
|
|
12
12
|
执行建议:
|
|
13
13
|
1) 先运行 `/ws-preflight`(对齐 `AI_PROJECT.md` / `REQUIREMENTS.md` / `AI_WORKSPACE.md`)。
|
|
14
|
+
- 若检测到 `.opencode/oh-my-opencode.json` 或当前会话明确可用 `planner-sisyphus` / `explore` / `librarian`:优先按 `packages/spec/docs/opencode-omo-adapter.md` 借用这些 agent。
|
|
15
|
+
- 计划主框架优先 `planner-sisyphus`;结构探索优先 `@explore`;规范/文档查证优先 `@librarian`。
|
|
14
16
|
2) 若当前不在 `change/<change-id>` 分支 / worktree,先调用 `aiws change start <change-id>` 建立上下文:
|
|
15
17
|
- 仓库已有提交:优先 `aiws change start <change-id> --hooks --worktree`;若声明了 submodules,加 `--submodules`
|
|
16
18
|
- 仓库尚无提交 / 不满足 worktree 前置条件:回退 `aiws change start <change-id> --hooks --no-switch`
|
|
@@ -19,6 +21,7 @@ description: 规划:生成可落盘 plan 工件
|
|
|
19
21
|
5) 计划至少包含:`Bindings`、`Goal`、`Non-goals`、`Scope`、`Plan`、`Verify`、`Risks & Rollback`、`Evidence`。
|
|
20
22
|
6) 若已有 `changes/<change-id>/proposal.md`,对齐 `Plan_File` / `Contract_Row` / `Evidence_Path`。
|
|
21
23
|
7) 完成后先运行 `/ws-plan-verify`,通过再进入 `/ws-dev`。
|
|
24
|
+
8) 若 oMo 不可用:回退为普通 OpenCode `plan` / 当前 agent 本地规划,但仍必须落盘完整 `plan/...`。
|
|
22
25
|
<!-- AIWS_MANAGED_END:opencode:ws-plan -->
|
|
23
26
|
|
|
24
27
|
可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
|
|
@@ -20,6 +20,10 @@ description: 预检:读取真值文件并输出约束摘要
|
|
|
20
20
|
- `Root:` <项目根路径>
|
|
21
21
|
- `Found:` <实际读取到的文件列表>
|
|
22
22
|
- `Missing:` <缺失文件列表>
|
|
23
|
+
- `OpenCode mode:`
|
|
24
|
+
- 若检测到 `.opencode/oh-my-opencode.json`:`oMo-enabled`
|
|
25
|
+
- 否则:`standard-opencode`
|
|
26
|
+
- 若为 `oMo-enabled`:附一句说明后续 `ws-plan` / `ws-review` / `ws-spec-review` / `ws-quality-review` / `ws-delegate` 会优先借用 oMo agent
|
|
23
27
|
- `Key rules:` 3–8 条 bullet(范围/禁止项/必须产物/必须验证命令)
|
|
24
28
|
|
|
25
29
|
安全:
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 质量审查:行为回归 / 测试覆盖 / 实现质量
|
|
3
|
+
---
|
|
4
|
+
<!-- AIWS_MANAGED_BEGIN:opencode:ws-quality-review -->
|
|
5
|
+
# ws quality review
|
|
6
|
+
|
|
7
|
+
用中文输出(命令/路径/代码标识符保持原样不翻译)。
|
|
8
|
+
|
|
9
|
+
目标:审查行为回归、边界条件、测试覆盖与实现质量。
|
|
10
|
+
|
|
11
|
+
步骤(建议):
|
|
12
|
+
1) 读取 `git diff`、已执行的验证结果和相关代码。
|
|
13
|
+
- 若检测到 `.opencode/oh-my-opencode.json` 或当前会话明确可用 `oracle` / `explore`:优先按 `packages/spec/docs/opencode-omo-adapter.md` 借用这些 agent。
|
|
14
|
+
- 质量/回归审查优先 `@oracle`;代码路径与影响面补充优先 `@explore`。
|
|
15
|
+
2) 检查:
|
|
16
|
+
- 是否存在行为回归或明显 bug 风险
|
|
17
|
+
- 边界条件 / 失败路径是否覆盖
|
|
18
|
+
- 测试是否足以支撑当前改动
|
|
19
|
+
3) 将结论落盘到:
|
|
20
|
+
- 默认:`changes/<change-id>/review/quality-review.md`
|
|
21
|
+
- 回退:`.agentdocs/tmp/review/quality-review.md`
|
|
22
|
+
4) 输出:
|
|
23
|
+
- `证据(Evidence):`
|
|
24
|
+
- `主要发现(Findings):`
|
|
25
|
+
- `测试缺口(Gaps):`
|
|
26
|
+
- `下一步(Next):`
|
|
27
|
+
5) 若 oMo 不可用:回退为当前 agent 本地 quality review。
|
|
28
|
+
<!-- AIWS_MANAGED_END:opencode:ws-quality-review -->
|
|
29
|
+
|
|
30
|
+
可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
|
|
@@ -10,17 +10,20 @@ description: 评审:提交前审计改动并落盘证据
|
|
|
10
10
|
|
|
11
11
|
步骤(建议):
|
|
12
12
|
1) 先运行 `/ws-preflight`。
|
|
13
|
+
- 若检测到 `.opencode/oh-my-opencode.json` 或当前会话明确可用 `oracle` / `explore` / `librarian`:优先按 `packages/spec/docs/opencode-omo-adapter.md` 借用这些 agent。
|
|
14
|
+
- 独立审查优先 `@oracle`;diff 影响面优先 `@explore`;规范/文档上下文优先 `@librarian`。
|
|
13
15
|
2) 基于 `git status` / `git diff`(以及你实际运行过的测试结果),对照 `AI_PROJECT.md` 与 `REQUIREMENTS.md` 检查:
|
|
14
16
|
- 是否存在越界目录改动/危险操作
|
|
15
17
|
- 是否有可复现验证命令与证据
|
|
16
18
|
- 是否维护了 `changes/<change-id>/` 或相关 `issues/*.csv`
|
|
17
19
|
3) 将审计落盘到(目录不存在则创建):
|
|
18
|
-
- 默认:`changes/<change-id>/review/
|
|
19
|
-
- 回退:`.agentdocs/tmp/review/
|
|
20
|
+
- 默认:`changes/<change-id>/review/codex-review.md`
|
|
21
|
+
- 回退:`.agentdocs/tmp/review/codex-review.md`(仅在无法确定 `change-id` 时使用)
|
|
20
22
|
4) 回复中输出:
|
|
21
23
|
- `证据(Evidence):` 证据文件路径
|
|
22
24
|
- `主要风险(Top risks):` 3–8 条(高→低)
|
|
23
25
|
- `下一步(Next):` 最小修复清单 + 最小验证命令
|
|
26
|
+
5) 若 oMo 不可用:回退为当前 agent 本地 review,不阻断流程。
|
|
24
27
|
|
|
25
28
|
安全:
|
|
26
29
|
- 不打印 secrets。
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 规范审查:requirements / plan / evidence / gate 完整性
|
|
3
|
+
---
|
|
4
|
+
<!-- AIWS_MANAGED_BEGIN:opencode:ws-spec-review -->
|
|
5
|
+
# ws spec review
|
|
6
|
+
|
|
7
|
+
用中文输出(命令/路径/代码标识符保持原样不翻译)。
|
|
8
|
+
|
|
9
|
+
目标:审查 requirements 归因、plan/change 绑定、evidence 与 workflow gate 完整性。
|
|
10
|
+
|
|
11
|
+
步骤(建议):
|
|
12
|
+
1) 先运行 `/ws-preflight`。
|
|
13
|
+
- 若检测到 `.opencode/oh-my-opencode.json` 或当前会话明确可用 `oracle` / `librarian`:优先按 `packages/spec/docs/opencode-omo-adapter.md` 借用这些 agent。
|
|
14
|
+
- requirements / gate / evidence 审查优先 `@oracle`;规范与文档真值补充优先 `@librarian`。
|
|
15
|
+
2) 对照 `AI_PROJECT.md` / `REQUIREMENTS.md` / `AI_WORKSPACE.md` 检查:
|
|
16
|
+
- 当前改动是否能归因到 `Req_ID` / `Problem_ID`
|
|
17
|
+
- `plan/...`、`proposal.md`、`tasks.md`、`evidence/` 是否保持一致
|
|
18
|
+
- 是否存在越界改动、危险操作或缺失 gate
|
|
19
|
+
3) 将结论落盘到:
|
|
20
|
+
- 默认:`changes/<change-id>/review/spec-review.md`
|
|
21
|
+
- 回退:`.agentdocs/tmp/review/spec-review.md`
|
|
22
|
+
4) 输出:
|
|
23
|
+
- `证据(Evidence):`
|
|
24
|
+
- `阻断项(Blockers):`
|
|
25
|
+
- `警告(Warnings):`
|
|
26
|
+
- `下一步(Next):`
|
|
27
|
+
5) 若 oMo 不可用:回退为当前 agent 本地 spec review。
|
|
28
|
+
<!-- AIWS_MANAGED_END:opencode:ws-spec-review -->
|
|
29
|
+
|
|
30
|
+
可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 完成前验证:finish / handoff 前检查双审查与 validate/evidence
|
|
3
|
+
---
|
|
4
|
+
<!-- AIWS_MANAGED_BEGIN:opencode:ws-verify-before-complete -->
|
|
5
|
+
# ws verify before complete
|
|
6
|
+
|
|
7
|
+
用中文输出(命令/路径/代码标识符保持原样不翻译)。
|
|
8
|
+
|
|
9
|
+
目标:在 `/ws-finish` 或 `/ws-handoff` 前检查双审查、validate stamp 与 evidence 是否齐全。
|
|
10
|
+
|
|
11
|
+
步骤(建议):
|
|
12
|
+
1) 检查以下最小 gate:
|
|
13
|
+
- `changes/<change-id>/review/spec-review.md`
|
|
14
|
+
- `changes/<change-id>/review/quality-review.md`
|
|
15
|
+
- `.agentdocs/tmp/aiws-validate/*.json`
|
|
16
|
+
2) 若存在 `changes/<change-id>/evidence/`,检查 review / validate / collaboration summary 是否已收敛。
|
|
17
|
+
3) 将结果落盘到:
|
|
18
|
+
- 默认:`changes/<change-id>/evidence/verify-before-complete.md`
|
|
19
|
+
- 回退:`.agentdocs/tmp/review/verify-before-complete.md`
|
|
20
|
+
4) 输出:
|
|
21
|
+
- `证据(Evidence):`
|
|
22
|
+
- `结论(Result): pass|fail`
|
|
23
|
+
- `缺失项(Missing):`
|
|
24
|
+
- `下一步(Next):`
|
|
25
|
+
<!-- AIWS_MANAGED_END:opencode:ws-verify-before-complete -->
|
|
26
|
+
|
|
27
|
+
可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 私有:变更归档:归档已完成的 change 工件并生成 handoff.md
|
|
3
|
+
---
|
|
4
|
+
<!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-archive -->
|
|
5
|
+
# aiws change archive
|
|
6
|
+
|
|
7
|
+
(私有原子入口;日常优先用 ws-* 链路。)
|
|
8
|
+
|
|
9
|
+
用中文输出(命令/路径/代码标识符保持原样不翻译)。
|
|
10
|
+
|
|
11
|
+
目标:
|
|
12
|
+
- 归档已完成 change 工件,并生成交接文档:`changes/archive/.../handoff.md`
|
|
13
|
+
|
|
14
|
+
执行(在仓库根目录):
|
|
15
|
+
```bash
|
|
16
|
+
change_id="<change-id>"
|
|
17
|
+
if [[ -x "./node_modules/.bin/aiws" ]]; then
|
|
18
|
+
./node_modules/.bin/aiws change archive "${change_id}"
|
|
19
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
20
|
+
aiws change archive "${change_id}"
|
|
21
|
+
else
|
|
22
|
+
npx @aipper/aiws change archive "${change_id}"
|
|
23
|
+
fi
|
|
24
|
+
```
|
|
25
|
+
<!-- AIWS_MANAGED_END:opencode:aiws-change-archive -->
|
|
26
|
+
|
|
27
|
+
可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 私有:变更收尾:安全合并 change 分支回目标分支
|
|
3
|
+
---
|
|
4
|
+
<!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-finish -->
|
|
5
|
+
# aiws change finish
|
|
6
|
+
|
|
7
|
+
(私有原子入口;日常优先用 ws-* 链路。)
|
|
8
|
+
|
|
9
|
+
用中文输出(命令/路径/代码标识符保持原样不翻译)。
|
|
10
|
+
|
|
11
|
+
目标:
|
|
12
|
+
- 将 change/<change-id> 安全 fast-forward 合并回目标分支
|
|
13
|
+
|
|
14
|
+
执行(在仓库根目录):
|
|
15
|
+
```bash
|
|
16
|
+
change_id="<change-id>" # 可留空(若当前分支可推断)
|
|
17
|
+
if [[ -x "./node_modules/.bin/aiws" ]]; then
|
|
18
|
+
./node_modules/.bin/aiws change finish "${change_id}"
|
|
19
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
20
|
+
aiws change finish "${change_id}"
|
|
21
|
+
else
|
|
22
|
+
npx @aipper/aiws change finish "${change_id}"
|
|
23
|
+
fi
|
|
24
|
+
```
|
|
25
|
+
<!-- AIWS_MANAGED_END:opencode:aiws-change-finish -->
|
|
26
|
+
|
|
27
|
+
可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 私有:变更列表:列出当前仓库 change 工件
|
|
3
|
+
---
|
|
4
|
+
<!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-list -->
|
|
5
|
+
# aiws change list
|
|
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 list
|
|
18
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
19
|
+
aiws change list
|
|
20
|
+
else
|
|
21
|
+
npx @aipper/aiws change list
|
|
22
|
+
fi
|
|
23
|
+
```
|
|
24
|
+
<!-- AIWS_MANAGED_END:opencode:aiws-change-list -->
|
|
25
|
+
|
|
26
|
+
可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 私有:变更新建:创建 changes/<change-id> 工件
|
|
3
|
+
---
|
|
4
|
+
<!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-new -->
|
|
5
|
+
# aiws change new
|
|
6
|
+
|
|
7
|
+
(私有原子入口;日常优先用 ws-* 链路。)
|
|
8
|
+
|
|
9
|
+
用中文输出(命令/路径/代码标识符保持原样不翻译)。
|
|
10
|
+
|
|
11
|
+
目标:
|
|
12
|
+
- 创建 changes/<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 new "${change_id}"
|
|
19
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
20
|
+
aiws change new "${change_id}"
|
|
21
|
+
else
|
|
22
|
+
npx @aipper/aiws change new "${change_id}"
|
|
23
|
+
fi
|
|
24
|
+
```
|
|
25
|
+
<!-- AIWS_MANAGED_END:opencode:aiws-change-new -->
|
|
26
|
+
|
|
27
|
+
可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 私有:变更下一步:输出当前 change 的建议动作
|
|
3
|
+
---
|
|
4
|
+
<!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-next -->
|
|
5
|
+
# aiws change next
|
|
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 next "${change_id}"
|
|
19
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
20
|
+
aiws change next "${change_id}"
|
|
21
|
+
else
|
|
22
|
+
npx @aipper/aiws change next "${change_id}"
|
|
23
|
+
fi
|
|
24
|
+
```
|
|
25
|
+
<!-- AIWS_MANAGED_END:opencode:aiws-change-next -->
|
|
26
|
+
|
|
27
|
+
可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
|
|
@@ -0,0 +1,27 @@
|
|
|
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 的额外说明(托管块外内容会被保留)。
|
|
@@ -0,0 +1,27 @@
|
|
|
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 的额外说明(托管块外内容会被保留)。
|
|
@@ -0,0 +1,27 @@
|
|
|
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 的额外说明(托管块外内容会被保留)。
|