# AGENTS.md This file documents the architecture and domain model of this repository, intended for both human readers and AI agents. ## Agent skills ### Issue tracker Issues are tracked in the Gitea instance at https://git.bobbypalko.com/bobby/hapi. Uses the `gt` CLI (Gitea's official CLI). Run `gt auth login -h https://git.bobbypalko.com` to authenticate. See `docs/agents/issue-tracker.md`. ### Triage labels Five canonical triage roles mapped to labels: `needs-triage`, `needs-info`, `ready-for-agent`, `ready-for-human`, `wontfix`. See `docs/agents/triage-labels.md`. ### Domain docs Single-context layout: `GLOSSARY.md` at repo root and `docs/adr/` for architecture decisions. See `docs/agents/domain.md`. ### Infrastructure modules The `infra/` directory contains Terraform configurations with these modules: - `backend/` - Terraform state backend (Object Storage S3-compatible) - `k8s/` - PostgreSQL StatefulSet with persistent storage and Kubernetes manifests - `network/` - Firewall rules for API (8000), PostgreSQL (5432), Adminer (8080) - `postgres/` - LKE clusters for staging/production - `storage/` - Object Storage buckets for uploads and state See `infra/README.md` and `docs/adr/0002-linode-provider-v2-migration.md` for details. ### Kubernetes Deployments PostgreSQL is deployed using Kustomize with environment-specific configurations: - **Base** (`infra/k8s/base/`) - Shared resources (StatefulSet, Service, PVC, Namespace) - **Staging** (`infra/k8s/staging/`) - Staging environment overlay with `staging-` prefix - **Production** (`infra/k8s/production/`) - Production environment overlay with `production-` prefix **Deployment commands:** ```bash # Staging kubectl apply -k infra/k8s/staging # Production kubectl apply -k infra/k8s/production # Dry run kubectl apply -k infra/k8s/staging --dry-run=client ``` **Resource naming:** - Staging resources are prefixed with `staging-` - Production resources are prefixed with `production-` - All resources go to the `postgres` namespace **Secrets required:** - `postgres-secrets` with `username` and `password` keys See `infra/k8s/README.md` for more details. ## Provider Versions ### Linode Terraform Provider **v2.0+** (current branch) - Migrated from v1 with breaking changes documented in ADR-0002. Key differences: - Object Storage: `cluster` → `region` - Firewall: Updated format with `action`, `ipv4`, `ipv6` - LKE: `pools` → `pool` - Tags: Set format (`key=value`)