<!-- BEGIN:nextjs-agent-rules -->
# This is NOT the Next.js you know

This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices.
<!-- END:nextjs-agent-rules -->

# Task & Job Description Management

## The specification lives outside this repository

```
/Users/humperdoo/Documents/Advmfr/STAFF-HR-ADVMFR/V2/docs/
```

**Read it, never write to it.** Start with its `AGENTS.md`, which sets the
hierarchy: `machine/` holds the normative facts, the `.md` files hold the same
facts plus the reasoning. If code contradicts `machine/`, the code is wrong.

**Two open points block the core.** `C` (what happens to an undone daily task)
and `E` (the exact cut-off at which work becomes missed). Do not build the
recurrence engine or the missed evaluation until they are answered. The
recommended defaults in `machine/open-points.tsv` are not client-confirmed.

## Where the work is tracked

<https://linear.app/elevaseo/project/advmfr-hr-8264c367afa4/overview>

Anything to settle goes there when it appears: a defect noticed sideways, a
limitation accepted, a client answer still missing. The conversation scrolls
away; an issue does not.

## Working rules

- **UI/UX first.** A screen is prototyped and approved before anything is wired
  to data. Small steps; no feature is started from the schema.
- **shadcn is mandatory** for interface work. Reach for the CLI and the registry
  before hand-rolling a component or a config.
- **Air-gapped target.** No CDN fonts, no external scripts, no cloud services.
  Everything ships as files, timezone `Asia/Bangkok` everywhere.
- **Never delete business data.** Archive or deactivate.

## Database

Drizzle ORM 1.0 (release candidate) on PostgreSQL. The MVP used 0.45 on SQLite,
so its API notes do not transfer. Check the installed version's own docs.

**Drizzle Studio** browses and edits the database from the browser:
<https://orm.drizzle.team/drizzle-studio/overview>

```bash
bunx drizzle-kit studio
```
