@aipper/aiws-spec 0.0.21 → 0.0.24

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.
Files changed (89) hide show
  1. package/docs/spec-contract.md +5 -4
  2. package/package.json +1 -1
  3. package/templates/workspace/.agents/skills/{aiws-change-archive → p-aiws-change-archive}/SKILL.md +3 -2
  4. package/templates/workspace/.agents/skills/{aiws-change-finish → p-aiws-change-finish}/SKILL.md +2 -2
  5. package/templates/workspace/.agents/skills/{aiws-change-list → p-aiws-change-list}/SKILL.md +2 -2
  6. package/templates/workspace/.agents/skills/{aiws-change-new → p-aiws-change-new}/SKILL.md +2 -2
  7. package/templates/workspace/.agents/skills/{aiws-change-next → p-aiws-change-next}/SKILL.md +2 -2
  8. package/templates/workspace/.agents/skills/{aiws-change-start → p-aiws-change-start}/SKILL.md +2 -2
  9. package/templates/workspace/.agents/skills/{aiws-change-status → p-aiws-change-status}/SKILL.md +2 -2
  10. package/templates/workspace/.agents/skills/{aiws-change-sync → p-aiws-change-sync}/SKILL.md +2 -2
  11. package/templates/workspace/.agents/skills/{aiws-change-templates-init → p-aiws-change-templates-init}/SKILL.md +2 -2
  12. package/templates/workspace/.agents/skills/{aiws-change-templates-which → p-aiws-change-templates-which}/SKILL.md +2 -2
  13. package/templates/workspace/.agents/skills/{aiws-change-validate → p-aiws-change-validate}/SKILL.md +2 -2
  14. package/templates/workspace/.agents/skills/{aiws-hooks-install → p-aiws-hooks-install}/SKILL.md +2 -2
  15. package/templates/workspace/.agents/skills/{aiws-hooks-status → p-aiws-hooks-status}/SKILL.md +2 -2
  16. package/templates/workspace/.agents/skills/{aiws-init → p-aiws-init}/SKILL.md +2 -2
  17. package/templates/workspace/.agents/skills/{aiws-rollback → p-aiws-rollback}/SKILL.md +2 -2
  18. package/templates/workspace/.agents/skills/{aiws-update → p-aiws-update}/SKILL.md +2 -2
  19. package/templates/workspace/.agents/skills/{aiws-validate → p-aiws-validate}/SKILL.md +2 -2
  20. package/templates/workspace/.agents/skills/p-tasks-plan/SKILL.md +37 -0
  21. package/templates/workspace/.agents/skills/ws-bugfix/SKILL.md +30 -7
  22. package/templates/workspace/.agents/skills/ws-commit/SKILL.md +23 -6
  23. package/templates/workspace/.agents/skills/ws-deliver/SKILL.md +61 -17
  24. package/templates/workspace/.agents/skills/ws-dev/SKILL.md +102 -2
  25. package/templates/workspace/.agents/skills/ws-finish/SKILL.md +96 -65
  26. package/templates/workspace/.agents/skills/ws-handoff/SKILL.md +31 -0
  27. package/templates/workspace/.agents/skills/ws-plan/SKILL.md +68 -1
  28. package/templates/workspace/.agents/skills/ws-push/SKILL.md +17 -12
  29. package/templates/workspace/.claude/commands/{aiws-change-archive.md → p-aiws-change-archive.md} +3 -1
  30. package/templates/workspace/.claude/commands/{aiws-change-finish.md → p-aiws-change-finish.md} +2 -0
  31. package/templates/workspace/.claude/commands/{aiws-change-list.md → p-aiws-change-list.md} +2 -0
  32. package/templates/workspace/.claude/commands/{aiws-change-new.md → p-aiws-change-new.md} +2 -0
  33. package/templates/workspace/.claude/commands/{aiws-change-next.md → p-aiws-change-next.md} +2 -0
  34. package/templates/workspace/.claude/commands/{aiws-change-start.md → p-aiws-change-start.md} +2 -0
  35. package/templates/workspace/.claude/commands/{aiws-change-status.md → p-aiws-change-status.md} +2 -0
  36. package/templates/workspace/.claude/commands/{aiws-change-sync.md → p-aiws-change-sync.md} +2 -0
  37. package/templates/workspace/.claude/commands/{aiws-change-templates-init.md → p-aiws-change-templates-init.md} +2 -0
  38. package/templates/workspace/.claude/commands/{aiws-change-templates-which.md → p-aiws-change-templates-which.md} +2 -0
  39. package/templates/workspace/.claude/commands/{aiws-change-validate.md → p-aiws-change-validate.md} +2 -0
  40. package/templates/workspace/.claude/commands/{aiws-hooks-install.md → p-aiws-hooks-install.md} +2 -0
  41. package/templates/workspace/.claude/commands/{aiws-hooks-status.md → p-aiws-hooks-status.md} +2 -0
  42. package/templates/workspace/.claude/commands/{aiws-init.md → p-aiws-init.md} +2 -1
  43. package/templates/workspace/.claude/commands/{aiws-rollback.md → p-aiws-rollback.md} +2 -1
  44. package/templates/workspace/.claude/commands/{aiws-update.md → p-aiws-update.md} +2 -1
  45. package/templates/workspace/.claude/commands/{aiws-validate.md → p-aiws-validate.md} +2 -1
  46. package/templates/workspace/.claude/commands/ws-bugfix.md +11 -6
  47. package/templates/workspace/.claude/commands/ws-commit.md +2 -1
  48. package/templates/workspace/.claude/commands/ws-deliver.md +6 -2
  49. package/templates/workspace/.claude/commands/ws-dev.md +7 -1
  50. package/templates/workspace/.claude/commands/ws-finish.md +19 -19
  51. package/templates/workspace/.claude/commands/ws-handoff.md +22 -0
  52. package/templates/workspace/.claude/commands/ws-plan.md +9 -5
  53. package/templates/workspace/.codex/prompts/ws-dev.md +5 -1
  54. package/templates/workspace/.githooks/commit-msg +109 -0
  55. package/templates/workspace/.iflow/commands/ws-commit.toml +2 -1
  56. package/templates/workspace/.iflow/commands/ws-deliver.toml +6 -2
  57. package/templates/workspace/.iflow/commands/ws-finish.toml +19 -19
  58. package/templates/workspace/.opencode/command/{aiws-change-archive.md → p-aiws-change-archive.md} +4 -2
  59. package/templates/workspace/.opencode/command/{aiws-change-finish.md → p-aiws-change-finish.md} +3 -1
  60. package/templates/workspace/.opencode/command/{aiws-change-list.md → p-aiws-change-list.md} +3 -1
  61. package/templates/workspace/.opencode/command/{aiws-change-new.md → p-aiws-change-new.md} +3 -1
  62. package/templates/workspace/.opencode/command/{aiws-change-next.md → p-aiws-change-next.md} +3 -1
  63. package/templates/workspace/.opencode/command/{aiws-change-start.md → p-aiws-change-start.md} +3 -1
  64. package/templates/workspace/.opencode/command/{aiws-change-status.md → p-aiws-change-status.md} +3 -1
  65. package/templates/workspace/.opencode/command/{aiws-change-sync.md → p-aiws-change-sync.md} +3 -1
  66. package/templates/workspace/.opencode/command/{aiws-change-templates-init.md → p-aiws-change-templates-init.md} +3 -1
  67. package/templates/workspace/.opencode/command/{aiws-change-templates-which.md → p-aiws-change-templates-which.md} +3 -1
  68. package/templates/workspace/.opencode/command/{aiws-change-validate.md → p-aiws-change-validate.md} +3 -1
  69. package/templates/workspace/.opencode/command/{aiws-hooks-install.md → p-aiws-hooks-install.md} +3 -1
  70. package/templates/workspace/.opencode/command/{aiws-hooks-status.md → p-aiws-hooks-status.md} +3 -1
  71. package/templates/workspace/.opencode/command/{aiws-init.md → p-aiws-init.md} +3 -1
  72. package/templates/workspace/.opencode/command/{aiws-rollback.md → p-aiws-rollback.md} +3 -1
  73. package/templates/workspace/.opencode/command/{aiws-update.md → p-aiws-update.md} +3 -1
  74. package/templates/workspace/.opencode/command/{aiws-validate.md → p-aiws-validate.md} +3 -1
  75. package/templates/workspace/.opencode/command/ws-bugfix.md +11 -6
  76. package/templates/workspace/.opencode/command/ws-commit.md +3 -2
  77. package/templates/workspace/.opencode/command/ws-deliver.md +6 -2
  78. package/templates/workspace/.opencode/command/ws-dev.md +7 -1
  79. package/templates/workspace/.opencode/command/ws-finish.md +19 -19
  80. package/templates/workspace/.opencode/command/ws-handoff.md +25 -0
  81. package/templates/workspace/.opencode/command/ws-plan.md +9 -5
  82. package/templates/workspace/.opencode/command/ws-review.md +1 -1
  83. package/templates/workspace/AGENTS.md +8 -4
  84. package/templates/workspace/AI_WORKSPACE.md +4 -4
  85. package/templates/workspace/changes/README.md +8 -2
  86. package/templates/workspace/manifest.json +173 -103
  87. package/templates/workspace/tools/ws_change_check.py +99 -0
  88. package/templates/workspace/tools/ws_resolve_sub_target.sh +47 -0
  89. package/templates/workspace/tools/ws_tasks_plan.py +137 -0
@@ -11,6 +11,7 @@
11
11
  - 不使用 `--no-verify` 绕过 hooks
12
12
  - 不自动 push
13
13
  - 不打印 secrets
14
+ - commit message 优先使用中文;若启用了 `.githooks/commit-msg`,默认仅提示,只有 strict 模式才会拒绝全英文首行(`Merge/Revert/fixup!/squash!` 例外)
14
15
 
15
16
  步骤(建议):
16
17
  1) 先运行 `/ws-preflight`。
@@ -51,7 +52,7 @@ git status --porcelain
51
52
  git diff --staged --submodule=short
52
53
  ```
53
54
  7) 若没有 staged changes:停止并提示用户先明确要提交哪些文件(例如 `git add -p` 或 `git add <path>`)。
54
- 8) 让用户提供 commit message(必须确认后再执行)。
55
+ 8) 优先生成并确认中文 commit message(格式建议:`<类型>: <简述>`;若用户明确要求英文也可保留,但 strict 模式下会被 hook 拒绝)。
55
56
  9) 执行提交(不带 `--no-verify`):
56
57
  ```bash
57
58
  git commit -m "<message>"
@@ -3,7 +3,7 @@
3
3
 
4
4
  用中文输出(命令/路径/代码标识符保持原样不翻译)。
5
5
 
6
- 目标:适配 superproject + submodule(数量不固定)的交付收尾,降低“提交顺序/合并回 base 分支”出错概率:
6
+ 目标:适配 superproject + submodule(数量不固定)的交付收尾,降低提交顺序和合并回 base 分支的出错概率:
7
7
  1) 先逐个提交 submodule(每个 repo 单独确认 commit message;默认 `git add -p`)
8
8
  2) 再提交 superproject(包含 submodule gitlink 指针更新 + 自身改动/变更工件)
9
9
  3) 最后 fast-forward 合并回目标分支(复用 `aiws change finish`;建议用 `/ws-finish`)
@@ -16,11 +16,15 @@
16
16
  建议流程(按顺序):
17
17
  1) 先运行 `/ws-preflight`。
18
18
  2) 如果存在 `.gitmodules` 但缺少 `submodule.<name>.branch`,先运行 `/ws-submodule-setup` 并提交 `.gitmodules`(否则 `aiws validate .` 会失败,且 submodule 工作流会产生人为差异)。
19
+ 2.1) 若存在 submodule:必须准备 `changes/<change-id>/submodules.targets`,并覆盖所有 submodule path;这是本次交付的目标分支真值。
20
+ - 生成该文件时可先做默认预填:detached HEAD 默认建议取 `.gitmodules` 声明分支;已附着在本地分支时默认建议取当前分支。
21
+ - 上述都只是建议值;真正的 deliver/finish 只认 `submodules.targets`。
19
22
  2) 发现 submodules:
20
23
  - `git submodule status --recursive`
21
24
  3) 逐个提交 submodules(按上一步顺序):
22
25
  - `git -C "<sub_path>" status --porcelain`
23
- - 若当前为 detached HEAD:不要直接切 `change/<change-id>` / `main` / `master`;先按 `.gitmodules` 的目标分支挂到 `aiws/pin/<target-branch>`
26
+ - 先说明该 submodule 目标分支的来源:attached branch 默认建议取当前分支;detached HEAD 默认建议取 `.gitmodules`;若与 `submodules.targets` 已落盘值冲突,则以 `submodules.targets` 为准
27
+ - 若当前为 detached HEAD:不要直接切 `change/<change-id>` / `main` / `master`;先按 `submodules.targets`(若分支为 `.` 则展开为 `.ws-change.json` 的 `base_branch`)挂到 `aiws/pin/<target-branch>`
24
28
  - `git -C "<sub_path>" add -p`
25
29
  - `git -C "<sub_path>" diff --staged --stat`
26
30
  - 生成并让用户确认该 submodule 的 commit message(每个 repo 单独确认)
@@ -7,8 +7,14 @@
7
7
 
8
8
  建议流程:
9
9
  1) 先运行 `/ws-preflight`(读真值文件并输出约束摘要)。
10
+ - 若 `/ws-plan` 刚创建了 `change/<change-id>` worktree:后续实现必须在该 worktree 中继续;不要回原工作区重复 `aiws change start ...`
10
11
  2) 建立变更归因(推荐):
11
- - 推荐一键:`aiws change start <change-id> --hooks`
12
+ - ⚠️ 若准备切分支/创建 worktree,先看 `git status --porcelain`;否则切换上下文后,未提交改动可能“看起来丢了”。
13
+ - 若当前目录已经是 `change/<change-id>` worktree(例如由 `/ws-plan` 创建):直接在这里继续,不要再创建第二个 worktree,也不要回原工作区写代码。
14
+ - 若非空仅因为 `/ws-plan` 生成了 `plan/...` 或 `changes/<change-id>/...`,这是预期行为;此时优先 `aiws change start <change-id> --hooks --no-switch`,若仍要 `--switch/--worktree`,先提交这些规划工件。
15
+ - 推荐更安全(默认):`aiws change start <change-id> --hooks --no-switch`(只创建分支/工件 + 启用 hooks;不切分支)
16
+ - 准备进入实现时:若当前已在 `change/<change-id>` 直接继续;若需切换到该分支,先确认除规划工件外无额外未提交改动,再执行:`git switch change/<change-id>`
17
+ - 若你明确要“一键切分支”(不推荐,且 dirty 会被拦截):`aiws change start <change-id> --hooks --switch`
12
18
  - superproject + submodule(推荐):`aiws change start <change-id> --hooks --worktree --submodules`
13
19
  - 若后续需要在 detached submodule 内提交:先挂到 `aiws/pin/<target-branch>`;不要直接切 `change/<change-id>` / `main` / `master`
14
20
  - 或手工:`git switch -c change/<change-id>`,并创建 `changes/<change-id>/proposal.md` 与 `changes/<change-id>/tasks.md`(参考 `changes/README.md`)
@@ -34,34 +34,34 @@ fi
34
34
  2) (推荐)门禁校验并落盘证据:`aiws validate . --stamp`(未安装全局 aiws 时可用 `npx @aipper/aiws validate . --stamp`)。
35
35
  2.1) (强烈建议)收敛持久证据并回填 `Evidence_Path`:`aiws change evidence <change-id>`(未安装全局 aiws 时可用 `npx @aipper/aiws change evidence <change-id>`)。
36
36
  2.2) (可选)生成状态快照(建议):`aiws change state <change-id> --write`。
37
- 3) 安全合并并切回目标分支:
38
- - 若当前就在 `change/<change-id>` 分支上,可直接执行:`aiws change finish`
39
- - 否则执行:`aiws change finish <change-id>`
40
- 4) 若提示无法 fast-forward:先在 change 分支(或对应 worktree)里 `git rebase <target-branch>`,再重试 `aiws change finish`。
41
- 5) 合并成功后,按顺序处理每个 submodule(减少 detached;再 push):
37
+ 3) 若不存在 `.gitmodules`,或 submodules 已按顺序处理完成,优先直接执行最小收尾闭环:
38
+ - `aiws change finish <change-id> --push`
39
+ - 若当前就在 `change/<change-id>` 分支上,也可省略 `<change-id>`
40
+ - 该命令会在 fast-forward 合并成功后 push 目标分支;默认优先使用 upstream 配置(`branch.<name>.remote` + `branch.<name>.merge`),只有在你明确知道要推向别的 remote 时才追加 `--remote <name>`
41
+ - `change/<change-id>` 位于独立 worktree,且该 worktree 干净,则会在 push 成功后自动执行 `git worktree remove` + `git worktree prune`
42
+ - AI 入口执行前,应先向用户说明将要 push 的 remote/branch;显式传入 `--push` 即视为确认
43
+ 4) 若提示无法 fast-forward:先在 change 分支(或对应 worktree)里 `git rebase <target-branch>`,再重试 `aiws change finish --push`。
44
+ 5) 若需要先处理 submodules,则按顺序处理每个 submodule(减少 detached;再 push):
45
+ - 先显式解析 base branch,不要用当前分支名替代:
46
+ - `python3 - <<'PY'`
47
+ - `import json, pathlib; meta = pathlib.Path("changes") / "<change-id>" / ".ws-change.json"; print((json.loads(meta.read_text(encoding="utf-8")).get("base_branch") or "").strip())`
48
+ - `PY`
42
49
  - 发现 submodules:`git config --file .gitmodules --get-regexp '^submodule\\..*\\.path$'`
43
50
  - 对每个 `<sub_path>`:
44
51
  - 读取 superproject 当前 gitlink:`git rev-parse "HEAD:<sub_path>"`
45
- - 目标分支:必须在 `.gitmodules` 配置 `submodule.<name>.branch`(若为 `.` 则用当前主仓库分支;避免 origin 多分支时误判)
46
- - 不要直接切 `change/<change-id>` / `main` / `master` 来“解 detached”
52
+ - 目标分支真值:`changes/<change-id>/submodules.targets`;若条目里分支写 `.`,则展开为刚才解析出的 `base_branch`
53
+ - 生成/检查 `submodules.targets` 时,detached HEAD 默认建议取 `.gitmodules` `submodule.<name>.branch`;已附着在本地分支时默认建议取当前分支;这些都只是预填建议,不是 finish/push 的运行时真值
54
+ - 不要直接切 `change/<change-id>` / `main` / `master` 来解 detached
47
55
  - 用 pin 分支挂回(不改动现有 main/master 指针):`git -C "<sub_path>" checkout -B "aiws/pin/<target-branch>" <gitlink-sha>`
48
56
  - 仅当 `<gitlink-sha>` 属于 `origin/<target-branch>` 历史时才允许 push;否则停止并人工处理分叉
49
57
  - push(只允许 fast-forward):`git -C "<sub_path>" push origin "<gitlink-sha>:refs/heads/<target-branch>"`
50
58
  6) 任一 submodule 不满足 fast-forward 条件时立即停止(不要继续 push 主仓库)。
51
- 7) submodules 全部成功后,再 push 主仓库当前分支:
52
- - `git branch --show-current`
53
- - `git status -sb`
54
- - `git push`
55
- 8) push 成功后,清理 `change/<change-id>` 对应 worktree(若存在且不是当前 worktree):
56
- - `change_ref="refs/heads/change/<change-id>"`
57
- - `main_wt="$(git rev-parse --show-toplevel)"`
58
- - `change_wt="$(git worktree list --porcelain | awk -v ref="$change_ref" '$1=="worktree"{wt=substr($0,10)} $1=="branch"&&$2==ref{print wt; exit}')"`
59
- - 若 `change_wt` 非空且不等于 `main_wt`:先输出并让用户确认,再执行 `git worktree remove "$change_wt"`(不带 `--force`),最后 `git worktree prune`
60
- - 若 `git -C "$change_wt" status --porcelain` 非空:停止并提示先清理该 worktree
61
- 9) (可选)交付完成后归档变更工件:`aiws change archive <change-id>`。
59
+ 7) submodules 全部成功后,再回到主仓库执行:
60
+ - `aiws change finish <change-id> --push`
61
+ 8) (可选)交付完成后归档变更工件:`aiws change archive <change-id>`。
62
62
 
63
63
  安全:
64
- - push 前先输出状态并请用户确认远端/分支。
64
+ - push 前先输出状态并说明远端/分支。
65
65
  - 不执行破坏性命令。
66
66
  <!-- AIWS_MANAGED_END:claude:ws-finish -->
67
67
 
@@ -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 的额外说明(托管块外内容会被保留)。
@@ -4,14 +4,18 @@
4
4
  用中文输出(命令/路径/代码标识符保持原样不翻译)。
5
5
 
6
6
  目标:
7
- - 生成可落盘执行计划(供 /ws-dev 执行)。
7
+ - 若尚未进入本次 change 的工作上下文:先建立 `change/<change-id>` 分支 / worktree,再生成可落盘执行计划(供 /ws-dev 执行)。
8
8
 
9
9
  执行建议:
10
10
  1) 先运行 `/ws-preflight`(对齐 `AI_PROJECT.md` / `REQUIREMENTS.md` / `AI_WORKSPACE.md`)。
11
- 2) 生成或更新计划文件:`plan/YYYY-MM-DD_HH-MM-SS-<slug>.md`。
12
- 3) 计划至少包含:`绑定信息(Bindings)`、`目标(Goal)`、`非目标(Non-goals)`、`范围(Scope)`、`执行计划(Plan)`、`验证(Verify)`、`风险与回滚(Risks & Rollback)`、`证据(Evidence)`。
13
- 4) 若已有 `changes/<change-id>/proposal.md`,对齐 `计划文件(Plan_File)` / `合同行(Contract_Row)` / `证据路径(Evidence_Path)`。
14
- 5) 完成后先运行 `/ws-plan-verify`,通过再进入 `/ws-dev`。
11
+ 2) 若当前不在 `change/<change-id>` 分支 / worktree,先调用 `aiws change start <change-id>` 建立上下文:
12
+ - 仓库已有提交:优先 `aiws change start <change-id> --hooks --worktree`;若声明了 submodules,加 `--submodules`
13
+ - 仓库尚无提交 / 不满足 worktree 前置条件:回退 `aiws change start <change-id> --hooks --no-switch`
14
+ 3) 若上一步创建了 worktree:切到输出的 `worktree:` 路径,后续所有计划文件都写在该 worktree 中。
15
+ 4) 生成或更新计划文件:`plan/YYYY-MM-DD_HH-MM-SS-<slug>.md`。
16
+ 5) 计划至少包含:`绑定信息(Bindings)`、`目标(Goal)`、`非目标(Non-goals)`、`范围(Scope)`、`执行计划(Plan)`、`验证(Verify)`、`风险与回滚(Risks & Rollback)`、`证据(Evidence)`。
17
+ 6) 若已有 `changes/<change-id>/proposal.md`,对齐 `计划文件(Plan_File)` / `合同行(Contract_Row)` / `证据路径(Evidence_Path)`。
18
+ 7) 完成后先运行 `/ws-plan-verify`,通过再进入 `/ws-dev`。
15
19
  <!-- AIWS_MANAGED_END:claude:ws-plan -->
16
20
 
17
21
  可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
@@ -12,8 +12,12 @@ argument-hint: ""
12
12
 
13
13
  建议流程:
14
14
  1) 先运行 `/ws-preflight`(读真值文件并输出约束摘要)。
15
+ - 若 `$ws-plan` 刚创建了 `change/<change-id>` worktree:后续实现必须在该 worktree 中继续;不要回原工作区重复 `aiws change start ...`
15
16
  2) 建立变更归因(推荐):
16
- - 推荐一键:`aiws change start <change-id> --hooks`
17
+ - 若当前目录已经是 `change/<change-id>` worktree(例如由 `$ws-plan` 创建):直接在这里继续,不要再创建第二个 worktree,也不要回原工作区写代码。
18
+ - 若 `/ws-plan` 已生成 `plan/...` 或 `changes/<change-id>/...` 导致工作区非空,这是预期行为;此时不要直接再做 `--switch/--worktree`,优先:`aiws change start <change-id> --hooks --no-switch`,或先提交规划工件。
19
+ - 推荐一键(工作区干净时):`aiws change start <change-id> --hooks`
20
+ - 推荐更安全(默认):`aiws change start <change-id> --hooks --no-switch`
17
21
  - superproject + submodule(推荐):`aiws change start <change-id> --hooks --worktree --submodules`
18
22
  - 若后续需要在 detached submodule 内提交:先挂到 `aiws/pin/<target-branch>`;不要直接切 `change/<change-id>` / `main` / `master`
19
23
  - 或手工:`git switch -c change/<change-id>`,并创建 `changes/<change-id>/proposal.md` 与 `changes/<change-id>/tasks.md`(参考 `changes/README.md`)
@@ -0,0 +1,109 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ if [[ "${WS_CHANGE_HOOK_BYPASS:-0}" == "1" ]]; then
5
+ echo "warn: WS_CHANGE_HOOK_BYPASS=1; skip aiws commit-msg hook" >&2
6
+ exit 0
7
+ fi
8
+
9
+ msg_file="${1:-}"
10
+ [[ -n "${msg_file:-}" && -f "$msg_file" ]] || exit 0
11
+
12
+ policy="${AIWS_COMMIT_MSG_POLICY:-}"
13
+ if [[ -z "${policy:-}" ]]; then
14
+ policy="$(git config --get aiws.commitMessagePolicy 2>/dev/null || true)"
15
+ fi
16
+ policy="${policy:-warn}"
17
+
18
+ case "$policy" in
19
+ off|disabled|0)
20
+ exit 0
21
+ ;;
22
+ warn|prefer-zh)
23
+ policy="warn"
24
+ ;;
25
+ strict|require-zh|1)
26
+ policy="strict"
27
+ ;;
28
+ *)
29
+ echo "warn: unknown aiws commit message policy '${policy}', fallback to warn" >&2
30
+ policy="warn"
31
+ ;;
32
+ esac
33
+
34
+ first_line="$(sed -n '1{s/\r$//;p;q;}' "$msg_file")"
35
+ first_line="${first_line#"${first_line%%[![:space:]]*}"}"
36
+ first_line="${first_line%"${first_line##*[![:space:]]}"}"
37
+
38
+ [[ -n "${first_line:-}" ]] || exit 0
39
+
40
+ case "$first_line" in
41
+ Merge\ *|Revert\ *|fixup!\ *|squash!\ *)
42
+ exit 0
43
+ ;;
44
+ esac
45
+
46
+ has_cjk=1
47
+ if command -v python3 >/dev/null 2>&1; then
48
+ if python3 - "$first_line" <<'PY'
49
+ import re
50
+ import sys
51
+
52
+ line = sys.argv[1].strip()
53
+ sys.exit(0 if re.search(r"[\u3400-\u9fff]", line) else 1)
54
+ PY
55
+ then
56
+ has_cjk=0
57
+ fi
58
+ else
59
+ if printf '%s\n' "$first_line" | grep -q '[一-龥]'; then
60
+ has_cjk=0
61
+ fi
62
+ fi
63
+
64
+ if [[ "$has_cjk" -eq 0 ]]; then
65
+ exit 0
66
+ fi
67
+
68
+ if [[ "$policy" == "warn" ]]; then
69
+ cat >&2 <<'EOF'
70
+ warn: commit message is better in Chinese, but English is still allowed.
71
+
72
+ hint:
73
+ - preferred format: 修复: 登录页空指针
74
+ - or: 功能: 新增 submodule targets 校验
75
+ - if you are in AI tools, prefer: $ws-commit / /ws-commit / ws:commit
76
+ - set strict mode if needed: git config aiws.commitMessagePolicy strict
77
+ - disable this reminder: git config aiws.commitMessagePolicy off
78
+
79
+ allowed exceptions:
80
+ - Merge ...
81
+ - Revert ...
82
+ - fixup! ...
83
+ - squash! ...
84
+ EOF
85
+
86
+ echo "message: ${first_line}" >&2
87
+ exit 0
88
+ fi
89
+
90
+ cat >&2 <<'EOF'
91
+ error: commit message should be in Chinese (strict mode).
92
+
93
+ hint:
94
+ - use format: 修复: 登录页空指针
95
+ - or: 功能: 新增 submodule targets 校验
96
+ - if you are in AI tools, prefer: $ws-commit / /ws-commit / ws:commit
97
+ - downgrade to warn: git config aiws.commitMessagePolicy warn
98
+ - disable only when necessary: git config aiws.commitMessagePolicy off
99
+ - bypass only when necessary: WS_CHANGE_HOOK_BYPASS=1 git commit ...
100
+
101
+ allowed exceptions:
102
+ - Merge ...
103
+ - Revert ...
104
+ - fixup! ...
105
+ - squash! ...
106
+ EOF
107
+
108
+ echo "message: ${first_line}" >&2
109
+ exit 1
@@ -16,6 +16,7 @@ prompt = """
16
16
  - 不使用 `--no-verify` 绕过 hooks
17
17
  - 不自动 push
18
18
  - 不打印 secrets
19
+ - commit message 优先使用中文;若启用了 `.githooks/commit-msg`,默认仅提示,只有 strict 模式才会拒绝全英文首行(`Merge/Revert/fixup!/squash!` 例外)
19
20
 
20
21
  强制步骤:
21
22
  1) 读取真值文件:`AI_PROJECT.md`、`REQUIREMENTS.md`、`AI_WORKSPACE.md`(缺失则先运行 `/aiws-init` 或 `aiws init .`)。
@@ -36,7 +37,7 @@ prompt = """
36
37
  - `git status --porcelain`
37
38
  - `git diff --staged --submodule=short`
38
39
  8) 若没有 staged changes:停止并提示用户先明确要提交哪些文件(例如 `git add -p` 或 `git add <path>`)。
39
- 9) 让用户提供 commit message(必须确认后再执行)。
40
+ 9) 优先生成并确认中文 commit message(格式建议:`<类型>: <简述>`;若用户明确要求英文也可保留,但 strict 模式下会被 hook 拒绝)。
40
41
  10) 执行提交(不带 `--no-verify`):`git commit -m "<message>"`。
41
42
 
42
43
  输出必须包含:
@@ -8,7 +8,7 @@ description = "交付(submodules + superproject 分步提交,并安全合并
8
8
  prompt = """
9
9
  用中文输出(命令/路径/代码标识符保持原样不翻译)。
10
10
 
11
- 目标:适配 superproject + submodule(数量不固定)的交付收尾,降低“提交顺序/合并回 base 分支”出错概率:
11
+ 目标:适配 superproject + submodule(数量不固定)的交付收尾,降低提交顺序和合并回 base 分支的出错概率:
12
12
  1) 先逐个提交 submodule(每个 repo 单独确认 commit message;默认 `git add -p`)
13
13
  2) 再提交 superproject(包含 submodule gitlink 指针更新 + 自身改动/变更工件)
14
14
  3) 最后 fast-forward 合并回目标分支(复用 `aiws change finish`;建议用 `ws:finish`)
@@ -21,11 +21,15 @@ prompt = """
21
21
  建议流程(按顺序):
22
22
  1) 先确认真值文件存在并遵守:`AI_PROJECT.md` / `REQUIREMENTS.md` / `AI_WORKSPACE.md`。
23
23
  2) 如果存在 `.gitmodules` 但缺少 `submodule.<name>.branch`,先运行 `ws:submodule-setup` 并提交 `.gitmodules`(否则 `aiws validate .` 会失败,且 submodule 工作流会产生人为差异)。
24
+ 2.1) 若存在 submodule:必须准备 `changes/<change-id>/submodules.targets`,并覆盖所有 submodule path;这是本次交付的目标分支真值。
25
+ - 生成该文件时可先做默认预填:detached HEAD 默认建议取 `.gitmodules` 声明分支;已附着在本地分支时默认建议取当前分支。
26
+ - 上述都只是建议值;真正的 deliver/finish 只认 `submodules.targets`。
24
27
  2) 发现 submodules:
25
28
  - `git submodule status --recursive`
26
29
  3) 逐个提交 submodules(按上一步顺序):
27
30
  - `git -C "<sub_path>" status --porcelain`
28
- - 若当前为 detached HEAD:不要直接切 `change/<change-id>` / `main` / `master`;先按 `.gitmodules` 的目标分支挂到 `aiws/pin/<target-branch>`
31
+ - 先说明该 submodule 目标分支的来源:attached branch 默认建议取当前分支;detached HEAD 默认建议取 `.gitmodules`;若与 `submodules.targets` 已落盘值冲突,则以 `submodules.targets` 为准
32
+ - 若当前为 detached HEAD:不要直接切 `change/<change-id>` / `main` / `master`;先按 `submodules.targets`(若分支为 `.` 则展开为 `.ws-change.json` 的 `base_branch`)挂到 `aiws/pin/<target-branch>`
29
33
  - `git -C "<sub_path>" add -p`
30
34
  - `git -C "<sub_path>" diff --staged --stat`
31
35
  - 生成并让用户确认该 submodule 的 commit message(每个 repo 单独确认)
@@ -22,33 +22,33 @@ prompt = """
22
22
  5) (推荐)门禁校验并落盘证据:`aiws validate . --stamp`(未安装全局 aiws 时可用 `npx @aipper/aiws validate . --stamp`)。
23
23
  5.1) (强烈建议)收敛持久证据并回填 `Evidence_Path`:`aiws change evidence <change-id>`(未安装全局 aiws 时可用 `npx @aipper/aiws change evidence <change-id>`)。
24
24
  5.2) (可选)生成状态快照(建议):`aiws change state <change-id> --write`。
25
- 6) 安全合并(默认 fast-forward):
26
- - `change/<change-id>` 分支上:`aiws change finish`(会尝试读 `changes/<change-id>/.ws-change.json` `base_branch` 并切回目标分支)
27
- - 否则:`aiws change finish <change-id>`
28
- 7) 若提示无法 fast-forward:先在 change 分支(或对应 worktree)里执行 `git rebase <target-branch>`,再重试 `aiws change finish`。
29
- 8) 合并成功后,按顺序处理每个 submodule(先“并回目标分支”,再 push):
25
+ 6) 若不存在 `.gitmodules`,或 submodules 已按顺序处理完成,优先直接执行最小收尾闭环:
26
+ - `aiws change finish <change-id> --push`
27
+ - `change/<change-id>` 分支上也可省略 `<change-id>`;命令会尝试读取 `changes/<change-id>/.ws-change.json` 的 `base_branch`
28
+ - 该命令会在 fast-forward 合并成功后 push 目标分支;默认优先使用 upstream 配置(`branch.<name>.remote` + `branch.<name>.merge`),只有在你明确知道要推向别的 remote 时才追加 `--remote <name>`
29
+ - `change/<change-id>` 位于独立 worktree,且该 worktree 干净,则会在 push 成功后自动执行 `git worktree remove` + `git worktree prune`
30
+ - AI 入口执行前,应先向用户说明将要 push 的 remote/branch;显式传入 `--push` 即视为确认
31
+ 7) 若提示无法 fast-forward:先在 change 分支(或对应 worktree)里执行 `git rebase <target-branch>`,再重试 `aiws change finish --push`。
32
+ 8) 若需要先处理 submodules,则按顺序处理每个 submodule(先并回目标分支,再 push):
33
+ - 先显式解析 base branch,不要用当前分支名替代:
34
+ - `python3 - <<'PY'`
35
+ - `import json, pathlib; meta = pathlib.Path("changes") / "<change-id>" / ".ws-change.json"; print((json.loads(meta.read_text(encoding="utf-8")).get("base_branch") or "").strip())`
36
+ - `PY`
30
37
  - 发现 submodules:`git config --file .gitmodules --get-regexp '^submodule\\..*\\.path$'`
31
38
  - 对每个 `<sub_path>`:
32
39
  - 读取 superproject 当前 gitlink:`git rev-parse "HEAD:<sub_path>"`
33
- - 目标分支:必须在 `.gitmodules` 配置 `submodule.<name>.branch`(若为 `.` 则用当前主仓库分支;避免 origin 多分支时误判)
34
- - 不要直接切 `change/<change-id>` / `main` / `master` 来“解 detached”
40
+ - 目标分支真值:`changes/<change-id>/submodules.targets`;若条目里分支写 `.`,则展开为刚才解析出的 `base_branch`
41
+ - 生成/检查 `submodules.targets` 时,detached HEAD 默认建议取 `.gitmodules` `submodule.<name>.branch`;已附着在本地分支时默认建议取当前分支;这些都只是预填建议,不是 finish/push 的运行时真值
42
+ - 不要直接切 `change/<change-id>` / `main` / `master` 来解 detached
35
43
  - 用 pin 分支挂回(不改动现有 main/master 指针):`git -C "<sub_path>" checkout -B "aiws/pin/<target-branch>" <gitlink-sha>`
36
44
  - 仅当 `<gitlink-sha>` 属于 `origin/<target-branch>` 历史时才允许 push;否则停止并人工处理分叉
37
45
  - push(只允许 fast-forward):`git -C "<sub_path>" push origin "<gitlink-sha>:refs/heads/<target-branch>"`
38
46
  9) 任一 submodule 不满足 fast-forward 条件时立即停止(不要继续 push 主仓库)。
39
- 10) submodules push 完成后,再 push 主仓库当前分支:
40
- - `git branch --show-current`
41
- - `git status -sb`
42
- - `git push`
43
- 11) push 成功后,清理 `change/<change-id>` 对应 worktree(若存在且不是当前 worktree):
44
- - `change_ref="refs/heads/change/<change-id>"`
45
- - `main_wt="$(git rev-parse --show-toplevel)"`
46
- - `change_wt="$(git worktree list --porcelain | awk -v ref="$change_ref" '$1=="worktree"{wt=substr($0,10)} $1=="branch"&&$2==ref{print wt; exit}')"`
47
- - 若 `change_wt` 非空且不等于 `main_wt`:先输出并让用户确认,再执行 `git worktree remove "$change_wt"`(不带 `--force`),最后 `git worktree prune`
48
- - 若 `git -C "$change_wt" status --porcelain` 非空:停止并提示先清理该 worktree
49
- 12) (可选)交付完成后归档变更工件:`aiws change archive <change-id>`。
47
+ 10) submodules push 完成后,再回到主仓库执行:
48
+ - `aiws change finish <change-id> --push`
49
+ 11) (可选)交付完成后归档变更工件:`aiws change archive <change-id>`。
50
50
 
51
51
  边界:
52
- - push 前先输出状态并请用户确认远端/分支。
52
+ - push 前先输出状态并说明远端/分支。
53
53
  - 不执行破坏性命令。
54
54
  """
@@ -1,13 +1,15 @@
1
1
  ---
2
- description: 变更归档:归档已完成的 change 工件
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
@@ -1,9 +1,11 @@
1
1
  ---
2
- description: 变更收尾:安全合并 change 分支回目标分支
2
+ description: 私有:变更收尾:安全合并 change 分支回目标分支
3
3
  ---
4
4
  <!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-finish -->
5
5
  # aiws change finish
6
6
 
7
+ (私有原子入口;日常优先用 ws-* 链路。)
8
+
7
9
  用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
10
 
9
11
  目标:
@@ -1,9 +1,11 @@
1
1
  ---
2
- description: 变更列表:列出当前仓库 change 工件
2
+ description: 私有:变更列表:列出当前仓库 change 工件
3
3
  ---
4
4
  <!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-list -->
5
5
  # aiws change list
6
6
 
7
+ (私有原子入口;日常优先用 ws-* 链路。)
8
+
7
9
  用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
10
 
9
11
  目标:
@@ -1,9 +1,11 @@
1
1
  ---
2
- description: 变更新建:创建 changes/<change-id> 工件
2
+ description: 私有:变更新建:创建 changes/<change-id> 工件
3
3
  ---
4
4
  <!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-new -->
5
5
  # aiws change new
6
6
 
7
+ (私有原子入口;日常优先用 ws-* 链路。)
8
+
7
9
  用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
10
 
9
11
  目标:
@@ -1,9 +1,11 @@
1
1
  ---
2
- description: 变更下一步:输出当前 change 的建议动作
2
+ description: 私有:变更下一步:输出当前 change 的建议动作
3
3
  ---
4
4
  <!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-next -->
5
5
  # aiws change next
6
6
 
7
+ (私有原子入口;日常优先用 ws-* 链路。)
8
+
7
9
  用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
10
 
9
11
  目标:
@@ -1,9 +1,11 @@
1
1
  ---
2
- description: 变更开始:切到 change/<change-id> 并初始化工件
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: 变更状态:查看 change 状态与阻断项
2
+ description: 私有:变更状态:查看 change 状态与阻断项
3
3
  ---
4
4
  <!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-status -->
5
5
  # aiws change status
6
6
 
7
+ (私有原子入口;日常优先用 ws-* 链路。)
8
+
7
9
  用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
10
 
9
11
  目标:
@@ -1,9 +1,11 @@
1
1
  ---
2
- description: 变更同步:同步 change 与真值基线
2
+ description: 私有:变更同步:同步 change 与真值基线
3
3
  ---
4
4
  <!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-sync -->
5
5
  # aiws change sync
6
6
 
7
+ (私有原子入口;日常优先用 ws-* 链路。)
8
+
7
9
  用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
10
 
9
11
  目标:
@@ -1,9 +1,11 @@
1
1
  ---
2
- description: 模板初始化:初始化 changes/templates 覆盖模板
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: 模板来源:查看 change templates 来源
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: 变更校验:按 strict 校验变更工件与绑定
2
+ description: 私有:变更校验:按 strict 校验变更工件与绑定
3
3
  ---
4
4
  <!-- AIWS_MANAGED_BEGIN:opencode:aiws-change-validate -->
5
5
  # aiws change validate
6
6
 
7
+ (私有原子入口;日常优先用 ws-* 链路。)
8
+
7
9
  用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
10
 
9
11
  目标:
@@ -1,9 +1,11 @@
1
1
  ---
2
- description: Hooks 启用:启用 git hooks 门禁
2
+ description: 私有:Hooks 启用:启用 git hooks 门禁
3
3
  ---
4
4
  <!-- AIWS_MANAGED_BEGIN:opencode:aiws-hooks-install -->
5
5
  # aiws hooks install
6
6
 
7
+ (私有原子入口;日常优先用 ws-* 链路。)
8
+
7
9
  用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
10
 
9
11
  目标:
@@ -1,9 +1,11 @@
1
1
  ---
2
- description: Hooks 状态:查看当前仓库 hooks 门禁状态
2
+ description: 私有:Hooks 状态:查看当前仓库 hooks 门禁状态
3
3
  ---
4
4
  <!-- AIWS_MANAGED_BEGIN:opencode:aiws-hooks-status -->
5
5
  # aiws hooks status
6
6
 
7
+ (私有原子入口;日常优先用 ws-* 链路。)
8
+
7
9
  用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
10
 
9
11
  目标:
@@ -1,9 +1,11 @@
1
1
  ---
2
- description: 初始化:落盘 AIWS 真值与门禁文件
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: 回滚:从 .aiws/backups 恢复快照
2
+ description: 私有:回滚:从 .aiws/backups 恢复快照
3
3
  ---
4
4
  <!-- AIWS_MANAGED_BEGIN:opencode:aiws-rollback -->
5
5
  # aiws rollback
6
6
 
7
+ (私有原子入口;日常优先用 ws-* 链路。)
8
+
7
9
  目标:
8
10
  - 从 `.aiws/backups/` 恢复到某次备份快照
9
11
 
@@ -1,9 +1,11 @@
1
1
  ---
2
- description: 更新:刷新模板与 tool-native 文件(先备份)
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>/`