claude-everything-workflow 0.2.2 → 0.2.4

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 (92) hide show
  1. package/.agents/plugins/marketplace.json +12 -0
  2. package/.claude-plugin/hooks.json +33 -0
  3. package/.claude-plugin/marketplace.json +12 -0
  4. package/.claude-plugin/plugin.json +10 -0
  5. package/.codex-plugin/plugin.json +20 -0
  6. package/AGENTS.md +13 -18
  7. package/CLAUDE.md +1 -5
  8. package/README.md +101 -368
  9. package/README.zh-CN.md +158 -0
  10. package/agents/database-reviewer.md +0 -3
  11. package/agents/e2e-runner.md +8 -141
  12. package/commands/code-review.md +9 -30
  13. package/commands/pr.md +1 -6
  14. package/commands/verify.md +7 -11
  15. package/docs/plugins.md +91 -0
  16. package/harness/manifest.json +310 -0
  17. package/package.json +14 -2
  18. package/references/git-worktrees.md +29 -0
  19. package/rules/01-base.md +9 -26
  20. package/rules/02-code-size.md +5 -9
  21. package/rules/03-architecture.md +8 -22
  22. package/rules/04-error-handling.md +4 -5
  23. package/rules/05-git-workflow.md +6 -3
  24. package/rules/06-comments.md +3 -9
  25. package/rules/07-forbidden.md +4 -3
  26. package/rules/common/agent-orchestration.md +2 -4
  27. package/rules/common/context-hygiene.md +2 -0
  28. package/rules/common/hooks.md +2 -0
  29. package/rules/common/pr-automation.md +1 -1
  30. package/rules/common/skills-learning.md +2 -2
  31. package/rules/common/testing.md +10 -2
  32. package/scripts/install-rules.js +100 -0
  33. package/scripts/install.ps1 +29 -3
  34. package/scripts/install.sh +26 -2
  35. package/scripts/legacy-common-rule-hashes.json +78 -0
  36. package/scripts/retired-skill-files.json +26 -0
  37. package/scripts/upstream-capability-map.json +14 -9
  38. package/scripts/verify/continuation-checks.test.js +101 -0
  39. package/scripts/verify/core.js +1 -0
  40. package/scripts/verify/grilling-spec-gate-checks.js +48 -11
  41. package/scripts/verify/install-rules.test.js +165 -0
  42. package/scripts/verify/metadata-checks.js +35 -26
  43. package/scripts/verify/plugin-distribution.test.js +40 -0
  44. package/scripts/verify/repository-checks.js +39 -80
  45. package/scripts/verify/skill-invocation.test.js +87 -0
  46. package/scripts/verify/skill-manifest-checks.js +197 -0
  47. package/scripts/verify/skill-manifest-checks.test.js +135 -0
  48. package/scripts/verify/workflow-checks.js +28 -150
  49. package/scripts/verify-harness.js +2 -0
  50. package/scripts/verify-upstream-capability-map.js +2 -1
  51. package/skills/README.md +11 -15
  52. package/skills/code-review/SKILL.md +54 -41
  53. package/skills/codebase-design/SKILL.md +1 -1
  54. package/skills/continuous-learning-v2/SKILL.md +4 -2
  55. package/skills/domain-modeling/SKILL.md +9 -6
  56. package/skills/e2e-testing/SKILL.md +20 -310
  57. package/skills/e2e-testing/references/playwright-patterns.md +324 -0
  58. package/skills/feature-acceptance/SKILL.md +6 -2
  59. package/skills/grilling/SKILL.md +4 -3
  60. package/skills/handoff/SKILL.md +3 -4
  61. package/skills/handoff/agents/openai.yaml +5 -0
  62. package/skills/implement/SKILL.md +32 -81
  63. package/skills/implement/references/ticket-delivery.md +43 -0
  64. package/skills/improve-codebase-architecture/SKILL.md +1 -2
  65. package/skills/improve-codebase-architecture/agents/openai.yaml +5 -0
  66. package/skills/prototype/SKILL.md +1 -1
  67. package/skills/resolving-merge-conflicts/SKILL.md +1 -1
  68. package/skills/spec-gate/SKILL.md +4 -2
  69. package/skills/subagent-driven-development/SKILL.md +3 -3
  70. package/skills/systematic-debugging/SKILL.md +41 -3
  71. package/skills/systematic-debugging/references/diagnostic-scenarios.md +28 -0
  72. package/skills/test-driven-development/SKILL.md +6 -2
  73. package/skills/to-tickets/SKILL.md +5 -3
  74. package/skills/triage/SKILL.md +4 -4
  75. package/skills/triage/agents/openai.yaml +5 -0
  76. package/skills/using-superpowers/SKILL.md +33 -96
  77. package/skills/using-superpowers/references/process-outcomes.md +44 -0
  78. package/skills/visual-companion/SKILL.md +1 -1
  79. package/agents/architect.md +0 -59
  80. package/agents/code-reviewer.md +0 -28
  81. package/agents/planner.md +0 -40
  82. package/agents/tdd-guide.md +0 -101
  83. package/references/agents/database-reviewer.md +0 -657
  84. package/skills/find-skills/SKILL.md +0 -142
  85. package/skills/iterative-retrieval/SKILL.md +0 -84
  86. package/skills/project-context/SKILL.md +0 -94
  87. package/skills/project-context/agents/openai.yaml +0 -6
  88. package/skills/project-context/references/project-context-template.md +0 -61
  89. package/skills/research/SKILL.md +0 -48
  90. package/skills/using-git-worktrees/SKILL.md +0 -64
  91. package/skills/verification-before-completion/SKILL.md +0 -77
  92. package/skills/wayfinder/SKILL.md +0 -57
@@ -0,0 +1,310 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "description": "CEW Harness 的 Skill 元数据与流程职责唯一登记表。",
4
+ "skills": [
5
+ {
6
+ "name": "code-review",
7
+ "path": "skills/code-review/SKILL.md",
8
+ "owner": "skills/code-review/SKILL.md",
9
+ "version": "0.1.1",
10
+ "compatibility": [
11
+ "claude-code",
12
+ "codex"
13
+ ],
14
+ "allowedTools": null,
15
+ "invocation": "implicit"
16
+ },
17
+ {
18
+ "name": "codebase-design",
19
+ "path": "skills/codebase-design/SKILL.md",
20
+ "owner": "skills/codebase-design/SKILL.md",
21
+ "version": "0.1.1",
22
+ "compatibility": [
23
+ "claude-code",
24
+ "codex"
25
+ ],
26
+ "allowedTools": null,
27
+ "invocation": "implicit"
28
+ },
29
+ {
30
+ "name": "continuous-learning-v2",
31
+ "path": "skills/continuous-learning-v2/SKILL.md",
32
+ "owner": "skills/continuous-learning-v2/SKILL.md",
33
+ "version": "2.1.0",
34
+ "compatibility": [
35
+ "claude-code",
36
+ "codex"
37
+ ],
38
+ "allowedTools": null,
39
+ "invocation": "implicit"
40
+ },
41
+ {
42
+ "name": "domain-modeling",
43
+ "path": "skills/domain-modeling/SKILL.md",
44
+ "owner": "skills/domain-modeling/SKILL.md",
45
+ "version": "0.1.2",
46
+ "compatibility": [
47
+ "claude-code",
48
+ "codex"
49
+ ],
50
+ "allowedTools": null,
51
+ "invocation": "implicit"
52
+ },
53
+ {
54
+ "name": "e2e-testing",
55
+ "path": "skills/e2e-testing/SKILL.md",
56
+ "owner": "skills/e2e-testing/SKILL.md",
57
+ "version": "0.1.1",
58
+ "compatibility": [
59
+ "claude-code",
60
+ "codex"
61
+ ],
62
+ "allowedTools": null,
63
+ "invocation": "implicit"
64
+ },
65
+ {
66
+ "name": "feature-acceptance",
67
+ "path": "skills/feature-acceptance/SKILL.md",
68
+ "owner": "skills/feature-acceptance/SKILL.md",
69
+ "version": "0.1.1",
70
+ "compatibility": [
71
+ "claude-code",
72
+ "codex"
73
+ ],
74
+ "allowedTools": null,
75
+ "invocation": "implicit"
76
+ },
77
+ {
78
+ "name": "grilling",
79
+ "path": "skills/grilling/SKILL.md",
80
+ "owner": "skills/grilling/SKILL.md",
81
+ "version": "0.1.1",
82
+ "compatibility": [
83
+ "claude-code",
84
+ "codex"
85
+ ],
86
+ "allowedTools": null,
87
+ "invocation": "implicit"
88
+ },
89
+ {
90
+ "name": "handoff",
91
+ "path": "skills/handoff/SKILL.md",
92
+ "owner": "skills/handoff/SKILL.md",
93
+ "version": "0.1.1",
94
+ "compatibility": [
95
+ "claude-code",
96
+ "codex"
97
+ ],
98
+ "allowedTools": null,
99
+ "invocation": "implicit"
100
+ },
101
+ {
102
+ "name": "implement",
103
+ "path": "skills/implement/SKILL.md",
104
+ "owner": "skills/implement/SKILL.md",
105
+ "version": "0.1.1",
106
+ "compatibility": [
107
+ "claude-code",
108
+ "codex"
109
+ ],
110
+ "allowedTools": null,
111
+ "invocation": "implicit"
112
+ },
113
+ {
114
+ "name": "improve-codebase-architecture",
115
+ "path": "skills/improve-codebase-architecture/SKILL.md",
116
+ "owner": "skills/improve-codebase-architecture/SKILL.md",
117
+ "version": "0.1.1",
118
+ "compatibility": [
119
+ "claude-code",
120
+ "codex"
121
+ ],
122
+ "allowedTools": null,
123
+ "invocation": "implicit"
124
+ },
125
+ {
126
+ "name": "prototype",
127
+ "path": "skills/prototype/SKILL.md",
128
+ "owner": "skills/prototype/SKILL.md",
129
+ "version": "0.1.1",
130
+ "compatibility": [
131
+ "claude-code",
132
+ "codex"
133
+ ],
134
+ "allowedTools": null,
135
+ "invocation": "implicit"
136
+ },
137
+ {
138
+ "name": "resolving-merge-conflicts",
139
+ "path": "skills/resolving-merge-conflicts/SKILL.md",
140
+ "owner": "skills/resolving-merge-conflicts/SKILL.md",
141
+ "version": "0.1.0",
142
+ "compatibility": [
143
+ "claude-code",
144
+ "codex"
145
+ ],
146
+ "allowedTools": null,
147
+ "invocation": "implicit"
148
+ },
149
+ {
150
+ "name": "spec-gate",
151
+ "path": "skills/spec-gate/SKILL.md",
152
+ "owner": "skills/spec-gate/SKILL.md",
153
+ "version": "0.1.1",
154
+ "compatibility": [
155
+ "claude-code",
156
+ "codex"
157
+ ],
158
+ "allowedTools": null,
159
+ "invocation": "implicit"
160
+ },
161
+ {
162
+ "name": "subagent-driven-development",
163
+ "path": "skills/subagent-driven-development/SKILL.md",
164
+ "owner": "skills/subagent-driven-development/SKILL.md",
165
+ "version": "0.1.1",
166
+ "compatibility": [
167
+ "claude-code",
168
+ "codex"
169
+ ],
170
+ "allowedTools": null,
171
+ "invocation": "implicit"
172
+ },
173
+ {
174
+ "name": "systematic-debugging",
175
+ "path": "skills/systematic-debugging/SKILL.md",
176
+ "owner": "skills/systematic-debugging/SKILL.md",
177
+ "version": "0.1.1",
178
+ "compatibility": [
179
+ "claude-code",
180
+ "codex"
181
+ ],
182
+ "allowedTools": null,
183
+ "invocation": "implicit"
184
+ },
185
+ {
186
+ "name": "test-driven-development",
187
+ "path": "skills/test-driven-development/SKILL.md",
188
+ "owner": "skills/test-driven-development/SKILL.md",
189
+ "version": "0.1.1",
190
+ "compatibility": [
191
+ "claude-code",
192
+ "codex"
193
+ ],
194
+ "allowedTools": null,
195
+ "invocation": "implicit"
196
+ },
197
+ {
198
+ "name": "to-tickets",
199
+ "path": "skills/to-tickets/SKILL.md",
200
+ "owner": "skills/to-tickets/SKILL.md",
201
+ "version": "0.1.0",
202
+ "compatibility": [
203
+ "claude-code",
204
+ "codex"
205
+ ],
206
+ "allowedTools": null,
207
+ "invocation": "implicit"
208
+ },
209
+ {
210
+ "name": "triage",
211
+ "path": "skills/triage/SKILL.md",
212
+ "owner": "skills/triage/SKILL.md",
213
+ "version": "0.1.1",
214
+ "compatibility": [
215
+ "claude-code",
216
+ "codex"
217
+ ],
218
+ "allowedTools": null,
219
+ "invocation": "implicit"
220
+ },
221
+ {
222
+ "name": "using-superpowers",
223
+ "path": "skills/using-superpowers/SKILL.md",
224
+ "owner": "skills/using-superpowers/SKILL.md",
225
+ "version": "0.1.3",
226
+ "compatibility": [
227
+ "claude-code",
228
+ "codex"
229
+ ],
230
+ "allowedTools": null,
231
+ "invocation": "implicit"
232
+ },
233
+ {
234
+ "name": "visual-companion",
235
+ "path": "skills/visual-companion/SKILL.md",
236
+ "owner": "skills/visual-companion/SKILL.md",
237
+ "version": "0.1.1",
238
+ "compatibility": [
239
+ "claude-code",
240
+ "codex"
241
+ ],
242
+ "allowedTools": null,
243
+ "invocation": "implicit"
244
+ }
245
+ ],
246
+ "ownership": [
247
+ {
248
+ "id": "routing",
249
+ "owner": "skills/using-superpowers/SKILL.md",
250
+ "surfaces": [
251
+ "AGENTS.md",
252
+ "rules/08-specialty-rules-index.md",
253
+ "rules/common/skills-learning.md"
254
+ ],
255
+ "enforcement": "advisory"
256
+ },
257
+ {
258
+ "id": "verification",
259
+ "owner": "rules/common/testing.md",
260
+ "surfaces": [
261
+ "commands/verify.md",
262
+ "rules/common/testing.md"
263
+ ],
264
+ "enforcement": "blocking"
265
+ },
266
+ {
267
+ "id": "review",
268
+ "owner": "skills/code-review/SKILL.md",
269
+ "surfaces": [
270
+ "commands/code-review.md",
271
+ "rules/common/pr-automation.md"
272
+ ],
273
+ "enforcement": "blocking"
274
+ },
275
+ {
276
+ "id": "testing",
277
+ "owner": "skills/test-driven-development/SKILL.md",
278
+ "surfaces": [
279
+ "rules/common/testing.md"
280
+ ],
281
+ "enforcement": "advisory"
282
+ },
283
+ {
284
+ "id": "worktree-isolation",
285
+ "owner": "rules/05-git-workflow.md",
286
+ "surfaces": [
287
+ "rules/05-git-workflow.md"
288
+ ],
289
+ "enforcement": "blocking"
290
+ },
291
+ {
292
+ "id": "learning",
293
+ "owner": "skills/continuous-learning-v2/SKILL.md",
294
+ "surfaces": [
295
+ "commands/learn.md",
296
+ "rules/common/skills-learning.md"
297
+ ],
298
+ "enforcement": "advisory"
299
+ },
300
+ {
301
+ "id": "ticket-delivery",
302
+ "owner": "skills/to-tickets/SKILL.md",
303
+ "surfaces": [
304
+ "skills/implement/SKILL.md",
305
+ "skills/subagent-driven-development/SKILL.md"
306
+ ],
307
+ "enforcement": "blocking"
308
+ }
309
+ ]
310
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-everything-workflow",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Claude Code and Codex harness with rules, skills, agents, hooks, and verification gates.",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -17,17 +17,28 @@
17
17
  },
18
18
  "scripts": {
19
19
  "verify": "node scripts/verify-harness.js",
20
+ "test:manifest": "node scripts/verify/skill-manifest-checks.test.js",
21
+ "test:invocation": "node scripts/verify/skill-invocation.test.js",
22
+ "test:continuation": "node scripts/verify/continuation-checks.test.js",
23
+ "test:install-rules": "node scripts/verify/install-rules.test.js",
24
+ "test:plugins": "node --test scripts/verify/plugin-distribution.test.js",
20
25
  "verify:upstream": "node scripts/verify-upstream-capability-map.js",
21
26
  "pack:dry-run": "npm pack --dry-run"
22
27
  },
23
28
  "dependencies": {
24
- "commonmark": "0.31.2"
29
+ "commonmark": "0.31.2",
30
+ "yaml": "2.9.0"
25
31
  },
26
32
  "files": [
33
+ ".claude-plugin/",
34
+ ".codex-plugin/",
35
+ ".agents/plugins/marketplace.json",
27
36
  "AGENTS.md",
28
37
  "CLAUDE.md",
29
38
  "LICENSE",
30
39
  "README.md",
40
+ "README.zh-CN.md",
41
+ "docs/plugins.md",
31
42
  "settings.json",
32
43
  "agents/",
33
44
  "bin/",
@@ -35,6 +46,7 @@
35
46
  "hooks/",
36
47
  "references/",
37
48
  "rules/",
49
+ "harness/",
38
50
  "scripts/",
39
51
  "skills/"
40
52
  ],
@@ -0,0 +1,29 @@
1
+ # Worktree 操作参考
2
+
3
+ 仅在需要具体操作时读取。隔离触发条件、基线和提交授权以 `rules/05-git-workflow.md` 为准。
4
+
5
+ 先检查仓库状态,优先复用属于当前任务的合适工作区,不覆盖用户改动:
6
+
7
+ ```sh
8
+ git status --short
9
+ git rev-parse --abbrev-ref HEAD
10
+ git rev-parse --show-toplevel
11
+ git worktree list
12
+ ```
13
+
14
+ 需要新建时,按 Git 规则取得最新基线,替换以下占位符;Codex 分支默认用 `codex/` 前缀:
15
+
16
+ ```sh
17
+ git worktree add ../<repo>-<task> -b codex/<task> <base-ref>
18
+ ```
19
+
20
+ 不得嵌套 worktree。后续实现、测试、审查在任务工作区完成;依赖仅按项目需要安装。交付时报告工作区、分支、基线和验证结果。
21
+
22
+ 用户授权清理后,确认任务已合并或放弃、目标工作区无待保留改动,再执行:
23
+
24
+ ```sh
25
+ git worktree remove <worktree-path>
26
+ git branch -d codex/<task>
27
+ ```
28
+
29
+ 清理前核对解析后的绝对路径,确保目标属于本次授权范围。不得强制删除用户改动;`git branch -D` 仅在用户明确允许删除未合并分支时使用。
package/rules/01-base.md CHANGED
@@ -1,26 +1,9 @@
1
- ## 执行原则
2
-
3
- - 先理解用户目标、真实调用链和现有实现;可查事实自行读取,不把探索问题交给用户。
4
- - 只做能追溯到用户需求、失败用例或验收标准的改动;无关问题只记录,不顺手重构。
5
- - 不同答案会实质改变结果时,只询问仍无法发现的用户决策;高风险假设不得静默选择。
6
- - 将任务转成可检查的完成标准;验证范围匹配风险,具体策略见 `rules/common/testing.md`。
7
-
8
- ## 最小且正确的实现
9
-
10
- 先理解真实调用链,再按顺序选择第一种能完整满足需求的方案:
11
-
12
- 1. 先判断必要性:需求是否真的需要实现,拒绝推测性范围。
13
- 2. 复用现有实现、类型、模式或公共入口。
14
- 3. 优先标准库或平台原生能力。
15
- 4. 优先已安装依赖,不为少量代码新增依赖。
16
- 5. 最后才写最小新增代码,并修在所有相关调用方共同经过的根因位置。
17
-
18
- 最小不等于草率:不得省略安全、输入校验、错误处理、兼容性、无障碍、用户明确要求或必要验证。
19
-
20
- ## 流程边界
21
-
22
- - 默认走最短适用闭环:理解范围、实施最小改动、运行相称验证、报告证据和风险。
23
- - 多文件、新功能、普通行为变化和复杂度本身都不是完整流程触发条件,只影响实施与验证强度。
24
- - 非平凡任务的路由、关键决策、正式 Spec 和交付拓扑以 `skills/using-superpowers/SKILL.md` 为唯一权威来源。
25
- - 只有显式正式 Spec 请求或高风险边界(如高回滚成本边界)才进入正式流程;发现真实用户决策时按 Router 使用 grilling。
26
- - 需要正式 Spec 的任务,Spec 未获用户批准前不得实施;外部写入、提交、推送、PR 和不可逆操作继续受对应 Rules、Skills 与 Commands 的授权边界约束。
1
+ # 执行原则
2
+
3
+ - 先理解用户目标和真实调用链,可查事实自行读取。只询问会实质改变结果且无法查明的用户决策。
4
+ - 改动必须对应需求、失败用例或验收标准;保留已有用户改动,无关问题只记录。
5
+ - 优先复用项目现有入口、标准库和已安装依赖;最后才写最小新增代码,并修在共同根因位置。
6
+ - 最小实现不得省略安全、输入校验、错误处理、兼容性、无障碍和必要验证。
7
+ - 目标项目的架构、lint、类型、测试和风格配置优先于本套通用默认值;没有配置时才使用相关规则的回退建议。
8
+ - 流程路由与升级条件只由 `skills/using-superpowers/SKILL.md` 维护;验证范围见 `rules/common/testing.md`,
9
+ Git 与授权见 `rules/05-git-workflow.md`。不在 rules 重写 Skill 的状态机。
@@ -1,11 +1,7 @@
1
- # 代码规模约束 (CRITICAL)
1
+ # 代码规模
2
2
 
3
- 机械检查由 Hook 强制(`hooks/check-code-size.js`,随编辑触发),模型无需复述数值:
3
+ 优先执行目标项目已有的 lint 和规模约束。`hooks/check-code-size.js` 提供兼容性短警告,不代替项目标准;
4
+ Markdown 不受该检查。Hook 的配置与关闭方式见 `rules/common/hooks.md`。
4
5
 
5
- - 单代码文件约 800 行、单测试文件 1000 行、单行 120 字符,超限由 Hook 输出短警告。
6
- - 文档、设计稿、规则说明和 Markdown 不受检查。
7
-
8
- 需要判断力的部分由模型执行:
9
-
10
- - 非 Hook 检查的约束:函数/方法 ≤ 80 行(提取子函数)、函数参数 ≤ 5 个(封装为对象)、嵌套层级 ≤ 4 层(提前返回)。
11
- - 超限警告出现时,评估职责是否应拆分,而不是机械压缩代码。
6
+ 没有项目约束时,用函数约 80 行、参数 5 个、嵌套 4 层作为职责审查提示。超限先判断职责和可读性,
7
+ 不为满足数值拆出透传层,也不机械压缩代码;文件和行长由 Hook 提示,不在规则中重复维护。
@@ -1,26 +1,12 @@
1
- # 架构原则
1
+ # 架构与兼容
2
2
 
3
- ## 核心原则 (CRITICAL)
4
-
5
- - 单一职责、高内聚低耦合;接口隐藏实现细节,依赖方向清晰。
6
- - DRY 只消除已经出现的重复,不为推测性复用创建抽象。
7
- - KISS:优先现有模式、标准库、平台原生能力和最小正确实现。
8
- - 状态转换保持显式;优先不可变更新,避免调用方依赖隐式副作用。
9
- - 抽象必须降低调用方复杂度;单实现接口、未来配置和透传层默认不增加。
10
-
11
- ## 结构与局部性
12
-
13
- - 按业务或领域组织代码,相关实现、测试和类型就近放置。
14
- - 后端保持请求处理、业务规则、数据访问和领域模型之间的职责边界。
15
- - 前端保持 UI 展示、状态/业务逻辑和外部请求之间的职责边界。
16
- - 只有出现稳定的跨域复用后才抽取 `common`、`shared` 或 `utils`。
17
-
18
- ## 重构与兼容
19
-
20
- - 只处理影响当前需求的代码异味;保留现有功能和公共接口,除非用户批准破坏性变更。
21
- - 变更应增量、可验证、可回退;必要迁移保持向后兼容并明确退出条件。
22
- - 正常路径和边界路径都必须有相称验证。
3
+ - 遵循目标项目的目录、分层和依赖方向;仅调整影响当前需求的职责与耦合。
4
+ - 优先现有实现、标准库和已安装依赖。抽象应隐藏细节、减少调用方复杂度;不为假设的复用增加接口或透传层。
5
+ - 实现、测试和类型保持局部性;跨域共用目录只承接已出现的稳定复用。
6
+ - 状态变化显式,遵循项目更新惯例;保留公共接口和既有工作流,破坏性变更需用户批准。
7
+ - 重构增量、可验证、可回退,正常与边界路径有相称验证。
23
8
 
24
9
  ## 跨平台脚本
25
10
 
26
- 自动化脚本优先使用 Node.js 等跨平台方案,避免依赖特定 shell;调用包管理器时自动检测 npm、pnpm、yarn 或 bun,并兼容 Windows、macOS 和 Linux。
11
+ 优先复用项目脚本运行时;本项目使用 Node.js。必须兼容 Windows/macOS/Linux 的路径和进程调用,
12
+ 按目标项目锁文件或配置选择 npm、pnpm、yarn 或 bun,不硬编码开发机路径。
@@ -1,6 +1,5 @@
1
- # 错误处理 (CRITICAL)
1
+ # 错误处理
2
2
 
3
- - 不忽略错误:使用具体异常、上下文、类型区分和统一处理;可用早返回、错误边界、错误转换和日志记录。
4
- - HTTP 错误由拦截器统一处理,业务 API 调用不自行 `try/catch` 并提示通用失败。
5
- - 降级、特殊提示或批量部分失败可以在业务层显式处理。
6
- - 其他异步错误必须用 `try/catch` 或 Promise `catch` 处理,不能吞掉错误。
3
+ - 错误必须保留原因和必要上下文,不吞错、不把失败伪装为成功。
4
+ - 沿用目标项目已有的错误边界、中间件或调用方处理约定;每个错误有明确处理责任,避免逐层重复捕获和提示。
5
+ - 降级、重试与批量部分失败应显式区分;异步拒绝必须有处理方。
@@ -1,11 +1,14 @@
1
1
  # Git 提交规范
2
2
 
3
+ 需要创建、复用或清理 worktree 的具体命令时,按需读取 `references/git-worktrees.md`;隔离条件和授权边界仍以本规则为准。
4
+
3
5
  ## Worktree 分支开发 (CRITICAL)
4
6
 
5
- - 除只读分析和单文件修改外,所有代码、配置、Harness 改动必须先创建独立 `git worktree` 和任务分支。
7
+ - 开发新功能必须使用独立 `git worktree` 和任务分支,单文件新功能也不例外;已有属于本任务且基线正确的 worktree 直接复用。
8
+ - 非新功能按隔离需要判断:存在可能被覆盖的用户改动、并行写入、受保护分支上的实现或高风险改动时使用 worktree。干净任务分支上的普通修复、文档或配置整理不按文件数量强制创建。
6
9
  - 创建 worktree 前必须检查当前仓库状态,确认基础分支、当前分支和未提交改动。
7
- - 开发新功能时,除非用户明确指定其他基础分支,必须先拉取最新远端 `main`,再从最新 `origin/main` 创建独立 `git worktree` 和任务分支;不得以过期的本地 `main` 或当前功能分支作为基础。仓库不存在 `main` 时,先向用户确认替代基础分支。
8
- - 不在原始 checkout 中做实现、测试和提交;实现、验证、审查、提交都应在任务 worktree 内完成。
10
+ - 为新功能新建 worktree 时,除非用户明确指定其他基础分支,必须先拉取最新远端 `main`,再从最新 `origin/main` 创建工作区和任务分支;不得以过期的本地 `main` 或其他功能分支作为基础。仓库不存在 `main` 时,先向用户确认替代基础分支。复用正在执行本任务的 worktree 时保留已记录的基线,不因远端推进重置进行中的工作。
11
+ - 需要隔离时,实现、验证、审查、提交都在任务 worktree 内完成,不改原始 checkout。
9
12
  - 不创建嵌套 worktree,不丢弃或覆盖用户已有改动。
10
13
 
11
14
  ## 提交格式 (CRITICAL)
@@ -1,10 +1,4 @@
1
- # 注释规范
1
+ # 注释
2
2
 
3
- ## 必须注释的场景
4
-
5
- 复杂业务逻辑、非常规实现、公共 API、重要配置、正则、算法和魔法数字必须注释:分别说明业务或计算规则、原因、接口、配置作用和范围、匹配规则、复杂度,以及数字含义或常量来源。
6
-
7
- ## 注释格式
8
-
9
- - 公共 API 使用文档注释,说明参数和返回值;内部注释解释“为什么”,例如为等待 DOM 更新而延后执行。
10
- - 代码应自解释;不写只重复“做什么”的注释,例如“遍历数组”。
3
+ 沿用项目文档惯例。注释说明不明显的原因、约束、兼容性处理、复杂算法或外部契约;
4
+ 公共 API 按项目要求提供文档。自解释代码不补逐句说明,不重复类型已表达的参数和返回值。
@@ -1,9 +1,10 @@
1
1
  # 禁止事项 (CRITICAL)
2
2
 
3
- ## 代码禁止
3
+ ## 代码检查
4
4
 
5
- - `console.log`、`debugger`、`@ts-ignore`、`@ts-nocheck` 和 `any` 由 Hook 静态检查(`hooks/check-console-log.js`,随编辑触发);`dynamic`、循环依赖和 emoji 属于审查判断项。
6
- - 它们分别破坏类型安全、隐藏问题、增加耦合或带来编码、性能问题。
5
+ - 调试残留、类型抑制和耦合问题按目标项目标准检查;不得为掩盖真实错误添加抑制或绕过检查。
6
+ - `hooks/check-console-log.js` 提示 `console.log`、`debugger`、`@ts-ignore`、`@ts-nocheck` 和 `any`。
7
+ 这是兼容性警告,需结合真实用途判断;项目正常 CLI 输出或边界类型不因字符串命中而被禁止。
7
8
 
8
9
  ## 安全禁止
9
10
 
@@ -4,13 +4,11 @@
4
4
 
5
5
  - 简单、明确、低风险且上下文连贯的任务由当前 agent 直接完成。
6
6
  - 只有独立搜索、失败日志、专项审查或可安全并行的交付能减少主上下文噪音时才委派。
7
- - 非平凡任务的 Skill/Agent 选择和交付拓扑以 `skills/using-superpowers/SKILL.md` 为权威来源。
7
+ - 工程交付及明确请求的工程工作流的 Skill/Agent 选择和交付拓扑以 `skills/using-superpowers/SKILL.md` 为权威来源。
8
8
 
9
9
  ## 交付拓扑
10
10
 
11
- - 跨会话或需要可恢复依赖图的范围使用 `skills/to-tickets/SKILL.md`;单会话连贯范围直接实施。
12
- - 只有至少两张已批准、无 blocker、写入面不重叠的 frontier tickets 才使用 `skills/subagent-driven-development/SKILL.md`。
13
- - 不能证明安全并行时串行执行;不得为使用多 Agent 人为拆分任务。
11
+ to-tickets / implement / subagent-driven-development 的选择判据以 `skills/using-superpowers/SKILL.md` 为唯一权威来源;不能在无法证明安全并行时人为拆分任务。
14
12
 
15
13
  ## 上下文与权限
16
14
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  上下文是下一轮推理需要的工作集,不是完整聊天、日志或目录归档。
4
4
 
5
+ 针对同一证据缺口最多进行三轮检索,不通过改名或重新起轮绕过上限;证据足够、无新增信息或达到用户明确的时间、成本或范围限制时提前停止。三轮后仍不足,报告已有证据和缺口,等待用户明确要求继续,不自行追加轮次。
6
+
5
7
  ## 摘要边界
6
8
 
7
9
  保留目标、已确认决策、关键文件、待办与阻塞、验证结果、风险和必须解决的用户问题。删除大段原文、完整日志、目录树、已排除分支、无关偏好和没有证据的评价。
@@ -11,6 +11,8 @@
11
11
  - 摘要字段以 `rules/common/context-hygiene.md` 为唯一来源;不按轮数机械总结,不保存完整 transcript,不覆盖用户规则和决策;敏感内容只记录风险和证据位置,不持久化原值。
12
12
  - `ECC_HOOK_PROFILE` 支持 `minimal`、默认 `standard` 和 `strict`;`ECC_DISABLED_HOOKS` 禁用指定 Hook ID。
13
13
  - 会阻止提交的质量门 Hook 默认关闭,只有团队明确需要时启用。
14
+ - `check-code-size` 与 `check-console-log` 是兼容性提示,不替代目标项目 lint 或类型规则;项目已有等价检查
15
+ 或约定不适用时,可用 `ECC_DISABLED_HOOKS` 关闭相应提示,不能借此绕过项目质量门。
14
16
 
15
17
  ## 权限
16
18
 
@@ -5,7 +5,7 @@ Git、分支、提交和外部授权以 `rules/05-git-workflow.md` 为准;验
5
5
  ## PR 契约
6
6
 
7
7
  - PR 前完成选定的最终验证;描述只记录真实结果、未运行项和剩余风险。
8
- - CI 至少覆盖适用的 lint/format、测试/构建和关键 E2E;失败时保留 trace、screenshot、HTML report 和 `test-results`。
8
+ - CI 至少覆盖适用的 lint/format、测试/构建和关键 E2E;失败制品保留清单见 `skills/e2e-testing/SKILL.md`。
9
9
  - 新提交应取消同一 PR 的过期 CI 运行,避免重复消耗。
10
10
  - 没有模板时,描述包含背景、核心改动、验证、风险与回滚。
11
11
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Skills 工作流
4
4
 
5
- 正式 skill 目录保持 `skills/<skill-name>/SKILL.md` 平铺结构;分类维护在 `skills/README.md`。Skill 创建和更新遵循本规则;开放生态中的 skill 查找和安装由 `find-skills` 处理。
5
+ 正式 skill 目录保持 `skills/<skill-name>/SKILL.md` 平铺结构;分类维护在 `skills/README.md`。Skill 创建和更新遵循本规则;开放生态中的 skill 查找和安装按用户明确请求使用宿主已有工具,安装前核对来源与所需权限。
6
6
 
7
7
  - 目录名和 frontmatter `name` 使用小写 kebab-case;`description` 同时描述能力和触发场景。
8
8
  - 正文只写模型不能可靠推导的流程、边界和验证;详细资料放一层 `references/`。
@@ -11,7 +11,7 @@
11
11
 
12
12
  ## 路由权威来源
13
13
 
14
- - 非平凡任务读取 `skills/using-superpowers/SKILL.md`;不要因为多文件或普通复杂度加载完整 process skill 链。
14
+ - 工程交付及明确请求的工程工作流读取 `skills/using-superpowers/SKILL.md`;不要因为多文件或普通复杂度加载完整 process skill 链。
15
15
  - 全局门禁以 `rules/01-base.md` 为准;ticket/SDD 以 `rules/common/agent-orchestration.md` 和当前 Skill 为准。
16
16
  - 不凭记忆执行 skill;用户指令、AGENTS/CLAUDE 和项目 Rules 优先。
17
17
 
@@ -1,5 +1,12 @@
1
1
  # 测试与验证
2
2
 
3
+ ## 完成声明的证据
4
+
5
+ - 声明完成、修复、通过或 ready 前,必须有本轮针对最终状态的验证证据。选择足以支持结论的最小检查,读取输出和退出码,并逐项对照用户要求;修复结论须有原问题复现或回归验证。
6
+ - 本轮已有证据且相关状态未变时直接复用;仅在新改动、失败或未消除的疑点出现后重跑。检查失败按 `skills/systematic-debugging/SKILL.md` 的分级入口处理,预期的 TDD RED 留在实现循环。
7
+ - 委派结果须由控制者检查差异和必要验证,不能仅凭子代理自报完成。
8
+ - 报告实际检查命令或人工步骤及结果,说明未运行项、原因和剩余风险;结论不得超出证据覆盖范围。
9
+
3
10
  ## 默认策略
4
11
 
5
12
  - 先识别仓库已有的 lint、format、单测、类型、构建和 E2E 命令,不发明替代流程。
@@ -15,7 +22,8 @@
15
22
  4. 类型与构建:跨模块接口和真实产物。
16
23
  5. E2E:核心用户路径、认证、跨服务和发布冒烟。
17
24
 
18
- 覆盖率目标保持 `>= 80%`;关键路径合并前必须覆盖或明确缺口。全量 build 成本高时可先用更窄检查获得反馈,但最终质量门不能省略。
25
+ 覆盖率与最终质量门服从目标项目配置;关键路径合并前必须覆盖或明确缺口。不为低风险文档或纯配置整理
26
+ 制造没有行为价值的测试;使用解析、配置校验或既有验证器。全量 build 成本高时先用更窄检查反馈。
19
27
 
20
28
  ## 行为变化
21
29
 
@@ -25,4 +33,4 @@
25
33
 
26
34
  ## 端到端测试
27
35
 
28
- Playwright 的组织、等待、POM、CI 制品和 flake 处理以 `skills/e2e-testing/SKILL.md` 为准;探索工具不能替代可重复的 E2E。本地多 worktree 运行时隔离端口和环境变量,启动服务必须等待 Web/API ready。CI 失败时保留 trace、screenshot、HTML report 和 `test-results`。
36
+ Playwright 的组织、等待、POM、CI 制品和 flake 处理以 `skills/e2e-testing/SKILL.md` 为准;探索工具不能替代可重复的 E2E。本地多 worktree 运行时隔离端口和环境变量,启动服务必须等待 Web/API ready。CI 失败时按 `skills/e2e-testing/SKILL.md` 保留失败制品。