Issue-128: Standardize python3 invocation across skill instructions and scripts - #133
Conversation
build-and-test: Python test resultsStatus: ✅ Passed Test log |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…mand strings dev_team.py's _resolve_validation_script() and BuildValidationStep.get_actions() built subprocess command strings prefixed with a bare 'python', which fails in environments (like this devcontainer) that only provide python3. Switch both to sys.executable, the repo's existing pattern for one Python process invoking another, and add a new assertion to each call site's existing test coverage confirming the emitted command starts with sys.executable.
…nd script docs Replace bare 'python' with 'python3' in every SKILL.md Bash example that invokes a script (concurrent-orchestrate, dev-spec-task-breakdown, ensure-working-branch, get-project-configuration, implement-tdd, monitor-pr, update-project-configuration, use-context-file, workflow-orchestrate, workflow-script) and in dev_team_update.py's usage docstring. Every actual .py script in the repo already shebangs #!/usr/bin/env python3; this sweep brings the illustrative invocation examples agents follow in line with that, since a bare 'python' command does not exist in every environment (confirmed missing in this devcontainer, which only has python3).
…workflow-orchestrate Per PR review, ensure python3 exists up front with a clear failure message before either orchestration loop runs its first script step, rather than relying on a script call to fail with a less obvious error.
6aae887 to
4cf19b7Compare
jodavis-claude
left a comment
There was a problem hiding this comment.
Review summary
Reviewed the diff against Issue-128's exit criteria: standardize all Python invocations on python3/sys.executable.
What's good:
- All 11
SKILL.mdfiles listed in the task brief were updated; no barepythoninvocation remains anywhere underplugins/dev-team/(verified with a repo-wide grep). dev_team.py's two generated command strings (_resolve_validation_script,BuildValidationStep.get_actions) now usesys.executable, matching the repo's existing pattern for one Python process spawning another (syswas already imported).- New unit tests (
test_validation_list_resolves_to_sys_executable_command,TestBuildValidationStepGetActions::test_run_script_command_uses_sys_executable) assert on thesys.executableprefix. Ran the full suite locally:143 passed. scripts/dev_team_update.py's usage docstring andworkflow-script/SKILL.md's example were updated for consistency.- CI (
build-and-test,devcontainer-validate,gate) all pass.
Priority 1 — Correctness / missed instance of the exact bug (blocking):
hooks/hooks.json (not touched by this PR) still invokes the SessionStart update script with a bare python:
"command": "python \"${CLAUDE_PLUGIN_ROOT}/scripts/dev_team_update.py\" --data-dir \"${CLAUDE_PLUGIN_DATA}\" --threshold-hours 4"This is real, automatically-executed configuration (not agent-facing prose) — it runs on every Claude Code SessionStart for this plugin, before any skill or agent logic runs. In an environment with only python3 on PATH (confirmed reproducible in this exact devcontainer per the task brief: which python → not found, exit 127), this hook will fail with the very "command not found: python" error the issue is about — arguably the single highest-impact remaining instance, since it fires unconditionally rather than only when a particular skill happens to be invoked.
Since this runs standalone (no controlling Python process to source sys.executable from), the fix should mirror the rest of this sweep and hardcode python3 here too:
"command": "python3 \"${CLAUDE_PLUGIN_ROOT}/scripts/dev_team_update.py\" --data-dir \"${CLAUDE_PLUGIN_DATA}\" --threshold-hours 4"Recommend adding this file to the PR before merging — it falls squarely within the issue's own scope ("Skills and scripts that shell out to Python...") even though it wasn't enumerated in the task brief's file list.
No other Priority 1-4 issues found. Documentation: no _doc_*.md mentions a python-invocation convention, so nothing there needed updating. CONTRIBUTING.md's "Supported Platforms" section was left without an explicit python3-pinning note (task brief's "Known ambiguity #5") — reasonable to leave as a non-blocking follow-up since the issue didn't require it.
Style (non-blocking): none noted.
Uh oh!
There was an error while loading. Please reload this page.
Work item
Issue-128: Skills and scripts that shell out to Python assumed a bare
pythoncommand exists, but several real environments (including this devcontainer) only providepython3. This task standardizes all agent-facing invocation examples and generated command strings onpython3/sys.executable.Changes
pythonwithpython3in all Bash invocation examples acrossplugins/dev-team/skills/*/SKILL.md(concurrent-orchestrate,dev-spec-task-breakdown,ensure-working-branch,get-project-configuration,implement-tdd,monitor-pr,update-project-configuration,use-context-file,workflow-orchestrate,workflow-script), including the top-level orchestrator launch command inworkflow-orchestrate/SKILL.md.scripts/dev_team_update.py's usage docstring for consistency.dev_team.py's two generated shell-command strings (_resolve_validation_script()andBuildValidationStep.get_actions()) to usesys.executableinstead of hardcodingpython, matching the repo's existing pattern for one Python process spawning another.sys.executablerather than a hardcodedpythonprefix.Design decisions
python3/sys.executablerather than adding apython-then-python3detection/fallback, per the issue author's own comment narrowing scope to "assume python3 is the correct runtime," and consistent with every.pyscript in the repo already declaring#!/usr/bin/env python3._spec_AgentOrchestration.md's illustrativepython dev_team.py ...examples unchanged, since it is a historical/superseded design spec rather than the authoritative runtime instructions agents follow.Closes#128
Testing completed
test_dev_team.pyfor_resolve_validation_scriptandBuildValidationStep.get_actionscontinue to pass unchanged.sys.executableinstead of a barepythonprefix.