一键导入
adr-write
Write Architecture Decision Records (ADRs) — lightweight documents that capture
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Write Architecture Decision Records (ADRs) — lightweight documents that capture
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Consult and write the ARAYA postoffice — the operational-directive channel. Advisory, never a gate: read it at cycle start, append your entry at cycle end, consider its directives, never be blocked by it. Governance acts never travel the postoffice.
Audit and enforce brand compliance across all projects and platforms — logo,
Design REST and GraphQL APIs following OpenAPI 3.1 standards. Produce complete
Connect frontend to backend — type-safe API clients, request/response handling,
Implement authentication and authorization middleware — JWT validation, role-based
Design scalable component architectures — design systems, component libraries,
| name | adr-write |
| description | Write Architecture Decision Records (ADRs) — lightweight documents that capture |
Write Architecture Decision Records (ADRs) — lightweight documents that capture a significant architectural decision, the context in which it was made, the options considered, the decision taken, and the consequences.
Teams make architectural decisions every day, but months later nobody remembers WHY a technology was chosen, WHAT alternatives were considered, or WHAT tradeoffs were accepted. ADRs create an immutable decision log that preserves institutional knowledge and prevents re-litigating settled decisions.
The decision to document — technology choice, pattern adoption, or convention.
An ADR in .araya/plan/spec/adr/:
# ADR-005: Use PostgreSQL with PostGIS for Spatial Data
**Status:** Accepted
**Date:** 2026-05-27
**Deciders:** Junia (Data Platform Architect), Bernabé (Data Engineer), The Data Professor
**Replaces:** n/a
**Superseded by:** n/a
---
## Context
The ManTradeCoin platform needs to store trade locations and perform
geospatial queries (radius search, distance calculation). We evaluated
options for adding spatial capabilities to our data layer.
## Decision
Use PostgreSQL with PostGIS extension as our primary spatial database.
## Options Considered
| Option | Pros | Cons |
|--------|------|------|
| **PostgreSQL + PostGIS** | Mature (20+ years), rich spatial functions, integrates with existing PG stack, excellent indexing (GiST) | Slightly larger install, separate extension to maintain |
| **MongoDB GeoJSON** | Simple API, good for prototypes, schema-flexible | Limited spatial operations, no spatial joins, weaker for ACID transactions in our use case |
| **Elasticsearch geo** | Great for search-first use cases, real-time indexing | Not a primary database, eventual consistency, operational complexity |
| **DuckDB spatial** | Excellent for analytical queries, zero-config | Not for transactional workloads, newer spatial support |
## Consequences
### Positive
- Spatial queries (ST_DWithin, ST_Distance) are SQL-native and indexed
- Reuses existing PostgreSQL operations knowledge and tooling
- Can combine spatial + transactional queries in single statements
- Excellent ecosystem: QGIS, GeoServer, pg_tileserv integrations
### Negative
- PostGIS extension adds complexity to Docker setup and migrations
- GiST indexes are larger and slower to build than B-tree
- Developers need to learn spatial SQL concepts (SRID, geometry types)
### Neutral / Mitigations
- Add PostGIS extension to Docker Compose and migration scripts
- Create helper functions for common spatial operations
- Document spatial query patterns in developer guide (Priscila to own)
## References
- PostGIS documentation: https://postgis.net/documentation/
- PostgreSQL + PostGIS Docker image: `postgis/postgis:16-3.4`
- Prior art: ManTradeCoin training lab uses PostgreSQL for non-spatial data
.araya/plan/spec/adr/adr-NNN-title-with-dashes.md