用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/vamseeachanta/workspace-hub --skill repo-structure-never-tests-inside-src命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | repo-structure-never-tests-inside-src |
| description | Sub-skill of repo-structure: NEVER: tests/ inside src/ (+7). |
| version | 1.4.0 |
| category | workspace |
| type | reference |
| scripts_exempt | true |
src/digitalmodel/asset_integrity/tests/ ← WRONG
tests/asset_integrity/ ← CORRECT
Tests must never live inside the package tree. They belong in tests/<domain>/.
tests/output/ ← WRONG (committed artifacts)
tests/outputs/ ← WRONG (committed artifacts)
Add to .gitignore. These dirs hold generated test artifacts, not test code.
tests/unit/well/ ← WRONG (unit/ is a redundant wrapper)
tests/unit/metocean/ ← WRONG
tests/well/ ← CORRECT
tests/metocean/ ← CORRECT
The test root mirrors src/<pkg>/ directly. No intermediate unit/ or modules/ wrapper.
tests/phase2/ ← WRONG (unnamed, no meaning)
tests/phase3/ ← WRONG
src/worldenergydata/modules/ ← WRONG (catch-all at package level)
Every directory must map to a specific domain. Phased catch-all dirs must be migrated to domain-aligned paths before merging.
src/digitalmodel/visualization/orcaflex-dashboard/ ← WRONG (cannot be a Python package)
src/digitalmodel/visualization/orcaflex_dashboard/ ← CORRECT
All directories under src/<package>/ must be snake_case — Python cannot import kebab dirs.
worldenergydata/docs/wrk-083-export-validation-report.md ← WRONG
workspace-hub/.Codex/work-queue/done/WRK-083.md ← CORRECT
WRK deliverables live only in workspace-hub/.Codex/work-queue/. Submodule docs/ is for
reference documentation, not session work products.
tests/_archived/ ← consolidate
tests/_archived_tests/ ← consolidate
tests/legacy_tests/ ← consolidate
tests/_archive/ ← CORRECT (single archive dir)
Non-Python files in src/ create invisible coupling between package code and static assets.
They cannot be tested as Python modules and confuse linters and type-checkers.
| File type | Wrong location | Correct location |
|---|---|---|
.md documentation | src/<pkg>/bsee/docs/ | docs/domains/bsee/ |
.ipynb notebooks | src/<pkg>/specialized/gis/ | notebooks/gis/ |
.yml config | src/<pkg>/specialized/gis/arcgis.yml | config/gis/arcgis.yml |
Empty __init__.py-only dirs | anywhere in src/ | DELETE |
Exception — package resources: .sql query files and .html Jinja templates that are
loaded at runtime via importlib.resources MAY remain inside src/<pkg>/<domain>/sql/ or
src/<pkg>/<domain>/templates/. Required: they MUST be declared in pyproject.toml:
[tool.setuptools.package-data]
"worldenergydata.bsee" = ["sql/*.sql", "templates/*.html"]
Without this declaration, pip install will silently omit them.
Quick scan for violations:
# Non-Python files in src/
find src/ -not -name "*.py" -not -name "*.pyc" -not -path "*/__pycache__/*" \
-not -path "*/.git/*" -not -name "__init__.py" | grep -v ".egg-info"