Templates
Copy, fill in, and delete the hints.
Service card
# Service card: <Name>
| | |
|---|---|
| **Purpose** | One sentence: what it does, for whom |
| **Owns** | The data it is the source of truth for |
| **Does not own** | Data it copies or leaves to others |
| **Exposes** | REST base path, events |
| **Consumes** | Messages, upstream APIs |
| **Depends on** | Databases, brokers, third parties |
| **Runs as** | Deployments / roles |
| **Health** | Probe endpoints |
| **Telemetry** | Logs, traces, metrics names |
| **Docs** | Handbook, API reference, code reference, runbook |
Event page
---
title: <EventName>
description: <one-sentence summary from the XML doc>
---
# <EventName>
> **Published by this service.** <summary>
## When
What happens in the business that raises it. Is it raised once, or again on retries?
## What to do with it
Who should consume it, and how. Ordering and idempotency notes.
## Routing
Exchange / queue names.
## Fields
<!-- generated by build/docs/event-pages.py -->
Architecture decision record
---
title: "NNNN: <decision in a few words>"
---
# NNNN: <Decision as a sentence>
**Status:** Proposed | Accepted | Superseded by NNNN · **Date:** YYYY-MM-DD
## Context
The forces at play: requirements, constraints, what hurts today.
## Decision
What we will do. Be specific enough that someone could check the code against it.
## Consequences
What gets easier, what gets harder, what we now have to keep doing.
XML doc comments
/// <summary>Locks the daily rate. Idempotent per pair and rate date: every line committed the same day shares one lock.</summary>
/// <param name="from">ISO 4217 source currency.</param>
/// <returns>The lock, and whether this call created it.</returns>
public async Task<(RateLockDto Lock, bool Created)> LockAsync(string from, string to, DateOnly? date, CancellationToken ct)
/// <summary>A lock fixes the rate a committed line uses.</summary>
/// <param name="LockId">Store this on the line and reuse it when the line is edited.</param>
public sealed record RateLockDto(Guid LockId, /* ... */);
Say what it means and why it matters, not what the name already says. Records document their positional
parameters with <param>.