Skip to content

fix: add Python build detection, correct stale /opsx:new references#18

Open
AnnanRen wants to merge 2 commits into
rpamis:masterfrom
AnnanRen:fix/python-build-and-docs
Open

fix: add Python build detection, correct stale /opsx:new references#18
AnnanRen wants to merge 2 commits into
rpamis:masterfrom
AnnanRen:fix/python-build-and-docs

Conversation

@AnnanRen
Copy link
Copy Markdown

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 unless build_command is manually configured.

This PR adds Python detection via python -m compileall . -q, which checks both syntax and import resolution (unlike py_compile which only checks syntax).

2. Stale /opsx:new references

/opsx:new no 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

File Change
assets/skills/comet/scripts/comet-guard.sh Add Python detection in build_passes()
assets/skills/comet/SKILL.md /opsx:newopenspec-new-change / openspec-propose skill
assets/skills-zh/comet/SKILL.md Same (ZH)
assets/skills/comet-build/SKILL.md /opsx:new/comet-open
assets/skills-zh/comet-build/SKILL.md Same (ZH)

🤖 Generated with Claude Code

- 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>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread assets/skills/comet/scripts/comet-guard.sh Outdated
Comment thread assets/skills/comet/scripts/comet-guard.sh Outdated
- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant