Skip to content

feat: add category prefix to change name derivation#945

Closed
astripathy wants to merge 3 commits into
Fission-AI:mainfrom
astripathy:feat/category-prefix-change-names
Closed

feat: add category prefix to change name derivation#945
astripathy wants to merge 3 commits into
Fission-AI:mainfrom
astripathy:feat/category-prefix-change-names

Conversation

@astripathy

@astripathy astripathy commented Apr 9, 2026

Copy link
Copy Markdown

Summary

Updates the change name derivation instructions across all workflow templates to prepend a category prefix (feat, fix, chore, or docs) with an underscore to the kebab-case name. In our team, the openspec/changes folder is effectively functioning as a backlog of proposed changes. The category prefix could help in viewing and understanding them at a glance.

Changes

  • src/core/templates/workflows/propose.ts: Updated name derivation in both skill and command templates
  • src/core/templates/workflows/new-change.ts: Updated name derivation in both skill and command templates
  • src/core/templates/workflows/ff-change.ts: Updated name derivation in both skill and command templates

Details

Previously, the AI was instructed to derive a plain kebab-case name (e.g., add-user-auth). Now it will choose a category (feat, fix, chore, or docs) and prepend it with an underscore (e.g., feat_add-user-auth), giving change directories a consistent categorical prefix.

After running openspec init, the updated instructions will appear in both SKILL.md files and command files (e.g., .claude/commands/opsx/propose.md).

Summary by CodeRabbit

  • Documentation
    • Expanded change-naming guidance: users may provide names as plain kebab-case or optionally prefix with a category (feat_, fix_, chore_, docs_), e.g., feat_add-user-auth. Validation and instructions were updated to accept both forms, and derived-name guidance now conditionally prepends a category when the description clearly matches one.

Update workflow templates to derive change names with a category prefix
(feat, fix, chore, or docs) prepended with an underscore.
@astripathy astripathy requested a review from TabishB as a code owner April 9, 2026 20:19

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai

coderabbitai Bot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a1182a39-a40c-4af0-a254-cc7a5c5c1799

📥 Commits

Reviewing files that changed from the base of the PR and between 6c7fc66 and 0889d60.

📒 Files selected for processing (3)
  • src/core/templates/workflows/ff-change.ts
  • src/core/templates/workflows/new-change.ts
  • src/core/templates/workflows/propose.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/core/templates/workflows/propose.ts
  • src/core/templates/workflows/new-change.ts
  • src/core/templates/workflows/ff-change.ts

📝 Walkthrough

Walkthrough

Updated user-facing instruction and guardrail strings in three workflow template files to accept a change name as either plain kebab-case or an optional category-prefixed form (feat_, fix_, chore_, docs_); no code paths, types, or exports changed.

Changes

Cohort / File(s) Summary
Workflow templates
src/core/templates/workflows/ff-change.ts, src/core/templates/workflows/new-change.ts, src/core/templates/workflows/propose.ts
Adjusted instructions and validation wording in skill and command templates to allow change names in plain kebab-case or prefixed with feat_, fix_, chore_, or docs_; updated guidance about when to prepend the category to derived names. No runtime logic or API signatures changed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • TabishB

Poem

🐰 I nibbled on prompts, tidy and bright,
feat_, fix_, chore_, docs_ — neatly in sight,
Kebab-case or prefixed, whichever you choose,
I hop, I tidy, no code to bruise,
A little change dance — a rabbit's delight! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add category prefix to change name derivation' clearly and specifically summarizes the main change: adding category prefix support to change name derivation across workflow templates.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/core/templates/workflows/ff-change.ts`:
- Line 24: Update the template text so the input contract matches the new
prefixed naming rule: replace occurrences of "(kebab-case)" in the ff-change
template with "<category>_<kebab-case>" and adjust the explanatory/example text
(the line that shows the derivation and the example `feat_add-user-auth`) so it
clearly states the final name format is "<category>_<kebab-case>" (apply this
change to all occurrences of the "(kebab-case)" placeholder found in the
ff-change template).

In `@src/core/templates/workflows/new-change.ts`:
- Line 24: Update the name validation and guardrail checks so they accept the
new "<category>_<kebab-case>" format (e.g., feat_add-user-auth) instead of plain
kebab-case: change the validation regex/patterns and any guardrail logic that
currently enforces only kebab-case to allow a leading category prefix
(feat|fix|chore|docs) followed by an underscore and then the existing kebab-case
pattern, and update the user-facing wording/messages to explicitly describe
"<category>_<kebab-case>" everywhere the template derives or validates the
change name (search for the name derivation and guardrail validation logic in
this template to find the code to update).

In `@src/core/templates/workflows/propose.ts`:
- Line 33: The user-facing instruction text in the propose template is
inconsistent: some places tell users to provide a plain kebab-case name while
the generated change names expect "<category>_<kebab-case>" (the prompt string
starting "From their description, choose which one..." and the earlier input
instructions). Update all prompt/instruction strings in this template so they
consistently instruct users to supply a category-prefixed kebab-case name in the
form "<category>_<kebab-case>" (not plain kebab-case), including the other
occurrences referenced in the file (the earlier instruction and the occurrence
noted as also applies to the later line), so the wording matches the generated
change-name format.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fb40f482-de37-4a5c-b6d4-fee58e2ebe2a

📥 Commits

Reviewing files that changed from the base of the PR and between 7fd5417 and 4497780.

📒 Files selected for processing (3)
  • src/core/templates/workflows/ff-change.ts
  • src/core/templates/workflows/new-change.ts
  • src/core/templates/workflows/propose.ts

Comment thread src/core/templates/workflows/ff-change.ts Outdated
Comment thread src/core/templates/workflows/new-change.ts Outdated
Comment thread src/core/templates/workflows/propose.ts Outdated
…g format

Update remaining (kebab-case) references in Input descriptions and
guardrail validation text to use <category>_<kebab-case> consistently.
Update all workflow templates so the category prefix (feat_, fix_,
chore_, docs_) is recommended but not required. Plain kebab-case
names are still accepted.
@TabishB

TabishB commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

I don't know if this was meant to be on a fork. But tying conventional commit convention to openspec change directory names dosen't make sense. The types of specs you create vs the type of changes you make are not exactly 1:1. For most small fixes or even docs you wouldn't go through OpenSpec.

@TabishB TabishB closed this Apr 10, 2026
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.

2 participants