-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
599 lines (575 loc) · 37.3 KB
/
Copy pathindex.html
File metadata and controls
599 lines (575 loc) · 37.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>trigger-tree — gate docs and measure instruction adherence</title>
<meta name="description" content="Gate documentation discovery in CI and measure whether CLAUDE.md directives change observable agent behavior. Local, deterministic, and zero-token.">
<meta property="og:type" content="website">
<meta property="og:title" content="trigger-tree — gate docs and measure instruction adherence">
<meta property="og:description" content="A telemetry-free CI gate plus local, deterministic evidence for project-instruction adherence.">
<meta property="og:image" content="https://hedde.github.io/trigger_tree/assets/social-card.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:url" content="https://hedde.github.io/trigger_tree/">
<meta name="twitter:card" content="summary_large_image">
<link rel="canonical" href="https://hedde.github.io/trigger_tree/">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "trigger-tree",
"description": "A telemetry-free documentation-discovery CI gate plus local, deterministic measurement of project-instruction adherence, heat, and health.",
"url": "https://hedde.github.io/trigger_tree/",
"applicationCategory": "DeveloperApplication",
"operatingSystem": "macOS, Linux, Windows",
"license": "https://github.com/Hedde/trigger_tree/blob/main/LICENSE",
"codeRepository": "https://github.com/Hedde/trigger_tree",
"offers": {"@type": "Offer", "price": "0", "priceCurrency": "USD"}
}
</script>
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🌳</text></svg>">
<style>
/* Pin the report palette's light variant for a consistent marketing page. */
:root {
color-scheme:light;
--bg:#f7faf7; --panel:#fff; --line:#d7e0d8; --fg:#172019; --muted:#58645b;
--cold:#305faa; --cool:#087f80; --green:#477b24; --bright:#315c18;
--amber:#9a6300; --hot:#b52323; --dim:#7a867d;
}
* { box-sizing:border-box; margin:0; }
html { scroll-behavior:smooth; }
body { background:var(--bg); color:var(--fg); font:16px/1.6 -apple-system,'Segoe UI',sans-serif;
touch-action:pan-y pinch-zoom; }
a { color:var(--green); }
.wrap { max-width:960px; margin:0 auto; padding:3rem 1.25rem; }
.hero { text-align:center; margin-bottom:2.5rem; }
.hero-logo { display:block; width:160px; height:160px; object-fit:contain; margin:0 auto .6rem; }
.hero h1 { font-size:2.4rem; letter-spacing:-.02em; }
.hero p.tag { color:var(--muted); font-size:1.15rem; max-width:640px; margin:.75rem auto 0; }
.hero .creds { margin-top:1rem; color:var(--green); font-size:.95rem; }
.section-nav { display:flex; flex-wrap:wrap; justify-content:center; gap:.4rem 1rem; margin:1rem auto 2rem; }
.section-nav a { color:var(--muted); font-size:.9rem; text-underline-offset:.2rem; }
.offers { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; margin:2rem 0; }
.offer { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:1.25rem; }
.offer p { color:var(--muted); }
.term { background:var(--panel); border:1px solid var(--line); border-radius:10px;
box-shadow:0 20px 60px rgba(0,0,0,.5); overflow:hidden; margin:2rem auto; max-width:720px; }
.term-bar { display:flex; gap:.45rem; padding:.6rem .9rem; border-bottom:1px solid var(--line); align-items:center; }
.dot { width:.75rem; height:.75rem; border-radius:50%; }
.term-bar span.title { color:var(--muted); font-size:.8rem; margin-left:.6rem; font-family:ui-monospace,Menlo,monospace; }
pre#screen { font:13px/1.5 ui-monospace,Menlo,Consolas,monospace; padding:1rem 1.2rem; min-height:340px;
white-space:pre; overflow-x:auto; }
.f { color:var(--muted); } .dead { color:var(--dim); }
.cold { color:var(--cold); } .cool { color:var(--cool); } .active { color:var(--green); }
.warm { color:var(--amber); } .hot { color:var(--hot); }
.pulse { color:#fff !important; text-shadow:0 0 12px var(--bright); transition:none; }
.fade { transition:color 1.2s ease, text-shadow 1.2s ease; }
.spin { color:var(--green); } .tick { color:var(--muted); }
.hint { color:var(--dim); font-size:.75rem; padding:0 1.2rem 1rem; font-family:ui-monospace,monospace; }
.adherence-demo { border-top:1px solid var(--line); padding:.8rem 1.2rem 1rem;
font:12px/1.55 ui-monospace,Menlo,Consolas,monospace; overflow-x:auto; }
.adherence-demo b { color:var(--bright); }
.grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; margin:3rem 0; }
.card { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:1.25rem; }
.card h3 { margin-bottom:.4rem; font-size:1.05rem; }
.card p { color:var(--muted); font-size:.95rem; }
h2 { margin:3.5rem 0 1.15rem; font-size:1.4rem; line-height:1.25; letter-spacing:-.012em; }
code, pre.block { font-family:ui-monospace,Menlo,Consolas,monospace; }
pre.block { background:var(--panel); border:1px solid var(--line); border-radius:8px;
padding:1rem 1.2rem; overflow-x:auto; font-size:.9rem; line-height:1.7; }
.install-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.install-card { background:var(--panel); border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.install-card h3 { padding:1rem 1.2rem .2rem; }
.install-card > p { color:var(--muted); padding:0 1.2rem 1rem; font-size:.9rem; }
.install-card pre.block { border:0; border-top:1px solid var(--line); border-radius:0; }
.install-note { color:var(--muted); margin-top:1rem; font-size:.9rem; }
.install-card { position:relative; }
.copy-btn { position:absolute; top:.85rem; right:.9rem; background:transparent; color:var(--muted);
border:1px solid var(--line); border-radius:6px; font:.75rem ui-monospace,monospace;
padding:.25rem .55rem; cursor:pointer; }
.copy-btn:hover { color:var(--fg); border-color:var(--muted); }
.pill { display:inline-flex; font:.8rem ui-monospace,Menlo,monospace; border-radius:4px; overflow:hidden; margin:.35rem 0; }
.pill-label { background:#3a4450; color:#fff; padding:.28rem .6rem; }
.pill-value { background:var(--green); color:#0c1014; padding:.28rem .6rem; font-weight:700; }
.health-story { display:grid; grid-template-columns:8rem 1fr; gap:1.5rem; align-items:start;
background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:1.4rem; }
.health-grade { font:700 1.35rem/1.2 ui-monospace,Menlo,monospace; color:var(--green); text-align:left; padding-top:.15rem; }
.drivers { color:var(--muted); margin:.45rem 0 0 1.1rem; }
.compare { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); overflow:hidden;
background:var(--panel); border:1px solid var(--line); border-radius:10px; }
.compare div { min-width:0; padding:1.25rem 1.35rem 1.35rem; }
.compare div + div { border-left:1px solid var(--line); }
.compare b { display:block; line-height:1.35; }
.compare p { color:var(--muted); font-size:.92rem; line-height:1.55; margin-top:.45rem; }
table { border-collapse:collapse; width:100%; }
th,td { text-align:left; padding:.5rem .7rem; border-bottom:1px solid var(--line); font-size:.95rem; }
th { color:var(--muted); } td code { color:var(--bright); }
.table-wrap { overflow-x:auto; max-width:100%; }
.bubble { position:fixed; background:var(--panel); border:1px solid var(--green); color:var(--fg);
border-radius:10px; padding:.6rem .9rem; font-size:.85rem; max-width:260px; z-index:9;
box-shadow:0 8px 30px rgba(0,0,0,.6); pointer-events:none; opacity:0; transition:opacity .3s; }
footer { text-align:center; color:var(--muted); margin-top:4rem; font-size:.9rem; }
@media (max-width:850px) { .grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:580px) {
.wrap { padding:2rem 1rem; }
.grid, .install-grid, .health-story, .compare, .offers { grid-template-columns:1fr; }
.compare div { padding:1.1rem 1.2rem 1.2rem; }
.compare div + div { border-left:0; border-top:1px solid var(--line); }
.health-story { gap:.75rem; padding:1.2rem; }
h2 { margin-top:3rem; }
}
@media (prefers-reduced-motion: reduce) { .pulse { text-shadow:none; } }
.term { box-shadow:0 16px 45px rgba(22,40,25,.14); }
.pulse { color:#111 !important; }
.page-frame { position:relative; min-height:100vh; overflow:hidden; }
.wrap { position:relative; z-index:2; }
.corner-art {
position:absolute; z-index:0; display:block; width:min(42vw,650px); height:auto;
pointer-events:none;
}
.corner-art.tl { top:0; left:0; }
.corner-art.tr { top:0; right:0; }
.corner-art.bl { bottom:0; left:0; }
.corner-art.br { right:0; bottom:0; }
@media (min-width:581px) {
.wrap { padding-bottom:8rem; }
.corner-art.bl, .corner-art.br { bottom:-4rem; width:min(35vw,540px); }
}
@media (max-width:580px) {
html { scroll-behavior:auto; }
.corner-art { width:62vw; }
.corner-art.tl, .corner-art.bl { left:-8vw; }
.corner-art.tr, .corner-art.br { right:-8vw; }
.corner-art.bl, .corner-art.br { bottom:-14vw; }
.hero { padding-top:3.5rem; }
footer { padding-bottom:4rem; }
}
</style>
</head>
<body>
<div class="page-frame">
<img class="corner-art tl" src="assets/branch-tl.webp" alt="" width="768" height="512" decoding="async">
<img class="corner-art tr" src="assets/branch-tr.webp" alt="" width="768" height="512" decoding="async">
<div class="wrap">
<div class="hero">
<img class="hero-logo" src="assets/trigger-tree-logo.png" alt="trigger-tree documentation discovery logo" width="160" height="160" fetchpriority="high">
<h1>🌳 trigger-tree</h1>
<p class="tag"><b>Gate documentation discovery in CI.</b><br>
Measure whether the CLAUDE.md you pay for on every request changes observable behavior.</p>
<p class="creds">100% local · zero model tokens · no cloud, no analytics vendors</p>
</div>
<nav class="section-nav" aria-label="Page sections">
<a href="#offers">What it does</a><a href="#gate">CI gate</a>
<a href="#adherence">Instruction adherence</a><a href="#install">Install</a>
<a href="#use">Use it</a><a href="#faq">FAQ</a>
</nav>
<section class="offers" id="offers" aria-label="Primary capabilities">
<div class="offer"><h2 style="margin:0 0 .35rem">CI gate · day one</h2>
<p>Deterministic and telemetry-free. A regression fails the PR with the affected file and a suggested fix.</p></div>
<div class="offer"><h2 style="margin:0 0 .35rem">Instruction adherence · a few sessions</h2>
<p>Per directive: opportunities, followed evidence, uncertainty, and the recurring cost of always-loaded context.</p></div>
</section>
<div class="term" id="term">
<div class="term-bar">
<span class="dot" style="background:#ff5f56"></span>
<span class="dot" style="background:#ffbd2e"></span>
<span class="dot" style="background:#27c93f"></span>
<span class="title">tt watch — live doc-discovery</span>
</div>
<pre id="screen"></pre>
<div class="adherence-demo" aria-label="Example instruction adherence panel">
<b>instruction adherence</b> · 2 observable · 1 unobservable<br>
route-telemetry 7/8 followed · 88% · warming<br>
checks-before-commit 5/6 followed · 83% · warming<br>
<span class="f">~190 tokens/session · unobserved ≠ violated</span>
</div>
<div class="hint">every flash is a real doc read rippling up the tree · ← older prompts · → newer prompts · <span id="hintx">this demo is the plugin</span></div>
</div>
<p class="install-note" style="max-width:720px;margin:0 auto 2.5rem;text-align:center">The demo above is a faithful mock.
This is the real thing — an actual terminal recording of <code>tt watch --demo</code>:</p>
<div class="term">
<div class="term-bar">
<span class="dot" style="background:#ff5f56"></span>
<span class="dot" style="background:#ffbd2e"></span>
<span class="dot" style="background:#27c93f"></span>
<span class="title">real footage — tt watch --demo</span>
</div>
<video id="demo-video" src="docs/assets/demo.mp4" preload="none" loop muted playsinline style="display:block;width:100%"></video>
</div>
<p class="install-note" style="text-align:center;margin-top:.6rem">The dashboard's written counterpart:
<a href="demo-report.html">view an example insights report</a> — same synthetic demo data, full format.</p>
<div class="grid">
<div class="card"><h3>🔥 Heat & cold maps</h3>
<p>Color shows time since the last read; heat bars retain 30-day decayed attention volume and lifetime reads stay visible. Focus keeps the most recently consulted docs first; insights adds exact 7/30/90-day windows. Captures <code>rg</code>/<code>grep</code>/<code>find</code> and expanded Bash reads.</p></div>
<div class="card"><h3>📈 Proof, not vibes</h3>
<p><code>/tt suggestions</code> proposes fixes with evidence. <code>/tt note</code> marks the change; the trend shows whether it worked.</p></div>
<div class="card"><h3>🔒 Local by design</h3>
<p>Telemetry stays local and gitignored. Before setup, prompts are hashes and new adherence capture is off. Setup makes each privacy choice explicit. Stdlib only, zero network calls.</p></div>
<div class="card"><h3>🅰️ A grade your PO gets</h3>
<p>Coverage, verified folder-router reachability, and search concentration distilled into one <b>documentation health</b> score — trackable sprint over sprint.</p></div>
<div class="card"><h3>⚡ Zero model tokens</h3>
<p>Hooks run shell-side in milliseconds. Measuring costs nothing — not in tokens, not in latency, not in context.</p></div>
<div class="card"><h3>🤝 Claude Code · Codex</h3>
<p>Native lifecycle hooks feed one git-root dataset on both agents. Python CI covers macOS, Linux, Windows and Python 3.10–3.14; native Windows hook launch uses Claude's documented exec form but is not exercised end-to-end in CI.</p></div>
</div>
<h2 id="gate">Gate your CI on discoverability</h2>
<p class="install-note" style="max-width:720px;margin-top:0">The structural gate works
immediately: router coverage, orphaned docs, folder entry points, and watch scope.
It needs no telemetry and nothing leaves your runner.</p>
<pre class="block">- uses: Hedde/trigger_tree@v1.25.1 # GitHub Actions
# GitLab CI: pip install trigger-tree
# tt gate --code-quality gl-code-quality-report.json</pre>
<p class="install-note">Commit a baseline once (<code>tt gate --update-baseline</code>).
A PR that makes docs harder to discover fails with the exact file and fix. The gate
checks wiring, not whether an instruction changed behavior. Discoverable never means discovered;
behavior is proven by telemetry, not by the gate.</p>
<span class="pill" title="this repository's committed gate baseline"><span class="pill-label">docs discoverability</span><span class="pill-value">100%</span></span>
<h2 id="adherence">Does your CLAUDE.md actually work?</h2>
<p style="color:var(--muted);max-width:760px">Injected instructions are already loaded,
so trigger-tree measures a narrower question: when a user-confirmed directive applied,
did its deterministic probe observe the requested behavior?</p>
<div class="table-wrap">
<table aria-label="Representative instruction adherence results">
<tr><th>Directive</th><th>Opportunities</th><th>Followed</th><th>Rate</th><th>Confidence</th></tr>
<tr><td>Route telemetry questions</td><td>8</td><td>7</td><td>88%</td><td>warming</td></tr>
<tr><td>Run checks before committing</td><td>6</td><td>5</td><td>83%</td><td>warming</td></tr>
<tr><td>Preserve stdlib-only runtime</td><td>—</td><td>—</td><td>—</td><td>unobservable</td></tr>
</table>
</div>
<p class="install-note"><b>Your always-loaded context is ~190 tokens per session.</b>
2 directives (~34 tokens) have not been triggered in the 12 sessions where their
capture was active (of 12 recorded over 9.8 days).</p>
<p class="install-note">Subagent personas are measured the same way. Every definition
under <code>.claude/agents/</code> puts its name and description in the system prompt on
every request, and its body only when the agent runs, so the two costs are reported
separately. A persona you never invoke is recurring cost just like an untriggered rule.
Only the persona name is recorded, never the task given to it.</p>
<p class="install-note"><b>Unobserved means evidence was not captured; it does not mean
violated.</b> Zero opportunities is never-triggered, not 0% — and only counted over
sessions where that probe was actually being captured. Rates below five usable
opportunities are provisional. Unobservable directives are split by cause: no testable
condition is advice you can act on, needing the diff is our boundary. Measurement is
deterministic and zero-token; only model-assisted manifest authoring uses tokens, and
the user confirms every probe.</p>
<h2>Honest time to value</h2>
<div class="compare">
<div><b>CI gate</b><p>Immediate. No telemetry required.</p></div>
<div><b>Instruction adherence</b><p>After several applicable opportunities—usually a few working sessions.</p></div>
<div><b>Heat and health</b><p>Directional during warm-up; strongest after roughly a month.</p></div>
</div>
<h2>Why this matters</h2>
<p style="color:var(--muted);max-width:720px">In AI-assisted development, documentation is the steering wheel:
it tells the assistant how <i>your</i> team builds software. But <b style="color:var(--fg)">a rule that is never
read protects nothing</b> — an unread guardrail fails silently, and you only notice when the AI "ignores" a
convention it simply never found. trigger-tree measures what actually gets read, flags what never does, and
proves whether your fixes worked. Documentation becomes monitored infrastructure instead of a hopeful artifact.</p>
<p style="color:var(--muted);max-width:720px">And this metric exists nowhere else: agent observability platforms measure
tokens and traces — <b style="color:var(--fg)">none measure which of your docs the assistant actually read</b>.
Anthropic's own guidance says to keep CLAUDE.md lean; trigger-tree provides evidence for what to review,
what to protect or reroute, and what to rescue.</p>
<h2>One signal, with its evidence attached</h2>
<section class="health-story" aria-label="Example documentation health grade">
<div class="health-grade">measuring…</div>
<div><b>This repository’s current local snapshot · cold-start</b>
<ul class="drivers"><li>1 of 11 evaluable docs consulted</li><li>0 unreferenced router gaps</li><li>no distributed-search concentration yet</li></ul>
<p class="install-note">The eventual grade is trackable sprint over sprint. Until the evidence is mature, the public badge deliberately hides the provisional C (64).</p>
</div>
</section>
<h2>Different evidence, different questions</h2>
<div class="compare">
<div><b>Token/trace observability</b><p>What did the model call, spend, and produce?</p></div>
<div><b>Documentation linters</b><p>Is the documentation structurally or stylistically valid?</p></div>
<div><b>trigger-tree</b><p>Which local project docs did the coding assistant discover?</p></div>
</div>
<h2 id="install">Install</h2>
<div class="install-grid">
<section class="install-card">
<h3>Claude Code</h3>
<p>Slash commands, Claude hooks, and optional Claude statusline.</p>
<pre class="block">/plugin marketplace add Hedde/trigger_tree
/plugin install trigger-tree@trigger-tree
/tt setup # local 200-character previews; choose hash or off
/tt doctor</pre>
</section>
<section class="install-card">
<h3>OpenAI Codex</h3>
<p>Codex lifecycle hooks and natural-language workflows. Codex's built-in <code>/statusline</code> is separate.</p>
<pre class="block">codex plugin marketplace add Hedde/trigger_tree
codex plugin add trigger-tree@trigger-tree
# restart, then trust the four hooks in the TUI
# (untrusted hooks are skipped silently;
# re-review after upgrades)</pre>
</section>
</div>
<p class="install-note"><b>Where it appears:</b> this GitHub marketplace installs immediately under your configured
marketplace/Installed plugins. It will appear under OpenAI Curated only after a separate OpenAI submission,
review, approval, and publish step. Prefer a standalone CLI without a plugin? <code>pipx install trigger-tree</code> (or <code>uvx --from trigger-tree tt</code>) gives the same local <code>tt</code> toolkit.</p>
<h2 id="use">Use it</h2>
<p class="install-note">Claude Code uses the <code>/tt</code> commands below. Codex uses
<code>@trigger-tree</code>—either with the same word, as in <code>@trigger-tree watch</code>,
or followed by plain language such as “Show trigger-tree status.” Both work.</p>
<table>
<tr><th>Command</th><th>Does</th></tr>
<tr><td><code>/tt status</code></td><td>Snapshot: reads, hot files, untouched paths</td></tr>
<tr><td><code>/tt watch</code></td><td>This dashboard, live, in your terminal</td></tr>
<tr><td><code>/tt insights</code></td><td>Heat/cold map, router reachability, search patterns + HTML</td></tr>
<tr><td><code>/tt instructions</code></td><td>Per-directive opportunities, followed evidence, uncertainty, and cost</td></tr>
<tr><td><code>/tt suggestions</code></td><td>Max 5 evidence-backed router fixes</td></tr>
<tr><td><code>/tt badge</code></td><td>Write a public-safe docs-health endpoint JSON</td></tr>
<tr><td><code>/tt note</code></td><td>Annotate router changes on the timeline</td></tr>
<tr><td><code>/tt doctor</code></td><td>Check hook liveness, watch coverage, privacy, and telemetry</td></tr>
<tr><td><code>/tt setup [truncate|hash|off]</code></td><td>Wire the project, report watch coverage, and choose prompt privacy</td></tr>
<tr><td><code>/tt gate</code></td><td>Deterministic discoverability score; gate CI on regressions</td></tr>
<tr><td><code>/tt uninstall</code></td><td>Remove statusline wiring while preserving telemetry for explicit deletion</td></tr>
</table>
<h2 id="faq">Common questions</h2>
<h3 style="margin:1.2rem 0 .3rem;font-size:1.05rem">Can it tell me whether my CLAUDE.md works?</h3>
<p style="color:var(--muted);max-width:720px">It cannot prove understanding or causation.
It can show whether a user-confirmed, deterministic probe observed the requested
behavior when a directive applied. Run <code>/tt instructions --init</code>, review and
commit the manifest, then <code>/tt instructions</code>. Capture-disabled probes are
excluded, and unobserved never means violated.</p>
<h3 style="margin:1.2rem 0 .3rem;font-size:1.05rem">Why does my coding agent ignore our conventions?</h3>
<p style="color:var(--muted);max-width:720px">Often it never found the doc that states them — an unread guardrail fails
silently. The heat/cold map shows which conventions were actually consulted, and <code>/tt suggestions</code> proposes
router links for docs with evidence they are being missed. It reports discovery, not understanding.</p>
<h3 style="margin:1.2rem 0 .3rem;font-size:1.05rem">How can I measure documentation usage without sending data anywhere?</h3>
<p style="color:var(--muted);max-width:720px">The hooks log paths and metadata to a gitignored file inside your own
repository. No cloud, no analytics, no model tokens — <code>/tt doctor</code> shows exactly what is wired and recorded.</p>
<footer>
<p><a href="https://github.com/Hedde/trigger_tree">GitHub</a> ·
<a href="https://github.com/Hedde/trigger_tree#readme">Docs</a> ·
<a href="PRIVACY.html">Privacy</a> ·
<a href="https://github.com/Hedde/trigger_tree/blob/main/CHANGELOG.md">Changelog</a></p>
<p>Measured, not guessed. · MIT · Hedde van der Heide</p>
<p>This site is static, dependency-free, and has no analytics — the same privacy stance as the plugin.</p>
</footer>
</div>
<img class="corner-art bl" src="assets/branch-bl.webp" alt="" width="768" height="512" loading="lazy" decoding="async">
<img class="corner-art br" src="assets/branch-br.webp" alt="" width="768" height="512" loading="lazy" decoding="async">
</div>
<div class="bubble" id="bubble"></div>
<script>
(function () {
const demoVideo = document.getElementById("demo-video");
if ("IntersectionObserver" in window) {
const videoObserver = new IntersectionObserver((entries) => {
for (const entry of entries) {
if (entry.isIntersecting) demoVideo.play().catch(() => {});
else demoVideo.pause();
}
}, { rootMargin: "240px 0px" });
videoObserver.observe(demoVideo);
} else {
demoVideo.preload = "metadata";
}
const reduced = matchMedia("(prefers-reduced-motion: reduce)").matches;
const SPIN = "⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏";
const DAY_MS = 86400000, demoNow = Date.now();
const tree = [
{ folder: "docs/design/", files: [
{ name: "principles.md", n: 12, h: 3.2, last: demoNow - 2 * DAY_MS }, { name: "ui-patterns.md", n: 17, h: 6.8, last: demoNow - .4 * DAY_MS }, { name: "accessibility.md", n: 3, h: 0.7, last: demoNow - 12 * DAY_MS }]},
{ folder: "docs/database/", files: [
{ name: "migrations.md", n: 4, h: 1.4, last: demoNow - 4 * DAY_MS }, { name: "principles.md", n: 6, h: 2.1, last: demoNow - 26 * DAY_MS }]},
{ folder: "docs/operations/runbooks/", files: [
{ name: "rollback.md", n: 2, h: 0.2, last: demoNow - 45 * DAY_MS }]},
{ folder: "docs/legacy/", files: [
{ name: "old-api.md", n: 0, h: 0, last: 0, dead: true }]},
];
let reads = 44, scans = 3, ticker = [], spin = 0, mode = "live", sortMode = "focus", nameDesc = false, hunted = false, revived = false, currentPulse = null;
const folderSearches = {};
let buckets = [], browseIdx = null;
let settingsOpen = false, settingsMsg = "", promptMode = "truncate", tipIdx = 0;
const TIPS = [
"Review agent instructions after architecture or workflow changes.",
"Keep the root router under 200 lines; pointers over inlining.",
"Untouched never means obsolete — only mature datasets may judge.",
];
function promptLabel(text) {
if (promptMode === "off") return "— prompt hidden —";
if (promptMode === "hash") {
let h = 0;
for (const ch of text) h = (h * 31 + ch.charCodeAt(0)) % 0xffffff;
return "#" + h.toString(16).padStart(6, "0");
}
return text;
}
const PROMPTS = ["style the buttons on the settings page", "add a tenant_id migration", "why is the deploy failing?", "summarize our ADRs"];
const screen = document.getElementById("screen"), bubble = document.getElementById("bubble");
function temperature(last, touched) {
if (!last) return touched ? "cold" : "dead";
const age = Math.max(0, Date.now() - last) / DAY_MS;
return age > 30 ? "cold" : age > 7 ? "cool" : age > 3 ? "active" : age > 1 ? "warm" : "hot";
}
function bar(n) {
if (!n) return "·····";
const filled = Math.max(1, Math.round(5 * Math.log1p(n) / Math.log1p(8)));
return "█".repeat(Math.min(5, filled)) + "·".repeat(Math.max(0, 5 - filled));
}
function render() {
const pulsePath = currentPulse;
const b = browseIdx !== null ? buckets[browseIdx] : null;
if (settingsOpen) {
screen.innerHTML =
`<span class="spin"> ${SPIN[spin % SPIN.length]} </span><b>trigger-tree</b><span class="f"> prompt privacy — stored locally, gitignored</span>\n\n` +
` <span class="f">current:</span> <span class="active">${promptMode}</span>\n\n` +
` <span class="f">[1]</span> truncate <span class="f">— recognizable first 200 characters</span>\n` +
` <span class="f">[2]</span> hash <span class="f">— stable fingerprint, no prompt text</span>\n` +
` <span class="f">[3]</span> off <span class="f">— event marker only</span>\n\n` +
` <span class="f">[s] back</span>\n` +
(settingsMsg ? `<span class="warm"> ${settingsMsg}</span>\n` : "");
return;
}
let out = `<span class="spin"> ${SPIN[spin % SPIN.length]} </span><b>trigger-tree</b><span class="f"> your-project · live doc-discovery</span>\n`;
if (b) out += ` <span class="warm">▸ prompt ${browseIdx + 1}/${buckets.length}</span> "${b.text}" <span class="f">· ${b.reads} reads</span>\n\n`;
else out += `\n`;
if (!b) out += ` <span class="cool">${"CLAUDE.md".padEnd(25)}</span><span class="f">injected · always loaded</span>\n`;
const groups = [...tree];
const folderHeat = g => g.files.reduce((sum, f) => sum + f.h, 0);
const folderLast = g => Math.max(0, ...g.files.map(f => f.last || 0));
if (!b && sortMode === "hot") groups.sort((a, z) => folderHeat(z) - folderHeat(a));
if (!b && sortMode === "cold") groups.sort((a, z) => folderLast(a) - folderLast(z));
if (!b && sortMode === "name") groups.sort((a, z) => (nameDesc ? -1 : 1) * a.folder.localeCompare(z.folder));
if (!b && sortMode === "focus") groups.sort((a, z) => folderLast(z) - folderLast(a));
for (const g of groups) {
const searchCount = b ? (b.searches[g.folder] || 0) : (folderSearches[g.folder] || 0);
if (b && !searchCount && !g.files.some(f => b.files[g.folder + f.name])) continue;
const folderPulse = pulsePath && pulsePath.startsWith(g.folder) ? "pulse" : `${temperature(b ? b.at : folderLast(g), b ? g.files.some(f => b.files[g.folder + f.name]) : g.files.some(f => f.n))} fade`;
const unread = g.files.filter(f => !(b ? b.files[g.folder + f.name] : f.n)).length;
const status = `${searchCount ? ` · 🔍 ${searchCount} search${searchCount === 1 ? "" : "es"}` : ""}${unread ? ` · ${unread} unread` : ""}`;
out += ` <span class="${folderPulse}">${g.folder}</span><span class="f">${status}</span>\n`;
let shown = b ? g.files.filter(f => b.files[g.folder + f.name]) : [...g.files];
if (!b && sortMode === "hot") shown.sort((a, z) => z.h - a.h);
if (!b && sortMode === "cold") shown.sort((a, z) => (a.last || 0) - (z.last || 0));
if (!b && sortMode === "name") shown.sort((a, z) => (nameDesc ? -1 : 1) * a.name.localeCompare(z.name));
if (!b && sortMode === "focus") shown.sort((a, z) => (z.last || 0) - (a.last || 0));
shown.forEach((f, i) => {
const n = b ? b.files[g.folder + f.name] : f.n;
const branch = i === shown.length - 1 ? "└─" : "├─";
const currentHeat = b ? n : f.h;
const cls = pulsePath === g.folder + f.name ? "pulse" : `${temperature(b ? b.at : f.last, n > 0)} fade`;
const id = f.dead ? ' id="deadnode" style="cursor:pointer;pointer-events:auto"' : "";
const stat = b ? `${bar(n)} ${String(n).padStart(3)}` : `${bar(currentHeat)} h${currentHeat.toFixed(1).padStart(4)} · ${n}×`;
out += ` <span class="f">${branch}</span> <span class="${cls}"${id}>${f.name.padEnd(22)}${stat}</span>\n`;
});
}
out += `\n <b>${buckets.length ? buckets.length : 0}</b><span class="f"> prompts · </span><b>${reads}</b><span class="f"> reads · </span><b>${scans}</b><span class="f"> searches · 3 sessions</span>\n`;
out += ` <span class="f">recency:</span> <span class="cold">>30d</span> → <span class="cool">≤30d</span> → <span class="active">≤7d</span> → <span class="warm">≤3d</span> → <span class="hot">≤1d</span><span class="dead"> · · untouched</span>\n`;
out += b ? `<span class="f"> ← older · → newer · a live overview</span>\n` : `<span class="f"> ←/→ prompts · f focus · h hot · c cold · n ${nameDesc ? "Z–A" : "A–Z"} · s settings · sort:${sortMode}</span>\n<span class="cool"> tip: ${TIPS[tipIdx]}</span>\n`;
out += ticker.slice(0, 3).map(t => ` <span class="tick">${t}</span>`).join("\n");
screen.innerHTML = out;
const dead = document.getElementById("deadnode");
if (dead) dead.onclick = revive;
}
function pulseRandom() {
if (mode !== "live") return;
if (reads % 4 === 0 || buckets.length === 0) {
const b = { text: promptLabel(PROMPTS[Math.floor(Math.random() * PROMPTS.length)]), files: {}, searches: {}, reads: 0, at: Date.now() };
buckets.push(b);
if (buckets.length > 10) { buckets.shift(); if (browseIdx !== null) browseIdx = Math.max(0, browseIdx - 1); }
ticker.unshift(`▸ "${b.text}" · just now`);
}
const alive = tree.flatMap(g => g.files.filter(f => !f.dead).map(f => ({ g, f })));
const pick = alive[Math.floor(Math.random() * alive.length)];
pick.f.n++; pick.f.h += 1; pick.f.last = Date.now(); reads++;
const cur = buckets[buckets.length - 1];
const key = pick.g.folder + pick.f.name;
cur.files[key] = (cur.files[key] || 0) + 1; cur.reads++;
const agents = ["", "", "", " [Explore]", " [Plan]"];
ticker.unshift(`● ${pick.g.folder}${pick.f.name}${agents[Math.floor(Math.random() * agents.length)]} · just now`);
currentPulse = reduced ? null : pick.g.folder + pick.f.name;
render();
setTimeout(() => { currentPulse = null; render(); }, 900);
}
function revive(e) {
const dead = tree[3].files[0];
bubble.style.left = Math.min(e.clientX + 12, innerWidth - 280) + "px";
bubble.style.top = (e.clientY - 60) + "px";
bubble.innerHTML = revived
? "thank you for reading me 🌱"
: "…nobody has read me in 247 days.<br>I need review—not a verdict. <b>Link me from an index?</b> 🥺";
bubble.style.opacity = 1;
setTimeout(() => (bubble.style.opacity = 0), 2600);
if (!revived) { revived = true; dead.dead = false; dead.n = 1; dead.h = 1; dead.last = Date.now(); reads++;
ticker.unshift("● docs/legacy/old-api.md · revived by a human · just now"); }
currentPulse = "docs/legacy/old-api.md";
render();
setTimeout(() => { currentPulse = null; render(); }, 900);
}
function hunt() {
if (hunted) return; hunted = true; mode = "hunt";
document.getElementById("hintx").textContent = "search activity: concentration across sessions helps separate bulk work from recurring discovery friction";
let i = 0;
const iv = setInterval(() => {
const g = tree[Math.floor(Math.random() * tree.length)];
scans++; folderSearches[g.folder] = (folderSearches[g.folder] || 0) + 1;
if (buckets.length) {
const b = buckets[buckets.length - 1];
b.searches[g.folder] = (b.searches[g.folder] || 0) + 1;
}
ticker.unshift(`🔍 ${g.folder.replace(/\/$/, "")} · grep "where is it??" · just now`);
currentPulse = reduced ? null : g.folder;
render();
setTimeout(() => { currentPulse = null; render(); }, 300);
if (++i > 7) { clearInterval(iv); mode = "live"; hunted = false;
setTimeout(() => (document.getElementById("hintx").textContent = "this demo is the plugin"), 4000); }
}, 350);
}
let buf = "";
addEventListener("keydown", (e) => {
if (settingsOpen) {
if (e.key === "s" || e.key === "S" || e.key === "Escape") { settingsOpen = false; settingsMsg = ""; render(); return; }
if (e.key === "1" || e.key === "2" || e.key === "3") {
promptMode = { 1: "truncate", 2: "hash", 3: "off" }[e.key];
settingsMsg = `saved — future prompts use ${promptMode}`;
render(); return;
}
return;
}
if (e.key === "s" && mode === "live" && browseIdx === null) { settingsOpen = true; settingsMsg = ""; render(); return; }
if (e.key === "q" && mode === "live") {
mode = "quit";
screen.innerHTML = `<span class="f">watcher stopped — session ended.\n\n</span><span class="warm">press r to resume</span><span class="f"> (yes, exactly like the real TUI)</span>`;
return;
}
if (e.key === "r" && mode === "quit") { mode = "live"; render(); return; }
if ((e.key === "ArrowLeft" || e.key === "[") && buckets.length) {
browseIdx = browseIdx === null ? buckets.length - 1 : Math.max(0, browseIdx - 1); render(); return;
}
if ((e.key === "ArrowRight" || e.key === "]") && buckets.length) {
browseIdx = browseIdx === null ? buckets.length - 1 : Math.min(buckets.length - 1, browseIdx + 1); render(); return;
}
if (e.key === "a" && browseIdx !== null) { browseIdx = null; render(); return; }
const sorts = { f: "focus", h: "hot", c: "cold", n: "name" };
if (sorts[e.key]) {
if (e.key === "n" && sortMode === "name") nameDesc = !nameDesc;
else if (e.key === "n") nameDesc = false;
sortMode = sorts[e.key]; browseIdx = null; render(); return;
}
buf = (buf + e.key).slice(-4);
if (buf === "hunt") hunt();
});
function copyInstall() {
for (const card of document.querySelectorAll(".install-card")) {
const block = card.querySelector("pre.block");
if (!block || !navigator.clipboard) continue;
const btn = document.createElement("button");
btn.className = "copy-btn"; btn.type = "button"; btn.textContent = "copy";
btn.onclick = () => navigator.clipboard.writeText(block.textContent.trim()).then(() => {
btn.textContent = "copied ✓";
setTimeout(() => (btn.textContent = "copy"), 1500);
});
card.appendChild(btn);
}
}
copyInstall();
console.log("🌳 curious one. try typing `hunt`, press `q`, and the gray file in docs/legacy/ is lonely.");
render();
setInterval(() => { spin++; if (mode === "live") render(); }, 220);
setInterval(pulseRandom, 1700);
setInterval(() => { tipIdx = (tipIdx + 1) % TIPS.length; if (mode === "live" && !settingsOpen && browseIdx === null) render(); }, 30000);
})();
</script>
</body>
</html>