Architecture decision records
An ADR in this folder records a decision that the repository already enforces. It is not a guess about a meeting that was not written down.
Write a new ADR only when you can point at code, a schema comment, or a project rule (AGENTS.md, docs/AI_CONTEXT.md). If the repository does not say why an alternative was rejected, write “not recorded” under Alternatives. Do not invent the discussion.
Status values
Accepted means the code does this now. Proposed means it is not implemented. Deprecated means the code no longer does this.
Current records
| ID | Title | Evidence |
|---|---|---|
| 0001 | Order and stock side effects use the transactional outbox | AGENTS.md, OutboxWriterService, worker dispatcher |
| 0002 | Human inactive versus machine suspended | Channel schema comment and sync processor |
| 0003 | One codebase, three processes | main.ts, main.worker.ts, main.scheduler.ts, Compose |
| 0004 | Finance accounts own their connection | PaymentAccount and AccountingSystem in 55-finance-accounts.prisma, connectionId |
| 0005 | One payout spine for every source of money | 51-settlement.prisma, 53-receivable.prisma, 56-journal.prisma, migration 20261004120000_settlement_money_spine |
| 0006 | Order profit is a rebuilt projection | 57-profitability.prisma, OrderItemProfitService, migration 20261019120000_add_order_item_profit |
Template
Copy the template. Number the next file 0007-short-title.md.
Significant architectural changes update the ADR and the matching docs page in the same change. See CONTRIBUTING.md.