dev-booster 1.16.12 → 1.17.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.
Files changed (94) hide show
  1. package/README.md +23 -4
  2. package/package.json +1 -1
  3. package/template/.devbooster/MANIFEST.md +8 -2
  4. package/template/.devbooster/boosters/audit.md +1 -1
  5. package/template/.devbooster/boosters/auto-triage.md +447 -0
  6. package/template/.devbooster/boosters/backend.md +4 -0
  7. package/template/.devbooster/boosters/code-audit.md +1 -1
  8. package/template/.devbooster/boosters/create.md +1 -1
  9. package/template/.devbooster/boosters/deploy.md +24 -1
  10. package/template/.devbooster/boosters/discovery.md +11 -1
  11. package/template/.devbooster/boosters/enhance.md +126 -0
  12. package/template/.devbooster/boosters/global-documentation.md +3 -0
  13. package/template/.devbooster/boosters/i18n.md +3 -0
  14. package/template/.devbooster/boosters/internal-documentation.md +22 -4
  15. package/template/.devbooster/boosters/investigation.md +1 -1
  16. package/template/.devbooster/boosters/mobile.md +3 -0
  17. package/template/.devbooster/boosters/performance.md +4 -0
  18. package/template/.devbooster/boosters/planning.md +3 -3
  19. package/template/.devbooster/boosters/refactor.md +3 -0
  20. package/template/.devbooster/boosters/review.md +1 -0
  21. package/template/.devbooster/boosters/security.md +1 -0
  22. package/template/.devbooster/boosters/seo.md +3 -0
  23. package/template/.devbooster/boosters/smart-task.md +279 -0
  24. package/template/.devbooster/boosters/stack-refresh.md +1 -1
  25. package/template/.devbooster/boosters/testing.md +3 -1
  26. package/template/.devbooster/boosters/ui-ux-pro-max.md +146 -0
  27. package/template/.devbooster/hub/personas/skill_doc.md +4 -4
  28. package/template/.devbooster/hub/scripts/auto_preview.py +2 -2
  29. package/template/.devbooster/hub/scripts/checklist.py +3 -3
  30. package/template/.devbooster/hub/scripts/session_manager.py +1 -1
  31. package/template/.devbooster/hub/scripts/verify_all.py +18 -20
  32. package/template/.devbooster/hub/skills/doc.md +4 -4
  33. package/template/.devbooster/rules/GUIDE.md +23 -0
  34. package/template/.devbooster/rules/TRIGGERS.md +3 -0
  35. package/template/.devbooster/hub/personas/agent_game-developer.md +0 -162
  36. package/template/.devbooster/hub/personas/backend-specialist.md +0 -263
  37. package/template/.devbooster/hub/personas/brainstorm.md +0 -113
  38. package/template/.devbooster/hub/personas/code-archaeologist.md +0 -106
  39. package/template/.devbooster/hub/personas/create.md +0 -59
  40. package/template/.devbooster/hub/personas/database-architect.md +0 -226
  41. package/template/.devbooster/hub/personas/debug.md +0 -103
  42. package/template/.devbooster/hub/personas/debugger.md +0 -225
  43. package/template/.devbooster/hub/personas/deploy.md +0 -176
  44. package/template/.devbooster/hub/personas/devops-engineer.md +0 -242
  45. package/template/.devbooster/hub/personas/documentation-writer.md +0 -104
  46. package/template/.devbooster/hub/personas/enhance.md +0 -63
  47. package/template/.devbooster/hub/personas/explorer-agent.md +0 -73
  48. package/template/.devbooster/hub/personas/frontend-specialist.md +0 -593
  49. package/template/.devbooster/hub/personas/game-developer.md +0 -162
  50. package/template/.devbooster/hub/personas/mobile-developer.md +0 -377
  51. package/template/.devbooster/hub/personas/orchestrate.md +0 -237
  52. package/template/.devbooster/hub/personas/orchestrator.md +0 -416
  53. package/template/.devbooster/hub/personas/penetration-tester.md +0 -188
  54. package/template/.devbooster/hub/personas/performance-optimizer.md +0 -187
  55. package/template/.devbooster/hub/personas/plan.md +0 -89
  56. package/template/.devbooster/hub/personas/product-manager.md +0 -112
  57. package/template/.devbooster/hub/personas/product-owner.md +0 -95
  58. package/template/.devbooster/hub/personas/project-planner.md +0 -406
  59. package/template/.devbooster/hub/personas/qa-automation-engineer.md +0 -103
  60. package/template/.devbooster/hub/personas/security-auditor.md +0 -170
  61. package/template/.devbooster/hub/personas/seo-specialist.md +0 -111
  62. package/template/.devbooster/hub/personas/skill_behavioral-modes.md +0 -242
  63. package/template/.devbooster/hub/personas/skill_game-development.md +0 -167
  64. package/template/.devbooster/hub/personas/skill_intelligent-routing.md +0 -335
  65. package/template/.devbooster/hub/personas/skill_mcp-builder.md +0 -176
  66. package/template/.devbooster/hub/personas/skill_parallel-agents.md +0 -175
  67. package/template/.devbooster/hub/personas/test-engineer.md +0 -158
  68. package/template/.devbooster/hub/personas/test.md +0 -144
  69. package/template/.devbooster/hub/personas/ui-ux-pro-max.md +0 -296
  70. package/template/.devbooster/hub/scripts/convert_rules.py +0 -222
  71. package/template/.devbooster/hub/skills/behavioral-modes/SKILL.md +0 -242
  72. package/template/.devbooster/hub/skills/game-development/2d-games/SKILL.md +0 -119
  73. package/template/.devbooster/hub/skills/game-development/3d-games/SKILL.md +0 -135
  74. package/template/.devbooster/hub/skills/game-development/SKILL.md +0 -167
  75. package/template/.devbooster/hub/skills/game-development/game-art/SKILL.md +0 -185
  76. package/template/.devbooster/hub/skills/game-development/game-audio/SKILL.md +0 -190
  77. package/template/.devbooster/hub/skills/game-development/game-design/SKILL.md +0 -129
  78. package/template/.devbooster/hub/skills/game-development/mobile-games/SKILL.md +0 -108
  79. package/template/.devbooster/hub/skills/game-development/multiplayer/SKILL.md +0 -132
  80. package/template/.devbooster/hub/skills/game-development/pc-games/SKILL.md +0 -144
  81. package/template/.devbooster/hub/skills/game-development/vr-ar/SKILL.md +0 -123
  82. package/template/.devbooster/hub/skills/game-development/web-games/SKILL.md +0 -150
  83. package/template/.devbooster/hub/skills/intelligent-routing/SKILL.md +0 -335
  84. package/template/.devbooster/hub/skills/mcp-builder/SKILL.md +0 -176
  85. package/template/.devbooster/hub/skills/parallel-agents/SKILL.md +0 -175
  86. package/template/.devbooster/hub/workflows/brainstorm.md +0 -113
  87. package/template/.devbooster/hub/workflows/create.md +0 -59
  88. package/template/.devbooster/hub/workflows/debug.md +0 -103
  89. package/template/.devbooster/hub/workflows/deploy.md +0 -176
  90. package/template/.devbooster/hub/workflows/enhance.md +0 -63
  91. package/template/.devbooster/hub/workflows/orchestrate.md +0 -237
  92. package/template/.devbooster/hub/workflows/plan.md +0 -89
  93. package/template/.devbooster/hub/workflows/test.md +0 -144
  94. package/template/.devbooster/hub/workflows/ui-ux-pro-max.md +0 -296
@@ -1,222 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Conversion Script: React Best Practices → .devbooster Format
4
- Merges 59 individual rules into 8 grouped section files
5
- """
6
-
7
- import os
8
- import re
9
- from pathlib import Path
10
- from typing import Dict, List, Tuple
11
-
12
- # Section metadata from _sections.md
13
- SECTIONS = {
14
- 'async': {
15
- 'number': 1,
16
- 'title': 'Eliminating Waterfalls',
17
- 'impact': 'CRITICAL',
18
- 'description': 'Waterfalls are the #1 performance killer. Each sequential await adds full network latency. Eliminating them yields the largest gains.'
19
- },
20
- 'bundle': {
21
- 'number': 2,
22
- 'title': 'Bundle Size Optimization',
23
- 'impact': 'CRITICAL',
24
- 'description': 'Reducing initial bundle size improves Time to Interactive and Largest Contentful Paint.'
25
- },
26
- 'server': {
27
- 'number': 3,
28
- 'title': 'Server-Side Performance',
29
- 'impact': 'HIGH',
30
- 'description': 'Optimizing server-side rendering and data fetching eliminates server-side waterfalls and reduces response times.'
31
- },
32
- 'client': {
33
- 'number': 4,
34
- 'title': 'Client-Side Data Fetching',
35
- 'impact': 'MEDIUM-HIGH',
36
- 'description': 'Automatic deduplication and efficient data fetching patterns reduce redundant network requests.'
37
- },
38
- 'rerender': {
39
- 'number': 5,
40
- 'title': 'Re-render Optimization',
41
- 'impact': 'MEDIUM',
42
- 'description': 'Reducing unnecessary re-renders minimizes wasted computation and improves UI responsiveness.'
43
- },
44
- 'rendering': {
45
- 'number': 6,
46
- 'title': 'Rendering Performance',
47
- 'impact': 'MEDIUM',
48
- 'description': 'Optimizing the rendering process reduces the work the browser needs to do.'
49
- },
50
- 'js': {
51
- 'number': 7,
52
- 'title': 'JavaScript Performance',
53
- 'impact': 'LOW-MEDIUM',
54
- 'description': 'Micro-optimizations for hot paths can add up to meaningful improvements.'
55
- },
56
- 'advanced': {
57
- 'number': 8,
58
- 'title': 'Advanced Patterns',
59
- 'impact': 'VARIABLE',
60
- 'description': 'Advanced patterns for specific cases that require careful implementation.'
61
- }
62
- }
63
-
64
-
65
- def parse_frontmatter(content: str) -> Tuple[Dict, str]:
66
- """Parse markdown frontmatter and body"""
67
- if not content.startswith('---'):
68
- return {}, content
69
-
70
- parts = content.split('---', 2)
71
- if len(parts) < 3:
72
- return {}, content
73
-
74
- # Parse YAML frontmatter manually (simple key: value)
75
- frontmatter = {}
76
- for line in parts[1].strip().split('\n'):
77
- if ':' in line:
78
- key, value = line.split(':', 1)
79
- frontmatter[key.strip()] = value.strip()
80
-
81
- body = parts[2].strip()
82
- return frontmatter, body
83
-
84
-
85
- def parse_rule_file(filepath: Path) -> Dict:
86
- """Parse a single rule file"""
87
- with open(filepath, 'r', encoding='utf-8') as f:
88
- content = f.read()
89
-
90
- frontmatter, body = parse_frontmatter(content)
91
-
92
- # Extract prefix from filename
93
- filename = filepath.stem
94
- prefix = filename.split('-')[0]
95
-
96
- return {
97
- 'filename': filepath.name,
98
- 'prefix': prefix,
99
- 'title': frontmatter.get('title', filename),
100
- 'impact': frontmatter.get('impact', ''),
101
- 'impactDescription': frontmatter.get('impactDescription', ''),
102
- 'tags': frontmatter.get('tags', ''),
103
- 'body': body,
104
- 'frontmatter': frontmatter
105
- }
106
-
107
-
108
- def group_rules_by_section(rules_dir: Path) -> Dict[str, List[Dict]]:
109
- """Group all rules by their section prefix"""
110
- grouped = {prefix: [] for prefix in SECTIONS.keys()}
111
-
112
- for rule_file in sorted(rules_dir.glob('*.md')):
113
- # Skip special files
114
- if rule_file.name.startswith('_'):
115
- continue
116
-
117
- rule = parse_rule_file(rule_file)
118
- prefix = rule['prefix']
119
-
120
- if prefix in grouped:
121
- grouped[prefix].append(rule)
122
- else:
123
- print(f"[WARNING] Unknown prefix '{prefix}' in file: {rule_file.name}")
124
-
125
- return grouped
126
-
127
-
128
- def generate_section_file(section_prefix: str, rules: List[Dict], output_dir: Path):
129
- """Generate a merged section file"""
130
- if not rules:
131
- print(f"[WARNING] No rules found for section: {section_prefix}")
132
- return
133
-
134
- section_meta = SECTIONS[section_prefix]
135
- section_num = section_meta['number']
136
- section_title = section_meta['title']
137
- impact = section_meta['impact']
138
- description = section_meta['description']
139
-
140
- # Sort rules by title
141
- rules.sort(key=lambda r: r['title'])
142
-
143
- # Build content
144
- content = f"""# {section_num}. {section_title}
145
-
146
- > **Impact:** {impact}
147
- > **Focus:** {description}
148
-
149
- ---
150
-
151
- ## Overview
152
-
153
- This section contains **{len(rules)} rules** focused on {section_title.lower()}.
154
-
155
- """
156
-
157
- # Add each rule
158
- for i, rule in enumerate(rules, 1):
159
- rule_id = f"{section_num}.{i}"
160
- title = rule['title']
161
- rule_impact = rule['impact']
162
- tags = rule['tags']
163
- body = rule['body']
164
-
165
- content += f"""---
166
-
167
- ## Rule {rule_id}: {title}
168
-
169
- """
170
-
171
- if rule_impact:
172
- content += f"**Impact:** {rule_impact} \n"
173
-
174
- if tags:
175
- content += f"**Tags:** {tags} \n"
176
-
177
- content += f"\n{body}\n\n"
178
-
179
- # Write file
180
- output_file = output_dir / f"{section_num}-{section_prefix}-{section_title.lower().replace(' ', '-')}.md"
181
- output_file.write_text(content, encoding='utf-8')
182
- print(f"[OK] Generated: {output_file.name} ({len(rules)} rules)")
183
-
184
-
185
- def main():
186
- """Main conversion function"""
187
- # Paths
188
- base_dir = Path(__file__).parent.parent.parent.parent.parent
189
- rules_dir = base_dir / "others/agent-skills/skills/react-best-practices/rules"
190
- output_dir = base_dir / ".zed/prompts/skill_react-best-practices"
191
-
192
- print(f"[*] Reading rules from: {rules_dir}")
193
- print(f"[*] Output to: {output_dir}")
194
- print()
195
-
196
- # Check if rules directory exists
197
- if not rules_dir.exists():
198
- print(f"[ERROR] Rules directory not found: {rules_dir}")
199
- return
200
-
201
- # Group rules
202
- print("[*] Grouping rules by section...")
203
- grouped_rules = group_rules_by_section(rules_dir)
204
-
205
- # Stats
206
- total_rules = sum(len(rules) for rules in grouped_rules.values())
207
- print(f"[*] Found {total_rules} total rules")
208
- print()
209
-
210
- # Generate section files
211
- print("[*] Generating section files...")
212
- for section_prefix in SECTIONS.keys():
213
- rules = grouped_rules[section_prefix]
214
- generate_section_file(section_prefix, rules, output_dir)
215
-
216
- print()
217
- print("[SUCCESS] Conversion complete!")
218
- print(f"[*] Generated 8 section files from {total_rules} rules")
219
-
220
-
221
- if __name__ == '__main__':
222
- main()
@@ -1,242 +0,0 @@
1
- ---
2
- name: behavioral-modes
3
- description: AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate). Use to adapt behavior based on task type.
4
- allowed-tools: Read, Glob, Grep
5
- ---
6
-
7
- # Behavioral Modes - Adaptive AI Operating Modes
8
-
9
- ## Purpose
10
- This skill defines distinct behavioral modes that optimize AI performance for specific tasks. Modes change how the AI approaches problems, communicates, and prioritizes.
11
-
12
- ---
13
-
14
- ## Available Modes
15
-
16
- ### 1. 🧠 BRAINSTORM Mode
17
-
18
- **When to use:** Early project planning, feature ideation, architecture decisions
19
-
20
- **Behavior:**
21
- - Ask clarifying questions before assumptions
22
- - Offer multiple alternatives (at least 3)
23
- - Think divergently - explore unconventional solutions
24
- - No code yet - focus on ideas and options
25
- - Use visual diagrams (mermaid) to explain concepts
26
-
27
- **Output style:**
28
- ```
29
- "Let's explore this together. Here are some approaches:
30
-
31
- Option A: [description]
32
- ✅ Pros: ...
33
- ❌ Cons: ...
34
-
35
- Option B: [description]
36
- ✅ Pros: ...
37
- ❌ Cons: ...
38
-
39
- What resonates with you? Or should we explore a different direction?"
40
- ```
41
-
42
- ---
43
-
44
- ### 2. ⚡ IMPLEMENT Mode
45
-
46
- **When to use:** Writing code, building features, executing plans
47
-
48
- **Behavior:**
49
- - **CRITICAL: Use `clean-code` skill standards** - concise, direct, no verbose explanations
50
- - Fast execution - minimize questions
51
- - Use established patterns and best practices
52
- - Write complete, production-ready code
53
- - Include error handling and edge cases
54
- - **NO tutorial-style explanations** - just code
55
- - **NO unnecessary comments** - let code self-document
56
- - **NO over-engineering** - solve the problem directly
57
- - **NO RUSHING** - Quality > Speed. Read ALL references before coding.
58
-
59
- **Output style:**
60
- ```
61
- [Code block]
62
-
63
- [Brief summary, max 1-2 sentences]
64
- ```
65
-
66
- **NOT:**
67
- ```
68
- "Building [feature]...
69
-
70
- ✓ Created [file1]
71
- ✓ Created [file2]
72
- ✓ Updated [file3]
73
-
74
- [long explanation]
75
-
76
- Run `npm run dev` to test."
77
- ```
78
-
79
- ---
80
-
81
- ### 3. 🔍 DEBUG Mode
82
-
83
- **When to use:** Fixing bugs, troubleshooting errors, investigating issues
84
-
85
- **Behavior:**
86
- - Ask for error messages and reproduction steps
87
- - Think systematically - check logs, trace data flow
88
- - Form hypothesis → test → verify
89
- - Explain the root cause, not just the fix
90
- - Prevent future occurrences
91
-
92
- **Output style:**
93
- ```
94
- "Investigating...
95
-
96
- 🔍 Symptom: [what's happening]
97
- 🎯 Root cause: [why it's happening]
98
- ✅ Fix: [the solution]
99
- 🛡️ Prevention: [how to avoid in future]
100
- ```
101
-
102
- ---
103
-
104
- ### 4. 📋 REVIEW Mode
105
-
106
- **When to use:** Code review, architecture review, security audit
107
-
108
- **Behavior:**
109
- - Be thorough but constructive
110
- - Categorize by severity (Critical/High/Medium/Low)
111
- - Explain the "why" behind suggestions
112
- - Offer improved code examples
113
- - Acknowledge what's done well
114
-
115
- **Output style:**
116
- ```
117
- ## Code Review: [file/feature]
118
-
119
- ### 🔴 Critical
120
- - [issue with explanation]
121
-
122
- ### 🟠 Improvements
123
- - [suggestion with example]
124
-
125
- ### 🟢 Good
126
- - [positive observation]
127
- ```
128
-
129
- ---
130
-
131
- ### 5. 📚 TEACH Mode
132
-
133
- **When to use:** Explaining concepts, documentation, onboarding
134
-
135
- **Behavior:**
136
- - Explain from fundamentals
137
- - Use analogies and examples
138
- - Progress from simple to complex
139
- - Include practical exercises
140
- - Check understanding
141
-
142
- **Output style:**
143
- ```
144
- ## Understanding [Concept]
145
-
146
- ### What is it?
147
- [Simple explanation with analogy]
148
-
149
- ### How it works
150
- [Technical explanation with diagram]
151
-
152
- ### Example
153
- [Code example with comments]
154
-
155
- ### Try it yourself
156
- [Exercise or task]
157
- ```
158
-
159
- ---
160
-
161
- ### 6. 🚀 SHIP Mode
162
-
163
- **When to use:** Production deployment, final polish, release preparation
164
-
165
- **Behavior:**
166
- - Focus on stability over features
167
- - Check for missing error handling
168
- - Verify environment configs
169
- - Run all tests
170
- - Create deployment checklist
171
-
172
- **Output style:**
173
- ```
174
- ## Pre-Ship Checklist
175
-
176
- ### ✅ Code Quality
177
- - [ ] No TypeScript errors
178
- - [ ] ESLint passing
179
- - [ ] All tests passing
180
-
181
- ### ✅ Security
182
- - [ ] No exposed secrets
183
- - [ ] Input validation complete
184
-
185
- ### ✅ Performance
186
- - [ ] Bundle size acceptable
187
- - [ ] No console.logs
188
-
189
- ### 🚀 Ready to deploy
190
- ```
191
-
192
- ---
193
-
194
- ## Mode Detection
195
-
196
- The AI should automatically detect the appropriate mode based on:
197
-
198
- | Trigger | Mode |
199
- |---------|------|
200
- | "what if", "ideas", "options" | BRAINSTORM |
201
- | "build", "create", "add" | IMPLEMENT |
202
- | "not working", "error", "bug" | DEBUG |
203
- | "review", "check", "audit" | REVIEW |
204
- | "explain", "how does", "learn" | TEACH |
205
- | "deploy", "release", "production" | SHIP |
206
-
207
- ---
208
-
209
- ## Multi-Agent Collaboration Patterns (2025)
210
-
211
- Modern architectures optimized for agent-to-agent collaboration:
212
-
213
- ### 1. 🔭 EXPLORE Mode
214
- **Role:** Discovery and Analysis (Explorer Agent)
215
- **Behavior:** Socratic questioning, deep-dive code reading, dependency mapping.
216
- **Output:** `discovery-report.json`, architectural visualization.
217
-
218
- ### 2. 🗺️ PLAN-EXECUTE-CRITIC (PEC)
219
- Cyclic mode transitions for high-complexity tasks:
220
- 1. **Planner:** Decomposes the task into atomic steps (`task.md`).
221
- 2. **Executor:** Performs the actual coding (`IMPLEMENT`).
222
- 3. **Critic:** Reviews the code, performs security and performance checks (`REVIEW`).
223
-
224
- ### 3. 🧠 MENTAL MODEL SYNC
225
- Behavior for creating and loading "Mental Model" summaries to preserve context between sessions.
226
-
227
- ---
228
-
229
- ## Combining Modes
230
-
231
- ---
232
-
233
- ## Manual Mode Switching
234
-
235
- Users can explicitly request a mode:
236
-
237
- ```
238
- /brainstorm new feature ideas
239
- /implement the user profile page
240
- /debug why login fails
241
- /review this pull request
242
- ```
@@ -1,119 +0,0 @@
1
- ---
2
- name: 2d-games
3
- description: 2D game development principles. Sprites, tilemaps, physics, camera.
4
- allowed-tools: Read, Write, Edit, Glob, Grep
5
- ---
6
-
7
- # 2D Game Development
8
-
9
- > Principles for 2D game systems.
10
-
11
- ---
12
-
13
- ## 1. Sprite Systems
14
-
15
- ### Sprite Organization
16
-
17
- | Component | Purpose |
18
- |-----------|---------|
19
- | **Atlas** | Combine textures, reduce draw calls |
20
- | **Animation** | Frame sequences |
21
- | **Pivot** | Rotation/scale origin |
22
- | **Layering** | Z-order control |
23
-
24
- ### Animation Principles
25
-
26
- - Frame rate: 8-24 FPS typical
27
- - Squash and stretch for impact
28
- - Anticipation before action
29
- - Follow-through after action
30
-
31
- ---
32
-
33
- ## 2. Tilemap Design
34
-
35
- ### Tile Considerations
36
-
37
- | Factor | Recommendation |
38
- |--------|----------------|
39
- | **Size** | 16x16, 32x32, 64x64 |
40
- | **Auto-tiling** | Use for terrain |
41
- | **Collision** | Simplified shapes |
42
-
43
- ### Layers
44
-
45
- | Layer | Content |
46
- |-------|---------|
47
- | Background | Non-interactive scenery |
48
- | Terrain | Walkable ground |
49
- | Props | Interactive objects |
50
- | Foreground | Parallax overlay |
51
-
52
- ---
53
-
54
- ## 3. 2D Physics
55
-
56
- ### Collision Shapes
57
-
58
- | Shape | Use Case |
59
- |-------|----------|
60
- | Box | Rectangular objects |
61
- | Circle | Balls, rounded |
62
- | Capsule | Characters |
63
- | Polygon | Complex shapes |
64
-
65
- ### Physics Considerations
66
-
67
- - Pixel-perfect vs physics-based
68
- - Fixed timestep for consistency
69
- - Layers for filtering
70
-
71
- ---
72
-
73
- ## 4. Camera Systems
74
-
75
- ### Camera Types
76
-
77
- | Type | Use |
78
- |------|-----|
79
- | **Follow** | Track player |
80
- | **Look-ahead** | Anticipate movement |
81
- | **Multi-target** | Two-player |
82
- | **Room-based** | Metroidvania |
83
-
84
- ### Screen Shake
85
-
86
- - Short duration (50-200ms)
87
- - Diminishing intensity
88
- - Use sparingly
89
-
90
- ---
91
-
92
- ## 5. Genre Patterns
93
-
94
- ### Platformer
95
-
96
- - Coyote time (leniency after edge)
97
- - Jump buffering
98
- - Variable jump height
99
-
100
- ### Top-down
101
-
102
- - 8-directional or free movement
103
- - Aim-based or auto-aim
104
- - Consider rotation or not
105
-
106
- ---
107
-
108
- ## 6. Anti-Patterns
109
-
110
- | ❌ Don't | ✅ Do |
111
- |----------|-------|
112
- | Separate textures | Use atlases |
113
- | Complex collision shapes | Simplified collision |
114
- | Jittery camera | Smooth following |
115
- | Pixel-perfect on physics | Choose one approach |
116
-
117
- ---
118
-
119
- > **Remember:** 2D is about clarity. Every pixel should communicate.
@@ -1,135 +0,0 @@
1
- ---
2
- name: 3d-games
3
- description: 3D game development principles. Rendering, shaders, physics, cameras.
4
- allowed-tools: Read, Write, Edit, Glob, Grep
5
- ---
6
-
7
- # 3D Game Development
8
-
9
- > Principles for 3D game systems.
10
-
11
- ---
12
-
13
- ## 1. Rendering Pipeline
14
-
15
- ### Stages
16
-
17
- ```
18
- 1. Vertex Processing → Transform geometry
19
- 2. Rasterization → Convert to pixels
20
- 3. Fragment Processing → Color pixels
21
- 4. Output → To screen
22
- ```
23
-
24
- ### Optimization Principles
25
-
26
- | Technique | Purpose |
27
- |-----------|---------|
28
- | **Frustum culling** | Don't render off-screen |
29
- | **Occlusion culling** | Don't render hidden |
30
- | **LOD** | Less detail at distance |
31
- | **Batching** | Combine draw calls |
32
-
33
- ---
34
-
35
- ## 2. Shader Principles
36
-
37
- ### Shader Types
38
-
39
- | Type | Purpose |
40
- |------|---------|
41
- | **Vertex** | Position, normals |
42
- | **Fragment/Pixel** | Color, lighting |
43
- | **Compute** | General computation |
44
-
45
- ### When to Write Custom Shaders
46
-
47
- - Special effects (water, fire, portals)
48
- - Stylized rendering (toon, sketch)
49
- - Performance optimization
50
- - Unique visual identity
51
-
52
- ---
53
-
54
- ## 3. 3D Physics
55
-
56
- ### Collision Shapes
57
-
58
- | Shape | Use Case |
59
- |-------|----------|
60
- | **Box** | Buildings, crates |
61
- | **Sphere** | Balls, quick checks |
62
- | **Capsule** | Characters |
63
- | **Mesh** | Terrain (expensive) |
64
-
65
- ### Principles
66
-
67
- - Simple colliders, complex visuals
68
- - Layer-based filtering
69
- - Raycasting for line-of-sight
70
-
71
- ---
72
-
73
- ## 4. Camera Systems
74
-
75
- ### Camera Types
76
-
77
- | Type | Use |
78
- |------|-----|
79
- | **Third-person** | Action, adventure |
80
- | **First-person** | Immersive, FPS |
81
- | **Isometric** | Strategy, RPG |
82
- | **Orbital** | Inspection, editors |
83
-
84
- ### Camera Feel
85
-
86
- - Smooth following (lerp)
87
- - Collision avoidance
88
- - Look-ahead for movement
89
- - FOV changes for speed
90
-
91
- ---
92
-
93
- ## 5. Lighting
94
-
95
- ### Light Types
96
-
97
- | Type | Use |
98
- |------|-----|
99
- | **Directional** | Sun, moon |
100
- | **Point** | Lamps, torches |
101
- | **Spot** | Flashlight, stage |
102
- | **Ambient** | Base illumination |
103
-
104
- ### Performance Consideration
105
-
106
- - Real-time shadows are expensive
107
- - Bake when possible
108
- - Shadow cascades for large worlds
109
-
110
- ---
111
-
112
- ## 6. Level of Detail (LOD)
113
-
114
- ### LOD Strategy
115
-
116
- | Distance | Model |
117
- |----------|-------|
118
- | Near | Full detail |
119
- | Medium | 50% triangles |
120
- | Far | 25% or billboard |
121
-
122
- ---
123
-
124
- ## 7. Anti-Patterns
125
-
126
- | ❌ Don't | ✅ Do |
127
- |----------|-------|
128
- | Mesh colliders everywhere | Simple shapes |
129
- | Real-time shadows on mobile | Baked or blob shadows |
130
- | One LOD for all distances | Distance-based LOD |
131
- | Unoptimized shaders | Profile and simplify |
132
-
133
- ---
134
-
135
- > **Remember:** 3D is about illusion. Create the impression of detail, not the detail itself.