claude-everything-workflow 0.1.9 → 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 +20 -20
- package/CLAUDE.md +1 -5
- package/README.md +151 -113
- package/agents/e2e-runner.md +8 -141
- package/agents/harness-optimizer.md +3 -2
- package/commands/code-review.md +10 -15
- package/commands/learn.md +97 -0
- package/commands/pr.md +5 -6
- package/commands/to-spec.md +11 -0
- package/commands/verify.md +7 -11
- package/harness/manifest.json +346 -0
- package/hooks/check-code-size.js +33 -12
- package/hooks/check-console-log.js +72 -24
- package/package.json +10 -2
- package/rules/01-base.md +9 -49
- package/rules/02-code-size.md +5 -20
- package/rules/03-architecture.md +9 -61
- package/rules/04-error-handling.md +4 -26
- package/rules/05-git-workflow.md +12 -39
- package/rules/06-comments.md +3 -43
- package/rules/07-forbidden.md +8 -31
- package/rules/08-specialty-rules-index.md +18 -0
- package/rules/09-first-principles-adversarial-testing.md +6 -18
- package/rules/common/agent-orchestration.md +8 -47
- package/rules/common/context-hygiene.md +9 -72
- package/rules/common/harness-engineering.md +11 -38
- package/rules/common/hooks.md +13 -82
- package/rules/common/performance.md +8 -71
- package/rules/common/pr-automation.md +7 -68
- package/rules/common/skills-learning.md +12 -36
- package/rules/common/testing.md +16 -59
- package/scripts/cleanup-retired-skills.js +214 -0
- package/scripts/install-rules.js +100 -0
- package/scripts/install.ps1 +99 -87
- package/scripts/install.sh +77 -78
- package/scripts/learning/review-confidence.js +1 -4
- package/scripts/legacy-common-rule-hashes.json +78 -0
- package/scripts/merge-claude-settings.cjs +75 -0
- package/scripts/retired-skill-files.json +54 -0
- package/scripts/upstream-capability-baseline.json +27 -0
- package/scripts/upstream-capability-map.json +155 -0
- package/scripts/verify/core.js +91 -0
- package/scripts/verify/grilling-spec-gate-checks.js +266 -0
- package/scripts/verify/install-rules.test.js +156 -0
- package/scripts/verify/metadata-checks.js +747 -0
- package/scripts/verify/repository-checks.js +409 -0
- package/scripts/verify/runtime-checks.js +593 -0
- 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 +685 -0
- package/scripts/verify/workflow-ownership-fixtures.js +371 -0
- package/scripts/verify/workflow-ownership.js +780 -0
- package/scripts/verify-harness.js +18 -1075
- package/scripts/verify-upstream-capability-map.js +118 -0
- package/skills/README.md +28 -16
- package/skills/code-review/SKILL.md +63 -0
- package/skills/code-review/references/spec-reviewer-prompt.md +24 -0
- package/skills/code-review/references/standards-reviewer-prompt.md +35 -0
- package/skills/codebase-design/SKILL.md +63 -0
- package/skills/codebase-design/references/deepening.md +27 -0
- package/skills/codebase-design/references/design-it-twice.md +17 -0
- package/skills/continuous-learning-v2/SKILL.md +8 -8
- package/skills/continuous-learning-v2/config.json +0 -4
- package/skills/domain-modeling/SKILL.md +101 -0
- package/skills/e2e-testing/SKILL.md +20 -310
- package/skills/e2e-testing/references/playwright-patterns.md +324 -0
- package/skills/feature-acceptance/SKILL.md +89 -0
- package/skills/grilling/SKILL.md +83 -0
- package/skills/handoff/SKILL.md +55 -0
- package/skills/handoff/agents/openai.yaml +2 -0
- package/skills/implement/SKILL.md +48 -0
- package/skills/implement/references/ticket-delivery.md +43 -0
- package/skills/improve-codebase-architecture/SKILL.md +47 -0
- package/skills/improve-codebase-architecture/agents/openai.yaml +2 -0
- package/skills/iterative-retrieval/SKILL.md +10 -1
- package/skills/learn/README.md +2 -2
- package/skills/prototype/SKILL.md +50 -0
- package/skills/prototype/references/logic.md +28 -0
- package/skills/prototype/references/ui.md +30 -0
- package/skills/resolving-merge-conflicts/SKILL.md +27 -0
- package/skills/spec-gate/SKILL.md +149 -0
- package/skills/spec-gate/agents/openai.yaml +4 -0
- package/skills/spec-gate/references/spec-document-reviewer-prompt.md +31 -0
- package/skills/subagent-driven-development/SKILL.md +95 -414
- package/skills/systematic-debugging/SKILL.md +11 -49
- package/skills/systematic-debugging/references/diagnosing-bugs.upstream.md +129 -0
- package/skills/systematic-debugging/scripts/hitl-loop.template.js +75 -0
- package/skills/systematic-debugging/scripts/hitl-loop.template.sh +41 -0
- package/skills/test-driven-development/SKILL.md +24 -4
- package/skills/to-tickets/SKILL.md +96 -0
- package/skills/triage/SKILL.md +53 -0
- package/skills/triage/agents/openai.yaml +2 -0
- package/skills/triage/references/agent-brief.md +32 -0
- package/skills/triage/references/out-of-scope.md +14 -0
- package/skills/using-git-worktrees/SKILL.md +8 -5
- package/skills/using-superpowers/SKILL.md +76 -43
- 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 +62 -0
- package/skills/visual-companion/agents/openai.yaml +4 -0
- package/skills/{brainstorming/visual-companion.md → visual-companion/references/guide.md} +1 -1
- package/skills/{brainstorming → visual-companion}/scripts/frame-template.html +42 -12
- package/skills/visual-companion/scripts/pages.cjs +28 -0
- package/skills/visual-companion/scripts/server-utils.cjs +82 -0
- package/skills/{brainstorming → visual-companion}/scripts/server.cjs +108 -248
- package/skills/{brainstorming → visual-companion}/scripts/start-server.sh +18 -4
- package/skills/visual-companion/scripts/websocket.cjs +86 -0
- package/agents/architect.md +0 -59
- package/agents/code-reviewer.md +0 -57
- package/agents/planner.md +0 -124
- package/agents/tdd-guide.md +0 -101
- package/commands/e2e.md +0 -28
- package/commands/evolve.md +0 -42
- package/commands/harness-audit.md +0 -27
- package/commands/instinct-status.md +0 -38
- package/commands/learn-eval.md +0 -91
- package/commands/projects.md +0 -27
- package/commands/promote.md +0 -29
- package/commands/prune.md +0 -46
- package/commands/tdd.md +0 -27
- package/homunculus/instincts/personal/always-test-first.md +0 -28
- package/homunculus/instincts/personal/pr-ci-quality-gate.md +0 -30
- package/rules/08-ecc-integration.md +0 -46
- package/rules/common/implementation.md +0 -25
- package/rules/common/security.md +0 -19
- package/skills/brainstorming/SKILL.md +0 -185
- package/skills/brainstorming/agents/openai.yaml +0 -3
- package/skills/brainstorming/spec-document-reviewer-prompt.md +0 -49
- package/skills/context-budget/SKILL.md +0 -59
- package/skills/discover-unknowns-zh/SKILL.md +0 -112
- package/skills/discover-unknowns-zh/agents/openai.yaml +0 -4
- package/skills/discover-unknowns-zh/references/prompt-patterns.md +0 -144
- package/skills/documentation-lookup/SKILL.md +0 -90
- package/skills/executing-plans/SKILL.md +0 -66
- package/skills/find-skills/SKILL.md +0 -142
- package/skills/skill-creator/LICENSE.txt +0 -202
- package/skills/skill-creator/SKILL.md +0 -356
- package/skills/skill-creator/references/output-patterns.md +0 -82
- package/skills/skill-creator/references/workflows.md +0 -28
- package/skills/skill-creator/scripts/init_skill.py +0 -303
- package/skills/skill-creator/scripts/package_skill.py +0 -110
- package/skills/skill-creator/scripts/quick_validate.py +0 -95
- package/skills/subagent-driven-development/implementer-prompt.md +0 -139
- package/skills/subagent-driven-development/scripts/review-package +0 -44
- package/skills/subagent-driven-development/scripts/sdd-workspace +0 -22
- package/skills/subagent-driven-development/scripts/task-brief +0 -40
- package/skills/subagent-driven-development/task-reviewer-prompt.md +0 -188
- package/skills/writing-plans/SKILL.md +0 -206
- package/skills/writing-plans/plan-document-reviewer-prompt.md +0 -49
- /package/skills/{brainstorming → visual-companion}/scripts/helper.js +0 -0
- /package/skills/{brainstorming → visual-companion}/scripts/stop-server.sh +0 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: feature-acceptance
|
|
3
|
+
description: "验收真实用户流程、界面和日志证据;用于确认修复或交付是否真正生效。"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 功能验收
|
|
7
|
+
|
|
8
|
+
把验收请求转成可复现、可复核的结论。优先验证用户可观察的行为,不用代码阅读、模拟页面或单个 API 响应替代真实流程。
|
|
9
|
+
|
|
10
|
+
## 输出协议
|
|
11
|
+
|
|
12
|
+
每个用例和整体结论只能是 `PASS / FAIL / BLOCKED / NOT RUN`。
|
|
13
|
+
|
|
14
|
+
- `PASS`:预期结果与关键断言满足,证据已经复核。
|
|
15
|
+
- `FAIL`:结果、错误提示、数据变化或技术断言不符合预期。
|
|
16
|
+
- `BLOCKED`:缺少明确的环境、权限、账号、数据或外部依赖。
|
|
17
|
+
- `NOT RUN`:本轮未执行的非核心用例,必须说明未覆盖风险。
|
|
18
|
+
|
|
19
|
+
不要用“看起来正常”替代结论。用户明确要求的核心用例不能无理由标为 `NOT RUN`。
|
|
20
|
+
|
|
21
|
+
## 路由
|
|
22
|
+
|
|
23
|
+
- 需要新增或维护可提交、可在 CI 重跑的浏览器测试时,读取 `skills/e2e-testing/SKILL.md`,必要时委派 `agents/e2e-runner.md`。
|
|
24
|
+
- 需要定位失败根因时,先读取 `skills/systematic-debugging/SKILL.md`,不要在验收报告中猜测修复方案。
|
|
25
|
+
- 完成声明仍须遵守 `skills/verification-before-completion/SKILL.md` 的新鲜验证证据要求。
|
|
26
|
+
- 仅在用例相互独立、运行环境允许且任务授权并行时并发执行;共享状态、顺序依赖或无并发授权时串行执行,并说明原因。
|
|
27
|
+
|
|
28
|
+
## 流程
|
|
29
|
+
|
|
30
|
+
### 1. 定义目标
|
|
31
|
+
|
|
32
|
+
记录被测功能、真实用户入口、核心成功标准、环境前置条件和不可执行的高风险动作。没有测试前置条件时先标记 `BLOCKED`,不要通过注入凭据、篡改本地状态或破坏共享数据绕过。
|
|
33
|
+
|
|
34
|
+
### 2. 写用例矩阵
|
|
35
|
+
|
|
36
|
+
先写用例矩阵,再开始操作:
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
| ID | 场景 | 前置条件 | 步骤 | 期望结果 | keyNodes | evidenceMedium | 结果 |
|
|
40
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
41
|
+
| A1 | 主成功路径 | 已启动服务 | 从真实入口完成操作 | 用户可见结果正确 | 入口 / 操作 / 结果 | image | NOT RUN |
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
- 至少覆盖主成功路径;按风险补充错误、空状态、权限或关键分支。
|
|
45
|
+
- `keyNodes` 写明名称、重要性、预期观察和证据角色。
|
|
46
|
+
- `evidenceMedium` 只能是 `image`、`video` 或 `log`。关键节点超过 10 个或需要表达过程时用 `video`。
|
|
47
|
+
- 真实产品流程的 `image` 或 `video` 必须来自真实产品页面或应用界面;API、数据库或脚本输出只作为辅助 `log` 证据。
|
|
48
|
+
|
|
49
|
+
### 3. 采集证据
|
|
50
|
+
|
|
51
|
+
在目标项目工作区的已忽略临时目录保存需要持久复核的产物,例如 `tmp/acceptance/<run-id>/`。每个用例单独保存截图、视频或日志,并记录来源 URL/窗口、采集时间、采集前动作和对应的 `keyNodes`。
|
|
52
|
+
|
|
53
|
+
- 操作前采集基线,操作后采集结果;分支判断点不能只保留最终截图。
|
|
54
|
+
- 视频应覆盖触发、操作和完成信号;不要用静态图片伪装视频。
|
|
55
|
+
- 日志记录相关 console、网络或服务端错误,不把 token、Cookie、账号、密码、个人数据或其他敏感信息写入证据或报告。
|
|
56
|
+
- 无法继续时立即停止该用例,记录可复现的 `failureReason` 与缺失条件。
|
|
57
|
+
|
|
58
|
+
### 4. 二次审核
|
|
59
|
+
|
|
60
|
+
主 agent 必须二次审核每份关键证据,不能只引用执行者的自报结论。
|
|
61
|
+
|
|
62
|
+
- `image`:确认可渲染、来源真实、URL 和关键节点正确,且不是空白页、登录页或无关页面。
|
|
63
|
+
- `video`:确认时长合理,并覆盖触发、过程和完成信号。
|
|
64
|
+
- `log`:确认关键断言存在,且没有与结论冲突的相关错误。
|
|
65
|
+
|
|
66
|
+
任何 image/video 用例未完成二次审核时,整体不能是 `PASS`。
|
|
67
|
+
|
|
68
|
+
### 5. 报告
|
|
69
|
+
|
|
70
|
+
报告保持简短但可复核:
|
|
71
|
+
|
|
72
|
+
```text
|
|
73
|
+
结论:PASS / FAIL / BLOCKED / NOT RUN
|
|
74
|
+
被测功能:
|
|
75
|
+
被测地址 / 命令:
|
|
76
|
+
用例结果:
|
|
77
|
+
| ID | 场景 | 结果 | 原因 | 关键证据 |
|
|
78
|
+
二次审核:已打开的证据;改判原因
|
|
79
|
+
技术摘要:相关 console / 网络 / 服务端错误
|
|
80
|
+
未覆盖风险:
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
核心用例任一 `FAIL` 时整体为 `FAIL`;没有 `FAIL` 但核心用例 `BLOCKED` 时整体为 `BLOCKED`;核心用例全部 `PASS` 且证据审核完成时整体才为 `PASS`。
|
|
84
|
+
|
|
85
|
+
## 边界
|
|
86
|
+
|
|
87
|
+
- 不把 mock 页面、Storybook、历史截图、终端截图或伪造数据当作真实产品验收证据。
|
|
88
|
+
- 不为验收执行用户未授权的写操作、支付、删除或生产数据变更。
|
|
89
|
+
- 不把一次性验收替代应提交的单元测试、类型检查或 E2E 测试;它们互为补充。
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: grilling
|
|
3
|
+
description: Resolve a consequential user-owned decision one question at a time; do not ask discoverable facts.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Grilling
|
|
7
|
+
|
|
8
|
+
Sharpen a plan, design, or task by resolving consequential user decisions without becoming a universal workflow gate.
|
|
9
|
+
|
|
10
|
+
Reference: https://github.com/mattpocock/skills/blob/main/skills/productivity/grilling/SKILL.md
|
|
11
|
+
|
|
12
|
+
## Boundary
|
|
13
|
+
|
|
14
|
+
- Do not ask for discoverable facts. Inspect files, documentation, logs, history, and tools first.
|
|
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
|
+
- 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
|
+
- Do not generate or approve a Spec, implement code, or own workflow continuation.
|
|
19
|
+
|
|
20
|
+
## Existing Confirmed Handoff
|
|
21
|
+
|
|
22
|
+
Treat confirmed decisions and delegated defaults from an existing handoff as approved input. Do not re-ask them.
|
|
23
|
+
|
|
24
|
+
Reopen one decision only when its recorded reversal evidence appears or an underlying premise is invalidated. A merely available alternative or changed agent preference is not new evidence.
|
|
25
|
+
|
|
26
|
+
## Interview Loop
|
|
27
|
+
|
|
28
|
+
Track the decision tree, resolved branches, delegated defaults, rejected alternatives, and remaining consequential branches.
|
|
29
|
+
|
|
30
|
+
Ask one question per turn. Each turn must:
|
|
31
|
+
|
|
32
|
+
1. Explain why the decision changes the result.
|
|
33
|
+
2. Present two or three mutually exclusive options.
|
|
34
|
+
3. Give a recommended answer and concise rationale.
|
|
35
|
+
4. State the reversal evidence that would change the recommendation.
|
|
36
|
+
|
|
37
|
+
Mark weak-evidence recommendations as tentative. Wait for the user's answer before opening another branch.
|
|
38
|
+
|
|
39
|
+
After each answer:
|
|
40
|
+
|
|
41
|
+
- prune irrelevant branches;
|
|
42
|
+
- accept a rejected recommendation without repeated persuasion;
|
|
43
|
+
- when the user says “you decide,” adopt the recommended default and mark it delegated;
|
|
44
|
+
- record reversal evidence for the accepted choice, not only the original recommendation;
|
|
45
|
+
- show the smallest conflict when an answer contradicts a confirmed decision;
|
|
46
|
+
- stop immediately and list unresolved decisions when the user ends the session.
|
|
47
|
+
|
|
48
|
+
## Modes
|
|
49
|
+
|
|
50
|
+
### Inline uncertainty mode
|
|
51
|
+
|
|
52
|
+
Use when the central router finds a consequential decision blocking the shortest safe path. Ask only the highest-value unresolved question and stop as soon as the answer is sufficient.
|
|
53
|
+
|
|
54
|
+
For a low-risk task, return the handoff for direct or narrow-process routing. For high-risk/formal work, preserve its prior classification and use `resume_target: spec-gate`; do not call Spec Gate directly.
|
|
55
|
+
|
|
56
|
+
### Explicit grilling session
|
|
57
|
+
|
|
58
|
+
Use when the user says grill me or asks to challenge a plan, design, decision, or idea. Walk the consequential decision tree until branches are resolved or delegated, then use the shared-understanding gate.
|
|
59
|
+
|
|
60
|
+
## Handoff
|
|
61
|
+
|
|
62
|
+
All cross-Skill results use this structure:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
Goal:
|
|
66
|
+
Route context:
|
|
67
|
+
- Risk classification:
|
|
68
|
+
- Resume target:
|
|
69
|
+
Resolved decisions:
|
|
70
|
+
- Decision: <accepted value>
|
|
71
|
+
Reversal evidence: <evidence or condition that reopens it>
|
|
72
|
+
Delegated defaults:
|
|
73
|
+
- Default: <accepted default>
|
|
74
|
+
Reversal evidence: <evidence or condition that reopens it>
|
|
75
|
+
Rejected alternatives:
|
|
76
|
+
Remaining risks:
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Use `resume_target: spec-gate` only when the router already classified the task as high-risk/formal. Do not invent a high-risk classification during handoff formatting.
|
|
80
|
+
|
|
81
|
+
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
|
+
|
|
83
|
+
After exit, return to `skills/using-superpowers/SKILL.md` for routing. A fresh session created after `BLOCKED_BY_UNRESOLVED_DECISION` must not resume the old Spec Gate call stack; it returns a new handoff to the router.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: handoff
|
|
3
|
+
description: Create a redacted handoff for an explicitly requested fresh session or context boundary.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Handoff
|
|
7
|
+
|
|
8
|
+
Bridge one context window to a fresh session without copying the repository or mutating project files.
|
|
9
|
+
|
|
10
|
+
Origin: `mattpocock/skills@2ab9580`, adapted to this repository's write-safety and verification contracts.
|
|
11
|
+
|
|
12
|
+
## Preconditions
|
|
13
|
+
|
|
14
|
+
- Use only for a fresh session or an intentional prototype branch. Built-in compaction is for continuing
|
|
15
|
+
the same conversation at a phase boundary.
|
|
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.
|
|
18
|
+
- Resolve the operating system's temporary directory with the available runtime. Create a unique
|
|
19
|
+
private subdirectory with mode `0700`; fail closed if permissions cannot be enforced. Do not write
|
|
20
|
+
the handoff into the repository, tracker, home directory, or a guessed path.
|
|
21
|
+
|
|
22
|
+
## Build the document
|
|
23
|
+
|
|
24
|
+
Create one uniquely named Markdown file inside that private directory using exclusive creation, then
|
|
25
|
+
enforce mode `0600` before content is written. Never overwrite or follow an existing path. Include:
|
|
26
|
+
|
|
27
|
+
1. current objective and intended next-session focus;
|
|
28
|
+
2. completed work and current status;
|
|
29
|
+
3. confirmed decisions, constraints, and user authorizations;
|
|
30
|
+
4. unresolved decisions, blockers, and remaining risks;
|
|
31
|
+
5. repository/worktree/branch state when relevant;
|
|
32
|
+
6. verification already run and its exact outcome;
|
|
33
|
+
7. the smallest concrete next actions;
|
|
34
|
+
8. a `Suggested skills` section naming only skills the next session should load.
|
|
35
|
+
|
|
36
|
+
Do not duplicate content already preserved in Specs, plans, ADRs, tickets, commits, diffs, or research
|
|
37
|
+
artifacts. Reference each durable artifact by exact path, URL, commit, or ticket identifier and summarize
|
|
38
|
+
only why it matters.
|
|
39
|
+
|
|
40
|
+
Redact secrets, credentials, tokens, private keys, personal data, and unrelated sensitive output. Do not
|
|
41
|
+
invent missing facts. Mark uncertainty explicitly.
|
|
42
|
+
|
|
43
|
+
## Return contract
|
|
44
|
+
|
|
45
|
+
After writing, verify that the file exists and is readable. Return:
|
|
46
|
+
|
|
47
|
+
- the exact path;
|
|
48
|
+
- the intended next-session focus;
|
|
49
|
+
- instructions to open a fresh session and reference that path;
|
|
50
|
+
- instructions for the fresh session to delete the handoff after consumption, remove its now-empty
|
|
51
|
+
private directory, and verify both removals;
|
|
52
|
+
- any information intentionally omitted or redacted.
|
|
53
|
+
|
|
54
|
+
Do not continue the old workflow after returning the handoff. The fresh session re-enters
|
|
55
|
+
`skills/using-superpowers/SKILL.md` and loads the suggested skills from disk before acting.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: implement
|
|
3
|
+
description: Deliver one authorized scope through implementation, review, and verification.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Implement
|
|
7
|
+
|
|
8
|
+
执行 router 选定的一个连贯交付范围。Origin: `mattpocock/skills@2ab9580`,适配本项目授权与审查边界。
|
|
9
|
+
|
|
10
|
+
## 入口
|
|
11
|
+
|
|
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。
|
|
17
|
+
|
|
18
|
+
缺少可复核验收、存在实质用户决策或命中尚未批准的 formal Spec/高风险边界时,返回 router,不能猜测或实施。
|
|
19
|
+
普通范围使用当前会话,不为满足流程创建新的上下文或 tracker。
|
|
20
|
+
|
|
21
|
+
## 隔离与基线
|
|
22
|
+
|
|
23
|
+
检查 branch、worktree、staged、unstaged 和 untracked,记录 `git rev-parse HEAD` 为 pre-delivery base,
|
|
24
|
+
并记录 task-owned 改动。已有无关改动必须排除,不能回滚。
|
|
25
|
+
|
|
26
|
+
是否创建 worktree 以 `rules/05-git-workflow.md` 为准;需要隔离时使用
|
|
27
|
+
`skills/using-git-worktrees/SKILL.md`,不嵌套创建。只做必要 setup 与相关 baseline tests。
|
|
28
|
+
只有 clean baseline 才进入实施;失败时记录命令、失败与工作区状态,返回 router 处理,不能伪装通过。
|
|
29
|
+
|
|
30
|
+
## 实施、审查与验证
|
|
31
|
+
|
|
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
|
+
最终改动的证据可以复用;新改动、失败或未决风险才触发重跑。记录实际结果、未运行项和剩余风险。
|
|
42
|
+
|
|
43
|
+
## 收尾与授权
|
|
44
|
+
|
|
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。
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: improve-codebase-architecture
|
|
3
|
+
description: Run an explicit read-only architecture-health audit and route selected findings to design or grilling.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Improve Codebase Architecture
|
|
7
|
+
|
|
8
|
+
Origin: `mattpocock/skills@2ab9580`, adapted to this repository's visual consent and routing gates.
|
|
9
|
+
|
|
10
|
+
## 1. Scope and Explore
|
|
11
|
+
|
|
12
|
+
Read `skills/codebase-design/SKILL.md`, relevant `CONTEXT.md`/`CONTEXT-MAP.md`, ADRs and project rules.
|
|
13
|
+
|
|
14
|
+
- Use the user-named subsystem when supplied.
|
|
15
|
+
- Otherwise inspect recent history for repeatedly changed areas before widening the scan.
|
|
16
|
+
- Look for shallow modules, duplicated caller policy, message chains, pass-through layers, leaked
|
|
17
|
+
ordering/error rules, and code that cannot be tested through a stable interface.
|
|
18
|
+
- Apply the deletion test and classify dependency types before recommending a new seam.
|
|
19
|
+
- Keep speculative candidates separate from evidence-backed friction.
|
|
20
|
+
|
|
21
|
+
## 2. Report
|
|
22
|
+
|
|
23
|
+
For each candidate include:
|
|
24
|
+
|
|
25
|
+
- files/modules and evidence;
|
|
26
|
+
- current interface and leaked complexity;
|
|
27
|
+
- proposed deepening direction, without committing to a final interface;
|
|
28
|
+
- expected leverage, locality and test-surface improvement;
|
|
29
|
+
- compatibility risk and recommendation strength: `Strong`, `Worth exploring` or `Speculative`;
|
|
30
|
+
- a before/after relationship diagram.
|
|
31
|
+
|
|
32
|
+
Prefer a compact Markdown report when visuals add little. When a visual report materially improves
|
|
33
|
+
understanding, use `skills/visual-companion/SKILL.md` and obtain its explicit consent before starting
|
|
34
|
+
the server or opening a URL. Never open a browser silently.
|
|
35
|
+
|
|
36
|
+
End with one top recommendation. Do not implement it.
|
|
37
|
+
|
|
38
|
+
## 3. Decision Loop
|
|
39
|
+
|
|
40
|
+
After the user chooses a candidate:
|
|
41
|
+
|
|
42
|
+
1. Use `skills/grilling/SKILL.md` for consequential choices.
|
|
43
|
+
2. Use `skills/domain-modeling/SKILL.md` when domain language or an ADR-worthy decision changes.
|
|
44
|
+
3. Use `skills/codebase-design/references/design-it-twice.md` when interface alternatives remain.
|
|
45
|
+
4. Return the resolved candidate to the central router for Spec/planning classification.
|
|
46
|
+
|
|
47
|
+
Do not turn an architecture audit into an unapproved refactor.
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: iterative-retrieval
|
|
3
|
-
description: "
|
|
3
|
+
description: "收敛大仓库、证据或盲点检索;避免一次性读取无关内容。"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Iterative Retrieval
|
|
7
7
|
|
|
8
8
|
这个 skill 解决子代理和大仓库探索的核心问题:开始时不知道要读什么,但把所有内容都塞进上下文会让模型变差。
|
|
9
9
|
|
|
10
|
+
它同时负责可调查的事实、证据和盲点缺口。优先用代码搜索、现有测试、文档、日志、截图或小实验缩小未知项,不把可查事实转问用户。
|
|
11
|
+
|
|
10
12
|
## 四阶段闭环
|
|
11
13
|
|
|
12
14
|
最多跑 3 轮,每轮都要缩小范围。
|
|
@@ -67,6 +69,13 @@ description: "为 subagent、代码探索、RAG 式检索和大仓库上下文
|
|
|
67
69
|
- 下一轮搜索只会扩大噪音,没有新的术语或路径线索。
|
|
68
70
|
- 任务需要用户或外部系统信息,继续本地检索无法推进。
|
|
69
71
|
|
|
72
|
+
## 路由边界
|
|
73
|
+
|
|
74
|
+
- 只因任务复杂、高风险、多文件或长周期,不启动额外调查。
|
|
75
|
+
- 若剩余缺口是会实质改变结果的用户决策,记录证据并返回中央路由,由 `skills/grilling/SKILL.md` 收敛。
|
|
76
|
+
- 若证据暴露高回滚成本边界,报告风险分类并返回中央路由,由 `skills/spec-gate/SKILL.md` 处理。
|
|
77
|
+
- 检索结束后返回 `skills/using-superpowers/SKILL.md` 重新路由,不要自行枚举或调用下一 skill。
|
|
78
|
+
|
|
70
79
|
## 反模式
|
|
71
80
|
|
|
72
81
|
- 一开始就读取全仓、完整日志或完整搜索结果。
|
package/skills/learn/README.md
CHANGED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prototype
|
|
3
|
+
description: Build a throwaway runnable probe for one explicit design question; do not silently ship it.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Prototype
|
|
7
|
+
|
|
8
|
+
Origin: `mattpocock/skills@2ab9580`, adapted to reuse this repository's secured visual companion.
|
|
9
|
+
|
|
10
|
+
A prototype answers one question. It is not a production shortcut.
|
|
11
|
+
|
|
12
|
+
## Select the Branch
|
|
13
|
+
|
|
14
|
+
- Logic, state transition, data shape or API feel → read `references/logic.md`.
|
|
15
|
+
- Visual hierarchy, layout or interaction shape → read `references/ui.md` and
|
|
16
|
+
`skills/visual-companion/SKILL.md`.
|
|
17
|
+
|
|
18
|
+
If the branch is ambiguous and the user is unavailable, use surrounding code as evidence: backend
|
|
19
|
+
or state code defaults to logic; page/component work defaults to UI. State the assumption.
|
|
20
|
+
|
|
21
|
+
## Shared Contract
|
|
22
|
+
|
|
23
|
+
1. Write the exact question at the top of the prototype.
|
|
24
|
+
2. Place throwaway code near the relevant module or route and name it visibly as a prototype.
|
|
25
|
+
3. Reuse the project's runtime and task runner; provide one command to run.
|
|
26
|
+
4. Keep state in memory unless persistence itself is the question.
|
|
27
|
+
5. Skip production polish, broad error handling, abstractions and tests.
|
|
28
|
+
6. Surface full relevant state after every action or variant change.
|
|
29
|
+
7. Never connect UI variants to real mutations.
|
|
30
|
+
8. Capture the answer: decision, evidence and remaining uncertainty.
|
|
31
|
+
9. Promote only the validated decision. Rewrite production code under normal TDD and review gates.
|
|
32
|
+
|
|
33
|
+
Prototype creation is an authorized implementation step only when the user requested it. Commit,
|
|
34
|
+
branch, browser and external-system actions keep their own approval requirements.
|
|
35
|
+
|
|
36
|
+
## Exit
|
|
37
|
+
|
|
38
|
+
Return:
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
Prototype question:
|
|
42
|
+
Branch and run command/URL:
|
|
43
|
+
Observed answer:
|
|
44
|
+
Validated decision:
|
|
45
|
+
Discarded assumptions:
|
|
46
|
+
Prototype cleanup/capture status:
|
|
47
|
+
Next router input:
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Then return to `skills/using-superpowers/SKILL.md`. Do not silently continue into production code.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Logic Prototype
|
|
2
|
+
|
|
3
|
+
Build a tiny interactive terminal app for business logic, state transitions or data-shape questions.
|
|
4
|
+
|
|
5
|
+
## Shape
|
|
6
|
+
|
|
7
|
+
1. Isolate the logic behind a small pure interface:
|
|
8
|
+
- reducer `(state, action) -> state`;
|
|
9
|
+
- explicit state machine;
|
|
10
|
+
- pure transformations over plain data;
|
|
11
|
+
- stateful module only when ongoing internal state is the question.
|
|
12
|
+
2. Keep terminal I/O in a thin shell. The logic module must not print, prompt or depend on terminal
|
|
13
|
+
escape codes.
|
|
14
|
+
3. Render one stable frame after every action:
|
|
15
|
+
- full current state;
|
|
16
|
+
- legal actions and one-key/one-line controls;
|
|
17
|
+
- quit action.
|
|
18
|
+
4. Keep the whole frame visible on one screen.
|
|
19
|
+
5. Add one run command using the existing package manager or task runner.
|
|
20
|
+
|
|
21
|
+
## Boundaries
|
|
22
|
+
|
|
23
|
+
- Do not add tests to the prototype.
|
|
24
|
+
- Do not use the production database unless persistence is the explicit question; then use a clearly
|
|
25
|
+
disposable scratch store.
|
|
26
|
+
- Do not generalize beyond the one stated question.
|
|
27
|
+
- The TUI shell never ships. A validated pure model may inform production code, which must be rewritten
|
|
28
|
+
through the normal implementation workflow.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# UI Prototype
|
|
2
|
+
|
|
3
|
+
Build a runnable in-project UI prototype. Use `skills/visual-companion/SKILL.md` only when its secured
|
|
4
|
+
browser companion materially improves review; its consent and authentication contract remains binding.
|
|
5
|
+
|
|
6
|
+
## Variants
|
|
7
|
+
|
|
8
|
+
- Default to three and cap at five.
|
|
9
|
+
- Make variants structurally different: layout, information hierarchy and primary affordance, not
|
|
10
|
+
only color or copy.
|
|
11
|
+
- Prefer embedding variants in an existing page with real read-only data, params, authentication shell
|
|
12
|
+
and realistic density. Swap only the rendered subtree.
|
|
13
|
+
- Create a visibly throwaway route only when no existing surface can host the question.
|
|
14
|
+
- Select variants with a `?variant=` search parameter so each view is shareable and reload-stable.
|
|
15
|
+
- Use the project's existing component and styling system.
|
|
16
|
+
|
|
17
|
+
## Interaction
|
|
18
|
+
|
|
19
|
+
Provide a clearly non-production switcher that:
|
|
20
|
+
|
|
21
|
+
- identifies the current variant;
|
|
22
|
+
- moves forward/back with controls and arrow keys;
|
|
23
|
+
- does not intercept keys inside editable elements;
|
|
24
|
+
- is gated out of production builds.
|
|
25
|
+
|
|
26
|
+
Expose one existing project run command and the exact URLs for all variants. Do not start a local
|
|
27
|
+
server or open the browser without the active task's authorization/consent.
|
|
28
|
+
|
|
29
|
+
After a choice, record which variant won and why. Rewrite the winner under normal production gates;
|
|
30
|
+
remove the switcher and losing variants from the production path.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: resolving-merge-conflicts
|
|
3
|
+
description: Resolve an active merge or rebase conflict hunk by hunk with verification.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Resolving Merge Conflicts
|
|
7
|
+
|
|
8
|
+
Origin: `mattpocock/skills@2ab9580`, adapted to this repository's Git authorization rules.
|
|
9
|
+
|
|
10
|
+
1. Inspect the exact Git state, merge base, conflicting paths and pending commits. Do not abort,
|
|
11
|
+
reset or discard either side.
|
|
12
|
+
2. For each side, trace intent to primary sources: commit messages, diffs, tests, issue/PR references,
|
|
13
|
+
specifications and surrounding code.
|
|
14
|
+
3. Resolve one hunk at a time:
|
|
15
|
+
- preserve both intents when compatible;
|
|
16
|
+
- when incompatible, follow the stated merge/rebase goal and documented contract;
|
|
17
|
+
- report the trade-off;
|
|
18
|
+
- do not invent unrelated behavior.
|
|
19
|
+
4. Search for semantic conflicts outside marker lines: renamed symbols, duplicated migrations,
|
|
20
|
+
mismatched schemas, tests or configuration.
|
|
21
|
+
5. Run the repository's formatting, type, test and build checks in risk order. Fix only breakage caused
|
|
22
|
+
by the integration.
|
|
23
|
+
6. Show the resolved files, intent decisions, checks and remaining risks.
|
|
24
|
+
7. Stage, commit or continue the merge/rebase only when the user's request already authorizes those Git
|
|
25
|
+
mutations; otherwise stop with the exact commands/actions awaiting approval.
|
|
26
|
+
|
|
27
|
+
Never use `git reset --hard`, destructive checkout, broad clean or `--abort` as a shortcut.
|