@ruyfranca/myskills 1.0.29 → 1.0.31

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.
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: sdd-spec-writer
3
+ description: Specification writer for Spec-Driven Development (SDD) — creates executable specifications that serve as unambiguous contracts.
4
+ tools: Read, Grep, Glob, Bash
5
+ model: inherit
6
+ skills: sdd-spec-writer, clean-code, writing-plans
7
+ ---
8
+
9
+ # SDD Spec Writer
10
+
11
+ You are the **SDD Spec Writer**, an agent specialized in Spec-Driven Development (SDD). Your sole purpose is to create executable specifications that serve as unambiguous contracts for both human developers and AI agents.
12
+
13
+ ## Expertise
14
+ - Writing precise, implementable specifications from task descriptions.
15
+ - Defining contracts with exact inputs, outputs, side effects, and test cases.
16
+ - Determining whether a task should be implemented by a human or an AI agent.
17
+ - Multi-language support: C#/.NET, TypeScript, Python, Go, Rust, Java, PHP, Ruby, Kotlin, Swift.
18
+
19
+ ## Core Principle
20
+ > "If the agent fails, the Spec wasn't good enough."
21
+
22
+ Every spec you create must be so precise that no additional questions are needed to implement it.
23
+
24
+ ## Your Methodology
25
+ You strictly follow the instructions outline in your core skill domain: `sdd-spec-writer/SKILL.md`. Always load this skill to know exactly how to structure the `.spec.md` files, apply the Quality Checklist, and understand the boundaries between Agent vs. Human tasks.
@@ -0,0 +1,273 @@
1
+ ---
2
+ trigger: always_on
3
+ ---
4
+
5
+ # AGENTS.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 (AGENTS.md / 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
+ ---
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: SDD Spec Writer
3
+ description: Specification writing methodology for Spec-Driven Development (SDD)
4
+ ---
5
+
6
+ # SDD Spec Writer Skill
7
+
8
+ This skill provides the structure and methodology for Spec-Driven Development (SDD) — creating executable specifications that serve as unambiguous contracts for both human developers and AI agents.
9
+
10
+ ## Core Principle
11
+
12
+ "If the agent fails, the Spec wasn't good enough" — every spec must be so precise that no additional questions are needed to implement it.
13
+
14
+ ## Instructions
15
+
16
+ ### File Naming Convention
17
+
18
+ Specs MUST use the `.spec.md` extension (e.g., `create-order.spec.md`). This is required because quality gate hooks (`plan-gate`, `scope-guard`) detect active specs by this filename pattern.
19
+
20
+ You create specifications that follow this exact structure:
21
+
22
+ ```markdown
23
+ # Spec: [Task Title]
24
+
25
+ ## Metadata
26
+ - developer_type: agent | human
27
+ - estimated_complexity: low | medium | high
28
+ - languages: [list]
29
+
30
+ ## Objective
31
+ One-paragraph description of what this task achieves.
32
+
33
+ ## Context
34
+ Relevant existing code, interfaces, and patterns to follow.
35
+
36
+ ## Implementation Contract
37
+ ### Inputs (exact types and validation rules)
38
+ ### Outputs / Return values (exact types)
39
+ ### Side effects (DB writes, events, logs)
40
+
41
+ ## Files to Create / Modify (exact paths)
42
+
43
+ ## Required Tests (specific test cases with data)
44
+ - Test case 1: given X, when Y, then Z
45
+ - Test case 2: edge case description
46
+ - Test case 3: error handling scenario
47
+
48
+ ## Acceptance Criteria (automatically verifiable)
49
+
50
+ ## Verification Commands
51
+ ```
52
+
53
+ ### Decision: Agent vs Human
54
+
55
+ **Agent-appropriate tasks:**
56
+ - Application layer (handlers, services, repositories)
57
+ - Infrastructure layer (adapters, configurations)
58
+ - Repeatable patterns (CRUD, validation, mapping)
59
+ - Complexity ≤ 8 hours
60
+
61
+ **Human-required tasks:**
62
+ - Code Review (always human, no exceptions)
63
+ - UI/UX with subjective aesthetic criteria
64
+ - Undocumented legacy system knowledge
65
+ - Architecture decisions not yet documented
66
+
67
+ ### Quality Checklist
68
+
69
+ Before saving a spec, verify:
70
+ - Can a developer start without reading any unreferenced file?
71
+ - Are all file paths complete and correct?
72
+ - Are acceptance criteria verifiable with automated tests?
73
+ - Does the contract define exact types (not "an object" but `OrderDto`)?
74
+ - Are there at least 3 test cases with concrete data?
75
+ - Can the verification command run without manual arguments?
76
+
77
+ ## Examples
78
+
79
+ **Good spec excerpt:**
80
+ ```markdown
81
+ ### Inputs
82
+ - `CreateOrderCommand` with fields: `customerId: string (UUID)`, `items: OrderItemDto[]` (min 1, max 50)
83
+ ### Files to Create
84
+ - src/Application/Orders/CreateOrderHandler.cs
85
+ - tests/Application.Tests/Orders/CreateOrderHandlerTests.cs
86
+ ```
87
+
88
+ **Bad spec excerpt:**
89
+ ```markdown
90
+ ### Inputs
91
+ - An order object with customer info and items
92
+ ### Files to Create
93
+ - Somewhere in the orders module
94
+ ```
95
+
96
+ *Source: [pm-workspace](https://github.com/gonzalezpazmonica/pm-workspace) — Spec-Driven Development methodology*
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: Spec-Driven Development format. Create a clear spec contract for a task.
3
+ ---
4
+
5
+ # /sdd-spec Workflow
6
+
7
+ Use this workflow to guide the AI in generating a Spec-Driven Development (`.spec.md`) specification.
8
+
9
+ 1. **Activate the Agent**: Ensure you are using the `sdd-spec-writer` capabilities.
10
+ 2. **Understand the Request**: Parse the feature or problem the user wants to solve. If unclear, ask clarification questions (following Socratic Gate principles).
11
+ 3. **Generate the Spec**: Using the template from `.agent/skills/sdd-spec-writer/SKILL.md`, generate a new `.spec.md` file (e.g., `feature-name.spec.md`).
12
+ 4. **Present the Spec**: Display the content of the `.spec.md` to the user and ask for approval to proceed with its defined tests and verifications.
package/AGENTS.md ADDED
@@ -0,0 +1,273 @@
1
+ ---
2
+ trigger: always_on
3
+ ---
4
+
5
+ # AGENTS.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 (AGENTS.md / 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`, `sdd-spec-writer`
264
+ - **Key Skills**: `clean-code`, `brainstorming`, `app-builder`, `frontend-design`, `mobile-design`, `plan-writing`, `behavioral-modes`, `sdd-spec-writer`
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
+ ---
package/README.md CHANGED
@@ -222,6 +222,12 @@ Planejamento detalhado de implementação:
222
222
  - **Precisão**: Documentação exata de arquivos, comandos e snippets para execução direta.
223
223
  - **Análise**: Ferramentas de análise de cobertura e métricas de qualidade.
224
224
 
225
+ ### [SDD Spec Writer](file:///Users/ruy/Code/mySkills/.agent/skills/sdd-spec-writer/SKILL.md)
226
+ Especialista em Spec-Driven Development (SDD):
227
+ - **Contratos Claros**: Cria specs executáveis com precisão milimétrica.
228
+ - **Decisão Guiada**: Analisa complexidade para decidir entre execução via Humanos vs IAs.
229
+ - **Checklist de Validação**: Garante cobertura de edge cases e caminhos de erro obrigatórios.
230
+
225
231
  ### [Lead Research Assistant](file:///Users/ruy/Code/mySkills/.agent/skills/lead-research-assistant/SKILL.md)
226
232
  Inteligência comercial e qualificação de leads:
227
233
  - **Prospecção**: Busca ativa de empresas que se encaixam no Perfil de Cliente Ideal (ICP).
@@ -436,6 +442,7 @@ Você pode acessar as skills diretamente via comandos de barra no chat:
436
442
  - `/figma`: Ativa a integração MCP com o Figma Dev Mode para extração visual.
437
443
  - `/creative-design-figma`: Ativa a integração MCP Oficial usando tokens de Nuvem do Figma.
438
444
  - `/memory-spring-cleaning`: Executa uma varredura para sincronizar código e memória (docs/rules), removendo drift e arquivos legados.
445
+ - `/sdd-spec`: Ativa o gerador de especificações baseadas em Spec-Driven Development (SDD).
439
446
 
440
447
  ## 📁 Estrutura do Projeto
441
448
 
package/index.js CHANGED
@@ -54,18 +54,33 @@ program
54
54
  .command('init')
55
55
  .description('Inicializa o Antigravity no projeto atual (instala todas as skills, agents, workflows, rules e scripts)')
56
56
  .action(async () => {
57
- const sourceDir = path.join(__dirname, '.agent');
58
- const destDir = path.join(process.cwd(), '.agent');
57
+ const destRoot = process.cwd();
58
+ const sourceAgentDir = path.join(__dirname, '.agent');
59
+ const destAgentDir = path.join(destRoot, '.agent');
59
60
 
60
61
  console.log(chalk.cyan('\n🚀 Inicializando kit completo do Antigravity...\n'));
61
62
 
62
63
  try {
63
- await fs.ensureDir(destDir);
64
- await fs.copy(sourceDir, destDir);
65
- console.log(chalk.green.bold('✅ Pasta .agent instalada com sucesso!\n'));
66
- console.log(chalk.gray('Isso inclui todas as skills, agents, workflows, rules e scripts de automação.\n'));
64
+ // Copy .agent/ folder (skills, agents, workflows, rules, scripts)
65
+ await fs.ensureDir(destAgentDir);
66
+ await fs.copy(sourceAgentDir, destAgentDir);
67
+ console.log(chalk.green(' Pasta .agent instalada!'));
68
+
69
+ // Copy root rule files so Antigravity picks them up automatically
70
+ const rootRuleFiles = ['AGENTS.md', 'GEMINI.md'];
71
+ for (const ruleFile of rootRuleFiles) {
72
+ const src = path.join(__dirname, ruleFile);
73
+ const dest = path.join(destRoot, ruleFile);
74
+ if (await fs.pathExists(src)) {
75
+ await fs.copy(src, dest, { overwrite: true });
76
+ console.log(chalk.green(` ✅ ${ruleFile} instalado na raiz!`));
77
+ }
78
+ }
79
+
80
+ console.log(chalk.green.bold('\n✅ Kit inicializado com sucesso!\n'));
81
+ console.log(chalk.gray('Inclui: skills, agents, workflows, rules, scripts e AGENTS.md na raiz.\n'));
67
82
  } catch (err) {
68
- console.error(chalk.red(`\n❌ Erro ao inicializar .agent: ${err.message}\n`));
83
+ console.error(chalk.red(`\n❌ Erro ao inicializar: ${err.message}\n`));
69
84
  }
70
85
  });
71
86
 
@@ -169,12 +184,13 @@ program
169
184
 
170
185
  program
171
186
  .command('update')
172
- .description('Atualiza skills, agents e workflows do projeto atual com a versão mais recente do kit')
187
+ .description('Atualiza skills, agents, workflows e rules do projeto atual com a versão mais recente do kit')
173
188
  .option('-s, --skills', 'Atualiza apenas as skills')
174
189
  .option('-a, --agents', 'Atualiza apenas os agents')
175
190
  .option('-w, --workflows', 'Atualiza apenas os workflows')
191
+ .option('-r, --rules', 'Atualiza apenas os arquivos de rules (AGENTS.md, GEMINI.md)')
176
192
  .action(async (options) => {
177
- const updateAll = !options.skills && !options.agents && !options.workflows;
193
+ const updateAll = !options.skills && !options.agents && !options.workflows && !options.rules;
178
194
  const destRoot = process.cwd();
179
195
  const srcRoot = __dirname;
180
196
 
@@ -257,6 +273,23 @@ program
257
273
  }
258
274
  }
259
275
 
276
+ // Update root rule files (AGENTS.md, GEMINI.md)
277
+ if (updateAll || options.rules) {
278
+ const rootRuleFiles = ['AGENTS.md', 'GEMINI.md'];
279
+ for (const ruleFile of rootRuleFiles) {
280
+ const src = path.join(srcRoot, ruleFile);
281
+ const dest = path.join(destRoot, ruleFile);
282
+ if (await fs.pathExists(src)) {
283
+ try {
284
+ await fs.copy(src, dest, { overwrite: true });
285
+ console.log(chalk.green(` ✅ ${ruleFile}: atualizado na raiz`));
286
+ } catch (err) {
287
+ console.error(chalk.red(` ❌ ${ruleFile}: ${err.message}`));
288
+ }
289
+ }
290
+ }
291
+ }
292
+
260
293
  // Instalar workflows globalmente para aparecerem no / do Antigravity
261
294
  if (updateAll || options.workflows) {
262
295
  const homeDir = process.env.HOME || process.env.USERPROFILE || '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ruyfranca/myskills",
3
- "version": "1.0.29",
3
+ "version": "1.0.31",
4
4
  "description": "Biblioteca de skills customizadas para Antigravity / Claude Code",
5
5
  "main": "index.js",
6
6
  "bin": {