Before generating code, find relevant ADRs by keyword and read them.

By topic

Go / code quality

  • ADR-0001: golangci-lint quality gate → linting, errcheck, gocritic, staticcheck, ci, go

Database / persistence

  • ADR-0002: PostgreSQL AFTER triggers for audit trails → audit, compliance, triggers, leave, postgresql, jsonb
  • ADR-0007: Two complementary audit systems → audit, audit_trail, audit_log, compliance, triggers, leave

Messaging / events

  • ADR-0003: Transactional outbox pattern → outbox, nats, events, reliability, distributed-systems

Architecture / modules

  • ADR-0004: Shared kernel + Anti-Corruption Layer for inter-module lookup → modules, decoupling, ddd, bounded-context, microservice, acl
  • ADR-0009: ACL per module for bounded context isolation → ddd, bounded-context, acl, microservice, modules

Authentication / authorization

  • ADR-0005: Stateless JWT with direct PostgreSQL reads → authentication, jwt, better-auth, postgresql, redis, security
  • ADR-0006: Go backend as read-only Better Auth consumer → authentication, better-auth, postgresql, multi-tenancy, permissions

HTTP / API

  • ADR-0008: Automatic validation middleware → http, echo, validation, middleware, handlers

CLI / developer tooling

  • ADR-0010: grm CLI uses OAuth 2.0 Device Flow with API key storage → cli, grm, oauth2, device-flow, api-key, authentication
  • ADR-0011: Better Auth bearer plugin required for CLI API key creation → cli, grm, better-auth, bearer, api-key, authentication
  • ADR-0012: Per-device API key naming and revocation → cli, grm, api-key, hostname, revocation, multi-device

Database / conventions

  • ADR-0021: Table naming — module-owned vs cross-cutting registries → database, naming, conventions, ddd, modules

Fieldforce / task management

  • ADR-0013: Event-based API for task status transitions → fieldforce, state-machine, api, patch, events, transitions
  • ADR-0014: Generic state machine in shared kernel → fieldforce, state-machine, shared-kernel, ddd, reuse
  • ADR-0015: Append-only review_notes JSONB array for rejection history → fieldforce, jsonb, audit, history, immutability
  • ADR-0016: Two-tier feature flags — global kill-switch + per-org toggle → fieldforce, feature-flags, multi-tenancy, admin
  • ADR-0017: Supervisor team scope resolved by scanning shared member table → fieldforce, teams, supervisor, better-auth, adr-0006
  • ADR-0018: Frontend server action handles SeaweedFS upload, Go persists metadata only → fieldforce, s3, seaweedfs, upload, attachments
  • ADR-0019: Unified org_module_configs table for per-org module configuration → fieldforce, org-config, jsonb, multi-tenancy, modules
  • ADR-0020: Overdue escalation is notify-only, no auto-reassignment → fieldforce, overdue, escalation, notifications
  • ADR-0022: Daily fieldforce briefings as stored snapshots → fieldforce, briefing, snapshot, cron, ai, idempotency
  • ADR-0023: Lease-then-LLM ordering for cron-driven AI generation → cron, ai, idempotency, multi-replica, fieldforce, briefing
  • ADR-0024: Per-org local-time scheduling via Go-side time.LoadLocation → cron, scheduling, timezones, fieldforce, briefing
  • ADR-0025: DB-managed LLM prompts as canonical, no code fallback → ai, prompts, llm, fieldforce, briefing

Docs / spec review tooling

  • ADR-0026: LLM-driven HTML enrichment with agent file-writing contract → ai, llm, docs, astro, plans, generation, agentic-cli
  • ADR-0027: Closed component vocabulary for plans-app spec review pages → docs, astro, plans, design-system, llm, ai, generation