Summary
AI agents need to discover API schemas at runtime without consuming documentation tokens. A tkn schema command would make the CLI self-documenting.
Proposal
# Show PipelineRun CRD schema
tkn schema pipelinerun
# Show what tkn pipeline start accepts
tkn schema pipeline.start
# List all available resources
tkn schema --list
Output should be machine-readable JSON containing field names, types, required/optional status, and descriptions.
Implementation Ideas
- Use Tekton API server discovery (
/openapi/v2 or /openapi/v3)
- Parse CRD schemas from the cluster
- Optionally bundle a fallback static schema for offline use
Value
- Agents can self-serve API structure without pre-stuffed documentation
- Reduces hallucinated field names and values
- Schema is always in sync with the actual cluster version
/kind feature
Summary
AI agents need to discover API schemas at runtime without consuming documentation tokens. A
tkn schemacommand would make the CLI self-documenting.Proposal
Output should be machine-readable JSON containing field names, types, required/optional status, and descriptions.
Implementation Ideas
/openapi/v2or/openapi/v3)Value
/kind feature