💫 Toolkit to help you get started with SDD or any other process!
Update template paths
Den Delimarsky 🌺dd57e9d44441
diff --git a/scripts/bash/update-agent-context.sh b/scripts/bash/update-agent-context.shindex a48095b99..2ad22cbbb 100644--- a/scripts/bash/update-agent-context.sh+++ b/scripts/bash/update-agent-context.sh@@ -13,7 +13,7 @@ NEW_FRAMEWORK=$(grep "^**Primary Dependencies**: " "$NEW_PLAN" 2>/dev/null | heaNEW_DB=$(grep "^**Storage**: " "$NEW_PLAN" 2>/dev/null | head -1 | sed 's/^**Storage**: //' | grep -v "N/A" | grep -v "NEEDS CLARIFICATION" || echo "")NEW_PROJECT_TYPE=$(grep "^**Project Type**: " "$NEW_PLAN" 2>/dev/null | head -1 | sed 's/^**Project Type**: //' || echo "")update_agent_file() { local target_file="$1" agent_name="$2"; echo "Updating $agent_name context file: $target_file"; local temp_file=$(mktemp); if [ ! -f "$target_file" ]; then- echo "Creating new $agent_name context file..."; if [ -f "$REPO_ROOT/templates/agent-file-template.md" ]; then cp "$REPO_ROOT/templates/agent-file-template.md" "$temp_file"; else echo "ERROR: Template not found"; return 1; fi;+ echo "Creating new $agent_name context file..."; if [ -f "$REPO_ROOT/.specify/templates/agent-file-template.md" ]; then cp "$REPO_ROOT/templates/agent-file-template.md" "$temp_file"; else echo "ERROR: Template not found"; return 1; fi;sed -i.bak "s/\[PROJECT NAME\]/$(basename $REPO_ROOT)/" "$temp_file"; sed -i.bak "s/\[DATE\]/$(date +%Y-%m-%d)/" "$temp_file"; sed -i.bak "s/\[EXTRACTED FROM ALL PLAN.MD FILES\]/- $NEW_LANG + $NEW_FRAMEWORK ($CURRENT_BRANCH)/" "$temp_file";if [[ "$NEW_PROJECT_TYPE" == *"web"* ]]; then sed -i.bak "s|\[ACTUAL STRUCTURE FROM PLANS\]|backend/\nfrontend/\ntests/|" "$temp_file"; else sed -i.bak "s|\[ACTUAL STRUCTURE FROM PLANS\]|src/\ntests/|" "$temp_file"; fi;if [[ "$NEW_LANG" == *"Python"* ]]; then COMMANDS="cd src && pytest && ruff check ."; elif [[ "$NEW_LANG" == *"Rust"* ]]; then COMMANDS="cargo test && cargo clippy"; elif [[ "$NEW_LANG" == *"JavaScript"* ]] || [[ "$NEW_LANG" == *"TypeScript"* ]]; then COMMANDS="npm test && npm run lint"; else COMMANDS="# Add commands for $NEW_LANG"; fi; sed -i.bak "s|\[ONLY COMMANDS FOR ACTIVE TECHNOLOGIES\]|$COMMANDS|" "$temp_file";diff --git a/scripts/powershell/update-agent-context.ps1 b/scripts/powershell/update-agent-context.ps1index b90fdf407..4578ed30b 100644--- a/scripts/powershell/update-agent-context.ps1+++ b/scripts/powershell/update-agent-context.ps1@@ -31,7 +31,7 @@ $newProjectType = Get-PlanValue 'Project Type'function Initialize-AgentFile($targetFile, $agentName) {if (Test-Path $targetFile) { return }- $template = Join-Path $repoRoot 'templates/agent-file-template.md'+ $template = Join-Path $repoRoot '.specify/templates/agent-file-template.md'if (-not (Test-Path $template)) { Write-Error "Template not found: $template"; return }$content = Get-Content $template -Raw$content = $content.Replace('[PROJECT NAME]', (Split-Path $repoRoot -Leaf))diff --git a/templates/commands/specify.md b/templates/commands/specify.mdindex 41b8f6f60..127923171 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: scripts/bash/create-new-feature.sh --json "{ARGS}"- ps: scripts/powershell/create-new-feature.ps1 -Json "{ARGS}"+ sh: .specify/scripts/bash/create-new-feature.sh --json "{ARGS}"+ ps: .specify/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.mdindex 29b4cd25e..89888796e 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: scripts/bash/check-task-prerequisites.sh --json- ps: scripts/powershell/check-task-prerequisites.ps1 -Json+ sh: .specify/scripts/bash/check-task-prerequisites.sh --json+ ps: .specify/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.mdindex d2945d9b3..f148530bd 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: .specify/scripts/bash/update-agent-context.sh __AGENT__+ ps: .specify/scripts/powershell/update-agent-context.ps1 -AgentType __AGENT__---# Implementation Plan: [FEATURE]@@ -178,7 +178,7 @@ ios/ or android/- Quickstart test = story validation steps5. **Update agent file incrementally** (O(1) operation):- - Run {SCRIPT} for your AI assistant+ - Run `{SCRIPT}` for your AI assistant- If exists: Add only NEW tech from current plan- Preserve manual additions between markers- Update recent changes (keep last 3)