Skip to content

Conversation

@iaminawe
Copy link
Contributor

@iaminawe iaminawe commented Oct 17, 2025

Summary

  • Remove redundant title field from the generate-spec prompt frontmatter

Details

The title field in the prompt frontmatter is redundant as the name field already provides sufficient identification. This change simplifies the prompt configuration by removing the unnecessary field.

Test plan

  • Verify that the prompt still loads correctly
  • Confirm that MCP server functionality is not affected
  • Check that the prompt is properly identified without the title field

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Removed the public prompt title metadata field.
    • Moved allowed-tools into a nested meta section in prompt front matter.
    • Standardized front-matter description values to use quoted strings.
    • Adjusted front-matter formatting in test fixtures to reflect the nested meta structure.

Remove redundant title field from the generate-spec prompt frontmatter
as the name field is sufficient for identification.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 17, 2025

Walkthrough

Removed propagation and storage of a title field from Markdown prompt metadata and loaders; normalized YAML front-matter descriptions to quoted strings in three prompt files; moved allowed-tools into meta for one prompt; adjusted test fixture frontmatter indentation. No other runtime behavior changed.

Changes

Cohort / File(s) Summary
Markdown prompt runtime change
mcp_server/prompt_utils.py
Removed `title: str
Frontmatter quoting
prompts/generate-spec.md, prompts/generate-task-list-from-spec.md, prompts/manage-tasks.md
Changed description YAML value from an unquoted scalar to a quoted string (description: "...") without semantic change.
Frontmatter restructure
prompts/manage-tasks.md
Moved allowed-tools from top-level front matter into meta.allowed-tools (and updated indentation accordingly).
Test fixture frontmatter indentation
tests/conftest.py
Adjusted indentation/positioning of allowed-tools in the test fixture YAML frontmatter to reflect the meta.allowed-tools structure.

Sequence Diagram(s)

sequenceDiagram
  participant Loader as load_markdown_prompt
  participant FM as FrontMatter (file)
  participant Prompt as MarkdownPrompt

  rect rgba(200,230,201,0.6)
    Note over Loader,FM: Old flow (before changes)
    Loader->>FM: read frontmatter (title, description, allowed-tools, ...)
    Loader->>Prompt: construct MarkdownPrompt(title, description, meta...)
  end

  rect rgba(187,222,251,0.6)
    Note over Loader,FM: New flow (after changes)
    Loader->>FM: read frontmatter (description, meta.allowed-tools, ...)
    Loader->>Prompt: construct MarkdownPrompt(description, meta..., *no title*)
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰
A title hopped off the page today,
I nudged the frontmatter out of the way.
Quotes cuddled each description tight,
Tools moved under meta’s light.
— Thumper the CodeRabbit 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description does not adequately follow the repository's template structure or comprehensively document the changes. While a "Summary" and "Details" section exist, they don't use the required template headings ("Why?", "What Changed?", "Additional Notes"), and more critically, the description only addresses removal of the title from the generate-spec prompt while omitting major changes to the codebase: removal of the title field from the MarkdownPrompt dataclass, updates to load_markdown_prompt function, restructuring of allowed-tools in manage-tasks.md, and test fixture modifications. The description is incomplete and misleading given the scope of actual changes across five files. The description should be rewritten to follow the template structure and comprehensively cover all changes made. The "What Changed?" section must document the removal of the title field from the MarkdownPrompt dataclass, updates to the load_markdown_prompt function, changes to manage-tasks.md, and test updates. Include checklist items (marked complete or incomplete as appropriate) and ensure the description reflects the system-wide scope of the refactoring rather than focusing solely on the generate-spec prompt file.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Title Check ✅ Passed The PR title "fix: remove title field from generate-spec prompt" refers to a real part of the changeset where the title field is being removed from the MarkdownPrompt system. However, the title understates the actual scope of changes. While the title suggests the change is localized to the generate-spec prompt, the actual modifications are system-wide: the title field is removed from the entire MarkdownPrompt dataclass in mcp_server/prompt_utils.py (including its handling in load_markdown_prompt, decorator_kwargs, and the exclusion set), which affects all prompts that use this system. Additional changes were also made to multiple prompt files and their test fixtures. The title captures the intent but is overly narrow for the breadth of the implementation.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch remove-title-from-generate-spec

Comment @coderabbitai help to get the list of available commands and usage tips.

@ryderstorm
Copy link
Collaborator

@iaminawe need to remove the titles from the other prompts, too. And probably the prompt metadata parsing logic.

iaminawe and others added 2 commits October 17, 2025 15:10
Remove the title field from all prompt frontmatter files and the
MarkdownPrompt parser to fix Claude Code slash command parsing issues.
The title field with spaces was causing slash commands to break at the
first space character.

Changes:
- Remove title field from MarkdownPrompt dataclass
- Remove title handling in decorator_kwargs() method
- Remove title extraction in load_markdown_prompt()
- Remove title field from all three prompt files
- Add quotes to description fields for consistency
- Fix indentation in manage-tasks.md meta section

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Update test fixtures to remove the title field from prompt frontmatter,
matching the changes made to the actual prompt files and parser.

Also fix indentation for allowed-tools in manage-tasks test fixture.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the redundant title field from prompt frontmatter configurations across the codebase. The name field already provides sufficient identification for prompts, making title unnecessary. The change also standardizes description values to use quoted strings in the YAML frontmatter.

  • Removed the title field from the MarkdownPrompt dataclass and related processing logic
  • Updated all prompt files to remove the title field and quote description values
  • Updated test fixtures to match the new frontmatter structure

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
mcp_server/prompt_utils.py Removed title field from MarkdownPrompt class and its processing in load_markdown_prompt function
prompts/generate-spec.md Removed title field and quoted the description value
prompts/generate-task-list-from-spec.md Removed title field and quoted the description value
prompts/manage-tasks.md Removed title field and quoted the description value
tests/conftest.py Updated test fixtures to remove title field from all prompt configurations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ryderstorm ryderstorm changed the title Remove title field from generate-spec prompt fix: remove title field from generate-spec prompt Oct 18, 2025
@ryderstorm ryderstorm merged commit a58be56 into main Oct 18, 2025
7 checks passed
@ryderstorm ryderstorm deleted the remove-title-from-generate-spec branch October 18, 2025 00:19
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.

3 participants