@aipper/aiws-spec 0.0.6 → 0.0.8

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aipper/aiws-spec",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "AIWS spec and templates (single source of truth).",
5
5
  "type": "module",
6
6
  "files": [
@@ -0,0 +1,45 @@
1
+ <!-- AIWS_MANAGED_BEGIN:claude:ws-deliver -->
2
+ # ws deliver
3
+
4
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
5
+
6
+ 目标:适配 superproject + submodule(数量不固定)的交付收尾,降低“提交顺序/合并回 base 分支”出错概率:
7
+ 1) 先逐个提交 submodule(每个 repo 单独确认 commit message;默认 `git add -p`)
8
+ 2) 再提交 superproject(包含 submodule gitlink 指针更新 + 自身改动/变更工件)
9
+ 3) 最后 fast-forward 合并回目标分支(复用 `aiws change finish`;建议用 `/ws-finish`)
10
+
11
+ 强制约束:
12
+ - 不自动 `git add -A`。
13
+ - 不自动 push。
14
+ - 不自动删除分支。
15
+
16
+ 建议流程(按顺序):
17
+ 1) 先运行 `/ws-preflight`。
18
+ 2) 发现 submodules:
19
+ - `git submodule status --recursive`
20
+ 3) 逐个提交 submodules(按上一步顺序):
21
+ - `git -C "<sub_path>" status --porcelain`
22
+ - `git -C "<sub_path>" add -p`
23
+ - `git -C "<sub_path>" diff --staged --stat`
24
+ - 生成并让用户确认该 submodule 的 commit message(每个 repo 单独确认)
25
+ - `git -C "<sub_path>" commit -m "<message>"`
26
+ 4) 提交 superproject(gitlinks + 自身改动):
27
+ - `git diff --submodule`
28
+ - `git add <submodule-path-1> <submodule-path-2> ...`
29
+ - `git add -p`
30
+ - 生成并让用户确认 superproject 的 commit message
31
+ - `git commit -m "<message>"`
32
+ 5) (推荐)门禁 + 证据:
33
+ - `aiws validate . --stamp`(未安装全局 aiws 时可用 `npx @aipper/aiws validate . --stamp`)
34
+ 6) 安全合并回目标分支:
35
+ - 优先运行 `/ws-finish`(底层调用 `aiws change finish`,默认 `--ff-only`)
36
+
37
+ 输出要求:
38
+ - `Submodules:` 每个 submodule 的 commit 摘要(repo/path → sha → message)
39
+ - `Superproject:` commit 摘要
40
+ - `Merge:` `/ws-finish` 输出(into/from)
41
+ - `Evidence:` `.agentdocs/tmp/aiws-validate/*.json`(若使用 --stamp)
42
+ <!-- AIWS_MANAGED_END:claude:ws-deliver -->
43
+
44
+ 可在下方追加本项目对 Claude Code 的额外说明(托管块外内容会被保留)。
45
+
@@ -0,0 +1,48 @@
1
+ # Command: ws:deliver
2
+ # Description: 交付(submodules + superproject 分步提交,并安全合并回目标分支)
3
+ # Category: workspace
4
+ # Version: 1
5
+
6
+ description = "交付(submodules + superproject 分步提交,并安全合并回目标分支)"
7
+
8
+ prompt = """
9
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
10
+
11
+ 目标:适配 superproject + submodule(数量不固定)的交付收尾,降低“提交顺序/合并回 base 分支”出错概率:
12
+ 1) 先逐个提交 submodule(每个 repo 单独确认 commit message;默认 `git add -p`)
13
+ 2) 再提交 superproject(包含 submodule gitlink 指针更新 + 自身改动/变更工件)
14
+ 3) 最后 fast-forward 合并回目标分支(复用 `aiws change finish`;建议用 `ws:finish`)
15
+
16
+ 强制约束:
17
+ - 不自动 `git add -A`。
18
+ - 不自动 push。
19
+ - 不自动删除分支。
20
+
21
+ 建议流程(按顺序):
22
+ 1) 先确认真值文件存在并遵守:`AI_PROJECT.md` / `REQUIREMENTS.md` / `AI_WORKSPACE.md`。
23
+ 2) 发现 submodules:
24
+ - `git submodule status --recursive`
25
+ 3) 逐个提交 submodules(按上一步顺序):
26
+ - `git -C "<sub_path>" status --porcelain`
27
+ - `git -C "<sub_path>" add -p`
28
+ - `git -C "<sub_path>" diff --staged --stat`
29
+ - 生成并让用户确认该 submodule 的 commit message(每个 repo 单独确认)
30
+ - `git -C "<sub_path>" commit -m "<message>"`
31
+ 4) 提交 superproject(gitlinks + 自身改动):
32
+ - `git diff --submodule`
33
+ - `git add <submodule-path-1> <submodule-path-2> ...`
34
+ - `git add -p`
35
+ - 生成并让用户确认 superproject 的 commit message
36
+ - `git commit -m "<message>"`
37
+ 5) (推荐)门禁 + 证据:
38
+ - `aiws validate . --stamp`(未安装全局 aiws 时可用 `npx @aipper/aiws validate . --stamp`)
39
+ 6) 安全合并回目标分支:
40
+ - 优先运行 `ws:finish`(底层调用 `aiws change finish`,默认 `--ff-only`)
41
+
42
+ 输出要求:
43
+ - `Submodules:` 每个 submodule 的 commit 摘要(repo/path → sha → message)
44
+ - `Superproject:` commit 摘要
45
+ - `Merge:` `ws:finish`/`aiws change finish` 输出(into/from)
46
+ - `Evidence:` `.agentdocs/tmp/aiws-validate/*.json`(若使用 --stamp)
47
+ """
48
+
@@ -1,3 +1,6 @@
1
+ ---
2
+ description: 初始化:落盘 AIWS 真值与门禁文件
3
+ ---
1
4
  <!-- AIWS_MANAGED_BEGIN:opencode:aiws-init -->
2
5
  # aiws init
3
6
 
@@ -16,4 +19,3 @@
16
19
  <!-- AIWS_MANAGED_END:opencode:aiws-init -->
17
20
 
18
21
  可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
19
-
@@ -1,3 +1,6 @@
1
+ ---
2
+ description: 回滚:从 .aiws/backups 恢复快照
3
+ ---
1
4
  <!-- AIWS_MANAGED_BEGIN:opencode:aiws-rollback -->
2
5
  # aiws rollback
3
6
 
@@ -9,4 +12,3 @@
9
12
  <!-- AIWS_MANAGED_END:opencode:aiws-rollback -->
10
13
 
11
14
  可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
12
-
@@ -1,3 +1,6 @@
1
+ ---
2
+ description: 更新:刷新模板与 tool-native 文件(先备份)
3
+ ---
1
4
  <!-- AIWS_MANAGED_BEGIN:opencode:aiws-update -->
2
5
  # aiws update
3
6
 
@@ -15,4 +18,3 @@
15
18
  <!-- AIWS_MANAGED_END:opencode:aiws-update -->
16
19
 
17
20
  可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
18
-
@@ -1,3 +1,6 @@
1
+ ---
2
+ description: 门禁:校验 required/托管块/漂移(可落盘 stamp)
3
+ ---
1
4
  <!-- AIWS_MANAGED_BEGIN:opencode:aiws-validate -->
2
5
  # aiws validate
3
6
 
@@ -10,4 +13,3 @@
10
13
  <!-- AIWS_MANAGED_END:opencode:aiws-validate -->
11
14
 
12
15
  可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
13
-
@@ -1,3 +1,6 @@
1
+ ---
2
+ description: 分析:实现前技术分析并落盘证据
3
+ ---
1
4
  <!-- AIWS_MANAGED_BEGIN:opencode:ws-analyze -->
2
5
  # ws analyze
3
6
 
@@ -0,0 +1,47 @@
1
+ ---
2
+ description: 交付:submodules+superproject 分步提交并安全合并回 base
3
+ ---
4
+ <!-- AIWS_MANAGED_BEGIN:opencode:ws-deliver -->
5
+ # ws deliver
6
+
7
+ 用中文输出(命令/路径/代码标识符保持原样不翻译)。
8
+
9
+ 目标:适配 superproject + submodule(数量不固定)的交付收尾,降低“提交顺序/合并回 base 分支”出错概率:
10
+ 1) 先逐个提交 submodule(每个 repo 单独确认 commit message;默认 `git add -p`)
11
+ 2) 再提交 superproject(包含 submodule gitlink 指针更新 + 自身改动/变更工件)
12
+ 3) 最后 fast-forward 合并回目标分支(复用 `aiws change finish`;建议用 `/ws-finish`)
13
+
14
+ 强制约束:
15
+ - 不自动 `git add -A`。
16
+ - 不自动 push。
17
+ - 不自动删除分支。
18
+
19
+ 建议流程(按顺序):
20
+ 1) 先运行 `/ws-preflight`。
21
+ 2) 发现 submodules:
22
+ - `git submodule status --recursive`
23
+ 3) 逐个提交 submodules(按上一步顺序):
24
+ - `git -C "<sub_path>" status --porcelain`
25
+ - `git -C "<sub_path>" add -p`
26
+ - `git -C "<sub_path>" diff --staged --stat`
27
+ - 生成并让用户确认该 submodule 的 commit message(每个 repo 单独确认)
28
+ - `git -C "<sub_path>" commit -m "<message>"`
29
+ 4) 提交 superproject(gitlinks + 自身改动):
30
+ - `git diff --submodule`
31
+ - `git add <submodule-path-1> <submodule-path-2> ...`
32
+ - `git add -p`
33
+ - 生成并让用户确认 superproject 的 commit message
34
+ - `git commit -m "<message>"`
35
+ 5) (推荐)门禁 + 证据:
36
+ - `aiws validate . --stamp`(未安装全局 aiws 时可用 `npx @aipper/aiws validate . --stamp`)
37
+ 6) 安全合并回目标分支:
38
+ - 优先运行 `/ws-finish`(底层调用 `aiws change finish`,默认 `--ff-only`)
39
+
40
+ 输出要求:
41
+ - `Submodules:` 每个 submodule 的 commit 摘要(repo/path → sha → message)
42
+ - `Superproject:` commit 摘要
43
+ - `Merge:` `/ws-finish` 输出(into/from)
44
+ - `Evidence:` `.agentdocs/tmp/aiws-validate/*.json`(若使用 --stamp)
45
+ <!-- AIWS_MANAGED_END:opencode:ws-deliver -->
46
+
47
+ 可在下方追加本项目对 OpenCode 的额外说明(托管块外内容会被保留)。
@@ -1,3 +1,6 @@
1
+ ---
2
+ description: 开发:在 AIWS 约束下完成小步交付
3
+ ---
1
4
  <!-- AIWS_MANAGED_BEGIN:opencode:ws-dev -->
2
5
  # ws dev
3
6
 
@@ -1,3 +1,6 @@
1
+ ---
2
+ description: 收尾:fast-forward 合并 change/<id> 回目标分支
3
+ ---
1
4
  <!-- AIWS_MANAGED_BEGIN:opencode:ws-finish -->
2
5
  # ws finish
3
6
 
@@ -1,3 +1,6 @@
1
+ ---
2
+ description: 迁移:把仓库对齐到 aiws workspace 模板
3
+ ---
1
4
  <!-- AIWS_MANAGED_BEGIN:opencode:ws-migrate -->
2
5
  # ws migrate
3
6
 
@@ -1,3 +1,6 @@
1
+ ---
2
+ description: 预检:读取真值文件并输出约束摘要
3
+ ---
1
4
  <!-- AIWS_MANAGED_BEGIN:opencode:ws-preflight -->
2
5
  # ws preflight
3
6
 
@@ -1,3 +1,6 @@
1
+ ---
2
+ description: 需求变更:更新 REQUIREMENTS 并同步执行合同
3
+ ---
1
4
  <!-- AIWS_MANAGED_BEGIN:opencode:ws-req-change -->
2
5
  # ws req change
3
6
 
@@ -1,3 +1,6 @@
1
+ ---
2
+ description: 合同同步:把 REQUIREMENTS FlowSpec 同步到 requirements-issues.csv
3
+ ---
1
4
  <!-- AIWS_MANAGED_BEGIN:opencode:ws-req-contract-sync -->
2
5
  # ws req contract sync
3
6
 
@@ -1,3 +1,6 @@
1
+ ---
2
+ description: 合同校验:校验 requirements-issues.csv 字段完整性
3
+ ---
1
4
  <!-- AIWS_MANAGED_BEGIN:opencode:ws-req-contract-validate -->
2
5
  # ws req contract validate
3
6
 
@@ -1,3 +1,6 @@
1
+ ---
2
+ description: Flow 同步:从 REQUIREMENTS 生成 api-flow 与场景执行合同
3
+ ---
1
4
  <!-- AIWS_MANAGED_BEGIN:opencode:ws-req-flow-sync -->
2
5
  # ws req flow sync
3
6
 
@@ -1,3 +1,6 @@
1
+ ---
2
+ description: 需求评审:对 REQUIREMENTS 做整体 QA(不改文件)
3
+ ---
1
4
  <!-- AIWS_MANAGED_BEGIN:opencode:ws-req-review -->
2
5
  # ws req review
3
6
 
@@ -1,3 +1,6 @@
1
+ ---
2
+ description: Review:提交前审计改动并落盘证据
3
+ ---
1
4
  <!-- AIWS_MANAGED_BEGIN:opencode:ws-review -->
2
5
  # ws review
3
6
 
@@ -1,3 +1,6 @@
1
+ ---
2
+ description: 规则:把口述规则整理并写入 AI_PROJECT.md 托管段
3
+ ---
1
4
  <!-- AIWS_MANAGED_BEGIN:opencode:ws-rule -->
2
5
  # ws rule
3
6
 
@@ -28,6 +28,7 @@
28
28
  ".claude/commands/ws-preflight.md",
29
29
  ".claude/commands/ws-migrate.md",
30
30
  ".claude/commands/ws-dev.md",
31
+ ".claude/commands/ws-deliver.md",
31
32
  ".claude/commands/ws-analyze.md",
32
33
  ".claude/commands/ws-finish.md",
33
34
  ".claude/commands/ws-review.md",
@@ -44,6 +45,7 @@
44
45
  ".opencode/command/ws-preflight.md",
45
46
  ".opencode/command/ws-migrate.md",
46
47
  ".opencode/command/ws-dev.md",
48
+ ".opencode/command/ws-deliver.md",
47
49
  ".opencode/command/ws-analyze.md",
48
50
  ".opencode/command/ws-finish.md",
49
51
  ".opencode/command/ws-review.md",
@@ -70,6 +72,7 @@
70
72
  ".iflow/commands/ws-migrate.toml",
71
73
  ".iflow/commands/ws-dev.toml",
72
74
  ".iflow/commands/ws-analyze.toml",
75
+ ".iflow/commands/ws-deliver.toml",
73
76
  ".iflow/commands/ws-finish.toml",
74
77
  ".iflow/commands/ws-review.toml",
75
78
  ".iflow/commands/ws-rule.toml",
@@ -155,6 +158,7 @@
155
158
  ".iflow/commands/ws-migrate.toml",
156
159
  ".iflow/commands/ws-dev.toml",
157
160
  ".iflow/commands/ws-analyze.toml",
161
+ ".iflow/commands/ws-deliver.toml",
158
162
  ".iflow/commands/ws-finish.toml",
159
163
  ".iflow/commands/ws-review.toml",
160
164
  ".iflow/commands/ws-rule.toml",
@@ -184,6 +188,7 @@
184
188
  ".claude/commands/ws-preflight.md": ["claude:ws-preflight"],
185
189
  ".claude/commands/ws-migrate.md": ["claude:ws-migrate"],
186
190
  ".claude/commands/ws-dev.md": ["claude:ws-dev"],
191
+ ".claude/commands/ws-deliver.md": ["claude:ws-deliver"],
187
192
  ".claude/commands/ws-analyze.md": ["claude:ws-analyze"],
188
193
  ".claude/commands/ws-finish.md": ["claude:ws-finish"],
189
194
  ".claude/commands/ws-review.md": ["claude:ws-review"],
@@ -200,6 +205,7 @@
200
205
  ".opencode/command/ws-preflight.md": ["opencode:ws-preflight"],
201
206
  ".opencode/command/ws-migrate.md": ["opencode:ws-migrate"],
202
207
  ".opencode/command/ws-dev.md": ["opencode:ws-dev"],
208
+ ".opencode/command/ws-deliver.md": ["opencode:ws-deliver"],
203
209
  ".opencode/command/ws-analyze.md": ["opencode:ws-analyze"],
204
210
  ".opencode/command/ws-finish.md": ["opencode:ws-finish"],
205
211
  ".opencode/command/ws-review.md": ["opencode:ws-review"],