Thanks for considering a contribution. This is a pre-alpha research project, so expect rough edges, but we merge PRs that come with tests and match the existing design.
git clone https://github.com/Hert4/trace2skill.git
cd trace2skill
pip install -e ".[dev]"
python -m pytest tests/unit -q # should print "319 passed" (or current count)
ruff check . # should print "All checks passed!"
pyright --strict trace2skill # should print "0 errors"If any of those three fail on main, that's a bug — open an issue.
- Branch from
main. - Write failing tests first when the change is behavioral. Mocks live in
trace2skill/mocks/; use them to avoid hitting real APIs in unit tests. - Make the code change. Keep source files compact — the reference adapters are ~200-280 LOC each including comments.
- Run the three checks above before pushing.
- Open a PR with a clear
whyin the description. Link the plan.md phase the work belongs to if applicable.
- Type hints everywhere.
pyright --strictgates CI. ruff check .clean. Line length 100, plusE F W I UP B SIM RUFrule families. Runruff check --fixfor auto-fixable lints.- No regex in
trace2skill/signal/. Rubric + LLM judge. (Paper §2.5 and plan §13.7.) - Adapters do not classify.
EvidenceAdapterextracts raw signals. The judge decides what they mean. (Plan §13.8.) - Tests run offline by default. Live/integration tests live under
tests/integration/and require explicit API keys — don't add them to the default suite. - Commit style. Follow the repo's existing commits: imperative subject line, blank, body explaining why. Feature commits prefixed
feat:, fixesfix:, docsdocs:, etc.
The framework's design goal is "new adapter in <300 LOC." Reference implementations:
| Axis | Reference |
|---|---|
HarnessAdapter |
trace2skill/harnesses/langchain.py (~200 LOC, lazy import pattern, unit-test-friendly _response_to_trajectory split) |
EvidenceAdapter |
trace2skill/evidence_adapters/langchain.py (~280 LOC, LangSmith-backed, feedback API error-swallowing) |
LLMProvider |
trace2skill/llm/openai_compatible.py (generic — 1 class covers 7+ providers via base_url) |
SkillFormat |
trace2skill/skill_formats/anthropic.py (SKILL.md + resources/ with junk-dir filtering) |
Typical new-adapter PR:
- Source file:
trace2skill/<axis>/<name>.py. UseTYPE_CHECKINGfor heavy optional dependencies; lazy-import inside method bodies so the module stays importable when the extra isn't installed. - Register in the axis's
__init__.py. - Add
[<name>]topyproject.toml's[project.optional-dependencies]if the adapter needs a new SDK. - Tests:
tests/unit/test_<name>_<axis>.py. Mock the external SDK (unittest.mock.MagicMock/AsyncMock+patch). Target 10+ tests covering happy path, error paths, protocol conformance viaisinstance(obj, HarnessAdapter)etc. - Example (optional):
examples/<N>_<name>_<flavor>/with aREADME.md,trace2skill.yaml, seed skill, a few tasks, and an evaluator.
See plan.md "Deferred checklist" and "Phase 5 remaining." Good starter tickets:
ClineHarnessAdapter+ClineSkillFormat(.clinerules)OpenCodeHarnessAdapter- Rubric YAMLs:
code_editing_agent,qa_agent,search_agent,spreadsheet_agent - ast-grep lint rule banning regex inside
trace2skill/signal/ examples/04_langchain_rag_agent/demo
Open a GitHub issue. For design discussions, label with design and the relevant phase.
By contributing, you agree your contributions are licensed under the MIT license (same as the repo).