@haaaiawd/anws 2.3.0 → 2.4.0
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/README.md +1 -1
- package/bin/cli.js +52 -22
- package/lib/diff.js +5 -2
- package/lib/init.js +217 -96
- package/lib/install-state.js +18 -3
- package/lib/manifest.js +376 -79
- package/lib/prompt.js +68 -0
- package/lib/resources/index.js +36 -2
- package/lib/update.js +12 -6
- package/package.json +48 -47
- package/templates/.agents/skills/anws-system/SKILL.md +108 -108
- package/templates/.agents/skills/code-reviewer/SKILL.md +170 -115
- package/templates/.agents/skills/concept-modeler/SKILL.md +230 -179
- package/templates/.agents/skills/craft-authoring/SKILL.md +186 -183
- package/templates/.agents/skills/craft-authoring/references/BUNDLE_POLICY.md +61 -0
- package/templates/.agents/skills/design-reviewer/SKILL.md +265 -190
- package/templates/.agents/skills/e2e-testing-guide/SKILL.md +246 -135
- package/templates/.agents/skills/nexus-mapper/SKILL.md +321 -321
- package/templates/.agents/skills/output-contract/SKILL.md +37 -0
- package/templates/.agents/skills/report-template/SKILL.md +92 -92
- package/templates/.agents/skills/sequential-thinking/SKILL.md +222 -225
- package/templates/.agents/skills/spec-writer/SKILL.md +75 -30
- package/templates/.agents/skills/system-architect/SKILL.md +538 -678
- package/templates/.agents/skills/system-designer/SKILL.md +601 -601
- package/templates/.agents/skills/task-planner/SKILL.md +1 -2
- package/templates/.agents/skills/task-reviewer/SKILL.md +428 -388
- package/templates/.agents/skills/tech-evaluator/SKILL.md +252 -144
- package/templates/.agents/workflows/blueprint.md +157 -69
- package/templates/.agents/workflows/challenge.md +331 -497
- package/templates/.agents/workflows/change.md +182 -339
- package/templates/.agents/workflows/craft.md +159 -197
- package/templates/.agents/workflows/design-system.md +202 -674
- package/templates/.agents/workflows/explore.md +187 -399
- package/templates/.agents/workflows/forge.md +650 -609
- package/templates/.agents/workflows/genesis.md +439 -351
- package/templates/.agents/workflows/probe.md +219 -241
- package/templates/.agents/workflows/quickstart.md +302 -123
- package/templates/.agents/workflows/upgrade.md +145 -182
- package/templates_en/.agents/skills/anws-system/SKILL.md +108 -0
- package/templates_en/.agents/skills/code-reviewer/SKILL.md +170 -0
- package/templates_en/.agents/skills/concept-modeler/SKILL.md +230 -0
- package/templates_en/.agents/skills/craft-authoring/SKILL.md +179 -0
- package/templates_en/.agents/skills/craft-authoring/references/BUNDLE_POLICY.md +60 -0
- package/templates_en/.agents/skills/craft-authoring/references/PROMPT_QUALITY_RUBRIC.md +92 -0
- package/templates_en/.agents/skills/craft-authoring/references/SCORECARD_TEMPLATE.md +52 -0
- package/templates_en/.agents/skills/design-reviewer/SKILL.md +265 -0
- package/templates_en/.agents/skills/e2e-testing-guide/SKILL.md +246 -0
- package/templates_en/.agents/skills/nexus-mapper/SKILL.md +306 -0
- package/templates_en/.agents/skills/nexus-mapper/references/language-customization.md +167 -0
- package/templates_en/.agents/skills/nexus-mapper/references/output-schema.md +311 -0
- package/templates_en/.agents/skills/nexus-mapper/references/probe-protocol.md +246 -0
- package/templates_en/.agents/skills/nexus-mapper/scripts/extract_ast.py +706 -0
- package/templates_en/.agents/skills/nexus-mapper/scripts/git_detective.py +194 -0
- package/templates_en/.agents/skills/nexus-mapper/scripts/languages.json +127 -0
- package/templates_en/.agents/skills/nexus-mapper/scripts/query_graph.py +556 -0
- package/templates_en/.agents/skills/nexus-mapper/scripts/requirements.txt +6 -0
- package/templates_en/.agents/skills/nexus-query/SKILL.md +114 -0
- package/templates_en/.agents/skills/nexus-query/scripts/extract_ast.py +706 -0
- package/templates_en/.agents/skills/nexus-query/scripts/git_detective.py +194 -0
- package/templates_en/.agents/skills/nexus-query/scripts/languages.json +127 -0
- package/templates_en/.agents/skills/nexus-query/scripts/query_graph.py +556 -0
- package/templates_en/.agents/skills/nexus-query/scripts/requirements.txt +6 -0
- package/templates_en/.agents/skills/output-contract/SKILL.md +37 -0
- package/templates_en/.agents/skills/report-template/SKILL.md +85 -0
- package/templates_en/.agents/skills/report-template/references/REPORT_TEMPLATE.md +100 -0
- package/templates_en/.agents/skills/runtime-inspector/SKILL.md +101 -0
- package/templates_en/.agents/skills/sequential-thinking/SKILL.md +214 -0
- package/templates_en/.agents/skills/spec-writer/SKILL.md +153 -0
- package/templates_en/.agents/skills/spec-writer/references/prd_template.md +177 -0
- package/templates_en/.agents/skills/system-architect/SKILL.md +538 -0
- package/templates_en/.agents/skills/system-architect/references/rfc_template.md +59 -0
- package/templates_en/.agents/skills/system-designer/SKILL.md +534 -0
- package/templates_en/.agents/skills/system-designer/references/system-design-detail-template.md +187 -0
- package/templates_en/.agents/skills/system-designer/references/system-design-template.md +605 -0
- package/templates_en/.agents/skills/task-planner/SKILL.md +251 -0
- package/templates_en/.agents/skills/task-planner/references/TASK_TEMPLATE_05A.md +109 -0
- package/templates_en/.agents/skills/task-planner/references/TASK_TEMPLATE_05B.md +176 -0
- package/templates_en/.agents/skills/task-reviewer/SKILL.md +428 -0
- package/templates_en/.agents/skills/tech-evaluator/SKILL.md +252 -0
- package/templates_en/.agents/skills/tech-evaluator/references/ADR_TEMPLATE.md +78 -0
- package/templates_en/.agents/workflows/blueprint.md +200 -0
- package/templates_en/.agents/workflows/challenge.md +331 -0
- package/templates_en/.agents/workflows/change.md +182 -0
- package/templates_en/.agents/workflows/craft.md +159 -0
- package/templates_en/.agents/workflows/design-system.md +202 -0
- package/templates_en/.agents/workflows/explore.md +187 -0
- package/templates_en/.agents/workflows/forge.md +651 -0
- package/templates_en/.agents/workflows/genesis.md +439 -0
- package/templates_en/.agents/workflows/probe.md +219 -0
- package/templates_en/.agents/workflows/quickstart.md +303 -0
- package/templates_en/.agents/workflows/upgrade.md +145 -0
- package/templates_en/AGENTS.md +149 -0
|
@@ -1,182 +1,145 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# /upgrade
|
|
6
|
-
|
|
7
|
-
<phase_context>
|
|
8
|
-
你是 **UPGRADE ORCHESTRATOR
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## CRITICAL
|
|
29
|
-
|
|
30
|
-
> [!IMPORTANT]
|
|
31
|
-
>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## Step 1:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
2
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
3
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
### Case B: Major → `/genesis`
|
|
148
|
-
|
|
149
|
-
1. 接下来**必须读取**当前 target 对应的 `/genesis` 原生投影文件
|
|
150
|
-
2. 将 Step 2 的影响分析结果作为新版本演进输入带入 `/genesis`
|
|
151
|
-
3. 后续版本复制、文档演进、Manifest/ADR 变更必须遵守 `/genesis` 的版本管理逻辑
|
|
152
|
-
|
|
153
|
-
### AI 推断填充规则
|
|
154
|
-
|
|
155
|
-
若某段内容需要 AI 基于上下文补全,必须在段前加入:
|
|
156
|
-
|
|
157
|
-
```markdown
|
|
158
|
-
> [!WARNING]
|
|
159
|
-
> AI 推断填充,请人类复核。
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
### 业务常量保护规则
|
|
163
|
-
|
|
164
|
-
以下内容禁止被框架升级覆盖:
|
|
165
|
-
- 业务领域术语
|
|
166
|
-
- 产品目标
|
|
167
|
-
- 用户故事中的业务意图
|
|
168
|
-
- 团队特定约束
|
|
169
|
-
- 自定义系统边界
|
|
170
|
-
|
|
171
|
-
---
|
|
172
|
-
|
|
173
|
-
## 完成报告
|
|
174
|
-
|
|
175
|
-
完成路由后,向用户输出:
|
|
176
|
-
- 升级级别
|
|
177
|
-
- 推荐路由 (`/change` 或 `/genesis`)
|
|
178
|
-
- 计划影响的文件列表
|
|
179
|
-
- 是否预计创建新版本
|
|
180
|
-
- 是否存在 AI 推断填充风险
|
|
181
|
-
- 下一步必须读取的工作流文件
|
|
182
|
-
|
|
1
|
+
---
|
|
2
|
+
description: "【ALPHA】/upgrade:anws update 后读 changelog、定级 Minor/Major、产人类可审计划并路由到 /change 或 /genesis;宿主不替下游落盘长模板。"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /upgrade (ALPHA)
|
|
6
|
+
|
|
7
|
+
<phase_context>
|
|
8
|
+
你是 **UPGRADE ORCHESTRATOR(升级编排师)— ALPHA 线**。
|
|
9
|
+
|
|
10
|
+
**使命**:在 **`anws update` 已完成**的前提下,读取 `.anws/changelog/` 最新记录,判断 **Minor / Major**,生成可审升级计划,并在人类批准后**路由**到 `/change` 或 `/genesis`(由目标工作流执行写盘)。
|
|
11
|
+
**能力**:定位 changelog 与当前 `v{N}`、定级、框架→业务文档影响映射、路由建议、推断段 WARNING 标记规范。
|
|
12
|
+
**限制**:`/upgrade` **只做编排与计划**;**禁止**跳过 changelog、未定级先选路由、未经批准写业务文档;**不**在本文件嵌入完整「人类检查点」长 Markdown 样例。
|
|
13
|
+
**与用户的关系**:先展示计划再行动;批准后显式声明下一工作流。
|
|
14
|
+
**Output Goal**:定级(Minor/Major)+ 影响列表 + 推荐路由 + 推断风险提示;**不**自带完成业务文档修改。
|
|
15
|
+
</phase_context>
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## CRITICAL 凝练与版式(/craft + /challenge 思想)
|
|
20
|
+
|
|
21
|
+
> [!IMPORTANT]
|
|
22
|
+
> **craft**:改稿前 Read shipped `.agents/skills/craft-authoring/SKILL.md` 与 `.agents/workflows/craft.md`;各 `## Step …` 使用 **`### 做什么` / `### 为什么` / `### 怎么验收`**;`<completion_criteria>` 必填。
|
|
23
|
+
> **凝练**:计划与汇报 **一句一事**;定级规则与执行序 **不得削弱** shipped `templates/.../upgrade.md` 的硬约束。
|
|
24
|
+
> **不注入**:人类检查点展示**须含职能**(changelog 路径、当前 `v{N}`、定级、推荐路由、受影响文件+原因、推断风险提示、批准/拒绝/调整)——**不**粘贴整页 fenced 模板。
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## CRITICAL 执行顺序(不可削弱)
|
|
29
|
+
|
|
30
|
+
> [!IMPORTANT]
|
|
31
|
+
> 严格 **Step 0 → 4**;**禁止**跳过 changelog 读取、**禁止**未定级先定路由、**禁止**绕过人类批准直接按记忆改 `.anws/v{N}`、**禁止**不读目标工作流就开写。
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Step 0: 定位升级输入
|
|
36
|
+
|
|
37
|
+
### 做什么
|
|
38
|
+
|
|
39
|
+
1. 列出 `.anws/changelog/` 下**最新** `vX.Y.Z.md`,设 `LATEST_CHANGELOG`;**须真实读入**(会话留一行路径或摘要,禁止口头假设)。
|
|
40
|
+
2. 扫描 `.anws/` 最大 `v{N}` → `CURRENT_ARCH = .anws/v{N}`。
|
|
41
|
+
3. 缺 `changelog` 或无可读版本:停止,提示先 `anws update` 或 `/genesis`。
|
|
42
|
+
|
|
43
|
+
### 为什么
|
|
44
|
+
|
|
45
|
+
无 changelog 则无升级事实源。
|
|
46
|
+
|
|
47
|
+
### 怎么验收
|
|
48
|
+
|
|
49
|
+
- 会话含 `LATEST_CHANGELOG` 与 `CURRENT_ARCH`;能引用 changelog 中至少一类变更(文件级/内容级/影响面)。
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Step 1: 升级定级(Minor / Major)
|
|
54
|
+
|
|
55
|
+
### 做什么
|
|
56
|
+
|
|
57
|
+
按 shipped `upgrade` 规则(**仅** Minor/Major):评估是否需**新架构版本**、是否动目录/多工作流协议、`01`/`02`/`03` **结构语义**、是否需保留旧版兼容叙事。逐条记录**是/否+一句理由**。
|
|
58
|
+
|
|
59
|
+
### 为什么
|
|
60
|
+
|
|
61
|
+
定级决定路由,Patch 级不在本工作流展开。
|
|
62
|
+
|
|
63
|
+
### 怎么验收
|
|
64
|
+
|
|
65
|
+
- 输出明确 `Minor` 或 `Major` 与判定依据;无「未定级就推荐 forge」类跳跃。
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Step 2: 影响分析与路由建议
|
|
70
|
+
|
|
71
|
+
### 做什么
|
|
72
|
+
|
|
73
|
+
1. 按需读 `CURRENT_ARCH` 下 `01`、`02`、`03`、`04`、`05A`、`05B`。
|
|
74
|
+
2. 建「框架变更 → 业务节点」映射;标注路径迁移 / 流程迁移 / 协议迁移三类之一或多类。
|
|
75
|
+
3. 产出**推荐路由**:Minor → **`/change`**;Major → **`/genesis`**。
|
|
76
|
+
4. **本步不写盘**业务文档——只出计划与文件级意图列表。
|
|
77
|
+
|
|
78
|
+
### 为什么
|
|
79
|
+
|
|
80
|
+
upgrade 与执行工作流解耦,避免双写。
|
|
81
|
+
|
|
82
|
+
### 怎么验收
|
|
83
|
+
|
|
84
|
+
- 影响列表每条含:文件、章节/意图、是否可能 AI 推断填充。
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Step 3: 人类检查点
|
|
89
|
+
|
|
90
|
+
### 做什么
|
|
91
|
+
|
|
92
|
+
向用户展示 **CRITICAL 不注入** 所列职能(changelog、`v{N}`、定级、路由、受影响文件、推断风险、批准/拒绝/调整)。**未经明确批准禁止写任何文件。**
|
|
93
|
+
|
|
94
|
+
### 为什么
|
|
95
|
+
|
|
96
|
+
人类是升级风险的最后闸门。
|
|
97
|
+
|
|
98
|
+
### 怎么验收
|
|
99
|
+
|
|
100
|
+
- 用户可见完整决策包;拒绝时零写盘。
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Step 4: 路由到目标工作流
|
|
105
|
+
|
|
106
|
+
### 做什么
|
|
107
|
+
|
|
108
|
+
- **Minor**:读取宿主挂载的 **`/change`** 工作流(若使用 `templates_alpha` overlay 则读同树 `change.md`),将 Step 2 映射作为输入;后续**全部**遵守 `/change` 权限与签名;若执行中发现超出 `/change` → 停止并改 `/genesis`。
|
|
109
|
+
- **Major**:读取 **`/genesis`**(同上 overlay 规则),将 Step 2 作为新版本演进输入;遵守 Copy & Evolve 与版本规则。
|
|
110
|
+
- 需 AI 补全且非纯机械替换的段落:段前加 shipped 规定的 **`> [!WARNING] AI 推断填充,请人类复核。`**
|
|
111
|
+
- **业务常量**(领域术语、产品目标、用户故事业务意图、团队约束、自定义边界)**禁止**被框架升级覆盖。
|
|
112
|
+
|
|
113
|
+
### 为什么
|
|
114
|
+
|
|
115
|
+
写盘语义归属目标工作流,upgrade 只交接。
|
|
116
|
+
|
|
117
|
+
### 怎么验收
|
|
118
|
+
|
|
119
|
+
- 会话声明下一工作流名;若已批准,目标工作流的读盘与门禁已被引用。
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Step 5: 完成报告
|
|
124
|
+
|
|
125
|
+
### 做什么
|
|
126
|
+
|
|
127
|
+
向用户汇总:定级、路由、计划影响文件、是否预计新 `v{N}`、推断填充风险、**下一步须先读**的工作流路径。
|
|
128
|
+
|
|
129
|
+
### 为什么
|
|
130
|
+
|
|
131
|
+
闭环可审计。
|
|
132
|
+
|
|
133
|
+
### 怎么验收
|
|
134
|
+
|
|
135
|
+
- 报告含上述六项;无静默跳转。
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
<completion_criteria>
|
|
140
|
+
- **凝练与版式**:各 Step 三小节齐备;执行序与定级闸门未削弱。
|
|
141
|
+
- changelog 已真实读取;`Minor`/`Major` 与路由一致。
|
|
142
|
+
- Step 3 人类批准或拒绝路径正确;批准前零业务写盘。
|
|
143
|
+
- Step 4 显式绑定 `/change` 或 `/genesis` 并引用其权限;WARNING/业务常量规则已声明。
|
|
144
|
+
- Step 5 完成报告已交付。
|
|
145
|
+
</completion_criteria>
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: anws-system
|
|
3
|
+
description: Use when users in a skills-only environment need to decide which anws workflow to start from, or need routing among forge / change / genesis / probe / blueprint / challenge / upgrade. It is the navigation entry for the anws workflow set.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ANWS System Router Manual
|
|
7
|
+
|
|
8
|
+
You are the **ANWS Router**.
|
|
9
|
+
|
|
10
|
+
Your responsibility is not to replace all workflows directly, but to serve as the unified navigation entry in **skills-only mode**:
|
|
11
|
+
|
|
12
|
+
- Decide which workflow the current request should route to
|
|
13
|
+
- Tell the model which `references/*.md` still need to be read
|
|
14
|
+
- Clarify permission boundaries before execution to avoid mixing `/forge`, `/change`, and `/genesis`
|
|
15
|
+
|
|
16
|
+
## Activation Rules
|
|
17
|
+
|
|
18
|
+
Use this skill when any of the following applies:
|
|
19
|
+
|
|
20
|
+
1. The user does not know which workflow to start with
|
|
21
|
+
2. The user explicitly mentions workflows like `/quickstart`, `/forge`, `/change`, `/genesis`, but the current environment only has skills
|
|
22
|
+
3. The user asks "which process should we follow next"
|
|
23
|
+
4. The request spans multiple phases (design, tasking, implementation) and phase boundaries must be identified first
|
|
24
|
+
|
|
25
|
+
## Mandatory Steps on First Activation
|
|
26
|
+
|
|
27
|
+
1. Read `references/quickstart.md` first
|
|
28
|
+
2. Judge which scenario the current request is closest to
|
|
29
|
+
3. Then read corresponding workflow references as needed
|
|
30
|
+
4. Before finishing required references, do not directly execute write operations of that workflow
|
|
31
|
+
|
|
32
|
+
## Workflow Map
|
|
33
|
+
|
|
34
|
+
- `references/quickstart.md`
|
|
35
|
+
- Purpose: global entry. Determine current project stage and which workflow to call first
|
|
36
|
+
- `references/probe.md`
|
|
37
|
+
- Purpose: system risk probing before taking over legacy projects or major changes
|
|
38
|
+
- `references/genesis.md`
|
|
39
|
+
- Purpose: new project, major refactor, architecture upgrade, or when a new version is needed
|
|
40
|
+
- `references/design-system.md`
|
|
41
|
+
- Purpose: add detailed design docs for a single system
|
|
42
|
+
- `references/blueprint.md`
|
|
43
|
+
- Purpose: decompose architecture design into executable `05A_TASKS.md` and `05B_VERIFICATION_PLAN.md`
|
|
44
|
+
- `references/challenge.md`
|
|
45
|
+
- Purpose: systematically challenge design or task list before coding
|
|
46
|
+
- `references/forge.md`
|
|
47
|
+
- Purpose: execute coding tasks according to `05A_TASKS.md` and verification commitments in `05B_VERIFICATION_PLAN.md`, and maintain Wave progress
|
|
48
|
+
- `references/change.md`
|
|
49
|
+
- Purpose: only fine-tune existing task definitions; do not create new tasks; do not advance implementation status
|
|
50
|
+
- `references/explore.md`
|
|
51
|
+
- Purpose: research, explore, diverge and converge solution options
|
|
52
|
+
- `references/craft.md`
|
|
53
|
+
- Purpose: create workflows, skills, or prompts; scaffolds in **`craft-authoring`** (`skills/craft-authoring/SKILL.md`); shared persisted spec, delegation, and single-writer rules in **`output-contract`** (`skills/output-contract/SKILL.md`).
|
|
54
|
+
- `references/upgrade.md`
|
|
55
|
+
- Purpose: handle upgrade orchestration after `anws update`
|
|
56
|
+
|
|
57
|
+
## Routing Rules
|
|
58
|
+
|
|
59
|
+
### Route 1: Uncertain starting point
|
|
60
|
+
|
|
61
|
+
If the user does not know where to start, or you are unsure about the current stage:
|
|
62
|
+
|
|
63
|
+
1. Read `references/quickstart.md`
|
|
64
|
+
2. Determine the entry point based on project status
|
|
65
|
+
3. Recommend a workflow and explain why
|
|
66
|
+
4. Wait for user confirmation
|
|
67
|
+
|
|
68
|
+
### Route 2: Request is "start coding / continue implementation / do current wave"
|
|
69
|
+
|
|
70
|
+
1. Read `references/forge.md`
|
|
71
|
+
2. Check whether `.anws/v{N}/05A_TASKS.md` and `.anws/v{N}/05B_VERIFICATION_PLAN.md` exist and are defined
|
|
72
|
+
3. If task list is missing, do not implement directly; return to `blueprint` or `genesis`
|
|
73
|
+
4. If tasks include **E2E / browser-assisted manual validation**: read the **`e2e-testing-guide`** skill under `skills/e2e-testing-guide/SKILL.md` (paths follow the target IDE projection).
|
|
74
|
+
5. Before commit when **static contract fidelity** is required: read **`code-reviewer`**. **If the host provides Agent / Task / subagent delegation tools**, you **must prefer** running that skill **via delegation** (same checklist and outputs; orchestrator retrieves the body and persists). **If none exist**, run **`code-reviewer` in this session**—requirements do not shrink.
|
|
75
|
+
|
|
76
|
+
### Route 3: Request is "fine-tune existing tasks / fix wording / adjust acceptance criteria"
|
|
77
|
+
|
|
78
|
+
1. Read `references/change.md`
|
|
79
|
+
2. Confirm only existing tasks are modified, no new tasks added
|
|
80
|
+
3. If new tasks are needed or scope exceeds PRD, route to `genesis`
|
|
81
|
+
|
|
82
|
+
### Route 4: Request is "new project / major refactor / new version / architecture upgrade"
|
|
83
|
+
|
|
84
|
+
1. Read `references/genesis.md`
|
|
85
|
+
2. Enter versioned architecture workflow
|
|
86
|
+
|
|
87
|
+
### Route 5: Request is "research first / probe risk first"
|
|
88
|
+
|
|
89
|
+
- Legacy project or before major change -> `references/probe.md`
|
|
90
|
+
- Technical research or solution exploration -> `references/explore.md`
|
|
91
|
+
|
|
92
|
+
## Boundary Rules
|
|
93
|
+
|
|
94
|
+
1. You are the navigation layer, not a substitute for all workflows
|
|
95
|
+
2. Route to only one primary workflow at a time; if chaining is needed, explain the sequence
|
|
96
|
+
3. Before reading target workflow references, do not pretend the process is already followed
|
|
97
|
+
4. If the user request spans both design and implementation, converge boundaries first, then choose `/change` or `/genesis`
|
|
98
|
+
5. In skills-only mode, workflow details are all under `references/`
|
|
99
|
+
|
|
100
|
+
## Output Format
|
|
101
|
+
|
|
102
|
+
When routing decision is complete, output should include:
|
|
103
|
+
|
|
104
|
+
- Current stage judgment
|
|
105
|
+
- Recommended references to read
|
|
106
|
+
- Recommended workflow to enter
|
|
107
|
+
- Why other workflows are not chosen
|
|
108
|
+
- Whether user confirmation is needed
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-reviewer
|
|
3
|
+
description: 【ALPHA】Pure static "contract fidelity / implementation-side evidence" review: Against PRD, ADR, system design, 05A_TASKS, and 05B_VERIFICATION_PLAN, produce traceable conclusions on contract closure, task fulfillment, architecture health, security boundaries, verification evidence, and backflow consistency; shared by /challenge (CODE/FULL) and /forge (Step 3 §3.6 end-of-wave).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Reviewer — Implementation-side evidence layer【ALPHA】
|
|
7
|
+
|
|
8
|
+
You are **CODE REVIEWER**. Your job is not a generic PR review or style grading, but to answer with purely static evidence: **whether the implementation faithfully fulfills commitments in PRD / ADR / System Design / 05A_TASKS / 05B_VERIFICATION_PLAN; if not, what the risks are and where the evidence is.**
|
|
9
|
+
|
|
10
|
+
## CRITICAL methodological anchors
|
|
11
|
+
|
|
12
|
+
- **Static-only is the boundary**: Only readable artifacts and code form are admitted; anything that depends on processes, networks, browsers, or real runtime ordering must be labeled **cannot be confirmed via static review** or **requires manual verification**, and must not be written as proven.
|
|
13
|
+
- **Contract over intuition**: Ordering and wording follow PRD / ADR / System Design / `05A_TASKS.md` / `05B_VERIFICATION_PLAN.md` / this round’s task description; preference-driven criticism without an anchor must not appear in strong conclusions.
|
|
14
|
+
- **Evidence tiers**: Assertions such as Critical / High / Fail / Pass must cite `**path:line**`; without a location, downgrade to “suspected” or “cannot confirm”; do not overstate certainty.
|
|
15
|
+
- **Root cause over stacking**: Merge similar issues into a fixable root cause; do not inflate severity by duplicate entries.
|
|
16
|
+
|
|
17
|
+
## Hard boundaries (must follow)
|
|
18
|
+
|
|
19
|
+
- **Pure static**: Do not start the project, run Docker, auto-run tests, modify code, or connect to external services.
|
|
20
|
+
- **No exaggeration**: For runtime, network, browser, and external-integration conclusions, only write **cannot be confirmed via static review** or **requires manual verification**.
|
|
21
|
+
- **Evidence**: Strong conclusions such as Critical / High / Pass / Fail must include `**path:line**`. Without evidence, downgrade to “suspected” or “cannot confirm”.
|
|
22
|
+
- **Anchors**: Judgments must trace back to PRD / ADR / System Design / `05A_TASKS.md` / `05B_VERIFICATION_PLAN.md` / this round’s task description.
|
|
23
|
+
|
|
24
|
+
## Severity levels (aligned with challenge reports)
|
|
25
|
+
|
|
26
|
+
**Critical / High / Medium / Low** (consistent with `/challenge`). **Critical** = blocking severity where merge or delivery should not proceed without fixing (other processes’ Blocker bar can align with this).
|
|
27
|
+
|
|
28
|
+
## Activation moments
|
|
29
|
+
|
|
30
|
+
- `**/challenge`**: When `REVIEW_MODE` is `CODE` / `FULL`, or when design/task review **adaptively escalates** to the implementation side.
|
|
31
|
+
- `**/forge`**: Step 3 **§3.6 end-of-wave gate** (mandatory after this wave’s last task’s §3.5 submission completes; **once per wave** by default). After §3.6, `/forge` also has **§3.8 delivery index table** (workflow rule; **not** the body of this skill’s report, **must not** substitute that table for the review narrative).
|
|
32
|
+
|
|
33
|
+
## Execution shape and sub-agent orchestration (delegate to AGENT when available)
|
|
34
|
+
|
|
35
|
+
### What to do
|
|
36
|
+
|
|
37
|
+
- **Preferred**: If the host exposes delegatable **Agent / Task / sub-agent** (collectively **AGENT tools**), this skill **must** be executed by AGENT dedicated to it; the orchestration side prepares input, sends full skill constraints and output shape, invokes AGENT, and places the review body **verbatim** at the `/forge`-mandated path (or authorizes AGENT to write there directly). Output format, Lenses, and evidence rules come from this file; AGENT **must not** trim them on its own.
|
|
38
|
+
- **Sub-agent orchestration (consistent with AGENT-first)**: Orchestration delivers in one shot: "required-reading input list + hard boundaries + six-section output template + on-disk path and first-line format + Issues field contract"; after handoff only do **structured acceptance** (see handoff checklist / completion_criteria), and do not replace Lens walk-through inside the orchestration session.
|
|
39
|
+
- **Fallback**: Only when the host has **no** delegatable AGENT capability does the **current session** fully execute Lenses 1–6 and produce the full text per the six-section "Output structure (concise)" below.
|
|
40
|
+
|
|
41
|
+
### Why
|
|
42
|
+
|
|
43
|
+
Isolate fine-grained implementation reading from orchestration context so evidence rules and Lens coverage are not diluted by “running it informally”.
|
|
44
|
+
|
|
45
|
+
### How to accept
|
|
46
|
+
|
|
47
|
+
**No excuses**: When AGENT tools exist, the current session **must not** substitute to save steps; **must not** lower evidence requirements, skip Lenses, or skip execution because of "insufficient context", "small change", or "time pressure". Session execution without AGENT is normal fallback. `/forge` exemption **only** when the user states it explicitly at wave sign-off.
|
|
48
|
+
|
|
49
|
+
## On-disk requirements (`/forge` path mandatory)
|
|
50
|
+
|
|
51
|
+
When `/forge` §3.6 fires, the full review **must** be written to a physical file:
|
|
52
|
+
|
|
53
|
+
- **Path**: `{TARGET_DIR}/wave-reviews/wave-{N}-review.md` (`{N}` = current wave number).
|
|
54
|
+
- **First line**: `# Wave {N} Code Review — {YYYY-MM-DD}`.
|
|
55
|
+
- **Not on disk = §4.0 hard block**, no exceptions (including AUTO). Self-filled tables or verbal “reviewed” counts as not executed.
|
|
56
|
+
- On user exemption, do not write the review body; instead create `{TARGET_DIR}/wave-reviews/wave-{N}-WAIVED.md` (see `/forge` §3.6 waiver protocol).
|
|
57
|
+
|
|
58
|
+
When `/challenge` triggers, follow that workflow’s report path (default `07_CHALLENGE_REPORT.md` section); **do not** force `wave-reviews/`.
|
|
59
|
+
|
|
60
|
+
## Handoff checklist (orchestration ↔ AGENT ↔ on disk)
|
|
61
|
+
|
|
62
|
+
- [ ] Required inputs are ready, or an acceptable narrowed scope is stated.
|
|
63
|
+
- [ ] AGENT was given the full constraints of this skill (or equivalent summary + explicit “must not omit sections”).
|
|
64
|
+
- [ ] AGENT output includes the six-section structure; each Issue satisfies **CRITICAL: Issues output contract** below.
|
|
65
|
+
- [ ] `/forge`: `wave-{N}-review.md` path and first-line format are correct, or `wave-{N}-WAIVED.md` was generated per rules.
|
|
66
|
+
- [ ] Strong conclusions all have `path:line`, or were downgraded to suspected / cannot confirm.
|
|
67
|
+
|
|
68
|
+
## completion_criteria (this review counts as complete if and only if)
|
|
69
|
+
|
|
70
|
+
- Lenses 1–6 are all covered, or each has a one-line “not applicable”.
|
|
71
|
+
- Summary is one of Pass / Partial Pass / Fail / Cannot Confirm (static sense), and matches Issue severities.
|
|
72
|
+
- "Review scope and static boundaries" honestly lists unread items and items needing manual verification.
|
|
73
|
+
- `/forge` on-disk requirements are met, or the user explicitly waived and completed the WAIVED flow.
|
|
74
|
+
|
|
75
|
+
## Required reading
|
|
76
|
+
|
|
77
|
+
1. `src/` (or the repo’s agreed implementation root)
|
|
78
|
+
2. `{TARGET_DIR}/01_PRD.md`, `02_ARCHITECTURE_OVERVIEW.md`, `03_ADR/`, `04_SYSTEM_DESIGN/`
|
|
79
|
+
3. `{TARGET_DIR}/05A_TASKS.md`
|
|
80
|
+
4. `{TARGET_DIR}/05B_VERIFICATION_PLAN.md`
|
|
81
|
+
5. If present: `{TARGET_DIR}/07_CHALLENGE_REPORT.md`
|
|
82
|
+
|
|
83
|
+
When inputs are missing, narrow scope and state it in the output.
|
|
84
|
+
|
|
85
|
+
## Thinking order (risk first, conclusions back to contract)
|
|
86
|
+
|
|
87
|
+
README/config → entry / routing / CLI → authn & authz → core business / data model → admin / debug endpoints → tests / logs → UI (if applicable).
|
|
88
|
+
|
|
89
|
+
## Review surfaces (Lenses 1–6)
|
|
90
|
+
|
|
91
|
+
### What to do
|
|
92
|
+
|
|
93
|
+
Review each of the six lenses in turn; the final report may organize by findings, but each lens needs a conclusion or one line “not applicable”.
|
|
94
|
+
|
|
95
|
+
### Why
|
|
96
|
+
|
|
97
|
+
Keep contract, delivery, architecture, static safety, verification, and backflow under one evidence standard.
|
|
98
|
+
|
|
99
|
+
### How to accept
|
|
100
|
+
|
|
101
|
+
When applicable, give conclusion + evidence; when not, one sentence. Strong conclusions carry `**path:line**`.
|
|
102
|
+
|
|
103
|
+
### Lens 1: Contract fidelity
|
|
104
|
+
|
|
105
|
+
Do public API / CLI / config keys / layout / error semantics match PRD, ADR, System Design? Any public contract introduced without backflow? Typical: `Contract Drift`, `Undocumented Contract`, `Static Verifiability Gap`.
|
|
106
|
+
|
|
107
|
+
### Lens 2: Task fulfillment and delivery closure
|
|
108
|
+
|
|
109
|
+
Do `05A_TASKS.md` outputs, acceptance, and boundaries, and `05B_VERIFICATION_PLAN.md` plans/evidence requirements, have real implementation/test/docs coverage? Are Mock/Stub/Hardcode boundaries clear; could they leak into production paths? Typical: `Task Drift`, `Acceptance Gap`, `Mock Boundary Risk`.
|
|
110
|
+
|
|
111
|
+
### Lens 3: Architecture fit and complexity health
|
|
112
|
+
|
|
113
|
+
Module boundaries, dependency direction, data model, state flow vs Architecture / System Design? Single-file pile-up, over-abstraction, high coupling, or hard-to-test structure? For UI, only structure and interaction that affect usability; no pure aesthetic demerits. Typical: `Architecture Drift`, `Complexity Risk`, `Maintainability Gap`.
|
|
114
|
+
|
|
115
|
+
### Lens 4: Runtime risk from static evidence and security boundaries
|
|
116
|
+
|
|
117
|
+
From static evidence: input validation, error paths, edge cases, duplication/concurrency, cleanup/rollback; auth entry and route/object/function-level authz, tenant isolation, admin protection, secrets and PII leakage. Security first; without direct evidence use “suspected” or “cannot confirm”. Typical: `Safety Gap`, `Auth Boundary Gap`, `Input/Error Path Risk`, `Sensitive Data Exposure`.
|
|
118
|
+
|
|
119
|
+
### Lens 5: Verification evidence and observability
|
|
120
|
+
|
|
121
|
+
Do test/verification entry points exist? Minimal coverage mapping for core requirements and high risk? Assertions too weak or prone to false positives? Logs diagnosable without leaking secrets? Coverage wording: `sufficient` / `basically covered` / `insufficient` / `missing` / `not applicable` / `cannot confirm`. Typical: `Test Drift`, `Foundational Test Gap`, `Observability Gap`.
|
|
122
|
+
|
|
123
|
+
### Lens 6: Backflow consistency and handoff evidence
|
|
124
|
+
|
|
125
|
+
Are new public behaviors synced to README / CLI help / changelog / ADR / System Design / task status? Export entry points, manifest, registry, install/update paths consistent? Enough handoff information? Typical: `Missing Change Backflow`, `Documentation Drift`, `Handoff Gap`.
|
|
126
|
+
|
|
127
|
+
## Output structure (concise)
|
|
128
|
+
|
|
129
|
+
1. **Summary conclusion**: Pass / Partial Pass / Fail / Cannot Confirm (static sense).
|
|
130
|
+
2. **Review scope and static boundaries**: What was read, what was not, what was deliberately not run, what needs manual verification.
|
|
131
|
+
3. **Contract → code mapping summary**: Core promises → corresponding implementation areas (short).
|
|
132
|
+
4. **Lens result summary**: One line per applicable Lens + evidence.
|
|
133
|
+
5. **Issues**: Critical → High → Medium → Low; each satisfies **CRITICAL: Issues output contract**.
|
|
134
|
+
6. **Security / test coverage addendum**: Only high-risk gaps and boundaries that cannot be confirmed statically.
|
|
135
|
+
|
|
136
|
+
## CRITICAL: Issues output contract (per-item fields; one-line fill preferred)
|
|
137
|
+
|
|
138
|
+
Each Issue **must** be parseable into the following fields (one line with `|` separators or fixed subheadings; information must not be missing):
|
|
139
|
+
|
|
140
|
+
`Severity` | `Lens` | `Title` | `Evidence` (`**path:line**` or multiple points) | `Impact` | `Minimum fix` | `Anchor` (corresponding PRD/ADR/Task/Verify snippet or section pointer)
|
|
141
|
+
|
|
142
|
+
- **Severity**: Critical / High / Medium / Low.
|
|
143
|
+
- **Lens**: L1–L6 or combination (e.g. L2+L4).
|
|
144
|
+
- **Title**: Short label; may include typical type names (e.g. `Contract Drift`).
|
|
145
|
+
- **Evidence**: If not locatable, write "no static location: suspected" and downgrade severity or move to a “cannot confirm” style note; do not fake Critical/High.
|
|
146
|
+
- **Concision (challenge-aligned)**: `Title` / `Impact` / `Minimum fix`—**one sentence each** (tiny compound allowed); **merge** same root cause; no synonym spam for count.
|
|
147
|
+
|
|
148
|
+
## Discipline (self-check before strong conclusions)
|
|
149
|
+
|
|
150
|
+
### What to do
|
|
151
|
+
|
|
152
|
+
Before issuing Critical/High, Pass, Fail, or equivalent strong assertions, check each item below.
|
|
153
|
+
|
|
154
|
+
### Why
|
|
155
|
+
|
|
156
|
+
Prevent packaging speculation, repeated symptoms, or personal preference as blocking conclusions.
|
|
157
|
+
|
|
158
|
+
### How to accept
|
|
159
|
+
|
|
160
|
+
If any check fails, reword or downgrade.
|
|
161
|
+
|
|
162
|
+
- Is there a direct `**path:line**`?
|
|
163
|
+
- Is this a static fact, or implying unproven runtime behavior?
|
|
164
|
+
- Is this the root cause or a repeated symptom?
|
|
165
|
+
- Is the judgment anchored to PRD/tasks/ADR, not personal preference?
|
|
166
|
+
- When uncertain, is it written as **cannot be confirmed via static review**?
|
|
167
|
+
|
|
168
|
+
## Skip protocol
|
|
169
|
+
|
|
170
|
+
If there is no `src/` or scope does not apply: output `Code review skipped` + one line of reason; do not fabricate review results.
|