Skip to content

Commit de4139d

Browse files
committed
feat: Add support for Factory CLI (droid) in Specify CLI
- Updated `__init__.py` to include Factory CLI in AI_CHOICES and agent folder mapping. - Modified release scripts to package Factory CLI templates. - Enhanced agent context update scripts to manage Factory CLI files. - Updated documentation to reflect the addition of Factory CLI support.
1 parent 321edbc commit de4139d

File tree

6 files changed

+225
-199
lines changed

6 files changed

+225
-199
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,7 @@ gh release create "$VERSION" \
3838
.genreleases/spec-kit-template-auggie-ps-"$VERSION".zip \
3939
.genreleases/spec-kit-template-roo-sh-"$VERSION".zip \
4040
.genreleases/spec-kit-template-roo-ps-"$VERSION".zip \
41+
.genreleases/spec-kit-template-droid-sh-"$VERSION".zip \
42+
.genreleases/spec-kit-template-droid-ps-"$VERSION".zip \
4143
--title "Spec Kit Templates - $VERSION_NO_V" \
42-
--notes-file release_notes.md
44+
--notes-file release_notes.md

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

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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)
182185
ALL_SCRIPTS=(sh ps)
183186

184187

0 commit comments

Comments
 (0)