@aipper/aiws-spec 0.0.15 → 0.0.17

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.
@@ -55,7 +55,9 @@
55
55
  - `replace_file` 文件:整文件覆盖
56
56
  - `managed_blocks` 文件:仅更新托管块
57
57
  - required 但不在上述两类中的文件:不改动内容(最多补齐缺失文件)
58
- - 若某个 `managed_blocks` 文件缺失指定 block、marker 不成对、或 marker 被破坏:必须失败(退出码 `2`),不做自动修复(提示用户重新 `aiws init` 或手工修复)。
58
+ - 对于 `managed_blocks`:
59
+ - 若文件在当前模板是新增项(旧 `.aiws/manifest.json` 里不存在该 path):允许在 `update` 时自动补齐文件,再写入托管块。
60
+ - 若文件在旧 `.aiws/manifest.json` 已存在,但缺失指定 block、marker 不成对、或 marker 被破坏:必须失败(退出码 `2`),不做自动修复(提示用户重新 `aiws init` 或手工修复)。
59
61
  - 更新完成后刷新 `.aiws/manifest.json`(版本与 hash)。
60
62
 
61
63
  接口(仅定义):
@@ -47,7 +47,9 @@
47
47
  规则:
48
48
  - `<id>` 必须稳定且可读(推荐:`area:purpose`,如 `agents`、`gitignore`、`claude:aiws-init`)。
49
49
  - 托管块应当是**连续整块文本**;aiws 只允许更新托管块内容,不触碰块外内容(除非该文件策略为 `replace_file`)。
50
- - 对于模板 manifest 声明为 `managed_blocks` 的文件:若目标仓库缺失指定 block、marker 不成对、或 marker 被破坏,`aiws update` 必须失败(不做自动修复)。
50
+ - 对于模板 manifest 声明为 `managed_blocks` 的文件:
51
+ - 若该 path 是模板新增项(旧 `.aiws/manifest.json` 的 `managed` 中不存在),`aiws update` 可自动补齐文件并写入托管块。
52
+ - 若该 path 在旧 `.aiws/manifest.json` 已存在,但缺失指定 block、marker 不成对、或 marker 被破坏,`aiws update` 必须失败(不做自动修复)。
51
53
 
52
54
  ## `.gitignore` 托管块(默认约定)
53
55
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aipper/aiws-spec",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "description": "AIWS spec and templates (single source of truth).",
5
5
  "type": "module",
6
6
  "files": [
@@ -10,7 +10,20 @@
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-preflight` / `$ws-submodule-setup` / `$ws-plan` / `$ws-plan-verify` / `$ws-dev` / `$ws-pull` / `$ws-push` / `$ws-review` / `$ws-commit` / `$aiws-init` / `$aiws-validate` / `$aiws-hooks-install` / `$aiws-change-new`
13
+ - Codex skills(常用,一句话说明):
14
+ - `$ws-preflight`:预检(读取真值文件并输出约束摘要)
15
+ - `$ws-submodule-setup`:子模块分支对齐(写入 `.gitmodules` 的 `submodule.<name>.branch`)
16
+ - `$ws-plan`:规划(生成可落盘 `plan/` 工件;供 `$ws-dev` 执行)
17
+ - `$ws-plan-verify`:计划质检(执行前检查计划是否过长/跑偏)
18
+ - `$ws-dev`:开发(按需求实现并验证;适用于任何需要修改代码/配置的任务)
19
+ - `$ws-pull`:拉取并对齐 submodules(尽量避免 detached;减少人为差异)
20
+ - `$ws-push`:推送(submodule 感知:先 submodules 后 superproject;fast-forward 安全)
21
+ - `$ws-review`:评审(提交前审计与证据落盘)
22
+ - `$ws-commit`:提交(先审计/门禁再 commit;submodule 感知)
23
+ - `$aiws-init`:初始化工作区(生成真值文件与门禁)
24
+ - `$aiws-validate`:校验工作区(漂移检测 + 门禁)
25
+ - `$aiws-hooks-install`:启用 git hooks 门禁(`core.hooksPath=.githooks`)
26
+ - `$aiws-change-new`:创建 `changes/<change-id>` 工件
14
27
  - Codex CLI(推荐,可选):安装全局 skills:`npx @aipper/aiws codex install-skills`(写入 `~/.codex/skills/` 或 `$CODEX_HOME/skills`)
15
28
  - Codex CLI(遗留,可选):安装全局 prompts:`npx @aipper/aiws codex install-prompts`(写入 `~/.codex/prompts/` 或 `$CODEX_HOME/prompts`;prompts 已 deprecated)
16
29
  - 不要把敏感信息写入 git:`secrets/test-accounts.json`、`.env*`、token、内网地址等