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-context
extensions/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
Out of scope (for now)
Removing .sh/.ps1 files. They stay until py reaches full parity and adoption.
Goal
Replace the paired bash (
.sh) + PowerShell (.ps1) scripts with one Python script per occurrence, eliminating dual-maintenance and thejq/manual-JSON divergence. ThespecifyCLI is already Python, so the interpreter is guaranteed present — no new runtime dependency.Scope
~4,500 lines across ~10 script pairs:
scripts/{bash,powershell}/—common,check-prerequisites,create-new-feature,setup-plan,setup-tasksextensions/agent-context/scripts/—update-agent-contextextensions/git/scripts/—git-common,initialize-repo,auto-commit,create-new-feature-branchStrategy
Incremental. Introduce
pyas a third script type alongsidesh/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 deprecatingsh/ps.Contract to preserve
Agents parse script stdout (
FEATURE_DIR:…,AVAILABLE_DOCS:…, JSON shapes, and the--json/--paths-only/--require-tasks/--include-tasksflags). Behavioral parity is the acceptance bar for every port.Sub-issues
pyscript type & interpreter resolution #3278 — Addpyscript type & interpreter resolution (foundation)check-prerequisitesto Python with output-parity tests #3279 — PoC: portcheck-prerequisitesto Python + parity tests (depends on Addpyscript type & interpreter resolution #3278)common+create-new-feature+setup-plan+setup-tasks(depends on PoC: portcheck-prerequisitesto Python with output-parity tests #3279)agent-contextextension scripts (depends on PoC: portcheck-prerequisitesto Python with output-parity tests #3279)gitextension scripts (depends on PoC: portcheck-prerequisitesto Python with output-parity tests #3279)py:lines to command templates'scripts:frontmatter #3283 — Update templates'scripts:frontmatter to addpy:lines (depends on Port core scripts to Python (common, create-new-feature, setup-plan, setup-tasks) #3280–Port git extension scripts to Python #3282)py:lines to command templates'scripts:frontmatter #3283)Out of scope (for now)
Removing
.sh/.ps1files. They stay untilpyreaches full parity and adoption.