Skip to content

fix(skills): correct built-in command override guidance in customizing-commands - #4120

Draft
amelia-letta wants to merge 1 commit into
mainfrom
amelia/builtin-skill-watch-customizing-commands
Draft

fix(skills): correct built-in command override guidance in customizing-commands#4120
amelia-letta wants to merge 1 commit into
mainfrom
amelia/builtin-skill-watch-customizing-commands

Conversation

@amelia-letta

Copy link
Copy Markdown
Collaborator

Builtin-skill-watch: customizing-commands@852ca244b002-75330c920320721f

Selected skill: customizing-commands

Stale claim

The skill's Rules section said:

Do not register built-in command IDs.

Current owning source

src/mods/mod-engine.ts (lines 1113-1126): when a mod command ID matches a built-in command ID, the engine records a diagnostic with phase command_override and severity warning (via getModDiagnosticSeverity in src/mods/mod-diagnostics.ts:44). The command still registers and shadows the built-in.

The skill's own reference file src/skills/builtin/creating-mods/references/commands.md says:

Built-in commands like /reload, /model, /statusline, etc. can be overridden by trusted local mods. Do this intentionally and keep recovery in mind: start with --no-mods or LETTA_DISABLE_MODS=1 if an override breaks command handling.

Fix

Replaced the rule with guidance that matches the source code and the reference:

Overriding built-in command IDs records a warning diagnostic; do this intentionally and keep --no-mods or LETTA_DISABLE_MODS=1 in mind for recovery.

Validation

  • bun run check (12/12 checks passed)
  • bun test src/cli/mods/command-runtime.test.ts (4 pass)
  • bun test src/mods/mod-engine.test.ts (38 pass)

…g-commands

The skill said "Do not register built-in command IDs" but the mod engine
allows it: registering a built-in command ID records a warning diagnostic
(phase: command_override, severity: warning) and the command still
registers, shadowing the built-in. The skill reference file commands.md
says built-in commands can be overridden by trusted local mods. Align
the rule with the source code and the reference.

Builtin-skill-watch: customizing-commands@852ca244b002-75330c920320721f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant