# The Playbook

> How to read the playbook, the principles behind every standard in it, and a map of the whole book, from HTTP fundamentals to leading the team.

This is the playbook I bring to every team: the decisions I've already made, written down so they don't get re-argued in every new codebase. Little of it is novel. Most of it is a published standard (an RFC, a spec, a practice from Stripe, GitHub or Google) applied consistently, and the consistency is the value.

Each doc makes its own case: the problem, the default, why it beats the alternatives, and what it costs. The sources at the bottom are evidence and further reading, not the argument. If a default can't be defended without "because Stripe does it", it doesn't belong here.

Defaults can be overridden, but an override is a decision, and it gets written down ([Decisions & Design Docs](https://www.syntaqx.com/docs/development/design-docs)). Where this site departs from its own playbook, the departure is an [ADR](https://github.com/syntaqx/syntaqx.com/tree/main/docs/adr); everywhere else, the playbook is the explanation. CI fails any doc that drops its references, links to a doc that doesn't exist, or wraps JSON in an envelope.

## How to Read It

It reads front to back. The sections run from the shared vocabulary and how the work is decided and written, through designing, building and protecting the system and the money it moves, to how it is tested, shipped and run, what its data teaches you, and how the team behind it grows. Every doc links to the one before and after it.

It also reads by chapter. Each doc stands on its own and links back to anything it builds on, so you can start wherever your problem is.

## Principles

The rest of the playbook is built from these.

1. **Standards before inventions.** If an RFC, a spec or a widely adopted practice already solves it, use that: `Link` for pagination, RFC 3339 for time, `Idempotency-Key`, `RateLimit`, `Deprecation` and `Sunset`, `QUERY`. A standard arrives with documentation, client libraries and engineers who already know it. An invention has to earn its place.
2. **HTTP means what it says.** Methods carry intent, status codes carry outcome, headers carry metadata. Bodies carry resources: a list is an array, a single resource is an object, and there are no `data` envelopes.
3. **Make the wrong thing hard.** Money is an integer, so it can't drift. State transitions are guarded in the database. Method overrides can only become `QUERY`. A guardrail beats a guideline.
4. **Everything retries, so everything is idempotent.** Networks fail after the work is done. Keys, dedupe and at-least-once handling are designed in from the start, not added after the first double charge.
5. **Nothing is rewritten.** Financial records, events, decisions and incidents are appended, corrected with new entries, and kept explainable.
6. **Change is additive.** APIs, schemas and events grow without breaking anyone. Breaking changes ship as new versions with a dated, announced sunset.
7. **Observable by default.** Every request has an ID, every log line is structured, every service has an SLO. If you can't see it, you can't own it.
8. **Small, reversible steps.** Small PRs, expand-and-contract migrations, flags and progressive rollouts. The cost of a mistake is how hard it is to undo.

## The Map

| Section | What it's for | Chapters |
| ------- | ------------- | -------- |
| **Fundamentals** | The shared vocabulary everything else assumes | [REST & HTTP Verbs](https://www.syntaqx.com/docs/fundamentals/rest-http-verbs), [Time & Date Formats](https://www.syntaqx.com/docs/fundamentals/time), [Identifier Conventions](https://www.syntaqx.com/docs/fundamentals/identifier-conventions), [Addresses & Geocoding](https://www.syntaqx.com/docs/fundamentals/addresses), [Phones & Emails](https://www.syntaqx.com/docs/fundamentals/phones-and-emails), [Text & Unicode](https://www.syntaqx.com/docs/fundamentals/text-and-unicode) |
| **Product** | Deciding what to build, what not to, and when it's ready for whom | [Discovery & Research](https://www.syntaqx.com/docs/product/discovery), [Problem Statements & Acceptance Criteria](https://www.syntaqx.com/docs/product/problem-statements), [Backlogs](https://www.syntaqx.com/docs/product/backlogs), [Roadmaps & Capacity](https://www.syntaqx.com/docs/product/roadmaps), [Release Stages](https://www.syntaqx.com/docs/product/release-stages) |
| **Development** | How code gets decided, written, reviewed and kept healthy | [Decisions & Design Docs](https://www.syntaqx.com/docs/development/design-docs), [Repos & Local Dev](https://www.syntaqx.com/docs/development/repositories), [Commits & Review](https://www.syntaqx.com/docs/development/commits-and-reviews), [Code Ownership](https://www.syntaqx.com/docs/development/code-ownership), [Documentation](https://www.syntaqx.com/docs/development/documentation), [Dependencies & Upgrades](https://www.syntaqx.com/docs/development/dependencies), [Build vs Buy](https://www.syntaqx.com/docs/development/build-vs-buy), [Tech Debt](https://www.syntaqx.com/docs/development/tech-debt), [AI-Assisted Development](https://www.syntaqx.com/docs/development/ai-assisted-development) |
| **Architecture** | How services divide the work and talk to each other | [Service Boundaries](https://www.syntaqx.com/docs/architecture/service-boundaries), [Retries & Timeouts](https://www.syntaqx.com/docs/architecture/retries-and-timeouts), [Events](https://www.syntaqx.com/docs/architecture/events), [Background Jobs](https://www.syntaqx.com/docs/architecture/background-jobs), [Application Caching](https://www.syntaqx.com/docs/architecture/application-caching), [Realtime Connections](https://www.syntaqx.com/docs/architecture/realtime-connections), [Admission Control](https://www.syntaqx.com/docs/architecture/admission-control), [Multi-Tenancy](https://www.syntaqx.com/docs/architecture/multi-tenancy), [Replacing a System](https://www.syntaqx.com/docs/architecture/replacing-systems) |
| **Database** | Schemas, queries and changes that hold up under load | [Naming](https://www.syntaqx.com/docs/database/naming-conventions), [Transactions & Concurrency](https://www.syntaqx.com/docs/database/transactions-and-concurrency), [Performance](https://www.syntaqx.com/docs/database/performance), [Zero-Downtime Migrations](https://www.syntaqx.com/docs/database/zero-downtime-migrations), [Effective Dating & History](https://www.syntaqx.com/docs/database/temporal-data) |
| **API Design** | The shape of an API before any endpoint exists | [Principles](https://www.syntaqx.com/docs/api-design/principles), [Naming](https://www.syntaqx.com/docs/api-design/naming-conventions), [Relationships & Expansion](https://www.syntaqx.com/docs/api-design/resource-relationships), [Authentication](https://www.syntaqx.com/docs/api-design/authentication), [Versioning](https://www.syntaqx.com/docs/api-design/versioning), [API Styles](https://www.syntaqx.com/docs/api-design/api-styles), [GraphQL](https://www.syntaqx.com/docs/api-design/graphql), [SDK Design](https://www.syntaqx.com/docs/api-design/sdk-design), [Webhooks](https://www.syntaqx.com/docs/api-design/webhooks) |
| **Requests & Responses** | What crosses the wire, request by request | [JSON Fields](https://www.syntaqx.com/docs/requests/json-conventions), [Errors](https://www.syntaqx.com/docs/requests/error-responses), [Idempotency](https://www.syntaqx.com/docs/requests/idempotency), [Pagination](https://www.syntaqx.com/docs/requests/pagination), [Filtering & Sorting](https://www.syntaqx.com/docs/requests/filtering-and-sorting), [HTTP QUERY](https://www.syntaqx.com/docs/requests/http-query), [Caching](https://www.syntaqx.com/docs/requests/caching), [Rate Limiting](https://www.syntaqx.com/docs/requests/rate-limiting), [Long-Running Operations](https://www.syntaqx.com/docs/requests/long-running-operations), [Bulk Operations](https://www.syntaqx.com/docs/requests/bulk-operations), [HTTP Compression](https://www.syntaqx.com/docs/requests/http-compression) |
| **Frontend** | Interfaces that work for everyone, fast | [Accessibility](https://www.syntaqx.com/docs/frontend/accessibility), [Web Performance](https://www.syntaqx.com/docs/frontend/web-performance), [Design Tokens](https://www.syntaqx.com/docs/frontend/design-tokens), [Forms & Validation](https://www.syntaqx.com/docs/frontend/forms), [Error & Empty States](https://www.syntaqx.com/docs/frontend/error-states), [Internationalization](https://www.syntaqx.com/docs/frontend/internationalization), [SEO](https://www.syntaqx.com/docs/frontend/seo), [Link Previews & Social Cards](https://www.syntaqx.com/docs/frontend/link-previews), [Mobile Apps](https://www.syntaqx.com/docs/frontend/mobile-apps) |
| **Building Blocks** | The features nearly every product ends up building, from audit trails to AI agents | [Audit Trails](https://www.syntaqx.com/docs/building-blocks/audit-trails), [Data Retention](https://www.syntaqx.com/docs/building-blocks/data-retention), [Custom Fields](https://www.syntaqx.com/docs/building-blocks/custom-fields), [Rules as Data](https://www.syntaqx.com/docs/building-blocks/rules-as-data), [Workflows](https://www.syntaqx.com/docs/building-blocks/workflows), [Matching & Merging](https://www.syntaqx.com/docs/building-blocks/record-linkage), [Search](https://www.syntaqx.com/docs/building-blocks/search), [Imports & Exports](https://www.syntaqx.com/docs/building-blocks/imports-and-exports), [Integrations](https://www.syntaqx.com/docs/building-blocks/integrations), [Notifications & Consent](https://www.syntaqx.com/docs/building-blocks/notifications), [File Uploads](https://www.syntaqx.com/docs/building-blocks/file-uploads), [Media Compression](https://www.syntaqx.com/docs/building-blocks/media-compression), [Generated Documents](https://www.syntaqx.com/docs/building-blocks/generated-documents), [Offline-First Sync](https://www.syntaqx.com/docs/building-blocks/offline-sync), [Location Tracking](https://www.syntaqx.com/docs/building-blocks/location-tracking), [Reservations & Holds](https://www.syntaqx.com/docs/building-blocks/reservations-and-holds), [Automated Risk Decisions](https://www.syntaqx.com/docs/building-blocks/risk-scoring), [Trust & Safety](https://www.syntaqx.com/docs/building-blocks/trust-and-safety), [Weighing Competing Objectives](https://www.syntaqx.com/docs/building-blocks/weighing-objectives), [LLM Features](https://www.syntaqx.com/docs/building-blocks/llm-features), [AI Agents in the Product](https://www.syntaqx.com/docs/building-blocks/ai-agents) |
| **Security** | Deciding what to defend, then defending it | [Threat Modeling](https://www.syntaqx.com/docs/security/threat-modeling), [Authentication & Sessions](https://www.syntaqx.com/docs/security/authentication), [Choosing an Identity Provider](https://www.syntaqx.com/docs/security/identity-providers), [SSO & Identity Federation](https://www.syntaqx.com/docs/security/sso-and-federation), [Authorization](https://www.syntaqx.com/docs/security/authorization), [API Security](https://www.syntaqx.com/docs/security/api-security), [Security Headers & CSP](https://www.syntaqx.com/docs/security/security-headers), [Sensitive Data](https://www.syntaqx.com/docs/security/sensitive-data), [Encryption at Rest](https://www.syntaqx.com/docs/security/encryption-at-rest), [Support Access & Internal Tools](https://www.syntaqx.com/docs/security/support-access), [Infrastructure Access](https://www.syntaqx.com/docs/security/infrastructure-access), [Vulnerability Management](https://www.syntaqx.com/docs/security/vulnerability-management), [Securing Software Updates](https://www.syntaqx.com/docs/security/software-updates), [AI & LLM Security](https://www.syntaqx.com/docs/security/ai-security) |
| **Money** | The engineering of money, for anyone who handles it | [Money](https://www.syntaqx.com/docs/money/amounts), [Payment States & Ledgers](https://www.syntaqx.com/docs/money/payment-states), [Multi-Currency & FX](https://www.syntaqx.com/docs/money/multi-currency), [Subscriptions & Recurring Billing](https://www.syntaqx.com/docs/money/subscriptions), [Usage-Based Billing](https://www.syntaqx.com/docs/money/usage-based-billing), [Sales Tax & VAT](https://www.syntaqx.com/docs/money/sales-tax), [Accounting & Revenue Recognition](https://www.syntaqx.com/docs/money/accounting) |
| **Compliance** | The frameworks auditors and regulators hold you to, and what meeting them takes | [PCI DSS](https://www.syntaqx.com/docs/compliance/pci-dss), [SOC 2](https://www.syntaqx.com/docs/compliance/soc-2), [GDPR & Privacy](https://www.syntaqx.com/docs/compliance/gdpr), [HIPAA](https://www.syntaqx.com/docs/compliance/hipaa), [Calls, Texts & Email](https://www.syntaqx.com/docs/compliance/consumer-contact), [Electronic Signatures & Records](https://www.syntaqx.com/docs/compliance/electronic-signatures), [Children's Privacy & Age Assurance](https://www.syntaqx.com/docs/compliance/childrens-privacy), [Open-Source Licenses](https://www.syntaqx.com/docs/compliance/open-source-licenses) |
| **Quality** | Knowing it works before customers do, and learning fast when it doesn't | [Quality Strategy](https://www.syntaqx.com/docs/quality/strategy), [Testing Strategy](https://www.syntaqx.com/docs/quality/testing), [Automated Testing](https://www.syntaqx.com/docs/quality/automated-testing), [Manual & Exploratory Testing](https://www.syntaqx.com/docs/quality/exploratory-testing), [AI-Assisted Testing](https://www.syntaqx.com/docs/quality/ai-assisted-testing), [Test Data & Environments](https://www.syntaqx.com/docs/quality/test-data), [Visual & Cross-Platform Testing](https://www.syntaqx.com/docs/quality/cross-platform-testing), [Load & Performance Testing](https://www.syntaqx.com/docs/quality/load-testing), [Defects & Triage](https://www.syntaqx.com/docs/quality/defects), [Release Readiness](https://www.syntaqx.com/docs/quality/release-readiness), [Quality Metrics](https://www.syntaqx.com/docs/quality/metrics) |
| **Delivery** | Getting a change from merge to production safely | [CI & Continuous Deployment](https://www.syntaqx.com/docs/delivery/ci-pipelines), [Feature Flags](https://www.syntaqx.com/docs/delivery/feature-flags), [Deployment Strategies](https://www.syntaqx.com/docs/delivery/deployment-strategies), [Where to Run It](https://www.syntaqx.com/docs/delivery/where-to-run), [Containers](https://www.syntaqx.com/docs/delivery/containers), [Infrastructure as Code](https://www.syntaqx.com/docs/delivery/infrastructure-as-code), [Mobile Releases](https://www.syntaqx.com/docs/delivery/mobile-releases) |
| **Observability** | Seeing what a running system is doing, and why | [Observability](https://www.syntaqx.com/docs/observability/overview), [Logs](https://www.syntaqx.com/docs/observability/logs), [Metrics](https://www.syntaqx.com/docs/observability/metrics), [Tracing & Sampling](https://www.syntaqx.com/docs/observability/tracing), [Instrumenting with OpenTelemetry](https://www.syntaqx.com/docs/observability/opentelemetry), [Running the Collector](https://www.syntaqx.com/docs/observability/collector), [Errors & Profiling](https://www.syntaqx.com/docs/observability/errors-and-profiling), [Frontend & Synthetic Monitoring](https://www.syntaqx.com/docs/observability/frontend-and-synthetic), [Dashboards & Alerts](https://www.syntaqx.com/docs/observability/dashboards-and-alerts) |
| **Operations** | Running it, and recovering when it breaks | [Environments & Configuration](https://www.syntaqx.com/docs/operations/environments), [Kubernetes](https://www.syntaqx.com/docs/operations/kubernetes), [SLOs](https://www.syntaqx.com/docs/operations/slos), [On-Call](https://www.syntaqx.com/docs/operations/on-call), [Incidents & Postmortems](https://www.syntaqx.com/docs/operations/incident-response), [Disaster Recovery](https://www.syntaqx.com/docs/operations/disaster-recovery), [Cost & FinOps](https://www.syntaqx.com/docs/operations/cost-and-finops), [Customer Support Operations](https://www.syntaqx.com/docs/operations/customer-support) |
| **Telemetry & Analytics** | Measuring what people do with the product, and keeping that data honest and lawful | [Event Design & Instrumentation](https://www.syntaqx.com/docs/telemetry/event-design), [Collecting Events](https://www.syntaqx.com/docs/telemetry/collection), [Consent & Privacy in Telemetry](https://www.syntaqx.com/docs/telemetry/consent-and-privacy), [Product Analytics](https://www.syntaqx.com/docs/telemetry/product-analytics), [Experimentation & A/B Testing](https://www.syntaqx.com/docs/telemetry/experimentation) |
| **Data Platforms** | Where analytical data lives, how it moves and is modeled, and who may read it | [Separating Production from Analytics](https://www.syntaqx.com/docs/data/separating-production-and-analytics), [Warehouses, Lakes & Lakehouses](https://www.syntaqx.com/docs/data/warehouses-and-lakes), [Running a Cloud Warehouse](https://www.syntaqx.com/docs/data/cloud-warehouses), [Real-Time Analytical Databases](https://www.syntaqx.com/docs/data/analytical-databases), [Streaming & Event Processing](https://www.syntaqx.com/docs/data/streaming), [Data Pipelines](https://www.syntaqx.com/docs/data/data-pipelines), [Modeling Analytical Data](https://www.syntaqx.com/docs/data/data-modeling), [Data Science & ML Platforms](https://www.syntaqx.com/docs/data/data-science-platforms), [Data Governance & Access](https://www.syntaqx.com/docs/data/data-governance) |
| **Leadership** | Hiring, growing and organizing the people who do all of this | [Hiring & Interviews](https://www.syntaqx.com/docs/leadership/hiring), [Onboarding](https://www.syntaqx.com/docs/leadership/onboarding), [1:1s & Feedback](https://www.syntaqx.com/docs/leadership/one-on-ones), [Career Ladders](https://www.syntaqx.com/docs/leadership/career-ladders), [Performance Reviews](https://www.syntaqx.com/docs/leadership/performance-reviews), [Team Structure](https://www.syntaqx.com/docs/leadership/team-structure), [Growing Managers](https://www.syntaqx.com/docs/leadership/growing-managers), [Communication & Meetings](https://www.syntaqx.com/docs/leadership/communication), [Measuring Engineering](https://www.syntaqx.com/docs/leadership/measuring-engineering) |

### Books

The playbook applies anywhere. When one subject needs more than a chapter, like an industry's networks, rules and economics, I write it as a book instead: see [Books](https://www.syntaqx.com/books), starting with [Payments](https://www.syntaqx.com/books/payments), [Field Operations](https://www.syntaqx.com/books/field-operations) and [Gaming](https://www.syntaqx.com/books/gaming).

## Where to Start

- **Designing an API?** [API Design Principles](https://www.syntaqx.com/docs/api-design/principles), then [Errors](https://www.syntaqx.com/docs/requests/error-responses), [Pagination](https://www.syntaqx.com/docs/requests/pagination) and [Versioning](https://www.syntaqx.com/docs/api-design/versioning).
- **Moving money?** [Money](https://www.syntaqx.com/docs/money/amounts) and [Idempotency](https://www.syntaqx.com/docs/requests/idempotency) before writing a line of code.
- **Building payments into a product?** [How Card Payments Work](https://www.syntaqx.com/books/payments/card-payments), [Interchange & Pricing](https://www.syntaqx.com/books/payments/interchange-and-pricing) and [Payments for Software Platforms](https://www.syntaqx.com/books/payments/software-platforms).
- **Running a business that sends people to customers?** [The Field Operations Business](https://www.syntaqx.com/books/field-operations/field-operations-business), then [Route Optimization](https://www.syntaqx.com/books/field-operations/route-optimization) and [Billing Recurring Service](https://www.syntaqx.com/books/field-operations/billing-recurring-service).
- **Building for any industry?** [Audit Trails](https://www.syntaqx.com/docs/building-blocks/audit-trails), [Notifications & Consent](https://www.syntaqx.com/docs/building-blocks/notifications) and [Rules as Data](https://www.syntaqx.com/docs/building-blocks/rules-as-data) come up in every industry.
- **Starting a new codebase?** [Repositories & Local Development](https://www.syntaqx.com/docs/development/repositories), [Documentation](https://www.syntaqx.com/docs/development/documentation) and [Where to Run It](https://www.syntaqx.com/docs/delivery/where-to-run).
- **Splitting a system?** [Service Boundaries](https://www.syntaqx.com/docs/architecture/service-boundaries) and [Events](https://www.syntaqx.com/docs/architecture/events).
- **Running it in production?** [Observability](https://www.syntaqx.com/docs/observability/overview) and [Instrumenting with OpenTelemetry](https://www.syntaqx.com/docs/observability/opentelemetry), then [SLOs](https://www.syntaqx.com/docs/operations/slos) and [Incidents & Postmortems](https://www.syntaqx.com/docs/operations/incident-response).

## References

**Specifications**

- [RFC 9110: HTTP Semantics](https://datatracker.ietf.org/doc/html/rfc9110), the foundation for methods, status codes and headers
- [RFC 9205: Building Protocols with HTTP](https://datatracker.ietf.org/doc/html/rfc9205), the IETF's best practice for HTTP APIs

**Reference**

- [MDN: HTTP](https://developer.mozilla.org/en-US/docs/Web/HTTP), the most readable reference for every header, method and status code

**In practice**

- [Stripe: API Reference](https://docs.stripe.com/api), the benchmark for payments APIs: idempotency, expansion, versioning
- [GitHub Docs: REST API](https://docs.github.com/en/rest), unwrapped responses, `Link` pagination and conditional requests
- [Google: API Improvement Proposals](https://google.aip.dev/), design guidance written as numbered, citable decisions
- [Microsoft: Azure REST API Guidelines](https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md), long-running operations, paging and concurrency at scale
- [Zalando: RESTful API Guidelines](https://opensource.zalando.com/restful-api-guidelines/), a public, opinionated rulebook in the same spirit
- [Heroku: HTTP API Design Guide](https://github.com/interagent/http-api-design), concise conventions from the Heroku Platform API
- [Google: Site Reliability Engineering](https://sre.google/sre-book/table-of-contents/), SLOs, error budgets and blameless postmortems

---

Canonical URL: https://www.syntaqx.com/docs/playbook
