Generated banner for Open Knowledge Format for Crossplane v2
Generated logo for Open Knowledge Format for Crossplane v2

Open Knowledge Format for Crossplane v2

LLM wiki kit

First committed by jkroepke

Published in jkroepke/okf-crossplane-v2. Publisher page

37 GitHub stars

What it is

LLM-wiki in OKF (Open Knowledge Format) for Crossplane v2
— the description by jkroepke

AutoGineer overview, from the brain’s own files

The okf-crossplane-v2 repository provides a versioned, source-backed knowledge catalog designed to help AI agents and developers navigate the Crossplane v2 ecosystem. It aggregates information from Go API types, CRDs, package metadata, and documentation into a structured format. By utilizing the Open Knowledge Format (OKF), it enables agents to perform precise lookups on providers, composition functions, and API definitions. The project includes a dedicated MCP server that allows agents to query live repository data, such as CRD definitions, versioning, and examples, ensuring that the information retrieved is grounded in specific, versioned source code.

How it works

Memory model: LLM wiki

AutoGineer overview, from the brain’s own files

The system organizes technical knowledge into a catalog of Markdown files stored in the catalog folder. These files contain OKF metadata and provenance links. An MCP server, which can be self-hosted or used via a public endpoint, ingests this catalog into a DuckDB instance. Agents interact with this data through specific tools that resolve provider versions, search CRDs, and retrieve documentation or examples. The system relies on specialized researcher agents defined in the .agents folder to maintain and validate the knowledge base, ensuring that facts are linked to stable source code and documentation.

Folders
FolderRoleFiles
.codexagent-config25
.githubagent-config2
skillsagent-instructions1
.agentsfolder37
.codex-pluginfolder1
.okffolder2
.pifolder27
.pluginfolder1
catalogfolder120
mcpfolder12

Requirements

Apps: Docker

API keys (by name): GITHUB_TOKEN

Works with: Claude Code, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Amp, Cline, JetBrains Junie, Devin (ex-Windsurf)

Set it up

  1. Download the brain as a ZIP and unzip it where you keep your notes or project: https://mp-staging.autogineer.com/agent-brains/jkroepke/okf-crossplane-v2/download
  2. Point Claude Code at .codex-plugin/plugin.json: it does not read that file on its own.

  3. cd okf-crossplane-v2 && claude

  4. AutoGineer scanned these files at commit df24ac2.

  5. Add crossplane-v2-okf to .mcp.json:

    {
      "mcpServers": {
        "crossplane-v2-okf": {
          "type": "http",
          "url": "https://crossplane.mcp.jkroepke.de/mcp"
        }
      }
    }
    
  6. Or add it with the Claude Code CLI:

    claude mcp add --transport http crossplane-v2-okf https://crossplane.mcp.jkroepke.de/mcp
  7. Your data is sent to crossplane.mcp.jkroepke.de.

  8. First committed by jkroepke. Published in jkroepke/okf-crossplane-v2. Licence: Apache License 2.0.

Usage

AutoGineer overview, from the brain’s own files

  • Querying CRD definitions for specific Crossplane providers
  • Retrieving versioned examples for composition functions
  • Resolving stable provider versions and their associated documentation
  • Integrating Crossplane knowledge into AI agent workflows via MCP
“Find the latest version of the AWS provider and list its CRDs.”
The agent uses the get_versions and provider_crd_search tools to return the canonical repository name and a list of available CRDs for the specified provider.
“Show me the definition for the S3Bucket CRD in the latest AWS provider.”
The agent retrieves the YAML definition of the requested CRD using the provider_crd_get_definition tool, ensuring the output is token-efficient.

Documentation by jkroepke

Image: CI Image: GitHub license Image: GitHub Repo stars Image: BundleDex

Open Knowledge Format for Crossplane v2

This repository provides a structured knowledge catalog for the Crossplane v2 ecosystem using Open Knowledge Format v0.2.

The goal is to make Crossplane concepts, APIs, providers, composition functions, documentation, and practical examples easier to discover and understand. The catalog is designed for both humans and knowledge-aware tools.

Installation

WARNING
The public MCP server is a temporary early-access service for early adopters. Its availability is not guaranteed, and it may change or be removed without notice. It is intended to bridge the current tooling gap until the OKF ecosystem provides practical, end-user-friendly solutions that run locally. For reliable or production use, self-host the included container.

Install the companion skill and hosted OKF-aware MCP server together as a plugin for every detected supported agent:

npx plugins add jkroepke/okf-crossplane-v2

Pass --target codex to install only in Codex. Restart the selected agents after installation.

Alternatively, install the hosted OKF-aware MCP server globally:

npx add-mcp \
  https://crossplane.mcp.jkroepke.de/mcp \
  --name crossplane-v2-okf \
  --global

Then install the companion skill so the agent prefers this bundle over generic documentation providers for Crossplane v2 questions:

npx skills add jkroepke/okf-crossplane-v2 \
  --skill crossplane-v2-okf \
  --global

Both standalone installers detect supported agents and ask where the integration should be installed. Restart the selected agent after installation.

The public MCP health endpoint is available at https://crossplane.mcp.jkroepke.de/healthz.

Self-hosting the MCP server

The included container fetches this repository, ingests catalog/ into a DuckDB catalog, and serves the okf-mcp tools over Streamable HTTP.

docker compose up --build --detach

To authenticate the server's GitHub requests, export GITHUB_TOKEN before starting the container. The token is optional.

The local MCP endpoint is http://127.0.0.1:8000/mcp. Put it behind a TLS reverse proxy for crossplane.mcp.jkroepke.de.

The catalog is refreshed at container startup. If fetching or ingestion fails and a previous catalog exists in the volume, the server continues with that last successful catalog.

The MCP tools are read-only, but the public endpoint has no application-level authentication. Apply request limits and access controls at the reverse proxy when required.

Crossplane package tools

The server adds these tools backed by OSS GitHub repositories:

  • get_versions(name) resolves an OSS provider or function repository and returns its canonical repository name, versions.latest, a compact list of recent stable versions, and tag counts. Pass the returned provider name to the CRD tools.

  • provider_crd_search(provider_name, provider_version, crd_search_term) searches CRDs in one explicit provider package version. The search term supports case-insensitive shell-style wildcards.

  • provider_crd_get_definition(provider_name, provider_version, crd_name, path?) returns the complete CRD definition as token-efficient YAML. Use a dotted path such as .spec or .spec.versions[0] to return only a subtree.

  • provider_crd_get_examples(provider_name, provider_version, crd_name) returns GitHub repository paths for generated and handwritten examples. Without an API version, it selects the latest served CRD API version, for example examples-generated/namespaced/ec2/v1beta2/route.yaml.

  • provider_crd_get_terraform_docs(provider_name, provider_version, crd_name) returns the Terraform provider repository, version, and documentation path. It reads the Crossplane provider Makefile and the generated controller mapping instead of inferring the Terraform resource name.

crd_name accepts a Kind, group/Kind, group/version/Kind, or a YAML fragment containing apiVersion and kind.

Use an OSS GitHub repository name such as crossplane-contrib/provider-upjet-aws or crossplane-contrib/function-go-templating. A small set of historical package aliases is mapped to their known OSS source repositories; unmapped upbound/... names are rejected rather than guessed.

The CRD tools require an explicit provider version. The value latest is also supported and selects the highest stable semantic-version Git tag. Self-hosted deployments need outbound HTTPS access to GITHUB_API_URL and GITHUB_RAW_URL.

Successful remote fetches are cached in memory. Git tag listings use the configurable short FETCH_CACHE_TTL_SECONDS (default: 300 seconds); CRDs, definitions, examples, and Terraform metadata resolved at immutable Git tags are cached for 30 days. FETCH_CACHE_MAX_ENTRIES (default: 512) bounds memory use.

Why this repository exists

Crossplane knowledge is distributed across many repositories and kinds of sources:

  • Go API types and runtime implementations

  • CustomResourceDefinitions and OpenAPI schemas

  • package metadata

  • tests and executable examples

  • official Crossplane documentation

  • community implementations and real-world composition examples

Upjet-based providers add another layer. Their Crossplane managed resources are generated from Terraform provider resources, while the Terraform documentation often contains more details about the underlying cloud APIs and configuration fields.

This repository connects these sources in one versioned catalog without replacing the original documentation.

Knowledge structure

Knowledge is stored as small Markdown documents under catalog/. Each document represents an independently useful concept and includes OKF metadata, provenance in sources, keyed claim footnotes, and relationships to related concepts.

Repository validation pins okf-ingest 0.11.0, which adds OKF v0.2 core support, including generated.at freshness fallback and preservation of the new frontmatter families (upstream support commit).

If the task is to build a Crossplane v2 Composition, start with the Composition developer route. It routes agents through separate API/provider, pipeline/security, and testing/packaging concepts without pretending that provider-specific schemas or credentials are universal.

The catalog is intended to be:

  • Source-backed: important statements link to source code, schemas, tests, examples, or official documentation.

  • Version-aware: sources are tied to specific repository revisions.

  • Navigable: overview documents connect related concepts without requiring readers to know the source repository layout.

  • Incremental: providers, functions, services, documentation areas, and example repositories can be added in focused batches.

License

This project is licensed under the Apache License 2.0.

catalog/core/composed-resource-identity-and-replacement.md


type: concept title: Composed-resource identity and replacement description: Why changing metadata.name under an unchanged logical resource key does not rename or replace an existing composed object, and how to stage a replacement. resource: https://docs.crossplane.io/v2.3/composition/compositions/ tags: [crossplane, core, composition, composed-resources, identity, replacement] generated: { by: "process:okf-v0.2-migration", at: "2026-08-20T06:45:13Z" } sources:


Identity

A composed resource has distinct Composition, Kubernetes, and provider-side identities. Treating them as interchangeable causes unsafe rename and replacement plans.

IdentityScopeReplacement significance
Logical composition-resource keyAn entry in Function desired and observed resource maps, persisted on the object as crossplane.io/composition-resource-nameThe same key means the same composed resource. A new key declares a different desired resource.[^logical-resourcename-is-not-kubernetes-metadata-name][^resource-reference-lookup-and-logical-key-association][^composition-resource-annotation-key-and-accessors]
metadata.nameKubernetes object identityKubernetes names cannot be updated. After Crossplane associates a key with an observed object, it preserves that object's name.[^kubernetes-objectmeta-name-cannot-be-updated][^observed-name-namespace-and-generated-name-preservation]
crossplane.io/external-nameProvider-facing external identity for a managed resourceIt is separate from the Kubernetes name. When supplied, its value is used as the external resource name.[^managed-resource-external-names]

Some rendering functions use their own input annotation to select the logical key. For example, function-go-templating consumes gotemplating.fn.crossplane.io/composition-resource-name; Core persists crossplane.io/composition-resource-name on the actual object.[^generated-composed-resource-names-are-recommended][^composition-resource-annotation-key-and-accessors][^function-go-templating-named-rendered-resource-handling] These are two layers of the same logical association, not interchangeable annotation keys and not Kubernetes names.

Behavior when metadata.name changes

Assume a Function keeps the logical key database, an existing object under that key is successfully observed as database-v1, and a revised Composition returns database-v2:

observed["database"].metadata.name = "database-v1"
desired["database"].metadata.name  = "database-v2"
applied["database"].metadata.name  = "database-v1"

This is the released v2.3.3 behavior:

  1. Crossplane loads objects referenced by the XR and indexes them by their logical composition-resource key.[^resource-reference-lookup-and-logical-key-association]

  2. When a desired key matches an observed key, Crossplane unconditionally replaces the desired name, namespace, and generateName with the observed values.[^observed-name-namespace-and-generated-name-preservation]

  3. Crossplane server-side applies the resulting object at the preserved name.[^server-side-apply-and-invalid-object-handling]

Therefore changing only metadata.name under an unchanged logical key does not rename the old object and does not create a replacement object. The new name is discarded before the API request, so this path does not produce a Kubernetes immutable-name error or a name-change-specific warning. Other valid desired fields may still be applied to the existing object.[^observed-name-namespace-and-generated-name-preservation][^server-side-apply-and-invalid-object-handling]

This conclusion is conditional on the existing object being found and associated with the same logical key. The selected release has no dedicated unit test that supplies an explicit different desired name under an existing key, but the identity overwrite is unconditional in the released code.

Deletion and immutable-field boundaries

If the referenced Kubernetes object is fully deleted, the observer confirms NotFound with an uncached read and omits it from observed state. On the next reconciliation there is no observed identity to restore, so an explicit desired name survives, or Crossplane generates a name when none is supplied. Crossplane persists the new reference before server-side apply creates the absent object.[^missing-referenced-objects-are-omitted-from-observed-state][^name-generation-and-references-before-apply-ordering]

Manual deletion can therefore make a changed name take effect, but only after the old object is gone. For a managed resource, finalizers can delay that point while the Provider handles the external resource. This is a destructive recreation-after-absence path, not an in-place rename.[^managed-resource-deletion-and-finalizers]

Two related behaviors must remain separate:

  • The Composition controller deletes an observed Kubernetes object when its logical key is omitted from final desired state.[^garbage-collection-precedes-references-and-apply][^desired-resource-omission-deletes-the-composed-resource]

  • For a Provider-defined immutable forProvider field, Crossplane does not use the field change itself as a force-replacement signal. The managed reconciler creates when the external resource is absent, but calls Update when it exists and differs; an update failure has no Core delete-and-create fallback.[^immutable-managed-resource-fields-do-not-force-replacement][^managed-reconciler-create-versus-update-paths][^existing-resource-update-behavior]

The narrow defensible rule is: Crossplane Core does not automatically delete and recreate an existing resource solely to apply an immutable-field change. The broader statement that recreation happens only after explicit Kubernetes deletion is inaccurate. For example, with Create permitted, a Provider may recreate an external resource that was deleted outside Crossplane while its Kubernetes managed resource still exists.[^management-policies-and-recreation-after-external-deletion]

Composition guidance

Keep identity stable for normal updates

  • Keep both the logical composition-resource key and metadata.name stable after creation.

  • Prefer letting Crossplane generate the Kubernetes name unless a stable explicit name is required.[^generated-composed-resource-names-are-recommended]

  • If a name change was accidental, restore the Composition's desired name to the observed name. Do not edit XR resource references or identity annotations to force reassociation.

Stage an intentional replacement

For a rename or any other immutable change that requires replacement:

  1. Add the replacement under a new logical key and a distinct Kubernetes name, while continuing to render the old key.

  2. Wait for the replacement to become ready, migrate data when required, and move references, consumers, and published connection details.

  3. In a later Composition revision, omit the old key. Crossplane then garbage collects the old composed Kubernetes object.[^garbage-collection-precedes-references-and-apply][^desired-resource-omission-deletes-the-composed-resource]

This two-stage pattern is inferred guidance from the documented desired-state contract and the released controller ordering. It provides an explicit create-before-delete transition at the Composition level. A one-step change that removes the old key and adds the new key does not: v2.3.3 garbage collects the old object before it records and applies the new desired object.[^garbage-collection-precedes-references-and-apply]

Before removing an old managed resource, verify its Provider behavior, finalizers, managementPolicies, external deletion consequences, dependency ordering, and data-retention requirements. Management Policies are Beta and Provider support varies.[^managed-resource-deletion-and-finalizers][^management-policies-and-recreation-after-external-deletion]

Manual deletion of the old composed object is a last-resort replacement method. It can cause downtime or external-resource deletion and should be used only after those effects are explicitly accepted.

Relationships

This identity behavior applies to objects produced by a Composition. Provider-side immutable fields are introduced in managed resource anatomy, while adoption and provider-facing names are covered by external identity and creation safety.

Limitations

  • The exact name-preservation proof is scoped to the Crossplane v2.3.3 Function composer and assumes the composed resource kind is unchanged.

  • Official v2.3 documentation provides the desired-state and immutable-field mechanisms but no end-to-end composed-resource rename procedure. The staged replacement procedure is an implementation-backed authoring inference.

  • Crossplane Core cannot establish whether every Provider or external service avoids an internal replacement during its own Update implementation.

[^logical-resourcename-is-not-kubernetes-metadata-name]: Logical ResourceName is not Kubernetes metadata.name [^resource-reference-lookup-and-logical-key-association]: Resource-reference lookup and logical-key association [^kubernetes-objectmeta-name-cannot-be-updated]: Kubernetes ObjectMeta.name cannot be updated [^observed-name-namespace-and-generated-name-preservation]: Observed name, namespace, and generated-name preservation [^managed-resource-external-names]: Managed-resource external names [^server-side-apply-and-invalid-object-handling]: Server-side apply and invalid-object handling [^missing-referenced-objects-are-omitted-from-observed-state]: Missing referenced objects are omitted from observed state [^name-generation-and-references-before-apply-ordering]: Name generation and references-before-apply ordering [^managed-resource-deletion-and-finalizers]: Managed-resource deletion and finalizers [^garbage-collection-precedes-references-and-apply]: Garbage collection precedes references and apply [^desired-resource-omission-deletes-the-composed-resource]: Desired-resource omission deletes the composed resource [^immutable-managed-resource-fields-do-not-force-replacement]: Immutable managed-resource fields do not force replacement [^managed-reconciler-create-versus-update-paths]: Managed reconciler create-versus-update paths and existing-resource update behavior [^existing-resource-update-behavior]: existing-resource update behavior [^management-policies-and-recreation-after-external-deletion]: Management policies and recreation after external deletion [^generated-composed-resource-names-are-recommended]: Generated composed-resource names are recommended [^composition-resource-annotation-key-and-accessors]: Composition-resource annotation key and accessors [^function-go-templating-named-rendered-resource-handling]: function-go-templating named rendered-resource handling

242 files

Advantages

  • Provides version-aware knowledge by linking facts to specific repository revisions. evidence: README.md
  • Connects distributed sources like Go APIs, CRDs, and documentation into a single navigable catalog. evidence: README.md

Limitations

  • The public MCP server is provided as an early-access service and is not intended for production use without self-hosting. evidence: README.md
  • Requires explicit provider versions for CRD tools, as it does not guess or infer versions automatically. evidence: README.md

Security

Risk level: Low risk

This brain runs

Agent instructions that run or fetch something (26)

  • .agents/agents/okf-function-go-templating-researcher/AGENT.md: Write for Crossplane users who want to install and use `function-go-templating` in Compositions.
  • .agents/agents/okf-reviewer/AGENT.md: `mise run lint` succeeds after the final fixes and before the root or parent agent creates a commit.
  • .agents/agents/okf-reviewer/AGENT.md: Run `mise run lint` as the final validation command.
  • .agents/skills/okf-open-knowledge-format/SKILL.md: If the user agrees to install:
  • .agents/skills/okf-open-knowledge-format/SKILL.md: uv tool install okflint
  • .agents/skills/okf-open-knowledge-format/SKILL.md: pip install okflint
  • .agents/skills/okf-open-knowledge-format/SKILL.md: kcmd push --dry-run
  • .agents/skills/okf-updates/SKILL.md: Run this workflow only after the user explicitly invokes `$okf-updates`, `/skill:okf-updates`, or `/okf-updates`.
  • .agents/skills/okf-updates/SKILL.md: Run at most three direct researchers at once.
  • .agents/skills/okf-updates/SKILL.md: A requester reply that selects one or more candidate IDs from this explicitly invoked workflow is explicit permission to run the normal OKF update logic for those candidates.
  • .agents/skills/okf-updates/SKILL.md: Run deterministic validation, `okf-reviewer`, and `mise run lint`.
  • .agents/skills/okf/SKILL.md: Run this workflow only after the user explicitly invokes `$okf`, `/skill:okf`, or `/okf`.
  • .agents/skills/okf/SKILL.md: After all review fixes, run `mise run lint`.
  • .agents/skills/okf/SKILL.md: Commit every intended file only after reviewer approval and a successful lint run.
  • .agents/skills/okf/SKILL.md: Run the Core docs and Core code researchers together when a concept needs both user-facing guidance and exact served API shape.
  • .agents/skills/okf/SKILL.md: Run independent read-heavy research in parallel, with at most three direct agents.
  • .agents/skills/okf/SKILL.md: After all fixes, run `mise run lint` and fix every reported issue.
  • .agents/skills/okf/SKILL.md: The reviewer may return `APPROVED` only after the final lint run succeeds.
  • .agents/skills/okf/SKILL.md: Non-thinking coding models such as Qwen3-Coder-Next can run every project agent without incompatible reasoning controls.
  • .agents/skills/okf/SKILL.md: deterministic validation and `mise run lint` results
  • AGENTS.md: Run the normal workflow only when the user explicitly invokes `$okf`, `/skill:okf`, or `/okf`, or selects a feature candidate returned by an explicitly invoked `$okf-updates`, `/skill:okf-updates`, or `/okf-updates` workflow.
  • AGENTS.md: Run update discovery only when the user explicitly invokes `$okf-updates`, `/skill:okf-updates`, or `/okf-updates`.
  • AGENTS.md: Run deterministic validation and the `okf-reviewer` before committing the changes.
  • AGENTS.md: After the final review fixes, run `mise run lint` before creating any commit.
  • AGENTS.md: After reviewer approval and a successful lint run, commit every intended change.
  • AGENTS.md: Create commits with a Developer Certificate of Origin sign-off by default by using `git commit --signoff` (or `git commit -s`).

MCP servers (1)

  • .mcp.json (crossplane-v2-okf): https://crossplane.mcp.jkroepke.de/mcp · uses the network
  • Low risk: network-instructions (.agents/skills/okf-open-knowledge-format/SKILL.md:214)

Attribution and licence

First committed by
GitHub avatar of jkroepkejkroepke
Publisher
Jan-Otto Kröpke (Community)
Source
jkroepke/okf-crossplane-v2 · commit df24ac2
Licence
Apache License 2.0 (files served here)
  • ATTRIBUTION.md (written by AutoGineer)
Synced
Contributors
jkroepke

AutoGineer is not affiliated with or endorsed by jkroepke.

Download

The ZIP holds the files AutoGineer serves, with ATTRIBUTION.md and the licence. Download okf-crossplane-v2.zip