@aipper/aiws-spec 0.0.3 → 0.0.4

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.
@@ -231,6 +231,7 @@
231
231
  - 若 `changes/<change-id>/` 不存在:等价执行 `aiws change new ...`。
232
232
  - 可选:`--hooks` 等价于 `aiws hooks install .`。
233
233
  - 可选:`--switch` 显式允许切换 superproject 分支(仅在存在 `.gitmodules` 时有意义;否则等价于默认行为)。
234
+ - 实现细节:当存在 `.gitmodules` 且使用 `--switch` 时,CLI 会尝试使用 `git switch/checkout --recurse-submodules` 让 submodules 工作区跟随 superproject 指针;若 git 不支持该选项,会降级为普通切分支并提示手工更新 submodules。
234
235
  - 可选:`--no-switch` 不切换当前分支(仅确保目标分支存在,并初始化变更工件);适用于 superproject + submodule 场景,避免意外切换 A 目录分支导致 submodule 状态混乱。
235
236
  - 可选:`--worktree` 使用 `git worktree` 创建一个独立工作区并在其中 checkout `change/<change-id>`,当前目录分支保持不变(推荐用于 superproject + submodule)。
236
237
  - 默认 worktree 目录:`../<repo-name>-<change-id>`(相对于 git root)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aipper/aiws-spec",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "AIWS spec and templates (single source of truth).",
5
5
  "type": "module",
6
6
  "files": [
@@ -13,6 +13,7 @@ description: 开发(按需求实现并验证;适用于任何需要修改代
13
13
  2) 建立变更归因(推荐):
14
14
  - 推荐一键:`aiws change start <change-id> --hooks`(切分支 + 初始化变更工件 + 启用 hooks)
15
15
  - superproject + submodule(推荐):`aiws change start <change-id> --hooks --worktree --submodules`(创建独立 worktree;当前目录分支保持不变)
16
+ - 若你明确要在 superproject 直接切分支:`aiws change start <change-id> --hooks --switch`(仅在存在 `.gitmodules` 时有意义;会尝试让 submodules 工作区跟随 superproject 指针)
16
17
  - 或手工:`git switch -c change/<change-id>`,并创建 `changes/<change-id>/proposal.md` 与 `changes/<change-id>/tasks.md`(参考 `changes/README.md`)
17
18
  3) 如涉及需求调整:先做需求评审(可用 `$ws-req-review`)→ 用户确认后再做需求落盘(可用 `$ws-req-change`)(避免需求漂移)。
18
19
  4) 实施最小改动:任何改动都要能归因到 `REQUIREMENTS.md`(验收)或 `issues/problem-issues.csv`(问题)。