@neyugn/agent-kits 0.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.
- package/LICENSE +21 -0
- package/README.md +514 -0
- package/README.vi.md +410 -0
- package/README.zh.md +410 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +422 -0
- package/kits/coder/ARCHITECTURE.md +289 -0
- package/kits/coder/agents/ai-engineer.md +344 -0
- package/kits/coder/agents/backend-specialist.md +270 -0
- package/kits/coder/agents/cloud-architect.md +363 -0
- package/kits/coder/agents/code-reviewer.md +284 -0
- package/kits/coder/agents/data-engineer.md +401 -0
- package/kits/coder/agents/database-specialist.md +251 -0
- package/kits/coder/agents/debugger.md +209 -0
- package/kits/coder/agents/devops-engineer.md +281 -0
- package/kits/coder/agents/documentation-writer.md +296 -0
- package/kits/coder/agents/frontend-specialist.md +298 -0
- package/kits/coder/agents/i18n-specialist.md +348 -0
- package/kits/coder/agents/integration-specialist.md +314 -0
- package/kits/coder/agents/mobile-developer.md +271 -0
- package/kits/coder/agents/multi-tenant-architect.md +281 -0
- package/kits/coder/agents/orchestrator.md +263 -0
- package/kits/coder/agents/performance-analyst.md +327 -0
- package/kits/coder/agents/project-planner.md +277 -0
- package/kits/coder/agents/queue-specialist.md +282 -0
- package/kits/coder/agents/realtime-specialist.md +267 -0
- package/kits/coder/agents/security-auditor.md +253 -0
- package/kits/coder/agents/test-engineer.md +315 -0
- package/kits/coder/agents/ux-researcher.md +388 -0
- package/kits/coder/rules/.cursorrules +287 -0
- package/kits/coder/rules/CLAUDE.md +287 -0
- package/kits/coder/rules/CODEX.md +287 -0
- package/kits/coder/rules/GEMINI.md +287 -0
- package/kits/coder/scripts/checklist.py +318 -0
- package/kits/coder/scripts/kit_status.py +292 -0
- package/kits/coder/scripts/skills_manager.py +243 -0
- package/kits/coder/scripts/verify_all.py +391 -0
- package/kits/coder/skills/accessibility-patterns/SKILL.md +372 -0
- package/kits/coder/skills/accessibility-patterns/scripts/a11y_checker.py +211 -0
- package/kits/coder/skills/ai-rag-patterns/SKILL.md +444 -0
- package/kits/coder/skills/api-patterns/SKILL.md +316 -0
- package/kits/coder/skills/api-patterns/assets/.gitkeep +1 -0
- package/kits/coder/skills/api-patterns/references/deep-dive.md +21 -0
- package/kits/coder/skills/api-patterns/scripts/api_validator.py +253 -0
- package/kits/coder/skills/api-patterns/scripts/validate.py +56 -0
- package/kits/coder/skills/auth-patterns/SKILL.md +267 -0
- package/kits/coder/skills/aws-patterns/SKILL.md +576 -0
- package/kits/coder/skills/brainstorming/SKILL.md +370 -0
- package/kits/coder/skills/brainstorming/assets/.gitkeep +1 -0
- package/kits/coder/skills/brainstorming/references/deep-dive.md +21 -0
- package/kits/coder/skills/brainstorming/scripts/validate.py +56 -0
- package/kits/coder/skills/clean-code/SKILL.md +240 -0
- package/kits/coder/skills/clean-code/assets/.gitkeep +1 -0
- package/kits/coder/skills/clean-code/references/deep-dive.md +21 -0
- package/kits/coder/skills/clean-code/scripts/lint_runner.py +186 -0
- package/kits/coder/skills/clean-code/scripts/validate.py +56 -0
- package/kits/coder/skills/database-design/SKILL.md +255 -0
- package/kits/coder/skills/database-design/assets/.gitkeep +1 -0
- package/kits/coder/skills/database-design/references/deep-dive.md +21 -0
- package/kits/coder/skills/database-design/scripts/schema_validator.py +272 -0
- package/kits/coder/skills/database-design/scripts/validate.py +56 -0
- package/kits/coder/skills/docker-patterns/SKILL.md +240 -0
- package/kits/coder/skills/documentation-templates/SKILL.md +441 -0
- package/kits/coder/skills/e2e-testing/SKILL.md +457 -0
- package/kits/coder/skills/flutter-patterns/SKILL.md +330 -0
- package/kits/coder/skills/frontend-design/SKILL.md +127 -0
- package/kits/coder/skills/github-actions/SKILL.md +349 -0
- package/kits/coder/skills/gitlab-ci-patterns/SKILL.md +466 -0
- package/kits/coder/skills/graphql-patterns/SKILL.md +558 -0
- package/kits/coder/skills/i18n-localization/SKILL.md +345 -0
- package/kits/coder/skills/i18n-localization/scripts/i18n_checker.py +267 -0
- package/kits/coder/skills/kubernetes-patterns/SKILL.md +357 -0
- package/kits/coder/skills/mermaid-diagrams/SKILL.md +351 -0
- package/kits/coder/skills/mobile-design/SKILL.md +305 -0
- package/kits/coder/skills/monitoring-observability/SKILL.md +458 -0
- package/kits/coder/skills/multi-tenancy/SKILL.md +317 -0
- package/kits/coder/skills/multi-tenancy/assets/.gitkeep +1 -0
- package/kits/coder/skills/multi-tenancy/references/deep-dive.md +21 -0
- package/kits/coder/skills/multi-tenancy/scripts/validate.py +56 -0
- package/kits/coder/skills/nodejs-best-practices/SKILL.md +220 -0
- package/kits/coder/skills/performance-profiling/SKILL.md +333 -0
- package/kits/coder/skills/performance-profiling/assets/.gitkeep +1 -0
- package/kits/coder/skills/performance-profiling/references/deep-dive.md +21 -0
- package/kits/coder/skills/performance-profiling/scripts/validate.py +56 -0
- package/kits/coder/skills/plan-writing/SKILL.md +360 -0
- package/kits/coder/skills/plan-writing/assets/.gitkeep +1 -0
- package/kits/coder/skills/plan-writing/references/deep-dive.md +21 -0
- package/kits/coder/skills/plan-writing/scripts/validate.py +56 -0
- package/kits/coder/skills/postgres-patterns/SKILL.md +361 -0
- package/kits/coder/skills/prompt-engineering/SKILL.md +277 -0
- package/kits/coder/skills/queue-patterns/SKILL.md +359 -0
- package/kits/coder/skills/queue-patterns/assets/.gitkeep +1 -0
- package/kits/coder/skills/queue-patterns/references/deep-dive.md +21 -0
- package/kits/coder/skills/queue-patterns/scripts/validate.py +56 -0
- package/kits/coder/skills/react-native-patterns/SKILL.md +393 -0
- package/kits/coder/skills/react-patterns/SKILL.md +319 -0
- package/kits/coder/skills/realtime-patterns/SKILL.md +506 -0
- package/kits/coder/skills/realtime-patterns/assets/.gitkeep +1 -0
- package/kits/coder/skills/realtime-patterns/references/deep-dive.md +21 -0
- package/kits/coder/skills/realtime-patterns/scripts/validate.py +56 -0
- package/kits/coder/skills/redis-patterns/SKILL.md +484 -0
- package/kits/coder/skills/security-fundamentals/SKILL.md +363 -0
- package/kits/coder/skills/security-fundamentals/assets/.gitkeep +1 -0
- package/kits/coder/skills/security-fundamentals/references/deep-dive.md +21 -0
- package/kits/coder/skills/security-fundamentals/scripts/security_scan.py +326 -0
- package/kits/coder/skills/security-fundamentals/scripts/validate.py +56 -0
- package/kits/coder/skills/seo-patterns/SKILL.md +262 -0
- package/kits/coder/skills/seo-patterns/scripts/seo_checker.py +211 -0
- package/kits/coder/skills/systematic-debugging/SKILL.md +478 -0
- package/kits/coder/skills/systematic-debugging/assets/.gitkeep +1 -0
- package/kits/coder/skills/systematic-debugging/references/deep-dive.md +21 -0
- package/kits/coder/skills/systematic-debugging/scripts/validate.py +56 -0
- package/kits/coder/skills/tailwind-patterns/SKILL.md +395 -0
- package/kits/coder/skills/terraform-patterns/SKILL.md +470 -0
- package/kits/coder/skills/testing-patterns/SKILL.md +285 -0
- package/kits/coder/skills/testing-patterns/assets/.gitkeep +1 -0
- package/kits/coder/skills/testing-patterns/references/deep-dive.md +21 -0
- package/kits/coder/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/kits/coder/skills/testing-patterns/scripts/validate.py +56 -0
- package/kits/coder/skills/typescript-patterns/SKILL.md +417 -0
- package/kits/coder/skills/ui-ux-pro-max/SKILL.md +364 -0
- package/kits/coder/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/kits/coder/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/kits/coder/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/kits/coder/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/kits/coder/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/kits/coder/skills/ui-ux-pro-max/data/prompts.csv +24 -0
- package/kits/coder/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/kits/coder/skills/ui-ux-pro-max/data/styles.csv +59 -0
- package/kits/coder/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/kits/coder/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/kits/coder/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/kits/coder/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/kits/coder/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-314.pyc +0 -0
- package/kits/coder/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-314.pyc +0 -0
- package/kits/coder/skills/ui-ux-pro-max/scripts/core.py +257 -0
- package/kits/coder/skills/ui-ux-pro-max/scripts/design_system.py +488 -0
- package/kits/coder/skills/ui-ux-pro-max/scripts/search.py +76 -0
- package/kits/coder/workflows/.gitkeep +20 -0
- package/kits/coder/workflows/create.md +152 -0
- package/kits/coder/workflows/debug.md +223 -0
- package/kits/coder/workflows/deploy.md +283 -0
- package/kits/coder/workflows/orchestrate.md +243 -0
- package/kits/coder/workflows/plan.md +134 -0
- package/kits/coder/workflows/test.md +237 -0
- package/kits/coder/workflows/ui-ux-pro-max.md +109 -0
- package/package.json +49 -0
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: brainstorming
|
|
3
|
+
description: Socratic questioning protocol and user communication. Use for complex requests, new features, unclear requirements, or when deep understanding is needed before implementation. Includes progress reporting and error handling patterns.
|
|
4
|
+
allowed-tools: Read, Write, Edit
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Brainstorming - Socratic Discovery Protocol
|
|
8
|
+
|
|
9
|
+
> **Philosophy:** Understanding precedes implementation. Ask first, build second.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 🎯 Core Principle: Never Assume
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
❌ WRONG: User says "add login" → Start coding auth flow
|
|
17
|
+
✅ CORRECT: User says "add login" → Ask about auth provider, user types, session needs
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**The Socratic Approach:**
|
|
21
|
+
|
|
22
|
+
- Guide through questions, don't dictate solutions
|
|
23
|
+
- Surface hidden assumptions
|
|
24
|
+
- Challenge unclear requirements
|
|
25
|
+
- Explore edge cases before they become bugs
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 🚦 When to Apply Socratic Gate
|
|
30
|
+
|
|
31
|
+
### Decision Matrix
|
|
32
|
+
|
|
33
|
+
| Request Type | Clarity Level | Action |
|
|
34
|
+
| --------------- | ------------- | ------------------------------- |
|
|
35
|
+
| **New Feature** | Any | ASK 3+ strategic questions |
|
|
36
|
+
| **Code Edit** | Clear | Confirm understanding, proceed |
|
|
37
|
+
| **Code Edit** | Vague | Ask impact questions first |
|
|
38
|
+
| **Bug Fix** | Reproducible | Investigate, minimal questions |
|
|
39
|
+
| **Bug Fix** | Unclear | Ask for reproduction steps |
|
|
40
|
+
| **Refactor** | Any | Ask about scope and constraints |
|
|
41
|
+
|
|
42
|
+
### Question Triggers
|
|
43
|
+
|
|
44
|
+
**Always ask questions when:**
|
|
45
|
+
|
|
46
|
+
- User says "build", "create", "implement", "add feature"
|
|
47
|
+
- Multiple valid interpretations exist
|
|
48
|
+
- Request involves architecture decisions
|
|
49
|
+
- Request affects multiple components
|
|
50
|
+
- Trade-offs are not explicit
|
|
51
|
+
|
|
52
|
+
**Skip questions when:**
|
|
53
|
+
|
|
54
|
+
- User says "just fix this specific thing"
|
|
55
|
+
- Request is purely mechanical (rename, format)
|
|
56
|
+
- Context is already established in conversation
|
|
57
|
+
- User explicitly says "don't ask, just do it"
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## 🔑 Question Categories
|
|
62
|
+
|
|
63
|
+
### 1. Purpose & Goal Questions
|
|
64
|
+
|
|
65
|
+
**Uncover the "why":**
|
|
66
|
+
|
|
67
|
+
```markdown
|
|
68
|
+
- What problem does this solve for users?
|
|
69
|
+
- What's the expected outcome when this works?
|
|
70
|
+
- How will we know this feature is successful?
|
|
71
|
+
- Is this for a specific user segment or all users?
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 2. Scope & Boundary Questions
|
|
75
|
+
|
|
76
|
+
**Define the "what":**
|
|
77
|
+
|
|
78
|
+
```markdown
|
|
79
|
+
- What specifically should this include?
|
|
80
|
+
- What explicitly should this NOT include?
|
|
81
|
+
- Are there any time/budget constraints?
|
|
82
|
+
- Is this a complete solution or MVP first?
|
|
83
|
+
- What's the priority order if we can't do everything?
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 3. Context & Integration Questions
|
|
87
|
+
|
|
88
|
+
**Understand the "where":**
|
|
89
|
+
|
|
90
|
+
```markdown
|
|
91
|
+
- How does this fit with existing features?
|
|
92
|
+
- Are there similar patterns already in the codebase?
|
|
93
|
+
- What systems does this need to integrate with?
|
|
94
|
+
- Are there dependencies we should be aware of?
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### 4. Edge Case & Failure Questions
|
|
98
|
+
|
|
99
|
+
**Anticipate the "what if":**
|
|
100
|
+
|
|
101
|
+
```markdown
|
|
102
|
+
- What happens if [X condition] occurs?
|
|
103
|
+
- How should we handle errors in this flow?
|
|
104
|
+
- What's the expected behavior for edge cases?
|
|
105
|
+
- Should we handle [unlikely but possible scenario]?
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### 5. Trade-off Questions
|
|
109
|
+
|
|
110
|
+
**Clarify the "how much":**
|
|
111
|
+
|
|
112
|
+
```markdown
|
|
113
|
+
- Performance vs code simplicity—which matters more here?
|
|
114
|
+
- Should we build for scale now or optimize for speed to market?
|
|
115
|
+
- Complete solution now or iterative enhancement?
|
|
116
|
+
- Custom implementation or use existing library?
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## 📋 Question Templates by Scenario
|
|
122
|
+
|
|
123
|
+
### New Feature Request
|
|
124
|
+
|
|
125
|
+
```markdown
|
|
126
|
+
Great, I want to make sure I build exactly what you need.
|
|
127
|
+
|
|
128
|
+
**Understanding the goal:**
|
|
129
|
+
|
|
130
|
+
1. What user problem does this solve?
|
|
131
|
+
2. How will users discover/access this feature?
|
|
132
|
+
|
|
133
|
+
**Scope check:** 3. What's the minimum version that would be useful? 4. Are there any "nice-to-haves" vs "must-haves"?
|
|
134
|
+
|
|
135
|
+
**Technical clarification:** 5. Any performance requirements (response time, data volume)? 6. Any security considerations (auth, data sensitivity)?
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Bug Fix Request
|
|
139
|
+
|
|
140
|
+
```markdown
|
|
141
|
+
Before I investigate:
|
|
142
|
+
|
|
143
|
+
1. Can you describe the expected vs actual behavior?
|
|
144
|
+
2. Is this reproducible? What steps trigger it?
|
|
145
|
+
3. When did this start happening? (recent change?)
|
|
146
|
+
4. Does it affect all users or specific conditions?
|
|
147
|
+
5. What's the severity/urgency?
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Refactoring Request
|
|
151
|
+
|
|
152
|
+
```markdown
|
|
153
|
+
To refactor effectively:
|
|
154
|
+
|
|
155
|
+
1. What's the main goal? (Readability? Performance? Testability?)
|
|
156
|
+
2. What's the scope boundary? (This file? This module? Entire feature?)
|
|
157
|
+
3. Are there hidden consumers of this code we need to consider?
|
|
158
|
+
4. Do we have test coverage to validate the refactor?
|
|
159
|
+
5. Any patterns we should align with from other parts of the codebase?
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Architecture Decision
|
|
163
|
+
|
|
164
|
+
```markdown
|
|
165
|
+
This is an important decision. Let's explore:
|
|
166
|
+
|
|
167
|
+
**Current State:**
|
|
168
|
+
|
|
169
|
+
1. What's driving this architecture change?
|
|
170
|
+
2. What problems exist with the current approach?
|
|
171
|
+
|
|
172
|
+
**Future State:** 3. What are the key requirements for the new design? 4. What trade-offs are acceptable?
|
|
173
|
+
|
|
174
|
+
**Constraints:** 5. Any technology restrictions or preferences? 6. Timeline or resource constraints?
|
|
175
|
+
|
|
176
|
+
**Risks:** 7. What could go wrong with this change? 8. What's our rollback strategy?
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## 💬 Communication Patterns
|
|
182
|
+
|
|
183
|
+
### Progress Reporting
|
|
184
|
+
|
|
185
|
+
**For long tasks, report periodically:**
|
|
186
|
+
|
|
187
|
+
```markdown
|
|
188
|
+
🔄 **Progress Update:**
|
|
189
|
+
|
|
190
|
+
**Completed:**
|
|
191
|
+
|
|
192
|
+
- ✅ Created user authentication module
|
|
193
|
+
- ✅ Added database schema
|
|
194
|
+
|
|
195
|
+
**In Progress:**
|
|
196
|
+
|
|
197
|
+
- 🔄 Implementing password reset flow
|
|
198
|
+
|
|
199
|
+
**Remaining:**
|
|
200
|
+
|
|
201
|
+
- ⏳ Email notification integration
|
|
202
|
+
- ⏳ Testing and documentation
|
|
203
|
+
|
|
204
|
+
**Estimated completion:** ~2 more steps
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Clarification Requests
|
|
208
|
+
|
|
209
|
+
**When genuinely unclear:**
|
|
210
|
+
|
|
211
|
+
```markdown
|
|
212
|
+
🤔 **Quick clarification needed:**
|
|
213
|
+
|
|
214
|
+
I want to proceed correctly, but I'm unsure about [specific thing].
|
|
215
|
+
|
|
216
|
+
**Option A:** [Description] — Better for [use case]
|
|
217
|
+
**Option B:** [Description] — Better for [use case]
|
|
218
|
+
|
|
219
|
+
Which approach fits your needs?
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Error Handling Communication
|
|
223
|
+
|
|
224
|
+
**When something goes wrong:**
|
|
225
|
+
|
|
226
|
+
```markdown
|
|
227
|
+
⚠️ **Issue Encountered:**
|
|
228
|
+
|
|
229
|
+
**What happened:** [Brief description]
|
|
230
|
+
|
|
231
|
+
**Why it happened:** [Root cause if known]
|
|
232
|
+
|
|
233
|
+
**Options to proceed:**
|
|
234
|
+
|
|
235
|
+
1. [Option with trade-off]
|
|
236
|
+
2. [Different approach]
|
|
237
|
+
3. [Need more info on X]
|
|
238
|
+
|
|
239
|
+
What would you like to do?
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Confirmation Before Risky Actions
|
|
243
|
+
|
|
244
|
+
**Before destructive or irreversible actions:**
|
|
245
|
+
|
|
246
|
+
```markdown
|
|
247
|
+
🛡️ **Confirmation Required:**
|
|
248
|
+
|
|
249
|
+
I'm about to: [Describe action]
|
|
250
|
+
|
|
251
|
+
**This will:**
|
|
252
|
+
|
|
253
|
+
- [Effect 1]
|
|
254
|
+
- [Effect 2]
|
|
255
|
+
|
|
256
|
+
**This is irreversible / can be undone by [method]**
|
|
257
|
+
|
|
258
|
+
Proceed? (yes/no)
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## 🔄 Iterative Discovery Pattern
|
|
264
|
+
|
|
265
|
+
### When user provides spec-heavy answers
|
|
266
|
+
|
|
267
|
+
```
|
|
268
|
+
User provides detailed spec →
|
|
269
|
+
↓
|
|
270
|
+
Still ask 2-3 "Edge Case" questions:
|
|
271
|
+
- "What if [unlikely scenario]?"
|
|
272
|
+
- "Should we handle [error condition]?"
|
|
273
|
+
- "Is there a fallback for [dependency failure]?"
|
|
274
|
+
↓
|
|
275
|
+
Surface hidden assumptions before implementation
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### Converging on Solution
|
|
279
|
+
|
|
280
|
+
```
|
|
281
|
+
1. Ask broad questions (Purpose, Scope)
|
|
282
|
+
2. Ask specific questions (Technical details)
|
|
283
|
+
3. Summarize understanding
|
|
284
|
+
4. Propose approach
|
|
285
|
+
5. Get confirmation
|
|
286
|
+
6. Begin implementation
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## 🚨 Anti-Patterns
|
|
292
|
+
|
|
293
|
+
| ❌ Don't | ✅ Do |
|
|
294
|
+
| ------------------------------- | ---------------------------------------------------- |
|
|
295
|
+
| Ask 10+ questions at once | Group into 3-5 most important |
|
|
296
|
+
| Ask obvious questions | Ask where there's genuine ambiguity |
|
|
297
|
+
| Re-ask answered questions | Read conversation context |
|
|
298
|
+
| Block on every detail | Make reasonable default assumptions for minor things |
|
|
299
|
+
| Question simple requests | Apply judgment on when questions add value |
|
|
300
|
+
| Ask then ignore answers | Incorporate answers into your approach |
|
|
301
|
+
| Pretend to understand | Admit confusion and ask for clarity |
|
|
302
|
+
| Assume user knows best approach | Offer expert guidance with questions |
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## 📋 Socratic Gate Checklist
|
|
307
|
+
|
|
308
|
+
Before major implementation:
|
|
309
|
+
|
|
310
|
+
```markdown
|
|
311
|
+
## Pre-Implementation Review
|
|
312
|
+
|
|
313
|
+
### Understanding (Must be clear)
|
|
314
|
+
|
|
315
|
+
- [ ] I understand the user's goal
|
|
316
|
+
- [ ] I understand the scope boundaries
|
|
317
|
+
- [ ] I have asked about edge cases
|
|
318
|
+
|
|
319
|
+
### Assumptions (Must be validated)
|
|
320
|
+
|
|
321
|
+
- [ ] Technical assumptions stated and confirmed
|
|
322
|
+
- [ ] Default behaviors agreed upon
|
|
323
|
+
- [ ] Error handling approach confirmed
|
|
324
|
+
|
|
325
|
+
### Risks (Must be acknowledged)
|
|
326
|
+
|
|
327
|
+
- [ ] Breaking changes identified
|
|
328
|
+
- [ ] Dependencies mapped
|
|
329
|
+
- [ ] Rollback strategy exists
|
|
330
|
+
|
|
331
|
+
### Ready to proceed?
|
|
332
|
+
|
|
333
|
+
- [ ] User has confirmed approach
|
|
334
|
+
- [ ] No critical questions remaining
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
## 📊 Question Quality Metrics
|
|
340
|
+
|
|
341
|
+
**Good questions are:**
|
|
342
|
+
|
|
343
|
+
- **Specific** — Not vague or overly broad
|
|
344
|
+
- **Actionable** — Answer directly informs implementation
|
|
345
|
+
- **Prioritized** — Most important first
|
|
346
|
+
- **Non-redundant** — Not already known from context
|
|
347
|
+
|
|
348
|
+
**Question effectiveness:**
|
|
349
|
+
|
|
350
|
+
| Question Type | When Valuable |
|
|
351
|
+
| ------------- | ----------------------------------- |
|
|
352
|
+
| Clarifying | When terms are ambiguous |
|
|
353
|
+
| Probing | When surface answer is insufficient |
|
|
354
|
+
| Hypothetical | When exploring edge cases |
|
|
355
|
+
| Comparative | When choosing between options |
|
|
356
|
+
| Reflective | When validating understanding |
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## 🔗 Related Skills
|
|
361
|
+
|
|
362
|
+
| Need | Skill |
|
|
363
|
+
| ---------------------------- | ---------------------- |
|
|
364
|
+
| Writing implementation plans | `plan-writing` |
|
|
365
|
+
| Debugging with questions | `systematic-debugging` |
|
|
366
|
+
| Clean code standards | `clean-code` |
|
|
367
|
+
|
|
368
|
+
---
|
|
369
|
+
|
|
370
|
+
> **Remember:** The cost of asking one more question is minutes. The cost of building the wrong thing is days or weeks.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Assets directory - add templates, images, etc.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Reference Documentation for Brainstorming
|
|
2
|
+
|
|
3
|
+
[TODO: Add detailed reference content here]
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
[Detailed explanation of concepts]
|
|
8
|
+
|
|
9
|
+
## Deep Dive Topics
|
|
10
|
+
|
|
11
|
+
### Topic 1
|
|
12
|
+
|
|
13
|
+
[Content]
|
|
14
|
+
|
|
15
|
+
### Topic 2
|
|
16
|
+
|
|
17
|
+
[Content]
|
|
18
|
+
|
|
19
|
+
## Examples
|
|
20
|
+
|
|
21
|
+
[Real-world examples]
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Example validator for brainstorming
|
|
4
|
+
|
|
5
|
+
Usage:
|
|
6
|
+
python validate.py <project_path>
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import sys
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def validate(project_path: str) -> dict:
|
|
14
|
+
"""Main validation logic"""
|
|
15
|
+
results = {
|
|
16
|
+
'errors': [],
|
|
17
|
+
'warnings': [],
|
|
18
|
+
'passed': []
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
# TODO: Add validation logic
|
|
22
|
+
results['passed'].append('Placeholder validation passed')
|
|
23
|
+
|
|
24
|
+
return results
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def print_results(results: dict):
|
|
28
|
+
"""Pretty print results"""
|
|
29
|
+
print("\n🔍 Validation Results\n")
|
|
30
|
+
|
|
31
|
+
if results['errors']:
|
|
32
|
+
print(f"❌ Errors ({len(results['errors'])})")
|
|
33
|
+
for error in results['errors']:
|
|
34
|
+
print(f" - {error}")
|
|
35
|
+
|
|
36
|
+
if results['warnings']:
|
|
37
|
+
print(f"\n⚠️ Warnings ({len(results['warnings'])})")
|
|
38
|
+
for warning in results['warnings']:
|
|
39
|
+
print(f" - {warning}")
|
|
40
|
+
|
|
41
|
+
if results['passed']:
|
|
42
|
+
print(f"\n✅ Passed ({len(results['passed'])})")
|
|
43
|
+
for passed in results['passed']:
|
|
44
|
+
print(f" - {passed}")
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
if __name__ == "__main__":
|
|
48
|
+
if len(sys.argv) < 2:
|
|
49
|
+
print("Usage: python validate.py <project_path>")
|
|
50
|
+
sys.exit(1)
|
|
51
|
+
|
|
52
|
+
project_path = sys.argv[1]
|
|
53
|
+
results = validate(project_path)
|
|
54
|
+
print_results(results)
|
|
55
|
+
|
|
56
|
+
sys.exit(1 if results['errors'] else 0)
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: clean-code
|
|
3
|
+
description: Pragmatic coding standards - concise, direct, no over-engineering. Use when writing any code, reviewing code, or establishing project conventions. Covers naming, function design, code structure, and AI coding style.
|
|
4
|
+
allowed-tools: Read, Write, Edit
|
|
5
|
+
version: 2.0
|
|
6
|
+
priority: CRITICAL
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Clean Code - Pragmatic AI Coding Standards
|
|
10
|
+
|
|
11
|
+
> **Philosophy:** Be **concise, direct, and solution-focused**. The user wants working code, not programming lessons.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Core Principles
|
|
16
|
+
|
|
17
|
+
| Principle | Rule |
|
|
18
|
+
| ------------- | ---------------------------------------------------------- |
|
|
19
|
+
| **SRP** | Single Responsibility - each function/class does ONE thing |
|
|
20
|
+
| **DRY** | Don't Repeat Yourself - extract duplicates, reuse |
|
|
21
|
+
| **KISS** | Keep It Simple - simplest solution that works |
|
|
22
|
+
| **YAGNI** | You Aren't Gonna Need It - don't build unused features |
|
|
23
|
+
| **Boy Scout** | Leave code cleaner than you found it |
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Naming Rules
|
|
28
|
+
|
|
29
|
+
| Element | Convention |
|
|
30
|
+
| ------------- | ----------------------------------------------------- |
|
|
31
|
+
| **Variables** | Reveal intent: `userCount` not `n` |
|
|
32
|
+
| **Functions** | Verb + noun: `getUserById()` not `user()` |
|
|
33
|
+
| **Booleans** | Question form: `isActive`, `hasPermission`, `canEdit` |
|
|
34
|
+
| **Constants** | SCREAMING_SNAKE: `MAX_RETRY_COUNT` |
|
|
35
|
+
| **Classes** | PascalCase nouns: `UserService`, `PaymentGateway` |
|
|
36
|
+
| **Files** | kebab-case or camelCase based on project convention |
|
|
37
|
+
|
|
38
|
+
> **Rule:** If you need a comment to explain a name, rename it.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Function Rules
|
|
43
|
+
|
|
44
|
+
| Rule | Description |
|
|
45
|
+
| ---------------------- | ------------------------------------- |
|
|
46
|
+
| **Small** | Max 20 lines, ideally 5-10 |
|
|
47
|
+
| **One Thing** | Does one thing, does it well |
|
|
48
|
+
| **One Level** | One level of abstraction per function |
|
|
49
|
+
| **Few Args** | Max 3 arguments, prefer 0-2 |
|
|
50
|
+
| **No Side Effects** | Don't mutate inputs unexpectedly |
|
|
51
|
+
| **Pure When Possible** | Same input → same output |
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Code Structure
|
|
56
|
+
|
|
57
|
+
| Pattern | Apply |
|
|
58
|
+
| ------------------ | ----------------------------------------- |
|
|
59
|
+
| **Guard Clauses** | Early returns for edge cases |
|
|
60
|
+
| **Flat > Nested** | Avoid deep nesting (max 2 levels) |
|
|
61
|
+
| **Composition** | Small functions composed together |
|
|
62
|
+
| **Colocation** | Keep related code close |
|
|
63
|
+
| **Vertical Slice** | Feature files together, not by layer type |
|
|
64
|
+
|
|
65
|
+
### Guard Clause Example
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
// ❌ Nested
|
|
69
|
+
function processUser(user) {
|
|
70
|
+
if (user) {
|
|
71
|
+
if (user.isActive) {
|
|
72
|
+
if (user.hasPermission) {
|
|
73
|
+
// actual logic 3 levels deep
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// ✅ Guard Clauses
|
|
80
|
+
function processUser(user) {
|
|
81
|
+
if (!user) return null;
|
|
82
|
+
if (!user.isActive) return null;
|
|
83
|
+
if (!user.hasPermission) return null;
|
|
84
|
+
|
|
85
|
+
// actual logic at top level
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## AI Coding Style
|
|
92
|
+
|
|
93
|
+
| Situation | Action |
|
|
94
|
+
| ------------------------- | ------------------------------------------ |
|
|
95
|
+
| User asks for feature | Write it directly |
|
|
96
|
+
| User reports bug | Fix it, don't explain first |
|
|
97
|
+
| No clear requirement | Ask, don't assume |
|
|
98
|
+
| Multiple valid approaches | Pick one, mention alternatives if critical |
|
|
99
|
+
|
|
100
|
+
### Output Quality Rules
|
|
101
|
+
|
|
102
|
+
| Rule | Description |
|
|
103
|
+
| -------------------- | ------------------------------------------- |
|
|
104
|
+
| **No Preamble** | Skip "Here's the code..." - just write code |
|
|
105
|
+
| **No Postamble** | Skip "This code does..." - let code speak |
|
|
106
|
+
| **Minimal Comments** | Only for complex/non-obvious business logic |
|
|
107
|
+
| **Complete Code** | No `// ... rest of code` placeholders |
|
|
108
|
+
| **Test Immediately** | Run/verify code before claiming complete |
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Error Handling Patterns
|
|
113
|
+
|
|
114
|
+
| Pattern | When to Use |
|
|
115
|
+
| ------------------ | --------------------------------------- |
|
|
116
|
+
| **Return Early** | Validation failures, missing data |
|
|
117
|
+
| **Throw Specific** | Domain errors, use custom error classes |
|
|
118
|
+
| **Try/Catch** | External calls, I/O operations |
|
|
119
|
+
| **Result Type** | Complex operations, functional style |
|
|
120
|
+
|
|
121
|
+
### Error Handling Example
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
// ❌ Generic
|
|
125
|
+
throw new Error("Something went wrong");
|
|
126
|
+
|
|
127
|
+
// ✅ Specific
|
|
128
|
+
throw new UserNotFoundError(userId);
|
|
129
|
+
throw new InsufficientFundsError(amount, balance);
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Anti-Patterns (DON'T)
|
|
135
|
+
|
|
136
|
+
| ❌ Pattern | ✅ Fix |
|
|
137
|
+
| --------------------------- | ----------------------- |
|
|
138
|
+
| Comment every line | Delete obvious comments |
|
|
139
|
+
| Helper for one-liner | Inline the code |
|
|
140
|
+
| Factory for 2 objects | Direct instantiation |
|
|
141
|
+
| utils.ts with 1 function | Put code where used |
|
|
142
|
+
| "First we import..." | Just write code |
|
|
143
|
+
| Deep nesting (3+ levels) | Guard clauses |
|
|
144
|
+
| Magic numbers | Named constants |
|
|
145
|
+
| God functions (50+ lines) | Split by responsibility |
|
|
146
|
+
| Premature optimization | Make it work first |
|
|
147
|
+
| Helper folder with 20 files | Colocate with features |
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## 🔴 Before Editing ANY File (THINK FIRST!)
|
|
152
|
+
|
|
153
|
+
**Before changing a file, ask yourself:**
|
|
154
|
+
|
|
155
|
+
| Question | Why |
|
|
156
|
+
| ------------------------------- | ------------------------ |
|
|
157
|
+
| **What imports this file?** | They might break |
|
|
158
|
+
| **What does this file import?** | Interface changes |
|
|
159
|
+
| **What tests cover this?** | Tests might fail |
|
|
160
|
+
| **Is this a shared component?** | Multiple places affected |
|
|
161
|
+
|
|
162
|
+
**Quick Check:**
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
File to edit: UserService.ts
|
|
166
|
+
└── Who imports this? → UserController.ts, AuthController.ts
|
|
167
|
+
└── Do they need changes too? → Check function signatures
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
> 🔴 **Rule:** Edit the file + all dependent files in the SAME task.
|
|
171
|
+
> 🔴 **Never leave broken imports or missing updates.**
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Summary
|
|
176
|
+
|
|
177
|
+
| Do | Don't |
|
|
178
|
+
| ---------------------- | -------------------------- |
|
|
179
|
+
| Write code directly | Write tutorials |
|
|
180
|
+
| Let code self-document | Add obvious comments |
|
|
181
|
+
| Fix bugs immediately | Explain the fix first |
|
|
182
|
+
| Inline small things | Create unnecessary files |
|
|
183
|
+
| Name things clearly | Use abbreviations |
|
|
184
|
+
| Keep functions small | Write 100+ line functions |
|
|
185
|
+
| Verify code works | Claim done without testing |
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## 🔴 Self-Check Before Completing (MANDATORY)
|
|
190
|
+
|
|
191
|
+
**Before saying "task complete", verify:**
|
|
192
|
+
|
|
193
|
+
| Check | Question |
|
|
194
|
+
| ------------------------- | --------------------------------- |
|
|
195
|
+
| ✅ **Goal met?** | Did I do exactly what user asked? |
|
|
196
|
+
| ✅ **Files edited?** | Did I modify all necessary files? |
|
|
197
|
+
| ✅ **Code works?** | Did I test/verify the change? |
|
|
198
|
+
| ✅ **No errors?** | Lint and TypeScript pass? |
|
|
199
|
+
| ✅ **Nothing forgotten?** | Any edge cases missed? |
|
|
200
|
+
|
|
201
|
+
> 🔴 **Rule:** If ANY check fails, fix it before completing.
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Decision Trees
|
|
206
|
+
|
|
207
|
+
### When to Abstract?
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
Is code duplicated 3+ times?
|
|
211
|
+
├── Yes → Extract function/component
|
|
212
|
+
└── No → Is code complex AND reusable?
|
|
213
|
+
├── Yes → Extract with clear interface
|
|
214
|
+
└── No → Keep inline
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### When to Comment?
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
Is logic non-obvious?
|
|
221
|
+
├── No → Don't comment
|
|
222
|
+
└── Yes → Is it business logic or algorithm?
|
|
223
|
+
├── Business logic → Comment the WHY
|
|
224
|
+
└── Algorithm → Link to reference + brief WHY
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## Related Skills
|
|
230
|
+
|
|
231
|
+
| Need | Skill |
|
|
232
|
+
| -------------------- | ---------------------- |
|
|
233
|
+
| API design patterns | `api-patterns` |
|
|
234
|
+
| Testing methodology | `testing-patterns` |
|
|
235
|
+
| Systematic debugging | `systematic-debugging` |
|
|
236
|
+
| Database design | `database-design` |
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
> **Remember:** The user wants working code, not a programming lesson. Be concise, be direct, be effective.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Assets directory - add templates, images, etc.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Reference Documentation for Clean Code
|
|
2
|
+
|
|
3
|
+
[TODO: Add detailed reference content here]
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
[Detailed explanation of concepts]
|
|
8
|
+
|
|
9
|
+
## Deep Dive Topics
|
|
10
|
+
|
|
11
|
+
### Topic 1
|
|
12
|
+
|
|
13
|
+
[Content]
|
|
14
|
+
|
|
15
|
+
### Topic 2
|
|
16
|
+
|
|
17
|
+
[Content]
|
|
18
|
+
|
|
19
|
+
## Examples
|
|
20
|
+
|
|
21
|
+
[Real-world examples]
|