feat(skills): align with cross-org review

- safety: drop tools section (moved to sdlc); relax kubectl-apply ban to
  production-only (dev and uat permit direct kubectl for iteration);
  keep kubectl-create-secret ban at all environments
- sdlc: split Authentication into its own section (Better-Auth + Google +
  Apple + Authentik); add Tools (canonical, not alternatives) section
  moved from safety, including the playwright MCP and ghcr.io registry
  standard
This commit is contained in:
2026-05-03 19:53:08 -04:00
parent 1d817d3e2d
commit f89b73f7b3
2 changed files with 26 additions and 20 deletions
+4 -18
View File
@@ -2,9 +2,9 @@
name: safety name: safety
description: > description: >
Non-negotiable safety rules for all CartSnitch agents. Covers secret Non-negotiable safety rules for all CartSnitch agents. Covers secret
handling, destructive-action gating, the SealedSecrets workflow, the handling, destructive-action gating, the SealedSecrets workflow, kubectl
canonical tool list (vs. the alternatives we don't use), the no-Dependabot scope limits, and the escalation protocol when an action's safety is
policy, and the escalation protocol when an action's safety is uncertain. uncertain.
--- ---
# Safety # Safety
@@ -19,7 +19,7 @@ The following rules apply to every CartSnitch agent without exception.
* **Never commit plaintext secrets.** Kubernetes secrets go through Bitnami Sealed Secrets (`kubeseal`). Application credentials go in environment variables injected at runtime — never hardcoded in source. * **Never commit plaintext secrets.** Kubernetes secrets go through Bitnami Sealed Secrets (`kubeseal`). Application credentials go in environment variables injected at runtime — never hardcoded in source.
* **Never `kubectl apply` against production (`cartsnitch`) or UAT (`cartsnitch-uat`).** Both are Flux-managed. Manifest changes go through a PR to `cartsnitch/infra` and are reconciled by Flux. The `cartsnitch-dev` namespace permits direct kubectl use for iteration; secrets there should still follow the SealedSecrets pattern when sensitive. * **Never `kubectl apply` against production (`cartsnitch`).** The production namespace is Flux-managed. Manifest changes go through a PR to `cartsnitch/infra` and are reconciled by Flux. The `cartsnitch-dev` and `cartsnitch-uat` namespaces permit direct kubectl use for iteration; secrets at every environment still follow the SealedSecrets pattern.
* **Never `kubectl create secret` in production.** All secrets — at every environment — go through SealedSecrets, encrypted with `kubeseal`, committed as `SealedSecret` resources to `cartsnitch/infra`. * **Never `kubectl create secret` in production.** All secrets — at every environment — go through SealedSecrets, encrypted with `kubeseal`, committed as `SealedSecret` resources to `cartsnitch/infra`.
@@ -27,20 +27,6 @@ The following rules apply to every CartSnitch agent without exception.
* **Never run `tofu` directly.** Terraform goes through the Flux OpenTofu Controller via a PR to `cartsnitch/infra`. * **Never run `tofu` directly.** Terraform goes through the Flux OpenTofu Controller via a PR to `cartsnitch/infra`.
## Tools (canonical, not alternatives)
These are the only acceptable choices — alternatives are policy violations:
* **Secret management:** Bitnami Sealed Secrets Controller — no plain Kubernetes secrets.
* **Database:** CloudNativePG Operator (Postgres) — no SQLite, MariaDB, or MySQL.
* **Cache / pub-sub:** DragonflyDB Operator — no Redis.
* **Authentication:** Better-Auth + OAuth2 via Authentik. Auth0, Okta, Entra-ID are also supported when required. **Never build custom authentication.**
* **Dependency updates:** Mend Renovate. **Dependabot is not used and will not be used.** Do not configure it. If you encounter Dependabot configuration anywhere, treat it as a policy violation and flag it.
* **Container registry:** `ghcr.io/cartsnitch/<service>` — no Docker Hub for first-party images.
* **Browser automation:** the `playwright` MCP server (`http://playwright:8931/mcp`). Never run Playwright locally or install browser binaries. Target dev (`cartsnitch.dev.farh.net`) — never test production.
If a task requires deviating from any of the above, treat it as a destructive action: stop, file an issue with rationale, request board approval.
## If you are unsure ## If you are unsure
If you are unsure whether an action is safe, **stop**. Post a comment on the Paperclip issue explaining what you are about to do and why you are uncertain, set the issue to `blocked`, and escalate to your manager. Do not guess. If you are unsure whether an action is safe, **stop**. Post a comment on the Paperclip issue explaining what you are about to do and why you are uncertain, set the issue to `blocked`, and escalate to your manager. Do not guess.
+22 -2
View File
@@ -147,11 +147,17 @@ Without this release, the receiving agent cannot check out the issue.
* **Production:** namespace `cartsnitch`, FQDN `cartsnitch.farh.net` * **Production:** namespace `cartsnitch`, FQDN `cartsnitch.farh.net`
* **UAT:** namespace `cartsnitch-uat`, FQDN `cartsnitch.uat.farh.net` * **UAT:** namespace `cartsnitch-uat`, FQDN `cartsnitch.uat.farh.net`
* **Dev:** namespace `cartsnitch-dev`, FQDN `cartsnitch.dev.farh.net` * **Dev:** namespace `cartsnitch-dev`, FQDN `cartsnitch.dev.farh.net`
* **Auth:** Better-Auth + OAuth2 via Authentik OIDC at `https://auth.farh.net` (credentials in `authentik-credentials` secret in the relevant namespace). Authentik / Auth0 / Okta / Entra-ID are all supported. **Never build custom auth.**
* **Cluster:** Kubernetes — cluster-wide read; read/write on `cartsnitch-dev` and `cartsnitch-uat`; read-only on `cartsnitch` (production). * **Cluster:** Kubernetes — cluster-wide read; read/write on `cartsnitch-dev` and `cartsnitch-uat`; read-only on `cartsnitch` (production).
* **Gateways:** `istio-external` (publicly accessible) and `istio-internal` (internal only) in `gateway-system`. * **Gateways:** `istio-external` (publicly accessible) and `istio-internal` (internal only) in `gateway-system`.
* **Container registry:** `ghcr.io/cartsnitch/<service>` only. * **Container registry:** `ghcr.io/cartsnitch/<service>` only.
## Authentication
* **Framework:** Better-Auth.
* **Social login:** Google and Apple OAuth.
* **SSO:** Authentik OIDC at `https://auth.farh.net` (credentials in `authentik-credentials` secret).
* **Never build custom authentication.**
## Deployment — 2-stage Flux GitOps ## Deployment — 2-stage Flux GitOps
**Stage 1 — CI (GitHub Actions, runs in each application repo):** **Stage 1 — CI (GitHub Actions, runs in each application repo):**
@@ -181,7 +187,21 @@ kubectl rollout restart deployment/<name> -n <namespace>
Terraform (OpenTofu) is deployed via the **Flux OpenTofu Controller** in a GitOps fashion. Submit Terraform configurations via a PR to `cartsnitch/infra` — the tofu controller reconciles them on merge. Use for Authentik configuration, DNS, or other infra provisioning. Terraform (OpenTofu) is deployed via the **Flux OpenTofu Controller** in a GitOps fashion. Submit Terraform configurations via a PR to `cartsnitch/infra` — the tofu controller reconciles them on merge. Use for Authentik configuration, DNS, or other infra provisioning.
**Never run `tofu` directly.** Never `kubectl apply` against production. Production changes go through Flux only. **Never run `tofu` directly.** Never `kubectl apply` against production. Production changes go through Flux only. The `cartsnitch-dev` and `cartsnitch-uat` namespaces permit direct kubectl use for iteration.
## Tools (canonical, not alternatives)
These are the only acceptable choices — alternatives are policy violations:
* **Secret management:** Bitnami Sealed Secrets Controller — no plain Kubernetes secrets.
* **Database:** CloudNativePG Operator (Postgres) — no SQLite, MariaDB, or MySQL.
* **Cache / pub-sub:** DragonflyDB Operator — no Redis.
* **Authentication:** Better-Auth + Google + Apple + Authentik (see Authentication section). Never build custom auth.
* **Dependency updates:** Mend Renovate. **Dependabot is not used and will not be used.** Do not configure it.
* **Container registry:** `ghcr.io/cartsnitch/<service>` — no Docker Hub for first-party images.
* **Browser automation:** the `playwright` MCP server (`http://playwright:8931/mcp`). Never run Playwright locally or install browser binaries. Target dev (`cartsnitch.dev.farh.net`) — never test production.
If a task requires deviating from any of the above, treat it as a destructive action: stop, file an issue with rationale, request board approval.
## External communication ## External communication