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.
- package/README.md +78 -29
- package/package.json +2 -2
- package/templates/.agent/.shared/ACTIVE-template.md +44 -0
- package/templates/.agent/.shared/HANDOFF-template.md +75 -0
- package/templates/.agent/.shared/MEMORY-schema.md +117 -0
- package/templates/.agent/.shared/STATE-template.md +59 -0
- package/templates/.agent/.shared/checklists/planning-quality.md +69 -0
- package/templates/.agent/.shared/types/api-backend/config.md +25 -0
- package/templates/.agent/.shared/types/api-backend/guide.md +41 -0
- package/templates/.agent/.shared/types/api-backend/skill-loadout.md +16 -0
- package/templates/.agent/.shared/types/application/config.md +27 -0
- package/templates/.agent/.shared/types/application/guide.md +51 -0
- package/templates/.agent/.shared/types/application/skill-loadout.md +39 -0
- package/templates/.agent/.shared/types/campaign/config.md +24 -0
- package/templates/.agent/.shared/types/campaign/guide.md +36 -0
- package/templates/.agent/.shared/types/campaign/skill-loadout.md +12 -0
- package/templates/.agent/.shared/types/utility/config.md +24 -0
- package/templates/.agent/.shared/types/utility/guide.md +31 -0
- package/templates/.agent/.shared/types/utility/skill-loadout.md +10 -0
- package/templates/.agent/.shared/types/workflow/config.md +25 -0
- package/templates/.agent/.shared/types/workflow/guide.md +41 -0
- package/templates/.agent/.shared/types/workflow/skill-loadout.md +13 -0
- package/templates/.agent/SKILLS_INDEX.md +68 -7
- package/templates/.agent/agents/backend-specialist.md +12 -0
- package/templates/.agent/agents/database-architect.md +11 -0
- package/templates/.agent/agents/frontend-specialist.md +12 -0
- package/templates/.agent/agents/mobile-developer.md +11 -0
- package/templates/.agent/agents/penetration-tester.md +13 -0
- package/templates/.agent/agents/test-engineer.md +10 -0
- package/templates/.agent/rules/GEMINI.md +292 -183
- package/templates/.agent/skills/systematic-debugging/SKILL.md +202 -0
- package/templates/.agent/skills/vibe-prd/SKILL.md +48 -6
- package/templates/.agent/workflows/add-type.md +133 -0
- package/templates/.agent/workflows/apply.md +95 -0
- package/templates/.agent/workflows/graduate.md +150 -0
- package/templates/.agent/workflows/launch.md +127 -0
- package/templates/.agent/workflows/new-feature.md +21 -23
- package/templates/.agent/workflows/pause.md +118 -0
- package/templates/.agent/workflows/pipeline.md +95 -0
- package/templates/.agent/workflows/progress.md +103 -0
- package/templates/.agent/workflows/resume.md +105 -0
- package/templates/.agent/workflows/unify.md +126 -0
- package/templates/.agent/workflows/vibe-plan.md +135 -72
- package/templates/.agent/workflows/vibe-recap.md +89 -12
- package/templates/.antigravity/rules.md +75 -27
package/README.md
CHANGED
|
@@ -1,49 +1,98 @@
|
|
|
1
|
-
# Codehava
|
|
1
|
+
# Codehava Agent Kit V3.0 🚀
|
|
2
2
|
|
|
3
|
-
The ultimate **Vibe Coding** Agent Kit
|
|
3
|
+
The ultimate **Vibe Coding** Agent Kit — transforms plain-text ideas into production-ready Web and Mobile applications. Injects superhuman coding capabilities into Cursor, Antigravity, or Claude Code via the **SEED + PAUL** execution architecture.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## What's Inside?
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
### 🌱 SEED-Style Typed Incubation
|
|
10
|
+
Five project types with different rigor levels (Application, API/Backend, Campaign, Utility, Workflow). No more one-size-fits-all PRD — each type gets type-aware discovery questions, constraints, and quality gates before any code is written.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
### 🔄 PAUL Execution Loop (Token-Efficient)
|
|
13
|
+
**Plan → Apply → Unify** — single-session execution with mandatory reconciliation. No token-heavy parallel subagents (~70% quality). Each session closes with a SUMMARY.md capturing planned vs. actual outcomes. No orphaned work. No state drift.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
`vibe-prd` ➔ `vibe-techdesign` ➔ `coding specialist`.
|
|
15
|
+
### 🤖 Auto-Discovery Engine (600+ Elite Skills)
|
|
16
|
+
~600 hand-picked, elite-tier skills auto-routed based on your natural language request — no memorization required. Keyword-based search with concrete algorithm defined in SKILLS_INDEX.md.
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
### 🧠 Long-Term Memory Protocol
|
|
19
|
+
`.agent/MEMORY.md` preserves colors, schemas, tech decisions, and constraints across sessions. `.agent/STATE.md` tracks current loop position. `docs/handoffs/` enables zero-context session resumption.
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- **Brave Search / Tavily:** Real-time documentation web scraping to fight AI hallucinations.
|
|
25
|
-
- **Sequential Thinking:** An Anthropic-approved system for logical AI braking.
|
|
26
|
-
- **Figma & Google Stitch:** Direct integration to extract design DNA straight into code.
|
|
21
|
+
### ✅ 4-Level Verification (from GSD)
|
|
22
|
+
Every task verified at 4 levels: **Exists → Substantive → Wired → Data Flows** — before any DONE status is reported. Escalation status (DONE / DONE_WITH_CONCERNS / NEEDS_CONTEXT / BLOCKED) replaces binary pass/fail.
|
|
27
23
|
|
|
28
|
-
|
|
24
|
+
### 🔧 Self-Healing Protocol
|
|
25
|
+
Autonomously fixes errors using `@systematic-debugging` and `@lint-and-validate`. Never asks users "how to fix?" — fixes silently, delivers working output.
|
|
29
26
|
|
|
30
|
-
|
|
27
|
+
### 📊 Model Profiles
|
|
28
|
+
**Quality** (Opus/Opus), **Balanced** (Opus/Sonnet, default), **Budget** (Sonnet/Haiku) — match compute to task complexity.
|
|
29
|
+
|
|
30
|
+
### 🔌 Built-in Vibe MCP Servers
|
|
31
|
+
Context7 (real-time docs), GitHub, Brave Search, Sequential Thinking, PostgreSQL, Playwright, Sentry, Docker — pre-configured in `mcp_config.json`.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Installation & Usage
|
|
31
36
|
|
|
32
37
|
```bash
|
|
33
38
|
npx codehava-agent-kit init
|
|
34
39
|
```
|
|
35
40
|
|
|
36
|
-
|
|
41
|
+
This creates `.agent/`, `docs/`, and `specs/` directories in your project root.
|
|
42
|
+
|
|
43
|
+
**Then place:**
|
|
44
|
+
- `.agent/` → your project root
|
|
45
|
+
- `docs/` → your project root
|
|
46
|
+
- `specs/` → your project root
|
|
47
|
+
- `.antigravity/rules.md` → if using Antigravity IDE
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## The PAUL Loop: How to "Vibe Code"
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
1. /vibe-plan Start here for any new project or feature
|
|
55
|
+
→ Detects project type, asks the right questions
|
|
56
|
+
→ Outputs PLANNING.md with BDD acceptance criteria
|
|
57
|
+
|
|
58
|
+
2. /apply Execute the plan, task by task
|
|
59
|
+
→ Auto-discovers relevant skills from 600+ library
|
|
60
|
+
→ Qualify each task before moving on
|
|
37
61
|
|
|
38
|
-
|
|
62
|
+
3. /unify Close the loop (mandatory after every /apply)
|
|
63
|
+
→ Documents planned vs. actual outcomes
|
|
64
|
+
→ Updates STATE.md and MEMORY.md
|
|
39
65
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
3. Watch the Magic happen. The AI will Auto-Discover the best matching framework, record the session memory, and generate interactive, animated UI out of the box using `ui-ux-pro-max` guidelines!
|
|
66
|
+
4. /vibe-recap Context compaction when context gets long
|
|
67
|
+
→ Creates recap.md → open fresh chat to continue
|
|
68
|
+
```
|
|
44
69
|
|
|
45
|
-
|
|
46
|
-
|
|
70
|
+
**Example:**
|
|
71
|
+
> "Saya ingin buat aplikasi manajemen inventory untuk toko kecil"
|
|
72
|
+
> → `/vibe-plan` detects Application type → asks 8 targeted questions → produces PLANNING.md
|
|
73
|
+
> → `/apply` executes sprint 1 tasks → qualifies each with 4-level verification
|
|
74
|
+
> → `/unify` documents what was done, deferred issues, tech decisions
|
|
75
|
+
> → repeat for sprint 2
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Why SEED + PAUL (not GSD)?
|
|
80
|
+
|
|
81
|
+
| Approach | Token Cost | Quality | Crash Recovery |
|
|
82
|
+
|----------|-----------|---------|----------------|
|
|
83
|
+
| Parallel Subagents (GSD) | Heavy | ~70% | Lock files needed |
|
|
84
|
+
| Single Session (PAUL) | Efficient | ~95% | HANDOFF files |
|
|
85
|
+
|
|
86
|
+
PAUL's single-session approach delivers higher quality at lower token cost. SEED's typed incubation prevents hallucinated code from vague specs.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## What Was Pruned
|
|
91
|
+
|
|
92
|
+
Over 800+ niche/outdated community skills were pruned to keep the kit incredibly light and fast during initialization. Only elite, battle-tested skills remain.
|
|
93
|
+
|
|
94
|
+
---
|
|
47
95
|
|
|
48
96
|
## License
|
|
49
|
-
|
|
97
|
+
|
|
98
|
+
MIT License — Codehava
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codehava-agent-kit",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Codehava Agent Kit - CLI to initialize agent templates, workflows, and skills",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "Codehava Agent Kit - CLI to initialize agent templates, workflows, and skills (SEED+PAUL Architecture)",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# .agent/ACTIVE.md — Project Pipeline Tracker
|
|
2
|
+
|
|
3
|
+
> Copy file ini ke `.agent/ACTIVE.md` di root project kamu (atau workspace root).
|
|
4
|
+
> AI memperbarui file ini saat /vibe-plan, /graduate, /launch, dan /unify dijalankan.
|
|
5
|
+
> Dibaca oleh /pipeline untuk menampilkan project pipeline view.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Ideation Pipeline
|
|
10
|
+
|
|
11
|
+
| Project | Type | Status | Created | Notes |
|
|
12
|
+
|---------|------|--------|---------|-------|
|
|
13
|
+
| [nama-project] | [Application/API/Campaign/Utility/Workflow] | [in-progress/ready/graduated] | YYYY-MM-DD | [catatan] |
|
|
14
|
+
|
|
15
|
+
**Status definitions:**
|
|
16
|
+
- `in-progress` — PLANNING.md ada tapi belum complete
|
|
17
|
+
- `ready` — PLANNING.md pass quality gate, siap di-graduate
|
|
18
|
+
- `graduated` — Sudah dipindah ke apps/, git initialized
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Active Builds
|
|
23
|
+
|
|
24
|
+
| Project | Type | Phase | Loop Status | Last Updated |
|
|
25
|
+
|---------|------|-------|-------------|--------------|
|
|
26
|
+
| [nama-project] | [Type] | Phase [N]/[Total] | [PLAN/APPLY/UNIFY] | YYYY-MM-DD |
|
|
27
|
+
|
|
28
|
+
**Loop status:**
|
|
29
|
+
- `PLAN` — Plan dibuat, menunggu /apply
|
|
30
|
+
- `APPLY` — Sedang di-apply
|
|
31
|
+
- `UNIFY` — Apply selesai, menunggu /unify
|
|
32
|
+
- `CLOSED` — Loop closed, siap phase berikutnya
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Graduated (Completed)
|
|
37
|
+
|
|
38
|
+
| Project | Type | Graduated | Location |
|
|
39
|
+
|---------|------|-----------|----------|
|
|
40
|
+
| [nama-project] | [Type] | YYYY-MM-DD | apps/[nama-project]/ |
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
> Terakhir diupdate: [YYYY-MM-DD] oleh [workflow yang mengupdate]
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# HANDOFF — [YYYY-MM-DD] Session [N]
|
|
2
|
+
|
|
3
|
+
> File ini dibuat oleh AI saat session ditutup di tengah jalan (pause/interrupt).
|
|
4
|
+
> Di session berikutnya, baca file ini PERTAMA sebelum melakukan apapun.
|
|
5
|
+
> Path: `docs/handoffs/HANDOFF-[YYYY-MM-DD].md`
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Status Saat Ditutup
|
|
10
|
+
|
|
11
|
+
- **Closed at:** [HH:MM YYYY-MM-DD]
|
|
12
|
+
- **Reason:** [pause / interrupt / context limit / user request]
|
|
13
|
+
- **Loop status:** [open — belum unify / closed — sudah unify]
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Yang Sedang Dikerjakan
|
|
18
|
+
|
|
19
|
+
- **Active plan:** [path ke PLAN.md]
|
|
20
|
+
- **Current task:** [T00X — nama task]
|
|
21
|
+
- **Task status:** [sedang dikerjakan / baru dimulai / hampir selesai]
|
|
22
|
+
|
|
23
|
+
**Progress:**
|
|
24
|
+
```
|
|
25
|
+
[T001] ✅ DONE
|
|
26
|
+
[T002] ✅ DONE
|
|
27
|
+
[T003] 🔄 IN PROGRESS — [apa yang sudah selesai, apa yang belum]
|
|
28
|
+
[T004] ⏳ PENDING
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Apa yang Sudah Dilakukan di Session Ini
|
|
34
|
+
|
|
35
|
+
- [Perubahan 1] — [file yang diubah]
|
|
36
|
+
- [Perubahan 2] — [file yang diubah]
|
|
37
|
+
- [Keputusan yang dibuat] — [kenapa]
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Masalah yang Diketahui
|
|
42
|
+
|
|
43
|
+
- [Issue 1] — [deskripsi, severity]
|
|
44
|
+
- [Issue 2] — [deskripsi, severity]
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Langkah Selanjutnya (Exact Resume Point)
|
|
49
|
+
|
|
50
|
+
1. Buka [path ke file yang sedang dikerjakan]
|
|
51
|
+
2. Lanjutkan dari: [titik exact — baris/fungsi/komponen mana]
|
|
52
|
+
3. Setelah itu: [task T00X berikutnya]
|
|
53
|
+
4. Jangan lupa: [hal penting yang mudah terlupakan]
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Context Penting untuk Diingat
|
|
58
|
+
|
|
59
|
+
- [Constraint atau keputusan penting yang relevan]
|
|
60
|
+
- [Pattern atau convention yang sedang diikuti]
|
|
61
|
+
- [Dependency yang belum selesai]
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Files yang Dimodifikasi Session Ini
|
|
66
|
+
|
|
67
|
+
| File | Status | Notes |
|
|
68
|
+
|------|--------|-------|
|
|
69
|
+
| [path/file.ts] | Modified | [apa yang diubah] |
|
|
70
|
+
| [path/file.tsx] | Modified | [apa yang diubah] |
|
|
71
|
+
| [path/file.ts] | Created | [file baru] |
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
**Resume command:** Baca file ini lalu ketik "Resume" atau langsung lanjutkan task.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# .agent/MEMORY.md — Architectural Memory
|
|
2
|
+
|
|
3
|
+
> Copy file ini ke `.agent/MEMORY.md` di root project kamu.
|
|
4
|
+
> AI memperbarui file ini di setiap UNIFY phase jika ada keputusan arsitektur baru.
|
|
5
|
+
> Dibaca di AWAL setiap session sebelum menulis kode apapun.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Tech Stack
|
|
10
|
+
|
|
11
|
+
| Layer | Pilihan | Versi | Catatan |
|
|
12
|
+
|-------|---------|-------|---------|
|
|
13
|
+
| **Framework** | [Next.js / Vite / Flutter / dll] | [versi] | [catatan import path, dll] |
|
|
14
|
+
| **Language** | [TypeScript / Python / Dart] | [versi] | [strict mode? settings?] |
|
|
15
|
+
| **Database** | [PostgreSQL / MongoDB / Supabase] | [versi] | [via Prisma 7? Drizzle?] |
|
|
16
|
+
| **Auth** | [Better Auth / Clerk / NextAuth] | [versi] | [provider apa?] |
|
|
17
|
+
| **Styling** | [Tailwind + shadcn / dll] | [versi] | [custom config?] |
|
|
18
|
+
| **State** | [Zustand / Jotai / Redux] | [versi] | [global atau local?] |
|
|
19
|
+
| **Queue** | [BullMQ / Inngest / dll] | [versi] | [Redis URL?] |
|
|
20
|
+
| **Deployment** | [Vercel / Railway / Docker] | - | [env staging/prod?] |
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Import Paths (Kritis — Jangan Salah)
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
// Prisma
|
|
28
|
+
import { db } from '@/lib/db'
|
|
29
|
+
import type { User } from '@/generated/prisma' // BUKAN @prisma/client
|
|
30
|
+
|
|
31
|
+
// Auth
|
|
32
|
+
import { auth } from '@/lib/auth'
|
|
33
|
+
|
|
34
|
+
// [Tambahkan custom path lain di sini]
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Design Tokens
|
|
40
|
+
|
|
41
|
+
| Token | Value | Notes |
|
|
42
|
+
|-------|-------|-------|
|
|
43
|
+
| **Primary color** | [#hex] | [nama, konteks penggunaan] |
|
|
44
|
+
| **Secondary color** | [#hex] | [nama, konteks penggunaan] |
|
|
45
|
+
| **Background** | [#hex] | [dark/light default] |
|
|
46
|
+
| **Font heading** | [font-family] | [Google Fonts? CDN?] |
|
|
47
|
+
| **Font body** | [font-family] | [size default?] |
|
|
48
|
+
| **Border radius** | [sm/md/lg / px value] | - |
|
|
49
|
+
| **Dark mode** | [yes/no] | [default dark atau light?] |
|
|
50
|
+
|
|
51
|
+
**Warna yang DILARANG:** [daftar warna yang tidak boleh dipakai — misal: ungu/violet per Purple Ban]
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Database Schema Snapshot
|
|
56
|
+
|
|
57
|
+
> Update setiap kali ada migrasi significant.
|
|
58
|
+
|
|
59
|
+
```prisma
|
|
60
|
+
// Tabel utama (snapshot — bukan full schema)
|
|
61
|
+
model User {
|
|
62
|
+
id String @id @default(cuid())
|
|
63
|
+
email String @unique
|
|
64
|
+
// ...
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// [Tambahkan model penting lainnya]
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## API Conventions
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
// Response format standar
|
|
76
|
+
{ success: true, data: {...} }
|
|
77
|
+
{ success: false, error: "pesan error" }
|
|
78
|
+
|
|
79
|
+
// Auth pattern
|
|
80
|
+
// Headers yang dipakai: [Bearer? Cookie?]
|
|
81
|
+
|
|
82
|
+
// Rate limiting: [ya/tidak, provider apa]
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Constraints (WAJIB DIIKUTI)
|
|
88
|
+
|
|
89
|
+
- **UU PDP:** Jangan log NIK, nomor rekening, password, token
|
|
90
|
+
- **File upload:** Hanya jpg/png/webp, maksimal 5MB
|
|
91
|
+
- **Pagination:** Semua findMany harus ada `take` + `skip`
|
|
92
|
+
- **Soft delete:** Gunakan `deletedAt DateTime?` — jangan hard delete data penting
|
|
93
|
+
- **Secrets:** Selalu di `.env` — tidak pernah di kode
|
|
94
|
+
- [Tambahkan constraint spesifik project di sini]
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Anti-patterns (DILARANG)
|
|
99
|
+
|
|
100
|
+
- ❌ Import dari `@prisma/client` langsung (gunakan `@/generated/prisma`)
|
|
101
|
+
- ❌ String literal untuk queue names (gunakan konstanta QUEUES)
|
|
102
|
+
- ❌ `any` di TypeScript
|
|
103
|
+
- ❌ Query tanpa pagination
|
|
104
|
+
- ❌ Hard delete data user
|
|
105
|
+
- [Tambahkan anti-pattern spesifik project di sini]
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Keputusan Arsitektur Terdokumentasi
|
|
110
|
+
|
|
111
|
+
| Date | Keputusan | Alasan | Berlaku Sampai |
|
|
112
|
+
|------|-----------|--------|----------------|
|
|
113
|
+
| YYYY-MM-DD | [keputusan] | [alasan] | [permanent / sprint N] |
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
> Terakhir diupdate: [YYYY-MM-DD] oleh AI di Phase [N] UNIFY
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# .agent/STATE.md — Session State
|
|
2
|
+
|
|
3
|
+
> Copy file ini ke `.agent/STATE.md` di root project kamu.
|
|
4
|
+
> AI akan membaca dan mengupdate file ini di setiap UNIFY phase.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Current Position
|
|
9
|
+
|
|
10
|
+
- **Phase:** [planning / apply / unify / complete]
|
|
11
|
+
- **Active plan:** [path ke PLAN.md yang sedang dikerjakan]
|
|
12
|
+
- **Last task completed:** [T00X — nama task]
|
|
13
|
+
- **Next task:** [T00X — nama task berikutnya]
|
|
14
|
+
- **Loop status:** [open / closed]
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Project Overview
|
|
19
|
+
|
|
20
|
+
- **Name:** [nama project]
|
|
21
|
+
- **Type:** [Application / API-Backend / Campaign / Utility / Workflow]
|
|
22
|
+
- **Current milestone:** [Milestone N — nama milestone]
|
|
23
|
+
- **Current phase:** [Phase N — nama phase]
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Decisions Log
|
|
28
|
+
|
|
29
|
+
| Date | Decision | Reason | Impact Area |
|
|
30
|
+
|------|----------|--------|-------------|
|
|
31
|
+
| YYYY-MM-DD | [keputusan teknis] | [kenapa] | [komponen/area] |
|
|
32
|
+
| YYYY-MM-DD | [keputusan desain] | [kenapa] | [komponen/area] |
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Deferred Issues (Carry Forward)
|
|
37
|
+
|
|
38
|
+
- [ ] [Issue 1] — Priority: High — Target: [milestone/sprint]
|
|
39
|
+
- [ ] [Issue 2] — Priority: Medium — Target: [milestone/sprint]
|
|
40
|
+
- [ ] [Issue 3] — Priority: Low — Target: [milestone/sprint]
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Session History
|
|
45
|
+
|
|
46
|
+
| Session | Date | Phase | Summary |
|
|
47
|
+
|---------|------|-------|---------|
|
|
48
|
+
| 1 | YYYY-MM-DD | Phase 1 | [1 kalimat ringkasan] |
|
|
49
|
+
| 2 | YYYY-MM-DD | Phase 2 | [1 kalimat ringkasan] |
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Context Restoration Checklist
|
|
54
|
+
|
|
55
|
+
Saat mulai session baru, AI harus:
|
|
56
|
+
- [ ] Baca STATE.md ini
|
|
57
|
+
- [ ] Baca MEMORY.md untuk tech decisions
|
|
58
|
+
- [ ] Baca SUMMARY.md dari phase terakhir di `docs/phases/`
|
|
59
|
+
- [ ] Cek docs/task_on_hand.md jika ada task yang sedang berjalan
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Planning Quality Checklist
|
|
2
|
+
|
|
3
|
+
Quality gate untuk `/graduate` dan `/launch`.
|
|
4
|
+
Menentukan apakah PLANNING.md cukup kaya untuk graduation yang bersih
|
|
5
|
+
dan inisialisasi PAUL state tanpa tanya ulang.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Universal Checks (Semua Types)
|
|
10
|
+
|
|
11
|
+
- [ ] **Type metadata** ada di header (Application, API/Backend, Campaign, Utility, Workflow, atau custom)
|
|
12
|
+
- [ ] **Problem statement** spesifik — menyebut masalah, audience, dan kenapa penting
|
|
13
|
+
- [ ] **Design decisions** terdokumentasi — minimal 1 keputusan resolved dengan rationale
|
|
14
|
+
- [ ] **Open questions** section ada (boleh kosong, tapi harus ada section-nya)
|
|
15
|
+
- [ ] **Next actions** terdefinisi — minimal 1 concrete next step
|
|
16
|
+
- [ ] **Skill loadout** dicatat — skill apa dari 600+ library yang relevan
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Type-Specific Checks
|
|
21
|
+
|
|
22
|
+
Referensi `data/{type}/config.md` untuk authority pada required vs optional sections.
|
|
23
|
+
|
|
24
|
+
- [ ] **Semua required sections** (per config.md) punya konten substantif — bukan hanya header atau placeholder
|
|
25
|
+
- [ ] **Optional sections** either terisi atau explicitly marked N/A
|
|
26
|
+
- [ ] **Depth sesuai rigor** — tight types (Utility) boleh brief; deep types (Application) butuh coverage thorough
|
|
27
|
+
|
|
28
|
+
### Quick Reference
|
|
29
|
+
|
|
30
|
+
| Type | Required Sections | Rigor |
|
|
31
|
+
|------|-------------------|-------|
|
|
32
|
+
| Application | 8 dari 10 | deep — coverage thorough |
|
|
33
|
+
| API/Backend | 7 dari 8 | standard — balanced |
|
|
34
|
+
| Campaign | 6 dari 7 | creative — measurable goal wajib |
|
|
35
|
+
| Utility | 6 dari 6 | tight — semua wajib, tapi brief |
|
|
36
|
+
| Workflow | 7 dari 8 | standard — idempotency non-negotiable |
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## PAUL-Readiness Checks (untuk /launch saja)
|
|
41
|
+
|
|
42
|
+
Hanya required jika user mau `/launch` (graduate + init sekaligus).
|
|
43
|
+
Skip untuk `/graduate` saja.
|
|
44
|
+
|
|
45
|
+
- [ ] **Phase breakdown** ada dengan independently shippable milestones
|
|
46
|
+
- [ ] **Setiap phase** punya: apa yang dibangun + cara test + outcome yang diharapkan
|
|
47
|
+
- [ ] **Tech stack decisions** resolved — tidak ada critical "TBD" yang blocking
|
|
48
|
+
- [ ] **Detail cukup** untuk AI derive milestones, phases, dan tasks tanpa tanya ulang
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Assessment
|
|
53
|
+
|
|
54
|
+
| Hasil | Kriteria | Action |
|
|
55
|
+
|-------|----------|--------|
|
|
56
|
+
| **Pass** | Semua universal + semua required type-specific | Proceed dengan graduation |
|
|
57
|
+
| **Warn** | Missing optional sections atau thin content di beberapa area | Note gaps, tanya user: "Mau lengkapi dulu atau lanjut?" |
|
|
58
|
+
| **Fail** | Missing required sections atau tidak ada problem statement | Kembali ke `/vibe-plan` untuk complete ideation |
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Cara Pakai
|
|
63
|
+
|
|
64
|
+
Checklist ini direferensikan oleh:
|
|
65
|
+
- `workflows/graduate.md` — step quality_check sebelum buat app directory
|
|
66
|
+
- `workflows/launch.md` — diwarisi via graduate delegation
|
|
67
|
+
|
|
68
|
+
Ini bukan scorecard angka — ini qualitative assessment yang AI gunakan untuk
|
|
69
|
+
memutuskan apakah perlu warn user atau proceed langsung.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# API/Backend — Configuration
|
|
2
|
+
|
|
3
|
+
| Setting | Value |
|
|
4
|
+
|---------|-------|
|
|
5
|
+
| Rigor | standard |
|
|
6
|
+
| Demeanor | "Pragmatic dan schema-focused — push clarity pada endpoint contracts dan auth sebelum data model. Resist over-engineering di awal." |
|
|
7
|
+
| Sections | 8 |
|
|
8
|
+
|
|
9
|
+
## Required Sections (7)
|
|
10
|
+
- Purpose & Consumers
|
|
11
|
+
- Core Endpoints
|
|
12
|
+
- Auth Mechanism
|
|
13
|
+
- Data Schema
|
|
14
|
+
- Error Handling & Validation
|
|
15
|
+
- Testing Strategy
|
|
16
|
+
- Deployment
|
|
17
|
+
|
|
18
|
+
## Optional Sections (1)
|
|
19
|
+
- Performance & Scale (required jika ada estimasi > 1000 RPM)
|
|
20
|
+
|
|
21
|
+
## Rigor Notes
|
|
22
|
+
- Auth mechanism harus settled sebelum desain endpoint
|
|
23
|
+
- Error format harus konsisten di seluruh API — decide early
|
|
24
|
+
- Resist adding endpoints yang "mungkin dibutuhkan nanti"
|
|
25
|
+
- Test strategy wajib — API tanpa tests = tech debt langsung
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# API/Backend — Conversation Guide
|
|
2
|
+
|
|
3
|
+
## Section 1: Purpose & Consumers
|
|
4
|
+
**Explore:** API ini untuk apa? Siapa yang akan consume — frontend sendiri, mobile app, third party, atau semuanya? Internal-only atau public? Apa use case utama yang paling sering dipanggil?
|
|
5
|
+
**Suggest:** Kalau hanya untuk frontend sendiri — tRPC atau server actions (Next.js) lebih sederhana dari REST. Kalau public atau third party → REST dengan OpenAPI spec. Kalau butuh real-time → pertimbangkan WebSocket atau SSE dari awal.
|
|
6
|
+
**Depth:** required
|
|
7
|
+
|
|
8
|
+
## Section 2: Core Endpoints
|
|
9
|
+
**Explore:** Endpoint-endpoint utama yang dibutuhkan MVP? List 5-10 yang paling penting. Mana yang paling kritis — yang kalau tidak ada, API tidak berguna?
|
|
10
|
+
**Suggest:** Group endpoints by resource: /users, /products, /orders. Untuk setiap endpoint: method + path + purpose + response shape. Kalau list terlalu panjang → tanda scope terlalu besar untuk MVP.
|
|
11
|
+
**Depth:** required
|
|
12
|
+
|
|
13
|
+
## Section 3: Auth Mechanism
|
|
14
|
+
**Explore:** Auth seperti apa yang dibutuhkan? JWT, API Key, OAuth 2.0, atau session-based? Apakah ada rate limiting per user/key? Perlu refresh token? Multi-tenant?
|
|
15
|
+
**Suggest:** API Key: paling simpel untuk internal/B2B. JWT: stateless, baik untuk mobile. OAuth 2.0: hanya kalau memang butuh third-party delegasi. Rate limiting: wajib dari awal, jangan retrofit — pakai Redis atau Upstash.
|
|
16
|
+
**Depth:** required
|
|
17
|
+
|
|
18
|
+
## Section 4: Data Schema
|
|
19
|
+
**Explore:** Tabel/collection apa yang utama? Relasi antar entitas? Field apa yang paling sering di-query? Ada soft delete requirement?
|
|
20
|
+
**Suggest:** Mulai minimal: tambah field lebih mudah dari hapus field. Selalu ada `createdAt`, `updatedAt`, dan `deletedAt` (soft delete). Index pada field yang sering di-filter. Hindari nested objects di PostgreSQL — normalisasi dulu.
|
|
21
|
+
**Depth:** required
|
|
22
|
+
|
|
23
|
+
## Section 5: Error Handling & Validation
|
|
24
|
+
**Explore:** Bagaimana error harus di-return? Ada standard error format? Validasi input dilakukan di layer mana — controller atau service? Bagaimana handle external API failure?
|
|
25
|
+
**Suggest:** Standard: `{ success: false, error: "message", code: "ERROR_CODE" }`. Validasi: Zod di entry point (controller/route handler), bukan di service. External API: retry dengan exponential backoff untuk transient errors, circuit breaker untuk persistent failures.
|
|
26
|
+
**Depth:** required
|
|
27
|
+
|
|
28
|
+
## Section 6: Performance & Scale
|
|
29
|
+
**Explore:** Berapa estimasi request per second? Ada endpoint yang berat (report generation, bulk processing)? Butuh caching? Database query yang perlu dioptimasi?
|
|
30
|
+
**Suggest:** MVP: jangan over-optimize. Tambahkan `take` + `skip` ke semua list endpoints dari awal. Cache dengan Redis hanya kalau ada data yang truly static atau expensive. Background jobs (BullMQ) untuk proses yang > 5 detik.
|
|
31
|
+
**Depth:** optional
|
|
32
|
+
|
|
33
|
+
## Section 7: Testing Strategy
|
|
34
|
+
**Explore:** Unit test, integration test, atau keduanya? Ada contract testing dengan consumers? Bagaimana test auth-protected endpoints? CI/CD pipeline dengan automated tests?
|
|
35
|
+
**Suggest:** Minimum: integration tests yang hit real database (pakai test DB, bukan mock). Setiap endpoint punya: success case + validation error case + auth error case. Gunakan `supertest` atau built-in framework test utilities.
|
|
36
|
+
**Depth:** required
|
|
37
|
+
|
|
38
|
+
## Section 8: Deployment
|
|
39
|
+
**Explore:** Deploy ke mana? Containerized dengan Docker? Butuh horizontal scaling? Ada environment variables yang perlu di-manage?
|
|
40
|
+
**Suggest:** Railway atau Fly.io untuk simple deployment. Docker Compose untuk local dev dari awal. Secrets di env vars SELALU — tidak pernah di kode atau git. Health check endpoint `/health` wajib untuk monitoring.
|
|
41
|
+
**Depth:** required
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# API/Backend — Skill Loadout
|
|
2
|
+
|
|
3
|
+
| Skill | Priority | Why |
|
|
4
|
+
|-------|----------|-----|
|
|
5
|
+
| `api-design-principles` | required | REST conventions + error handling standards |
|
|
6
|
+
| `vibe-techdesign` | required | Tech decisions + schema design |
|
|
7
|
+
| `clean-code` | required | Code quality selalu aktif |
|
|
8
|
+
| `systematic-debugging` | required | Error recovery |
|
|
9
|
+
| `prisma-7-patterns` | required | Jika pakai Prisma 7 |
|
|
10
|
+
| `nodejs-backend-patterns` | recommended | Node.js conventions |
|
|
11
|
+
| `database-design` | recommended | Schema modeling |
|
|
12
|
+
| `auth-implementation-patterns` | recommended | Auth yang benar dari awal |
|
|
13
|
+
| `testing-patterns` | recommended | Integration test patterns |
|
|
14
|
+
| `postgresql-optimization` | optional | Query optimization |
|
|
15
|
+
| `bullmq-specialist` | optional | Background jobs |
|
|
16
|
+
| `api-security-best-practices` | recommended | Security hardening |
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Application — Configuration
|
|
2
|
+
|
|
3
|
+
| Setting | Value |
|
|
4
|
+
|---------|-------|
|
|
5
|
+
| Rigor | deep |
|
|
6
|
+
| Demeanor | "Thorough dan architectural — eksplorasi trade-offs, push clarity pada data model dan deployment sebelum lanjut. Coaching partner, bukan interviewer." |
|
|
7
|
+
| Sections | 10 |
|
|
8
|
+
|
|
9
|
+
## Required Sections (8)
|
|
10
|
+
- Problem Statement
|
|
11
|
+
- Tech Stack
|
|
12
|
+
- Data Model
|
|
13
|
+
- Auth & Roles
|
|
14
|
+
- UI/UX Utama
|
|
15
|
+
- API Surface
|
|
16
|
+
- Deployment & Infrastructure
|
|
17
|
+
- Phase Breakdown
|
|
18
|
+
|
|
19
|
+
## Optional Sections (2)
|
|
20
|
+
- Keamanan & Compliance (recommended jika ada PII)
|
|
21
|
+
- Skill Loadout & Tools
|
|
22
|
+
|
|
23
|
+
## Rigor Notes
|
|
24
|
+
- Jangan rush ke tech stack sebelum problem statement clear
|
|
25
|
+
- Data model adalah foundation — luangkan waktu di sini
|
|
26
|
+
- Phase breakdown harus independently shippable — bukan task list
|
|
27
|
+
- Resistance terhadap scope creep: "Ini untuk MVP atau masa depan?"
|