[Feature]: Phase out first-party shell scripts while retaining extension script preferences
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 8/100
Rechercherichtung
This is a multi-release deprecation plan, not a single change; no one should start by editing code. Read src/specify_cli/command_init.py (script choice handling), src/specify_cli/integrations/base.py (command variant selection) and src/specify_cli/shared_infra.py (which core scripts get installed), then docs/upgrade.md. Done means the design is agreed and the first sequenced PR (the execution-host contract) is scoped by a maintainer.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Problem Statement
Spec Kit maintains Bash (sh), PowerShell (ps), and Python (py) implementations of core scripts and scripts shipped with bundled extensions. Keeping these first-party implementations in parity adds maintenance, packaging, documentation, and testing work.
Specify CLI requires Python 3.11+, but installing the CLI does not guarantee Python is available where an agent later executes generated commands. Python-backed first-party commands require Python 3.11+ installed and invokable on the agent’s execution machine.
Existing projects contain generated commands and installed script copies. Updating the CLI must not silently rewrite or break those files. A project should move to Python-backed first-party commands when it is explicitly refreshed or rescaffolded, through a safe migration.
This proposal does not remove Bash or PowerShell support for external extensions. specify init --script sh|ps|py remains available; its saved value continues to signal the project’s preferred extension script variant.
Proposed Solution
Deprecate first-party sh and ps implementations across successive stable releases, then remove them in a later minor release. Keep generic extension variant selection. Track the work through these sequenced PRs, adding links and shipped versions to this issue as they land:
- PR 1 — Establish the execution-host contract. Document when Python 3.11+ is required where an agent executes first-party commands. Test interpreter resolution on Windows, macOS, and Linux, including relocated projects, isolated CLI installations, and changed or missing virtualenvs. Make failures actionable. The CLI must validate installed preset YAML and generate a small JSON representation of the template-resolution fields for project scripts to read with the Python standard library, so the agent execution environment does not need PyYAML. Preserve the behavior of unrefreshed projects. See the execution-host report.
- PR 2 — Complete first-party Python parity. Inventory all core and bundled-extension commands, including direct shell-script references. Close Python coverage gaps and test generated commands and packaged assets. Verify external extension behavior with each saved
--scriptvalue. - PR 3 — Announce deprecation. Publish scope, prerequisites, timing, and migration instructions. Warn when a choice causes a first-party shell implementation to be used—not merely because an external extension prefers one. Preserve current defaults and functionality. Ship as deprecation release A.
- PR 4 — Make Python the default for new first-party projects. Update init, bundle init, workflow init, and integration paths consistently. Continue supporting existing and explicitly selected first-party shell implementations during the notice period. Keep accepting and persisting
--script sh|ps|pyfor extensions. Ship in a subsequent stable release B. - PR 5 — Remove first-party shell implementations and migrate safely. Remove core and bundled-extension
sh/psscripts, template entries, and package assets from the distribution. New and refreshed projects must install and invoke their Python implementations regardless of the saved--scriptvalue. Leave unrefreshed projects’ installed commands and scripts usable. During refresh, install working Python scripts before replacing command invocations; do not delete an installed shell script while a remaining or customized command references it. Test successful, interrupted, and failed refreshes so a failure is reported without leaving broken command references. Retain shell support for external extensions and include release-critical migration documentation. - PR 6 — Audit remaining documentation. After PR 5 merges, correct remaining first-party shell defaults, examples, and references across guides, reference pages, and bundled-extension docs. Preserve accurate documentation for external shell extensions. This focused audit does not defer documentation needed in PRs 1–5.
Release sequence: Ship PRs 5 and 6 in a later minor release C, after releases A and B. Keep this issue open until that release is complete.
Alternatives Considered
Maintaining three first-party variants indefinitely retains parity costs. Removing them immediately gives users no migration window. Removing sh and ps globally would break external extensions and is out of scope.
Component
Specify CLI (initialization, commands)
AI Agent (if applicable)
All agents
Use Cases
A team installs Python on a remote agent machine even though Specify CLI was installed locally. An existing project upgrades the CLI and continues using its installed shell-backed commands until the project is refreshed. A project selects --script ps for an external extension while its refreshed core commands use Python.
Acceptance Criteria
- Documentation distinguishes Python required to install the CLI from Python required on the agent execution machine, and explains which first-party commands need it during migration.
- New and explicitly refreshed projects resolve installed preset templates with Python 3.11+ even when that interpreter cannot import PyYAML. Preset installation and update generate the validated JSON projection; removal cleans it up. Missing or stale generated data produces actionable refresh guidance rather than silently using outdated data, without requiring a new YAML parser or installing packages into the project. Unrefreshed projects retain their existing behavior.
- Cross-platform tests cover new and upgraded projects, relocated projects, interpreter failures, and generated commands.
- Upgrading the CLI without refreshing a project does not rewrite or break that project’s installed commands and scripts.
- Existing first-party
sh/psprojects remain functional throughout the deprecation releases and have a documented refresh path. - After removal, new and refreshed projects install and invoke first-party Python scripts with each of
--script sh,ps, andpy. - Refresh installs replacement scripts before switching command references, retains shell scripts still referenced by installed or customized commands, and reports failures without leaving commands pointing to missing scripts.
-
specify init --script sh|ps|pyremains available and persists the extension preference; external extensions, including shell-only ones, continue to work. - Refresh preserves customized files unless the user explicitly chooses an overwriting option.
-
docs/upgrade.mdand release notes describe the minor-release migration accurately. Each PR updates documentation for its own behavior; the final audit leaves no outdated first-party shell instructions. - Regression coverage is added without reducing total test collection.
Additional Context
src/specify_cli/command_init.py accepts and persists the script choice; src/specify_cli/integrations/base.py selects command variants; and src/specify_cli/shared_infra.py determines which core scripts are installed. Extension command and event paths use the saved preference. docs/installation.md documents current defaults, and docs/upgrade.md describes project upgrades.
AI Disclosure
Drafted with GitHub Copilot, powered by GPT-6 Sol, in an interactive human-supervised session (reasoning-effort setting not specified). Assistance covered repository inspection and issue drafting. No code was changed, and no PR was filed. A subsequent Copilot-assisted update incorporated the preset execution-host requirement and the reporter’s observation.
- Vorherrschende Sprache
- Python
- Sterne
- 149k
- Forks
- 13.4k
- Ø Merge
- 1 T. 5 Std.
- Gemergte PRs (30 T.)
- 223
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus github/spec-kit
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
triage-must-have
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Workflow-step verifier test fixture breaks when the checkout path contains whitespace (4 failures on macOS)Evtl. vergeben @mehdikarimi55 hat das vor 3 Tagen übernommen. Offentriage-can-wait
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
Maintainer antworten meist innerhalb von 1 Tag
-
Parity tests fail under the documented direct pytest invocation when the ambient python3 lacks PyYAML (11 failures)Evtl. vergeben @mehdikarimi55 hat das vor 3 Tagen übernommen. Offentriage-must-have
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug triage-out-of-scope
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in github/spec-kit
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 80/100
glossyio/traffic-monitor#312 ·
Maintainer antworten meist innerhalb von 1 Tag
-
local devenv exampleOffendocumentation enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
es-ude/elastic-ai.creator#1046 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
feature request
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
confident-ai/deepteam#306 ·
Maintainer antworten meist innerhalb von 1 Tag
-
SslLibrary crashes with unhandled OSError: port/proto not found on non-standard SSL portsEvtl. vergeben @himanchalkaushale hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
OWASP/Nettacker#1884 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag