| 1 | Feature: FEAT-012 Discovery Filtering (Palette And Slash Completion) |
| 2 | |
| 3 | Scenario: AC1 Visible user command appears once in the palette with metadata |
| 4 | Given a workspace with a visible user command that has a description and usage |
| 5 | When the command palette is queried |
| 6 | Then the user command appears exactly once with its description and usage |
| 7 | And no duplicate entry appears for the same effective token |
| 8 | |
| 9 | Scenario: AC2 Hidden user command is runnable but excluded from the palette |
| 10 | Given a workspace with a hidden user command |
| 11 | When the user runs the hidden command directly |
| 12 | Then the user command executes |
| 13 | When the command palette is queried |
| 14 | Then the hidden command is absent from the palette |
| 15 | |
| 16 | Scenario: AC3 Visible user command appears in matching slash completion |
| 17 | Given a workspace with a visible user command that has a description |
| 18 | When slash completion is queried with a matching prefix |
| 19 | Then the user command appears exactly once with its description |
| 20 | |
| 21 | Scenario: AC4 Hidden user command is excluded from slash completion |
| 22 | Given a workspace with a hidden user command |
| 23 | When slash completion is queried for its prefix |
| 24 | Then the hidden command is absent from slash completion |
| 25 | |
| 26 | Scenario: AC5 User canonical shadow suppresses a built-in in both surfaces |
| 27 | Given a workspace with a visible user command owning a built-in canonical token |
| 28 | When the command palette and slash completion are queried |
| 29 | Then only the user-owned discovery entry appears for that token |
| 30 | And its metadata identifies the user command |
| 31 | |
| 32 | Scenario: AC6 User command shadows a built-in alias without hiding canonical access |
| 33 | Given a workspace with a visible user command owning a built-in alias token |
| 34 | When slash completion is queried for the shadowed alias |
| 35 | Then the user command appears and the aliased built-in does not |
| 36 | When slash completion is queried for the built-in canonical prefix |
| 37 | Then the built-in canonical command remains available |
| 38 | |
| 39 | Scenario: AT-010 Alias-aware unification - accepted user alias claims a built-in canonical token |
| 40 | Given a workspace with a visible user command whose accepted alias equals a built-in canonical token |
| 41 | When the command palette and slash completion are queried for that token |
| 42 | Then both surfaces suppress the built-in canonical entry |
| 43 | And the user command is the only discovery entry for that token |
| 44 |