claude-everything-workflow 0.2.3 → 0.2.5
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/.agents/plugins/marketplace.json +12 -0
- package/.claude-plugin/hooks.json +33 -0
- package/.claude-plugin/marketplace.json +12 -0
- package/.claude-plugin/plugin.json +10 -0
- package/.codex-plugin/plugin.json +20 -0
- package/AGENTS.md +11 -17
- package/README.md +107 -404
- package/README.zh-CN.md +158 -0
- package/agents/database-reviewer.md +0 -3
- package/commands/pr.md +2 -2
- package/docs/plugins.md +91 -0
- package/harness/manifest.json +8 -44
- package/hooks/check-code-size.js +1 -1
- package/package.json +8 -1
- package/references/git-worktrees.md +29 -0
- package/rules/02-implementation.md +27 -0
- package/rules/05-git-workflow.md +4 -1
- package/rules/08-specialty-rules-index.md +1 -1
- package/rules/09-first-principles-adversarial-testing.md +1 -2
- package/rules/common/agent-orchestration.md +1 -1
- package/rules/common/context-hygiene.md +2 -0
- package/rules/common/skills-learning.md +1 -1
- package/rules/common/testing.md +7 -0
- package/scripts/install.ps1 +3 -1
- package/scripts/install.sh +3 -1
- package/scripts/retired-skill-files.json +9 -0
- package/scripts/verify/continuation-checks.test.js +101 -0
- package/scripts/verify/core.js +1 -0
- package/scripts/verify/grilling-spec-gate-checks.js +37 -6
- package/scripts/verify/install-rules.test.js +11 -2
- package/scripts/verify/metadata-checks.js +65 -26
- package/scripts/verify/plugin-distribution.test.js +40 -0
- package/scripts/verify/repository-checks.js +7 -22
- package/scripts/verify/skill-invocation.test.js +3 -2
- package/scripts/verify/skill-manifest-checks.js +1 -1
- package/scripts/verify/skill-manifest-checks.test.js +12 -0
- package/scripts/verify/workflow-checks.js +3 -69
- package/skills/README.md +3 -6
- package/skills/continuous-learning-v2/SKILL.md +4 -2
- package/skills/domain-modeling/SKILL.md +6 -4
- package/skills/feature-acceptance/SKILL.md +6 -2
- package/skills/grilling/SKILL.md +3 -2
- package/skills/handoff/agents/openai.yaml +3 -0
- package/skills/implement/SKILL.md +3 -3
- package/skills/improve-codebase-architecture/agents/openai.yaml +3 -0
- package/skills/spec-gate/SKILL.md +12 -22
- package/skills/spec-gate/references/spec-template.md +23 -0
- package/skills/subagent-driven-development/SKILL.md +1 -1
- package/skills/systematic-debugging/SKILL.md +37 -5
- package/skills/systematic-debugging/references/debugging-methods.md +30 -0
- package/skills/systematic-debugging/references/diagnostic-scenarios.md +28 -0
- package/skills/triage/agents/openai.yaml +3 -0
- package/skills/using-superpowers/SKILL.md +9 -5
- package/skills/using-superpowers/references/process-outcomes.md +10 -7
- package/references/agents/database-reviewer.md +0 -657
- package/rules/02-code-size.md +0 -7
- package/rules/03-architecture.md +0 -12
- package/rules/04-error-handling.md +0 -5
- package/rules/06-comments.md +0 -4
- package/skills/iterative-retrieval/SKILL.md +0 -84
- package/skills/using-git-worktrees/SKILL.md +0 -67
- package/skills/verification-before-completion/SKILL.md +0 -78
|
@@ -25,31 +25,7 @@ function bindContext(context) {
|
|
|
25
25
|
} = context);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
function checkReadmeWorkflowContract() {
|
|
29
|
-
requireTokens("README.md", [
|
|
30
|
-
"Ticket-first 工程交付闭环",
|
|
31
|
-
"using-superpowers",
|
|
32
|
-
"?key=",
|
|
33
|
-
"4 小时",
|
|
34
|
-
"using-git-worktrees",
|
|
35
|
-
"iterative-retrieval",
|
|
36
|
-
"to-tickets",
|
|
37
|
-
"implement",
|
|
38
|
-
"subagent-driven-development",
|
|
39
|
-
"verification-before-completion",
|
|
40
|
-
"完整流程适用时",
|
|
41
|
-
"没有批准的必需 Spec 不进入 ticket 或 implement",
|
|
42
|
-
"没有用户审核不进入实现",
|
|
43
|
-
"没有 failing test,不写行为代码",
|
|
44
|
-
"没有 review 不标记任务完成",
|
|
45
|
-
"没有新鲜验证证据,不声明完成、通过、已修复或 ready",
|
|
46
|
-
"没有 verify,不进入 PR",
|
|
47
|
-
"`/learn eval --preview` 是非阻塞学习建议门",
|
|
48
|
-
]);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
28
|
function checkSuperpowersDevLoop() {
|
|
52
|
-
checkReadmeWorkflowContract();
|
|
53
29
|
|
|
54
30
|
requireTokens("rules/01-base.md", [
|
|
55
31
|
"# 执行原则",
|
|
@@ -218,13 +194,6 @@ function checkRouteOrdering() {
|
|
|
218
194
|
|
|
219
195
|
function checkWorkflowDocuments() {
|
|
220
196
|
runWorkflowOwnershipChecks({ read, fail, managedFiles });
|
|
221
|
-
requireTokens("skills/iterative-retrieval/SKILL.md", [
|
|
222
|
-
"事实、证据和盲点缺口",
|
|
223
|
-
"复杂、高风险、多文件或长周期",
|
|
224
|
-
"skills/grilling/SKILL.md",
|
|
225
|
-
"skills/spec-gate/SKILL.md",
|
|
226
|
-
"返回 `skills/using-superpowers/SKILL.md`",
|
|
227
|
-
]);
|
|
228
197
|
requireTokens("skills/using-superpowers/SKILL.md", [
|
|
229
198
|
"shortest applicable path",
|
|
230
199
|
"File count, new features, and ordinary complexity affect",
|
|
@@ -277,15 +246,6 @@ function checkComplexityRules() {
|
|
|
277
246
|
"rules/01-base.md should not classify new or multi-file behavior work as full-flow by default",
|
|
278
247
|
);
|
|
279
248
|
}
|
|
280
|
-
requireTokens("README.md", [
|
|
281
|
-
"直接提出 grilling 请求",
|
|
282
|
-
"`/to-spec`",
|
|
283
|
-
"`grilling` 是唯一需求澄清引擎",
|
|
284
|
-
"默认最短闭环",
|
|
285
|
-
"按风险逐级升级",
|
|
286
|
-
"完整流程适用时",
|
|
287
|
-
"明确低风险且无未决决策",
|
|
288
|
-
]);
|
|
289
249
|
}
|
|
290
250
|
|
|
291
251
|
function checkGrillingWorkflow() {
|
|
@@ -296,10 +256,6 @@ function checkGrillingWorkflow() {
|
|
|
296
256
|
}
|
|
297
257
|
|
|
298
258
|
function checkSuperpowersRoutingConsistency() {
|
|
299
|
-
requireTokens("skills/iterative-retrieval/SKILL.md", [
|
|
300
|
-
"返回 `skills/using-superpowers/SKILL.md` 重新路由",
|
|
301
|
-
"不要自行枚举或调用下一 skill",
|
|
302
|
-
]);
|
|
303
259
|
requireTokens("skills/using-superpowers/SKILL.md", [
|
|
304
260
|
"explicit formal Spec",
|
|
305
261
|
"high-risk boundary",
|
|
@@ -312,19 +268,6 @@ function checkSuperpowersRoutingConsistency() {
|
|
|
312
268
|
"Spec Gate contract conflict",
|
|
313
269
|
]);
|
|
314
270
|
|
|
315
|
-
const retrieval = read("skills/iterative-retrieval/SKILL.md");
|
|
316
|
-
for (const staleRoute of [
|
|
317
|
-
"交接到 `brainstorming`、`test-driven-development` 或 `executing-plans` skill",
|
|
318
|
-
"再进入 `brainstorming`、`test-driven-development` 或 `executing-plans`",
|
|
319
|
-
]) {
|
|
320
|
-
if (retrieval.includes(staleRoute)) {
|
|
321
|
-
fail(
|
|
322
|
-
"skills/iterative-retrieval/SKILL.md should return to the router " +
|
|
323
|
-
`instead of enumerating follow-up skills: ${staleRoute}`,
|
|
324
|
-
);
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
|
|
328
271
|
}
|
|
329
272
|
|
|
330
273
|
function readCapabilityManifest(manifestPath) {
|
|
@@ -588,6 +531,9 @@ function checkRemovedSkillReferences() {
|
|
|
588
531
|
}
|
|
589
532
|
|
|
590
533
|
const retiredSkills = [
|
|
534
|
+
"iterative-retrieval",
|
|
535
|
+
"using-git-worktrees",
|
|
536
|
+
"verification-before-completion",
|
|
591
537
|
"discover-unknowns-zh",
|
|
592
538
|
"skill-creator",
|
|
593
539
|
"writing-plans",
|
|
@@ -618,18 +564,6 @@ function checkRemovedSkillReferences() {
|
|
|
618
564
|
}
|
|
619
565
|
}
|
|
620
566
|
|
|
621
|
-
requireTokens("README.md", [
|
|
622
|
-
"Skill 迁移说明",
|
|
623
|
-
"`discover-unknowns-zh` 已退休",
|
|
624
|
-
"`iterative-retrieval`",
|
|
625
|
-
"`research`",
|
|
626
|
-
"`prototype`",
|
|
627
|
-
"`to-tickets`",
|
|
628
|
-
"`implementation-notes`、`explainer` 和 `quiz` 工件链不再属于",
|
|
629
|
-
"`skill-creator` 已退休",
|
|
630
|
-
"`rules/common/skills-learning.md`",
|
|
631
|
-
"scripts/upstream-capability-map.json",
|
|
632
|
-
]);
|
|
633
567
|
requireTokens("scripts/retired-skill-files.json", retiredSkills);
|
|
634
568
|
requireTokens("rules/common/skills-learning.md", [
|
|
635
569
|
"Skill 创建和更新遵循本规则",
|
package/skills/README.md
CHANGED
|
@@ -10,16 +10,14 @@
|
|
|
10
10
|
|
|
11
11
|
## Process / 门禁
|
|
12
12
|
|
|
13
|
-
- `using-superpowers
|
|
13
|
+
- `using-superpowers`:工程交付及明确请求的工程工作流的 skill 路由、优先级和完成声明纪律。
|
|
14
14
|
- `grilling`:对计划、设计或重大用户决策进行单问式压力测试。
|
|
15
15
|
- `spec-gate`:显式 formal spec 或高风险任务的零访谈成稿、自审和用户批准门。
|
|
16
|
-
- `using-git-worktrees`:新功能必须使用 worktree;其他隔离条件与复用方式按 Git 规则执行。
|
|
17
16
|
- `to-tickets`:把已批准工作拆成 tracer-bullet tickets 和 blocking graph。
|
|
18
17
|
- `implement`:执行用户授权的低风险 direct scope、已批准 Spec scope 或 frontier ticket;仅 ticket 路径 claim、resolve 并刷新 frontier。
|
|
19
18
|
- `subagent-driven-development`:router 对已授权范围发现多个相互独立的 frontier tickets 时,分派到隔离 worktree 的 fresh subagent。
|
|
20
19
|
- `triage`:对 Issue/外部 PR 分类、验证并形成 agent-ready brief。
|
|
21
20
|
- `handoff`:将当前上下文脱敏压缩到临时 Markdown,供全新 session 接续。
|
|
22
|
-
- `verification-before-completion`:完成、通过、已修复或 ready 声明前的新鲜验证门。
|
|
23
21
|
|
|
24
22
|
## 旁路设计能力
|
|
25
23
|
|
|
@@ -36,12 +34,11 @@
|
|
|
36
34
|
- `systematic-debugging`:区分普通明确失败与疑难故障;预期 TDD RED 留在实现循环。
|
|
37
35
|
- `resolving-merge-conflicts`:按双方原始意图逐 hunk 解决 merge/rebase 冲突。
|
|
38
36
|
- `e2e-testing`:Playwright E2E 模式、CI、制品和 flaky 处理。
|
|
39
|
-
- `feature-acceptance
|
|
37
|
+
- `feature-acceptance`:用户明确要求真实流程验收、截图或日志证据时,输出用例矩阵与复核结论。
|
|
40
38
|
|
|
41
39
|
## Harness / 上下文与编排
|
|
42
40
|
|
|
43
|
-
- `
|
|
44
|
-
- `continuous-learning-v2`:Hook 观察、project/global instinct、学习评估和演化。
|
|
41
|
+
- `continuous-learning-v2`:学习系统的观察 Hook、project/global instinct、学习评估和演化。
|
|
45
42
|
|
|
46
43
|
## Learn / 学习沉淀
|
|
47
44
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: continuous-learning-v2
|
|
3
|
-
description: "
|
|
3
|
+
description: "管理学习系统的观察 Hook、instinct 评估、迁移和演化;用于明确配置或管理该学习系统的请求。"
|
|
4
4
|
version: 2.1.0
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -10,11 +10,13 @@ version: 2.1.0
|
|
|
10
10
|
|
|
11
11
|
## 何时使用
|
|
12
12
|
|
|
13
|
-
-
|
|
13
|
+
- 配置或排查学习系统的自动观察 Hook。
|
|
14
14
|
- 查看、审查、迁移 project/global instincts。
|
|
15
15
|
- 判断 project instinct 是否应推广到 global。
|
|
16
16
|
- 评估 instinct 是否应演化为 skill、command 或 agent。
|
|
17
17
|
|
|
18
|
+
其他 Hook 配置和一般知识学习问题不触发本 skill。
|
|
19
|
+
|
|
18
20
|
## 核心模型
|
|
19
21
|
|
|
20
22
|
- **Observation**:Hook 记录工具调用,默认写入 `${XDG_DATA_HOME:-~/.local/share}/ecc-homunculus/projects/<project-id>/observations.jsonl`。
|
|
@@ -72,11 +72,13 @@ direct user approval to maintain domain docs during the session. In that mode:
|
|
|
72
72
|
|
|
73
73
|
1. Use confirmed context and ADR locations from `docs/agent-workflow/project-context.md` when present,
|
|
74
74
|
otherwise from existing repository conventions or the user's confirmed request.
|
|
75
|
-
2.
|
|
76
|
-
|
|
77
|
-
3.
|
|
75
|
+
2. Reuse existing maintenance authorization for stable glossary edits within the approved paths and scope;
|
|
76
|
+
do not request per-term approval. Show the diff when reporting progress or completion.
|
|
77
|
+
3. If maintenance is not yet authorized, obtain approval before writing. New paths or scope, changes to
|
|
78
|
+
confirmed decisions, and unresolved consequential decisions require approval before the affected edit.
|
|
79
|
+
4. Offer an ADR only when the decision is hard to reverse, surprising without context and the result
|
|
78
80
|
of a real trade-off; show its path/content before writing.
|
|
79
|
-
|
|
81
|
+
5. Keep `CONTEXT.md` implementation-free and keep ADRs concise.
|
|
80
82
|
|
|
81
83
|
Outside that mode, persistence after an approved Spec remains a router-selected ticket or implementation task.
|
|
82
84
|
If project context is absent, do not invent a documentation layout.
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: feature-acceptance
|
|
3
|
-
description: "
|
|
3
|
+
description: "用于用户明确要求真实流程验收、截图或日志证据的任务;产出可复核的验收结论。"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# 功能验收
|
|
7
7
|
|
|
8
8
|
把验收请求转成可复现、可复核的结论。优先验证用户可观察的行为,不用代码阅读、模拟页面或单个 API 响应替代真实流程。
|
|
9
9
|
|
|
10
|
+
## 何时使用
|
|
11
|
+
|
|
12
|
+
仅在用户明确要求验收真实用户流程,或要求截图、视频、日志作为验收证据时使用。普通修复、一般“测一下”及完成前的常规验证按 `rules/common/testing.md` 执行。
|
|
13
|
+
|
|
10
14
|
## 输出协议
|
|
11
15
|
|
|
12
16
|
每个用例和整体结论只能是 `PASS / FAIL / BLOCKED / NOT RUN`。
|
|
@@ -22,7 +26,7 @@ description: "验收真实用户流程、界面和日志证据;用于确认修
|
|
|
22
26
|
|
|
23
27
|
- 需要新增或维护可提交、可在 CI 重跑的浏览器测试时,读取 `skills/e2e-testing/SKILL.md`,必要时委派 `agents/e2e-runner.md`。
|
|
24
28
|
- 需要定位失败根因时,先读取 `skills/systematic-debugging/SKILL.md`,不要在验收报告中猜测修复方案。
|
|
25
|
-
- 完成声明仍须遵守 `
|
|
29
|
+
- 完成声明仍须遵守 `rules/common/testing.md` 的新鲜验证证据要求。
|
|
26
30
|
- 仅在用例相互独立、运行环境允许且任务授权并行时并发执行;共享状态、顺序依赖或无并发授权时串行执行,并说明原因。
|
|
27
31
|
|
|
28
32
|
## 流程
|
package/skills/grilling/SKILL.md
CHANGED
|
@@ -13,7 +13,6 @@ Reference: https://github.com/mattpocock/skills/blob/main/skills/productivity/gr
|
|
|
13
13
|
|
|
14
14
|
- Do not ask for discoverable facts. Inspect files, documentation, logs, history, and tools first.
|
|
15
15
|
- Ask only about a user-owned decision whose alternatives materially change the result.
|
|
16
|
-
- Route systematic evidence or blind-spot gaps back through `skills/using-superpowers/SKILL.md` for `skills/iterative-retrieval/SKILL.md`.
|
|
17
16
|
- High risk alone does not trigger an interview. If high-risk work has a real unresolved user decision, resolve it and record `resume_target: spec-gate`.
|
|
18
17
|
- Do not generate or approve a Spec, implement code, or own workflow continuation.
|
|
19
18
|
|
|
@@ -80,4 +79,6 @@ Use `resume_target: spec-gate` only when the router already classified the task
|
|
|
80
79
|
|
|
81
80
|
For an explicit session, ask whether shared understanding has been reached. Do not act, write files, or enter implementation before confirmation. Inline mode may return without an extra confirmation gate when the blocking decision is resolved.
|
|
82
81
|
|
|
83
|
-
After exit, return to `skills/using-superpowers/SKILL.md` for routing.
|
|
82
|
+
After exit, return to `skills/using-superpowers/SKILL.md` for routing. Inline clarification after
|
|
83
|
+
`BLOCKED_BY_UNRESOLVED_DECISION` returns the resolved decision and updated handoff to the router for a new
|
|
84
|
+
Spec Gate call; it does not resume incomplete drafting or approve the Spec.
|
|
@@ -23,8 +23,8 @@ description: Deliver one authorized scope through implementation, review, and ve
|
|
|
23
23
|
检查 branch、worktree、staged、unstaged 和 untracked,记录 `git rev-parse HEAD` 为 pre-delivery base,
|
|
24
24
|
并记录 task-owned 改动。已有无关改动必须排除,不能回滚。
|
|
25
25
|
|
|
26
|
-
是否创建 worktree
|
|
27
|
-
|
|
26
|
+
是否创建 worktree 及具体操作按 `rules/05-git-workflow.md` 执行,不嵌套创建。
|
|
27
|
+
只做必要 setup 与相关 baseline tests。
|
|
28
28
|
只有 clean baseline 才进入实施;失败时记录命令、失败与工作区状态,返回 router 处理,不能伪装通过。
|
|
29
29
|
|
|
30
30
|
## 实施、审查与验证
|
|
@@ -37,7 +37,7 @@ description: Deliver one authorized scope through implementation, review, and ve
|
|
|
37
37
|
范围合同作为 Spec source,按 `skills/code-review/SKILL.md` 选择相称的 review 模式。
|
|
38
38
|
满足该 Skill 的低风险与验证条件时可自审;需要独立审查却无法启动时不得降级。
|
|
39
39
|
修复 Critical/Important findings 后复核受影响的验收与审查项,不把部分完成报告为交付完成。
|
|
40
|
-
3. 逐条核对验收,按 `
|
|
40
|
+
3. 逐条核对验收,按 `rules/common/testing.md` 运行 fresh commands。已在当前阶段运行且仍对应
|
|
41
41
|
最终改动的证据可以复用;新改动、失败或未决风险才触发重跑。记录实际结果、未运行项和剩余风险。
|
|
42
42
|
|
|
43
43
|
## 收尾与授权
|
|
@@ -48,7 +48,9 @@ BLOCKED_BY_UNRESOLVED_DECISION
|
|
|
48
48
|
- evidence
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
This
|
|
51
|
+
This ends only the current Spec drafting call. Return the outcome to `skills/using-superpowers/SKILL.md`
|
|
52
|
+
for continuation within the authorized task. Do not ask a question, generate options, choose for the user,
|
|
53
|
+
add `resume_target`, or invoke grilling here.
|
|
52
54
|
|
|
53
55
|
If the same `decision_id` already has a confirmed resolution and evidence has not changed, report a `Spec Gate contract conflict` and stop. Reopen it only when reversal evidence appears or a foundational premise becomes invalid.
|
|
54
56
|
|
|
@@ -60,27 +62,15 @@ Save to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` unless the user pr
|
|
|
60
62
|
|
|
61
63
|
## Spec Schema
|
|
62
64
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
8. `Implementation Decisions` — modules, interfaces, public contracts, schemas, interactions, and migration decisions.
|
|
73
|
-
9. `架构设计`.
|
|
74
|
-
10. `组件与文件`.
|
|
75
|
-
11. `数据流 / 接口`.
|
|
76
|
-
12. `错误处理`.
|
|
77
|
-
13. `测试策略` — testing decisions, highest available seam, precedents, normal and adversarial cases.
|
|
78
|
-
14. `验收标准`.
|
|
79
|
-
15. `风险与取舍`.
|
|
80
|
-
16. `回滚`.
|
|
81
|
-
17. `开放问题` — only non-blocking questions; write `无` when empty.
|
|
82
|
-
|
|
83
|
-
Do not include implementation snippets that will become stale. Do not present an unresolved branch as a settled decision.
|
|
65
|
+
Keep the document proportional to the decisions needed for implementation and review. Always cover the
|
|
66
|
+
problem, intended behavior and scope, constraints, resolved implementation decisions, test seams and
|
|
67
|
+
repeatable acceptance checks, and relevant risks or recovery. Combine related sections and omit sections
|
|
68
|
+
that add no decision or evidence; do not fill a fixed set of empty headings.
|
|
69
|
+
|
|
70
|
+
For complex or high-risk designs, read [references/spec-template.md](references/spec-template.md).
|
|
71
|
+
Public-contract, authorization or persistent-data changes must cover compatibility, failure behavior,
|
|
72
|
+
migration and rollback where relevant, even when headings are combined. Keep user approval and the
|
|
73
|
+
outcome contract below. Do not include stale implementation snippets or present an unresolved choice as settled.
|
|
84
74
|
|
|
85
75
|
## Self-Review
|
|
86
76
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Detailed Spec Reference
|
|
2
|
+
|
|
3
|
+
Read for complex or high-risk designs. This is a section menu, not a requirement to generate every
|
|
4
|
+
heading. Keep material decisions and evidence together; combine or omit sections that do not affect
|
|
5
|
+
implementation or review. The main Skill owns applicability, unresolved decisions, approval and outcomes.
|
|
6
|
+
|
|
7
|
+
Useful sections:
|
|
8
|
+
|
|
9
|
+
- `背景`、`目标`、`非目标`:problem, intended result and scope boundaries.
|
|
10
|
+
- `需求`:observable behavior, constraints, compatibility and useful User Stories.
|
|
11
|
+
- `现有上下文`:verified code facts, domain terms, ADRs, patterns and test precedents.
|
|
12
|
+
- `方案对比`、`推荐方案`:real alternatives, trade-offs and the resolved choice.
|
|
13
|
+
- `Implementation Decisions`:modules, interfaces, public contracts, schemas and migration decisions.
|
|
14
|
+
- `架构设计`、`组件与文件`、`数据流 / 接口`:boundaries and interactions that affect the implementation.
|
|
15
|
+
- `错误处理`:normal and adversarial behavior, retries, partial failure and recovery where relevant.
|
|
16
|
+
- `测试策略`、`验收标准`:highest available test seams and repeatable automated or manual checks.
|
|
17
|
+
- `风险与取舍`、`回滚`:impact, compatibility, migration, rollout and recovery.
|
|
18
|
+
- `开放问题`:only non-blocking questions; omit when none remain.
|
|
19
|
+
|
|
20
|
+
For public contracts, retain compatibility and consumer impact. For authentication or authorization,
|
|
21
|
+
retain trust boundaries, permissions and denial behavior. For persistent data or schemas, retain
|
|
22
|
+
migration ordering, partial failure, backup/recovery and rollback limits. A shorter document must still
|
|
23
|
+
make these consequential decisions explicit; user-owned decisions must already be resolved or delegated.
|
|
@@ -30,7 +30,7 @@ one ticket. Do not manufacture extra tickets merely to justify parallelism.
|
|
|
30
30
|
2. Confirm the selected tickets form the frontier and have no overlapping write surface. If overlap is
|
|
31
31
|
uncertain, run them sequentially.
|
|
32
32
|
3. Create one clean controller-owned integration worktree at the common base, plus one separate worktree
|
|
33
|
-
and branch per ticket using `
|
|
33
|
+
and branch per ticket using `rules/05-git-workflow.md`. The integration worktree is the only
|
|
34
34
|
delivery target; do not share a checkout between implementers.
|
|
35
35
|
4. Record the common base and every worktree path. The integration worktree must have no unrelated dirty
|
|
36
36
|
or untracked files before the first diff is applied.
|
|
@@ -9,13 +9,45 @@ description: Diagnose bugs, recurring or flaky failures, slowness, and performan
|
|
|
9
9
|
|
|
10
10
|
- 已确认失败原因正确的预期 TDD RED:回到实现的 GREEN,不加载完整诊断参考。
|
|
11
11
|
- 原因已由错误信息和调用链证实的普通失败:最小修复并重跑对应验证,不制造多个假设。
|
|
12
|
-
- 根因不明、修复后仍重复失败、flaky
|
|
13
|
-
|
|
12
|
+
- 根因不明、修复后仍重复失败、flaky 或性能回归:进入下方证据闭环,同时读取
|
|
13
|
+
[调试方法参考](references/debugging-methods.md),按当前证据选择复现、最小化和回归方法;执行流程与退出条件由本文定义。
|
|
14
14
|
|
|
15
15
|
所有路径都保留原始症状和修复后的验证证据。不能把非目标错误当作预期 RED,也不能跳过真实失败。
|
|
16
16
|
|
|
17
|
+
## 证据闭环
|
|
18
|
+
|
|
19
|
+
1. **固定问题与现场。** 记录用户的实际/预期行为、发生时间、运行版本与环境,读取完整错误和相关改动。
|
|
20
|
+
核对被测进程或产物确实对应目标版本;测试报错只有命中原症状才算复现。展示日志、请求和命令前脱敏。
|
|
21
|
+
2. **追踪实际调用链。** 从异常值或状态沿调用者反向追到首次偏离预期的位置,核对输入、输出、配置和状态。
|
|
22
|
+
多组件问题先找最后正常边界与最早异常边界,再深入故障组件;对照正常样本或版本。
|
|
23
|
+
区分报错位置、直接原因和上游触发条件,不能仅凭错误名称认定根因。
|
|
24
|
+
3. **选择取证路径。** 可复现时建立命中原症状的反馈并缩小场景;偶发问题记录样本数、失败率和条件,
|
|
25
|
+
不以一次成功认定修复,也不强求秒级运行或固定复现率。无法重现时,继续关联已有 trace、日志、请求、
|
|
26
|
+
时间线及代码路径,并用局部实验或定向观测检验解释;局部实验不冒充原场景复现。
|
|
27
|
+
4. **提出并检验假设。** 按现有证据选择有区分价值的假设,不凑固定数量。每个待检验假设写清依据、
|
|
28
|
+
可推翻它的预测和最小实验;一次改变一个变量。执行后记录实际结果,标记支持、排除或仍未确定。
|
|
29
|
+
展示假设是进度更新,不能在仍有可执行调查时以“可能原因”列表结束。
|
|
30
|
+
5. **确认后修复。** 进入根因修复前,说明触发条件如何沿调用链造成原症状,并提供能区分主要竞争解释的
|
|
31
|
+
运行证据或对照实验。只有代码猜测、错误消失或重试成功不足以确认。证据不足时继续取证;用户要求先止损时,
|
|
32
|
+
将措施标为缓解,不宣称根因已修复。确认后执行最小修复和原始场景回归,方法见调试方法参考。
|
|
33
|
+
尚未找到合适测试入口时,记录验证缺口并检查更完整的调用场景;缺少测试入口本身不能证明架构有错。
|
|
34
|
+
6. **失败后重新调查。** 假设被否定或修复无效时,记录反证,回到现场与调用链,不在未证实的改动上叠加补丁。
|
|
35
|
+
连续三次修复无效,或修复不断引出不同组件的异常时,重新检查问题模型、环境和共享状态/耦合;
|
|
36
|
+
次数本身不能证明架构有错。可继续只读取证;超出授权范围的架构变更先提交具体证据和决策。
|
|
37
|
+
|
|
38
|
+
## 退出与报告
|
|
39
|
+
|
|
40
|
+
- **根因已确认:** 给出触发条件 → 因果链 → 原症状、关键证据及主要替代解释的检验结果。
|
|
41
|
+
仅要求诊断时可到此结束;要求修复时还须报告最终状态的原场景验证,区分已定位、已修复和已验证。
|
|
42
|
+
- **尚未确认且可继续:** 执行下一项能区分假设的调查,不用置信度措辞代替证据。
|
|
43
|
+
- **受阻:** 已用尽当前可访问的有效取证路径,列明已尝试的方法、已确认的边界、缺失的具体证据及其获取方式,
|
|
44
|
+
只请求必要的访问或用户操作。环境、时序或外部服务也需要证据,不能作为排查不到的兜底解释。
|
|
45
|
+
|
|
46
|
+
修改本流程后,用 [诊断场景](references/diagnostic-scenarios.md) 检查实际决策;仓库静态验证只证明文件与结构有效,
|
|
47
|
+
不能证明模型已能找到根因。
|
|
48
|
+
|
|
17
49
|
## 项目运行适配
|
|
18
50
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
`scripts/hitl-loop.template.js`。它是 HITL 的唯一运行入口;不要执行留档的 Bash 模板。
|
|
51
|
+
`references/diagnosing-bugs.upstream.md` 作为上游六阶段原文留档,`scripts/hitl-loop.template.sh` 作为上游原始 Bash 模板留档,均保持原样;
|
|
52
|
+
只有核对上游来源或差异时才读取,不作为排障执行参考。
|
|
53
|
+
需要人工操作才能复现时,使用 `scripts/hitl-loop.template.js`。它是 HITL 的唯一运行入口;不要执行留档的 Bash 模板。
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# 调试方法参考
|
|
2
|
+
|
|
3
|
+
疑难排障时按已有证据选用相关方法,不要求逐项执行。流程、修复门槛和退出条件由 `../SKILL.md` 定义。
|
|
4
|
+
|
|
5
|
+
## 捕捉原症状
|
|
6
|
+
|
|
7
|
+
- 可重现时,优先复用能触达真实故障路径的测试、CLI、HTTP 请求或浏览器操作;断言用户报告的症状,不能只检查“没有报错”。
|
|
8
|
+
- 有留存请求或事件时,可用脱敏夹具重放,核对版本、输入和依赖是否对应原现场;隔离后的结果不能冒充原场景复现。
|
|
9
|
+
- 无法重现时,关联现有日志、trace、请求标识、时间线和代码路径;对照正常请求或版本,用局部实验检验解释。
|
|
10
|
+
- 偶发问题记录样本数、失败率和触发条件。固定时间、随机种子或隔离状态可以减少噪音;是否增加压力或样本由证据需要决定,不设固定复现率或秒级要求。
|
|
11
|
+
|
|
12
|
+
## 缩小异常边界
|
|
13
|
+
|
|
14
|
+
- 比较最后正常边界与最早异常边界的输入、输出和状态,沿调用链找到首次偏离预期的位置。
|
|
15
|
+
- 有复现场景时,每次减少一个输入、调用者、配置或步骤,保留仍能触发原症状的部分;记录哪些条件影响结果。
|
|
16
|
+
- 怀疑版本或配置变化时,用相同输入作前后对照;只有两端结果可比较时才使用二分定位。
|
|
17
|
+
- 缩小运行范围、缓存无关初始化等方式可加快反馈,不能以牺牲症状覆盖换取速度。
|
|
18
|
+
|
|
19
|
+
## 区分解释
|
|
20
|
+
|
|
21
|
+
- 每个假设写清现有依据、可推翻它的预测和能区分竞争解释的最小实验;选择有信息价值的假设,不凑固定数量。
|
|
22
|
+
- 用断点、局部观测或带唯一标记的临时日志捕捉异常边界,一次改变一个变量,记录实际结果与反证。
|
|
23
|
+
- 性能问题先取得可比较的耗时、资源或调用测量,再对照版本、配置或输入;普通日志不能代替性能测量。
|
|
24
|
+
|
|
25
|
+
## 回归与清理
|
|
26
|
+
|
|
27
|
+
- 有能覆盖真实故障模式的测试入口时,把复现场景转成失败回归测试,再修复并验证;入口不足时记录验证缺口,继续检查实际调用场景。
|
|
28
|
+
- 检查原始场景与关键触发条件,避免仅凭缩小后的单一路径通过就宣称修复;偶发问题报告实际样本和残留不确定性。
|
|
29
|
+
- 清理本次临时观测和一次性夹具,保留长期回归测试及必要证据;不要删除用户已有文件。
|
|
30
|
+
- 需要人工操作时,按 `../scripts/hitl-loop.template.js` 记录步骤与结果。生产访问或观测需要单独授权,不能因缺少复现而自行扩大权限。
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# 诊断场景验证
|
|
2
|
+
|
|
3
|
+
用于修改排障流程后的行为评估,不在普通排障时加载。向独立评估者提供 SKILL.md、debugging-methods.md 与下面的场景输入,
|
|
4
|
+
隐藏验收要点;要求给出实际下一步、证据判断与当前可报告结论。只使用临时夹具,不访问生产环境。
|
|
5
|
+
记录实际回答及未执行项。静态关键词检查、评估者自报通过均不能代替检查其输出。
|
|
6
|
+
|
|
7
|
+
## 场景输入
|
|
8
|
+
|
|
9
|
+
1. 用户说“上传偶发失败,重试就好,昨天的现场无法复现”。当前有脱敏的请求时间线和客户端日志可读,
|
|
10
|
+
服务端日志需要额外权限。尚未读取现有材料。要求定位根因。
|
|
11
|
+
2. 用户说“请求返回 401,是不是 token 过期?”已知客户端构造请求时有 Authorization,代理收到时也有,
|
|
12
|
+
服务收到时却没有;尚未检查代理转发逻辑。要求诊断并修复。
|
|
13
|
+
3. 用户说“改了超时、重试和缓存三处后测试通过,可以说找到根因了吗?”原问题为 100 次请求中约 2 次失败,
|
|
14
|
+
修改后只运行了一次;没有各改动的独立对照结果。
|
|
15
|
+
4. 用户要求诊断跨请求数据串用。连续三次修复无效,各次均调整调用者局部变量;现在发现两个调用者共享
|
|
16
|
+
同一个可变对象,但尚未做并发对照。要求继续。
|
|
17
|
+
5. 用户要求定位线上一次性故障。现有日志与请求均无留存,无法访问故障版本,已尝试现版本重现和可用监控查询,
|
|
18
|
+
均未获得相关信号。要求直接给根因。
|
|
19
|
+
|
|
20
|
+
## 验收要点(不提供给评估者)
|
|
21
|
+
|
|
22
|
+
1. 继续读取已有现场证据并关联时间/请求,提出区分实验;不因无法重现直接停止,不编造服务端结论。
|
|
23
|
+
2. 定位代理入口到服务入口之间的异常边界,检查转发与配置并做对照;不能把 401 当成过期证明,
|
|
24
|
+
也不能把尚未检查的代理逻辑直接称为已确认根因。
|
|
25
|
+
3. 拒绝根因或稳定修复声明;分离变量、恢复可比较基线、报告样本和失败率,重新覆盖原症状。
|
|
26
|
+
4. 保留前三次反证,重新检查共享状态并设计隔离对象/并发对照;不把三次失败直接判为架构错误,
|
|
27
|
+
不擅自扩大到架构重写。
|
|
28
|
+
5. 明确受阻,列出尝试和缺失证据,提出具体获取方式;不为了满足用户给出无证据的确定结论。
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: using-superpowers
|
|
3
|
-
description: Route
|
|
3
|
+
description: Route engineering delivery and explicitly requested engineering workflows; resume their process outcomes.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Using Superpowers
|
|
7
7
|
|
|
8
8
|
Own routing and continuation. Skills return outcomes here instead of selecting one another.
|
|
9
9
|
|
|
10
|
+
## Applicability
|
|
11
|
+
|
|
12
|
+
用于工程交付(实现、调试、测试、审查)及用户明确请求的工程工作流,并接续这些流程的返回结果。
|
|
13
|
+
普通问答、翻译、总结和一般资料检索直接处理;复杂度本身不触发本路由。
|
|
14
|
+
|
|
10
15
|
## Priority
|
|
11
16
|
|
|
12
17
|
User instructions, `AGENTS.md`, `CLAUDE.md`, and repository rules take precedence over Skills,
|
|
@@ -52,7 +57,6 @@ Task arrives
|
|
|
52
57
|
-> reported bug or unexplained/repeated failure? -> skills/systematic-debugging/SKILL.md
|
|
53
58
|
-> discoverable fact? -> inspect it; do not ask
|
|
54
59
|
-> external engineering fact or documentation question? -> inspect primary sources directly; cite the answer
|
|
55
|
-
-> systematic evidence or blind-spot gap? -> iterative-retrieval
|
|
56
60
|
-> explicit prototype or runnable design question? -> skills/prototype/SKILL.md
|
|
57
61
|
-> unresolved user-owned decision? -> skills/grilling/SKILL.md (grilling inline)
|
|
58
62
|
high-risk or explicit formal Spec context? -> resume_target: spec-gate
|
|
@@ -63,8 +67,8 @@ Task arrives
|
|
|
63
67
|
-> skills/subagent-driven-development/SKILL.md
|
|
64
68
|
-> otherwise -> skills/implement/SKILL.md
|
|
65
69
|
-> behavior change with a test path? -> test-driven-development
|
|
66
|
-
-> new feature or other Git-rule isolation need? ->
|
|
67
|
-
-> completion, fixed, or ready claim? ->
|
|
70
|
+
-> new feature or other Git-rule isolation need? -> rules/05-git-workflow.md
|
|
71
|
+
-> completion, fixed, or ready claim? -> rules/common/testing.md
|
|
68
72
|
-> skill discovery or install request? -> use available host tooling for the explicit request
|
|
69
73
|
-> external skill learning or edit? -> rules/common/skills-learning.md
|
|
70
74
|
-> otherwise -> shortest applicable loop
|
|
@@ -105,4 +109,4 @@ For one release cycle, interpret a user explicitly asking for the old name `brai
|
|
|
105
109
|
|
|
106
110
|
## Completion
|
|
107
111
|
|
|
108
|
-
Before saying work is complete, fixed, passing, or ready, apply `
|
|
112
|
+
Before saying work is complete, fixed, passing, or ready, apply `rules/common/testing.md` and report fresh evidence, skipped checks, and remaining risk.
|
|
@@ -16,13 +16,16 @@ from the approved scope without waiting for the user to name the next Skill.
|
|
|
16
16
|
|
|
17
17
|
## Spec Gate blocked
|
|
18
18
|
|
|
19
|
-
`BLOCKED_BY_UNRESOLVED_DECISION`
|
|
20
|
-
|
|
21
|
-
1.
|
|
22
|
-
2.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
`BLOCKED_BY_UNRESOLVED_DECISION` ends the current Spec drafting call and returns to the router:
|
|
20
|
+
|
|
21
|
+
1. Preserve the confirmed decisions and evidence; do not draft through an unresolved decision.
|
|
22
|
+
2. Show a compact decision map and use grilling inline to ask the missing consequential question within
|
|
23
|
+
the user's authorized task; do not ask whether to continue clarification.
|
|
24
|
+
3. Wait for the user's answer or explicit delegation. Silence is not a decision or approval.
|
|
25
|
+
4. Once resolved, route into a new Spec Gate with the updated handoff; do not resume the old call stack.
|
|
26
|
+
The resulting Spec still needs user approval before implementation.
|
|
27
|
+
5. If the user pauses or ends the task, stop. A new scope or external action still requires its own
|
|
28
|
+
authorization; clarification does not expand the original request.
|
|
26
29
|
|
|
27
30
|
If the same confirmed `decision_id` blocks again with unchanged evidence, report a `Spec Gate contract conflict`.
|
|
28
31
|
Do not repeat the question. Only reversal evidence or an invalidated premise can reopen it.
|