cp-toolkit 2.0.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/README.md +130 -0
- package/bin/cp-kit.js +72 -0
- package/package.json +46 -0
- package/src/commands/add.js +212 -0
- package/src/commands/doctor.js +149 -0
- package/src/commands/init.js +662 -0
- package/src/commands/list.js +128 -0
- package/src/index.js +13 -0
- package/templates/agents/backend-specialist.md +263 -0
- package/templates/agents/code-archaeologist.md +106 -0
- package/templates/agents/database-architect.md +226 -0
- package/templates/agents/debugger.md +225 -0
- package/templates/agents/devops-engineer.md +242 -0
- package/templates/agents/documentation-writer.md +104 -0
- package/templates/agents/explorer-agent.md +73 -0
- package/templates/agents/frontend-specialist.md +556 -0
- package/templates/agents/game-developer.md +162 -0
- package/templates/agents/mobile-developer.md +377 -0
- package/templates/agents/orchestrator.md +416 -0
- package/templates/agents/penetration-tester.md +188 -0
- package/templates/agents/performance-optimizer.md +187 -0
- package/templates/agents/product-manager.md +112 -0
- package/templates/agents/product-owner.md +95 -0
- package/templates/agents/project-planner.md +406 -0
- package/templates/agents/qa-automation-engineer.md +103 -0
- package/templates/agents/security-auditor.md +170 -0
- package/templates/agents/seo-specialist.md +111 -0
- package/templates/agents/test-engineer.md +158 -0
- package/templates/github/agents/backend-specialist.md +67 -0
- package/templates/github/agents/code-archaeologist.md +61 -0
- package/templates/github/agents/database-architect.md +73 -0
- package/templates/github/agents/debugger.md +71 -0
- package/templates/github/agents/devops-engineer.md +85 -0
- package/templates/github/agents/documentation-writer.md +107 -0
- package/templates/github/agents/explorer-agent.md +87 -0
- package/templates/github/agents/frontend-specialist.md +54 -0
- package/templates/github/agents/game-developer.md +94 -0
- package/templates/github/agents/mobile-developer.md +75 -0
- package/templates/github/agents/orchestrator.md +48 -0
- package/templates/github/agents/penetration-tester.md +87 -0
- package/templates/github/agents/performance-optimizer.md +70 -0
- package/templates/github/agents/product-manager.md +85 -0
- package/templates/github/agents/product-owner.md +77 -0
- package/templates/github/agents/project-planner.md +83 -0
- package/templates/github/agents/qa-automation-engineer.md +95 -0
- package/templates/github/agents/security-auditor.md +72 -0
- package/templates/github/agents/seo-specialist.md +78 -0
- package/templates/github/agents/test-engineer.md +79 -0
- package/templates/github/instructions/database.instructions.md +74 -0
- package/templates/github/instructions/python.instructions.md +76 -0
- package/templates/github/instructions/security.instructions.md +73 -0
- package/templates/github/instructions/typescript.instructions.md +50 -0
- package/templates/rules/GEMINI.md +273 -0
- package/templates/scripts/mcp-server.js +704 -0
- package/templates/skills/core/behavioral-modes/SKILL.md +242 -0
- package/templates/skills/core/brainstorming/SKILL.md +163 -0
- package/templates/skills/core/brainstorming/dynamic-questioning.md +350 -0
- package/templates/skills/core/clean-code/SKILL.md +201 -0
- package/templates/skills/core/intelligent-routing/SKILL.md +335 -0
- package/templates/skills/core/mcp-builder/SKILL.md +176 -0
- package/templates/skills/core/parallel-agents/SKILL.md +175 -0
- package/templates/skills/core/plan-writing/SKILL.md +152 -0
- package/templates/skills/optional/api-patterns/SKILL.md +81 -0
- package/templates/skills/optional/api-patterns/api-style.md +42 -0
- package/templates/skills/optional/api-patterns/auth.md +24 -0
- package/templates/skills/optional/api-patterns/documentation.md +26 -0
- package/templates/skills/optional/api-patterns/graphql.md +41 -0
- package/templates/skills/optional/api-patterns/rate-limiting.md +31 -0
- package/templates/skills/optional/api-patterns/response.md +37 -0
- package/templates/skills/optional/api-patterns/rest.md +40 -0
- package/templates/skills/optional/api-patterns/scripts/api_validator.py +211 -0
- package/templates/skills/optional/api-patterns/security-testing.md +122 -0
- package/templates/skills/optional/api-patterns/trpc.md +41 -0
- package/templates/skills/optional/api-patterns/versioning.md +22 -0
- package/templates/skills/optional/app-builder/SKILL.md +75 -0
- package/templates/skills/optional/app-builder/agent-coordination.md +71 -0
- package/templates/skills/optional/app-builder/feature-building.md +53 -0
- package/templates/skills/optional/app-builder/project-detection.md +34 -0
- package/templates/skills/optional/app-builder/scaffolding.md +118 -0
- package/templates/skills/optional/app-builder/tech-stack.md +40 -0
- package/templates/skills/optional/app-builder/templates/SKILL.md +39 -0
- package/templates/skills/optional/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/templates/skills/optional/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/templates/skills/optional/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/templates/skills/optional/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/templates/skills/optional/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/templates/skills/optional/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/templates/skills/optional/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/templates/skills/optional/app-builder/templates/nextjs-fullstack/TEMPLATE.md +82 -0
- package/templates/skills/optional/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
- package/templates/skills/optional/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
- package/templates/skills/optional/app-builder/templates/nuxt-app/TEMPLATE.md +101 -0
- package/templates/skills/optional/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/templates/skills/optional/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
- package/templates/skills/optional/architecture/SKILL.md +55 -0
- package/templates/skills/optional/architecture/context-discovery.md +43 -0
- package/templates/skills/optional/architecture/examples.md +94 -0
- package/templates/skills/optional/architecture/pattern-selection.md +68 -0
- package/templates/skills/optional/architecture/patterns-reference.md +50 -0
- package/templates/skills/optional/architecture/trade-off-analysis.md +77 -0
- package/templates/skills/optional/bash-linux/SKILL.md +199 -0
- package/templates/skills/optional/code-review-checklist/SKILL.md +109 -0
- package/templates/skills/optional/database-design/SKILL.md +52 -0
- package/templates/skills/optional/database-design/database-selection.md +43 -0
- package/templates/skills/optional/database-design/indexing.md +39 -0
- package/templates/skills/optional/database-design/migrations.md +48 -0
- package/templates/skills/optional/database-design/optimization.md +36 -0
- package/templates/skills/optional/database-design/orm-selection.md +30 -0
- package/templates/skills/optional/database-design/schema-design.md +56 -0
- package/templates/skills/optional/database-design/scripts/schema_validator.py +172 -0
- package/templates/skills/optional/deployment-procedures/SKILL.md +241 -0
- package/templates/skills/optional/documentation-templates/SKILL.md +194 -0
- package/templates/skills/optional/frontend-design/SKILL.md +418 -0
- package/templates/skills/optional/frontend-design/animation-guide.md +331 -0
- package/templates/skills/optional/frontend-design/color-system.md +311 -0
- package/templates/skills/optional/frontend-design/decision-trees.md +418 -0
- package/templates/skills/optional/frontend-design/motion-graphics.md +306 -0
- package/templates/skills/optional/frontend-design/scripts/accessibility_checker.py +183 -0
- package/templates/skills/optional/frontend-design/scripts/ux_audit.py +722 -0
- package/templates/skills/optional/frontend-design/typography-system.md +345 -0
- package/templates/skills/optional/frontend-design/ux-psychology.md +541 -0
- package/templates/skills/optional/frontend-design/visual-effects.md +383 -0
- package/templates/skills/optional/game-development/2d-games/SKILL.md +119 -0
- package/templates/skills/optional/game-development/3d-games/SKILL.md +135 -0
- package/templates/skills/optional/game-development/SKILL.md +167 -0
- package/templates/skills/optional/game-development/game-art/SKILL.md +185 -0
- package/templates/skills/optional/game-development/game-audio/SKILL.md +190 -0
- package/templates/skills/optional/game-development/game-design/SKILL.md +129 -0
- package/templates/skills/optional/game-development/mobile-games/SKILL.md +108 -0
- package/templates/skills/optional/game-development/multiplayer/SKILL.md +132 -0
- package/templates/skills/optional/game-development/pc-games/SKILL.md +144 -0
- package/templates/skills/optional/game-development/vr-ar/SKILL.md +123 -0
- package/templates/skills/optional/game-development/web-games/SKILL.md +150 -0
- package/templates/skills/optional/geo-fundamentals/SKILL.md +156 -0
- package/templates/skills/optional/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/templates/skills/optional/i18n-localization/SKILL.md +154 -0
- package/templates/skills/optional/i18n-localization/scripts/i18n_checker.py +241 -0
- package/templates/skills/optional/lint-and-validate/SKILL.md +45 -0
- package/templates/skills/optional/lint-and-validate/scripts/lint_runner.py +172 -0
- package/templates/skills/optional/lint-and-validate/scripts/type_coverage.py +173 -0
- package/templates/skills/optional/mobile-design/SKILL.md +394 -0
- package/templates/skills/optional/mobile-design/decision-trees.md +516 -0
- package/templates/skills/optional/mobile-design/mobile-backend.md +491 -0
- package/templates/skills/optional/mobile-design/mobile-color-system.md +420 -0
- package/templates/skills/optional/mobile-design/mobile-debugging.md +122 -0
- package/templates/skills/optional/mobile-design/mobile-design-thinking.md +357 -0
- package/templates/skills/optional/mobile-design/mobile-navigation.md +458 -0
- package/templates/skills/optional/mobile-design/mobile-performance.md +767 -0
- package/templates/skills/optional/mobile-design/mobile-testing.md +356 -0
- package/templates/skills/optional/mobile-design/mobile-typography.md +433 -0
- package/templates/skills/optional/mobile-design/platform-android.md +666 -0
- package/templates/skills/optional/mobile-design/platform-ios.md +561 -0
- package/templates/skills/optional/mobile-design/scripts/mobile_audit.py +670 -0
- package/templates/skills/optional/mobile-design/touch-psychology.md +537 -0
- package/templates/skills/optional/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
- package/templates/skills/optional/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
- package/templates/skills/optional/nextjs-react-expert/3-server-server-side-performance.md +490 -0
- package/templates/skills/optional/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
- package/templates/skills/optional/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
- package/templates/skills/optional/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
- package/templates/skills/optional/nextjs-react-expert/7-js-javascript-performance.md +684 -0
- package/templates/skills/optional/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
- package/templates/skills/optional/nextjs-react-expert/SKILL.md +267 -0
- package/templates/skills/optional/nextjs-react-expert/scripts/convert_rules.py +222 -0
- package/templates/skills/optional/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
- package/templates/skills/optional/nodejs-best-practices/SKILL.md +333 -0
- package/templates/skills/optional/performance-profiling/SKILL.md +143 -0
- package/templates/skills/optional/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/templates/skills/optional/powershell-windows/SKILL.md +167 -0
- package/templates/skills/optional/python-patterns/SKILL.md +441 -0
- package/templates/skills/optional/red-team-tactics/SKILL.md +199 -0
- package/templates/skills/optional/seo-fundamentals/SKILL.md +129 -0
- package/templates/skills/optional/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/templates/skills/optional/server-management/SKILL.md +161 -0
- package/templates/skills/optional/systematic-debugging/SKILL.md +109 -0
- package/templates/skills/optional/tailwind-patterns/SKILL.md +269 -0
- package/templates/skills/optional/tdd-workflow/SKILL.md +149 -0
- package/templates/skills/optional/testing-patterns/SKILL.md +178 -0
- package/templates/skills/optional/testing-patterns/scripts/test_runner.py +219 -0
- package/templates/skills/optional/vulnerability-scanner/SKILL.md +276 -0
- package/templates/skills/optional/vulnerability-scanner/checklists.md +121 -0
- package/templates/skills/optional/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/templates/skills/optional/web-design-guidelines/SKILL.md +57 -0
- package/templates/skills/optional/webapp-testing/SKILL.md +187 -0
- package/templates/skills/optional/webapp-testing/scripts/playwright_runner.py +173 -0
- package/templates/workflows/brainstorm.md +113 -0
- package/templates/workflows/create.md +59 -0
- package/templates/workflows/debug.md +103 -0
- package/templates/workflows/deploy.md +176 -0
- package/templates/workflows/enhance.md +63 -0
- package/templates/workflows/orchestrate.md +237 -0
- package/templates/workflows/plan.md +89 -0
- package/templates/workflows/preview.md +81 -0
- package/templates/workflows/status.md +86 -0
- package/templates/workflows/test.md +144 -0
- package/templates/workflows/ui-ux-pro-max.md +296 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
applyTo: "**/*.ts,**/*.tsx"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# TypeScript Guidelines
|
|
6
|
+
|
|
7
|
+
## Code Style
|
|
8
|
+
|
|
9
|
+
- Use strict mode (`"strict": true` in tsconfig)
|
|
10
|
+
- Prefer `interface` over `type` for object shapes
|
|
11
|
+
- Use `const` assertions for literal types
|
|
12
|
+
- Avoid `any` - use `unknown` if type is truly unknown
|
|
13
|
+
- Use discriminated unions for complex state
|
|
14
|
+
|
|
15
|
+
## React Components (TSX)
|
|
16
|
+
|
|
17
|
+
- Use functional components with TypeScript
|
|
18
|
+
- Define props as interfaces, not inline types
|
|
19
|
+
- Use `React.FC` sparingly - prefer explicit return types
|
|
20
|
+
- Extract complex logic to custom hooks
|
|
21
|
+
|
|
22
|
+
## Patterns
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
// β
Good: Interface with explicit props
|
|
26
|
+
interface ButtonProps {
|
|
27
|
+
label: string;
|
|
28
|
+
onClick: () => void;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function Button({ label, onClick, disabled }: ButtonProps) {
|
|
33
|
+
return <button onClick={onClick} disabled={disabled}>{label}</button>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// β Bad: Inline types, any
|
|
37
|
+
export const Button = (props: { label: any }) => <button>{props.label}</button>;
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Error Handling
|
|
41
|
+
|
|
42
|
+
- Use Result types or discriminated unions for error states
|
|
43
|
+
- Throw only for truly exceptional cases
|
|
44
|
+
- Type guard with `is` predicates
|
|
45
|
+
|
|
46
|
+
## Imports
|
|
47
|
+
|
|
48
|
+
- Use absolute imports with path aliases (`@/components`, `@/lib`)
|
|
49
|
+
- Group imports: external β internal β relative
|
|
50
|
+
- Avoid barrel files in large projects
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: always_on
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# GEMINI.md - Antigravity Kit
|
|
6
|
+
|
|
7
|
+
> This file defines how the AI behaves in this workspace.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## CRITICAL: AGENT & SKILL PROTOCOL (START HERE)
|
|
12
|
+
|
|
13
|
+
> **MANDATORY:** You MUST read the appropriate agent file and its skills BEFORE performing any implementation. This is the highest priority rule.
|
|
14
|
+
|
|
15
|
+
### 1. Modular Skill Loading Protocol
|
|
16
|
+
|
|
17
|
+
Agent activated β Check frontmatter "skills:" β Read SKILL.md (INDEX) β Read specific sections.
|
|
18
|
+
|
|
19
|
+
- **Selective Reading:** DO NOT read ALL files in a skill folder. Read `SKILL.md` first, then only read sections matching the user's request.
|
|
20
|
+
- **Rule Priority:** P0 (GEMINI.md) > P1 (Agent .md) > P2 (SKILL.md). All rules are binding.
|
|
21
|
+
|
|
22
|
+
### 2. Enforcement Protocol
|
|
23
|
+
|
|
24
|
+
1. **When agent is activated:**
|
|
25
|
+
- β
Activate: Read Rules β Check Frontmatter β Load SKILL.md β Apply All.
|
|
26
|
+
2. **Forbidden:** Never skip reading agent rules or skill instructions. "Read β Understand β Apply" is mandatory.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## π₯ REQUEST CLASSIFIER (STEP 1)
|
|
31
|
+
|
|
32
|
+
**Before ANY action, classify the request:**
|
|
33
|
+
|
|
34
|
+
| Request Type | Trigger Keywords | Active Tiers | Result |
|
|
35
|
+
| ---------------- | ------------------------------------------ | ------------------------------ | --------------------------- |
|
|
36
|
+
| **QUESTION** | "what is", "how does", "explain" | TIER 0 only | Text Response |
|
|
37
|
+
| **SURVEY/INTEL** | "analyze", "list files", "overview" | TIER 0 + Explorer | Session Intel (No File) |
|
|
38
|
+
| **SIMPLE CODE** | "fix", "add", "change" (single file) | TIER 0 + TIER 1 (lite) | Inline Edit |
|
|
39
|
+
| **COMPLEX CODE** | "build", "create", "implement", "refactor" | TIER 0 + TIER 1 (full) + Agent | **{task-slug}.md Required** |
|
|
40
|
+
| **DESIGN/UI** | "design", "UI", "page", "dashboard" | TIER 0 + TIER 1 + Agent | **{task-slug}.md Required** |
|
|
41
|
+
| **SLASH CMD** | /create, /orchestrate, /debug | Command-specific flow | Variable |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## π€ INTELLIGENT AGENT ROUTING (STEP 2 - AUTO)
|
|
46
|
+
|
|
47
|
+
**ALWAYS ACTIVE: Before responding to ANY request, automatically analyze and select the best agent(s).**
|
|
48
|
+
|
|
49
|
+
> π΄ **MANDATORY:** You MUST follow the protocol defined in `@[skills/intelligent-routing]`.
|
|
50
|
+
|
|
51
|
+
### Auto-Selection Protocol
|
|
52
|
+
|
|
53
|
+
1. **Analyze (Silent)**: Detect domains (Frontend, Backend, Security, etc.) from user request.
|
|
54
|
+
2. **Select Agent(s)**: Choose the most appropriate specialist(s).
|
|
55
|
+
3. **Inform User**: Concisely state which expertise is being applied.
|
|
56
|
+
4. **Apply**: Generate response using the selected agent's persona and rules.
|
|
57
|
+
|
|
58
|
+
### Response Format (MANDATORY)
|
|
59
|
+
|
|
60
|
+
When auto-applying an agent, inform the user:
|
|
61
|
+
|
|
62
|
+
```markdown
|
|
63
|
+
π€ **Applying knowledge of `@[agent-name]`...**
|
|
64
|
+
|
|
65
|
+
[Continue with specialized response]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Rules:**
|
|
69
|
+
|
|
70
|
+
1. **Silent Analysis**: No verbose meta-commentary ("I am analyzing...").
|
|
71
|
+
2. **Respect Overrides**: If user mentions `@agent`, use it.
|
|
72
|
+
3. **Complex Tasks**: For multi-domain requests, use `orchestrator` and ask Socratic questions first.
|
|
73
|
+
|
|
74
|
+
### β οΈ AGENT ROUTING CHECKLIST (MANDATORY BEFORE EVERY CODE/DESIGN RESPONSE)
|
|
75
|
+
|
|
76
|
+
**Before ANY code or design work, you MUST complete this mental checklist:**
|
|
77
|
+
|
|
78
|
+
| Step | Check | If Unchecked |
|
|
79
|
+
|------|-------|--------------|
|
|
80
|
+
| 1 | Did I identify the correct agent for this domain? | β STOP. Analyze request domain first. |
|
|
81
|
+
| 2 | Did I READ the agent's `.md` file (or recall its rules)? | β STOP. Open `.agent/agents/{agent}.md` |
|
|
82
|
+
| 3 | Did I announce `π€ Applying knowledge of @[agent]...`? | β STOP. Add announcement before response. |
|
|
83
|
+
| 4 | Did I load required skills from agent's frontmatter? | β STOP. Check `skills:` field and read them. |
|
|
84
|
+
|
|
85
|
+
**Failure Conditions:**
|
|
86
|
+
|
|
87
|
+
- β Writing code without identifying an agent = **PROTOCOL VIOLATION**
|
|
88
|
+
- β Skipping the announcement = **USER CANNOT VERIFY AGENT WAS USED**
|
|
89
|
+
- β Ignoring agent-specific rules (e.g., Purple Ban) = **QUALITY FAILURE**
|
|
90
|
+
|
|
91
|
+
> π΄ **Self-Check Trigger:** Every time you are about to write code or create UI, ask yourself:
|
|
92
|
+
> "Have I completed the Agent Routing Checklist?" If NO β Complete it first.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## TIER 0: UNIVERSAL RULES (Always Active)
|
|
97
|
+
|
|
98
|
+
### π Language Handling
|
|
99
|
+
|
|
100
|
+
When user's prompt is NOT in English:
|
|
101
|
+
|
|
102
|
+
1. **Internally translate** for better comprehension
|
|
103
|
+
2. **Respond in user's language** - match their communication
|
|
104
|
+
3. **Code comments/variables** remain in English
|
|
105
|
+
|
|
106
|
+
### π§Ή Clean Code (Global Mandatory)
|
|
107
|
+
|
|
108
|
+
**ALL code MUST follow `@[skills/clean-code]` rules. No exceptions.**
|
|
109
|
+
|
|
110
|
+
- **Code**: Concise, direct, no over-engineering. Self-documenting.
|
|
111
|
+
- **Testing**: Mandatory. Pyramid (Unit > Int > E2E) + AAA Pattern.
|
|
112
|
+
- **Performance**: Measure first. Adhere to 2025 standards (Core Web Vitals).
|
|
113
|
+
- **Infra/Safety**: 5-Phase Deployment. Verify secrets security.
|
|
114
|
+
|
|
115
|
+
### π File Dependency Awareness
|
|
116
|
+
|
|
117
|
+
**Before modifying ANY file:**
|
|
118
|
+
|
|
119
|
+
1. Check `CODEBASE.md` β File Dependencies
|
|
120
|
+
2. Identify dependent files
|
|
121
|
+
3. Update ALL affected files together
|
|
122
|
+
|
|
123
|
+
### πΊοΈ System Map Read
|
|
124
|
+
|
|
125
|
+
> π΄ **MANDATORY:** Read `ARCHITECTURE.md` at session start to understand Agents, Skills, and Scripts.
|
|
126
|
+
|
|
127
|
+
**Path Awareness:**
|
|
128
|
+
|
|
129
|
+
- Agents: `.agent/` (Project)
|
|
130
|
+
- Skills: `.agent/skills/` (Project)
|
|
131
|
+
- Runtime Scripts: `.agent/skills/<skill>/scripts/`
|
|
132
|
+
|
|
133
|
+
### π§ Read β Understand β Apply
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
β WRONG: Read agent file β Start coding
|
|
137
|
+
β
CORRECT: Read β Understand WHY β Apply PRINCIPLES β Code
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Before coding, answer:**
|
|
141
|
+
|
|
142
|
+
1. What is the GOAL of this agent/skill?
|
|
143
|
+
2. What PRINCIPLES must I apply?
|
|
144
|
+
3. How does this DIFFER from generic output?
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## TIER 1: CODE RULES (When Writing Code)
|
|
149
|
+
|
|
150
|
+
### π± Project Type Routing
|
|
151
|
+
|
|
152
|
+
| Project Type | Primary Agent | Skills |
|
|
153
|
+
| -------------------------------------- | --------------------- | ----------------------------- |
|
|
154
|
+
| **MOBILE** (iOS, Android, RN, Flutter) | `mobile-developer` | mobile-design |
|
|
155
|
+
| **WEB** (Next.js, React web) | `frontend-specialist` | frontend-design |
|
|
156
|
+
| **BACKEND** (API, server, DB) | `backend-specialist` | api-patterns, database-design |
|
|
157
|
+
|
|
158
|
+
> π΄ **Mobile + frontend-specialist = WRONG.** Mobile = mobile-developer ONLY.
|
|
159
|
+
|
|
160
|
+
### π Socratic Gate
|
|
161
|
+
|
|
162
|
+
**For complex requests, STOP and ASK first:**
|
|
163
|
+
|
|
164
|
+
### π GLOBAL SOCRATIC GATE (TIER 0)
|
|
165
|
+
|
|
166
|
+
**MANDATORY: Every user request must pass through the Socratic Gate before ANY tool use or implementation.**
|
|
167
|
+
|
|
168
|
+
| Request Type | Strategy | Required Action |
|
|
169
|
+
| ----------------------- | -------------- | ----------------------------------------------------------------- |
|
|
170
|
+
| **New Feature / Build** | Deep Discovery | ASK minimum 3 strategic questions |
|
|
171
|
+
| **Code Edit / Bug Fix** | Context Check | Confirm understanding + ask impact questions |
|
|
172
|
+
| **Vague / Simple** | Clarification | Ask Purpose, Users, and Scope |
|
|
173
|
+
| **Full Orchestration** | Gatekeeper | **STOP** subagents until user confirms plan details |
|
|
174
|
+
| **Direct "Proceed"** | Validation | **STOP** β Even if answers are given, ask 2 "Edge Case" questions |
|
|
175
|
+
|
|
176
|
+
**Protocol:**
|
|
177
|
+
|
|
178
|
+
1. **Never Assume:** If even 1% is unclear, ASK.
|
|
179
|
+
2. **Handle Spec-heavy Requests:** When user gives a list (Answers 1, 2, 3...), do NOT skip the gate. Instead, ask about **Trade-offs** or **Edge Cases** (e.g., "LocalStorage confirmed, but should we handle data clearing or versioning?") before starting.
|
|
180
|
+
3. **Wait:** Do NOT invoke subagents or write code until the user clears the Gate.
|
|
181
|
+
4. **Reference:** Full protocol in `@[skills/brainstorming]`.
|
|
182
|
+
|
|
183
|
+
### π Final Checklist Protocol
|
|
184
|
+
|
|
185
|
+
**Trigger:** When the user says "son kontrolleri yap", "final checks", "Γ§alΔ±ΕtΔ±r tΓΌm testleri", or similar phrases.
|
|
186
|
+
|
|
187
|
+
| Task Stage | Command | Purpose |
|
|
188
|
+
| ---------------- | -------------------------------------------------- | ------------------------------ |
|
|
189
|
+
| **Manual Audit** | `python .agent/scripts/checklist.py .` | Priority-based project audit |
|
|
190
|
+
| **Pre-Deploy** | `python .agent/scripts/checklist.py . --url <URL>` | Full Suite + Performance + E2E |
|
|
191
|
+
|
|
192
|
+
**Priority Execution Order:**
|
|
193
|
+
|
|
194
|
+
1. **Security** β 2. **Lint** β 3. **Schema** β 4. **Tests** β 5. **UX** β 6. **Seo** β 7. **Lighthouse/E2E**
|
|
195
|
+
|
|
196
|
+
**Rules:**
|
|
197
|
+
|
|
198
|
+
- **Completion:** A task is NOT finished until `checklist.py` returns success.
|
|
199
|
+
- **Reporting:** If it fails, fix the **Critical** blockers first (Security/Lint).
|
|
200
|
+
|
|
201
|
+
**Available Scripts (12 total):**
|
|
202
|
+
|
|
203
|
+
| Script | Skill | When to Use |
|
|
204
|
+
| -------------------------- | --------------------- | ------------------- |
|
|
205
|
+
| `security_scan.py` | vulnerability-scanner | Always on deploy |
|
|
206
|
+
| `dependency_analyzer.py` | vulnerability-scanner | Weekly / Deploy |
|
|
207
|
+
| `lint_runner.py` | lint-and-validate | Every code change |
|
|
208
|
+
| `test_runner.py` | testing-patterns | After logic change |
|
|
209
|
+
| `schema_validator.py` | database-design | After DB change |
|
|
210
|
+
| `ux_audit.py` | frontend-design | After UI change |
|
|
211
|
+
| `accessibility_checker.py` | frontend-design | After UI change |
|
|
212
|
+
| `seo_checker.py` | seo-fundamentals | After page change |
|
|
213
|
+
| `bundle_analyzer.py` | performance-profiling | Before deploy |
|
|
214
|
+
| `mobile_audit.py` | mobile-design | After mobile change |
|
|
215
|
+
| `lighthouse_audit.py` | performance-profiling | Before deploy |
|
|
216
|
+
| `playwright_runner.py` | webapp-testing | Before deploy |
|
|
217
|
+
|
|
218
|
+
> π΄ **Agents & Skills can invoke ANY script** via `python .agent/skills/<skill>/scripts/<script>.py`
|
|
219
|
+
|
|
220
|
+
### π Gemini Mode Mapping
|
|
221
|
+
|
|
222
|
+
| Mode | Agent | Behavior |
|
|
223
|
+
| -------- | ----------------- | -------------------------------------------- |
|
|
224
|
+
| **plan** | `project-planner` | 4-phase methodology. NO CODE before Phase 4. |
|
|
225
|
+
| **ask** | - | Focus on understanding. Ask questions. |
|
|
226
|
+
| **edit** | `orchestrator` | Execute. Check `{task-slug}.md` first. |
|
|
227
|
+
|
|
228
|
+
**Plan Mode (4-Phase):**
|
|
229
|
+
|
|
230
|
+
1. ANALYSIS β Research, questions
|
|
231
|
+
2. PLANNING β `{task-slug}.md`, task breakdown
|
|
232
|
+
3. SOLUTIONING β Architecture, design (NO CODE!)
|
|
233
|
+
4. IMPLEMENTATION β Code + tests
|
|
234
|
+
|
|
235
|
+
> π΄ **Edit mode:** If multi-file or structural change β Offer to create `{task-slug}.md`. For single-file fixes β Proceed directly.
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## TIER 2: DESIGN RULES (Reference)
|
|
240
|
+
|
|
241
|
+
> **Design rules are in the specialist agents, NOT here.**
|
|
242
|
+
|
|
243
|
+
| Task | Read |
|
|
244
|
+
| ------------ | ------------------------------- |
|
|
245
|
+
| Web UI/UX | `.agent/frontend-specialist.md` |
|
|
246
|
+
| Mobile UI/UX | `.agent/mobile-developer.md` |
|
|
247
|
+
|
|
248
|
+
**These agents contain:**
|
|
249
|
+
|
|
250
|
+
- Purple Ban (no violet/purple colors)
|
|
251
|
+
- Template Ban (no standard layouts)
|
|
252
|
+
- Anti-clichΓ© rules
|
|
253
|
+
- Deep Design Thinking protocol
|
|
254
|
+
|
|
255
|
+
> π΄ **For design work:** Open and READ the agent file. Rules are there.
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## π QUICK REFERENCE
|
|
260
|
+
|
|
261
|
+
### Agents & Skills
|
|
262
|
+
|
|
263
|
+
- **Masters**: `orchestrator`, `project-planner`, `security-auditor` (Cyber/Audit), `backend-specialist` (API/DB), `frontend-specialist` (UI/UX), `mobile-developer`, `debugger`, `game-developer`
|
|
264
|
+
- **Key Skills**: `clean-code`, `brainstorming`, `app-builder`, `frontend-design`, `mobile-design`, `plan-writing`, `behavioral-modes`
|
|
265
|
+
|
|
266
|
+
### Key Scripts
|
|
267
|
+
|
|
268
|
+
- **Verify**: `.agent/scripts/verify_all.py`, `.agent/scripts/checklist.py`
|
|
269
|
+
- **Scanners**: `security_scan.py`, `dependency_analyzer.py`
|
|
270
|
+
- **Audits**: `ux_audit.py`, `mobile_audit.py`, `lighthouse_audit.py`, `seo_checker.py`
|
|
271
|
+
- **Test**: `playwright_runner.py`, `test_runner.py`
|
|
272
|
+
|
|
273
|
+
---
|