See which project docs your AI coding agent actually discovers — local, zero-token documentation telemetry.
Project description
🌳 trigger-tree
Gate documentation discovery in CI. Measure whether your project instructions change what agents do.
Two concrete offers:
- CI gate — immediate. A deterministic, telemetry-free structural check fails a PR with the affected file and a suggested fix.
- Instruction adherence — after a few working sessions. See whether an applicable
CLAUDE.mddirective was followed by observable behavior, and what that always-loaded instruction costs on every request.
Heat maps and the A–F documentation-health grade add longer-term discovery evidence. Everything runs locally with Python’s standard library: no cloud, analytics, network calls, or model tokens while measuring.
Gate your CI on discoverability
The gate scores repository structure only — router coverage, orphaned docs, folder entry points, and watch scope — so it works on day one without telemetry.
- uses: Hedde/trigger_tree@v1.25.1 # or: pip install trigger-tree && tt gate
Commit a baseline once with tt gate --update-baseline. A regression then fails the PR
with the exact file and fix. SARIF and GitLab Code Quality exports are available in
examples/. The gate checks wiring, not wording; see CI gate.
Does your CLAUDE.md actually work?
Injected instructions are always loaded, so another read counter cannot answer this. trigger-tree asks a narrower, measurable question: when a directive applied, did its declared probe observe the behavior it requested?
| Directive | Opportunities | Followed | Rate | Confidence |
|---|---|---|---|---|
Route telemetry questions to docs/heat-model.md |
8 | 7 | 88% | warming |
| Run checks before committing | 6 | 5 | 83% | warming |
| Preserve stdlib-only runtime code | — | — | — | unobservable |
Your always-loaded context is ~190 tokens per session. 2 directives (~34 tokens) have not been triggered in 12 sessions over 9.8 days.
The table is representative output. A committed, reviewable manifest defines each
probe; the model may propose it once, but you confirm it and deterministic local code
does every count thereafter. Unobserved means evidence was not captured; it does not
mean violated. Zero opportunities is never-triggered, a review prompt rather than
a removal recommendation — and only over sessions where that probe's capture was
actually running. Unobservable directives are split by cause: a rule with no
objectively testable condition is probably not firing for the model either, which is
advice you can act on, while a rule that needs the diff is simply outside what the event
stream can see. See instruction adherence.
Honest time to value
| Capability | When it becomes useful |
|---|---|
| CI discoverability gate | Immediately; no telemetry required |
| Instruction adherence | After at least 5 applicable opportunities, usually a few working sessions; earlier rates are provisional |
| Heat and documentation health | Directional during warm-up; strongest after roughly a month of normal work |
Quick start
Claude Code
/plugin marketplace add Hedde/trigger_tree
/plugin install trigger-tree@trigger-tree
/reload-plugins
/tt watch demo
/tt setup
/tt doctor
Work normally, then /tt insights.
Codex
codex plugin marketplace add Hedde/trigger_tree
codex plugin add trigger-tree@trigger-tree
Restart Codex and, when it shows Hooks need review, choose Trust all and
continue — Codex silently skips untrusted hooks, and non-interactive
codex exec runs never persist trust, so telemetry stays empty until the four
hooks are trusted in the TUI. Repeat the review after an upgrade that changes a
hook. Then ask Codex to run python3 "$PLUGIN_ROOT/scripts/tt-watch.py" --demo;
the bundled trigger-tree skill covers setup, doctor, and insights.
The Claude /tt skill is explicitly user-triggered. Codex installs the equivalent skill and lifecycle hooks through its plugin marketplace.
Prefer a standalone CLI — for CI, git-hook ingestion, or dashboards without a plugin?
pipx install trigger-tree (or uvx --from trigger-tree tt), then tt doctor, tt watch --demo, tt stats.
Before a project runs setup, prompt logging stores only a short hash — plugin
installs are user-wide, so no repository records prompt text without its own
explicit choice. A user-wide default in ~/.trigger-tree/config.sh (for
example TT_LOG_PROMPTS='off') tightens that for every repository at once;
/tt setup still asks per project — truncate (recommended, recognizable
200-character previews), hash, or off — and the project choice wins.
Who gets what?
| You are… | trigger-tree gives you… |
|---|---|
| Senior developer | File/folder heat, search evidence, router gaps, and prompt-level browsing |
| Tech lead | Trends, task clusters, protected-context review, and evidence-backed fixes |
| Product owner | One honest A–F docs-health signal, provisional until measurement matures |
Commands
| Command | Result |
|---|---|
/tt watch demo |
Instant synthetic dashboard; no telemetry required |
/tt setup [truncate|hash|off] |
Wire the repo and choose prompt privacy |
/tt doctor |
Check hooks, liveness, scope, privacy, and statusline wiring |
/tt status |
Current heat, lifetime reads, and untouched paths |
/tt watch |
Live mock-TUI dashboard with prompt browsing and sorting |
/tt insights |
Deterministic analysis plus a local HTML report |
/tt instructions |
Per-directive adherence, uncertainty, and always-loaded cost |
/tt suggestions |
Up to five evidence-backed routing improvements |
/tt badge |
Write a public-safe docs-health endpoint JSON |
/tt note <text> |
Add a local timeline annotation |
/tt gate |
Deterministic discoverability score; gate CI on regressions |
/tt uninstall |
Remove wiring without deleting telemetry |
Search telemetry is a conservative lower bound; see measurement boundaries.
How it works
- Hooks log shell-side to the gitignored
.trigger-tree/history.jsonl; failures never interrupt the coding session. - A deterministic aggregator computes every metric with Python’s standard library; the model interprets but never counts.
- Discovery remains model-driven: trigger-tree measures your routers and reads without injecting context or changing routing.
Where it fits
| Category | Question answered |
|---|---|
| Token/trace observability (Langfuse, Arize, W&B) | What did the model call, spend, and produce? |
| Documentation linters | Is documentation structurally or stylistically valid? |
| trigger-tree | Are project docs discoverable, which were discovered, and did declared instruction probes observe the requested behavior? |
The categories complement each other. trigger-tree does not evaluate answer quality or claim that a read caused an outcome.
Learn more
Documentation router · Instruction adherence · Dashboard · Heat model · Configuration · Privacy · Glossary · FAQ · Website · Changelog
MIT © Hedde van der Heide
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trigger_tree-1.27.2.tar.gz.
File metadata
- Download URL: trigger_tree-1.27.2.tar.gz
- Upload date:
- Size: 115.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96de8e57130278e046917f855df7a841c980fd2696157d73a580eed180c7022f
|
|
| MD5 |
87bdd467957fd4525de000832b7bfd89
|
|
| BLAKE2b-256 |
027d62db19603f7dfb7075290b4a032373a9a03163f4bf1f9454ed9b15a6f4c0
|
Provenance
The following attestation bundles were made for trigger_tree-1.27.2.tar.gz:
Publisher:
ci.yml on Hedde/trigger_tree
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trigger_tree-1.27.2.tar.gz -
Subject digest:
96de8e57130278e046917f855df7a841c980fd2696157d73a580eed180c7022f - Sigstore transparency entry: 2272950735
- Sigstore integration time:
-
Permalink:
Hedde/trigger_tree@a5b8ae9f99100f92be620be2f1cd8526df5f932e -
Branch / Tag:
refs/tags/v1.27.2 - Owner: https://github.com/Hedde
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@a5b8ae9f99100f92be620be2f1cd8526df5f932e -
Trigger Event:
push
-
Statement type:
File details
Details for the file trigger_tree-1.27.2-py3-none-any.whl.
File metadata
- Download URL: trigger_tree-1.27.2-py3-none-any.whl
- Upload date:
- Size: 101.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5ee4fb5a045341b6b09aa26800ae4ab089a8dff17d0f468561b6d398d1e0d83
|
|
| MD5 |
dc1eb5ca70922b0bb2bd453266e6eff2
|
|
| BLAKE2b-256 |
49fb2dca6927a21631d797f955dea2cb71d32fffe6e1ea408ce2a82e8478735f
|
Provenance
The following attestation bundles were made for trigger_tree-1.27.2-py3-none-any.whl:
Publisher:
ci.yml on Hedde/trigger_tree
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trigger_tree-1.27.2-py3-none-any.whl -
Subject digest:
f5ee4fb5a045341b6b09aa26800ae4ab089a8dff17d0f468561b6d398d1e0d83 - Sigstore transparency entry: 2272950833
- Sigstore integration time:
-
Permalink:
Hedde/trigger_tree@a5b8ae9f99100f92be620be2f1cd8526df5f932e -
Branch / Tag:
refs/tags/v1.27.2 - Owner: https://github.com/Hedde
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@a5b8ae9f99100f92be620be2f1cd8526df5f932e -
Trigger Event:
push
-
Statement type: