claude-everything-workflow 0.1.8 → 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 (132) 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 -10
  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/documentation-lookup/SKILL.md +0 -90
  116. package/skills/executing-plans/SKILL.md +0 -66
  117. package/skills/skill-creator/LICENSE.txt +0 -202
  118. package/skills/skill-creator/SKILL.md +0 -356
  119. package/skills/skill-creator/references/output-patterns.md +0 -82
  120. package/skills/skill-creator/references/workflows.md +0 -28
  121. package/skills/skill-creator/scripts/init_skill.py +0 -303
  122. package/skills/skill-creator/scripts/package_skill.py +0 -110
  123. package/skills/skill-creator/scripts/quick_validate.py +0 -95
  124. package/skills/subagent-driven-development/implementer-prompt.md +0 -139
  125. package/skills/subagent-driven-development/scripts/review-package +0 -44
  126. package/skills/subagent-driven-development/scripts/sdd-workspace +0 -22
  127. package/skills/subagent-driven-development/scripts/task-brief +0 -40
  128. package/skills/subagent-driven-development/task-reviewer-prompt.md +0 -188
  129. package/skills/writing-plans/SKILL.md +0 -206
  130. package/skills/writing-plans/plan-document-reviewer-prompt.md +0 -49
  131. /package/skills/{brainstorming → visual-companion}/scripts/helper.js +0 -0
  132. /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,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.
@@ -1,66 +0,0 @@
1
- ---
2
- name: executing-plans
3
- description: Use after an approved implementation plan exists and the user wants execution. Runs the plan task-by-task with checkpoints, optional project-agent loop, tests, reviews, and final verification without expanding scope.
4
- ---
5
-
6
- # Executing Plans
7
-
8
- Reference: https://github.com/obra/superpowers
9
-
10
- Use this skill only after `skills/writing-plans/SKILL.md` has produced an approved plan. The plan is the source of truth; do not add scope unless the user approves a plan update.
11
-
12
- ## Preconditions
13
-
14
- - An implementation plan exists and has been approved by the user.
15
- - If work should be isolated, use `skills/using-git-worktrees/SKILL.md` before editing.
16
- - Read the plan once, extract tasks, files, tests, and acceptance criteria.
17
- - Confirm whether execution is inline or project-agent loop.
18
-
19
- ## Inline Execution
20
-
21
- Use inline execution for small, clear, tightly coupled work.
22
-
23
- For each task:
24
-
25
- 1. Mark exactly one task in progress.
26
- 2. Perform the next unchecked step only.
27
- 3. Run the command specified by the plan.
28
- 4. If a test or command fails unexpectedly, pause and use `skills/systematic-debugging/SKILL.md`.
29
- 5. Do a requirement/spec compliance check for the task.
30
- 6. Do a code quality check for the task.
31
- 7. Mark the task complete only after checks pass.
32
-
33
- ## Project-Agent Loop
34
-
35
- Use this for substantial plans with independent tasks.
36
-
37
- For each task:
38
-
39
- 1. Dispatch one fresh implementation agent with only:
40
- - the approved spec summary
41
- - the exact task section
42
- - relevant file paths
43
- - expected tests and acceptance criteria
44
- 2. Tell the agent it is not alone in the codebase and must not revert others' changes.
45
- 3. After implementation, run requirement/spec compliance review.
46
- 4. Run code quality review with `agents/code-reviewer.md`; add security or database review only when the touched area warrants it.
47
- 5. Send findings back to the same implementer until resolved.
48
- 6. Mark the task complete only after tests and reviews pass.
49
-
50
- Subagents must return only conclusion, evidence paths, risks, and next steps. Do not accept large raw logs as final output.
51
-
52
- ## Completion Loop
53
-
54
- After all tasks are complete:
55
-
56
- 1. Apply `skills/verification-before-completion/SKILL.md`: identify the verification evidence required before any completion claim.
57
- 2. Run `/verify` or the plan's equivalent verification commands to produce that fresh evidence.
58
- 3. If verification fails, use `skills/systematic-debugging/SKILL.md` for each failure class before changing code.
59
- 4. Run a final review over the full diff.
60
- 5. Summarize files changed, tests run, skipped checks, remaining risk, and whether the work is ready for `/pr`.
61
-
62
- ## Boundaries
63
-
64
- - Do not commit, push, create PRs, delete branches, or remove worktrees unless the user asked for that action.
65
- - Do not skip failed tests because later tasks might fix them; record the failure and debug now unless the plan explicitly says the failure is expected.
66
- - Do not mark multiple tasks complete at the end; update status incrementally.
@@ -1,202 +0,0 @@
1
-
2
- Apache License
3
- Version 2.0, January 2004
4
- http://www.apache.org/licenses/
5
-
6
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
-
8
- 1. Definitions.
9
-
10
- "License" shall mean the terms and conditions for use, reproduction,
11
- and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by
14
- the copyright owner that is granting the License.
15
-
16
- "Legal Entity" shall mean the union of the acting entity and all
17
- other entities that control, are controlled by, or are under common
18
- control with that entity. For the purposes of this definition,
19
- "control" means (i) the power, direct or indirect, to cause the
20
- direction or management of such entity, whether by contract or
21
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
- outstanding shares, or (iii) beneficial ownership of such entity.
23
-
24
- "You" (or "Your") shall mean an individual or Legal Entity
25
- exercising permissions granted by this License.
26
-
27
- "Source" form shall mean the preferred form for making modifications,
28
- including but not limited to software source code, documentation
29
- source, and configuration files.
30
-
31
- "Object" form shall mean any form resulting from mechanical
32
- transformation or translation of a Source form, including but
33
- not limited to compiled object code, generated documentation,
34
- and conversions to other media types.
35
-
36
- "Work" shall mean the work of authorship, whether in Source or
37
- Object form, made available under the License, as indicated by a
38
- copyright notice that is included in or attached to the work
39
- (an example is provided in the Appendix below).
40
-
41
- "Derivative Works" shall mean any work, whether in Source or Object
42
- form, that is based on (or derived from) the Work and for which the
43
- editorial revisions, annotations, elaborations, or other modifications
44
- represent, as a whole, an original work of authorship. For the purposes
45
- of this License, Derivative Works shall not include works that remain
46
- separable from, or merely link (or bind by name) to the interfaces of,
47
- the Work and Derivative Works thereof.
48
-
49
- "Contribution" shall mean any work of authorship, including
50
- the original version of the Work and any modifications or additions
51
- to that Work or Derivative Works thereof, that is intentionally
52
- submitted to Licensor for inclusion in the Work by the copyright owner
53
- or by an individual or Legal Entity authorized to submit on behalf of
54
- the copyright owner. For the purposes of this definition, "submitted"
55
- means any form of electronic, verbal, or written communication sent
56
- to the Licensor or its representatives, including but not limited to
57
- communication on electronic mailing lists, source code control systems,
58
- and issue tracking systems that are managed by, or on behalf of, the
59
- Licensor for the purpose of discussing and improving the Work, but
60
- excluding communication that is conspicuously marked or otherwise
61
- designated in writing by the copyright owner as "Not a Contribution."
62
-
63
- "Contributor" shall mean Licensor and any individual or Legal Entity
64
- on behalf of whom a Contribution has been received by Licensor and
65
- subsequently incorporated within the Work.
66
-
67
- 2. Grant of Copyright License. Subject to the terms and conditions of
68
- this License, each Contributor hereby grants to You a perpetual,
69
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
- copyright license to reproduce, prepare Derivative Works of,
71
- publicly display, publicly perform, sublicense, and distribute the
72
- Work and such Derivative Works in Source or Object form.
73
-
74
- 3. Grant of Patent License. Subject to the terms and conditions of
75
- this License, each Contributor hereby grants to You a perpetual,
76
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
- (except as stated in this section) patent license to make, have made,
78
- use, offer to sell, sell, import, and otherwise transfer the Work,
79
- where such license applies only to those patent claims licensable
80
- by such Contributor that are necessarily infringed by their
81
- Contribution(s) alone or by combination of their Contribution(s)
82
- with the Work to which such Contribution(s) was submitted. If You
83
- institute patent litigation against any entity (including a
84
- cross-claim or counterclaim in a lawsuit) alleging that the Work
85
- or a Contribution incorporated within the Work constitutes direct
86
- or contributory patent infringement, then any patent licenses
87
- granted to You under this License for that Work shall terminate
88
- as of the date such litigation is filed.
89
-
90
- 4. Redistribution. You may reproduce and distribute copies of the
91
- Work or Derivative Works thereof in any medium, with or without
92
- modifications, and in Source or Object form, provided that You
93
- meet the following conditions:
94
-
95
- (a) You must give any other recipients of the Work or
96
- Derivative Works a copy of this License; and
97
-
98
- (b) You must cause any modified files to carry prominent notices
99
- stating that You changed the files; and
100
-
101
- (c) You must retain, in the Source form of any Derivative Works
102
- that You distribute, all copyright, patent, trademark, and
103
- attribution notices from the Source form of the Work,
104
- excluding those notices that do not pertain to any part of
105
- the Derivative Works; and
106
-
107
- (d) If the Work includes a "NOTICE" text file as part of its
108
- distribution, then any Derivative Works that You distribute must
109
- include a readable copy of the attribution notices contained
110
- within such NOTICE file, excluding those notices that do not
111
- pertain to any part of the Derivative Works, in at least one
112
- of the following places: within a NOTICE text file distributed
113
- as part of the Derivative Works; within the Source form or
114
- documentation, if provided along with the Derivative Works; or,
115
- within a display generated by the Derivative Works, if and
116
- wherever such third-party notices normally appear. The contents
117
- of the NOTICE file are for informational purposes only and
118
- do not modify the License. You may add Your own attribution
119
- notices within Derivative Works that You distribute, alongside
120
- or as an addendum to the NOTICE text from the Work, provided
121
- that such additional attribution notices cannot be construed
122
- as modifying the License.
123
-
124
- You may add Your own copyright statement to Your modifications and
125
- may provide additional or different license terms and conditions
126
- for use, reproduction, or distribution of Your modifications, or
127
- for any such Derivative Works as a whole, provided Your use,
128
- reproduction, and distribution of the Work otherwise complies with
129
- the conditions stated in this License.
130
-
131
- 5. Submission of Contributions. Unless You explicitly state otherwise,
132
- any Contribution intentionally submitted for inclusion in the Work
133
- by You to the Licensor shall be under the terms and conditions of
134
- this License, without any additional terms or conditions.
135
- Notwithstanding the above, nothing herein shall supersede or modify
136
- the terms of any separate license agreement you may have executed
137
- with Licensor regarding such Contributions.
138
-
139
- 6. Trademarks. This License does not grant permission to use the trade
140
- names, trademarks, service marks, or product names of the Licensor,
141
- except as required for reasonable and customary use in describing the
142
- origin of the Work and reproducing the content of the NOTICE file.
143
-
144
- 7. Disclaimer of Warranty. Unless required by applicable law or
145
- agreed to in writing, Licensor provides the Work (and each
146
- Contributor provides its Contributions) on an "AS IS" BASIS,
147
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
- implied, including, without limitation, any warranties or conditions
149
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
- PARTICULAR PURPOSE. You are solely responsible for determining the
151
- appropriateness of using or redistributing the Work and assume any
152
- risks associated with Your exercise of permissions under this License.
153
-
154
- 8. Limitation of Liability. In no event and under no legal theory,
155
- whether in tort (including negligence), contract, or otherwise,
156
- unless required by applicable law (such as deliberate and grossly
157
- negligent acts) or agreed to in writing, shall any Contributor be
158
- liable to You for damages, including any direct, indirect, special,
159
- incidental, or consequential damages of any character arising as a
160
- result of this License or out of the use or inability to use the
161
- Work (including but not limited to damages for loss of goodwill,
162
- work stoppage, computer failure or malfunction, or any and all
163
- other commercial damages or losses), even if such Contributor
164
- has been advised of the possibility of such damages.
165
-
166
- 9. Accepting Warranty or Additional Liability. While redistributing
167
- the Work or Derivative Works thereof, You may choose to offer,
168
- and charge a fee for, acceptance of support, warranty, indemnity,
169
- or other liability obligations and/or rights consistent with this
170
- License. However, in accepting such obligations, You may act only
171
- on Your own behalf and on Your sole responsibility, not on behalf
172
- of any other Contributor, and only if You agree to indemnify,
173
- defend, and hold each Contributor harmless for any liability
174
- incurred by, or claims asserted against, such Contributor by reason
175
- of your accepting any such warranty or additional liability.
176
-
177
- END OF TERMS AND CONDITIONS
178
-
179
- APPENDIX: How to apply the Apache License to your work.
180
-
181
- To apply the Apache License to your work, attach the following
182
- boilerplate notice, with the fields enclosed by brackets "[]"
183
- replaced with your own identifying information. (Don't include
184
- the brackets!) The text should be enclosed in the appropriate
185
- comment syntax for the file format. We also recommend that a
186
- file or class name and description of purpose be included on the
187
- same "printed page" as the copyright notice for easier
188
- identification within third-party archives.
189
-
190
- Copyright [yyyy] [name of copyright owner]
191
-
192
- Licensed under the Apache License, Version 2.0 (the "License");
193
- you may not use this file except in compliance with the License.
194
- You may obtain a copy of the License at
195
-
196
- http://www.apache.org/licenses/LICENSE-2.0
197
-
198
- Unless required by applicable law or agreed to in writing, software
199
- distributed under the License is distributed on an "AS IS" BASIS,
200
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
- See the License for the specific language governing permissions and
202
- limitations under the License.