Commit d57ff2c
authored
feat(cli): shared hook efficacy ledger + read-after-served adoption KPI (#777)
The sessions.db injections table becomes the shared ledger for every hook
surface: new surface/category/chars columns (migrated in place on both the
hook-side opener and the staging store), the Grep/Glob enrichments now log
their firings, and the decisions miner is scoped to decision-surface rows so
the new measurement rows never reach it.
New augment_cmd/served_reads.py rides that ledger: PostToolUse on repowise
MCP tools records which file line-ranges a response actually served (source
bytes only, never skeletons or signatures), and a later Read whose window
those ranges substantially cover logs one read_after_served row per file per
session. Nothing is ever injected at that moment: served-then-read means the
MCP answer did not land, and the row is the adoption metric, not a nag. The
PostToolUse matcher is widened to repowise MCP tool names so served content
is observable; unknown payload shapes are skipped, never guessed.
Claude-Session: https://claude.ai/code/session_01AbCVfR5FFEvDxRvJU7DmsW1 parent e3fd88b commit d57ff2c
9 files changed
Lines changed: 614 additions & 13 deletions
File tree
- packages
- cli/src/repowise/cli
- commands/augment_cmd
- editor_integrations
- core/src/repowise/core/sessions
- plugins/claude-code/hooks
- tests/unit/cli
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
246 | 247 | | |
247 | 248 | | |
248 | 249 | | |
| 250 | + | |
| 251 | + | |
249 | 252 | | |
250 | 253 | | |
251 | 254 | | |
252 | 255 | | |
253 | 256 | | |
254 | 257 | | |
255 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
256 | 264 | | |
Lines changed: 67 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
550 | 553 | | |
551 | 554 | | |
552 | 555 | | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
553 | 564 | | |
554 | 565 | | |
555 | 566 | | |
| |||
559 | 570 | | |
560 | 571 | | |
561 | 572 | | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
562 | 577 | | |
563 | 578 | | |
564 | 579 | | |
| |||
581 | 596 | | |
582 | 597 | | |
583 | 598 | | |
584 | | - | |
585 | | - | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
586 | 602 | | |
587 | 603 | | |
588 | 604 | | |
| |||
592 | 608 | | |
593 | 609 | | |
594 | 610 | | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
595 | 653 | | |
596 | 654 | | |
597 | 655 | | |
| |||
608 | 666 | | |
609 | 667 | | |
610 | 668 | | |
611 | | - | |
612 | | - | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
613 | 672 | | |
614 | 673 | | |
615 | 674 | | |
| 675 | + | |
| 676 | + | |
616 | 677 | | |
617 | | - | |
| 678 | + | |
| 679 | + | |
618 | 680 | | |
619 | 681 | | |
620 | 682 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| |||
Lines changed: 34 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
72 | | - | |
| 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 | + | |
73 | 106 | | |
74 | 107 | | |
75 | 108 | | |
| |||
0 commit comments