claude-everything-workflow 0.2.2 → 0.2.3
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.md +6 -5
- package/CLAUDE.md +1 -5
- package/README.md +57 -27
- package/agents/e2e-runner.md +8 -141
- package/commands/code-review.md +9 -30
- package/commands/pr.md +1 -6
- package/commands/verify.md +7 -11
- package/harness/manifest.json +346 -0
- package/package.json +7 -2
- package/rules/01-base.md +9 -26
- package/rules/02-code-size.md +5 -9
- package/rules/03-architecture.md +8 -22
- package/rules/04-error-handling.md +4 -5
- package/rules/05-git-workflow.md +4 -3
- package/rules/06-comments.md +3 -9
- package/rules/07-forbidden.md +4 -3
- package/rules/common/agent-orchestration.md +1 -3
- package/rules/common/hooks.md +2 -0
- package/rules/common/pr-automation.md +1 -1
- package/rules/common/skills-learning.md +1 -1
- package/rules/common/testing.md +3 -2
- package/scripts/install-rules.js +100 -0
- package/scripts/install.ps1 +27 -3
- package/scripts/install.sh +24 -2
- package/scripts/legacy-common-rule-hashes.json +78 -0
- package/scripts/retired-skill-files.json +17 -0
- package/scripts/upstream-capability-map.json +14 -9
- package/scripts/verify/grilling-spec-gate-checks.js +11 -5
- package/scripts/verify/install-rules.test.js +156 -0
- package/scripts/verify/metadata-checks.js +26 -3
- package/scripts/verify/repository-checks.js +35 -61
- package/scripts/verify/skill-invocation.test.js +86 -0
- package/scripts/verify/skill-manifest-checks.js +197 -0
- package/scripts/verify/skill-manifest-checks.test.js +123 -0
- package/scripts/verify/workflow-checks.js +26 -82
- package/scripts/verify-harness.js +2 -0
- package/scripts/verify-upstream-capability-map.js +2 -1
- package/skills/README.md +9 -10
- package/skills/code-review/SKILL.md +54 -41
- package/skills/codebase-design/SKILL.md +1 -1
- package/skills/continuous-learning-v2/SKILL.md +1 -1
- package/skills/domain-modeling/SKILL.md +3 -2
- package/skills/e2e-testing/SKILL.md +20 -310
- package/skills/e2e-testing/references/playwright-patterns.md +324 -0
- package/skills/feature-acceptance/SKILL.md +1 -1
- package/skills/grilling/SKILL.md +1 -1
- package/skills/handoff/SKILL.md +3 -4
- package/skills/handoff/agents/openai.yaml +2 -0
- package/skills/implement/SKILL.md +32 -81
- package/skills/implement/references/ticket-delivery.md +43 -0
- package/skills/improve-codebase-architecture/SKILL.md +1 -2
- package/skills/improve-codebase-architecture/agents/openai.yaml +2 -0
- package/skills/iterative-retrieval/SKILL.md +1 -1
- package/skills/prototype/SKILL.md +1 -1
- package/skills/resolving-merge-conflicts/SKILL.md +1 -1
- package/skills/spec-gate/SKILL.md +1 -1
- package/skills/subagent-driven-development/SKILL.md +2 -2
- package/skills/systematic-debugging/SKILL.md +9 -3
- package/skills/test-driven-development/SKILL.md +6 -2
- package/skills/to-tickets/SKILL.md +5 -3
- package/skills/triage/SKILL.md +4 -4
- package/skills/triage/agents/openai.yaml +2 -0
- package/skills/using-git-worktrees/SKILL.md +8 -5
- package/skills/using-superpowers/SKILL.md +27 -94
- package/skills/using-superpowers/references/process-outcomes.md +41 -0
- package/skills/verification-before-completion/SKILL.md +5 -4
- package/skills/visual-companion/SKILL.md +1 -1
- package/agents/architect.md +0 -59
- package/agents/code-reviewer.md +0 -28
- package/agents/planner.md +0 -40
- package/agents/tdd-guide.md +0 -101
- package/skills/find-skills/SKILL.md +0 -142
- package/skills/project-context/SKILL.md +0 -94
- package/skills/project-context/agents/openai.yaml +0 -6
- package/skills/project-context/references/project-context-template.md +0 -61
- package/skills/research/SKILL.md +0 -48
- package/skills/wayfinder/SKILL.md +0 -57
package/skills/handoff/SKILL.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: handoff
|
|
3
|
-
description:
|
|
4
|
-
disable-model-invocation: true
|
|
3
|
+
description: Create a redacted handoff for an explicitly requested fresh session or context boundary.
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# Handoff
|
|
@@ -14,8 +13,8 @@ Origin: `mattpocock/skills@2ab9580`, adapted to this repository's write-safety a
|
|
|
14
13
|
|
|
15
14
|
- Use only for a fresh session or an intentional prototype branch. Built-in compaction is for continuing
|
|
16
15
|
the same conversation at a phase boundary.
|
|
17
|
-
-
|
|
18
|
-
|
|
16
|
+
- Create the handoff only when the user explicitly requests it or accepts a concrete handoff proposal.
|
|
17
|
+
Ordinary language, `/handoff`, and `$handoff` are valid requests; do not require repeated invocation.
|
|
19
18
|
- Resolve the operating system's temporary directory with the available runtime. Create a unique
|
|
20
19
|
private subdirectory with mode `0700`; fail closed if permissions cannot be enforced. Do not write
|
|
21
20
|
the handoff into the repository, tracker, home directory, or a guessed path.
|
|
@@ -1,97 +1,48 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: implement
|
|
3
|
-
description:
|
|
3
|
+
description: Deliver one authorized scope through implementation, review, and verification.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Implement
|
|
7
7
|
|
|
8
|
-
执行 router
|
|
9
|
-
只能来自明确的用户交付请求,且不得涉及 formal Spec 或高风险边界;不要把咨询、建议或模糊意图解释为交付授权。
|
|
8
|
+
执行 router 选定的一个连贯交付范围。Origin: `mattpocock/skills@2ab9580`,适配本项目授权与审查边界。
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
external-write approval contracts.
|
|
10
|
+
## 入口
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
- direct scope:明确、低风险的用户交付请求。原始请求、目标行为、范围边界和相称验证组成
|
|
13
|
+
`direct-scope contract`;咨询不等于交付授权。
|
|
14
|
+
- approved Spec scope:已获用户批准的 Spec 是范围与验收来源。
|
|
15
|
+
- ticket:仅此路径先读取 [references/ticket-delivery.md](references/ticket-delivery.md),核实 frontier,
|
|
16
|
+
再按该引用与下方共用步骤交付。无 ticket 范围不得 claim 或写入任何 tracker。
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
缺少可复核验收、存在实质用户决策或命中尚未批准的 formal Spec/高风险边界时,返回 router,不能猜测或实施。
|
|
19
|
+
普通范围使用当前会话,不为满足流程创建新的上下文或 tracker。
|
|
17
20
|
|
|
18
|
-
|
|
19
|
-
和 REFRESH_FRONTIER,但不能跳过隔离、实施、审查或验证。每次调用只推进 router 选定的一张 ticket 或一个连贯范围;
|
|
20
|
-
任何 gate 失败都停止在当前状态并保留可恢复证据,不能把部分完成解释为交付完成。
|
|
21
|
+
## 隔离与基线
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
检查 branch、worktree、staged、unstaged 和 untracked,记录 `git rev-parse HEAD` 为 pre-delivery base,
|
|
24
|
+
并记录 task-owned 改动。已有无关改动必须排除,不能回滚。
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
`docs/agent-workflow/project-context.md` 和完整 blocking 状态,且必须位于 open + unblocked + unclaimed frontier。
|
|
28
|
-
- 所有路径都必须有可复核的验收或验证条件;未批准、仍有用户决策或缺少该条件时,停止并返回对应门禁,不猜测。
|
|
26
|
+
是否创建 worktree 以 `rules/05-git-workflow.md` 为准;需要隔离时使用
|
|
27
|
+
`skills/using-git-worktrees/SKILL.md`,不嵌套创建。只做必要 setup 与相关 baseline tests。
|
|
28
|
+
只有 clean baseline 才进入实施;失败时记录命令、失败与工作区状态,返回 router 处理,不能伪装通过。
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
## 实施、审查与验证
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
`
|
|
32
|
+
1. 以当前范围合同实施最小完整改动,不再生成逐文件、逐步骤的实施计划。行为变化按
|
|
33
|
+
`test-driven-development` 的垂直切片推进;纯文档或没有可测试行为的整理运行对应校验。
|
|
34
|
+
已确认失败原因正确的预期 TDD RED 继续 GREEN,不触发调试。其他失败按
|
|
35
|
+
`systematic-debugging` 的分级入口处理,不跳过真实失败。
|
|
36
|
+
2. 用 pre-delivery base 冻结包含 task-owned committed、staged、unstaged、untracked 的完整审查包,
|
|
37
|
+
范围合同作为 Spec source,按 `skills/code-review/SKILL.md` 选择相称的 review 模式。
|
|
38
|
+
满足该 Skill 的低风险与验证条件时可自审;需要独立审查却无法启动时不得降级。
|
|
39
|
+
修复 Critical/Important findings 后复核受影响的验收与审查项,不把部分完成报告为交付完成。
|
|
40
|
+
3. 逐条核对验收,按 `verification-before-completion` 运行 fresh commands。已在当前阶段运行且仍对应
|
|
41
|
+
最终改动的证据可以复用;新改动、失败或未决风险才触发重跑。记录实际结果、未运行项和剩余风险。
|
|
34
42
|
|
|
35
|
-
|
|
36
|
-
进入 ticket 的 CLAIM 或无 ticket 范围的 EXECUTE;baseline 失败时报告命令、失败和现有工作区状态,等待用户决定调查还是继续。
|
|
43
|
+
## 收尾与授权
|
|
37
44
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
- 本地 tracker:router 在用户已授权交付范围内选定该 ticket 后,可只把它从 `ready-for-agent` 改为
|
|
44
|
-
`in-progress`,不得顺带修改其他 ticket。
|
|
45
|
-
- 外部 tracker:先展示 assignee/status/label 的准确 mutation,并取得 explicit confirmation。
|
|
46
|
-
- 无 ticket 范围不得 claim 或写入任何 tracker。
|
|
47
|
-
|
|
48
|
-
### EXECUTE
|
|
49
|
-
|
|
50
|
-
每次 `implement` 只在一个 fresh context 中完成一张已领取的 ticket 或一个无 ticket 连贯范围。ticket 以
|
|
51
|
-
`What to build`、验收标准和 blocker 为实施合同;direct scope 以 `direct-scope contract` 为合同;approved Spec
|
|
52
|
-
scope 以已批准 Spec 为合同。按 `test-driven-development` 的垂直切片实现,不要生成或依赖另一份逐文件、逐步骤的实施计划。
|
|
53
|
-
|
|
54
|
-
每个已验证切片只向当前 ticket 追加简短 progress 记录;无 ticket 范围只在当前交付回报中记录证据。遇到失败测试、flaky
|
|
55
|
-
或意外结果时进入 `systematic-debugging`,不得用后续步骤可能修复为由跳过当前失败。
|
|
56
|
-
|
|
57
|
-
### REVIEW
|
|
58
|
-
|
|
59
|
-
完成前以 ticket as the Spec source,执行 `/code-review --worktree <pre-ticket-base> --spec <ticket>`;无 ticket
|
|
60
|
-
范围则把 `direct-scope contract` 或 approved Spec 作为 scope source,并以 pre-delivery base 冻结同等审查包。
|
|
61
|
-
review package 必须覆盖 task-owned committed、staged、unstaged 和 untracked 改动。Spec 或 Standards 轴未通过时,
|
|
62
|
-
ticket 保持 `in-progress`,无 ticket 范围停止在 REVIEW;修复 Critical/Important findings 后重新 review。
|
|
63
|
-
|
|
64
|
-
### VERIFY
|
|
65
|
-
|
|
66
|
-
逐条核对 ticket acceptance criteria,或无 ticket 范围的 `direct-scope contract`/approved Spec 验收条件,并执行
|
|
67
|
-
`verification-before-completion` 要求的 fresh commands。任何 acceptance、测试、构建或验证失败都让 ticket 保持
|
|
68
|
-
`in-progress` 或让无 ticket 范围停止在 VERIFY,记录实际结果、跳过项和剩余风险;不得进入 RESOLVE。
|
|
69
|
-
|
|
70
|
-
### RESOLVE(仅 ticket)
|
|
71
|
-
|
|
72
|
-
只有 acceptance、双轴 review 和 fresh verification 全部通过后才能 resolve 当前 ticket:
|
|
73
|
-
|
|
74
|
-
- 本地 tracker 更新状态并记录证据。
|
|
75
|
-
- 外部 tracker 的评论或关闭仍需 explicit confirmation。
|
|
76
|
-
- 未通过时保持 `in-progress` 并记录失败,不得伪装完成。
|
|
77
|
-
|
|
78
|
-
### REFRESH_FRONTIER(仅 ticket)
|
|
79
|
-
|
|
80
|
-
resolve 后重新查询依赖图并返回 router。若 newly unlocked frontier tickets 仍在用户已授权范围内,router
|
|
81
|
-
可重新选择串行 `implement` 或安全 SDD;否则报告 frontier 并停止。不得自动关闭外部 Issue 或 parent issue。
|
|
82
|
-
|
|
83
|
-
### FINISH_DELIVERY
|
|
84
|
-
|
|
85
|
-
- 无 ticket 范围:双轴 review 与 fresh verification 均通过后,报告范围、证据、未运行项和剩余风险;不得 claim、resolve、查询或刷新 tracker frontier。若用户随后要求 PR,仍须先通过 `/verify pre-pr`,且不自动 commit、push 或创建 PR。
|
|
86
|
-
- frontier 非空:返回当前 graph 状态、newly unlocked tickets 和 blockers,然后停止。
|
|
87
|
-
- frontier 为空但仍有 open tickets:返回 `BLOCKED_GRAPH`,列出被依赖阻塞、循环依赖、claim
|
|
88
|
-
冲突或状态异常的 tickets,保持交付未完成并停止,不能进入 PR 收尾。
|
|
89
|
-
- 只有 open ticket count = 0:以 feature/worktree 起点为固定基点执行全分支双轴 review,再运行
|
|
90
|
-
`/verify pre-pr`。只有两者都通过,才能向用户展示 `/pr` 或 keep 当前 branch/worktree 的选择;
|
|
91
|
-
不自动 merge、删除 branch 或清理 worktree。
|
|
92
|
-
|
|
93
|
-
## Authorization Invariants
|
|
94
|
-
|
|
95
|
-
- 用户的交付授权覆盖已批准 ticket graph,或 router 判定的明确低风险 direct scope/approved Spec scope 内的本地实现和拓扑选择;不覆盖新的产品范围,也不覆盖 commit、push 或创建 PR。
|
|
96
|
-
- tracker publication、claim、resolve、评论和关闭都是 ticket 路径中的独立外部 mutation;无 ticket 范围不得借此产生 tracker 写入,本次阶段授权也不能推导出下一阶段授权。
|
|
97
|
-
- FINISH_DELIVERY 只展示选择;merge、PR 和 cleanup 继续遵守用户授权与仓库 Git 规则。
|
|
45
|
+
- 无 ticket:选定的 review 与 fresh verification 均通过后报告范围、证据和风险;到此结束,不查询或刷新 frontier。
|
|
46
|
+
- ticket:验收、review 和 verification 全部通过后,回到 ticket 引用完成 resolve 与后续处理。
|
|
47
|
+
- 本地交付授权不覆盖 commit、push 或创建 PR,也不扩张产品范围。用户已明确授权的后续动作按授权继续,
|
|
48
|
+
不重复索要同一批准;PR 仍须通过 `/verify pre-pr`。外部写入、merge 和 cleanup 遵循 Git 规则与用户授权。
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Ticket Delivery
|
|
2
|
+
|
|
3
|
+
仅执行 tracker ticket 时读取;实施、隔离、审查和验证共用 `skills/implement/SKILL.md`,不重复定义。
|
|
4
|
+
|
|
5
|
+
## State Machine
|
|
6
|
+
|
|
7
|
+
`PRECONDITION → ISOLATE → [CLAIM] → EXECUTE → REVIEW → VERIFY → [RESOLVE → REFRESH_FRONTIER] → FINISH_DELIVERY`
|
|
8
|
+
|
|
9
|
+
方括号为 ticket 专属状态。任何 gate 失败均停在当前状态并保留证据,不能提前 resolve。
|
|
10
|
+
|
|
11
|
+
## PRECONDITION 与 CLAIM
|
|
12
|
+
|
|
13
|
+
- 优先读取已有 `docs/agent-workflow/project-context.md`,缺少时使用仓库或会话中已确认的追踪配置;
|
|
14
|
+
不因缺少文件要求执行初始化。读取完整 ticket 和 blocking 状态;必须位于
|
|
15
|
+
open + unblocked + unclaimed frontier。`What to build`、验收标准和 blocker 构成交付合同。
|
|
16
|
+
- 每次在一个 fresh context 中完成一张 ticket。pre-delivery base 同时记为 pre-ticket base。
|
|
17
|
+
- 按入口完成隔离并取得 clean baseline 后,本地 tracker 可将选定 ticket 从 `ready-for-agent`
|
|
18
|
+
改为 `in-progress`;不改其他 ticket。外部 tracker 先展示准确 mutation,并取得 explicit confirmation,
|
|
19
|
+
已覆盖该动作的明确授权有效。
|
|
20
|
+
- 每个已验证切片只向当前 ticket 追加简短 progress 记录。
|
|
21
|
+
|
|
22
|
+
## REVIEW 与 VERIFY
|
|
23
|
+
|
|
24
|
+
ticket as the Spec source:`/code-review --worktree <pre-ticket-base> --spec <ticket>`。
|
|
25
|
+
审查包和 fresh verification 要求以入口为准;失败时 ticket 保持 `in-progress`,不得进入 RESOLVE。
|
|
26
|
+
|
|
27
|
+
## RESOLVE 与 REFRESH_FRONTIER
|
|
28
|
+
|
|
29
|
+
验收、选定的 review 与 fresh verification 全部通过后才 resolve:本地 tracker 更新状态并记录证据;
|
|
30
|
+
外部评论或关闭需要相应明确授权。不得自动关闭外部 Issue 或 parent issue。
|
|
31
|
+
|
|
32
|
+
resolve 后重查依赖图并返回 router。newly unlocked tickets 仍在已授权范围内时,router
|
|
33
|
+
可重新选择串行 `implement` 或安全 SDD;超出范围则报告 frontier 并停止。
|
|
34
|
+
|
|
35
|
+
## FINISH_DELIVERY
|
|
36
|
+
|
|
37
|
+
- frontier 非空:返回 graph、newly unlocked tickets 和 blockers;由 router 决定下一张。
|
|
38
|
+
- frontier 为空但仍有 open tickets:返回 `BLOCKED_GRAPH`,列出依赖、循环、claim 冲突或状态异常,
|
|
39
|
+
保持交付未完成,不能进入 PR 收尾。
|
|
40
|
+
- 只有 open ticket count = 0:以 feature/worktree 起点为固定基点执行全分支相称 review,再运行
|
|
41
|
+
`/verify pre-pr`。通过后展示 `/pr` 或 keep 当前 branch/worktree 的选择;已获授权的动作可继续。
|
|
42
|
+
- tracker publication、claim、resolve、评论和关闭需要各自适用的授权;一次阶段授权不推导出下一阶段。
|
|
43
|
+
不自动 merge、删除 branch 或清理 worktree。
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: improve-codebase-architecture
|
|
3
|
-
description:
|
|
4
|
-
disable-model-invocation: true
|
|
3
|
+
description: Run an explicit read-only architecture-health audit and route selected findings to design or grilling.
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# Improve Codebase Architecture
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: prototype
|
|
3
|
-
description:
|
|
3
|
+
description: Build a throwaway runnable probe for one explicit design question; do not silently ship it.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Prototype
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: resolving-merge-conflicts
|
|
3
|
-
description:
|
|
3
|
+
description: Resolve an active merge or rebase conflict hunk by hunk with verification.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Resolving Merge Conflicts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: spec-gate
|
|
3
|
-
description:
|
|
3
|
+
description: Create and self-review a formal Spec for explicit or costly-to-reverse work; wait for approval.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Spec Gate
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: subagent-driven-development
|
|
3
|
-
description:
|
|
3
|
+
description: Dispatch approved independent frontier tickets in isolated worktrees; use only when router selects SDD.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Subagent-Driven Development
|
|
@@ -54,7 +54,7 @@ source of truth; do not expand scope or start another ticket.
|
|
|
54
54
|
Do not stage, commit, push, open a PR, claim/resolve/comment on a tracker, or perform any other external
|
|
55
55
|
mutation. Leave only this ticket's worktree diff, including task-owned untracked files.
|
|
56
56
|
|
|
57
|
-
Before reporting, run focused verification
|
|
57
|
+
Before reporting, run focused verification and report the diff for the controller's review:
|
|
58
58
|
- status: DONE | BLOCKED | NEEDS_DECISION
|
|
59
59
|
- changed files and tests run
|
|
60
60
|
- task-owned untracked files created since dispatch
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: systematic-debugging
|
|
3
|
-
description:
|
|
3
|
+
description: Diagnose bugs, recurring or flaky failures, slowness, and performance regressions; exclude expected TDD RED.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Systematic Debugging
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
## 分级入口
|
|
9
|
+
|
|
10
|
+
- 已确认失败原因正确的预期 TDD RED:回到实现的 GREEN,不加载完整诊断参考。
|
|
11
|
+
- 原因已由错误信息和调用链证实的普通失败:最小修复并重跑对应验证,不制造多个假设。
|
|
12
|
+
- 根因不明、修复后仍重复失败、flaky 或性能回归:进入完整诊断。先取得可重复的反馈,
|
|
13
|
+
再读取 `references/diagnosing-bugs.upstream.md`,按其中适用阶段执行;跳过不适用阶段时记录依据。
|
|
14
|
+
|
|
15
|
+
所有路径都保留原始症状和修复后的验证证据。不能把非目标错误当作预期 RED,也不能跳过真实失败。
|
|
10
16
|
|
|
11
17
|
## 项目运行适配
|
|
12
18
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: test-driven-development
|
|
3
|
-
description:
|
|
3
|
+
description: "Use for behavior changes with a test path: RED, minimal GREEN, REFACTOR, then verify."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Test-Driven Development
|
|
@@ -19,7 +19,8 @@ description: 新功能、bug 修复、重构或行为变化需要测试先行时
|
|
|
19
19
|
- 重构
|
|
20
20
|
- 行为变化
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
没有可测试行为的文档、格式或纯配置整理,直接运行对应校验,不需要为免写测试请求批准。
|
|
23
|
+
生成代码验证生成入口;原型按用户要求验证所探索的行为。涉及可测试行为或用户明确要求 TDD 时执行下述流程。
|
|
23
24
|
|
|
24
25
|
## 核心规则
|
|
25
26
|
|
|
@@ -31,6 +32,9 @@ description: 新功能、bug 修复、重构或行为变化需要测试先行时
|
|
|
31
32
|
6. 重构不能引入新行为;新行为需要新的失败测试。
|
|
32
33
|
7. 一次只推进一个垂直切片:一个可观察行为、一个失败测试、一个最小实现。
|
|
33
34
|
|
|
35
|
+
预期 RED 是针对尚未实现行为的正确断言失败,确认原因后继续 GREEN,不进入疑难调试。
|
|
36
|
+
测试加载、依赖、语法或其他非目标错误不算有效 RED;先修复测试环境或按调试入口定位实际失败。
|
|
37
|
+
|
|
34
38
|
## Public Seam
|
|
35
39
|
|
|
36
40
|
测试 seam 是观察行为的公共接口。测试和调用方应穿过同一个 seam,不读取私有状态或绕过
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: to-tickets
|
|
3
|
-
description:
|
|
3
|
+
description: Split an approved scope into demonstrable vertical tickets with real blocking edges; wait for approval.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# To Tickets
|
|
@@ -16,8 +16,10 @@ topology does not approve ticket publication or change the approved product scop
|
|
|
16
16
|
- Read the source artifact and comments completely. A ticket flow may start from an approved Spec, an
|
|
17
17
|
existing issue, or the current conversation; do not create a second detailed implementation plan.
|
|
18
18
|
- Read configured tracker, domain-doc and triage-label sections from
|
|
19
|
-
`docs/agent-workflow/project-context.md
|
|
20
|
-
-
|
|
19
|
+
`docs/agent-workflow/project-context.md` when present, or use confirmed repository/session settings.
|
|
20
|
+
- A missing configuration file does not block drafting. Before publication, resolve the target,
|
|
21
|
+
required labels and permissions from existing evidence or ask only for missing values; do not
|
|
22
|
+
invent an external tracker or require a setup Skill/configuration file.
|
|
21
23
|
- Do not reopen approved product decisions. Return unresolved consequential decisions to the router.
|
|
22
24
|
|
|
23
25
|
If the codebase has not been explored, inspect only the affected area to learn established domain terms,
|
package/skills/triage/SKILL.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: triage
|
|
3
|
-
description:
|
|
4
|
-
disable-model-invocation: true
|
|
3
|
+
description: Use only for explicit issue or pull-request triage; classify evidence and produce an agent-ready brief.
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# Triage
|
|
8
7
|
|
|
9
8
|
Origin: `mattpocock/skills@2ab9580`, adapted to this repository's confirmation boundary.
|
|
10
9
|
|
|
11
|
-
Read tracker operations and role mapping from `docs/agent-workflow/project-context.md
|
|
12
|
-
|
|
10
|
+
Read tracker operations and role mapping from `docs/agent-workflow/project-context.md` when present,
|
|
11
|
+
or use confirmed repository/session settings. A missing file does not block read-only assessment;
|
|
12
|
+
confirm missing target, label mappings and permissions before external changes. Do not require a setup Skill.
|
|
13
13
|
|
|
14
14
|
## Roles
|
|
15
15
|
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: using-git-worktrees
|
|
3
|
-
description: Use
|
|
3
|
+
description: Use a worktree for every new feature; follow Git rules for other isolation needs and reuse a suitable task worktree.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Using Git Worktrees
|
|
7
7
|
|
|
8
8
|
Reference: https://github.com/obra/superpowers
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Worktree triggers are owned by `rules/05-git-workflow.md`: every new feature uses a task worktree,
|
|
11
|
+
including a single-file feature. Inspect first and reuse an existing suitable task worktree.
|
|
11
12
|
|
|
12
13
|
## Preconditions
|
|
13
14
|
|
|
14
15
|
- Use only inside a git repository.
|
|
15
|
-
-
|
|
16
|
+
- Read-only analysis needs no worktree. For non-feature changes, apply the isolation conditions in the Git rule;
|
|
17
|
+
file count alone is not a trigger or an exemption.
|
|
16
18
|
- Never discard or overwrite existing user changes.
|
|
17
19
|
- If the current worktree has unrelated changes and the task requires broad edits, prefer a new worktree.
|
|
20
|
+
- Honor this repo's base-branch policy: when `rules/05-git-workflow.md` requires it, base on the latest upstream base (`origin/main`), never on an outdated local `main` or the current `HEAD`.
|
|
18
21
|
|
|
19
22
|
## Flow
|
|
20
23
|
|
|
@@ -28,10 +31,10 @@ git rev-parse --show-toplevel
|
|
|
28
31
|
|
|
29
32
|
2. Choose a branch name with the project convention. For Codex-managed branches, prefer `codex/<short-task-name>` unless the user requested another name.
|
|
30
33
|
|
|
31
|
-
3. Create the worktree from the current `HEAD` or an
|
|
34
|
+
3. Create the worktree from the base this repo's rules require (here `rules/05-git-workflow.md`): base on the latest required upstream, e.g. `origin/main`, not the current `HEAD` or an outdated local `main`.
|
|
32
35
|
|
|
33
36
|
```bash
|
|
34
|
-
git worktree add ../<repo-name>-<short-task-name> -b codex/<short-task-name>
|
|
37
|
+
git worktree add ../<repo-name>-<short-task-name> -b codex/<short-task-name> <base-ref>
|
|
35
38
|
```
|
|
36
39
|
|
|
37
40
|
4. Run setup in the new worktree only when the project requires it. Do not reinstall dependencies if the project already supports shared caches or the task is docs-only.
|
|
@@ -1,58 +1,36 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: using-superpowers
|
|
3
|
-
description:
|
|
3
|
+
description: Route non-trivial tasks through direct, decision, or formal lanes, then return for verification.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Using Superpowers
|
|
7
7
|
|
|
8
|
-
Own routing and continuation
|
|
8
|
+
Own routing and continuation. Skills return outcomes here instead of selecting one another.
|
|
9
9
|
|
|
10
10
|
## Priority
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
1. User instructions, `AGENTS.md`, `CLAUDE.md`, and repository rules.
|
|
15
|
-
2. Applicable process Skills, commands, agents, and hooks.
|
|
16
|
-
3. Implementation Skills and default agent behavior.
|
|
17
|
-
|
|
18
|
-
If a Skill conflicts with an explicit higher-priority instruction, follow the higher-priority instruction and explain any material impact.
|
|
12
|
+
User instructions, `AGENTS.md`, `CLAUDE.md`, and repository rules take precedence over Skills,
|
|
13
|
+
commands, agents, and hooks, which take precedence over default behavior.
|
|
19
14
|
|
|
20
15
|
## Skill Invocation Rule
|
|
21
16
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
3. Announce briefly which Skill is being used and why.
|
|
27
|
-
4. Follow its gates, outcome contract, and verification requirements.
|
|
28
|
-
5. Return here whenever continuation needs another Skill or path.
|
|
17
|
+
Classify intent, discoverable facts, user-owned decisions, and risk; select the shortest applicable path
|
|
18
|
+
below and read only its Skill. Briefly announce the selection, then act. Do not load a chain of Skills
|
|
19
|
+
in anticipation of later stages. Reuse a Skill already read in this task unless it changed or context
|
|
20
|
+
was lost; returning here means applying the routing decision, not reading this file again.
|
|
29
21
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
Expected TDD RED stays in the current implementation loop. Do not reroute it as a reported bug.
|
|
23
|
+
An explicit request may use ordinary language or a native `/name` or `$name` invocation.
|
|
24
|
+
For handoff, triage and improve-codebase-architecture,
|
|
25
|
+
require the corresponding user request; complexity or a router match alone is insufficient.
|
|
26
|
+
Do not ask users to repeat an already clear request using command syntax. Skill selection never
|
|
27
|
+
expands authorization for publishing, external writes, or other consequential actions.
|
|
33
28
|
|
|
34
29
|
## Three Lanes
|
|
35
30
|
|
|
36
|
-
The
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
direct
|
|
40
|
-
clear low-risk task -> implement -> proportionate verification
|
|
41
|
-
|
|
42
|
-
needs-decision
|
|
43
|
-
unresolved user-owned decision -> grilling inline -> route again
|
|
44
|
-
|
|
45
|
-
formal-spec
|
|
46
|
-
explicit formal Spec or high-risk boundary
|
|
47
|
-
-> grilling inline first only when a consequential decision is unresolved
|
|
48
|
-
-> spec-gate -> user review -> approved Spec
|
|
49
|
-
-> router selects delivery topology
|
|
50
|
-
-> durable ticket graph -> to-tickets -> user approves ticket contract
|
|
51
|
-
-> one coherent scope -> implement
|
|
52
|
-
-> independent frontier tickets without write overlap -> subagent-driven-development
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
File count, a new-feature label, ordinary behavior change, and normal code complexity do not upgrade a task. They affect implementation and verification intensity only.
|
|
31
|
+
The three lanes are: direct (clear low-risk task), needs-decision (grilling inline), and formal-spec
|
|
32
|
+
(explicit formal Spec or high-risk boundary). File count, new features, and ordinary complexity affect
|
|
33
|
+
verification intensity, not the lane. Resolve only consequential user decisions that tools cannot discover.
|
|
56
34
|
|
|
57
35
|
## Routing
|
|
58
36
|
|
|
@@ -61,24 +39,22 @@ Use process skills before implementation skills:
|
|
|
61
39
|
```text
|
|
62
40
|
Task arrives
|
|
63
41
|
-> explicit workflow advice? -> workflow advice mode
|
|
64
|
-
-> explicit project-context setup request? -> project-context
|
|
65
42
|
-> explicit documented grilling request? -> grilling explicit + domain-modeling persistent mode
|
|
66
43
|
-> explicit grilling request? -> grilling explicit
|
|
67
44
|
-> explicit handoff or fresh session or prototype branch?
|
|
68
45
|
-> skills/handoff/SKILL.md
|
|
69
46
|
-> explicit triage request? -> skills/triage/SKILL.md
|
|
70
|
-
-> explicit TDD request? -> skills/test-driven-development/SKILL.md
|
|
47
|
+
-> explicit TDD request? -> skills/test-driven-development/SKILL.md
|
|
71
48
|
-> explicit E2E or Playwright request? -> skills/e2e-testing/SKILL.md + agents/e2e-runner.md
|
|
72
49
|
-> explicit harness audit? -> agents/harness-optimizer.md
|
|
73
|
-
-> huge effort beyond one session? -> skills/wayfinder/SKILL.md
|
|
74
50
|
-> explicit architecture-health audit? -> skills/improve-codebase-architecture/SKILL.md
|
|
75
51
|
-> merge or rebase conflict? -> skills/resolving-merge-conflicts/SKILL.md
|
|
76
|
-
-> bug
|
|
52
|
+
-> reported bug or unexplained/repeated failure? -> skills/systematic-debugging/SKILL.md
|
|
77
53
|
-> discoverable fact? -> inspect it; do not ask
|
|
78
|
-
->
|
|
54
|
+
-> external engineering fact or documentation question? -> inspect primary sources directly; cite the answer
|
|
79
55
|
-> systematic evidence or blind-spot gap? -> iterative-retrieval
|
|
80
56
|
-> explicit prototype or runnable design question? -> skills/prototype/SKILL.md
|
|
81
|
-
-> unresolved user-owned decision? -> grilling inline
|
|
57
|
+
-> unresolved user-owned decision? -> skills/grilling/SKILL.md (grilling inline)
|
|
82
58
|
high-risk or explicit formal Spec context? -> resume_target: spec-gate
|
|
83
59
|
-> explicit formal Spec or high-risk boundary? -> spec-gate
|
|
84
60
|
-> delivery request in defined scope? -> select delivery topology
|
|
@@ -87,17 +63,15 @@ Task arrives
|
|
|
87
63
|
-> skills/subagent-driven-development/SKILL.md
|
|
88
64
|
-> otherwise -> skills/implement/SKILL.md
|
|
89
65
|
-> behavior change with a test path? -> test-driven-development
|
|
90
|
-
->
|
|
66
|
+
-> new feature or other Git-rule isolation need? -> skills/using-git-worktrees/SKILL.md
|
|
91
67
|
-> completion, fixed, or ready claim? -> verification-before-completion
|
|
92
|
-
-> skill discovery or install request? ->
|
|
68
|
+
-> skill discovery or install request? -> use available host tooling for the explicit request
|
|
93
69
|
-> external skill learning or edit? -> rules/common/skills-learning.md
|
|
94
70
|
-> otherwise -> shortest applicable loop
|
|
95
71
|
```
|
|
96
72
|
|
|
97
73
|
A high-risk boundary is a costly-to-reverse architecture or service boundary, public-contract compatibility, authentication or authorization boundary, persistent data/schema migration, or irreversible external side effect. Record this classification before grilling so its handoff can resume `spec-gate`.
|
|
98
74
|
|
|
99
|
-
## Process Outcomes
|
|
100
|
-
|
|
101
75
|
### Workflow advice mode
|
|
102
76
|
|
|
103
77
|
只返回推荐入口与原因、前置条件、需要补齐的用户决策或 Spec/tickets/map/handoff,以及直到
|
|
@@ -119,57 +93,16 @@ Skill 名称。开始时用一行说明所选拓扑及理由,然后继续执
|
|
|
119
93
|
mutation、commit、push、PR 或不可逆副作用。新的 frontier 只有仍在该授权范围内时才能由 router 再次选择
|
|
120
94
|
执行拓扑。
|
|
121
95
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
Read `Risk classification` and `Resume target`. A non-formal task returns to direct or another narrow process. A high-risk/formal task with `resume_target: spec-gate` enters a fresh Spec Gate call.
|
|
125
|
-
|
|
126
|
-
### Spec Gate ready
|
|
127
|
-
|
|
128
|
-
`READY_FOR_USER_REVIEW` means the local artifact passed self-review but is not approved. Present the
|
|
129
|
-
path and wait for explicit approval. Approval returns control here; the router then selects a delivery
|
|
130
|
-
topology from the approved scope instead of waiting for the user to name the next Skill.
|
|
131
|
-
|
|
132
|
-
### Cross-session handoff
|
|
133
|
-
|
|
134
|
-
When a prototype detour needs isolation or the current context is leaving its reliable reasoning zone,
|
|
135
|
-
recommend the `handoff` Skill and wait for explicit approval before creating the temporary document.
|
|
136
|
-
The handoff ends the current flow; a fresh session references the returned path and enters this router
|
|
137
|
-
again. Do not use handoff as a substitute for durable Specs, ADRs, tickets, or verification evidence.
|
|
138
|
-
|
|
139
|
-
### Spec Gate blocked
|
|
140
|
-
|
|
141
|
-
`BLOCKED_BY_UNRESOLVED_DECISION` is terminal for the current call chain:
|
|
142
|
-
|
|
143
|
-
1. Stop without drafting, guessing, or automatically invoking another Skill.
|
|
144
|
-
2. Present a decision map: confirmed decisions, unresolved decision, and blocking point.
|
|
145
|
-
3. Let the user choose to continue clarification, reduce scope, or exit the formal flow.
|
|
146
|
-
4. Only an explicit choice to continue starts a new grilling session.
|
|
147
|
-
5. After that session completes, route again into a new Spec Gate; do not resume the old call stack.
|
|
148
|
-
|
|
149
|
-
If the same confirmed `decision_id` blocks again with unchanged evidence, report a `Spec Gate contract conflict`. Do not repeat the question. Only reversal evidence or an invalidated premise can reopen the decision.
|
|
150
|
-
|
|
151
|
-
### Spec Gate not applicable
|
|
96
|
+
## Process Outcomes
|
|
152
97
|
|
|
153
|
-
|
|
98
|
+
Only when processing a grilling/Spec outcome or preparing a cross-session handoff, read
|
|
99
|
+
[references/process-outcomes.md](references/process-outcomes.md). Follow the matching outcome before
|
|
100
|
+
continuing; a self-reviewed Spec is not user approval. Ordinary direct delivery does not load this reference.
|
|
154
101
|
|
|
155
102
|
## Compatibility Alias
|
|
156
103
|
|
|
157
104
|
For one release cycle, interpret a user explicitly asking for the old name `brainstorming` as a formal Spec request. Explain that the entry moved to `/to-spec`; route through the same optional grilling and `spec-gate` path. Do not expose an old Skill shim or a second protocol source.
|
|
158
105
|
|
|
159
|
-
## Red Flags
|
|
160
|
-
|
|
161
|
-
Stop and reassess if you are about to:
|
|
162
|
-
|
|
163
|
-
- ask for a fact that tools can discover;
|
|
164
|
-
- add grilling because a task is merely complex or multi-file;
|
|
165
|
-
- enter formal Spec Gate for an ordinary reversible change;
|
|
166
|
-
- let Spec Gate interview the user;
|
|
167
|
-
- automatically bounce from a blocked Spec Gate to grilling;
|
|
168
|
-
- select SDD without at least two safe, independent frontier tickets;
|
|
169
|
-
- treat a topology choice as approval for a ticket contract or an external mutation;
|
|
170
|
-
- continue implementation without an approved required Spec;
|
|
171
|
-
- claim completion without fresh verification evidence.
|
|
172
|
-
|
|
173
106
|
## Completion
|
|
174
107
|
|
|
175
108
|
Before saying work is complete, fixed, passing, or ready, apply `skills/verification-before-completion/SKILL.md` and report fresh evidence, skipped checks, and remaining risk.
|