fix: add Python build detection, correct stale /opsx:new references#18
Open
AnnanRen wants to merge 2 commits into
Open
fix: add Python build detection, correct stale /opsx:new references#18AnnanRen wants to merge 2 commits into
AnnanRen wants to merge 2 commits into
Conversation
- Add Python project detection in build_passes() via compileall - Replace all /opsx:new references with actual comet/openspec skill names across EN and ZH skill docs Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the documentation across several SKILL.md files to replace references to /opsx:new with /comet-open and specific openspec skills, ensuring that .comet.yaml state files are correctly initialized. Additionally, it introduces a Python build guard in comet-guard.sh using compileall. Feedback was provided to clarify that compileall only performs syntax checks rather than full import resolution, and to recommend gating the Python detection logic behind project marker files like requirements.txt or pyproject.toml to avoid false positives in non-Python environments.
- Gate Python detection behind project markers (pyproject.toml, setup.py, setup.cfg, requirements.txt) to prevent false positives on non-Python projects that happen to have Python installed - Correct comment: compileall checks syntax, not external import resolution Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two fixes from real-world usage:
1. Python project build detection (scripts/comet-guard.sh)
build_passes()currently only recognizes JS (package.json), Java (pom.xml), and Rust (Cargo.toml) projects. Python projects always fail the guard check unlessbuild_commandis manually configured.This PR adds Python detection via
python -m compileall . -q, which checks both syntax and import resolution (unlikepy_compilewhich only checks syntax).2. Stale
/opsx:newreferences/opsx:newno longer exists as an installable workflow in openspec v1.3.1. Updated all references across EN and ZH docs to point to the actual skill names used by comet-open (openspec-new-change/openspec-propose).Files changed
assets/skills/comet/scripts/comet-guard.shbuild_passes()assets/skills/comet/SKILL.md/opsx:new→openspec-new-change/openspec-proposeskillassets/skills-zh/comet/SKILL.mdassets/skills/comet-build/SKILL.md/opsx:new→/comet-openassets/skills-zh/comet-build/SKILL.md🤖 Generated with Claude Code