Instructions for AI agents working in this repository. Keep skills consistent, validated, and single-sourced.
Before finishing any change, run:
python3 scripts/validate_suite.pyThe script checks: unique skill names matching their directory, valid frontmatter, resolvable template/script/reference links, agreement between the suite document and the orchestrator's skill list, stdlib-only imports across all scripts, and consistency of the concern ownership map.
- Every skill is a directory named
python-<name>with aSKILL.mdentry point. SKILL.mdfrontmatter must containname(matching the directory),description, andmetadata.short-description.- Templates are files in
templates/.SKILL.mdshould reference the file, not reproduce it inline. Inline duplication drifts. - Depth material goes in
references/and is pulled on demand.SKILL.mdstays lean. - Deterministic tooling goes in
scripts/and should be dependency-free. Shared filesystem/AST helpers live once inpython-dependency-analyzer/scripts/pyast_utils.py; import them instead of duplicating them. Skills whose scripts import the shared module cross-skill ship a byte-identical bundledpyast_utils.pyfallback in their ownscripts/so a skill installed standalone still works. Regenerate those fallbacks withpython3 scripts/sync_pyast_utils.py; do not hand-edit them.validate_suite.pyenforces the stdlib-only rule, that every bundled fallback matches the canonical file, and that no framework keyword belongs to more than oneFRAMEWORK_KEYWORDScategory. - Illustrative outputs go in
examples/; never present them as real repository findings.
- One responsibility per skill. Do not let a skill silently absorb another skill's job. Overlapping specialists are split in the machine-checked concern map at
python-agent-orchestrator/references/concern-ownership.md. - Handoffs follow
templates/handoff.md: objective, scope, out of scope, files, validation, risks, definition of done. - When a skill references another skill's file, use the full relative path (for example
python-dependency-analyzer/scripts/import_graph.py). - Never commit secrets, credentials, or generated caches.
- Check
git statusandgit diffbefore editing. - Follow existing file style in the skill you touch.
- Run
validate_suite.pyafter structural changes (new skills, new templates, changed references). - Run Python scripts with
python3 -m py_compilebefore finishing. Redirect the bytecode cache outside the tree so it does not trigger the suite's cache warning:Then confirm withPYTHONPYCACHEPREFIX=/tmp/opencode/pycache python3 -m py_compile scripts/validate_suite.py
python3 scripts/validate_suite.py --strict. - Run the unit tests after changing any script in
scripts/or anypython-*/scripts/:Follow the cache rule above so test runs do not leavePYTHONPYCACHEPREFIX=/tmp/opencode/pycache python3 -m unittest discover -s tests -v
__pycache__in the tree.