Skip to content

fix(resources): reserve all built-in slash-command prompt names#468

Open
yoshibase wants to merge 1 commit into
huggingface:mainfrom
yoshibase:fix/issue-460-reserve-builtin-prompt-names
Open

fix(resources): reserve all built-in slash-command prompt names#468
yoshibase wants to merge 1 commit into
huggingface:mainfrom
yoshibase:fix/issue-460-reserve-builtin-prompt-names

Conversation

@yoshibase

@yoshibase yoshibase commented Jul 23, 2026

Copy link
Copy Markdown

Summary

  • Derive reserved prompt-template stems from create_default_command_registry() so every built-in slash command name and alias (e.g. new, quit, exit) cannot shadow real commands via *.md templates
  • Ignore colliding templates at resource load time with a clear resource diagnostic instead of silently changing /new or /quit behavior
  • Document the migration policy in website/content/guides/skills-and-prompts.md and add a dev note for validation

Fixes #460

Test plan

  • uv run pytest tests/test_prompt_templates.py tests/test_commands.py tests/test_coding_session.py
  • uv run ruff check .
  • uv run ruff format --check .
  • Added coverage for new.md, quit.md, exit.md, and /reload consistency

@yoshibase
yoshibase requested a review from alejandro-ao as a code owner July 23, 2026 22:58
Derive reserved prompt-template stems from create_default_command_registry()
so built-in commands and aliases like /new and /exit cannot be shadowed by
markdown templates. Colliding files are ignored with a resource diagnostic
instead of silently changing command behavior.

Fixes huggingface#460
@yoshibase
yoshibase force-pushed the fix/issue-460-reserve-builtin-prompt-names branch from 8f83522 to d8e2dfe Compare July 24, 2026 16:17
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.

Reserve built-in slash-command names from prompt templates

1 participant