Skip to content

Commit 5828e58

Browse files
committed
Update scripts
1 parent dd57e9d commit 5828e58

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,15 @@ build_variant() {
116116
plan_norm=$(tr -d '\r' < "$plan_tpl")
117117
# Extract script command from YAML frontmatter
118118
script_command=$(printf '%s\n' "$plan_norm" | awk -v sv="$script" '/^[[:space:]]*'"$script"':[[:space:]]*/ {sub(/^[[:space:]]*'"$script"':[[:space:]]*/, ""); print; exit}')
119-
120119
if [[ -n $script_command ]]; then
120+
# Always prefix with .specify/ for plan usage
121+
script_command=".specify/$script_command"
121122
tmp_file=$(mktemp)
122123
# Replace {SCRIPT} placeholder with the script command and __AGENT__ with agent name
123-
sed "s|{SCRIPT}|${script_command}|g" "$plan_tpl" | tr -d '\r' | sed "s|__AGENT__|${agent}|g" > "$tmp_file" && mv "$tmp_file" "$plan_tpl"
124+
substituted=$(sed "s|{SCRIPT}|${script_command}|g" "$plan_tpl" | tr -d '\r' | sed "s|__AGENT__|${agent}|g")
125+
# Strip YAML frontmatter from plan template output (keep body only)
126+
stripped=$(printf '%s\n' "$substituted" | awk 'BEGIN{fm=0;dash=0} /^---$/ {dash++; if(dash==1){fm=1; next} else if(dash==2){fm=0; next}} {if(!fm) print}')
127+
printf '%s\n' "$stripped" > "$plan_tpl"
124128
else
125129
echo "Warning: no plan-template script command found for $script in YAML frontmatter" >&2
126130
fi

templates/commands/specify.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
description: Create or update the feature specification from a natural language feature description.
33
scripts:
4-
sh: .specify/scripts/bash/create-new-feature.sh --json "{ARGS}"
5-
ps: .specify/scripts/powershell/create-new-feature.ps1 -Json "{ARGS}"
4+
sh: scripts/bash/create-new-feature.sh --json "{ARGS}"
5+
ps: scripts/powershell/create-new-feature.ps1 -Json "{ARGS}"
66
---
77

88
Given the feature description provided as an argument, do this:

templates/commands/tasks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
description: Generate an actionable, dependency-ordered tasks.md for the feature based on available design artifacts.
33
scripts:
4-
sh: .specify/scripts/bash/check-task-prerequisites.sh --json
5-
ps: .specify/scripts/powershell/check-task-prerequisites.ps1 -Json
4+
sh: scripts/bash/check-task-prerequisites.sh --json
5+
ps: scripts/powershell/check-task-prerequisites.ps1 -Json
66
---
77

88
Given the context provided as an argument, do this:

templates/plan-template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
description: "Implementation plan template for feature development"
33
scripts:
4-
sh: .specify/scripts/bash/update-agent-context.sh __AGENT__
5-
ps: .specify/scripts/powershell/update-agent-context.ps1 -AgentType __AGENT__
4+
sh: scripts/bash/update-agent-context.sh __AGENT__
5+
ps: scripts/powershell/update-agent-context.ps1 -AgentType __AGENT__
66
---
77

88
# Implementation Plan: [FEATURE]

0 commit comments

Comments
 (0)