Plugin manifest (plat5.plugin.yml)
Every integration (idp, authorizer, observability, ci, deploy) and starter template (service, customer-console, operator-console) is a directory with a plat5.plugin.yml manifest at its root. Standalone runnable examples (type: example in registry.yml) are plain Plat5 project directories and do not need a plat5.plugin.yml.
Unknown keys are errors (strict YAML decoding).
Full shape
Section titled “Full shape”schema: 1name: stripe-billingtype: servicedescription: Stripe subscriptions, checkout, and webhook billing slicecli: ">=0.20.0"
service_name: billing
requires: authorizer_style: any operator: false
conflicts: []
capabilities: permission_separator: ":"
prompts: - key: stripe_secret_key type: secret title: Stripe Secret Key (test mode) help: Find at https://dashboard.stripe.com/test/apikeys required: false
verify: http_get: "https://[[.Prompt.domain]]/.well-known/jwks.json" expect_status: 200 label: Checking JWKS endpoint
target: "[[.ServiceName]]"render: - services/service.yml - docker-compose.yml - src/config.tsexclude: - AGENTS.md
fragments: plat5: custom_roles: permissions: "[[.Perm \"billing\" \"read\"]]": description: View billing plan and invoices bindable_at: [organization] "[[.Perm \"billing\" \"write\"]]": description: Manage subscriptions and payment methods bindable_at: [organization] operator: services: "[[.ServiceName]]": routes: - path: /orgs/{organization_id}/comp-plan node: organization_id methods: [POST] services: - src: services/service.yml dest: "services/[[.ServiceName]].yml" compose: docker-compose.yml env: - name: STRIPE_SECRET_KEY value: "[[.Prompt.stripe_secret_key]]" secret: true - name: STRIPE_WEBHOOK_SECRET value: "" secret: true gitignore: - ".env.local"
next: - "Forward webhooks locally: stripe listen --forward-to http://localhost:5400/webhooks/stripe"Top-level fields
Section titled “Top-level fields”| Field | Required | Rule |
|---|---|---|
schema |
yes | Must be 1. |
name |
yes | [a-z][a-z0-9-]*, max 64 chars. |
type |
yes | One of idp, authorizer, service, customer-console, operator-console, observability, ci, deploy. |
description |
yes | Short one-line summary shown in the wizard and plat5 registry search. |
cli |
no | Minimum CLI semver floor (">=X.Y.Z"). Checked before loading; same format as plat5.local.yml’s cli:. |
service_name |
no | For type: service: default Plat5 service name ([a-z][a-z0-9-]*, default: name). Overridable by the user via --as <name>. Exposed as [[.ServiceName]]. |
requires |
no | Compatibility prerequisites evaluated before prompting. |
conflicts |
no | Explicit incompatibilities beyond single-slot conflicts. |
capabilities |
no | Traits exposed to downstream layers during assembly. |
prompts |
no | Ordered list of interactive inputs collected from --set flags or the wizard. |
verify |
no | Optional read-only HTTP preflight check run after prompts complete. |
target |
no | Destination subdirectory in the project for copied files (supports [[ ]] templates). Defaults by type (see table below). . copies to project root. |
render |
no | Relative paths inside the plugin processed as Go text/template with [[ ]] delimiters. |
exclude |
no | Relative paths or globs excluded when copying files into target. |
fragments |
no | Structured patches merged into project root files. |
app |
no | web (browser origin, required for customer-console and operator-console types). |
next |
no | Human-readable follow-up hints printed in command output. |
Plugin types and defaults
Section titled “Plugin types and defaults”type |
Slot(s) | Cardinality | Default target |
Notes |
|---|---|---|---|---|
idp |
idp, operator-idp |
0..1 per slot | idp |
Customer or operator authentication |
authorizer |
authorizer, operator-authorizer |
0..1 per slot | authorizer |
Built-in RBAC or external AuthZEN 1.0 PDP |
service |
service |
0..N | [[.ServiceName]] |
Application API or plug-and-play DDD slice (services/<name>.yml + Compose service) |
customer-console |
customer-console |
0..1 | customer-console |
Requires fragments.compose and app.web; receives finalized Kinds and ManagesRoles |
operator-console |
operator-console |
0..1 | operator-console |
Requires fragments.compose and app.web; receives finalized Kinds and ManagesRoles |
observability |
observability |
0..1 | observability |
Configures observability.mode and otel: |
ci |
ci |
0..N | . |
Additive CI workflows (e.g. .github/workflows/*.yml) |
deploy |
deploy |
0..N | . |
Additive deployment assets (plat5.prod.yml, deploy/k8s/, deploy/argo/) |
requires, conflicts, and capabilities
Section titled “requires, conflicts, and capabilities”requires
Section titled “requires”| Field | Type | Rule |
|---|---|---|
authorizer |
string | Required customer authorizer plugin ID (e.g. topaz). Enforced at init and add. |
authorizer_style |
string | Optional: rbac, abac, rebac, or any. |
operator |
bool | When true, requires the operator module to be enabled. |
conflicts
Section titled “conflicts”List of { id: "<name>" } or { type: "<type>", authorizer_style: "<style>" } rules that fail fast during Stage 2 (Check) with a clear explanation.
capabilities
Section titled “capabilities”| Field | Type | Meaning |
|---|---|---|
permission_separator |
string | Preferred permission separator (":", "_", ".", or "-"). If set by an authorizer (e.g. "_" for Topaz), it overrides ":" across routegen and rendered service files. |
authorizer_style |
string | rbac, abac, or rebac. |
dev_seed |
bool | For idp plugins: whether plat5 start can auto-seed a dev user (true only for plat5-auth). |
prompts
Section titled “prompts”Prompts are declarative so the CLI can render them in the wizard, accept them via --set <plugin>.<key>=<val> (or --set <slot>.<key>=<val>), and enforce secret hygiene automatically.
| Field | Required | Rule |
|---|---|---|
key |
yes | [a-z][a-z0-9_]*. Exposed in templates as [[.Prompt.<key>]]. |
type |
yes | input, secret, select, or confirm. |
title |
yes | Label shown in the wizard. |
help |
no | Secondary help text (e.g. link to provider dashboard). |
placeholder |
no | Example value shown in empty input fields. |
default |
no | Default value used with -y or when left blank. Supports [[ ]] expressions referencing earlier prompts. |
options |
for select |
List of { label, value } pairs. |
validate |
no | Built-in validator: nonempty, url, http_url, hostname, origin, slug, or email. |
required |
no | Default true unless default is set or type: confirm. |
when |
no | Simple condition ("<key> == <value>" or "<key> != <value>") to show/hide follow-up prompts dynamically. |
[!IMPORTANT] Prompts with
type: secretare masked on input, never echoed in logs or the printed reproducible CLI command, and never written into YAML files—only into.env.local(mode0600).
verify
Section titled “verify”Optional read-only HTTP preflight check executed after prompts are answered (skipped with -y, --no-verify, or offline mode). Failure warns and lets the user re-edit prompts or continue anyway.
| Field | Required | Rule |
|---|---|---|
http_get |
one of http_get / http_head |
Rendered URL (http:// or https://). |
http_head |
one of http_get / http_head |
Rendered URL. |
headers |
no | Map of header name → rendered value (may reference [[.Prompt.*]]). |
expect_status |
no | Expected HTTP status code (default 200). |
timeout |
no | Go duration, max 15s (default 5s). |
label |
no | Spinner message shown while checking. |
Template rendering ([[ ]])
Section titled “Template rendering ([[ ]])”Files listed under render:—plus string values inside target:, fragments:, and verify:—are rendered with Go text/template using [[ and ]] delimiters.
Using [[ ]] instead of {{ }} avoids delimiter collisions with GitHub Actions (${{ secrets.FOO }}), Helm ({{ .Values.* }}), and JSX/Solid templates.
Template context
Section titled “Template context”| Variable / Helper | Type | Description |
|---|---|---|
.ProjectID |
string |
Normalized project ID (my-app) |
.ServiceName |
string |
For type: service: resolved service name (service_name, name, or --as <name>) |
.SecretBrand |
string |
Configured secret_brand (default plat5) |
.PermissionSeparator |
string |
Active separator (: or _ / . / -) |
.Perm "billing" "read" |
func(...string) string |
Joins segments with .PermissionSeparator (billing:read or billing_read) |
.Prompt.<key> |
any |
Answered prompt value for the current plugin |
.Slot |
string |
Target slot (idp, operator-idp, authorizer, operator-authorizer, service, …) |
.Selected.<slot> |
string |
Selected plugin name in a single-select slot |
.Services |
[]string |
Service names present in the assembled project |
.HasOperator |
bool |
Whether the operator module is enabled |
.HasCustomerConsole |
bool |
Whether a customer console is included |
.Kinds |
[]KindInfo |
Topologically sorted (root-first) hierarchy kinds from plat5.yml (Name, Parent, Child, ChildCollection, Collection, Path, Label, Plural, IsRoot) |
.KindNames |
[]string |
Plat5 hierarchy kind names in root-first order |
.RootKind |
KindInfo |
First root kind in plat5.yml |
.HasAuthorizer |
bool |
Whether an external AuthZEN authorizer: is configured in plat5.yml |
.ManagesRoles |
bool |
Whether Plat5 manages roles: (true for built-in RBAC and authorizer + roles like Cerbos; false for standalone authorizer without roles like Topaz) |
lower, upper, trimSuffix, trimPrefix, join, perm, base64 |
funcs | Standard string and encoding helpers |
fragments
Section titled “fragments”Fragments describe structured edits applied to project root files instead of copying raw root files.
| Key | Target file | Merge semantics |
|---|---|---|
plat5 |
plat5.yml |
RFC 7396 merge-patch (maps merge recursively, lists/scalars replace, null deletes a key). Same semantics as plat5yml.LoadMany. |
operator |
operator.yml |
RFC 7396 merge-patch. Applied only when the operator module is enabled. |
local |
plat5.local.yml |
RFC 7396 merge-patch. |
services |
services/<name>.yml + plat5.yml services: |
List of string paths (e.g. services/api.yml) or { src, dest } mappings (e.g. { src: services/service.yml, dest: "services/[[.ServiceName]].yml" }). Copied/rendered into project root services/ and appended to plat5.yml’s services: list (deduplicated; duplicate service name is an error). |
compose |
docker-compose.yml |
Appends <target>/<compose> to root docker-compose.yml (app.compose) include: list (deduplicated). Used by service, customer-console, and operator-console plugins. |
infra_compose |
docker-compose.infra.yml |
Appends <target>/<infra_compose> to root docker-compose.infra.yml (infra.compose) include: list (deduplicated). Used by authorizer, idp, and observability plugins. |
env |
.env.example + .env.local |
List of { name, value, secret, comment }. Always written (empty/placeholder) to .env.example; non-empty values written to .env.local. |
gitignore |
.gitignore |
Ensures each line exists in .gitignore (deduplicated). |
Service namespacing rules (type: service)
Section titled “Service namespacing rules (type: service)”Because multiple type: service plugins (and multiple instances via --as <name>) run inside the same <project_id> Compose project:
- Compose service names and named volumes must be namespaced with
[[.ServiceName]](e.g.[[.ServiceName]]:and[[.ServiceName]]_data:). - Avoid fixed host
ports:bindings by default (all traffic enters through the gateway on:5400, and internal Docker DNS giveshttp://[[.ServiceName]]:3000zero conflict). If exposing a debug host port, guard it behind an env var or omit it.
Slot mapping for idp and authorizer
Section titled “Slot mapping for idp and authorizer”A single type: idp plugin (e.g. okta) can fill idp (--idp okta), operator-idp (--operator-idp okta), or both:
- In slot
idp,fragments.local.idpwrites toplat5.local.yml’s top-levelidp:block. - In slot
operator-idp, the engine remapsfragments.local.idp→operator.idp(unless the plugin explicitly setsfragments.local.operator.idp).
Similarly, a type: authorizer plugin can fill authorizer (plat5.yml), operator-authorizer (operator.yml), or both.
Copied files and automatic exclusions
Section titled “Copied files and automatic exclusions”When copying a plugin’s directory into target:
- Noise is always skipped at any depth:
.git,node_modules,dist,.env,.env.local,*.local,.DS_Store,*.log. - Plugin-root metadata is always skipped:
plat5.plugin.yml,plat5.yml,plat5.local.yml,services/(copied only viafragments.services),.github(except fortype: ci/type: deploytargeting.),data/*.db*. - Any path escaping the plugin root or
target(.., symlinks outside root, absolute paths) is rejected.
Complete examples
Section titled “Complete examples”1. Customer / Operator IdP (idp/auth0/plat5.plugin.yml)
Section titled “1. Customer / Operator IdP (idp/auth0/plat5.plugin.yml)”schema: 1name: auth0type: idpdescription: Auth0 OIDC / OAuth 2.0cli: ">=0.20.0"
prompts: - key: domain type: input title: Auth0 tenant domain placeholder: acme.us.auth0.com validate: hostname - key: audience type: input title: API audience (identifier) placeholder: https://api.acme.com validate: nonempty - key: client_id type: input title: Application Client ID (for console sign-in) validate: nonempty
verify: http_get: "https://[[.Prompt.domain]]/.well-known/jwks.json" expect_status: 200 label: Verifying Auth0 JWKS endpoint
fragments: local: modules: auth: false idp: issuer: "https://[[.Prompt.domain]]/" jwks_uri: "https://[[.Prompt.domain]]/.well-known/jwks.json" audiences: ["[[.Prompt.audience]]"] client_id: "[[.Prompt.client_id]]" subject_claim: sub name_claims: [name, nickname]2. Service Template (services/go-fiber-service/plat5.plugin.yml)
Section titled “2. Service Template (services/go-fiber-service/plat5.plugin.yml)”Can be installed once or instantiated multiple times with plat5 add go-fiber-service --as orders:
schema: 1name: go-fiber-servicetype: serviceservice_name: servicedescription: Bare Go + Fiber domain service mounted at /<name> (use --as <name>)cli: ">=0.20.0"
target: "[[.ServiceName]]"render: - docker-compose.yml - services/service.yml - go.mod - main.go
fragments: services: - src: services/service.yml dest: "services/[[.ServiceName]].yml" compose: docker-compose.yml
next: - "cd [[.ServiceName]] && go mod tidy && go run ."3. Observability (observability/grafana-cloud/plat5.plugin.yml)
Section titled “3. Observability (observability/grafana-cloud/plat5.plugin.yml)”schema: 1name: grafana-cloudtype: observabilitydescription: Grafana Cloud via local Alloy collector (logs, traces, metrics)cli: ">=0.20.0"
prompts: - key: otlp_endpoint type: input title: Grafana Cloud OTLP Gateway URL placeholder: https://otlp-gateway-prod-us-east-0.grafana.net/otlp validate: http_url - key: instance_id type: input title: Grafana Cloud Instance ID validate: nonempty - key: api_token type: secret title: Grafana Cloud API Token (metrics/logs/traces write) help: Create in Grafana Cloud Portal → OpenTelemetry → Configure
fragments: local: observability: mode: alloy-only otel: endpoint: "[[.Prompt.otlp_endpoint]]" headers: Authorization: "Basic ${GRAFANA_CLOUD_OTLP_AUTH}" env: - name: GRAFANA_CLOUD_OTLP_AUTH value: '[[base64 (printf "%s:%s" .Prompt.instance_id .Prompt.api_token)]]' secret: true gitignore: - ".env.local"4. CI Pack (ci/github-actions/plat5.plugin.yml)
Section titled “4. CI Pack (ci/github-actions/plat5.plugin.yml)”schema: 1name: github-actionstype: cidescription: GitHub Actions (validate/plan on PR, OIDC apply on merge, Docker build)cli: ">=0.20.0"
target: .prompts: - key: control_plane_url type: input title: Production control plane URL placeholder: https://cp.example.com required: false
render: - .github/workflows/plat5-config.yml - .github/workflows/docker.yml