Unify workflow scripts under a single Python implementation per command
Goal
Replace the paired bash (.sh) + PowerShell (.ps1) scripts with one Python script per occurrence, eliminating dual-maintenance and the jq/manual-JSON divergence. The specify CLI is already Python, so the interpreter is guaranteed present — no new runtime dependency.
Scope
~4,500 lines across ~10 script pairs:
- Core
scripts/{bash,powershell}/—common,check-prerequisites,create-new-feature,setup-plan,setup-tasks extensions/agent-context/scripts/—update-agent-contextextensions/git/scripts/—git-common,initialize-repo,auto-commit,create-new-feature-branch
Strategy
Incremental. Introduce py as a third script type alongside sh/ps, port one script end-to-end as a proof of concept with output-parity tests, then migrate the rest. Only after parity is proven do we consider deprecating sh/ps.
Contract to preserve
Agents parse script stdout (FEATURE_DIR:…, AVAILABLE_DOCS:…, JSON shapes, and the --json / --paths-only / --require-tasks / --include-tasks flags). Behavioral parity is the acceptance bar for every port.
Sub-issues
- [x] #3278 — Add
pyscript type & interpreter resolution (foundation) - [x] #3279 — PoC: port
check-prerequisitesto Python + parity tests (depends on #3278) - [x] #3280 — Port core
common+create-new-feature+setup-plan+setup-tasks(depends on #3279) - [x] #3281 — Port
agent-contextextension scripts (depends on #3279) - [x] #3282 — Port
gitextension scripts (depends on #3279) - [x] #3283 — Update templates'
scripts:frontmatter to addpy:lines (depends on #3280–#3282) - [x] #3284 — Docs, AGENTS.md, and migration/deprecation plan (depends on #3283)
Out of scope (for now)
Removing .sh/.ps1 files. They stay until py reaches full parity and adoption.
All seven sub-issues (#3278–#3284) are closed and every in-scope deliverable is merged to main:
pyscript type + interpreter resolution in the CLI (#3278)- Python ports of core scripts (
check_prerequisites,common,create_new_feature,setup_plan,setup_tasks) with output-parity tests (#3279, #3280) - agent-context extension port (#3281) and git extension port (#3282)
py:frontmatter added to all script-invoking command templates (#3283)- Docs/migration coverage, including the
--script pytype (#3284)
Behavioral parity is covered by dedicated parity tests. Removing the .sh/.ps1 files remains intentionally out of scope until py reaches full adoption. Closing as complete.
Posted on behalf of @mnriem by GitHub Copilot (model: Claude Opus 4.8).