@aipper/aiws-spec 0.0.21 → 0.0.23
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/docs/spec-contract.md +5 -4
- package/package.json +1 -1
- package/templates/workspace/.agents/skills/{aiws-change-archive → p-aiws-change-archive}/SKILL.md +3 -2
- package/templates/workspace/.agents/skills/{aiws-change-finish → p-aiws-change-finish}/SKILL.md +2 -2
- package/templates/workspace/.agents/skills/{aiws-change-list → p-aiws-change-list}/SKILL.md +2 -2
- package/templates/workspace/.agents/skills/{aiws-change-new → p-aiws-change-new}/SKILL.md +2 -2
- package/templates/workspace/.agents/skills/{aiws-change-next → p-aiws-change-next}/SKILL.md +2 -2
- package/templates/workspace/.agents/skills/{aiws-change-start → p-aiws-change-start}/SKILL.md +2 -2
- package/templates/workspace/.agents/skills/{aiws-change-status → p-aiws-change-status}/SKILL.md +2 -2
- package/templates/workspace/.agents/skills/{aiws-change-sync → p-aiws-change-sync}/SKILL.md +2 -2
- package/templates/workspace/.agents/skills/{aiws-change-templates-init → p-aiws-change-templates-init}/SKILL.md +2 -2
- package/templates/workspace/.agents/skills/{aiws-change-templates-which → p-aiws-change-templates-which}/SKILL.md +2 -2
- package/templates/workspace/.agents/skills/{aiws-change-validate → p-aiws-change-validate}/SKILL.md +2 -2
- package/templates/workspace/.agents/skills/{aiws-hooks-install → p-aiws-hooks-install}/SKILL.md +2 -2
- package/templates/workspace/.agents/skills/{aiws-hooks-status → p-aiws-hooks-status}/SKILL.md +2 -2
- package/templates/workspace/.agents/skills/{aiws-init → p-aiws-init}/SKILL.md +2 -2
- package/templates/workspace/.agents/skills/{aiws-rollback → p-aiws-rollback}/SKILL.md +2 -2
- package/templates/workspace/.agents/skills/{aiws-update → p-aiws-update}/SKILL.md +2 -2
- package/templates/workspace/.agents/skills/{aiws-validate → p-aiws-validate}/SKILL.md +2 -2
- package/templates/workspace/.agents/skills/p-tasks-plan/SKILL.md +37 -0
- package/templates/workspace/.agents/skills/ws-commit/SKILL.md +21 -6
- package/templates/workspace/.agents/skills/ws-deliver/SKILL.md +38 -9
- package/templates/workspace/.agents/skills/ws-dev/SKILL.md +61 -2
- package/templates/workspace/.agents/skills/ws-finish/SKILL.md +39 -25
- package/templates/workspace/.agents/skills/ws-handoff/SKILL.md +31 -0
- package/templates/workspace/.agents/skills/ws-plan/SKILL.md +32 -0
- package/templates/workspace/.agents/skills/ws-push/SKILL.md +17 -12
- package/templates/workspace/.claude/commands/{aiws-change-archive.md → p-aiws-change-archive.md} +3 -1
- package/templates/workspace/.claude/commands/{aiws-change-finish.md → p-aiws-change-finish.md} +2 -0
- package/templates/workspace/.claude/commands/{aiws-change-list.md → p-aiws-change-list.md} +2 -0
- package/templates/workspace/.claude/commands/{aiws-change-new.md → p-aiws-change-new.md} +2 -0
- package/templates/workspace/.claude/commands/{aiws-change-next.md → p-aiws-change-next.md} +2 -0
- package/templates/workspace/.claude/commands/{aiws-change-start.md → p-aiws-change-start.md} +2 -0
- package/templates/workspace/.claude/commands/{aiws-change-status.md → p-aiws-change-status.md} +2 -0
- package/templates/workspace/.claude/commands/{aiws-change-sync.md → p-aiws-change-sync.md} +2 -0
- package/templates/workspace/.claude/commands/{aiws-change-templates-init.md → p-aiws-change-templates-init.md} +2 -0
- package/templates/workspace/.claude/commands/{aiws-change-templates-which.md → p-aiws-change-templates-which.md} +2 -0
- package/templates/workspace/.claude/commands/{aiws-change-validate.md → p-aiws-change-validate.md} +2 -0
- package/templates/workspace/.claude/commands/{aiws-hooks-install.md → p-aiws-hooks-install.md} +2 -0
- package/templates/workspace/.claude/commands/{aiws-hooks-status.md → p-aiws-hooks-status.md} +2 -0
- package/templates/workspace/.claude/commands/{aiws-init.md → p-aiws-init.md} +2 -1
- package/templates/workspace/.claude/commands/{aiws-rollback.md → p-aiws-rollback.md} +2 -1
- package/templates/workspace/.claude/commands/{aiws-update.md → p-aiws-update.md} +2 -1
- package/templates/workspace/.claude/commands/{aiws-validate.md → p-aiws-validate.md} +2 -1
- package/templates/workspace/.claude/commands/ws-dev.md +4 -1
- package/templates/workspace/.claude/commands/ws-handoff.md +22 -0
- package/templates/workspace/.opencode/command/{aiws-change-archive.md → p-aiws-change-archive.md} +4 -2
- package/templates/workspace/.opencode/command/{aiws-change-finish.md → p-aiws-change-finish.md} +3 -1
- package/templates/workspace/.opencode/command/{aiws-change-list.md → p-aiws-change-list.md} +3 -1
- package/templates/workspace/.opencode/command/{aiws-change-new.md → p-aiws-change-new.md} +3 -1
- package/templates/workspace/.opencode/command/{aiws-change-next.md → p-aiws-change-next.md} +3 -1
- package/templates/workspace/.opencode/command/{aiws-change-start.md → p-aiws-change-start.md} +3 -1
- package/templates/workspace/.opencode/command/{aiws-change-status.md → p-aiws-change-status.md} +3 -1
- package/templates/workspace/.opencode/command/{aiws-change-sync.md → p-aiws-change-sync.md} +3 -1
- package/templates/workspace/.opencode/command/{aiws-change-templates-init.md → p-aiws-change-templates-init.md} +3 -1
- package/templates/workspace/.opencode/command/{aiws-change-templates-which.md → p-aiws-change-templates-which.md} +3 -1
- package/templates/workspace/.opencode/command/{aiws-change-validate.md → p-aiws-change-validate.md} +3 -1
- package/templates/workspace/.opencode/command/{aiws-hooks-install.md → p-aiws-hooks-install.md} +3 -1
- package/templates/workspace/.opencode/command/{aiws-hooks-status.md → p-aiws-hooks-status.md} +3 -1
- package/templates/workspace/.opencode/command/{aiws-init.md → p-aiws-init.md} +3 -1
- package/templates/workspace/.opencode/command/{aiws-rollback.md → p-aiws-rollback.md} +3 -1
- package/templates/workspace/.opencode/command/{aiws-update.md → p-aiws-update.md} +3 -1
- package/templates/workspace/.opencode/command/{aiws-validate.md → p-aiws-validate.md} +3 -1
- package/templates/workspace/.opencode/command/ws-commit.md +1 -1
- package/templates/workspace/.opencode/command/ws-dev.md +4 -1
- package/templates/workspace/.opencode/command/ws-handoff.md +25 -0
- package/templates/workspace/.opencode/command/ws-review.md +1 -1
- package/templates/workspace/AGENTS.md +7 -4
- package/templates/workspace/manifest.json +171 -103
- package/templates/workspace/tools/ws_change_check.py +99 -0
- package/templates/workspace/tools/ws_resolve_sub_target.sh +46 -0
- package/templates/workspace/tools/ws_tasks_plan.py +137 -0
|
@@ -60,6 +60,12 @@ fi
|
|
|
60
60
|
4) 逐个 push submodules(fast-forward only),再 push superproject:
|
|
61
61
|
```bash
|
|
62
62
|
base_branch="$(git branch --show-current)"
|
|
63
|
+
change_id="$(echo "${base_branch}" | sed -n 's|^change/||p')"
|
|
64
|
+
targets="changes/${change_id}/submodules.targets"
|
|
65
|
+
# Note: if not on a change/ branch, change_id is empty and targets file won't exist;
|
|
66
|
+
# resolution falls back to .gitmodules submodule.<name>.branch via ws_resolve_sub_target.
|
|
67
|
+
|
|
68
|
+
source tools/ws_resolve_sub_target.sh
|
|
63
69
|
|
|
64
70
|
git config --file .gitmodules --get-regexp '^submodule\\..*\\.path$' 2>/dev/null \
|
|
65
71
|
| while read -r key sub_path; do
|
|
@@ -72,25 +78,25 @@ git config --file .gitmodules --get-regexp '^submodule\\..*\\.path$' 2>/dev/null
|
|
|
72
78
|
exit 2
|
|
73
79
|
fi
|
|
74
80
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
81
|
+
ws_resolve_sub_target "${sub_path}" "${name}" "${targets}" "${base_branch}" || exit 2
|
|
82
|
+
target_branch="${_resolved_branch}"
|
|
83
|
+
remote="${_resolved_remote}"
|
|
78
84
|
|
|
79
|
-
git -C "${sub_path}" fetch
|
|
80
|
-
if ! git -C "${sub_path}" show-ref --verify --quiet "refs/remotes
|
|
81
|
-
echo "error: missing
|
|
85
|
+
git -C "${sub_path}" fetch "${remote}" --prune
|
|
86
|
+
if ! git -C "${sub_path}" show-ref --verify --quiet "refs/remotes/${remote}/${target_branch}"; then
|
|
87
|
+
echo "error: missing ${remote}/${target_branch} for ${sub_path}"
|
|
82
88
|
exit 2
|
|
83
89
|
fi
|
|
84
90
|
|
|
85
|
-
# fast-forward only:
|
|
86
|
-
if ! git -C "${sub_path}" merge-base --is-ancestor "
|
|
87
|
-
echo "error: non-fast-forward (submodule=${sub_path}, branch=${target_branch})"
|
|
91
|
+
# fast-forward only: <remote>/<branch> 必须是 HEAD 的祖先
|
|
92
|
+
if ! git -C "${sub_path}" merge-base --is-ancestor "${remote}/${target_branch}" HEAD; then
|
|
93
|
+
echo "error: non-fast-forward (submodule=${sub_path}, remote=${remote}, branch=${target_branch})"
|
|
88
94
|
echo "hint: rebase/merge in submodule, then retry"
|
|
89
95
|
exit 2
|
|
90
96
|
fi
|
|
91
97
|
|
|
92
|
-
# push HEAD ->
|
|
93
|
-
git -C "${sub_path}" push
|
|
98
|
+
# push HEAD -> <remote>/<branch>(不 force)
|
|
99
|
+
git -C "${sub_path}" push "${remote}" "HEAD:refs/heads/${target_branch}"
|
|
94
100
|
done
|
|
95
101
|
|
|
96
102
|
# 最后 push superproject(仍需用户确认远端/分支)
|
|
@@ -102,4 +108,3 @@ git push
|
|
|
102
108
|
- `Context:` 当前分支 + 是否有 submodules
|
|
103
109
|
- `Submodules:` 每个 submodule push 的目标分支与结果(成功/阻断原因)
|
|
104
110
|
- `Superproject:` push 结果
|
|
105
|
-
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<!-- AIWS_MANAGED_BEGIN:claude:aiws-init -->
|
|
2
2
|
# aiws init
|
|
3
3
|
|
|
4
|
+
(私有原子入口;日常优先用 /ws-* 链路。)
|
|
5
|
+
|
|
4
6
|
目标:
|
|
5
7
|
- 生成/补齐真值文件与门禁文件(以 `AI_PROJECT.md` / `REQUIREMENTS.md` / `AI_WORKSPACE.md` 为准)
|
|
6
8
|
- 写入/更新 `.gitignore` 的 aiws 托管块
|
|
@@ -16,4 +18,3 @@
|
|
|
16
18
|
<!-- AIWS_MANAGED_END:claude:aiws-init -->
|
|
17
19
|
|
|
18
20
|
可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
|
|
19
|
-
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<!-- AIWS_MANAGED_BEGIN:claude:aiws-rollback -->
|
|
2
2
|
# aiws rollback
|
|
3
3
|
|
|
4
|
+
(私有原子入口;日常优先用 /ws-* 链路。)
|
|
5
|
+
|
|
4
6
|
目标:
|
|
5
7
|
- 从 `.aiws/backups/` 恢复到某次备份快照
|
|
6
8
|
|
|
@@ -9,4 +11,3 @@
|
|
|
9
11
|
<!-- AIWS_MANAGED_END:claude:aiws-rollback -->
|
|
10
12
|
|
|
11
13
|
可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
|
|
12
|
-
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<!-- AIWS_MANAGED_BEGIN:claude:aiws-update -->
|
|
2
2
|
# aiws update
|
|
3
3
|
|
|
4
|
+
(私有原子入口;日常优先用 /ws-* 链路。)
|
|
5
|
+
|
|
4
6
|
目标:
|
|
5
7
|
- 基于当前 `@aipper/aiws-spec` 刷新模板与 tool-native 文件
|
|
6
8
|
- 更新前备份到 `.aiws/backups/<timestamp>/`
|
|
@@ -15,4 +17,3 @@
|
|
|
15
17
|
<!-- AIWS_MANAGED_END:claude:aiws-update -->
|
|
16
18
|
|
|
17
19
|
可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
|
|
18
|
-
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<!-- AIWS_MANAGED_BEGIN:claude:aiws-validate -->
|
|
2
2
|
# aiws validate
|
|
3
3
|
|
|
4
|
+
(私有原子入口;日常优先用 /ws-* 链路。)
|
|
5
|
+
|
|
4
6
|
目标:
|
|
5
7
|
- 作为 CI/本地门禁:校验 required 文件结构、托管块、`.aiws/manifest.json` 漂移
|
|
6
8
|
- 强门禁:缺 `python3`/缺 required 脚本也应失败
|
|
@@ -10,4 +12,3 @@
|
|
|
10
12
|
<!-- AIWS_MANAGED_END:claude:aiws-validate -->
|
|
11
13
|
|
|
12
14
|
可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
|
|
13
|
-
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
建议流程:
|
|
9
9
|
1) 先运行 `/ws-preflight`(读真值文件并输出约束摘要)。
|
|
10
10
|
2) 建立变更归因(推荐):
|
|
11
|
-
-
|
|
11
|
+
- ⚠️ 开始前先确认工作区干净:`git status --porcelain` 为空;否则切分支/创建 worktree 后,未提交改动可能“看起来丢了”(worktree 只从 `HEAD` checkout,未提交内容会留在原目录)。
|
|
12
|
+
- 推荐更安全(默认):`aiws change start <change-id> --hooks --no-switch`(只创建分支/工件 + 启用 hooks;不切分支)
|
|
13
|
+
- 准备进入实现(且工作区干净)后再切换:`git switch change/<change-id>`
|
|
14
|
+
- 若你明确要“一键切分支”(不推荐,且 dirty 会被拦截):`aiws change start <change-id> --hooks --switch`
|
|
12
15
|
- superproject + submodule(推荐):`aiws change start <change-id> --hooks --worktree --submodules`
|
|
13
16
|
- 若后续需要在 detached submodule 内提交:先挂到 `aiws/pin/<target-branch>`;不要直接切 `change/<change-id>` / `main` / `master`
|
|
14
17
|
- 或手工:`git switch -c change/<change-id>`,并创建 `changes/<change-id>/proposal.md` 与 `changes/<change-id>/tasks.md`(参考 `changes/README.md`)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!-- AIWS_MANAGED_BEGIN:claude:ws-handoff -->
|
|
2
|
+
# ws handoff
|
|
3
|
+
|
|
4
|
+
用中文输出(命令/路径/代码标识符保持原样不翻译)。
|
|
5
|
+
|
|
6
|
+
目标:
|
|
7
|
+
- 交接与回放:通过 `handoff.md` 让已归档的 change 可被下一位/下一次会话快速接力。
|
|
8
|
+
- handoff 文件位置:`changes/archive/<date>-<change-id>/handoff.md`(由 `aiws change archive` 自动生成)。
|
|
9
|
+
|
|
10
|
+
执行建议:
|
|
11
|
+
1) 若 change 已完成并准备归档:运行 `/p-aiws-change-archive`(会先严格校验,再归档并生成 `handoff.md`)。
|
|
12
|
+
2) 查看 handoff:
|
|
13
|
+
```bash
|
|
14
|
+
change_id="<change-id>"
|
|
15
|
+
ls -1 changes/archive/*-"${change_id}"/handoff.md
|
|
16
|
+
sed -n '1,160p' changes/archive/*-"${change_id}"/handoff.md
|
|
17
|
+
```
|
|
18
|
+
3) 依赖提示:
|
|
19
|
+
- 若你在某个 change 的 `proposal.md` 声明了 `Depends_On`,`aiws change start` 会尝试读取依赖 change 的 `handoff.md` 并输出摘要(前提:依赖已归档且 handoff 存在)。
|
|
20
|
+
<!-- AIWS_MANAGED_END:claude:ws-handoff -->
|
|
21
|
+
|
|
22
|
+
可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
|
package/templates/workspace/.opencode/command/{aiws-change-archive.md → p-aiws-change-archive.md}
RENAMED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: 私有:变更归档:归档已完成的 change 工件并生成 handoff.md
|
|
3
3
|
---
|
|
4
4
|
<!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-archive -->
|
|
5
5
|
# aiws change archive
|
|
6
6
|
|
|
7
|
+
(私有原子入口;日常优先用 ws-* 链路。)
|
|
8
|
+
|
|
7
9
|
用中文输出(命令/路径/代码标识符保持原样不翻译)。
|
|
8
10
|
|
|
9
11
|
目标:
|
|
10
|
-
- 归档已完成 change
|
|
12
|
+
- 归档已完成 change 工件,并生成交接文档:`changes/archive/.../handoff.md`
|
|
11
13
|
|
|
12
14
|
执行(在仓库根目录):
|
|
13
15
|
```bash
|
package/templates/workspace/.opencode/command/{aiws-change-start.md → p-aiws-change-start.md}
RENAMED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: 私有:变更开始:切到 change/<change-id> 并初始化工件
|
|
3
3
|
---
|
|
4
4
|
<!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-start -->
|
|
5
5
|
# aiws change start
|
|
6
6
|
|
|
7
|
+
(私有原子入口;日常优先用 ws-* 链路。)
|
|
8
|
+
|
|
7
9
|
用中文输出(命令/路径/代码标识符保持原样不翻译)。
|
|
8
10
|
|
|
9
11
|
目标:
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: 私有:模板初始化:初始化 changes/templates 覆盖模板
|
|
3
3
|
---
|
|
4
4
|
<!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-templates-init -->
|
|
5
5
|
# aiws change templates init
|
|
6
6
|
|
|
7
|
+
(私有原子入口;日常优先用 ws-* 链路。)
|
|
8
|
+
|
|
7
9
|
用中文输出(命令/路径/代码标识符保持原样不翻译)。
|
|
8
10
|
|
|
9
11
|
目标:
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: 私有:模板来源:查看 change templates 来源
|
|
3
3
|
---
|
|
4
4
|
<!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-templates-which -->
|
|
5
5
|
# aiws change templates which
|
|
6
6
|
|
|
7
|
+
(私有原子入口;日常优先用 ws-* 链路。)
|
|
8
|
+
|
|
7
9
|
用中文输出(命令/路径/代码标识符保持原样不翻译)。
|
|
8
10
|
|
|
9
11
|
目标:
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: 私有:初始化:落盘 AIWS 真值与门禁文件
|
|
3
3
|
---
|
|
4
4
|
<!-- AIWS_MANAGED_BEGIN:opencode:aiws-init -->
|
|
5
5
|
# aiws init
|
|
6
6
|
|
|
7
|
+
(私有原子入口;日常优先用 ws-* 链路。)
|
|
8
|
+
|
|
7
9
|
目标:
|
|
8
10
|
- 生成/补齐真值文件与门禁文件(以 `AI_PROJECT.md` / `REQUIREMENTS.md` / `AI_WORKSPACE.md` 为准)
|
|
9
11
|
- 写入/更新 `.gitignore` 的 aiws 托管块
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: 私有:更新:刷新模板与 tool-native 文件(先备份)
|
|
3
3
|
---
|
|
4
4
|
<!-- AIWS_MANAGED_BEGIN:opencode:aiws-update -->
|
|
5
5
|
# aiws update
|
|
6
6
|
|
|
7
|
+
(私有原子入口;日常优先用 ws-* 链路。)
|
|
8
|
+
|
|
7
9
|
目标:
|
|
8
10
|
- 基于当前 `@aipper/aiws-spec` 刷新模板与 tool-native 文件
|
|
9
11
|
- 更新前备份到 `.aiws/backups/<timestamp>/`
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: 私有:门禁:校验 required/托管块/漂移(可落盘 stamp)
|
|
3
3
|
---
|
|
4
4
|
<!-- AIWS_MANAGED_BEGIN:opencode:aiws-validate -->
|
|
5
5
|
# aiws validate
|
|
6
6
|
|
|
7
|
+
(私有原子入口;日常优先用 ws-* 链路。)
|
|
8
|
+
|
|
7
9
|
目标:
|
|
8
10
|
- 作为 CI/本地门禁:校验 required 文件结构、托管块、`.aiws/manifest.json` 漂移
|
|
9
11
|
- 强门禁:缺 `python3`/缺 required 脚本也应失败
|
|
@@ -11,7 +11,10 @@ description: 开发:在 AIWS 约束下完成小步交付
|
|
|
11
11
|
建议流程:
|
|
12
12
|
1) 先运行 `/ws-preflight`(读真值文件并输出约束摘要)。
|
|
13
13
|
2) 建立变更归因(推荐):
|
|
14
|
-
-
|
|
14
|
+
- ⚠️ 开始前先确认工作区干净:`git status --porcelain` 为空;否则切分支/创建 worktree 后,未提交改动可能“看起来丢了”(worktree 只从 `HEAD` checkout,未提交内容会留在原目录)。
|
|
15
|
+
- 推荐更安全(默认):`aiws change start <change-id> --hooks --no-switch`(只创建分支/工件 + 启用 hooks;不切分支)
|
|
16
|
+
- 准备进入实现(且工作区干净)后再切换:`git switch change/<change-id>`
|
|
17
|
+
- 若你明确要“一键切分支”(不推荐,且 dirty 会被拦截):`aiws change start <change-id> --hooks --switch`
|
|
15
18
|
- superproject + submodule(推荐):`aiws change start <change-id> --hooks --worktree --submodules`
|
|
16
19
|
- 若后续需要在 detached submodule 内提交:先挂到 `aiws/pin/<target-branch>`;不要直接切 `change/<change-id>` / `main` / `master`
|
|
17
20
|
- 或手工:`git switch -c change/<change-id>`,并创建 `changes/<change-id>/proposal.md` 与 `changes/<change-id>/tasks.md`(参考 `changes/README.md`)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 交接:查看归档 change 的 handoff.md(由 aiws change archive 生成)
|
|
3
|
+
---
|
|
4
|
+
<!-- AIWS_MANAGED_BEGIN:opencode:ws-handoff -->
|
|
5
|
+
# ws handoff
|
|
6
|
+
|
|
7
|
+
用中文输出(命令/路径/代码标识符保持原样不翻译)。
|
|
8
|
+
|
|
9
|
+
目标:
|
|
10
|
+
- 交接与回放:通过 `handoff.md` 让已归档的 change 可被下一位/下一次会话快速接力。
|
|
11
|
+
- handoff 文件位置:`changes/archive/<date>-<change-id>/handoff.md`(由 `aiws change archive` 自动生成)。
|
|
12
|
+
|
|
13
|
+
执行建议:
|
|
14
|
+
1) 若 change 已完成并准备归档:运行 `/p-aiws-change-archive`(会先严格校验,再归档并生成 `handoff.md`)。
|
|
15
|
+
2) 查看 handoff:
|
|
16
|
+
```bash
|
|
17
|
+
change_id="<change-id>"
|
|
18
|
+
ls -1 changes/archive/*-"${change_id}"/handoff.md
|
|
19
|
+
sed -n '1,160p' changes/archive/*-"${change_id}"/handoff.md
|
|
20
|
+
```
|
|
21
|
+
3) 依赖提示:
|
|
22
|
+
- 若你在某个 change 的 `proposal.md` 声明了 `Depends_On`,`aiws change start` 会尝试读取依赖 change 的 `handoff.md` 并输出摘要(前提:依赖已归档且 handoff 存在)。
|
|
23
|
+
<!-- AIWS_MANAGED_END:opencode:ws-handoff -->
|
|
24
|
+
|
|
25
|
+
可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
|
|
@@ -10,21 +10,24 @@
|
|
|
10
10
|
- 启用本机门禁(推荐):`aiws hooks install .`(或手工:`git config core.hooksPath .githooks`;`git commit`/`git push` 会自动跑 `aiws validate .`)
|
|
11
11
|
- 提交前校验(强制门禁):`aiws validate .`(包含:漂移检测 + `ws_change_check` + `requirements_contract`)
|
|
12
12
|
- Codex(推荐):本仓库内置 repo skills:`.agents/skills/`(可显式 `$ws-dev`,也可隐式套用工作流)
|
|
13
|
+
- Codex skills 命名约定:`ws-*` 为常用链路入口;`p-*` 为私有原子入口(一般不需要直接调用)。
|
|
13
14
|
- Codex skills(常用,一句话说明):
|
|
14
15
|
- `$ws-preflight`:预检(读取真值文件并输出约束摘要)
|
|
15
16
|
- `$ws-submodule-setup`:子模块分支对齐(写入 `.gitmodules` 的 `submodule.<name>.branch`)
|
|
16
17
|
- `$ws-plan`:规划(生成可落盘 `plan/` 工件;供 `$ws-dev` 执行)
|
|
17
18
|
- `$ws-plan-verify`:计划质检(执行前检查计划是否过长/跑偏)
|
|
19
|
+
- `$p-tasks-plan`:原子:tasks 同步(从 `changes/<id>/tasks.md` 生成 `update_plan` payload)
|
|
18
20
|
- `$ws-dev`:开发(按需求实现并验证;适用于任何需要修改代码/配置的任务)
|
|
19
21
|
- `$ws-bugfix`:缺陷修复(禅道 MCP 拉单 + 图片证据落盘 + `issues/fix_bus_issues.csv` 汇总)
|
|
20
22
|
- `$ws-pull`:拉取并对齐 submodules(尽量避免 detached;减少人为差异)
|
|
21
23
|
- `$ws-push`:推送(submodule 感知:先 submodules 后 superproject;fast-forward 安全)
|
|
22
24
|
- `$ws-review`:评审(提交前审计;证据优先落盘到 `changes/<change-id>/review/`)
|
|
23
25
|
- `$ws-commit`:提交(先审计/门禁再 commit;submodule 感知)
|
|
24
|
-
- `$
|
|
25
|
-
- `$aiws-
|
|
26
|
-
- `$aiws-
|
|
27
|
-
- `$aiws-
|
|
26
|
+
- `$ws-handoff`:交接(归档后生成/查看 `changes/archive/.../handoff.md`,便于跨会话接力)
|
|
27
|
+
- `$p-aiws-init`:初始化工作区(生成真值文件与门禁)
|
|
28
|
+
- `$p-aiws-validate`:校验工作区(漂移检测 + 门禁)
|
|
29
|
+
- `$p-aiws-hooks-install`:启用 git hooks 门禁(`core.hooksPath=.githooks`)
|
|
30
|
+
- `$p-aiws-change-new`:创建 `changes/<change-id>` 工件
|
|
28
31
|
- Codex CLI(推荐,可选):安装全局 skills:`npx @aipper/aiws codex install-skills`(写入 `~/.codex/skills/` 或 `$CODEX_HOME/skills`)
|
|
29
32
|
- Codex CLI(遗留,可选):安装全局 prompts:`npx @aipper/aiws codex install-prompts`(写入 `~/.codex/prompts/` 或 `$CODEX_HOME/prompts`;prompts 已 deprecated)
|
|
30
33
|
- 不要把敏感信息写入 git:`secrets/test-accounts.json`、`.env*`、token、内网地址等
|