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/functions/function-go-templating/patterns/safe-status-and-connection-publication.md


type: pattern title: Safely publish database status and connection references description: Gate consumer-facing XR status and connection references on observed composed-resource readiness in a Go template. resource: https://github.com/crossplane-contrib/function-go-templating tags: [crossplane, composition-function, readiness, connection-details, naming] generated: { by: "process:okf-v0.2-migration", at: "2026-08-20T06:45:13Z" } sources:


Overview

For a database Composition, give the rendered database, role, user, and each extension a stable gotemplating.fn.crossplane.io/composition-resource-name, such as database, role, or extension-pgcrypto. Those values, rather than Kubernetes metadata.name, are the keys under $.observed.resources on a later reconciliation.[^named-rendered-resource-handling][^resource-name-helper]

Treat the consumer-facing connection Secret and XR status as a single publication boundary: render valid empty Secret data while observations are absent, but do not publish an actionable status.connectionSecret or other application-ready status fields until every required composed resource is ready and the required connection-detail keys are present.[^function-request-observed-state-snapshot][^v2-connection-details-initial-state-guard][^official-aggregate-secret-starts-with-empty-data] This is a strict authoring pattern; Crossplane does not automatically make arbitrary XR status fields conditional on readiness.[^function-pipeline-readiness-and-xr-status-mutation-scope]

If function-auto-ready runs later, do not rely on its built-in Secret check for this contract: that check marks an observed Secret ready on existence. Set explicit Ready=False until the required keys are present and Ready=True only after the gate passes; auto-ready preserves an earlier explicit result.[^secret-registers-the-existence-only-check][^alwaysready-returns-true][^explicit-readiness-is-preserved]

Strict readiness gate

Use the provider's usable-state signal for this gate. For standard managed resource conditions, Ready=True with reason Available means the provider reports the resource ready for use; Synced=True means only that reconciliation succeeded. Synced=True alone is therefore not sufficient to publish a database endpoint, credentials reference, or ready status.[^managed-resource-ready-and-synced-condition-meanings]

Calculate a boolean from the named observed resources and required connection-detail keys, then render the XR-status object only inside that condition. The status object must have the same API version and kind as the observed XR and must not have a composition-resource-name annotation; function-go-templating treats that form as a status update rather than another composed resource.[^composite-status-rendering-behavior]

{{- $databaseReady := eq (.observed.resources.database | getResourceCondition "Ready").Status "True" }}
{{- $roleReady := eq (.observed.resources.role | getResourceCondition "Ready").Status "True" }}
{{- $observedResources := default (dict) .observed.resources }}
{{- $role := default (dict) (get $observedResources "role") }}
{{- $roleDetails := default (dict) (get $role "connectionDetails") }}
{{- $credentialsPresent := hasKey $roleDetails "password" }}
{{- if and $databaseReady $roleReady $credentialsPresent }}
---
apiVersion: plattform.example.com/v1alpha1
kind: MySQLDatabase
metadata:
  name: {{ .observed.composite.resource.metadata.name }}
status:
  ready: true
  connectionSecret: example-connection-secret
{{- end }}

Also guard each connection-detail lookup before copying it into a Secret: the observed map, named resource, and its connection details can all be absent on the first reconciliation.[^function-request-observed-state-snapshot][^v2-connection-details-initial-state-guard] Do not replace those checks with unconditional gotemplating.fn.crossplane.io/ready: "True"; that assertion bypasses the observed readiness contract.[^function-pipeline-readiness-and-xr-status-mutation-scope]

Dependency and collection patterns

Only defer a dependent resource until the prerequisite observation contains a value that the dependent resource actually needs. For example, defer a Secret that needs a role password until that named role is Ready=True and the password exists. A database whose owner is a user-supplied, static role name does not automatically need that gate; the selected SQL provider's reference and retry behavior must establish whether it does.[^provider-defined-managed-resource-settings-boundary]

Once a long-lived composed resource has been introduced, keep rendering its complete desired object on every reconciliation. Readiness is a separate decision: set its explicit readiness to False while a prerequisite is not usable rather than omitting the desired object merely because a transient condition changed. Crossplane deletes a composed resource that a function previously added but no longer returns in desired state, unless that omission is intentional.[^crossplane-desired-state-copy-and-deletion-behavior]

For a list such as database extensions, derive both a stable composition resource name (for example, extension-<logical-id>) and a deterministic, Kubernetes-compatible object name. Validate or normalize XR-supplied logical IDs before using them in metadata.name; ensure the derived names cannot collide after normalization. The resource-name annotation must also remain stable across reconciliations, otherwise its observed state cannot be joined reliably.[^named-rendered-resource-handling][^resource-name-helper][^crossplane-desired-state-copy-and-deletion-behavior]

Connection-data handling

Observed connectionDetails values are already base64-encoded. Copy them directly into Secret.data; when constructing a derived URI, decode only the required component, compose the URI, and encode the final value once. Do not double-encode an observed password or treat the presence of a password as proof that the producer is ready.[^v2-connection-details-initial-state-guard][^managed-resource-ready-and-synced-condition-meanings]

Keep sensitive connection material in a composed Kubernetes Secret, not in XR status. The status gate should publish the Secret reference only after the Secret has the required data. This catalog excludes Claim-based workflows, so a template that reads spec.claimRef needs a non-Claim v2 equivalent before it can be included.[^v2-connection-details-initial-state-guard]

Kubernetes and external names

Give every composite resource a Kubernetes object identity: normally a valid metadata.name, or generateName when generated naming is intended. Kubernetes requires a name for resource creation unless the server generates one from that prefix.[^kubernetes-objectmeta-name-and-generatename-semantics] Use that identity only to derive Kubernetes-compatible names, for example for an aggregate Secret. It is distinct from a function composition-resource name and from a provider-side identifier.[^composite-resource-name-in-observed-state]

Keep every composed Kubernetes object's metadata.name Kubernetes-compatible. When a managed resource's provider-side identity cannot or should not equal that name, set crossplane.io/external-name on that managed resource if its specific provider supports the annotation. Providers commonly default their external identity to the Kubernetes name, but the accepted format and adoption behavior remain provider-specific. The annotation is not a generic XR naming mechanism and cannot make an invalid Kubernetes metadata.name valid.[^documented-external-name-behavior][^runtime-external-name-annotation-definition]

Scope boundaries

  • Concrete provider resource shapes, condition semantics, connection-detail keys, and ProviderConfig behavior require separately selected and pinned provider releases.

  • For a generated extension list, make both the Kubernetes object name and the composition-resource name deterministic and collision-free; sanitize or hash input when it is not Kubernetes-name compatible.

  • Keeping inline OpenTofu or Terraform HCL in a separate module is an authoring choice, not a Crossplane requirement. If both template languages are used, define clear ownership and escaping boundaries.

[^named-rendered-resource-handling]: Named rendered-resource handling and resource-name helper [^resource-name-helper]: resource-name helper [^function-request-observed-state-snapshot]: Function request observed-state snapshot [^v2-connection-details-initial-state-guard]: v2 connection-details initial-state guard [^function-pipeline-readiness-and-xr-status-mutation-scope]: Function pipeline readiness and XR status mutation scope [^managed-resource-ready-and-synced-condition-meanings]: Managed-resource Ready and Synced condition meanings [^composite-status-rendering-behavior]: Composite-status rendering behavior [^kubernetes-objectmeta-name-and-generatename-semantics]: Kubernetes ObjectMeta name and generateName semantics [^composite-resource-name-in-observed-state]: Composite-resource name in observed state [^documented-external-name-behavior]: Documented external-name behavior [^runtime-external-name-annotation-definition]: Runtime external-name annotation definition [^provider-defined-managed-resource-settings-boundary]: Provider-defined managed-resource settings boundary [^crossplane-desired-state-copy-and-deletion-behavior]: Crossplane desired-state copy and deletion behavior [^secret-registers-the-existence-only-check]: Secret registers the existence-only check, alwaysReady returns true, and explicit readiness is preserved [^alwaysready-returns-true]: alwaysReady returns true [^explicit-readiness-is-preserved]: explicit readiness is preserved [^official-aggregate-secret-starts-with-empty-data]: Official aggregate Secret starts with empty data

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