fix: honor template overrides for tasks-template (#2278)#2292
fix: honor template overrides for tasks-template (#2278)#2292Nimraakram22 wants to merge 3 commits intogithub:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to bring the /tasks command into parity with /plan by adding template override resolution for tasks-template.md (overrides → presets → extensions → core) and updating docs accordingly.
Changes:
- Updated
templates/commands/tasks.mdto reference aTASKS_TEMPLATEplaceholder instead of a hardcoded path. - Added new setup scripts for resolving
tasks-template(bash + PowerShell) and wired PowerShell prerequisite checks to run them. - Updated preset documentation to state that the override stack applies to
tasks-template.mdas well.
Show a summary per file
| File | Description |
|---|---|
| templates/commands/tasks.md | Replaces hardcoded tasks template path with a placeholder reference. |
| scripts/powershell/setup-tasks.ps1 | Adds PowerShell template resolution and writes a resolved template file. |
| scripts/powershell/check-prerequisites.ps1 | Attempts to run setup scripts as part of prerequisite checking. |
| scripts/bash/setup-tasks.sh | Adds bash template resolution/export for tasks-template. |
| docs/reference/presets.md | Documents tasks-template as participating in the same override stack as plan-template. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 5/5 changed files
- Comments generated: 5
Suggested fix for #2278 / PR #2292The current PR introduces Since Overview
1.
|
mnriem
left a comment
There was a problem hiding this comment.
See comments authored together with Copilot above
- Add scripts/bash/setup-tasks.sh mirroring setup-plan.sh pattern - Add scripts/powershell/setup-tasks.ps1 mirroring setup-plan.ps1 pattern - Update tasks.md frontmatter to use dedicated setup-tasks scripts - Resolve tasks template via override stack and emit path as TASKS_TEMPLATE in JSON output - Reference resolved TASKS_TEMPLATE path in generate step instead of hardcoded path
ce75d8d to
05b1ea8
Compare
|
Hi @mnriem, thank you for the detailed feedback. I've rewritten the PR from scratch following your suggested approach: What changed:
The bash script also now fails fast with a non-zero exit and a clear error message if the template cannot be resolved, as suggested by Copilot. Please let me know if anything needs further adjustment. Thank you! |
There was a problem hiding this comment.
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 3
mnriem
left a comment
There was a problem hiding this comment.
Please address Copilot feedback
|
Thanks for the review @mnriem and Copilot. Fixed:
These were leftover artifacts from the heredoc used to write the files and would have caused a Not changed:
|
There was a problem hiding this comment.
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 2
|
Please address Copilot feedback |
|
Thanks again @mnriem and Copilot. Fixed:
|
There was a problem hiding this comment.
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
|
Please address Test & Lint errors |
This PR resolves #2278 by implementing a unified template resolution flow for the tasks command, bringing it into parity with the plan command.
Key Changes:
Removed hardcoded path in templates/commands/tasks.md in favor of {{TASKS_TEMPLATE}}.
Added setup-tasks.ps1 and setup-tasks.sh to handle the resolution priority stack (Overrides > Presets > Core).
Exported the resolved path via environment variables in the prerequisite check.
Updated docs/reference/presets.md to include tasks-template.md in the documented override stack.
Verification:
Confirmed on Windows 64-bit that local overrides in .specify/templates/overrides/tasks-template.md are correctly loaded and utilized by the AI agent.