apitree 마스터 운영 문서 v1.0 (2026-04, 30p) defines the product architecture. This page pins the mapping between doc chapters and the code that implements them, so future sessions can find each spec's runtime quickly.
Classifies any agent action into L1_AUTONOMOUS / L2_REPORT_AFTER / L3_PRIOR_APPROVAL / L4_CEO_ONLY. Pricing / legal / external payments ⇒ L4. Architecture / DB schema / auth / cost ≥ $100 ⇒ L3.
packages/api/src/services/authority-harness.service.tsPOST /api/admin/system/classify-action1 credit ≡ $0.001. All heterogeneous units (tokens, images, seconds, characters, queries) are normalized to credits at the gateway layer so buyers manage a single balance.
GET /api/v1/billing/credit-unitsEvery agent input/output is written to agent_interactions from day 1. Adds agent_id, model, quality (1~5), and human_edit columns to the pre-existing session-based rows so the Fine-tuning pipeline (6 steps, CH.08.2) has its raw material.
packages/db/src/schema/agent-interactions.tspnpm --filter @apitree/db migrate:agent-v2Before a fix ships Blue/Green, 3+ sample trials must pass five checks: schema_match, key_fields, latency_ok (≤ p95 × 1.5), error_rate_ok (<10%), and trial_count_ok.
packages/api/src/services/self-healing-grader.service.tsPOST /api/admin/system/grade-fixThe gateway recognizes Claude-Code/*, cursor/*, openai-*, windsurf/* as first-class AI agent runtimes. All PLG funnel metrics (D7 retention, free→paid) segment by isAiAgent().
packages/api/src/lib/user-agent.tsPublic-data relay is the Day-1 supply moat. 5 categories are tagged mvp_priority: real estate, business info, weather/environment, transport, medical. Catalog surface a ★ MVP Picks toggle to filter these.