agentleFS
bex-cobex-co/bex/AGENTS.md

bex

AGENTS.md569 starsChanged 2 months agoApache-2.0View on GitHub

bex is the open-source Render alternative — AI-native (ADR008). A Go Kubernetes operator reconciles App CRs (app.bex.co/v1alpha1, bex-system) into running services. All Go lives in lego/ (Latin legō, "I assemble") — one image, four workspace modules: types/ (CRD contract, leaf), operator/ (mechanism, DB-free manager), backend/ (bex-api on :8090 + SSH gateway), cli/ (Render CLI launcher, bex-cli/v* train). operator → types ← backend; cli imports none. All make targets live in lego/operator/; see lego/AGENTS.md for workspace Go-version split + codegen. CI…

  • Reads credentials

The file

We split this AGENTS.md into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    All three platform suites + dashboard/yarn test must pass before deploy.yml builds.

    line 29
  2. Very specific:

    Never commit/print .env or *.kubeconfig.

    line 65

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md

bex is the open-source Render alternative — AI-native (ADR008). A Go Kubernetes operator reconciles App CRs (app.bex.co/v1alpha1, bex-system) into running services. All Go lives in lego/ (Latin legō, "I assemble") — one image, four workspace modules: types/ (CRD contract, leaf), operator/ (mechanism, DB-free manager), backend/ (bex-api on :8090 + SSH gateway), cli/ (Render CLI launcher, bex-cli/v* train). operator → types ← backend; cli imports none.

Repo map

  • lego/ — all Go, self-contained (go.work, Dockerfile; context lego/). README, workspace rules.
    • lego/types/ — App/Database CRD types
    • lego/operator/ — manager → Deployment/Service/Ingress; owns config/ + codegen. operator guide
    • lego/backend/ — bex-api (REST/GraphQL/MCP + OpenFGA) + ssh-gateway. backend guide
    • lego/cli/ — bex CLI launcher (pinned render-oss/cli). README
  • dashboard/ — TanStack Start + Apollo + shadcn, client of bex-api GraphQL. dashboard guide
  • infra/ — day-0: Terraform + Cluster API (local-capd ⇄ hetzner-caph)
  • deploy/gitops/ — day-1: Argo CD platform infra (not user deploys)
  • examples/ — whoami-app.yaml, hello-go/
  • scripts/ — cluster helpers (mock-cluster.sh, app-apply.sh, deploy-sample.sh)
  • docs/ — one file per topic. Full catalog in docs/AGENTS.md
  • .pm/ — internal PM board (may be stale). Conventions in .pm/AGENTS.md

Commands

All make targets live in lego/operator/; see lego/AGENTS.md for workspace Go-version split + codegen. CI gates:

  • make test (operator, from lego/operator/) — CRD/RBAC codegen + envtest
  • cd lego/backend && go test ./... — backend (real Postgres + OpenFGA in CI)
  • make lint (all four modules) — golangci-lint + whole-program dead-code analysis; depguard guards the id convention
  • cd lego/cli && go test ./... — CLI launcher

All three platform suites + dashboard/yarn test must pass before deploy.yml builds.

Local cluster workflow

  • bash scripts/mock-cluster.sh — kind infra + CAPI + CAPD app cluster; kubeconfig infra/local/bex.kubeconfig (gitignored)
  • bash scripts/mock-cluster.sh scale N — add/remove workers
  • scripts/app-apply.sh <bex.yml> — render.yaml-shaped bex.yml → App CR (DRY_RUN=1 preview)
  • scripts/deploy-sample.sh / kubectl get apps.app.bex.co — deploy + status

Environment variables

Inventories live with the code (cascading):

  • operator / activator / pg-sni-proxy / kv-sni-proxy / egress-meter / static-server → lego/operator/AGENTS.md
  • bex-api / ssh-gateway → lego/backend/AGENTS.md
  • dashboard SSR → dashboard/AGENTS.md

Docs — where to look

Full ADR/ledger catalog with one-line summaries: docs/AGENTS.md (cascading — loaded only when working in docs/).

Key entry points:

  • Vision/roadmap: ADR008 · Architecture: ADR002 · Control plane: ADR003
  • API core + parity: ADR006 · ADR018 · ADR049
  • IDs: ADR020 · Auth: ADR012 · Members: ADR024
  • Deploy/custom-domain: ADR004 · ADR005
  • Managed data: ADR009 · ADR021 · ADR029
  • Billing/pricing: ADR040 · ADR030
  • GitHub/members/infra-creds: ADR026 · ADR019
  • Tenant isolation/networking: ADR043 (replaces ADR022 option B)
  • Security review lineage: ADR028 → ADR072 … ADR083 (see docs/AGENTS.md for full chain)

Rules

  • Never git commit/push unless user runs /ship (Claude) or $ship (Codex), or explicitly requests an rt-* routine run. A routine request authorizes planning, fixing, verification, and invoking ship in the same run without first filing a .pm milestone. Honor explicit audit-only or no-ship limits; follow the ship skill’s safety rules.
  • Never commit/print .env or *.kubeconfig.
  • Local dev environments are pre-approved (user decision 2026-09-09). scripts/dev-env.sh <N> {up,down,status,clean,env} for any dev-N, and scripts/mock-cluster.sh (bring-up, reprovision, scale N) on the local kind/CAPD cluster, never require user approval — run them whenever the work needs it, including destructive recovery (reprovision, clean) when the harness's own diagnostics point there. Still respect each harness's isolation boundaries (own dev-N namespaces/ports; read-only on other workstreams' stacks), and report what was rebuilt.
  • Skill layout: canonical .claude/skills/<name>/SKILL.md; .agents/skills/<name> is ../../.claude/skills/<name> symlink; no .claude/commands/. Validate: bash scripts/skill-layout-validate.sh.
  • .env.example mirrors .env names (no values). cp .env.example .env must never fall out of date; scripts/gh-secrets.sh pushes .env → GitHub secrets.
  • Markdown CI: npx prettier@3.4.2 --write "**/*.md" before finishing.
  • Go ids: mint only via lego/backend/internal/id (id.New(kind)), hyphen not underscore; boilerplate header per lego/operator/hack/boilerplate.go.txt. See lego/AGENTS.md.
  • .pm done: move folder to done/ (task tNNN.md → done/tNNN.md; milestone mN/ → wN/done/mN/), leave no stub; sync status in workstream README + milestone README + frontmatter. See .pm/AGENTS.md.
  • Dashboard preloading skeletons must match their post-loading contents. A skeleton is a structural preview of the exact ready state at the same responsive breakpoint: preserve its outer bounds, padding, max-width, columns, headings/actions, tabs, and major content regions with stable heights. Do not substitute a generic list/form/detail skeleton when the destination geometry differs. Verify pending and ready states side by side at desktop and narrow-mobile widths; see dashboard/AGENTS.md.
  • Playwright MCP: writes to .playwright-mcp/ (--output-dir in .mcp.json); use bare filenames for screenshots.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.