codeassembly-guidance 0.0.0 → 0.2.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 (219) hide show
  1. package/.meta/changelog.json +1320 -0
  2. package/CHANGELOG.md +315 -0
  3. package/LICENSE +7 -0
  4. package/README.md +195 -1
  5. package/bin/codeassembly-validate-preferences.js +18 -0
  6. package/content/_partials/README.md +192 -0
  7. package/content/_partials/code-descriptions.md +4 -0
  8. package/content/_partials/code-style.md +7 -0
  9. package/content/_partials/comment-discipline.md +89 -0
  10. package/content/_partials/concision.md +3 -0
  11. package/content/_partials/diff-audit-checklist.md +9 -0
  12. package/content/_partials/file-access.md +4 -0
  13. package/content/_partials/live-repo-writes.md +13 -0
  14. package/content/_partials/plain-speech-calibration.md +70 -0
  15. package/content/_partials/plain-speech.md +13 -0
  16. package/content/_partials/prose-line-breaks.md +3 -0
  17. package/content/_partials/record-marker.md +1 -0
  18. package/content/_partials/reduced-object-relative.md +28 -0
  19. package/content/_partials/shell-commands.md +3 -0
  20. package/content/_partials/target-file-set-resolution.md +22 -0
  21. package/content/_partials/technical-recommendations.md +6 -0
  22. package/content/_partials/test-structure-audit-checklist.md +7 -0
  23. package/content/_partials/ticket-assessment-baseline.md +12 -0
  24. package/content/_partials/ticket-assessment.md +202 -0
  25. package/content/_partials/work-type-choice.md +13 -0
  26. package/content/codeassembly-content.yaml +59 -0
  27. package/content/collections/all.md +11 -0
  28. package/content/collections/atlassian.md +17 -0
  29. package/content/collections/recommended.md +41 -0
  30. package/content/collections/triage.md +13 -0
  31. package/content/collections/williamthorsen.md +26 -0
  32. package/content/guidance/README.md +22 -0
  33. package/content/guidance/_harnesses/claude/CLAUDE.md +6 -0
  34. package/content/guidance/_harnesses/rovo/AGENTS.md +5 -0
  35. package/content/guidance/_harnesses/rovo/codeassembly-guidance.md +4 -0
  36. package/content/guidance/rulebooks/accessibility-conventions.md +38 -0
  37. package/content/guidance/rulebooks/cli-conventions.md +192 -0
  38. package/content/guidance/rulebooks/codeassembly-content-specification.md +184 -0
  39. package/content/guidance/rulebooks/command-output-conventions.md +14 -0
  40. package/content/guidance/rulebooks/commit-conventions.md +72 -0
  41. package/content/guidance/rulebooks/generated-content-policy.md +10 -0
  42. package/content/guidance/rulebooks/live-worktree-policy.md +19 -0
  43. package/content/guidance/rulebooks/readme-conventions.md +74 -0
  44. package/content/guidance/rulebooks/shared-data-conventions.md +14 -0
  45. package/content/guidance/rulebooks/shell-conventions.md +273 -0
  46. package/content/guidance/rulebooks/ui-copy-conventions.md +34 -0
  47. package/content/guidance/rulebooks/williamthorsen-code-layout-preferences.md +102 -0
  48. package/content/guidance/rulebooks/williamthorsen-collaboration-preferences.md +60 -0
  49. package/content/guidance/rulebooks/williamthorsen-comment-preferences.md +30 -0
  50. package/content/guidance/rulebooks/williamthorsen-subagent-model-preferences.md +15 -0
  51. package/content/guidance/rulebooks/williamthorsen-ticketing-preferences.md +22 -0
  52. package/content/guidance/rulebooks/williamthorsen-tooling-preferences.md +36 -0
  53. package/content/guidance/rulebooks/williamthorsen-typescript-preferences.md +90 -0
  54. package/content/guidance/rulebooks/williamthorsen-workflow-preferences.md +58 -0
  55. package/content/guidance/rulebooks/williamthorsen-writing-preferences.md +80 -0
  56. package/content/guidance/shared/AGENTS.md +51 -0
  57. package/content/scripts/README.md +44 -0
  58. package/content/scripts/check-branch-currency.mjs +11 -0
  59. package/content/scripts/check-prose.mjs +171 -0
  60. package/content/scripts/describe-change.mjs +165 -0
  61. package/content/scripts/get-ticket-id.sh +131 -0
  62. package/content/scripts/manage-jira-ticket.mjs +214 -0
  63. package/content/scripts/resolve-frontmatter.sh +540 -0
  64. package/content/scripts/resolve-review-run.mjs +12 -0
  65. package/content/scripts/select-lede-exemplars.mjs +208 -0
  66. package/content/scripts/validate-preferences.mjs +146 -0
  67. package/content/skills/_data/action-items.md +83 -0
  68. package/content/skills/_data/artifact-conventions.md +1001 -0
  69. package/content/skills/_data/bitbucket-pr-access.md +89 -0
  70. package/content/skills/_data/branch-currency.md +36 -0
  71. package/content/skills/_data/branch-format.md +34 -0
  72. package/content/skills/_data/change-record.md +163 -0
  73. package/content/skills/_data/complexity-classification.md +58 -0
  74. package/content/skills/_data/concision.md +23 -0
  75. package/content/skills/_data/deployed-file-provenance.md +46 -0
  76. package/content/skills/_data/design-priorities.md +76 -0
  77. package/content/skills/_data/gh-body-file.md +30 -0
  78. package/content/skills/_data/git-commands.md +39 -0
  79. package/content/skills/_data/naming-conventions.md +50 -0
  80. package/content/skills/_data/pr-resolution.md +25 -0
  81. package/content/skills/_data/pr-source-resolution.md +36 -0
  82. package/content/skills/_data/project-stage.md +32 -0
  83. package/content/skills/_data/recommendation-gradient.md +92 -0
  84. package/content/skills/_data/scope-and-deferral.md +83 -0
  85. package/content/skills/_data/spike-conventions.md +89 -0
  86. package/content/skills/_data/ticket-evaluation.md +13 -0
  87. package/content/skills/_data/ticket-id-extraction.md +43 -0
  88. package/content/skills/_data/ticket-source-resolution.md +180 -0
  89. package/content/skills/_data/title-templates.md +632 -0
  90. package/content/skills/_data/title-voice.md +17 -0
  91. package/content/skills/_data/work-types.json +168 -0
  92. package/content/skills/_partials/acceptance-criteria-scaffold.md +15 -0
  93. package/content/skills/_partials/action-items.md +22 -0
  94. package/content/skills/_partials/bitbucket-delete-both-refusal.md +3 -0
  95. package/content/skills/_partials/commit-title-rendering.md +14 -0
  96. package/content/skills/_partials/gh-body-file.md +22 -0
  97. package/content/skills/_partials/jira-task-list-flattening.md +1 -0
  98. package/content/skills/_partials/nested-list-indent.md +9 -0
  99. package/content/skills/_partials/next-steps-after-plan.md +99 -0
  100. package/content/skills/_partials/next-steps-after-review.md +350 -0
  101. package/content/skills/_partials/option-format.md +85 -0
  102. package/content/skills/_partials/plan-template.md +97 -0
  103. package/content/skills/_partials/split-launch-prompts.md +5 -0
  104. package/content/skills/_partials/split-ticket-compose.md +5 -0
  105. package/content/skills/_partials/split-ticket-create.md +3 -0
  106. package/content/skills/_partials/ticket-and-plan-completeness.md +33 -0
  107. package/content/skills/_partials/ticket-concision.md +18 -0
  108. package/content/skills/_partials/ticket-criteria-conventions.md +7 -0
  109. package/content/skills/_partials/ticket-placement.md +14 -0
  110. package/content/skills/_partials/ticket-skeleton-tiers.md +6 -0
  111. package/content/skills/_partials/ticket-skeleton.md +13 -0
  112. package/content/skills/add-change-record/SKILL.md +136 -0
  113. package/content/skills/add-test-ids/SKILL.md +51 -0
  114. package/content/skills/align-ticket-with-implementation/SKILL.md +115 -0
  115. package/content/skills/anti-patterns/SKILL.md +57 -0
  116. package/content/skills/assess-ticket/SKILL.md +46 -0
  117. package/content/skills/assess-ticket/next-steps-after-assessment.md +98 -0
  118. package/content/skills/assess-usability/SKILL.md +96 -0
  119. package/content/skills/brainstorming/SKILL.md +107 -0
  120. package/content/skills/capture-event/SKILL.md +108 -0
  121. package/content/skills/capture-event/capture-event.mjs +216 -0
  122. package/content/skills/capture-feedback/SKILL.md +71 -0
  123. package/content/skills/capture-lede-decision/SKILL.md +163 -0
  124. package/content/skills/capture-lede-decision/capture-lede-decision.mjs +231 -0
  125. package/content/skills/classify-complexity/SKILL.md +92 -0
  126. package/content/skills/collaborate/SKILL.md +86 -0
  127. package/content/skills/condense-branch/SKILL.md +83 -0
  128. package/content/skills/create-bitbucket-pr/SKILL.md +87 -0
  129. package/content/skills/create-commit/SKILL.md +65 -0
  130. package/content/skills/create-devlog/SKILL.md +108 -0
  131. package/content/skills/create-gh-pr/SKILL.md +121 -0
  132. package/content/skills/create-pr/SKILL.md +150 -0
  133. package/content/skills/create-ticket/SKILL.md +395 -0
  134. package/content/skills/create-ticket/resolve-ticket-target.mjs +143 -0
  135. package/content/skills/derive-session-context/derive-session-context.mjs +149 -0
  136. package/content/skills/design-and-plan/SKILL.md +197 -0
  137. package/content/skills/development-workflows/SKILL.md +41 -0
  138. package/content/skills/get-ticket-id/SKILL.md +67 -0
  139. package/content/skills/groom-backlog/SKILL.md +247 -0
  140. package/content/skills/groom-backlog/groom-backlog.mjs +108 -0
  141. package/content/skills/implement-plan/SKILL.md +168 -0
  142. package/content/skills/index-prototypes/SKILL.md +200 -0
  143. package/content/skills/index-prototypes/index-prototypes.mjs +388 -0
  144. package/content/skills/kb-add/SKILL.md +157 -0
  145. package/content/skills/kb-add/kb-add.mjs +216 -0
  146. package/content/skills/kb-curate/SKILL.md +119 -0
  147. package/content/skills/kb-curate/kb-curate.mjs +213 -0
  148. package/content/skills/kb-edit/SKILL.md +128 -0
  149. package/content/skills/kb-edit/kb-edit.mjs +219 -0
  150. package/content/skills/kb-retrieve/SKILL.md +100 -0
  151. package/content/skills/kb-retrieve/kb-retrieve.mjs +207 -0
  152. package/content/skills/kb-retrieve-events/SKILL.md +98 -0
  153. package/content/skills/kb-retrieve-events/kb-retrieve-events.mjs +207 -0
  154. package/content/skills/kb-update-events/SKILL.md +77 -0
  155. package/content/skills/kb-update-events/kb-update-events.mjs +215 -0
  156. package/content/skills/merge-bb-pr/SKILL.md +136 -0
  157. package/content/skills/merge-gh-pr/SKILL.md +167 -0
  158. package/content/skills/merge-gh-pr/merge-gh-pr.mjs +10 -0
  159. package/content/skills/merge-pr/SKILL.md +368 -0
  160. package/content/skills/migrate-feedback-memories/SKILL.md +137 -0
  161. package/content/skills/migrate-feedback-memories/feedback-memories.mjs +161 -0
  162. package/content/skills/people-report/SKILL.md +208 -0
  163. package/content/skills/plan/SKILL.md +87 -0
  164. package/content/skills/prepare-prototype-brief/SKILL.md +178 -0
  165. package/content/skills/pull-from-backlog/SKILL.md +83 -0
  166. package/content/skills/pull-from-backlog/pull-from-backlog.mjs +209 -0
  167. package/content/skills/refine-plan/SKILL.md +263 -0
  168. package/content/skills/refine-prototype/SKILL.md +113 -0
  169. package/content/skills/respond-to-review/SKILL.md +292 -0
  170. package/content/skills/review-bb-pr/SKILL.md +161 -0
  171. package/content/skills/review-branch/SKILL.md +303 -0
  172. package/content/skills/review-criteria/SKILL.md +141 -0
  173. package/content/skills/review-gh-pr/SKILL.md +155 -0
  174. package/content/skills/review-gh-pr/select-pr-ticket.mjs +8 -0
  175. package/content/skills/review-permissions/SKILL.md +39 -0
  176. package/content/skills/review-pr/SKILL.md +123 -0
  177. package/content/skills/revise-comments/SKILL.md +148 -0
  178. package/content/skills/revise-prose/SKILL.md +197 -0
  179. package/content/skills/revise-prose/revise-prose.mjs +229 -0
  180. package/content/skills/save-artifact/SKILL.md +71 -0
  181. package/content/skills/save-plan/SKILL.md +55 -0
  182. package/content/skills/software-engineering/SKILL.md +74 -0
  183. package/content/skills/streamline-guidance/SKILL.md +174 -0
  184. package/content/skills/streamline-guidance/streamline-guidance.mjs +211 -0
  185. package/content/skills/summarize-change/SKILL.md +317 -0
  186. package/content/skills/summarize-chat/SKILL.md +100 -0
  187. package/content/skills/systematic-debugging/SKILL.md +308 -0
  188. package/content/skills/systematic-debugging/condition-based-waiting-example.ts +160 -0
  189. package/content/skills/systematic-debugging/condition-based-waiting.md +122 -0
  190. package/content/skills/systematic-debugging/defense-in-depth.md +130 -0
  191. package/content/skills/systematic-debugging/find-polluter.sh +68 -0
  192. package/content/skills/systematic-debugging/root-cause-tracing.md +185 -0
  193. package/content/skills/systematic-debugging/test-academic.md +16 -0
  194. package/content/skills/systematic-debugging/test-pressure-1.md +67 -0
  195. package/content/skills/systematic-debugging/test-pressure-2.md +77 -0
  196. package/content/skills/systematic-debugging/test-pressure-3.md +77 -0
  197. package/content/skills/testing-conventions/SKILL.md +235 -0
  198. package/content/skills/triage-spike-findings/SKILL.md +113 -0
  199. package/content/skills/triage-spike-findings/triage-spike-findings.mjs +71 -0
  200. package/content/skills/typescript-testing-conventions/SKILL.md +178 -0
  201. package/content/skills/update-jira-ticket/SKILL.md +257 -0
  202. package/content/skills/update-jira-ticket/update-jira-ticket.mjs +9 -0
  203. package/content/skills/update-project-guidance/SKILL.md +300 -0
  204. package/content/skills/upgrade-dependencies/SKILL.md +139 -0
  205. package/content/skills/wrap-up/SKILL.md +431 -0
  206. package/content/subagents/_data/claude.yaml +25 -0
  207. package/content/subagents/_data/rovo.yaml +41 -0
  208. package/content/subagents/canary.md +12 -0
  209. package/content/subagents/disposition-challenger.md +78 -0
  210. package/content/subagents/entry-drafter.md +191 -0
  211. package/content/subagents/handoff-reviewer.md +75 -0
  212. package/content/subagents/plan-reviewer.md +184 -0
  213. package/content/subagents/plan-reviser.md +88 -0
  214. package/content/subagents/prose-reviser.md +132 -0
  215. package/content/subagents/ticket-assessor.md +142 -0
  216. package/content/subagents/usability-assessor.md +157 -0
  217. package/package.json +74 -2
  218. package/schemas/preferences.v1.json +321 -0
  219. package/schemas/work-types.v1.json +142 -0
@@ -0,0 +1,36 @@
1
+ ---
2
+ slug: williamthorsen-tooling-preferences
3
+ description: William Thorsen's preferences for which command-line tool an agent reaches for, how it invokes it, and how it obtains a tool or resource that is missing.
4
+ delivery: ambient
5
+ version: '4'
6
+ ---
7
+
8
+ # William Thorsen's tooling preferences
9
+
10
+ Which command-line tool to reach for, how to invoke it, and how to obtain one that is missing.
11
+
12
+ ## Searching and finding files
13
+
14
+ When searching from the shell, search file contents with `rg` and find files by name with `fd`. Both are far faster than `grep` and `find`, and over a session the difference is minutes rather than milliseconds. A harness search tool that already wraps ripgrep satisfies this rule rather than conflicting with it.
15
+
16
+ Reach for `grep` or `find` only when the faster tool is genuinely unavailable: on a machine without it, or in a portable script whose consumers may not have it.
17
+
18
+ ## Missing tools and resources
19
+
20
+ Before reporting a tool, dependency, or service as missing, exhaust the routes that do not need any action from the developer:
21
+
22
+ - Run the tool through an ephemeral runner, such as `pnpm dlx`, `npx`, `uvx`, or `go run`.
23
+ - Use a copy already present in the project, or an equivalent tool.
24
+ - Redirect a cache or temporary path out of a denied location.
25
+ - Call the service's API when the CLI is only a wrapper over it.
26
+ - Start a stopped service that the project defines, through its compose stack or its start script.
27
+
28
+ Never hand over a command that the sandbox refuses. When the resource that it accesses is within what the task was given, retry the command through the permission gate, which approves or refuses the retry. When the resource is not within the task, or when the retry is refused, ask once for the grant that clears it, propose the durable grant that removes the block for later sessions, with its tradeoff in one line (the grant widens what every later sandboxed command may reach), and run the command once the grant is in place.
29
+
30
+ Ask for the resource when none of those routes works, when the missing resource is a credential or access, or when the stopped service is one that the project does not define. Name the resource and the command that will run once it arrives, and keep the task: Never restate the task as an action item for the developer. The "Handoffs" section of William Thorsen's collaboration preferences states the ladder on which this ask is the third rung. A credential or access that is already present is the task's to use only when the task's plan or the developer names the command that reads it. Never look for or use any other: It belongs to the developer. An app's local development login is not such a credential: Log into a local instance of the app under work without asking, and set a development credential in an untracked local config file when the app needs one.
31
+
32
+ This rule applies before any fallback that a skill names for an unavailable tool. A skill's "unavailable" means unavailable once these routes are exhausted, and the skill's fallback applies from that point.
33
+
34
+ The rule does not license any write. Acquiring a resource in a way that mutates shared state, such as installing a tool globally, restarting a service that the project does not define, minting a credential, or widening a sandbox grant, still needs the developer's authorization, and the ask is how to obtain it. Setting that local development credential is not minting one.
35
+
36
+ If a `sandbox-conventions` rulebook is deployed, consult it first for a denial that misreports itself as a missing resource.
@@ -0,0 +1,90 @@
1
+ ---
2
+ slug: williamthorsen-typescript-preferences
3
+ description: 'TypeScript language mechanics, module shape, and documentation form: type safety, exports and barrels, import specifiers, type placement, and doc tags. Consult before writing or modifying TypeScript.'
4
+ delivery: [hook, skill]
5
+ version: '4'
6
+ ---
7
+
8
+ # William Thorsen's TypeScript preferences
9
+
10
+ TypeScript language mechanics, the shape of a module's public surface, and documentation form.
11
+
12
+ ## Exports
13
+
14
+ Export by name. Never use a default export: Importers invent their own names, and renames never propagate.
15
+
16
+ ## Barrels
17
+
18
+ A barrel (an `index.ts` that re-exports a directory's modules) is permitted only at a package's published entry point: a module named in the package's `exports` map, whether the root entry or a subpath. Everywhere else, an import names the defining module directly.
19
+
20
+ Importing one symbol through a barrel loads every module re-exported by the barrel.
21
+
22
+ A barrel is also permitted at a vendor boundary that lint enforces: A directory containing the sole permitted import site for an external dependency is a module boundary in the same sense as a package entry point. The permission rests on the enforcement, so a boundary not protected by a lint rule does not get a barrel.
23
+
24
+ ## Import specifiers
25
+
26
+ Write the specifier that names the file on disk: `./parse-note.ts`, not `./parse-note.js`.
27
+
28
+ This requires `allowImportingTsExtensions` and a build that rewrites extensions in output and declarations. Without both, use the `.js` form.
29
+
30
+ ## Type safety
31
+
32
+ Never use a type assertion (`as Type`, `<Type>value`): It claims a runtime guarantee that the code cannot make. When the type is not guaranteed, return `unknown` and let the caller narrow it with a type guard.
33
+
34
+ ```typescript
35
+ // ❌ Claims a type that nothing verified
36
+ function readConfig<T>(path: string): T {
37
+ return JSON.parse(fs.readFileSync(path, 'utf8')) as T;
38
+ }
39
+
40
+ // ✅ Returns what it knows; the caller narrows
41
+ function readConfig(path: string): unknown {
42
+ return JSON.parse(fs.readFileSync(path, 'utf8'));
43
+ }
44
+
45
+ function isConfig(value: unknown): value is Config {
46
+ return isObject(value) && typeof value.version === 'string';
47
+ }
48
+ ```
49
+
50
+ Two exceptions, each with a comment saying why: a TypeScript limitation in which the type is guaranteed but uninferable, such as `Object.keys()`; and test code in which precise typing of an external API would obscure the test.
51
+
52
+ Never use `any`, a non-null assertion (use a runtime assertion instead), or a generic parameter that claims a guarantee that the function cannot deliver. Model known variants as a union, and validate external data with a type guard or a schema library.
53
+
54
+ Prefer `undefined` to `null` unless serialization requires otherwise.
55
+
56
+ ## Functions
57
+
58
+ Prefer function declarations to function expressions, unless the variable is typed:
59
+
60
+ ```tsx
61
+ // ❌ Incorrect
62
+ const myFunction = () => {
63
+ /* ... */
64
+ };
65
+
66
+ // ✅ Correct
67
+ function myFunction() {
68
+ /* ... */
69
+ }
70
+
71
+ // ✅ Correct: Variable has type annotation
72
+ const MyComponent: React.FC = () => {
73
+ /* ... */
74
+ };
75
+ ```
76
+
77
+ ## Type placement
78
+
79
+ Keep types in the same file as their sole provider (component or function). This enables single imports: `import { Component, type ComponentProps } from './Component'`
80
+
81
+ **Exception:** Only extract types to shared `types.ts` when multiple providers genuinely need the same type.
82
+
83
+ ## Documentation
84
+
85
+ Omit `@param`, `@returns`, and other tags; if a parameter has a constraint that its name and type cannot express -- such as a valid range, a precondition, or mutual incompatibility with another parameter -- describe the constraint in the description.
86
+
87
+ This prohibition against `@` tags does not apply to
88
+
89
+ - symbols exported from a package's published entry point
90
+ - custom tags such as `@internal` and `@stage`
@@ -0,0 +1,58 @@
1
+ ---
2
+ slug: williamthorsen-workflow-preferences
3
+ description: William Thorsen's personal preferences for how work moves -- scope, branches and worktrees, guidance capture, and the arc of product development.
4
+ delivery: ambient
5
+ version: '12'
6
+ ---
7
+
8
+ # William Thorsen's workflow preferences
9
+
10
+ ## Workflow
11
+
12
+ - Do not treat a question as an instruction: When the user asks "Did you do X?", answer the question rather than doing X.
13
+ - Treat a ticket as a signal, not a boundary: When work appears that the ticket didn't name, fold it into the current change by default; spin off a separate ticket only for an affirmative reason beyond the ticket's silence, and when you do, create it immediately rather than leaving it in the conversation. Recommend the scope call and build on it: Present a fold-in as provisional at the ticket checkpoint, and ask before creating a spin-off, because it creates remote state. Full doctrine: [scope-and-deferral.md](../../skills/_data/scope-and-deferral.md).
14
+ - Make changes through branches and pull requests, not by editing the default branch directly.
15
+ - When feedback should change how the agent behaves and generalizes beyond the current task, capture it via {skill:capture-feedback}. The capture records evidence for a later refinement pass; it does not change any behavior until that pass writes the lesson into guidance and the guidance is deployed. Do not record generalizable guidance as a per-project memory.
16
+ - Reserve memories for genuinely local, non-propagating facts (a project-specific deadline or quirk): A memory is scoped to a single project on a single machine, so recording generalizable guidance in one fragments behavior across contexts.
17
+
18
+ ## Branch and worktree management
19
+
20
+ Never create a branch or worktree without explicit authorization. Each ticket is implemented in its own worktree, and the developer's tooling relies on that: Do all of one ticket's work in that worktree, never switch a worktree to another branch, and start a new session in another ticket's own worktree for work on that ticket. Which branch or worktree a ticket's work uses is settled, so never ask it.
21
+
22
+ After a merge, say nothing about worktree or branch state and never offer to manage it. The worktree stays as long as its branch does, so there is nothing to clean up and nothing to ask about.
23
+
24
+ ## Cross-repo sequencing
25
+
26
+ When the work would be better done upstream, in a package or repository on which this one depends, default to upstream first: Merge the upstream change, publish it, upgrade the dependency here, then make the downstream change against the upgraded version. Propose that order rather than merging a downstream workaround ahead of it.
27
+
28
+ Downstream first reads as faster because something is merged sooner, but it requires two downstream changes rather than one: the workaround, then its removal once the upstream change is merged. It also forces upstream to decide without the downstream requirement in hand, so upstream cannot weigh that requirement against its own constraints, and may settle on a shape that the consumer keeps working around.
29
+
30
+ Let a condition displace the default: an upstream that is unowned, unresponsive, or on a release cadence that will not accommodate the work. When one applies, name it, recommend the order, build on the recommendation, and leave the veto to the developer.
31
+
32
+ ## Product development
33
+
34
+ When the developer starts a product, move the work through these stages in order, each producing one thing. Skip a stage when the product is small enough that its output is already obvious, and say which stage and why.
35
+
36
+ 1. Idea: Write the idea back to the developer and record it in the design doc.
37
+ 2. Opinions: Evaluate the idea from other roles and record the evaluations with it.
38
+ 3. Brief: Flesh the idea out into a brief for a prototype round.
39
+ 4. Prototypes: Build competing prototypes of a rich feature set through `prepare-prototype-brief`, judge them through `index-prototypes`, decide every idea in the round's idea table through `prepare-prototype-brief`, and synthesize the prototypes through `refine-prototype`, which transfers the kept and adapted ideas to the winner, applies the developer's commands at sketch speed, and records each accepted change in a `refinement-log` artifact. A verdict on a prototype does not decide its ideas: Each idea is kept, adapted, deferred, or dropped by the developer's answer. Prototyping a rich feature set is how the product that could emerge becomes visible, so run the round before writing the vision.
40
+ 5. End vision: Write the purpose, the non-goals, the project's declared stage (maturity, sensitivity, and audience), the decisions with their reasons, and a rough structure from what the prototypes taught, citing the round's `idea-decisions` and `refinement-log` artifacts, and get the developer's approval. Record every decision on an idea in the design doc, so that a later session sees why an idea is absent.
41
+ 6. MVP: Build the smallest product that does the product's one job. Put a prototype feature in it when the product cannot do that job without the feature, and leave the rest for increments.
42
+ 7. Increments: Add features one iteration at a time.
43
+
44
+ Treat the winning prototype as the baseline: the floor on quality and feel against which the finished product is judged, and the reference for what the product does and how it is put together. Read it as evidence of the vision rather than as its specification: Let its structure inform the design doc, and expect to improve on it.
45
+
46
+ Hold the finished product to the baseline, not any one iteration. An iteration may omit a prototype feature or deliver it in a reduced form; treat a reduction as remaining work and give it a one-line sub-issue, which keeps the gap visible. When settling a feature below the prototype's bar or retiring it, record the decision in the design doc with its reason.
47
+
48
+ Write a ticket in detail when its work is about to be implemented. Until then, keep each artifact to one tier:
49
+
50
+ - Keep the vision in a design doc in the repo: the purpose, the non-goals, the declared stage, the decisions with their reasons, and the rough structure. Put a statement there when reversing it later would invalidate completed work, or when a new session needs it to choose a direction, and leave most other detail to its iteration.
51
+ - Have the epic point to the design doc, state what is out of scope, and list the iterations as its sub-issues in order. Keep the vision out of the epic's body, because a ticket's body is frozen once its work starts and the vision is not.
52
+ - Use the milestone to mark the current iteration, which `pull-from-backlog` reads as the Now set.
53
+ - Treat the prototype as the baseline.
54
+ - Make each iteration a sub-issue of the epic, and create every iteration's sub-issue when the epic is created rather than as each iteration starts. Specify the current iteration in detail. Write each later one as a one-line outcome, what the user can newly do, rather than as a feature, and refine it against the design doc when its iteration starts.
55
+
56
+ Once the developer approves the end vision, propose that shape rather than drafting every ticket in detail up front.
57
+
58
+ Expect the vision to change. At the end of each iteration, re-read the design doc, revise what the iteration disproved, and refine the next sub-issue against the revised doc. The documents exist so that a new session knows the vision without being told.
@@ -0,0 +1,80 @@
1
+ ---
2
+ slug: williamthorsen-writing-preferences
3
+ description: William Thorsen's personal writing preferences for agent-authored prose.
4
+ delivery: [ambient, hook]
5
+ version: '11'
6
+ ---
7
+
8
+ # William Thorsen's writing preferences
9
+
10
+ ## Apostrophes
11
+
12
+ <!-- rule: apostrophes 1 -->
13
+
14
+ Keep every apostrophe that a possessive or a contraction takes. Writing `the rule own example` for `the rule's own example`, or `dont` for `don't`, corrupts the text. When a command's quoting cannot hold a character, pass the content through a file written with the Write tool or through a quoted heredoc (`<<'EOF'`), and never drop or replace the character.
15
+
16
+ ## Capitalization after a colon
17
+
18
+ <!-- rule: capitalization-after-colon 1 -->
19
+
20
+ Read what appears left of the colon. A label (such as a short tag naming a field, a category, or an option) is transparent: Capitalize what follows as though the label were absent. A clause puts the colon mid-sentence: Capitalize a complete sentence, keep a fragment or list lowercase. A lowercase code identifier keeps its own case on either branch.
21
+
22
+ - **Label, fragment follows:** "Exception: Trivial predicate callbacks whose type is obvious."
23
+ - **Clause, sentence follows:** "The cache is not the problem: The transport reconnects on every request."
24
+ - **Clause, fragment follows:** "Two directories stay out of the sweep: fixtures and generated output."
25
+ - **Code identifier:** "Run the formatter: `nmr fmt`."
26
+
27
+ ## Em-dashes
28
+
29
+ <!-- rule: em-dash 1 -->
30
+
31
+ Don't use em-dashes; use appropriate punctuation instead. A dash separating an identifier from its label is a delimiter rather than punctuation: Use a colon. If an em-dash is genuinely best, write it as `--`.
32
+
33
+ <!-- include: ../../_partials/reduced-object-relative.md / -->
34
+
35
+ ## Second person
36
+
37
+ <!-- rule: second-person 1 -->
38
+
39
+ Documentation describes; it does not address. Never write `you`, `your`, `yours`, or `yourself`, and never the contractions `you're`, `you've`, `you'll`, or `you'd`.
40
+
41
+ Imperative mood is untouched, because it does not contain a pronoun: "Run the formatter" directs the reader without naming one.
42
+
43
+ **The addressee decides.** Ask who the pronoun names. If it names the agent that the document instructs, a skill body or a subagent body directing its own executor, the pronoun is that document's address and stays. If it names a reader of documentation, someone using the package or working on it, the pronoun goes.
44
+
45
+ **The replacement names an actor.** Say who or what acts: "the config sets a cap on the rule" rather than "you cap the rule". If an actor does not belong in the sentence, recast so that the artifact is the subject of a verb that it performs or one that states a relation, as plain speech requires: "the flag takes a path" rather than "you pass it a path".
46
+
47
+ A naive substitution fails in two ways:
48
+
49
+ - **The agentless passive.** Dropping the pronoun by hiding who acted trades one defect for another: "your rules are capped" becomes "the rules are capped", which names nobody. Plain speech rejects that passive; name the actor instead.
50
+ - **The surviving object gap.** "the cap you set" and "the cap the config sets" are the same reduced object relative; therefore, the substitution leaves the second defect in place. Restore the relativizer, or apply the repairs in "Reduced object relatives" above.
51
+
52
+ ## Sentence case
53
+
54
+ <!-- rule: sentence-case 1 -->
55
+
56
+ Use sentence case for titles, headings, section headers, steps, labels, and interface elements. Never use title case. Preserve the case of proper nouns, named entities, and the actual titles of books and movies.
57
+
58
+ - "Backend: Express API routes and server" not "Backend: Express API Routes And Server"
59
+ - "Frontend: Static Excalibur scene" not "Frontend: Static Excalibur Scene"
60
+ - "Customizing the Status Adapter for a new backend", not "Customizing the Status Adapter for a New Backend"
61
+
62
+ ## `so` and other connectives
63
+
64
+ <!-- rule: so 1 -->
65
+
66
+ Join two clauses with `so` only when the second states a direct result of the first: "The entry is not a top-level segment, so the exclusion does not cover it." For a purpose, write "so that" or "to": "The link points to `.live` so that apps read the stable worktree." If the second clause follows only through a step that the sentence leaves out, state that step rather than change the conjunction.
67
+
68
+ Use connectives sparingly. When most sentences in a paragraph end with a consequence, the paragraph reads as a chain of justifications, and the repeated word distracts even when each use is correct. Keep a connective only when a reader would not infer the link from the order of the sentences. Leave at least three sentences between one clause-joining `so` and the next, and do not meet that limit by swapping in another connective: Split the sentence, lead with "because", or drop the link.
69
+
70
+ A degree adverb ("so many") and a `so` that stands for a clause ("do so", "if so") are outside the rule.
71
+
72
+ ## `where`
73
+
74
+ <!-- rule: where 2 -->
75
+
76
+ Use `where` for a place, or after an expression to state what a symbol, variable, placeholder, or value in it stands for; for any other relation, use the word that most clearly expresses it.
77
+
78
+ - **Definition:** "`{NN+1}`, where `{NN}` is the run-summary sequence number"
79
+ - **Condition (a violation):** "the entry where `role` is `coder`" becomes "the entry whose `role` is `coder`"
80
+ - **Event (a violation):** "Fixes an issue where the report cut a subject" becomes "Fixes the issue that the report cut a subject"
@@ -0,0 +1,51 @@
1
+ # Shared agent instructions
2
+
3
+ ## Interactive work
4
+
5
+ - Invoke the `collaborate` skill when working interactively with the user (not applicable to dispatched subagent work)
6
+
7
+ <!-- include: ../../_partials/code-style.md / -->
8
+
9
+ <!-- include: ../../_partials/concision.md / -->
10
+
11
+ ## Plain speech
12
+
13
+ <!-- include: ../../_partials/plain-speech.md / -->
14
+
15
+ <!-- include: ../../_partials/code-descriptions.md / -->
16
+
17
+ <!-- include: ../../_partials/file-access.md / -->
18
+
19
+ <!-- include: ../../_partials/shell-commands.md / -->
20
+
21
+ <!-- include: ../../_partials/live-repo-writes.md / -->
22
+
23
+ <!-- include: ../../_partials/technical-recommendations.md / -->
24
+
25
+ ## Artifacts
26
+
27
+ When creating an artifact (plan, devlog, review, change summary, chat summary, etc.), invoke the `save-artifact` skill to resolve path and naming. Do not place artifacts in ad-hoc locations.
28
+
29
+ The artifact directory (`~/ai-artifacts` by default) is the developer's audit trail: It records what agents planned, reviewed, summarized, and published, and when. It is not a source of truth. Put instructions, a procedure, or a reference that a later session must find in the repository (its docs, `AGENTS.md`, or a README), or in a skill or rulebook when they apply across repositories; never save them as an artifact.
30
+
31
+ An artifact is not authority on the current state of code, design, or decisions. Treat what a search of artifacts turns up as history, and verify it against the repository, the tickets, and the pull requests. A skill that reads an artifact as an input to the same piece of work, such as the plan that `implement-plan` executes or the change summary that `create-pr` publishes, uses the artifact as the workflow intends.
32
+
33
+ A saved artifact records what its author produced at that moment. Correct one that got its own subject wrong; never edit one toward what has happened since, and never report its divergence from current state as a defect or as a repair for the user to weigh.
34
+
35
+ Two artifacts are never edited once written, because a rewrite of either destroys evidence silently: `capture-lede-decision` reads the `pull-request` artifact's `## What` and the `merge` artifact's `## Body` to recover what was published. Each opens with a marker that directs a reading agent to give its own revision a new record and leave the original unedited.
36
+
37
+ 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.
38
+
39
+ 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.
40
+
41
+ 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.
42
+
43
+ A write that this section rules out is not a skipped step, because nobody asked for it, and it does not produce any user-facing text: Do not mention the doctrine or the marker, do not report the write that was not made, and do not offer to reconcile the record with current state. When the user asks for such a write, decline it in one line and name the alternative: for a revision that you publish, a new record; for a divergence from the ticket, the pull-request description; for a lede that the records do not contain, `capture-lede-decision`'s `--agent-lede-file` and `--merged-lede-file`. A human's later edit to a published body does not need a record, because the `merge` record captures what merged.
44
+
45
+ ## Authorship
46
+
47
+ Agents write most of what appears under the developer's account, so a creator, reporter, or author field shows which account made an item, not who wrote it. Never infer from such a field that the developer wrote an item, and never rest a conclusion on that premise unless the developer has said so. When provenance matters, say that the item was created under the developer's account and trace its content to a source; otherwise omit attribution.
48
+
49
+ ## Commits
50
+
51
+ Invoke the `create-commit` skill to make a commit. It states the procedure: what to stage, one commit per logical unit of work, and how the title is rendered. The `consult-commit-conventions` skill states what the message is composed to -- the title and body conventions, the work-type taxonomy, and the branch-naming format -- and is worth consulting on its own before writing a message by hand.
@@ -0,0 +1,44 @@
1
+ <!-- readme-type: content -->
2
+
3
+ # Helper scripts
4
+
5
+ Shared helpers installed into every platform target. The install pipeline copies (or symlinks) each `.sh` and `.mjs` file in this directory into `~/<platform_home>/scripts/` (e.g., `~/.claude/scripts/`, `~/.codex/scripts/`).
6
+
7
+ This directory contains two kinds of helper, distinguished by who invokes them:
8
+
9
+ - **Agent-invoked.** Helpers run by a skill or subagent, via the `{harness_home_dir}/scripts/` prefix documented below.
10
+ - **Harness-invoked.** Helpers wired into a harness's own configuration, without an agent in the loop.
11
+
12
+ The extension says how a helper is written, not who runs it: A `.sh` is a shell script kept in this directory, while a `.mjs` is a bundled TypeScript helper whose source is in `src/`. The bundles are tracked build output, generated here by `codeassembly bundle-helpers` from the `helpers:` list in `codeassembly-content.yaml`, so a source edit is committed together with its rebuilt bundle. Either kind serves either invoker.
13
+
14
+ Files of any other extension (such as this README) are not installed.
15
+
16
+ ## Invocation convention
17
+
18
+ Agent-facing content must invoke these scripts using the `{harness_home_dir}/scripts/` template prefix:
19
+
20
+ ```
21
+ Run `{harness_home_dir}/scripts/resolve-frontmatter.sh --skill my-skill --interactive false` via Bash.
22
+ ```
23
+
24
+ At install time, `{harness_home_dir}` expands to `~/.claude`, `~/.codex`, `~/.opencode`, or the equivalent per target platform, producing an explicit absolute path that the agent can execute.
25
+
26
+ Bare invocations (e.g., `` Run `resolve-frontmatter.sh ...` ``) do not resolve at runtime: The install directory is not on `$PATH`, and only `feedback-memories.sh` is symlinked into `/usr/local/bin`. An agent that encounters a bare invocation typically guesses a path and fails before succeeding, wasting tool calls.
27
+
28
+ Prose mentions of script names that are not invocations (e.g., ``"the `describe-change.mjs` script renders titles"``) do not need the prefix. `validate` recognizes an invocation by what surrounds the name: a flag, line continuation, quoted argument, shell variable, or shell operator after it, or an interpreter word (`bash`, `node`, `sh`, `source`, `zsh`) directly before it. Write a bundle's invocation as `node <path> <subcommand>`, which the interpreter word marks.
29
+
30
+ ## Scripts
31
+
32
+ - `check-branch-currency.mjs`: Fetches the remote's default branch and reports, as JSON, how far the checked-out branch is behind and ahead of it, whether its tree is clean, whether its upstream contains any of its own commits, and which commits the default branch gained, each marked by whether it touches the given paths. Invoke it as `node {harness_home_dir}/scripts/check-branch-currency.mjs --base <remote>/<branch> [--path <path>]...`; [branch-currency.md](../skills/_data/branch-currency.md) states how a skill acts on the result.
33
+ - `check-prose.mjs`: Runs every `revise-prose` detector over one Markdown file at any path, without reading or writing the sweep record, and prints one line per candidate, or one JSON document `{ file, rules, candidates }` under `--json`. It exits 0 without candidates, 1 with candidates, and 2 on a usage error or an unreadable file. Invoke it as `node {harness_home_dir}/scripts/check-prose.mjs --file <path> [--json]`; `summarize-change` runs it over a change summary's prose.
34
+ - `describe-change.mjs`: Renders titles for commits, tickets, PRs, and merges from declarative templates, the `{breaking}` marker included, reads a rendered title back into its parts, consolidates a commit range's entries into a consolidated record, applies overrides to a record, renders the fenced `change-record` block that ends a pull-request body and the `## Details` body of a change summary, and resolves what a pull request merges as from that block and the pull request's commits. Invoke it as `node {harness_home_dir}/scripts/describe-change.mjs <subcommand>`, where [title-templates.md](../skills/_data/title-templates.md#invoking-the-bundle) names the subcommand for each; the bundle does not have a shebang.
35
+ - `get-ticket-id.sh`: Extracts a ticket ID from a branch name.
36
+ - `manage-jira-ticket.mjs`: Compares `acli`'s active site with a ticket's site and names the `acli jira auth switch` command on a mismatch (`check-site`), resolves the project key and issue type for a Jira work item from the repository's `.agents/preferences.yaml` (`resolve-target`), converts a Markdown body to ADF with task lists as native task items (`convert-body`), and creates a work item through `acli` exactly once, checking its parent first (`create`). `create` refuses before any other `acli` call when `ticket.base_url` is set, in the repository's preferences or the global file, and `acli`'s active site is another site or cannot be read. Invoke it as `node {harness_home_dir}/scripts/manage-jira-ticket.mjs <subcommand>`.
37
+ - `resolve-review-run.mjs`: Finds a ticket's active review run (its newest `interactive` run directory), opens it for a new review by creating one when none exists, or finds the newest reviewer or overseer review in it. Invoke it as `node {harness_home_dir}/scripts/resolve-review-run.mjs active|open|latest`.
38
+ - `resolve-frontmatter.sh`: Emits canonical artifact frontmatter (YAML or JSON) with provenance, ticket, branch, commit, and PR fields, plus scalar and list extension keys.
39
+ - `select-lede-exemplars.mjs`: Selects author-approved ledes of a given work type from the lede-decision corpus, optionally floored at a quality rating. `--breaking` marks the request as one for a breaking change, as a `!` on `--type` does: An unmarked request never selects a breaking record, and a marked one prefers breaking records within each widening step. `--with-pair` reports each record's agent lede, merged lede, and author comment alongside the approved text.
40
+ - `validate-preferences.mjs`: Validates `preferences.yaml` files against the schema bundled with this release, defaulting to `.agents/preferences.yaml` under the working directory. It prints one line per finding, or one JSON object per file under `--json`, and exits 1 when any file is invalid. Invoke it as `node {harness_home_dir}/scripts/validate-preferences.mjs [--json] [--strict] [file...]`; [Validation](../../docs/preferences.md#validation) states its rules.
41
+
42
+ ## Drift detection
43
+
44
+ `codeassembly validate` walks every `.md` file under `skills/` and `subagents/` and reports each executable invocation of a known helper script that lacks the `{harness_home_dir}/scripts/` prefix. Every file directly in this directory other than Markdown is a known script, so a new script is covered once it is added here.
@@ -0,0 +1,11 @@
1
+ import { createRequire as __cjsCreateRequire } from 'node:module';
2
+ const require = __cjsCreateRequire(import.meta.url);
3
+ var R=Object.defineProperty;var t=(n,e)=>R(n,"name",{value:e,configurable:!0});import g from"node:process";function b(n){return n instanceof Error||Object.prototype.toString.call(n)==="[object Error]"}t(b,"isError");function f(n){try{return b(n)&&typeof n.message=="string"&&n.message!==""?n.message:String(n)}catch{return"[unstringifiable value]"}}t(f,"describeError");import{realpathSync as y}from"node:fs";import x from"node:process";import{fileURLToPath as O}from"node:url";function w(n,e){let r=x.argv[1];if(r===void 0)return!1;try{return y(O(n))===y(r)}catch(o){return x.stderr.write(`${e}: warning: could not determine entry point: ${f(o)}
4
+ `),!0}}t(w,"isEntryPoint");function E(n,e){let r=[],o=[];for(let s=0;s<n.length;s+=1){let c=n[s];if(c===void 0)continue;if(!c.startsWith("--")){r.push(c);continue}let u=B(c,e);if(u===null)throw new Error(`unknown flag: ${c}`);let{spec:i,inlineValue:a}=u;if(!i.takesValue){if(a!==null)throw new Error(`--${i.name} does not take a value`);o.push({name:i.name,value:null});continue}if(a!==null){o.push({name:i.name,value:a});continue}let l=n[s+1]??null;if(l===null||l.startsWith("--"))throw new Error(`--${i.name} requires a value`);o.push({name:i.name,value:l}),s+=1}return{positionals:r,flags:o}}t(E,"scanFlags");function B(n,e){for(let r of e)for(let o of[r.name,...r.aliases??[]]){let s=`--${o}`;if(n===s)return{spec:r,inlineValue:null};if(n.startsWith(`${s}=`))return{spec:r,inlineValue:n.slice(s.length+1)}}return null}t(B,"matchFlag");import{execFileSync as N}from"node:child_process";import j from"node:process";function k(n){return M(n)&&!Array.isArray(n)}t(k,"isRecord");function M(n){return typeof n=="object"&&n!==null}t(M,"isObject");function $(n){let{base:e,cwd:r,paths:o}=n,{remote:s,branch:c}=h(e),u=A(r,s,c);if(!u.ok)return{fetched:!1,error:u.error};let i=p(r,`HEAD..${e}`),a=p(r,`${e}..HEAD`),l=m(r,["status","--porcelain"])==="",F=G(r,e),S=T(r,e,o);return{fetched:!0,base:e,behind:i,ahead:a,clean:l,pushed:F,gained:S}}t($,"checkBranchCurrency");function h(n){let e=n.indexOf("/"),r=n.slice(0,Math.max(0,e)),o=n.slice(e+1);if(e===-1||r===""||o==="")throw new Error(`--base must name a remote and a branch, such as origin/main: ${n}`);return{remote:r,branch:o}}t(h,"splitBase");var v="@{u}";function p(n,e){return Number.parseInt(m(n,["rev-list","--count",e]),10)}t(p,"countCommits");function C(n){let e=k(n)?n.stderr:void 0;return typeof e=="string"&&e.trim()!==""?e.trim():n instanceof Error?n.message:String(n)}t(C,"describeGitFailure");function A(n,e,r){try{return N("git",["-C",n,"fetch","--quiet",e,r],{encoding:"utf8",env:{...j.env,GIT_TERMINAL_PROMPT:"0"},stdio:["ignore","pipe","pipe"]}),{ok:!0}}catch(o){return{ok:!1,error:C(o)}}}t(A,"fetchBranch");function G(n,e){return P(n)?p(n,e+".."+v)>0:!1}t(G,"hasPushedOwnCommits");function P(n){try{return m(n,["rev-parse","--abbrev-ref","--symbolic-full-name",v]),!0}catch{return!1}}t(P,"hasUpstream");function T(n,e,r){let o=`HEAD..${e}`,s=m(n,["log","--format=%H%x09%s",o]),c=s===""?[]:s.split(`
5
+ `).map(a=>V(a));if(r.length===0)return c.map(a=>({...a,touchesWork:null}));let u=r.map(a=>`:(top,literal)${a}`),i=new Set(m(n,["log","--format=%H",o,"--",...u]).split(`
6
+ `));return c.map(a=>({...a,touchesWork:i.has(a.sha)}))}t(T,"listGainedCommits");function V(n){let e=n.indexOf(" ");return{sha:n.slice(0,e),subject:n.slice(e+1)}}t(V,"parseLogLine");function m(n,e){try{return N("git",["-C",n,...e],{encoding:"utf8",stdio:["ignore","pipe","pipe"]}).trim()}catch(r){throw new Error(`git ${e.join(" ")} failed: ${C(r)}`,{cause:r})}}t(m,"readGit");var I=[{name:"base",takesValue:!0},{name:"path",takesValue:!0}],d="usage: check-branch-currency --base <remote>/<branch> [--path <path>]...";function W(){try{let n=H(g.argv.slice(2));g.stdout.write(`${JSON.stringify(n,null,2)}
7
+ `)}catch(n){g.stderr.write(`check-branch-currency: ${f(n)}
8
+ `),g.exit(1)}}t(W,"main");w(import.meta.url,"check-branch-currency")&&W();function H(n){let{flags:e,positionals:r}=E(n,I);if(r.length>0)throw new Error(`unexpected argument: ${r.join(" ")}
9
+ ${d}`);let o=e.filter(i=>i.name==="base").map(i=>i.value??""),[s,...c]=o;if(s===void 0)throw new Error(`--base is required
10
+ ${d}`);if(c.length>0)throw new Error(`--base may be given only once
11
+ ${d}`);h(s);let u=e.filter(i=>i.name==="path").map(i=>i.value??"");return $({base:s,cwd:g.cwd(),paths:u})}t(H,"runCommand");