@phuc1403/musketeer 0.8.0 → 0.10.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 (236) hide show
  1. package/INSTALLATION.md +52 -52
  2. package/README.md +49 -49
  3. package/bin/musketeer.js +168 -168
  4. package/manifest.json +333 -301
  5. package/package.json +48 -48
  6. package/src/dotnet-scaffold-copier.js +79 -79
  7. package/src/provisioner/detect.js +93 -93
  8. package/src/self-update.js +77 -77
  9. package/template/.claude/agents/code-reviewer.md +182 -166
  10. package/template/.claude/agents/git-manager.md +18 -18
  11. package/template/.claude/agents/hallmark-auditor.md +78 -78
  12. package/template/.claude/agents/researcher.md +33 -33
  13. package/template/.claude/hooks/block-unsafe-adr-title.cjs +85 -85
  14. package/template/.claude/hooks/git-skill-reminder.cjs +53 -0
  15. package/template/.claude/hooks/init-adr-dir.cjs +173 -173
  16. package/template/.claude/hooks/inject-adr-flags.cjs +94 -94
  17. package/template/.claude/hooks/lib/adr/command-scan.cjs +115 -115
  18. package/template/.claude/hooks/lib/characteristics/checker.cjs +357 -357
  19. package/template/.claude/hooks/lib/colors.cjs +180 -122
  20. package/template/.claude/hooks/lib/git-info-cache.cjs +191 -191
  21. package/template/.claude/hooks/lib/transcript-parser.cjs +300 -277
  22. package/template/.claude/hooks/sync-adr-toc.cjs +146 -146
  23. package/template/.claude/hooks/{usage-context-awareness.cjs → usage-quota-cache-refresh.cjs} +166 -166
  24. package/template/.claude/hooks/validate-characteristics-hook.cjs +66 -66
  25. package/template/.claude/hooks/validate-cml-hook.js +145 -145
  26. package/template/.claude/skills/adr-writer/SKILL.md +48 -48
  27. package/template/.claude/skills/adr-writer/references/adr-example.md +35 -35
  28. package/template/.claude/skills/architecture-characteristic-writer/SKILL.md +215 -215
  29. package/template/.claude/skills/architecture-characteristic-writer/assets/worksheet-template.md +29 -29
  30. package/template/.claude/skills/architecture-characteristic-writer/references/characteristics-catalog.md +40 -40
  31. package/template/.claude/skills/architecture-characteristic-writer/scripts/ranking-table.cjs +171 -171
  32. package/template/.claude/skills/code-review/SKILL.md +201 -54
  33. package/template/.claude/skills/code-review/references/checklist-workflow.md +96 -0
  34. package/template/.claude/skills/code-review/references/checklists/api.md +52 -52
  35. package/template/.claude/skills/code-review/references/checklists/base.md +100 -100
  36. package/template/.claude/skills/code-review/references/checklists/web-app.md +54 -54
  37. package/template/.claude/skills/code-review/references/code-review-reception.md +113 -0
  38. package/template/.claude/skills/code-review/references/codebase-scan-workflow.md +30 -0
  39. package/template/.claude/skills/code-review/references/edge-case-scouting.md +119 -0
  40. package/template/.claude/skills/code-review/references/input-mode-resolution.md +135 -0
  41. package/template/.claude/skills/code-review/references/parallel-review-workflow.md +76 -0
  42. package/template/.claude/skills/code-review/references/requesting-code-review.md +116 -0
  43. package/template/.claude/skills/code-review/references/spec-compliance-review.md +43 -0
  44. package/template/.claude/skills/code-review/references/task-management-reviews.md +140 -0
  45. package/template/.claude/skills/code-review/references/verification-before-completion.md +139 -0
  46. package/template/.claude/skills/context-map/SKILL.md +80 -80
  47. package/template/.claude/skills/context-map/example.cml +106 -106
  48. package/template/.claude/skills/context-map/reference/Bounded Context/Bounded Context.md +40 -40
  49. package/template/.claude/skills/context-map/reference/Bounded Context/businessModel.md +5 -5
  50. package/template/.claude/skills/context-map/reference/Bounded Context/domainVisionStatement.md +2 -2
  51. package/template/.claude/skills/context-map/reference/Bounded Context/evolution.md +5 -5
  52. package/template/.claude/skills/context-map/reference/Bounded Context/implementationTechnology.md +1 -1
  53. package/template/.claude/skills/context-map/reference/Bounded Context/implements.md +1 -1
  54. package/template/.claude/skills/context-map/reference/Bounded Context/knowledgeLevel.md +4 -4
  55. package/template/.claude/skills/context-map/reference/Bounded Context/realizes.md +9 -9
  56. package/template/.claude/skills/context-map/reference/Bounded Context/refines.md +10 -10
  57. package/template/.claude/skills/context-map/reference/Bounded Context/responsibilities.md +26 -26
  58. package/template/.claude/skills/context-map/reference/Bounded Context/type.md +23 -23
  59. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Anticorruption Layer.md +5 -5
  60. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Bounded Context Relationship.md +12 -12
  61. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Conformist.md +5 -5
  62. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Customer-Supplier (C-S).md +22 -22
  63. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Open Host Service.md +4 -4
  64. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Partnership (P).md +13 -13
  65. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Published Language.md +4 -4
  66. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Shared Kernel (SK).md +12 -12
  67. package/template/.claude/skills/context-map/reference/Context Map.md +62 -62
  68. package/template/.claude/skills/context-map/reference/Domain/Domain.md +30 -30
  69. package/template/.claude/skills/context-map/reference/Domain/supports.md +33 -33
  70. package/template/.claude/skills/context-map/reference/Domain/type.md +3 -3
  71. package/template/.claude/skills/context-map/reference/Semantic Rules.md +32 -32
  72. package/template/.claude/skills/git/SKILL.md +131 -115
  73. package/template/.claude/skills/git/references/branch-management.md +88 -88
  74. package/template/.claude/skills/git/references/commit-standards.md +46 -46
  75. package/template/.claude/skills/git/references/context-efficiency.md +54 -0
  76. package/template/.claude/skills/git/references/gh-cli-guide.md +109 -109
  77. package/template/.claude/skills/git/references/safety-protocols.md +69 -69
  78. package/template/.claude/skills/git/references/workflow-commit.md +58 -58
  79. package/template/.claude/skills/git/references/workflow-merge-pr.md +136 -0
  80. package/template/.claude/skills/git/references/workflow-merge.md +48 -48
  81. package/template/.claude/skills/git/references/workflow-pr.md +58 -58
  82. package/template/.claude/skills/git/references/workflow-push.md +52 -52
  83. package/template/.claude/skills/hallmark/SKILL.md +552 -552
  84. package/template/.claude/skills/hallmark/references/anti-patterns.md +412 -412
  85. package/template/.claude/skills/hallmark/references/assets.md +406 -406
  86. package/template/.claude/skills/hallmark/references/color.md +95 -95
  87. package/template/.claude/skills/hallmark/references/component-cookbook.md +256 -256
  88. package/template/.claude/skills/hallmark/references/components/c1-outlined-chip.md +12 -12
  89. package/template/.claude/skills/hallmark/references/components/c2-inline-form-as-cta.md +16 -16
  90. package/template/.claude/skills/hallmark/references/components/c3-typographic-link.md +8 -8
  91. package/template/.claude/skills/hallmark/references/components/c4-sticky-bottom-bar.md +16 -16
  92. package/template/.claude/skills/hallmark/references/components/f1-bento-grid.md +20 -20
  93. package/template/.claude/skills/hallmark/references/components/f2-sticky-scroll-stack.md +20 -20
  94. package/template/.claude/skills/hallmark/references/components/f3-tabular-spec-sheet.md +11 -11
  95. package/template/.claude/skills/hallmark/references/components/f4-step-sequence.md +11 -11
  96. package/template/.claude/skills/hallmark/references/components/f5-annotated-screenshot.md +11 -11
  97. package/template/.claude/skills/hallmark/references/components/f6-product-card-grid.md +41 -41
  98. package/template/.claude/skills/hallmark/references/components/ft1-mast-headed.md +13 -13
  99. package/template/.claude/skills/hallmark/references/components/ft2-inline-rule-single-line.md +10 -10
  100. package/template/.claude/skills/hallmark/references/components/ft3-index-style-category-list.md +12 -12
  101. package/template/.claude/skills/hallmark/references/components/ft4-dense-typographic.md +10 -10
  102. package/template/.claude/skills/hallmark/references/components/ft5-statement.md +21 -21
  103. package/template/.claude/skills/hallmark/references/components/ft6-letter-close.md +19 -19
  104. package/template/.claude/skills/hallmark/references/components/ft7-newsletter-first.md +27 -27
  105. package/template/.claude/skills/hallmark/references/components/ft8-marquee-scroll.md +25 -25
  106. package/template/.claude/skills/hallmark/references/components/h1-marquee.md +15 -15
  107. package/template/.claude/skills/hallmark/references/components/h2-split-diptych.md +15 -15
  108. package/template/.claude/skills/hallmark/references/components/h3-quote-led.md +11 -11
  109. package/template/.claude/skills/hallmark/references/components/h4-stat-led.md +14 -14
  110. package/template/.claude/skills/hallmark/references/components/h5-letter-hero.md +11 -11
  111. package/template/.claude/skills/hallmark/references/components/h6-photographic-fold.md +16 -16
  112. package/template/.claude/skills/hallmark/references/components/h7-demo-video-clipped-by-viewport-edge.md +27 -27
  113. package/template/.claude/skills/hallmark/references/components/h8-mockup-split-browser-framed.md +23 -23
  114. package/template/.claude/skills/hallmark/references/components/h9-custom-illustration-centerpiece.md +27 -27
  115. package/template/.claude/skills/hallmark/references/components/n1-wordmark-2-links.md +12 -12
  116. package/template/.claude/skills/hallmark/references/components/n10-floating-on-scroll-morph.md +19 -19
  117. package/template/.claude/skills/hallmark/references/components/n2-floating-chip.md +14 -14
  118. package/template/.claude/skills/hallmark/references/components/n3-side-rail.md +14 -14
  119. package/template/.claude/skills/hallmark/references/components/n4-hidden-behind-k.md +9 -9
  120. package/template/.claude/skills/hallmark/references/components/n5-floating-pill.md +28 -28
  121. package/template/.claude/skills/hallmark/references/components/n6-newspaper-masthead.md +24 -24
  122. package/template/.claude/skills/hallmark/references/components/n7-brutal-slab.md +22 -22
  123. package/template/.claude/skills/hallmark/references/components/n8-terminal-command.md +21 -21
  124. package/template/.claude/skills/hallmark/references/components/n9-edge-aligned-minimal.md +17 -17
  125. package/template/.claude/skills/hallmark/references/components/s1-left-margin-numbered.md +15 -15
  126. package/template/.claude/skills/hallmark/references/components/s2-hanging.md +13 -13
  127. package/template/.claude/skills/hallmark/references/components/s3-sticky-pinned.md +19 -19
  128. package/template/.claude/skills/hallmark/references/components/s4-inline-no-break.md +11 -11
  129. package/template/.claude/skills/hallmark/references/components/s5-bottom-anchored.md +13 -13
  130. package/template/.claude/skills/hallmark/references/components/t1-pull-quote-with-marginalia.md +12 -12
  131. package/template/.claude/skills/hallmark/references/components/t2-logo-wall-hairline.md +19 -19
  132. package/template/.claude/skills/hallmark/references/components/t3-single-huge-quote.md +11 -11
  133. package/template/.claude/skills/hallmark/references/components/t4-numbered-stat-strip.md +14 -14
  134. package/template/.claude/skills/hallmark/references/contract.md +24 -24
  135. package/template/.claude/skills/hallmark/references/copy.md +182 -182
  136. package/template/.claude/skills/hallmark/references/custom-craft.md +626 -626
  137. package/template/.claude/skills/hallmark/references/custom-theme.md +329 -329
  138. package/template/.claude/skills/hallmark/references/design-md.md +116 -116
  139. package/template/.claude/skills/hallmark/references/export-formats.md +328 -328
  140. package/template/.claude/skills/hallmark/references/floating-nav.md +89 -89
  141. package/template/.claude/skills/hallmark/references/genres/atmospheric.md +65 -65
  142. package/template/.claude/skills/hallmark/references/genres/editorial.md +70 -70
  143. package/template/.claude/skills/hallmark/references/genres/modern-minimal.md +67 -67
  144. package/template/.claude/skills/hallmark/references/genres/playful.md +65 -65
  145. package/template/.claude/skills/hallmark/references/hero-enrichment.md +474 -474
  146. package/template/.claude/skills/hallmark/references/imagery-kit.md +170 -170
  147. package/template/.claude/skills/hallmark/references/interaction-and-states.md +207 -207
  148. package/template/.claude/skills/hallmark/references/layout-and-space.md +111 -111
  149. package/template/.claude/skills/hallmark/references/macrostructures/01-bento-grid.md +35 -35
  150. package/template/.claude/skills/hallmark/references/macrostructures/02-long-document.md +34 -34
  151. package/template/.claude/skills/hallmark/references/macrostructures/03-marquee-hero.md +31 -31
  152. package/template/.claude/skills/hallmark/references/macrostructures/04-stat-led.md +32 -32
  153. package/template/.claude/skills/hallmark/references/macrostructures/05-workbench.md +32 -32
  154. package/template/.claude/skills/hallmark/references/macrostructures/06-conversational-faq.md +33 -33
  155. package/template/.claude/skills/hallmark/references/macrostructures/07-manifesto.md +32 -32
  156. package/template/.claude/skills/hallmark/references/macrostructures/08-photographic.md +34 -34
  157. package/template/.claude/skills/hallmark/references/macrostructures/09-quote-led.md +32 -32
  158. package/template/.claude/skills/hallmark/references/macrostructures/10-specimen.md +32 -32
  159. package/template/.claude/skills/hallmark/references/macrostructures/11-catalogue.md +23 -23
  160. package/template/.claude/skills/hallmark/references/macrostructures/12-letter.md +23 -23
  161. package/template/.claude/skills/hallmark/references/macrostructures/13-index-first.md +23 -23
  162. package/template/.claude/skills/hallmark/references/macrostructures/14-narrative-workflow.md +23 -23
  163. package/template/.claude/skills/hallmark/references/macrostructures/15-split-studio.md +23 -23
  164. package/template/.claude/skills/hallmark/references/macrostructures/16-feature-stack.md +23 -23
  165. package/template/.claude/skills/hallmark/references/macrostructures/17-type-specimen.md +23 -23
  166. package/template/.claude/skills/hallmark/references/macrostructures/18-portfolio-grid.md +23 -23
  167. package/template/.claude/skills/hallmark/references/macrostructures/19-map-diagram.md +23 -23
  168. package/template/.claude/skills/hallmark/references/macrostructures/20-ecosystem-index.md +23 -23
  169. package/template/.claude/skills/hallmark/references/macrostructures/21-component-playground.md +23 -23
  170. package/template/.claude/skills/hallmark/references/macrostructures.md +89 -89
  171. package/template/.claude/skills/hallmark/references/microinteractions.md +260 -260
  172. package/template/.claude/skills/hallmark/references/motion.md +109 -109
  173. package/template/.claude/skills/hallmark/references/preview-examples.md +49 -49
  174. package/template/.claude/skills/hallmark/references/responsive.md +138 -138
  175. package/template/.claude/skills/hallmark/references/slop-test.md +205 -205
  176. package/template/.claude/skills/hallmark/references/structure.md +164 -164
  177. package/template/.claude/skills/hallmark/references/study.md +511 -511
  178. package/template/.claude/skills/hallmark/references/typography.md +243 -243
  179. package/template/.claude/skills/hallmark/references/verbs/audit.md +25 -25
  180. package/template/.claude/skills/hallmark/references/verbs/redesign.md +269 -269
  181. package/template/.claude/skills/hallmark-loop/SKILL.md +105 -105
  182. package/template/.claude/skills/hallmark-loop/references/auditor-call.md +60 -60
  183. package/template/.claude/skills/hallmark-loop/references/capture.md +78 -78
  184. package/template/.claude/skills/hallmark-loop/references/loop-control.md +79 -79
  185. package/template/.claude/skills/handoff/SKILL.md +15 -15
  186. package/template/.claude/skills/knowledge-crunching/SKILL.md +94 -94
  187. package/template/.claude/skills/research/SKILL.md +69 -69
  188. package/template/.claude/skills/skill-creator/LICENSE.txt +201 -201
  189. package/template/.claude/skills/skill-creator/SKILL.md +154 -149
  190. package/template/.claude/skills/skill-creator/agents/analyzer.md +274 -274
  191. package/template/.claude/skills/skill-creator/agents/comparator.md +202 -202
  192. package/template/.claude/skills/skill-creator/agents/grader.md +223 -223
  193. package/template/.claude/skills/skill-creator/assets/eval_review.html +146 -146
  194. package/template/.claude/skills/skill-creator/eval-viewer/generate_review.py +471 -471
  195. package/template/.claude/skills/skill-creator/eval-viewer/viewer.html +1325 -1325
  196. package/template/.claude/skills/skill-creator/references/benchmark-optimization-guide.md +86 -86
  197. package/template/.claude/skills/skill-creator/references/distribution-guide.md +79 -79
  198. package/template/.claude/skills/skill-creator/references/eval-infrastructure-guide.md +129 -129
  199. package/template/.claude/skills/skill-creator/references/eval-schemas.md +121 -121
  200. package/template/.claude/skills/skill-creator/references/mcp-skills-integration.md +71 -71
  201. package/template/.claude/skills/skill-creator/references/metadata-quality-criteria.md +94 -94
  202. package/template/.claude/skills/skill-creator/references/plugin-marketplace-hosting.md +104 -104
  203. package/template/.claude/skills/skill-creator/references/plugin-marketplace-overview.md +89 -89
  204. package/template/.claude/skills/skill-creator/references/plugin-marketplace-schema.md +93 -93
  205. package/template/.claude/skills/skill-creator/references/plugin-marketplace-sources.md +103 -103
  206. package/template/.claude/skills/skill-creator/references/plugin-marketplace-troubleshooting.md +76 -76
  207. package/template/.claude/skills/skill-creator/references/script-quality-criteria.md +106 -106
  208. package/template/.claude/skills/skill-creator/references/skill-anatomy-and-requirements.md +77 -77
  209. package/template/.claude/skills/skill-creator/references/skill-creation-workflow.md +152 -151
  210. package/template/.claude/skills/skill-creator/references/skill-design-patterns.md +75 -75
  211. package/template/.claude/skills/skill-creator/references/skillmark-benchmark-criteria.md +102 -102
  212. package/template/.claude/skills/skill-creator/references/structure-organization-criteria.md +114 -114
  213. package/template/.claude/skills/skill-creator/references/testing-and-iteration.md +78 -78
  214. package/template/.claude/skills/skill-creator/references/token-efficiency-criteria.md +74 -74
  215. package/template/.claude/skills/skill-creator/references/troubleshooting-guide.md +81 -81
  216. package/template/.claude/skills/skill-creator/references/validation-checklist.md +83 -83
  217. package/template/.claude/skills/skill-creator/references/writing-effective-instructions.md +88 -88
  218. package/template/.claude/skills/skill-creator/references/yaml-frontmatter-reference.md +92 -92
  219. package/template/.claude/skills/skill-creator/scripts/aggregate_benchmark.py +401 -401
  220. package/template/.claude/skills/skill-creator/scripts/encoding_utils.py +36 -36
  221. package/template/.claude/skills/skill-creator/scripts/generate_report.py +326 -326
  222. package/template/.claude/skills/skill-creator/scripts/improve_description.py +248 -248
  223. package/template/.claude/skills/skill-creator/scripts/init_skill.py +360 -360
  224. package/template/.claude/skills/skill-creator/scripts/package_skill.py +143 -143
  225. package/template/.claude/skills/skill-creator/scripts/quick_validate.py +110 -110
  226. package/template/.claude/skills/skill-creator/scripts/run_eval.py +310 -310
  227. package/template/.claude/skills/skill-creator/scripts/run_loop.py +332 -332
  228. package/template/.claude/skills/skill-creator/scripts/utils.py +47 -47
  229. package/template/.claude/skills/tdd/SKILL.md +142 -142
  230. package/template/.claude/skills/tdd/deep-modules.md +15 -15
  231. package/template/.claude/skills/tdd/interface-design.md +31 -31
  232. package/template/.claude/skills/tdd/mocking.md +59 -59
  233. package/template/.claude/skills/tdd/refactoring.md +10 -10
  234. package/template/.claude/skills/tdd/tests.md +61 -61
  235. package/template/.claude/statusline.cjs +0 -0
  236. package/template/.claude/skills/code-review/references/adversarial-review.md +0 -223
package/INSTALLATION.md CHANGED
@@ -1,52 +1,52 @@
1
- # Prerequisites & Auto-Install
2
-
3
- `musketeer` auto-installs the external prerequisites required by your selected company
4
- (announced before each install, never silent). When no OS package manager is available — or
5
- an elevation prompt is refused — it falls back to printing the exact manual command below.
6
-
7
- > Filled in detail during Phase 06 (provisioner) / Phase 08 (publish).
8
-
9
- ## Per-prerequisite matrix
10
-
11
- | Prereq | Needed by | Windows | macOS | Linux |
12
- |--------|-----------|---------|-------|-------|
13
- | Node 18+ | core | `winget install OpenJS.NodeJS.LTS` | `brew install node` | NodeSource / distro |
14
- | git | core, code-review | `winget install Git.Git` | `brew install git` | `apt/dnf/pacman install git` |
15
- | Python 3.8+ | core (skill-creator) | `winget install Python.Python.3.12` | `brew install python@3.12` | `apt install python3 python3-pip` |
16
- | Java 8+ | architecture (context-map) | `winget install Microsoft.OpenJDK` | `brew install --cask temurin` | `apt install openjdk-17-jdk` |
17
- | adr-tools | architecture (adr-writer) | `npm i -g @meza/adr-tools@2` | `npm i -g @meza/adr-tools@2` | `npm i -g @meza/adr-tools@2` |
18
- | gh | code-review (PR mode) | `winget install GitHub.cli` | `brew install gh` | `apt install gh` |
19
-
20
- > `adr-tools` is [`@meza/adr-tools`](https://www.npmjs.com/package/@meza/adr-tools) — the maintained
21
- > Node port of `npryce/adr-tools`. Same `adr` binary, same `.adr-dir`, same `NNNN-slug.md` files, so
22
- > existing ADRs carry over untouched. One npm command on every platform: no Git Bash, no admin
23
- > rights, no release zip.
24
- >
25
- > It is the one prereq that needs **Node >= 22.13.0** (musketeer itself still only needs 18). It is
26
- > installed as a prereq rather than bundled: it is GPL-3.0 and musketeer is MIT, so musketeer
27
- > invokes it as a subprocess instead of depending on it.
28
- >
29
- > Upgrading from `npryce/adr-tools`? Remove the old scripts first. They install as loose files in
30
- > `~/bin` or Git's `usr/bin`, and if either is earlier on your `PATH` the old `adr` keeps winning —
31
- > most visibly inside Git Bash.
32
-
33
- ### Running muster without a terminal
34
-
35
- `musketeer muster` opens a picker, which needs a terminal. For CI, onboarding scripts, and agent
36
- sessions, name the company instead and the picker is skipped:
37
-
38
- ```bash
39
- musketeer muster --company architecture,dotnet # set the company to exactly these
40
- musketeer muster --keep # refresh the company already in .musketeer.json
41
- ```
42
-
43
- `--keep` is the one to reach for after upgrading the CLI: it re-applies the latest templates
44
- without changing which musketeers are installed. Both flags survive the self-update re-exec.
45
-
46
- The `apt`/`brew` prereq installs can still prompt for `sudo` or wait on input. Pre-install them, or
47
- set `MUSKETEER_SKIP_INSTALL=1` to print the manual command instead of running it.
48
-
49
- ## Secrets (never auto-installed)
50
-
51
- - `ANTHROPIC_API_KEY` — needed only by skill-creator's improve/loop scripts. You will be
52
- prompted / shown how to set it; musketeer never writes it to the repo.
1
+ # Prerequisites & Auto-Install
2
+
3
+ `musketeer` auto-installs the external prerequisites required by your selected company
4
+ (announced before each install, never silent). When no OS package manager is available — or
5
+ an elevation prompt is refused — it falls back to printing the exact manual command below.
6
+
7
+ > Filled in detail during Phase 06 (provisioner) / Phase 08 (publish).
8
+
9
+ ## Per-prerequisite matrix
10
+
11
+ | Prereq | Needed by | Windows | macOS | Linux |
12
+ |--------|-----------|---------|-------|-------|
13
+ | Node 18+ | core | `winget install OpenJS.NodeJS.LTS` | `brew install node` | NodeSource / distro |
14
+ | git | core, code-review | `winget install Git.Git` | `brew install git` | `apt/dnf/pacman install git` |
15
+ | Python 3.8+ | core (skill-creator) | `winget install Python.Python.3.12` | `brew install python@3.12` | `apt install python3 python3-pip` |
16
+ | Java 8+ | architecture (context-map) | `winget install Microsoft.OpenJDK` | `brew install --cask temurin` | `apt install openjdk-17-jdk` |
17
+ | adr-tools | architecture (adr-writer) | `npm i -g @meza/adr-tools@2` | `npm i -g @meza/adr-tools@2` | `npm i -g @meza/adr-tools@2` |
18
+ | gh | code-review (PR mode) | `winget install GitHub.cli` | `brew install gh` | `apt install gh` |
19
+
20
+ > `adr-tools` is [`@meza/adr-tools`](https://www.npmjs.com/package/@meza/adr-tools) — the maintained
21
+ > Node port of `npryce/adr-tools`. Same `adr` binary, same `.adr-dir`, same `NNNN-slug.md` files, so
22
+ > existing ADRs carry over untouched. One npm command on every platform: no Git Bash, no admin
23
+ > rights, no release zip.
24
+ >
25
+ > It is the one prereq that needs **Node >= 22.13.0** (musketeer itself still only needs 18). It is
26
+ > installed as a prereq rather than bundled: it is GPL-3.0 and musketeer is MIT, so musketeer
27
+ > invokes it as a subprocess instead of depending on it.
28
+ >
29
+ > Upgrading from `npryce/adr-tools`? Remove the old scripts first. They install as loose files in
30
+ > `~/bin` or Git's `usr/bin`, and if either is earlier on your `PATH` the old `adr` keeps winning —
31
+ > most visibly inside Git Bash.
32
+
33
+ ### Running muster without a terminal
34
+
35
+ `musketeer muster` opens a picker, which needs a terminal. For CI, onboarding scripts, and agent
36
+ sessions, name the company instead and the picker is skipped:
37
+
38
+ ```bash
39
+ musketeer muster --company architecture,dotnet # set the company to exactly these
40
+ musketeer muster --keep # refresh the company already in .musketeer.json
41
+ ```
42
+
43
+ `--keep` is the one to reach for after upgrading the CLI: it re-applies the latest templates
44
+ without changing which musketeers are installed. Both flags survive the self-update re-exec.
45
+
46
+ The `apt`/`brew` prereq installs can still prompt for `sudo` or wait on input. Pre-install them, or
47
+ set `MUSKETEER_SKIP_INSTALL=1` to print the manual command instead of running it.
48
+
49
+ ## Secrets (never auto-installed)
50
+
51
+ - `ANTHROPIC_API_KEY` — needed only by skill-creator's improve/loop scripts. You will be
52
+ prompted / shown how to set it; musketeer never writes it to the repo.
package/README.md CHANGED
@@ -1,49 +1,49 @@
1
- # musketeer
2
-
3
- > Distributable custom Claude Code harness. One declarative command scaffolds a curated
4
- > **company** of **musketeers** (skills + agents + hooks) into any project's `./.claude/`.
5
-
6
- ## Install
7
-
8
- ```bash
9
- npm i -g @phuc1403/musketeer
10
- ```
11
-
12
- ## Use
13
-
14
- ```bash
15
- musketeer muster # self-update → pick company (multi-select) → refresh all selected skills to latest
16
- musketeer promote # update the musketeer CLI itself to the latest published version
17
- musketeer # show usage
18
- musketeer --help # show usage
19
- ```
20
-
21
- `musketeer muster` **self-updates first**: it pulls the latest published version (re-execing when behind),
22
- so the refresh always applies the newest template. Set `MUSKETEER_NO_SELF_UPDATE=1` to skip (offline / pinned).
23
-
24
- It is also **idempotent** and **force-updating**: the picker pre-checks your current company (from
25
- `.musketeer.json`); on confirm it **re-writes every selected musketeer's files to the latest template**
26
- (overwriting any local edits), removes newly-unchecked ones, regenerates `settings.json`, and auto-installs
27
- any missing prerequisites.
28
-
29
- `musketeer promote` upgrades the **CLI tool** itself (not your project's company): it checks the npm
30
- registry, and if a newer version exists, runs `npm i -g @phuc1403/musketeer@latest`. _muster = which
31
- musketeers are in this project; promote = upgrade the binary._
32
-
33
- ## Musketeers (v1)
34
-
35
- | Musketeer | Default in muster | What it adds |
36
- |-----------|-------------------|--------------|
37
- | **core** | always on (locked, hidden) | research, handoff, skill-creator, git (+ git-manager agent) · statusline, usage-context, format-json hooks |
38
- | **architecture** | off | adr-writer, architecture-characteristic-writer, context-map · CML validation hook |
39
- | **hallmark** | off | hallmark, hallmark-explore, hallmark-loop · auditor/explorer agents |
40
- | **code-review** | off | code-review skill + code-reviewer agent |
41
- | **dotnet** | off | tdd, knowledge-crunching · EF migration guard hook · always merges 4 quality-gate props into root `Directory.Build.props` (`MUSKETEER_SKIP_DOTNET_PROPS=1` to skip) · scaffolds a generic `src`/`tests` Clean Architecture skeleton when the project is blank |
42
- | **design-docs** | off | inject-design-docs SessionStart hook |
43
-
44
- The muster starts every musketeer **unselected**, except ones you already installed (pre-checked from
45
- `.musketeer.json`). **core** is always included and isn't shown as a toggle — it can't be removed.
46
-
47
- Vocabulary: **musketeer** = a selectable unit · **muster** = the picker · **company** = your recruited set.
48
-
49
- See [INSTALLATION.md](INSTALLATION.md) for prerequisites and auto-install behavior.
1
+ # musketeer
2
+
3
+ > Distributable custom Claude Code harness. One declarative command scaffolds a curated
4
+ > **company** of **musketeers** (skills + agents + hooks) into any project's `./.claude/`.
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ npm i -g @phuc1403/musketeer
10
+ ```
11
+
12
+ ## Use
13
+
14
+ ```bash
15
+ musketeer muster # self-update → pick company (multi-select) → refresh all selected skills to latest
16
+ musketeer promote # update the musketeer CLI itself to the latest published version
17
+ musketeer # show usage
18
+ musketeer --help # show usage
19
+ ```
20
+
21
+ `musketeer muster` **self-updates first**: it pulls the latest published version (re-execing when behind),
22
+ so the refresh always applies the newest template. Set `MUSKETEER_NO_SELF_UPDATE=1` to skip (offline / pinned).
23
+
24
+ It is also **idempotent** and **force-updating**: the picker pre-checks your current company (from
25
+ `.musketeer.json`); on confirm it **re-writes every selected musketeer's files to the latest template**
26
+ (overwriting any local edits), removes newly-unchecked ones, regenerates `settings.json`, and auto-installs
27
+ any missing prerequisites.
28
+
29
+ `musketeer promote` upgrades the **CLI tool** itself (not your project's company): it checks the npm
30
+ registry, and if a newer version exists, runs `npm i -g @phuc1403/musketeer@latest`. _muster = which
31
+ musketeers are in this project; promote = upgrade the binary._
32
+
33
+ ## Musketeers (v1)
34
+
35
+ | Musketeer | Default in muster | What it adds |
36
+ |-----------|-------------------|--------------|
37
+ | **core** | always on (locked, hidden) | research, handoff, skill-creator, git (+ git-manager agent) · statusline, usage-quota, format-json hooks |
38
+ | **architecture** | off | adr-writer, architecture-characteristic-writer, context-map · CML validation hook |
39
+ | **hallmark** | off | hallmark, hallmark-explore, hallmark-loop · auditor/explorer agents |
40
+ | **code-review** | off | code-review skill + code-reviewer agent |
41
+ | **dotnet** | off | tdd, knowledge-crunching · EF migration guard hook · always merges 4 quality-gate props into root `Directory.Build.props` (`MUSKETEER_SKIP_DOTNET_PROPS=1` to skip) · scaffolds a generic `src`/`tests` Clean Architecture skeleton when the project is blank |
42
+ | **design-docs** | off | inject-design-docs SessionStart hook |
43
+
44
+ The muster starts every musketeer **unselected**, except ones you already installed (pre-checked from
45
+ `.musketeer.json`). **core** is always included and isn't shown as a toggle — it can't be removed.
46
+
47
+ Vocabulary: **musketeer** = a selectable unit · **muster** = the picker · **company** = your recruited set.
48
+
49
+ See [INSTALLATION.md](INSTALLATION.md) for prerequisites and auto-install behavior.
package/bin/musketeer.js CHANGED
@@ -1,168 +1,168 @@
1
- #!/usr/bin/env node
2
- 'use strict';
3
-
4
- const { parseArgs } = require('node:util');
5
-
6
- const USAGE = `musketeer — scaffold a curated company of Claude Code musketeers into ./.claude
7
-
8
- Usage:
9
- musketeer muster Self-update to latest, then pick your company and refresh all selected skills
10
- musketeer muster --keep
11
- Refresh the company already recorded in .musketeer.json, no picker
12
- musketeer muster --company a,b
13
- Set the company to exactly these musketeers, no picker
14
- musketeer promote Update the musketeer CLI itself to the latest published version
15
- musketeer Show this help
16
- musketeer --help Show this help
17
-
18
- Notes:
19
- * "muster" changes which musketeers are in THIS project; "promote" upgrades the CLI itself.
20
- * On confirm, muster REFRESHES every selected musketeer's files to the latest template (overwrites local edits).
21
- * muster auto-updates the CLI to the latest published version first (set MUSKETEER_NO_SELF_UPDATE=1 to skip).
22
- * "core" is always installed and locked — it cannot be removed.
23
- * The muster is multi-select: check every musketeer you want, then confirm.
24
- * settings.json is GENERATED per-selection; missing prereqs are auto-installed (announced).
25
- * --keep and --company skip the picker, so muster runs in CI and other sessions with no terminal.
26
- * Without either flag and without a terminal, muster stops and tells you which flag to use.`;
27
-
28
- function parse(argv) {
29
- return parseArgs({
30
- args: argv,
31
- options: {
32
- help: { type: 'boolean', short: 'h', default: false },
33
- company: { type: 'string' },
34
- keep: { type: 'boolean', default: false },
35
- },
36
- allowPositionals: true,
37
- });
38
- }
39
-
40
- /**
41
- * Work out what this muster should do before anything touches the disk.
42
- *
43
- * Bare `muster` opens the picker, which needs a terminal. Under CI, or any
44
- * agent without one, the picker used to die inside its own TTY setup with no
45
- * hint that a flag could have avoided it. Both flags skip the picker: --company
46
- * states the company outright, --keep reconciles the one already recorded.
47
- *
48
- * `forward` is what the self-update must replay when it re-execs the newer
49
- * binary, so a scripted run does not land back at the picker.
50
- *
51
- * @param {{company?:string, keep:boolean}} values parsed flags
52
- * @param {{isTTY:boolean, projectDir:string, readLockfile:function}} ctx
53
- * @returns {{desiredIds:?string[], interactive:boolean, forward:string[]}}
54
- */
55
- function resolveMusterPlan(values, ctx) {
56
- if (values.company !== undefined && values.keep) {
57
- throw new Error('Use either --company or --keep, not both: one sets the company, the other keeps it.');
58
- }
59
-
60
- if (values.company !== undefined) {
61
- const ids = values.company
62
- .split(',')
63
- .map((s) => s.trim())
64
- .filter(Boolean);
65
- if (ids.length === 0) {
66
- throw new Error('--company needs at least one musketeer, for example: --company architecture,dotnet');
67
- }
68
- return { desiredIds: ids, interactive: false, forward: [`--company=${ids.join(',')}`] };
69
- }
70
-
71
- if (values.keep) {
72
- const prev = ctx.readLockfile(ctx.projectDir);
73
- if (!prev.musketeers || prev.musketeers.length === 0) {
74
- throw new Error(
75
- 'No company recorded in .musketeer.json, so there is nothing for --keep to keep. ' +
76
- 'Name one with --company, for example: --company architecture,dotnet'
77
- );
78
- }
79
- return { desiredIds: prev.musketeers, interactive: false, forward: ['--keep'] };
80
- }
81
-
82
- if (!ctx.isTTY) {
83
- throw new Error(
84
- 'muster needs a terminal for its picker, and this session has none. ' +
85
- 'Refresh the company already recorded with `musketeer muster --keep`, ' +
86
- 'or state one with `musketeer muster --company architecture,dotnet`.'
87
- );
88
- }
89
-
90
- return { desiredIds: null, interactive: true, forward: [] };
91
- }
92
-
93
- async function main(argv = process.argv.slice(2)) {
94
- let parsed;
95
- try {
96
- parsed = parse(argv);
97
- } catch (err) {
98
- process.stderr.write(`${err.message}\n\n${USAGE}\n`);
99
- process.exitCode = 2;
100
- return;
101
- }
102
-
103
- const { values, positionals } = parsed;
104
- const command = positionals[0];
105
-
106
- // `musketeer` alone (or --help) → usage.
107
- if (values.help || !command) {
108
- process.stdout.write(`${USAGE}\n`);
109
- return;
110
- }
111
-
112
- if (command === 'muster') {
113
- const { readLockfile } = require('../src/lockfile');
114
- let plan;
115
- try {
116
- plan = resolveMusterPlan(values, {
117
- isTTY: !!process.stdin.isTTY,
118
- projectDir: process.cwd(),
119
- readLockfile,
120
- });
121
- } catch (err) {
122
- process.stderr.write(`${err.message}\n`);
123
- process.exitCode = 2;
124
- return;
125
- }
126
-
127
- // Pull the latest published version first, so the picker refreshes installed
128
- // skills to the newest template (not a stale package's). Re-execs when behind.
129
- const { ensureLatest } = require('../src/self-update');
130
- const reexecCode = ensureLatest({ args: plan.forward });
131
- if (reexecCode !== null) {
132
- if (reexecCode !== 0) {
133
- // The update landed, the refresh did not. Say so: the CLI is now newer
134
- // than the templates in this project, and nothing announced the split.
135
- process.stderr.write(
136
- 'The CLI was updated but this project was not refreshed — nothing in .claude changed. ' +
137
- 'Re-run `musketeer muster` once the problem above is resolved.\n'
138
- );
139
- }
140
- process.exitCode = reexecCode;
141
- return;
142
- }
143
- // Lazy-require so help never pays the cost of loading the engine/manifest.
144
- const reconcile = require('../src/reconcile');
145
- await reconcile.run({ desiredIds: plan.desiredIds, interactive: plan.interactive });
146
- return;
147
- }
148
-
149
- if (command === 'promote') {
150
- const promote = require('../src/promote');
151
- await promote.run();
152
- return;
153
- }
154
-
155
- process.stderr.write(`Unknown command "${command}".\n\n${USAGE}\n`);
156
- process.exitCode = 2;
157
- }
158
-
159
- // Only run as a command. Requiring this file (the tests do, for
160
- // resolveMusterPlan) must not start a muster.
161
- if (require.main === module) {
162
- main().catch((err) => {
163
- process.stderr.write(`musketeer: ${err && err.message ? err.message : err}\n`);
164
- process.exitCode = 1;
165
- });
166
- }
167
-
168
- module.exports = { resolveMusterPlan, main };
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const { parseArgs } = require('node:util');
5
+
6
+ const USAGE = `musketeer — scaffold a curated company of Claude Code musketeers into ./.claude
7
+
8
+ Usage:
9
+ musketeer muster Self-update to latest, then pick your company and refresh all selected skills
10
+ musketeer muster --keep
11
+ Refresh the company already recorded in .musketeer.json, no picker
12
+ musketeer muster --company a,b
13
+ Set the company to exactly these musketeers, no picker
14
+ musketeer promote Update the musketeer CLI itself to the latest published version
15
+ musketeer Show this help
16
+ musketeer --help Show this help
17
+
18
+ Notes:
19
+ * "muster" changes which musketeers are in THIS project; "promote" upgrades the CLI itself.
20
+ * On confirm, muster REFRESHES every selected musketeer's files to the latest template (overwrites local edits).
21
+ * muster auto-updates the CLI to the latest published version first (set MUSKETEER_NO_SELF_UPDATE=1 to skip).
22
+ * "core" is always installed and locked — it cannot be removed.
23
+ * The muster is multi-select: check every musketeer you want, then confirm.
24
+ * settings.json is GENERATED per-selection; missing prereqs are auto-installed (announced).
25
+ * --keep and --company skip the picker, so muster runs in CI and other sessions with no terminal.
26
+ * Without either flag and without a terminal, muster stops and tells you which flag to use.`;
27
+
28
+ function parse(argv) {
29
+ return parseArgs({
30
+ args: argv,
31
+ options: {
32
+ help: { type: 'boolean', short: 'h', default: false },
33
+ company: { type: 'string' },
34
+ keep: { type: 'boolean', default: false },
35
+ },
36
+ allowPositionals: true,
37
+ });
38
+ }
39
+
40
+ /**
41
+ * Work out what this muster should do before anything touches the disk.
42
+ *
43
+ * Bare `muster` opens the picker, which needs a terminal. Under CI, or any
44
+ * agent without one, the picker used to die inside its own TTY setup with no
45
+ * hint that a flag could have avoided it. Both flags skip the picker: --company
46
+ * states the company outright, --keep reconciles the one already recorded.
47
+ *
48
+ * `forward` is what the self-update must replay when it re-execs the newer
49
+ * binary, so a scripted run does not land back at the picker.
50
+ *
51
+ * @param {{company?:string, keep:boolean}} values parsed flags
52
+ * @param {{isTTY:boolean, projectDir:string, readLockfile:function}} ctx
53
+ * @returns {{desiredIds:?string[], interactive:boolean, forward:string[]}}
54
+ */
55
+ function resolveMusterPlan(values, ctx) {
56
+ if (values.company !== undefined && values.keep) {
57
+ throw new Error('Use either --company or --keep, not both: one sets the company, the other keeps it.');
58
+ }
59
+
60
+ if (values.company !== undefined) {
61
+ const ids = values.company
62
+ .split(',')
63
+ .map((s) => s.trim())
64
+ .filter(Boolean);
65
+ if (ids.length === 0) {
66
+ throw new Error('--company needs at least one musketeer, for example: --company architecture,dotnet');
67
+ }
68
+ return { desiredIds: ids, interactive: false, forward: [`--company=${ids.join(',')}`] };
69
+ }
70
+
71
+ if (values.keep) {
72
+ const prev = ctx.readLockfile(ctx.projectDir);
73
+ if (!prev.musketeers || prev.musketeers.length === 0) {
74
+ throw new Error(
75
+ 'No company recorded in .musketeer.json, so there is nothing for --keep to keep. ' +
76
+ 'Name one with --company, for example: --company architecture,dotnet'
77
+ );
78
+ }
79
+ return { desiredIds: prev.musketeers, interactive: false, forward: ['--keep'] };
80
+ }
81
+
82
+ if (!ctx.isTTY) {
83
+ throw new Error(
84
+ 'muster needs a terminal for its picker, and this session has none. ' +
85
+ 'Refresh the company already recorded with `musketeer muster --keep`, ' +
86
+ 'or state one with `musketeer muster --company architecture,dotnet`.'
87
+ );
88
+ }
89
+
90
+ return { desiredIds: null, interactive: true, forward: [] };
91
+ }
92
+
93
+ async function main(argv = process.argv.slice(2)) {
94
+ let parsed;
95
+ try {
96
+ parsed = parse(argv);
97
+ } catch (err) {
98
+ process.stderr.write(`${err.message}\n\n${USAGE}\n`);
99
+ process.exitCode = 2;
100
+ return;
101
+ }
102
+
103
+ const { values, positionals } = parsed;
104
+ const command = positionals[0];
105
+
106
+ // `musketeer` alone (or --help) → usage.
107
+ if (values.help || !command) {
108
+ process.stdout.write(`${USAGE}\n`);
109
+ return;
110
+ }
111
+
112
+ if (command === 'muster') {
113
+ const { readLockfile } = require('../src/lockfile');
114
+ let plan;
115
+ try {
116
+ plan = resolveMusterPlan(values, {
117
+ isTTY: !!process.stdin.isTTY,
118
+ projectDir: process.cwd(),
119
+ readLockfile,
120
+ });
121
+ } catch (err) {
122
+ process.stderr.write(`${err.message}\n`);
123
+ process.exitCode = 2;
124
+ return;
125
+ }
126
+
127
+ // Pull the latest published version first, so the picker refreshes installed
128
+ // skills to the newest template (not a stale package's). Re-execs when behind.
129
+ const { ensureLatest } = require('../src/self-update');
130
+ const reexecCode = ensureLatest({ args: plan.forward });
131
+ if (reexecCode !== null) {
132
+ if (reexecCode !== 0) {
133
+ // The update landed, the refresh did not. Say so: the CLI is now newer
134
+ // than the templates in this project, and nothing announced the split.
135
+ process.stderr.write(
136
+ 'The CLI was updated but this project was not refreshed — nothing in .claude changed. ' +
137
+ 'Re-run `musketeer muster` once the problem above is resolved.\n'
138
+ );
139
+ }
140
+ process.exitCode = reexecCode;
141
+ return;
142
+ }
143
+ // Lazy-require so help never pays the cost of loading the engine/manifest.
144
+ const reconcile = require('../src/reconcile');
145
+ await reconcile.run({ desiredIds: plan.desiredIds, interactive: plan.interactive });
146
+ return;
147
+ }
148
+
149
+ if (command === 'promote') {
150
+ const promote = require('../src/promote');
151
+ await promote.run();
152
+ return;
153
+ }
154
+
155
+ process.stderr.write(`Unknown command "${command}".\n\n${USAGE}\n`);
156
+ process.exitCode = 2;
157
+ }
158
+
159
+ // Only run as a command. Requiring this file (the tests do, for
160
+ // resolveMusterPlan) must not start a muster.
161
+ if (require.main === module) {
162
+ main().catch((err) => {
163
+ process.stderr.write(`musketeer: ${err && err.message ? err.message : err}\n`);
164
+ process.exitCode = 1;
165
+ });
166
+ }
167
+
168
+ module.exports = { resolveMusterPlan, main };