Development
Setup
git clone https://github.com/JayFarei/opentraces
cd opentraces
python3 -m venv .venv
source .venv/bin/activate
pip install -e packages/opentraces-schema
pip install -e ".[dev]"
Optional Dependencies
pip install -e ".[release]" # Build and publish tools (build, twine)
Running Tests
make test-premerge # fast xdist lane; excludes integration/e2e, otbox, perf
make test-integration-shard # optional local shard; set SHARD_INDEX/SHARD_TOTAL
pytest tests/ -v # full local sweep
Some tests require real Claude Code trace data and are skipped by default. To run them, set the env var pointing to your project's Claude Code sessions directory:
export OPENTRACES_TEST_PROJECT_DIR=~/.claude/projects/<your-project-slug>
pytest tests/ -v
The Textual TUI and the Flask web review backend have been removed; src/opentraces/clients/ now ships only the text renderers used by the CLI. The legacy React viewer source remains under web/viewer/ but is decommissioned and out of the default build/test gate until the next dataset-scoped review UI lands. The buildable docs live under web/site/.
Layout
Core directories:
packages/opentraces-schema/- standalone schema packagepackages/opentraces-ui/- shared UI package and design systemsrc/opentraces/cli/- Click command surfacesrc/opentraces/core/- config, paths, workflow, state, review, inbox, publish flowsrc/opentraces/capture/- live parsers, importers, and hook installerssrc/opentraces/publish/- serializers and Hugging Face publishingsrc/opentraces/enrichment/- git signals, attribution, dependencies, metricssrc/opentraces/quality/- scoring and upload gatessrc/opentraces/security/- redaction and scanning pipelinesrc/opentraces/clients/- text renderers for CLI trace review (the Textual TUI and Flask web backend have been removed)web/viewer/- legacy React trace review UI source (decommissioned)web/site/- Next.js docs and marketing sitetests/- Python test suite
The CLI version lives in src/opentraces/__init__.py. The schema version lives in packages/opentraces-schema/src/opentraces_schema/version.py.
Adding A Parser
- Create a capture adapter under
src/opentraces/capture/ - Implement
SessionParserorFormatImporterfromsrc/opentraces/capture/_base.py - Register it in
src/opentraces/capture/__init__.py - Add tests under
tests/
Notes
- The current live-capture adapter is Claude Code
- Hermes currently ships as a registered
FormatImporterconsumed by dataset workflows or the schema package directly - The public 0.4 workflow is
init -> trace query -> dataset new -> dataset run -> dataset review -> dataset publish