@pennyfarthing/core 11.2.0 → 11.2.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 (403) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -1
  3. package/packages/core/dist/cli/commands/doctor.d.ts.map +1 -1
  4. package/packages/core/dist/cli/commands/doctor.js +381 -66
  5. package/packages/core/dist/cli/commands/doctor.js.map +1 -1
  6. package/packages/core/dist/cli/commands/init.js +4 -4
  7. package/packages/core/dist/cli/commands/init.js.map +1 -1
  8. package/packages/core/dist/cli/commands/update.d.ts.map +1 -1
  9. package/packages/core/dist/cli/commands/update.js +4 -5
  10. package/packages/core/dist/cli/commands/update.js.map +1 -1
  11. package/packages/core/dist/cli/utils/constants.d.ts +3 -8
  12. package/packages/core/dist/cli/utils/constants.d.ts.map +1 -1
  13. package/packages/core/dist/cli/utils/constants.js +3 -4
  14. package/packages/core/dist/cli/utils/constants.js.map +1 -1
  15. package/packages/core/dist/cli/utils/settings.d.ts +11 -0
  16. package/packages/core/dist/cli/utils/settings.d.ts.map +1 -1
  17. package/packages/core/dist/cli/utils/settings.js +65 -29
  18. package/packages/core/dist/cli/utils/settings.js.map +1 -1
  19. package/packages/core/dist/cli/utils/symlinks.js +16 -16
  20. package/packages/core/dist/cli/utils/symlinks.js.map +1 -1
  21. package/packages/core/dist/consultation/tandem-metrics.d.ts +91 -0
  22. package/packages/core/dist/consultation/tandem-metrics.d.ts.map +1 -0
  23. package/packages/core/dist/consultation/tandem-metrics.js +131 -0
  24. package/packages/core/dist/consultation/tandem-metrics.js.map +1 -0
  25. package/packages/core/dist/consultation/tandem-metrics.test.d.ts +18 -0
  26. package/packages/core/dist/consultation/tandem-metrics.test.d.ts.map +1 -0
  27. package/packages/core/dist/consultation/tandem-metrics.test.js +457 -0
  28. package/packages/core/dist/consultation/tandem-metrics.test.js.map +1 -0
  29. package/packages/core/dist/public/js/react/react.js +14 -14
  30. package/packages/core/dist/scripts/benchmark-integration.d.ts +182 -0
  31. package/packages/core/dist/scripts/benchmark-integration.d.ts.map +1 -0
  32. package/packages/core/dist/scripts/benchmark-integration.js +691 -0
  33. package/packages/core/dist/scripts/benchmark-integration.js.map +1 -0
  34. package/packages/core/dist/scripts/job-fair-aggregator.d.ts +150 -0
  35. package/packages/core/dist/scripts/job-fair-aggregator.d.ts.map +1 -0
  36. package/packages/core/dist/scripts/job-fair-aggregator.js +547 -0
  37. package/packages/core/dist/scripts/job-fair-aggregator.js.map +1 -0
  38. package/packages/core/dist/server/api/agent-load.js +1 -1
  39. package/packages/core/dist/server/api/agent-load.js.map +1 -1
  40. package/packages/core/dist/server/server.d.ts +0 -3
  41. package/packages/core/dist/server/server.d.ts.map +1 -1
  42. package/packages/core/dist/server/server.js +3 -37
  43. package/packages/core/dist/server/server.js.map +1 -1
  44. package/packages/core/dist/server/server.test.d.ts +1 -1
  45. package/packages/core/dist/server/server.test.js +12 -23
  46. package/packages/core/dist/server/server.test.js.map +1 -1
  47. package/packages/core/dist/shared/capabilities.d.ts +88 -0
  48. package/packages/core/dist/shared/capabilities.d.ts.map +1 -0
  49. package/packages/core/dist/shared/capabilities.js +133 -0
  50. package/packages/core/dist/shared/capabilities.js.map +1 -0
  51. package/packages/core/dist/shared/capabilities.test.d.ts +2 -0
  52. package/packages/core/dist/shared/capabilities.test.d.ts.map +1 -0
  53. package/packages/core/dist/shared/capabilities.test.js +217 -0
  54. package/packages/core/dist/shared/capabilities.test.js.map +1 -0
  55. package/packages/core/dist/shared/spawn-prompt.d.ts +47 -0
  56. package/packages/core/dist/shared/spawn-prompt.d.ts.map +1 -0
  57. package/packages/core/dist/shared/spawn-prompt.js +82 -0
  58. package/packages/core/dist/shared/spawn-prompt.js.map +1 -0
  59. package/packages/core/dist/shared/spawn-prompt.test.d.ts +2 -0
  60. package/packages/core/dist/shared/spawn-prompt.test.d.ts.map +1 -0
  61. package/packages/core/dist/shared/spawn-prompt.test.js +251 -0
  62. package/packages/core/dist/shared/spawn-prompt.test.js.map +1 -0
  63. package/packages/core/dist/workflow/tandem-workflow-templates.test.d.ts +18 -0
  64. package/packages/core/dist/workflow/tandem-workflow-templates.test.d.ts.map +1 -0
  65. package/packages/core/dist/workflow/tandem-workflow-templates.test.js +434 -0
  66. package/packages/core/dist/workflow/tandem-workflow-templates.test.js.map +1 -0
  67. package/packages/core/dist/workflow/workflow-schema.d.ts +32 -0
  68. package/packages/core/dist/workflow/workflow-schema.d.ts.map +1 -1
  69. package/packages/core/dist/workflow/workflow-schema.js +120 -0
  70. package/packages/core/dist/workflow/workflow-schema.js.map +1 -1
  71. package/packages/core/dist/workflow/workflow-schema.test.d.ts.map +1 -1
  72. package/packages/core/dist/workflow/workflow-schema.test.js +570 -1
  73. package/packages/core/dist/workflow/workflow-schema.test.js.map +1 -1
  74. package/pennyfarthing-dist/agents/dev.md +6 -10
  75. package/pennyfarthing-dist/agents/reviewer.md +8 -2
  76. package/pennyfarthing-dist/agents/sm-finish.md +18 -1
  77. package/pennyfarthing-dist/commands/pf-git.md +4 -2
  78. package/pennyfarthing-dist/gates/approval.md +63 -0
  79. package/pennyfarthing-dist/gates/confidence-sm.md +71 -0
  80. package/pennyfarthing-dist/gates/context-ok.md +56 -0
  81. package/pennyfarthing-dist/gates/evaluations/confidence-sm.md +54 -0
  82. package/pennyfarthing-dist/gates/quality-pass.md +67 -0
  83. package/pennyfarthing-dist/gates/tests-fail.md +84 -0
  84. package/pennyfarthing-dist/gates/tests-pass.md +79 -0
  85. package/pennyfarthing-dist/guides/agent-behavior.md +23 -19
  86. package/pennyfarthing-dist/guides/bell-mode.md +1 -1
  87. package/pennyfarthing-dist/guides/hooks.md +28 -28
  88. package/pennyfarthing-dist/guides/reflector.md +1 -1
  89. package/pennyfarthing-dist/guides/tandem-protocol.md +3 -3
  90. package/pennyfarthing-dist/scripts/core/check-context.sh +2 -0
  91. package/pennyfarthing-dist/scripts/core/phase-check-start.sh +5 -87
  92. package/pennyfarthing-dist/scripts/hooks/README.md +5 -5
  93. package/pennyfarthing-dist/scripts/hooks/__pycache__/question_reflector_check.cpython-314.pyc +0 -0
  94. package/pennyfarthing-dist/scripts/hooks/bell-mode-hook.sh +4 -183
  95. package/pennyfarthing-dist/scripts/hooks/context-circuit-breaker.sh +4 -95
  96. package/pennyfarthing-dist/scripts/hooks/context-warning.sh +4 -65
  97. package/pennyfarthing-dist/scripts/hooks/cyclist-pretooluse-hook.sh +3 -31
  98. package/pennyfarthing-dist/scripts/hooks/pre-commit.sh +27 -33
  99. package/pennyfarthing-dist/scripts/hooks/pre-edit-check.sh +4 -71
  100. package/pennyfarthing-dist/scripts/hooks/question-reflector-check.sh +3 -19
  101. package/pennyfarthing-dist/scripts/hooks/schema-validation.sh +4 -30
  102. package/pennyfarthing-dist/scripts/hooks/session-start.sh +3 -32
  103. package/pennyfarthing-dist/scripts/hooks/session-stop.sh +4 -65
  104. package/pennyfarthing-dist/scripts/hooks/sprint-yaml-validation.sh +4 -78
  105. package/pennyfarthing-dist/scripts/hooks/welcome-hook.sh +4 -93
  106. package/pennyfarthing-dist/scripts/misc/README.md +1 -1
  107. package/pennyfarthing-dist/scripts/misc/statusline.sh +4 -301
  108. package/pennyfarthing-dist/templates/settings.local.json.template +19 -10
  109. package/pennyfarthing-dist/workflows/tdd.yaml +11 -2
  110. package/pennyfarthing_scripts/CLAUDE.md +19 -10
  111. package/pennyfarthing_scripts/__pycache__/__init__.cpython-311.pyc +0 -0
  112. package/pennyfarthing_scripts/__pycache__/__init__.cpython-314.pyc +0 -0
  113. package/pennyfarthing_scripts/__pycache__/bellmode_hook.cpython-314.pyc +0 -0
  114. package/pennyfarthing_scripts/__pycache__/cli.cpython-314.pyc +0 -0
  115. package/pennyfarthing_scripts/__pycache__/config.cpython-314.pyc +0 -0
  116. package/pennyfarthing_scripts/__pycache__/context.cpython-314.pyc +0 -0
  117. package/pennyfarthing_scripts/__pycache__/hooks.cpython-314.pyc +0 -0
  118. package/pennyfarthing_scripts/__pycache__/jira.cpython-314.pyc +0 -0
  119. package/pennyfarthing_scripts/__pycache__/jira_bidirectional_sync.cpython-314.pyc +0 -0
  120. package/pennyfarthing_scripts/__pycache__/jira_epic_creation.cpython-314.pyc +0 -0
  121. package/pennyfarthing_scripts/__pycache__/jira_sync.cpython-314.pyc +0 -0
  122. package/pennyfarthing_scripts/__pycache__/jira_sync_story.cpython-314.pyc +0 -0
  123. package/pennyfarthing_scripts/__pycache__/output.cpython-314.pyc +0 -0
  124. package/pennyfarthing_scripts/__pycache__/patch_mode.cpython-314.pyc +0 -0
  125. package/pennyfarthing_scripts/__pycache__/pretooluse_hook.cpython-314.pyc +0 -0
  126. package/pennyfarthing_scripts/__pycache__/schema_validation_hook.cpython-314.pyc +0 -0
  127. package/pennyfarthing_scripts/__pycache__/session_start_hook.cpython-314.pyc +0 -0
  128. package/pennyfarthing_scripts/__pycache__/sprint.cpython-314.pyc +0 -0
  129. package/pennyfarthing_scripts/__pycache__/workflow.cpython-311.pyc +0 -0
  130. package/pennyfarthing_scripts/__pycache__/workflow.cpython-314.pyc +0 -0
  131. package/pennyfarthing_scripts/bc/__pycache__/__init__.cpython-314.pyc +0 -0
  132. package/pennyfarthing_scripts/bc/__pycache__/cli.cpython-314.pyc +0 -0
  133. package/pennyfarthing_scripts/bc/__pycache__/focus.cpython-314.pyc +0 -0
  134. package/pennyfarthing_scripts/bellmode_hook.py +12 -296
  135. package/pennyfarthing_scripts/bikerack/__pycache__/__init__.cpython-314.pyc +0 -0
  136. package/pennyfarthing_scripts/bikerack/__pycache__/__main__.cpython-314.pyc +0 -0
  137. package/pennyfarthing_scripts/bikerack/__pycache__/audit_log_panel.cpython-314.pyc +0 -0
  138. package/pennyfarthing_scripts/bikerack/__pycache__/background_panel.cpython-314.pyc +0 -0
  139. package/pennyfarthing_scripts/bikerack/__pycache__/base_panel.cpython-314.pyc +0 -0
  140. package/pennyfarthing_scripts/bikerack/__pycache__/changed_panel.cpython-314.pyc +0 -0
  141. package/pennyfarthing_scripts/bikerack/__pycache__/cli.cpython-314.pyc +0 -0
  142. package/pennyfarthing_scripts/bikerack/__pycache__/context_meter_footer.cpython-314.pyc +0 -0
  143. package/pennyfarthing_scripts/bikerack/__pycache__/debug_panel.cpython-314.pyc +0 -0
  144. package/pennyfarthing_scripts/bikerack/__pycache__/diffs_panel.cpython-314.pyc +0 -0
  145. package/pennyfarthing_scripts/bikerack/__pycache__/events.cpython-314.pyc +0 -0
  146. package/pennyfarthing_scripts/bikerack/__pycache__/git_panel.cpython-314.pyc +0 -0
  147. package/pennyfarthing_scripts/bikerack/__pycache__/launcher.cpython-314.pyc +0 -0
  148. package/pennyfarthing_scripts/bikerack/__pycache__/portrait_resolver.cpython-314.pyc +0 -0
  149. package/pennyfarthing_scripts/bikerack/__pycache__/progress_panel.cpython-314.pyc +0 -0
  150. package/pennyfarthing_scripts/bikerack/__pycache__/sprint_panel.cpython-314.pyc +0 -0
  151. package/pennyfarthing_scripts/bikerack/__pycache__/story_detail_data.cpython-314.pyc +0 -0
  152. package/pennyfarthing_scripts/bikerack/__pycache__/story_detail_screen.cpython-314.pyc +0 -0
  153. package/pennyfarthing_scripts/bikerack/__pycache__/tui.cpython-314.pyc +0 -0
  154. package/pennyfarthing_scripts/bikerack/__pycache__/ws_client.cpython-314.pyc +0 -0
  155. package/pennyfarthing_scripts/bikerack/audit_log_panel.py +119 -0
  156. package/pennyfarthing_scripts/bikerack/base_panel.py +27 -4
  157. package/pennyfarthing_scripts/bikerack/changed_panel.py +96 -4
  158. package/pennyfarthing_scripts/bikerack/context_meter_footer.py +88 -0
  159. package/pennyfarthing_scripts/bikerack/debug_panel.py +1 -1
  160. package/pennyfarthing_scripts/bikerack/diffs_panel.py +30 -0
  161. package/pennyfarthing_scripts/bikerack/events.py +28 -0
  162. package/pennyfarthing_scripts/bikerack/portrait_resolver.py +139 -0
  163. package/pennyfarthing_scripts/bikerack/sprint_panel.py +373 -142
  164. package/pennyfarthing_scripts/bikerack/story_detail_data.py +244 -0
  165. package/pennyfarthing_scripts/bikerack/story_detail_screen.py +176 -0
  166. package/pennyfarthing_scripts/bikerack/tui.py +293 -61
  167. package/pennyfarthing_scripts/brownfield/__pycache__/__init__.cpython-314.pyc +0 -0
  168. package/pennyfarthing_scripts/brownfield/__pycache__/__main__.cpython-314.pyc +0 -0
  169. package/pennyfarthing_scripts/brownfield/__pycache__/cli.cpython-314.pyc +0 -0
  170. package/pennyfarthing_scripts/brownfield/__pycache__/discover.cpython-314.pyc +0 -0
  171. package/pennyfarthing_scripts/cli.py +5 -0
  172. package/pennyfarthing_scripts/codemarkers/__pycache__/__init__.cpython-314.pyc +0 -0
  173. package/pennyfarthing_scripts/codemarkers/__pycache__/__main__.cpython-314.pyc +0 -0
  174. package/pennyfarthing_scripts/codemarkers/__pycache__/analyze.cpython-314.pyc +0 -0
  175. package/pennyfarthing_scripts/codemarkers/__pycache__/cli.cpython-314.pyc +0 -0
  176. package/pennyfarthing_scripts/codemarkers/__pycache__/formatters.cpython-314.pyc +0 -0
  177. package/pennyfarthing_scripts/codemarkers/__pycache__/models.cpython-314.pyc +0 -0
  178. package/pennyfarthing_scripts/common/__pycache__/__init__.cpython-314.pyc +0 -0
  179. package/pennyfarthing_scripts/common/__pycache__/config.cpython-314.pyc +0 -0
  180. package/pennyfarthing_scripts/common/__pycache__/output.cpython-314.pyc +0 -0
  181. package/pennyfarthing_scripts/common/__pycache__/themes.cpython-314.pyc +0 -0
  182. package/pennyfarthing_scripts/common/pr_config.py +38 -0
  183. package/pennyfarthing_scripts/complexity/__pycache__/__init__.cpython-314.pyc +0 -0
  184. package/pennyfarthing_scripts/complexity/__pycache__/__main__.cpython-314.pyc +0 -0
  185. package/pennyfarthing_scripts/complexity/__pycache__/analyze.cpython-314.pyc +0 -0
  186. package/pennyfarthing_scripts/complexity/__pycache__/cli.cpython-314.pyc +0 -0
  187. package/pennyfarthing_scripts/complexity/__pycache__/formatters.cpython-314.pyc +0 -0
  188. package/pennyfarthing_scripts/complexity/__pycache__/models.cpython-314.pyc +0 -0
  189. package/pennyfarthing_scripts/consultation/__pycache__/__init__.cpython-314.pyc +0 -0
  190. package/pennyfarthing_scripts/consultation/__pycache__/cli.cpython-314.pyc +0 -0
  191. package/pennyfarthing_scripts/consultation/__pycache__/dialogue_manager.cpython-314.pyc +0 -0
  192. package/pennyfarthing_scripts/deadcode/__pycache__/__init__.cpython-314.pyc +0 -0
  193. package/pennyfarthing_scripts/deadcode/__pycache__/__main__.cpython-314.pyc +0 -0
  194. package/pennyfarthing_scripts/deadcode/__pycache__/analyze.cpython-314.pyc +0 -0
  195. package/pennyfarthing_scripts/deadcode/__pycache__/cli.cpython-314.pyc +0 -0
  196. package/pennyfarthing_scripts/deadcode/__pycache__/formatters.cpython-314.pyc +0 -0
  197. package/pennyfarthing_scripts/deadcode/__pycache__/models.cpython-314.pyc +0 -0
  198. package/pennyfarthing_scripts/dependencies/__pycache__/__init__.cpython-314.pyc +0 -0
  199. package/pennyfarthing_scripts/dependencies/__pycache__/__main__.cpython-314.pyc +0 -0
  200. package/pennyfarthing_scripts/dependencies/__pycache__/analyze.cpython-314.pyc +0 -0
  201. package/pennyfarthing_scripts/dependencies/__pycache__/cli.cpython-314.pyc +0 -0
  202. package/pennyfarthing_scripts/dependencies/__pycache__/formatters.cpython-314.pyc +0 -0
  203. package/pennyfarthing_scripts/dependencies/__pycache__/models.cpython-314.pyc +0 -0
  204. package/pennyfarthing_scripts/epic/__pycache__/__init__.cpython-314.pyc +0 -0
  205. package/pennyfarthing_scripts/epic/__pycache__/cli.cpython-314.pyc +0 -0
  206. package/pennyfarthing_scripts/git/__pycache__/__init__.cpython-314.pyc +0 -0
  207. package/pennyfarthing_scripts/git/__pycache__/create_branches.cpython-314.pyc +0 -0
  208. package/pennyfarthing_scripts/git/__pycache__/status_all.cpython-314.pyc +0 -0
  209. package/pennyfarthing_scripts/git_group/__pycache__/__init__.cpython-314.pyc +0 -0
  210. package/pennyfarthing_scripts/git_group/__pycache__/cli.cpython-314.pyc +0 -0
  211. package/pennyfarthing_scripts/handoff/__pycache__/__init__.cpython-314.pyc +0 -0
  212. package/pennyfarthing_scripts/handoff/__pycache__/cli.cpython-314.pyc +0 -0
  213. package/pennyfarthing_scripts/handoff/__pycache__/complete_phase.cpython-314.pyc +0 -0
  214. package/pennyfarthing_scripts/handoff/__pycache__/gate_file.cpython-314.pyc +0 -0
  215. package/pennyfarthing_scripts/handoff/__pycache__/gate_runner.cpython-314.pyc +0 -0
  216. package/pennyfarthing_scripts/handoff/__pycache__/marker.cpython-314.pyc +0 -0
  217. package/pennyfarthing_scripts/handoff/__pycache__/resolve_gate.cpython-314.pyc +0 -0
  218. package/pennyfarthing_scripts/handoff/cli.py +33 -1
  219. package/pennyfarthing_scripts/handoff/complete_phase.py +28 -0
  220. package/pennyfarthing_scripts/handoff/marker.py +15 -15
  221. package/pennyfarthing_scripts/handoff/phase_check.py +96 -0
  222. package/pennyfarthing_scripts/handoff/resolve_gate.py +13 -1
  223. package/pennyfarthing_scripts/healthscore/__pycache__/__init__.cpython-314.pyc +0 -0
  224. package/pennyfarthing_scripts/healthscore/__pycache__/__main__.cpython-314.pyc +0 -0
  225. package/pennyfarthing_scripts/healthscore/__pycache__/analyze.cpython-314.pyc +0 -0
  226. package/pennyfarthing_scripts/healthscore/__pycache__/cli.cpython-314.pyc +0 -0
  227. package/pennyfarthing_scripts/healthscore/__pycache__/formatters.cpython-314.pyc +0 -0
  228. package/pennyfarthing_scripts/healthscore/__pycache__/models.cpython-314.pyc +0 -0
  229. package/pennyfarthing_scripts/hooks/__init__.py +437 -0
  230. package/pennyfarthing_scripts/hooks/__pycache__/__init__.cpython-314.pyc +0 -0
  231. package/pennyfarthing_scripts/hooks/__pycache__/bell_mode.cpython-314.pyc +0 -0
  232. package/pennyfarthing_scripts/hooks/__pycache__/cli.cpython-314.pyc +0 -0
  233. package/pennyfarthing_scripts/hooks/__pycache__/context_breaker.cpython-314.pyc +0 -0
  234. package/pennyfarthing_scripts/hooks/__pycache__/context_warning.cpython-314.pyc +0 -0
  235. package/pennyfarthing_scripts/hooks/__pycache__/cyclist_pretooluse.cpython-314.pyc +0 -0
  236. package/pennyfarthing_scripts/hooks/__pycache__/pre_edit_check.cpython-314.pyc +0 -0
  237. package/pennyfarthing_scripts/hooks/__pycache__/reflector_check.cpython-314.pyc +0 -0
  238. package/pennyfarthing_scripts/hooks/__pycache__/schema_validation.cpython-314.pyc +0 -0
  239. package/pennyfarthing_scripts/hooks/__pycache__/session_start.cpython-314.pyc +0 -0
  240. package/pennyfarthing_scripts/hooks/__pycache__/session_stop.cpython-314.pyc +0 -0
  241. package/pennyfarthing_scripts/hooks/__pycache__/sprint_yaml_validation.cpython-314.pyc +0 -0
  242. package/pennyfarthing_scripts/hooks/__pycache__/statusline.cpython-314.pyc +0 -0
  243. package/pennyfarthing_scripts/hooks/bell_mode.py +215 -0
  244. package/pennyfarthing_scripts/hooks/cli.py +96 -0
  245. package/pennyfarthing_scripts/hooks/context_breaker.py +104 -0
  246. package/pennyfarthing_scripts/hooks/context_warning.py +66 -0
  247. package/pennyfarthing_scripts/hooks/cyclist_pretooluse.py +129 -0
  248. package/pennyfarthing_scripts/hooks/pre_edit_check.py +78 -0
  249. package/pennyfarthing_scripts/hooks/reflector_check.py +271 -0
  250. package/pennyfarthing_scripts/hooks/schema_validation.py +203 -0
  251. package/pennyfarthing_scripts/hooks/session_start.py +296 -0
  252. package/pennyfarthing_scripts/hooks/session_stop.py +111 -0
  253. package/pennyfarthing_scripts/hooks/sprint_yaml_validation.py +97 -0
  254. package/pennyfarthing_scripts/hooks/statusline.py +420 -0
  255. package/pennyfarthing_scripts/hooks.py +27 -432
  256. package/pennyfarthing_scripts/hotspots/__pycache__/__init__.cpython-314.pyc +0 -0
  257. package/pennyfarthing_scripts/hotspots/__pycache__/__main__.cpython-314.pyc +0 -0
  258. package/pennyfarthing_scripts/hotspots/__pycache__/analyze.cpython-314.pyc +0 -0
  259. package/pennyfarthing_scripts/hotspots/__pycache__/cli.cpython-314.pyc +0 -0
  260. package/pennyfarthing_scripts/hotspots/__pycache__/formatters.cpython-314.pyc +0 -0
  261. package/pennyfarthing_scripts/hotspots/__pycache__/models.cpython-314.pyc +0 -0
  262. package/pennyfarthing_scripts/jira/__pycache__/__init__.cpython-314.pyc +0 -0
  263. package/pennyfarthing_scripts/jira/__pycache__/__main__.cpython-314.pyc +0 -0
  264. package/pennyfarthing_scripts/jira/__pycache__/bidirectional.cpython-314.pyc +0 -0
  265. package/pennyfarthing_scripts/jira/__pycache__/claim.cpython-314.pyc +0 -0
  266. package/pennyfarthing_scripts/jira/__pycache__/cli.cpython-314.pyc +0 -0
  267. package/pennyfarthing_scripts/jira/__pycache__/client.cpython-314.pyc +0 -0
  268. package/pennyfarthing_scripts/jira/__pycache__/compat.cpython-314.pyc +0 -0
  269. package/pennyfarthing_scripts/jira/__pycache__/create.cpython-314.pyc +0 -0
  270. package/pennyfarthing_scripts/jira/__pycache__/epic.cpython-314.pyc +0 -0
  271. package/pennyfarthing_scripts/jira/__pycache__/mappings.cpython-314.pyc +0 -0
  272. package/pennyfarthing_scripts/jira/__pycache__/models.cpython-314.pyc +0 -0
  273. package/pennyfarthing_scripts/jira/__pycache__/operations.cpython-314.pyc +0 -0
  274. package/pennyfarthing_scripts/jira/__pycache__/reconcile.cpython-314.pyc +0 -0
  275. package/pennyfarthing_scripts/jira/__pycache__/story.cpython-314.pyc +0 -0
  276. package/pennyfarthing_scripts/jira/__pycache__/sync.cpython-314.pyc +0 -0
  277. package/pennyfarthing_scripts/launch/__pycache__/__init__.cpython-314.pyc +0 -0
  278. package/pennyfarthing_scripts/launch/__pycache__/cli.cpython-314.pyc +0 -0
  279. package/pennyfarthing_scripts/migration/__pycache__/__init__.cpython-314.pyc +0 -0
  280. package/pennyfarthing_scripts/migration/__pycache__/__main__.cpython-314.pyc +0 -0
  281. package/pennyfarthing_scripts/migration/__pycache__/cli.cpython-314.pyc +0 -0
  282. package/pennyfarthing_scripts/migration/__pycache__/session.cpython-314.pyc +0 -0
  283. package/pennyfarthing_scripts/migration/__pycache__/skill.cpython-314.pyc +0 -0
  284. package/pennyfarthing_scripts/migration/__pycache__/step.cpython-314.pyc +0 -0
  285. package/pennyfarthing_scripts/migration/__pycache__/validate.cpython-314.pyc +0 -0
  286. package/pennyfarthing_scripts/preflight/__pycache__/__init__.cpython-314.pyc +0 -0
  287. package/pennyfarthing_scripts/preflight/__pycache__/__main__.cpython-314.pyc +0 -0
  288. package/pennyfarthing_scripts/preflight/__pycache__/cli.cpython-314.pyc +0 -0
  289. package/pennyfarthing_scripts/preflight/__pycache__/finish.cpython-314.pyc +0 -0
  290. package/pennyfarthing_scripts/pretooluse_hook.py +3 -185
  291. package/pennyfarthing_scripts/prime/__pycache__/__init__.cpython-314.pyc +0 -0
  292. package/pennyfarthing_scripts/prime/__pycache__/__main__.cpython-314.pyc +0 -0
  293. package/pennyfarthing_scripts/prime/__pycache__/cli.cpython-314.pyc +0 -0
  294. package/pennyfarthing_scripts/prime/__pycache__/loader.cpython-314.pyc +0 -0
  295. package/pennyfarthing_scripts/prime/__pycache__/models.cpython-314.pyc +0 -0
  296. package/pennyfarthing_scripts/prime/__pycache__/persona.cpython-314.pyc +0 -0
  297. package/pennyfarthing_scripts/prime/__pycache__/session.cpython-314.pyc +0 -0
  298. package/pennyfarthing_scripts/prime/__pycache__/tiers.cpython-314.pyc +0 -0
  299. package/pennyfarthing_scripts/prime/__pycache__/version_sentinel.cpython-314.pyc +0 -0
  300. package/pennyfarthing_scripts/prime/__pycache__/workflow.cpython-314.pyc +0 -0
  301. package/pennyfarthing_scripts/prime/workflow.py +2 -1
  302. package/pennyfarthing_scripts/schema_validation_hook.py +3 -298
  303. package/pennyfarthing_scripts/session/__pycache__/__init__.cpython-314.pyc +0 -0
  304. package/pennyfarthing_scripts/session/__pycache__/cli.cpython-314.pyc +0 -0
  305. package/pennyfarthing_scripts/session_start_hook.py +4 -186
  306. package/pennyfarthing_scripts/sprint/__pycache__/__init__.cpython-314.pyc +0 -0
  307. package/pennyfarthing_scripts/sprint/__pycache__/__main__.cpython-314.pyc +0 -0
  308. package/pennyfarthing_scripts/sprint/__pycache__/archive.cpython-314.pyc +0 -0
  309. package/pennyfarthing_scripts/sprint/__pycache__/archive_epic.cpython-314.pyc +0 -0
  310. package/pennyfarthing_scripts/sprint/__pycache__/cli.cpython-314.pyc +0 -0
  311. package/pennyfarthing_scripts/sprint/__pycache__/epic_add.cpython-314.pyc +0 -0
  312. package/pennyfarthing_scripts/sprint/__pycache__/epic_update.cpython-314.pyc +0 -0
  313. package/pennyfarthing_scripts/sprint/__pycache__/import_epic.cpython-314.pyc +0 -0
  314. package/pennyfarthing_scripts/sprint/__pycache__/loader.cpython-314.pyc +0 -0
  315. package/pennyfarthing_scripts/sprint/__pycache__/status.cpython-314.pyc +0 -0
  316. package/pennyfarthing_scripts/sprint/__pycache__/story_add.cpython-314.pyc +0 -0
  317. package/pennyfarthing_scripts/sprint/__pycache__/story_finish.cpython-314.pyc +0 -0
  318. package/pennyfarthing_scripts/sprint/__pycache__/story_update.cpython-314.pyc +0 -0
  319. package/pennyfarthing_scripts/sprint/__pycache__/validate_cmd.cpython-314.pyc +0 -0
  320. package/pennyfarthing_scripts/sprint/__pycache__/validator.cpython-314.pyc +0 -0
  321. package/pennyfarthing_scripts/sprint/__pycache__/work.cpython-314.pyc +0 -0
  322. package/pennyfarthing_scripts/sprint/__pycache__/yaml_io.cpython-314.pyc +0 -0
  323. package/pennyfarthing_scripts/sprint/story_update.py +19 -0
  324. package/pennyfarthing_scripts/story/__pycache__/__init__.cpython-314.pyc +0 -0
  325. package/pennyfarthing_scripts/story/__pycache__/__main__.cpython-314.pyc +0 -0
  326. package/pennyfarthing_scripts/story/__pycache__/cli.cpython-314.pyc +0 -0
  327. package/pennyfarthing_scripts/story/__pycache__/create.cpython-314.pyc +0 -0
  328. package/pennyfarthing_scripts/story/__pycache__/size.cpython-314.pyc +0 -0
  329. package/pennyfarthing_scripts/story/__pycache__/template.cpython-314.pyc +0 -0
  330. package/pennyfarthing_scripts/tests/__pycache__/__init__.cpython-314.pyc +0 -0
  331. package/pennyfarthing_scripts/tests/__pycache__/conftest.cpython-314-pytest-9.0.2.pyc +0 -0
  332. package/pennyfarthing_scripts/tests/__pycache__/test_108_1_gate_migration.cpython-314-pytest-9.0.2.pyc +0 -0
  333. package/pennyfarthing_scripts/tests/__pycache__/test_archive_epic.cpython-314-pytest-9.0.2.pyc +0 -0
  334. package/pennyfarthing_scripts/tests/__pycache__/test_bc.cpython-314-pytest-9.0.2.pyc +0 -0
  335. package/pennyfarthing_scripts/tests/__pycache__/test_bikerack.cpython-314-pytest-9.0.2.pyc +0 -0
  336. package/pennyfarthing_scripts/tests/__pycache__/test_brownfield.cpython-314-pytest-9.0.2.pyc +0 -0
  337. package/pennyfarthing_scripts/tests/__pycache__/test_cli_modules.cpython-314-pytest-9.0.2.pyc +0 -0
  338. package/pennyfarthing_scripts/tests/__pycache__/test_cli_normalization.cpython-314-pytest-9.0.2.pyc +0 -0
  339. package/pennyfarthing_scripts/tests/__pycache__/test_codemarkers.cpython-314-pytest-9.0.2.pyc +0 -0
  340. package/pennyfarthing_scripts/tests/__pycache__/test_common.cpython-314-pytest-9.0.2.pyc +0 -0
  341. package/pennyfarthing_scripts/tests/__pycache__/test_confidence_sm_evaluation.cpython-314-pytest-9.0.2.pyc +0 -0
  342. package/pennyfarthing_scripts/tests/__pycache__/test_confidence_sm_gate.cpython-314-pytest-9.0.2.pyc +0 -0
  343. package/pennyfarthing_scripts/tests/__pycache__/test_dialogue_manager.cpython-314-pytest-9.0.2.pyc +0 -0
  344. package/pennyfarthing_scripts/tests/__pycache__/test_epic_shard_validation.cpython-314-pytest-9.0.2.pyc +0 -0
  345. package/pennyfarthing_scripts/tests/__pycache__/test_git_utils.cpython-314-pytest-9.0.2.pyc +0 -0
  346. package/pennyfarthing_scripts/tests/__pycache__/test_handoff_cli.cpython-314-pytest-9.0.2.pyc +0 -0
  347. package/pennyfarthing_scripts/tests/__pycache__/test_handoff_e2e.cpython-314-pytest-9.0.2.pyc +0 -0
  348. package/pennyfarthing_scripts/tests/__pycache__/test_healthscore.cpython-314-pytest-9.0.2.pyc +0 -0
  349. package/pennyfarthing_scripts/tests/__pycache__/test_jira_package.cpython-314-pytest-9.0.2.pyc +0 -0
  350. package/pennyfarthing_scripts/tests/__pycache__/test_package_structure.cpython-314-pytest-9.0.2.pyc +0 -0
  351. package/pennyfarthing_scripts/tests/__pycache__/test_patch_mode.cpython-314-pytest-9.0.2.pyc +0 -0
  352. package/pennyfarthing_scripts/tests/__pycache__/test_prime.cpython-314-pytest-9.0.2.pyc +0 -0
  353. package/pennyfarthing_scripts/tests/__pycache__/test_sprint_package.cpython-314-pytest-9.0.2.pyc +0 -0
  354. package/pennyfarthing_scripts/tests/__pycache__/test_sprint_panel.cpython-314-pytest-9.0.2.pyc +0 -0
  355. package/pennyfarthing_scripts/tests/__pycache__/test_sprint_validator.cpython-314-pytest-9.0.2.pyc +0 -0
  356. package/pennyfarthing_scripts/tests/__pycache__/test_story_add.cpython-314-pytest-9.0.2.pyc +0 -0
  357. package/pennyfarthing_scripts/tests/__pycache__/test_story_package.cpython-314-pytest-9.0.2.pyc +0 -0
  358. package/pennyfarthing_scripts/tests/__pycache__/test_story_update.cpython-314-pytest-9.0.2.pyc +0 -0
  359. package/pennyfarthing_scripts/tests/__pycache__/test_tiers.cpython-314-pytest-9.0.2.pyc +0 -0
  360. package/pennyfarthing_scripts/tests/__pycache__/test_token_counting.cpython-314-pytest-9.0.2.pyc +0 -0
  361. package/pennyfarthing_scripts/tests/__pycache__/test_topology_loader.cpython-314-pytest-9.0.2.pyc +0 -0
  362. package/pennyfarthing_scripts/tests/__pycache__/test_tui_focus.cpython-314-pytest-9.0.2.pyc +0 -0
  363. package/pennyfarthing_scripts/tests/__pycache__/test_tui_panel_persistence.cpython-314-pytest-9.0.2.pyc +0 -0
  364. package/pennyfarthing_scripts/tests/__pycache__/test_validate_cmd.cpython-314-pytest-9.0.2.pyc +0 -0
  365. package/pennyfarthing_scripts/tests/__pycache__/test_version_sentinel.cpython-314-pytest-9.0.2.pyc +0 -0
  366. package/pennyfarthing_scripts/tests/__pycache__/test_workflow_check.cpython-314-pytest-9.0.2.pyc +0 -0
  367. package/pennyfarthing_scripts/tests/__pycache__/test_workflow_cli.cpython-314-pytest-9.0.2.pyc +0 -0
  368. package/pennyfarthing_scripts/tests/__pycache__/test_yaml_io.cpython-314-pytest-9.0.2.pyc +0 -0
  369. package/pennyfarthing_scripts/tests/test_sprint_panel.py +344 -265
  370. package/pennyfarthing_scripts/theme/__pycache__/__init__.cpython-314.pyc +0 -0
  371. package/pennyfarthing_scripts/theme/__pycache__/cli.cpython-314.pyc +0 -0
  372. package/pennyfarthing_scripts/validate/__pycache__/__init__.cpython-314.pyc +0 -0
  373. package/pennyfarthing_scripts/validate/__pycache__/cli.cpython-314.pyc +0 -0
  374. package/pennyfarthing_scripts/validate/adapters/__pycache__/__init__.cpython-314.pyc +0 -0
  375. package/pennyfarthing_scripts/validate/adapters/__pycache__/agent.cpython-314.pyc +0 -0
  376. package/pennyfarthing_scripts/validate/adapters/__pycache__/schema.cpython-314.pyc +0 -0
  377. package/pennyfarthing_scripts/validate/adapters/__pycache__/skill_command.cpython-314.pyc +0 -0
  378. package/pennyfarthing_scripts/validate/adapters/__pycache__/sprint.cpython-314.pyc +0 -0
  379. package/pennyfarthing_scripts/validate/adapters/__pycache__/tandem_awareness.cpython-314.pyc +0 -0
  380. package/pennyfarthing_scripts/validate/adapters/__pycache__/workflow.cpython-314.pyc +0 -0
  381. package/pennyfarthing_scripts/validate/adapters/workflow.py +19 -0
  382. package/pennyfarthing_scripts/welcome_hook.py +3 -149
  383. package/pennyfarthing_scripts/workflow/__pycache__/__init__.cpython-314.pyc +0 -0
  384. package/pennyfarthing_scripts/workflow/__pycache__/cli.cpython-314.pyc +0 -0
  385. package/pennyfarthing_scripts/workflow/__pycache__/helpers.cpython-314.pyc +0 -0
  386. package/pennyfarthing_scripts/workflow/__pycache__/scale.cpython-314.pyc +0 -0
  387. package/pennyfarthing_scripts/workflow/__pycache__/state.cpython-314.pyc +0 -0
  388. package/pennyfarthing_scripts/workflow/cli.py +7 -6
  389. package/pennyfarthing_scripts/workflow/team_lifecycle.py +257 -0
  390. package/packages/core/dist/scripts/theme-detail.test.d.ts +0 -10
  391. package/packages/core/dist/scripts/theme-detail.test.js +0 -199
  392. package/pennyfarthing_scripts/bikerack/__pycache__/portrait.cpython-314.pyc +0 -0
  393. package/pennyfarthing_scripts/gate/__pycache__/__init__.cpython-314.pyc +0 -0
  394. package/pennyfarthing_scripts/gate/__pycache__/cli.cpython-314.pyc +0 -0
  395. package/pennyfarthing_scripts/gate/__pycache__/validate.cpython-314.pyc +0 -0
  396. package/pennyfarthing_scripts/git/__pycache__/hooks_installer.cpython-314.pyc +0 -0
  397. package/pennyfarthing_scripts/git/__pycache__/repos.cpython-314.pyc +0 -0
  398. package/pennyfarthing_scripts/git/__pycache__/worktree.cpython-314.pyc +0 -0
  399. package/pennyfarthing_scripts/prime/__pycache__/heatmap.cpython-314.pyc +0 -0
  400. package/pennyfarthing_scripts/tests/__pycache__/test_108_2_remove_handoff_fallback.cpython-314-pytest-9.0.2.pyc +0 -0
  401. package/pennyfarthing_scripts/tests/__pycache__/test_gate_file_resolution.cpython-314-pytest-9.0.2.pyc +0 -0
  402. package/pennyfarthing_scripts/tests/__pycache__/test_gate_runner.cpython-314-pytest-9.0.2.pyc +0 -0
  403. package/pennyfarthing_scripts/tests/__pycache__/test_resolve_gate_file_field.cpython-314-pytest-9.0.2.pyc +0 -0
@@ -1,95 +1,4 @@
1
- #!/usr/bin/env zsh
2
- # Context circuit breaker hook: Block tool execution at 85% context usage
3
- # Called by Claude Code before tool calls (PreToolUse)
4
- #
5
- # Input: JSON via stdin with tool_name, tool_input, session_id
6
- # Output: Exit 0 to allow, Exit 2 to block (stderr shown to Claude)
7
- #
8
- # This hook provides a hard stop when context is critically high,
9
- # unlike context-warning.sh which only warns.
10
- #
11
- # When triggered, automatically saves the active agent to a checkpoint
12
- # so /continue-session can restore it with FULL tier.
13
-
14
- # Read stdin to get session_id (required by hook protocol)
15
- INPUT=$(cat)
16
-
17
- # Script location for sibling script references
18
- SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
19
-
20
- # Get context percentage from check-context.sh
21
- CONTEXT_SCRIPT="$SCRIPT_DIR/../check-context.sh"
22
- if [[ ! -x "$CONTEXT_SCRIPT" ]]; then
23
- # graceful degradation: if check-context.sh not found, allow the tool
24
- exit 0
25
- fi
26
-
27
- # Run check-context.sh and parse output
28
- eval "$("$CONTEXT_SCRIPT" 2>/dev/null)" 2>/dev/null
29
-
30
- # graceful degradation: if we can't get context, allow the tool
31
- if [[ -z "$CONTEXT_PERCENT" ]] || [[ "$CONTEXT_PERCENT" == "null" ]]; then
32
- exit 0
33
- fi
34
-
35
- # Load critical threshold (default 80%)
36
- CRITICAL_THRESHOLD="${CRITICAL_THRESHOLD:-80}"
37
-
38
- # Check if at or above critical threshold
39
- if [[ "$CONTEXT_PERCENT" -ge "$CRITICAL_THRESHOLD" ]] 2>/dev/null; then
40
- # Auto-save active agent to checkpoint before blocking
41
- # This allows /continue-session to restore with FULL tier
42
- source "$SCRIPT_DIR/../lib/checkpoint.sh" 2>/dev/null || true
43
-
44
- # Get session_id from input JSON
45
- SESSION_ID=""
46
- if command -v jq &>/dev/null && [[ -n "$INPUT" ]]; then
47
- SESSION_ID=$(echo "$INPUT" | jq -r '.session_id // empty' 2>/dev/null)
48
- fi
49
-
50
- # Look up active agent for this session
51
- ACTIVE_AGENT=""
52
- AGENT_FILE="${CLAUDE_PROJECT_DIR:-.}/.session/agents/${SESSION_ID}"
53
- if [[ -n "$SESSION_ID" && -f "$AGENT_FILE" ]]; then
54
- ACTIVE_AGENT=$(cat "$AGENT_FILE" 2>/dev/null)
55
- fi
56
-
57
- # Save agent checkpoint if we found one
58
- if [[ -n "$ACTIVE_AGENT" ]]; then
59
- checkpoint_save "circuit_breaker_agent" "$ACTIVE_AGENT" 2>/dev/null || true
60
- fi
61
-
62
- # Send error message to stderr (Claude will see this)
63
- cat >&2 << EOF
64
- CONTEXT CIRCUIT BREAKER TRIGGERED
65
-
66
- Context usage: ${CONTEXT_PERCENT}% - CRITICAL (threshold: ${CRITICAL_THRESHOLD}%)
67
-
68
- Tool execution BLOCKED. You must stop and hand off.
69
- EOF
70
-
71
- # Include agent info if available
72
- if [[ -n "$ACTIVE_AGENT" ]]; then
73
- cat >&2 << EOF
74
-
75
- Active agent saved: ${ACTIVE_AGENT}
76
- The agent will be restored with FULL context when you run /continue-session.
77
- EOF
78
- fi
79
-
80
- cat >&2 << EOF
81
-
82
- Required actions:
83
- 1. Commit any pending changes
84
- 2. Tell user to start fresh session with /continue-session
85
-
86
- DO NOT attempt further tool calls. This is a hard stop.
87
-
88
- To resume later: /continue-session
89
- EOF
90
- # Exit 2 blocks the tool execution
91
- exit 2
92
- fi
93
-
94
- # Below threshold: allow the tool
95
- exit 0
1
+ #!/usr/bin/env bash
2
+ # DEPRECATED: This script is a shim. Logic has moved to Python.
3
+ # Use: pf hooks context-breaker
4
+ exec pf hooks context-breaker
@@ -1,65 +1,4 @@
1
- #!/usr/bin/env zsh
2
- # Context warning hook: Warn agent when context usage is high
3
- # Called by Claude Code before tool calls (PreToolUse)
4
- #
5
- # Input: JSON via stdin with tool_name, tool_input
6
- # Output: Warning message to stdout if context > 60%
7
- # Always exits 0 (warning only, never blocks)
8
-
9
- # Read and discard stdin (required by hook protocol)
10
- cat > /dev/null
11
-
12
- # Script location for sibling script references
13
- SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
14
-
15
- # Get context percentage from check-context.sh
16
- CONTEXT_SCRIPT="$SCRIPT_DIR/../check-context.sh"
17
- if [[ ! -x "$CONTEXT_SCRIPT" ]]; then
18
- exit 0 # Can't check, allow silently
19
- fi
20
-
21
- # Run check-context.sh and parse output
22
- eval "$("$CONTEXT_SCRIPT" 2>/dev/null)" 2>/dev/null
23
-
24
- # Check if we got a valid percentage
25
- if [[ -z "$CONTEXT_PERCENT" ]] || [[ "$CONTEXT_PERCENT" == "null" ]]; then
26
- exit 0 # Can't determine, allow silently
27
- fi
28
-
29
- # Load thresholds from settings (defaults match check-context.sh)
30
- WARNING_THRESHOLD="${WARNING_THRESHOLD:-60}"
31
- CRITICAL_THRESHOLD="${CRITICAL_THRESHOLD:-85}"
32
-
33
- # Output warning if above threshold
34
- if [[ "$CONTEXT_PERCENT" -ge "$CRITICAL_THRESHOLD" ]] 2>/dev/null; then
35
- cat << EOF
36
-
37
- ---
38
- CONTEXT WARNING: ${CONTEXT_PERCENT}% (CRITICAL)
39
-
40
- Context usage is critically high. Recommended actions:
41
- 1. Complete current task immediately
42
- 2. Commit any pending changes
43
- 3. Hand off to next agent or ask user to start fresh session
44
-
45
- Do NOT start new subtasks. Wrap up and hand off.
46
- ---
47
-
48
- EOF
49
- elif [[ "$CONTEXT_PERCENT" -ge "$WARNING_THRESHOLD" ]] 2>/dev/null; then
50
- cat << EOF
51
-
52
- ---
53
- CONTEXT WARNING: ${CONTEXT_PERCENT}%
54
-
55
- Context usage is high. Consider:
56
- - Wrapping up current task soon
57
- - Preparing for handoff to next agent
58
- - Avoiding large file reads or complex operations
59
- ---
60
-
61
- EOF
62
- fi
63
-
64
- # Always allow the tool (we're warning, not blocking)
65
- exit 0
1
+ #!/usr/bin/env bash
2
+ # DEPRECATED: This script is a shim. Logic has moved to Python.
3
+ # Use: pf hooks context-warning
4
+ exec pf hooks context-warning
@@ -1,32 +1,4 @@
1
1
  #!/usr/bin/env bash
2
- #
3
- # Cyclist PreToolUse Hook - Shell wrapper for Python implementation
4
- #
5
- # Routes tool approval requests through WheelHub when Cyclist is running.
6
- # Falls back to Claude Code's built-in permissions when Cyclist is not active.
7
- #
8
- # Input (stdin): JSON with tool_name, tool_input, session_id, etc.
9
- # Output (stdout): JSON decision (allow/deny/ask)
10
- #
11
- # Story: MSSCI-14320
12
-
13
- set -euo pipefail
14
-
15
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
16
- source "$SCRIPT_DIR/../lib/find-root.sh"
17
-
18
- # Set PYTHONPATH for pennyfarthing_scripts
19
- PENNYFARTHING_SCRIPTS=""
20
- if [[ -d "$PROJECT_ROOT/pennyfarthing" ]]; then
21
- # Dogfooding: framework inlined in orchestrator
22
- PENNYFARTHING_SCRIPTS="$PROJECT_ROOT/pennyfarthing"
23
- elif [[ -d "$PROJECT_ROOT/node_modules/@pennyfarthing/core" ]]; then
24
- # Normal install
25
- PENNYFARTHING_SCRIPTS="$PROJECT_ROOT/node_modules/@pennyfarthing/core"
26
- fi
27
-
28
- if [[ -n "$PENNYFARTHING_SCRIPTS" ]]; then
29
- export PYTHONPATH="$PENNYFARTHING_SCRIPTS:${PYTHONPATH:-}"
30
- fi
31
-
32
- python3 -m pennyfarthing_scripts.pretooluse_hook
2
+ # DEPRECATED: This script is a shim. Logic has moved to Python.
3
+ # Use: pf hooks cyclist-pretooluse
4
+ exec pf hooks cyclist-pretooluse
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # Checks:
5
5
  # 1. Prevents direct commits to protected branches (main, develop)
6
- # Exception: sprint/ folder commits allowed on develop
6
+ # Exception: sprint/ folder commits allowed on protected branches
7
7
  # 2. Validates agent files when pennyfarthing-dist/agents/*.md is modified
8
8
  # 3. Validates file references when pennyfarthing-dist/ files are modified (warn only)
9
9
  # 4. Validates sprint YAML files when sprint/*.yaml is modified
@@ -34,40 +34,34 @@ BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
34
34
  PROTECTED_BRANCHES="^(main|develop)$"
35
35
 
36
36
  if [[ $BRANCH =~ $PROTECTED_BRANCHES ]]; then
37
- # Special case: Allow sprint/ folder commits on develop branch
38
- if [[ $BRANCH == "develop" ]]; then
39
- STAGED_FILES=$(git diff --cached --name-only)
40
- NON_SPRINT_FILES=$(echo "$STAGED_FILES" | grep -v "^sprint/")
41
-
42
- # If all staged files are in sprint/, allow the commit
43
- if [ -z "$NON_SPRINT_FILES" ] && [ -n "$STAGED_FILES" ]; then
44
- # Continue to agent validation check
45
- :
46
- else
47
- echo ""
48
- echo "COMMIT BLOCKED"
49
- echo ""
50
- echo "You are trying to commit directly to: $BRANCH"
51
- echo "This violates the git workflow rules."
52
- echo ""
53
- echo "Protected branches: main, develop"
54
- echo ""
55
- echo "What to do:"
56
- echo "1. Create a feature branch:"
57
- echo " git checkout -b <type>/<epic-story>-<description>"
58
- echo ""
59
- echo "2. Example:"
60
- echo " git checkout -b feat/8-2-add-authentication"
61
- echo ""
62
- echo "3. Then commit your changes on the feature branch"
63
- echo ""
64
- echo "Exception: Sprint tracking files (sprint/*) can be committed to develop"
65
- echo ""
66
- exit 1
67
- fi
37
+ # Special case: Allow sprint/ folder commits on protected branches
38
+ # (orchestrator uses trunk-based on main; pennyfarthing uses gitflow on develop)
39
+ STAGED_FILES=$(git diff --cached --name-only)
40
+ NON_SPRINT_FILES=$(echo "$STAGED_FILES" | grep -v "^sprint/")
41
+
42
+ # If all staged files are in sprint/, allow the commit
43
+ if [ -z "$NON_SPRINT_FILES" ] && [ -n "$STAGED_FILES" ]; then
44
+ # Continue to agent validation check
45
+ :
68
46
  else
69
47
  echo ""
70
- echo "COMMIT BLOCKED - Cannot commit directly to $BRANCH"
48
+ echo "COMMIT BLOCKED"
49
+ echo ""
50
+ echo "You are trying to commit directly to: $BRANCH"
51
+ echo "This violates the git workflow rules."
52
+ echo ""
53
+ echo "Protected branches: main, develop"
54
+ echo ""
55
+ echo "What to do:"
56
+ echo "1. Create a feature branch:"
57
+ echo " git checkout -b <type>/<epic-story>-<description>"
58
+ echo ""
59
+ echo "2. Example:"
60
+ echo " git checkout -b feat/8-2-add-authentication"
61
+ echo ""
62
+ echo "3. Then commit your changes on the feature branch"
63
+ echo ""
64
+ echo "Exception: Sprint tracking files (sprint/*) can be committed directly"
71
65
  echo ""
72
66
  exit 1
73
67
  fi
@@ -1,71 +1,4 @@
1
- #!/usr/bin/env zsh
2
- # Pre-edit hook: Verify edits don't touch protected files
3
- # Called by Claude Code before Edit/Write tool calls
4
- #
5
- # Input: JSON via stdin with tool_name, tool_input
6
- # Output: Exit 0 to allow, Exit 2 to block (stderr shown to Claude)
7
-
8
- set -euo pipefail
9
-
10
- # Read input from stdin
11
- input=$(cat)
12
-
13
- # Extract file path from tool input
14
- file_path=$(echo "$input" | jq -r '.tool_input.file_path // .tool_input.path // ""')
15
-
16
- # Protected patterns (files that should never be edited automatically)
17
- protected_patterns=(
18
- "*.env"
19
- "*.pem"
20
- "*.key"
21
- "*credentials*"
22
- "*secrets*"
23
- ".git/*"
24
- "node_modules/*"
25
- "vendor/*"
26
- )
27
-
28
- # Pennyfarthing managed files protection
29
- # These are managed by `pennyfarthing update`, don't edit directly
30
- # EXCEPTION: If we ARE in the pennyfarthing library itself, allow edits
31
- is_pennyfarthing_lib=false
32
- if [[ -d "${CLAUDE_PROJECT_DIR:-$PWD}/pennyfarthing-dist" ]]; then
33
- is_pennyfarthing_lib=true
34
- fi
35
-
36
- if [[ "$file_path" == *".claude/pennyfarthing/"* ]] && [[ "$is_pennyfarthing_lib" == "false" ]]; then
37
- echo "BLOCKED: Cannot edit managed pennyfarthing files." >&2
38
- echo "File: $file_path" >&2
39
- echo "" >&2
40
- echo "These files are managed by pennyfarthing and will be overwritten on update." >&2
41
- echo "Instead:" >&2
42
- echo " - Put project-specific customizations in .claude/project/" >&2
43
- echo " - For framework changes, edit the pennyfarthing repo and run 'pennyfarthing update'" >&2
44
- exit 2
45
- fi
46
-
47
- # Check if file matches any protected pattern
48
- for pattern in "${protected_patterns[@]}"; do
49
- if [[ "$file_path" == $pattern ]]; then
50
- echo "BLOCKED: Cannot edit protected file matching pattern: $pattern" >&2
51
- echo "File: $file_path" >&2
52
- exit 2
53
- fi
54
- done
55
-
56
- # Additional check: warn on certain file types but allow
57
- warn_patterns=(
58
- "*.md"
59
- "*.json"
60
- )
61
-
62
- # For warnings, just log to stderr but allow (exit 0)
63
- for pattern in "${warn_patterns[@]}"; do
64
- if [[ "$file_path" == $pattern ]]; then
65
- # Could log warnings here if needed
66
- :
67
- fi
68
- done
69
-
70
- # Allow the edit
71
- exit 0
1
+ #!/usr/bin/env bash
2
+ # DEPRECATED: This script is a shim. Logic has moved to Python.
3
+ # Use: pf hooks pre-edit-check
4
+ exec pf hooks pre-edit-check
@@ -1,20 +1,4 @@
1
1
  #!/usr/bin/env bash
2
- #
3
- # Question Reflector Enforcement Hook (Stop hook / PreToolUse hook)
4
- #
5
- # Thin wrapper that delegates to question_reflector_check.py for the actual logic.
6
- # This allows the hook to be written in Python for easier testing and maintenance.
7
- #
8
- # Input (stdin): JSON with transcript_path, stop_hook_active, etc.
9
- # Output (stdout): JSON decision to allow or block
10
- #
11
- # Story: MSSCI-12393
12
- #
13
-
14
- set -euo pipefail
15
-
16
- # Get the directory where this script lives
17
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
18
-
19
- # Delegate to Python implementation
20
- exec python3 "$SCRIPT_DIR/question_reflector_check.py"
2
+ # DEPRECATED: This script is a shim. Logic has moved to Python.
3
+ # Use: pf hooks reflector-check
4
+ exec pf hooks reflector-check
@@ -1,30 +1,4 @@
1
- #!/usr/bin/env zsh
2
- # Schema Validation Hook
3
- # Validates XML schema for session, skill, and workflow step files on Write operations
4
- # Called by Claude Code PreToolUse hook
5
- #
6
- # Input: JSON via stdin with tool_name, tool_input
7
- # Output: JSON with decision (allow/deny)
8
-
9
- set -euo pipefail
10
-
11
- # Find script directory (zsh compatible)
12
- SCRIPT_DIR="${0:A:h}"
13
- source "$SCRIPT_DIR/../lib/find-root.sh"
14
-
15
- # Set PYTHONPATH for pennyfarthing_scripts
16
- PENNYFARTHING_SCRIPTS=""
17
- if [[ -d "$PROJECT_ROOT/pennyfarthing" ]]; then
18
- # Dogfooding: framework inlined in orchestrator
19
- PENNYFARTHING_SCRIPTS="$PROJECT_ROOT/pennyfarthing"
20
- elif [[ -d "$PROJECT_ROOT/node_modules/@pennyfarthing/core" ]]; then
21
- # Normal install
22
- PENNYFARTHING_SCRIPTS="$PROJECT_ROOT/node_modules/@pennyfarthing/core"
23
- fi
24
-
25
- if [[ -n "$PENNYFARTHING_SCRIPTS" ]]; then
26
- export PYTHONPATH="$PENNYFARTHING_SCRIPTS:${PYTHONPATH:-}"
27
- fi
28
-
29
- # Run Python validation hook
30
- python3 -m pennyfarthing_scripts.schema_validation_hook
1
+ #!/usr/bin/env bash
2
+ # DEPRECATED: This script is a shim. Logic has moved to Python.
3
+ # Use: pf hooks schema-validation
4
+ exec pf hooks schema-validation
@@ -1,33 +1,4 @@
1
1
  #!/usr/bin/env bash
2
- #
3
- # Session Start Hook - Shell wrapper for Python implementation
4
- #
5
- # Initializes environment for Claude Code session:
6
- # - Session directory setup and logging
7
- # - Checkpoint validation (cross-session drift)
8
- # - WheelHub auto-start
9
- # - OTEL auto-configuration
10
- #
11
- # Input (stdin): JSON with session_id, source, cwd, etc.
12
- # Output: Writes to CLAUDE_ENV_FILE
13
-
14
- set -euo pipefail
15
-
16
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
17
- source "$SCRIPT_DIR/../lib/find-root.sh"
18
-
19
- # Set PYTHONPATH for pennyfarthing_scripts
20
- PENNYFARTHING_SCRIPTS=""
21
- if [[ -d "$PROJECT_ROOT/pennyfarthing" ]]; then
22
- # Dogfooding: framework inlined in orchestrator
23
- PENNYFARTHING_SCRIPTS="$PROJECT_ROOT/pennyfarthing"
24
- elif [[ -d "$PROJECT_ROOT/node_modules/@pennyfarthing/core" ]]; then
25
- # Normal install
26
- PENNYFARTHING_SCRIPTS="$PROJECT_ROOT/node_modules/@pennyfarthing/core"
27
- fi
28
-
29
- if [[ -n "$PENNYFARTHING_SCRIPTS" ]]; then
30
- export PYTHONPATH="$PENNYFARTHING_SCRIPTS:${PYTHONPATH:-}"
31
- fi
32
-
33
- python3 -m pennyfarthing_scripts.session_start_hook
2
+ # DEPRECATED: This script is a shim. Logic has moved to Python.
3
+ # Use: pf hooks session-start
4
+ exec pf hooks session-start
@@ -1,65 +1,4 @@
1
- #!/usr/bin/env zsh
2
- # Session stop hook: Save checkpoint for cross-session continuity
3
- # Called by Claude Code when a session ends
4
- #
5
- # Writes session state to checkpoint:
6
- # - Active agent (from .session/agents/)
7
- # - Current story (from .session/*-session.md)
8
- # - Workflow phase (from session file)
9
- # - Git SHA (current HEAD)
10
- # - Session ID
11
- #
12
- # Next session can validate this against current git state.
13
-
14
- set -euo pipefail
15
-
16
- # Load shared functions
17
- SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
18
-
19
- # Determine project root (directory containing .claude)
20
- PROJECT_ROOT="$SCRIPT_DIR"
21
- while [[ ! -d "$PROJECT_ROOT/.pennyfarthing" ]] && [[ "$PROJECT_ROOT" != "/" ]]; do
22
- PROJECT_ROOT="$(dirname "$PROJECT_ROOT")"
23
- done
24
-
25
- source "$SCRIPT_DIR/../lib/checkpoint.sh"
26
-
27
- # Read input from stdin (contains session_id, source, etc.)
28
- input=$(cat)
29
- session_id=$(echo "$input" | jq -r '.session_id // "unknown"')
30
-
31
- # Get current agent for this session
32
- agent=""
33
- agent_file="$PROJECT_ROOT/.session/agents/$session_id"
34
- if [[ -f "$agent_file" ]]; then
35
- agent=$(cat "$agent_file")
36
- fi
37
-
38
- # Find active story from session files
39
- story=""
40
- phase=""
41
- session_file=$(find "$PROJECT_ROOT/.session" -maxdepth 1 -name "*-session.md" -type f 2>/dev/null | head -1)
42
- if [[ -n "$session_file" && -f "$session_file" ]]; then
43
- # Extract story ID from filename (e.g., 8-3-session.md -> 8-3)
44
- story=$(basename "$session_file" | sed 's/-session\.md$//')
45
-
46
- # Extract phase from session file (look for "Phase:" line)
47
- phase=$(grep -i "^- Phase:" "$session_file" 2>/dev/null | head -1 | sed 's/.*Phase:[[:space:]]*//' | cut -d' ' -f1 || echo "")
48
- fi
49
-
50
- # Get current git SHA
51
- git_sha=""
52
- if command -v git &>/dev/null && git rev-parse --git-dir &>/dev/null; then
53
- git_sha=$(git rev-parse --short HEAD 2>/dev/null || echo "")
54
- fi
55
-
56
- # Build checkpoint data (semicolon-separated key=value pairs)
57
- checkpoint_data="agent=${agent};story=${story};phase=${phase};sha=${git_sha};session=${session_id}"
58
-
59
- # Save checkpoint
60
- checkpoint_save "session_state" "$checkpoint_data"
61
-
62
- # Log session end
63
- echo "$(date -Iseconds) | Session end: $session_id (agent=$agent, story=$story)" >> "$PROJECT_ROOT/.session/session-log.txt"
64
-
65
- exit 0
1
+ #!/usr/bin/env bash
2
+ # DEPRECATED: This script is a shim. Logic has moved to Python.
3
+ # Use: pf hooks session-stop
4
+ exec pf hooks session-stop
@@ -1,78 +1,4 @@
1
- #!/bin/bash
2
- #
3
- # Sprint YAML Validation Hook (PostToolUse)
4
- #
5
- # Validates sprint YAML files after Edit/Write operations to ensure
6
- # compatibility with the yaml npm package used by Cyclist's SprintPanel.
7
- #
8
- # The yaml npm package follows YAML 1.2 strictly and rejects:
9
- # - Single-quoted strings with blank lines
10
- # - Invalid multiline string formats
11
- #
12
- # When validation fails, returns additionalContext with an error message
13
- # prompting the agent to fix the YAML format.
14
- #
15
- # Input: JSON via stdin with tool_name, tool_input
16
- # Output: JSON with additionalContext on validation failure
17
- #
18
- # See also: pf sprint validate
19
-
20
- set -euo pipefail
21
-
22
- # Read hook input from stdin
23
- INPUT=$(cat)
24
-
25
- # Extract tool name and file path from input
26
- TOOL_NAME=$(echo "$INPUT" | grep -o '"tool_name"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*"tool_name"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/' || echo "")
27
- FILE_PATH=$(echo "$INPUT" | grep -o '"file_path"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*"file_path"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/' || echo "")
28
-
29
- # Only process Edit and Write operations on sprint YAML files
30
- if [[ "$TOOL_NAME" != "Edit" && "$TOOL_NAME" != "Write" ]]; then
31
- exit 0
32
- fi
33
-
34
- # Check if it's a sprint YAML file
35
- if [[ ! "$FILE_PATH" =~ sprint/.*\.(yaml|yml)$ ]]; then
36
- exit 0
37
- fi
38
-
39
- # Check if the file exists
40
- if [[ ! -f "$FILE_PATH" ]]; then
41
- exit 0
42
- fi
43
-
44
- # Validate using Node.js yaml package (same parser Cyclist uses)
45
- VALIDATION_ERROR=$(node --input-type=module -e "
46
- import { parse } from 'yaml';
47
- import { readFileSync } from 'fs';
48
-
49
- try {
50
- const content = readFileSync('$FILE_PATH', 'utf-8');
51
- parse(content);
52
- process.exit(0);
53
- } catch (e) {
54
- console.error(e.message);
55
- process.exit(1);
56
- }
57
- " 2>&1) && VALID=true || VALID=false
58
-
59
- if [[ "$VALID" == "true" ]]; then
60
- # Valid YAML - exit silently
61
- exit 0
62
- fi
63
-
64
- # Validation failed - return error context to agent
65
- # Escape special characters for JSON
66
- ESCAPED_ERROR=$(echo "$VALIDATION_ERROR" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | tr '\n' ' ')
67
- ESCAPED_PATH=$(echo "$FILE_PATH" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g')
68
-
69
- cat << EOF
70
- {
71
- "hookSpecificOutput": {
72
- "hookEventName": "PostToolUse",
73
- "additionalContext": "⚠️ SPRINT YAML VALIDATION FAILED\n\nFile: $ESCAPED_PATH\nError: $ESCAPED_ERROR\n\nThe sprint YAML file has invalid syntax that will break the Cyclist SprintPanel.\n\nCommon fix: Single-quoted strings cannot contain blank lines in YAML 1.2.\nUse literal block scalars (|) for multiline strings instead.\n\nTo auto-fix, run: yq eval -o=json '$ESCAPED_PATH' > /tmp/sprint.json && yq eval -P /tmp/sprint.json > '$ESCAPED_PATH'"
74
- }
75
- }
76
- EOF
77
-
78
- exit 0
1
+ #!/usr/bin/env bash
2
+ # DEPRECATED: This script is a shim. Logic has moved to Python.
3
+ # Use: pf hooks sprint-yaml
4
+ exec pf hooks sprint-yaml