codeassembly-guidance 0.6.0 → 0.7.0

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 (66) hide show
  1. package/.meta/changelog.json +185 -0
  2. package/CHANGELOG.md +45 -0
  3. package/README.md +29 -51
  4. package/content/_partials/kb-unsearched-private-stores.md +6 -0
  5. package/content/codeassembly-content.yaml +2 -0
  6. package/content/guidance/rulebooks/live-worktree-policy.md +2 -2
  7. package/content/guidance/rulebooks/williamthorsen-ticketing-preferences.md +3 -1
  8. package/content/guidance/shared/AGENTS.md +1 -1
  9. package/content/scripts/check-prose.mjs +1 -1
  10. package/content/scripts/describe-change.mjs +89 -89
  11. package/content/scripts/manage-jira-ticket.mjs +113 -113
  12. package/content/scripts/select-lede-exemplars.mjs +85 -85
  13. package/content/scripts/validate-preferences.mjs +38 -38
  14. package/content/skills/_data/project-stage.md +9 -5
  15. package/content/skills/_data/spike-conventions.md +9 -6
  16. package/content/skills/_partials/implementation-order-list.md +27 -0
  17. package/content/skills/_partials/next-steps-after-plan.md +2 -2
  18. package/content/skills/_partials/plan-template.md +2 -0
  19. package/content/skills/_partials/split-launch-prompts.md +1 -1
  20. package/content/skills/align-ticket-with-implementation/SKILL.md +1 -1
  21. package/content/skills/assess-code-health/SKILL.md +2 -2
  22. package/content/skills/assess-usability/SKILL.md +2 -2
  23. package/content/skills/capture-event/SKILL.md +20 -11
  24. package/content/skills/capture-event/capture-event.mjs +122 -122
  25. package/content/skills/capture-feedback/SKILL.md +2 -1
  26. package/content/skills/capture-lede-decision/capture-lede-decision.mjs +97 -97
  27. package/content/skills/create-pr/SKILL.md +11 -11
  28. package/content/skills/create-ticket/resolve-ticket-target.mjs +92 -92
  29. package/content/skills/curate-feedback/curate-feedback.mjs +82 -82
  30. package/content/skills/derive-session-context/derive-session-context.mjs +107 -107
  31. package/content/skills/design-and-plan/SKILL.md +4 -2
  32. package/content/skills/implement-plan/SKILL.md +3 -1
  33. package/content/skills/implementation-order/implementation-order.mjs +67 -0
  34. package/content/skills/investigate-spike/SKILL.md +1 -1
  35. package/content/skills/kb-add/SKILL.md +12 -3
  36. package/content/skills/kb-add/kb-add.mjs +88 -88
  37. package/content/skills/kb-curate/kb-curate.mjs +88 -88
  38. package/content/skills/kb-edit/kb-edit.mjs +90 -90
  39. package/content/skills/kb-retrieve/SKILL.md +8 -3
  40. package/content/skills/kb-retrieve/kb-retrieve.mjs +104 -104
  41. package/content/skills/kb-retrieve-events/SKILL.md +8 -3
  42. package/content/skills/kb-retrieve-events/kb-retrieve-events.mjs +113 -113
  43. package/content/skills/kb-update-events/kb-update-events.mjs +92 -92
  44. package/content/skills/lesson-clusters/lesson-clusters.mjs +102 -102
  45. package/content/skills/list-implementation-order/SKILL.md +23 -0
  46. package/content/skills/merge-bb-pr/SKILL.md +31 -8
  47. package/content/skills/merge-gh-pr/SKILL.md +25 -12
  48. package/content/skills/merge-gh-pr/merge-gh-pr.mjs +13 -8
  49. package/content/skills/merge-pr/SKILL.md +55 -20
  50. package/content/skills/migrate-feedback-memories/SKILL.md +1 -0
  51. package/content/skills/plan/SKILL.md +3 -1
  52. package/content/skills/prepare-prototype-brief/SKILL.md +3 -1
  53. package/content/skills/refine-plan/SKILL.md +2 -0
  54. package/content/skills/review-branch/SKILL.md +1 -1
  55. package/content/skills/review-criteria/SKILL.md +1 -1
  56. package/content/skills/revise-prose/revise-prose.mjs +111 -111
  57. package/content/skills/save-plan/SKILL.md +2 -0
  58. package/content/skills/streamline-guidance/streamline-guidance.mjs +76 -76
  59. package/content/skills/summarize-change/SKILL.md +17 -7
  60. package/content/skills/testing-conventions/SKILL.md +2 -2
  61. package/content/skills/triage-feedback/SKILL.md +4 -0
  62. package/content/skills/triage-spike-findings/SKILL.md +10 -5
  63. package/content/skills/wrap-up/SKILL.md +4 -0
  64. package/package.json +9 -9
  65. package/schemas/preferences.v1.json +74 -8
  66. package/schemas/work-types.v1.json +1 -1
@@ -1,4 +1,189 @@
1
1
  [
2
+ {
3
+ "version": "0.7.0",
4
+ "date": "2026-11-14",
5
+ "sections": [
6
+ {
7
+ "title": "🎉 Features",
8
+ "audience": "all",
9
+ "items": [
10
+ {
11
+ "description": "Makes `prepare-prototype-brief` post the approved brief on the ticket as a comment without asking a second time, with a summary line that names the lenses and the brief artifact and the full brief in a collapsed `<details>` block, and skips the post when an earlier run already posted it. (#145)",
12
+ "hash": "9eb2448bac820d79aadbfa4e850aef84400bd73f",
13
+ "entry": 1
14
+ },
15
+ {
16
+ "description": "Adds the `merge.approval` preference, whose value `auto` makes `merge-pr` merge without its approval gate when the pull request is on GitHub and not breaking, its merge state is `CLEAN` or `HAS_HOOKS`, and the run neither reports a notice nor makes a decision of its own. (#147)",
17
+ "hash": "0b28b368b2a11bbc2f74ad338440e0591a3d19c8",
18
+ "entry": 1
19
+ },
20
+ {
21
+ "description": "Adds the `--confirm` option to `merge-pr`, which shows the approval gate for one run when `merge.approval` is `auto`. (#147)",
22
+ "hash": "0b28b368b2a11bbc2f74ad338440e0591a3d19c8",
23
+ "entry": 2
24
+ },
25
+ {
26
+ "description": "Adds the `project.stages` key to `.agents/preferences.yaml`, which declares the maturity, sensitivity, or audience of one subdirectory, and which `derive-session-context` reports as `project_stages` with each inherited value filled in, so that `plan` and `design-and-plan` apply the stage of the subdirectory that contains the work. (#150)",
27
+ "hash": "9a10fc06593714a8a62003fbe86c9026962b07bc",
28
+ "entry": 1
29
+ },
30
+ {
31
+ "description": "Adds `exploration` as a `project.maturity` value, below `hobby`, for work whose output is still taking shape and that nothing depends on yet. (#150)",
32
+ "hash": "9a10fc06593714a8a62003fbe86c9026962b07bc",
33
+ "entry": 2
34
+ },
35
+ {
36
+ "description": "Directs `plan` and `design-and-plan` to verify unsettled output, such as output at the `exploration` maturity or from a prototype, through a round in which the developer reads it on real inputs, and to plan golden references, answer keys, and evals only as tasks that follow the developer's approval of an output. (#150)",
37
+ "hash": "9a10fc06593714a8a62003fbe86c9026962b07bc",
38
+ "entry": 3
39
+ },
40
+ {
41
+ "description": "Adds an optional `## Notes for reviewers` section to the change summary written by `summarize-change`, along with a reader test that each line of that section, `## Why`, and `## How to test` must pass by changing what a reviewer who hasn't read the ticket checks or decides. (#151)",
42
+ "hash": "b9c0250bd7f77e68327503aa0e38d2097bb8ee19",
43
+ "entry": 1
44
+ },
45
+ {
46
+ "description": "Directs `create-pr` to include `## Notes for reviewers` in the pull-request body and not to add a section, a note, or a test plan of its own. (#151)",
47
+ "hash": "b9c0250bd7f77e68327503aa0e38d2097bb8ee19",
48
+ "entry": 2
49
+ },
50
+ {
51
+ "description": "Narrows the instruction in the shared `AGENTS.md`, `align-ticket-with-implementation`, and `review-branch` that had an agent report every divergence from the ticket's proposal in the pull-request description: It now names `## Notes for reviewers` and applies only to a divergence that changes what a reviewer checks. (#151)",
52
+ "hash": "b9c0250bd7f77e68327503aa0e38d2097bb8ee19",
53
+ "entry": 3
54
+ },
55
+ {
56
+ "description": "Replaces the key-value completion lines at the end of `merge-pr`, `merge-gh-pr`, and `merge-bb-pr` replies with an outcome summary under a heading that states whether the PR was merged. (#158)",
57
+ "hash": "dc266c99aabac894c44e23f76db8e007842ca01a",
58
+ "entry": 1
59
+ },
60
+ {
61
+ "description": "Adds a `summary` field to the JSON that `merge-gh-pr.mjs` prints after a confirmed merge, and changes the script to print a JSON object containing only `summary` on stdout when the merge is refused, fails, or cannot be confirmed. (#158)",
62
+ "hash": "dc266c99aabac894c44e23f76db8e007842ca01a",
63
+ "entry": 2
64
+ },
65
+ {
66
+ "description": "Adds the ticket's close to the closing-post offer that ends a spike, so that one consent from the developer posts the conclusion and closes the ticket as completed, and a rerun skips whichever of the two writes is already done. (#159)",
67
+ "hash": "5a6a9d5abde6d88e133edbc192d9517adff57fca",
68
+ "entry": 1
69
+ },
70
+ {
71
+ "description": "Makes `merge-pr` take its merge strategy and branch deletion from the `merge.strategy` (`squash`, `merge`, or `rebase`) and `merge.deletion_strategy` (`both`, `remote`, or `none`) preferences, which `derive-session-context` reports as `merge_strategy` and `merge_deletion_strategy` and which the `--strategy` and `--delete` flags override for one run. (#160)",
72
+ "hash": "9558074a0a732ee1a1fb9da2055d99d260a844fc",
73
+ "entry": 1
74
+ },
75
+ {
76
+ "description": "Makes `derive-session-context` name the preferences file that contains an invalid value when it rejects one, in addition to the key and the accepted values. (#160)",
77
+ "hash": "9558074a0a732ee1a1fb9da2055d99d260a844fc",
78
+ "entry": 2
79
+ },
80
+ {
81
+ "description": "Adds the `list-implementation-order` skill, which prints the conversation's open tickets as a tree in implementation order for a narrow column, with each ticket indented under its blocker, the blockers that the indent does not show, and a line for each change that must be published and upgraded in a consuming repository before a blocked ticket can start. (#163)",
82
+ "hash": "66e04b50774064ffde90d4cacb5953e844db2998",
83
+ "entry": 1
84
+ },
85
+ {
86
+ "description": "Changes the merged summary of `merge-gh-pr` and `merge-bb-pr` to a heading that names the target branch, the strategy, and the short merge commit hash, followed by labelled lines for the commit title, the PR link, and the remote branch deletion, with `merge-gh-pr` reading the commit title from GitHub after the merge and falling back to the submitted title, or to `unavailable`, when the read fails. (#164)",
87
+ "hash": "989582e827c11847401acac06a0cd5922d8e1a2e",
88
+ "entry": 1
89
+ },
90
+ {
91
+ "description": "Changes the refusal summary of `merge-pr`, `merge-gh-pr`, and `merge-bb-pr` to a `## ❌ Not merged` heading followed by `PR:` and `Reason:` lines, and gives the unconfirmed-merge summary of `merge-gh-pr` the same layout under `## ⚠️ Merge not confirmed`. (#164)",
92
+ "hash": "989582e827c11847401acac06a0cd5922d8e1a2e",
93
+ "entry": 2
94
+ },
95
+ {
96
+ "description": "Adds the implementation-order list, which shows the order, the blockers, and the publish gates of the tickets, to the output of a split's launch prompts and of the `triage-spike-findings`, `triage-feedback`, and `wrap-up` reports whenever the run creates two or more tickets. (#165)",
97
+ "hash": "13a37aa75d729ac2149179527f3b00eec0f80a4e",
98
+ "entry": 1
99
+ },
100
+ {
101
+ "description": "Adds each `kb.yaml` registry entry that declares `in_default_scope: true` to the default scope of `kb-retrieve` and `kb-retrieve-events`, which previously searched only the discovered `.kb/` and the registry's `default_kb` unless `--all-kbs` was passed. (#172)",
102
+ "hash": "00f754ca492fe002ee2e1209c2b709b6a88c832c",
103
+ "entry": 1
104
+ },
105
+ {
106
+ "description": "Makes `kb-add` refuse a write into a KB whose `visibility` is `shared` with a `shared-kb` error unless the invocation passes the new `--shared` flag, refuse a write with `invalid-config` when the KB's `.kb/config.yaml` is malformed, and report the KB's `visibility` in the `--survey` result. (#173)",
107
+ "hash": "d2e4c808664af6d56deaff05e4b92b628e46b5f5",
108
+ "entry": 1
109
+ },
110
+ {
111
+ "description": "Makes `capture-event` refuse a fresh capture into a store whose `visibility` is `shared` with a `shared-store` error unless the invocation passes the new `--shared` flag, and with `invalid-config` when the store's `.kb/config.yaml` is malformed, while leaving `--amend` exempt. (#173)",
112
+ "hash": "d2e4c808664af6d56deaff05e4b92b628e46b5f5",
113
+ "entry": 2
114
+ },
115
+ {
116
+ "description": "Adds a rule to the `capture-feedback` and `migrate-feedback-memories` skills that permits `--shared` only on a retry after a `shared-store` refusal and only for a record that contains nothing unfit for the store's collaborators, and that leaves any other record uncaptured rather than redirected to another store. (#173)",
117
+ "hash": "d2e4c808664af6d56deaff05e4b92b628e46b5f5",
118
+ "entry": 3
119
+ },
120
+ {
121
+ "description": "Adds `unsearchedPrivateStores` to the output of the `kb-retrieve` and `kb-retrieve-events` helpers, listing each registered store whose visibility is `private` and that the recall did not search, and directs the agent in both skills to report such a recall as partial and to name, for each store, the `--store` or `--all-kbs` flag that would include it, or that its path needs fixing. (#174)",
122
+ "hash": "366eda24a1e21cece6fe71fd8574053e720a4ded",
123
+ "entry": 1
124
+ },
125
+ {
126
+ "description": "Adds a rule to the `williamthorsen-ticketing-preferences` rulebook that limits a ticket to work in one repository and directs that a change needing two or more repositories get one ticket per repository, with the merge order, upstream first, recorded as blocked-by relations. (#179)",
127
+ "hash": "76a86b687a1853eeb3004535da128bc6e17e839f",
128
+ "entry": 1
129
+ },
130
+ {
131
+ "description": "Makes `triage-spike-findings`, on a run given a batch, close the follow-up triage ticket as completed without a closing post once it posts the dispositions comment, and lists that close in the run's single confirmation and in its report. (#180)",
132
+ "hash": "13a8dc0a27360593b4f1d5bc0b3fe2cac2158c81",
133
+ "entry": 1
134
+ }
135
+ ]
136
+ },
137
+ {
138
+ "title": "🐛 Bug fixes",
139
+ "audience": "all",
140
+ "items": [
141
+ {
142
+ "description": "Fixes the issue that the `live-worktree-policy` rulebook's example of the `{path}.live` naming gave `~/repos/projects/codeassembly` paths, when the repository is cloned under `~/repos/oss/`. (#157)",
143
+ "hash": "05a744df3c6188420203c7f3d5df232deade32b4",
144
+ "entry": 1
145
+ },
146
+ {
147
+ "description": "Fixes the issue that `--store` in `kb-retrieve` and `kb-retrieve-events` resolved a name against the user-level `kb.yaml` alone and did not find a store registered only in the project's `kb.yaml`. (#174)",
148
+ "hash": "366eda24a1e21cece6fe71fd8574053e720a4ded",
149
+ "entry": 2
150
+ },
151
+ {
152
+ "description": "Fixes the issue that the Split rule in the `next-steps-after-plan` partial never recommended splitting a small plan that touches two or more repositories, because the rule required every plan to be too large for one implement-and-review pass. (#179)",
153
+ "hash": "76a86b687a1853eeb3004535da128bc6e17e839f",
154
+ "entry": 2
155
+ }
156
+ ]
157
+ },
158
+ {
159
+ "title": "♻️ Refactoring",
160
+ "audience": "dev",
161
+ "items": [
162
+ {
163
+ "description": "Moves the implementation-order helper out of the `list-implementation-order` skill's directory into its own `skills/implementation-order/` directory as `implementation-order.mjs`, so that each skill that prints the implementation-order list runs it from one shared path. (#165)",
164
+ "hash": "13a37aa75d729ac2149179527f3b00eec0f80a4e",
165
+ "entry": 2
166
+ }
167
+ ]
168
+ },
169
+ {
170
+ "title": "🧪 Tests",
171
+ "audience": "dev",
172
+ "items": [
173
+ {
174
+ "description": "Moves the URL-construction tests from `compose-manifest.unit.test.ts` into a new `compose-manifest.urls.unit.test.ts`, which brings the original file under the 500-line limit set by the `max-lines` rule. (#149)",
175
+ "hash": "2cbdf9075faf803153cf6f5048619ba77ec3cb4a",
176
+ "entry": 1
177
+ },
178
+ {
179
+ "description": "Rewrites the skill-name regex in `entry-points.unit.test.ts` as a `String.raw` template, as the `prefer-string-raw` rule requires, without changing the resulting regex. (#149)",
180
+ "hash": "2cbdf9075faf803153cf6f5048619ba77ec3cb4a",
181
+ "entry": 2
182
+ }
183
+ ]
184
+ }
185
+ ]
186
+ },
2
187
  {
3
188
  "version": "0.6.0",
4
189
  "date": "2026-11-09",
package/CHANGELOG.md CHANGED
@@ -2,6 +2,51 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## 0.7.0 — 2026-11-14
6
+
7
+ ### 🎉 Features
8
+
9
+ - Makes `prepare-prototype-brief` post the approved brief on the ticket as a comment without asking a second time, with a summary line that names the lenses and the brief artifact and the full brief in a collapsed `<details>` block, and skips the post when an earlier run already posted it. (#145)
10
+ - Adds the `merge.approval` preference, whose value `auto` makes `merge-pr` merge without its approval gate when the pull request is on GitHub and not breaking, its merge state is `CLEAN` or `HAS_HOOKS`, and the run neither reports a notice nor makes a decision of its own. (#147)
11
+ - Adds the `--confirm` option to `merge-pr`, which shows the approval gate for one run when `merge.approval` is `auto`. (#147)
12
+ - Adds the `project.stages` key to `.agents/preferences.yaml`, which declares the maturity, sensitivity, or audience of one subdirectory, and which `derive-session-context` reports as `project_stages` with each inherited value filled in, so that `plan` and `design-and-plan` apply the stage of the subdirectory that contains the work. (#150)
13
+ - Adds `exploration` as a `project.maturity` value, below `hobby`, for work whose output is still taking shape and that nothing depends on yet. (#150)
14
+ - Directs `plan` and `design-and-plan` to verify unsettled output, such as output at the `exploration` maturity or from a prototype, through a round in which the developer reads it on real inputs, and to plan golden references, answer keys, and evals only as tasks that follow the developer's approval of an output. (#150)
15
+ - Adds an optional `## Notes for reviewers` section to the change summary written by `summarize-change`, along with a reader test that each line of that section, `## Why`, and `## How to test` must pass by changing what a reviewer who hasn't read the ticket checks or decides. (#151)
16
+ - Directs `create-pr` to include `## Notes for reviewers` in the pull-request body and not to add a section, a note, or a test plan of its own. (#151)
17
+ - Narrows the instruction in the shared `AGENTS.md`, `align-ticket-with-implementation`, and `review-branch` that had an agent report every divergence from the ticket's proposal in the pull-request description: It now names `## Notes for reviewers` and applies only to a divergence that changes what a reviewer checks. (#151)
18
+ - Replaces the key-value completion lines at the end of `merge-pr`, `merge-gh-pr`, and `merge-bb-pr` replies with an outcome summary under a heading that states whether the PR was merged. (#158)
19
+ - Adds a `summary` field to the JSON that `merge-gh-pr.mjs` prints after a confirmed merge, and changes the script to print a JSON object containing only `summary` on stdout when the merge is refused, fails, or cannot be confirmed. (#158)
20
+ - Adds the ticket's close to the closing-post offer that ends a spike, so that one consent from the developer posts the conclusion and closes the ticket as completed, and a rerun skips whichever of the two writes is already done. (#159)
21
+ - Makes `merge-pr` take its merge strategy and branch deletion from the `merge.strategy` (`squash`, `merge`, or `rebase`) and `merge.deletion_strategy` (`both`, `remote`, or `none`) preferences, which `derive-session-context` reports as `merge_strategy` and `merge_deletion_strategy` and which the `--strategy` and `--delete` flags override for one run. (#160)
22
+ - Makes `derive-session-context` name the preferences file that contains an invalid value when it rejects one, in addition to the key and the accepted values. (#160)
23
+ - Adds the `list-implementation-order` skill, which prints the conversation's open tickets as a tree in implementation order for a narrow column, with each ticket indented under its blocker, the blockers that the indent does not show, and a line for each change that must be published and upgraded in a consuming repository before a blocked ticket can start. (#163)
24
+ - Changes the merged summary of `merge-gh-pr` and `merge-bb-pr` to a heading that names the target branch, the strategy, and the short merge commit hash, followed by labelled lines for the commit title, the PR link, and the remote branch deletion, with `merge-gh-pr` reading the commit title from GitHub after the merge and falling back to the submitted title, or to `unavailable`, when the read fails. (#164)
25
+ - Changes the refusal summary of `merge-pr`, `merge-gh-pr`, and `merge-bb-pr` to a `## ❌ Not merged` heading followed by `PR:` and `Reason:` lines, and gives the unconfirmed-merge summary of `merge-gh-pr` the same layout under `## ⚠️ Merge not confirmed`. (#164)
26
+ - Adds the implementation-order list, which shows the order, the blockers, and the publish gates of the tickets, to the output of a split's launch prompts and of the `triage-spike-findings`, `triage-feedback`, and `wrap-up` reports whenever the run creates two or more tickets. (#165)
27
+ - Adds each `kb.yaml` registry entry that declares `in_default_scope: true` to the default scope of `kb-retrieve` and `kb-retrieve-events`, which previously searched only the discovered `.kb/` and the registry's `default_kb` unless `--all-kbs` was passed. (#172)
28
+ - Makes `kb-add` refuse a write into a KB whose `visibility` is `shared` with a `shared-kb` error unless the invocation passes the new `--shared` flag, refuse a write with `invalid-config` when the KB's `.kb/config.yaml` is malformed, and report the KB's `visibility` in the `--survey` result. (#173)
29
+ - Makes `capture-event` refuse a fresh capture into a store whose `visibility` is `shared` with a `shared-store` error unless the invocation passes the new `--shared` flag, and with `invalid-config` when the store's `.kb/config.yaml` is malformed, while leaving `--amend` exempt. (#173)
30
+ - Adds a rule to the `capture-feedback` and `migrate-feedback-memories` skills that permits `--shared` only on a retry after a `shared-store` refusal and only for a record that contains nothing unfit for the store's collaborators, and that leaves any other record uncaptured rather than redirected to another store. (#173)
31
+ - Adds `unsearchedPrivateStores` to the output of the `kb-retrieve` and `kb-retrieve-events` helpers, listing each registered store whose visibility is `private` and that the recall did not search, and directs the agent in both skills to report such a recall as partial and to name, for each store, the `--store` or `--all-kbs` flag that would include it, or that its path needs fixing. (#174)
32
+ - Adds a rule to the `williamthorsen-ticketing-preferences` rulebook that limits a ticket to work in one repository and directs that a change needing two or more repositories get one ticket per repository, with the merge order, upstream first, recorded as blocked-by relations. (#179)
33
+ - Makes `triage-spike-findings`, on a run given a batch, close the follow-up triage ticket as completed without a closing post once it posts the dispositions comment, and lists that close in the run's single confirmation and in its report. (#180)
34
+
35
+ ### 🐛 Bug fixes
36
+
37
+ - Fixes the issue that the `live-worktree-policy` rulebook's example of the `{path}.live` naming gave `~/repos/projects/codeassembly` paths, when the repository is cloned under `~/repos/oss/`. (#157)
38
+ - Fixes the issue that `--store` in `kb-retrieve` and `kb-retrieve-events` resolved a name against the user-level `kb.yaml` alone and did not find a store registered only in the project's `kb.yaml`. (#174)
39
+ - Fixes the issue that the Split rule in the `next-steps-after-plan` partial never recommended splitting a small plan that touches two or more repositories, because the rule required every plan to be too large for one implement-and-review pass. (#179)
40
+
41
+ ### ♻️ Refactoring
42
+
43
+ - Moves the implementation-order helper out of the `list-implementation-order` skill's directory into its own `skills/implementation-order/` directory as `implementation-order.mjs`, so that each skill that prints the implementation-order list runs it from one shared path. (#165)
44
+
45
+ ### 🧪 Tests
46
+
47
+ - Moves the URL-construction tests from `compose-manifest.unit.test.ts` into a new `compose-manifest.urls.unit.test.ts`, which brings the original file under the 500-line limit set by the `max-lines` rule. (#149)
48
+ - Rewrites the skill-name regex in `entry-points.unit.test.ts` as a `String.raw` template, as the `prefer-string-raw` rule requires, without changing the resulting regex. (#149)
49
+
5
50
  ## 0.6.0 — 2026-11-09
6
51
 
7
52
  ### 🎉 Features
package/README.md CHANGED
@@ -5,63 +5,41 @@
5
5
  The CodeAssembly library of agent guidance: rulebooks, skills, and subagents for coding harnesses, which the [`codeassembly`](https://github.com/williamthorsen/codeassembly/blob/main/packages/agents/README.md) CLI deploys into Claude Code and Rovo Dev.
6
6
 
7
7
  <!-- section:release-notes -->
8
- ## Release notes — v0.6.0 (2026-11-09)
8
+ ## Release notes — v0.7.0 (2026-11-14)
9
9
 
10
10
  ### 🎉 Features
11
11
 
12
- - Adds the `analyze-performance` skill, which measures each page of a site for mobile and desktop through the PageSpeed Insights API or the Lighthouse CLI, reports field data from real users apart from lab data, and writes a `performance-findings` artifact that ranks improvements by expected effect, with the evidence, the metric, and the effort of each. (#5)
13
- - Lets `triage-spike-findings` take a `performance-findings` artifact as input, so that it can create tickets for the improvements that `analyze-performance` ranks. (#5)
14
- - Adds the `dead-code`, `duplication`, and `dependency-graph` sensors to `assess-code-health`'s `sense` command, which runs knip, jscpd, and dependency-cruiser on every invocation and limits their rows to the unit's tracked, non-excluded files. (#92)
15
- - Adds an `importers` count to each hotspot row in the sense document, taken from the dependency graph and null when the graph does not list the file. (#92)
16
- - Adds an "Unexpected crashes" section to the `cli-conventions` rulebook, which directs a tool to report a crash as `<bin>: internal error: <message>` followed by the stack frames, printed without a debug flag, and to exit 1, so that a reader can tell a bug in the tool from a handled error. (#94)
17
- - Adds the `machine-readable-output-conventions` rulebook, delivered as the `consult-machine-readable-output-conventions` skill, which requires a result shown to a person to be available as structured data rendered from the same object and states rules for canonical values, data embedded in a page, redaction of sensitive fields, and a journal of domain events. (#103)
18
- - Adds `machine-readable-output-conventions` to the `recommended` collection, which deploys it to every project that declares the collection. (#103)
19
- - Adds a "Time-driven behavior" section to the `testing-conventions` skill, which directs a test author to fake the clock and advance it explicitly, to wait on a condition with a deadline when the timer runs in another process, and to run a changed test repeatedly under CPU load before committing it. (#107)
20
- - Adds a matching "Time-driven behavior" section to `typescript-testing-conventions`, which shows a fake-timer Vitest test that moves time with `vi.advanceTimersByTimeAsync` and describes how to run several copies of `vitest run <file> --repeats <n>` at once to put the machine under CPU load. (#107)
21
- - Adds a "Findings batches" section to `spike-conventions.md`, which caps a triage batch at 10 items, gives each batch a ticket of its own, and shapes an assessment of several units as an umbrella with one child per unit, each blocked by the one before it. (#108)
22
- - Limits `triage-spike-findings` to one batch per triage ticket and has it create a follow-up triage ticket for each later batch, each blocked by the one before it and linked back to the triage ticket, so that every item still receives a disposition. (#108)
23
- - Lowers the default per-lens proposal cap of `assess-code-health` from 10 to 2, so that its five lenses produce at most 10 proposals for one unit. (#108)
24
- - Directs `plan`, `design-and-plan`, and `create-ticket` to scope a ticket or task that schedules an assessment or a triage of findings to one batch. (#108)
25
- - Changes the grade definitions shared by `triage-spike-findings` and `disposition-challenger` to grade an item from `assess-code-health` by the code that the change leaves, so that the one-time cost of the change no longer lowers the item's confidence or value. (#109)
26
- - Adds a working-directory argument to `create-commit`, which runs every git call, the ticket-ref lookup, and the title rendering against that worktree. (#110)
27
- - Adds a rule to `williamthorsen-workflow-preferences` that directs a session working in a worktree other than its cwd to pass that worktree to every skill that takes a working directory, or to commit inline with `git -C`. (#110)
28
- - Adds a "TypeScript packages" section to the `machine-readable-output-conventions` rulebook that names `@williamthorsen/readout`, `@williamthorsen/readout-journal`, and `@williamthorsen/readout-react` and the rules that each one implements, and states that the rules remain the contract whether or not an implementation uses them. (#113)
29
- - Adds a "Machine-readable results" section to the `williamthorsen-typescript-preferences` rulebook that directs an agent to build a result or a journal on the readout packages rather than by hand. (#113)
30
- - Adds a `--resweep` flag to `revise-prose`, which dispatches every versioned rule to every file whatever coverage `.agents/revise-prose.yaml` records, while recorded rejections still suppress their sites. (#114)
31
- - Adds the optional `provenance.parent` field to plan provenance, which `refine-plan` sets on every revised plan to the file name, without its directory, of the plan that it revised. (#117)
32
- - Adds rules to `accessibility-conventions` that have an agent follow the established model that a feature resembles, place a control that opens or closes a region at that region's edge or in a persistent toolbar, and give a toggle a visible on state, an `aria-expanded` or `aria-pressed` attribute, and one label for both states, and adds toggling each toggle to the rulebook's browser check. (#118)
33
- - Exempts a toggle from the `ui-copy-conventions` rule that buttons are verbs, since a toggle's label names what it governs and stays the same in both states. (#118)
34
- - Has `design-and-plan`, `prepare-prototype-brief`, `refine-prototype`, and the shared plan template apply the new control rules when a design is chosen or a control is added or moved, with any departure from the named model recorded together with its reason. (#118)
35
- - Adds a "Glanceable state" section to the `accessibility-conventions` rulebook, which requires that a state for which a reader scans a list or table be marked by colour with a second cue, a symbol, grouping, or sort order rather than by text alone, and which states that a restraint on colour never excuses hiding such a state. (#120)
36
- - Adds a rule to `accessibility-conventions` that a button outside a toolbar has a border or fill at rest that meets 3:1 contrast against its surface, and extends the rulebook's browser check to cover this rule and the glanceable-state rule. (#120)
37
- - Names both rules in `prepare-prototype-brief`, `refine-prototype`, and the `usability-assessor` subagent, names the glanceable-state rule in `review-criteria` and the plan template's interface guidance, and adds a criterion to the judging section of every prototype brief that treats a list whose items must each be read to find a scanned state as a defect. (#120)
38
- - Adds the `prototype-builder` subagent, which builds one prototype for one lens of a brief and checks its page in a headless Playwright browser apart from the dispatching session's, and makes `prepare-prototype-brief` and `index-prototypes` dispatch it for each prototype that a subagent builds. (#126)
39
- - Adds the `index-prototypes probe-targets --endpoint <url>` command, which closes each page target of a browser's DevTools endpoint that does not answer a probe within 5 seconds, and directs `index-prototypes` to run it when a Playwright call times out and to report each closed page's prototype as defective. (#126)
40
- - Makes the brief composed by `prepare-prototype-brief` require every iterative loop in a prototype, such as an animation or a retry, to stop after a fixed number of iterations or a time limit, because a loop that does not end hangs the page's renderer. (#126)
41
- - Sets the browser title of the index page to `{set title} - Prototypes` and directs `prototype-builder` and `/refine-prototype` to title each prototype page `{set title} - {id} {title}`, so that a developer judging a round can tell its tabs apart. (#130)
42
- - Makes the `index-prototypes` helper's `register` command fail with `title-mismatch` when the `--source` page's `<title>` is missing or differs from `{set title} - {id} {title}`, and with `source-not-found` when the source is not a readable file. (#130)
43
- - Adds the `investigate-spike` skill, which works a spike plan's investigation steps within its timebox, saves the answers and recommendations as a `spike-findings` artifact that `triage-spike-findings` accepts, and offers the closing post on the ticket. (#132)
44
- - Changes the post-plan menu's 🔬 Investigate option, which previously left the agent to work a spike plan without a skill, to invoke `investigate-spike` with the plan and the ticket. (#132)
45
- - Adds the `start-ticket` skill, which chooses the skill that opens the work in a ticket's worktree (such as `design-and-plan`, `plan`, `refine-plan`, `implement-plan`, `investigate-spike`, or `triage-spike-findings`) from the ticket's state, its pull request, and its saved artifacts, and then invokes that skill. (#134)
46
- - Changes the launch prompts of a plan-time split to invoke `start-ticket` without arguments instead of naming an entry-point skill chosen at split time, so that the choice reflects the piece's artifacts when its session starts. (#134)
47
- - Adds a `start-ticket` line to the completion output of `create-ticket` to show how to start the new ticket in its worktree, and omits the line for a ticket created in another repository. (#134)
48
- - Adds a `## How to test` section to the change summary, in which `summarize-change` lists the steps that a reviewer follows to exercise a changed page, UI component, or command output by hand, and has `create-pr` include that section in the pull-request body. (#140)
49
- - Adds the `convert-agent-prompt` skill, which converts an agent's prompt file into an agent-logic file, an XState v5 machine config that an agent-logic viewer renders as a statechart, by running version 0.1.0 of the `codeassembly-agent-logic` package through `pnpm dlx`. (#141)
12
+ - Makes `prepare-prototype-brief` post the approved brief on the ticket as a comment without asking a second time, with a summary line that names the lenses and the brief artifact and the full brief in a collapsed `<details>` block, and skips the post when an earlier run already posted it. (#145)
13
+ - Adds the `merge.approval` preference, whose value `auto` makes `merge-pr` merge without its approval gate when the pull request is on GitHub and not breaking, its merge state is `CLEAN` or `HAS_HOOKS`, and the run neither reports a notice nor makes a decision of its own. (#147)
14
+ - Adds the `--confirm` option to `merge-pr`, which shows the approval gate for one run when `merge.approval` is `auto`. (#147)
15
+ - Adds the `project.stages` key to `.agents/preferences.yaml`, which declares the maturity, sensitivity, or audience of one subdirectory, and which `derive-session-context` reports as `project_stages` with each inherited value filled in, so that `plan` and `design-and-plan` apply the stage of the subdirectory that contains the work. (#150)
16
+ - Adds `exploration` as a `project.maturity` value, below `hobby`, for work whose output is still taking shape and that nothing depends on yet. (#150)
17
+ - Directs `plan` and `design-and-plan` to verify unsettled output, such as output at the `exploration` maturity or from a prototype, through a round in which the developer reads it on real inputs, and to plan golden references, answer keys, and evals only as tasks that follow the developer's approval of an output. (#150)
18
+ - Adds an optional `## Notes for reviewers` section to the change summary written by `summarize-change`, along with a reader test that each line of that section, `## Why`, and `## How to test` must pass by changing what a reviewer who hasn't read the ticket checks or decides. (#151)
19
+ - Directs `create-pr` to include `## Notes for reviewers` in the pull-request body and not to add a section, a note, or a test plan of its own. (#151)
20
+ - Narrows the instruction in the shared `AGENTS.md`, `align-ticket-with-implementation`, and `review-branch` that had an agent report every divergence from the ticket's proposal in the pull-request description: It now names `## Notes for reviewers` and applies only to a divergence that changes what a reviewer checks. (#151)
21
+ - Replaces the key-value completion lines at the end of `merge-pr`, `merge-gh-pr`, and `merge-bb-pr` replies with an outcome summary under a heading that states whether the PR was merged. (#158)
22
+ - Adds a `summary` field to the JSON that `merge-gh-pr.mjs` prints after a confirmed merge, and changes the script to print a JSON object containing only `summary` on stdout when the merge is refused, fails, or cannot be confirmed. (#158)
23
+ - Adds the ticket's close to the closing-post offer that ends a spike, so that one consent from the developer posts the conclusion and closes the ticket as completed, and a rerun skips whichever of the two writes is already done. (#159)
24
+ - Makes `merge-pr` take its merge strategy and branch deletion from the `merge.strategy` (`squash`, `merge`, or `rebase`) and `merge.deletion_strategy` (`both`, `remote`, or `none`) preferences, which `derive-session-context` reports as `merge_strategy` and `merge_deletion_strategy` and which the `--strategy` and `--delete` flags override for one run. (#160)
25
+ - Makes `derive-session-context` name the preferences file that contains an invalid value when it rejects one, in addition to the key and the accepted values. (#160)
26
+ - Adds the `list-implementation-order` skill, which prints the conversation's open tickets as a tree in implementation order for a narrow column, with each ticket indented under its blocker, the blockers that the indent does not show, and a line for each change that must be published and upgraded in a consuming repository before a blocked ticket can start. (#163)
27
+ - Changes the merged summary of `merge-gh-pr` and `merge-bb-pr` to a heading that names the target branch, the strategy, and the short merge commit hash, followed by labelled lines for the commit title, the PR link, and the remote branch deletion, with `merge-gh-pr` reading the commit title from GitHub after the merge and falling back to the submitted title, or to `unavailable`, when the read fails. (#164)
28
+ - Changes the refusal summary of `merge-pr`, `merge-gh-pr`, and `merge-bb-pr` to a `## ❌ Not merged` heading followed by `PR:` and `Reason:` lines, and gives the unconfirmed-merge summary of `merge-gh-pr` the same layout under `## ⚠️ Merge not confirmed`. (#164)
29
+ - Adds the implementation-order list, which shows the order, the blockers, and the publish gates of the tickets, to the output of a split's launch prompts and of the `triage-spike-findings`, `triage-feedback`, and `wrap-up` reports whenever the run creates two or more tickets. (#165)
30
+ - Adds each `kb.yaml` registry entry that declares `in_default_scope: true` to the default scope of `kb-retrieve` and `kb-retrieve-events`, which previously searched only the discovered `.kb/` and the registry's `default_kb` unless `--all-kbs` was passed. (#172)
31
+ - Makes `kb-add` refuse a write into a KB whose `visibility` is `shared` with a `shared-kb` error unless the invocation passes the new `--shared` flag, refuse a write with `invalid-config` when the KB's `.kb/config.yaml` is malformed, and report the KB's `visibility` in the `--survey` result. (#173)
32
+ - Makes `capture-event` refuse a fresh capture into a store whose `visibility` is `shared` with a `shared-store` error unless the invocation passes the new `--shared` flag, and with `invalid-config` when the store's `.kb/config.yaml` is malformed, while leaving `--amend` exempt. (#173)
33
+ - Adds a rule to the `capture-feedback` and `migrate-feedback-memories` skills that permits `--shared` only on a retry after a `shared-store` refusal and only for a record that contains nothing unfit for the store's collaborators, and that leaves any other record uncaptured rather than redirected to another store. (#173)
34
+ - Adds `unsearchedPrivateStores` to the output of the `kb-retrieve` and `kb-retrieve-events` helpers, listing each registered store whose visibility is `private` and that the recall did not search, and directs the agent in both skills to report such a recall as partial and to name, for each store, the `--store` or `--all-kbs` flag that would include it, or that its path needs fixing. (#174)
35
+ - Adds a rule to the `williamthorsen-ticketing-preferences` rulebook that limits a ticket to work in one repository and directs that a change needing two or more repositories get one ticket per repository, with the merge order, upstream first, recorded as blocked-by relations. (#179)
36
+ - Makes `triage-spike-findings`, on a run given a batch, close the follow-up triage ticket as completed without a closing post once it posts the dispositions comment, and lists that close in the run's single confirmation and in its report. (#180)
50
37
 
51
38
  ### 🐛 Bug fixes
52
39
 
53
- - Fixes the issue that `create-commit` wrote the change itself, in the wrong checkout, when the checkout in which it ran did not contain the change, and makes the skill stop without staging and report the directory and its `git status --short` output instead. (#110)
54
- - Fixes the issue that `resolve-scopes` resolved every path in a root package (`packages: ['.']` in `pnpm-workspace.yaml`) to the checkout directory's name, such as `app` or `app.106`, rather than to `root`, while nested packages keep their own scopes. (#111)
55
- - Fixes the issue that a `project.scopes` entry naming the repository root without a `name` took the checkout directory's name as its scope, by making `resolve-scopes` skip such an entry with a warning and keep reading one that declares a `name`. (#111)
56
- - Fixes the issue that rulebooks and skills such as the collaboration preferences, the writing preferences, the content specification, `review-branch`, and `action-items.md` still contained cleft constructions, figurative verbs, and overused words forbidden by the plain-speech rule, and bumps the three rulebooks to versions 17, 12, and 33 without changing what they direct. (#114)
57
- - Fixes the issue that skills and subagents that resolved a ticket read its body and skipped its comments, on GitHub, on Jira, and for a ticket artifact whose frontmatter names a `ticket_ref`. (#121)
58
- - Fixes the issue that `prepare-prototype-brief` dispatched every builder at once, so that one page that hung its renderer stalled the browser calls of every builder; the skill now dispatches builders one at a time and stops a builder that has not replied 30 minutes after its dispatch. (#126)
59
- - Fixes the issue that `assess-code-health` dropped each proposal whose change creates a file, by limiting `paths` in `code-health-assessor` to files that exist at assessment time and directing the assessor to name a created file in `change`. (#131)
60
- - Fixes the issue that `assess-code-health`, `assess-usability`, and `investigate-spike` offered a spike's closing post before the `triage-spike-findings` round, when the post could not yet answer the ticket's decisions to enable. (#133)
61
- - Fixes the issue that `triage-spike-findings` never offered the closing post, although its round ends the spike when the findings leave items to triage. (#133)
62
- - Fixes the issue that the Rovo harness's `AGENTS.md` included a personal interaction preference, which forbade `ask_user_questions`, in the guidance that every Rovo user received. (#136)
63
- - Fixes the issue that the rule against interactive selectors in `williamthorsen-collaboration-preferences` did not name the tools that present those selectors, by naming Claude Code's `AskUserQuestion` and Rovo's `ask_user_questions`. (#136)
64
- - Fixes the issue that `assess-code-health.mjs sense` reported a `dead-code` unused-dependency row for a `package.json` matched by an `--exclude` glob, although every other sensor drops the paths that an `--exclude` glob matches. (#138)
40
+ - Fixes the issue that the `live-worktree-policy` rulebook's example of the `{path}.live` naming gave `~/repos/projects/codeassembly` paths, when the repository is cloned under `~/repos/oss/`. (#157)
41
+ - Fixes the issue that `--store` in `kb-retrieve` and `kb-retrieve-events` resolved a name against the user-level `kb.yaml` alone and did not find a store registered only in the project's `kb.yaml`. (#174)
42
+ - Fixes the issue that the Split rule in the `next-steps-after-plan` partial never recommended splitting a small plan that touches two or more repositories, because the rule required every plan to be too large for one implement-and-review pass. (#179)
65
43
  <!-- /section:release-notes -->
66
44
 
67
45
  ## Using the library
@@ -0,0 +1,6 @@
1
+ `unsearchedPrivateStores` names each registered `private` store that the recall did not search. A private store may contain notes that no other store has, so a recall that skipped one is partial. Whenever the list is not empty, whether or not candidates were returned, tell the user that the recall was partial and name each store by its `name`:
2
+
3
+ - For a store that a `path does not exist` warning also names, say that its path needs fixing: Neither flag can search a store whose directory is absent.
4
+ - For every other store, name the flag that would include it: `--store <name>` for that store alone, or `--all-kbs` for every registered store.
5
+
6
+ In an empty result, never report that nothing was found without this disclosure.
@@ -59,6 +59,8 @@ helpers:
59
59
  out: skills/curate-feedback/curate-feedback.mjs
60
60
  - entry: ../src/lesson-clusters/cli.ts
61
61
  out: skills/lesson-clusters/lesson-clusters.mjs
62
+ - entry: ../src/implementation-order/cli.ts
63
+ out: skills/implementation-order/implementation-order.mjs
62
64
  - entry: ../src/triage-feedback/cli.ts
63
65
  out: skills/triage-feedback/triage-feedback.mjs
64
66
  - entry: ../src/triage-spike-findings/cli.ts
@@ -3,14 +3,14 @@ slug: live-worktree-policy
3
3
  description: How a repository with a `live` worktree deploys, and where changes to it are authored.
4
4
  standalone: wanted in the repositories that have a `live` worktree, which declare it directly
5
5
  delivery: ambient
6
- version: '3'
6
+ version: '4'
7
7
  ---
8
8
 
9
9
  # Live worktree policy
10
10
 
11
11
  A repository that keeps a worktree on a `live` branch deploys from that worktree, and never from the main one. Deployed configuration, installed commands, and loaded extensions all resolve through it, so a path derived from the main worktree names a file that nothing on the machine reads.
12
12
 
13
- Because `git worktree list` reports every worktree of a repository from any one of them, a `live` row identifies a participating repository and gives the deployment worktree's path in the same line. That worktree is named `{path}.live`, where `{path}` is the main worktree's path: `~/repos/projects/codeassembly` is accompanied by `~/repos/projects/codeassembly.live`. If the machine has the repo registry, `thor-repo list --tag live` enumerates the tagged set; for a registry whose entries do not have the tag, it returns nothing, which is not evidence that a repository does not deploy from a `live` worktree.
13
+ Because `git worktree list` reports every worktree of a repository from any one of them, a `live` row identifies a participating repository and gives the deployment worktree's path in the same line. That worktree is named `{path}.live`, where `{path}` is the main worktree's path: `~/repos/oss/codeassembly` is accompanied by `~/repos/oss/codeassembly.live`. If the machine has the repo registry, `thor-repo list --tag live` enumerates the tagged set; for a registry whose entries do not have the tag, it returns nothing, which is not evidence that a repository does not deploy from a `live` worktree.
14
14
 
15
15
  A merged change is deployed to the machine only once `live` is advanced to it. Until then the deployed behavior is the old one, so a change is not live while `live` still points at its predecessor.
16
16
 
@@ -2,7 +2,7 @@
2
2
  slug: williamthorsen-ticketing-preferences
3
3
  description: William Thorsen's preferences for how work is split across tickets, how the relationships between them are recorded, and which figures a ticket body states.
4
4
  delivery: hook
5
- version: '6'
5
+ version: '7'
6
6
  ---
7
7
 
8
8
  # William Thorsen's ticketing preferences
@@ -13,6 +13,8 @@ When work deserves more than one pull request, give each pull request its own ti
13
13
 
14
14
  A piece gets its own ticket when it can be merged and verified on its own, not when it looks large enough to deserve one. When the count is a judgment, cut finer: Merging two tickets that turned out to be one costs an edit and a close, while splitting one that turned out to be four costs a rewrite of the original, new children, a re-cut plan, and whatever was committed against the superseded contract.
15
15
 
16
+ A ticket covers work in one repository. When a change needs work in two or more repositories, give each repository its own ticket, even when one repository's share is small, and record the merge order, upstream first, as blocked-by relations. The repository boundary does not need a judgment: A pull request lives in one repository, so a ticket that spans two cannot close on a single merge.
17
+
16
18
  This governs work already judged to need more than one pull request. Whether work discovered mid-change becomes a ticket at all is decided first by the fold-in default in [scope-and-deferral.md](../../skills/_data/scope-and-deferral.md).
17
19
 
18
20
  Record the relationships natively when the tracker supports them -- blockers, and parent to child -- rather than as prose in a body. Record a blocker when there is some probability that one ticket affects another and should be merged first, not only when that is certain: A ticket whose design takes another ticket's outcome as an input is blocked by it.
@@ -57,7 +57,7 @@ Two artifacts are never edited once written, because a rewrite of either destroy
57
57
 
58
58
  That restraint on editing a record applies to the remote ticket as well, from the point its work is handed to implementation. Design comes before that point: `design-and-plan` refines a raw ticket, and it may rewrite any section or the whole ticket.
59
59
 
60
- From that point on, the ticket's `## Problem`, `## Context`, and `## Proposed solution` record what was known and proposed when the work began, so they are never revised toward the outcome: A proposal does not become wrong because the implementer did something else, and revising it destroys the only record of what was foreseen. Report a divergence between one of those sections and the implementation in the pull-request description, whose job is to describe the change under review.
60
+ From that point on, the ticket's `## Problem`, `## Context`, and `## Proposed solution` record what was known and proposed when the work began, so they are never revised toward the outcome: A proposal does not become wrong because the implementer did something else, and revising it destroys the only record of what was foreseen. Report a divergence between one of those sections and the implementation in the pull-request description's `## Notes for reviewers` only when it changes what a reviewer checks, per the reader test that `summarize-change` states, and state it as the current fact rather than as a departure from the ticket.
61
61
 
62
62
  Acceptance criteria are the one revisable part, because they alone are the contract that an implementation can falsify. Align them to the implementation only when the two conflict, or when the gap would mislead a reviewer. Small improvements are made as a matter of course, and the ticket is not rewritten to pretend they were foreseen.
63
63
 
@@ -136,7 +136,7 @@ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.pus
136
136
  `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
137
137
  `,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let s="end"in t.value?t.value.end:void 0;(Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment"?s?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){yn(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let s=!this.onKeyLine&&this.indent===e.indent,i=s&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",r=[];if(i&&t.sep&&!t.value){let o=[];for(let l=0;l<t.sep.length;++l){let c=t.sep[l];switch(c.type){case"newline":o.push(l);break;case"space":break;case"comment":c.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(r=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(r.push(this.sourceToken),e.items.push({start:r}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):i||t.value?(r.push(this.sourceToken),e.items.push({start:r,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ie(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]});else if(ga(t.key)&&!ie(t.sep,"newline")){let o=Pe(t.start),l=t.key,c=t.sep;c.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:l,sep:c}]})}else r.length>0?t.sep=t.sep.concat(r,this.sourceToken):t.sep.push(this.sourceToken);else if(ie(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let o=Pe(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:r,key:null,sep:[this.sourceToken]}):ie(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);i||t.value?(e.items.push({start:r,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!t.explicitKey&&t.sep&&!ie(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else s&&e.items.push({start:r});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let s="end"in t.value?t.value.end:void 0;(Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment"?s?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){yn(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||ie(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let s=this.startBlockValue(e);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while(s?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:i,sep:[]}):t.sep?this.stack.push(i):Object.assign(t,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let s=this.startBlockValue(e);s?this.stack.push(s):(yield*this.pop(),yield*this.step())}else{let s=this.peek(2);if(s.type==="block-map"&&(this.type==="map-value-ind"&&s.indent===e.indent||this.type==="newline"&&!s.items[s.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&s.type!=="flow-collection"){let i=gn(s),r=Pe(i);ma(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let l={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
138
138
  `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
139
- `,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=gn(e),s=Pe(t);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=gn(e),s=Pe(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(s=>s.type==="newline"||s.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};ya.Parser=ri});var Ea=y(dt=>{"use strict";var ba=Ys(),Qd=st(),ft=ot(),Xd=Vn(),zd=O(),Zd=ii(),Sa=oi();function wa(n){let e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new Zd.LineCounter||null,prettyErrors:e}}a(wa,"parseOptions");function eh(n,e={}){let{lineCounter:t,prettyErrors:s}=wa(e),i=new Sa.Parser(t?.addNewLine),r=new ba.Composer(e),o=Array.from(r.compose(i.parse(n)));if(s&&t)for(let l of o)l.errors.forEach(ft.prettifyError(n,t)),l.warnings.forEach(ft.prettifyError(n,t));return o.length>0?o:Object.assign([],{empty:!0},r.streamInfo())}a(eh,"parseAllDocuments");function va(n,e={}){let{lineCounter:t,prettyErrors:s}=wa(e),i=new Sa.Parser(t?.addNewLine),r=new ba.Composer(e),o=null;for(let l of r.compose(i.parse(n),!0,n.length))if(!o)o=l;else if(o.options.logLevel!=="silent"){o.errors.push(new ft.YAMLParseError(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&t&&(o.errors.forEach(ft.prettifyError(n,t)),o.warnings.forEach(ft.prettifyError(n,t))),o}a(va,"parseDocument");function th(n,e,t){let s;typeof e=="function"?s=e:t===void 0&&e&&typeof e=="object"&&(t=e);let i=va(n,t);if(!i)return null;if(i.warnings.forEach(r=>Xd.warn(i.options.logLevel,r)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:s},t))}a(th,"parse");function nh(n,e,t){let s=null;if(typeof e=="function"||Array.isArray(e)?s=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let i=Math.round(t);t=i<1?void 0:i>8?{indent:8}:{indent:i}}if(n===void 0){let{keepUndefined:i}=t??e??{};if(!i)return}return zd.isDocument(n)&&!s?n.toString(t):new Qd.Document(n,s,t).toString(t)}a(nh,"stringify");dt.parse=th;dt.parseAllDocuments=eh;dt.parseDocument=va;dt.stringify=nh});var ka=y(C=>{"use strict";var sh=Ys(),ih=st(),rh=Os(),ai=ot(),oh=Ke(),re=O(),ah=ee(),lh=I(),ch=ne(),uh=se(),fh=pn(),dh=ni(),hh=ii(),ph=oi(),bn=Ea(),Aa=xe();C.Composer=sh.Composer;C.Document=ih.Document;C.Schema=rh.Schema;C.YAMLError=ai.YAMLError;C.YAMLParseError=ai.YAMLParseError;C.YAMLWarning=ai.YAMLWarning;C.Alias=oh.Alias;C.isAlias=re.isAlias;C.isCollection=re.isCollection;C.isDocument=re.isDocument;C.isMap=re.isMap;C.isNode=re.isNode;C.isPair=re.isPair;C.isScalar=re.isScalar;C.isSeq=re.isSeq;C.Pair=ah.Pair;C.Scalar=lh.Scalar;C.YAMLMap=ch.YAMLMap;C.YAMLSeq=uh.YAMLSeq;C.CST=fh;C.Lexer=dh.Lexer;C.LineCounter=hh.LineCounter;C.Parser=ph.Parser;C.parse=bn.parse;C.parseAllDocuments=bn.parseAllDocuments;C.parseDocument=bn.parseDocument;C.stringify=bn.stringify;C.visit=Aa.visit;C.visitAsync=Aa.visitAsync});import{readFile as qp}from"node:fs/promises";import wi from"node:path";import x from"node:process";import{parseArgs as _p}from"node:util";function Ei(n){return n instanceof Error||Object.prototype.toString.call(n)==="[object Error]"}a(Ei,"isError");function ae(n){try{return Ei(n)&&typeof n.message=="string"&&n.message!==""?n.message:String(n)}catch{return"[unstringifiable value]"}}a(ae,"describeError");var Ai={name:"codeassembly-guidance",version:"0.6.0",description:"The CodeAssembly library of agent guidance: rulebooks, skills, and subagents that the codeassembly CLI deploys",keywords:["agents","ai","claude-code","rulebooks","skills"],homepage:"https://github.com/williamthorsen/codeassembly-guidance/tree/main/packages/guidance#readme",bugs:{url:"https://github.com/williamthorsen/codeassembly-guidance/issues"},repository:{type:"git",url:"https://github.com/williamthorsen/codeassembly-guidance.git",directory:"packages/guidance"},license:"ISC",author:"William Thorsen <william@thorsen.dev> (https://github.com/williamthorsen)",sideEffects:!1,type:"module",exports:{"./package.json":"./package.json","./schemas/*.json":"./schemas/*.json"},bin:{"codeassembly-validate-preferences":"bin/codeassembly-validate-preferences.js"},files:["bin","!bin/__tests__","content","!content/**/__tests__","!content/test-utils","CHANGELOG.md",".meta/changelog.json","schemas"],scripts:{build:"codeassembly bundle-helpers && node scripts/generate-work-types.ts && node scripts/generate-kb-standard-tags.ts","check:content":"codeassembly validate && codeassembly bundle-helpers --check && node scripts/generate-work-types.ts --check && node scripts/generate-kb-standard-tags.ts --check","check:post":"pnpm run check:content","check:strict:post":"pnpm run check:content",prepack:"node scripts/generate-schemas.ts","test:post":"pnpm run test:sh && pnpm run test:smoke","test:sh":"bash scripts/test-sh.sh","test:smoke":"node scripts/__tests__/smoke-test-skill-helpers.ts"},devDependencies:{"@hyperjump/json-schema":"1.18.0","@types/node":"catalog:","@williamthorsen/change-grammar":"catalog:","@williamthorsen/kb":"0.11.1","@williamthorsen/nmr":"catalog:","@williamthorsen/toolbelt.errors":"catalog:","@williamthorsen/toolbelt.terminal":"catalog:","@williamthorsen/toolbelt.testing":"catalog:","@williamthorsen/toolbelt.vitest":"catalog:",codeassembly:"catalog:",esbuild:"catalog:",eslint:"catalog:","happy-dom":"catalog:",marklassian:"1.2.1",ulid:"3.0.2",vitest:"catalog:",yaml:"catalog:",zod:"catalog:"},engines:{node:">=24"},codeassembly:{content:"content"}};import{realpathSync as ki}from"node:fs";import Ni from"node:process";import{fileURLToPath as Il}from"node:url";function Oi(n,e){let t=Ni.argv[1];if(t===void 0)return!1;try{return ki(Il(n))===ki(t)}catch(s){return Ni.stderr.write(`${e}: warning: could not determine entry point: ${ae(s)}
139
+ `,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=gn(e),s=Pe(t);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=gn(e),s=Pe(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(s=>s.type==="newline"||s.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};ya.Parser=ri});var Ea=y(dt=>{"use strict";var ba=Ys(),Qd=st(),ft=ot(),Xd=Vn(),zd=O(),Zd=ii(),Sa=oi();function wa(n){let e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new Zd.LineCounter||null,prettyErrors:e}}a(wa,"parseOptions");function eh(n,e={}){let{lineCounter:t,prettyErrors:s}=wa(e),i=new Sa.Parser(t?.addNewLine),r=new ba.Composer(e),o=Array.from(r.compose(i.parse(n)));if(s&&t)for(let l of o)l.errors.forEach(ft.prettifyError(n,t)),l.warnings.forEach(ft.prettifyError(n,t));return o.length>0?o:Object.assign([],{empty:!0},r.streamInfo())}a(eh,"parseAllDocuments");function va(n,e={}){let{lineCounter:t,prettyErrors:s}=wa(e),i=new Sa.Parser(t?.addNewLine),r=new ba.Composer(e),o=null;for(let l of r.compose(i.parse(n),!0,n.length))if(!o)o=l;else if(o.options.logLevel!=="silent"){o.errors.push(new ft.YAMLParseError(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&t&&(o.errors.forEach(ft.prettifyError(n,t)),o.warnings.forEach(ft.prettifyError(n,t))),o}a(va,"parseDocument");function th(n,e,t){let s;typeof e=="function"?s=e:t===void 0&&e&&typeof e=="object"&&(t=e);let i=va(n,t);if(!i)return null;if(i.warnings.forEach(r=>Xd.warn(i.options.logLevel,r)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:s},t))}a(th,"parse");function nh(n,e,t){let s=null;if(typeof e=="function"||Array.isArray(e)?s=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let i=Math.round(t);t=i<1?void 0:i>8?{indent:8}:{indent:i}}if(n===void 0){let{keepUndefined:i}=t??e??{};if(!i)return}return zd.isDocument(n)&&!s?n.toString(t):new Qd.Document(n,s,t).toString(t)}a(nh,"stringify");dt.parse=th;dt.parseAllDocuments=eh;dt.parseDocument=va;dt.stringify=nh});var ka=y(C=>{"use strict";var sh=Ys(),ih=st(),rh=Os(),ai=ot(),oh=Ke(),re=O(),ah=ee(),lh=I(),ch=ne(),uh=se(),fh=pn(),dh=ni(),hh=ii(),ph=oi(),bn=Ea(),Aa=xe();C.Composer=sh.Composer;C.Document=ih.Document;C.Schema=rh.Schema;C.YAMLError=ai.YAMLError;C.YAMLParseError=ai.YAMLParseError;C.YAMLWarning=ai.YAMLWarning;C.Alias=oh.Alias;C.isAlias=re.isAlias;C.isCollection=re.isCollection;C.isDocument=re.isDocument;C.isMap=re.isMap;C.isNode=re.isNode;C.isPair=re.isPair;C.isScalar=re.isScalar;C.isSeq=re.isSeq;C.Pair=ah.Pair;C.Scalar=lh.Scalar;C.YAMLMap=ch.YAMLMap;C.YAMLSeq=uh.YAMLSeq;C.CST=fh;C.Lexer=dh.Lexer;C.LineCounter=hh.LineCounter;C.Parser=ph.Parser;C.parse=bn.parse;C.parseAllDocuments=bn.parseAllDocuments;C.parseDocument=bn.parseDocument;C.stringify=bn.stringify;C.visit=Aa.visit;C.visitAsync=Aa.visitAsync});import{readFile as qp}from"node:fs/promises";import wi from"node:path";import x from"node:process";import{parseArgs as _p}from"node:util";function Ei(n){return n instanceof Error||Object.prototype.toString.call(n)==="[object Error]"}a(Ei,"isError");function ae(n){try{return Ei(n)&&typeof n.message=="string"&&n.message!==""?n.message:String(n)}catch{return"[unstringifiable value]"}}a(ae,"describeError");var Ai={name:"codeassembly-guidance",version:"0.7.0",description:"The CodeAssembly library of agent guidance: rulebooks, skills, and subagents that the codeassembly CLI deploys",keywords:["agents","ai","claude-code","rulebooks","skills"],homepage:"https://github.com/williamthorsen/codeassembly-guidance/tree/main/packages/guidance#readme",bugs:{url:"https://github.com/williamthorsen/codeassembly-guidance/issues"},repository:{type:"git",url:"https://github.com/williamthorsen/codeassembly-guidance.git",directory:"packages/guidance"},license:"ISC",author:"William Thorsen <william@thorsen.dev> (https://github.com/williamthorsen)",sideEffects:!1,type:"module",exports:{"./package.json":"./package.json","./schemas/*.json":"./schemas/*.json"},bin:{"codeassembly-validate-preferences":"bin/codeassembly-validate-preferences.js"},files:["bin","!bin/__tests__","content","!content/**/__tests__","!content/test-utils","CHANGELOG.md",".meta/changelog.json","schemas"],scripts:{build:"codeassembly bundle-helpers && node scripts/generate-work-types.ts && node scripts/generate-kb-standard-tags.ts","check:content":"codeassembly validate && codeassembly bundle-helpers --check && node scripts/generate-work-types.ts --check && node scripts/generate-kb-standard-tags.ts --check","check:post":"pnpm run check:content","check:strict:post":"pnpm run check:content",prepack:"node scripts/generate-schemas.ts","test:post":"pnpm run test:sh && pnpm run test:smoke","test:sh":"bash scripts/test-sh.sh","test:smoke":"node scripts/__tests__/smoke-test-skill-helpers.ts"},devDependencies:{"@hyperjump/json-schema":"1.18.0","@types/node":"catalog:","@williamthorsen/change-grammar":"catalog:","@williamthorsen/kb":"0.12.0","@williamthorsen/nmr":"catalog:","@williamthorsen/toolbelt.errors":"catalog:","@williamthorsen/toolbelt.terminal":"catalog:","@williamthorsen/toolbelt.testing":"catalog:","@williamthorsen/toolbelt.vitest":"catalog:",codeassembly:"catalog:",esbuild:"catalog:",eslint:"catalog:","happy-dom":"catalog:",marklassian:"1.2.1",ulid:"3.0.2",vitest:"catalog:",yaml:"catalog:",zod:"catalog:"},engines:{node:">=24"},codeassembly:{content:"content"}};import{realpathSync as ki}from"node:fs";import Ni from"node:process";import{fileURLToPath as Il}from"node:url";function Oi(n,e){let t=Ni.argv[1];if(t===void 0)return!1;try{return ki(Il(n))===ki(t)}catch(s){return Ni.stderr.write(`${e}: warning: could not determine entry point: ${ae(s)}
140
140
  `),!0}}a(Oi,"isEntryPoint");function Ci(n,e){let t=Math.max(1,Math.floor(n.length/3)),s;for(let i of e.toSorted()){let r=Pl(n.toLowerCase(),i.toLowerCase());r<=t&&(s===void 0||r<s.distance)&&(s={key:i,distance:r})}return s?.key}a(Ci,"findNearestKey");function Pl(n,e){let t=Array.from({length:e.length+1},(s,i)=>i);for(let s=1;s<=n.length;s++){let i=[s];for(let r=1;r<=e.length;r++){let o=(t[r-1]??0)+(n[s-1]===e[r-1]?0:1);i[r]=Math.min((t[r]??0)+1,(i[r-1]??0)+1,o)}t=i}return t[e.length]??0}a(Pl,"measureEditDistance");function bt(n){let e;for(let t=0;t<n.length;t+=1){let s=n[t];if(s==="\\"&&e!=="'"){t+=1;continue}if(e!==void 0){s===e&&(e=void 0);continue}if(s==='"'||s==="'"){e=s;continue}if(s==="#"&&(t===0||/\s/.test(n[t-1]??"")))return t}return-1}a(bt,"findHashCommentStart");function De(n){let e=0;for(let t of n)t===`
141
141
  `&&(e+=1);return e}a(De,"countNewlines");function V(n,e){let t=0;for(let s=0;s<e&&s<n.length;s+=1)n[s]===`
142
142
  `&&(t+=1);return t}a(V,"countNewlinesBefore");function le(n){let e=[],t=/`+/g,s=t.exec(n);for(;s!==null;){let i=ql(n,t,s[0].length);if(i===null){t.lastIndex=s.index+s[0].length,s=t.exec(n);continue}e.push({start:s.index,end:i.index+i[0].length}),s=t.exec(n)}return e}a(le,"findCodeSpans");function G(n,e){let t=le(n.text),s=[],i=-1;for(let r of n.text.matchAll(e)){let o=r.index;if(t.some(c=>o>=c.start&&o<c.end))continue;let l=Se(n.text,o,o+r[0].length);l.start!==i&&(i=l.start,s.push({line:n.line+V(n.text,l.start),sentence:j(n.text.slice(l.start,l.end))}))}return s}a(G,"findMatchingSentences");function Ti(n,e,t){let s=Se(n,e,t);return j(n.slice(s.start,s.end))}a(Ti,"findSentence");function Se(n,e,t){let s=new RegExp(Pi),i=0,r=s.exec(n);for(;r!==null;){let l=r.index+1;if(l>=t)break;l<=e&&(i=l),r=s.exec(n)}let o=r===null?n.length:Math.max(r.index+1,t);return{start:Li(n,i,o),end:o}}a(Se,"findSentenceBounds");function j(n){return n.replaceAll(/\s+/g," ").trim()}a(j,"flattenWhitespace");function St(n){return Rl(n)>=Ll}a(St,"isProseLiteral");function Ii(n){let e=n.matchAll(Pi).map(i=>i.index+1).toArray();e.at(-1)!==n.length&&e.push(n.length);let t=[],s=0;for(let i of e){let r=Li(n,s,i);r<i&&t.push({start:r,end:i}),s=i}return t}a(Ii,"listSentenceBounds");var Ll=3,Pi=/[.!?](?=\s|$)/g;function Rl(n){return n.split(/\s+/).filter(e=>/[a-z]{2}/i.test(e)).length}a(Rl,"countWords");function ql(n,e,t){let s=e.exec(n);for(;s!==null&&s[0].length!==t;)s=e.exec(n);return s}a(ql,"findClosingRun");function Li(n,e,t){let s=e;for(;s<t&&/\s/.test(n[s]??"");)s+=1;return s}a(Li,"skipWhitespace");var _l=new Set([" "," ","\r"]),Ml=new Set(['"',"'","`"]),Dl=new Set(["(",",","=",":","[","!","&","|","?","{",";","+","-","*","%","<",">"]);function Ri(n,e){let t=[],s;function i(){s!==void 0&&t.push({file:n,line:s.line,text:s.texts.join(`