Skip to content

Commit e8b21fe

Browse files
feat: add argument-hint frontmatter to Claude Code commands (#1951)
Inject argument-hint into YAML frontmatter for Claude agent only during release package generation. Templates remain agent-agnostic; hints are added on the fly in generate_commands() when agent is "claude". Closes #1951 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 0945df9 commit e8b21fe

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.github/workflows/scripts/create-release-packages.ps1

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,25 @@ function Generate-Commands {
154154

155155
$body = $outputLines -join "`n"
156156

157+
# Inject argument-hint for Claude Code commands (Claude-specific frontmatter)
158+
if ($Agent -eq 'claude') {
159+
$hint = switch ($name) {
160+
'specify' { 'Describe the feature you want to specify' }
161+
'plan' { 'Optional guidance for the planning phase' }
162+
'tasks' { 'Optional task generation constraints' }
163+
'implement' { 'Optional implementation guidance or task filter' }
164+
'analyze' { 'Optional focus areas for analysis' }
165+
'clarify' { 'Optional areas to clarify in the spec' }
166+
'constitution' { 'Principles or values for the project constitution' }
167+
'checklist' { 'Domain or focus area for the checklist' }
168+
'taskstoissues' { 'Optional filter or label for GitHub issues' }
169+
default { '' }
170+
}
171+
if (-not [string]::IsNullOrEmpty($hint)) {
172+
$body = $body -replace '(?m)^(description:.*)$', "`$1`nargument-hint: $hint"
173+
}
174+
}
175+
157176
# Apply other substitutions
158177
$body = $body -replace '\{ARGS\}', $ArgFormat
159178
$body = $body -replace '__AGENT__', $Agent

.github/workflows/scripts/create-release-packages.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,28 @@ generate_commands() {
105105
{ print }
106106
')
107107

108+
# Inject argument-hint for Claude Code commands (Claude-specific frontmatter)
109+
if [[ "$agent" == "claude" ]]; then
110+
local hint=""
111+
case "$name" in
112+
specify) hint="Describe the feature you want to specify" ;;
113+
plan) hint="Optional guidance for the planning phase" ;;
114+
tasks) hint="Optional task generation constraints" ;;
115+
implement) hint="Optional implementation guidance or task filter" ;;
116+
analyze) hint="Optional focus areas for analysis" ;;
117+
clarify) hint="Optional areas to clarify in the spec" ;;
118+
constitution) hint="Principles or values for the project constitution" ;;
119+
checklist) hint="Domain or focus area for the checklist" ;;
120+
taskstoissues) hint="Optional filter or label for GitHub issues" ;;
121+
esac
122+
if [[ -n "$hint" ]]; then
123+
body=$(printf '%s\n' "$body" | awk -v hint="$hint" '
124+
/^description:/ { print; print "argument-hint: " hint; next }
125+
{ print }
126+
')
127+
fi
128+
fi
129+
108130
# Apply other substitutions
109131
body=$(printf '%s\n' "$body" | sed "s/{ARGS}/$arg_format/g" | sed "s/__AGENT__/$agent/g" | rewrite_paths)
110132

0 commit comments

Comments
 (0)