File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed
.github/workflows/scripts Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff 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`n argument-hint: $hint "
173+ }
174+ }
175+
157176 # Apply other substitutions
158177 $body = $body -replace ' \{ARGS\}' , $ArgFormat
159178 $body = $body -replace ' __AGENT__' , $Agent
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments