This page maps the major schema families to the HTTP routes and services that own them. For the fuller entity model and ownership boundaries, see Data Model.

Reading The Map

  • Tables are the canonical entities in packages/db/src/schema/
  • Routes are the HTTP entry points in server/src/routes/
  • Services are the orchestration and data-access layers in server/src/services/
If a table family has no public route, that usually means it is driven internally by another service.

Core Mapping

Schema familyTablesMain routesMain services
Identity and accessuser, session, account, verification, board_api_keys, cli_auth_challenges, company_memberships, invites, join_requests, principal_permission_grants, instance_user_rolesaccess.ts, authz.tsaccess.ts, board-auth.ts
Company and orgcompanies, company_logos, agents, agent_api_keys, agent_config_revisions, agent_runtime_state, agent_task_sessions, agent_wakeup_requests, company_secrets, company_secret_versions, company_skills, instance_settingscompanies.ts, agents.ts, company-skills.ts, secrets.ts, instance-settings.tscompanies.ts, agents.ts, company-skills.ts, secrets.ts, agent-permissions.ts
Planning and executiongoals, projects, project_goals, project_workspaces, execution_workspaces, workspace_operations, workspace_runtime_services, issues, issue_comments, issue_labels, labels, issue_approvals, approvals, approval_comments, issue_attachments, assets, issue_documents, documents, document_revisions, issue_work_products, issue_inbox_archives, issue_read_states, feedbackgoals.ts, projects.ts, execution-workspaces.ts, issues.ts, approvals.ts, assets.tsgoals.ts, projects.ts, execution-workspaces.ts, workspace-operations.ts, workspace-runtime.ts, issues.ts, documents.ts, work-products.ts, approvals.ts, issue-approvals.ts, issue-assignment-wakeup.ts
Automation and runtimeroutines, routine_triggers, routine_runs, heartbeat_runs, heartbeat_run_events, activity_log, run_file_writes, run_output_artifacts, issue_active_executionsroutines.ts, agents.ts, activity.tsroutines.ts, heartbeat.ts, run-log-store.ts, activity-log.ts, live-events.ts
Finance and performancebudget_policies, budget_incidents, cost_events, finance_events, performance_ledger, performance_snapshots, performance_signals, performance_interventions, performance_evaluationscosts.ts, projects.ts, companies.tscosts.ts, finance.ts, budgets.ts, quota-windows.ts, performance-hq.ts, performance-hq-company-matrix.ts
Evaluation and reviewevaluation_queue_assignments, evaluation_rubrics, evaluation_runs, evaluation_scores, human_annotations, evaluation_datasets, evaluation_dataset_itemsmostly internal; surfaced through review and heartbeat flowsevaluations.ts, documents.ts, work-products.ts, heartbeat.ts
Memory and coordinationmom_control_contracts, mom_skill_profiles, mom_experience_records, mom_a2a_messages, mom_eventsmom.tsmom.ts, heartbeat.ts
Plugins and extensionsplugins, plugin_config, plugin_company_settings, plugin_state, plugin_entities, plugin_jobs, plugin_job_runs, plugin_webhook_deliveries, plugin_logsplugins.ts, plugin-ui-static.tsplugin-loader.ts, plugin-lifecycle.ts, plugin-job-scheduler.ts, plugin-job-store.ts, plugin-tool-dispatcher.ts, plugin-state-store.ts, plugin-log-retention.ts

Route Layer Notes

The route layer is intentionally thin. Most of the domain behavior lives in services.
  • access.ts and board-auth.ts handle login, membership, and board-facing authentication.
  • heartbeat.ts is the primary runtime orchestrator. It touches execution, logs, memory, cost capture, and evaluation.
  • evaluations.ts and mom.ts are schema-first coordination layers that integrate with heartbeat and document flows.
  • plugin-* services manage plugin lifecycle and persistent plugin state without making external systems part of the Paperclip schema.

Data Ownership Notes

Use these short rules when you need to decide where a table belongs:
  • If the row defines a Paperclip business entity, it belongs to the control plane.
  • If the row records a run, cost, artifact, evaluation, or memory event, it belongs to the runtime/quality layer.
  • If the row stores plugin metadata or mapping state, it still belongs to Paperclip.
  • If the row is owned by Langfuse, Gigapipe, Redash, Bytebase, ChartDB, or another external tool, Paperclip should only reference or mirror it.

Quick Reference

NeedStart here
Understand the full entity modelData Model
Find the route or service owner for a tableThis page
Trace a run from heartbeat to performance and evaluationheartbeat.tsevaluations.tsperformance-hq.ts
Understand plugin integration stateplugins.ts and the plugin_* schema family
Understand agent memory and coordinationmom.ts and performance-hq.ts

Gaps To Watch

  • Some derived layers are growing faster than the original appendix docs. The evaluation_* and mom_* families are now first-class and deserve ongoing documentation updates.
  • run_file_writes, run_output_artifacts, and issue_active_executions are important runtime artifacts but are easy to overlook if you only read the older audit appendix.
  • The route map is broad, but the most important cross-cutting behavior still lives in heartbeat.ts, evaluations.ts, and mom.ts.