@phuc1403/musketeer 0.9.0 → 0.11.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 (280) hide show
  1. package/INSTALLATION.md +53 -52
  2. package/README.md +1 -1
  3. package/bin/musketeer.js +168 -168
  4. package/manifest.json +19 -2
  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/git-manager.md +18 -18
  10. package/template/.claude/agents/hallmark-auditor.md +78 -78
  11. package/template/.claude/agents/researcher.md +33 -33
  12. package/template/.claude/hooks/block-unsafe-adr-title.cjs +85 -85
  13. package/template/.claude/hooks/init-adr-dir.cjs +173 -173
  14. package/template/.claude/hooks/inject-adr-flags.cjs +94 -94
  15. package/template/.claude/hooks/lib/adr/command-scan.cjs +115 -115
  16. package/template/.claude/hooks/lib/characteristics/checker.cjs +357 -357
  17. package/template/.claude/hooks/lib/git-info-cache.cjs +191 -191
  18. package/template/.claude/hooks/sync-adr-toc.cjs +146 -146
  19. package/template/.claude/hooks/usage-quota-cache-refresh.cjs +166 -166
  20. package/template/.claude/hooks/validate-characteristics-hook.cjs +66 -66
  21. package/template/.claude/hooks/validate-cml-hook.js +146 -145
  22. package/template/.claude/skills/adr-writer/SKILL.md +48 -48
  23. package/template/.claude/skills/adr-writer/references/adr-example.md +35 -35
  24. package/template/.claude/skills/architecture-characteristic-writer/SKILL.md +215 -215
  25. package/template/.claude/skills/architecture-characteristic-writer/assets/worksheet-template.md +29 -29
  26. package/template/.claude/skills/architecture-characteristic-writer/references/characteristics-catalog.md +40 -40
  27. package/template/.claude/skills/architecture-characteristic-writer/scripts/ranking-table.cjs +171 -171
  28. package/template/.claude/skills/context-map/SKILL.md +80 -80
  29. package/template/.claude/skills/context-map/example.cml +106 -106
  30. package/template/.claude/skills/context-map/reference/Bounded Context/Bounded Context.md +40 -40
  31. package/template/.claude/skills/context-map/reference/Bounded Context/businessModel.md +5 -5
  32. package/template/.claude/skills/context-map/reference/Bounded Context/domainVisionStatement.md +2 -2
  33. package/template/.claude/skills/context-map/reference/Bounded Context/evolution.md +5 -5
  34. package/template/.claude/skills/context-map/reference/Bounded Context/implementationTechnology.md +1 -1
  35. package/template/.claude/skills/context-map/reference/Bounded Context/implements.md +1 -1
  36. package/template/.claude/skills/context-map/reference/Bounded Context/knowledgeLevel.md +4 -4
  37. package/template/.claude/skills/context-map/reference/Bounded Context/realizes.md +9 -9
  38. package/template/.claude/skills/context-map/reference/Bounded Context/refines.md +10 -10
  39. package/template/.claude/skills/context-map/reference/Bounded Context/responsibilities.md +26 -26
  40. package/template/.claude/skills/context-map/reference/Bounded Context/type.md +23 -23
  41. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Anticorruption Layer.md +5 -5
  42. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Bounded Context Relationship.md +12 -12
  43. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Conformist.md +5 -5
  44. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Customer-Supplier (C-S).md +22 -22
  45. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Open Host Service.md +4 -4
  46. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Partnership (P).md +13 -13
  47. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Published Language.md +4 -4
  48. package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Shared Kernel (SK).md +12 -12
  49. package/template/.claude/skills/context-map/reference/Context Map.md +62 -62
  50. package/template/.claude/skills/context-map/reference/Domain/Domain.md +30 -30
  51. package/template/.claude/skills/context-map/reference/Domain/supports.md +33 -33
  52. package/template/.claude/skills/context-map/reference/Domain/type.md +3 -3
  53. package/template/.claude/skills/context-map/reference/Semantic Rules.md +32 -32
  54. package/template/.claude/skills/hallmark/SKILL.md +552 -552
  55. package/template/.claude/skills/hallmark/references/anti-patterns.md +412 -412
  56. package/template/.claude/skills/hallmark/references/assets.md +406 -406
  57. package/template/.claude/skills/hallmark/references/color.md +95 -95
  58. package/template/.claude/skills/hallmark/references/component-cookbook.md +256 -256
  59. package/template/.claude/skills/hallmark/references/components/c1-outlined-chip.md +12 -12
  60. package/template/.claude/skills/hallmark/references/components/c2-inline-form-as-cta.md +16 -16
  61. package/template/.claude/skills/hallmark/references/components/c3-typographic-link.md +8 -8
  62. package/template/.claude/skills/hallmark/references/components/c4-sticky-bottom-bar.md +16 -16
  63. package/template/.claude/skills/hallmark/references/components/f1-bento-grid.md +20 -20
  64. package/template/.claude/skills/hallmark/references/components/f2-sticky-scroll-stack.md +20 -20
  65. package/template/.claude/skills/hallmark/references/components/f3-tabular-spec-sheet.md +11 -11
  66. package/template/.claude/skills/hallmark/references/components/f4-step-sequence.md +11 -11
  67. package/template/.claude/skills/hallmark/references/components/f5-annotated-screenshot.md +11 -11
  68. package/template/.claude/skills/hallmark/references/components/f6-product-card-grid.md +41 -41
  69. package/template/.claude/skills/hallmark/references/components/ft1-mast-headed.md +13 -13
  70. package/template/.claude/skills/hallmark/references/components/ft2-inline-rule-single-line.md +10 -10
  71. package/template/.claude/skills/hallmark/references/components/ft3-index-style-category-list.md +12 -12
  72. package/template/.claude/skills/hallmark/references/components/ft4-dense-typographic.md +10 -10
  73. package/template/.claude/skills/hallmark/references/components/ft5-statement.md +21 -21
  74. package/template/.claude/skills/hallmark/references/components/ft6-letter-close.md +19 -19
  75. package/template/.claude/skills/hallmark/references/components/ft7-newsletter-first.md +27 -27
  76. package/template/.claude/skills/hallmark/references/components/ft8-marquee-scroll.md +25 -25
  77. package/template/.claude/skills/hallmark/references/components/h1-marquee.md +15 -15
  78. package/template/.claude/skills/hallmark/references/components/h2-split-diptych.md +15 -15
  79. package/template/.claude/skills/hallmark/references/components/h3-quote-led.md +11 -11
  80. package/template/.claude/skills/hallmark/references/components/h4-stat-led.md +14 -14
  81. package/template/.claude/skills/hallmark/references/components/h5-letter-hero.md +11 -11
  82. package/template/.claude/skills/hallmark/references/components/h6-photographic-fold.md +16 -16
  83. package/template/.claude/skills/hallmark/references/components/h7-demo-video-clipped-by-viewport-edge.md +27 -27
  84. package/template/.claude/skills/hallmark/references/components/h8-mockup-split-browser-framed.md +23 -23
  85. package/template/.claude/skills/hallmark/references/components/h9-custom-illustration-centerpiece.md +27 -27
  86. package/template/.claude/skills/hallmark/references/components/n1-wordmark-2-links.md +12 -12
  87. package/template/.claude/skills/hallmark/references/components/n10-floating-on-scroll-morph.md +19 -19
  88. package/template/.claude/skills/hallmark/references/components/n2-floating-chip.md +14 -14
  89. package/template/.claude/skills/hallmark/references/components/n3-side-rail.md +14 -14
  90. package/template/.claude/skills/hallmark/references/components/n4-hidden-behind-k.md +9 -9
  91. package/template/.claude/skills/hallmark/references/components/n5-floating-pill.md +28 -28
  92. package/template/.claude/skills/hallmark/references/components/n6-newspaper-masthead.md +24 -24
  93. package/template/.claude/skills/hallmark/references/components/n7-brutal-slab.md +22 -22
  94. package/template/.claude/skills/hallmark/references/components/n8-terminal-command.md +21 -21
  95. package/template/.claude/skills/hallmark/references/components/n9-edge-aligned-minimal.md +17 -17
  96. package/template/.claude/skills/hallmark/references/components/s1-left-margin-numbered.md +15 -15
  97. package/template/.claude/skills/hallmark/references/components/s2-hanging.md +13 -13
  98. package/template/.claude/skills/hallmark/references/components/s3-sticky-pinned.md +19 -19
  99. package/template/.claude/skills/hallmark/references/components/s4-inline-no-break.md +11 -11
  100. package/template/.claude/skills/hallmark/references/components/s5-bottom-anchored.md +13 -13
  101. package/template/.claude/skills/hallmark/references/components/t1-pull-quote-with-marginalia.md +12 -12
  102. package/template/.claude/skills/hallmark/references/components/t2-logo-wall-hairline.md +19 -19
  103. package/template/.claude/skills/hallmark/references/components/t3-single-huge-quote.md +11 -11
  104. package/template/.claude/skills/hallmark/references/components/t4-numbered-stat-strip.md +14 -14
  105. package/template/.claude/skills/hallmark/references/contract.md +24 -24
  106. package/template/.claude/skills/hallmark/references/copy.md +182 -182
  107. package/template/.claude/skills/hallmark/references/custom-craft.md +626 -626
  108. package/template/.claude/skills/hallmark/references/custom-theme.md +329 -329
  109. package/template/.claude/skills/hallmark/references/design-md.md +116 -116
  110. package/template/.claude/skills/hallmark/references/export-formats.md +328 -328
  111. package/template/.claude/skills/hallmark/references/floating-nav.md +89 -89
  112. package/template/.claude/skills/hallmark/references/genres/atmospheric.md +65 -65
  113. package/template/.claude/skills/hallmark/references/genres/editorial.md +70 -70
  114. package/template/.claude/skills/hallmark/references/genres/modern-minimal.md +67 -67
  115. package/template/.claude/skills/hallmark/references/genres/playful.md +65 -65
  116. package/template/.claude/skills/hallmark/references/hero-enrichment.md +474 -474
  117. package/template/.claude/skills/hallmark/references/imagery-kit.md +170 -170
  118. package/template/.claude/skills/hallmark/references/interaction-and-states.md +207 -207
  119. package/template/.claude/skills/hallmark/references/layout-and-space.md +111 -111
  120. package/template/.claude/skills/hallmark/references/macrostructures/01-bento-grid.md +35 -35
  121. package/template/.claude/skills/hallmark/references/macrostructures/02-long-document.md +34 -34
  122. package/template/.claude/skills/hallmark/references/macrostructures/03-marquee-hero.md +31 -31
  123. package/template/.claude/skills/hallmark/references/macrostructures/04-stat-led.md +32 -32
  124. package/template/.claude/skills/hallmark/references/macrostructures/05-workbench.md +32 -32
  125. package/template/.claude/skills/hallmark/references/macrostructures/06-conversational-faq.md +33 -33
  126. package/template/.claude/skills/hallmark/references/macrostructures/07-manifesto.md +32 -32
  127. package/template/.claude/skills/hallmark/references/macrostructures/08-photographic.md +34 -34
  128. package/template/.claude/skills/hallmark/references/macrostructures/09-quote-led.md +32 -32
  129. package/template/.claude/skills/hallmark/references/macrostructures/10-specimen.md +32 -32
  130. package/template/.claude/skills/hallmark/references/macrostructures/11-catalogue.md +23 -23
  131. package/template/.claude/skills/hallmark/references/macrostructures/12-letter.md +23 -23
  132. package/template/.claude/skills/hallmark/references/macrostructures/13-index-first.md +23 -23
  133. package/template/.claude/skills/hallmark/references/macrostructures/14-narrative-workflow.md +23 -23
  134. package/template/.claude/skills/hallmark/references/macrostructures/15-split-studio.md +23 -23
  135. package/template/.claude/skills/hallmark/references/macrostructures/16-feature-stack.md +23 -23
  136. package/template/.claude/skills/hallmark/references/macrostructures/17-type-specimen.md +23 -23
  137. package/template/.claude/skills/hallmark/references/macrostructures/18-portfolio-grid.md +23 -23
  138. package/template/.claude/skills/hallmark/references/macrostructures/19-map-diagram.md +23 -23
  139. package/template/.claude/skills/hallmark/references/macrostructures/20-ecosystem-index.md +23 -23
  140. package/template/.claude/skills/hallmark/references/macrostructures/21-component-playground.md +23 -23
  141. package/template/.claude/skills/hallmark/references/macrostructures.md +89 -89
  142. package/template/.claude/skills/hallmark/references/microinteractions.md +260 -260
  143. package/template/.claude/skills/hallmark/references/motion.md +109 -109
  144. package/template/.claude/skills/hallmark/references/preview-examples.md +49 -49
  145. package/template/.claude/skills/hallmark/references/responsive.md +138 -138
  146. package/template/.claude/skills/hallmark/references/slop-test.md +205 -205
  147. package/template/.claude/skills/hallmark/references/structure.md +164 -164
  148. package/template/.claude/skills/hallmark/references/study.md +511 -511
  149. package/template/.claude/skills/hallmark/references/typography.md +243 -243
  150. package/template/.claude/skills/hallmark/references/verbs/audit.md +25 -25
  151. package/template/.claude/skills/hallmark/references/verbs/redesign.md +269 -269
  152. package/template/.claude/skills/hallmark-loop/SKILL.md +105 -105
  153. package/template/.claude/skills/hallmark-loop/references/auditor-call.md +60 -60
  154. package/template/.claude/skills/hallmark-loop/references/capture.md +78 -78
  155. package/template/.claude/skills/hallmark-loop/references/loop-control.md +79 -79
  156. package/template/.claude/skills/handoff/SKILL.md +15 -15
  157. package/template/.claude/skills/knowledge-crunching/SKILL.md +94 -94
  158. package/template/.claude/skills/logical-components/.gitattributes +2 -0
  159. package/template/.claude/skills/logical-components/SKILL.md +102 -0
  160. package/template/.claude/skills/logical-components/references/component-classifier-prompt.md +53 -0
  161. package/template/.claude/skills/logical-components/references/responsibility-agent-prompt.md +67 -0
  162. package/template/.claude/skills/logical-components/references/responsibility-verifier-prompt.md +39 -0
  163. package/template/.claude/skills/logical-components/scripts/Directory.Build.props +7 -0
  164. package/template/.claude/skills/logical-components/scripts/Directory.Packages.props +8 -0
  165. package/template/.claude/skills/logical-components/scripts/LogicalComponents/BatchPlanning.cs +69 -0
  166. package/template/.claude/skills/logical-components/scripts/LogicalComponents/BatchesCommand.cs +39 -0
  167. package/template/.claude/skills/logical-components/scripts/LogicalComponents/CandidatesCommand.cs +70 -0
  168. package/template/.claude/skills/logical-components/scripts/LogicalComponents/CitableSource.cs +39 -0
  169. package/template/.claude/skills/logical-components/scripts/LogicalComponents/Citation.cs +37 -0
  170. package/template/.claude/skills/logical-components/scripts/LogicalComponents/ClassifyBatchesCommand.cs +65 -0
  171. package/template/.claude/skills/logical-components/scripts/LogicalComponents/ClassifyMergeCommand.cs +187 -0
  172. package/template/.claude/skills/logical-components/scripts/LogicalComponents/ComponentDiscovery.cs +166 -0
  173. package/template/.claude/skills/logical-components/scripts/LogicalComponents/ComponentRule.cs +87 -0
  174. package/template/.claude/skills/logical-components/scripts/LogicalComponents/ComponentsFile.cs +83 -0
  175. package/template/.claude/skills/logical-components/scripts/LogicalComponents/CouplingResolver.cs +196 -0
  176. package/template/.claude/skills/logical-components/scripts/LogicalComponents/DisplayName.cs +14 -0
  177. package/template/.claude/skills/logical-components/scripts/LogicalComponents/EdgeExtraction.cs +111 -0
  178. package/template/.claude/skills/logical-components/scripts/LogicalComponents/ExtractCommand.cs +72 -0
  179. package/template/.claude/skills/logical-components/scripts/LogicalComponents/ExtractConfig.cs +79 -0
  180. package/template/.claude/skills/logical-components/scripts/LogicalComponents/LogicalComponents.csproj +15 -0
  181. package/template/.claude/skills/logical-components/scripts/LogicalComponents/MarkdownRenderer.cs +73 -0
  182. package/template/.claude/skills/logical-components/scripts/LogicalComponents/MemberUseResolution.cs +203 -0
  183. package/template/.claude/skills/logical-components/scripts/LogicalComponents/MemberUses.cs +155 -0
  184. package/template/.claude/skills/logical-components/scripts/LogicalComponents/PortResolution.cs +75 -0
  185. package/template/.claude/skills/logical-components/scripts/LogicalComponents/Program.cs +27 -0
  186. package/template/.claude/skills/logical-components/scripts/LogicalComponents/ProjectFilters.cs +76 -0
  187. package/template/.claude/skills/logical-components/scripts/LogicalComponents/PruneCommand.cs +132 -0
  188. package/template/.claude/skills/logical-components/scripts/LogicalComponents/RenderCommand.cs +173 -0
  189. package/template/.claude/skills/logical-components/scripts/LogicalComponents/ResponsibilityBatches.cs +84 -0
  190. package/template/.claude/skills/logical-components/scripts/LogicalComponents/ResponsibilityValidation.cs +178 -0
  191. package/template/.claude/skills/logical-components/scripts/LogicalComponents/SeamDispatch.cs +59 -0
  192. package/template/.claude/skills/logical-components/scripts/LogicalComponents/SymbolNames.cs +53 -0
  193. package/template/.claude/skills/logical-components/scripts/LogicalComponents/TypeMap.cs +75 -0
  194. package/template/.claude/skills/logical-components/scripts/LogicalComponents/WalkRoots.cs +63 -0
  195. package/template/.claude/skills/logical-components/scripts/LogicalComponents/WorkspaceLoader.cs +227 -0
  196. package/template/.claude/skills/logical-components/scripts/LogicalComponents.Tests/AssignIdsTests.cs +41 -0
  197. package/template/.claude/skills/logical-components/scripts/LogicalComponents.Tests/BatchPlanningTests.cs +82 -0
  198. package/template/.claude/skills/logical-components/scripts/LogicalComponents.Tests/CandidatesCommandTests.cs +34 -0
  199. package/template/.claude/skills/logical-components/scripts/LogicalComponents.Tests/CitationTests.cs +42 -0
  200. package/template/.claude/skills/logical-components/scripts/LogicalComponents.Tests/ClassifyCommandsTests.cs +176 -0
  201. package/template/.claude/skills/logical-components/scripts/LogicalComponents.Tests/ComponentDiscoveryTests.cs +190 -0
  202. package/template/.claude/skills/logical-components/scripts/LogicalComponents.Tests/CouplingExtractionTests.cs +174 -0
  203. package/template/.claude/skills/logical-components/scripts/LogicalComponents.Tests/DisplayNameTests.cs +17 -0
  204. package/template/.claude/skills/logical-components/scripts/LogicalComponents.Tests/ExtractConfigTests.cs +72 -0
  205. package/template/.claude/skills/logical-components/scripts/LogicalComponents.Tests/FixturePaths.cs +32 -0
  206. package/template/.claude/skills/logical-components/scripts/LogicalComponents.Tests/LogicalComponents.Tests.csproj +23 -0
  207. package/template/.claude/skills/logical-components/scripts/LogicalComponents.Tests/MarkdownRendererTests.cs +50 -0
  208. package/template/.claude/skills/logical-components/scripts/LogicalComponents.Tests/ProjectFiltersTests.cs +65 -0
  209. package/template/.claude/skills/logical-components/scripts/LogicalComponents.Tests/PruneCommandTests.cs +119 -0
  210. package/template/.claude/skills/logical-components/scripts/LogicalComponents.Tests/RenderCommandTests.cs +162 -0
  211. package/template/.claude/skills/logical-components/scripts/LogicalComponents.Tests/RenderGoldenTests.cs +34 -0
  212. package/template/.claude/skills/logical-components/scripts/LogicalComponents.Tests/RenderTestData.cs +49 -0
  213. package/template/.claude/skills/logical-components/scripts/LogicalComponents.Tests/ResponsibilityValidationTests.cs +227 -0
  214. package/template/.claude/skills/logical-components/scripts/LogicalComponents.Tests/SampleAppWorkspace.cs +27 -0
  215. package/template/.claude/skills/logical-components/scripts/LogicalComponents.Tests/WorkspaceLoaderTests.cs +87 -0
  216. package/template/.claude/skills/logical-components/scripts/fixtures/BrokenApp/src/Broken.Application/Broken.Application.csproj +7 -0
  217. package/template/.claude/skills/logical-components/scripts/fixtures/BrokenApp/src/Broken.Application/Broken.cs +7 -0
  218. package/template/.claude/skills/logical-components/scripts/fixtures/MultiTargetApp/MultiTargetApp.slnx +6 -0
  219. package/template/.claude/skills/logical-components/scripts/fixtures/MultiTargetApp/src/Legacy.FSharp/Legacy.FSharp.fsproj +8 -0
  220. package/template/.claude/skills/logical-components/scripts/fixtures/MultiTargetApp/src/Legacy.FSharp/Library.fs +5 -0
  221. package/template/.claude/skills/logical-components/scripts/fixtures/MultiTargetApp/src/Multi.Application/Multi.Application.csproj +7 -0
  222. package/template/.claude/skills/logical-components/scripts/fixtures/MultiTargetApp/src/Multi.Application/Scheduling.cs +14 -0
  223. package/template/.claude/skills/logical-components/scripts/fixtures/NoSolutionApp/src/Solo.Application/Solo.Application.csproj +7 -0
  224. package/template/.claude/skills/logical-components/scripts/fixtures/NoSolutionApp/src/Solo.Application/SoloGreeting.cs +7 -0
  225. package/template/.claude/skills/logical-components/scripts/fixtures/NoSolutionApp/src/Solo.Application.Tests/FakeGreeting.cs +6 -0
  226. package/template/.claude/skills/logical-components/scripts/fixtures/NoSolutionApp/src/Solo.Application.Tests/Solo.Application.Tests.csproj +11 -0
  227. package/template/.claude/skills/logical-components/scripts/fixtures/RenderGolden/components.json +63 -0
  228. package/template/.claude/skills/logical-components/scripts/fixtures/RenderGolden/expected.md +28 -0
  229. package/template/.claude/skills/logical-components/scripts/fixtures/RenderGolden/repo/src/App/OrderAcceptance.cs +16 -0
  230. package/template/.claude/skills/logical-components/scripts/fixtures/RenderGolden/repo/src/Infra/OrderQueue.cs +10 -0
  231. package/template/.claude/skills/logical-components/scripts/fixtures/RenderGolden/resp/batch-01.json +18 -0
  232. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/SampleApp.slnx +10 -0
  233. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/logical-components.json +78 -0
  234. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Application/CandidateCases.cs +37 -0
  235. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Application/CouplingCases.cs +33 -0
  236. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Application/DependencyInjection.cs +18 -0
  237. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Application/EdgeCases.cs +63 -0
  238. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Application/LoudNotifying.Base.cs +5 -0
  239. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Application/LoudNotifying.cs +7 -0
  240. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Application/OrderAcceptance.cs +17 -0
  241. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Application/OrderOptions.cs +9 -0
  242. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Application/OrderRejectedException.cs +7 -0
  243. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Application/OrderRequest.cs +4 -0
  244. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Application/OrderRunning.cs +18 -0
  245. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Application/OrderValidation.cs +6 -0
  246. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Application/Ports.cs +19 -0
  247. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Application/PriceRules.cs +7 -0
  248. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Application/ReceiptPrinting.Totals.cs +6 -0
  249. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Application/ReceiptPrinting.cs +7 -0
  250. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Application/ReviewCases.cs +107 -0
  251. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Application/ReviewFixCases.cs +143 -0
  252. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Application/RunClock.cs +12 -0
  253. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Application/Sample.Application.csproj +10 -0
  254. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Application/SeeThroughCases.cs +89 -0
  255. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Billing.Application/OrderRunning.cs +7 -0
  256. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Billing.Application/Sample.Billing.Application.csproj +11 -0
  257. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Infrastructure/ForwardedNotifier.cs +8 -0
  258. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Infrastructure/InfrastructureDependencyInjection.cs +16 -0
  259. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Infrastructure/Mailer.cs +6 -0
  260. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Infrastructure/OrderQueue.cs +11 -0
  261. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Infrastructure/QueueEntry.cs +4 -0
  262. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Infrastructure/QueueStore.cs +8 -0
  263. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Infrastructure/ReviewCases.cs +35 -0
  264. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Infrastructure/ReviewFixCases.cs +13 -0
  265. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Infrastructure/Sample.Infrastructure.csproj +13 -0
  266. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Infrastructure/SeeThroughCases.cs +18 -0
  267. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/src/Sample.Infrastructure/UnreachedPlumbing.cs +7 -0
  268. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/tests/Sample.Tests/FakeOrderQueue.cs +11 -0
  269. package/template/.claude/skills/logical-components/scripts/fixtures/SampleApp/tests/Sample.Tests/Sample.Tests.csproj +11 -0
  270. package/template/.claude/skills/logical-components/scripts/fixtures/SharedOutsideRepo/SharedClock.cs +7 -0
  271. package/template/.claude/skills/logical-components/scripts/global.json +5 -0
  272. package/template/.claude/skills/logical-components/scripts/smoke-sample.sh +26 -0
  273. package/template/.claude/skills/research/SKILL.md +69 -69
  274. package/template/.claude/skills/tdd/SKILL.md +142 -142
  275. package/template/.claude/skills/tdd/deep-modules.md +15 -15
  276. package/template/.claude/skills/tdd/interface-design.md +31 -31
  277. package/template/.claude/skills/tdd/mocking.md +59 -59
  278. package/template/.claude/skills/tdd/refactoring.md +10 -10
  279. package/template/.claude/skills/tdd/tests.md +61 -61
  280. package/template/.claude/statusline.cjs +100 -37
@@ -0,0 +1,227 @@
1
+ namespace LogicalComponents.Tests;
2
+
3
+ public class ResponsibilityValidationTests
4
+ {
5
+ private static List<string> Validate(
6
+ Dictionary<string, IReadOnlyList<Responsibility>> responsibilities, IReadOnlyDictionary<string, string>? fileOf = null) =>
7
+ ResponsibilityValidation.Validate(RenderTestData.Extraction, responsibilities, RenderTestData.Lines, fileOf);
8
+
9
+ private static Dictionary<string, IReadOnlyList<Responsibility>> With(string id, params Responsibility[] items)
10
+ {
11
+ var responsibilities = RenderTestData.ValidResponsibilities();
12
+ responsibilities[id] = items;
13
+ return responsibilities;
14
+ }
15
+
16
+ [Fact]
17
+ public void Valid_responsibilities_have_no_errors()
18
+ {
19
+ Assert.Empty(Validate(RenderTestData.ValidResponsibilities()));
20
+ }
21
+
22
+ [Fact]
23
+ public void An_unknown_component_is_an_error()
24
+ {
25
+ var responsibilities = RenderTestData.ValidResponsibilities();
26
+ responsibilities["Invented"] = [new Responsibility("Does things.", "src/App/OrderAcceptance.cs:5")];
27
+
28
+ Assert.Equal(["Invented: not a component in components.json"], Validate(responsibilities));
29
+ }
30
+
31
+ [Fact]
32
+ public void An_unknown_component_names_its_batch_file_and_a_case_insensitive_match()
33
+ {
34
+ var responsibilities = RenderTestData.ValidResponsibilities();
35
+ responsibilities["orderqueue"] = [new Responsibility("Stores orders.", "src/Infra/OrderQueue.cs:10")];
36
+
37
+ Assert.Equal(
38
+ ["orderqueue: not a component in components.json (batch-02.json); did you mean 'OrderQueue'?"],
39
+ Validate(responsibilities, new Dictionary<string, string> { ["orderqueue"] = "batch-02.json" }));
40
+ }
41
+
42
+ [Fact]
43
+ public void A_component_without_responsibilities_is_an_error()
44
+ {
45
+ var responsibilities = RenderTestData.ValidResponsibilities();
46
+ responsibilities.Remove("OrderQueue");
47
+ responsibilities["ReceiptPrinting"] = [];
48
+
49
+ Assert.Equal(
50
+ ["OrderQueue: no responsibilities", "ReceiptPrinting: no responsibilities"],
51
+ Validate(responsibilities));
52
+ }
53
+
54
+ [Theory]
55
+ [InlineData("", "OrderQueue[1]: text is empty")]
56
+ [InlineData(" ", "OrderQueue[1]: text is empty")]
57
+ [InlineData("Stores orders.\nAnd more.", "OrderQueue[1]: text must be a single line")]
58
+ [InlineData("Stores `orders.", "OrderQueue[1]: text has an unclosed ` code span")]
59
+ [InlineData("Stores <b>orders</b>.", "OrderQueue[1]: text contains HTML; put code in `backticks`")]
60
+ [InlineData("Stores [orders](http://x).", "OrderQueue[1]: text contains a link")]
61
+ public void Text_must_be_one_plain_line(string text, string error)
62
+ {
63
+ Assert.Equal([error], Validate(With("OrderQueue", new Responsibility(text, "src/Infra/OrderQueue.cs:10"))));
64
+ }
65
+
66
+ [Fact]
67
+ public void Generic_types_in_backticks_are_fine()
68
+ {
69
+ Assert.Empty(Validate(With("OrderQueue", new Responsibility("Keeps a `List<Order>` of pending orders.", "src/Infra/OrderQueue.cs:10"))));
70
+ }
71
+
72
+ [Fact]
73
+ public void Text_longer_than_three_hundred_characters_is_an_error()
74
+ {
75
+ var text = new string('x', 301);
76
+
77
+ Assert.Equal(
78
+ ["OrderQueue[1]: text is 301 characters; keep it under 300"],
79
+ Validate(With("OrderQueue", new Responsibility(text, "src/Infra/OrderQueue.cs:10"))));
80
+ }
81
+
82
+ [Fact]
83
+ public void The_same_responsibility_twice_is_an_error_on_the_repeat()
84
+ {
85
+ Assert.Equal(
86
+ ["OrderQueue[2]: repeats item 1"],
87
+ Validate(With("OrderQueue",
88
+ new Responsibility("Stores each order.", "src/Infra/OrderQueue.cs:10"),
89
+ new Responsibility(" stores EACH order. ", "src/Infra/OrderQueue.cs:10"))));
90
+ }
91
+
92
+ [Theory]
93
+ [InlineData("OrderQueue.cs:10", "OrderQueue[1]: cite 'OrderQueue.cs:10' is not in the component's files: src/Infra/OrderQueue.cs")]
94
+ [InlineData("src/Infra/OrderQueue.cs", "OrderQueue[1]: cite 'src/Infra/OrderQueue.cs' is not <file>:<line> or <file>:<start>-<end>")]
95
+ [InlineData("src/Infra/OrderQueue.cs:10-14", "OrderQueue[1]: cite 'src/Infra/OrderQueue.cs:10-14' is past the end of the file (11 lines)")]
96
+ [InlineData("src/Infra/OrderQueue.cs:2-5", "OrderQueue[1]: cite 'src/Infra/OrderQueue.cs:2-5' is outside the component's declaration (6-11)")]
97
+ [InlineData("src/Infra/OrderQueue.cs:7-9", "OrderQueue[1]: cite 'src/Infra/OrderQueue.cs:7-9' covers no code (only blank, comment or brace lines)")]
98
+ public void A_citation_must_point_at_code_inside_the_component(string cite, string error)
99
+ {
100
+ Assert.Equal([error], Validate(With("OrderQueue", new Responsibility("Stores orders.", cite))));
101
+ }
102
+
103
+ [Fact]
104
+ public void A_citation_may_point_into_helper_code_the_component_runs_but_nowhere_else()
105
+ {
106
+ var acceptance = RenderTestData.Extraction.Components[0] with
107
+ {
108
+ Reaches = [new SourceSpan("src/Infra/OrderQueue.cs", 10, 10)],
109
+ };
110
+ var extraction = RenderTestData.Extraction with
111
+ {
112
+ Components = [acceptance, .. RenderTestData.Extraction.Components.Skip(1)],
113
+ };
114
+ var responsibilities = RenderTestData.ValidResponsibilities();
115
+ responsibilities["OrderAcceptance"] =
116
+ [
117
+ new Responsibility("Stores each accepted order through `OrderQueue`.", "src/Infra/OrderQueue.cs:10"),
118
+ new Responsibility("Stores orders twice.", "src/Infra/OrderQueue.cs:6"),
119
+ ];
120
+
121
+ var errors = ResponsibilityValidation.Validate(extraction, responsibilities, RenderTestData.Lines);
122
+
123
+ Assert.Equal(
124
+ ["OrderAcceptance[2]: cite 'src/Infra/OrderQueue.cs:6' is outside the component's declaration and the helper code it runs (10-10)"],
125
+ errors);
126
+ }
127
+
128
+ [Fact]
129
+ public void A_citation_may_span_neighbouring_helper_members_when_only_non_code_lines_lie_between_them()
130
+ {
131
+ var acceptance = RenderTestData.Extraction.Components[0] with
132
+ {
133
+ Reaches = [new SourceSpan("src/Infra/OrderQueue.cs", 6, 6), new SourceSpan("src/Infra/OrderQueue.cs", 10, 10)],
134
+ };
135
+ var extraction = RenderTestData.Extraction with
136
+ {
137
+ Components = [acceptance, .. RenderTestData.Extraction.Components.Skip(1)],
138
+ };
139
+ var responsibilities = RenderTestData.ValidResponsibilities();
140
+ responsibilities["OrderAcceptance"] =
141
+ [
142
+ // Lines 7-9 are blank, a comment and a brace: nothing uncited runs between the two members.
143
+ new Responsibility("Stores each accepted order through `OrderQueue`.", "src/Infra/OrderQueue.cs:6-10"),
144
+ new Responsibility("Stores orders twice.", "src/Infra/OrderQueue.cs:5-10"),
145
+ ];
146
+
147
+ var errors = ResponsibilityValidation.Validate(extraction, responsibilities, RenderTestData.Lines);
148
+
149
+ Assert.Equal(
150
+ ["OrderAcceptance[2]: cite 'src/Infra/OrderQueue.cs:5-10' is outside the component's declaration and the helper code it runs (6-6, 10-10)"],
151
+ errors);
152
+ }
153
+
154
+ [Theory]
155
+ // Line 11 is a brace and line 7 is blank: not code, but outside every citable span, so they cannot start or end one.
156
+ [InlineData("src/Infra/OrderQueue.cs:6-11")]
157
+ [InlineData("src/Infra/OrderQueue.cs:7-10")]
158
+ public void A_citation_must_start_and_end_inside_a_citable_span(string cite)
159
+ {
160
+ var acceptance = RenderTestData.Extraction.Components[0] with
161
+ {
162
+ Reaches = [new SourceSpan("src/Infra/OrderQueue.cs", 6, 6), new SourceSpan("src/Infra/OrderQueue.cs", 10, 10)],
163
+ };
164
+ var extraction = RenderTestData.Extraction with
165
+ {
166
+ Components = [acceptance, .. RenderTestData.Extraction.Components.Skip(1)],
167
+ };
168
+ var responsibilities = RenderTestData.ValidResponsibilities();
169
+ responsibilities["OrderAcceptance"] = [new Responsibility("Stores each accepted order through `OrderQueue`.", cite)];
170
+
171
+ var errors = ResponsibilityValidation.Validate(extraction, responsibilities, RenderTestData.Lines);
172
+
173
+ Assert.Equal(
174
+ [$"OrderAcceptance[1]: cite '{cite}' is outside the component's declaration and the helper code it runs (6-6, 10-10)"],
175
+ errors);
176
+ }
177
+
178
+ [Fact]
179
+ public void A_citation_may_point_into_any_declaration_of_a_partial_class()
180
+ {
181
+ Assert.Empty(Validate(With("ReceiptPrinting",
182
+ new Responsibility("Prints a header.", "src/App/ReceiptPrinting.cs:5-6"),
183
+ new Responsibility("Prints a footer.", "src/App/ReceiptPrinting.Totals.cs:4-5"))));
184
+ }
185
+
186
+ [Fact]
187
+ public void A_citation_longer_than_sixty_lines_is_an_error()
188
+ {
189
+ var extraction = RenderTestData.Extraction with
190
+ {
191
+ Components = [new Component("Big", "A.Big", "Big", "A", "Application", [new SourceSpan("src/Big.cs", 1, 200)])],
192
+ ExternalNodes = [],
193
+ Edges = [],
194
+ };
195
+ var responsibilities = new Dictionary<string, IReadOnlyList<Responsibility>>
196
+ {
197
+ ["Big"] = [new Responsibility("Does everything.", "src/Big.cs:10-70"), new Responsibility("Does one thing.", "src/Big.cs:10-69")],
198
+ };
199
+ var lines = new Dictionary<string, IReadOnlyList<string>> { ["src/Big.cs"] = [.. Enumerable.Repeat("Work();", 200)] };
200
+
201
+ var errors = ResponsibilityValidation.Validate(extraction, responsibilities, lines);
202
+
203
+ Assert.Equal(["Big[1]: cite 'src/Big.cs:10-70' spans 61 lines; cite at most 60"], errors);
204
+ }
205
+
206
+ [Fact]
207
+ public void Every_problem_is_reported_at_once_in_a_fixed_order()
208
+ {
209
+ var responsibilities = RenderTestData.ValidResponsibilities();
210
+ responsibilities["Zeta"] = [new Responsibility("x", "y")];
211
+ responsibilities.Remove("OrderQueue");
212
+ responsibilities["OrderAcceptance"] =
213
+ [
214
+ new Responsibility("", "src/App/OrderAcceptance.cs:5"),
215
+ new Responsibility("Fine.", "nope"),
216
+ ];
217
+
218
+ Assert.Equal(
219
+ [
220
+ "OrderAcceptance[1]: text is empty",
221
+ "OrderAcceptance[2]: cite 'nope' is not <file>:<line> or <file>:<start>-<end>",
222
+ "OrderQueue: no responsibilities",
223
+ "Zeta: not a component in components.json",
224
+ ],
225
+ Validate(responsibilities));
226
+ }
227
+ }
@@ -0,0 +1,27 @@
1
+ namespace LogicalComponents.Tests;
2
+
3
+ /// <summary>
4
+ /// Every test class that builds a fixture solution. Loading one restores and design-time-builds its projects into their
5
+ /// obj/ folders, so two classes loading at once collide on those files (always, on a fresh checkout). Classes in one
6
+ /// collection run one after another, and share a single loaded SampleApp.
7
+ /// </summary>
8
+ [CollectionDefinition(Name)]
9
+ public sealed class FixtureSolutions : ICollectionFixture<SampleAppWorkspace>
10
+ {
11
+ public const string Name = "fixture solutions";
12
+ }
13
+
14
+ /// <summary>Loads the SampleApp fixture once and shares it across the fixture-solution test classes.</summary>
15
+ public sealed class SampleAppWorkspace : IAsyncLifetime
16
+ {
17
+ public LoadedWorkspace Loaded { get; private set; } = null!;
18
+
19
+ public async ValueTask InitializeAsync() => Loaded = await WorkspaceLoader.LoadAsync(FixturePaths.SampleApp);
20
+
21
+ public ValueTask DisposeAsync()
22
+ {
23
+ // Null when loading failed: disposing must not hide that failure behind a NullReferenceException.
24
+ Loaded?.Dispose();
25
+ return ValueTask.CompletedTask;
26
+ }
27
+ }
@@ -0,0 +1,87 @@
1
+ namespace LogicalComponents.Tests;
2
+
3
+ [Collection(FixtureSolutions.Name)]
4
+ public class WorkspaceLoaderTests
5
+ {
6
+ [Fact]
7
+ public async Task Loads_source_projects_from_the_solution_and_drops_test_projects()
8
+ {
9
+ using var loaded = await WorkspaceLoader.LoadAsync(FixturePaths.SampleApp);
10
+
11
+ Assert.Equal(
12
+ ["Sample.Application", "Sample.Billing.Application", "Sample.Infrastructure"],
13
+ loaded.ProjectNames);
14
+ Assert.Equal("SampleApp.slnx", loaded.Source);
15
+ }
16
+
17
+ [Fact]
18
+ public async Task Falls_back_to_csproj_files_under_src_and_still_drops_test_projects()
19
+ {
20
+ using var loaded = await WorkspaceLoader.LoadAsync(FixturePaths.NoSolutionApp);
21
+
22
+ Assert.Equal(["Solo.Application"], loaded.ProjectNames);
23
+ Assert.Equal("src/**/*.csproj", loaded.Source);
24
+ }
25
+
26
+ [Fact]
27
+ public async Task Multi_targeted_project_loads_once_at_its_highest_framework_and_non_csharp_projects_are_dropped()
28
+ {
29
+ using var loaded = await WorkspaceLoader.LoadAsync(FixturePaths.MultiTargetApp);
30
+
31
+ Assert.Equal(["Multi.Application"], loaded.ProjectNames);
32
+ var compilation = await loaded.Solution.Projects.Single().GetCompilationAsync(TestContext.Current.CancellationToken);
33
+ Assert.NotNull(compilation!.GetTypeByMetadataName("Multi.Application.OnlyOnNet10"));
34
+ }
35
+
36
+ [Fact]
37
+ public async Task Missing_repo_path_fails_with_the_path_in_the_message()
38
+ {
39
+ var missing = Path.Combine(FixturePaths.Root, "does-not-exist");
40
+
41
+ var error = await Assert.ThrowsAsync<DirectoryNotFoundException>(
42
+ () => WorkspaceLoader.LoadAsync(missing));
43
+
44
+ Assert.Contains(missing, error.Message);
45
+ }
46
+
47
+ [Fact]
48
+ public async Task Two_top_level_solutions_fail_naming_both()
49
+ {
50
+ var repo = Directory.CreateTempSubdirectory("lc-two-solutions-");
51
+ try
52
+ {
53
+ File.WriteAllText(Path.Combine(repo.FullName, "a.sln"), "");
54
+ File.WriteAllText(Path.Combine(repo.FullName, "b.slnx"), "<Solution />");
55
+
56
+ var error = await Assert.ThrowsAsync<WorkspaceLoadException>(
57
+ () => WorkspaceLoader.LoadAsync(repo.FullName));
58
+
59
+ Assert.Contains("a.sln", error.Message);
60
+ Assert.Contains("b.slnx", error.Message);
61
+ }
62
+ finally
63
+ {
64
+ repo.Delete(recursive: true);
65
+ }
66
+ }
67
+
68
+ [Fact]
69
+ public async Task A_solution_that_cannot_be_opened_fails_loudly_instead_of_falling_back()
70
+ {
71
+ var repo = Directory.CreateTempSubdirectory("lc-bad-solution-");
72
+ try
73
+ {
74
+ File.WriteAllText(Path.Combine(repo.FullName, "broken.slnx"), "this is not a solution");
75
+ var project = Directory.CreateDirectory(Path.Combine(repo.FullName, "src", "Solo.Application"));
76
+ File.WriteAllText(
77
+ Path.Combine(project.FullName, "Solo.Application.csproj"),
78
+ """<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup><TargetFramework>net10.0</TargetFramework></PropertyGroup></Project>""");
79
+
80
+ await Assert.ThrowsAsync<WorkspaceLoadException>(() => WorkspaceLoader.LoadAsync(repo.FullName));
81
+ }
82
+ finally
83
+ {
84
+ repo.Delete(recursive: true);
85
+ }
86
+ }
87
+ }
@@ -0,0 +1,7 @@
1
+ <Project Sdk="Microsoft.NET.Sdk">
2
+ <PropertyGroup>
3
+ <TargetFramework>net10.0</TargetFramework>
4
+ <Nullable>enable</Nullable>
5
+ <ImplicitUsings>enable</ImplicitUsings>
6
+ </PropertyGroup>
7
+ </Project>
@@ -0,0 +1,7 @@
1
+ namespace Broken.Application;
2
+
3
+ // Does not compile on purpose: a repo with compile errors must get a warning, because edges may be missing.
4
+ public sealed class Broken
5
+ {
6
+ public int Value() => Undefined2;
7
+ }
@@ -0,0 +1,6 @@
1
+ <Solution>
2
+ <Folder Name="/src/">
3
+ <Project Path="src/Multi.Application/Multi.Application.csproj" />
4
+ <Project Path="src/Legacy.FSharp/Legacy.FSharp.fsproj" />
5
+ </Folder>
6
+ </Solution>
@@ -0,0 +1,8 @@
1
+ <Project Sdk="Microsoft.NET.Sdk">
2
+ <PropertyGroup>
3
+ <TargetFramework>net10.0</TargetFramework>
4
+ </PropertyGroup>
5
+ <ItemGroup>
6
+ <Compile Include="Library.fs" />
7
+ </ItemGroup>
8
+ </Project>
@@ -0,0 +1,5 @@
1
+ namespace Legacy.FSharp
2
+
3
+ // A non-C# project in the solution: the loader must drop it.
4
+ module Library =
5
+ let answer = 42
@@ -0,0 +1,7 @@
1
+ <Project Sdk="Microsoft.NET.Sdk">
2
+ <PropertyGroup>
3
+ <TargetFrameworks>net8.0;net10.0</TargetFrameworks>
4
+ <Nullable>enable</Nullable>
5
+ <ImplicitUsings>enable</ImplicitUsings>
6
+ </PropertyGroup>
7
+ </Project>
@@ -0,0 +1,14 @@
1
+ namespace Multi.Application;
2
+
3
+ public sealed class Scheduling
4
+ {
5
+ public DateOnly Next(DateOnly from) => from.AddDays(1);
6
+ }
7
+
8
+ #if NET10_0_OR_GREATER
9
+ // Exists only in the net10.0 build: proves the loader keeps the highest target framework.
10
+ public sealed class OnlyOnNet10
11
+ {
12
+ public int Version() => 10;
13
+ }
14
+ #endif
@@ -0,0 +1,7 @@
1
+ <Project Sdk="Microsoft.NET.Sdk">
2
+ <PropertyGroup>
3
+ <TargetFramework>net10.0</TargetFramework>
4
+ <Nullable>enable</Nullable>
5
+ <ImplicitUsings>enable</ImplicitUsings>
6
+ </PropertyGroup>
7
+ </Project>
@@ -0,0 +1,7 @@
1
+ namespace Solo.Application;
2
+
3
+ // A repo with no .sln/.slnx: the loader must fall back to the csproj files under src/.
4
+ public sealed class SoloGreeting
5
+ {
6
+ public string Greet(string name) => $"Hello, {name}";
7
+ }
@@ -0,0 +1,6 @@
1
+ namespace Solo.Application.Tests;
2
+
3
+ public sealed class FakeGreeting
4
+ {
5
+ public string Greet(string name) => "fake";
6
+ }
@@ -0,0 +1,11 @@
1
+ <Project Sdk="Microsoft.NET.Sdk">
2
+ <!-- A test project inside src/ with no test packages: only its *.Tests name marks it. -->
3
+ <PropertyGroup>
4
+ <TargetFramework>net10.0</TargetFramework>
5
+ <Nullable>enable</Nullable>
6
+ <ImplicitUsings>enable</ImplicitUsings>
7
+ </PropertyGroup>
8
+ <ItemGroup>
9
+ <ProjectReference Include="../Solo.Application/Solo.Application.csproj" />
10
+ </ItemGroup>
11
+ </Project>
@@ -0,0 +1,63 @@
1
+ {
2
+ "components": [
3
+ {
4
+ "id": "OrderAcceptance",
5
+ "type": "Sample.Application.OrderAcceptance",
6
+ "name": "Order Acceptance",
7
+ "module": "Sample",
8
+ "layer": "Application",
9
+ "spans": [
10
+ {
11
+ "file": "src/App/OrderAcceptance.cs",
12
+ "start": 3,
13
+ "end": 16
14
+ }
15
+ ]
16
+ },
17
+ {
18
+ "id": "OrderQueue",
19
+ "type": "Sample.Infrastructure.OrderQueue",
20
+ "name": "Order Queue",
21
+ "module": "Sample",
22
+ "layer": "Infrastructure",
23
+ "spans": [
24
+ {
25
+ "file": "src/Infra/OrderQueue.cs",
26
+ "start": 5,
27
+ "end": 10
28
+ }
29
+ ]
30
+ }
31
+ ],
32
+ "externalNodes": [
33
+ {
34
+ "id": "IAuditTrail",
35
+ "type": "Sample.Application.IAuditTrail",
36
+ "name": "I Audit Trail",
37
+ "layer": "port"
38
+ }
39
+ ],
40
+ "edges": [
41
+ {
42
+ "from": "OrderAcceptance",
43
+ "to": "IAuditTrail",
44
+ "kinds": [
45
+ "di"
46
+ ],
47
+ "via": [],
48
+ "at": "src/App/OrderAcceptance.cs:3"
49
+ },
50
+ {
51
+ "from": "OrderAcceptance",
52
+ "to": "OrderQueue",
53
+ "kinds": [
54
+ "di"
55
+ ],
56
+ "via": [
57
+ "IOrderQueue"
58
+ ],
59
+ "at": "src/App/OrderAcceptance.cs:3"
60
+ }
61
+ ],
62
+ "warnings": []
63
+ }
@@ -0,0 +1,28 @@
1
+ # Logical Components
2
+
3
+ ## Order Acceptance
4
+
5
+ `Sample.Application.OrderAcceptance`
6
+
7
+ - Rejects an order with a non-positive total and records the rejection in the audit trail. (`src/App/OrderAcceptance.cs:7-11`)
8
+ - Queues every accepted order. (`src/App/OrderAcceptance.cs:13`)
9
+
10
+ ## Order Queue
11
+
12
+ `Sample.Infrastructure.OrderQueue`
13
+
14
+ - Keeps queued orders in memory, in arrival order. (`src/Infra/OrderQueue.cs:7-9`)
15
+
16
+ # Coupling
17
+
18
+ `A --> B` means A depends on B: it calls, creates, holds or inherits from B. A component's incoming arrows are its afferent coupling, its outgoing arrows its efferent coupling. Only components in `*.Application` and `*.Infrastructure` projects are drawn; callers in other projects, such as the host, are not shown.
19
+
20
+ ```mermaid
21
+ %%{init: {"layout": "elk"}}%%
22
+ flowchart LR
23
+ n_IAuditTrail["I Audit Trail"]
24
+ n_OrderAcceptance["Order Acceptance"]
25
+ n_OrderQueue["Order Queue"]
26
+ n_OrderAcceptance --> n_IAuditTrail
27
+ n_OrderAcceptance --> n_OrderQueue
28
+ ```
@@ -0,0 +1,16 @@
1
+ namespace Sample.Application;
2
+
3
+ public sealed class OrderAcceptance(IOrderQueue queue, IAuditTrail audit)
4
+ {
5
+ public bool Accept(Order order)
6
+ {
7
+ if (order.Total <= 0)
8
+ {
9
+ audit.Record($"Rejected {order.Id}");
10
+ return false;
11
+ }
12
+
13
+ queue.Enqueue(order);
14
+ return true;
15
+ }
16
+ }
@@ -0,0 +1,10 @@
1
+ using Sample.Application;
2
+
3
+ namespace Sample.Infrastructure;
4
+
5
+ public sealed class OrderQueue : IOrderQueue
6
+ {
7
+ private readonly List<Order> _orders = [];
8
+
9
+ public void Enqueue(Order order) => _orders.Add(order);
10
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "OrderAcceptance": [
3
+ {
4
+ "text": "Rejects an order with a non-positive total and records the rejection in the audit trail.",
5
+ "cite": "src/App/OrderAcceptance.cs:7-11"
6
+ },
7
+ {
8
+ "text": "Queues every accepted order.",
9
+ "cite": "src/App/OrderAcceptance.cs:13"
10
+ }
11
+ ],
12
+ "OrderQueue": [
13
+ {
14
+ "text": "Keeps queued orders in memory, in arrival order.",
15
+ "cite": "src/Infra/OrderQueue.cs:7-9"
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,10 @@
1
+ <Solution>
2
+ <Folder Name="/src/">
3
+ <Project Path="src/Sample.Application/Sample.Application.csproj" />
4
+ <Project Path="src/Sample.Billing.Application/Sample.Billing.Application.csproj" />
5
+ <Project Path="src/Sample.Infrastructure/Sample.Infrastructure.csproj" />
6
+ </Folder>
7
+ <Folder Name="/tests/">
8
+ <Project Path="tests/Sample.Tests/Sample.Tests.csproj" />
9
+ </Folder>
10
+ </Solution>