xtrm-tools 0.6.0 → 0.7.1

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 (632) hide show
  1. package/.xtrm/config/README.md +10 -0
  2. package/{config/mcp_servers.json → .xtrm/config/claude.mcp.json} +0 -28
  3. package/{config → .xtrm/config}/instructions/agents-top.md +12 -3
  4. package/{config → .xtrm/config}/instructions/claude-top.md +12 -3
  5. package/{config → .xtrm/config}/pi/extensions/beads/index.ts +44 -13
  6. package/{config → .xtrm/config}/pi/extensions/custom-footer/index.ts +59 -82
  7. package/{config → .xtrm/config}/pi/extensions/xtrm-ui/index.ts +3 -3
  8. package/{config → .xtrm/config}/pi/install-schema.json +2 -2
  9. package/.xtrm/config/pi.mcp.json +39 -0
  10. package/.xtrm/config/settings.json +41 -0
  11. package/.xtrm/extensions/auto-session-name/index.ts +29 -0
  12. package/.xtrm/extensions/auto-session-name/package.json +16 -0
  13. package/.xtrm/extensions/auto-update/index.ts +71 -0
  14. package/.xtrm/extensions/auto-update/package.json +16 -0
  15. package/.xtrm/extensions/beads/index.ts +232 -0
  16. package/.xtrm/extensions/beads/package.json +19 -0
  17. package/.xtrm/extensions/compact-header/index.ts +69 -0
  18. package/.xtrm/extensions/compact-header/package.json +16 -0
  19. package/.xtrm/extensions/core/adapter.ts +52 -0
  20. package/.xtrm/extensions/core/guard-rules.ts +100 -0
  21. package/.xtrm/extensions/core/lib.ts +3 -0
  22. package/.xtrm/extensions/core/logger.ts +45 -0
  23. package/.xtrm/extensions/core/package.json +18 -0
  24. package/.xtrm/extensions/core/runner.ts +71 -0
  25. package/.xtrm/extensions/core/session-state.ts +59 -0
  26. package/.xtrm/extensions/custom-footer/index.ts +398 -0
  27. package/.xtrm/extensions/custom-footer/package.json +19 -0
  28. package/.xtrm/extensions/custom-provider-qwen-cli/index.ts +363 -0
  29. package/.xtrm/extensions/custom-provider-qwen-cli/package.json +1 -0
  30. package/.xtrm/extensions/git-checkpoint/index.ts +53 -0
  31. package/.xtrm/extensions/git-checkpoint/package.json +16 -0
  32. package/.xtrm/extensions/lsp-bootstrap/index.ts +134 -0
  33. package/.xtrm/extensions/lsp-bootstrap/package.json +17 -0
  34. package/.xtrm/extensions/pi-serena-compact/index.ts +121 -0
  35. package/.xtrm/extensions/pi-serena-compact/package.json +16 -0
  36. package/.xtrm/extensions/quality-gates/index.ts +66 -0
  37. package/.xtrm/extensions/quality-gates/package.json +19 -0
  38. package/.xtrm/extensions/service-skills/index.ts +108 -0
  39. package/.xtrm/extensions/service-skills/package.json +19 -0
  40. package/.xtrm/extensions/session-flow/index.ts +96 -0
  41. package/.xtrm/extensions/session-flow/package.json +19 -0
  42. package/.xtrm/extensions/xtrm-loader/index.ts +152 -0
  43. package/.xtrm/extensions/xtrm-loader/package.json +19 -0
  44. package/.xtrm/extensions/xtrm-ui/format.ts +93 -0
  45. package/.xtrm/extensions/xtrm-ui/index.ts +1044 -0
  46. package/.xtrm/extensions/xtrm-ui/package.json +10 -0
  47. package/.xtrm/extensions/xtrm-ui/themes/pidex-dark.json +85 -0
  48. package/.xtrm/extensions/xtrm-ui/themes/pidex-light.json +85 -0
  49. package/{hooks → .xtrm/hooks}/README.md +2 -1
  50. package/{hooks → .xtrm/hooks}/beads-commit-gate.mjs +4 -0
  51. package/.xtrm/hooks/beads-memory-gate.mjs +119 -0
  52. package/{plugins/xtrm-tools → .xtrm}/hooks/quality-check-env.mjs +1 -4
  53. package/.xtrm/hooks/statusline.mjs +156 -0
  54. package/{plugins/xtrm-tools → .xtrm}/hooks/using-xtrm-reminder.mjs +8 -7
  55. package/.xtrm/registry.json +1323 -0
  56. package/CHANGELOG.md +27 -0
  57. package/README.md +3 -1
  58. package/cli/dist/index.cjs +27025 -30731
  59. package/cli/dist/index.cjs.map +1 -1
  60. package/cli/package.json +2 -1
  61. package/package.json +12 -12
  62. package/.claude-plugin/marketplace.json +0 -19
  63. package/.claude-plugin/plugin.json +0 -9
  64. package/config/hooks.json +0 -83
  65. package/config/settings.json +0 -70
  66. package/hooks/beads-memory-gate.mjs +0 -94
  67. package/hooks/quality-check-env.mjs +0 -79
  68. package/hooks/statusline.mjs +0 -183
  69. package/hooks/tsconfig-cache.json +0 -14
  70. package/hooks/using-xtrm-reminder.mjs +0 -47
  71. package/plugins/xtrm-tools/.claude-plugin/plugin.json +0 -9
  72. package/plugins/xtrm-tools/.mcp.json +0 -18
  73. package/plugins/xtrm-tools/hooks/README.md +0 -61
  74. package/plugins/xtrm-tools/hooks/beads-claim-sync.mjs +0 -154
  75. package/plugins/xtrm-tools/hooks/beads-commit-gate.mjs +0 -70
  76. package/plugins/xtrm-tools/hooks/beads-compact-restore.mjs +0 -77
  77. package/plugins/xtrm-tools/hooks/beads-compact-save.mjs +0 -63
  78. package/plugins/xtrm-tools/hooks/beads-edit-gate.mjs +0 -85
  79. package/plugins/xtrm-tools/hooks/beads-gate-core.mjs +0 -236
  80. package/plugins/xtrm-tools/hooks/beads-gate-messages.mjs +0 -75
  81. package/plugins/xtrm-tools/hooks/beads-gate-utils.mjs +0 -176
  82. package/plugins/xtrm-tools/hooks/beads-memory-gate.mjs +0 -94
  83. package/plugins/xtrm-tools/hooks/beads-stop-gate.mjs +0 -53
  84. package/plugins/xtrm-tools/hooks/gitnexus/gitnexus-hook.cjs +0 -222
  85. package/plugins/xtrm-tools/hooks/hooks.json +0 -129
  86. package/plugins/xtrm-tools/hooks/quality-check.cjs +0 -1286
  87. package/plugins/xtrm-tools/hooks/quality-check.py +0 -345
  88. package/plugins/xtrm-tools/hooks/statusline.mjs +0 -183
  89. package/plugins/xtrm-tools/hooks/tsconfig-cache.json +0 -14
  90. package/plugins/xtrm-tools/hooks/worktree-boundary.mjs +0 -33
  91. package/plugins/xtrm-tools/hooks/xtrm-logger.mjs +0 -123
  92. package/plugins/xtrm-tools/hooks/xtrm-session-logger.mjs +0 -27
  93. package/plugins/xtrm-tools/hooks/xtrm-tool-logger.mjs +0 -53
  94. package/plugins/xtrm-tools/skills/README.txt +0 -31
  95. package/plugins/xtrm-tools/skills/clean-code/SKILL.md +0 -201
  96. package/plugins/xtrm-tools/skills/creating-service-skills/SKILL.md +0 -433
  97. package/plugins/xtrm-tools/skills/creating-service-skills/references/script_quality_standards.md +0 -425
  98. package/plugins/xtrm-tools/skills/creating-service-skills/references/service_skill_system_guide.md +0 -278
  99. package/plugins/xtrm-tools/skills/creating-service-skills/scripts/bootstrap.py +0 -326
  100. package/plugins/xtrm-tools/skills/creating-service-skills/scripts/deep_dive.py +0 -304
  101. package/plugins/xtrm-tools/skills/creating-service-skills/scripts/scaffolder.py +0 -482
  102. package/plugins/xtrm-tools/skills/delegating/SKILL.md +0 -196
  103. package/plugins/xtrm-tools/skills/delegating/config.yaml +0 -210
  104. package/plugins/xtrm-tools/skills/delegating/references/orchestration-protocols.md +0 -41
  105. package/plugins/xtrm-tools/skills/docker-expert/SKILL.md +0 -409
  106. package/plugins/xtrm-tools/skills/documenting/CHANGELOG.md +0 -23
  107. package/plugins/xtrm-tools/skills/documenting/README.md +0 -148
  108. package/plugins/xtrm-tools/skills/documenting/SKILL.md +0 -113
  109. package/plugins/xtrm-tools/skills/documenting/examples/example_pattern.md +0 -70
  110. package/plugins/xtrm-tools/skills/documenting/examples/example_reference.md +0 -70
  111. package/plugins/xtrm-tools/skills/documenting/examples/example_ssot_analytics.md +0 -64
  112. package/plugins/xtrm-tools/skills/documenting/examples/example_workflow.md +0 -141
  113. package/plugins/xtrm-tools/skills/documenting/references/changelog-format.md +0 -97
  114. package/plugins/xtrm-tools/skills/documenting/references/metadata-schema.md +0 -136
  115. package/plugins/xtrm-tools/skills/documenting/references/taxonomy.md +0 -81
  116. package/plugins/xtrm-tools/skills/documenting/references/versioning-rules.md +0 -78
  117. package/plugins/xtrm-tools/skills/documenting/scripts/bump_version.sh +0 -60
  118. package/plugins/xtrm-tools/skills/documenting/scripts/changelog/__init__.py +0 -0
  119. package/plugins/xtrm-tools/skills/documenting/scripts/changelog/add_entry.py +0 -216
  120. package/plugins/xtrm-tools/skills/documenting/scripts/changelog/bump_release.py +0 -117
  121. package/plugins/xtrm-tools/skills/documenting/scripts/changelog/init_changelog.py +0 -54
  122. package/plugins/xtrm-tools/skills/documenting/scripts/changelog/validate_changelog.py +0 -128
  123. package/plugins/xtrm-tools/skills/documenting/scripts/drift_detector.py +0 -266
  124. package/plugins/xtrm-tools/skills/documenting/scripts/generate_template.py +0 -311
  125. package/plugins/xtrm-tools/skills/documenting/scripts/list_by_category.sh +0 -84
  126. package/plugins/xtrm-tools/skills/documenting/scripts/orchestrator.py +0 -255
  127. package/plugins/xtrm-tools/skills/documenting/scripts/validate_metadata.py +0 -242
  128. package/plugins/xtrm-tools/skills/documenting/templates/CHANGELOG.md.template +0 -13
  129. package/plugins/xtrm-tools/skills/documenting/tests/integration_test.sh +0 -70
  130. package/plugins/xtrm-tools/skills/documenting/tests/test_changelog.py +0 -201
  131. package/plugins/xtrm-tools/skills/documenting/tests/test_drift_detector.py +0 -80
  132. package/plugins/xtrm-tools/skills/documenting/tests/test_orchestrator.py +0 -52
  133. package/plugins/xtrm-tools/skills/documenting/tests/test_validate_metadata.py +0 -64
  134. package/plugins/xtrm-tools/skills/find-skills/SKILL.md +0 -133
  135. package/plugins/xtrm-tools/skills/gitnexus-exploring/SKILL.md +0 -75
  136. package/plugins/xtrm-tools/skills/gitnexus-impact-analysis/SKILL.md +0 -94
  137. package/plugins/xtrm-tools/skills/gitnexus-refactoring/SKILL.md +0 -113
  138. package/plugins/xtrm-tools/skills/hook-development/SKILL.md +0 -797
  139. package/plugins/xtrm-tools/skills/hook-development/examples/load-context.sh +0 -55
  140. package/plugins/xtrm-tools/skills/hook-development/examples/quality-check.js +0 -1168
  141. package/plugins/xtrm-tools/skills/hook-development/examples/validate-bash.sh +0 -43
  142. package/plugins/xtrm-tools/skills/hook-development/examples/validate-write.sh +0 -38
  143. package/plugins/xtrm-tools/skills/hook-development/references/advanced.md +0 -527
  144. package/plugins/xtrm-tools/skills/hook-development/references/migration.md +0 -369
  145. package/plugins/xtrm-tools/skills/hook-development/references/patterns.md +0 -412
  146. package/plugins/xtrm-tools/skills/hook-development/scripts/README.md +0 -164
  147. package/plugins/xtrm-tools/skills/hook-development/scripts/hook-linter.sh +0 -153
  148. package/plugins/xtrm-tools/skills/hook-development/scripts/test-hook.sh +0 -252
  149. package/plugins/xtrm-tools/skills/hook-development/scripts/validate-hook-schema.sh +0 -159
  150. package/plugins/xtrm-tools/skills/obsidian-cli/SKILL.md +0 -106
  151. package/plugins/xtrm-tools/skills/orchestrating-agents/SKILL.md +0 -135
  152. package/plugins/xtrm-tools/skills/orchestrating-agents/config.yaml +0 -45
  153. package/plugins/xtrm-tools/skills/orchestrating-agents/references/agent-context-integration.md +0 -37
  154. package/plugins/xtrm-tools/skills/orchestrating-agents/references/examples.md +0 -45
  155. package/plugins/xtrm-tools/skills/orchestrating-agents/references/handover-protocol.md +0 -31
  156. package/plugins/xtrm-tools/skills/orchestrating-agents/references/workflows.md +0 -42
  157. package/plugins/xtrm-tools/skills/orchestrating-agents/scripts/detect_neighbors.py +0 -23
  158. package/plugins/xtrm-tools/skills/planning/SKILL.md +0 -405
  159. package/plugins/xtrm-tools/skills/planning/evals/evals.json +0 -19
  160. package/plugins/xtrm-tools/skills/prompt-improving/README.md +0 -162
  161. package/plugins/xtrm-tools/skills/prompt-improving/SKILL.md +0 -74
  162. package/plugins/xtrm-tools/skills/prompt-improving/references/analysis_commands.md +0 -24
  163. package/plugins/xtrm-tools/skills/prompt-improving/references/chain_of_thought.md +0 -24
  164. package/plugins/xtrm-tools/skills/prompt-improving/references/mcp_definitions.md +0 -20
  165. package/plugins/xtrm-tools/skills/prompt-improving/references/multishot.md +0 -23
  166. package/plugins/xtrm-tools/skills/prompt-improving/references/xml_core.md +0 -60
  167. package/plugins/xtrm-tools/skills/python-testing/SKILL.md +0 -815
  168. package/plugins/xtrm-tools/skills/scoping-service-skills/SKILL.md +0 -231
  169. package/plugins/xtrm-tools/skills/scoping-service-skills/scripts/scope.py +0 -74
  170. package/plugins/xtrm-tools/skills/senior-backend/SKILL.md +0 -209
  171. package/plugins/xtrm-tools/skills/senior-backend/references/api_design_patterns.md +0 -103
  172. package/plugins/xtrm-tools/skills/senior-backend/references/backend_security_practices.md +0 -103
  173. package/plugins/xtrm-tools/skills/senior-backend/references/database_optimization_guide.md +0 -103
  174. package/plugins/xtrm-tools/skills/senior-backend/scripts/api_load_tester.py +0 -114
  175. package/plugins/xtrm-tools/skills/senior-backend/scripts/api_scaffolder.py +0 -114
  176. package/plugins/xtrm-tools/skills/senior-backend/scripts/database_migration_tool.py +0 -114
  177. package/plugins/xtrm-tools/skills/senior-data-scientist/SKILL.md +0 -226
  178. package/plugins/xtrm-tools/skills/senior-data-scientist/references/experiment_design_frameworks.md +0 -80
  179. package/plugins/xtrm-tools/skills/senior-data-scientist/references/feature_engineering_patterns.md +0 -80
  180. package/plugins/xtrm-tools/skills/senior-data-scientist/references/statistical_methods_advanced.md +0 -80
  181. package/plugins/xtrm-tools/skills/senior-data-scientist/scripts/experiment_designer.py +0 -100
  182. package/plugins/xtrm-tools/skills/senior-data-scientist/scripts/feature_engineering_pipeline.py +0 -100
  183. package/plugins/xtrm-tools/skills/senior-data-scientist/scripts/model_evaluation_suite.py +0 -100
  184. package/plugins/xtrm-tools/skills/senior-devops/SKILL.md +0 -209
  185. package/plugins/xtrm-tools/skills/senior-devops/references/cicd_pipeline_guide.md +0 -103
  186. package/plugins/xtrm-tools/skills/senior-devops/references/deployment_strategies.md +0 -103
  187. package/plugins/xtrm-tools/skills/senior-devops/references/infrastructure_as_code.md +0 -103
  188. package/plugins/xtrm-tools/skills/senior-devops/scripts/deployment_manager.py +0 -114
  189. package/plugins/xtrm-tools/skills/senior-devops/scripts/pipeline_generator.py +0 -114
  190. package/plugins/xtrm-tools/skills/senior-devops/scripts/terraform_scaffolder.py +0 -114
  191. package/plugins/xtrm-tools/skills/senior-security/SKILL.md +0 -209
  192. package/plugins/xtrm-tools/skills/senior-security/references/cryptography_implementation.md +0 -103
  193. package/plugins/xtrm-tools/skills/senior-security/references/penetration_testing_guide.md +0 -103
  194. package/plugins/xtrm-tools/skills/senior-security/references/security_architecture_patterns.md +0 -103
  195. package/plugins/xtrm-tools/skills/senior-security/scripts/pentest_automator.py +0 -114
  196. package/plugins/xtrm-tools/skills/senior-security/scripts/security_auditor.py +0 -114
  197. package/plugins/xtrm-tools/skills/senior-security/scripts/threat_modeler.py +0 -114
  198. package/plugins/xtrm-tools/skills/skill-creator/LICENSE.txt +0 -202
  199. package/plugins/xtrm-tools/skills/skill-creator/SKILL.md +0 -479
  200. package/plugins/xtrm-tools/skills/skill-creator/agents/analyzer.md +0 -274
  201. package/plugins/xtrm-tools/skills/skill-creator/agents/comparator.md +0 -202
  202. package/plugins/xtrm-tools/skills/skill-creator/agents/grader.md +0 -223
  203. package/plugins/xtrm-tools/skills/skill-creator/assets/eval_review.html +0 -146
  204. package/plugins/xtrm-tools/skills/skill-creator/eval-viewer/generate_review.py +0 -471
  205. package/plugins/xtrm-tools/skills/skill-creator/eval-viewer/viewer.html +0 -1325
  206. package/plugins/xtrm-tools/skills/skill-creator/references/schemas.md +0 -430
  207. package/plugins/xtrm-tools/skills/skill-creator/scripts/__init__.py +0 -0
  208. package/plugins/xtrm-tools/skills/skill-creator/scripts/aggregate_benchmark.py +0 -401
  209. package/plugins/xtrm-tools/skills/skill-creator/scripts/generate_report.py +0 -326
  210. package/plugins/xtrm-tools/skills/skill-creator/scripts/improve_description.py +0 -248
  211. package/plugins/xtrm-tools/skills/skill-creator/scripts/package_skill.py +0 -136
  212. package/plugins/xtrm-tools/skills/skill-creator/scripts/quick_validate.py +0 -103
  213. package/plugins/xtrm-tools/skills/skill-creator/scripts/run_eval.py +0 -310
  214. package/plugins/xtrm-tools/skills/skill-creator/scripts/run_loop.py +0 -332
  215. package/plugins/xtrm-tools/skills/skill-creator/scripts/utils.py +0 -47
  216. package/plugins/xtrm-tools/skills/sync-docs/SKILL.md +0 -286
  217. package/plugins/xtrm-tools/skills/sync-docs/evals/evals.json +0 -89
  218. package/plugins/xtrm-tools/skills/sync-docs/references/doc-structure.md +0 -99
  219. package/plugins/xtrm-tools/skills/sync-docs/references/schema.md +0 -103
  220. package/plugins/xtrm-tools/skills/sync-docs/scripts/changelog/add_entry.py +0 -216
  221. package/plugins/xtrm-tools/skills/sync-docs/scripts/context_gatherer.py +0 -240
  222. package/plugins/xtrm-tools/skills/sync-docs/scripts/doc_structure_analyzer.py +0 -495
  223. package/plugins/xtrm-tools/skills/sync-docs/scripts/drift_detector.py +0 -563
  224. package/plugins/xtrm-tools/skills/sync-docs/scripts/validate_doc.py +0 -365
  225. package/plugins/xtrm-tools/skills/sync-docs/scripts/validate_metadata.py +0 -185
  226. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/benchmark.json +0 -293
  227. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/benchmark.md +0 -13
  228. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-doc-audit/eval_metadata.json +0 -27
  229. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-doc-audit/with_skill/outputs/result.md +0 -210
  230. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-doc-audit/with_skill/run-1/grading.json +0 -28
  231. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-doc-audit/with_skill/run-1/timing.json +0 -1
  232. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/outputs/result.md +0 -101
  233. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/run-1/grading.json +0 -28
  234. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/run-1/timing.json +0 -5
  235. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/timing.json +0 -5
  236. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-fix-mode/eval_metadata.json +0 -27
  237. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-fix-mode/with_skill/outputs/result.md +0 -198
  238. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-fix-mode/with_skill/run-1/grading.json +0 -28
  239. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-fix-mode/with_skill/run-1/timing.json +0 -1
  240. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-fix-mode/without_skill/outputs/result.md +0 -94
  241. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-fix-mode/without_skill/run-1/grading.json +0 -28
  242. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-fix-mode/without_skill/run-1/timing.json +0 -1
  243. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/eval_metadata.json +0 -27
  244. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/with_skill/outputs/result.md +0 -237
  245. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/with_skill/run-1/grading.json +0 -28
  246. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/with_skill/run-1/timing.json +0 -1
  247. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/without_skill/outputs/result.md +0 -134
  248. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/without_skill/run-1/grading.json +0 -28
  249. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/without_skill/run-1/timing.json +0 -1
  250. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/benchmark.json +0 -297
  251. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/benchmark.md +0 -13
  252. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-doc-audit/eval_metadata.json +0 -27
  253. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-doc-audit/with_skill/outputs/result.md +0 -137
  254. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-doc-audit/with_skill/run-1/grading.json +0 -92
  255. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-doc-audit/with_skill/run-1/timing.json +0 -1
  256. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-doc-audit/without_skill/outputs/result.md +0 -134
  257. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-doc-audit/without_skill/run-1/grading.json +0 -86
  258. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-doc-audit/without_skill/run-1/timing.json +0 -1
  259. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-fix-mode/eval_metadata.json +0 -27
  260. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-fix-mode/with_skill/outputs/result.md +0 -193
  261. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-fix-mode/with_skill/run-1/grading.json +0 -72
  262. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-fix-mode/with_skill/run-1/timing.json +0 -1
  263. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-fix-mode/without_skill/outputs/result.md +0 -211
  264. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-fix-mode/without_skill/run-1/grading.json +0 -91
  265. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-fix-mode/without_skill/run-1/timing.json +0 -5
  266. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/eval_metadata.json +0 -27
  267. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/with_skill/outputs/result.md +0 -182
  268. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/with_skill/run-1/grading.json +0 -95
  269. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/with_skill/run-1/timing.json +0 -1
  270. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/without_skill/outputs/result.md +0 -222
  271. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/without_skill/run-1/grading.json +0 -88
  272. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/without_skill/run-1/timing.json +0 -5
  273. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/benchmark.json +0 -298
  274. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/benchmark.md +0 -13
  275. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-doc-audit/eval_metadata.json +0 -27
  276. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-doc-audit/with_skill/outputs/result.md +0 -125
  277. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-doc-audit/with_skill/run-1/grading.json +0 -97
  278. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-doc-audit/with_skill/run-1/timing.json +0 -5
  279. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-doc-audit/without_skill/outputs/result.md +0 -144
  280. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-doc-audit/without_skill/run-1/grading.json +0 -78
  281. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-doc-audit/without_skill/run-1/timing.json +0 -5
  282. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-fix-mode/eval_metadata.json +0 -27
  283. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-fix-mode/with_skill/outputs/result.md +0 -104
  284. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-fix-mode/with_skill/run-1/grading.json +0 -91
  285. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-fix-mode/with_skill/run-1/timing.json +0 -5
  286. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-fix-mode/without_skill/outputs/result.md +0 -79
  287. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-fix-mode/without_skill/run-1/grading.json +0 -82
  288. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-fix-mode/without_skill/run-1/timing.json +0 -5
  289. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/eval_metadata.json +0 -27
  290. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase1_context.json +0 -302
  291. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase2_drift.txt +0 -33
  292. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase3_analysis.json +0 -114
  293. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase4_fix.txt +0 -118
  294. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase5_validate.txt +0 -38
  295. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/result.md +0 -158
  296. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/run-1/grading.json +0 -95
  297. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/run-1/timing.json +0 -5
  298. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/without_skill/outputs/result.md +0 -71
  299. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/without_skill/run-1/grading.json +0 -90
  300. package/plugins/xtrm-tools/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/without_skill/run-1/timing.json +0 -5
  301. package/plugins/xtrm-tools/skills/test-planning/SKILL.md +0 -465
  302. package/plugins/xtrm-tools/skills/test-planning/evals/evals.json +0 -23
  303. package/plugins/xtrm-tools/skills/updating-service-skills/SKILL.md +0 -136
  304. package/plugins/xtrm-tools/skills/updating-service-skills/scripts/drift_detector.py +0 -222
  305. package/plugins/xtrm-tools/skills/using-quality-gates/SKILL.md +0 -254
  306. package/plugins/xtrm-tools/skills/using-serena-lsp/README.md +0 -8
  307. package/plugins/xtrm-tools/skills/using-serena-lsp/REFERENCE.md +0 -194
  308. package/plugins/xtrm-tools/skills/using-serena-lsp/SKILL.md +0 -82
  309. package/plugins/xtrm-tools/skills/using-service-skills/SKILL.md +0 -108
  310. package/plugins/xtrm-tools/skills/using-service-skills/scripts/cataloger.py +0 -74
  311. package/plugins/xtrm-tools/skills/using-service-skills/scripts/skill_activator.py +0 -152
  312. package/plugins/xtrm-tools/skills/using-service-skills/scripts/test_skill_activator.py +0 -58
  313. package/plugins/xtrm-tools/skills/using-tdd/SKILL.md +0 -410
  314. package/plugins/xtrm-tools/skills/using-xtrm/SKILL.md +0 -127
  315. package/plugins/xtrm-tools/skills/xt-debugging/SKILL.md +0 -149
  316. package/plugins/xtrm-tools/skills/xt-end/SKILL.md +0 -297
  317. package/plugins/xtrm-tools/skills/xt-merge/SKILL.md +0 -313
  318. package/project-skills/quality-gates/.claude/hooks/hook-config.json +0 -66
  319. package/project-skills/quality-gates/.claude/hooks/quality-check.cjs +0 -1286
  320. package/project-skills/quality-gates/.claude/hooks/quality-check.py +0 -334
  321. package/project-skills/quality-gates/.claude/settings.json +0 -3
  322. package/project-skills/quality-gates/.claude/skills/using-quality-gates/SKILL.md +0 -254
  323. package/project-skills/quality-gates/README.md +0 -109
  324. package/project-skills/quality-gates/evals/evals.json +0 -181
  325. package/project-skills/quality-gates/workspace/iteration-1/FINAL-EVAL-SUMMARY.md +0 -75
  326. package/project-skills/quality-gates/workspace/iteration-1/edge-case-auto-fix-verification/with_skill/outputs/response.md +0 -59
  327. package/project-skills/quality-gates/workspace/iteration-1/edge-case-mixed-language-project/with_skill/outputs/response.md +0 -60
  328. package/project-skills/quality-gates/workspace/iteration-1/eval-summary.md +0 -105
  329. package/project-skills/quality-gates/workspace/iteration-1/partial-install-python-only/with_skill/outputs/response.md +0 -93
  330. package/project-skills/quality-gates/workspace/iteration-1/python-refactor-request/with_skill/outputs/response.md +0 -104
  331. package/project-skills/quality-gates/workspace/iteration-1/quality-gate-error-fix/with_skill/outputs/response.md +0 -74
  332. package/project-skills/quality-gates/workspace/iteration-1/should-not-trigger-general-chat/with_skill/outputs/response.md +0 -18
  333. package/project-skills/quality-gates/workspace/iteration-1/should-not-trigger-math-question/with_skill/outputs/response.md +0 -18
  334. package/project-skills/quality-gates/workspace/iteration-1/should-not-trigger-unrelated-coding/with_skill/outputs/response.md +0 -56
  335. package/project-skills/quality-gates/workspace/iteration-1/tdd-guard-blocking-confusion/with_skill/outputs/response.md +0 -67
  336. package/project-skills/quality-gates/workspace/iteration-1/typescript-feature-with-tests/with_skill/outputs/response.md +0 -97
  337. package/project-skills/service-skills-set/.claude/git-hooks/doc_reminder.py +0 -67
  338. package/project-skills/service-skills-set/.claude/git-hooks/skill_staleness.py +0 -194
  339. package/project-skills/service-skills-set/.claude/service-registry.json +0 -4
  340. package/project-skills/service-skills-set/.claude/settings.json +0 -37
  341. package/project-skills/service-skills-set/.claude/skills/creating-service-skills/SKILL.md +0 -433
  342. package/project-skills/service-skills-set/.claude/skills/creating-service-skills/references/script_quality_standards.md +0 -425
  343. package/project-skills/service-skills-set/.claude/skills/creating-service-skills/references/service_skill_system_guide.md +0 -278
  344. package/project-skills/service-skills-set/.claude/skills/creating-service-skills/scripts/bootstrap.py +0 -308
  345. package/project-skills/service-skills-set/.claude/skills/creating-service-skills/scripts/deep_dive.py +0 -304
  346. package/project-skills/service-skills-set/.claude/skills/creating-service-skills/scripts/scaffolder.py +0 -482
  347. package/project-skills/service-skills-set/.claude/skills/scoping-service-skills/SKILL.md +0 -231
  348. package/project-skills/service-skills-set/.claude/skills/scoping-service-skills/scripts/scope.py +0 -74
  349. package/project-skills/service-skills-set/.claude/skills/updating-service-skills/SKILL.md +0 -136
  350. package/project-skills/service-skills-set/.claude/skills/updating-service-skills/scripts/drift_detector.py +0 -222
  351. package/project-skills/service-skills-set/.claude/skills/using-service-skills/SKILL.md +0 -108
  352. package/project-skills/service-skills-set/.claude/skills/using-service-skills/scripts/cataloger.py +0 -74
  353. package/project-skills/service-skills-set/.claude/skills/using-service-skills/scripts/skill_activator.py +0 -152
  354. package/project-skills/service-skills-set/README.md +0 -93
  355. package/project-skills/service-skills-set/install-service-skills.py +0 -193
  356. package/project-skills/service-skills-set/service-skills-readme.md +0 -236
  357. package/skills/README.txt +0 -31
  358. package/skills/clean-code/SKILL.md +0 -201
  359. package/skills/creating-service-skills/SKILL.md +0 -433
  360. package/skills/creating-service-skills/references/script_quality_standards.md +0 -425
  361. package/skills/creating-service-skills/references/service_skill_system_guide.md +0 -278
  362. package/skills/creating-service-skills/scripts/bootstrap.py +0 -326
  363. package/skills/creating-service-skills/scripts/deep_dive.py +0 -304
  364. package/skills/creating-service-skills/scripts/scaffolder.py +0 -482
  365. package/skills/delegating/SKILL.md +0 -196
  366. package/skills/delegating/config.yaml +0 -210
  367. package/skills/delegating/references/orchestration-protocols.md +0 -41
  368. package/skills/docker-expert/SKILL.md +0 -409
  369. package/skills/documenting/CHANGELOG.md +0 -23
  370. package/skills/documenting/README.md +0 -148
  371. package/skills/documenting/SKILL.md +0 -113
  372. package/skills/documenting/examples/example_pattern.md +0 -70
  373. package/skills/documenting/examples/example_reference.md +0 -70
  374. package/skills/documenting/examples/example_ssot_analytics.md +0 -64
  375. package/skills/documenting/examples/example_workflow.md +0 -141
  376. package/skills/documenting/references/changelog-format.md +0 -97
  377. package/skills/documenting/references/metadata-schema.md +0 -136
  378. package/skills/documenting/references/taxonomy.md +0 -81
  379. package/skills/documenting/references/versioning-rules.md +0 -78
  380. package/skills/documenting/scripts/bump_version.sh +0 -60
  381. package/skills/documenting/scripts/changelog/__init__.py +0 -0
  382. package/skills/documenting/scripts/changelog/add_entry.py +0 -216
  383. package/skills/documenting/scripts/changelog/bump_release.py +0 -117
  384. package/skills/documenting/scripts/changelog/init_changelog.py +0 -54
  385. package/skills/documenting/scripts/changelog/validate_changelog.py +0 -128
  386. package/skills/documenting/scripts/drift_detector.py +0 -266
  387. package/skills/documenting/scripts/generate_template.py +0 -311
  388. package/skills/documenting/scripts/list_by_category.sh +0 -84
  389. package/skills/documenting/scripts/orchestrator.py +0 -255
  390. package/skills/documenting/scripts/validate_metadata.py +0 -242
  391. package/skills/documenting/templates/CHANGELOG.md.template +0 -13
  392. package/skills/find-skills/SKILL.md +0 -133
  393. package/skills/gitnexus-exploring/SKILL.md +0 -75
  394. package/skills/gitnexus-impact-analysis/SKILL.md +0 -94
  395. package/skills/gitnexus-refactoring/SKILL.md +0 -113
  396. package/skills/hook-development/SKILL.md +0 -797
  397. package/skills/hook-development/examples/load-context.sh +0 -55
  398. package/skills/hook-development/examples/quality-check.js +0 -1168
  399. package/skills/hook-development/examples/validate-bash.sh +0 -43
  400. package/skills/hook-development/examples/validate-write.sh +0 -38
  401. package/skills/hook-development/references/advanced.md +0 -527
  402. package/skills/hook-development/references/migration.md +0 -369
  403. package/skills/hook-development/references/patterns.md +0 -412
  404. package/skills/hook-development/scripts/README.md +0 -164
  405. package/skills/hook-development/scripts/hook-linter.sh +0 -153
  406. package/skills/hook-development/scripts/test-hook.sh +0 -252
  407. package/skills/hook-development/scripts/validate-hook-schema.sh +0 -159
  408. package/skills/obsidian-cli/SKILL.md +0 -106
  409. package/skills/orchestrating-agents/SKILL.md +0 -135
  410. package/skills/orchestrating-agents/config.yaml +0 -45
  411. package/skills/orchestrating-agents/references/agent-context-integration.md +0 -37
  412. package/skills/orchestrating-agents/references/examples.md +0 -45
  413. package/skills/orchestrating-agents/references/handover-protocol.md +0 -31
  414. package/skills/orchestrating-agents/references/workflows.md +0 -42
  415. package/skills/orchestrating-agents/scripts/detect_neighbors.py +0 -23
  416. package/skills/planning/SKILL.md +0 -405
  417. package/skills/planning/evals/evals.json +0 -19
  418. package/skills/prompt-improving/README.md +0 -162
  419. package/skills/prompt-improving/SKILL.md +0 -74
  420. package/skills/prompt-improving/references/analysis_commands.md +0 -24
  421. package/skills/prompt-improving/references/chain_of_thought.md +0 -24
  422. package/skills/prompt-improving/references/mcp_definitions.md +0 -20
  423. package/skills/prompt-improving/references/multishot.md +0 -23
  424. package/skills/prompt-improving/references/xml_core.md +0 -60
  425. package/skills/python-testing/SKILL.md +0 -815
  426. package/skills/scoping-service-skills/SKILL.md +0 -231
  427. package/skills/scoping-service-skills/scripts/scope.py +0 -74
  428. package/skills/senior-backend/SKILL.md +0 -209
  429. package/skills/senior-backend/references/api_design_patterns.md +0 -103
  430. package/skills/senior-backend/references/backend_security_practices.md +0 -103
  431. package/skills/senior-backend/references/database_optimization_guide.md +0 -103
  432. package/skills/senior-backend/scripts/api_load_tester.py +0 -114
  433. package/skills/senior-backend/scripts/api_scaffolder.py +0 -114
  434. package/skills/senior-backend/scripts/database_migration_tool.py +0 -114
  435. package/skills/senior-data-scientist/SKILL.md +0 -226
  436. package/skills/senior-data-scientist/references/experiment_design_frameworks.md +0 -80
  437. package/skills/senior-data-scientist/references/feature_engineering_patterns.md +0 -80
  438. package/skills/senior-data-scientist/references/statistical_methods_advanced.md +0 -80
  439. package/skills/senior-data-scientist/scripts/experiment_designer.py +0 -100
  440. package/skills/senior-data-scientist/scripts/feature_engineering_pipeline.py +0 -100
  441. package/skills/senior-data-scientist/scripts/model_evaluation_suite.py +0 -100
  442. package/skills/senior-devops/SKILL.md +0 -209
  443. package/skills/senior-devops/references/cicd_pipeline_guide.md +0 -103
  444. package/skills/senior-devops/references/deployment_strategies.md +0 -103
  445. package/skills/senior-devops/references/infrastructure_as_code.md +0 -103
  446. package/skills/senior-devops/scripts/deployment_manager.py +0 -114
  447. package/skills/senior-devops/scripts/pipeline_generator.py +0 -114
  448. package/skills/senior-devops/scripts/terraform_scaffolder.py +0 -114
  449. package/skills/senior-security/SKILL.md +0 -209
  450. package/skills/senior-security/references/cryptography_implementation.md +0 -103
  451. package/skills/senior-security/references/penetration_testing_guide.md +0 -103
  452. package/skills/senior-security/references/security_architecture_patterns.md +0 -103
  453. package/skills/senior-security/scripts/pentest_automator.py +0 -114
  454. package/skills/senior-security/scripts/security_auditor.py +0 -114
  455. package/skills/senior-security/scripts/threat_modeler.py +0 -114
  456. package/skills/skill-creator/LICENSE.txt +0 -202
  457. package/skills/skill-creator/SKILL.md +0 -479
  458. package/skills/skill-creator/agents/analyzer.md +0 -274
  459. package/skills/skill-creator/agents/comparator.md +0 -202
  460. package/skills/skill-creator/agents/grader.md +0 -223
  461. package/skills/skill-creator/assets/eval_review.html +0 -146
  462. package/skills/skill-creator/eval-viewer/generate_review.py +0 -471
  463. package/skills/skill-creator/eval-viewer/viewer.html +0 -1325
  464. package/skills/skill-creator/references/schemas.md +0 -430
  465. package/skills/skill-creator/scripts/__init__.py +0 -0
  466. package/skills/skill-creator/scripts/aggregate_benchmark.py +0 -401
  467. package/skills/skill-creator/scripts/generate_report.py +0 -326
  468. package/skills/skill-creator/scripts/improve_description.py +0 -248
  469. package/skills/skill-creator/scripts/package_skill.py +0 -136
  470. package/skills/skill-creator/scripts/quick_validate.py +0 -103
  471. package/skills/skill-creator/scripts/run_eval.py +0 -310
  472. package/skills/skill-creator/scripts/run_loop.py +0 -332
  473. package/skills/skill-creator/scripts/utils.py +0 -47
  474. package/skills/sync-docs/SKILL.md +0 -286
  475. package/skills/sync-docs/evals/evals.json +0 -89
  476. package/skills/sync-docs/references/doc-structure.md +0 -99
  477. package/skills/sync-docs/references/schema.md +0 -103
  478. package/skills/sync-docs/scripts/changelog/add_entry.py +0 -216
  479. package/skills/sync-docs/scripts/context_gatherer.py +0 -240
  480. package/skills/sync-docs/scripts/doc_structure_analyzer.py +0 -495
  481. package/skills/sync-docs/scripts/drift_detector.py +0 -563
  482. package/skills/sync-docs/scripts/validate_doc.py +0 -365
  483. package/skills/sync-docs/scripts/validate_metadata.py +0 -185
  484. package/skills/sync-docs-workspace/iteration-1/benchmark.json +0 -293
  485. package/skills/sync-docs-workspace/iteration-1/benchmark.md +0 -13
  486. package/skills/sync-docs-workspace/iteration-1/eval-doc-audit/eval_metadata.json +0 -27
  487. package/skills/sync-docs-workspace/iteration-1/eval-doc-audit/with_skill/outputs/result.md +0 -210
  488. package/skills/sync-docs-workspace/iteration-1/eval-doc-audit/with_skill/run-1/grading.json +0 -28
  489. package/skills/sync-docs-workspace/iteration-1/eval-doc-audit/with_skill/run-1/timing.json +0 -1
  490. package/skills/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/outputs/result.md +0 -101
  491. package/skills/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/run-1/grading.json +0 -28
  492. package/skills/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/run-1/timing.json +0 -5
  493. package/skills/sync-docs-workspace/iteration-1/eval-doc-audit/without_skill/timing.json +0 -5
  494. package/skills/sync-docs-workspace/iteration-1/eval-fix-mode/eval_metadata.json +0 -27
  495. package/skills/sync-docs-workspace/iteration-1/eval-fix-mode/with_skill/outputs/result.md +0 -198
  496. package/skills/sync-docs-workspace/iteration-1/eval-fix-mode/with_skill/run-1/grading.json +0 -28
  497. package/skills/sync-docs-workspace/iteration-1/eval-fix-mode/with_skill/run-1/timing.json +0 -1
  498. package/skills/sync-docs-workspace/iteration-1/eval-fix-mode/without_skill/outputs/result.md +0 -94
  499. package/skills/sync-docs-workspace/iteration-1/eval-fix-mode/without_skill/run-1/grading.json +0 -28
  500. package/skills/sync-docs-workspace/iteration-1/eval-fix-mode/without_skill/run-1/timing.json +0 -1
  501. package/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/eval_metadata.json +0 -27
  502. package/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/with_skill/outputs/result.md +0 -237
  503. package/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/with_skill/run-1/grading.json +0 -28
  504. package/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/with_skill/run-1/timing.json +0 -1
  505. package/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/without_skill/outputs/result.md +0 -134
  506. package/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/without_skill/run-1/grading.json +0 -28
  507. package/skills/sync-docs-workspace/iteration-1/eval-sprint-closeout/without_skill/run-1/timing.json +0 -1
  508. package/skills/sync-docs-workspace/iteration-2/benchmark.json +0 -297
  509. package/skills/sync-docs-workspace/iteration-2/benchmark.md +0 -13
  510. package/skills/sync-docs-workspace/iteration-2/eval-doc-audit/eval_metadata.json +0 -27
  511. package/skills/sync-docs-workspace/iteration-2/eval-doc-audit/with_skill/outputs/result.md +0 -137
  512. package/skills/sync-docs-workspace/iteration-2/eval-doc-audit/with_skill/run-1/grading.json +0 -92
  513. package/skills/sync-docs-workspace/iteration-2/eval-doc-audit/with_skill/run-1/timing.json +0 -1
  514. package/skills/sync-docs-workspace/iteration-2/eval-doc-audit/without_skill/outputs/result.md +0 -134
  515. package/skills/sync-docs-workspace/iteration-2/eval-doc-audit/without_skill/run-1/grading.json +0 -86
  516. package/skills/sync-docs-workspace/iteration-2/eval-doc-audit/without_skill/run-1/timing.json +0 -1
  517. package/skills/sync-docs-workspace/iteration-2/eval-fix-mode/eval_metadata.json +0 -27
  518. package/skills/sync-docs-workspace/iteration-2/eval-fix-mode/with_skill/outputs/result.md +0 -193
  519. package/skills/sync-docs-workspace/iteration-2/eval-fix-mode/with_skill/run-1/grading.json +0 -72
  520. package/skills/sync-docs-workspace/iteration-2/eval-fix-mode/with_skill/run-1/timing.json +0 -1
  521. package/skills/sync-docs-workspace/iteration-2/eval-fix-mode/without_skill/outputs/result.md +0 -211
  522. package/skills/sync-docs-workspace/iteration-2/eval-fix-mode/without_skill/run-1/grading.json +0 -91
  523. package/skills/sync-docs-workspace/iteration-2/eval-fix-mode/without_skill/run-1/timing.json +0 -5
  524. package/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/eval_metadata.json +0 -27
  525. package/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/with_skill/outputs/result.md +0 -182
  526. package/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/with_skill/run-1/grading.json +0 -95
  527. package/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/with_skill/run-1/timing.json +0 -1
  528. package/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/without_skill/outputs/result.md +0 -222
  529. package/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/without_skill/run-1/grading.json +0 -88
  530. package/skills/sync-docs-workspace/iteration-2/eval-sprint-closeout/without_skill/run-1/timing.json +0 -5
  531. package/skills/sync-docs-workspace/iteration-3/benchmark.json +0 -298
  532. package/skills/sync-docs-workspace/iteration-3/benchmark.md +0 -13
  533. package/skills/sync-docs-workspace/iteration-3/eval-doc-audit/eval_metadata.json +0 -27
  534. package/skills/sync-docs-workspace/iteration-3/eval-doc-audit/with_skill/outputs/result.md +0 -125
  535. package/skills/sync-docs-workspace/iteration-3/eval-doc-audit/with_skill/run-1/grading.json +0 -97
  536. package/skills/sync-docs-workspace/iteration-3/eval-doc-audit/with_skill/run-1/timing.json +0 -5
  537. package/skills/sync-docs-workspace/iteration-3/eval-doc-audit/without_skill/outputs/result.md +0 -144
  538. package/skills/sync-docs-workspace/iteration-3/eval-doc-audit/without_skill/run-1/grading.json +0 -78
  539. package/skills/sync-docs-workspace/iteration-3/eval-doc-audit/without_skill/run-1/timing.json +0 -5
  540. package/skills/sync-docs-workspace/iteration-3/eval-fix-mode/eval_metadata.json +0 -27
  541. package/skills/sync-docs-workspace/iteration-3/eval-fix-mode/with_skill/outputs/result.md +0 -104
  542. package/skills/sync-docs-workspace/iteration-3/eval-fix-mode/with_skill/run-1/grading.json +0 -91
  543. package/skills/sync-docs-workspace/iteration-3/eval-fix-mode/with_skill/run-1/timing.json +0 -5
  544. package/skills/sync-docs-workspace/iteration-3/eval-fix-mode/without_skill/outputs/result.md +0 -79
  545. package/skills/sync-docs-workspace/iteration-3/eval-fix-mode/without_skill/run-1/grading.json +0 -82
  546. package/skills/sync-docs-workspace/iteration-3/eval-fix-mode/without_skill/run-1/timing.json +0 -5
  547. package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/eval_metadata.json +0 -27
  548. package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase1_context.json +0 -302
  549. package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase2_drift.txt +0 -33
  550. package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase3_analysis.json +0 -114
  551. package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase4_fix.txt +0 -118
  552. package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/phase5_validate.txt +0 -38
  553. package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/outputs/result.md +0 -158
  554. package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/run-1/grading.json +0 -95
  555. package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/with_skill/run-1/timing.json +0 -5
  556. package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/without_skill/outputs/result.md +0 -71
  557. package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/without_skill/run-1/grading.json +0 -90
  558. package/skills/sync-docs-workspace/iteration-3/eval-sprint-closeout/without_skill/run-1/timing.json +0 -5
  559. package/skills/test-planning/SKILL.md +0 -465
  560. package/skills/test-planning/evals/evals.json +0 -23
  561. package/skills/updating-service-skills/SKILL.md +0 -136
  562. package/skills/updating-service-skills/scripts/drift_detector.py +0 -222
  563. package/skills/using-quality-gates/SKILL.md +0 -254
  564. package/skills/using-serena-lsp/README.md +0 -8
  565. package/skills/using-serena-lsp/REFERENCE.md +0 -194
  566. package/skills/using-serena-lsp/SKILL.md +0 -82
  567. package/skills/using-service-skills/SKILL.md +0 -108
  568. package/skills/using-service-skills/scripts/cataloger.py +0 -74
  569. package/skills/using-service-skills/scripts/skill_activator.py +0 -152
  570. package/skills/using-service-skills/scripts/test_skill_activator.py +0 -58
  571. package/skills/using-tdd/SKILL.md +0 -410
  572. package/skills/using-xtrm/SKILL.md +0 -127
  573. package/skills/xt-debugging/SKILL.md +0 -149
  574. package/skills/xt-end/SKILL.md +0 -297
  575. package/skills/xt-merge/SKILL.md +0 -313
  576. /package/{config → .xtrm/config}/.env.example +0 -0
  577. /package/{config/mcp_servers_optional.json → .xtrm/config/claude.mcp.optional.json} +0 -0
  578. /package/{hooks → .xtrm/config}/hooks.json +0 -0
  579. /package/{config → .xtrm/config}/pi/auth.json.template +0 -0
  580. /package/{config → .xtrm/config}/pi/extensions/auto-session-name/index.ts +0 -0
  581. /package/{config → .xtrm/config}/pi/extensions/auto-session-name/package.json +0 -0
  582. /package/{config → .xtrm/config}/pi/extensions/auto-update/index.ts +0 -0
  583. /package/{config → .xtrm/config}/pi/extensions/auto-update/package.json +0 -0
  584. /package/{config → .xtrm/config}/pi/extensions/beads/package.json +0 -0
  585. /package/{config → .xtrm/config}/pi/extensions/compact-header/index.ts +0 -0
  586. /package/{config → .xtrm/config}/pi/extensions/compact-header/package.json +0 -0
  587. /package/{config → .xtrm/config}/pi/extensions/core/adapter.ts +0 -0
  588. /package/{config → .xtrm/config}/pi/extensions/core/guard-rules.ts +0 -0
  589. /package/{config → .xtrm/config}/pi/extensions/core/lib.ts +0 -0
  590. /package/{config → .xtrm/config}/pi/extensions/core/logger.ts +0 -0
  591. /package/{config → .xtrm/config}/pi/extensions/core/package.json +0 -0
  592. /package/{config → .xtrm/config}/pi/extensions/core/runner.ts +0 -0
  593. /package/{config → .xtrm/config}/pi/extensions/core/session-state.ts +0 -0
  594. /package/{config → .xtrm/config}/pi/extensions/custom-footer/package.json +0 -0
  595. /package/{config → .xtrm/config}/pi/extensions/custom-provider-qwen-cli/index.ts +0 -0
  596. /package/{config → .xtrm/config}/pi/extensions/custom-provider-qwen-cli/package.json +0 -0
  597. /package/{config → .xtrm/config}/pi/extensions/git-checkpoint/index.ts +0 -0
  598. /package/{config → .xtrm/config}/pi/extensions/git-checkpoint/package.json +0 -0
  599. /package/{config → .xtrm/config}/pi/extensions/lsp-bootstrap/index.ts +0 -0
  600. /package/{config → .xtrm/config}/pi/extensions/lsp-bootstrap/package.json +0 -0
  601. /package/{config → .xtrm/config}/pi/extensions/pi-serena-compact/index.ts +0 -0
  602. /package/{config → .xtrm/config}/pi/extensions/pi-serena-compact/package.json +0 -0
  603. /package/{config → .xtrm/config}/pi/extensions/quality-gates/index.ts +0 -0
  604. /package/{config → .xtrm/config}/pi/extensions/quality-gates/package.json +0 -0
  605. /package/{config → .xtrm/config}/pi/extensions/service-skills/index.ts +0 -0
  606. /package/{config → .xtrm/config}/pi/extensions/service-skills/package.json +0 -0
  607. /package/{config → .xtrm/config}/pi/extensions/session-flow/index.ts +0 -0
  608. /package/{config → .xtrm/config}/pi/extensions/session-flow/package.json +0 -0
  609. /package/{config → .xtrm/config}/pi/extensions/xtrm-loader/index.ts +0 -0
  610. /package/{config → .xtrm/config}/pi/extensions/xtrm-loader/package.json +0 -0
  611. /package/{config → .xtrm/config}/pi/extensions/xtrm-ui/format.ts +0 -0
  612. /package/{config → .xtrm/config}/pi/extensions/xtrm-ui/package.json +0 -0
  613. /package/{config → .xtrm/config}/pi/extensions/xtrm-ui/themes/pidex-dark.json +0 -0
  614. /package/{config → .xtrm/config}/pi/extensions/xtrm-ui/themes/pidex-light.json +0 -0
  615. /package/{config → .xtrm/config}/pi/models.json.template +0 -0
  616. /package/{config → .xtrm/config}/pi/pi-worktrees-settings.json +0 -0
  617. /package/{config → .xtrm/config}/pi/settings.json.template +0 -0
  618. /package/{hooks → .xtrm/hooks}/beads-claim-sync.mjs +0 -0
  619. /package/{hooks → .xtrm/hooks}/beads-compact-restore.mjs +0 -0
  620. /package/{hooks → .xtrm/hooks}/beads-compact-save.mjs +0 -0
  621. /package/{hooks → .xtrm/hooks}/beads-edit-gate.mjs +0 -0
  622. /package/{hooks → .xtrm/hooks}/beads-gate-core.mjs +0 -0
  623. /package/{hooks → .xtrm/hooks}/beads-gate-messages.mjs +0 -0
  624. /package/{hooks → .xtrm/hooks}/beads-gate-utils.mjs +0 -0
  625. /package/{hooks → .xtrm/hooks}/beads-stop-gate.mjs +0 -0
  626. /package/{hooks → .xtrm/hooks}/gitnexus/gitnexus-hook.cjs +0 -0
  627. /package/{hooks → .xtrm/hooks}/quality-check.cjs +0 -0
  628. /package/{hooks → .xtrm/hooks}/quality-check.py +0 -0
  629. /package/{hooks → .xtrm/hooks}/worktree-boundary.mjs +0 -0
  630. /package/{hooks → .xtrm/hooks}/xtrm-logger.mjs +0 -0
  631. /package/{hooks → .xtrm/hooks}/xtrm-session-logger.mjs +0 -0
  632. /package/{hooks → .xtrm/hooks}/xtrm-tool-logger.mjs +0 -0
@@ -1,1168 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * React App Quality Check Hook
4
- * Optimized for React applications with sensible defaults
5
- *
6
- * EXIT CODES:
7
- * 0 - Success (all checks passed)
8
- * 1 - General error (missing dependencies, etc.)
9
- * 2 - Quality issues found - ALL must be fixed (blocking)
10
- */
11
-
12
- const fs = require('fs').promises;
13
- const path = require('path');
14
- const crypto = require('crypto');
15
-
16
- /**
17
- * Get project root using CLAUDE_PROJECT_DIR environment variable
18
- * @returns {string} Project root directory
19
- */
20
- function getProjectRoot() {
21
- return process.env.CLAUDE_PROJECT_DIR || process.cwd();
22
- }
23
-
24
- const projectRoot = getProjectRoot();
25
-
26
- /**
27
- * Intelligent TypeScript Config Cache with checksum validation
28
- * Handles multiple tsconfig files and maps files to appropriate configs
29
- */
30
- class TypeScriptConfigCache {
31
- /**
32
- * Creates a new TypeScript config cache instance.
33
- * Loads existing cache or initializes empty cache.
34
- */
35
- constructor() {
36
- // Store cache in the hook's directory for isolation
37
- this.cacheFile = path.join(__dirname, 'tsconfig-cache.json');
38
- this.cache = { hashes: {}, mappings: {} };
39
- this.loadCache();
40
- }
41
-
42
- /**
43
- * Get config hash for cache validation
44
- * @param {string} configPath - Path to tsconfig file
45
- * @returns {string} SHA256 hash of config content
46
- */
47
- getConfigHash(configPath) {
48
- try {
49
- const content = require('fs').readFileSync(configPath, 'utf8');
50
- return crypto.createHash('sha256').update(content).digest('hex');
51
- } catch (e) {
52
- return null;
53
- }
54
- }
55
-
56
- /**
57
- * Find all tsconfig files in project
58
- * @returns {string[]} Array of tsconfig file paths
59
- */
60
- findTsConfigFiles() {
61
- const configs = [];
62
- try {
63
- // Try to use glob if available, fallback to manual search
64
- const globSync = require('glob').sync;
65
- return globSync('tsconfig*.json', { cwd: projectRoot }).map((file) =>
66
- path.join(projectRoot, file)
67
- );
68
- } catch (e) {
69
- // Fallback: manually check common config files
70
- const commonConfigs = [
71
- 'tsconfig.json',
72
- 'tsconfig.webview.json',
73
- 'tsconfig.test.json',
74
- 'tsconfig.node.json',
75
- ];
76
-
77
- for (const config of commonConfigs) {
78
- const configPath = path.join(projectRoot, config);
79
- if (require('fs').existsSync(configPath)) {
80
- configs.push(configPath);
81
- }
82
- }
83
- return configs;
84
- }
85
- }
86
-
87
- /**
88
- * Check if cache is valid by comparing config hashes
89
- * @returns {boolean} True if cache is valid
90
- */
91
- isValid() {
92
- const configFiles = this.findTsConfigFiles();
93
-
94
- // Check if we have the same number of configs
95
- if (Object.keys(this.cache.hashes).length !== configFiles.length) {
96
- return false;
97
- }
98
-
99
- // Check each config hash
100
- for (const configPath of configFiles) {
101
- const currentHash = this.getConfigHash(configPath);
102
- if (currentHash !== this.cache.hashes[configPath]) {
103
- return false;
104
- }
105
- }
106
-
107
- return true;
108
- }
109
-
110
- /**
111
- * Rebuild cache by parsing all configs and creating file mappings
112
- */
113
- rebuild() {
114
- this.cache = { hashes: {}, mappings: {} };
115
-
116
- // Process configs in priority order (most specific first)
117
- const configPriority = [
118
- 'tsconfig.webview.json', // Most specific
119
- 'tsconfig.test.json', // Test-specific
120
- 'tsconfig.json', // Base config
121
- ];
122
-
123
- configPriority.forEach((configName) => {
124
- const configPath = path.join(projectRoot, configName);
125
- if (!require('fs').existsSync(configPath)) {
126
- return;
127
- }
128
-
129
- // Store hash for validation
130
- this.cache.hashes[configPath] = this.getConfigHash(configPath);
131
-
132
- try {
133
- const configContent = require('fs').readFileSync(configPath, 'utf8');
134
- const config = JSON.parse(configContent);
135
-
136
- // Build file pattern mappings
137
- if (config.include) {
138
- config.include.forEach((pattern) => {
139
- // Only set if not already mapped by a more specific config
140
- if (!this.cache.mappings[pattern]) {
141
- this.cache.mappings[pattern] = {
142
- configPath,
143
- excludes: config.exclude || [],
144
- };
145
- }
146
- });
147
- }
148
- } catch (e) {
149
- // Skip invalid configs
150
- }
151
- });
152
-
153
- this.saveCache();
154
- }
155
-
156
- /**
157
- * Load cache from disk
158
- */
159
- loadCache() {
160
- try {
161
- const cacheContent = require('fs').readFileSync(this.cacheFile, 'utf8');
162
- this.cache = JSON.parse(cacheContent);
163
- } catch (e) {
164
- // Cache doesn't exist or is invalid, will rebuild
165
- this.cache = { hashes: {}, mappings: {} };
166
- }
167
- }
168
-
169
- /**
170
- * Save cache to disk
171
- */
172
- saveCache() {
173
- try {
174
- // Save cache directly in hook directory (directory already exists)
175
- require('fs').writeFileSync(this.cacheFile, JSON.stringify(this.cache, null, 2));
176
- } catch (e) {
177
- // Ignore cache save errors
178
- }
179
- }
180
-
181
- /**
182
- * Get appropriate tsconfig for a file
183
- * @param {string} filePath - File path to check
184
- * @returns {string} Path to appropriate tsconfig file
185
- */
186
- getTsConfigForFile(filePath) {
187
- // Ensure cache is valid
188
- if (!this.isValid()) {
189
- this.rebuild();
190
- }
191
-
192
- const relativePath = path.relative(projectRoot, filePath);
193
-
194
- // Check cached mappings first - these are from actual tsconfig includes
195
- // Sort patterns by specificity to match most specific first
196
- const sortedMappings = Object.entries(this.cache.mappings).sort(([a], [b]) => {
197
- // More specific patterns first
198
- const aSpecificity = a.split('/').length + (a.includes('**') ? 0 : 10);
199
- const bSpecificity = b.split('/').length + (b.includes('**') ? 0 : 10);
200
- return bSpecificity - aSpecificity;
201
- });
202
-
203
- for (const [pattern, mapping] of sortedMappings) {
204
- // Handle both old format (string) and new format (object with excludes)
205
- const configPath = typeof mapping === 'string' ? mapping : mapping.configPath;
206
- const excludes = typeof mapping === 'string' ? [] : mapping.excludes;
207
-
208
- if (this.matchesPattern(relativePath, pattern)) {
209
- // Check if file is excluded
210
- let isExcluded = false;
211
- for (const exclude of excludes) {
212
- if (this.matchesPattern(relativePath, exclude)) {
213
- isExcluded = true;
214
- break;
215
- }
216
- }
217
-
218
- if (!isExcluded) {
219
- return configPath;
220
- }
221
- }
222
- }
223
-
224
- // Fast heuristics for common cases not in cache
225
- // Webview files
226
- if (relativePath.includes('src/webview/') || relativePath.includes('/webview/')) {
227
- const webviewConfig = path.join(projectRoot, 'tsconfig.webview.json');
228
- if (require('fs').existsSync(webviewConfig)) {
229
- return webviewConfig;
230
- }
231
- }
232
-
233
- // Test files
234
- if (
235
- relativePath.includes('/test/') ||
236
- relativePath.includes('.test.') ||
237
- relativePath.includes('.spec.')
238
- ) {
239
- const testConfig = path.join(projectRoot, 'tsconfig.test.json');
240
- if (require('fs').existsSync(testConfig)) {
241
- return testConfig;
242
- }
243
- }
244
-
245
- // Default fallback
246
- return path.join(projectRoot, 'tsconfig.json');
247
- }
248
-
249
- /**
250
- * Simple pattern matching for file paths
251
- * @param {string} filePath - File path to test
252
- * @param {string} pattern - Glob-like pattern
253
- * @returns {boolean} True if file matches pattern
254
- */
255
- matchesPattern(filePath, pattern) {
256
- // Simple pattern matching - convert glob to regex
257
- // Handle the common patterns specially
258
- if (pattern.endsWith('/**/*')) {
259
- // For patterns like src/webview/**/* or src/protocol/**/*
260
- // Match any file under that directory
261
- const baseDir = pattern.slice(0, -5); // Remove /**/*
262
- return filePath.startsWith(baseDir);
263
- }
264
-
265
- // For other patterns, use regex conversion
266
- let regexPattern = pattern
267
- .replace(/[.+^${}()|[\]\\]/g, '\\$&') // Escape regex special chars
268
- .replace(/\*\*/g, '🌟') // Temporary placeholder for **
269
- .replace(/\*/g, '[^/]*') // * matches anything except /
270
- .replace(/🌟/g, '.*') // ** matches anything including /
271
- .replace(/\?/g, '.'); // ? matches single character
272
-
273
- const regex = new RegExp(`^${regexPattern}$`);
274
- const result = regex.test(filePath);
275
-
276
- return result;
277
- }
278
- }
279
-
280
- // Global config cache instance
281
- const tsConfigCache = new TypeScriptConfigCache();
282
-
283
- // ANSI color codes
284
- const colors = {
285
- red: '\x1b[0;31m',
286
- green: '\x1b[0;32m',
287
- yellow: '\x1b[0;33m',
288
- blue: '\x1b[0;34m',
289
- cyan: '\x1b[0;36m',
290
- reset: '\x1b[0m',
291
- };
292
-
293
- /**
294
- * Load configuration from JSON file with environment variable overrides
295
- * @returns {Object} Configuration object
296
- */
297
- function loadConfig() {
298
- let fileConfig = {};
299
-
300
- // Try to load hook-config.json
301
- try {
302
- const configPath = path.join(__dirname, 'hook-config.json');
303
- if (require('fs').existsSync(configPath)) {
304
- fileConfig = JSON.parse(require('fs').readFileSync(configPath, 'utf8'));
305
- }
306
- } catch (e) {
307
- // Config file not found or invalid, use defaults
308
- }
309
-
310
- // Build config with file settings as base, env vars as overrides
311
- return {
312
- // TypeScript settings
313
- typescriptEnabled:
314
- process.env.CLAUDE_HOOKS_TYPESCRIPT_ENABLED !== undefined
315
- ? process.env.CLAUDE_HOOKS_TYPESCRIPT_ENABLED !== 'false'
316
- : (fileConfig.typescript?.enabled ?? true),
317
-
318
- showDependencyErrors:
319
- process.env.CLAUDE_HOOKS_SHOW_DEPENDENCY_ERRORS !== undefined
320
- ? process.env.CLAUDE_HOOKS_SHOW_DEPENDENCY_ERRORS === 'true'
321
- : (fileConfig.typescript?.showDependencyErrors ?? false),
322
-
323
- // ESLint settings
324
- eslintEnabled:
325
- process.env.CLAUDE_HOOKS_ESLINT_ENABLED !== undefined
326
- ? process.env.CLAUDE_HOOKS_ESLINT_ENABLED !== 'false'
327
- : (fileConfig.eslint?.enabled ?? true),
328
-
329
- eslintAutofix:
330
- process.env.CLAUDE_HOOKS_ESLINT_AUTOFIX !== undefined
331
- ? process.env.CLAUDE_HOOKS_ESLINT_AUTOFIX === 'true'
332
- : (fileConfig.eslint?.autofix ?? false),
333
-
334
- // Prettier settings
335
- prettierEnabled:
336
- process.env.CLAUDE_HOOKS_PRETTIER_ENABLED !== undefined
337
- ? process.env.CLAUDE_HOOKS_PRETTIER_ENABLED !== 'false'
338
- : (fileConfig.prettier?.enabled ?? true),
339
-
340
- prettierAutofix:
341
- process.env.CLAUDE_HOOKS_PRETTIER_AUTOFIX !== undefined
342
- ? process.env.CLAUDE_HOOKS_PRETTIER_AUTOFIX === 'true'
343
- : (fileConfig.prettier?.autofix ?? false),
344
-
345
- // General settings
346
- autofixSilent:
347
- process.env.CLAUDE_HOOKS_AUTOFIX_SILENT !== undefined
348
- ? process.env.CLAUDE_HOOKS_AUTOFIX_SILENT === 'true'
349
- : (fileConfig.general?.autofixSilent ?? false),
350
-
351
- debug:
352
- process.env.CLAUDE_HOOKS_DEBUG !== undefined
353
- ? process.env.CLAUDE_HOOKS_DEBUG === 'true'
354
- : (fileConfig.general?.debug ?? false),
355
-
356
- // Ignore patterns
357
- ignorePatterns: fileConfig.ignore?.patterns || [],
358
-
359
- // Store the full config for rule access
360
- _fileConfig: fileConfig,
361
- };
362
- }
363
-
364
- /**
365
- * Hook Configuration
366
- *
367
- * Configuration is loaded from (in order of precedence):
368
- * 1. Environment variables (highest priority)
369
- * 2. .claude/hooks/config.json file
370
- * 3. Built-in defaults
371
- */
372
- const config = loadConfig();
373
-
374
- // Logging functions - define before using
375
- const log = {
376
- info: (msg) => console.error(`${colors.blue}[INFO]${colors.reset} ${msg}`),
377
- error: (msg) => console.error(`${colors.red}[ERROR]${colors.reset} ${msg}`),
378
- success: (msg) => console.error(`${colors.green}[OK]${colors.reset} ${msg}`),
379
- warning: (msg) => console.error(`${colors.yellow}[WARN]${colors.reset} ${msg}`),
380
- debug: (msg) => {
381
- if (config.debug) {
382
- console.error(`${colors.cyan}[DEBUG]${colors.reset} ${msg}`);
383
- }
384
- },
385
- };
386
-
387
- // Note: errors and autofixes are tracked per QualityChecker instance
388
-
389
- // Try to load modules, but make them optional
390
- let ESLint, prettier, ts;
391
-
392
- try {
393
- ({ ESLint } = require(path.join(projectRoot, 'node_modules', 'eslint')));
394
- } catch (e) {
395
- log.debug('ESLint not found in project - will skip ESLint checks');
396
- }
397
-
398
- try {
399
- prettier = require(path.join(projectRoot, 'node_modules', 'prettier'));
400
- } catch (e) {
401
- log.debug('Prettier not found in project - will skip Prettier checks');
402
- }
403
-
404
- try {
405
- ts = require(path.join(projectRoot, 'node_modules', 'typescript'));
406
- } catch (e) {
407
- log.debug('TypeScript not found in project - will skip TypeScript checks');
408
- }
409
-
410
- /**
411
- * Quality checker for a single file.
412
- * Runs TypeScript, ESLint, and Prettier checks with optional auto-fixing.
413
- */
414
- class QualityChecker {
415
- /**
416
- * Creates a new QualityChecker instance.
417
- * @param {string} filePath - Path to file to check
418
- */
419
- constructor(filePath) {
420
- this.filePath = filePath;
421
- this.fileType = this.detectFileType(filePath);
422
- this.errors = [];
423
- this.autofixes = [];
424
- }
425
-
426
- /**
427
- * Detect file type from path
428
- * @param {string} filePath - File path
429
- * @returns {string} File type
430
- */
431
- detectFileType(filePath) {
432
- if (/\.(test|spec)\.(ts|tsx|js|jsx)$/.test(filePath)) {
433
- return 'test';
434
- }
435
- if (/\/store\/|\/slices\/|\/reducers\//.test(filePath)) {
436
- return 'redux';
437
- }
438
- if (/\/components\/.*\.(tsx|jsx)$/.test(filePath)) {
439
- return 'component';
440
- }
441
- if (/\.(ts|tsx)$/.test(filePath)) {
442
- return 'typescript';
443
- }
444
- if (/\.(js|jsx)$/.test(filePath)) {
445
- return 'javascript';
446
- }
447
- return 'unknown';
448
- }
449
-
450
- /**
451
- * Run all quality checks
452
- * @returns {Promise<{errors: string[], autofixes: string[]}>} Check results
453
- */
454
- async checkAll() {
455
- // This should never happen now since we filter out non-source files earlier,
456
- // but keeping for consistency with shell version
457
- if (this.fileType === 'unknown') {
458
- log.info('Unknown file type, skipping detailed checks');
459
- return { errors: [], autofixes: [] };
460
- }
461
-
462
- // Run all checks in parallel for speed
463
- const checkPromises = [];
464
-
465
- if (config.typescriptEnabled) {
466
- checkPromises.push(this.checkTypeScript());
467
- }
468
-
469
- if (config.eslintEnabled) {
470
- checkPromises.push(this.checkESLint());
471
- }
472
-
473
- if (config.prettierEnabled) {
474
- checkPromises.push(this.checkPrettier());
475
- }
476
-
477
- checkPromises.push(this.checkCommonIssues());
478
-
479
- await Promise.all(checkPromises);
480
-
481
- // Check for related tests (not critical, so separate)
482
- await this.suggestRelatedTests();
483
-
484
- return {
485
- errors: this.errors,
486
- autofixes: this.autofixes,
487
- };
488
- }
489
-
490
- /**
491
- * Get file dependencies by parsing imports
492
- * @param {string} filePath - File to analyze
493
- * @returns {string[]} Array of file paths including dependencies
494
- */
495
- getFileDependencies(filePath) {
496
- const dependencies = new Set([filePath]);
497
-
498
- try {
499
- const content = require('fs').readFileSync(filePath, 'utf8');
500
- const importRegex = /import\s+.*?\s+from\s+['"]([^'"]+)['"]/g;
501
- let match;
502
-
503
- while ((match = importRegex.exec(content)) !== null) {
504
- const importPath = match[1];
505
-
506
- // Only include relative imports (project files)
507
- if (importPath.startsWith('.')) {
508
- const resolvedPath = this.resolveImportPath(filePath, importPath);
509
- if (resolvedPath && require('fs').existsSync(resolvedPath)) {
510
- dependencies.add(resolvedPath);
511
- }
512
- }
513
- }
514
- } catch (e) {
515
- // If we can't parse imports, just use the original file
516
- log.debug(`Could not parse imports for ${filePath}: ${e.message}`);
517
- }
518
-
519
- return Array.from(dependencies);
520
- }
521
-
522
- /**
523
- * Resolve relative import path to absolute path
524
- * @param {string} fromFile - File doing the import
525
- * @param {string} importPath - Relative import path
526
- * @returns {string|null} Absolute file path or null if not found
527
- */
528
- resolveImportPath(fromFile, importPath) {
529
- const dir = path.dirname(fromFile);
530
- const resolved = path.resolve(dir, importPath);
531
-
532
- // Try common extensions
533
- const extensions = ['.ts', '.tsx', '.js', '.jsx'];
534
- for (const ext of extensions) {
535
- const fullPath = resolved + ext;
536
- if (require('fs').existsSync(fullPath)) {
537
- return fullPath;
538
- }
539
- }
540
-
541
- // Try index files
542
- for (const ext of extensions) {
543
- const indexPath = path.join(resolved, 'index' + ext);
544
- if (require('fs').existsSync(indexPath)) {
545
- return indexPath;
546
- }
547
- }
548
-
549
- return null;
550
- }
551
-
552
- /**
553
- * Check TypeScript compilation
554
- * @returns {Promise<void>}
555
- */
556
- async checkTypeScript() {
557
- if (!config.typescriptEnabled || !ts) {
558
- return;
559
- }
560
-
561
- // Skip TypeScript checking for JavaScript files in hook directories
562
- if (this.filePath.endsWith('.js') && this.filePath.includes('.claude/hooks/')) {
563
- log.debug('Skipping TypeScript check for JavaScript hook file');
564
- return;
565
- }
566
-
567
- log.info('Running TypeScript compilation check...');
568
-
569
- try {
570
- // Get intelligent config for this file
571
- const configPath = tsConfigCache.getTsConfigForFile(this.filePath);
572
-
573
- if (!require('fs').existsSync(configPath)) {
574
- log.debug(`No TypeScript config found: ${configPath}`);
575
- return;
576
- }
577
-
578
- log.debug(
579
- `Using TypeScript config: ${path.basename(configPath)} for ${path.relative(projectRoot, this.filePath)}`
580
- );
581
-
582
- const configFile = ts.readConfigFile(configPath, ts.sys.readFile);
583
- const parsedConfig = ts.parseJsonConfigFileContent(
584
- configFile.config,
585
- ts.sys,
586
- path.dirname(configPath)
587
- );
588
-
589
- // Only check the edited file, not its dependencies
590
- // Dependencies will be type-checked with their own appropriate configs
591
- log.debug(`TypeScript checking edited file only`);
592
-
593
- // Create program with just the edited file
594
- const program = ts.createProgram([this.filePath], parsedConfig.options);
595
- const diagnostics = ts.getPreEmitDiagnostics(program);
596
-
597
- // Group diagnostics by file
598
- const diagnosticsByFile = new Map();
599
- diagnostics.forEach((d) => {
600
- if (d.file) {
601
- const fileName = d.file.fileName;
602
- if (!diagnosticsByFile.has(fileName)) {
603
- diagnosticsByFile.set(fileName, []);
604
- }
605
- diagnosticsByFile.get(fileName).push(d);
606
- }
607
- });
608
-
609
- // Report edited file first
610
- const editedFileDiagnostics = diagnosticsByFile.get(this.filePath) || [];
611
- if (editedFileDiagnostics.length > 0) {
612
- this.errors.push(`TypeScript errors in edited file (using ${path.basename(configPath)})`);
613
- editedFileDiagnostics.forEach((diagnostic) => {
614
- const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
615
- const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(
616
- diagnostic.start
617
- );
618
- console.error(
619
- ` ❌ ${diagnostic.file.fileName}:${line + 1}:${character + 1} - ${message}`
620
- );
621
- });
622
- }
623
-
624
- // Report dependencies separately (as warnings, not errors) - only if enabled
625
- if (config.showDependencyErrors) {
626
- let hasDepErrors = false;
627
- diagnosticsByFile.forEach((diags, fileName) => {
628
- if (fileName !== this.filePath) {
629
- if (!hasDepErrors) {
630
- console.error('\n[DEPENDENCY ERRORS] Files imported by your edited file:');
631
- hasDepErrors = true;
632
- }
633
- console.error(` ⚠️ ${fileName}:`);
634
- diags.forEach((diagnostic) => {
635
- const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
636
- const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(
637
- diagnostic.start
638
- );
639
- console.error(` Line ${line + 1}:${character + 1} - ${message}`);
640
- });
641
- }
642
- });
643
- }
644
-
645
- if (diagnostics.length === 0) {
646
- log.success('TypeScript compilation passed');
647
- }
648
- } catch (error) {
649
- log.debug(`TypeScript check error: ${error.message}`);
650
- }
651
- }
652
-
653
- /**
654
- * Check ESLint rules
655
- * @returns {Promise<void>}
656
- */
657
- async checkESLint() {
658
- if (!config.eslintEnabled || !ESLint) {
659
- return;
660
- }
661
-
662
- log.info('Running ESLint...');
663
-
664
- try {
665
- const eslint = new ESLint({
666
- fix: config.eslintAutofix,
667
- cwd: projectRoot,
668
- });
669
-
670
- const results = await eslint.lintFiles([this.filePath]);
671
- const result = results[0];
672
-
673
- if (result.errorCount > 0 || result.warningCount > 0) {
674
- if (config.eslintAutofix) {
675
- log.warning('ESLint issues found, attempting auto-fix...');
676
-
677
- // Write the fixed output
678
- if (result.output) {
679
- await fs.writeFile(this.filePath, result.output);
680
-
681
- // Re-lint to see if issues remain
682
- const resultsAfterFix = await eslint.lintFiles([this.filePath]);
683
- const resultAfterFix = resultsAfterFix[0];
684
-
685
- if (resultAfterFix.errorCount === 0 && resultAfterFix.warningCount === 0) {
686
- log.success('ESLint auto-fixed all issues!');
687
- if (config.autofixSilent) {
688
- this.autofixes.push('ESLint auto-fixed formatting/style issues');
689
- } else {
690
- this.errors.push('ESLint issues were auto-fixed - verify the changes');
691
- }
692
- } else {
693
- this.errors.push(
694
- `ESLint found issues that couldn't be auto-fixed in ${this.filePath}`
695
- );
696
- const formatter = await eslint.loadFormatter('stylish');
697
- const output = formatter.format(resultsAfterFix);
698
- console.error(output);
699
- }
700
- } else {
701
- this.errors.push(`ESLint found issues in ${this.filePath}`);
702
- const formatter = await eslint.loadFormatter('stylish');
703
- const output = formatter.format(results);
704
- console.error(output);
705
- }
706
- } else {
707
- this.errors.push(`ESLint found issues in ${this.filePath}`);
708
- const formatter = await eslint.loadFormatter('stylish');
709
- const output = formatter.format(results);
710
- console.error(output);
711
- }
712
- } else {
713
- log.success('ESLint passed');
714
- }
715
- } catch (error) {
716
- log.debug(`ESLint check error: ${error.message}`);
717
- }
718
- }
719
-
720
- /**
721
- * Check Prettier formatting
722
- * @returns {Promise<void>}
723
- */
724
- async checkPrettier() {
725
- if (!config.prettierEnabled || !prettier) {
726
- return;
727
- }
728
-
729
- log.info('Running Prettier check...');
730
-
731
- try {
732
- const fileContent = await fs.readFile(this.filePath, 'utf8');
733
- const prettierConfig = await prettier.resolveConfig(this.filePath);
734
-
735
- const isFormatted = await prettier.check(fileContent, {
736
- ...prettierConfig,
737
- filepath: this.filePath,
738
- });
739
-
740
- if (!isFormatted) {
741
- if (config.prettierAutofix) {
742
- log.warning('Prettier formatting issues found, auto-fixing...');
743
-
744
- const formatted = await prettier.format(fileContent, {
745
- ...prettierConfig,
746
- filepath: this.filePath,
747
- });
748
-
749
- await fs.writeFile(this.filePath, formatted);
750
- log.success('Prettier auto-formatted the file!');
751
-
752
- if (config.autofixSilent) {
753
- this.autofixes.push('Prettier auto-formatted the file');
754
- } else {
755
- this.errors.push('Prettier formatting was auto-fixed - verify the changes');
756
- }
757
- } else {
758
- this.errors.push(`Prettier formatting issues in ${this.filePath}`);
759
- console.error('Run prettier --write to fix');
760
- }
761
- } else {
762
- log.success('Prettier formatting correct');
763
- }
764
- } catch (error) {
765
- log.debug(`Prettier check error: ${error.message}`);
766
- }
767
- }
768
-
769
- /**
770
- * Check for common code issues
771
- * @returns {Promise<void>}
772
- */
773
- async checkCommonIssues() {
774
- log.info('Checking for common issues...');
775
-
776
- try {
777
- const content = await fs.readFile(this.filePath, 'utf8');
778
- const lines = content.split('\n');
779
- let foundIssues = false;
780
-
781
- // Check for 'as any' in TypeScript files
782
- const asAnyRule = config._fileConfig.rules?.asAny || {};
783
- if (
784
- (this.fileType === 'typescript' || this.fileType === 'component') &&
785
- asAnyRule.enabled !== false
786
- ) {
787
- lines.forEach((line, index) => {
788
- if (line.includes('as any')) {
789
- const severity = asAnyRule.severity || 'error';
790
- const message =
791
- asAnyRule.message || 'Prefer proper types or "as unknown" for type assertions';
792
-
793
- if (severity === 'error') {
794
- this.errors.push(`Found 'as any' usage in ${this.filePath} - ${message}`);
795
- console.error(` Line ${index + 1}: ${line.trim()}`);
796
- foundIssues = true;
797
- } else {
798
- // Warning level - just warn, don't block
799
- log.warning(`'as any' usage at line ${index + 1}: ${message}`);
800
- }
801
- }
802
- });
803
- }
804
-
805
- // Check for console statements based on React app rules
806
- const consoleRule = config._fileConfig.rules?.console || {};
807
- let allowConsole = false;
808
-
809
- // Check if console is allowed in this file
810
- if (consoleRule.enabled === false) {
811
- allowConsole = true;
812
- } else {
813
- // Check allowed paths
814
- const allowedPaths = consoleRule.allowIn?.paths || [];
815
- if (allowedPaths.some((path) => this.filePath.includes(path))) {
816
- allowConsole = true;
817
- }
818
-
819
- // Check allowed file types
820
- const allowedFileTypes = consoleRule.allowIn?.fileTypes || [];
821
- if (allowedFileTypes.includes(this.fileType)) {
822
- allowConsole = true;
823
- }
824
-
825
- // Check allowed patterns
826
- const allowedPatterns = consoleRule.allowIn?.patterns || [];
827
- const fileName = path.basename(this.filePath);
828
- if (
829
- allowedPatterns.some((pattern) => {
830
- const regex = new RegExp(pattern.replace(/\*/g, '.*'));
831
- return regex.test(fileName);
832
- })
833
- ) {
834
- allowConsole = true;
835
- }
836
- }
837
-
838
- // For React apps, console is generally allowed but shows as info
839
- if (!allowConsole && consoleRule.enabled !== false) {
840
- lines.forEach((line, index) => {
841
- if (/console\./.test(line)) {
842
- const severity = consoleRule.severity || 'info';
843
- const message = consoleRule.message || 'Consider using a logging library';
844
-
845
- if (severity === 'error') {
846
- this.errors.push(`Found console statements in ${this.filePath} - ${message}`);
847
- console.error(` Line ${index + 1}: ${line.trim()}`);
848
- foundIssues = true;
849
- } else {
850
- // Info level - just warn, don't block
851
- log.warning(`Console usage at line ${index + 1}: ${message}`);
852
- }
853
- }
854
- });
855
- }
856
-
857
- // Check for TODO/FIXME comments
858
- lines.forEach((line, index) => {
859
- if (/TODO|FIXME/.test(line)) {
860
- log.warning(`Found TODO/FIXME comment at line ${index + 1}`);
861
- }
862
- });
863
-
864
- if (!foundIssues) {
865
- log.success('No common issues found');
866
- }
867
- } catch (error) {
868
- log.debug(`Common issues check error: ${error.message}`);
869
- }
870
- }
871
-
872
- /**
873
- * Suggest related test files
874
- * @returns {Promise<void>}
875
- */
876
- async suggestRelatedTests() {
877
- // Skip for test files
878
- if (this.fileType === 'test') {
879
- return;
880
- }
881
-
882
- const baseName = this.filePath.replace(/\.[^.]+$/, '');
883
- const testExtensions = ['test.ts', 'test.tsx', 'spec.ts', 'spec.tsx'];
884
- let hasTests = false;
885
-
886
- for (const ext of testExtensions) {
887
- try {
888
- await fs.access(`${baseName}.${ext}`);
889
- hasTests = true;
890
- log.warning(`💡 Related test found: ${path.basename(baseName)}.${ext}`);
891
- log.warning(' Consider running the tests to ensure nothing broke');
892
- break;
893
- } catch {
894
- // File doesn't exist, continue
895
- }
896
- }
897
-
898
- if (!hasTests) {
899
- // Check __tests__ directory
900
- const dir = path.dirname(this.filePath);
901
- const fileName = path.basename(this.filePath);
902
- const baseFileName = fileName.replace(/\.[^.]+$/, '');
903
-
904
- for (const ext of testExtensions) {
905
- try {
906
- await fs.access(path.join(dir, '__tests__', `${baseFileName}.${ext}`));
907
- hasTests = true;
908
- log.warning(`💡 Related test found: __tests__/${baseFileName}.${ext}`);
909
- log.warning(' Consider running the tests to ensure nothing broke');
910
- break;
911
- } catch {
912
- // File doesn't exist, continue
913
- }
914
- }
915
- }
916
-
917
- if (!hasTests) {
918
- log.warning(`💡 No test file found for ${path.basename(this.filePath)}`);
919
- log.warning(' Consider adding tests for better code quality');
920
- }
921
-
922
- // Special reminders for specific file types
923
- if (/\/state\/slices\//.test(this.filePath)) {
924
- log.warning('💡 Redux state file! Consider testing state updates');
925
- } else if (/\/components\//.test(this.filePath)) {
926
- log.warning('💡 Component file! Consider testing UI behavior');
927
- } else if (/\/services\//.test(this.filePath)) {
928
- log.warning('💡 Service file! Consider testing business logic');
929
- }
930
- }
931
- }
932
-
933
- /**
934
- * Parse JSON input from stdin
935
- * @returns {Promise<Object>} Parsed JSON object
936
- */
937
- async function parseJsonInput() {
938
- let inputData = '';
939
-
940
- // Read from stdin
941
- for await (const chunk of process.stdin) {
942
- inputData += chunk;
943
- }
944
-
945
- if (!inputData.trim()) {
946
- log.warning('No JSON input provided. This hook expects JSON input from Claude Code.');
947
- log.info(
948
- 'For testing, provide JSON like: echo \'{"tool_name":"Edit","tool_input":{"file_path":"/path/to/file.ts"}}\' | node hook.js'
949
- );
950
- console.error(`\n${colors.yellow}👉 Hook executed but no input to process.${colors.reset}`);
951
- process.exit(0);
952
- }
953
-
954
- try {
955
- return JSON.parse(inputData);
956
- } catch (error) {
957
- log.error(`Failed to parse JSON input: ${error.message}`);
958
- log.debug(`Input was: ${inputData}`);
959
- process.exit(1);
960
- }
961
- }
962
-
963
- /**
964
- * Extract file path from tool input
965
- * @param {Object} input - Tool input object
966
- * @returns {string|null} File path or null
967
- */
968
- function extractFilePath(input) {
969
- const { tool_input } = input;
970
- if (!tool_input) {
971
- return null;
972
- }
973
-
974
- return tool_input.file_path || tool_input.path || tool_input.notebook_path || null;
975
- }
976
-
977
- /**
978
- * Check if file exists
979
- * @param {string} filePath - Path to check
980
- * @returns {Promise<boolean>} True if exists
981
- */
982
- async function fileExists(filePath) {
983
- try {
984
- await fs.access(filePath);
985
- return true;
986
- } catch {
987
- return false;
988
- }
989
- }
990
-
991
- /**
992
- * Check if file is a source file
993
- * @param {string} filePath - Path to check
994
- * @returns {boolean} True if source file
995
- */
996
- function isSourceFile(filePath) {
997
- return /\.(ts|tsx|js|jsx)$/.test(filePath);
998
- }
999
-
1000
- /**
1001
- * Print summary of errors and autofixes
1002
- * @param {string[]} errors - List of errors
1003
- * @param {string[]} autofixes - List of autofixes
1004
- */
1005
- function printSummary(errors, autofixes) {
1006
- // Show auto-fixes if any
1007
- if (autofixes.length > 0) {
1008
- console.error(`\n${colors.blue}═══ Auto-fixes Applied ═══${colors.reset}`);
1009
- autofixes.forEach((fix) => {
1010
- console.error(`${colors.green}✨${colors.reset} ${fix}`);
1011
- });
1012
- console.error(
1013
- `${colors.green}Automatically fixed ${autofixes.length} issue(s) for you!${colors.reset}`
1014
- );
1015
- }
1016
-
1017
- // Show errors if any
1018
- if (errors.length > 0) {
1019
- console.error(`\n${colors.blue}═══ Quality Check Summary ═══${colors.reset}`);
1020
- errors.forEach((error) => {
1021
- console.error(`${colors.red}❌${colors.reset} ${error}`);
1022
- });
1023
-
1024
- console.error(
1025
- `\n${colors.red}Found ${errors.length} issue(s) that MUST be fixed!${colors.reset}`
1026
- );
1027
- console.error(`${colors.red}════════════════════════════════════════════${colors.reset}`);
1028
- console.error(`${colors.red}❌ ALL ISSUES ARE BLOCKING ❌${colors.reset}`);
1029
- console.error(`${colors.red}════════════════════════════════════════════${colors.reset}`);
1030
- console.error(`${colors.red}Fix EVERYTHING above until all checks are ✅ GREEN${colors.reset}`);
1031
- }
1032
- }
1033
-
1034
- /**
1035
- * Main entry point
1036
- * @returns {Promise<void>}
1037
- */
1038
- async function main() {
1039
- // Show header with version
1040
- const hookVersion = config._fileConfig.version || '1.0.0';
1041
- console.error('');
1042
- console.error(`⚛️ React App Quality Check v${hookVersion} - Starting...`);
1043
- console.error('────────────────────────────────────────────');
1044
-
1045
- // Debug: show loaded configuration
1046
- log.debug(`Loaded config: ${JSON.stringify(config, null, 2)}`);
1047
-
1048
- // Parse input
1049
- const input = await parseJsonInput();
1050
- const filePath = extractFilePath(input);
1051
-
1052
- if (!filePath) {
1053
- log.warning('No file path found in JSON input. Tool might not be file-related.');
1054
- log.debug(`JSON input was: ${JSON.stringify(input)}`);
1055
- console.error(
1056
- `\n${colors.yellow}👉 No file to check - tool may not be file-related.${colors.reset}`
1057
- );
1058
- process.exit(0);
1059
- }
1060
-
1061
- // Check if file exists
1062
- if (!(await fileExists(filePath))) {
1063
- log.info(`File does not exist: ${filePath} (may have been deleted)`);
1064
- console.error(`\n${colors.yellow}👉 File skipped - doesn't exist.${colors.reset}`);
1065
- process.exit(0);
1066
- }
1067
-
1068
- // For non-source files, exit successfully without checks (matching shell behavior)
1069
- if (!isSourceFile(filePath)) {
1070
- log.info(`Skipping non-source file: ${filePath}`);
1071
- console.error(`\n${colors.yellow}👉 File skipped - not a source file.${colors.reset}`);
1072
- console.error(
1073
- `\n${colors.green}✅ No checks needed for ${path.basename(filePath)}${colors.reset}`
1074
- );
1075
- process.exit(0);
1076
- }
1077
-
1078
- // Update header with file name
1079
- console.error('');
1080
- console.error(`🔍 Validating: ${path.basename(filePath)}`);
1081
- console.error('────────────────────────────────────────────');
1082
- log.info(`Checking: ${filePath}`);
1083
-
1084
- // Run quality checks
1085
- const checker = new QualityChecker(filePath);
1086
- const { errors, autofixes } = await checker.checkAll();
1087
-
1088
- // Print summary
1089
- printSummary(errors, autofixes);
1090
-
1091
- // Separate edited file errors from other issues
1092
- const editedFileErrors = errors.filter(
1093
- (e) =>
1094
- e.includes('edited file') ||
1095
- e.includes('ESLint found issues') ||
1096
- e.includes('Prettier formatting issues') ||
1097
- e.includes('console statements') ||
1098
- e.includes("'as any' usage") ||
1099
- e.includes('were auto-fixed')
1100
- );
1101
-
1102
- const dependencyWarnings = errors.filter((e) => !editedFileErrors.includes(e));
1103
-
1104
- // Exit with appropriate code
1105
- if (editedFileErrors.length > 0) {
1106
- // Critical - blocks immediately
1107
- console.error(`\n${colors.red}🛑 FAILED - Fix issues in your edited file! 🛑${colors.reset}`);
1108
- console.error(`${colors.cyan}💡 CLAUDE.md CHECK:${colors.reset}`);
1109
- console.error(
1110
- `${colors.cyan} → What CLAUDE.md pattern would have prevented this?${colors.reset}`
1111
- );
1112
- console.error(`${colors.cyan} → Are you following JSDoc batching strategy?${colors.reset}`);
1113
- console.error(`${colors.yellow}📋 NEXT STEPS:${colors.reset}`);
1114
- console.error(`${colors.yellow} 1. Fix the issues listed above${colors.reset}`);
1115
- console.error(`${colors.yellow} 2. The hook will run again automatically${colors.reset}`);
1116
- console.error(
1117
- `${colors.yellow} 3. Continue with your original task once all checks pass${colors.reset}`
1118
- );
1119
- process.exit(2);
1120
- } else if (dependencyWarnings.length > 0) {
1121
- // Warning - shows but doesn't block
1122
- console.error(`\n${colors.yellow}⚠️ WARNING - Dependency issues found${colors.reset}`);
1123
- console.error(
1124
- `${colors.yellow}These won't block your progress but should be addressed${colors.reset}`
1125
- );
1126
- console.error(
1127
- `\n${colors.green}✅ Quality check passed for ${path.basename(filePath)}${colors.reset}`
1128
- );
1129
-
1130
- if (autofixes.length > 0 && config.autofixSilent) {
1131
- console.error(
1132
- `\n${colors.yellow}👉 File quality verified. Auto-fixes applied. Continue with your task.${colors.reset}`
1133
- );
1134
- } else {
1135
- console.error(
1136
- `\n${colors.yellow}👉 File quality verified. Continue with your task.${colors.reset}`
1137
- );
1138
- }
1139
- process.exit(0); // Don't block on dependency issues
1140
- } else {
1141
- console.error(
1142
- `\n${colors.green}✅ Quality check passed for ${path.basename(filePath)}${colors.reset}`
1143
- );
1144
-
1145
- if (autofixes.length > 0 && config.autofixSilent) {
1146
- console.error(
1147
- `\n${colors.yellow}👉 File quality verified. Auto-fixes applied. Continue with your task.${colors.reset}`
1148
- );
1149
- } else {
1150
- console.error(
1151
- `\n${colors.yellow}👉 File quality verified. Continue with your task.${colors.reset}`
1152
- );
1153
- }
1154
- process.exit(0);
1155
- }
1156
- }
1157
-
1158
- // Handle errors
1159
- process.on('unhandledRejection', (error) => {
1160
- log.error(`Unhandled error: ${error.message}`);
1161
- process.exit(1);
1162
- });
1163
-
1164
- // Run main
1165
- main().catch((error) => {
1166
- log.error(`Fatal error: ${error.message}`);
1167
- process.exit(1);
1168
- });