You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Write a 'writing a custom detector' contributor guide #3
taintline detectors implement a tiny Detector Protocol (name + a pure run(trace) -> list[Finding]). Everything needed to write one is in the code, but there is no contributor-facing guide walking through it. This is the single highest-leverage doc for attracting agent-safety contributors.
What to do
Add docs/writing-a-detector.md covering:
the Detector Protocol and the purity/determinism contract (no LLM, no network, no clock, no RNG);
the Trace/Span/Finding/Verdict types a detector works with;
a minimal worked example (e.g. flag any tool span with status == "ERROR"), including how to register it in ALL and add a seeded fixture + test;
how --fail-on gates the exit code vs. what always runs.
Link it from the README and CONTRIBUTING.md.
Acceptance criteria
docs/writing-a-detector.md exists and a reader can implement + register a new detector from it alone.
The worked example is real, runnable code (copy-pasteable).
README and CONTRIBUTING.md link to it.
Pointers
src/taintline/model.py:90 — the Detector Protocol; Finding/Verdict above it
src/taintline/detectors/reliability.py:123 — SwallowedErrorDetector, a compact example to model the guide on
src/taintline/detectors/__init__.py — registration in ALL
docs/CONTRACT.md — the frozen type contract to reference
Hi @bamdadd! I'd love to write this contributor guide. Having recently worked on taintline (PR #14, #15, #16), I will create docs/writing-a-detector.md covering the Detector protocol, type contract, a copy-pasteable worked example (e.g. error status detector with registration & seeded tests), and --fail-on gating details. I'll also link it cleanly from README.md and CONTRIBUTING.md. Will submit a PR shortly!
Activity
IronLad123 commentedon Aug 4, 2026
Hi @bamdadd! I'd love to write this contributor guide. Having recently worked on taintline (PR #14, #15, #16), I will create
docs/writing-a-detector.mdcovering theDetectorprotocol, type contract, a copy-pasteable worked example (e.g. error status detector with registration & seeded tests), and--fail-ongating details. I'll also link it cleanly fromREADME.mdandCONTRIBUTING.md. Will submit a PR shortly!