Problem Statement
specify preset list currently prints installed presets in an order that does not reflect the actual resolution/precedence order used when composing commands or templates. Users naturally assume the printed order is the precedence order. In practice, priority number determines order (lower number = higher precedence), and ties appear to be broken by preset id (e.g., alphabetical), but none of this is indicated in the output. This led to a real case of confusion: copilot-sub-agents (priority 100) is listed before lean (priority 10) and assumed it had higher precedence, when the opposite was true. Furthermore, it's unclear how ties change the order since this isn't reflected in the output.
Proposed Solution
Update specify preset list to sort and print presets in actual precedence order (by priority, then by tie-break rule such as preset id) so the displayed order always matches the order used for resolution/composition. Since the list output is not otherwise used for ordering logic, resorting it should be safe.
Alternatives Considered
Alternatively, keep the current list order but add an explicit precedence indicator to each entry (e.g., an index number or rank reflecting resolution order), so users can determine precedence without duplicating the CLI's internal tie-break logic themselves.
Component
Specify CLI (initialization, commands)
AI Agent (if applicable)
No response
Use Cases
- A user installs multiple presets and wants to quickly confirm, from
specify preset list output alone, which preset will take precedence for overlapping commands/templates.
- A wizard or tooling built on top of
specify preset list needs a reliable way to determine composition order without reimplementing the CLI's internal priority/tie-break logic.
- Debugging preset composition issues (e.g., why a
prepend layer didn't show up) is easier when the list output directly reflects real precedence.
Acceptance Criteria
Additional Context
Follow-up from discussion on #4083. That issue covers a separate bug (preset command composition not applied); this feature request specifically addresses the confusing/undocumented ordering in preset list output that led to a user misreading precedence.
Problem Statement
specify preset listcurrently prints installed presets in an order that does not reflect the actual resolution/precedence order used when composing commands or templates. Users naturally assume the printed order is the precedence order. In practice, priority number determines order (lower number = higher precedence), and ties appear to be broken by preset id (e.g., alphabetical), but none of this is indicated in the output. This led to a real case of confusion:copilot-sub-agents(priority 100) is listed beforelean(priority 10) and assumed it had higher precedence, when the opposite was true. Furthermore, it's unclear how ties change the order since this isn't reflected in the output.Proposed Solution
Update
specify preset listto sort and print presets in actual precedence order (by priority, then by tie-break rule such as preset id) so the displayed order always matches the order used for resolution/composition. Since the list output is not otherwise used for ordering logic, resorting it should be safe.Alternatives Considered
Alternatively, keep the current list order but add an explicit precedence indicator to each entry (e.g., an index number or rank reflecting resolution order), so users can determine precedence without duplicating the CLI's internal tie-break logic themselves.
Component
Specify CLI (initialization, commands)
AI Agent (if applicable)
No response
Use Cases
specify preset listoutput alone, which preset will take precedence for overlapping commands/templates.specify preset listneeds a reliable way to determine composition order without reimplementing the CLI's internal priority/tie-break logic.prependlayer didn't show up) is easier when the list output directly reflects real precedence.Acceptance Criteria
specify preset listoutput order matches actual resolution/precedence order (by priority, then tie-break rule)Additional Context
Follow-up from discussion on #4083. That issue covers a separate bug (preset command composition not applied); this feature request specifically addresses the confusing/undocumented ordering in
preset listoutput that led to a user misreading precedence.