@@ -44,22 +44,22 @@ generate_commands() {
4444 [[ -f " $template " ]] || continue
4545 local name description script_command body
4646 name=$( basename " $template " .md)
47-
47+
4848 # Normalize line endings
4949 file_content=$( tr -d ' \r' < " $template " )
50-
50+
5151 # Extract description and script command from YAML frontmatter
5252 description=$( printf ' %s\n' " $file_content " | awk ' /^description:/ {sub(/^description:[[:space:]]*/, ""); print; exit}' )
5353 script_command=$( printf ' %s\n' " $file_content " | awk -v sv=" $script_variant " ' /^[[:space:]]*' " $script_variant " ' :[[:space:]]*/ {sub(/^[[:space:]]*' " $script_variant " ' :[[:space:]]*/, ""); print; exit}' )
54-
54+
5555 if [[ -z $script_command ]]; then
5656 echo " Warning: no script command found for $script_variant in $template " >&2
5757 script_command=" (Missing script command for $script_variant )"
5858 fi
59-
59+
6060 # Replace {SCRIPT} placeholder with the script command
6161 body=$( printf ' %s\n' " $file_content " | sed " s|{SCRIPT}|${script_command} |g" )
62-
62+
6363 # Remove the scripts: section from frontmatter while preserving YAML structure
6464 body=$( printf ' %s\n' " $body " | awk '
6565 /^---$/ { print; if (++dash_count == 1) in_frontmatter=1; else in_frontmatter=0; next }
@@ -68,10 +68,10 @@ generate_commands() {
6868 in_frontmatter && skip_scripts && /^[[:space:]]/ { next }
6969 { print }
7070 ' )
71-
71+
7272 # Apply other substitutions
7373 body=$( printf ' %s\n' " $body " | sed " s/{ARGS}/$arg_format /g" | sed " s/__AGENT__/$agent /g" | rewrite_paths)
74-
74+
7575 case $ext in
7676 toml)
7777 { echo " description = \" $description \" " ; echo ; echo " prompt = \"\"\" " ; echo " $body " ; echo " \"\"\" " ; } > " $output_dir /$name .$ext " ;;
@@ -88,13 +88,13 @@ build_variant() {
8888 local base_dir=" $GENRELEASES_DIR /sdd-${agent} -package-${script} "
8989 echo " Building $agent ($script ) package..."
9090 mkdir -p " $base_dir "
91-
91+
9292 # Copy base structure but filter scripts by variant
9393 SPEC_DIR=" $base_dir /.specify"
9494 mkdir -p " $SPEC_DIR "
95-
95+
9696 [[ -d memory ]] && { cp -r memory " $SPEC_DIR /" ; echo " Copied memory -> .specify" ; }
97-
97+
9898 # Only copy the relevant script variant directory
9999 if [[ -d scripts ]]; then
100100 mkdir -p " $SPEC_DIR /scripts"
@@ -111,7 +111,7 @@ build_variant() {
111111 ;;
112112 esac
113113 fi
114-
114+
115115 [[ -d templates ]] && { mkdir -p " $SPEC_DIR /templates" ; find templates -type f -not -path " templates/commands/*" -exec cp --parents {} " $SPEC_DIR " / \; ; echo " Copied templates -> .specify/templates" ; }
116116 # Inject variant into plan-template.md within .specify/templates if present
117117 local plan_tpl=" $base_dir /.specify/templates/plan-template.md"
@@ -172,13 +172,16 @@ build_variant() {
172172 roo)
173173 mkdir -p " $base_dir /.roo/commands"
174174 generate_commands roo md " \$ ARGUMENTS" " $base_dir /.roo/commands" " $script " ;;
175+ droid)
176+ mkdir -p " $base_dir /.factory/commands"
177+ generate_commands droid md " \$ ARGUMENTS" " $base_dir /.factory/commands" " $script " ;;
175178 esac
176179 ( cd " $base_dir " && zip -r " ../spec-kit-template-${agent} -${script} -${NEW_VERSION} .zip" . )
177180 echo " Created $GENRELEASES_DIR /spec-kit-template-${agent} -${script} -${NEW_VERSION} .zip"
178181}
179182
180183# Determine agent list
181- ALL_AGENTS=(claude gemini copilot cursor qwen opencode windsurf codex kilocode auggie roo)
184+ ALL_AGENTS=(claude gemini copilot cursor qwen opencode windsurf codex kilocode auggie roo droid )
182185ALL_SCRIPTS=(sh ps)
183186
184187
0 commit comments