agentleFS
den-vasylievden-vasyliev/agentregistry-inventory/CLAUDE.md

agentregistry-inventory

CLAUDE.md26 starsChanged 10 months agoApache-2.0View on GitHub

CRITICAL: Pre-commit checklist - ALWAYS run these commands before EVERY commit: If ANY of these fail, fix the issues before committing. NEVER commit or push code that fails formatting, linting, or tests. CRITICAL: NEVER push before user tests! After committing, WAIT for the user to test and explicitly ask to push. IMPORTANT: Commit Messages Agent Registry is a Kubernetes-native controller that provides a centralized registry to curate, discover, deploy, and manage agentic infrastructure including MCP servers, agents, and skills. Single…

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If ANY of these fail, fix the issues before committing.

    line 13
  2. Distinctive:

    CRITICAL: NEVER push before user tests!: After committing, WAIT for the user to test and explicitly ask to push.

    line 15
  3. Very specific:

    Follow conventional commits (feat:, fix:, docs:, refactor:, test:, chore:)

    line 19
  4. Very specific:

    Do NOT add Co-Authored-By: lines to commit messages

    line 20
  5. Very specific:

    All Agent Registry resources live in the agentregistry namespace.

    line 74
  6. Very specific:

    Use envtest, NOT fake clients: All controller tests use SetupTestEnv from testhelper_test.go:

    line 111
  7. Very specific:

    Update controller in internal/controller/

    line 124
  8. Very specific:

    Update API handlers in internal/httpapi/handlers/

    line 125
  9. Very specific:

    Update UI in ui/components/

    line 126
  10. Very specific:

    Create handler in internal/httpapi/handlers/

    line 130
  11. Very specific:

    Create reconciler in internal/controller/

    line 135
  12. Very specific:

    Add tests in internal/controller/*_test.go

    line 137

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.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
CLAUDE.md

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/claude-code) when working with code in this repository.

Git Workflow

CRITICAL: Pre-commit checklist - ALWAYS run these commands before EVERY commit:

  1. make fmt - Format all code (gofmt, prettier)
  2. make lint - Check for linting issues (gofmt + go vet)
  3. make test - Run all tests

If ANY of these fail, fix the issues before committing. NEVER commit or push code that fails formatting, linting, or tests.

CRITICAL: NEVER push before user tests! After committing, WAIT for the user to test and explicitly ask to push.

IMPORTANT: Commit Messages

  • Follow conventional commits (feat:, fix:, docs:, refactor:, test:, chore:)
  • Do NOT add Co-Authored-By: lines to commit messages

Project Overview

Agent Registry is a Kubernetes-native controller that provides a centralized registry to curate, discover, deploy, and manage agentic infrastructure including MCP servers, agents, and skills.

Architecture

Single binary controller with embedded HTTP API and static UI.

Directory Structure

agentregistry/
├── cmd/controller/              # Controller entry point (ONLY binary)
├── api/v1alpha1/                # CRD type definitions
├── internal/
│   ├── controller/              # 5 K8s reconcilers
│   ├── httpapi/                 # HTTP API server (Huma) + UI embedding
│   │   ├── handlers/            # API endpoint handlers
│   │   └── server.go            # Huma API setup + import logic
│   ├── runtime/                 # Deployment logic (translation to K8s resources)
│   ├── cluster/                 # Remote cluster client factory (GCP workload identity)
│   ├── config/                  # Namespace and config helpers
│   ├── validation/              # Input validation
│   ├── utils/                   # Shared utilities
│   └── version/                 # Version info
├── ui/                          # Next.js 16 frontend (static export)
│   ├── app/                     # Next.js app router pages
│   ├── components/              # React components
│   └── lib/                     # API client (admin-api.ts)
├── config/
│   ├── crd/                     # Generated CRD YAML
│   ├── external-crds/           # Vendored upstream CRDs (kagent, kmcp)
│   ├── rbac/                    # RBAC manifests
│   └── samples/                 # Example resources
└── charts/agentregistry/        # Helm chart

CRDs

agentregistry.dev/v1alpha1:
  MCPServerCatalog, AgentCatalog, SkillCatalog, ModelCatalog
  RegistryDeployment
  DiscoveryConfig (namespace-scoped, multi-cluster autodiscovery)

External (vendored):
  kagent.dev/v1alpha2: Agent, RemoteMCPServer, ModelConfig
  kmcp.agentregistry.dev/v1alpha1: MCPServer

Default Namespace

All Agent Registry resources live in the agentregistry namespace. Use config.GetNamespace() (respects POD_NAMESPACE env var) when referencing it in code.

Ports

  • :8080 - HTTP API + UI
  • :8081 - Metrics
  • :8082 - Health probes

Build Commands

make build            # Build everything (UI + controller)
make dev              # Start controller + UI dev server
make dev-controller   # Controller only
make dev-ui           # UI dev server only (:3000)
make test             # Run all tests
make lint             # gofmt + go vet
make fmt              # Format Go + JS code
make generate         # Regenerate deepcopy + CRD manifests
make push             # Build UI + push container with ko

Testing

Coverage: 37.7%

PackageCoverage
internal/validation100%
internal/config100%
internal/runtime/translation/kagent81.7%
internal/httpapi47.7%
internal/controller39.4%
internal/cluster28.3%
internal/httpapi/handlers25.9%
internal/runtime8.7%

Use envtest, NOT fake clients. All controller tests use SetupTestEnv from testhelper_test.go:

helper := SetupTestEnv(t, 60*time.Second, false)
defer helper.Cleanup(t)

Common Tasks

Adding a New CRD Field

  1. Update api/v1alpha1/*_types.go
  2. make generate
  3. Update controller in internal/controller/
  4. Update API handlers in internal/httpapi/handlers/
  5. Update UI in ui/components/

Adding a New API Endpoint

  1. Create handler in internal/httpapi/handlers/
  2. Register route in handler's RegisterRoutes() method

Adding a New Reconciler

  1. Create reconciler in internal/controller/
  2. Register in cmd/controller/main.go
  3. Add tests in internal/controller/*_test.go

Environment

  • Go: 1.26+
  • Node.js: 18+
  • Kubernetes: 1.27+

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.