@aipper/aiws-spec 0.0.44 → 0.0.45
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/package.json +1 -1
- package/templates/workspace/.opencode/command/ws-bugfix.md +2 -2
- package/templates/workspace/.opencode/command/ws-dev.md +2 -2
- package/templates/workspace/.opencode/command/ws-plan.md +1 -1
- package/templates/workspace/.opencode/commands/ws-bugfix.md +2 -2
- package/templates/workspace/.opencode/commands/ws-dev.md +2 -2
- package/templates/workspace/.opencode/commands/ws-plan.md +1 -1
- package/templates/workspace/.opencode/scripts/ws-plan-setup-worktree.sh +2 -2
- package/templates/workspace/.opencode/skills/p-aiws-change-start/SKILL.md +3 -5
- package/templates/workspace/.opencode/skills/ws-bugfix/SKILL.md +5 -5
- package/templates/workspace/.opencode/skills/ws-dev/SKILL.md +1 -1
- package/templates/workspace/.opencode/skills/ws-plan/SKILL.md +1 -1
package/package.json
CHANGED
|
@@ -13,8 +13,8 @@ description: 缺陷修复:禅道 MCP 拉单、图片证据落盘并汇总 fix_
|
|
|
13
13
|
1) 先运行 `/ws-preflight`。
|
|
14
14
|
2) 若当前不在 `change/<change-id>` 分支 / worktree,先建立 change 上下文:
|
|
15
15
|
- 工作区先保持干净
|
|
16
|
-
- 仓库已有提交:优先 `aiws change start <change-id> --hooks --
|
|
17
|
-
- superproject + submodule:优先 `aiws change start <change-id> --hooks --
|
|
16
|
+
- 仓库已有提交:优先 `aiws change start <change-id> --hooks --switch`
|
|
17
|
+
- superproject + submodule:优先 `aiws change start <change-id> --hooks --switch`
|
|
18
18
|
- 仓库尚无提交 / 不满足 worktree 前置条件:回退 `aiws change start <change-id> --hooks --no-switch`
|
|
19
19
|
3) 若上一步创建了 worktree:后续 bug 证据、CSV 更新、`/ws-dev` 修复都必须在该 worktree 中继续。
|
|
20
20
|
4) 通过已配置 zentao MCP 拉取 bug 字段与附件列表。
|
|
@@ -14,11 +14,11 @@ description: 开发:在 AIWS 约束下完成小步交付
|
|
|
14
14
|
2) 建立变更归因(推荐):
|
|
15
15
|
- ⚠️ 若准备切分支/创建 worktree,先看 `git status --porcelain`;否则切换上下文后,未提交改动可能“看起来丢了”。
|
|
16
16
|
- 若当前目录已经是 `change/<change-id>` worktree(例如由 `/ws-plan` 创建):直接在这里继续,不要再创建第二个 worktree,也不要回原工作区写代码。
|
|
17
|
-
- 若非空仅因为 `/ws-plan` 生成了 `plan/...` 或 `changes/<change-id>/...`,这是预期行为;此时优先 `aiws change start <change-id> --hooks --no-switch`,若仍要 `--switch
|
|
17
|
+
- 若非空仅因为 `/ws-plan` 生成了 `plan/...` 或 `changes/<change-id>/...`,这是预期行为;此时优先 `aiws change start <change-id> --hooks --no-switch`,若仍要 `--switch`,先提交这些规划工件。
|
|
18
18
|
- 推荐更安全(默认):`aiws change start <change-id> --hooks --no-switch`(只创建分支/工件 + 启用 hooks;不切分支)
|
|
19
19
|
- 准备进入实现时:若当前已在 `change/<change-id>` 直接继续;若需切换到该分支,先确认除规划工件外无额外未提交改动,再执行:`git switch change/<change-id>`
|
|
20
20
|
- 若你明确要“一键切分支”(不推荐,且 dirty 会被拦截):`aiws change start <change-id> --hooks --switch`
|
|
21
|
-
- superproject + submodule(推荐):`aiws change start <change-id> --hooks --
|
|
21
|
+
- superproject + submodule(推荐):`aiws change start <change-id> --hooks --switch`
|
|
22
22
|
- 若后续需要在 detached submodule 内提交:先挂到 `aiws/pin/<target-branch>`;不要直接切 `change/<change-id>` / `main` / `master`
|
|
23
23
|
- 或手工:`git switch -c change/<change-id>`,并创建 `changes/<change-id>/proposal.md` 与 `changes/<change-id>/tasks.md`(参考 `changes/README.md`)
|
|
24
24
|
3) 如涉及需求调整:先 `/ws-req-review` → 用户确认后再 `/ws-req-change`(避免需求漂移)。
|
|
@@ -14,7 +14,7 @@ description: 规划:生成可落盘 plan 工件
|
|
|
14
14
|
- 若检测到 `.opencode/oh-my-opencode.json` 或当前会话明确可用 `planner-sisyphus` / `explore` / `librarian`:优先按 `packages/spec/docs/opencode-omo-adapter.md` 借用这些 agent。
|
|
15
15
|
- 计划主框架优先 `planner-sisyphus`;结构探索优先 `@explore`;规范/文档查证优先 `@librarian`。
|
|
16
16
|
2) 若当前不在 `change/<change-id>` 分支 / worktree,先调用 `aiws change start <change-id>` 建立上下文:
|
|
17
|
-
- 仓库已有提交:优先 `aiws change start <change-id> --hooks --
|
|
17
|
+
- 仓库已有提交:优先 `aiws change start <change-id> --hooks --switch`
|
|
18
18
|
- 仓库尚无提交 / 不满足 worktree 前置条件:回退 `aiws change start <change-id> --hooks --no-switch`
|
|
19
19
|
3) 若上一步创建了 worktree:切到输出的 `worktree:` 路径,后续所有计划文件都写在该 worktree 中。
|
|
20
20
|
4) 生成或更新计划文件:`plan/YYYY-MM-DD_HH-MM-SS-<slug>.md`。
|
|
@@ -13,8 +13,8 @@ description: 缺陷修复:禅道 MCP 拉单、图片证据落盘并汇总 fix_
|
|
|
13
13
|
1) 先运行 `/ws-preflight`。
|
|
14
14
|
2) 若当前不在 `change/<change-id>` 分支 / worktree,先建立 change 上下文:
|
|
15
15
|
- 工作区先保持干净
|
|
16
|
-
- 仓库已有提交:优先 `aiws change start <change-id> --hooks --
|
|
17
|
-
- superproject + submodule:优先 `aiws change start <change-id> --hooks --
|
|
16
|
+
- 仓库已有提交:优先 `aiws change start <change-id> --hooks --switch`
|
|
17
|
+
- superproject + submodule:优先 `aiws change start <change-id> --hooks --switch`
|
|
18
18
|
- 仓库尚无提交 / 不满足 worktree 前置条件:回退 `aiws change start <change-id> --hooks --no-switch`
|
|
19
19
|
3) 若上一步创建了 worktree:后续 bug 证据、CSV 更新、`/ws-dev` 修复都必须在该 worktree 中继续。
|
|
20
20
|
4) 通过已配置 zentao MCP 拉取 bug 字段与附件列表。
|
|
@@ -14,11 +14,11 @@ description: 开发:在 AIWS 约束下完成小步交付
|
|
|
14
14
|
2) 建立变更归因(推荐):
|
|
15
15
|
- ⚠️ 若准备切分支/创建 worktree,先看 `git status --porcelain`;否则切换上下文后,未提交改动可能“看起来丢了”。
|
|
16
16
|
- 若当前目录已经是 `change/<change-id>` worktree(例如由 `/ws-plan` 创建):直接在这里继续,不要再创建第二个 worktree,也不要回原工作区写代码。
|
|
17
|
-
- 若非空仅因为 `/ws-plan` 生成了 `plan/...` 或 `changes/<change-id>/...`,这是预期行为;此时优先 `aiws change start <change-id> --hooks --no-switch`,若仍要 `--switch
|
|
17
|
+
- 若非空仅因为 `/ws-plan` 生成了 `plan/...` 或 `changes/<change-id>/...`,这是预期行为;此时优先 `aiws change start <change-id> --hooks --no-switch`,若仍要 `--switch`,先提交这些规划工件。
|
|
18
18
|
- 推荐更安全(默认):`aiws change start <change-id> --hooks --no-switch`(只创建分支/工件 + 启用 hooks;不切分支)
|
|
19
19
|
- 准备进入实现时:若当前已在 `change/<change-id>` 直接继续;若需切换到该分支,先确认除规划工件外无额外未提交改动,再执行:`git switch change/<change-id>`
|
|
20
20
|
- 若你明确要“一键切分支”(不推荐,且 dirty 会被拦截):`aiws change start <change-id> --hooks --switch`
|
|
21
|
-
- superproject + submodule(推荐):`aiws change start <change-id> --hooks --
|
|
21
|
+
- superproject + submodule(推荐):`aiws change start <change-id> --hooks --switch`
|
|
22
22
|
- 若后续需要在 detached submodule 内提交:先挂到 `aiws/pin/<target-branch>`;不要直接切 `change/<change-id>` / `main` / `master`
|
|
23
23
|
- 或手工:`git switch -c change/<change-id>`,并创建 `changes/<change-id>/proposal.md` 与 `changes/<change-id>/tasks.md`(参考 `changes/README.md`)
|
|
24
24
|
3) 如涉及需求调整:先 `/ws-req-review` → 用户确认后再 `/ws-req-change`(避免需求漂移)。
|
|
@@ -14,7 +14,7 @@ description: 规划:生成可落盘 plan 工件
|
|
|
14
14
|
- 若检测到 `.opencode/oh-my-opencode.json` 或当前会话明确可用 `planner-sisyphus` / `explore` / `librarian`:优先按 `packages/spec/docs/opencode-omo-adapter.md` 借用这些 agent。
|
|
15
15
|
- 计划主框架优先 `planner-sisyphus`;结构探索优先 `@explore`;规范/文档查证优先 `@librarian`。
|
|
16
16
|
2) 若当前不在 `change/<change-id>` 分支 / worktree,先调用 `aiws change start <change-id>` 建立上下文:
|
|
17
|
-
- 仓库已有提交:优先 `aiws change start <change-id> --hooks --
|
|
17
|
+
- 仓库已有提交:优先 `aiws change start <change-id> --hooks --switch`
|
|
18
18
|
- 仓库尚无提交 / 不满足 worktree 前置条件:回退 `aiws change start <change-id> --hooks --no-switch`
|
|
19
19
|
3) 若上一步创建了 worktree:切到输出的 `worktree:` 路径,后续所有计划文件都写在该 worktree 中。
|
|
20
20
|
4) 生成或更新计划文件:`plan/YYYY-MM-DD_HH-MM-SS-<slug>.md`。
|
|
@@ -22,9 +22,9 @@ fi
|
|
|
22
22
|
|
|
23
23
|
if [[ "${has_commits}" -eq 1 ]]; then
|
|
24
24
|
if [[ "${has_submodules}" -eq 1 ]]; then
|
|
25
|
-
aiws change start "${change_id}" --hooks --
|
|
25
|
+
aiws change start "${change_id}" --hooks --switch
|
|
26
26
|
else
|
|
27
|
-
aiws change start "${change_id}" --hooks --
|
|
27
|
+
aiws change start "${change_id}" --hooks --switch
|
|
28
28
|
fi
|
|
29
29
|
else
|
|
30
30
|
aiws change start "${change_id}" --hooks --no-switch
|
|
@@ -5,7 +5,7 @@ description: 私有:切分支并初始化变更工件(可选安装 hooks)
|
|
|
5
5
|
|
|
6
6
|
目标:
|
|
7
7
|
- 切到分支 `change/<change-id>` 并初始化 `.aiws/changes/<change-id>/` 工件
|
|
8
|
-
- 若检测到 `.gitmodules`(git submodules
|
|
8
|
+
- 若检测到 `.gitmodules`(git submodules),默认使用 `--no-switch` 避免切走 superproject 分支导致 submodule 状态混乱;传 `--switch` 可强制切换
|
|
9
9
|
|
|
10
10
|
要求:
|
|
11
11
|
- 需要 git 仓库;若不是 git 仓库先 `git init`
|
|
@@ -26,8 +26,6 @@ fi
|
|
|
26
26
|
- `--hooks`:同时执行 `aiws hooks install .`
|
|
27
27
|
- `--title <title>`:写入标题
|
|
28
28
|
- `--no-design`:不生成 design.md
|
|
29
|
-
- `--switch
|
|
29
|
+
- `--switch`:显式切换 superproject 分支(默认存在 `.gitmodules` 时不切换,传此参数强制切换)
|
|
30
30
|
- `--no-switch`:不切换当前分支(仅确保 `change/<change-id>` 分支存在并初始化工件);适用于 superproject + submodule 场景
|
|
31
|
-
- `--
|
|
32
|
-
- `--worktree-dir <path>`:覆盖 worktree 目录
|
|
33
|
-
- `--submodules`:在 worktree 内执行 `git submodule update --init --recursive`
|
|
31
|
+
- `--allow-dirty`:允许 dirty 工作区执行 start(不推荐)
|
|
@@ -24,11 +24,11 @@ description: 使用时机:从禅道/外部系统拉取 bug 进行修复时。
|
|
|
24
24
|
echo "error: dirty before ws-bugfix"; exit 2
|
|
25
25
|
fi
|
|
26
26
|
if git rev-parse --verify HEAD >/dev/null 2>&1; then
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
if [[ -f .gitmodules ]] && git config --file .gitmodules --get-regexp '^submodule\..*\.path$' >/dev/null 2>&1; then
|
|
28
|
+
aiws change start <change-id> --hooks --switch
|
|
29
|
+
else
|
|
30
|
+
aiws change start <change-id> --hooks --switch
|
|
31
|
+
fi
|
|
32
32
|
else
|
|
33
33
|
aiws change start <change-id> --hooks --no-switch
|
|
34
34
|
fi
|
|
@@ -62,7 +62,7 @@ description: 使用时机:需要修改代码、配置、测试时。触发词
|
|
|
62
62
|
- `git status --porcelain` 仅有计划/工件文件 → 继续
|
|
63
63
|
- 创建新 change:`aiws change start <change-id> --hooks --no-switch`
|
|
64
64
|
- 切换分支:先确认无未提交改动,再 `git switch change/<change-id>`
|
|
65
|
-
- 有 submodule:准备好 `submodules.targets
|
|
65
|
+
- 有 submodule:准备好 `submodules.targets`(`aiws change start` 自动检测 `.gitmodules`)
|
|
66
66
|
|
|
67
67
|
### 3. 实现策略:默认 dispatch aiws-worker(Subagent-First)
|
|
68
68
|
|
|
@@ -105,6 +105,6 @@ oMo 回退:
|
|
|
105
105
|
输出要求:
|
|
106
106
|
- `Plan file:` <实际写入的路径>
|
|
107
107
|
- `Change context:` <当前 change 分支或 worktree 路径;若新建了 worktree 需明确写出>
|
|
108
|
-
- `Next:` 推荐下一步(先 `$ws-plan-verify`,通过后再 `$ws-dev`;或 `aiws change start <change-id> --hooks`,superproject + submodule 可用 `--
|
|
108
|
+
- `Next:` 推荐下一步(先 `$ws-plan-verify`,通过后再 `$ws-dev`;或 `aiws change start <change-id> --hooks`,superproject + submodule 可用 `--switch`)
|
|
109
109
|
|
|
110
110
|
> 运行时行为约束:`packages/spec/docs/run-behavior-guidelines.md`
|