# Agent Instructions — Dolphin Japan Frontend

This file is the entry point for AI coding agents (Cursor, Claude Code,
Codex, Aider, Continue, etc.) working on this repository.

**Authoritative rules:** [`guidelines/Guidelines.md`](guidelines/Guidelines.md).
Read it in full before making changes. The summary below covers only the
absolute basics; the full document wins on any conflict.

## Project

Dolphin Japan — a Japanese used-car export e-commerce frontend. Single
Next.js 15 (App Router) app that hosts both the public shop (`app/(shop)`)
and the admin panel (`app/admin`), sharing all `features/*` code.

## Stack

- Next.js 15 (App Router) · React 19 · TypeScript strict
- Tailwind CSS v4 · shadcn/ui · Zustand 5
- `next/font` for fonts · `lucide-react` for icons · `recharts` for charts

## Architecture

Feature-Sliced Design (FSD-lite):

```
src/
├── app/         # Routes only — page.tsx files are thin adapters
├── features/    # Domain modules — self-contained, no cross-feature imports
└── shared/      # Cross-feature reusable code (UI, lib, types)
```

## What to read for what task

| Task                                   | Read                                                                  |
| -------------------------------------- | --------------------------------------------------------------------- |
| **Any** code change                    | [`guidelines/Guidelines.md`](guidelines/Guidelines.md)                |
| Touching an admin module               | [`guidelines/AdminPanelPlan.md`](guidelines/AdminPanelPlan.md)        |
| Adding/renaming an endpoint            | [`docs/API.md`](docs/API.md) — and update it                          |
| Architectural decision                 | [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md)                        |
| Local dev / scripts / troubleshooting  | [`docs/DEVELOPMENT.md`](docs/DEVELOPMENT.md)                          |

## Verification

```bash
npm run typecheck   # must pass
npm run lint        # must pass for files you touched
```

## Hard "do nots"

- Do not introduce new top-level dependencies without flagging the addition.
- Do not import between features — lift shared code to `src/shared/`.
- Do not use `react-router` in new code — use `next/link` / `next/navigation`.
- Do not call `fetch()` directly — use `@/shared/lib/api`.
- Do not read `process.env` outside `@/shared/lib/constants`.
- Do not create unsolicited markdown reports after a code change — confirm
  the change in chat instead.
