@haaaiawd/anws 2.4.0 → 2.4.1

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 (63) hide show
  1. package/README.md +1 -1
  2. package/bin/cli.js +2 -2
  3. package/lib/manifest.js +4 -16
  4. package/package.json +1 -1
  5. package/templates/.agents/skills/anws-system/SKILL.md +5 -3
  6. package/templates/.agents/skills/code-reviewer/SKILL.md +6 -5
  7. package/templates/.agents/skills/concept-modeler/SKILL.md +6 -6
  8. package/templates/.agents/skills/craft-authoring/SKILL.md +1 -1
  9. package/templates/.agents/skills/craft-authoring/references/BUNDLE_POLICY.md +13 -32
  10. package/templates/.agents/skills/design-reviewer/SKILL.md +11 -11
  11. package/templates/.agents/skills/e2e-testing-guide/SKILL.md +3 -3
  12. package/templates/.agents/skills/nexus-mapper/SKILL.md +2 -2
  13. package/templates/.agents/skills/nexus-mapper/references/probe-protocol.md +1 -1
  14. package/templates/.agents/skills/nexus-query/SKILL.md +1 -1
  15. package/templates/.agents/skills/runtime-inspector/SKILL.md +150 -99
  16. package/templates/.agents/skills/spec-writer/SKILL.md +3 -3
  17. package/templates/.agents/skills/system-architect/SKILL.md +5 -5
  18. package/templates/.agents/skills/system-designer/SKILL.md +188 -601
  19. package/templates/.agents/skills/task-planner/references/TASK_TEMPLATE_05A.md +2 -2
  20. package/templates/.agents/skills/task-reviewer/SKILL.md +8 -13
  21. package/templates/.agents/skills/tech-evaluator/SKILL.md +19 -19
  22. package/templates/.agents/workflows/blueprint.md +5 -5
  23. package/templates/.agents/workflows/challenge.md +12 -18
  24. package/templates/.agents/workflows/change.md +8 -8
  25. package/templates/.agents/workflows/craft.md +9 -9
  26. package/templates/.agents/workflows/design-system.md +6 -6
  27. package/templates/.agents/workflows/explore.md +4 -4
  28. package/templates/.agents/workflows/forge.md +9 -9
  29. package/templates/.agents/workflows/genesis.md +9 -10
  30. package/templates/.agents/workflows/probe.md +6 -9
  31. package/templates/.agents/workflows/quickstart.md +9 -7
  32. package/templates/.agents/workflows/upgrade.md +9 -9
  33. package/templates_en/.agents/skills/anws-system/SKILL.md +5 -3
  34. package/templates_en/.agents/skills/code-reviewer/SKILL.md +6 -5
  35. package/templates_en/.agents/skills/concept-modeler/SKILL.md +6 -6
  36. package/templates_en/.agents/skills/craft-authoring/SKILL.md +1 -1
  37. package/templates_en/.agents/skills/craft-authoring/references/BUNDLE_POLICY.md +12 -30
  38. package/templates_en/.agents/skills/design-reviewer/SKILL.md +9 -10
  39. package/templates_en/.agents/skills/e2e-testing-guide/SKILL.md +3 -3
  40. package/templates_en/.agents/skills/nexus-mapper/SKILL.md +2 -2
  41. package/templates_en/.agents/skills/nexus-mapper/references/probe-protocol.md +1 -1
  42. package/templates_en/.agents/skills/nexus-query/SKILL.md +1 -1
  43. package/templates_en/.agents/skills/runtime-inspector/SKILL.md +150 -101
  44. package/templates_en/.agents/skills/spec-writer/SKILL.md +3 -3
  45. package/templates_en/.agents/skills/system-architect/SKILL.md +5 -5
  46. package/templates_en/.agents/skills/system-designer/SKILL.md +188 -534
  47. package/templates_en/.agents/skills/task-reviewer/SKILL.md +4 -10
  48. package/templates_en/.agents/skills/tech-evaluator/SKILL.md +6 -6
  49. package/templates_en/.agents/workflows/blueprint.md +5 -5
  50. package/templates_en/.agents/workflows/challenge.md +7 -12
  51. package/templates_en/.agents/workflows/change.md +7 -7
  52. package/templates_en/.agents/workflows/craft.md +9 -9
  53. package/templates_en/.agents/workflows/design-system.md +6 -6
  54. package/templates_en/.agents/workflows/explore.md +4 -4
  55. package/templates_en/.agents/workflows/forge.md +9 -9
  56. package/templates_en/.agents/workflows/genesis.md +9 -10
  57. package/templates_en/.agents/workflows/probe.md +3 -7
  58. package/templates_en/.agents/workflows/quickstart.md +7 -5
  59. package/templates_en/.agents/workflows/upgrade.md +8 -8
  60. package/templates/.agents/skills/report-template/SKILL.md +0 -92
  61. package/templates/.agents/skills/report-template/references/REPORT_TEMPLATE.md +0 -100
  62. package/templates_en/.agents/skills/report-template/SKILL.md +0 -85
  63. package/templates_en/.agents/skills/report-template/references/REPORT_TEMPLATE.md +0 -100
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  <img src="assets/logo-cli.png" width="260" alt="Anws">
5
5
 
6
6
  [![License: MIT](https://opensource.org/licenses/MIT)](https://opensource.org/licenses/MIT)
7
- [![Version](https://img.shields.io/badge/version-v2.3.1-7FB5B6)](https://github.com/Haaaiawd/ANWS/releases)
7
+ [![Version](https://img.shields.io/badge/version-v2.4.1-7FB5B6)](https://github.com/Haaaiawd/ANWS/releases)
8
8
  [![Targets](https://img.shields.io/badge/Targets-Windsurf%20%7C%20Claude%20Code%20%7C%20Copilot%20%7C%20Cursor%20%7C%20Codex%20Preview%20%7C%20OpenCode%20%7C%20Trae%20%7C%20Qoder%20%7C%20Kilo%20Code-blueviolet)](https://github.com/Haaaiawd/ANWS)
9
9
 
10
10
  [English](./README.md) | [中文](./README_CN.md)
package/bin/cli.js CHANGED
@@ -18,8 +18,8 @@ USAGE
18
18
  COMMANDS
19
19
  init Install one or more target AI IDE workflow projections
20
20
  Init skips a target if its installedVersion equals the current CLI version
21
- (since v2.4.0). Run update to refresh templates instead.
22
- update Scan installed targets from install-lock or directory layout and update them
21
+ (since v2.4.1). Run update to refresh templates instead.
22
+ update One-click update: scan install-lock or directory layout and refresh templates
23
23
  Preserves the templateLocale recorded in install-lock. Generates a changelog.
24
24
 
25
25
  OPTIONS
package/lib/manifest.js CHANGED
@@ -5,11 +5,11 @@ const { getTarget } = require("./adapters");
5
5
  /**
6
6
  * RESOURCE_REGISTRY — CLI `anws init` / `anws update` 的唯一「复制来源清单」
7
7
  *
8
- * - 每条 `source` 相对于 canonical **`templates/`**(见 `lib/resources` 的 `TEMPLATE_ROOT`)。
9
- * - 默认 `resolveCanonicalSource` / `resolveCanonicalPath(..., 'zh')` 只读该根目录;**不会**自动包含 `templates_alpha*`。英文包见 `resolveCanonicalPath(..., 'en')` + `templates_en/`(由 `anws init --locale` / install-lock `templateLocale` 驱动)。
8
+ * - 每条 `source` 相对于 **`templates/`** 下的相对路径(见 `lib/resources` 的 `TEMPLATE_ROOT`);校验脚本只验证该根。
9
+ * - **`resolveCanonicalPath(rel, templateLocale)`**:`zh` `templates/`;`en` 优先 `templates_en/` 同源路径,缺失则回退 `templates/`(由 `anws init --locale` / install-lock `templateLocale` 驱动)。
10
10
  * - **`templates/` 磁盘上可能存在未在此登记的路径**(遗留或备用);未登记则 **不会** 投影到用户项目。
11
- * - **Alpha overlay**(`templates_alpha/`、`templates_alpha_en/`)整树 **默认不在登记范围内**;语义与合并决策见
12
- * **`templates/.agents/skills/craft-authoring/references/BUNDLE_POLICY.md`**(及 EN 镜像)。
11
+ * - 发货模板为 **workflow/skill 正文**(与 `RESOURCE_REGISTRY` 登记一致);安装边界与维护约定见
12
+ * **`templates/.agents/skills/craft-authoring/references/BUNDLE_POLICY.md`**(及 `templates_en/` 镜像)。
13
13
  */
14
14
  const RESOURCE_REGISTRY = [
15
15
  {
@@ -163,18 +163,6 @@ const RESOURCE_REGISTRY = [
163
163
  source: ".agents/skills/output-contract/SKILL.md",
164
164
  fileName: "output-contract/SKILL.md",
165
165
  },
166
- {
167
- id: "report-template",
168
- type: "skill",
169
- source: ".agents/skills/report-template/SKILL.md",
170
- fileName: "report-template/SKILL.md",
171
- },
172
- {
173
- id: "report-template-reference",
174
- type: "skill",
175
- source: ".agents/skills/report-template/references/REPORT_TEMPLATE.md",
176
- fileName: "report-template/references/REPORT_TEMPLATE.md",
177
- },
178
166
  {
179
167
  id: "runtime-inspector",
180
168
  type: "skill",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haaaiawd/anws",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "Anws — A spec-driven workflow framework for AI-assisted development. Empowers prompt engineers to build production-ready software through structured PRD → Architecture → Task decomposition. Works with Claude Code, GitHub Copilot, Cursor, Windsurf, and any tool that reads AGENTS.md.",
5
5
  "keywords": [
6
6
  "anws",
@@ -29,9 +29,11 @@ description: 当用户在 skills-only 环境中需要判断应该从哪个 anws
29
29
  3. 再按需读取对应 workflow reference
30
30
  4. 没有读完对应 reference 前,不得直接执行该 workflow 的写操作
31
31
 
32
- ## Workflow Map
33
-
34
- - `references/quickstart.md`
32
+ ## Workflow Map
33
+
34
+ > `references/*.md` 由 CLI 在 skills-only target(如 Codex / Trae)投影生成:源文件仍是 canonical `.agents/workflows/*.md`。
35
+
36
+ - `references/quickstart.md`
35
37
  - 用途:总入口。用于判断项目目前处于哪一阶段,以及应先调用哪个工作流
36
38
  - `references/probe.md`
37
39
  - 用途:接手遗留项目、重大改动前做系统风险探测
@@ -1,18 +1,19 @@
1
1
  ---
2
2
  name: code-reviewer
3
- description: 【ALPHA】纯静态「契约忠实度 / 实现侧证据」审查:对照 PRD、ADR、系统设计、05A_TASKS 与 05B_VERIFICATION_PLAN,围绕契约闭合、任务兑现、架构健康、安全边界、验证证据与回流一致性产出可追溯结论;供 /challenge(CODE/FULL)与 /forge(Step 3 §3.6 波末)共用。
3
+ description: 纯静态「契约忠实度 / 实现侧证据」审查:对照 PRD、ADR、系统设计、05A_TASKS 与 05B_VERIFICATION_PLAN,围绕契约闭合、任务兑现、架构健康、安全边界、验证证据与回流一致性产出可追溯结论;供 /challenge(CODE/FULL)与 /forge(Step 3 §3.6 波末)共用。
4
4
  ---
5
5
 
6
- # Code Reviewer — 实现侧证据层【ALPHA】
6
+ # Code Reviewer — 实现侧证据层
7
7
 
8
8
  你是 **CODE REVIEWER**。职责不是泛化 PR review 或风格打分,而是用纯静态证据回答:**实现是否忠实兑现 PRD / ADR / System Design / 05A_TASKS / 05B_VERIFICATION_PLAN 中的承诺;若否,风险何在、证据何在。**
9
9
 
10
10
  ## CRITICAL 方法论锚点
11
11
 
12
12
  - **静态即边界**:只承认可读工件与代码形态;凡依赖进程、网络、浏览器、真实运行时序的结论,一律标注 **无法通过静态审查确认** 或 **需人工验证**,不得写成已证实。
13
- - **契约高于印象**:排序与措辞以 PRD / ADR / System Design / `05A_TASKS.md` / `05B_VERIFICATION_PLAN.md` / 本轮任务描述为准;无锚点的偏好式批评禁止写入强结论。
14
- - **证据分级**:Critical / High / Fail / Pass 等断言必须附 `**path:line**`;无定位则降为「疑似」或「无法确认」,不得虚报确定度。
15
- - **根因优于堆叠**:同类问题合并到可修复根因;禁止用重复条目刷严重级别。
13
+ - **契约高于印象**:排序与措辞以 PRD / ADR / System Design / `05A_TASKS.md` / `05B_VERIFICATION_PLAN.md` / 本轮任务描述为准;无锚点的偏好式批评禁止写入强结论。
14
+ - **证据分级**:Critical / High / Fail / Pass 等断言必须附 `**path:line**`;无定位则降为「疑似」或「无法确认」,不得虚报确定度。
15
+ - **根因优于堆叠**:同类问题合并到可修复根因;禁止用重复条目刷严重级别。
16
+ - **共用报告契约**:持久化报告、单写者、子代理交接与去重复规则见 `.agents/skills/output-contract/SKILL.md`。
16
17
 
17
18
  ## 硬边界(必须遵守)
18
19
 
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: concept-modeler
3
- description: 【ALPHA】当用户需求模糊、术语不清晰时使用。通过交互式追问澄清领域概念,提取实体、流程与暗物质(missing_components)。由 **alpha `/genesis` Step 1** 在 Step 0 已确定 `TARGET_DIR = .anws/v{N}` 后调用;与同 bundle `templates_alpha` 工作流连用,**禁止**同会话混用 shipped `templates/` 下同名 skill。
3
+ description: 当用户需求模糊、术语不清晰时使用。通过交互式追问澄清领域概念,提取实体、流程与暗物质(missing_components)。由 **`/genesis` Step 1** 在 Step 0 已确定 `TARGET_DIR = .anws/v{N}` 后调用;与 **同工作区 `/genesis`** 连用。
4
4
  ---
5
5
 
6
- # 领域建模师 (Domain Modeler)【ALPHA】
6
+ # 领域建模师 (Domain Modeler)
7
7
 
8
8
  > "如果你描述不清楚,你就造不出来。" —— Eric Evans
9
9
 
@@ -16,7 +16,7 @@ description: 【ALPHA】当用户需求模糊、术语不清晰时使用。通
16
16
 
17
17
  **使命**:在 `/genesis` **Step 1** 中,将用户的模糊表述收敛为 **Ubiquitous Language** 与可机器读写的 `concept_model.json`;为 PRD 撰写提供无歧义名词、动词与已知缺口。
18
18
  **能力**:模糊点扫描(实体/动词/暗物质/边界)、受控追问(多选或极短答)、每答即写的增量模型维护、`glossary` 与 `clarifications` 追溯。
19
- **限制**:**一次只向用户输出一个问题**(问题队列仅内部维护,不得整表甩给用户);不得跳过追问而凭印象填 JSON;不得与同路径 shipped `templates/` 版 `concept-modeler` 混会话;若宿主提供结构化提问工具(如 `ask question`),**优先用工具**发问。
19
+ **限制**:**一次只向用户输出一个问题**(问题队列仅内部维护,不得整表甩给用户);不得跳过追问而凭印象填 JSON;若宿主提供结构化提问工具(如 `ask question`),**优先用工具**发问。
20
20
  **与子代理(可选)**:仅允许有界切片(例如「仅生成模糊点候选」「仅校对 glossary 同义冲突」);合并后由**父代理**唯一写盘 `.anws/v{N}/concept_model.json`,子代理不得竞争同一文件。
21
21
  **Output Goal**:`.anws/v{N}/concept_model.json`,字段语义与下文 **spec 契约**一致;用户侧完成关键术语确认闭环。
22
22
  </phase_context>
@@ -115,7 +115,7 @@ description: 【ALPHA】当用户需求模糊、术语不清晰时使用。通
115
115
 
116
116
  ## 触发与宿主配对
117
117
 
118
- - **主路径**:alpha **`/genesis` Step 1**:在 Step 0 已设定 `TARGET_DIR` 后加载本 skill,执行需求澄清并写出 `concept_model.json`。
118
+ - **主路径**:**`/genesis` Step 1**:在 Step 0 已设定 `TARGET_DIR` 后加载本 skill,执行需求澄清并写出 `concept_model.json`。
119
119
  - **辅助路径**:用户脱离 genesis 仅做领域扫盲时,仍可遵循本 skill,但仍须写入当前活动版本的 `concept_model.json`(路径规则不变)。
120
120
 
121
121
  ---
@@ -193,7 +193,7 @@ description: 【ALPHA】当用户需求模糊、术语不清晰时使用。通
193
193
 
194
194
  ---
195
195
 
196
- ## 老师傅守则(与 ALPHA 契约叠加)
196
+ ## ALPHA 执行守则(与本 SKILL 契约叠加)
197
197
 
198
198
  1. **不要假设**:永远不默认理解用户词汇;问的即是契约来源。
199
199
  2. **一次一个**:对外仅展示单个问题。
@@ -227,4 +227,4 @@ description: 【ALPHA】当用户需求模糊、术语不清晰时使用。通
227
227
  - [ ] **`clarifications`** 与对外追问条数一致或可解释缺口。
228
228
  - [ ] 模型已保存到 **`TARGET_DIR/concept_model.json`**(等价路径 **`.anws/v{N}/concept_model.json`**)。
229
229
  - [ ] 用户已确认术语理解(口头或「继续」类指令等价于进入下一 genesis 步的前提由宿主裁定)。
230
- - [ ] 未与同会话 shipped **`templates/`** `concept-modeler` 混用。
230
+ - [ ] 会话内仅使用工作区 **`.agents/skills/concept-modeler/SKILL.md`**,无跨路径替代表述。
@@ -22,7 +22,7 @@ description: 执行 /craft 时必读。提供 Workflow / Skill / Prompt 骨架
22
22
  - 坏文档让执行者更兴奋,却更依赖临场发挥。
23
23
 
24
24
  > **与 `output-contract` 的分工**:本节只定义 Workflow / Skill / Prompt **撰写脚手架**;持久化报告的共用 spec、父子委派与单写者规则见 **`.agents/skills/output-contract/SKILL.md`**。
25
- > **与 CLI 安装清单的分工**:哪些路径会随 `anws init` 复制、canonical 与 **`templates_alpha*`** overlay 边界、合并前检查项见 **`references/BUNDLE_POLICY.md`**。
25
+ > **与 CLI 安装清单的分工**:哪些路径会随 `anws init` 复制、registry 与 **`BUNDLE_POLICY`** 边界见 **`references/BUNDLE_POLICY.md`**。
26
26
 
27
27
  ---
28
28
 
@@ -1,6 +1,6 @@
1
- # 模板 Bundle 契约(CLI · canonical · alpha)
1
+ # 模板 Bundle 契约(CLI · 发货模板)
2
2
 
3
- 本文定义 **安装边界**:哪些文件由 CLI 复制、canonical alpha overlay 如何分工,避免「静默改写产品契约」。
3
+ 本文定义 **安装边界**:哪些文件由 CLI 复制;产品与 CLI 仅维护 **一套** `RESOURCE_REGISTRY`。**`zh` / `en`** 只决定从 **`templates/`** 或 **`templates_en/`** 取同源相对路径的文案,不是两套并行产品权威。
4
4
  修改 **`lib/manifest.js`** 的登记项 = **显式改变**用户侧安装集合,须在 **发版说明** 中写明。
5
5
 
6
6
  ---
@@ -10,52 +10,33 @@
10
10
  | 机制 | 说明 |
11
11
  |------|------|
12
12
  | **`RESOURCE_REGISTRY`** | `lib/manifest.js` 中的数组;**唯一**驱动 `anws init` / `anws update` 写入用户项目的路径集合(经各 IDE target 投影)。 |
13
- | **`TEMPLATE_ROOT`** | `src/anws/templates/`(见 `lib/resources`)。**`resolveCanonicalSource` 只拼接此根 + 每条 registry `source`。 |
13
+ | **`TEMPLATE_ROOT`** / **`TEMPLATE_ROOT_EN`** | `src/anws/templates/` 与 `src/anws/templates_en/`(见 `lib/resources`)。**`resolveCanonicalPath(rel, templateLocale)`** **`zh`** 时读 `templates/`;在 **`en`** 时优先 `templates_en/` 下同相对路径,不存在则回退 `templates/`。 |
14
14
  | **校验** | `scripts/check-canonical-templates.js`:registry 中每条 `source` 必须在 **`templates/`** 下存在且为普通文件。 |
15
15
 
16
- 未出现在 **`RESOURCE_REGISTRY`** 中的相对路径——即使躺在 **`templates/`** 目录里——**默认不会被 CLI 安装**。那是「仓库里有、产品上未发货」,与 alpha 省略某 skill **不是同一语义**:前者是 **registry 缺口**,后者是 **overlay 故意不收**。(例:若磁盘上存在 **`nexus-query/`** 而未登记,则 CLI 不发货;alpha 树则可能整目录不镜像—阅读时以 **registry + 本文件** 为准,勿混谈。)
16
+ 未出现在 **`RESOURCE_REGISTRY`** 中的相对路径——即使躺在 **`templates/`** 目录里——**默认不会被 CLI 安装**。例如 **`nexus-query/`** 等仅作仓库维护、未登记时,CLI 不发货;以 **registry + 本文件** 为准。
17
17
 
18
18
  ---
19
19
 
20
- ## 2. Canonical(`templates/`)与英文镜像(`templates_en/`)
20
+ ## 2. `templateLocale`:`templates/` 与 `templates_en/`
21
21
 
22
- - **`templates/`**:npm 包内 canonical 中文默认树;与 **`package.json` version** 对齐叙述时用「shipped canonical」。
23
- - **`templates_en/`**:英文镜像维护树;**CLI 仍只读 `templates/`** 作为复制源。双语对齐是 **维护责任**,不是第二条安装根。
24
- - workflow/skill 内容时:**两份树语义对齐**,避免 EN-only 漂移。
22
+ - **`templates/`**:npm 包内默认中文文案树,亦是 **registry 路径的存在性校验根**。
23
+ - **`templates_en/`**:英文镜像;`install-lock` **`templateLocale: en`** 时,init/update 从 **`templates_en/`** 读取同源 **相对路径**,缺失条目回退 **`templates/`**。
24
+ - 维护时 **同一组 `source` 相对路径** 在中英文树之间 **语义对齐**,避免 EN-only 漂移。
25
25
 
26
26
  ---
27
27
 
28
- ## 3. Alpha overlay(`templates_alpha/` · `templates_alpha_en/`)
29
-
30
- **不是**第二条 semver,也 **不在** `RESOURCE_REGISTRY` 里整树挂载。
31
-
32
- | 属性 | 说明 |
33
- |------|------|
34
- | **用途** | 可选安装根、remediation、实验版式;给「先写厚再收敛」用。 |
35
- | **安装方式** | 当前 **无** `anws init --bundle alpha`;使用 overlay = **人工**把该树当作项目里的 `.agents/` 来源,或自定义脚本。 |
36
- | **与 canonical 关系** | 允许 **故意省略**整个 skill 目录(例如不镜像 **`nexus-query`**)以控体积;需要该能力时 **改读 shipped `templates/` 同名路径** 或把对应条目 **登记进 registry** 后再依赖 CLI。 |
37
- | **共用契约** | **`output-contract`**、**`genesis` ADR 时序** 等已收敛到与 canonical **同一路径名** 时,优先 **单 skill 引用**,避免在 overlay 里再抄一份长文。 |
38
-
39
- ### 合并进 canonical 之前(检查清单)
40
-
41
- 1. **省略项**:是 **永久从产品中删掉能力**,还是 **仅 overlay 不提供**?若是后者,canonical/registry **不得**假装该能力不存在。
42
- 2. **Registry**:新增或删除 `RESOURCE_REGISTRY` 条目会影响 **所有** 用户下一次 update;必须 semver + RELEASE_NOTES。
43
- 3. **体积**:先 **瘦身 / 抽 skill / 去重复** 再合并,避免把叙事债务写进默认路径。
44
-
45
- ---
46
-
47
- ## 4. 与 `/craft`、output-contract 的分工
28
+ ## 3. `/craft`、output-contract 的分工
48
29
 
49
30
  | 文档 / Skill | 管什么 |
50
31
  |----------------|--------|
51
32
  | **`craft-authoring`(本仓库 SKILL)** | Workflow / Skill / Prompt **撰写脚手架**与评分闸门。 |
52
33
  | **`output-contract`** | 执行期 **落盘 spec**、**委派与单写者**。 |
53
- | **本文 `BUNDLE_POLICY`** | **谁会被 CLI 安装**、canonical / alpha **语义边界**、合并 **决策记录**。 |
34
+ | **本文 `BUNDLE_POLICY`** | **谁会被 CLI 安装**、locale 选根规则、registry **决策记录**。 |
54
35
 
55
36
  ---
56
37
 
57
- ## 5. 瘦身与后续工作(建议顺序)
38
+ ## 4. 瘦身与后续工作(建议顺序)
58
39
 
59
- 1. **登记缺口**:若 canonical **`templates/`** 里某路径应随 CLI 发货但未在 registry,**要么登记要么删磁盘冗余**,避免「仓库有、用户永远没有」。
40
+ 1. **登记缺口**:若 **`templates/`** 里某路径应随 CLI 发货但未在 registry,**要么登记要么删磁盘冗余**,避免「仓库有、用户永远没有」。
60
41
  2. **重复收敛**:各 reviewer / workflow 中与 **`output-contract`**、**`BUNDLE_POLICY`** 重复的段落,改为 **一句引用**。
61
- 3. **大块 skill**(如 **`system-architect`**):模板示例与 ADR 镜像表 **外链** 单一真源,再谈 alpha 转正或大合并。
42
+ 3. **大块 skill**(如 **`system-architect`**):模板示例与 ADR 镜像表 **外链** 单一真源,再谈体积收敛或大合并。
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: design-reviewer
3
- description: 【ALPHA】当 `/challenge` 需要设计侧规范契约闭合证据(架构与系统设计文档三维审查)时加载;产出可锚点、按严重度分级的发现供纳入 07_CHALLENGE_REPORT,不作脱离 challenge 上下文的终局裁决。
3
+ description: `/challenge` 需要设计侧规范契约闭合证据(架构与系统设计文档三维审查)时加载;产出可锚点、按严重度分级的发现供纳入 07_CHALLENGE_REPORT,不作脱离 challenge 上下文的终局裁决。
4
4
  ---
5
5
 
6
- # design-reviewer(ALPHA)
6
+ # design-reviewer
7
7
 
8
8
  > 设计缺陷在实现前被命名,比在上线后被追债便宜一个数量级。
9
9
 
@@ -24,15 +24,15 @@ description: 【ALPHA】当 `/challenge` 需要设计侧规范契约闭合证据
24
24
 
25
25
  ---
26
26
 
27
- ## CRITICAL spec 产出契约
28
-
29
- > [!IMPORTANT]
30
- >
31
- > - **精确**:每条发现附**最小足够锚点**(`path`、明确标题/小节名、或稳定章节 id);禁止仅写「见架构文档」。
32
- > - **可追溯**:「发现 → 引文或概括 → 推理链 → 影响 → 建议」同序可查;无推理链则不得标 Critical/High。
33
- > - **不重复**:同一缺口只保留一条主发现;总览表不粘贴详情长段。
34
- > - **禁填充**:禁止无对象的「需关注」「建议加强」「待优化」;**核心发现清单**内 **发现 / 影响 / 建议** 各**一句**(极短复合句允许)。
35
- > - **质量优于数量**:少数高信号发现优先于大量猜测。
27
+ ## CRITICAL spec 产出契约
28
+
29
+ > [!IMPORTANT]
30
+ > 共用持久化报告契约(精确、有据、不重复、禁泛泛、单写者、子代理闭环)以 **`.agents/skills/output-contract/SKILL.md`** 为准;本 skill 只补充设计审查发现的锚点与严重度要求。
31
+ >
32
+ > - **可追溯**:「发现 → 引文或概括 → 推理链 → 影响 → 建议」同序可查;无推理链则不得标 Critical/High。
33
+ > - **锚点**:每条发现附**最小足够锚点**(`path`、明确标题/小节名、或稳定章节 id);禁止仅写「见架构文档」。
34
+ > - **表内专条**:**核心发现清单**内 **发现 / 影响 / 建议** 各**一句**(极短复合句允许)。
35
+ > - **质量优于数量**:少数高信号发现优先于大量猜测。
36
36
 
37
37
  ---
38
38
 
@@ -1,16 +1,16 @@
1
1
  ---
2
2
  name: e2e-testing-guide
3
- description: 【ALPHA】规定面向真人的 E2E / 手动验证《测试指南》与《E2E Verification》报告骨架(PRD 可追溯、人机走查顺序、评测列仅能 PASS/PARTIAL_PASS/FAIL);**不含实机浏览器编排**——先后顺序与回填义务由宿主 **`/forge` §3.7**(及 alpha 对齐的 forge 条文)统一写死。
3
+ description: 规定面向真人的 E2E / 手动验证《测试指南》与《E2E Verification》报告骨架(PRD 可追溯、人机走查顺序、评测列仅能 PASS/PARTIAL_PASS/FAIL);**不含实机浏览器编排**——先后顺序与回填义务由宿主 **`/forge` §3.7**(及 `/forge` 对应条文)统一写死。
4
4
  ---
5
5
 
6
- # E2E Testing Guide — 人机验证文稿层【ALPHA】
6
+ # E2E Testing Guide — 人机验证文稿层
7
7
 
8
8
  <phase_context>
9
9
  你是 **E2E GUIDE AUTHOR(验证指南撰稿人)**。
10
10
 
11
11
  **使命**:在**未执行或未获授权浏览器实机之前**,产出可让读者「像第一次用产品的人」照着走的《E2E Verification》文档:**读屏先于动作**、入口与覆盖面诚实、每项结论可追到 PRD/验收;不把「写好指南」误认为「测过了」。
12
12
  **能力**:上下文采集与 Blocker 显式化;RTM/Surface/Journey 结构化枚举;与人类探索顺序对齐的步骤拆解;Evidence 类型的预期声明;`/forge` §3.7 约定的落盘文件名与先后顺序对接。
13
- **限制**:不写浏览器自动化协议与本 skill 之外的评测档位;不得在未实机时把 `旅程结果` / `Step 结果` 写成 `PASS`;不得删除下文**硬约束、必遵走查规则、必选表头章节**(仅可压缩复述性旁白);与 **`templates_alpha`** 其它 skill 同工件会话内**禁止**与同路径的 shipped `templates/` 版本混用。
13
+ **限制**:不写浏览器自动化协议与本 skill 之外的评测档位;不得在未实机时把 `旅程结果` / `Step 结果` 写成 `PASS`;不得删除下文**硬约束、必遵走查规则、必选表头章节**(仅可压缩复述性旁白)。
14
14
  **与子代理**:父会话独占 **TARGET_DIR/wave-{N}-e2e.md**(或当前工作流离线路径);子任务只允许返还可以合并的**表块与边界说明**,合并后做一次 **spec 契约**验收再落盘。
15
15
  **Output Goal**:满足 **Required output** 章节的 Markdown 骨架;实机回填由 `/forge` §3.7 第二步在授权后执行。
16
16
  </phase_context>
@@ -253,8 +253,8 @@ ls $repo_path/src/nexus/application/nonexist/ # [!ERROR] → 修正或删除此
253
253
 
254
254
  ```bash
255
255
  # 设置 SKILL_DIR(根据实际安装路径)
256
- # 场景 A: 作为 .agent/skills 安装
257
- SKILL_DIR=".agent/skills/nexus-mapper"
256
+ # 场景 A: 作为 .agents/skills 安装
257
+ SKILL_DIR=".agents/skills/nexus-mapper"
258
258
  # 场景 B: 独立 repo(开发/调试时)
259
259
  SKILL_DIR="/path/to/nexus-mapper"
260
260
 
@@ -40,7 +40,7 @@ python $SKILL_DIR/scripts/git_detective.py $repo_path --days 90 \
40
40
  > $repo_path/.nexus-map/raw/git_stats.json
41
41
  ```
42
42
 
43
- > `$SKILL_DIR` 为本 Skill 的安装路径(`.agent/skills/nexus-mapper` 或独立 repo 路径)。
43
+ > `$SKILL_DIR` 为本 Skill 的安装路径(`.agents/skills/nexus-mapper` 或独立 repo 路径)。
44
44
  > `$repo_path` 为目标仓库的绝对路径。
45
45
  > `extract_ast.py --file-tree-out` 默认排除 `.git/`、`.nexus-map/`、`node_modules/`、`__pycache__/`、`.venv/`、`dist/`、`build/` 等噪音目录及文件。
46
46
 
@@ -42,7 +42,7 @@ python $SKILL_DIR/scripts/extract_ast.py $repo_path > $AST_JSON
42
42
  python $SKILL_DIR/scripts/git_detective.py $repo_path --days 90 > $GIT_JSON
43
43
  ```
44
44
 
45
- > `$SKILL_DIR` 为本 Skill 的安装路径(`.agent/skills/nexus-query` 或独立 repo 路径)。
45
+ > `$SKILL_DIR` 为本 Skill 的安装路径(通常是 `.agents/skills/nexus-query`,投影到目标 IDE 时以该目标的 skills 目录为准)。
46
46
 
47
47
  **依赖安装(首次使用)**:
48
48
  ```bash
@@ -1,99 +1,150 @@
1
- ---
2
- name: runtime-inspector
3
- description: 分析运行时行为、进程边界和 IPC 机制,检测"协议漂移"风险和进程生命周期问题。
4
- ---
5
-
6
- # 窃听者手册 (The Wiretapper's Casebook)
7
-
8
- > "代码会骗人,但进程不会。一个 `.spawn()` 暴露的比一千行注释还多。" —— 老窃听者箴言
9
-
10
- 本技能的工作是**追踪进程间的通信线路**。
11
-
12
- **老师傅核心定律**: 如果两个进程说话,但没人规定它们说什么语言、什么版本、什么格式,那就是一场等待爆发的**协议漂移 (Protocol Mismatch)** 灾难。
13
-
14
- ---
15
-
16
- ## 深度思考要求
17
-
18
- > [!IMPORTANT]
19
- > **运行时分析需要深度思考,思考方式基于模型能力和任务复杂度。**
20
- >
21
- > **核心判断规则**:
22
- > - **无 CoT 模型** → **必须调用** `sequential-thinking` CLI
23
- > - **有 CoT 模型 + 简单项目**(单进程、通信清晰)→ 用思考引导问题组织自然 CoT
24
- > - **有 CoT 模型 + 复杂项目**(多进程、需要修正前提)→ 调用 `sequential-thinking` CLI
25
- >
26
- > 思考内容例如:
27
- > 1. "这个项目有多少个入口点(`main` 函数)?它们是一个进程还是多个?"
28
- > 2. "进程之间用什么通信?Pipe?HTTP?共享数据库?"
29
- > 3. "如果我只更新了 A 进程的通信模块,B 进程会崩吗?有版本握手吗?"
30
-
31
- ---
32
-
33
- ## 任务目标
34
- 识别**运行时边界 (Runtime Boundaries)** **通信契约 (Communication Contracts)**。
35
-
36
- ---
37
-
38
- ## 探索流程 (The Investigation)
39
-
40
- ### 第一步:识别入口点 (Identify Entry Points)
41
- 每个 `main` 函数可能代表一个独立的进程。
42
- * **搜索目标**:
43
- * Rust: `fn main()`, `#[tokio::main]`
44
- * Python: `if __name__ == "__main__":`
45
- * Node: `require.main === module`, package.json 的 `bin`
46
- * Go: `func main()`
47
- * **老师傅直觉**: 找到多个入口点?立刻问:"它们是独立运行的,还是被一个父进程管控的?"
48
-
49
- ### 第二步:追踪生成链 (Trace Spawning)
50
- 如果进程 A 拉起了进程 B,这就是一条"血缘线"。
51
- * **搜索目标**:
52
- * Rust: `Command::new(...)`, `std::process::Stdio`, `tauri-plugin-shell`
53
- * Python: `subprocess.Popen`, `multiprocessing.Process`
54
- * Node: `child_process.spawn`, `child_process.fork`
55
- * **老师傅警报 (Lifecycle Risks)**:
56
- * "父进程死了,子进程知道吗?有心跳吗?" -> **僵尸进程风险 (Zombie Child)**
57
- * "子进程崩溃了,父进程会重启它吗?还是静默失败?" -> **静默故障风险**
58
-
59
- ### 第三步:窃听通信 (Tap the Wire)
60
- 进程之间用什么"说话"?协议在哪里定义?
61
-
62
- * **搜索 Channels (通道)**:
63
- * `Pipe`, `NamedPipe`, `unix_stream`, `zmq`
64
- * `TcpListener`, `UdpSocket`, `websocket`, `http::server`
65
- * **搜索 Protocols (协议)**:
66
- * `Handshake`, `Version`, `MagicBytes`, `schema`
67
- * `protobuf`, `serde_json`, `JSON.parse`, `enum Message`
68
-
69
- * **老师傅核心判断 (Contract Status)**:
70
-
71
- | 发现 | 状态 | 老师傅建议 |
72
- | :--- | :---: | :--- |
73
- | 找到 Channel + 找到 `enum Message` 或 Protobuf 定义 | **Strong** | 契约存在,相对安全。 |
74
- | 找到 Channel + 找到 `Version` 或 `Handshake` 检查 | **Strong** | 有版本协商,很好。 |
75
- | 找到 Channel + 只有 raw JSON/字符串 | **Weak** | 无显式契约。改动一端可能炸另一端。 |
76
- | 找到 Channel + 无任何协议定义 | **None** | **通信黑洞!** 这是高危风险。 |
77
-
78
- ---
79
-
80
- ## IPC 风险模式速查 (来自安全研究)
81
-
82
- | 风险模式 | 检测特征 | 老师傅建议 |
83
- | :--- | :--- | :--- |
84
- | **协议漂移 (Protocol Mismatch)** | Channel 存在,但无 Handshake/Version | 在新功能规划中**强制添加版本握手任务** |
85
- | **僵尸进程 (Zombie Child)** | `spawn` 存在,但无 `Kill on Drop` 或心跳 | 标记进程生命周期管理风险 |
86
- | **单点故障 (SPOF)** | 一个进程管控所有 IPC,无容错 | 建议添加重连/重启逻辑 |
87
- | **Named Pipe 权限漏洞 (Windows)** | 使用 Named Pipe 但未显式设置 Security Descriptor | 高危:默认可能允许 Everyone 访问! |
88
- | **竞态条件 (Race Condition)** | 多进程快速交互,无明确的消息顺序控制 | 建议添加消息序列号或锁机制 |
89
-
90
- ---
91
-
92
- ## 输出清单
93
-
94
- 1. **Process Roots**: 发现的入口点列表(文件路径、角色)。
95
- 2. **Spawning Chains**: 进程生成关系 (A spawns B)。
96
- 3. **IPC Surfaces**: 发现的通信通道(类型、关键词、位置)。
97
- 4. **Contract Status**: `[Strong / Weak / None]`,并说明依据。
98
- 5. **Lifecycle Risks**: 僵尸进程、静默崩溃等风险。
99
- 6. **Security Flags (Windows)**: 如果是 Named Pipe,是否有 ACL 设置?
1
+ ---
2
+ name: runtime-inspector
3
+ description: `/probe` 需要识别运行时入口、进程边界、spawn 链、IPC 通道、协议强度与生命周期风险时加载。只做静态/可观察探测,不修改代码。
4
+ ---
5
+
6
+ # Runtime Inspector(ALPHA)
7
+
8
+ <phase_context>
9
+ 你是 **RUNTIME INSPECTOR(运行时边界探测者)**。
10
+
11
+ **使命**:识别项目实际如何启动、生成进程、通信与失败;为 `/probe` 的 Runtime Topology 与 Risk Matrix 提供证据。
12
+ **能力**:入口点搜索、spawn/fork 链识别、IPC surface 盘点、协议强度分级、生命周期与平台安全风险标注。
13
+ **限制**:不启动长驻服务、不修改代码、不把静态推断写成运行事实;无法确认时明确标注 `Cannot confirm`。
14
+ **Output Goal**:Process Roots、Spawning Chains、IPC Surfaces、Contract Status、Lifecycle Risks、Security Flags。
15
+ </phase_context>
16
+
17
+ ---
18
+
19
+ ## CRITICAL 输出契约
20
+
21
+ > [!IMPORTANT]
22
+ > 持久化报告、证据、单写者与去重复规则遵守 `.agents/skills/output-contract/SKILL.md`。本 skill 输出为 `/probe` 的证据切片。
23
+ >
24
+ > - 强结论必须有路径、关键词或命令结果锚点。
25
+ > - 运行时行为若未实测,只能写“静态证据显示”或 `Cannot confirm`。
26
+ > - IPC 契约分级必须说明依据:通道、消息 schema、版本握手或缺失项。
27
+ > - Windows Named Pipe、权限、父子进程生命周期是高风险优先检查项。
28
+
29
+ ---
30
+
31
+ ## sequential-thinking 规则
32
+
33
+ - 无 CoT 模型:必须调用 `sequential-thinking` CLI。
34
+ - CoT + 简单单进程项目:可用自然 CoT,仍须回答入口、通信、失败三个问题。
35
+ - 有 CoT + 多进程、IPC、spawn/fork、协议推断:调用 `sequential-thinking` CLI。
36
+
37
+ ---
38
+
39
+ ## Step 1: 识别入口点
40
+
41
+ ### 做什么
42
+ 搜索可能代表独立进程的入口:
43
+
44
+ | 语言/平台 | 搜索线索 |
45
+ | --- | --- |
46
+ | Rust | `fn main()`, `#[tokio::main]` |
47
+ | Python | `if __name__ == "__main__":` |
48
+ | Node | `require.main === module`, `package.json` 的 `bin` |
49
+ | Go | `func main()` |
50
+
51
+ ### 为什么
52
+ 入口点决定进程边界;多个入口点通常意味着部署、IPC 或生命周期风险。
53
+
54
+ ### 怎么验收
55
+ - 输出 `Process Roots`:路径、入口类型、推断角色。
56
+ - 多入口时标注“独立进程 / 父进程管理 / Cannot confirm”。
57
+
58
+ ---
59
+
60
+ ## Step 2: 追踪进程生成链
61
+
62
+ ### 做什么
63
+ 搜索父进程启动子进程的线索:
64
+
65
+ | 平台 | 搜索线索 |
66
+ | --- | --- |
67
+ | Rust | `Command::new`, `std::process::Stdio`, `tauri-plugin-shell` |
68
+ | Python | `subprocess.Popen`, `multiprocessing.Process` |
69
+ | Node | `child_process.spawn`, `child_process.fork` |
70
+
71
+ ### 为什么
72
+ spawn 链是生命周期风险来源:父进程退出、子进程崩溃、重启策略、清理策略都需要显式契约。
73
+
74
+ ### 怎么验收
75
+ - 输出 `Spawning Chains`:父路径、子命令/模块、stdio/环境传递方式。
76
+ - 标注 zombie child、silent failure、restart gap、cleanup gap。
77
+
78
+ ---
79
+
80
+ ## Step 3: 识别 IPC Surface
81
+
82
+ ### 做什么
83
+ 搜索通信通道与协议定义:
84
+
85
+ | 类别 | 搜索线索 |
86
+ | --- | --- |
87
+ | Channel | `Pipe`, `NamedPipe`, `unix_stream`, `zmq`, `TcpListener`, `UdpSocket`, `websocket`, `http::server` |
88
+ | Protocol | `Handshake`, `Version`, `MagicBytes`, `schema`, `protobuf`, `serde_json`, `JSON.parse`, `enum Message` |
89
+
90
+ ### 为什么
91
+ 有通道但无 schema、版本或握手,会导致协议漂移;这是多进程项目的核心隐性风险。
92
+
93
+ ### 怎么验收
94
+ - 输出 `IPC Surfaces`:通道类型、位置、协议线索。
95
+ - 每个 IPC surface `Contract Status`。
96
+
97
+ ---
98
+
99
+ ## Contract Status 分级
100
+
101
+ | 状态 | 判定 |
102
+ | --- | --- |
103
+ | Strong | 找到通道 + 显式消息 schema / enum / protobuf,或存在版本握手 |
104
+ | Weak | 找到通道 + raw JSON/string,但缺少集中 schema 或版本 |
105
+ | None | 找到通道,但找不到协议定义 |
106
+ | Cannot confirm | 静态证据不足以确认通道或协议 |
107
+
108
+ ---
109
+
110
+ ## 风险模式
111
+
112
+ | 风险 | 检测特征 | 建议 |
113
+ | --- | --- | --- |
114
+ | Protocol Mismatch | Channel 存在但无 schema/version/handshake | 添加协议 schema 或版本握手任务 |
115
+ | Zombie Child | spawn 存在但无退出清理或心跳 | 增加 kill-on-exit/heartbeat/cleanup 契约 |
116
+ | Silent Failure | 子进程失败无错误传播或重启策略 | 增加错误传播、重试或 supervisor 策略 |
117
+ | Named Pipe Permission Risk | Windows Named Pipe 无显式 ACL | 增加权限边界设计与验证 |
118
+ | Race Condition | 多进程消息无顺序、锁或 idempotency 语义 | 增加序列号、锁或幂等契约 |
119
+
120
+ ---
121
+
122
+ ## Required Output
123
+
124
+ ```markdown
125
+ ## Runtime Inspector Findings
126
+
127
+ ### Process Roots
128
+ | Path | Entrypoint | Role | Confidence |
129
+
130
+ ### Spawning Chains
131
+ | Parent | Child | Channel / stdio | Lifecycle Risk |
132
+
133
+ ### IPC Surfaces
134
+ | Path | Channel | Protocol Evidence | Contract Status |
135
+
136
+ ### Lifecycle Risks
137
+ | Risk | Evidence | Impact | Suggested follow-up |
138
+
139
+ ### Security Flags
140
+ | Flag | Evidence | Severity | Suggested follow-up |
141
+ ```
142
+
143
+ ---
144
+
145
+ <completion_criteria>
146
+ - Process Roots、Spawning Chains、IPC Surfaces、Contract Status、Lifecycle Risks 均已输出或显式 `N/A + 理由`。
147
+ - Strong/Weak/None/Cannot confirm 分级均带依据。
148
+ - 未把静态推断冒充为运行事实。
149
+ - 输出可直接并入 `/probe` 的 Runtime Topology 与 Risk Matrix。
150
+ </completion_criteria>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: spec-writer
3
- description: 【ALPHA】genesis Step 2:将模糊或高层需求转化为严格的产品需求文档(PRD);含 craft 脚手架、PRD spec 契约、可选子代理分片编排与 Step 完成信号。适用于需求含糊、范围过大或表达停留在概念层的场景。
3
+ description: genesis Step 2:将模糊或高层需求转化为严格的产品需求文档(PRD);含 craft 脚手架、PRD spec 契约、可选子代理分片编排与 Step 完成信号。适用于需求含糊、范围过大或表达停留在概念层的场景。
4
4
  ---
5
5
 
6
6
  # 需求侦探手册
@@ -9,9 +9,9 @@ description: 【ALPHA】genesis Step 2:将模糊或高层需求转化为严格
9
9
 
10
10
  你的任务是**消灭歧义**。
11
11
 
12
- ## 【ALPHA】genesis Step 2(范围与衔接)
12
+ ## genesis Step 2(范围与衔接)
13
13
 
14
- 本模板相对 `templates/.agents/skills/spec-writer` 增加 **ALPHA** 侧的 **craft 脚手架**、**spec 契约**(落盘语义)、**子代理编排**与 **completion**;下列「执行清单 / 方法论 / 10 维歧义扫描表 / User Story 质量闸门表」的**规范性效力不变**——追问苏格拉底行为、一次性一个问题、`[NEEDS CLARIFICATION]` 硬上限、Non-Goals 与 User Story 闸门等规则** verbatim 适用**。
14
+ 本模板相对 `templates/.agents/skills/spec-writer` 增加 **craft 脚手架**、**spec 契约**(落盘语义)、**子代理编排**与 **completion**;下列「执行清单 / 方法论 / 10 维歧义扫描表 / User Story 质量闸门表」的**规范性效力不变**——追问苏格拉底行为、一次性一个问题、`[NEEDS CLARIFICATION]` 硬上限、Non-Goals 与 User Story 闸门等规则** verbatim 适用**。
15
15
 
16
16
  ### craft scaffolding(产物脚手架)
17
17