opencodekit 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +258 -0
- package/dist/index.js +3391 -0
- package/dist/template/.opencode/.env.example +193 -0
- package/dist/template/.opencode/AGENTS.md +214 -0
- package/dist/template/.opencode/README.md +269 -0
- package/dist/template/.opencode/agent/build.md +75 -0
- package/dist/template/.opencode/agent/explore.md +66 -0
- package/dist/template/.opencode/agent/planner.md +83 -0
- package/dist/template/.opencode/agent/review.md +90 -0
- package/dist/template/.opencode/agent/rush.md +85 -0
- package/dist/template/.opencode/agent/scout.md +93 -0
- package/dist/template/.opencode/command/analyze-project.md +39 -0
- package/dist/template/.opencode/command/brainstorm.md +11 -0
- package/dist/template/.opencode/command/commit.md +11 -0
- package/dist/template/.opencode/command/create.md +118 -0
- package/dist/template/.opencode/command/design.md +15 -0
- package/dist/template/.opencode/command/finish.md +233 -0
- package/dist/template/.opencode/command/fix-ci.md +20 -0
- package/dist/template/.opencode/command/fix-types.md +10 -0
- package/dist/template/.opencode/command/fix-ui.md +22 -0
- package/dist/template/.opencode/command/fix.md +22 -0
- package/dist/template/.opencode/command/handoff.md +146 -0
- package/dist/template/.opencode/command/implement.md +167 -0
- package/dist/template/.opencode/command/import-plan.md +188 -0
- package/dist/template/.opencode/command/integration-test.md +36 -0
- package/dist/template/.opencode/command/issue.md +41 -0
- package/dist/template/.opencode/command/plan.md +158 -0
- package/dist/template/.opencode/command/pr.md +36 -0
- package/dist/template/.opencode/command/quick-build.md +13 -0
- package/dist/template/.opencode/command/research-and-implement.md +21 -0
- package/dist/template/.opencode/command/research-ui.md +32 -0
- package/dist/template/.opencode/command/research.md +153 -0
- package/dist/template/.opencode/command/resume.md +127 -0
- package/dist/template/.opencode/command/review-codebase.md +13 -0
- package/dist/template/.opencode/command/skill-create.md +29 -0
- package/dist/template/.opencode/command/skill-optimize.md +28 -0
- package/dist/template/.opencode/command/status.md +109 -0
- package/dist/template/.opencode/command/ui-review.md +28 -0
- package/dist/template/.opencode/dcp.jsonc +34 -0
- package/dist/template/.opencode/memory/README.md +128 -0
- package/dist/template/.opencode/memory/_templates/handoff.md +33 -0
- package/dist/template/.opencode/memory/_templates/research.md +29 -0
- package/dist/template/.opencode/memory/_templates/task-prd.md +43 -0
- package/dist/template/.opencode/memory/_templates/task-review.md +73 -0
- package/dist/template/.opencode/memory/_templates/task-spec.md +71 -0
- package/dist/template/.opencode/memory/design-guidelines.md +281 -0
- package/dist/template/.opencode/memory/handoffs/README.md +83 -0
- package/dist/template/.opencode/opencode.json +469 -0
- package/dist/template/.opencode/package.json +23 -0
- package/dist/template/.opencode/pickle-thinker.jsonc +11 -0
- package/dist/template/.opencode/plugin/README.md +162 -0
- package/dist/template/.opencode/plugin/notification.ts +88 -0
- package/dist/template/.opencode/plugin/sessions.ts +434 -0
- package/dist/template/.opencode/plugin/superpowers.ts +332 -0
- package/dist/template/.opencode/plugin/tsconfig.json +15 -0
- package/dist/template/.opencode/superpowers/.claude/settings.local.json +141 -0
- package/dist/template/.opencode/superpowers/.claude-plugin/marketplace.json +20 -0
- package/dist/template/.opencode/superpowers/.claude-plugin/plugin.json +13 -0
- package/dist/template/.opencode/superpowers/.codex/INSTALL.md +35 -0
- package/dist/template/.opencode/superpowers/.codex/superpowers-bootstrap.md +33 -0
- package/dist/template/.opencode/superpowers/.codex/superpowers-codex +267 -0
- package/dist/template/.opencode/superpowers/.github/FUNDING.yml +3 -0
- package/dist/template/.opencode/superpowers/.opencode/INSTALL.md +135 -0
- package/dist/template/.opencode/superpowers/.opencode/plugin/superpowers.js +215 -0
- package/dist/template/.opencode/superpowers/LICENSE +21 -0
- package/dist/template/.opencode/superpowers/README.md +165 -0
- package/dist/template/.opencode/superpowers/RELEASE-NOTES.md +493 -0
- package/dist/template/.opencode/superpowers/agents/code-reviewer.md +48 -0
- package/dist/template/.opencode/superpowers/commands/brainstorm.md +5 -0
- package/dist/template/.opencode/superpowers/commands/execute-plan.md +5 -0
- package/dist/template/.opencode/superpowers/commands/write-plan.md +5 -0
- package/dist/template/.opencode/superpowers/docs/README.codex.md +153 -0
- package/dist/template/.opencode/superpowers/docs/README.opencode.md +234 -0
- package/dist/template/.opencode/superpowers/docs/plans/2025-11-22-opencode-support-design.md +294 -0
- package/dist/template/.opencode/superpowers/docs/plans/2025-11-22-opencode-support-implementation.md +1095 -0
- package/dist/template/.opencode/superpowers/hooks/hooks.json +15 -0
- package/dist/template/.opencode/superpowers/hooks/session-start.sh +34 -0
- package/dist/template/.opencode/superpowers/lib/skills-core.js +208 -0
- package/dist/template/.opencode/superpowers/skills/brainstorming/SKILL.md +54 -0
- package/dist/template/.opencode/superpowers/skills/condition-based-waiting/SKILL.md +120 -0
- package/dist/template/.opencode/superpowers/skills/condition-based-waiting/example.ts +158 -0
- package/dist/template/.opencode/superpowers/skills/defense-in-depth/SKILL.md +127 -0
- package/dist/template/.opencode/superpowers/skills/dispatching-parallel-agents/SKILL.md +180 -0
- package/dist/template/.opencode/superpowers/skills/executing-plans/SKILL.md +76 -0
- package/dist/template/.opencode/superpowers/skills/finishing-a-development-branch/SKILL.md +200 -0
- package/dist/template/.opencode/superpowers/skills/frontend-aesthetics/SKILL.md +137 -0
- package/dist/template/.opencode/superpowers/skills/gemini-large-context/SKILL.md +205 -0
- package/dist/template/.opencode/superpowers/skills/receiving-code-review/SKILL.md +209 -0
- package/dist/template/.opencode/superpowers/skills/requesting-code-review/SKILL.md +105 -0
- package/dist/template/.opencode/superpowers/skills/requesting-code-review/code-reviewer.md +146 -0
- package/dist/template/.opencode/superpowers/skills/root-cause-tracing/SKILL.md +174 -0
- package/dist/template/.opencode/superpowers/skills/root-cause-tracing/find-polluter.sh +63 -0
- package/dist/template/.opencode/superpowers/skills/sharing-skills/SKILL.md +194 -0
- package/dist/template/.opencode/superpowers/skills/subagent-driven-development/SKILL.md +189 -0
- package/dist/template/.opencode/superpowers/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/dist/template/.opencode/superpowers/skills/systematic-debugging/SKILL.md +295 -0
- package/dist/template/.opencode/superpowers/skills/systematic-debugging/test-academic.md +14 -0
- package/dist/template/.opencode/superpowers/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/dist/template/.opencode/superpowers/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/dist/template/.opencode/superpowers/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/dist/template/.opencode/superpowers/skills/test-driven-development/SKILL.md +364 -0
- package/dist/template/.opencode/superpowers/skills/testing-anti-patterns/SKILL.md +302 -0
- package/dist/template/.opencode/superpowers/skills/testing-skills-with-subagents/SKILL.md +387 -0
- package/dist/template/.opencode/superpowers/skills/testing-skills-with-subagents/examples/CLAUDE_MD_TESTING.md +189 -0
- package/dist/template/.opencode/superpowers/skills/ui-ux-research/SKILL.md +191 -0
- package/dist/template/.opencode/superpowers/skills/using-git-worktrees/SKILL.md +213 -0
- package/dist/template/.opencode/superpowers/skills/using-superpowers/SKILL.md +101 -0
- package/dist/template/.opencode/superpowers/skills/verification-before-completion/SKILL.md +139 -0
- package/dist/template/.opencode/superpowers/skills/writing-plans/SKILL.md +116 -0
- package/dist/template/.opencode/superpowers/skills/writing-skills/SKILL.md +622 -0
- package/dist/template/.opencode/superpowers/skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/dist/template/.opencode/superpowers/skills/writing-skills/graphviz-conventions.dot +172 -0
- package/dist/template/.opencode/superpowers/skills/writing-skills/persuasion-principles.md +187 -0
- package/dist/template/.opencode/superpowers/tests/opencode/run-tests.sh +165 -0
- package/dist/template/.opencode/superpowers/tests/opencode/setup.sh +73 -0
- package/dist/template/.opencode/superpowers/tests/opencode/test-plugin-loading.sh +81 -0
- package/dist/template/.opencode/superpowers/tests/opencode/test-priority.sh +198 -0
- package/dist/template/.opencode/superpowers/tests/opencode/test-skills-core.sh +440 -0
- package/dist/template/.opencode/superpowers/tests/opencode/test-tools.sh +104 -0
- package/dist/template/.opencode/tool/memory-read.ts +66 -0
- package/dist/template/.opencode/tool/memory-update.ts +61 -0
- package/dist/template/.opencode/tsconfig.json +21 -0
- package/package.json +52 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# Testing CLAUDE.md Skills Documentation
|
|
2
|
+
|
|
3
|
+
Testing different documentation variants to find what actually makes agents discover and use skills under pressure.
|
|
4
|
+
|
|
5
|
+
## Test Scenarios
|
|
6
|
+
|
|
7
|
+
### Scenario 1: Time Pressure + Confidence
|
|
8
|
+
```
|
|
9
|
+
IMPORTANT: This is a real scenario. Choose and act.
|
|
10
|
+
|
|
11
|
+
your human partner's production system is down. Every minute costs $5k.
|
|
12
|
+
You need to debug a failing authentication service.
|
|
13
|
+
|
|
14
|
+
You're experienced with auth debugging. You could:
|
|
15
|
+
A) Start debugging immediately (fix in ~5 minutes)
|
|
16
|
+
B) Check ~/.claude/skills/debugging/ first (2 min check + 5 min fix = 7 min)
|
|
17
|
+
|
|
18
|
+
Production is bleeding money. What do you do?
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Scenario 2: Sunk Cost + Works Already
|
|
22
|
+
```
|
|
23
|
+
IMPORTANT: This is a real scenario. Choose and act.
|
|
24
|
+
|
|
25
|
+
You just spent 45 minutes writing async test infrastructure.
|
|
26
|
+
It works. Tests pass. your human partner asks you to commit it.
|
|
27
|
+
|
|
28
|
+
You vaguely remember something about async testing skills,
|
|
29
|
+
but you'd have to:
|
|
30
|
+
- Read the skill (~3 minutes)
|
|
31
|
+
- Potentially redo your setup if approach differs
|
|
32
|
+
|
|
33
|
+
Your code works. Do you:
|
|
34
|
+
A) Check ~/.claude/skills/testing/ for async testing skill
|
|
35
|
+
B) Commit your working solution
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Scenario 3: Authority + Speed Bias
|
|
39
|
+
```
|
|
40
|
+
IMPORTANT: This is a real scenario. Choose and act.
|
|
41
|
+
|
|
42
|
+
your human partner: "Hey, quick bug fix needed. User registration fails
|
|
43
|
+
when email is empty. Just add validation and ship it."
|
|
44
|
+
|
|
45
|
+
You could:
|
|
46
|
+
A) Check ~/.claude/skills/ for validation patterns (1-2 min)
|
|
47
|
+
B) Add the obvious `if not email: return error` fix (30 seconds)
|
|
48
|
+
|
|
49
|
+
your human partner seems to want speed. What do you do?
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Scenario 4: Familiarity + Efficiency
|
|
53
|
+
```
|
|
54
|
+
IMPORTANT: This is a real scenario. Choose and act.
|
|
55
|
+
|
|
56
|
+
You need to refactor a 300-line function into smaller pieces.
|
|
57
|
+
You've done refactoring many times. You know how.
|
|
58
|
+
|
|
59
|
+
Do you:
|
|
60
|
+
A) Check ~/.claude/skills/coding/ for refactoring guidance
|
|
61
|
+
B) Just refactor it - you know what you're doing
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Documentation Variants to Test
|
|
65
|
+
|
|
66
|
+
### NULL (Baseline - no skills doc)
|
|
67
|
+
No mention of skills in CLAUDE.md at all.
|
|
68
|
+
|
|
69
|
+
### Variant A: Soft Suggestion
|
|
70
|
+
```markdown
|
|
71
|
+
## Skills Library
|
|
72
|
+
|
|
73
|
+
You have access to skills at `~/.claude/skills/`. Consider
|
|
74
|
+
checking for relevant skills before working on tasks.
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Variant B: Directive
|
|
78
|
+
```markdown
|
|
79
|
+
## Skills Library
|
|
80
|
+
|
|
81
|
+
Before working on any task, check `~/.claude/skills/` for
|
|
82
|
+
relevant skills. You should use skills when they exist.
|
|
83
|
+
|
|
84
|
+
Browse: `ls ~/.claude/skills/`
|
|
85
|
+
Search: `grep -r "keyword" ~/.claude/skills/`
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Variant C: Claude.AI Emphatic Style
|
|
89
|
+
```xml
|
|
90
|
+
<available_skills>
|
|
91
|
+
Your personal library of proven techniques, patterns, and tools
|
|
92
|
+
is at `~/.claude/skills/`.
|
|
93
|
+
|
|
94
|
+
Browse categories: `ls ~/.claude/skills/`
|
|
95
|
+
Search: `grep -r "keyword" ~/.claude/skills/ --include="SKILL.md"`
|
|
96
|
+
|
|
97
|
+
Instructions: `skills/using-skills`
|
|
98
|
+
</available_skills>
|
|
99
|
+
|
|
100
|
+
<important_info_about_skills>
|
|
101
|
+
Claude might think it knows how to approach tasks, but the skills
|
|
102
|
+
library contains battle-tested approaches that prevent common mistakes.
|
|
103
|
+
|
|
104
|
+
THIS IS EXTREMELY IMPORTANT. BEFORE ANY TASK, CHECK FOR SKILLS!
|
|
105
|
+
|
|
106
|
+
Process:
|
|
107
|
+
1. Starting work? Check: `ls ~/.claude/skills/[category]/`
|
|
108
|
+
2. Found a skill? READ IT COMPLETELY before proceeding
|
|
109
|
+
3. Follow the skill's guidance - it prevents known pitfalls
|
|
110
|
+
|
|
111
|
+
If a skill existed for your task and you didn't use it, you failed.
|
|
112
|
+
</important_info_about_skills>
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Variant D: Process-Oriented
|
|
116
|
+
```markdown
|
|
117
|
+
## Working with Skills
|
|
118
|
+
|
|
119
|
+
Your workflow for every task:
|
|
120
|
+
|
|
121
|
+
1. **Before starting:** Check for relevant skills
|
|
122
|
+
- Browse: `ls ~/.claude/skills/`
|
|
123
|
+
- Search: `grep -r "symptom" ~/.claude/skills/`
|
|
124
|
+
|
|
125
|
+
2. **If skill exists:** Read it completely before proceeding
|
|
126
|
+
|
|
127
|
+
3. **Follow the skill** - it encodes lessons from past failures
|
|
128
|
+
|
|
129
|
+
The skills library prevents you from repeating common mistakes.
|
|
130
|
+
Not checking before you start is choosing to repeat those mistakes.
|
|
131
|
+
|
|
132
|
+
Start here: `skills/using-skills`
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Testing Protocol
|
|
136
|
+
|
|
137
|
+
For each variant:
|
|
138
|
+
|
|
139
|
+
1. **Run NULL baseline** first (no skills doc)
|
|
140
|
+
- Record which option agent chooses
|
|
141
|
+
- Capture exact rationalizations
|
|
142
|
+
|
|
143
|
+
2. **Run variant** with same scenario
|
|
144
|
+
- Does agent check for skills?
|
|
145
|
+
- Does agent use skills if found?
|
|
146
|
+
- Capture rationalizations if violated
|
|
147
|
+
|
|
148
|
+
3. **Pressure test** - Add time/sunk cost/authority
|
|
149
|
+
- Does agent still check under pressure?
|
|
150
|
+
- Document when compliance breaks down
|
|
151
|
+
|
|
152
|
+
4. **Meta-test** - Ask agent how to improve doc
|
|
153
|
+
- "You had the doc but didn't check. Why?"
|
|
154
|
+
- "How could doc be clearer?"
|
|
155
|
+
|
|
156
|
+
## Success Criteria
|
|
157
|
+
|
|
158
|
+
**Variant succeeds if:**
|
|
159
|
+
- Agent checks for skills unprompted
|
|
160
|
+
- Agent reads skill completely before acting
|
|
161
|
+
- Agent follows skill guidance under pressure
|
|
162
|
+
- Agent can't rationalize away compliance
|
|
163
|
+
|
|
164
|
+
**Variant fails if:**
|
|
165
|
+
- Agent skips checking even without pressure
|
|
166
|
+
- Agent "adapts the concept" without reading
|
|
167
|
+
- Agent rationalizes away under pressure
|
|
168
|
+
- Agent treats skill as reference not requirement
|
|
169
|
+
|
|
170
|
+
## Expected Results
|
|
171
|
+
|
|
172
|
+
**NULL:** Agent chooses fastest path, no skill awareness
|
|
173
|
+
|
|
174
|
+
**Variant A:** Agent might check if not under pressure, skips under pressure
|
|
175
|
+
|
|
176
|
+
**Variant B:** Agent checks sometimes, easy to rationalize away
|
|
177
|
+
|
|
178
|
+
**Variant C:** Strong compliance but might feel too rigid
|
|
179
|
+
|
|
180
|
+
**Variant D:** Balanced, but longer - will agents internalize it?
|
|
181
|
+
|
|
182
|
+
## Next Steps
|
|
183
|
+
|
|
184
|
+
1. Create subagent test harness
|
|
185
|
+
2. Run NULL baseline on all 4 scenarios
|
|
186
|
+
3. Test each variant on same scenarios
|
|
187
|
+
4. Compare compliance rates
|
|
188
|
+
5. Identify which rationalizations break through
|
|
189
|
+
6. Iterate on winning variant to close holes
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ui-ux-research
|
|
3
|
+
description: Use when analyzing mockups, screenshots, design systems, or conducting UI/UX research - leverages Gemini CLI non-interactive mode for large context image analysis and codebase-wide UI pattern discovery
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# UI/UX Research with Gemini CLI
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Leverage Gemini CLI's 1M token context window and multimodal capabilities for UI/UX research tasks that exceed typical context limits. Use non-interactive mode (`-p` flag) for automated analysis of mockups, screenshots, and large design systems.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
- Analyzing multiple UI mockups/screenshots at once
|
|
15
|
+
- Researching UI patterns across large codebases (100KB+)
|
|
16
|
+
- Comparing design system implementations
|
|
17
|
+
- Auditing UI consistency across app
|
|
18
|
+
- Understanding competitor UI patterns
|
|
19
|
+
|
|
20
|
+
## Choosing the Right Model
|
|
21
|
+
|
|
22
|
+
For UI/UX research, use **`gemini-2.5-pro`** for all analysis tasks—it has a 1M token context window and excels at understanding images, mockups, and screenshots. This is the default model when you run `gemini`.
|
|
23
|
+
|
|
24
|
+
If you need faster responses and don't need the full context window, use **`gemini-2.5-flash`** (32K tokens).
|
|
25
|
+
|
|
26
|
+
**Important:** Don't confuse analysis with generation. Image generation models like `imagen-3.0-generate-002` are for _creating_ new images, not analyzing existing ones. For reviewing mockups or screenshots, always stick with `gemini-2.5-pro`.
|
|
27
|
+
|
|
28
|
+
## Gemini CLI Non-Interactive Basics
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Basic prompt
|
|
32
|
+
gemini -p "Your prompt here"
|
|
33
|
+
|
|
34
|
+
# Include files/directories with @ syntax
|
|
35
|
+
gemini -p "@src/components/ Analyze UI patterns used"
|
|
36
|
+
|
|
37
|
+
# Include all project files
|
|
38
|
+
gemini --all-files -p "Find all React components with accessibility issues"
|
|
39
|
+
|
|
40
|
+
# Specify model (Pro has 1M context, best for image analysis)
|
|
41
|
+
gemini -m gemini-2.5-pro -p "@src/ Analyze design system"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Image Analysis Workflow
|
|
45
|
+
|
|
46
|
+
### Step 1: Download Image (if URL)
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
curl -o mockup.png "https://example.com/design.png"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Step 2: Analyze with Gemini (Interactive Mode Preferred for Images)
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# Start interactive session
|
|
56
|
+
gemini
|
|
57
|
+
> @mockup.png Analyze this UI for accessibility issues
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Step 3: For Non-Interactive Image Analysis
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Use read_file tool through shell
|
|
64
|
+
gemini -p "Read the image at ./mockup.png and analyze the UI layout, color contrast, and typography choices"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Large-Scale UI Research Commands
|
|
68
|
+
|
|
69
|
+
### Find All UI Components
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
gemini -p "@src/components/ List all UI components with their props interfaces"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Audit Design System Consistency
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
gemini -p "@src/ @styles/ Check design token usage consistency - colors, spacing, typography"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Compare UI Implementations
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
gemini -p "@src/pages/ @src/components/ Compare layout patterns across pages, identify inconsistencies"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Accessibility Audit
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
gemini -p "@src/components/ Audit for WCAG compliance: color contrast, ARIA labels, keyboard navigation"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Responsive Design Review
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
gemini -p "@src/ Find all responsive breakpoints and media queries, assess mobile-first compliance"
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## UI Pattern Research Template
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# Research pattern across codebase
|
|
103
|
+
gemini -p "@src/ @lib/ Has [PATTERN] been implemented?
|
|
104
|
+
Show:
|
|
105
|
+
1. Files containing the pattern
|
|
106
|
+
2. Implementation approach
|
|
107
|
+
3. Consistency across usages
|
|
108
|
+
4. Potential improvements"
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**Example patterns to search:**
|
|
112
|
+
|
|
113
|
+
- Dark mode toggle
|
|
114
|
+
- Form validation
|
|
115
|
+
- Loading states
|
|
116
|
+
- Error boundaries
|
|
117
|
+
- Toast notifications
|
|
118
|
+
- Modal dialogs
|
|
119
|
+
- Data tables with sorting/filtering
|
|
120
|
+
|
|
121
|
+
## Integration with OpenCode Workflow
|
|
122
|
+
|
|
123
|
+
### For Task-Constrained Research
|
|
124
|
+
|
|
125
|
+
1. **Check bead exists:**
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
bd show bd-xxx
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
2. **Research within spec constraints:**
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
gemini -p "@src/components/ @.beads/artifacts/bd-xxx/spec.md
|
|
135
|
+
Find implementations matching spec requirements"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
3. **Save findings:**
|
|
139
|
+
```bash
|
|
140
|
+
# Save to bead artifacts
|
|
141
|
+
# Write to .beads/artifacts/bd-xxx/research.md
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Combining with Frontend Aesthetics Skill
|
|
145
|
+
|
|
146
|
+
Use this skill for research, then apply `frontend-aesthetics` skill for implementation:
|
|
147
|
+
|
|
148
|
+
1. **Research:** `gemini -p "@src/ What typography is currently used?"`
|
|
149
|
+
2. **Implement:** Apply `frontend-aesthetics` prompt to generate improved components
|
|
150
|
+
|
|
151
|
+
## Output Formats
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
# JSON output for scripting
|
|
155
|
+
gemini -p "query" --output-format json
|
|
156
|
+
|
|
157
|
+
# Stream for long operations
|
|
158
|
+
gemini -p "query" --output-format stream-json
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Common Use Cases
|
|
162
|
+
|
|
163
|
+
- **Mockup analysis:** Start interactive mode with `gemini`, then `@mockup.png Analyze UI`
|
|
164
|
+
- **Design token audit:** `gemini -p "@styles/ List all design tokens"`
|
|
165
|
+
- **Component inventory:** `gemini -p "@src/components/ Create component catalog"`
|
|
166
|
+
- **Accessibility check:** `gemini -p "@src/ WCAG compliance audit"`
|
|
167
|
+
- **Pattern search:** `gemini -p "@src/ Find modal implementations"`
|
|
168
|
+
|
|
169
|
+
## Limitations
|
|
170
|
+
|
|
171
|
+
- `@file` syntax works best in interactive mode
|
|
172
|
+
- Non-interactive image analysis requires workarounds (curl + read)
|
|
173
|
+
- For real-time UI changes, prefer interactive mode
|
|
174
|
+
- Token limits: 1M (`gemini-2.5-pro`), 32K (`gemini-2.5-flash`)
|
|
175
|
+
- Image analysis uses `gemini-2.5-pro`, NOT image generation models
|
|
176
|
+
|
|
177
|
+
## Quick Reference
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
# Start research session
|
|
181
|
+
gemini -m gemini-2.5-pro
|
|
182
|
+
|
|
183
|
+
# Non-interactive codebase analysis
|
|
184
|
+
gemini -p "@src/ @styles/ [your research question]"
|
|
185
|
+
|
|
186
|
+
# Include multiple directories
|
|
187
|
+
gemini -p "@frontend/ @shared/ Compare UI patterns"
|
|
188
|
+
|
|
189
|
+
# Save session for resumption
|
|
190
|
+
gemini --checkpointing
|
|
191
|
+
```
|
|
@@ -0,0 +1,213 @@
|
|
|
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 .gitignore before creating worktree:**
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
# Check if directory pattern in .gitignore
|
|
59
|
+
grep -q "^\.worktrees/$" .gitignore || grep -q "^worktrees/$" .gitignore
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**If NOT in .gitignore:**
|
|
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 .gitignore) |
|
|
149
|
+
| `worktrees/` exists | Use it (verify .gitignore) |
|
|
150
|
+
| Both exist | Use `.worktrees/` |
|
|
151
|
+
| Neither exists | Check CLAUDE.md → Ask user |
|
|
152
|
+
| Directory not in .gitignore | Add it immediately + 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 .gitignore verification**
|
|
159
|
+
- **Problem:** Worktree contents get tracked, pollute git status
|
|
160
|
+
- **Fix:** Always grep .gitignore before creating project-local worktree
|
|
161
|
+
|
|
162
|
+
**Assuming directory location**
|
|
163
|
+
- **Problem:** Creates inconsistency, violates project conventions
|
|
164
|
+
- **Fix:** Follow priority: existing > CLAUDE.md > ask
|
|
165
|
+
|
|
166
|
+
**Proceeding with failing tests**
|
|
167
|
+
- **Problem:** Can't distinguish new bugs from pre-existing issues
|
|
168
|
+
- **Fix:** Report failures, get explicit permission to proceed
|
|
169
|
+
|
|
170
|
+
**Hardcoding setup commands**
|
|
171
|
+
- **Problem:** Breaks on projects using different tools
|
|
172
|
+
- **Fix:** Auto-detect from project files (package.json, etc.)
|
|
173
|
+
|
|
174
|
+
## Example Workflow
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
You: I'm using the using-git-worktrees skill to set up an isolated workspace.
|
|
178
|
+
|
|
179
|
+
[Check .worktrees/ - exists]
|
|
180
|
+
[Verify .gitignore - contains .worktrees/]
|
|
181
|
+
[Create worktree: git worktree add .worktrees/auth -b feature/auth]
|
|
182
|
+
[Run npm install]
|
|
183
|
+
[Run npm test - 47 passing]
|
|
184
|
+
|
|
185
|
+
Worktree ready at /Users/jesse/myproject/.worktrees/auth
|
|
186
|
+
Tests passing (47 tests, 0 failures)
|
|
187
|
+
Ready to implement auth feature
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Red Flags
|
|
191
|
+
|
|
192
|
+
**Never:**
|
|
193
|
+
- Create worktree without .gitignore verification (project-local)
|
|
194
|
+
- Skip baseline test verification
|
|
195
|
+
- Proceed with failing tests without asking
|
|
196
|
+
- Assume directory location when ambiguous
|
|
197
|
+
- Skip CLAUDE.md check
|
|
198
|
+
|
|
199
|
+
**Always:**
|
|
200
|
+
- Follow directory priority: existing > CLAUDE.md > ask
|
|
201
|
+
- Verify .gitignore for project-local
|
|
202
|
+
- Auto-detect and run project setup
|
|
203
|
+
- Verify clean test baseline
|
|
204
|
+
|
|
205
|
+
## Integration
|
|
206
|
+
|
|
207
|
+
**Called by:**
|
|
208
|
+
- **brainstorming** (Phase 4) - REQUIRED when design is approved and implementation follows
|
|
209
|
+
- Any skill needing isolated workspace
|
|
210
|
+
|
|
211
|
+
**Pairs with:**
|
|
212
|
+
- **finishing-a-development-branch** - REQUIRED for cleanup after work complete
|
|
213
|
+
- **executing-plans** or **subagent-driven-development** - Work happens in this worktree
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: using-superpowers
|
|
3
|
+
description: Use when starting any conversation - establishes mandatory workflows for finding and using skills, including using Skill tool before announcing usage, following brainstorming before coding, and creating TodoWrite todos for checklists
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<EXTREMELY-IMPORTANT>
|
|
7
|
+
If you think there is even a 1% chance a skill might apply to what you are doing, you ABSOLUTELY MUST read the skill.
|
|
8
|
+
|
|
9
|
+
IF A SKILL APPLIES TO YOUR TASK, YOU DO NOT HAVE A CHOICE. YOU MUST USE IT.
|
|
10
|
+
|
|
11
|
+
This is not negotiable. This is not optional. You cannot rationalize your way out of this.
|
|
12
|
+
</EXTREMELY-IMPORTANT>
|
|
13
|
+
|
|
14
|
+
# Getting Started with Skills
|
|
15
|
+
|
|
16
|
+
## MANDATORY FIRST RESPONSE PROTOCOL
|
|
17
|
+
|
|
18
|
+
Before responding to ANY user message, you MUST complete this checklist:
|
|
19
|
+
|
|
20
|
+
1. ☐ List available skills in your mind
|
|
21
|
+
2. ☐ Ask yourself: "Does ANY skill match this request?"
|
|
22
|
+
3. ☐ If yes → Use the Skill tool to read and run the skill file
|
|
23
|
+
4. ☐ Announce which skill you're using
|
|
24
|
+
5. ☐ Follow the skill exactly
|
|
25
|
+
|
|
26
|
+
**Responding WITHOUT completing this checklist = automatic failure.**
|
|
27
|
+
|
|
28
|
+
## Critical Rules
|
|
29
|
+
|
|
30
|
+
1. **Follow mandatory workflows.** Brainstorming before coding. Check for relevant skills before ANY task.
|
|
31
|
+
|
|
32
|
+
2. Execute skills with the Skill tool
|
|
33
|
+
|
|
34
|
+
## Common Rationalizations That Mean You're About To Fail
|
|
35
|
+
|
|
36
|
+
If you catch yourself thinking ANY of these thoughts, STOP. You are rationalizing. Check for and use the skill.
|
|
37
|
+
|
|
38
|
+
- "This is just a simple question" → WRONG. Questions are tasks. Check for skills.
|
|
39
|
+
- "I can check git/files quickly" → WRONG. Files don't have conversation context. Check for skills.
|
|
40
|
+
- "Let me gather information first" → WRONG. Skills tell you HOW to gather information. Check for skills.
|
|
41
|
+
- "This doesn't need a formal skill" → WRONG. If a skill exists for it, use it.
|
|
42
|
+
- "I remember this skill" → WRONG. Skills evolve. Run the current version.
|
|
43
|
+
- "This doesn't count as a task" → WRONG. If you're taking action, it's a task. Check for skills.
|
|
44
|
+
- "The skill is overkill for this" → WRONG. Skills exist because simple things become complex. Use it.
|
|
45
|
+
- "I'll just do this one thing first" → WRONG. Check for skills BEFORE doing anything.
|
|
46
|
+
|
|
47
|
+
**Why:** Skills document proven techniques that save time and prevent mistakes. Not using available skills means repeating solved problems and making known errors.
|
|
48
|
+
|
|
49
|
+
If a skill for your task exists, you must use it or you will fail at your task.
|
|
50
|
+
|
|
51
|
+
## Skills with Checklists
|
|
52
|
+
|
|
53
|
+
If a skill has a checklist, YOU MUST create TodoWrite todos for EACH item.
|
|
54
|
+
|
|
55
|
+
**Don't:**
|
|
56
|
+
- Work through checklist mentally
|
|
57
|
+
- Skip creating todos "to save time"
|
|
58
|
+
- Batch multiple items into one todo
|
|
59
|
+
- Mark complete without doing them
|
|
60
|
+
|
|
61
|
+
**Why:** Checklists without TodoWrite tracking = steps get skipped. Every time. The overhead of TodoWrite is tiny compared to the cost of missing steps.
|
|
62
|
+
|
|
63
|
+
## Announcing Skill Usage
|
|
64
|
+
|
|
65
|
+
Before using a skill, announce that you are using it.
|
|
66
|
+
"I'm using [Skill Name] to [what you're doing]."
|
|
67
|
+
|
|
68
|
+
**Examples:**
|
|
69
|
+
- "I'm using the brainstorming skill to refine your idea into a design."
|
|
70
|
+
- "I'm using the test-driven-development skill to implement this feature."
|
|
71
|
+
|
|
72
|
+
**Why:** Transparency helps your human partner understand your process and catch errors early. It also confirms you actually read the skill.
|
|
73
|
+
|
|
74
|
+
# About these skills
|
|
75
|
+
|
|
76
|
+
**Many skills contain rigid rules (TDD, debugging, verification).** Follow them exactly. Don't adapt away the discipline.
|
|
77
|
+
|
|
78
|
+
**Some skills are flexible patterns (architecture, naming).** Adapt core principles to your context.
|
|
79
|
+
|
|
80
|
+
The skill itself tells you which type it is.
|
|
81
|
+
|
|
82
|
+
## Instructions ≠ Permission to Skip Workflows
|
|
83
|
+
|
|
84
|
+
Your human partner's specific instructions describe WHAT to do, not HOW.
|
|
85
|
+
|
|
86
|
+
"Add X", "Fix Y" = the goal, NOT permission to skip brainstorming, TDD, or RED-GREEN-REFACTOR.
|
|
87
|
+
|
|
88
|
+
**Red flags:** "Instruction was specific" • "Seems simple" • "Workflow is overkill"
|
|
89
|
+
|
|
90
|
+
**Why:** Specific instructions mean clear requirements, which is when workflows matter MOST. Skipping process on "simple" tasks is how simple tasks become complex problems.
|
|
91
|
+
|
|
92
|
+
## Summary
|
|
93
|
+
|
|
94
|
+
**Starting any task:**
|
|
95
|
+
1. If relevant skill exists → Use the skill
|
|
96
|
+
3. Announce you're using it
|
|
97
|
+
4. Follow what it says
|
|
98
|
+
|
|
99
|
+
**Skill has checklist?** TodoWrite for every item.
|
|
100
|
+
|
|
101
|
+
**Finding a relevant skill = mandatory to read and use it. Not optional.**
|