PR workflow
This project ships a repeatable workflow for taking a change from issue to merged PR. It's written down in two places that stay in sync:
- For contributors: the checklist below.
- For Claude Code: a committed skill at
.claude/skills/hermes-otel-pr/SKILL.md. Because it lives in the repo, anyone who opens this project in Claude Code gets the same workflow automatically — no per-session reminders needed. It triggers whenever you ask the agent to work on an issue or a PR here.
The recipe
- Branch off up-to-date
main(feat/…,fix/…,docs/…). Never commit features straight tomain. - Implement following the plugin's conventions:
- New hook → add to
provides_hooksinplugin.yamland register it in__init__.pyinside the forward-compatibletry/exceptloop. - Handlers in
hooks.pyaccept**kwargsand fail open (guard ontracer.is_enabled, never raise into the agent loop). - Emit dual-convention attributes (OpenInference for Phoenix +
gen_ai.*for Langfuse). Put pure logic inhelpers.pyso it's testable without OTel. - Real failures →
ERROR; benign/unknown outcomes stayOK.
- New hook → add to
- Test with the in-memory fixtures (
inmemory_otel_setup,two_exporter_pipeline,inmemory_otel_with_metrics). Keep tests deterministic — no wall-clock/perf_counter()-epoch assumptions (see Testing). - Run the exact CI checks locally before pushing:
The coverage gate is 85%.uv run --extra dev ruff check .uv run --extra dev black --check .uv run --extra dev pytest --cov=hermes_otel --cov-fail-under=85
black --checkis part of CI — don't skip it. - Update docs in the same PR (they're acceptance criteria): the relevant
pages under
website/docs/(hooks, span-attributes, span-hierarchy, limitations) plusREADME.md. Thencd website && npm run buildand confirm it's clean. - (Observability changes) verify against a real backend — capture a before/after in Phoenix or Langfuse to prove the change does what it claims.
- Open the PR with a body that starts with
Closes #<issue>, using conventional-commit titles so release-please can cut the version. Confirm CI is green (gh pr checks <n>).
See the skill file
for the fully detailed version, including the Phoenix GraphQL query and the
gh api workaround for editing PR bodies.