carrick 0.3.183 → 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.
- package/dist/contract.d.ts +0 -4
- package/dist/contract.js.map +1 -1
- package/dist/facts/fetch.d.ts +1 -1
- package/dist/facts/fetch.js +1 -1
- package/dist/facts/fetch.js.map +1 -1
- package/dist/held/client.d.ts +1 -1
- package/dist/held/client.js +27 -19
- package/dist/held/client.js.map +1 -1
- package/dist/held/clone-worker.d.ts +1 -0
- package/dist/held/clone-worker.js +7 -0
- package/dist/held/clone-worker.js.map +1 -0
- package/dist/held/daemon.d.ts +92 -4
- package/dist/held/daemon.js +418 -74
- package/dist/held/daemon.js.map +1 -1
- package/dist/held/paths.d.ts +9 -0
- package/dist/held/paths.js +9 -0
- package/dist/held/paths.js.map +1 -1
- package/dist/held/registry.d.ts +8 -0
- package/dist/held/registry.js +28 -0
- package/dist/held/registry.js.map +1 -1
- package/dist/held/run.js +8 -0
- package/dist/held/run.js.map +1 -1
- package/dist/held/runtime.js +88 -17
- package/dist/held/runtime.js.map +1 -1
- package/dist/held/shadow.d.ts +62 -0
- package/dist/held/shadow.js +359 -1
- package/dist/held/shadow.js.map +1 -1
- package/dist/held/state.d.ts +2 -1
- package/dist/held/state.js.map +1 -1
- package/dist/hook/added.d.ts +51 -0
- package/dist/hook/added.js +96 -0
- package/dist/hook/added.js.map +1 -0
- package/dist/hook/confirm.d.ts +15 -0
- package/dist/hook/confirm.js +28 -3
- package/dist/hook/confirm.js.map +1 -1
- package/dist/hook/edit-flow.d.ts +7 -0
- package/dist/hook/edit-flow.js +29 -8
- package/dist/hook/edit-flow.js.map +1 -1
- package/dist/hook/late.d.ts +24 -7
- package/dist/hook/late.js +100 -33
- package/dist/hook/late.js.map +1 -1
- package/dist/hook/not-checked.d.ts +13 -0
- package/dist/hook/not-checked.js +50 -1
- package/dist/hook/not-checked.js.map +1 -1
- package/dist/hook/post-edit.d.ts +2 -0
- package/dist/hook/post-edit.js +3 -1
- package/dist/hook/post-edit.js.map +1 -1
- package/dist/hook/post-read.js +8 -1
- package/dist/hook/post-read.js.map +1 -1
- package/dist/hook/rechecks.d.ts +23 -5
- package/dist/hook/rechecks.js +31 -6
- package/dist/hook/rechecks.js.map +1 -1
- package/dist/hook/refresh.d.ts +7 -2
- package/dist/hook/refresh.js +7 -2
- package/dist/hook/refresh.js.map +1 -1
- package/dist/hook/session-start.js +17 -1
- package/dist/hook/session-start.js.map +1 -1
- package/dist/hook/similar.d.ts +6 -3
- package/dist/hook/similar.js +10 -3
- package/dist/hook/similar.js.map +1 -1
- package/dist/hook/stop-wait.js +24 -9
- package/dist/hook/stop-wait.js.map +1 -1
- package/dist/hook/upgrade.d.ts +1 -1
- package/dist/hook/upgrade.js +4 -1
- package/dist/hook/upgrade.js.map +1 -1
- package/dist/hook/usage.d.ts +1 -1
- package/dist/hook/usage.js +1 -1
- package/dist/hook/usage.js.map +1 -1
- package/dist/hook/worktree-rules.d.ts +5 -0
- package/dist/hook/worktree-rules.js +30 -0
- package/dist/hook/worktree-rules.js.map +1 -0
- package/dist/hook/worktree.d.ts +5 -0
- package/dist/hook/worktree.js +7 -0
- package/dist/hook/worktree.js.map +1 -1
- package/dist/render.d.ts +3 -1
- package/dist/render.js +8 -9
- package/dist/render.js.map +1 -1
- package/dist/update.js +2 -1
- package/dist/update.js.map +1 -1
- package/package.json +6 -6
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/templates/skills/carrick-audit.md +325 -95
- package/templates/skills/carrick-census.md +11 -2
- package/templates/skills/carrick-drift.md +56 -13
- 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
|
|
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
|
-
##
|
|
48
|
+
## The whole project
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
|
68
|
-
|
|
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
|
|
95
|
-
|
|
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
|
|