# Jomblo Agent Instructions

Welcome to the Jomblo Online Shop project. This document serves as the primary instructional context for Gemini CLI and other AI agents.

## 🚀 Instructional Context
Jomblo is a high-performance e-commerce platform and admin dashboard built with **Next.js 15**.

- **Primary Source of Truth (Product):** Refer to `conductor/product.md`.
- **Primary Source of Truth (Tech Stack):** Refer to `conductor/tech-stack.md`.
- **Primary Source of Truth (Workflow):** Refer to `conductor/workflow.md`.
- **Development & Standards:** Refer to `docs/DEVELOPMENT.md`.

## 🏗️ Core Mandates
- **Server Actions:** All server actions MUST be created using the `createServerAction` wrapper in `@/lib/actions`. This enforces security, validation, and standardized responses.
- **Repository Pattern:** Database access MUST be encapsulated in repository classes in `lib/db/repositories/`. Raw SQL in actions is forbidden.
- **Validation:** Use **Zod** for all data validation at the Action and Repository boundaries.
- **Error Handling:** Use unified application error classes (e.g., `NotFoundError`, `BadRequestError`) from `@/lib/errors`.
- **Style:** Adhere strictly to the Google TypeScript Style Guide.

## 🤖 Agent Workflow
This project uses a strict **Conductor-based workflow** tracked in `conductor/tracks/`:
- **Plan First:** All work must be defined in a `plan.md` file.
- **TDD (Red-Green-Refactor):** Write failing tests *before* implementation.
- **Quality Gates:** 100% coverage is required. Verify on mobile layouts for all UI changes.
- **Git Notes:** Attach task summaries to commits using `git notes add -m "<summary>" <hash>`.

## 🛠️ Essential Commands
See `docs/DEVELOPMENT.md` for the full list of commands.

```bash
pnpm install             # Install dependencies
pnpm run docker:up       # Start services
pnpm run setup:schema    # Initialize schema
pnpm run dev             # Start dev server
pnpm test                # Run tests
```
