Files
CaIon d82678a970 docs: move billing rules to .agents/rules/billing.md behind a read gate
AGENTS.md was too large to keep growing. Move the billing expression,
built-in pricing and billing safety invariant rules into
.agents/rules/billing.md and add the rule for deriving billable image
counts from upstream responses.

AGENTS.md keeps a mandatory read gate with concrete trigger paths and
concepts: matching tasks must read the file in full before planning,
coding or reviewing; unrelated tasks may skip it. CLAUDE.md mirrors the
gate next to the existing web/AGENTS.md line.
2026-09-18 11:24:29 +08:00

995 B

CLAUDE.md — Project Conventions for new-api

MANDATORY: Read AGENTS.md with the Read tool

Do not treat @AGENTS.md as loaded. Claude Code does not reliably inline that import.

Before any planning, coding, reviewing, or answering a project question, you MUST call the Read tool on the repo-root file AGENTS.md and wait for the full contents. This is the first action of every session and every new task.

Rules:

  • Do not start from memory, summaries, or this file alone.
  • Do not skip the Read because a previous turn mentioned AGENTS.md.
  • Do not replace the Read with a grep, glob, or partial skim.
  • After reading, follow every rule in AGENTS.md for the rest of the work.
  • If the task touches web/, also Read web/AGENTS.md before editing frontend files.
  • If the task touches billing as defined under Billing rules (mandatory read gate) in AGENTS.md, also Read .agents/rules/billing.md in full before planning or editing. Tasks outside that definition may skip it.