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/provider-backed-external-query.md


type: example title: Provider-backed external queries in function-go-templating description: Query external APIs through a provider-opentofu Workspace and consume its observed outputs in a later Go-template reconciliation. resource: https://github.com/crossplane/crossplane/issues/4141 tags: [crossplane, composition-function, function-go-templating, provider-opentofu, multitenancy] generated: { by: "process:okf-v0.2-migration", at: "2026-08-20T06:45:13Z" } sources:


Problem

Crossplane issue #4141 reports that an observe-only managed resource still models one external object identified by a unique external identifier; it does not provide a general query by tags or properties. Zero, multiple, or changing matches do not naturally fit that one-to-one relationship. The open issue discusses query functions, provider data sources, required resources, and a provider-integrated query API as alternatives, but does not establish that a general query facility shipped in Crossplane v2.3.3.[^crossplane-issue-4141]

Multi-tenant credential boundary

Crossplane v2.3.3 supports credentials on a Composition pipeline step, but each Secret name and namespace is a literal value in the Composition. The controller reads that exact Secret and passes its data to the function. It does not resolve the reference from XR fields or pipeline context.[^composition-credential-api][^released-secret-loading-behavior]

Issue #7343 therefore reports a narrower gap than “Functions have no credentials”: a function using one statically referenced Secret or one pod identity cannot by that mechanism select different credentials for each XR or tenant. The open issue proposes dynamic credential references and describes a two-pass required-resource workaround. It does not prove that every custom query function—or upbound/function-azresourcegraph in every configuration— fails in a multi-tenant deployment.[^crossplane-issue-7343]

A provider-backed query can be useful when tenant credential selection already uses ProviderConfig. Unlike the static Function credential reference described above, each Workspace selects a ProviderConfig. In the user-reported design, each tenant has its own namespace, the Workspace references a namespaced ProviderConfig in that namespace, and only tenant-level credentials are exposed through that configuration. This keeps cloud authentication and external querying in a managed resource while function-go-templating only renders and observes the Kubernetes object. The selected provider implementation resolves a namespaced ProviderConfig in the Workspace namespace and forces that configuration's credential Secret references into the same namespace.[^workspace-input-and-output-types][^namespaced-providerconfig-resolution][^credential-secret-namespace-enforcement] With the namespace and RBAC assumptions below, this avoids the static per-Composition Function Secret reference for this query path.

Pattern

provider-opentofu v1.1.4 serves the namespaced opentofu.m.upbound.io/v1beta1 Workspace. An inline Workspace accepts OpenTofu module text and a typed providerConfigRef. Non-sensitive outputs are published in the arbitrary JSON map status.atProvider.outputs; sensitive outputs belong in the connection Secret instead. The Go-template pipeline input used here is also served as gotemplating.fn.crossplane.io/v1beta1.[^workspace-input-and-output-types][^workspace-output-publication][^gotemplate-v1beta1-generated-crd]

The provider's upstream observe-only example uses an AWS data source, patches a Workspace output to XR status, then patches that status into another managed resource. The following is an adapted, user-reported variant that keeps the rendering in function-go-templating and queries an AWS IAM Identity Center administrator role. It has not been independently executed against the pinned releases. The snippet was supplied by the user and is not copied from the upstream example.[^upstream-observe-only-data-source-pattern]

{{- $name := .observed.composite.resource.metadata.name }}
{{- $iamAdminRole := printf "role-iam-administrator-%s" $name }}
---
apiVersion: opentofu.m.upbound.io/v1beta1
kind: Workspace
metadata:
  annotations:
    {{ setResourceNameAnnotation $iamAdminRole }}
  name: {{ $iamAdminRole }}
spec:
  forProvider:
    source: Inline
    module: |-
      output "principal_arn" {
        value = one(data.aws_iam_roles.account_administrator_role.arns)
      }

      data "aws_iam_roles" "account_administrator_role" {
        name_regex  = "AWSReservedSSO_AccountAdministratorAccess_.*"
        path_prefix = "/aws-reserved/sso.amazonaws.com/"

        lifecycle {
          postcondition {
            condition = length(self.arns) == 1
            error_message = length(self.arns) == 0 ? "Could not find the AWS SSO administrator role ARN" : (
              "Found more than one AWS SSO administrator role ARN"
            )
          }
        }
      }
  providerConfigRef:
    kind: ProviderConfig
    name: opentofu

setResourceNameAnnotation makes the Workspace a named desired composed resource. On a later reconciliation, retrieve the observed Workspace by the same composition resource name and guard the normally absent first-observation path before rendering a dependent field:[^resource-name-annotation-helper][^observed-composed-resource-helper]

{{- $dataIAMAdminRole := getComposedResource . $iamAdminRole }}
{{- $principalArn := dig "status" "atProvider" "outputs" "principal_arn" "" ($dataIAMAdminRole | default (dict)) }}
{{- if $principalArn }}
principalArn: {{ $principalArn | quote }}
{{- end }}

Whether principalArn may be omitted until the output exists depends on the downstream resource schema. The unguarded expression get $dataIAMAdminRole.status.atProvider.outputs "principal_arn" can fail before get runs when the Workspace or an intermediate status map is absent.

Limitations

  • The repeated ProviderConfig name opentofu refers to a distinct namespaced object in each tenant namespace. The isolation conclusion assumes that the Workspace is also created in that namespace and that Kubernetes RBAC and Secret access prevent cross-tenant configuration or credential use.

  • The provider performs namespace-based lookup; it does not independently establish tenant authorization. Prevent unintended ClusterProviderConfig use and restrict who may create or change Workspaces, ProviderConfigs, and credential Secrets.

  • ProviderConfig determines how the Workspace authenticates; this example does not prescribe a Secret layout or cloud authentication backend.

  • Only non-sensitive outputs should be consumed from status.atProvider.outputs.[^workspace-output-publication]

  • provider-opentofu warns that local state is not persisted, long-running modules can exceed the default timeout, and Workspace reconciliation can be CPU-intensive.[^provider-opentofu-limitations]

Licensing and attribution

provider-opentofu is Apache-2.0 licensed.[^provider-opentofu-apache-2-0-license] The upstream observe-only example is summarized and cited rather than copied. The Go-template and OpenTofu module above adapt material supplied directly by the user for this catalog change; no external provenance for that material was identified.

Project-history boundaries

Issues #4141 and #7343 were open and human-authored at the 2026-07-14 research timestamp. No linked released change was found that resolves either report in Crossplane v2.3.3. Bot and app activity was excluded; one GitHub Actions stale comment on #4141 was omitted.

Relationships

See request data and context for observed resources and credentials, and rendered output for composition resource names and readiness.

[^crossplane-issue-4141]: Crossplane issue #4141 [^composition-credential-api]: Composition credential API [^released-secret-loading-behavior]: Released Secret loading behavior [^crossplane-issue-7343]: Crossplane issue #7343 [^workspace-input-and-output-types]: Workspace input and output types [^workspace-output-publication]: Workspace output publication [^upstream-observe-only-data-source-pattern]: Upstream observe-only data-source pattern [^resource-name-annotation-helper]: Resource-name annotation helper [^observed-composed-resource-helper]: Observed composed-resource helper [^provider-opentofu-limitations]: provider-opentofu limitations [^provider-opentofu-apache-2-0-license]: provider-opentofu Apache-2.0 license [^namespaced-providerconfig-resolution]: Namespaced ProviderConfig resolution [^credential-secret-namespace-enforcement]: Credential Secret namespace enforcement [^gotemplate-v1beta1-generated-crd]: GoTemplate v1beta1 generated CRD

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