ADR-0021: Resource-scoped render commands for single-item rendering
Status: accepted | Date: 2026-01-29
References: RFC-0002, ADR-0018
Context
Context
The global govctl render command currently has an --rfc-id flag for rendering a single RFC, but no equivalent flags for ADRs or work items. This creates an asymmetry in the CLI.
Problem Statement
When users want to render a single artifact, the current options are:
| Artifact | Current Syntax | Works? |
|---|---|---|
| RFC | govctl render rfc --rfc-id RFC-0001 | ✅ Yes |
| ADR | (none) | ❌ No |
| Work Item | (none) | ❌ No |
Options Considered
- Add
--adr-idand--work-idflags — Proliferates flags on global command - Add resource-scoped render verbs — Clean separation of bulk vs single
- Leave as-is — Accept asymmetry
Constraints
- RFC-0002:C-GLOBAL-COMMANDS defines
renderas a global command that “operates across all resources” - ADR-0018 established the “one way to do it” principle
- Resource-scoped commands follow the noun-first pattern per RFC-0002:C-RESOURCE-MODEL
Decision
Decision
We will add resource-scoped render commands and remove the --rfc-id flag from the global render command.
New Commands
govctl rfc render <RFC-ID> # Render single RFC
govctl adr render <ADR-ID> # Render single ADR
govctl work render <WI-ID> # Render single work item
Modified Command
# Global render now ONLY does bulk operations
govctl render [rfc|adr|work|changelog|all] # No --rfc-id flag
Rationale
- Clean separation: Global
render= bulk operations, resource-scoped = single-item - No flag proliferation: Avoids
--rfc-id,--adr-id,--work-idon global command - Discoverable:
govctl rfc --helpshowsrenderalongside other verbs - Noun-first for single items: Consistent with
govctl rfc get,govctl rfc list - RFC-0002 compatible:
renderremains global for bulk; adding resource verbs doesn’t violate this
Implementation Notes
- Resource-scoped
rendershares implementation with global render (just filters to single ID) - Error handling: if ID not found, return clear error message
- Output: same format as bulk render, just for one item
Consequences
Consequences
Positive
- Symmetric API: All resource types support single-item render equally
- Cleaner global command: No proliferation of
--*-idflags - Intuitive mental model: “Work with RFC” →
govctl rfc render RFC-0001 - Better discoverability:
govctl rfc --helpshows all RFC operations including render
Negative
- Breaking change: Scripts using
govctl render --rfc-idmust update- Mitigation: Pre-1.0, document in CHANGELOG
- Two entry points for render: Global (bulk) and resource-scoped (single)
- Mitigation: Clear purpose split makes this a feature, not a bug
Migration
# Old syntax (removed)
govctl render rfc --rfc-id RFC-0001
# New syntax
govctl rfc render RFC-0001