From 5828e58f84039b41e4a188d256491f18ab96bf70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Den=20Delimarsky=20=F0=9F=8C=BA?= <53200638+localden@users.noreply.github.com> Date: Mon, 15 Sep 2025 17:44:18 -0700 Subject: [PATCH] Update scripts --- .github/workflows/scripts/create-release-packages.sh | 8 ++++++-- templates/commands/specify.md | 4 ++-- templates/commands/tasks.md | 4 ++-- templates/plan-template.md | 4 ++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/scripts/create-release-packages.sh b/.github/workflows/scripts/create-release-packages.sh index 25b9282..0ea28e0 100644 --- a/.github/workflows/scripts/create-release-packages.sh +++ b/.github/workflows/scripts/create-release-packages.sh @@ -116,11 +116,15 @@ build_variant() { plan_norm=$(tr -d '\r' < "$plan_tpl") # Extract script command from YAML frontmatter script_command=$(printf '%s\n' "$plan_norm" | awk -v sv="$script" '/^[[:space:]]*'"$script"':[[:space:]]*/ {sub(/^[[:space:]]*'"$script"':[[:space:]]*/, ""); print; exit}') - if [[ -n $script_command ]]; then + # Always prefix with .specify/ for plan usage + script_command=".specify/$script_command" tmp_file=$(mktemp) # Replace {SCRIPT} placeholder with the script command and __AGENT__ with agent name - sed "s|{SCRIPT}|${script_command}|g" "$plan_tpl" | tr -d '\r' | sed "s|__AGENT__|${agent}|g" > "$tmp_file" && mv "$tmp_file" "$plan_tpl" + substituted=$(sed "s|{SCRIPT}|${script_command}|g" "$plan_tpl" | tr -d '\r' | sed "s|__AGENT__|${agent}|g") + # Strip YAML frontmatter from plan template output (keep body only) + 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}') + printf '%s\n' "$stripped" > "$plan_tpl" else echo "Warning: no plan-template script command found for $script in YAML frontmatter" >&2 fi diff --git a/templates/commands/specify.md b/templates/commands/specify.md index 1279231..41b8f6f 100644 --- a/templates/commands/specify.md +++ b/templates/commands/specify.md @@ -1,8 +1,8 @@ --- description: Create or update the feature specification from a natural language feature description. scripts: - sh: .specify/scripts/bash/create-new-feature.sh --json "{ARGS}" - ps: .specify/scripts/powershell/create-new-feature.ps1 -Json "{ARGS}" + sh: scripts/bash/create-new-feature.sh --json "{ARGS}" + ps: scripts/powershell/create-new-feature.ps1 -Json "{ARGS}" --- Given the feature description provided as an argument, do this: diff --git a/templates/commands/tasks.md b/templates/commands/tasks.md index 8988879..29b4cd2 100644 --- a/templates/commands/tasks.md +++ b/templates/commands/tasks.md @@ -1,8 +1,8 @@ --- description: Generate an actionable, dependency-ordered tasks.md for the feature based on available design artifacts. scripts: - sh: .specify/scripts/bash/check-task-prerequisites.sh --json - ps: .specify/scripts/powershell/check-task-prerequisites.ps1 -Json + sh: scripts/bash/check-task-prerequisites.sh --json + ps: scripts/powershell/check-task-prerequisites.ps1 -Json --- Given the context provided as an argument, do this: diff --git a/templates/plan-template.md b/templates/plan-template.md index f148530..e88aa1e 100644 --- a/templates/plan-template.md +++ b/templates/plan-template.md @@ -1,8 +1,8 @@ --- description: "Implementation plan template for feature development" scripts: - sh: .specify/scripts/bash/update-agent-context.sh __AGENT__ - ps: .specify/scripts/powershell/update-agent-context.ps1 -AgentType __AGENT__ + sh: scripts/bash/update-agent-context.sh __AGENT__ + ps: scripts/powershell/update-agent-context.ps1 -AgentType __AGENT__ --- # Implementation Plan: [FEATURE]