ceobe-mastery-cli 1.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 (76) hide show
  1. package/dist/ai/executor.js +88 -0
  2. package/dist/ai/gateway.js +16 -0
  3. package/dist/ai/planner.js +221 -0
  4. package/dist/ai/tools/systemTools.js +136 -0
  5. package/dist/config/env.js +41 -0
  6. package/dist/index.js +168 -0
  7. package/dist/utils/contextLoader.js +133 -0
  8. package/docs/agent-persona.md +48 -0
  9. package/package.json +36 -0
  10. package/rules/coding-standards.md +38 -0
  11. package/rules/engineering-rules.md +214 -0
  12. package/skills/bun-developer/SKILL.md +6 -0
  13. package/skills/bun-developer/package-management.md +4 -0
  14. package/skills/bun-developer/runtime-features.md +4 -0
  15. package/skills/bun-developer/testing.md +3 -0
  16. package/skills/cost-reducer/SKILL.md +6 -0
  17. package/skills/cost-reducer/cloud-and-infra.md +4 -0
  18. package/skills/cost-reducer/code-level-savings.md +4 -0
  19. package/skills/cost-reducer/serverless-optimization.md +3 -0
  20. package/skills/cost-reducer/services-and-finops.md +3 -0
  21. package/skills/create-skill/SKILL.md +6 -0
  22. package/skills/create-skill/examples.md +2 -0
  23. package/skills/create-skill/reference.md +2 -0
  24. package/skills/customer-support/SKILL.md +6 -0
  25. package/skills/customer-support/escalation-guide.md +2 -0
  26. package/skills/customer-support/response-templates.md +4 -0
  27. package/skills/database-architect/SKILL.md +6 -0
  28. package/skills/database-architect/index-optimization.md +3 -0
  29. package/skills/database-architect/migration-best-practices.md +3 -0
  30. package/skills/database-architect/normalization-rules.md +3 -0
  31. package/skills/deployment-ops/SKILL.md +6 -0
  32. package/skills/deployment-ops/dockerfile-standards.md +3 -0
  33. package/skills/deployment-ops/github-actions-templates.md +3 -0
  34. package/skills/deployment-ops/monorepo-deployment.md +2 -0
  35. package/skills/frontend-design/SKILL.md +6 -0
  36. package/skills/frontend-design/component-patterns.md +3 -0
  37. package/skills/frontend-design/modern-aesthetics.md +5 -0
  38. package/skills/frontend-design/state-and-routing.md +3 -0
  39. package/skills/know-me/SKILL.md +6 -0
  40. package/skills/know-me/memory-operations.md +2 -0
  41. package/skills/know-me/what-to-track.md +6 -0
  42. package/skills/n8n/SKILL.md +6 -0
  43. package/skills/n8n/api-reference.md +2 -0
  44. package/skills/n8n/auth-nodes-reference.md +3 -0
  45. package/skills/n8n/custom-nodes-reference.md +3 -0
  46. package/skills/n8n/workflow-reference.md +3 -0
  47. package/skills/researcher/SKILL.md +6 -0
  48. package/skills/researcher/search-techniques.md +3 -0
  49. package/skills/researcher/synthesis-format.md +6 -0
  50. package/skills/scalability/SKILL.md +6 -0
  51. package/skills/scalability/api-and-services.md +3 -0
  52. package/skills/scalability/caching-and-queues.md +3 -0
  53. package/skills/scalability/database-scaling.md +4 -0
  54. package/skills/scalability/infrastructure.md +3 -0
  55. package/skills/scalability/state-management.md +2 -0
  56. package/skills/security/SKILL.md +6 -0
  57. package/skills/security/api-security.md +3 -0
  58. package/skills/security/auth-and-secrets.md +4 -0
  59. package/skills/security/database-and-deps.md +3 -0
  60. package/skills/security/web-security.md +3 -0
  61. package/skills/self-healing/SKILL.md +6 -0
  62. package/skills/self-healing/diagnostic-techniques.md +4 -0
  63. package/skills/self-healing/memory-management.md +2 -0
  64. package/skills/self-healing/pattern-recognition.md +5 -0
  65. package/skills/testing-engineer/SKILL.md +6 -0
  66. package/skills/testing-engineer/e2e-playwright.md +3 -0
  67. package/skills/testing-engineer/mocking-strategies.md +3 -0
  68. package/skills/testing-engineer/unit-testing-vitest.md +3 -0
  69. package/skills/trigger-dev/SKILL.md +6 -0
  70. package/skills/trigger-dev/advanced-reference.md +3 -0
  71. package/skills/trigger-dev/config-reference.md +2 -0
  72. package/skills/trigger-dev/core-reference.md +2 -0
  73. package/templates/api-template.md +82 -0
  74. package/templates/architecture-template.md +63 -0
  75. package/templates/brd-template.md +78 -0
  76. package/templates/tasks-template.md +47 -0
@@ -0,0 +1,3 @@
1
+ # N8N AUTH CREDENTIALS
2
+ 1. Implement `ICredentialType` for custom services.
3
+ 2. Never hardcode secrets. Always map them using n8n's credential object mapping.
@@ -0,0 +1,3 @@
1
+ # CUSTOM NODES
2
+ 1. **Declarative Style:** n8n nodes are built declaratively. Use `INodeType` interface.
3
+ 2. **Operations & Properties:** Define operations clearly in the `properties` array. Use `displayOptions` to hide/show fields dynamically.
@@ -0,0 +1,3 @@
1
+ # WORKFLOW BEST PRACTICES
2
+ 1. **Error Handling:** Always attach an Error Trigger node to catch workflow failures.
3
+ 2. **Pagination:** When fetching third-party APIs inside n8n HTTP Request nodes, ensure pagination is handled to avoid silent data truncation.
@@ -0,0 +1,6 @@
1
+ ---
2
+ name: researcher
3
+ description: Methods for searching, verifying, and synthesizing technical documentation.
4
+ ---
5
+ # RESEARCHER SKILL
6
+ You are a senior analyst. Read documentation thoroughly before writing code for an unknown or updated library. Output dense, factual summaries.
@@ -0,0 +1,3 @@
1
+ # SEARCH TECHNIQUES
2
+ 1. Do not hallucinate package methods. Use `curl` or web search tools to read official documentation.
3
+ 2. When searching, prioritize official domains (e.g., `site:developer.mozilla.org` or `site:docs.n8n.io`).
@@ -0,0 +1,6 @@
1
+ # SYNTHESIS
2
+ When summarizing research, provide:
3
+ 1. The Problem
4
+ 2. The Solution / API Signature
5
+ 3. Direct Code Example
6
+ Do not include long narrative explanations. Keep it technical and concise.
@@ -0,0 +1,6 @@
1
+ ---
2
+ name: scalability
3
+ description: Principles for designing systems capable of handling 10x to 1000x traffic spikes.
4
+ ---
5
+ # SCALABILITY SKILL
6
+ Design systems anticipating failure. Assume servers will die, DBs will lock, and traffic will spike. Build distributed, stateless applications.
@@ -0,0 +1,3 @@
1
+ # API & SERVICES SCALING
2
+ 1. **Stateless First:** APIs must be 100% stateless. Do not store session data in the Node.js process.
3
+ 2. **Circuit Breakers:** If an external service is down, fail fast using circuit breaker patterns.
@@ -0,0 +1,3 @@
1
+ # CACHING & QUEUES
2
+ 1. **Redis:** Use Redis for heavily read, infrequently updated data. Always set a TTL (Time-To-Live).
3
+ 2. **Message Queues:** Offload slow operations (email, PDF generation) to RabbitMQ or SQS. Never block the main HTTP thread.
@@ -0,0 +1,4 @@
1
+ # DATABASE SCALING
2
+ 1. **Indexes:** Every query MUST hit an index. Avoid full table scans.
3
+ 2. **Read Replicas:** Route heavy GET requests to read-only replicas to free up the primary writer node.
4
+ 3. **Connection Pooling:** Always use a connection pool (e.g., PgBouncer). Never open a new DB connection per request.
@@ -0,0 +1,3 @@
1
+ # INFRASTRUCTURE SCALING
2
+ 1. **Auto-scaling:** Rely on CPU or Memory thresholds to spin up new pods (Kubernetes HPA) or instances.
3
+ 2. **Load Balancing:** Use reverse proxies (Nginx/HAProxy) or Cloud Load Balancers to distribute traffic evenly.
@@ -0,0 +1,2 @@
1
+ # DISTRIBUTED STATE
2
+ Do not use `MemoryStore` in production. Use Redis for cross-instance state synchronization, WebSockets pub/sub, and session management.
@@ -0,0 +1,6 @@
1
+ ---
2
+ name: security
3
+ description: Mandatory security practices to prevent XSS, Injection, and unauthorized access.
4
+ ---
5
+ # SECURITY SKILL
6
+ Trust no input. Assume the client is compromised. Sanitize everything and adhere to OWASP Top 10 guidelines.
@@ -0,0 +1,3 @@
1
+ # API SECURITY
2
+ 1. **Rate Limiting:** Protect all endpoints, especially login/OTP, against brute-forcing (e.g., max 5 requests/min).
3
+ 2. **CORS:** Strictly configure CORS origins. Never use `Access-Control-Allow-Origin: *` in production with credentials.
@@ -0,0 +1,4 @@
1
+ # AUTH & SECRETS
2
+ 1. Never commit `.env` files or hardcode API keys.
3
+ 2. Hash passwords with bcrypt or Argon2. NEVER store plain text.
4
+ 3. Keep JWT lifespans short (e.g., 15 mins) and use long-lived Refresh Tokens stored in HttpOnly cookies.
@@ -0,0 +1,3 @@
1
+ # DATABASE & DEPENDENCIES
2
+ 1. **SQL Injection:** ALWAYS use parameterized queries or trusted ORMs. Never concatenate strings into SQL statements.
3
+ 2. **Deps:** Audit packages regularly (`npm audit`). Do not install obscure unmaintained libraries.
@@ -0,0 +1,3 @@
1
+ # WEB SECURITY
2
+ 1. **XSS Protection:** Sanitize all user inputs before rendering them on the frontend.
3
+ 2. **Headers:** Always use Helmet.js in Express to set strict security headers (CSP, HSTS).
@@ -0,0 +1,6 @@
1
+ ---
2
+ name: self-healing
3
+ description: The cognitive loop for autonomic debugging and error resolution.
4
+ ---
5
+ # SELF HEALING SKILL
6
+ Do not panic when encountering errors. Act methodically. Read logs, isolate the failing component, test a hypothesis, and iterate.
@@ -0,0 +1,4 @@
1
+ # DIAGNOSTIC TECHNIQUES
2
+ 1. Never blindly replace an entire file. Read the specific lines mentioned in the error log.
3
+ 2. Use tools to check running processes or memory limits.
4
+ 3. If an NPM install fails, clear the cache or check Node versions.
@@ -0,0 +1,2 @@
1
+ # DIAGNOSTIC MEMORY
2
+ When encountering an error, store the stack trace snippet and the attempted fix in temporary memory. If the same error appears again, DO NOT try the exact same fix.
@@ -0,0 +1,5 @@
1
+ # PATTERN RECOGNITION
2
+ Recognize classic issues:
3
+ - "EADDRINUSE": Port is taken. Kill the process.
4
+ - "Cannot read property of undefined": Missing optional chaining or null checks.
5
+ - "SyntaxError": Read the last file modified.
@@ -0,0 +1,6 @@
1
+ ---
2
+ name: testing-engineer
3
+ description: Best practices for writing robust, deterministic Unit, Integration, and E2E tests.
4
+ ---
5
+ # TESTING ENGINEER SKILL
6
+ You break code before it reaches production. Write tests that run fast, never flake, and provide absolute confidence.
@@ -0,0 +1,3 @@
1
+ # E2E TESTING (PLAYWRIGHT)
2
+ 1. **Data Seeding:** Reset the database to a known state before E2E suites run. Do not rely on data leftover from previous tests.
3
+ 2. **Resilience:** Use proper locators (`getByRole`, `getByText`) instead of brittle CSS selectors or XPaths.
@@ -0,0 +1,3 @@
1
+ # MOCKING STRATEGIES
2
+ 1. **External APIs:** NEVER call third-party APIs (Stripe, Twilio) in tests. Use MSW (Mock Service Worker) or Jest/Vitest spy functions to intercept and return fake responses.
3
+ 2. **Time Dependency:** If a function depends on `Date.now()`, mock the system time so assertions don't fail intermittently.
@@ -0,0 +1,3 @@
1
+ # UNIT TESTING (VITEST)
2
+ 1. **Isolation:** Functions must be tested in pure isolation. Do not connect to real databases in unit tests.
3
+ 2. **Edge Cases:** Always write test assertions for the "Sad Path" (null values, empty arrays, invalid arguments). Do not just test the "Happy Path".
@@ -0,0 +1,6 @@
1
+ ---
2
+ name: trigger-dev
3
+ description: Best practices for background jobs and cron executions using Trigger.dev v3.
4
+ ---
5
+ # TRIGGER.DEV SKILL
6
+ Write highly resilient background tasks. Assume tasks will fail and retry. Guarantee idempotency in your code.
@@ -0,0 +1,3 @@
1
+ # TRIGGER.DEV ADVANCED
2
+ 1. **Idempotency:** Background jobs retry on failure. Ensure your database queries and logic inside `trigger.dev` tasks are idempotent (running them twice doesn't duplicate data).
3
+ 2. **Resumes:** Use `wait` functionalities to pause execution without taking up compute execution limits.
@@ -0,0 +1,2 @@
1
+ # TRIGGER.DEV CONFIG
2
+ Ensure `trigger.config.ts` is strictly typed and exports the correct `project` ID. Lock backend keys dynamically via environment variables.
@@ -0,0 +1,2 @@
1
+ # TRIGGER.DEV CORE (v3)
2
+ In v3, tasks are pure async functions wrapped in `task()`. There are no more convoluted Job class structures. Pass serializable JSON only.
@@ -0,0 +1,82 @@
1
+ # API Specification Documentation
2
+ **Project:** [Nama Project]
3
+ **Base URL:** `https://api.domain.com/v1`
4
+ **Auth Method:** [e.g., Bearer Token / JWT]
5
+
6
+ ---
7
+
8
+ ## 1. Global Standards
9
+ ### 1.1 Standard Headers
10
+ - `Content-Type: application/json`
11
+ - `Authorization: Bearer <token>`
12
+ - `X-Request-ID: <uuid>` (Untuk traceability/logging)
13
+
14
+ ### 1.2 Common Query Parameters (List Endpoints)
15
+ - `page`: Page number (default: 1)
16
+ - `limit`: Items per page (default: 10, max: 100)
17
+ - `sort`: Field name (prefix `-` for descending, e.g., `-created_at`)
18
+ - `search`: Keyword for global search
19
+
20
+ ---
21
+
22
+ ## 2. Endpoints
23
+
24
+ ### 2.1 [Resource Name] - [Action]
25
+ **Endpoint:** `METHOD /path`
26
+ **Description:** Apa yang dilakukan endpoint ini.
27
+
28
+ **Request:**
29
+ - **Headers:** [Custom headers if any]
30
+ - **Body (JSON):**
31
+ | Field | Type | Required | Description |
32
+ | :--- | :--- | :--- | :--- |
33
+ | `username` | String | Yes | Unique identifier |
34
+ | `email` | String (Email) | Yes | Valid email format |
35
+
36
+ **Response:**
37
+ - **Success (200 OK / 201 Created):**
38
+ ```json
39
+ {
40
+ "success": true,
41
+ "data": {
42
+ "id": "uuid",
43
+ "created_at": "timestamp"
44
+ },
45
+ "message": "Resource created successfully"
46
+ }
47
+ ```
48
+
49
+ - **Success - List/Pagination (200 OK):**
50
+ ```json
51
+ {
52
+ "success": true,
53
+ "data": [
54
+ {
55
+ "id": "uuid",
56
+ "created_at": "timestamp"
57
+ }
58
+ ],
59
+ "meta": {
60
+ "total_items": 100,
61
+ "total_pages": 10,
62
+ "current_page": 1,
63
+ "limit": 10
64
+ },
65
+ "message": "Resource list retrieved successfully"
66
+ }
67
+ ```
68
+
69
+ - **Error (400 / 401 / 404 / 422 / 500):**
70
+ ```json
71
+ {
72
+ "success": false,
73
+ "error_code": "VALIDATION_ERROR",
74
+ "message": "Invalid input data",
75
+ "details": [
76
+ {
77
+ "field": "email",
78
+ "issue": "Format email tidak valid"
79
+ }
80
+ ]
81
+ }
82
+ ```
@@ -0,0 +1,63 @@
1
+ # System Architecture Documentation
2
+ **Project Name:** [Nama Sistem]
3
+ **Architecture Style:** [e.g., Microservices / Monolithic / Event-Driven]
4
+
5
+ ---
6
+
7
+ ## 1. Overview & Architectural Pattern
8
+ * **High-Level Summary:** Gambaran umum bagaimana sistem bekerja secara holistik.
9
+ * **Core Pattern:** [e.g., Clean Architecture / Hexagonal / Layered]. Jelaskan alasan pemilihan pola ini untuk menghindari *technical debt*.
10
+
11
+ ---
12
+
13
+ ## 2. Technology Stack & Environment
14
+ | Layer | Technology | Version |
15
+ | :--- | :--- | :--- |
16
+ | **Frontend** | [React / Next.js / etc] | [Ver] |
17
+ | **Backend** | [Go / Node.js / Python] | [Ver] |
18
+ | **Database** | [PostgreSQL / MongoDB] | [Ver] |
19
+ | **Cache/Queue** | [Redis / RabbitMQ] | [Ver] |
20
+ | **Infrastructure** | [Docker / K8s / AWS] | [-] |
21
+
22
+ ---
23
+
24
+ ## 3. System Components & Responsibility
25
+ Detailkan peran setiap modul agar tidak terjadi *overlapping* tanggung jawab (SRP).
26
+ * **Component A (e.g., Auth Service):** Mengelola session dan JWT.
27
+ * **Component B (e.g., Worker Node):** Memproses *background jobs* secara asinkron.
28
+
29
+ ---
30
+
31
+ ## 4. Communication & Data Flow
32
+ * **API Strategy:** [RESTful / GraphQL / gRPC].
33
+ * **Flow Diagram:** * [User] -> [Load Balancer] -> [API Gateway] -> [Service] -> [Database].
34
+ * **Event Flow:** Jelaskan jika ada *Pub/Sub mechanism*.
35
+
36
+ ---
37
+
38
+ ## 5. Persistence & Storage Strategy
39
+ * **Primary DB:** Skema dan alasan penggunaan.
40
+ * **Caching Layer:** Strategi *in-memory data* (misal: Redis untuk session).
41
+ * **File Storage:** Penanganan asset (misal: Local storage via Docker volume atau S3).
42
+ * **Data Retention & Archiving:** Kebijakan pembersihan/pengarsipan data (contoh: *Soft delete* setelah 1 tahun dipindah ke *cold storage* DB untuk mencegah bloating).
43
+
44
+ ---
45
+
46
+ ## 6. Security & Compliance Strategy
47
+ * **Authentication:** [JWT / OAuth2 / Session-based].
48
+ * **Authorization:** [RBAC / ABAC].
49
+ * **Data Protection:** Strategi enkripsi *at rest* dan *in transit*.
50
+
51
+ ---
52
+
53
+ ## 7. Infrastructure & Observability (DevOps)
54
+ * **Deployment:** [Docker Compose / Helm Charts].
55
+ * **CI/CD Pipeline:** [GitHub Actions / Jenkins].
56
+ * **Monitoring:** [Prometheus / Sentry / CloudWatch].
57
+ * **Logging & Tracing:** Implementasi `X-Request-ID` / *Correlation ID* lintas layanan terdistribusi. Wajib menggunakan format JSON (misal JSON Log via Elasticsearch/Datadog).
58
+
59
+ ---
60
+
61
+ ## 8. Key Design Decisions (ADR)
62
+ Dokumentasikan keputusan besar di sini agar tim tidak mempertanyakan ulang di masa depan.
63
+ * **Decision 1:** "Kenapa pakai PostgreSQL dibanding NoSQL?" -> [Alasannya].
@@ -0,0 +1,78 @@
1
+ # Business Requirement Document (BRD)
2
+ **Project Name:** [Nama Sistem/Aplikasi]
3
+ **Version:** 1.0
4
+ **Status:** Draft / Approved
5
+
6
+ ---
7
+
8
+ ## 1. Executive Summary & Objective
9
+ * **Problem Statement:** Jelaskan masalah spesifik yang ingin diselesaikan. Jangan cuma permukaan, gali sampai ke *pain point* utamanya.
10
+ * **Primary Objective:** Apa gol utama yang ingin dicapai? (Misal: Automasi sistem approval, mengurangi latency data, dll).
11
+ * **Out of Scope:** Sebutkan apa yang **TIDAK** akan dibuat di fase ini untuk menghindari *scope creep*.
12
+
13
+ ---
14
+
15
+ ## 2. Target Users & Stakeholders
16
+ Gunakan tabel agar AI divisi coding paham hak akses (RBAC) sejak awal:
17
+
18
+ | User Role | Responsibilities / Goals | Permissions Level |
19
+ | :--- | :--- | :--- |
20
+ | [Admin] | [Manage users & system config] | [Superuser] |
21
+ | [Customer] | [Purchase & track orders] | [Limited Access] |
22
+
23
+ ---
24
+
25
+ ## 3. Core Features & Business Rules
26
+ Bagian paling krusial. Jangan cuma list fitur, tapi masukkan logika bisnisnya.
27
+
28
+ ### 3.1 [Feature Name 1]
29
+ * **Description:** Penjelasan singkat fitur.
30
+ * **Business Rules:**
31
+ * [Rule 1: Misal, "User harus verifikasi email sebelum bisa transaksi"].
32
+ * [Rule 2: Misal, "Data transaksi tidak boleh dihapus, gunakan status 'soft-delete'"].
33
+ * **Acceptance Criteria (Definition of Done):**
34
+ * [Kriteria 1: User bisa melihat riwayat transaksi dalam < 2 detik].
35
+ * **Edge Cases & Negative Flow:**
36
+ * [Skenario Gagal: Jika *payment gateway timeout*, tandai status 'Pending' dan berikan auto-retry 3x].
37
+ * [Fallback: Jika sistem X mati, tampilkan pesan Y alih-alih layar *crash*].
38
+
39
+ ---
40
+
41
+ ## 4. External Integrations
42
+ List semua layanan pihak ketiga yang akan "berbicara" dengan sistem kita.
43
+ * **Authentication:** [Auth0 / Firebase / Custom JWT]
44
+ * **Payments:** [Stripe / Midtrans / Xendit]
45
+ * **Storage:** [AWS S3 / Google Cloud Storage]
46
+ * **Notifications:** [Twilio / SendGrid / Firebase Cloud Messaging]
47
+
48
+ ---
49
+
50
+ ## 5. Non-Functional Requirements (NFR)
51
+ Standar kualitas untuk menjaga *clean architecture*.
52
+ * **Performance:** [Misal: Max API response time 300ms].
53
+ * **Security:** [Misal: Data enkripsi AES-256, Audit logs untuk setiap mutasi data].
54
+ * **Scalability:** [Misal: Harus sanggup handle 5000 concurrent users].
55
+ * **Availability:** [Misal: Uptime 99.9%].
56
+ * **Data Compliance & Privacy:** [Misal: Sesuai UU PDP / GDPR untuk penanganan PII - *Personally Identifiable Information*].
57
+
58
+ ---
59
+
60
+ ## 6. Critical User Journeys (CUJ)
61
+ Tuliskan 3-5 alur utama agar AI paham bagaimana fitur-fitur ini saling terhubung.
62
+ 1. **Journey 1 (Registration):** User Input -> Email Verification -> Profile Setup -> Success.
63
+ 2. **Journey 2 (Transaction):** Browse -> Add to Cart -> Checkout -> Payment Webhook -> Order Confirmed.
64
+
65
+ ---
66
+
67
+ ## 7. Technical Constraints & Assumptions
68
+ * **Constraints:**
69
+ * [Database: Harus PostgreSQL].
70
+ * [Infrastructure: Harus Dockerized].
71
+ * **Assumptions:**
72
+ * [Misal: User dianggap selalu memiliki koneksi internet stabil saat akses fitur X].
73
+
74
+ ---
75
+
76
+ ## 8. Handover & Coding Division Notes
77
+ * **Tech Stack Reference:** (Akan diisi pada Tahap 2: Tech Stack Selection).
78
+ * **Standardization:** (Akan diisi pada Tahap 3: The Rulebook).
@@ -0,0 +1,47 @@
1
+ # Project Task Roadmap
2
+ **Project:** [Nama Project]
3
+ **Architect in Charge:** [Nama/AI Architect]
4
+
5
+ ---
6
+
7
+ ## Phase 1: Foundation & Standard Setup
8
+ Fokus pada pembangunan "pondasi" sesuai workflow tahap 1-3.
9
+ - [ ] **Initialize Project Structure:** Setup folder sesuai Clean Architecture (e.g., /internal, /pkg, /cmd).
10
+ - [ ] **Enforce The Rulebook:** Configure Linter, Formatter (Prettier/ESLint/GoFmt), dan Git Hooks (Husky).
11
+ - [ ] **Environment Configuration:** Setup `.env.example` dan validator environment variables.
12
+ - [ ] **Dockerization:** Create `Dockerfile` dan `docker-compose.yaml` untuk lokal development.
13
+
14
+ ---
15
+
16
+ ## Phase 2: Core Infrastructure & Persistence
17
+ Membangun jalur komunikasi dan penyimpanan data.
18
+ - [ ] **Database Migration System:** Setup tool migrasi (e.g., Flyway/Liquibase/Gorm Migrations).
19
+ - [ ] **Base API & Middleware:** Setup Global Error Handling, Logging middleware (Zap/Winston), dan CORS.
20
+ - [ ] **Authentication Layer:** Implementasi Core Auth logic (Login, Register, Token Validation).
21
+ - [ ] **API Documentation:** Setup Swagger/OpenAPI UI yang terupdate otomatis.
22
+
23
+ ---
24
+
25
+ ## Phase 3: Modular Feature Development
26
+ (Ulangi blok ini untuk setiap fitur utama)
27
+ ### Feature: [Nama Fitur]
28
+ - [ ] **Define Contract/Interface:** Definisikan *Interface* Port/Repository (programming to an interface).
29
+ - [ ] **Database Schema:** Implementasi tabel sesuai Tahap 4 (Database Design).
30
+ - [ ] **Domain Logic:** Menulis Business Logic di layer Service/Usecase (tanpa dependensi luar).
31
+ - [ ] **Repository Layer:** Implementasi Data Access Object (DAO) atau Repository sesuai kontrak *Interface*.
32
+ - [ ] **Delivery Layer:** Setup Controller/Handler dan Request Validation (DTO).
33
+
34
+ ---
35
+
36
+ ## Phase 4: Quality Assurance & Observability
37
+ - [ ] **Unit Testing:** Mencapai coverage minimal X% pada layer Business Logic.
38
+ - [ ] **Integration Testing:** Memastikan flow API -> DB berjalan lancar.
39
+ - [ ] **Load & Stress Testing:** Uji beban untuk *critical-path API* (misal via k6 / JMeter).
40
+ - [ ] **Observability Setup:** Konfigurasi Health Check endpoints dan Monitoring (Sentry/Prometheus).
41
+
42
+ ---
43
+
44
+ ## Phase 5: Production Readiness & Handover
45
+ - [ ] **Performance Tuning:** Review indexing database dan caching strategy (Redis).
46
+ - [ ] **Production Config:** Setup SSL, Rate Limiting, dan Security Headers.
47
+ - [ ] **Handover Documentation:** Finalisasi file `handover-document.md` untuk maintenance.