Skip to content

fix(writing-plans): avoid invalid placeholder chars in plan filenames#635

Open
stablegenius49 wants to merge 1 commit intoobra:mainfrom
stablegenius49:pr-factory/issue-408-write-plan-invalid-argument
Open

fix(writing-plans): avoid invalid placeholder chars in plan filenames#635
stablegenius49 wants to merge 1 commit intoobra:mainfrom
stablegenius49:pr-factory/issue-408-write-plan-invalid-argument

Conversation

@stablegenius49
Copy link

Summary

  • change the writing-plans save-path example to a real cross-platform filename pattern (docs/plans/YYYY-MM-DD-feature-name.md)
  • add explicit filename slug rules (a-z, 0-9, hyphen)
  • call out that placeholder characters like < and > must never appear in the actual filename

This targets intermittent "invalid argument passed to tool" failures when /superpowers:write-plan tries to save a plan using literal placeholder characters.

Closes #408

@coderabbitai
Copy link

coderabbitai bot commented Mar 6, 2026

📝 Walkthrough

Walkthrough

Updated the plan-saving filename format from YYYY-MM-DD-<feature-name>.md to YYYY-MM-DD-feature-name.md and added explicit filename rules specifying allowed characters and disallowed placeholders to improve cross-platform compatibility.

Changes

Cohort / File(s) Summary
Plan Skill Documentation
skills/writing-plans/SKILL.md
Updated filename convention from placeholder syntax to explicit format and added new "Filename rules" section clarifying allowed/disallowed characters for cross-platform compatibility.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A plan's name needn't have brackets or brackets,
Just dates and the names, no more silly plackets!
With rules now so clear, from Mac straight to Win,
Our write-plan skill triumphs—let's start from within! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the fix targeting placeholder characters in writing-plans filenames, which directly reflects the main change in the PR.
Description check ✅ Passed The description provides relevant details about the changeset, including the filename pattern update, slug rules, and the issue being closed (#408).
Linked Issues check ✅ Passed The PR addresses issue #408 by updating documentation with proper filename formatting rules and removing invalid placeholder characters from examples, matching the requirements to improve robustness and provide guidance on filename constraints.
Out of Scope Changes check ✅ Passed All changes are within scope: the filename example update and new slug rules are directly targeted at resolving the file-writing failures described in issue #408.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
skills/writing-plans/SKILL.md (1)

106-106: Consider replacing <filename> placeholder for consistency.

While this is a message template (not an actual filename), the angle bracket notation could create confusion given the new explicit rule on line 23: "Never leave placeholder characters like < > in the actual filename."

♻️ Suggested alternative wording
-**"Plan complete and saved to `docs/plans/<filename>.md`. Two execution options:**
+**"Plan complete and saved to `docs/plans/[YYYY-MM-DD-your-feature-name].md`. Two execution options:**

This uses square brackets to distinguish template variables from the angle bracket placeholders that must be avoided in actual filenames.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/writing-plans/SKILL.md` at line 106, Replace the angle-bracket
placeholder in the message template that reads "**Plan complete and saved to
`docs/plans/<filename>.md`. Two execution options:**" with a non-angle form to
avoid confusion with the rule banning `<` and `>` in filenames; change
`<filename>` to `[filename]` (or a similar bracketed token) and adjust the
surrounding text if needed to make clear it’s a template variable in SKILL.md.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@skills/writing-plans/SKILL.md`:
- Around line 20-23: The brainstorming skill uses angle-bracket placeholders in
filename patterns — specifically the pattern
"docs/plans/YYYY-MM-DD-<topic>-design.md" — which violates the filename rules;
update both occurrences to use a plain slug (e.g.,
"docs/plans/YYYY-MM-DD-topic-design.md") and add the filename rules (use
lowercase a-z, 0-9, hyphens, no `<` or `>`) into the brainstorming skill
documentation in SKILL.md so users see the constraints; search for the pattern
"docs/plans/YYYY-MM-DD-<topic>-design.md" and replace it with
"docs/plans/YYYY-MM-DD-topic-design.md" and append or integrate the filename
rules paragraph near the skill instructions.

---

Nitpick comments:
In `@skills/writing-plans/SKILL.md`:
- Line 106: Replace the angle-bracket placeholder in the message template that
reads "**Plan complete and saved to `docs/plans/<filename>.md`. Two execution
options:**" with a non-angle form to avoid confusion with the rule banning `<`
and `>` in filenames; change `<filename>` to `[filename]` (or a similar
bracketed token) and adjust the surrounding text if needed to make clear it’s a
template variable in SKILL.md.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 56cc0e1e-3604-475e-831d-d9636b25d117

📥 Commits

Reviewing files that changed from the base of the PR and between e4a2375 and b38220e.

📒 Files selected for processing (1)
  • skills/writing-plans/SKILL.md

Comment on lines +20 to +23
Filename rules (to avoid tool/path errors across macOS/Linux/Windows):
- Replace `feature-name` with a real lowercase slug (e.g., `oauth-login`, `invoice-export`)
- Use only: `a-z`, `0-9`, and hyphens (`-`)
- Never leave placeholder characters like `<` `>` in the actual filename
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for filename patterns with angle brackets in brainstorming skill
rg -n -C3 'YYYY-MM-DD' skills/brainstorming/SKILL.md

Repository: obra/superpowers

Length of output: 797


Update brainstorming skill to match new filename rules.

The brainstorming skill still uses angle bracket placeholders in filename patterns (lines 30 and 81: docs/plans/YYYY-MM-DD-<topic>-design.md), which contradicts the new rule on line 23 that states "Never leave placeholder characters like < > in the actual filename." Users following the brainstorming skill could create files with invalid filenames and encounter tool errors.

Update both instances to use plain alphanumeric slugs (e.g., docs/plans/YYYY-MM-DD-topic-design.md) and add the filename rules to the brainstorming skill's documentation for consistency.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/writing-plans/SKILL.md` around lines 20 - 23, The brainstorming skill
uses angle-bracket placeholders in filename patterns — specifically the pattern
"docs/plans/YYYY-MM-DD-<topic>-design.md" — which violates the filename rules;
update both occurrences to use a plain slug (e.g.,
"docs/plans/YYYY-MM-DD-topic-design.md") and add the filename rules (use
lowercase a-z, 0-9, hyphens, no `<` or `>`) into the brainstorming skill
documentation in SKILL.md so users see the constraints; search for the pattern
"docs/plans/YYYY-MM-DD-<topic>-design.md" and replace it with
"docs/plans/YYYY-MM-DD-topic-design.md" and append or integrate the filename
rules paragraph near the skill instructions.

IgorTavcar added a commit to IgorTavcar/superpowers that referenced this pull request Mar 9, 2026
Explicit slug rules: lowercase, hyphens, no angle brackets in plan filenames.

Upstream PR: obra#635

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

superpowers:write-plan Error writing files in claude code

1 participant