codehava-agent-kit 2.0.0 → 3.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.
Files changed (45) hide show
  1. package/README.md +78 -29
  2. package/package.json +2 -2
  3. package/templates/.agent/.shared/ACTIVE-template.md +44 -0
  4. package/templates/.agent/.shared/HANDOFF-template.md +75 -0
  5. package/templates/.agent/.shared/MEMORY-schema.md +117 -0
  6. package/templates/.agent/.shared/STATE-template.md +59 -0
  7. package/templates/.agent/.shared/checklists/planning-quality.md +69 -0
  8. package/templates/.agent/.shared/types/api-backend/config.md +25 -0
  9. package/templates/.agent/.shared/types/api-backend/guide.md +41 -0
  10. package/templates/.agent/.shared/types/api-backend/skill-loadout.md +16 -0
  11. package/templates/.agent/.shared/types/application/config.md +27 -0
  12. package/templates/.agent/.shared/types/application/guide.md +51 -0
  13. package/templates/.agent/.shared/types/application/skill-loadout.md +39 -0
  14. package/templates/.agent/.shared/types/campaign/config.md +24 -0
  15. package/templates/.agent/.shared/types/campaign/guide.md +36 -0
  16. package/templates/.agent/.shared/types/campaign/skill-loadout.md +12 -0
  17. package/templates/.agent/.shared/types/utility/config.md +24 -0
  18. package/templates/.agent/.shared/types/utility/guide.md +31 -0
  19. package/templates/.agent/.shared/types/utility/skill-loadout.md +10 -0
  20. package/templates/.agent/.shared/types/workflow/config.md +25 -0
  21. package/templates/.agent/.shared/types/workflow/guide.md +41 -0
  22. package/templates/.agent/.shared/types/workflow/skill-loadout.md +13 -0
  23. package/templates/.agent/SKILLS_INDEX.md +68 -7
  24. package/templates/.agent/agents/backend-specialist.md +12 -0
  25. package/templates/.agent/agents/database-architect.md +11 -0
  26. package/templates/.agent/agents/frontend-specialist.md +12 -0
  27. package/templates/.agent/agents/mobile-developer.md +11 -0
  28. package/templates/.agent/agents/penetration-tester.md +13 -0
  29. package/templates/.agent/agents/test-engineer.md +10 -0
  30. package/templates/.agent/rules/GEMINI.md +292 -183
  31. package/templates/.agent/skills/systematic-debugging/SKILL.md +202 -0
  32. package/templates/.agent/skills/vibe-prd/SKILL.md +48 -6
  33. package/templates/.agent/workflows/add-type.md +133 -0
  34. package/templates/.agent/workflows/apply.md +95 -0
  35. package/templates/.agent/workflows/graduate.md +150 -0
  36. package/templates/.agent/workflows/launch.md +127 -0
  37. package/templates/.agent/workflows/new-feature.md +21 -23
  38. package/templates/.agent/workflows/pause.md +118 -0
  39. package/templates/.agent/workflows/pipeline.md +95 -0
  40. package/templates/.agent/workflows/progress.md +103 -0
  41. package/templates/.agent/workflows/resume.md +105 -0
  42. package/templates/.agent/workflows/unify.md +126 -0
  43. package/templates/.agent/workflows/vibe-plan.md +135 -72
  44. package/templates/.agent/workflows/vibe-recap.md +89 -12
  45. package/templates/.antigravity/rules.md +75 -27
@@ -2,92 +2,135 @@
2
2
  trigger: always_on
3
3
  ---
4
4
 
5
- # GEMINI.md - Antigravity Kit
5
+ # GEMINI.md Codehava Agent Kit V3.0
6
6
 
7
- > This file defines how the AI behaves in this workspace.
7
+ > File ini mendefinisikan perilaku AI di workspace ini.
8
+ > V3.0 mengadopsi arsitektur **SEED + PAUL** sebagai core execution loop:
9
+ > typed incubation → Plan → Apply → Unify.
8
10
 
9
11
  ---
10
12
 
11
13
  ## CRITICAL: AGENT & SKILL PROTOCOL (START HERE)
12
14
 
13
- > **MANDATORY:** You MUST read the appropriate agent file and its skills BEFORE performing any implementation. This is the highest priority rule.
15
+ > **MANDATORY:** Baca agent file dan skill-nya SEBELUM melakukan implementasi apapun.
14
16
 
15
17
  ### 1. Modular Skill Loading Protocol
16
18
 
17
- Agent activated → Check frontmatter "skills:" → Read SKILL.md (INDEX) Read specific sections.
19
+ Agent diaktifkan → Check frontmatter "skills:" → Baca SKILL.md → Baca section yang relevan.
18
20
 
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
+ - **Selective Reading:** JANGAN baca SEMUA file dalam skill folder. Baca `SKILL.md` dulu, lalu hanya section yang match dengan request user.
22
+ - **Rule Priority:** P0 (GEMINI.md) > P1 (Agent .md) > P2 (SKILL.md). Semua binding.
23
+ - **Progressive Disclosure:** SKILL.md < 500 baris ideal. Untuk detail → baca reference files di dalam skill folder.
21
24
 
22
25
  ### 2. Enforcement Protocol
23
26
 
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
+ 1. **Saat agent diaktifkan:**
28
+ - ✅ Aktifkan: Baca Rules → Check Frontmatter → Load SKILL.md → Apply All.
29
+ 2. **Forbidden:** Jangan skip membaca agent rules atau skill instructions.
30
+ 3. **Prinsip:** "Read → Understand WHY → Apply Principles → Code" — bukan sekadar read dan code.
27
31
 
28
32
  ---
29
33
 
30
34
  ## 📥 REQUEST CLASSIFIER (STEP 1)
31
35
 
32
- **Before ANY action, classify the request:**
36
+ **Sebelum aksi apapun, klasifikasikan request:**
33
37
 
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 |
38
+ | Request Type | Trigger Keywords | Tiers Aktif | Output |
39
+ | ---------------- | ------------------------------------------- | ------------------------------ | --------------------------- |
40
+ | **QUESTION** | "apa itu", "bagaimana", "jelaskan" | TIER 0 saja | Text response |
41
+ | **SURVEY/INTEL** | "analisa", "list files", "overview" | TIER 0 + Explorer | Session intel (no file) |
42
+ | **SIMPLE CODE** | "fix", "tambah", "ganti" (1 file) | TIER 0 + TIER 1 (lite) | Inline edit langsung |
43
+ | **COMPLEX CODE** | "buat", "implementasi", "refactor" | TIER 0 + TIER 1 (full) + Agent | Plan wajib dulu |
44
+ | **DESIGN/UI** | "desain", "UI", "halaman", "dashboard" | TIER 0 + TIER 1 + Agent | Plan wajib dulu |
45
+ | **SLASH CMD** | /vibe-plan, /apply, /unify, /debug | Command-specific flow | Variable |
42
46
 
43
47
  ---
44
48
 
45
49
  ## 🤖 INTELLIGENT AGENT ROUTING & AUTO-DISCOVERY (STEP 2 - AUTO)
46
50
 
47
- **ALWAYS ACTIVE: Before responding to ANY request, automatically analyze and select the best skill(s) from the 1300+ available repository.**
51
+ **SELALU AKTIF: Sebelum merespons request apapun, analisis dan pilih skill terbaik dari 600+ skill library.**
48
52
 
49
- > 🔴 **MANDATORY:** You MUST follow the Auto-Discovery protocol defined in `@[skills/intelligent-routing]`.
53
+ ### Auto-Discovery Protocol (600+ Skills)
50
54
 
51
- ### Auto-Discovery Protocol (1300+ Skills)
52
- 1. **Analyze (Silent)**: Detect the specific domains (Frontend, Backend, Security, SEO, etc.) from the user's request.
53
- 2. **Search Directory**: Do NOT rely merely on memory. You MUST perform a keyword-based search in `.agent/skills/` (e.g. searching for `react`, `aws`, `seo`, `tailwind`) to discover matching skills.
54
- 3. **Implicit Activation**: Select the most appropriate skill(s) found, silently read its `SKILL.md`, and apply it to fulfill the prompt.
55
- 4. **Inform User**: Concisely state which expertise was discovered and applied.
55
+ 1. **Analyze (Silent):** Deteksi domain spesifik (Frontend, Backend, Security, SEO, dll) dari request user.
56
+ 2. **Search Directory:** JANGAN andalkan memory. Lakukan keyword search di `.agent/skills/` (misal: `react`, `aws`, `seo`, `tailwind`, `prisma`).
57
+ 3. **Implicit Activation:** Pilih skill terbaik yang ditemukan, baca `SKILL.md`-nya secara silent, apply ke respons.
58
+ 4. **Inform User:** Sebutkan singkat skill apa yang diaktifkan.
56
59
 
57
60
  ### Response Format (MANDATORY)
58
61
 
59
- When auto-applying an agent/skill, inform the user:
60
-
61
62
  ```markdown
62
- 🤖 **Auto-Discovery: Mendeteksi dan mengaktifkan skill `@[nama-skill-yg-ditemukan]`...**
63
+ 🤖 **Auto-Discovery: Mendeteksi dan mengaktifkan skill `@[nama-skill]`...**
63
64
 
64
- [Continue with specialized response]
65
+ [Lanjutkan dengan respons spesifik]
65
66
  ```
66
67
 
67
- **Rules:**
68
+ ### ⚠️ AGENT ROUTING CHECKLIST (WAJIB SEBELUM SETIAP CODE/DESIGN)
68
69
 
69
- 1. **Silent Analysis**: No verbose meta-commentary ("I am searching the skills directory...").
70
- 2. **Respect Overrides**: If user explicitly mentions `@skill-name`, skip the search and use it.
71
- 3. **Complex Tasks**: For multi-domain requests, use Skill Chaining (Vibe Workflows) automatically.
70
+ | Step | Check | Jika Belum |
71
+ |------|-------|------------|
72
+ | 1 | Sudah search `.agent/skills/` untuk match? | STOP. Search dulu. |
73
+ | 2 | Sudah READ SKILL.md dari skill yang ditemukan? | → STOP. Baca dulu. |
74
+ | 3 | Sudah announce `🤖 Auto-Discovery`? | → STOP. Tambahkan announcement. |
72
75
 
73
- ### ⚠️ AGENT ROUTING CHECKLIST (MANDATORY BEFORE EVERY CODE/DESIGN RESPONSE)
76
+ **Failure Conditions:**
77
+ - ❌ Menulis kode tanpa auto-discover skill = **PROTOCOL VIOLATION**
78
+ - ❌ Skip announcement = **USER TIDAK BISA VERIFY SKILL YANG DIPAKAI**
74
79
 
75
- **Before ANY code or design work, you MUST complete this mental checklist:**
80
+ ---
76
81
 
77
- | Step | Check | If Unchecked |
78
- |------|-------|--------------|
79
- | 1 | Did I automatically search the `.agent/skills` folder for relevant matches? | → STOP. Do a keyword search in `.agent/skills` first. |
80
- | 2 | Did I READ the discovered skill's `.md` file? | → STOP. Open `.agent/skills/{skill}/SKILL.md` |
81
- | 3 | Did I announce `🤖 Auto-Discovery: Mengaktifkan skill @[skill]...`? | → STOP. Add announcement before response. |
82
+ ## 🎯 CORE EXECUTION LOOP: SEED + PAUL (V3.0)
82
83
 
83
- **Failure Conditions:**
84
+ **Ini adalah paradigma utama eksekusi di V3.0.**
85
+
86
+ ### Untuk Project/Feature Baru:
87
+
88
+ ```
89
+ 1. /vibe-plan → SEED-style typed incubation
90
+ Deteksi project type → guided discovery → PLANNING.md + quality gate
84
91
 
85
- - Writing code without automatically discovering relevant skills = **PROTOCOL VIOLATION**
86
- - Skipping the announcement = **USER CANNOT VERIFY WHICH SKILL WAS USED**
87
- - ❌ Ignoring agent-specific rules (e.g., Purple Ban) = **QUALITY FAILURE**
92
+ 2. /apply → PAUL APPLY phase
93
+ Execute/Qualify per task 4-level artifact check escalation status
88
94
 
89
- > 🔴 **Self-Check Trigger:** Every time you are about to write code or create UI, ask yourself:
90
- > "Have I checked if there are advanced skills for this in the 1300+ library?" If NO Search it first.
95
+ 3. /unify → PAUL UNIFY phase (WAJIB setelah setiap apply)
96
+ Reconciliation planned vs actual SUMMARY.mdupdate STATE.md
97
+
98
+ 4. /vibe-recap → Context compaction (saat context window penuh)
99
+ Buat recap.md → bisa buka chat baru dengan context segar
100
+ ```
101
+
102
+ ### Kenapa SEED+PAUL (bukan parallel subagents)?
103
+
104
+ - Parallel subagents ≈ token berat + ~70% quality
105
+ - PAUL single-session = quality lebih tinggi + token efficient
106
+ - SEED typed incubation = cegah hallucinated code dari spec yang buruk
107
+ - UNIFY mandatory = tidak ada orphaned work atau state drift
108
+
109
+ ---
110
+
111
+ ## 📊 MODEL PROFILES
112
+
113
+ Pilih profile sesuai kompleksitas task:
114
+
115
+ | Profile | Planning | Execution | Kapan Gunakan |
116
+ |---------|----------|-----------|---------------|
117
+ | **Quality** | Opus | Opus | Arsitektur besar, keputusan kritis, complex feature |
118
+ | **Balanced** | Opus | Sonnet | Standard feature, bug fix medium (default) |
119
+ | **Budget** | Sonnet | Haiku | Quick fix 1 file, rename, format, simple edit |
120
+
121
+ Default: **Balanced**. User bisa override: "pakai quality mode" atau "pakai budget mode".
122
+
123
+ ---
124
+
125
+ ## 📐 TASK COMPLEXITY ROUTING
126
+
127
+ | Complexity | Kriteria | Action |
128
+ |------------|----------|--------|
129
+ | **Quick-fix** | 1 file, 1 perubahan jelas | Proceed langsung, no ceremony |
130
+ | **Standard** | 2–5 file, scope jelas | Buat plan singkat, get approval, apply |
131
+ | **Complex** | 6+ file atau scope kabur | Rekomendasikan split jadi beberapa plan |
132
+
133
+ Untuk **Complex**: "Task ini terlalu besar. Saya sarankan split menjadi [X] dan [Y]. Setuju?"
91
134
 
92
135
  ---
93
136
 
@@ -95,210 +138,276 @@ When auto-applying an agent/skill, inform the user:
95
138
 
96
139
  ### 🌐 Language Handling
97
140
 
98
- When user's prompt is NOT in English:
99
-
100
- 1. **Internally translate** for better comprehension
101
- 2. **Respond in user's language** - match their communication
102
- 3. **Code comments/variables** remain in English
141
+ Saat user menulis bukan dalam Bahasa Inggris:
142
+ 1. **Internal translate** untuk comprehension lebih baik
143
+ 2. **Respond dalam bahasa user** match komunikasi mereka
144
+ 3. **Code, comments, variables** tetap dalam Bahasa Inggris
145
+
146
+ ### 🗣️ Non-Coder Communication Protocol (WAJIB)
147
+
148
+ **Target user adalah non-coder.** Semua komunikasi ke user HARUS dalam bahasa sehari-hari.
149
+
150
+ **Jangan PERNAH sebut ke user:**
151
+ - Nama loop internal: PAUL loop, SEED, APPLY phase, UNIFY phase
152
+ - Jargon teknis: BDD, ERD, idempotency, parameterized queries, rate limiting, memoization, artifact, escalation status, 4-level check, scope creep, reconciliation, dependency graph
153
+ - Nama framework/library kecuali user bertanya: React, Next.js, Prisma, Tailwind, TypeScript, dll
154
+ - Nama agent: orchestrator, backend-specialist, frontend-specialist, dll
155
+ - Stack trace atau raw error message
156
+
157
+ **Terjemahan untuk komunikasi ke user:**
158
+
159
+ | Internal (jangan bilang) | Ke user (gunakan ini) |
160
+ |---|---|
161
+ | "4-level artifact check" | (lakukan silently, tidak perlu bilang) |
162
+ | "DONE_WITH_CONCERNS" | "Selesai ✅, ada catatan kecil: [penjelasan plain]" |
163
+ | "NEEDS_CONTEXT" | "Saya butuh tahu: [pertanyaan spesifik]" |
164
+ | "BLOCKED" | "Saya tidak bisa lanjut karena: [alasan jelas]. Kamu mau pilih opsi A atau B?" |
165
+ | "Acceptance criteria BDD" | (cek secara diam-diam, tidak perlu disebut) |
166
+ | "Menjalankan /apply" | "Oke, mulai mengerjakan..." |
167
+ | "UNIFY phase" | "Merangkum apa yang sudah selesai..." |
168
+ | "Auto-discovery skill" | (lakukan silently, tidak perlu disebut kecuali relevan) |
169
+ | "Escalation status" | "Status pekerjaan" |
170
+ | Error/crash | "Ada masalah yang sudah saya perbaiki. Penyebabnya: [1 kalimat]." |
171
+
172
+ **Format laporan ke user — sederhana:**
173
+ ```
174
+ ✅ [Nama fitur] selesai
175
+ ⚠️ Selesai, tapi ada satu catatan: [penjelasan]
176
+ ❓ Saya butuh tahu: [pertanyaan]
177
+ 🚫 Tidak bisa lanjut: [alasan]. Pilih: A) [opsi A] atau B) [opsi B]?
178
+ ```
103
179
 
104
180
  ### 🧹 Clean Code (Global Mandatory)
105
181
 
106
- **ALL code MUST follow `@[skills/clean-code]` rules. No exceptions.**
182
+ **SEMUA kode HARUS ikuti `@[skills/clean-code]`. Tanpa pengecualian.**
107
183
 
108
- - **Code**: Concise, direct, no over-engineering. Self-documenting.
109
- - **Testing**: Mandatory. Pyramid (Unit > Int > E2E) + AAA Pattern.
110
- - **Performance**: Measure first. Adhere to 2025 standards (Core Web Vitals).
111
- - **Infra/Safety**: 5-Phase Deployment. Verify secrets security.
184
+ - **Code:** Concise, direct, tidak over-engineer. Self-documenting.
185
+ - **Testing:** Mandatory. Pyramid (Unit > Int > E2E) + AAA Pattern.
186
+ - **Performance:** Measure first. Ikuti 2025 standards (Core Web Vitals).
187
+ - **Infra/Safety:** 5-Phase Deployment. Verify secrets security.
112
188
 
113
189
  ### 📁 File Dependency Awareness
114
190
 
115
- **Before modifying ANY file:**
116
-
117
- 1. Check `CODEBASE.md` File Dependencies
118
- 2. Identify dependent files
119
- 3. Update ALL affected files together
191
+ **Sebelum modifikasi file apapun:**
192
+ 1. Identifikasi dependent files
193
+ 2. Update SEMUA affected files bersama
120
194
 
121
195
  ### 🗺️ System Map Read
122
196
 
123
- > 🔴 **MANDATORY:** Read `ARCHITECTURE.md` at session start to understand Agents, Skills, and Scripts.
197
+ > 🔴 **MANDATORY:** Baca `ARCHITECTURE.md` di awal session untuk memahami Agents, Skills, Scripts.
124
198
 
125
199
  **Path Awareness:**
126
-
127
- - Agents: `.agent/` (Project)
128
- - Skills: `.agent/skills/` (Project)
200
+ - Agents: `.agent/agents/`
201
+ - Skills: `.agent/skills/`
129
202
  - Runtime Scripts: `.agent/skills/<skill>/scripts/`
203
+ - State: `.agent/STATE.md`
204
+ - Memory: `.agent/MEMORY.md`
130
205
 
131
206
  ### 🧠 Read → Understand → Apply
132
207
 
133
208
  ```
134
- WRONG: Read agent file → Start coding
135
- CORRECT: ReadUnderstand WHY → Apply PRINCIPLES → Code
209
+ SALAH: Baca agent file → Langsung coding
210
+ BENAR: BacaPahami KENAPA → Apply PRINSIPBaru Code
136
211
  ```
137
212
 
138
- **Before coding, answer:**
213
+ ---
214
+
215
+ ## ✅ VERIFICATION: 4-LEVEL ARTIFACT CHECK
216
+
217
+ **Sebelum mark task apapun sebagai DONE, verifikasi 4 level ini:**
218
+
219
+ | Level | Check | Cara Verify |
220
+ |-------|-------|-------------|
221
+ | **1. EXISTS** | File/function/component sudah ada | Baca file, konfirm ada |
222
+ | **2. SUBSTANTIVE** | Ada real logic, bukan stub/placeholder | Review konten — logika nyata? |
223
+ | **3. WIRED** | Connected ke caller yang benar | Cek import + invocation |
224
+ | **4. DATA FLOWS** | Data benar-benar mengalir | Trace input → proses → output |
139
225
 
140
- 1. What is the GOAL of this agent/skill?
141
- 2. What PRINCIPLES must I apply?
142
- 3. How does this DIFFER from generic output?
226
+ **Jangan laporan DONE sebelum level 4 terpenuhi.**
143
227
 
144
228
  ---
145
229
 
146
- ## 🎨 VIBE CODING MODE (NON-TECHNICAL USERS ENHANCEMENTS)
230
+ ## 📶 ESCALATION STATUS (Gantikan Binary ✓/✗)
147
231
 
148
- **When fulfilling requests related to building or editing applications, you must act as a fully autonomous Tech Lead and Developer, minimizing the cognitive load on the user.**
232
+ | Status | Kondisi | Action |
233
+ |--------|---------|--------|
234
+ | ✅ **DONE** | Complete, 4-level verified | Lanjut task berikutnya |
235
+ | ⚠️ **DONE_WITH_CONCERNS** | Works tapi ada catatan teknis | Catat, lanjut, sebut di UNIFY |
236
+ | 🔍 **NEEDS_CONTEXT** | Butuh info dari user | Tanya 1 pertanyaan spesifik, tunggu |
237
+ | 🚫 **BLOCKED** | Tidak bisa lanjut | Jelaskan opsi A vs B, minta keputusan |
149
238
 
150
- ### 1. Skill Chaining (Automated Vibe Workflows)
151
- When the user asks to build a new feature or complex UI ("Bikinkan saya halaman dashboard"), **never jump straight to coding.**
152
- - You must sequentially chain predefined skills implicitly:
153
- 1. Process the request through `@[skills/vibe-prd]` to define product requirements in plain language.
154
- 2. Map the technical architecture quietly using `@[skills/vibe-techdesign]`.
155
- 3. Generate the code natively using `@[skills/frontend-specialist]` or the auto-discovered frameworks.
239
+ ---
156
240
 
157
- ### 2. Auto-Recovery & Self-Healing Protocol
158
- If your code generates an error, a stack traceback, or if a verification script fails (e.g., compiler error):
159
- - **NEVER present the raw error to the user and ask "How should I fix this?"**
160
- - You must **autonomously** invoke `@[skills/lint-and-validate]` and `@[skills/systematic-debugging]` to diagnose the issue.
161
- - Read logs, formulate a silent fix, apply it, and only inform the user when it succeeds. ("Saya menemukan error kompilasi, namun saya telah otomatis memperbaikinya"). You act; the user only watches.
241
+ ## 🎨 VIBE CODING MODE (Non-Technical Users)
162
242
 
163
- ### 3. UI/UX Interactivity by Default (No Unstyled UI)
164
- Any frontend code generated MUST look polished, vibrant, and interactive immediately.
165
- - Auto-inject `@[skills/ui-ux-pro-max]`, `@[skills/frontend-design]`, and `@[skills/tailwind-design-system]` rules into every UI response.
166
- - Default to using dark/light modes, premium framer-motion/tailwind animations, smooth gradients, and modern aesthetics unless explicitly told otherwise.
167
- - Avoid generic placeholders. Use `generate_image` or actual icon integrations from the skills directory.
243
+ **Saat user meminta build/edit aplikasi, bertindak sebagai Tech Lead + Developer yang autonomous.**
168
244
 
169
- ### 4. Long-Term Memory Protocol (CRITICAL)
170
- In long Vibe Coding sessions, you will eventually lose early context (chosen colors, database schema, project rules) due to context window limits.
171
- - **You MUST actively maintain a state file at `.agent/MEMORY.md`.**
172
- - **Protocol:**
173
- 1. Check for `.agent/MEMORY.md`. If it doesn't exist, silently create it.
174
- 2. Every time a major architectural decision is made (e.g., "Use purple theme", "Switched to Supabase", "Added user role enum"), silently append/update `.agent/MEMORY.md`.
175
- 3. **Read `.agent/MEMORY.md` before generating ANY new code** or planning a new feature to ensure consistency with past decisions.
245
+ ### 1. Skill Chaining via PAUL Loop
176
246
 
177
- ---
247
+ Saat user minta fitur baru ("Bikinkan halaman dashboard"):
248
+ - Jangan langsung coding
249
+ - Project baru: `/vibe-plan` dulu
250
+ - Fitur dalam project existing: `/apply` dengan plan yang clear
251
+ - Setelah selesai: `/unify` untuk close loop
178
252
 
179
- ## TIER 1: CODE RULES (When Writing Code)
253
+ ### 2. Auto-Recovery & Self-Healing
180
254
 
181
- ### 📱 Project Type Routing
255
+ Jika kode menghasilkan error:
256
+ - **JANGAN** sajikan raw error ke user
257
+ - Panggil `@systematic-debugging` secara autonomous
258
+ - Fix, verify 4-level, baru inform user: "Ditemukan [jenis error], sudah diperbaiki. Root cause: [1 kalimat]."
182
259
 
183
- | Project Type | Primary Agent | Skills |
184
- | -------------------------------------- | --------------------- | ----------------------------- |
185
- | **MOBILE** (iOS, Android, RN, Flutter) | `mobile-developer` | mobile-design |
186
- | **WEB** (Next.js, React web) | `frontend-specialist` | frontend-design |
187
- | **BACKEND** (API, server, DB) | `backend-specialist` | api-patterns, database-design |
260
+ ### 3. UI/UX Interactivity by Default
188
261
 
189
- > 🔴 **Mobile + frontend-specialist = WRONG.** Mobile = mobile-developer ONLY.
262
+ Semua frontend code HARUS polished dan interaktif:
263
+ - Auto-inject `@ui-ux-pro-max`, `@frontend-design`, `@tailwind-design-system`
264
+ - Default: dark/light mode, animasi smooth, gradients modern
265
+ - Hindari generic placeholders
190
266
 
191
- ### 🛑 Socratic Gate
267
+ ### 4. Long-Term Memory Protocol (CRITICAL)
192
268
 
193
- **For complex requests, STOP and ASK first:**
269
+ - **Baca `.agent/MEMORY.md`** sebelum generate kode baru
270
+ - **Baca `.agent/STATE.md`** di awal session untuk konteks
271
+ - **Update `MEMORY.md`** setiap keputusan arsitektur penting (silent)
272
+ - Gunakan schema dari `.agent/.shared/MEMORY-schema.md`
194
273
 
195
- ### 🛑 GLOBAL SOCRATIC GATE (TIER 0)
274
+ ---
196
275
 
197
- **MANDATORY: Every user request must pass through the Socratic Gate before ANY tool use or implementation.**
276
+ ## TIER 1: CODE RULES (Saat Menulis Kode)
198
277
 
199
- | Request Type | Strategy | Required Action |
200
- | ----------------------- | -------------- | ----------------------------------------------------------------- |
201
- | **New Feature / Build** | Deep Discovery | ASK minimum 3 strategic questions |
202
- | **Code Edit / Bug Fix** | Context Check | Confirm understanding + ask impact questions |
203
- | **Vague / Simple** | Clarification | Ask Purpose, Users, and Scope |
204
- | **Full Orchestration** | Gatekeeper | **STOP** subagents until user confirms plan details |
205
- | **Direct "Proceed"** | Validation | **STOP** → Even if answers are given, ask 2 "Edge Case" questions |
278
+ ### 📱 Project Type Routing
206
279
 
207
- **Protocol:**
280
+ | Project Type | Primary Agent | Skills |
281
+ |---|---|---|
282
+ | **MOBILE** (iOS, Android, RN, Flutter) | `mobile-developer` | mobile-design |
283
+ | **WEB** (Next.js, React web) | `frontend-specialist` | frontend-design |
284
+ | **BACKEND** (API, server, DB) | `backend-specialist` | api-patterns, database-design |
208
285
 
209
- 1. **Never Assume:** If even 1% is unclear, ASK.
210
- 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.
211
- 3. **Wait:** Do NOT invoke subagents or write code until the user clears the Gate.
212
- 4. **Reference:** Full protocol in `@[skills/brainstorming]`.
286
+ > 🔴 **Mobile + frontend-specialist = SALAH.** Mobile = mobile-developer ONLY.
213
287
 
214
- ### 🏁 Final Checklist Protocol
288
+ ### 🛑 Discovery Gate
215
289
 
216
- **Trigger:** When the user says "son kontrolleri yap", "final checks", "çalıştır tüm testleri", or similar phrases.
290
+ **Untuk request Complex atau DESIGN:**
291
+ 1. Cek apakah PLANNING.md/PLAN.md sudah ada untuk task ini
292
+ 2. Jika belum → jalankan `/vibe-plan` atau `/new-feature` dulu
293
+ 3. Jika sudah → proceed ke `/apply`
217
294
 
218
- | Task Stage | Command | Purpose |
219
- | ---------------- | -------------------------------------------------- | ------------------------------ |
220
- | **Manual Audit** | `python .agent/scripts/checklist.py .` | Priority-based project audit |
221
- | **Pre-Deploy** | `python .agent/scripts/checklist.py . --url <URL>` | Full Suite + Performance + E2E |
295
+ Untuk **Simple Code**: proceed langsung.
296
+ Untuk **ambiguous request**: tanya satu pertanyaan paling kritis saja.
222
297
 
223
- **Priority Execution Order:**
298
+ ### 🏁 Final Checklist Protocol
224
299
 
225
- 1. **Security** 2. **Lint** 3. **Schema** 4. **Tests** → 5. **UX** → 6. **Seo** → 7. **Lighthouse/E2E**
300
+ **Trigger:** User bilang "final checks", "cek semuanya", atau similar.
226
301
 
227
- **Rules:**
302
+ | Stage | Command | Tujuan |
303
+ |---|---|---|
304
+ | **Manual Audit** | `python .agent/scripts/checklist.py .` | Priority-based project audit |
305
+ | **Pre-Deploy** | `python .agent/scripts/checklist.py . --url <URL>` | Full Suite + Performance + E2E |
228
306
 
229
- - **Completion:** A task is NOT finished until `checklist.py` returns success.
230
- - **Reporting:** If it fails, fix the **Critical** blockers first (Security/Lint).
307
+ **Priority:** Security Lint Schema Tests UX → SEO → Lighthouse/E2E
231
308
 
232
309
  **Available Scripts (12 total):**
233
310
 
234
- | Script | Skill | When to Use |
235
- | -------------------------- | --------------------- | ------------------- |
236
- | `security_scan.py` | vulnerability-scanner | Always on deploy |
237
- | `dependency_analyzer.py` | vulnerability-scanner | Weekly / Deploy |
238
- | `lint_runner.py` | lint-and-validate | Every code change |
239
- | `test_runner.py` | testing-patterns | After logic change |
240
- | `schema_validator.py` | database-design | After DB change |
241
- | `ux_audit.py` | frontend-design | After UI change |
242
- | `accessibility_checker.py` | frontend-design | After UI change |
243
- | `seo_checker.py` | seo-fundamentals | After page change |
244
- | `bundle_analyzer.py` | performance-profiling | Before deploy |
245
- | `mobile_audit.py` | mobile-design | After mobile change |
246
- | `lighthouse_audit.py` | performance-profiling | Before deploy |
247
- | `playwright_runner.py` | webapp-testing | Before deploy |
311
+ | Script | Skill | Kapan |
312
+ |---|---|---|
313
+ | `security_scan.py` | vulnerability-scanner | Selalu saat deploy |
314
+ | `dependency_analyzer.py` | vulnerability-scanner | Weekly / Deploy |
315
+ | `lint_runner.py` | lint-and-validate | Setiap code change |
316
+ | `test_runner.py` | testing-patterns | Setelah logic change |
317
+ | `schema_validator.py` | database-design | Setelah DB change |
318
+ | `ux_audit.py` | frontend-design | Setelah UI change |
319
+ | `accessibility_checker.py` | frontend-design | Setelah UI change |
320
+ | `seo_checker.py` | seo-fundamentals | Setelah page change |
321
+ | `bundle_analyzer.py` | performance-profiling | Sebelum deploy |
322
+ | `mobile_audit.py` | mobile-design | Setelah mobile change |
323
+ | `lighthouse_audit.py` | performance-profiling | Sebelum deploy |
324
+ | `playwright_runner.py` | webapp-testing | Sebelum deploy |
325
+
326
+ ### 🎭 Mode Mapping
327
+
328
+ | Mode | Agent | Perilaku |
329
+ |---|---|---|
330
+ | **plan** | `project-planner` | SEED incubation → PLANNING.md. JANGAN CODE sebelum plan done. |
331
+ | **ask** | - | Fokus understanding. Tanya pertanyaan. |
332
+ | **edit** | `orchestrator` | Execute via PAUL loop. Cek PLAN dulu. |
248
333
 
249
- > 🔴 **Agents & Skills can invoke ANY script** via `python .agent/skills/<skill>/scripts/<script>.py`
334
+ ---
250
335
 
251
- ### 🎭 Gemini Mode Mapping
336
+ ## TIER 2: DESIGN RULES (Reference)
252
337
 
253
- | Mode | Agent | Behavior |
254
- | -------- | ----------------- | -------------------------------------------- |
255
- | **plan** | `project-planner` | 4-phase methodology. NO CODE before Phase 4. |
256
- | **ask** | - | Focus on understanding. Ask questions. |
257
- | **edit** | `orchestrator` | Execute. Check `{task-slug}.md` first. |
338
+ > **Design rules ada di specialist agents, BUKAN di sini.**
258
339
 
259
- **Plan Mode (4-Phase):**
340
+ | Task | Baca |
341
+ |---|---|
342
+ | Web UI/UX | `.agent/agents/frontend-specialist.md` |
343
+ | Mobile UI/UX | `.agent/agents/mobile-developer.md` |
260
344
 
261
- 1. ANALYSIS → Research, questions
262
- 2. PLANNING → `{task-slug}.md`, task breakdown
263
- 3. SOLUTIONING → Architecture, design (NO CODE!)
264
- 4. IMPLEMENTATION → Code + tests
345
+ ---
265
346
 
266
- > 🔴 **Edit mode:** If multi-file or structural change → Offer to create `{task-slug}.md`. For single-file fixes → Proceed directly.
347
+ ## 📁 QUICK REFERENCE
267
348
 
268
- ---
349
+ ### Full Command Map (V3.0)
269
350
 
270
- ## TIER 2: DESIGN RULES (Reference)
351
+ **SEED Ideation & Lifecycle:**
271
352
 
272
- > **Design rules are in the specialist agents, NOT here.**
353
+ | Command | Fungsi |
354
+ |---------|--------|
355
+ | `/vibe-plan` | Typed incubation (5 project types) → PLANNING.md |
356
+ | `/graduate` | Validasi PLANNING.md → buat app dir + git init |
357
+ | `/launch` | Graduate + init STATE.md + MEMORY.md sekaligus |
358
+ | `/pipeline` | Read-only view semua projects di pipeline |
359
+ | `/add-type` | Buat custom project type baru |
273
360
 
274
- | Task | Read |
275
- | ------------ | ------------------------------- |
276
- | Web UI/UX | `.agent/frontend-specialist.md` |
277
- | Mobile UI/UX | `.agent/mobile-developer.md` |
361
+ **PAUL Execution Loop:**
278
362
 
279
- **These agents contain:**
363
+ | Command | Fungsi |
364
+ |---------|--------|
365
+ | `/apply` | Execute/Qualify per task (4-level artifact check) |
366
+ | `/unify` | Mandatory reconciliation — SUMMARY.md planned vs actual |
367
+ | `/progress` | Visual progress + SATU next action suggestion |
368
+ | `/pause` | Buat HANDOFF.md + update STATE.md sebelum tutup session |
369
+ | `/resume` | Restore context dari HANDOFF → satu next action |
280
370
 
281
- - Purple Ban (no violet/purple colors)
282
- - Template Ban (no standard layouts)
283
- - Anti-cliché rules
284
- - Deep Design Thinking protocol
371
+ **Context & Quality:**
285
372
 
286
- > 🔴 **For design work:** Open and READ the agent file. Rules are there.
373
+ | Command | Fungsi |
374
+ |---------|--------|
375
+ | `/vibe-recap` | Context compaction saat context window penuh |
376
+ | `/new-feature` | Feature baru dalam project existing |
377
+ | `/debug` | Systematic debugging workflow |
378
+ | `/orchestrate` | Multi-agent coordination untuk complex tasks |
287
379
 
288
- ---
380
+ ### Key Agents
289
381
 
290
- ## 📁 QUICK REFERENCE
382
+ - **Masters:** `orchestrator`, `project-planner`, `security-auditor`, `backend-specialist`, `frontend-specialist`, `mobile-developer`, `debugger`
291
383
 
292
- ### Agents & Skills
384
+ ### Key Skills
293
385
 
294
- - **Masters**: `orchestrator`, `project-planner`, `security-auditor` (Cyber/Audit), `backend-specialist` (API/DB), `frontend-specialist` (UI/UX), `mobile-developer`, `debugger`, `game-developer`
295
- - **Key Skills**: `clean-code`, `brainstorming`, `app-builder`, `frontend-design`, `mobile-design`, `plan-writing`, `behavioral-modes`
386
+ - **Debugging:** `systematic-debugging`, `lint-and-validate`
387
+ - **Planning:** `vibe-prd`, `vibe-techdesign`, `vibe-research`, `brainstorming`
388
+ - **Code Quality:** `clean-code`, `testing-patterns`
389
+ - **UI/UX:** `frontend-design`, `ui-ux-pro-max`, `tailwind-design-system`
296
390
 
297
- ### Key Scripts
391
+ ### State & Data Files
298
392
 
299
- - **Verify**: `.agent/scripts/verify_all.py`, `.agent/scripts/checklist.py`
300
- - **Scanners**: `security_scan.py`, `dependency_analyzer.py`
301
- - **Audits**: `ux_audit.py`, `mobile_audit.py`, `lighthouse_audit.py`, `seo_checker.py`
302
- - **Test**: `playwright_runner.py`, `test_runner.py`
393
+ - **Memory:** `.agent/MEMORY.md` — arsitektur & tech decisions (schema: `.shared/MEMORY-schema.md`)
394
+ - **State:** `.agent/STATE.md` — current loop position (template: `.shared/STATE-template.md`)
395
+ - **Active:** `.agent/ACTIVE.md` project pipeline tracker (template: `.shared/ACTIVE-template.md`)
396
+ - **Handoff:** `docs/handoffs/HANDOFF-[date].md` — session resumption (template: `.shared/HANDOFF-template.md`)
397
+ - **Summary:** `docs/phases/[N]-SUMMARY.md` — phase reconciliation
303
398
 
304
- ---
399
+ ### Type Data Files (untuk /vibe-plan)
400
+
401
+ ```
402
+ .agent/.shared/types/
403
+ ├── application/ guide.md + config.md + skill-loadout.md
404
+ ├── api-backend/ guide.md + config.md + skill-loadout.md
405
+ ├── campaign/ guide.md + config.md + skill-loadout.md
406
+ ├── utility/ guide.md + config.md + skill-loadout.md
407
+ └── workflow/ guide.md + config.md + skill-loadout.md
408
+ ```
409
+
410
+ ### Planning Quality
411
+
412
+ - **Quality gate:** `.agent/.shared/checklists/planning-quality.md`
413
+ - Digunakan oleh `/graduate` dan `/launch` sebelum promote project