aigroup-workflow 2.0.2 → 2.1.0

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 (53) hide show
  1. package/.claude/commands/workflow-start.md +19 -15
  2. package/.codex/AGENTS.md +1 -1
  3. package/AGENTS.md +1 -1
  4. package/README.md +3 -5
  5. package/agents/seo-specialist.md +0 -3
  6. package/cli/commands/init.mjs +1 -1
  7. package/cli/utils/scaffold.mjs +1 -1
  8. package/docs/red-flags.md +1 -1
  9. package/docs/rules/README.md +3 -3
  10. package/docs/rules/web/design-quality.md +0 -1
  11. package/docs/templates/implementation-plan.md +1 -1
  12. package/docs/workflow-pipeline.md +41 -22
  13. package/manifests/install-modules.json +8 -3
  14. package/package.json +1 -1
  15. package/skills/SUPERPOWERS-LICENSE +21 -0
  16. package/skills/brainstorming/SKILL.md +164 -0
  17. package/skills/brainstorming/scripts/frame-template.html +214 -0
  18. package/skills/brainstorming/scripts/helper.js +88 -0
  19. package/skills/brainstorming/scripts/server.cjs +354 -0
  20. package/skills/brainstorming/scripts/start-server.sh +148 -0
  21. package/skills/brainstorming/scripts/stop-server.sh +56 -0
  22. package/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  23. package/skills/brainstorming/visual-companion.md +287 -0
  24. package/skills/executing-plans/SKILL.md +70 -0
  25. package/skills/finishing-a-development-branch/SKILL.md +200 -112
  26. package/skills/receiving-code-review/SKILL.md +213 -0
  27. package/skills/requesting-code-review/SKILL.md +105 -0
  28. package/skills/requesting-code-review/code-reviewer.md +146 -0
  29. package/skills/systematic-debugging/CREATION-LOG.md +119 -0
  30. package/skills/systematic-debugging/SKILL.md +296 -208
  31. package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  32. package/skills/systematic-debugging/condition-based-waiting.md +115 -0
  33. package/skills/systematic-debugging/defense-in-depth.md +122 -0
  34. package/skills/systematic-debugging/find-polluter.sh +63 -0
  35. package/skills/systematic-debugging/root-cause-tracing.md +169 -0
  36. package/skills/systematic-debugging/test-academic.md +14 -0
  37. package/skills/systematic-debugging/test-pressure-1.md +58 -0
  38. package/skills/systematic-debugging/test-pressure-2.md +68 -0
  39. package/skills/systematic-debugging/test-pressure-3.md +69 -0
  40. package/skills/using-git-worktrees/SKILL.md +218 -0
  41. package/skills/verification-before-completion/SKILL.md +139 -120
  42. package/skills/writing-plans/SKILL.md +79 -94
  43. package/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  44. package/skills/writing-skills/SKILL.md +655 -0
  45. package/skills/writing-skills/anthropic-best-practices.md +1150 -0
  46. package/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  47. package/skills/writing-skills/graphviz-conventions.dot +172 -0
  48. package/skills/writing-skills/persuasion-principles.md +187 -0
  49. package/skills/writing-skills/render-graphs.js +168 -0
  50. package/skills/writing-skills/testing-skills-with-subagents.md +384 -0
  51. package/skills/subagent-driven-development/SKILL.md +0 -173
  52. package/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-39.pyc +0 -0
  53. package/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-39.pyc +0 -0
@@ -0,0 +1,218 @@
1
+ ---
2
+ name: using-git-worktrees
3
+ description: Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
4
+ ---
5
+
6
+ # Using Git Worktrees
7
+
8
+ ## Overview
9
+
10
+ Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching.
11
+
12
+ **Core principle:** Systematic directory selection + safety verification = reliable isolation.
13
+
14
+ **Announce at start:** "I'm using the using-git-worktrees skill to set up an isolated workspace."
15
+
16
+ ## Directory Selection Process
17
+
18
+ Follow this priority order:
19
+
20
+ ### 1. Check Existing Directories
21
+
22
+ ```bash
23
+ # Check in priority order
24
+ ls -d .worktrees 2>/dev/null # Preferred (hidden)
25
+ ls -d worktrees 2>/dev/null # Alternative
26
+ ```
27
+
28
+ **If found:** Use that directory. If both exist, `.worktrees` wins.
29
+
30
+ ### 2. Check CLAUDE.md
31
+
32
+ ```bash
33
+ grep -i "worktree.*director" CLAUDE.md 2>/dev/null
34
+ ```
35
+
36
+ **If preference specified:** Use it without asking.
37
+
38
+ ### 3. Ask User
39
+
40
+ If no directory exists and no CLAUDE.md preference:
41
+
42
+ ```
43
+ No worktree directory found. Where should I create worktrees?
44
+
45
+ 1. .worktrees/ (project-local, hidden)
46
+ 2. ~/.config/superpowers/worktrees/<project-name>/ (global location)
47
+
48
+ Which would you prefer?
49
+ ```
50
+
51
+ ## Safety Verification
52
+
53
+ ### For Project-Local Directories (.worktrees or worktrees)
54
+
55
+ **MUST verify directory is ignored before creating worktree:**
56
+
57
+ ```bash
58
+ # Check if directory is ignored (respects local, global, and system gitignore)
59
+ git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/dev/null
60
+ ```
61
+
62
+ **If NOT ignored:**
63
+
64
+ Per Jesse's rule "Fix broken things immediately":
65
+ 1. Add appropriate line to .gitignore
66
+ 2. Commit the change
67
+ 3. Proceed with worktree creation
68
+
69
+ **Why critical:** Prevents accidentally committing worktree contents to repository.
70
+
71
+ ### For Global Directory (~/.config/superpowers/worktrees)
72
+
73
+ No .gitignore verification needed - outside project entirely.
74
+
75
+ ## Creation Steps
76
+
77
+ ### 1. Detect Project Name
78
+
79
+ ```bash
80
+ project=$(basename "$(git rev-parse --show-toplevel)")
81
+ ```
82
+
83
+ ### 2. Create Worktree
84
+
85
+ ```bash
86
+ # Determine full path
87
+ case $LOCATION in
88
+ .worktrees|worktrees)
89
+ path="$LOCATION/$BRANCH_NAME"
90
+ ;;
91
+ ~/.config/superpowers/worktrees/*)
92
+ path="~/.config/superpowers/worktrees/$project/$BRANCH_NAME"
93
+ ;;
94
+ esac
95
+
96
+ # Create worktree with new branch
97
+ git worktree add "$path" -b "$BRANCH_NAME"
98
+ cd "$path"
99
+ ```
100
+
101
+ ### 3. Run Project Setup
102
+
103
+ Auto-detect and run appropriate setup:
104
+
105
+ ```bash
106
+ # Node.js
107
+ if [ -f package.json ]; then npm install; fi
108
+
109
+ # Rust
110
+ if [ -f Cargo.toml ]; then cargo build; fi
111
+
112
+ # Python
113
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
114
+ if [ -f pyproject.toml ]; then poetry install; fi
115
+
116
+ # Go
117
+ if [ -f go.mod ]; then go mod download; fi
118
+ ```
119
+
120
+ ### 4. Verify Clean Baseline
121
+
122
+ Run tests to ensure worktree starts clean:
123
+
124
+ ```bash
125
+ # Examples - use project-appropriate command
126
+ npm test
127
+ cargo test
128
+ pytest
129
+ go test ./...
130
+ ```
131
+
132
+ **If tests fail:** Report failures, ask whether to proceed or investigate.
133
+
134
+ **If tests pass:** Report ready.
135
+
136
+ ### 5. Report Location
137
+
138
+ ```
139
+ Worktree ready at <full-path>
140
+ Tests passing (<N> tests, 0 failures)
141
+ Ready to implement <feature-name>
142
+ ```
143
+
144
+ ## Quick Reference
145
+
146
+ | Situation | Action |
147
+ |-----------|--------|
148
+ | `.worktrees/` exists | Use it (verify ignored) |
149
+ | `worktrees/` exists | Use it (verify ignored) |
150
+ | Both exist | Use `.worktrees/` |
151
+ | Neither exists | Check CLAUDE.md → Ask user |
152
+ | Directory not ignored | Add to .gitignore + commit |
153
+ | Tests fail during baseline | Report failures + ask |
154
+ | No package.json/Cargo.toml | Skip dependency install |
155
+
156
+ ## Common Mistakes
157
+
158
+ ### Skipping ignore verification
159
+
160
+ - **Problem:** Worktree contents get tracked, pollute git status
161
+ - **Fix:** Always use `git check-ignore` before creating project-local worktree
162
+
163
+ ### Assuming directory location
164
+
165
+ - **Problem:** Creates inconsistency, violates project conventions
166
+ - **Fix:** Follow priority: existing > CLAUDE.md > ask
167
+
168
+ ### Proceeding with failing tests
169
+
170
+ - **Problem:** Can't distinguish new bugs from pre-existing issues
171
+ - **Fix:** Report failures, get explicit permission to proceed
172
+
173
+ ### Hardcoding setup commands
174
+
175
+ - **Problem:** Breaks on projects using different tools
176
+ - **Fix:** Auto-detect from project files (package.json, etc.)
177
+
178
+ ## Example Workflow
179
+
180
+ ```
181
+ You: I'm using the using-git-worktrees skill to set up an isolated workspace.
182
+
183
+ [Check .worktrees/ - exists]
184
+ [Verify ignored - git check-ignore confirms .worktrees/ is ignored]
185
+ [Create worktree: git worktree add .worktrees/auth -b feature/auth]
186
+ [Run npm install]
187
+ [Run npm test - 47 passing]
188
+
189
+ Worktree ready at /Users/jesse/myproject/.worktrees/auth
190
+ Tests passing (47 tests, 0 failures)
191
+ Ready to implement auth feature
192
+ ```
193
+
194
+ ## Red Flags
195
+
196
+ **Never:**
197
+ - Create worktree without verifying it's ignored (project-local)
198
+ - Skip baseline test verification
199
+ - Proceed with failing tests without asking
200
+ - Assume directory location when ambiguous
201
+ - Skip CLAUDE.md check
202
+
203
+ **Always:**
204
+ - Follow directory priority: existing > CLAUDE.md > ask
205
+ - Verify directory is ignored for project-local
206
+ - Auto-detect and run project setup
207
+ - Verify clean test baseline
208
+
209
+ ## Integration
210
+
211
+ **Called by:**
212
+ - **brainstorming** (Phase 4) - REQUIRED when design is approved and implementation follows
213
+ - Subagent dispatch per `docs/rules/agents.md` - REQUIRED before executing any tasks
214
+ - **executing-plans** - REQUIRED before executing any tasks
215
+ - Any skill needing isolated workspace
216
+
217
+ **Pairs with:**
218
+ - **finishing-a-development-branch** - REQUIRED for cleanup after work complete
@@ -1,120 +1,139 @@
1
- ---
2
- name: verification-before-completion
3
- description: 在声称工作完成、已修复或测试通过之前使用。要求运行验证命令并确认输出,然后才能做任何完成声明。证据优先,永远如此。
4
- ---
5
-
6
- # 完成前验证
7
-
8
- ## 概述
9
-
10
- 没有验证就声称完成,不是效率,是不诚实。
11
-
12
- **核心原则**:证据先于声明,永远如此。
13
-
14
- ## 铁律
15
-
16
- ```
17
- 没有新鲜的验证证据,不得做任何完成声明。
18
- ```
19
-
20
- 如果你在本次消息中没有运行过验证命令,你不能声称它通过了。
21
-
22
- ## 门禁函数
23
-
24
- ```
25
- 在做任何状态声明或表达满意之前:
26
-
27
- 1. 识别:什么命令能证明这个声明?
28
- 2. 运行:执行完整命令(新鲜的、完整的)
29
- 3. 阅读:完整输出,检查退出码,统计失败数
30
- 4. 验证:输出是否证实了声明?
31
- - 如果否:用证据说明实际状态
32
- - 如果是:用证据说明声明
33
- 5. 然后:才能做出声明
34
-
35
- 跳过任何步骤 = 在撒谎,不是在验证
36
- ```
37
-
38
- ## 常见失败模式
39
-
40
- | 声明 | 需要的证据 | 不够的证据 |
41
- |------|-----------|-----------|
42
- | 测试通过 | 测试命令输出:0 失败 | 之前的运行、"应该能通过" |
43
- | Lint 干净 | Lint 输出:0 错误 | 部分检查、推测 |
44
- | 构建成功 | 构建命令:exit 0 | Lint 通过、日志看起来没问题 |
45
- | Bug 已修复 | 测试原始症状:通过 | 代码改了,假设修好了 |
46
- | 回归测试有效 | 红-绿循环已验证 | 测试只通过了一次 |
47
- | 子代理完成 | VCS diff 显示变更 | 子代理报告"成功" |
48
- | 需求已满足 | 逐条核对清单 | 测试通过 |
49
-
50
- ## Red Flags 立即停下
51
-
52
- - 使用"应该"、"大概"、"看起来"
53
- - 在验证前表达满意("搞定了!"、"完美!"、"没问题!")
54
- - 要提交/推送/创建 PR 但没有验证
55
- - 信任子代理的成功报告而不独立验证
56
- - 依赖部分验证
57
- - 想着"就这一次"
58
- - **任何暗示成功但没有运行验证的措辞**
59
-
60
- ## 合理化借口防范
61
-
62
- | 借口 | 真相 |
63
- |------|------|
64
- | "应该可以了" | 运行验证命令 |
65
- | "我很有信心" | 信心 ≠ 证据 |
66
- | "就这一次" | 没有例外 |
67
- | "Lint 通过了" | Lint 编译器 ≠ 运行时 |
68
- | "子代理说成功了" | 独立验证 |
69
- | "部分检查就够了" | 部分什么都证明不了 |
70
- | "换个说法所以规则不适用" | 精神高于字面 |
71
-
72
- ## 关键模式
73
-
74
- **测试验证:**
75
- ```
76
- 正确:[运行测试命令] [看到:34/34 通过] "所有测试通过"
77
- 错误:"应该能通过了" / "看起来对了"
78
- ```
79
-
80
- **回归测试(TDD 红-绿):**
81
- ```
82
- 正确:写测试 → 运行(通过) → 撤回修复 → 运行(必须失败) → 恢复修复 → 运行(通过)
83
- 错误:"我写了回归测试"(没有红-绿验证)
84
- ```
85
-
86
- **构建验证:**
87
- ```
88
- 正确:[运行构建] [看到:exit 0] "构建通过"
89
- 错误:"Lint 通过了"(Lint 不检查编译)
90
- ```
91
-
92
- **需求验证:**
93
- ```
94
- 正确:重读计划 → 创建核对清单 → 逐条验证 → 报告遗漏或完成
95
- 错误:"测试通过了,阶段完成"
96
- ```
97
-
98
- **子代理委派验证:**
99
- ```
100
- 正确:子代理报告成功 → 检查 VCS diff → 验证变更 → 报告实际状态
101
- 错误:信任子代理报告
102
- ```
103
-
104
- ## 何时应用
105
-
106
- **总是在以下情况之前应用:**
107
- - 任何完成/成功声明的变体
108
- - 任何表达满意的语句
109
- - 任何关于工作状态的积极陈述
110
- - 提交、PR 创建、任务完成标记
111
- - 进入下一个任务
112
- - 向用户报告结果
113
-
114
- ## 底线
115
-
116
- **验证没有捷径。**
117
-
118
- 运行命令。阅读输出。**然后**声明结果。
119
-
120
- 这是不可协商的。
1
+ ---
2
+ name: verification-before-completion
3
+ description: Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
4
+ ---
5
+
6
+ # Verification Before Completion
7
+
8
+ ## Overview
9
+
10
+ Claiming work is complete without verification is dishonesty, not efficiency.
11
+
12
+ **Core principle:** Evidence before claims, always.
13
+
14
+ **Violating the letter of this rule is violating the spirit of this rule.**
15
+
16
+ ## The Iron Law
17
+
18
+ ```
19
+ NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
20
+ ```
21
+
22
+ If you haven't run the verification command in this message, you cannot claim it passes.
23
+
24
+ ## The Gate Function
25
+
26
+ ```
27
+ BEFORE claiming any status or expressing satisfaction:
28
+
29
+ 1. IDENTIFY: What command proves this claim?
30
+ 2. RUN: Execute the FULL command (fresh, complete)
31
+ 3. READ: Full output, check exit code, count failures
32
+ 4. VERIFY: Does output confirm the claim?
33
+ - If NO: State actual status with evidence
34
+ - If YES: State claim WITH evidence
35
+ 5. ONLY THEN: Make the claim
36
+
37
+ Skip any step = lying, not verifying
38
+ ```
39
+
40
+ ## Common Failures
41
+
42
+ | Claim | Requires | Not Sufficient |
43
+ |-------|----------|----------------|
44
+ | Tests pass | Test command output: 0 failures | Previous run, "should pass" |
45
+ | Linter clean | Linter output: 0 errors | Partial check, extrapolation |
46
+ | Build succeeds | Build command: exit 0 | Linter passing, logs look good |
47
+ | Bug fixed | Test original symptom: passes | Code changed, assumed fixed |
48
+ | Regression test works | Red-green cycle verified | Test passes once |
49
+ | Agent completed | VCS diff shows changes | Agent reports "success" |
50
+ | Requirements met | Line-by-line checklist | Tests passing |
51
+
52
+ ## Red Flags - STOP
53
+
54
+ - Using "should", "probably", "seems to"
55
+ - Expressing satisfaction before verification ("Great!", "Perfect!", "Done!", etc.)
56
+ - About to commit/push/PR without verification
57
+ - Trusting agent success reports
58
+ - Relying on partial verification
59
+ - Thinking "just this once"
60
+ - Tired and wanting work over
61
+ - **ANY wording implying success without having run verification**
62
+
63
+ ## Rationalization Prevention
64
+
65
+ | Excuse | Reality |
66
+ |--------|---------|
67
+ | "Should work now" | RUN the verification |
68
+ | "I'm confident" | Confidence ≠ evidence |
69
+ | "Just this once" | No exceptions |
70
+ | "Linter passed" | Linter ≠ compiler |
71
+ | "Agent said success" | Verify independently |
72
+ | "I'm tired" | Exhaustion ≠ excuse |
73
+ | "Partial check is enough" | Partial proves nothing |
74
+ | "Different words so rule doesn't apply" | Spirit over letter |
75
+
76
+ ## Key Patterns
77
+
78
+ **Tests:**
79
+ ```
80
+ [Run test command] [See: 34/34 pass] "All tests pass"
81
+ ❌ "Should pass now" / "Looks correct"
82
+ ```
83
+
84
+ **Regression tests (TDD Red-Green):**
85
+ ```
86
+ ✅ Write → Run (pass) → Revert fix → Run (MUST FAIL) → Restore → Run (pass)
87
+ ❌ "I've written a regression test" (without red-green verification)
88
+ ```
89
+
90
+ **Build:**
91
+ ```
92
+ ✅ [Run build] [See: exit 0] "Build passes"
93
+ ❌ "Linter passed" (linter doesn't check compilation)
94
+ ```
95
+
96
+ **Requirements:**
97
+ ```
98
+ ✅ Re-read plan → Create checklist → Verify each → Report gaps or completion
99
+ ❌ "Tests pass, phase complete"
100
+ ```
101
+
102
+ **Agent delegation:**
103
+ ```
104
+ Agent reports success → Check VCS diff → Verify changes → Report actual state
105
+ ❌ Trust agent report
106
+ ```
107
+
108
+ ## Why This Matters
109
+
110
+ From 24 failure memories:
111
+ - your human partner said "I don't believe you" - trust broken
112
+ - Undefined functions shipped - would crash
113
+ - Missing requirements shipped - incomplete features
114
+ - Time wasted on false completion → redirect → rework
115
+ - Violates: "Honesty is a core value. If you lie, you'll be replaced."
116
+
117
+ ## When To Apply
118
+
119
+ **ALWAYS before:**
120
+ - ANY variation of success/completion claims
121
+ - ANY expression of satisfaction
122
+ - ANY positive statement about work state
123
+ - Committing, PR creation, task completion
124
+ - Moving to next task
125
+ - Delegating to agents
126
+
127
+ **Rule applies to:**
128
+ - Exact phrases
129
+ - Paraphrases and synonyms
130
+ - Implications of success
131
+ - ANY communication suggesting completion/correctness
132
+
133
+ ## The Bottom Line
134
+
135
+ **No shortcuts for verification.**
136
+
137
+ Run the command. Read the output. THEN claim the result.
138
+
139
+ This is non-negotiable.