Skip to content

[Feature]: specify preset list should show presets in actual precedence order (or expose an explicit precedence indicator) #4086

Description

@nicolehaugen

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

  1. 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.
  2. 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.
  3. 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

  • specify preset list output order matches actual resolution/precedence order (by priority, then tie-break rule)
  • Tie-break rule (e.g., preset id) is documented
  • Documentation is updated to reflect the guaranteed ordering behavior

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions