carrick 0.3.184 → 0.3.185

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/facts/fetch.d.ts +1 -1
  2. package/dist/facts/fetch.js +1 -1
  3. package/dist/facts/fetch.js.map +1 -1
  4. package/dist/held/client.d.ts +1 -1
  5. package/dist/held/client.js +27 -19
  6. package/dist/held/client.js.map +1 -1
  7. package/dist/held/clone-worker.d.ts +1 -0
  8. package/dist/held/clone-worker.js +7 -0
  9. package/dist/held/clone-worker.js.map +1 -0
  10. package/dist/held/daemon.d.ts +92 -4
  11. package/dist/held/daemon.js +418 -74
  12. package/dist/held/daemon.js.map +1 -1
  13. package/dist/held/paths.d.ts +9 -0
  14. package/dist/held/paths.js +9 -0
  15. package/dist/held/paths.js.map +1 -1
  16. package/dist/held/registry.d.ts +8 -0
  17. package/dist/held/registry.js +28 -0
  18. package/dist/held/registry.js.map +1 -1
  19. package/dist/held/run.js +8 -0
  20. package/dist/held/run.js.map +1 -1
  21. package/dist/held/runtime.js +88 -17
  22. package/dist/held/runtime.js.map +1 -1
  23. package/dist/held/shadow.d.ts +62 -0
  24. package/dist/held/shadow.js +359 -1
  25. package/dist/held/shadow.js.map +1 -1
  26. package/dist/held/state.d.ts +2 -1
  27. package/dist/held/state.js.map +1 -1
  28. package/dist/hook/added.d.ts +51 -0
  29. package/dist/hook/added.js +96 -0
  30. package/dist/hook/added.js.map +1 -0
  31. package/dist/hook/edit-flow.d.ts +7 -0
  32. package/dist/hook/edit-flow.js +25 -8
  33. package/dist/hook/edit-flow.js.map +1 -1
  34. package/dist/hook/late.d.ts +5 -2
  35. package/dist/hook/late.js +35 -11
  36. package/dist/hook/late.js.map +1 -1
  37. package/dist/hook/not-checked.d.ts +13 -0
  38. package/dist/hook/not-checked.js +50 -1
  39. package/dist/hook/not-checked.js.map +1 -1
  40. package/dist/hook/post-edit.d.ts +2 -0
  41. package/dist/hook/post-edit.js +3 -1
  42. package/dist/hook/post-edit.js.map +1 -1
  43. package/dist/hook/post-read.js +8 -1
  44. package/dist/hook/post-read.js.map +1 -1
  45. package/dist/hook/rechecks.d.ts +23 -5
  46. package/dist/hook/rechecks.js +31 -6
  47. package/dist/hook/rechecks.js.map +1 -1
  48. package/dist/hook/refresh.d.ts +7 -2
  49. package/dist/hook/refresh.js +7 -2
  50. package/dist/hook/refresh.js.map +1 -1
  51. package/dist/hook/session-start.js +17 -1
  52. package/dist/hook/session-start.js.map +1 -1
  53. package/dist/hook/similar.d.ts +6 -3
  54. package/dist/hook/similar.js +10 -3
  55. package/dist/hook/similar.js.map +1 -1
  56. package/dist/hook/stop-wait.js +13 -4
  57. package/dist/hook/stop-wait.js.map +1 -1
  58. package/dist/hook/upgrade.d.ts +1 -1
  59. package/dist/hook/upgrade.js +4 -1
  60. package/dist/hook/upgrade.js.map +1 -1
  61. package/dist/hook/usage.d.ts +1 -1
  62. package/dist/hook/usage.js +1 -1
  63. package/dist/hook/usage.js.map +1 -1
  64. package/dist/hook/worktree-rules.d.ts +5 -0
  65. package/dist/hook/worktree-rules.js +30 -0
  66. package/dist/hook/worktree-rules.js.map +1 -0
  67. package/dist/hook/worktree.d.ts +5 -0
  68. package/dist/hook/worktree.js +7 -0
  69. package/dist/hook/worktree.js.map +1 -1
  70. package/dist/update.js +2 -1
  71. package/dist/update.js.map +1 -1
  72. package/package.json +6 -6
  73. package/plugin/.claude-plugin/plugin.json +1 -1
  74. package/templates/skills/carrick-audit.md +325 -95
  75. package/templates/skills/carrick-census.md +11 -2
  76. package/templates/skills/carrick-drift.md +56 -13
  77. package/templates/skills/carrick-reuse.md +13 -28
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: carrick-reuse
3
- description: Use at the end of a task that added or changed functions, and whenever the ask is whether something already exists, whether this duplicates code elsewhere, or where this project has built the same thing twice. Compares against the Carrick function index rather than by name.
3
+ description: Use at the end of a task that added or changed functions, and whenever the ask is whether something already exists or whether this code duplicates code elsewhere. Compares against the Carrick function index rather than by name. For where the whole project has built the same thing twice, use carrick-audit.
4
4
  ---
5
5
 
6
6
  # What already does this
@@ -45,28 +45,20 @@ name sits in front of the sentence, a renamed copy scores lower, and
45
45
  `intent_text` is the signal that still finds it. Read every score against the
46
46
  floor and the basis in the answer you got.
47
47
 
48
- ## Audit: the whole project
48
+ ## The whole project
49
49
 
50
- ```
51
- find_similar({{SCOPE}}, audit: true)
52
- ```
53
-
54
- `clusters` groups functions that describe the same behaviour, ordered by size.
55
- Call again with `offset: <next_offset>` for as long as the response carries
56
- `has_more`, and class what every page returned.
57
-
58
- Where the project is larger than one pass, the response carries `window`: the
59
- functions it compared, in path order, each against every function after them.
60
- Call again with `scan_from: <next_scan_from>` until a response carries no
61
- `next_scan_from`; the windows together compare every pair once. `path` narrows
62
- an audit to one directory. Where `truncated` is present the audit is partial,
63
- and its `scanned_functions` of `of` says by how much.
50
+ Where the ask is where the whole project has built the same thing twice, or
51
+ which duplicates are worth fixing, this skill is the wrong tool: one run cannot
52
+ page the whole list and open every member. Load the carrick-audit skill, which
53
+ reads every group in units, finds routes written twice and jobs done several
54
+ ways, and says what it will cost first. `find_similar({{SCOPE}}, audit: true,
55
+ limit: 1)` gives the number of groups, in `total_clusters`, if you want it
56
+ before you hand over.
64
57
 
65
58
  ## Class every row
66
59
 
67
- Every row the answer returned is classed here. In an audit the first member of a
68
- cluster is what the rest of that cluster is classed against; in a targeted call
69
- it is the function you asked about. Read that span at the file and line the
60
+ Every row the answer returned is classed here, against the function you asked
61
+ about. Read that span at the file and line the
70
62
  response gave, read each other row the same way, and take the first of these
71
63
  that holds:
72
64
 
@@ -81,27 +73,20 @@ that holds:
81
73
  - **DUPLICATE**: one contract, and nothing left to name. Two bodies that run
82
74
  the same once the identifiers are renamed land here.
83
75
 
84
- A cluster is transitive, so `lowest_similarity` can sit under the floor and a
85
- large group can hold more than one idea. A member that shares no contract with
86
- the first is FALSE POSITIVE on its own row, and stays in the table.
87
-
88
76
  `matched_on` says which signal joined a row. `similarity` is the intent vectors;
89
77
  `intent_text` is two identical intent sentences, which is the signal that still
90
78
  finds a copy somebody renamed.
91
79
 
92
80
  ## Report
93
81
 
94
- One row per match, and per cluster member beyond the first. The class column
95
- carries one of the three words and is never empty.
82
+ One row per match. The class column carries one of the three words and is
83
+ never empty.
96
84
 
97
85
  | class | member | file:line | against | why |
98
86
  |---|---|---|---|---|
99
87
  | DUPLICATE | slugify | src/util/url.ts:4 | src/text.ts:12 | same replacement rules |
100
88
  | VARIANT | slugTag | src/tags.ts:20 | src/text.ts:12 | documented mirror |
101
89
 
102
- State `total_clusters` from the response against the number of clusters carrying
103
- rows above. Where the two differ, name the clusters left out.
104
-
105
90
  Then relay the counts the response stated, in its numbers: `compared_functions`,
106
91
  and every key the answer carries under `not_compared` and under `excluded`.
107
92