For Coding Agents
How AI coding agents should navigate and use this documentation.
For Coding Agents
This page tells coding agents (Claude Code, Cursor, Copilot, Gemini CLI, etc.) how to find the right documentation when working on the Sprinter Platform.
Entry Points
| What you need | Where to look |
|---|---|
| Quick system overview | /docs/overview or app/llms.txt route |
| Full machine-readable reference | app/llms-full.txt route |
| Architecture and data flow | /docs/architecture |
| Database schema and tables | /docs/data-model |
| Specific feature/module | /docs/features/\{module-name\} |
| External service integration | /docs/integrations/\{service\} |
| Operational procedures | /docs/runbooks/\{procedure\} |
| What to build next | /docs/roadmap/backlog |
| Feature specs (before building) | /docs/roadmap/specs/\{feature\} |
| Spec-first workflow | /docs/roadmap |
| Coding standards and rules | /docs/contributing |
| Critical rules (always loaded) | CLAUDE.md at repo root |
| File-pattern-specific rules | .claude/rules/*.md (loaded contextually) |
How to Find the Right Doc
By file you are editing
| Files you are touching | Read this doc |
|---|---|
features/entities/** | Entity System |
features/views/** | View System |
features/blocks/** | Block System |
features/tools/** | Tool System |
features/agents/** | Agent System |
features/chat/** | Chat |
features/actions/**, features/sessions/**, features/responses/** | Actions, Sessions, Responses |
features/documents/** | Document Processing |
features/feed/** | Feed |
features/capture/** | Capture |
features/navigation/** | Navigation |
features/tenant/** | Multi-Tenant and Auth & Permissions |
features/realtime/** | Realtime |
features/comments/** | Comments |
features/graphs/** | Graph |
features/webhooks/** | Webhooks |
features/api-keys/** | API Keys |
features/analytics/**, features/cost/** | Analytics & Cost |
features/skills/** | Skills |
features/inngest/** | Inngest Integration |
features/custom/** | Product-specific code; see Overview for the platform/custom boundary |
supabase/migrations/** | Data Model and Migrate Runbook |
lib/supabase/** | Supabase Integration |
app/api/** | Contributing for API handler rules |
By task you are doing
| Task | Read these docs |
|---|---|
| Adding a new entity field | Entity System, Actions, Responses |
| Creating a new AI tool | Tool System |
| Building a new agent | Agent System |
| Changing prompt assembly, provider caching, or run telemetry | Agent System, Analytics & Cost |
| Changing workspace business context or tenant-authored agent knowledge | Agent System, features/agents/workspace-context.ts, features/settings/** |
| Adding a new block type | Block System |
| Creating a new view layout | View System |
| Writing a migration | Data Model, Migrate Runbook |
| Setting up a new product | New Product Runbook |
| Debugging field population | Actions, Sessions, Responses, Inngest Integration |
| Adding background processing | Inngest Integration |
| Working on auth/permissions | Auth & Permissions |
Key Rules for Agents
These rules are enforced across the codebase. Violations will cause build failures or review rejections.
- Entity types are DB-driven — never hardcode entity type slugs in platform code
- All DB ops are tenant-scoped — use
getTenantContext()orgetActiveTenantId() - Use the auth adapter —
getUserId(),requireAuth(),hasPermission()fromfeatures/tenant/auth.ts - shadcn/ui for all interactive UI — never raw HTML inputs or buttons
- No hardcoded colors — use CSS variables (zero-chroma neutrals, navy primary)
- No "entities" in UI copy — use "records", "data", "items" in user-facing text
- Co-located tests required — every file with exported logic needs a
.test.ts - Messages table — use
messages, notchat_messages - User tenants table — use
user_tenants, nottenant_members
Doc Structure Convention
Every feature doc follows the same structure so agents can reliably find information:
- Overview — what, why, who
- Key Concepts — types, schemas, terminology
- How It Works — architecture, data flow
- API Reference — key functions and signatures
- For Agents — available tools and actions
- Design Decisions — non-obvious choices
- Related Modules — cross-references
Spec-First Workflow
Every new feature must have a spec before implementation begins. See Spec-First Development for the full workflow.
Quick Reference for Agents
- Check the backlog —
content/docs/roadmap/backlog.mdxlists all planned work by priority - Find or write a spec —
content/docs/roadmap/specs/{feature}.mdxhas the design - Claim it — Set
status: in-progressandassigned-toin the spec frontmatter - Check file conflicts — The spec's
files-touchedfield lists which files will be modified. If another in-progress spec touches the same files, coordinate or pick different work. - Build it — The spec is your source of truth
- Complete it — Set
status: completed. The documentarian promotes spec content to the feature doc.
Context and Cost Notes
agent_contextis the durable tenant-authored workspace business profile. If you change how agent context is assembled or edited, update both the agent docs and the admin/editor flow.- Anthropic prompt caching depends on stable prompt structure and deterministic tool ordering. If you change tool registration or prompt assembly, preserve stability unless you have a measured reason not to.
- Runtime telemetry for agent runs is recorded via
ai.runtime.completed. If you add or rename telemetry fields, update the analytics/cost docs and any admin surfaces that summarize them.
Spec Frontmatter
---
title: Feature Name
description: One-line summary
status: draft | approved | in-progress | completed
priority: P0 | P1 | P2 | P3
assigned-to: "" # empty = unclaimed
branch: "" # git branch
target-doc: /docs/features/entity-system
files-touched:
- features/entities/types.ts
---Keeping Docs Updated
When you complete a feature, fix, or significant change:
- The
documentariansub-agent runs automatically as part of the feature completion checklist - It updates the changelog and the relevant feature doc
- For spec-first features, the documentarian also promotes spec content to the target feature doc
- If you add a new module, create a new MDX file in
content/docs/features/and add its slug tocontent/docs/features/meta.json - Run
npx fumadocs-mdxto regenerate the.source/directory after adding new docs