Skip to content

docs: add CLAUDE.md orientation file and pr-workflow skill#1672

Merged
bdraco merged 1 commit into
masterfrom
expand-claude-md-and-add-pr-workflow-skill
May 15, 2026
Merged

docs: add CLAUDE.md orientation file and pr-workflow skill#1672
bdraco merged 1 commit into
masterfrom
expand-claude-md-and-add-pr-workflow-skill

Conversation

@bdraco

@bdraco bdraco commented May 15, 2026

Copy link
Copy Markdown
Member

Summary

Adds a structured CLAUDE.md orientation file for LLM contributors,
and a pr-workflow skill under .claude/skills/pr-workflow/SKILL.md
that walks through this repo's PR conventions. Shaped after the same
pair landed in esphome/aioesphomeapi#1646, adapted for this repo.

Details

The CLAUDE.md covers:

  • What the project is (pure-Python mDNS / DNS-SD per RFC 6762 / 6763,
    Cython on hot paths, pure-Python fallback supported).
  • Code style: terse single-line docstrings, comment discipline,
    ruff config (line-length = 110, target-version = "py39",
    isort profile = "black").
  • Commit / PR conventions: Conventional Commits enforced via
    commitlint + commitizen pre-commit, imperative subject, no
    Co-Authored-By trailers from automated agents.
  • Running tests (poetry run pytest --durations=20 --timeout=60 -v tests
    / make test), with notes on CodSpeed benchmarks and the CI matrix
    (CPython 3.9–3.14, 3.14t free-threaded, PyPy 3.9 / 3.10).
  • Build conventions: TO_CYTHONIZE in build_ext.py, .pxd
    discipline, SKIP_CYTHON / REQUIRE_CYTHON env vars,
    BuildExt's exception-swallowing pure-Python fallback.
  • A useful-entry-points table pointing at _core.py, _cache.py,
    _dns.py, _protocol/{incoming,outgoing}.py, _handlers/*,
    _services/*, _utils/*, const.py, asyncio.py, etc.
  • A short "things not to do" list (don't hand-edit generated .c,
    don't change cdef signatures without updating the .pxd, don't
    tighten timing constants without an RFC citation, don't break the
    3.14t free-threaded entry).

The pr-workflow skill summarises the parts that matter at PR-creation
time — branch from origin/master (this repo uses master, not main,
and there is no fork in the maintainer workflow), no PR template so
the body is free-form (with a suggested Summary / Details / Test plan
shape), Conventional Commits prefix is mandatory, .pxd discipline
for any module in TO_CYTHONIZE, pass the body via --body-file so
Markdown backticks aren't shell-escaped, and which CI jobs gate the PR.

No runtime code changes; this PR only adds contributor-facing
documentation under CLAUDE.md and .claude/.

Test plan

  • pre-commit run --files CLAUDE.md .claude/skills/pr-workflow/SKILL.md
    passes (prettier reformatted the Markdown on the first run; the
    committed version is prettier-clean).
  • Commit subject (docs: ...) is Conventional-Commits compliant
    and will pass the commitlint CI job.
  • No source / test / build files touched, so the test matrix is a
    no-op for this PR beyond confirming the lint + commitlint jobs
    go green.

Adds a structured CLAUDE.md for LLM contributors covering what the
project is, code style (terse docstrings, comment discipline, ruff
settings), Conventional Commits + PR conventions, how to run tests,
Cython build conventions and .pxd discipline, a useful-entry-points
table, and a short 'things not to do' list.

Adds a pr-workflow skill under .claude/skills/pr-workflow/SKILL.md
that summarises the parts that matter at PR-creation time: branch
from origin/master, no PR template (free-form body), Conventional
Commits prefix is enforced by commitlint + commitizen, .pxd
discipline for any module in TO_CYTHONIZE, pass the body via
--body-file so Markdown isn't shell-escaped.

No runtime code changes; this commit only adds contributor-facing
documentation under CLAUDE.md and .claude/.
@codspeed-hq

codspeed-hq Bot commented May 15, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 6 untouched benchmarks


Comparing expand-claude-md-and-add-pr-workflow-skill (48b4c00) with master (0e94c25)

Open in CodSpeed

@bdraco bdraco merged commit 8f8b4d6 into master May 15, 2026
37 checks passed
@bdraco bdraco deleted the expand-claude-md-and-add-pr-workflow-skill branch May 15, 2026 18:34
@codecov

codecov Bot commented May 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.76%. Comparing base (0e94c25) to head (48b4c00).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1672   +/-   ##
=======================================
  Coverage   99.76%   99.76%           
=======================================
  Files          33       33           
  Lines        3401     3401           
  Branches      461      461           
=======================================
  Hits         3393     3393           
  Misses          5        5           
  Partials        3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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