xtrm-tools 2.3.0 → 2.4.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 (284) hide show
  1. package/README.md +127 -111
  2. package/cli/dist/index.cjs +107 -53
  3. package/cli/dist/index.cjs.map +1 -1
  4. package/cli/package.json +1 -1
  5. package/config/pi/extensions/beads.ts +24 -0
  6. package/hooks/beads-gate-core.mjs +6 -4
  7. package/hooks/beads-memory-gate.mjs +12 -5
  8. package/hooks/hooks.json +126 -0
  9. package/package.json +3 -1
  10. package/skills/test-planning/SKILL.md +208 -0
  11. package/skills/test-planning/evals/evals.json +23 -0
  12. package/skills/using-xtrm/SKILL.md +5 -27
  13. package/project-skills/tdd-guard/.claude/hooks/tdd-guard-pretool-bridge.cjs +0 -103
  14. package/project-skills/tdd-guard/.claude/settings.json +0 -38
  15. package/project-skills/tdd-guard/.claude/skills/using-tdd-guard/SKILL.md +0 -79
  16. package/project-skills/tdd-guard/CLAUDE.md +0 -98
  17. package/project-skills/tdd-guard/CONTRIBUTING.md +0 -38
  18. package/project-skills/tdd-guard/DEVELOPMENT.md +0 -127
  19. package/project-skills/tdd-guard/LICENSE +0 -21
  20. package/project-skills/tdd-guard/README.md +0 -398
  21. package/project-skills/tdd-guard/docs/adr/001-claude-session-subdirectory.md +0 -52
  22. package/project-skills/tdd-guard/docs/adr/002-secure-claude-binary-path.md +0 -56
  23. package/project-skills/tdd-guard/docs/adr/003-remove-configurable-data-directory.md +0 -56
  24. package/project-skills/tdd-guard/docs/adr/004-monorepo-architecture.md +0 -64
  25. package/project-skills/tdd-guard/docs/adr/005-claude-project-dir-support.md +0 -55
  26. package/project-skills/tdd-guard/docs/adr/006-phpunit-separate-repository.md +0 -93
  27. package/project-skills/tdd-guard/docs/adr/007-golangci-lint-path-support.md +0 -83
  28. package/project-skills/tdd-guard/docs/adr/008-storybook-reporter-design.md +0 -182
  29. package/project-skills/tdd-guard/docs/assets/tdd-guard-demo-screenshot.gif +0 -0
  30. package/project-skills/tdd-guard/docs/config-migration.md +0 -143
  31. package/project-skills/tdd-guard/docs/configuration.md +0 -137
  32. package/project-skills/tdd-guard/docs/custom-instructions.md +0 -43
  33. package/project-skills/tdd-guard/docs/enforcement.md +0 -46
  34. package/project-skills/tdd-guard/docs/ignore-patterns.md +0 -81
  35. package/project-skills/tdd-guard/docs/linting.md +0 -109
  36. package/project-skills/tdd-guard/docs/quick-commands.md +0 -52
  37. package/project-skills/tdd-guard/docs/session-management.md +0 -75
  38. package/project-skills/tdd-guard/docs/storybook-vitest-addon.md +0 -120
  39. package/project-skills/tdd-guard/docs/validation-model.md +0 -63
  40. package/project-skills/tdd-guard/eslint.config.mjs +0 -140
  41. package/project-skills/tdd-guard/package-lock.json +0 -16937
  42. package/project-skills/tdd-guard/package.json +0 -102
  43. package/project-skills/tdd-guard/reporters/go/README.md +0 -67
  44. package/project-skills/tdd-guard/reporters/go/cmd/tdd-guard-go/main.go +0 -127
  45. package/project-skills/tdd-guard/reporters/go/cmd/tdd-guard-go/main_test.go +0 -280
  46. package/project-skills/tdd-guard/reporters/go/go.mod +0 -3
  47. package/project-skills/tdd-guard/reporters/go/go.sum +0 -0
  48. package/project-skills/tdd-guard/reporters/go/internal/formatter/formatter.go +0 -126
  49. package/project-skills/tdd-guard/reporters/go/internal/formatter/formatter_test.go +0 -264
  50. package/project-skills/tdd-guard/reporters/go/internal/io/tee_reader.go +0 -26
  51. package/project-skills/tdd-guard/reporters/go/internal/io/tee_reader_test.go +0 -37
  52. package/project-skills/tdd-guard/reporters/go/internal/parser/mixed_reader.go +0 -94
  53. package/project-skills/tdd-guard/reporters/go/internal/parser/mixed_reader_test.go +0 -198
  54. package/project-skills/tdd-guard/reporters/go/internal/parser/parser.go +0 -245
  55. package/project-skills/tdd-guard/reporters/go/internal/parser/parser_test.go +0 -547
  56. package/project-skills/tdd-guard/reporters/go/internal/storage/storage.go +0 -35
  57. package/project-skills/tdd-guard/reporters/go/internal/storage/storage_test.go +0 -113
  58. package/project-skills/tdd-guard/reporters/go/internal/transformer/transformer.go +0 -103
  59. package/project-skills/tdd-guard/reporters/go/internal/transformer/transformer_test.go +0 -303
  60. package/project-skills/tdd-guard/reporters/jest/README.md +0 -102
  61. package/project-skills/tdd-guard/reporters/jest/package.json +0 -38
  62. package/project-skills/tdd-guard/reporters/jest/src/JestReporter.test-data.ts +0 -199
  63. package/project-skills/tdd-guard/reporters/jest/src/JestReporter.test.ts +0 -302
  64. package/project-skills/tdd-guard/reporters/jest/src/JestReporter.ts +0 -201
  65. package/project-skills/tdd-guard/reporters/jest/src/index.ts +0 -4
  66. package/project-skills/tdd-guard/reporters/jest/src/types.ts +0 -42
  67. package/project-skills/tdd-guard/reporters/jest/tsconfig.json +0 -11
  68. package/project-skills/tdd-guard/reporters/phpunit/.php-cs-fixer.php +0 -28
  69. package/project-skills/tdd-guard/reporters/phpunit/README.md +0 -97
  70. package/project-skills/tdd-guard/reporters/phpunit/SYNC_README.md +0 -29
  71. package/project-skills/tdd-guard/reporters/phpunit/composer.json +0 -55
  72. package/project-skills/tdd-guard/reporters/phpunit/phpunit.xml.dist +0 -19
  73. package/project-skills/tdd-guard/reporters/phpunit/psalm.xml +0 -44
  74. package/project-skills/tdd-guard/reporters/phpunit/src/Event/ErroredTestSubscriber.php +0 -28
  75. package/project-skills/tdd-guard/reporters/phpunit/src/Event/FailedTestSubscriber.php +0 -28
  76. package/project-skills/tdd-guard/reporters/phpunit/src/Event/IncompleteTestSubscriber.php +0 -28
  77. package/project-skills/tdd-guard/reporters/phpunit/src/Event/PassedTestSubscriber.php +0 -27
  78. package/project-skills/tdd-guard/reporters/phpunit/src/Event/SkippedTestSubscriber.php +0 -28
  79. package/project-skills/tdd-guard/reporters/phpunit/src/Event/TestRunnerFinishedSubscriber.php +0 -24
  80. package/project-skills/tdd-guard/reporters/phpunit/src/PathValidator.php +0 -88
  81. package/project-skills/tdd-guard/reporters/phpunit/src/Storage.php +0 -26
  82. package/project-skills/tdd-guard/reporters/phpunit/src/TddGuardExtension.php +0 -33
  83. package/project-skills/tdd-guard/reporters/phpunit/src/TddGuardListener.php +0 -158
  84. package/project-skills/tdd-guard/reporters/phpunit/src/TddGuardSubscriber.php +0 -35
  85. package/project-skills/tdd-guard/reporters/phpunit/src/TestResultCollector.php +0 -105
  86. package/project-skills/tdd-guard/reporters/phpunit/tests/PathValidatorTest.php +0 -74
  87. package/project-skills/tdd-guard/reporters/phpunit/tests/TddGuardExtensionFailedTest.php +0 -241
  88. package/project-skills/tdd-guard/reporters/phpunit/tests/TddGuardExtensionTest.php +0 -84
  89. package/project-skills/tdd-guard/reporters/phpunit/tests/TddGuardStorageLocationTest.php +0 -71
  90. package/project-skills/tdd-guard/reporters/pytest/README.md +0 -77
  91. package/project-skills/tdd-guard/reporters/pytest/pyproject.toml +0 -43
  92. package/project-skills/tdd-guard/reporters/pytest/pytest.ini.example +0 -7
  93. package/project-skills/tdd-guard/reporters/pytest/tdd_guard_pytest/__init__.py +0 -1
  94. package/project-skills/tdd-guard/reporters/pytest/tdd_guard_pytest/pytest_reporter.py +0 -134
  95. package/project-skills/tdd-guard/reporters/pytest/tests/__init__.py +0 -1
  96. package/project-skills/tdd-guard/reporters/pytest/tests/conftest.py +0 -3
  97. package/project-skills/tdd-guard/reporters/pytest/tests/helpers.py +0 -293
  98. package/project-skills/tdd-guard/reporters/pytest/tests/test_config_option.py +0 -38
  99. package/project-skills/tdd-guard/reporters/pytest/tests/test_path_validation.py +0 -59
  100. package/project-skills/tdd-guard/reporters/pytest/tests/test_plugin_config.py +0 -32
  101. package/project-skills/tdd-guard/reporters/pytest/tests/test_project_root.py +0 -296
  102. package/project-skills/tdd-guard/reporters/pytest/tests/test_pytest_reporter.py +0 -137
  103. package/project-skills/tdd-guard/reporters/rspec/Gemfile +0 -3
  104. package/project-skills/tdd-guard/reporters/rust/Cargo.lock +0 -458
  105. package/project-skills/tdd-guard/reporters/rust/Cargo.toml +0 -33
  106. package/project-skills/tdd-guard/reporters/rust/Makefile.example +0 -95
  107. package/project-skills/tdd-guard/reporters/rust/README.md +0 -88
  108. package/project-skills/tdd-guard/reporters/rust/src/error_parser.rs +0 -309
  109. package/project-skills/tdd-guard/reporters/rust/src/main.rs +0 -464
  110. package/project-skills/tdd-guard/reporters/rust/src/parser.rs +0 -225
  111. package/project-skills/tdd-guard/reporters/rust/src/transformer.rs +0 -409
  112. package/project-skills/tdd-guard/reporters/storybook/README.md +0 -108
  113. package/project-skills/tdd-guard/reporters/storybook/package-lock.json +0 -9482
  114. package/project-skills/tdd-guard/reporters/storybook/package.json +0 -43
  115. package/project-skills/tdd-guard/reporters/storybook/src/StorybookReporter.test-data.ts +0 -22
  116. package/project-skills/tdd-guard/reporters/storybook/src/StorybookReporter.test.ts +0 -190
  117. package/project-skills/tdd-guard/reporters/storybook/src/StorybookReporter.ts +0 -88
  118. package/project-skills/tdd-guard/reporters/storybook/src/index.ts +0 -12
  119. package/project-skills/tdd-guard/reporters/storybook/src/types.ts +0 -37
  120. package/project-skills/tdd-guard/reporters/storybook/tsconfig.json +0 -11
  121. package/project-skills/tdd-guard/reporters/test/artifacts/go/failing/go.mod +0 -3
  122. package/project-skills/tdd-guard/reporters/test/artifacts/go/failing/single_failing_test.go +0 -13
  123. package/project-skills/tdd-guard/reporters/test/artifacts/go/import/go.mod +0 -3
  124. package/project-skills/tdd-guard/reporters/test/artifacts/go/import/single_import_error_test.go +0 -17
  125. package/project-skills/tdd-guard/reporters/test/artifacts/go/passing/go.mod +0 -3
  126. package/project-skills/tdd-guard/reporters/test/artifacts/go/passing/single_passing_test.go +0 -13
  127. package/project-skills/tdd-guard/reporters/test/artifacts/jest/single-failing.test.js +0 -5
  128. package/project-skills/tdd-guard/reporters/test/artifacts/jest/single-import-error.test.js +0 -8
  129. package/project-skills/tdd-guard/reporters/test/artifacts/jest/single-passing.test.js +0 -5
  130. package/project-skills/tdd-guard/reporters/test/artifacts/phpunit/SingleFailingTest.php +0 -11
  131. package/project-skills/tdd-guard/reporters/test/artifacts/phpunit/SingleImportErrorTest.php +0 -14
  132. package/project-skills/tdd-guard/reporters/test/artifacts/phpunit/SinglePassingTest.php +0 -11
  133. package/project-skills/tdd-guard/reporters/test/artifacts/pytest/test_single_failing.py +0 -3
  134. package/project-skills/tdd-guard/reporters/test/artifacts/pytest/test_single_import_error.py +0 -6
  135. package/project-skills/tdd-guard/reporters/test/artifacts/pytest/test_single_passing.py +0 -3
  136. package/project-skills/tdd-guard/reporters/test/artifacts/rust/failing/Cargo.lock +0 -7
  137. package/project-skills/tdd-guard/reporters/test/artifacts/rust/failing/Cargo.toml +0 -4
  138. package/project-skills/tdd-guard/reporters/test/artifacts/rust/failing/src/lib.rs +0 -14
  139. package/project-skills/tdd-guard/reporters/test/artifacts/rust/import/Cargo.lock +0 -7
  140. package/project-skills/tdd-guard/reporters/test/artifacts/rust/import/Cargo.toml +0 -4
  141. package/project-skills/tdd-guard/reporters/test/artifacts/rust/import/src/lib.rs +0 -13
  142. package/project-skills/tdd-guard/reporters/test/artifacts/rust/passing/Cargo.lock +0 -7
  143. package/project-skills/tdd-guard/reporters/test/artifacts/rust/passing/Cargo.toml +0 -4
  144. package/project-skills/tdd-guard/reporters/test/artifacts/rust/passing/src/lib.rs +0 -14
  145. package/project-skills/tdd-guard/reporters/test/artifacts/storybook/Calculator.js +0 -4
  146. package/project-skills/tdd-guard/reporters/test/artifacts/storybook/single-failing.stories.js +0 -15
  147. package/project-skills/tdd-guard/reporters/test/artifacts/storybook/single-import-error.stories.js +0 -14
  148. package/project-skills/tdd-guard/reporters/test/artifacts/storybook/single-passing.stories.js +0 -15
  149. package/project-skills/tdd-guard/reporters/test/artifacts/vitest/single-failing.test.js +0 -7
  150. package/project-skills/tdd-guard/reporters/test/artifacts/vitest/single-import-error.test.js +0 -9
  151. package/project-skills/tdd-guard/reporters/test/artifacts/vitest/single-passing.test.js +0 -7
  152. package/project-skills/tdd-guard/reporters/test/factories/go.ts +0 -59
  153. package/project-skills/tdd-guard/reporters/test/factories/helpers.ts +0 -48
  154. package/project-skills/tdd-guard/reporters/test/factories/index.ts +0 -7
  155. package/project-skills/tdd-guard/reporters/test/factories/jest.ts +0 -51
  156. package/project-skills/tdd-guard/reporters/test/factories/phpunit.ts +0 -63
  157. package/project-skills/tdd-guard/reporters/test/factories/pytest.ts +0 -41
  158. package/project-skills/tdd-guard/reporters/test/factories/rust.ts +0 -158
  159. package/project-skills/tdd-guard/reporters/test/factories/storybook.ts +0 -198
  160. package/project-skills/tdd-guard/reporters/test/factories/vitest.ts +0 -51
  161. package/project-skills/tdd-guard/reporters/test/reporters.integration.test.ts +0 -735
  162. package/project-skills/tdd-guard/reporters/test/types.ts +0 -28
  163. package/project-skills/tdd-guard/reporters/vitest/README.md +0 -64
  164. package/project-skills/tdd-guard/reporters/vitest/package.json +0 -35
  165. package/project-skills/tdd-guard/reporters/vitest/src/VitestReporter.test-data.ts +0 -85
  166. package/project-skills/tdd-guard/reporters/vitest/src/VitestReporter.test.ts +0 -446
  167. package/project-skills/tdd-guard/reporters/vitest/src/VitestReporter.ts +0 -110
  168. package/project-skills/tdd-guard/reporters/vitest/src/index.ts +0 -4
  169. package/project-skills/tdd-guard/reporters/vitest/src/types.ts +0 -39
  170. package/project-skills/tdd-guard/reporters/vitest/tsconfig.json +0 -11
  171. package/project-skills/tdd-guard/src/cli/buildContext.test.ts +0 -200
  172. package/project-skills/tdd-guard/src/cli/buildContext.ts +0 -48
  173. package/project-skills/tdd-guard/src/cli/tdd-guard.test.ts +0 -159
  174. package/project-skills/tdd-guard/src/cli/tdd-guard.ts +0 -48
  175. package/project-skills/tdd-guard/src/config/Config.test.ts +0 -538
  176. package/project-skills/tdd-guard/src/config/Config.ts +0 -172
  177. package/project-skills/tdd-guard/src/contracts/schemas/guardSchemas.test.ts +0 -58
  178. package/project-skills/tdd-guard/src/contracts/schemas/guardSchemas.ts +0 -8
  179. package/project-skills/tdd-guard/src/contracts/schemas/lintSchemas.test.ts +0 -347
  180. package/project-skills/tdd-guard/src/contracts/schemas/lintSchemas.ts +0 -61
  181. package/project-skills/tdd-guard/src/contracts/schemas/pytestSchemas.test.ts +0 -24
  182. package/project-skills/tdd-guard/src/contracts/schemas/pytestSchemas.ts +0 -7
  183. package/project-skills/tdd-guard/src/contracts/schemas/reporterSchemas.test.ts +0 -377
  184. package/project-skills/tdd-guard/src/contracts/schemas/reporterSchemas.ts +0 -75
  185. package/project-skills/tdd-guard/src/contracts/schemas/toolSchemas.test.ts +0 -563
  186. package/project-skills/tdd-guard/src/contracts/schemas/toolSchemas.ts +0 -140
  187. package/project-skills/tdd-guard/src/contracts/types/ClientType.ts +0 -1
  188. package/project-skills/tdd-guard/src/contracts/types/ConfigOptions.ts +0 -12
  189. package/project-skills/tdd-guard/src/contracts/types/Context.ts +0 -16
  190. package/project-skills/tdd-guard/src/contracts/types/ModelClient.ts +0 -3
  191. package/project-skills/tdd-guard/src/contracts/types/ValidationResult.ts +0 -6
  192. package/project-skills/tdd-guard/src/guard/GuardManager.test.ts +0 -336
  193. package/project-skills/tdd-guard/src/guard/GuardManager.ts +0 -83
  194. package/project-skills/tdd-guard/src/hooks/HookEvents.test.ts +0 -107
  195. package/project-skills/tdd-guard/src/hooks/HookEvents.ts +0 -39
  196. package/project-skills/tdd-guard/src/hooks/fileTypeDetection.ts +0 -16
  197. package/project-skills/tdd-guard/src/hooks/postToolLint.test.ts +0 -327
  198. package/project-skills/tdd-guard/src/hooks/postToolLint.ts +0 -165
  199. package/project-skills/tdd-guard/src/hooks/processHookData.test.ts +0 -465
  200. package/project-skills/tdd-guard/src/hooks/processHookData.ts +0 -203
  201. package/project-skills/tdd-guard/src/hooks/sessionHandler.test.ts +0 -136
  202. package/project-skills/tdd-guard/src/hooks/sessionHandler.ts +0 -31
  203. package/project-skills/tdd-guard/src/hooks/userPromptHandler.test.ts +0 -131
  204. package/project-skills/tdd-guard/src/hooks/userPromptHandler.ts +0 -55
  205. package/project-skills/tdd-guard/src/index.ts +0 -19
  206. package/project-skills/tdd-guard/src/linters/Linter.ts +0 -5
  207. package/project-skills/tdd-guard/src/linters/eslint/ESLint.test.ts +0 -183
  208. package/project-skills/tdd-guard/src/linters/eslint/ESLint.ts +0 -82
  209. package/project-skills/tdd-guard/src/linters/golangci/GolangciLint.test.ts +0 -170
  210. package/project-skills/tdd-guard/src/linters/golangci/GolangciLint.ts +0 -148
  211. package/project-skills/tdd-guard/src/processors/index.ts +0 -1
  212. package/project-skills/tdd-guard/src/processors/lintProcessor.ts +0 -77
  213. package/project-skills/tdd-guard/src/processors/testResults/TestResultsProcessor.test.ts +0 -303
  214. package/project-skills/tdd-guard/src/processors/testResults/TestResultsProcessor.ts +0 -255
  215. package/project-skills/tdd-guard/src/providers/LinterProvider.test.ts +0 -43
  216. package/project-skills/tdd-guard/src/providers/LinterProvider.ts +0 -20
  217. package/project-skills/tdd-guard/src/providers/ModelClientProvider.test.ts +0 -68
  218. package/project-skills/tdd-guard/src/providers/ModelClientProvider.ts +0 -22
  219. package/project-skills/tdd-guard/src/storage/FileStorage.test.ts +0 -76
  220. package/project-skills/tdd-guard/src/storage/FileStorage.ts +0 -108
  221. package/project-skills/tdd-guard/src/storage/MemoryStorage.ts +0 -57
  222. package/project-skills/tdd-guard/src/storage/Storage.test.ts +0 -227
  223. package/project-skills/tdd-guard/src/storage/Storage.ts +0 -17
  224. package/project-skills/tdd-guard/src/validation/context/context.test.ts +0 -364
  225. package/project-skills/tdd-guard/src/validation/context/context.ts +0 -155
  226. package/project-skills/tdd-guard/src/validation/models/AnthropicApi.test.ts +0 -171
  227. package/project-skills/tdd-guard/src/validation/models/AnthropicApi.ts +0 -49
  228. package/project-skills/tdd-guard/src/validation/models/ClaudeAgentSdk.test.ts +0 -167
  229. package/project-skills/tdd-guard/src/validation/models/ClaudeAgentSdk.ts +0 -54
  230. package/project-skills/tdd-guard/src/validation/models/ClaudeCli.test.ts +0 -239
  231. package/project-skills/tdd-guard/src/validation/models/ClaudeCli.ts +0 -57
  232. package/project-skills/tdd-guard/src/validation/prompts/file-types.ts +0 -52
  233. package/project-skills/tdd-guard/src/validation/prompts/operations/edit.ts +0 -58
  234. package/project-skills/tdd-guard/src/validation/prompts/operations/multi-edit.ts +0 -54
  235. package/project-skills/tdd-guard/src/validation/prompts/operations/write.ts +0 -54
  236. package/project-skills/tdd-guard/src/validation/prompts/response.ts +0 -40
  237. package/project-skills/tdd-guard/src/validation/prompts/rules.ts +0 -51
  238. package/project-skills/tdd-guard/src/validation/prompts/system-prompt.ts +0 -10
  239. package/project-skills/tdd-guard/src/validation/prompts/tools/lint-results.ts +0 -15
  240. package/project-skills/tdd-guard/src/validation/prompts/tools/test-output.ts +0 -14
  241. package/project-skills/tdd-guard/src/validation/prompts/tools/todos.ts +0 -9
  242. package/project-skills/tdd-guard/src/validation/validator.test.ts +0 -268
  243. package/project-skills/tdd-guard/src/validation/validator.ts +0 -159
  244. package/project-skills/tdd-guard/test/artifacts/go/.golangci.yml +0 -6
  245. package/project-skills/tdd-guard/test/artifacts/go/with-issues/file-with-issues.go +0 -12
  246. package/project-skills/tdd-guard/test/artifacts/go/with-issues/go.mod +0 -3
  247. package/project-skills/tdd-guard/test/artifacts/go/without-issues/file-without-issues.go +0 -7
  248. package/project-skills/tdd-guard/test/artifacts/go/without-issues/go.mod +0 -3
  249. package/project-skills/tdd-guard/test/artifacts/javascript/eslint.config.js +0 -20
  250. package/project-skills/tdd-guard/test/artifacts/javascript/file-with-issues.js +0 -12
  251. package/project-skills/tdd-guard/test/artifacts/javascript/file-without-issues.js +0 -10
  252. package/project-skills/tdd-guard/test/hooks/fileTypeDetection.test.ts +0 -26
  253. package/project-skills/tdd-guard/test/hooks/processHookData.fileType.test.ts +0 -46
  254. package/project-skills/tdd-guard/test/hooks/processHookData.python.test.ts +0 -68
  255. package/project-skills/tdd-guard/test/integration/test-context.test.ts +0 -66
  256. package/project-skills/tdd-guard/test/integration/validator.core.test.ts +0 -96
  257. package/project-skills/tdd-guard/test/integration/validator.scenarios.test.ts +0 -497
  258. package/project-skills/tdd-guard/test/utils/assertions.ts +0 -29
  259. package/project-skills/tdd-guard/test/utils/factories/contextFactory.ts +0 -30
  260. package/project-skills/tdd-guard/test/utils/factories/editFactory.ts +0 -82
  261. package/project-skills/tdd-guard/test/utils/factories/helpers.test.ts +0 -46
  262. package/project-skills/tdd-guard/test/utils/factories/helpers.ts +0 -46
  263. package/project-skills/tdd-guard/test/utils/factories/lintFactory.ts +0 -352
  264. package/project-skills/tdd-guard/test/utils/factories/modelClientProviderFactory.ts +0 -21
  265. package/project-skills/tdd-guard/test/utils/factories/multiEditFactory.ts +0 -79
  266. package/project-skills/tdd-guard/test/utils/factories/operations.ts +0 -57
  267. package/project-skills/tdd-guard/test/utils/factories/reporterFactory.ts +0 -55
  268. package/project-skills/tdd-guard/test/utils/factories/scenarios/index.ts +0 -22
  269. package/project-skills/tdd-guard/test/utils/factories/scenarios/languages/python.ts +0 -745
  270. package/project-skills/tdd-guard/test/utils/factories/scenarios/languages/typescript.ts +0 -767
  271. package/project-skills/tdd-guard/test/utils/factories/scenarios/types.ts +0 -77
  272. package/project-skills/tdd-guard/test/utils/factories/scenarios/utils.ts +0 -15
  273. package/project-skills/tdd-guard/test/utils/factories/sessionStartFactory.ts +0 -36
  274. package/project-skills/tdd-guard/test/utils/factories/testDefaults.ts +0 -90
  275. package/project-skills/tdd-guard/test/utils/factories/testResultsFactory.ts +0 -234
  276. package/project-skills/tdd-guard/test/utils/factories/todoFactory.ts +0 -99
  277. package/project-skills/tdd-guard/test/utils/factories/userPromptSubmitFactory.ts +0 -39
  278. package/project-skills/tdd-guard/test/utils/factories/writeFactory.ts +0 -70
  279. package/project-skills/tdd-guard/test/utils/index.ts +0 -131
  280. package/project-skills/tdd-guard/tsconfig.build.json +0 -16
  281. package/project-skills/tdd-guard/tsconfig.eslint.json +0 -17
  282. package/project-skills/tdd-guard/tsconfig.json +0 -32
  283. package/project-skills/tdd-guard/tsconfig.node.json +0 -10
  284. package/project-skills/tdd-guard/vitest.config.ts +0 -85
@@ -1,43 +0,0 @@
1
- {
2
- "name": "tdd-guard-storybook",
3
- "version": "0.1.0",
4
- "description": "Storybook test-runner reporter for TDD Guard",
5
- "author": "Tony Kornmeier",
6
- "license": "MIT",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/nizos/tdd-guard.git",
10
- "directory": "reporters/storybook"
11
- },
12
- "main": "dist/index.js",
13
- "types": "dist/index.d.ts",
14
- "files": [
15
- "dist",
16
- "!dist/*.tsbuildinfo",
17
- "!dist/*.test-data.*"
18
- ],
19
- "scripts": {
20
- "build": "tsc --build",
21
- "test": "vitest run",
22
- "typecheck": "tsc --noEmit"
23
- },
24
- "dependencies": {
25
- "tdd-guard": "^1.1.0"
26
- },
27
- "peerDependencies": {
28
- "@storybook/test-runner": ">=0.19.0"
29
- },
30
- "devDependencies": {
31
- "@storybook/react-vite": "^8.4.7",
32
- "@storybook/test": "^8.4.7",
33
- "@storybook/test-runner": "^0.19.1",
34
- "@types/node": "^24.1.0",
35
- "@types/react": "^18.3.18",
36
- "react": "^18.3.1",
37
- "react-dom": "^18.3.1",
38
- "storybook": "^8.4.7",
39
- "typescript": "^5.8.3",
40
- "vite": "^6.0.11",
41
- "vitest": "^3.2.4"
42
- }
43
- }
@@ -1,22 +0,0 @@
1
- import type { TestContext } from './types'
2
-
3
- const DEFAULT_STORY_ID = 'button--primary'
4
- const DEFAULT_STORY_TITLE = 'Button'
5
- const DEFAULT_STORY_NAME = 'Primary'
6
-
7
- export function createStoryContext(
8
- overrides?: Partial<TestContext>
9
- ): TestContext {
10
- return {
11
- id: DEFAULT_STORY_ID,
12
- title: DEFAULT_STORY_TITLE,
13
- name: DEFAULT_STORY_NAME,
14
- ...overrides,
15
- }
16
- }
17
-
18
- // Convenience aliases for createStoryContext
19
- export const passedStoryContext = createStoryContext
20
- export const failedStoryContext = createStoryContext
21
- export const skippedStoryContext = createStoryContext
22
- export const renderErrorContext = createStoryContext
@@ -1,190 +0,0 @@
1
- import { describe, it, expect, beforeEach } from 'vitest'
2
- import { StorybookReporter } from './StorybookReporter'
3
- import { MemoryStorage, FileStorage, Config, DEFAULT_DATA_DIR } from 'tdd-guard'
4
- import {
5
- createStoryContext,
6
- passedStoryContext,
7
- failedStoryContext,
8
- } from './StorybookReporter.test-data'
9
- import { join } from 'node:path'
10
- import type { StoryTest } from './types'
11
-
12
- describe('StorybookReporter', () => {
13
- it('uses FileStorage by default', () => {
14
- const reporter = new StorybookReporter()
15
- expect(reporter['storage']).toBeInstanceOf(FileStorage)
16
- })
17
-
18
- it('accepts Storage instance in constructor', () => {
19
- const storage = new MemoryStorage()
20
- const reporter = new StorybookReporter(storage)
21
- expect(reporter['storage']).toBe(storage)
22
- })
23
-
24
- it('accepts root path string in constructor', () => {
25
- const rootPath = '/some/project/root'
26
- const reporter = new StorybookReporter(rootPath)
27
- expect(reporter['storage']).toBeInstanceOf(FileStorage)
28
- const fileStorage = reporter['storage'] as FileStorage
29
- const config = fileStorage['config'] as Config
30
- const expectedDataDir = join(rootPath, ...DEFAULT_DATA_DIR.split('/'))
31
- expect(config.dataDir).toBe(expectedDataDir)
32
- })
33
-
34
- describe('when collecting story results', () => {
35
- let storage: MemoryStorage
36
- let reporter: StorybookReporter
37
-
38
- beforeEach(() => {
39
- storage = new MemoryStorage()
40
- reporter = new StorybookReporter(storage)
41
- })
42
-
43
- it('saves output as valid JSON', async () => {
44
- const context = passedStoryContext()
45
- await reporter.onStoryResult(context)
46
- await reporter.onComplete()
47
-
48
- const saved = await storage.getTest()
49
- expect(saved).toBeTruthy()
50
- const parsed = JSON.parse(saved!)
51
- expect(parsed).toBeDefined()
52
- })
53
-
54
- it('includes test modules', async () => {
55
- const context = passedStoryContext()
56
- await reporter.onStoryResult(context)
57
- await reporter.onComplete()
58
-
59
- const saved = await storage.getTest()
60
- const parsed = JSON.parse(saved!)
61
- expect(parsed.testModules).toHaveLength(1)
62
- })
63
-
64
- it('includes test cases', async () => {
65
- const context1 = passedStoryContext()
66
- const context2 = passedStoryContext({
67
- storyExport: { name: 'Secondary' },
68
- })
69
- await reporter.onStoryResult(context1)
70
- await reporter.onStoryResult(context2)
71
- await reporter.onComplete()
72
-
73
- const saved = await storage.getTest()
74
- const parsed = JSON.parse(saved!)
75
- expect(parsed.testModules[0].tests).toHaveLength(2)
76
- })
77
-
78
- it('captures test states (passed/failed)', async () => {
79
- const passedContext = passedStoryContext()
80
- const failedContext = failedStoryContext()
81
- await reporter.onStoryResult(passedContext, 'passed')
82
- await reporter.onStoryResult(failedContext, 'failed', [
83
- {
84
- message: 'expected button to have aria-label',
85
- stack:
86
- 'Error: expected button to have aria-label\n at test.ts:7:19',
87
- },
88
- ])
89
- await reporter.onComplete()
90
-
91
- const saved = await storage.getTest()
92
- const parsed = JSON.parse(saved!)
93
- const tests = parsed.testModules[0].tests as StoryTest[]
94
- expect(tests.find((t) => t.state === 'passed')).toBeDefined()
95
- expect(tests.find((t) => t.state === 'failed')).toBeDefined()
96
- })
97
-
98
- it('includes error information for failed tests', async () => {
99
- const context = failedStoryContext()
100
- await reporter.onStoryResult(context, 'failed', [
101
- {
102
- message: 'expected button to have aria-label',
103
- stack:
104
- 'Error: expected button to have aria-label\n at test.ts:7:19',
105
- },
106
- ])
107
- await reporter.onComplete()
108
-
109
- const saved = await storage.getTest()
110
- const parsed = JSON.parse(saved!)
111
- const failedTest = parsed.testModules[0].tests[0]
112
- expect(failedTest.state).toBe('failed')
113
- expect(failedTest.errors).toBeDefined()
114
- expect(failedTest.errors.length).toBeGreaterThan(0)
115
- })
116
- })
117
-
118
- describe('test state mapping', () => {
119
- let storage: MemoryStorage
120
- let reporter: StorybookReporter
121
-
122
- beforeEach(() => {
123
- storage = new MemoryStorage()
124
- reporter = new StorybookReporter(storage)
125
- })
126
-
127
- it.each([
128
- ['passed', 'passed'],
129
- ['failed', 'failed'],
130
- ['skipped', 'skipped'],
131
- ] as const)('maps %s to %s', async (status, expected) => {
132
- const context = createStoryContext()
133
- await reporter.onStoryResult(context, status)
134
- await reporter.onComplete()
135
-
136
- const saved = await storage.getTest()
137
- const parsed = JSON.parse(saved!)
138
- expect(parsed.testModules[0].tests[0].state).toBe(expected)
139
- })
140
- })
141
-
142
- it('handles empty test runs', async () => {
143
- const storage = new MemoryStorage()
144
- const reporter = new StorybookReporter(storage)
145
-
146
- await reporter.onComplete()
147
-
148
- const saved = await storage.getTest()
149
- const parsed = JSON.parse(saved!)
150
- expect(parsed).toEqual({ testModules: [], unhandledErrors: [] })
151
- })
152
-
153
- describe('overall test run status', () => {
154
- let storage: MemoryStorage
155
- let reporter: StorybookReporter
156
-
157
- beforeEach(() => {
158
- storage = new MemoryStorage()
159
- reporter = new StorybookReporter(storage)
160
- })
161
-
162
- it('reports "passed" when all tests pass', async () => {
163
- const context = passedStoryContext()
164
- await reporter.onStoryResult(context)
165
- await reporter.onComplete()
166
-
167
- const saved = await storage.getTest()
168
- const parsed = JSON.parse(saved!)
169
- expect(parsed.reason).toBe('passed')
170
- })
171
-
172
- it('reports "failed" when any test fails', async () => {
173
- const passedContext = passedStoryContext()
174
- const failedContext = failedStoryContext()
175
- await reporter.onStoryResult(passedContext, 'passed')
176
- await reporter.onStoryResult(failedContext, 'failed', [
177
- {
178
- message: 'expected button to have aria-label',
179
- stack:
180
- 'Error: expected button to have aria-label\n at test.ts:7:19',
181
- },
182
- ])
183
- await reporter.onComplete()
184
-
185
- const saved = await storage.getTest()
186
- const parsed = JSON.parse(saved!)
187
- expect(parsed.reason).toBe('failed')
188
- })
189
- })
190
- })
@@ -1,88 +0,0 @@
1
- import { Storage, FileStorage, Config } from 'tdd-guard'
2
- import type {
3
- TestContext,
4
- TestRunOutput,
5
- StoryTest,
6
- StoryModule,
7
- StoryError,
8
- } from './types'
9
-
10
- export class StorybookReporter {
11
- private readonly storage: Storage
12
- private readonly collectedTests: Map<string, StoryTest[]> = new Map()
13
-
14
- constructor(storageOrRoot?: Storage | string) {
15
- this.storage = this.initializeStorage(storageOrRoot)
16
- }
17
-
18
- private initializeStorage(storageOrRoot?: Storage | string): Storage {
19
- if (!storageOrRoot) {
20
- return new FileStorage()
21
- }
22
-
23
- if (typeof storageOrRoot === 'string') {
24
- const config = new Config({ projectRoot: storageOrRoot })
25
- return new FileStorage(config)
26
- }
27
-
28
- return storageOrRoot
29
- }
30
-
31
- async onStoryResult(
32
- context: TestContext,
33
- status: 'passed' | 'failed' | 'skipped' = 'passed',
34
- errors?: unknown[]
35
- ): Promise<void> {
36
- const moduleId = context.id
37
- const test: StoryTest = {
38
- name: context.name,
39
- fullName: `${context.title} > ${context.name}`,
40
- state: status,
41
- }
42
-
43
- // Add errors if present
44
- if (errors && errors.length > 0) {
45
- test.errors = errors.map((err: unknown): StoryError => {
46
- const errorObj = err as Record<string, unknown>
47
- const message = errorObj.message
48
- return {
49
- message: typeof message === 'string' ? message : String(err),
50
- stack: errorObj.stack as string | undefined,
51
- }
52
- })
53
- }
54
-
55
- if (!this.collectedTests.has(moduleId)) {
56
- this.collectedTests.set(moduleId, [])
57
- }
58
- this.collectedTests.get(moduleId)!.push(test)
59
- }
60
-
61
- async onComplete(): Promise<void> {
62
- const testModules: StoryModule[] = Array.from(
63
- this.collectedTests.entries()
64
- ).map(([moduleId, tests]) => ({
65
- moduleId,
66
- tests,
67
- }))
68
-
69
- const output: TestRunOutput = {
70
- testModules,
71
- unhandledErrors: [],
72
- reason: this.determineReason(testModules),
73
- }
74
-
75
- await this.storage.saveTest(JSON.stringify(output, null, 2))
76
- }
77
-
78
- private determineReason(
79
- testModules: StoryModule[]
80
- ): 'passed' | 'failed' | undefined {
81
- const allTests = testModules.flatMap((m) => m.tests)
82
- if (allTests.length === 0) {
83
- return undefined
84
- }
85
- const hasFailures = allTests.some((t) => t.state === 'failed')
86
- return hasFailures ? 'failed' : 'passed'
87
- }
88
- }
@@ -1,12 +0,0 @@
1
- import { StorybookReporter } from './StorybookReporter'
2
-
3
- export { StorybookReporter }
4
- export default StorybookReporter
5
- export type {
6
- StorybookReporterOptions,
7
- StoryError,
8
- StoryTest,
9
- StoryModule,
10
- TestRunOutput,
11
- TestContext,
12
- } from './types'
@@ -1,37 +0,0 @@
1
- import type { Storage } from 'tdd-guard'
2
-
3
- export interface StorybookReporterOptions {
4
- storage?: Storage
5
- projectRoot?: string
6
- }
7
-
8
- export interface StoryError {
9
- message: string
10
- stack?: string
11
- expected?: unknown
12
- actual?: unknown
13
- }
14
-
15
- export interface StoryTest {
16
- name: string
17
- fullName: string
18
- state: 'passed' | 'failed' | 'skipped'
19
- errors?: StoryError[]
20
- }
21
-
22
- export interface StoryModule {
23
- moduleId: string
24
- tests: StoryTest[]
25
- }
26
-
27
- export interface TestRunOutput {
28
- testModules: StoryModule[]
29
- unhandledErrors: unknown[]
30
- reason?: 'passed' | 'failed' | 'interrupted'
31
- }
32
-
33
- export interface TestContext {
34
- id: string
35
- title: string
36
- name: string // Story name comes directly from context, not nested in storyExport
37
- }
@@ -1,11 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "composite": true,
5
- "outDir": "./dist",
6
- "rootDir": "./src",
7
- "tsBuildInfoFile": "./dist/tsconfig.tsbuildinfo"
8
- },
9
- "include": ["src/**/*"],
10
- "exclude": ["**/*.test.ts", "**/*.spec.ts"]
11
- }
@@ -1,3 +0,0 @@
1
- module singleFailingTestModule
2
-
3
- go 1.24
@@ -1,13 +0,0 @@
1
- package singleFailingTestModule
2
-
3
- import "testing"
4
-
5
- func TestCalculator(t *testing.T) {
6
- t.Run("TestShouldAddNumbersCorrectly", func(t *testing.T) {
7
- result := 2 + 3
8
- expected := 6
9
- if result != expected {
10
- t.Errorf("Expected %d but got %d", expected, result)
11
- }
12
- })
13
- }
@@ -1,3 +0,0 @@
1
- module missingImportModule
2
-
3
- go 1.24
@@ -1,17 +0,0 @@
1
- package missingImportModule
2
-
3
- import (
4
- "github.com/non-existent/module"
5
- "testing"
6
- )
7
-
8
- func TestCalculator(t *testing.T) {
9
- t.Run("TestShouldAddNumbersCorrectly", func(t *testing.T) {
10
- module.NonExistentFunction()
11
- result := 2 + 3
12
- expected := 5
13
- if result != expected {
14
- t.Errorf("Expected %d but got %d", expected, result)
15
- }
16
- })
17
- }
@@ -1,3 +0,0 @@
1
- module singlePassingTestModule
2
-
3
- go 1.24
@@ -1,13 +0,0 @@
1
- package singlePassingTestModule
2
-
3
- import "testing"
4
-
5
- func TestCalculator(t *testing.T) {
6
- t.Run("TestShouldAddNumbersCorrectly", func(t *testing.T) {
7
- result := 2 + 3
8
- expected := 5
9
- if result != expected {
10
- t.Errorf("Expected %d but got %d", expected, result)
11
- }
12
- })
13
- }
@@ -1,5 +0,0 @@
1
- describe('Calculator', () => {
2
- test('should add numbers correctly', () => {
3
- expect(2 + 3).toBe(6)
4
- })
5
- })
@@ -1,8 +0,0 @@
1
- const { nonExistentFunction } = require('./non-existent-module')
2
-
3
- describe('Calculator', () => {
4
- test('should add numbers correctly', () => {
5
- nonExistentFunction()
6
- expect(2 + 3).toBe(5)
7
- })
8
- })
@@ -1,5 +0,0 @@
1
- describe('Calculator', () => {
2
- test('should add numbers correctly', () => {
3
- expect(2 + 3).toBe(5)
4
- })
5
- })
@@ -1,11 +0,0 @@
1
- <?php
2
-
3
- use PHPUnit\Framework\TestCase;
4
-
5
- class SingleFailingTest extends TestCase
6
- {
7
- public function testShouldAddNumbersCorrectly(): void
8
- {
9
- $this->assertEquals(6, 2 + 3);
10
- }
11
- }
@@ -1,14 +0,0 @@
1
- <?php
2
-
3
- use PHPUnit\Framework\TestCase;
4
- use NonExistent\Module\SomeClass;
5
-
6
- class SingleImportErrorTest extends TestCase
7
- {
8
- public function testShouldAddNumbersCorrectly(): void
9
- {
10
- // This should cause a fatal error due to the non-existent class
11
- $instance = new SomeClass();
12
- $this->assertEquals(5, 2 + 3);
13
- }
14
- }
@@ -1,11 +0,0 @@
1
- <?php
2
-
3
- use PHPUnit\Framework\TestCase;
4
-
5
- class SinglePassingTest extends TestCase
6
- {
7
- public function testShouldAddNumbersCorrectly(): void
8
- {
9
- $this->assertEquals(5, 2 + 3);
10
- }
11
- }
@@ -1,3 +0,0 @@
1
- class TestCalculator:
2
- def test_should_add_numbers_correctly(self):
3
- assert 2 + 3 == 6
@@ -1,6 +0,0 @@
1
- from non_existent_module import non_existent_function
2
-
3
- class TestCalculator:
4
- def test_should_add_numbers_correctly(self):
5
- non_existent_module()
6
- assert 2 + 3 == 5
@@ -1,3 +0,0 @@
1
- class TestCalculator:
2
- def test_should_add_numbers_correctly(self):
3
- assert 2 + 3 == 5
@@ -1,7 +0,0 @@
1
- # This file is automatically @generated by Cargo.
2
- # It is not intended for manual editing.
3
- version = 4
4
-
5
- [[package]]
6
- name = "single_failing"
7
- version = "0.1.0"
@@ -1,4 +0,0 @@
1
- [package]
2
- name = "single_failing"
3
- version = "0.1.0"
4
- edition = "2021"
@@ -1,14 +0,0 @@
1
- pub fn add(left: u64, right: u64) -> u64 {
2
- left + right
3
- }
4
-
5
- #[cfg(test)]
6
- mod calculator_tests {
7
- use super::*;
8
-
9
- #[test]
10
- fn should_add_numbers_correctly() {
11
- let result = add(2, 3);
12
- assert_eq!(result, 6); // This will fail: 2 + 3 != 6
13
- }
14
- }
@@ -1,7 +0,0 @@
1
- # This file is automatically @generated by Cargo.
2
- # It is not intended for manual editing.
3
- version = 4
4
-
5
- [[package]]
6
- name = "single_import_error"
7
- version = "0.1.0"
@@ -1,4 +0,0 @@
1
- [package]
2
- name = "single_import_error"
3
- version = "0.1.0"
4
- edition = "2021"
@@ -1,13 +0,0 @@
1
- use non_existent_module::Calculator; // This will fail to compile
2
-
3
- #[cfg(test)]
4
- mod calculator_tests {
5
- use super::*;
6
-
7
- #[test]
8
- fn should_add_numbers_correctly() {
9
- let calc = Calculator::new();
10
- let result = calc.add(2, 3);
11
- assert_eq!(result, 5);
12
- }
13
- }
@@ -1,7 +0,0 @@
1
- # This file is automatically @generated by Cargo.
2
- # It is not intended for manual editing.
3
- version = 4
4
-
5
- [[package]]
6
- name = "single_passing"
7
- version = "0.1.0"
@@ -1,4 +0,0 @@
1
- [package]
2
- name = "single_passing"
3
- version = "0.1.0"
4
- edition = "2021"
@@ -1,14 +0,0 @@
1
- pub fn add(left: u64, right: u64) -> u64 {
2
- left + right
3
- }
4
-
5
- #[cfg(test)]
6
- mod calculator_tests {
7
- use super::*;
8
-
9
- #[test]
10
- fn should_add_numbers_correctly() {
11
- let result = add(2, 3);
12
- assert_eq!(result, 5);
13
- }
14
- }
@@ -1,4 +0,0 @@
1
- // Simple calculator module for testing
2
- export const Calculator = {
3
- add: (a, b) => a + b,
4
- }
@@ -1,15 +0,0 @@
1
- import { expect } from '@storybook/test'
2
- import { Calculator } from './Calculator'
3
-
4
- export default {
5
- title: 'Calculator',
6
- render: () => null, // No UI component, just testing logic
7
- }
8
-
9
- export const Primary = {
10
- name: 'should add numbers correctly',
11
- play: async () => {
12
- const result = Calculator.add(2, 3)
13
- await expect(result).toBe(6) // Intentionally wrong - 2 + 3 = 5, not 6
14
- },
15
- }