# MiaoJing Codex Developer Index

Last source audit: 2026-05-12, based on git commit `8ee86a9`.

This folder contains the permanent Codex routing documents for MiaoJing development. They are intentionally source-control tracked so every future agent can start from the same map.

## Documents

| Document | Purpose |
| --- | --- |
| `feature-code-index.md` | Feature-to-file map for UI, workflows, stores, services, scripts, and database code. Use this first for implementation work. |
| `bug-location-guide.md` | Symptom-to-code diagnostic manual. Use this first for bug reports and regressions. |
| `api-reference.md` | Route Handler reference for `/api/**`: method, auth, payload, response, storage side effects. |
| `architecture.md` | System architecture, runtime boundaries, data flow, persistence, deployment, and risk points. |

## Required Workflow For Codex Agents

1. Read `AGENTS.md` and `CODEX_MIAOJING_MEMORY.md` at repo root.
2. Read the document in this folder that matches the task.
3. Use direct file reads or `rg` only after choosing likely files from the index.
4. For every adjustment, modification, or bug fix, check whether these docs need to change.
5. Update the corresponding doc in the same commit whenever code location, diagnosis path, API behavior, architecture, deployment, or verification knowledge changes.

## Quick Commands

```bash
pnpm run ts-check
pnpm run build
pnpm run lint
pnpm run check:boundaries
pnpm run pm2:restart
```

Use `pnpm`; the project rejects other package managers through `preinstall`.
