claude-everything-workflow 0.1.9 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/AGENTS.md +19 -20
  2. package/README.md +112 -104
  3. package/agents/code-reviewer.md +15 -44
  4. package/agents/harness-optimizer.md +3 -2
  5. package/agents/planner.md +23 -107
  6. package/commands/code-review.md +25 -9
  7. package/commands/learn.md +97 -0
  8. package/commands/pr.md +4 -0
  9. package/commands/to-spec.md +11 -0
  10. package/hooks/check-code-size.js +33 -12
  11. package/hooks/check-console-log.js +72 -24
  12. package/package.json +5 -2
  13. package/rules/01-base.md +19 -42
  14. package/rules/02-code-size.md +6 -17
  15. package/rules/03-architecture.md +16 -54
  16. package/rules/04-error-handling.md +4 -25
  17. package/rules/05-git-workflow.md +9 -37
  18. package/rules/06-comments.md +3 -37
  19. package/rules/07-forbidden.md +6 -30
  20. package/rules/08-specialty-rules-index.md +18 -0
  21. package/rules/09-first-principles-adversarial-testing.md +6 -18
  22. package/rules/common/agent-orchestration.md +10 -47
  23. package/rules/common/context-hygiene.md +9 -72
  24. package/rules/common/harness-engineering.md +11 -38
  25. package/rules/common/hooks.md +11 -82
  26. package/rules/common/performance.md +8 -71
  27. package/rules/common/pr-automation.md +7 -68
  28. package/rules/common/skills-learning.md +12 -36
  29. package/rules/common/testing.md +15 -59
  30. package/scripts/cleanup-retired-skills.js +214 -0
  31. package/scripts/install.ps1 +73 -85
  32. package/scripts/install.sh +54 -77
  33. package/scripts/learning/review-confidence.js +1 -4
  34. package/scripts/merge-claude-settings.cjs +75 -0
  35. package/scripts/retired-skill-files.json +37 -0
  36. package/scripts/upstream-capability-baseline.json +27 -0
  37. package/scripts/upstream-capability-map.json +150 -0
  38. package/scripts/verify/core.js +91 -0
  39. package/scripts/verify/grilling-spec-gate-checks.js +260 -0
  40. package/scripts/verify/metadata-checks.js +724 -0
  41. package/scripts/verify/repository-checks.js +435 -0
  42. package/scripts/verify/runtime-checks.js +593 -0
  43. package/scripts/verify/workflow-checks.js +741 -0
  44. package/scripts/verify/workflow-ownership-fixtures.js +371 -0
  45. package/scripts/verify/workflow-ownership.js +780 -0
  46. package/scripts/verify-harness.js +16 -1075
  47. package/scripts/verify-upstream-capability-map.js +117 -0
  48. package/skills/README.md +24 -11
  49. package/skills/code-review/SKILL.md +50 -0
  50. package/skills/code-review/references/spec-reviewer-prompt.md +24 -0
  51. package/skills/code-review/references/standards-reviewer-prompt.md +35 -0
  52. package/skills/codebase-design/SKILL.md +63 -0
  53. package/skills/codebase-design/references/deepening.md +27 -0
  54. package/skills/codebase-design/references/design-it-twice.md +17 -0
  55. package/skills/continuous-learning-v2/SKILL.md +7 -7
  56. package/skills/continuous-learning-v2/config.json +0 -4
  57. package/skills/domain-modeling/SKILL.md +100 -0
  58. package/skills/feature-acceptance/SKILL.md +89 -0
  59. package/skills/grilling/SKILL.md +83 -0
  60. package/skills/handoff/SKILL.md +56 -0
  61. package/skills/implement/SKILL.md +97 -0
  62. package/skills/improve-codebase-architecture/SKILL.md +48 -0
  63. package/skills/iterative-retrieval/SKILL.md +10 -1
  64. package/skills/learn/README.md +2 -2
  65. package/skills/project-context/SKILL.md +94 -0
  66. package/skills/project-context/agents/openai.yaml +6 -0
  67. package/skills/project-context/references/project-context-template.md +61 -0
  68. package/skills/prototype/SKILL.md +50 -0
  69. package/skills/prototype/references/logic.md +28 -0
  70. package/skills/prototype/references/ui.md +30 -0
  71. package/skills/research/SKILL.md +48 -0
  72. package/skills/resolving-merge-conflicts/SKILL.md +27 -0
  73. package/skills/spec-gate/SKILL.md +149 -0
  74. package/skills/spec-gate/agents/openai.yaml +4 -0
  75. package/skills/spec-gate/references/spec-document-reviewer-prompt.md +31 -0
  76. package/skills/subagent-driven-development/SKILL.md +95 -414
  77. package/skills/systematic-debugging/SKILL.md +7 -51
  78. package/skills/systematic-debugging/references/diagnosing-bugs.upstream.md +129 -0
  79. package/skills/systematic-debugging/scripts/hitl-loop.template.js +75 -0
  80. package/skills/systematic-debugging/scripts/hitl-loop.template.sh +41 -0
  81. package/skills/test-driven-development/SKILL.md +18 -2
  82. package/skills/to-tickets/SKILL.md +94 -0
  83. package/skills/triage/SKILL.md +53 -0
  84. package/skills/triage/references/agent-brief.md +32 -0
  85. package/skills/triage/references/out-of-scope.md +14 -0
  86. package/skills/using-superpowers/SKILL.md +140 -40
  87. package/skills/visual-companion/SKILL.md +62 -0
  88. package/skills/visual-companion/agents/openai.yaml +4 -0
  89. package/skills/{brainstorming/visual-companion.md → visual-companion/references/guide.md} +1 -1
  90. package/skills/{brainstorming → visual-companion}/scripts/frame-template.html +42 -12
  91. package/skills/visual-companion/scripts/pages.cjs +28 -0
  92. package/skills/visual-companion/scripts/server-utils.cjs +82 -0
  93. package/skills/{brainstorming → visual-companion}/scripts/server.cjs +108 -248
  94. package/skills/{brainstorming → visual-companion}/scripts/start-server.sh +18 -4
  95. package/skills/visual-companion/scripts/websocket.cjs +86 -0
  96. package/skills/wayfinder/SKILL.md +57 -0
  97. package/commands/e2e.md +0 -28
  98. package/commands/evolve.md +0 -42
  99. package/commands/harness-audit.md +0 -27
  100. package/commands/instinct-status.md +0 -38
  101. package/commands/learn-eval.md +0 -91
  102. package/commands/projects.md +0 -27
  103. package/commands/promote.md +0 -29
  104. package/commands/prune.md +0 -46
  105. package/commands/tdd.md +0 -27
  106. package/homunculus/instincts/personal/always-test-first.md +0 -28
  107. package/homunculus/instincts/personal/pr-ci-quality-gate.md +0 -30
  108. package/rules/08-ecc-integration.md +0 -46
  109. package/rules/common/implementation.md +0 -25
  110. package/rules/common/security.md +0 -19
  111. package/skills/brainstorming/SKILL.md +0 -185
  112. package/skills/brainstorming/agents/openai.yaml +0 -3
  113. package/skills/brainstorming/spec-document-reviewer-prompt.md +0 -49
  114. package/skills/context-budget/SKILL.md +0 -59
  115. package/skills/discover-unknowns-zh/SKILL.md +0 -112
  116. package/skills/discover-unknowns-zh/agents/openai.yaml +0 -4
  117. package/skills/discover-unknowns-zh/references/prompt-patterns.md +0 -144
  118. package/skills/documentation-lookup/SKILL.md +0 -90
  119. package/skills/executing-plans/SKILL.md +0 -66
  120. package/skills/skill-creator/LICENSE.txt +0 -202
  121. package/skills/skill-creator/SKILL.md +0 -356
  122. package/skills/skill-creator/references/output-patterns.md +0 -82
  123. package/skills/skill-creator/references/workflows.md +0 -28
  124. package/skills/skill-creator/scripts/init_skill.py +0 -303
  125. package/skills/skill-creator/scripts/package_skill.py +0 -110
  126. package/skills/skill-creator/scripts/quick_validate.py +0 -95
  127. package/skills/subagent-driven-development/implementer-prompt.md +0 -139
  128. package/skills/subagent-driven-development/scripts/review-package +0 -44
  129. package/skills/subagent-driven-development/scripts/sdd-workspace +0 -22
  130. package/skills/subagent-driven-development/scripts/task-brief +0 -40
  131. package/skills/subagent-driven-development/task-reviewer-prompt.md +0 -188
  132. package/skills/writing-plans/SKILL.md +0 -206
  133. package/skills/writing-plans/plan-document-reviewer-prompt.md +0 -49
  134. /package/skills/{brainstorming → visual-companion}/scripts/helper.js +0 -0
  135. /package/skills/{brainstorming → visual-companion}/scripts/stop-server.sh +0 -0
@@ -1,185 +0,0 @@
1
- ---
2
- name: brainstorming
3
- description: "Use for explicit Brainstorming/design-spec/Spec-Gate requests, or before complex, ambiguous, high-risk, cross-file, architectural, integration, UI/UX, public API, data-flow, or behavior-changing development work. Skip for clearly specified low-risk edits such as button color tweaks, typo fixes, mechanical replacements, straightforward docs/config updates, or obvious single-file changes."
4
- ---
5
-
6
- # Brainstorming Ideas Into Designs
7
-
8
- Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
9
-
10
- Start by deciding whether the request needs the full brainstorming flow. If it does, understand the current project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design and get user approval.
11
-
12
- <HARD-GATE>
13
- Spec Gate: Do NOT invoke any implementation skill, write any code, scaffold any project, or take any implementation action until you have presented a design and the user has approved it. This applies to EVERY project regardless of perceived simplicity.
14
- </HARD-GATE>
15
-
16
- ## Trigger Policy
17
-
18
- Use the full flow for explicit Brainstorming/design-spec/Spec-Gate requests, or when work is ambiguous, high-risk, cross-file, architecture/API/data/security/integration/UI-workflow changing, or has multiple reasonable designs.
19
-
20
- Skip the full flow for clear low-risk edits: button/copy/typo/formatting tweaks, mechanical replacements, small docs/config updates, obvious single-file changes, read-only inspection, command output, or explanations.
21
-
22
- If a simple request hides uncertainty affecting architecture, data, integration, test scope, or release behavior, ask one targeted clarification before deciding.
23
-
24
- ## Repository Spec Profile
25
-
26
- For this repository, specs default to infrastructure/workflow design: Superpowers gates, skill/command/hook/rule/agent/tool contracts, failure modes, migration, rollback, fixtures, dry-runs, and verification. Avoid product narrative specs unless explicitly requested.
27
-
28
- ## Checklist
29
-
30
- When this skill applies, you MUST create a task for each of these items and complete them in order:
31
-
32
- 1. **Explore project context** — check files, docs, recent commits
33
- 2. **Offer visual companion** (if task explicitly involves mockups, layouts, wireframes, screenshots, diagrams, or side-by-side visual comparisons) — this is its own message, not combined with a clarifying question. See the Visual Companion section below.
34
- 3. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria
35
- 4. **Propose 2-3 approaches** — with trade-offs and your recommendation
36
- 5. **Present design** — in sections scaled to their complexity, get user approval after each section
37
- 6. **Write design doc** — save to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` using the required template below
38
- 7. **Spec self-review** — quick inline check for placeholders, contradictions, ambiguity, scope (see below)
39
- 8. **User reviews written spec** — ask user to review the spec file before proceeding
40
- 9. **Transition to implementation** — invoke writing-plans skill to create implementation plan
41
-
42
- ## Process Flow
43
-
44
- ```dot
45
- digraph brainstorming {
46
- "Explore project context" [shape=box];
47
- "Visual questions ahead?" [shape=diamond];
48
- "Offer Visual Companion\n(own message, no other content)" [shape=box];
49
- "Ask clarifying questions" [shape=box];
50
- "Propose 2-3 approaches" [shape=box];
51
- "Present design sections" [shape=box];
52
- "User approves design?" [shape=diamond];
53
- "Write design doc" [shape=box];
54
- "Spec self-review\n(fix inline)" [shape=box];
55
- "User reviews spec?" [shape=diamond];
56
- "Invoke writing-plans skill" [shape=doublecircle];
57
-
58
- "Explore project context" -> "Visual questions ahead?";
59
- "Visual questions ahead?" -> "Offer Visual Companion\n(own message, no other content)" [label="yes"];
60
- "Visual questions ahead?" -> "Ask clarifying questions" [label="no"];
61
- "Offer Visual Companion\n(own message, no other content)" -> "Ask clarifying questions";
62
- "Ask clarifying questions" -> "Propose 2-3 approaches";
63
- "Propose 2-3 approaches" -> "Present design sections";
64
- "Present design sections" -> "User approves design?";
65
- "User approves design?" -> "Present design sections" [label="no, revise"];
66
- "User approves design?" -> "Write design doc" [label="yes"];
67
- "Write design doc" -> "Spec self-review\n(fix inline)";
68
- "Spec self-review\n(fix inline)" -> "User reviews spec?";
69
- "User reviews spec?" -> "Write design doc" [label="changes requested"];
70
- "User reviews spec?" -> "Invoke writing-plans skill" [label="approved"];
71
- }
72
- ```
73
-
74
- **The terminal state is invoking writing-plans.** Do NOT invoke frontend-design, mcp-builder, or any other implementation skill. The ONLY skill you invoke after brainstorming is writing-plans.
75
-
76
- ## The Process
77
-
78
- **Understanding the idea:**
79
-
80
- - Check out the current project state first (files, docs, recent commits)
81
- - Before asking detailed questions, assess scope: if the request describes multiple independent subsystems (e.g., "build a platform with chat, file storage, billing, and analytics"), flag this immediately. Don't spend questions refining details of a project that needs to be decomposed first.
82
- - If the project is too large for a single spec, help the user decompose into sub-projects: what are the independent pieces, how do they relate, what order should they be built? Then brainstorm the first sub-project through the normal design flow. If estimated scope exceeds 8 major components OR >20 affected files OR >2 weeks estimated effort, automatically propose decomposition into sub-projects with a recommended order and a brief spec for the first sub-project.
83
- - For appropriately scoped projects, ask questions one at a time to refine the idea
84
- - Prefer multiple choice questions when possible, but open-ended is fine too
85
- - Only one question per message - if a topic needs more exploration, break it into multiple questions
86
- - Focus on understanding: purpose, constraints, success criteria
87
-
88
- **Exploring approaches:**
89
-
90
- - Propose 2-3 different approaches with trade-offs
91
- - Present options conversationally with your recommendation and reasoning
92
- - Lead with your recommended option and explain why
93
-
94
- **Presenting the design:**
95
-
96
- - Once you believe you understand what you're building, present the design
97
- - Scale each section to its complexity: a few sentences if straightforward, up to 200-300 words if nuanced
98
- - Ask after each section whether it looks right so far
99
- - Cover: architecture, components, data flow, error handling, testing
100
- - Be ready to go back and clarify if something doesn't make sense
101
-
102
- **Design for isolation and clarity:**
103
-
104
- - Break the system into smaller units that each have one clear purpose, communicate through well-defined interfaces, and can be understood and tested independently
105
- - For each unit, you should be able to answer: what does it do, how do you use it, and what does it depend on?
106
- - Can someone understand what a unit does without reading its internals? Can you change the internals without breaking consumers? If not, the boundaries need work.
107
- - Smaller, well-bounded units are also easier for you to work with - you reason better about code you can hold in context at once, and your edits are more reliable when files are focused. When a file grows large, that's often a signal that it's doing too much.
108
-
109
- **Working in existing codebases:**
110
-
111
- - Explore the current structure before proposing changes. Follow existing patterns.
112
- - Where existing code has problems that affect the work (e.g., a file that's grown too large, unclear boundaries, tangled responsibilities), include targeted improvements as part of the design - the way a good developer improves code they're working in.
113
- - Don't propose unrelated refactoring. Stay focused on what serves the current goal.
114
-
115
- ## After the Design
116
-
117
- **Documentation:**
118
-
119
- - Write the validated design (spec) to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`
120
- - (User preferences for spec location override this default)
121
- - Use elements-of-style:writing-clearly-and-concisely skill if available
122
- - Do not commit silently or directly on protected branches; commit only when workflow/user intent allows it.
123
-
124
- **Required Spec Template:**
125
-
126
- Use the user's language for spec headings. For Chinese projects, use these headings in order: `背景`, `目标`, `非目标`, `需求`, `现有上下文`, `方案对比` with 2-3 options, `推荐方案`, `架构设计`, `组件与文件`, `数据流 / 接口`, `错误处理`, `测试策略`, `验收标准`, `风险与取舍`, `开放问题`.
127
-
128
- **Spec Quality Bar:**
129
-
130
- - Write an engineering design document, not a loose product memo.
131
- - Make it specific enough for `writing-plans`; do not include implementation checkboxes.
132
- - Include concrete files/interfaces, alternatives, tests, and acceptance criteria.
133
-
134
- **Spec Self-Review:**
135
- After writing the spec document, look at it with fresh eyes:
136
-
137
- 1. **Placeholder scan:** Any "TBD", "TODO", incomplete sections, or vague requirements? Fix them.
138
- 2. **Internal consistency:** Do any sections contradict each other? Does the architecture match the feature descriptions?
139
- 3. **Scope check:** Is this focused enough for a single implementation plan, or does it need decomposition?
140
- 4. **Ambiguity check:** Could any requirement be interpreted two different ways? If so, pick one and make it explicit.
141
-
142
- Fix any issues inline. No need to re-review — just fix and move on.
143
-
144
- **User Review Gate:**
145
- After the spec review loop passes, ask the user to review the written spec before proceeding:
146
-
147
- > "Spec written to `<path>`. Please review it and let me know if you want to make any changes before we start writing out the implementation plan."
148
-
149
- Wait for the user's response. If they request changes, make them and re-run the spec review loop. Only proceed once the user has reviewed and approved the saved spec.
150
-
151
- **Implementation:**
152
-
153
- - Invoke the writing-plans skill to create a detailed implementation plan
154
- - Do NOT invoke any other skill. writing-plans is the next step.
155
-
156
- ## Key Principles
157
-
158
- - **One question at a time** - Don't overwhelm with multiple questions
159
- - **Multiple choice preferred** - Easier to answer than open-ended when possible
160
- - **YAGNI ruthlessly** - Remove unnecessary features from all designs
161
- - **Explore alternatives** - Always propose 2-3 approaches before settling
162
- - **Incremental validation** - Present design, get approval before moving on
163
- - **Be flexible** - Go back and clarify when something doesn't make sense
164
-
165
- ## Visual Companion
166
-
167
- A browser-based companion for showing mockups, diagrams, and visual options during brainstorming. Available as a tool — not a mode. Accepting the companion means it's available for questions that benefit from visual treatment; it does NOT mean every question goes through the browser.
168
-
169
- **Offering the companion:** When you anticipate that upcoming questions will involve visual content (mockups, layouts, diagrams), offer it once for consent:
170
-
171
- > "Some of what we're working on might be easier to explain if I can show it to you in a web browser. I can put together mockups, diagrams, comparisons, and other visuals as we go. This feature is still new and can be token-intensive. Want to try it? (Requires opening a local URL)"
172
-
173
- **This offer MUST be its own message.** Do not combine it with clarifying questions, context summaries, or any other content. The message should contain ONLY the offer above and nothing else. Wait for the user's response before continuing. If they decline, proceed with text-only brainstorming.
174
-
175
- If the user does not respond within 48 hours or a configured timeout, proceed with text-only brainstorming and note that the Visual Companion was not accepted.
176
-
177
- **Per-question decision:** Even after the user accepts, decide FOR EACH QUESTION whether to use the browser or the terminal. The test: **would the user understand this better by seeing it than reading it?**
178
-
179
- - **Use the browser** for content that IS visual — mockups, wireframes, layout comparisons, architecture diagrams, side-by-side visual designs
180
- - **Use the terminal** for content that is text — requirements questions, conceptual choices, tradeoff lists, A/B/C/D text options, scope decisions
181
-
182
- A question about a UI topic is not automatically a visual question. "What does personality mean in this context?" is a conceptual question — use the terminal. "Which wizard layout works better?" is a visual question — use the browser.
183
-
184
- If they agree to the companion, read the detailed guide before proceeding:
185
- `skills/brainstorming/visual-companion.md`
@@ -1,3 +0,0 @@
1
- interface:
2
- display_name: "Brainstorming"
3
- short_description: "Explore intent, requirements, and design before implementation"
@@ -1,49 +0,0 @@
1
- # Spec Document Reviewer Prompt Template
2
-
3
- Use this template when dispatching a spec document reviewer subagent.
4
-
5
- **Purpose:** Verify the spec is complete, consistent, and ready for implementation planning.
6
-
7
- **Dispatch after:** Spec document is written to docs/superpowers/specs/
8
-
9
- ```
10
- Task tool (general-purpose):
11
- description: "Review spec document"
12
- prompt: |
13
- You are a spec document reviewer. Verify this spec is complete and ready for planning.
14
-
15
- **Spec to review:** [SPEC_FILE_PATH]
16
-
17
- ## What to Check
18
-
19
- | Category | What to Look For |
20
- |----------|------------------|
21
- | Completeness | TODOs, placeholders, "TBD", incomplete sections |
22
- | Consistency | Internal contradictions, conflicting requirements |
23
- | Clarity | Requirements ambiguous enough to cause someone to build the wrong thing |
24
- | Scope | Focused enough for a single plan — not covering multiple independent subsystems |
25
- | YAGNI | Unrequested features, over-engineering |
26
-
27
- ## Calibration
28
-
29
- **Only flag issues that would cause real problems during implementation planning.**
30
- A missing section, a contradiction, or a requirement so ambiguous it could be
31
- interpreted two different ways — those are issues. Minor wording improvements,
32
- stylistic preferences, and "sections less detailed than others" are not.
33
-
34
- Approve unless there are serious gaps that would lead to a flawed plan.
35
-
36
- ## Output Format
37
-
38
- ## Spec Review
39
-
40
- **Status:** Approved | Issues Found
41
-
42
- **Issues (if any):**
43
- - [Section X]: [specific issue] - [why it matters for planning]
44
-
45
- **Recommendations (advisory, do not block approval):**
46
- - [suggestions for improvement]
47
- ```
48
-
49
- **Reviewer returns:** Status, Issues (if any), Recommendations
@@ -1,59 +0,0 @@
1
- ---
2
- name: context-budget
3
- description: "审计 Agent Harness 的上下文开销、MCP 连接器、常驻规则、skills 和 agents。用于会话变慢、工具过多、准备新增 MCP/skill/agent、或需要按 ECC 最新策略压缩默认上下文时;输出按节省 Token 和风险排序的整改建议。"
4
- ---
5
-
6
- # Context Budget
7
-
8
- 用这个 skill 找出“模型能力被上下文噪音吃掉”的来源。目标不是把能力砍少,而是让默认上下文只保留高频、通用、状态性强的内容,把其余能力改为按需 skill、CLI、脚本或浏览器原生能力。
9
-
10
- ## 工作流
11
-
12
- 1. 盘点常驻面:入口文件、规则索引、默认 MCP、agent 描述、自动加载 skill、hooks 配置。
13
- 2. 估算开销:Markdown 用 `words * 1.3` 粗估;代码和 JSON 用 `chars / 4` 粗估;MCP tool schema 按每个工具约 `500 tokens` 粗估。
14
- 3. 分类保留级别:
15
- - **默认保留**:几乎每个任务都要用,且按需加载成本更高。
16
- - **按需加载**:只在明确触发时读取,例如专项规则、技能说明、长参考。
17
- - **外移为 CLI/API**:无会话状态、一次请求即可完成,例如 GitHub、文档查询、包搜索。
18
- - **删除或合并**:与现有规则重复、描述太宽、没有明确触发或退出条件。
19
- 4. 输出整改建议:先列最大 Token 节省,再列误删风险和替代入口。
20
-
21
- ## MCP 默认策略
22
-
23
- 默认 MCP 必须同时满足两个条件:
24
-
25
- - **通用**:几乎每个编码 agent、每个项目都会用。
26
- - **MCP 明显优于 CLI/API/原生能力**:任务需要会话状态、交互式连接、流式上下文或结构化浏览;纯请求/响应工作不应作为默认 MCP 常驻。
27
-
28
- 不满足这两个条件时,优先改成:
29
-
30
- - skill 调用本地 CLI,例如 `gh`、`git`、`npm`;
31
- - skill 调用 REST/API,例如文档查询;
32
- - harness 原生能力,例如内置 web search、memory、extended thinking;
33
- - 可选 MCP 文档项,而不是默认启用项。
34
-
35
- ## 报告格式
36
-
37
- ```markdown
38
- ## Context Budget
39
- - 估算常驻开销:
40
- - 最大噪音来源:
41
- - 建议默认保留:
42
- - 建议按需加载:
43
- - 建议外移为 CLI/API:
44
- - 不建议修改:
45
-
46
- ## 优先整改
47
- 1. [路径/配置]:[动作] -> 预计节省 [tokens/原因],风险:[低/中/高]
48
- 2. ...
49
-
50
- ## 验证
51
- - [命令或人工检查]:
52
- - 剩余风险:
53
- ```
54
-
55
- ## 注意事项
56
-
57
- - 不要为了“省 Token”删除用户硬规则、安全边界或验证门。
58
- - 不要把所有外部能力都降级成手写脚本;如果任务需要交互式浏览、调试会话或持久连接,MCP 仍可能是正确选择。
59
- - 给出建议时必须说明替代入口,否则只是减配。
@@ -1,112 +0,0 @@
1
- ---
2
- name: discover-unknowns-zh
3
- description: Chinese workflow for surfacing and managing known/unknown gaps before, during, and after complex agentic work. Use for ambiguous, unfamiliar, high-risk, long-horizon, cross-domain, design-heavy, architecture-changing, or large implementation tasks; when the user asks for blind spot scans, unknown unknowns, interviews, prototypes, reference mapping, implementation notes, explainers, or quizzes; or when phrases like "I'll know it when I see it" or "teach me this domain" indicate unstated assumptions.
4
- ---
5
-
6
- # 发现未知项
7
-
8
- ## 何时使用
9
-
10
- 当任务命中以下任一信号时启动本 skill:
11
-
12
- - **任务形态**:模糊、陌生、高风险、长周期、跨领域、重设计、改架构或大型实现。
13
- - **用户原话**:“我看到才知道”“教我这个领域”“做盲点扫描”“未知的未知”“先别动代码”。
14
- - **工件请求**:盲点扫描、访谈、原型、参考物映射、实施计划、实现记录、说明文档、变更测验。
15
- - **假设风险**:任务若不先澄清未知项,会迫使 agent 做大量未言明假设。
16
-
17
- 任务很窄、未知项很少时,跳过本 skill,直接进入实现。
18
-
19
- ## 概览
20
-
21
- 使用这个 skill,把模糊、陌生或高风险任务拆成一组低成本工件,在真正修改生产代码前暴露假设、盲点和判断差异。
22
-
23
- 把用户提示、计划、skills 和上下文视为“地图”。把真实代码库、用户、约束、质量标准和评审过程视为“领地”。地图和领地之间的差距,就是需要持续发现和管理的未知项。
24
-
25
- ## 未知项分类
26
-
27
- 把不确定性分成四类:
28
-
29
- - **已知的已知**:用户在提示里已经说清楚的——想要什么。
30
- - **已知的未知**:用户还没想明白,但知道自己没想明白。
31
- - **未知的已知**:太显而易见、用户绝不会写进提示,但看到示例就能认出来的——品味、判断、是否对味。
32
- - **未知的未知**:用户压根没考虑过的——缺失的概念、隐藏约束、失败模式、历史方案、质量标准,以及“自己是否知道好的标准长什么样”。
33
-
34
- 目标是在动手前缩小代价最高的几类。若任务很窄、未知项很少,保持轻量,不要制造流程负担。
35
-
36
- ## 阶段速查
37
-
38
- | 阶段 | 优先工件 | 主要暴露 |
39
- | ------ | ------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- |
40
- | 动手前 | 盲点扫描(`unknowns.md`)、头脑风暴、原型(`prototype.html`)、访谈、参考物、实施计划(`implementation-plan.html`) | 未知的未知、未知的已知、已知的未知、可变决策 |
41
- | 动手中 | 实现记录(`implementation-notes.md`) | 偏离计划、边界情况、保守选择、暂缓问题 |
42
- | 动手后 | 说明文档(`explainer.html`)、测验(`quiz.html`) | 行为变化、验证证据、剩余风险、评审理解缺口 |
43
-
44
- ## 工作流
45
-
46
- 1. **说明起点**
47
- - 提炼用户想要什么、已经知道什么、还不知道什么。
48
- - 只有当用户经验水平会影响问题或质量标准时,才询问用户经验。
49
- - 检索必要的代码、工件和外部资料,让判断落在真实上下文上。
50
-
51
- 2. **做盲点扫描**
52
- - 列出可能的未知的未知:隐藏集成、数据模型约束、UX 预期、性能陷阱、安全问题、迁移风险、历史实现、测试缺口和评审反对点。
53
- - 说明每个盲点为什么重要,以及最低成本的验证方式。
54
- - 优先使用代码搜索、现有测试、文档、日志、截图或小实验,避免凭空猜测。
55
- - 直接用“盲点扫描”和“未知的未知”这两个词,能更好地触发正确行为。
56
-
57
- 3. **选择最低成本工件**
58
- - 范围或策略不确定时,用头脑风暴。它还能防止范围定得过窄或过宽。
59
- - 用户需要“看到才知道”时,用原型暴露未知的已知,例如视觉品味、交互手感、文案或流程形状。在实现阶段才发现这些代价相对较高——规格小改可能导致代码大改,且回滚更难。
60
- - 某个答案可能改变架构、数据模型、API、UX、灰度或风险策略时,用访谈。
61
- - 用户描述不清但能指出代码、文档、截图、示例或历史方案时,用参考物。源码是最强参考物。
62
- - 下一步会触碰生产代码或多文件改动时,用实施计划。
63
-
64
- 4. **让计划保留转向空间**
65
- - 计划开头先放用户最可能调整的决策:数据模型、类型/接口、UX 流程、安全边界、灰度和兼容性。
66
- - 机械重构和显然的编辑放最后。
67
- - 明确 agent 可以自行决定什么,哪些必须回到用户审阅。
68
-
69
- 5. **记录实现中的发现**
70
- - 对较大的任务,在工作区保留临时 `implementation-notes.md`(或 `.html`),除非用户另有要求。
71
- - 记录偏离计划的地方、发现的边界情况、保守选择和暂缓问题。
72
- - 如果新发现推翻原计划,暂停并修订计划,不要强行按旧路径推进。
73
-
74
- 6. **实现后闭环**
75
- - 当评审者、干系人或未来维护者需要快速理解变化时,产出说明文档。它能加速那些和你起点同样有未知项的评审者的理解,也能让专家更快确认你已考虑到他们预判的常见失败点。
76
- - 包含改了什么、为什么这么做、关键决策、已解决的未知项、已知风险、验证证据和如何评估结果。
77
- - 对大改或隐性行为变化,用测验检查用户或评审者是否真正理解。把通过测验当作合并闸门,不是走过场。
78
-
79
- ## 决策规则
80
-
81
- - 小修小改、明确 bug、机械替换:不用本 skill,直接走最小实现闭环。
82
- - 模糊需求、陌生领域、架构改动、UI 品味、长任务,或用户说“先别动代码”“我看到才知道”时:使用本 skill。
83
- - 任务对用户或 agent 陌生时,先做盲点扫描。
84
- - 用户不知道某领域“好的标准”长什么样时,先让 agent 教你这个领域,而不是让它生成一堆变体让你挑。
85
- - 用户表达“我看到就知道”时,先做原型再实现。
86
- - 单个答案可能改变架构时,先访谈再计划。
87
- - 有强参考物(尤其是源码)时,先读参考物再设计新模式。
88
- - 实现中暴露重大未知项时,更新工件链路,不要隐藏假设。
89
- - 长周期任务跑回来结果不对时,多花时间定义未知项或重写计划让 agent 能即兴处理,而不是直接重试。
90
- - 任务简单时,只使用最小有用步骤,不做仪式化流程。
91
- - 当已知的未知已清空,或剩余未知项都有低成本检查路径且不会改变关键架构、数据、API、UX 或安全边界时,退出本 skill,交接到 `brainstorming`、`writing-plans`、`test-driven-development` 或 `executing-plans` skill。
92
-
93
- ## 工件
94
-
95
- 只在工件能降低风险或加速评审时创建。需要用户做反应的工件(原型、计划、说明、测验)优先用单文件自包含 HTML:好分享、好截图、能直接丢进 Slack 或评审线程,且上下文丰富又不至于淹没提示。
96
-
97
- - `unknowns.md`:未知项分类表、问题、检查方式和决策。
98
- - `prototype.html`:用于品味、布局或流程反馈的低成本原型,用假数据、不接后端。
99
- - `implementation-plan.html`(或 `.md`):围绕可变决策组织的可审阅计划。
100
- - `implementation-notes.md`(或 `.html`):实现过程中的偏离和发现记录。
101
- - `explainer.html`(或 `.md`):面向评审者的总结,含 demo、决策、未知项、验证证据和剩余风险。
102
- - `quiz.html`(或 `.md`):变更理解测验,用户必须通过后才能合并。
103
-
104
- 优先遵循仓库自己的 scratch 或计划文件位置约定。若没有约定,把临时工件放在当前任务工作区的 `.unknowns/<task-slug>/` 下,避免多任务撞名。除非用户要求,不要提交这些临时文件。
105
-
106
- ## 提示模式
107
-
108
- 当需要起草提示词、工件模板、访谈问题、实现记录、说明文档或测验时,读取 `references/prompt-patterns.md`。
109
-
110
- ## 协作
111
-
112
- 当主要风险来自缺失上下文时,先使用本 skill,再进入 `brainstorming`、`writing-plans`、`test-driven-development` 或 `executing-plans`。未知项澄清后,再交给更窄的 process skill 管理实现和验证。
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "发现未知项"
3
- short_description: "复杂工作前,先暴露盲点"
4
- default_prompt: "用 $discover-unknowns-zh 在实现这次复杂改动前先暴露盲点。"
@@ -1,144 +0,0 @@
1
- # 提示模式
2
-
3
- 这些模板是起点,不是固定格式。根据用户任务、仓库上下文和风险等级裁剪。
4
-
5
- ## 选择导航
6
-
7
- 按场景选模式;“对应规则”使用稳定标签,避免 SKILL.md 增删条目后编号失效。
8
-
9
- | 场景 | 使用模式 | 典型产物 | 对应规则 |
10
- | --- | --- | --- | --- |
11
- | 不熟悉领域、模块或风险面 | 盲点扫描 | `unknowns.md` | 陌生任务 |
12
- | 用户不知道该领域“好的标准”长什么样 | 盲点扫描(先教领域) | `unknowns.md` | 领域标准 |
13
- | 用户说“我看到才知道” | 头脑风暴与原型 | `prototype.html`、方案草图 | 看到才知道 |
14
- | 单个答案可能改变架构、数据、API、UX、灰度或安全 | 访谈 | 开放决策列表 | 架构影响 |
15
- | 用户说不清但能指出示例、截图、源码或文档 | 参考物 | 映射说明 | 强参考物 |
16
- | 即将触碰生产代码或多文件改动 | 实施计划 | `implementation-plan.md` 或 `.html` | 生产改动 |
17
- | 实现中发现边界或偏离 | 实现记录 | `implementation-notes.md` 或 `.html` | 实现未知 |
18
- | 大改后需要评审理解 | 说明文档、测验 | `explainer.md`、`quiz.md` | 实现后闭环 |
19
-
20
- ## 盲点扫描
21
-
22
- ```text
23
- 我正在做 [任务]。我当前确定的内容是 [已知的已知]。我不熟悉或还没想清楚的是 [已知的未知/经验水平]。
24
-
25
- 请做一次盲点扫描:如果有相关代码或文档,先检索它们;然后识别我的未知的未知,解释每个盲点为什么重要,并建议在实现前最低成本的验证方式。
26
- ```
27
-
28
- 输出形状:
29
-
30
- ```markdown
31
- ## 已知的已知
32
- - ...
33
-
34
- ## 已知的未知
35
- - 问题:
36
- 重要性:
37
- 低成本检查:
38
-
39
- ## 可能的未知的未知
40
- - 盲点:
41
- 证据/来源:
42
- 风险:
43
- 低成本检查:
44
-
45
- ## 下一步最合适的工件
46
- - 建议:
47
- - 原因:
48
- ```
49
-
50
- ## 头脑风暴与原型
51
-
52
- ```text
53
- 在触碰生产代码前,请为 [问题] 做 [N] 个明显不同的方案。目标是让我能对自己还说不清的取舍做反应。
54
-
55
- 每个方案都要给出工件或具体草图,说明它能帮助我们学到什么,以及如果选它,实现方案会发生什么变化。
56
- ```
57
-
58
- UI、工作流或内容任务优先用单文件 HTML 原型或可截图 mock,加假数据即可。后端或架构任务优先用简短设计草图、API 示例、状态机图或迁移表。
59
-
60
- ## 访谈
61
-
62
- ```text
63
- 围绕 [任务] 中的歧义点逐个问题访谈我。只优先问那些答案可能改变架构、数据模型、API 合约、UX 流程、灰度策略、安全边界或测试策略的问题。
64
-
65
- 每得到一个回答,就更新开放决策列表,然后问下一个影响最大的问题。
66
- ```
67
-
68
- 当剩余问题影响很小,或可以通过仓库检索自行解决时停止。
69
-
70
- ## 参考物
71
-
72
- ```text
73
- 把 [参考路径/链接/示例] 作为 [具体行为、风格、语义或质量标准] 的事实来源。先阅读它,再提出实现方案。
74
-
75
- 告诉我哪些细节必须保留,哪些只是偶然实现,以及你会如何映射到当前代码库。
76
- ```
77
-
78
- 强参考物包括源码、测试、设计组件、线上示例、API 文档、事故复盘,以及带交互说明的截图。
79
-
80
- ## 实施计划
81
-
82
- ```text
83
- 为 [任务] 写一份实施计划。开头先放我最可能调整的决策:数据模型、类型/接口变化、UX 流程、API 行为、灰度和风险处理。机械编辑放到最后。
84
-
85
- 包含假设、仍然开放的未知项、验证步骤,以及如果实现中发现冲突约束时你会怎么处理。
86
- ```
87
-
88
- 推荐结构:
89
-
90
- ```markdown
91
- ## 目标
92
- ## 需要审阅的决策
93
- ## 假设与开放未知项
94
- ## 拟定实现
95
- ## 偏离处理策略
96
- ## 验证
97
- ## 机械编辑
98
- ```
99
-
100
- ## 实现记录
101
-
102
- ```text
103
- 请维护一个 implementation-notes.md 文件。如果遇到迫使你偏离计划的边界情况,只有在选择可逆时才自行采用保守方案,并记录到 Deviations。若偏离会改变用户可见行为、数据形状、安全或架构,请暂停让我审阅。
104
- ```
105
-
106
- 建议结构:
107
-
108
- ```markdown
109
- # 实现记录
110
-
111
- ## 计划快照
112
- ## 发现
113
- ## 偏离
114
- ## 保守选择
115
- ## 暂缓问题
116
- ## 验证证据
117
- ```
118
-
119
- ## 说明文档
120
-
121
- ```text
122
- 把结果整理成面向评审者的说明文档。先展示 demo 或行为变化,再解释上下文、关键决策、处理过的未知项、验证证据和剩余风险。
123
- ```
124
-
125
- 推荐结构:
126
-
127
- ```markdown
128
- ## 改了什么
129
- ## 为什么这样做
130
- ## Demo 或前后对比
131
- ## 关键决策
132
- ## 已解决的未知项
133
- ## 验证
134
- ## 剩余风险
135
- ## 评审清单
136
- ```
137
-
138
- ## 测验
139
-
140
- ```text
141
- 请创建一个短测验,检查我是否已经充分理解这次变化,可以做 approve 或 merge 决策。问题要基于真实 diff、行为、现有代码路径和验证证据。答案单独放在问题之后。
142
- ```
143
-
144
- 测验重点放在行为、失败模式、灰度、兼容性、数据正确性和如何排查回归。
@@ -1,90 +0,0 @@
1
- ---
2
- name: documentation-lookup
3
- description: Use up-to-date library and framework docs via Context7 MCP instead of training data. Activates for setup questions, API references, code examples, or when the user names a framework (e.g. React, Next.js, Prisma).
4
- origin: ECC
5
- ---
6
-
7
- # Documentation Lookup (Context7)
8
-
9
- When the user asks about libraries, frameworks, or APIs, fetch current documentation via the Context7 MCP (tools `resolve-library-id` and `query-docs`) instead of relying on training data.
10
-
11
- ## Core Concepts
12
-
13
- - **Context7**: MCP server that exposes live documentation; use it instead of training data for libraries and APIs.
14
- - **resolve-library-id**: Returns Context7-compatible library IDs (e.g. `/vercel/next.js`) from a library name and query.
15
- - **query-docs**: Fetches documentation and code snippets for a given library ID and question. Always call resolve-library-id first to get a valid library ID.
16
-
17
- ## When to use
18
-
19
- Activate when the user:
20
-
21
- - Asks setup or configuration questions (e.g. "How do I configure Next.js middleware?")
22
- - Requests code that depends on a library ("Write a Prisma query for...")
23
- - Needs API or reference information ("What are the Supabase auth methods?")
24
- - Mentions specific frameworks or libraries (React, Vue, Svelte, Express, Tailwind, Prisma, Supabase, etc.)
25
-
26
- Use this skill whenever the request depends on accurate, up-to-date behavior of a library, framework, or API. Applies across harnesses that have the Context7 MCP configured (e.g. Claude Code, Cursor, Codex).
27
-
28
- ## How it works
29
-
30
- ### Step 1: Resolve the Library ID
31
-
32
- Call the **resolve-library-id** MCP tool with:
33
-
34
- - **libraryName**: The library or product name taken from the user's question (e.g. `Next.js`, `Prisma`, `Supabase`).
35
- - **query**: The user's full question. This improves relevance ranking of results.
36
-
37
- You must obtain a Context7-compatible library ID (format `/org/project` or `/org/project/version`) before querying docs. Do not call query-docs without a valid library ID from this step.
38
-
39
- ### Step 2: Select the Best Match
40
-
41
- From the resolution results, choose one result using:
42
-
43
- - **Name match**: Prefer exact or closest match to what the user asked for.
44
- - **Benchmark score**: Higher scores indicate better documentation quality (100 is highest).
45
- - **Source reputation**: Prefer High or Medium reputation when available.
46
- - **Version**: If the user specified a version (e.g. "React 19", "Next.js 15"), prefer a version-specific library ID if listed (e.g. `/org/project/v1.2.0`).
47
-
48
- ### Step 3: Fetch the Documentation
49
-
50
- Call the **query-docs** MCP tool with:
51
-
52
- - **libraryId**: The selected Context7 library ID from Step 2 (e.g. `/vercel/next.js`).
53
- - **query**: The user's specific question or task. Be specific to get relevant snippets.
54
-
55
- Limit: do not call query-docs (or resolve-library-id) more than 3 times per question. If the answer is unclear after 3 calls, state the uncertainty and use the best information you have rather than guessing.
56
-
57
- ### Step 4: Use the Documentation
58
-
59
- - Answer the user's question using the fetched, current information.
60
- - Include relevant code examples from the docs when helpful.
61
- - Cite the library or version when it matters (e.g. "In Next.js 15...").
62
-
63
- ## Examples
64
-
65
- ### Example: Next.js middleware
66
-
67
- 1. Call **resolve-library-id** with `libraryName: "Next.js"`, `query: "How do I set up Next.js middleware?"`.
68
- 2. From results, pick the best match (e.g. `/vercel/next.js`) by name and benchmark score.
69
- 3. Call **query-docs** with `libraryId: "/vercel/next.js"`, `query: "How do I set up Next.js middleware?"`.
70
- 4. Use the returned snippets and text to answer; include a minimal `middleware.ts` example from the docs if relevant.
71
-
72
- ### Example: Prisma query
73
-
74
- 1. Call **resolve-library-id** with `libraryName: "Prisma"`, `query: "How do I query with relations?"`.
75
- 2. Select the official Prisma library ID (e.g. `/prisma/prisma`).
76
- 3. Call **query-docs** with that `libraryId` and the query.
77
- 4. Return the Prisma Client pattern (e.g. `include` or `select`) with a short code snippet from the docs.
78
-
79
- ### Example: Supabase auth methods
80
-
81
- 1. Call **resolve-library-id** with `libraryName: "Supabase"`, `query: "What are the auth methods?"`.
82
- 2. Pick the Supabase docs library ID.
83
- 3. Call **query-docs**; summarize the auth methods and show minimal examples from the fetched docs.
84
-
85
- ## Best Practices
86
-
87
- - **Be specific**: Use the user's full question as the query where possible for better relevance.
88
- - **Version awareness**: When users mention versions, use version-specific library IDs from the resolve step when available.
89
- - **Prefer official sources**: When multiple matches exist, prefer official or primary packages over community forks.
90
- - **No sensitive data**: Redact API keys, passwords, tokens, and other secrets from any query sent to Context7. Treat the user's question as potentially containing secrets before passing it to resolve-library-id or query-docs.