Skip to content

Commit a58be56

Browse files
iaminaweclaude
andauthored
fix: remove title field from generate-spec prompt (#12)
* Remove title field from generate-spec prompt 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 <[email protected]> * Remove title field from prompts and parser 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 <[email protected]> * Remove title field from test fixtures 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 <[email protected]> --------- Co-authored-by: Claude <[email protected]>
1 parent 8333401 commit a58be56

File tree

5 files changed

+5
-17
lines changed

5 files changed

+5
-17
lines changed

mcp_server/prompt_utils.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ class PromptArgumentSpec:
1919
class MarkdownPrompt:
2020
path: Path
2121
name: str
22-
title: str | None
2322
description: str | None
2423
tags: set[str] | None
2524
meta: dict[str, Any] | None
@@ -29,8 +28,6 @@ class MarkdownPrompt:
2928

3029
def decorator_kwargs(self) -> dict[str, Any]:
3130
kwargs: dict[str, Any] = {"name": self.name}
32-
if self.title:
33-
kwargs["title"] = self.title
3431
if self.description:
3532
kwargs["description"] = self.description
3633
if self.tags:
@@ -50,7 +47,6 @@ def load_markdown_prompt(path: Path) -> MarkdownPrompt:
5047
frontmatter, body = parse_frontmatter(content)
5148

5249
name = frontmatter.get("name") or path.stem
53-
title = frontmatter.get("title")
5450
description = frontmatter.get("description")
5551
tags = _ensure_tag_set(frontmatter.get("tags"))
5652
enabled = frontmatter.get("enabled", True)
@@ -62,7 +58,6 @@ def load_markdown_prompt(path: Path) -> MarkdownPrompt:
6258
if key
6359
not in {
6460
"name",
65-
"title",
6661
"description",
6762
"tags",
6863
"arguments",
@@ -77,7 +72,6 @@ def load_markdown_prompt(path: Path) -> MarkdownPrompt:
7772
return MarkdownPrompt(
7873
path=path,
7974
name=name,
80-
title=title,
8175
description=description,
8276
tags=tags,
8377
meta=meta,

prompts/generate-spec.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
name: generate-spec
3-
title: Generate Specification
4-
description: Generate a Specification (Spec) for a feature
3+
description: "Generate a Specification (Spec) for a feature"
54
tags:
65
- planning
76
- specification

prompts/generate-task-list-from-spec.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
name: generate-task-list-from-spec
3-
title: Generate Task List From Spec
4-
description: Generate a task list from a Spec
3+
description: "Generate a task list from a Spec"
54
tags:
65
- planning
76
- tasks

prompts/manage-tasks.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
22
name: manage-tasks
3-
title: Manage Tasks
4-
description: Guidelines for managing task lists and working on tasks/subtasks
3+
description: "Guidelines for managing task lists and working on tasks/subtasks"
54
tags:
65
- execution
76
- tasks
87
arguments: []
98
meta:
109
category: task-management
11-
allowed-tools: Glob, Grep, LS, Read, Edit, MultiEdit, Write, WebFetch, WebSearch
10+
allowed-tools: Glob, Grep, LS, Read, Edit, MultiEdit, Write, WebFetch, WebSearch
1211
---
1312

1413
## Manage Tasks

tests/conftest.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def temp_prompts_dir():
3434
(prompts_dir / "generate-spec.md").write_text(
3535
"""---
3636
name: generate-spec
37-
title: Generate Specification
3837
description: Generate a Specification (Spec) for a feature
3938
tags:
4039
- planning
@@ -51,7 +50,6 @@ def temp_prompts_dir():
5150
(prompts_dir / "generate-task-list-from-spec.md").write_text(
5251
"""---
5352
name: generate-task-list-from-spec
54-
title: Generate Task List From Spec
5553
description: Generate a task list from a Spec
5654
tags:
5755
- planning
@@ -68,15 +66,14 @@ def temp_prompts_dir():
6866
(prompts_dir / "manage-tasks.md").write_text(
6967
"""---
7068
name: manage-tasks
71-
title: Manage Tasks
7269
description: Guidelines for managing task lists and working on tasks/subtasks
7370
tags:
7471
- execution
7572
- tasks
7673
arguments: []
7774
meta:
7875
category: task-management
79-
allowed-tools: Glob, Grep, LS, Read, Edit, MultiEdit, Write, WebFetch, WebSearch
76+
allowed-tools: Glob, Grep, LS, Read, Edit, MultiEdit, Write, WebFetch, WebSearch
8077
---
8178
8279
# Manage Tasks

0 commit comments

Comments
 (0)