@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,24 @@
|
|
|
1
|
+
<!-- AIWS_MANAGED_BEGIN:claude:ws-spec-review -->
|
|
2
|
+
# ws spec review
|
|
3
|
+
|
|
4
|
+
用中文输出(命令/路径/代码标识符保持原样不翻译)。
|
|
5
|
+
|
|
6
|
+
目标:审查 requirements 归因、plan/change 绑定、evidence 与 workflow gate 完整性。
|
|
7
|
+
|
|
8
|
+
步骤(建议):
|
|
9
|
+
1) 先运行 `/ws-preflight`。
|
|
10
|
+
2) 对照 `AI_PROJECT.md` / `REQUIREMENTS.md` / `AI_WORKSPACE.md` 检查:
|
|
11
|
+
- 当前改动是否能归因到 `Req_ID` / `Problem_ID`
|
|
12
|
+
- `plan/...`、`proposal.md`、`tasks.md`、`evidence/` 是否保持一致
|
|
13
|
+
- 是否存在越界改动、危险操作或缺失 gate
|
|
14
|
+
3) 将结论落盘到:
|
|
15
|
+
- 默认:`changes/<change-id>/review/spec-review.md`
|
|
16
|
+
- 回退:`.agentdocs/tmp/review/spec-review.md`
|
|
17
|
+
4) 输出:
|
|
18
|
+
- `证据(Evidence):`
|
|
19
|
+
- `阻断项(Blockers):`
|
|
20
|
+
- `警告(Warnings):`
|
|
21
|
+
- `下一步(Next):`
|
|
22
|
+
<!-- AIWS_MANAGED_END:claude:ws-spec-review -->
|
|
23
|
+
|
|
24
|
+
可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- AIWS_MANAGED_BEGIN:claude:ws-verify-before-complete -->
|
|
2
|
+
# ws verify before complete
|
|
3
|
+
|
|
4
|
+
用中文输出(命令/路径/代码标识符保持原样不翻译)。
|
|
5
|
+
|
|
6
|
+
目标:在 `/ws-finish` 或 `/ws-handoff` 前检查双审查、validate stamp 与 evidence 是否齐全。
|
|
7
|
+
|
|
8
|
+
步骤(建议):
|
|
9
|
+
1) 检查以下最小 gate:
|
|
10
|
+
- `changes/<change-id>/review/spec-review.md`
|
|
11
|
+
- `changes/<change-id>/review/quality-review.md`
|
|
12
|
+
- `.agentdocs/tmp/aiws-validate/*.json`
|
|
13
|
+
2) 若存在 `changes/<change-id>/evidence/`,检查 review / validate / collaboration summary 是否已收敛。
|
|
14
|
+
3) 将结果落盘到:
|
|
15
|
+
- 默认:`changes/<change-id>/evidence/verify-before-complete.md`
|
|
16
|
+
- 回退:`.agentdocs/tmp/review/verify-before-complete.md`
|
|
17
|
+
4) 输出:
|
|
18
|
+
- `证据(Evidence):`
|
|
19
|
+
- `结论(Result): pass|fail`
|
|
20
|
+
- `缺失项(Missing):`
|
|
21
|
+
- `下一步(Next):`
|
|
22
|
+
<!-- AIWS_MANAGED_END:claude:ws-verify-before-complete -->
|
|
23
|
+
|
|
24
|
+
可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: p-aiws-change-archive
|
|
3
|
+
description: 私有:归档变更工件(会先做严格校验并生成 handoff.md)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
目标:
|
|
7
|
+
- 将 `changes/<change-id>/` 归档到 `changes/archive/<YYYY-MM-DD>/...`
|
|
8
|
+
|
|
9
|
+
执行(在仓库根目录):
|
|
10
|
+
```bash
|
|
11
|
+
change_id="<change-id>"
|
|
12
|
+
if [[ -x "./node_modules/.bin/aiws" ]]; then
|
|
13
|
+
./node_modules/.bin/aiws change archive "$change_id"
|
|
14
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
15
|
+
aiws change archive "$change_id"
|
|
16
|
+
else
|
|
17
|
+
npx @aipper/aiws change archive "$change_id"
|
|
18
|
+
fi
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
说明:
|
|
22
|
+
- `archive` 默认会先跑严格校验并要求 tasks 全部勾选
|
|
23
|
+
- `--force` 会绕过部分门禁(不推荐)
|
|
24
|
+
- 归档后会生成交接文档:`changes/archive/<date>-<change-id>/handoff.md`
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: p-aiws-change-finish
|
|
3
|
+
description: 私有:安全合并 change/<change-id> 回目标分支(默认 fast-forward)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
目标:
|
|
7
|
+
- 将 `change/<change-id>` fast-forward 合并回目标分支,减少手输分支名导致的错误
|
|
8
|
+
|
|
9
|
+
执行(在目标分支所在 worktree 的仓库根目录):
|
|
10
|
+
```bash
|
|
11
|
+
change_id="<change-id>"
|
|
12
|
+
if [[ -x "./node_modules/.bin/aiws" ]]; then
|
|
13
|
+
./node_modules/.bin/aiws change finish "$change_id"
|
|
14
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
15
|
+
aiws change finish "$change_id"
|
|
16
|
+
else
|
|
17
|
+
npx @aipper/aiws change finish "$change_id"
|
|
18
|
+
fi
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
说明:
|
|
22
|
+
- 默认等价于:`git merge --ff-only change/<change-id>`
|
|
23
|
+
- 若你当前就在 `change/<change-id>` 分支上,`finish` 会尝试读取 `changes/<change-id>/.ws-change.json` 的 `base_branch` 作为目标分支
|
|
24
|
+
- 若无法 fast-forward:先在 change 分支(或对应 worktree)里 `git rebase <target-branch>`,再重试 `aiws change finish`
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: p-aiws-change-list
|
|
3
|
+
description: 私有:列出 changes 工件(只读)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
目标:
|
|
7
|
+
- 列出当前仓库的变更工件与状态
|
|
8
|
+
|
|
9
|
+
执行(在仓库根目录):
|
|
10
|
+
```bash
|
|
11
|
+
if [[ -x "./node_modules/.bin/aiws" ]]; then
|
|
12
|
+
./node_modules/.bin/aiws change list
|
|
13
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
14
|
+
aiws change list
|
|
15
|
+
else
|
|
16
|
+
npx @aipper/aiws change list
|
|
17
|
+
fi
|
|
18
|
+
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: p-aiws-change-new
|
|
3
|
+
description: 私有:创建 changes/<change-id> 工件
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
目标:
|
|
7
|
+
- 创建 `changes/<change-id>/` 工件目录与基础文件(proposal/tasks/可选 design)
|
|
8
|
+
|
|
9
|
+
要求:
|
|
10
|
+
- `change-id` 必须是 kebab-case:`^[a-z0-9]+(-[a-z0-9]+)*$`
|
|
11
|
+
|
|
12
|
+
执行(在仓库根目录):
|
|
13
|
+
```bash
|
|
14
|
+
change_id="<change-id>"
|
|
15
|
+
if [[ -x "./node_modules/.bin/aiws" ]]; then
|
|
16
|
+
./node_modules/.bin/aiws change new "$change_id"
|
|
17
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
18
|
+
aiws change new "$change_id"
|
|
19
|
+
else
|
|
20
|
+
npx @aipper/aiws change new "$change_id"
|
|
21
|
+
fi
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
可选参数:
|
|
25
|
+
- `--title <title>`:写入标题
|
|
26
|
+
- `--no-design`:不生成 design.md
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: p-aiws-change-next
|
|
3
|
+
description: 私有:给出下一步建议(只读)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
目标:
|
|
7
|
+
- 基于当前仓库与 changes 工件状态,输出最小下一步建议
|
|
8
|
+
|
|
9
|
+
执行(在仓库根目录):
|
|
10
|
+
```bash
|
|
11
|
+
change_id="<change-id>"
|
|
12
|
+
if [[ -x "./node_modules/.bin/aiws" ]]; then
|
|
13
|
+
./node_modules/.bin/aiws change next "$change_id"
|
|
14
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
15
|
+
aiws change next "$change_id"
|
|
16
|
+
else
|
|
17
|
+
npx @aipper/aiws change next "$change_id"
|
|
18
|
+
fi
|
|
19
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: p-aiws-change-start
|
|
3
|
+
description: 私有:切分支并初始化变更工件(可选安装 hooks)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
目标:
|
|
7
|
+
- 切到分支 `change/<change-id>` 并初始化 `changes/<change-id>/` 工件
|
|
8
|
+
- 若检测到 `.gitmodules`(git submodules),默认优先使用 `--worktree`(失败则回退为 `--no-switch`),避免切走 superproject 分支导致 submodule 状态混乱
|
|
9
|
+
|
|
10
|
+
要求:
|
|
11
|
+
- 需要 git 仓库;若不是 git 仓库先 `git init`
|
|
12
|
+
|
|
13
|
+
执行(在仓库根目录):
|
|
14
|
+
```bash
|
|
15
|
+
change_id="<change-id>"
|
|
16
|
+
if [[ -x "./node_modules/.bin/aiws" ]]; then
|
|
17
|
+
./node_modules/.bin/aiws change start "$change_id"
|
|
18
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
19
|
+
aiws change start "$change_id"
|
|
20
|
+
else
|
|
21
|
+
npx @aipper/aiws change start "$change_id"
|
|
22
|
+
fi
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
可选参数:
|
|
26
|
+
- `--hooks`:同时执行 `aiws hooks install .`
|
|
27
|
+
- `--title <title>`:写入标题
|
|
28
|
+
- `--no-design`:不生成 design.md
|
|
29
|
+
- `--switch`:显式允许切换 superproject 分支(仅在存在 `.gitmodules` 时有意义)
|
|
30
|
+
- `--no-switch`:不切换当前分支(仅确保 `change/<change-id>` 分支存在并初始化工件);适用于 superproject + submodule 场景
|
|
31
|
+
- `--worktree`:用 `git worktree` 创建独立工作区并在其中 checkout `change/<change-id>`(推荐用于 superproject + submodule)
|
|
32
|
+
- `--worktree-dir <path>`:覆盖 worktree 目录
|
|
33
|
+
- `--submodules`:在 worktree 内执行 `git submodule update --init --recursive`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: p-aiws-change-status
|
|
3
|
+
description: 私有:查看单个变更工件状态(只读)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
目标:
|
|
7
|
+
- 查看指定 `change-id` 的工件状态与下一步建议
|
|
8
|
+
|
|
9
|
+
执行(在仓库根目录):
|
|
10
|
+
```bash
|
|
11
|
+
change_id="<change-id>"
|
|
12
|
+
if [[ -x "./node_modules/.bin/aiws" ]]; then
|
|
13
|
+
./node_modules/.bin/aiws change status "$change_id"
|
|
14
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
15
|
+
aiws change status "$change_id"
|
|
16
|
+
else
|
|
17
|
+
npx @aipper/aiws change status "$change_id"
|
|
18
|
+
fi
|
|
19
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: p-aiws-change-sync
|
|
3
|
+
description: 私有:同步真值基线到 changes/<change-id>(写入 .ws-change.json)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
目标:
|
|
7
|
+
- 将当前真值文件(`AI_PROJECT.md` / `AI_WORKSPACE.md` / `REQUIREMENTS.md`)的 hash 快照同步到 `changes/<change-id>/.ws-change.json`
|
|
8
|
+
|
|
9
|
+
执行(在仓库根目录):
|
|
10
|
+
```bash
|
|
11
|
+
change_id="<change-id>"
|
|
12
|
+
if [[ -x "./node_modules/.bin/aiws" ]]; then
|
|
13
|
+
./node_modules/.bin/aiws change sync "$change_id"
|
|
14
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
15
|
+
aiws change sync "$change_id"
|
|
16
|
+
else
|
|
17
|
+
npx @aipper/aiws change sync "$change_id"
|
|
18
|
+
fi
|
|
19
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: p-aiws-change-templates-init
|
|
3
|
+
description: 私有:在仓库内初始化 change templates(写入 changes/templates)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
目标:
|
|
7
|
+
- 初始化 `changes/templates/`(用于在仓库内自定义 proposal/tasks/design 模板)
|
|
8
|
+
|
|
9
|
+
执行(在仓库根目录):
|
|
10
|
+
```bash
|
|
11
|
+
if [[ -x "./node_modules/.bin/aiws" ]]; then
|
|
12
|
+
./node_modules/.bin/aiws change templates init
|
|
13
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
14
|
+
aiws change templates init
|
|
15
|
+
else
|
|
16
|
+
npx @aipper/aiws change templates init
|
|
17
|
+
fi
|
|
18
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: p-aiws-change-templates-which
|
|
3
|
+
description: 私有:查看当前 change templates 来源(只读)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
目标:
|
|
7
|
+
- 输出当前仓库 change templates 的解析来源与路径(用于排查模板来自哪里)
|
|
8
|
+
|
|
9
|
+
执行(在仓库根目录):
|
|
10
|
+
```bash
|
|
11
|
+
if [[ -x "./node_modules/.bin/aiws" ]]; then
|
|
12
|
+
./node_modules/.bin/aiws change templates which
|
|
13
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
14
|
+
aiws change templates which
|
|
15
|
+
else
|
|
16
|
+
npx @aipper/aiws change templates which
|
|
17
|
+
fi
|
|
18
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: p-aiws-change-validate
|
|
3
|
+
description: 私有:校验 changes 工件(可 strict)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
目标:
|
|
7
|
+
- 校验 `changes/<change-id>/` 工件完整性、归因与 WS:TODO(用于 hooks/CI)
|
|
8
|
+
|
|
9
|
+
执行(在仓库根目录):
|
|
10
|
+
```bash
|
|
11
|
+
change_id="<change-id>"
|
|
12
|
+
if [[ -x "./node_modules/.bin/aiws" ]]; then
|
|
13
|
+
./node_modules/.bin/aiws change validate "$change_id" --strict
|
|
14
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
15
|
+
aiws change validate "$change_id" --strict
|
|
16
|
+
else
|
|
17
|
+
npx @aipper/aiws change validate "$change_id" --strict
|
|
18
|
+
fi
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
说明:
|
|
22
|
+
- `--strict` 会把 `WS:TODO`/缺少归因视为错误,并启用计划质量门(章节完整、步骤粒度、验证命令与预期)
|
|
23
|
+
- 紧急情况下可用 `--allow-truth-drift`(不推荐)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: p-aiws-hooks-install
|
|
3
|
+
description: 私有:启用 git hooks 门禁(core.hooksPath=.githooks)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
目标:
|
|
7
|
+
- 为当前 git 仓库启用 aiws 门禁 hooks(`git commit`/`git push` 自动跑 `aiws validate .`)
|
|
8
|
+
|
|
9
|
+
执行(在仓库根目录):
|
|
10
|
+
```bash
|
|
11
|
+
if [[ -x "./node_modules/.bin/aiws" ]]; then
|
|
12
|
+
./node_modules/.bin/aiws hooks install .
|
|
13
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
14
|
+
aiws hooks install .
|
|
15
|
+
else
|
|
16
|
+
npx @aipper/aiws hooks install .
|
|
17
|
+
fi
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
验证(可选):
|
|
21
|
+
```bash
|
|
22
|
+
git config core.hooksPath
|
|
23
|
+
if [[ -x "./node_modules/.bin/aiws" ]]; then
|
|
24
|
+
./node_modules/.bin/aiws hooks status .
|
|
25
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
26
|
+
aiws hooks status .
|
|
27
|
+
else
|
|
28
|
+
npx @aipper/aiws hooks status .
|
|
29
|
+
fi
|
|
30
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: p-aiws-hooks-status
|
|
3
|
+
description: 私有:查看当前仓库 hooks 状态(只读)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
目标:
|
|
7
|
+
- 输出当前仓库 hooks 状态(不修改文件)
|
|
8
|
+
|
|
9
|
+
执行(在仓库根目录):
|
|
10
|
+
```bash
|
|
11
|
+
if [[ -x "./node_modules/.bin/aiws" ]]; then
|
|
12
|
+
./node_modules/.bin/aiws hooks status .
|
|
13
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
14
|
+
aiws hooks status .
|
|
15
|
+
else
|
|
16
|
+
npx @aipper/aiws hooks status .
|
|
17
|
+
fi
|
|
18
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: p-aiws-init
|
|
3
|
+
description: 私有:初始化工作区(生成真值文件与门禁)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
目标:
|
|
7
|
+
- 生成/补齐真值文件与门禁文件(以 `AI_PROJECT.md` / `REQUIREMENTS.md` / `AI_WORKSPACE.md` 为准)
|
|
8
|
+
- 写入/更新 `.gitignore` 的 aiws 托管块
|
|
9
|
+
- 生成/更新 `.aiws/manifest.json`(用于漂移检测)
|
|
10
|
+
|
|
11
|
+
执行(在仓库根目录):
|
|
12
|
+
```bash
|
|
13
|
+
if [[ -x "./node_modules/.bin/aiws" ]]; then
|
|
14
|
+
./node_modules/.bin/aiws init .
|
|
15
|
+
./node_modules/.bin/aiws validate .
|
|
16
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
17
|
+
aiws init .
|
|
18
|
+
aiws validate .
|
|
19
|
+
else
|
|
20
|
+
npx @aipper/aiws init .
|
|
21
|
+
npx @aipper/aiws validate .
|
|
22
|
+
fi
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
约束:
|
|
26
|
+
- 不写入任何 secrets
|
|
27
|
+
- 只允许更新托管块(`AIWS_MANAGED_BEGIN/END`)或 spec 指定的 `replace_file` 文件
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: p-aiws-rollback
|
|
3
|
+
description: 私有:回滚工作区(从备份恢复)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
目标:
|
|
7
|
+
- 从 `.aiws/backups/` 恢复到某次备份快照
|
|
8
|
+
|
|
9
|
+
执行(在仓库根目录):
|
|
10
|
+
```bash
|
|
11
|
+
if [[ -x "./node_modules/.bin/aiws" ]]; then
|
|
12
|
+
./node_modules/.bin/aiws rollback . latest
|
|
13
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
14
|
+
aiws rollback . latest
|
|
15
|
+
else
|
|
16
|
+
npx @aipper/aiws rollback . latest
|
|
17
|
+
fi
|
|
18
|
+
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: p-aiws-update
|
|
3
|
+
description: 私有:更新工作区(刷新模板与托管块)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
目标:
|
|
7
|
+
- 基于当前 `@aipper/aiws-spec` 刷新模板与 tool-native 文件
|
|
8
|
+
- 更新前备份到 `.aiws/backups/<timestamp>/`
|
|
9
|
+
|
|
10
|
+
执行(在仓库根目录):
|
|
11
|
+
```bash
|
|
12
|
+
if [[ -x "./node_modules/.bin/aiws" ]]; then
|
|
13
|
+
./node_modules/.bin/aiws update .
|
|
14
|
+
./node_modules/.bin/aiws validate .
|
|
15
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
16
|
+
aiws update .
|
|
17
|
+
aiws validate .
|
|
18
|
+
else
|
|
19
|
+
npx @aipper/aiws update .
|
|
20
|
+
npx @aipper/aiws validate .
|
|
21
|
+
fi
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
约束:
|
|
25
|
+
- 不写入任何 secrets
|
|
26
|
+
- 只更新托管块或 spec 指定的 `replace_file` 文件
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: p-aiws-validate
|
|
3
|
+
description: 私有:校验工作区(漂移检测 + 门禁)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
目标:
|
|
7
|
+
- 作为 CI/本地门禁:校验 required 文件结构、托管块、`.aiws/manifest.json` 漂移
|
|
8
|
+
- 强门禁:缺 `python3`/缺 required 脚本也应失败
|
|
9
|
+
|
|
10
|
+
执行(在仓库根目录):
|
|
11
|
+
```bash
|
|
12
|
+
if [[ -x "./node_modules/.bin/aiws" ]]; then
|
|
13
|
+
AIWS_VALIDATE_STAMP=1 ./node_modules/.bin/aiws validate .
|
|
14
|
+
elif command -v aiws >/dev/null 2>&1; then
|
|
15
|
+
AIWS_VALIDATE_STAMP=1 aiws validate .
|
|
16
|
+
else
|
|
17
|
+
AIWS_VALIDATE_STAMP=1 npx @aipper/aiws validate .
|
|
18
|
+
fi
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
证据(可选):
|
|
22
|
+
- stamp:`.agentdocs/tmp/aiws-validate/*.json`(由 `.gitignore` 忽略)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: p-tasks-plan
|
|
3
|
+
description: 原子:tasks 同步(从 changes/<id>/tasks.md 生成 update_plan payload)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
用中文输出(命令/路径/代码标识符保持原样不翻译)。
|
|
7
|
+
|
|
8
|
+
目标:
|
|
9
|
+
- 用 `changes/<change-id>/tasks.md` 的 checkbox 任务作为“步骤真值”
|
|
10
|
+
- 生成可直接用于 `update_plan` 的 JSON payload(`pending/in_progress/completed`)
|
|
11
|
+
- 输出当前进度摘要(done/total + 当前 in_progress)
|
|
12
|
+
|
|
13
|
+
约束:
|
|
14
|
+
- 不写入任何 secrets(token、账号、内网端点等不得进入 git)
|
|
15
|
+
- 只读 `changes/<id>/tasks.md`(不自动改写 tasks 文件)
|
|
16
|
+
- 未运行不声称已运行
|
|
17
|
+
|
|
18
|
+
执行步骤(建议):
|
|
19
|
+
1) 先运行 `$ws-preflight`。
|
|
20
|
+
2) 推断 `change-id`:
|
|
21
|
+
- 优先从当前分支名读取:`git rev-parse --abbrev-ref HEAD`(期望形如 `change/<change-id>`)
|
|
22
|
+
- 若无法推断:让用户明确本次要同步的 `<change-id>`
|
|
23
|
+
3) 检查 tasks 文件存在:`test -f changes/<change-id>/tasks.md`
|
|
24
|
+
4) 输出进度摘要:
|
|
25
|
+
```bash
|
|
26
|
+
python3 tools/ws_tasks_plan.py status --file changes/<change-id>/tasks.md
|
|
27
|
+
```
|
|
28
|
+
5) 生成 `update_plan` payload(JSON 输出到 stdout):
|
|
29
|
+
```bash
|
|
30
|
+
python3 tools/ws_tasks_plan.py plan --file changes/<change-id>/tasks.md --explanation "sync tasks.md -> update_plan"
|
|
31
|
+
```
|
|
32
|
+
6) 调用 `update_plan`,将上一步 JSON 原样作为入参(确保任意时刻最多 1 条 `in_progress`)。
|
|
33
|
+
|
|
34
|
+
输出要求:
|
|
35
|
+
- `Change_ID:` <change-id>
|
|
36
|
+
- `Tasks:` `changes/<change-id>/tasks.md`
|
|
37
|
+
- `Next:` 推荐下一步(通常为继续完善 tasks 或进入 `$ws-dev`)
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: using-aiws
|
|
3
|
+
description: 默认 workflow bootstrap/router:先读真值,再路由到正确的 ws-* 入口
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
用中文输出(命令/路径/代码标识符保持原样不翻译)。
|
|
7
|
+
|
|
8
|
+
目标:
|
|
9
|
+
- 作为默认入口,先读取 `AI_PROJECT.md` / `REQUIREMENTS.md` / `AI_WORKSPACE.md`
|
|
10
|
+
- 先判定当前任务属于哪个 workflow,再进入具体 `ws-*` skill
|
|
11
|
+
- 若任务意图、归因或验证入口不明确:先澄清,不直接进入实现
|
|
12
|
+
|
|
13
|
+
阶段定位:
|
|
14
|
+
- bootstrap/router 阶段;负责 workflow 分流,而不是直接完成实现。
|
|
15
|
+
|
|
16
|
+
必需输入:
|
|
17
|
+
- 当前任务描述
|
|
18
|
+
- `AI_PROJECT.md`
|
|
19
|
+
- `REQUIREMENTS.md`
|
|
20
|
+
- `AI_WORKSPACE.md`
|
|
21
|
+
- 若已存在:当前 `change/<change-id>` 上下文、`plan/...`、`changes/<change-id>/...`
|
|
22
|
+
|
|
23
|
+
必需输出:
|
|
24
|
+
- `Root:` 当前项目根
|
|
25
|
+
- `Found:` 实际读取到的真值文件
|
|
26
|
+
- `Task intent:` 当前任务意图分类
|
|
27
|
+
- `Binding:` `Req_ID` / `Problem_ID` / change 上下文是否清晰
|
|
28
|
+
- `Route:` 选中的下一步 skill
|
|
29
|
+
- `Why:` 选择该 route 的原因
|
|
30
|
+
- `Next:` 进入对应 skill,或先提澄清问题
|
|
31
|
+
|
|
32
|
+
阻断条件:
|
|
33
|
+
- 无法确定项目根目录
|
|
34
|
+
- 缺失任一真值文件
|
|
35
|
+
- 无法明确当前任务意图
|
|
36
|
+
- 无法明确归因或验证入口,且不能安全推断
|
|
37
|
+
|
|
38
|
+
完成判定:
|
|
39
|
+
- 已经明确给出单一路由结果,并进入对应 `ws-*` skill;或已提出关键澄清问题并停止。
|
|
40
|
+
|
|
41
|
+
执行步骤(强制):
|
|
42
|
+
1) 先遵守 `$ws-preflight` 的真值读取要求:
|
|
43
|
+
- 定位项目根目录
|
|
44
|
+
- 读取 `AI_PROJECT.md` / `REQUIREMENTS.md` / `AI_WORKSPACE.md`
|
|
45
|
+
- 输出 `Root:` / `Found:` / `Missing:`
|
|
46
|
+
2) 若缺失任一真值文件:
|
|
47
|
+
- 不进入实现
|
|
48
|
+
- 输出下一步:先 `aiws init .`(或 `npx @aipper/aiws init .`),然后重新执行 `$using-aiws`
|
|
49
|
+
- 此时 route 视为 `$ws-preflight`
|
|
50
|
+
3) 根据 `packages/spec/docs/workflow-router-rules.json` 判定任务属于哪一类:
|
|
51
|
+
- 需求/验收/合同变更:`$ws-req-review`
|
|
52
|
+
- 评审/审计/找风险:`$ws-review`
|
|
53
|
+
- finish / merge / push / cleanup:`$ws-finish`
|
|
54
|
+
- handoff / archive summary:`$ws-handoff`
|
|
55
|
+
- 中大型实现、需要方案、需要 change/worktree:`$ws-plan`
|
|
56
|
+
- 小步明确实现/修复/配置调整:`$ws-dev`(若是 simple/local 单点修复,且用户明确希望走轻量入口,可显式进入 `$ws-dev-lite`)
|
|
57
|
+
4) 若任务意图或归因不明确:
|
|
58
|
+
- 只问 1-3 个关键澄清问题
|
|
59
|
+
- 明确写出缺的是什么:意图、`Req_ID` / `Problem_ID`、verify、change 上下文
|
|
60
|
+
- 然后停止;不要直接写代码
|
|
61
|
+
5) 若已确定 route:
|
|
62
|
+
- 先输出:
|
|
63
|
+
- `Task intent:`
|
|
64
|
+
- `Binding:`
|
|
65
|
+
- `Route:`
|
|
66
|
+
- `Why:`
|
|
67
|
+
- 若 `Route: $ws-dev` 且任务属于 simple/local 单点修复:
|
|
68
|
+
- `Next:` 可优先进入 `$ws-dev-lite`
|
|
69
|
+
- 否则:
|
|
70
|
+
- `Next:` 进入对应主 skill
|
|
71
|
+
- 然后在同一轮中继续遵循对应 skill 的契约
|
|
72
|
+
6) 路由约束:
|
|
73
|
+
- router 自己不是实现阶段;不要在给出 route 之前直接改代码
|
|
74
|
+
- 除非用户只想听判断结果,否则给出 route 后应继续按对应 skill 的规则推进
|
|
75
|
+
- 一次只选择一个主 route;不要把 `ws-plan` / `ws-dev` / `ws-review` / `ws-finish` 混成并行终态
|
|
76
|
+
7) 若执行过程中发现复杂度升高:
|
|
77
|
+
- 从 `$ws-dev` 回退到 `$ws-plan`
|
|
78
|
+
- 从 `$ws-finish` 回退到前置门禁而不是硬推完成
|
|
79
|
+
|
|
80
|
+
输出模板:
|
|
81
|
+
- `Root:` <path>
|
|
82
|
+
- `Found:` <files>
|
|
83
|
+
- `Task intent:` <分类>
|
|
84
|
+
- `Binding:` <清晰 / 缺失项>
|
|
85
|
+
- `Route:` <$ws-... 或 clarify>
|
|
86
|
+
- `Why:` <一句到三句>
|
|
87
|
+
- `Next:` <继续执行对应 skill,或提出澄清问题>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ws-analyze
|
|
3
|
+
description: 分析(定位问题与收集上下文)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
用中文输出(命令/路径/代码标识符保持原样不翻译)。
|
|
7
|
+
|
|
8
|
+
目标:在开始实现/修复前做一次技术分析,产出可执行的最小行动清单,并把证据落盘到 `.agentdocs/tmp/analyze/`。
|
|
9
|
+
|
|
10
|
+
输入:
|
|
11
|
+
- 主题/需求:用户在本次消息中提供的主题(若不明确,先问一句“本次分析主题是什么?”)
|
|
12
|
+
|
|
13
|
+
步骤(建议):
|
|
14
|
+
1) 先做 preflight:定位项目根目录,读取 `AI_PROJECT.md` / `REQUIREMENTS.md` / `AI_WORKSPACE.md`,输出约束摘要。
|
|
15
|
+
2) 基于真值文件与当前代码现状,输出:
|
|
16
|
+
- 目标 / 非目标
|
|
17
|
+
- 现状证据(文件路径/接口路径)
|
|
18
|
+
- 推荐方案(1 个)+ 备选(可选)
|
|
19
|
+
- 风险与回滚(3–8 条)
|
|
20
|
+
- 最小验证命令(可复现)
|
|
21
|
+
3) 将分析落盘到:`.agentdocs/tmp/analyze/codex-analysis.md`(目录不存在则创建)。
|
|
22
|
+
4) 回复中必须包含:`Evidence:` 证据文件路径。
|
|
23
|
+
|
|
24
|
+
安全:
|
|
25
|
+
- 不打印 secrets(尤其 `secrets/test-accounts.json`)。
|
|
26
|
+
- 不执行破坏性命令。
|