fix: warn when feature names have an empty suffix - #4575
xianjianlf2 wants to merge 1 commit into
Conversation
Assisted-by: OpenAI Codex (autonomous)
|
The warning-only scope is appropriate for the option the reporter proposed. No need to expand this into Unicode naming, generated fallback names, or changes to the separate Git extension scripts. Please add the model(s) used to the AI disclosure. The tool, autonomous mode, extent of assistance, and review status are already clearly stated. The current CI runs require maintainer approval before final review. Drafted for @mnriem with assistance from GitHub Copilot (model: GPT-6 Astra; interactive comment drafting). |
There was a problem hiding this comment.
🟢 Approval recommended
The focused change is consistent across all three implementations and has comprehensive regression coverage.
Pull request overview
Adds actionable warnings when feature names lack usable ASCII suffixes while preserving existing behavior.
Changes:
- Adds consistent stderr warnings across Bash, PowerShell, and Python helpers.
- Adds cross-backend regression coverage.
- Documents ASCII short-name overrides.
File summaries
| File | Description |
|---|---|
scripts/bash/create-new-feature.sh |
Adds Bash warning. |
scripts/powershell/create-new-feature.ps1 |
Adds PowerShell warning. |
scripts/python/create_new_feature.py |
Adds Python warning. |
tests/test_create_new_feature_python_parity.py |
Tests warnings and unchanged behavior. |
docs/reference/core.md |
Documents empty suffixes and overrides. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Description
When a feature description or explicit short name has no usable ASCII characters, the three core
create-new-featurehelpers silently produce names such as001-. This adds a stderr warning pointing to--short-name/-ShortNamewith an ASCII name, including in dry-run mode.Related to #4574; implements its suggested warning-only option. It does not change the existing naming policy, JSON stdout, exit status, or feature creation. Unicode ref support or a generated fallback name would require a separate policy decision.
The Bash, PowerShell, and Python variants are updated together. Documentation shows how to keep a non-Latin description and provide a readable short name.
Testing
uv run specify --help.specify init.git diff --checkand error-severity ShellCheck pass. Local markdownlint reports two pre-existing MD028 findings at lines 59/61 ofdocs/reference/core.md; the unchanged baseline produces the same findings, and none is in the added section.Test selection reasoning
specs/001-user-auth/spec.mdCurrent core command templates do not invoke these helpers; the git extension uses different
create-new-feature-branchscripts, which this PR does not change. No slash-command behavior change is claimed.Manual test results
Agent: OpenAI Codex, acting autonomously for @xianjianlf2. OS/shell: macOS / zsh (Bash helper).
specify init ... --integration claude --ignore-agent-tools --script shcreate-new-feature.sh --json --dry-run "添加用户"create-new-feature.sh --json --short-name user-auth "添加用户"AI Disclosure
OpenAI Codex (model: GPT-6 Astra /
gpt-6-astra, autonomous mode) performed repository research, reproduction, code and test generation, validation, and PR drafting on behalf of @xianjianlf2. The same tool and model were used to update this disclosure in response to review feedback. The patch has not received a human line-by-line review before submission.