palette-audit
Skill4 starsChanged 2 months agoMITView on GitHub
Check the work on this branch (or a PR) for anything that should be reachable from the command palette and is not, then add the rows. Use when asked to audit or tune the palette, to check what ⌘K is missing, or as a pre-PR pass over a feature that added a view, an object, or a verb.
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- desktop/AGENTS.mdAGENTS.md
- web/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- desktop/CLAUDE.mdCLAUDE.md
- web/CLAUDE.mdCLAUDE.md
- desktop-apiSkill
- devserverSkill
- docs-auditSkill
- keymap-auditSkill
- release-notesSkill
- release-prepSkill
- releaseSkill
- shipped-skillsSkill
- ui-perfSkill
- web-docsSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
Read the diff for these, and write them down before deciding anything:
- Very specific: line 134
Add or extend a test with the row -- src/__tests__/App.spec.ts covers the global Go-to rows, composables/__tests__/useCommands.spec.ts the …
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Audit the command palette
⌘K is the app's index. Anything a user can reach by clicking should also be reachable by typing, and the failure mode is silent: a feature ships, nobody registers a row, and the palette quietly stops being complete.
The doctrine lives in docs/architecture.md ("The command palette's rules sit
beside the keymap doctrine") and three ADRs -- read them before deviating, not
before every audit:
palette-scopes-are-filters-over-one-list,
palette-rows-name-objects-and-rendering-draws-the-path,
a-command-is-a-source.
1. Scope the change
git diff main...HEAD --stat
git diff main...HEAD -- desktop/frontend/srcFor a PR that is not checked out, gh pr diff <number>.
2. Inventory what a user gained
Read the diff for these, and write them down before deciding anything:
- verbs -- a new button, menu entry, context-menu item, toolbar icon, or
anything with an
@clicka user can reach; - objects -- a new kind of thing that can be listed and selected (a workspace, a canvas, a pinned chat, a window, a source);
- places -- a new view, overlay, dialog, mode, or settings section;
- configured things -- a new action type, launcher, or flow surface that a
user's
actions.ymlcan now name.
An internal refactor, a change to how an existing row is drawn, and a backend-only change all inventory to nothing. Say so and stop -- an audit that finds nothing is a valid outcome and should be reported as one.
3. Classify each one
A verb the user could want to rebind is a command. It belongs in
desktop/frontend/src/keybindings/catalog.ts, and useAppPaletteRows seeds
its palette row from there automatically -- title, group, keywords, icon and
live shortcut hint, all from the one declaration. Adding it is the
keymap-audit skill's procedure; here your job is to confirm the row actually
appears: it is not paletteHidden, and its context is active wherever the
verb makes sense.
A verb that only exists where its object does is a row, not a command.
Killing the attached session, unpinning this chat, deleting this workspace:
these act on state a component owns and mean nothing without it, so they
register as scope: 'actions' rows from that component and are not bindable.
TerminalMode.vue's terminal:session:kill is the pattern. Group them under
the object's own name so the palette reads as that object's operations.
An object is data, not a command. Feeds, profiles, sessions, windows,
chats, workspaces, themes, settings sections: register these with useCommands
as a reactive source. They are not bindable and must not be added to the
catalog.
useCommands(computed(() => workspaces.value.map((w) => ({
id: `agents:workspace:${w.dir}`,
title: w.name, // the object's own name
group: 'Workspaces', // its real container
kind: 'workspace', // the muted type word at the row's right edge
scope: 'goto',
icon: IconFolder,
run: () => open(w.dir),
}))))A configured action is neither. Actions from actions.yml already reach
the palette through the selected item's own rows, and launchers already
contribute launcher.<id> commands through setLauncherCommands. A new
action type needs nothing; check it flows through those paths rather than
building a parallel one.
4. Register it in the right place
Go-to rows are global. A row meant to be reachable from anywhere registers
at App level -- useAppPaletteRows, off a module-scoped source
(useTerminalSessions, useAttachedTerminalWindows, useAgentSessionsAll) --
so it exists on a fresh launch before its mode has ever mounted. A row
registered inside a lazily-mounted mode component does not exist until the user
has visited that mode, which is exactly the gap the palette is meant to close.
A row registered inside a mode (TerminalMode.vue) is correct only when it
acts on state that lives in that component. Gate it on active inside the
getter rather than relying on scope disposal: a mode is mounted once and then
hidden.
5. Get the row's shape right
- A command row keeps its catalog verb title unchanged. Settings ▸ Keyboard reads the same string, so the two surfaces cannot be allowed to drift.
- An object row is titled with the object's own name and grouped under its
real container. Rendering draws the nesting -- the group header, or a
Container ›prefix once a query narrows past it. Never encode a path or a verb in the title:"Desktop", not"Switch to profile: Desktop". kindis the muted type word Enter lands on (window,feed,chat). Object rows only -- a verb row's title already says what it does.scope: 'goto'browses,scope: 'actions'acts. Default isactions.orderplaces the group: lower sorts earlier, and a group sorts as early as its earliest row asks, so registrars in different files need not agree.- Ids must be stable across renders. Recents are stored per row id in
localStorage, so an id built from an array index or a timestamp silently
breaks them. Dynamic rows use colons (
terminal:session:kill); catalog command ids use dots (terminal.close-window).
6. Hidden, never disabled
A row that cannot run where the user is standing is filtered out of the list --
not shown greyed. Gate the getter, do not add a disabled flag. This is the
choice the launcher rows already made
(ADR quick-terminal-launchers-are-session-scoped).
7. Scopes
Adding a scope tab is one entry in desktop/frontend/src/palette/scopes.ts and
nothing else -- not a change scattered across useCommands and
CommandPalette.vue. A sigil (@, >, !, ?) is grammar, not a command:
setQuery absorbs it only as the first character of an empty query. Shell
and Keys claim their tabs through useShellEscape / useKeysScope, which
also decide whether the tab is visible.
8. Verify
Add or extend a test with the row -- src/__tests__/App.spec.ts covers the
global Go-to rows, composables/__tests__/useCommands.spec.ts the scoring and
registry, components/__tests__/CommandPalette.spec.ts the rendering.
cd desktop/frontend && npm testThen open the palette in a running app and check the row from a cold start, in a mode you have not visited yet -- that is the case the global-registration rule exists for, and the one a unit test is least likely to catch.
Report
State what you added, and state explicitly what you decided not to add and why. A palette audit that lists every rejected candidate is more useful than one that only lists additions, because the next audit re-asks the same questions.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

