Accept ADR 0013 for application alias routing

This commit is contained in:
2026-10-19 14:21:12 +00:00
parent ca85d5b012
commit fae8c4dafa
2 changed files with 76 additions and 10 deletions

View File

@@ -3,6 +3,8 @@
Status: command- and flag-alias behavior and consumer API direction accepted;
implementation has not started. OD-1 through OD-6 are resolved. This roadmap
records the target and work needed before implementation.
[ADR 0013](../adr/0013-application-alias-routing.md) records the accepted
architectural ownership and shared installation decisions.
## Purpose and ownership
@@ -565,28 +567,24 @@ dynamic value completion remain future design work.
covering a command shortcut, a synonym inside an integration namespace, and
a group shortcut, an application-wide help flag alias, and a command-scoped
flag alias reached through a command shortcut.
2. Capture the durable separation between application alias routing and canonical
command and flag ownership in an ADR. Keep exact API, matching, and presentation
details in their appropriate contracts. No relaxation of canonical namespace
ownership is selected.
3. Establish termination-validation behavior with focused evidence for valid
2. Establish termination-validation behavior with focused evidence for valid
repetitions, suffix-dependent cycles, and growing prefix expansions before
building the rest of routing around the algorithm.
4. Implement the selected declaration types and shared path primitives. Define
3. Implement the selected declaration types and shared path primitives. Define
and verify installation handling for nil declarations and zero `RoutingRule`
values alongside the existing invalid-zero and explicit-absence command
contracts. Validate flag declarations as individual spellings. Extend
installation to validate aliases and commands against the complete candidate
batch, preserving retained errors and atomicity. Keep aliases
independent of optional-library dependencies and backend-specific exports.
5. Integrate command and flag alias resolution with canonical routing, help, and
4. Integrate command and flag alias resolution with canonical routing, help, and
invocation identity. Use canonical flag metadata and the existing parser to
preserve values and operands, and reuse typed execution machinery. Apply the
selected short-option grammar and correct explicit empty values for canonical
short spellings and aliases together. Keep metadata lookup separate from
execution and help rendering as described under future shell completion,
without implementing completion in this delivery.
6. Add focused behavioral evidence for both example mappings, group aliases,
5. Add focused behavioral evidence for both example mappings, group aliases,
longest matches, chains, group composition, cycles and nonterminating prefix
expansion, collisions, missing targets, same-batch
resolution, later registration, argument preservation, help without
@@ -598,10 +596,10 @@ dynamic value completion remain future design work.
Include discovery-help contexts without canonical commands, longer aliases
beneath operand-taking command shortcuts, rejection of operand-bearing
targets, and canonical flag endpoints alongside inactive global mappings.
7. Add maintained consumer examples and update GoDoc, the CLI reference, consumer
6. Add maintained consumer examples and update GoDoc, the CLI reference, consumer
guidance, and internal documentation when implementation lands. Validate the
affected modules under the [developer guide](../development.md).
8. Document migration from `...Command` to `...Declaration`, including slice
7. Document migration from `...Command` to `...Declaration`, including slice
conversion, and the explicit empty-value correction. Include the compatibility
impact and required consumer action in release notes under the
[release policy](../policy/release.md#versioning-and-compatibility).