Skip to content

Commit 37e87c7

Browse files
committed
Hand offs with prompts
1 parent 14a574a commit 37e87c7

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,26 @@ generate_commands() {
101101
done
102102
}
103103

104+
generate_copilot_prompts() {
105+
local chatmodes_dir=$1 prompts_dir=$2
106+
mkdir -p "$prompts_dir"
107+
108+
# Generate a .prompt.md file for each .chatmode.md file
109+
for chatmode_file in "$chatmodes_dir"/speckit.*.chatmode.md; do
110+
[[ -f "$chatmode_file" ]] || continue
111+
112+
local basename=$(basename "$chatmode_file" .chatmode.md)
113+
local prompt_file="$prompts_dir/${basename}.prompt.md"
114+
115+
# Create prompt file with agent frontmatter
116+
cat > "$prompt_file" <<EOF
117+
---
118+
agent: ${basename}
119+
---
120+
EOF
121+
done
122+
}
123+
104124
build_variant() {
105125
local agent=$1 script=$2
106126
local base_dir="$GENRELEASES_DIR/sdd-${agent}-package-${script}"
@@ -148,6 +168,8 @@ build_variant() {
148168
copilot)
149169
mkdir -p "$base_dir/.github/chatmodes"
150170
generate_commands copilot chatmode.md "\$ARGUMENTS" "$base_dir/.github/chatmodes" "$script"
171+
# Generate companion prompt files
172+
generate_copilot_prompts "$base_dir/.github/chatmodes" "$base_dir/.github/prompts"
151173
# Create VS Code workspace settings
152174
mkdir -p "$base_dir/.vscode"
153175
[[ -f templates/vscode-settings.json ]] && cp templates/vscode-settings.json "$base_dir/.vscode/settings.json"

0 commit comments

Comments
 (0)