@pennyfarthing/core 11.2.0 → 11.2.2

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 (367) hide show
  1. package/README.md +100 -40
  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 +474 -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 +7 -0
  16. package/packages/core/dist/cli/utils/settings.d.ts.map +1 -1
  17. package/packages/core/dist/cli/utils/settings.js +70 -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/dialogue-manager.d.ts +1 -1
  22. package/packages/core/dist/consultation/dialogue-manager.d.ts.map +1 -1
  23. package/packages/core/dist/consultation/dialogue-manager.js +1 -1
  24. package/packages/core/dist/consultation/dialogue-manager.js.map +1 -1
  25. package/packages/core/dist/consultation/dialogue-manager.test.js.map +1 -1
  26. package/packages/core/dist/consultation/tandem-metrics.d.ts +91 -0
  27. package/packages/core/dist/consultation/tandem-metrics.d.ts.map +1 -0
  28. package/packages/core/dist/consultation/tandem-metrics.js +131 -0
  29. package/packages/core/dist/consultation/tandem-metrics.js.map +1 -0
  30. package/packages/core/dist/consultation/tandem-metrics.test.d.ts +18 -0
  31. package/packages/core/dist/consultation/tandem-metrics.test.d.ts.map +1 -0
  32. package/packages/core/dist/consultation/tandem-metrics.test.js +457 -0
  33. package/packages/core/dist/consultation/tandem-metrics.test.js.map +1 -0
  34. package/packages/core/dist/public/css/react.css +1 -1
  35. package/packages/core/dist/public/js/react/react.js +14 -14
  36. package/packages/core/dist/server/api/agent-load.js +1 -1
  37. package/packages/core/dist/server/api/agent-load.js.map +1 -1
  38. package/packages/core/dist/server/api/git.d.ts.map +1 -1
  39. package/packages/core/dist/server/api/git.js +0 -1
  40. package/packages/core/dist/server/api/git.js.map +1 -1
  41. package/packages/core/dist/server/api/index.d.ts +2 -0
  42. package/packages/core/dist/server/api/index.d.ts.map +1 -1
  43. package/packages/core/dist/server/api/index.js +2 -0
  44. package/packages/core/dist/server/api/index.js.map +1 -1
  45. package/packages/core/dist/server/api/project-info.d.ts +11 -0
  46. package/packages/core/dist/server/api/project-info.d.ts.map +1 -0
  47. package/packages/core/dist/server/api/project-info.js +18 -0
  48. package/packages/core/dist/server/api/project-info.js.map +1 -0
  49. package/packages/core/dist/server/otlp-receiver.d.ts.map +1 -1
  50. package/packages/core/dist/server/otlp-receiver.js +18 -1
  51. package/packages/core/dist/server/otlp-receiver.js.map +1 -1
  52. package/packages/core/dist/server/otlp-receiver.test.js +1 -1
  53. package/packages/core/dist/server/otlp-receiver.test.js.map +1 -1
  54. package/packages/core/dist/server/server.d.ts +0 -3
  55. package/packages/core/dist/server/server.d.ts.map +1 -1
  56. package/packages/core/dist/server/server.js +5 -38
  57. package/packages/core/dist/server/server.js.map +1 -1
  58. package/packages/core/dist/server/server.test.d.ts +1 -1
  59. package/packages/core/dist/server/server.test.js +12 -23
  60. package/packages/core/dist/server/server.test.js.map +1 -1
  61. package/packages/core/dist/server/settings.d.ts +1 -0
  62. package/packages/core/dist/server/settings.d.ts.map +1 -1
  63. package/packages/core/dist/server/settings.js +13 -0
  64. package/packages/core/dist/server/settings.js.map +1 -1
  65. package/packages/core/dist/shared/capabilities.d.ts +88 -0
  66. package/packages/core/dist/shared/capabilities.d.ts.map +1 -0
  67. package/packages/core/dist/shared/capabilities.js +133 -0
  68. package/packages/core/dist/shared/capabilities.js.map +1 -0
  69. package/packages/core/dist/shared/capabilities.test.d.ts +2 -0
  70. package/packages/core/dist/shared/capabilities.test.d.ts.map +1 -0
  71. package/packages/core/dist/shared/capabilities.test.js +217 -0
  72. package/packages/core/dist/shared/capabilities.test.js.map +1 -0
  73. package/packages/core/dist/shared/spawn-prompt.d.ts +47 -0
  74. package/packages/core/dist/shared/spawn-prompt.d.ts.map +1 -0
  75. package/packages/core/dist/shared/spawn-prompt.js +82 -0
  76. package/packages/core/dist/shared/spawn-prompt.js.map +1 -0
  77. package/packages/core/dist/shared/spawn-prompt.test.d.ts +2 -0
  78. package/packages/core/dist/shared/spawn-prompt.test.d.ts.map +1 -0
  79. package/packages/core/dist/shared/spawn-prompt.test.js +251 -0
  80. package/packages/core/dist/shared/spawn-prompt.test.js.map +1 -0
  81. package/packages/core/dist/workflow/tandem-workflow-templates.test.d.ts +18 -0
  82. package/packages/core/dist/workflow/tandem-workflow-templates.test.d.ts.map +1 -0
  83. package/packages/core/dist/workflow/tandem-workflow-templates.test.js +434 -0
  84. package/packages/core/dist/workflow/tandem-workflow-templates.test.js.map +1 -0
  85. package/packages/core/dist/workflow/team-lifecycle.d.ts +169 -0
  86. package/packages/core/dist/workflow/team-lifecycle.d.ts.map +1 -0
  87. package/packages/core/dist/workflow/team-lifecycle.js +217 -0
  88. package/packages/core/dist/workflow/team-lifecycle.js.map +1 -0
  89. package/packages/core/dist/workflow/team-lifecycle.test.d.ts +20 -0
  90. package/packages/core/dist/workflow/team-lifecycle.test.d.ts.map +1 -0
  91. package/packages/core/dist/workflow/team-lifecycle.test.js +966 -0
  92. package/packages/core/dist/workflow/team-lifecycle.test.js.map +1 -0
  93. package/packages/core/dist/workflow/workflow-schema.d.ts +32 -0
  94. package/packages/core/dist/workflow/workflow-schema.d.ts.map +1 -1
  95. package/packages/core/dist/workflow/workflow-schema.js +120 -0
  96. package/packages/core/dist/workflow/workflow-schema.js.map +1 -1
  97. package/packages/core/dist/workflow/workflow-schema.test.d.ts.map +1 -1
  98. package/packages/core/dist/workflow/workflow-schema.test.js +570 -1
  99. package/packages/core/dist/workflow/workflow-schema.test.js.map +1 -1
  100. package/packages/core/dist/workflow/workflow-team-templates.test.d.ts +17 -0
  101. package/packages/core/dist/workflow/workflow-team-templates.test.d.ts.map +1 -0
  102. package/packages/core/dist/workflow/workflow-team-templates.test.js +275 -0
  103. package/packages/core/dist/workflow/workflow-team-templates.test.js.map +1 -0
  104. package/pennyfarthing-dist/agents/dev.md +21 -12
  105. package/pennyfarthing-dist/agents/reviewer.md +23 -4
  106. package/pennyfarthing-dist/agents/sm-finish.md +19 -2
  107. package/pennyfarthing-dist/agents/sm-setup.md +7 -7
  108. package/pennyfarthing-dist/agents/sm.md +12 -12
  109. package/pennyfarthing-dist/agents/tea.md +2 -2
  110. package/pennyfarthing-dist/agents/testing-runner.md +1 -1
  111. package/pennyfarthing-dist/commands/pf-architect.md +1 -1
  112. package/pennyfarthing-dist/commands/pf-ba.md +1 -1
  113. package/pennyfarthing-dist/commands/pf-chore.md +2 -2
  114. package/pennyfarthing-dist/commands/pf-dev.md +1 -1
  115. package/pennyfarthing-dist/commands/pf-devops.md +1 -1
  116. package/pennyfarthing-dist/commands/pf-epic.md +6 -6
  117. package/pennyfarthing-dist/commands/pf-git.md +12 -10
  118. package/pennyfarthing-dist/commands/pf-health-check.md +1 -1
  119. package/pennyfarthing-dist/commands/pf-help.md +12 -12
  120. package/pennyfarthing-dist/commands/pf-orchestrator.md +1 -1
  121. package/pennyfarthing-dist/commands/pf-pm.md +1 -1
  122. package/pennyfarthing-dist/commands/pf-prime.md +8 -8
  123. package/pennyfarthing-dist/commands/pf-reviewer.md +1 -1
  124. package/pennyfarthing-dist/commands/pf-session.md +7 -7
  125. package/pennyfarthing-dist/commands/pf-sm.md +1 -1
  126. package/pennyfarthing-dist/commands/pf-sprint.md +7 -7
  127. package/pennyfarthing-dist/commands/pf-tea.md +1 -1
  128. package/pennyfarthing-dist/commands/pf-tech-writer.md +1 -1
  129. package/pennyfarthing-dist/commands/pf-theme.md +9 -9
  130. package/pennyfarthing-dist/commands/pf-ux-designer.md +1 -1
  131. package/pennyfarthing-dist/commands/pf-work.md +1 -1
  132. package/pennyfarthing-dist/gates/approval.md +63 -0
  133. package/pennyfarthing-dist/gates/confidence-sm.md +71 -0
  134. package/pennyfarthing-dist/gates/context-ok.md +56 -0
  135. package/pennyfarthing-dist/gates/evaluations/confidence-sm.md +54 -0
  136. package/pennyfarthing-dist/gates/quality-pass.md +67 -0
  137. package/pennyfarthing-dist/gates/tests-fail.md +84 -0
  138. package/pennyfarthing-dist/gates/tests-pass.md +79 -0
  139. package/pennyfarthing-dist/guides/agent-behavior.md +84 -29
  140. package/pennyfarthing-dist/guides/agent-coordination.md +10 -10
  141. package/pennyfarthing-dist/guides/agent-tag-taxonomy.md +6 -6
  142. package/pennyfarthing-dist/guides/agent-template-tactical.md +1 -1
  143. package/pennyfarthing-dist/guides/bell-mode.md +1 -1
  144. package/pennyfarthing-dist/guides/bikerack.md +10 -10
  145. package/pennyfarthing-dist/guides/brownfield-tools.md +24 -24
  146. package/pennyfarthing-dist/guides/command-tag-taxonomy.md +1 -1
  147. package/pennyfarthing-dist/guides/gate-schema.md +2 -2
  148. package/pennyfarthing-dist/guides/gates.md +3 -3
  149. package/pennyfarthing-dist/guides/handoff-cli.md +8 -8
  150. package/pennyfarthing-dist/guides/hooks.md +29 -29
  151. package/pennyfarthing-dist/guides/prime.md +2 -2
  152. package/pennyfarthing-dist/guides/reflector.md +1 -1
  153. package/pennyfarthing-dist/guides/skill-schema.md +6 -6
  154. package/pennyfarthing-dist/guides/tandem-protocol.md +3 -3
  155. package/pennyfarthing-dist/guides/workflow-schema.md +1 -1
  156. package/pennyfarthing-dist/guides/worktree-mode.md +3 -3
  157. package/pennyfarthing-dist/guides/xml-tags.md +8 -8
  158. package/pennyfarthing-dist/scripts/README.md +4 -4
  159. package/pennyfarthing-dist/scripts/core/agent-session.sh +2 -5
  160. package/pennyfarthing-dist/scripts/core/check-context.sh +3 -1
  161. package/pennyfarthing-dist/scripts/core/pf.sh +5 -0
  162. package/pennyfarthing-dist/scripts/core/phase-check-start.sh +4 -89
  163. package/pennyfarthing-dist/scripts/core/prime.sh +2 -25
  164. package/pennyfarthing-dist/scripts/git/README.md +14 -14
  165. package/pennyfarthing-dist/scripts/git/create-feature-branches.sh +2 -3
  166. package/pennyfarthing-dist/scripts/git/git-status-all.sh +2 -3
  167. package/pennyfarthing-dist/scripts/git/install-git-hooks.sh +2 -3
  168. package/pennyfarthing-dist/scripts/git/worktree-manager.sh +2 -4
  169. package/pennyfarthing-dist/scripts/hooks/README.md +6 -6
  170. package/pennyfarthing-dist/scripts/hooks/bell-mode-hook.sh +4 -183
  171. package/pennyfarthing-dist/scripts/hooks/context-circuit-breaker.sh +4 -95
  172. package/pennyfarthing-dist/scripts/hooks/context-warning.sh +4 -65
  173. package/pennyfarthing-dist/scripts/hooks/cyclist-pretooluse-hook.sh +3 -31
  174. package/pennyfarthing-dist/scripts/hooks/otel-auto-config.sh +5 -4
  175. package/pennyfarthing-dist/scripts/hooks/pre-commit.sh +29 -34
  176. package/pennyfarthing-dist/scripts/hooks/pre-edit-check.sh +4 -71
  177. package/pennyfarthing-dist/scripts/hooks/question-reflector-check.sh +3 -19
  178. package/pennyfarthing-dist/scripts/hooks/schema-validation.sh +4 -30
  179. package/pennyfarthing-dist/scripts/hooks/session-start.sh +3 -32
  180. package/pennyfarthing-dist/scripts/hooks/session-stop.sh +4 -65
  181. package/pennyfarthing-dist/scripts/hooks/sprint-yaml-validation.sh +4 -78
  182. package/pennyfarthing-dist/scripts/hooks/welcome-hook.sh +3 -93
  183. package/pennyfarthing-dist/scripts/lib/env.sh +34 -0
  184. package/pennyfarthing-dist/scripts/lib/run-pf.sh +39 -0
  185. package/pennyfarthing-dist/scripts/misc/README.md +1 -1
  186. package/pennyfarthing-dist/scripts/misc/statusline.sh +4 -301
  187. package/pennyfarthing-dist/scripts/sprint/README.md +21 -21
  188. package/pennyfarthing-dist/scripts/workflow/README.md +2 -2
  189. package/pennyfarthing-dist/scripts/workflow/finish-story.sh +2 -16
  190. package/pennyfarthing-dist/scripts/workflow/fix-session-phase.sh +3 -3
  191. package/pennyfarthing-dist/scripts/workflow/get-workflow-type.sh +3 -3
  192. package/pennyfarthing-dist/scripts/workflow/list-workflows.sh +3 -3
  193. package/pennyfarthing-dist/scripts/workflow/phase-owner.sh +3 -3
  194. package/pennyfarthing-dist/scripts/workflow/resume-workflow.sh +3 -3
  195. package/pennyfarthing-dist/scripts/workflow/show-workflow.sh +3 -3
  196. package/pennyfarthing-dist/scripts/workflow/start-workflow.sh +3 -3
  197. package/pennyfarthing-dist/scripts/workflow/workflow-status.sh +3 -3
  198. package/pennyfarthing-dist/skills/pf-bc/examples.md +23 -23
  199. package/pennyfarthing-dist/skills/pf-bc/skill.md +17 -17
  200. package/pennyfarthing-dist/skills/pf-bc/usage.md +8 -8
  201. package/pennyfarthing-dist/skills/pf-jira/SKILL.md +15 -15
  202. package/pennyfarthing-dist/skills/pf-jira/examples.md +48 -48
  203. package/pennyfarthing-dist/skills/pf-jira/usage.md +15 -15
  204. package/pennyfarthing-dist/skills/pf-sprint/examples.md +80 -80
  205. package/pennyfarthing-dist/skills/pf-sprint/skill.md +35 -35
  206. package/pennyfarthing-dist/skills/pf-sprint/usage.md +30 -30
  207. package/pennyfarthing-dist/skills/pf-theme/examples.md +15 -15
  208. package/pennyfarthing-dist/skills/pf-theme/skill.md +6 -6
  209. package/pennyfarthing-dist/skills/pf-theme/usage.md +5 -5
  210. package/pennyfarthing-dist/skills/pf-workflow/examples.md +27 -27
  211. package/pennyfarthing-dist/skills/pf-workflow/skill.md +11 -11
  212. package/pennyfarthing-dist/skills/pf-workflow/usage.md +11 -11
  213. package/pennyfarthing-dist/skills/skill-registry.yaml +19 -19
  214. package/pennyfarthing-dist/templates/settings.local.json.template +19 -10
  215. package/pennyfarthing-dist/workflows/bdd-team.yaml +89 -0
  216. package/pennyfarthing-dist/workflows/epics-and-stories/steps/step-05-import-to-future.md +1 -1
  217. package/pennyfarthing-dist/workflows/git-cleanup/steps/step-01-analyze.md +1 -1
  218. package/pennyfarthing-dist/workflows/git-cleanup/steps/step-04-verify.md +1 -1
  219. package/pennyfarthing-dist/workflows/git-cleanup/steps/step-05-complete.md +1 -1
  220. package/pennyfarthing-dist/workflows/project-setup/steps/step-01-discover.md +47 -0
  221. package/pennyfarthing-dist/workflows/tdd-team.yaml +80 -0
  222. package/pennyfarthing-dist/workflows/tdd.yaml +11 -2
  223. package/pennyfarthing_scripts/CLAUDE.md +19 -10
  224. package/pennyfarthing_scripts/__init__.py +1 -1
  225. package/pennyfarthing_scripts/__pycache__/__init__.cpython-314.pyc +0 -0
  226. package/pennyfarthing_scripts/__pycache__/bellmode_hook.cpython-314.pyc +0 -0
  227. package/pennyfarthing_scripts/__pycache__/cli.cpython-314.pyc +0 -0
  228. package/pennyfarthing_scripts/__pycache__/context.cpython-314.pyc +0 -0
  229. package/pennyfarthing_scripts/__pycache__/hooks.cpython-314.pyc +0 -0
  230. package/pennyfarthing_scripts/__pycache__/pretooluse_hook.cpython-314.pyc +0 -0
  231. package/pennyfarthing_scripts/__pycache__/schema_validation_hook.cpython-314.pyc +0 -0
  232. package/pennyfarthing_scripts/__pycache__/session_start_hook.cpython-314.pyc +0 -0
  233. package/pennyfarthing_scripts/bc/__pycache__/cli.cpython-314.pyc +0 -0
  234. package/pennyfarthing_scripts/bc/__pycache__/focus.cpython-314.pyc +0 -0
  235. package/pennyfarthing_scripts/bc/__pycache__/split.cpython-314.pyc +0 -0
  236. package/pennyfarthing_scripts/bc/cli.py +2 -2
  237. package/pennyfarthing_scripts/bellmode_hook.py +9 -296
  238. package/pennyfarthing_scripts/bikerack/__pycache__/audit_log_panel.cpython-314.pyc +0 -0
  239. package/pennyfarthing_scripts/bikerack/__pycache__/background_panel.cpython-314.pyc +0 -0
  240. package/pennyfarthing_scripts/bikerack/__pycache__/base_panel.cpython-314.pyc +0 -0
  241. package/pennyfarthing_scripts/bikerack/__pycache__/changed_panel.cpython-314.pyc +0 -0
  242. package/pennyfarthing_scripts/bikerack/__pycache__/context_meter_footer.cpython-314.pyc +0 -0
  243. package/pennyfarthing_scripts/bikerack/__pycache__/debug_panel.cpython-314.pyc +0 -0
  244. package/pennyfarthing_scripts/bikerack/__pycache__/diffs_panel.cpython-314.pyc +0 -0
  245. package/pennyfarthing_scripts/bikerack/__pycache__/events.cpython-314.pyc +0 -0
  246. package/pennyfarthing_scripts/bikerack/__pycache__/git_panel.cpython-314.pyc +0 -0
  247. package/pennyfarthing_scripts/bikerack/__pycache__/launcher.cpython-314.pyc +0 -0
  248. package/pennyfarthing_scripts/bikerack/__pycache__/portrait_resolver.cpython-314.pyc +0 -0
  249. package/pennyfarthing_scripts/bikerack/__pycache__/progress_panel.cpython-314.pyc +0 -0
  250. package/pennyfarthing_scripts/bikerack/__pycache__/sprint_panel.cpython-314.pyc +0 -0
  251. package/pennyfarthing_scripts/bikerack/__pycache__/story_detail_data.cpython-314.pyc +0 -0
  252. package/pennyfarthing_scripts/bikerack/__pycache__/story_detail_screen.cpython-314.pyc +0 -0
  253. package/pennyfarthing_scripts/bikerack/__pycache__/tui.cpython-314.pyc +0 -0
  254. package/pennyfarthing_scripts/bikerack/__pycache__/ws_client.cpython-314.pyc +0 -0
  255. package/pennyfarthing_scripts/bikerack/audit_log_panel.py +161 -0
  256. package/pennyfarthing_scripts/bikerack/base_panel.py +27 -4
  257. package/pennyfarthing_scripts/bikerack/changed_panel.py +96 -4
  258. package/pennyfarthing_scripts/bikerack/context_meter_footer.py +88 -0
  259. package/pennyfarthing_scripts/bikerack/debug_panel.py +1 -1
  260. package/pennyfarthing_scripts/bikerack/diffs_panel.py +30 -0
  261. package/pennyfarthing_scripts/bikerack/events.py +28 -0
  262. package/pennyfarthing_scripts/bikerack/launcher.py +6 -6
  263. package/pennyfarthing_scripts/bikerack/portrait_resolver.py +139 -0
  264. package/pennyfarthing_scripts/bikerack/progress_panel.py +0 -1
  265. package/pennyfarthing_scripts/bikerack/sprint_panel.py +373 -142
  266. package/pennyfarthing_scripts/bikerack/story_detail_data.py +247 -0
  267. package/pennyfarthing_scripts/bikerack/story_detail_screen.py +177 -0
  268. package/pennyfarthing_scripts/bikerack/tui.py +304 -62
  269. package/pennyfarthing_scripts/bikerack/ws_client.py +2 -2
  270. package/pennyfarthing_scripts/cli.py +5 -0
  271. package/pennyfarthing_scripts/common/__pycache__/config.cpython-314.pyc +0 -0
  272. package/pennyfarthing_scripts/common/config.py +29 -2
  273. package/pennyfarthing_scripts/common/pr_config.py +38 -0
  274. package/pennyfarthing_scripts/consultation/__pycache__/__init__.cpython-314.pyc +0 -0
  275. package/pennyfarthing_scripts/consultation/__pycache__/cli.cpython-314.pyc +0 -0
  276. package/pennyfarthing_scripts/consultation/cli.py +3 -3
  277. package/pennyfarthing_scripts/context.py +3 -3
  278. package/pennyfarthing_scripts/git/__pycache__/__init__.cpython-314.pyc +0 -0
  279. package/pennyfarthing_scripts/git/__pycache__/create_branches.cpython-314.pyc +0 -0
  280. package/pennyfarthing_scripts/git/__pycache__/repos.cpython-314.pyc +0 -0
  281. package/pennyfarthing_scripts/git/__pycache__/status_all.cpython-314.pyc +0 -0
  282. package/pennyfarthing_scripts/git/hooks_installer.py +2 -3
  283. package/pennyfarthing_scripts/git/status_all.py +1 -1
  284. package/pennyfarthing_scripts/git/worktree.py +2 -2
  285. package/pennyfarthing_scripts/git_group/__pycache__/cli.cpython-314.pyc +0 -0
  286. package/pennyfarthing_scripts/handoff/__pycache__/cli.cpython-314.pyc +0 -0
  287. package/pennyfarthing_scripts/handoff/__pycache__/complete_phase.cpython-314.pyc +0 -0
  288. package/pennyfarthing_scripts/handoff/__pycache__/marker.cpython-314.pyc +0 -0
  289. package/pennyfarthing_scripts/handoff/__pycache__/phase_check.cpython-314.pyc +0 -0
  290. package/pennyfarthing_scripts/handoff/__pycache__/resolve_gate.cpython-314.pyc +0 -0
  291. package/pennyfarthing_scripts/handoff/cli.py +33 -1
  292. package/pennyfarthing_scripts/handoff/complete_phase.py +28 -0
  293. package/pennyfarthing_scripts/handoff/marker.py +15 -15
  294. package/pennyfarthing_scripts/handoff/phase_check.py +96 -0
  295. package/pennyfarthing_scripts/handoff/resolve_gate.py +13 -1
  296. package/pennyfarthing_scripts/hooks/__init__.py +442 -0
  297. package/pennyfarthing_scripts/hooks/__pycache__/__init__.cpython-314.pyc +0 -0
  298. package/pennyfarthing_scripts/hooks/__pycache__/bell_mode.cpython-314.pyc +0 -0
  299. package/pennyfarthing_scripts/hooks/__pycache__/cli.cpython-314.pyc +0 -0
  300. package/pennyfarthing_scripts/hooks/__pycache__/context_breaker.cpython-314.pyc +0 -0
  301. package/pennyfarthing_scripts/hooks/__pycache__/context_warning.cpython-314.pyc +0 -0
  302. package/pennyfarthing_scripts/hooks/__pycache__/cyclist_pretooluse.cpython-314.pyc +0 -0
  303. package/pennyfarthing_scripts/hooks/__pycache__/pre_edit_check.cpython-314.pyc +0 -0
  304. package/pennyfarthing_scripts/hooks/__pycache__/reflector_check.cpython-314.pyc +0 -0
  305. package/pennyfarthing_scripts/hooks/__pycache__/schema_validation.cpython-314.pyc +0 -0
  306. package/pennyfarthing_scripts/hooks/__pycache__/session_start.cpython-314.pyc +0 -0
  307. package/pennyfarthing_scripts/hooks/__pycache__/session_stop.cpython-314.pyc +0 -0
  308. package/pennyfarthing_scripts/hooks/__pycache__/sprint_yaml_validation.cpython-314.pyc +0 -0
  309. package/pennyfarthing_scripts/hooks/__pycache__/statusline.cpython-314.pyc +0 -0
  310. package/pennyfarthing_scripts/hooks/bell_mode.py +214 -0
  311. package/pennyfarthing_scripts/hooks/cli.py +96 -0
  312. package/pennyfarthing_scripts/hooks/context_breaker.py +104 -0
  313. package/pennyfarthing_scripts/hooks/context_warning.py +66 -0
  314. package/pennyfarthing_scripts/hooks/cyclist_pretooluse.py +129 -0
  315. package/pennyfarthing_scripts/hooks/pre_edit_check.py +77 -0
  316. package/pennyfarthing_scripts/hooks/reflector_check.py +270 -0
  317. package/pennyfarthing_scripts/hooks/schema_validation.py +202 -0
  318. package/pennyfarthing_scripts/hooks/session_start.py +294 -0
  319. package/pennyfarthing_scripts/hooks/session_stop.py +111 -0
  320. package/pennyfarthing_scripts/hooks/sprint_yaml_validation.py +97 -0
  321. package/pennyfarthing_scripts/hooks/statusline.py +429 -0
  322. package/pennyfarthing_scripts/hooks.py +27 -432
  323. package/pennyfarthing_scripts/pretooluse_hook.py +3 -185
  324. package/pennyfarthing_scripts/prime/__pycache__/workflow.cpython-314.pyc +0 -0
  325. package/pennyfarthing_scripts/prime/heatmap.py +3 -15
  326. package/pennyfarthing_scripts/prime/workflow.py +2 -1
  327. package/pennyfarthing_scripts/schema_validation_hook.py +3 -298
  328. package/pennyfarthing_scripts/session_start_hook.py +4 -186
  329. package/pennyfarthing_scripts/sprint/__pycache__/cli.cpython-314.pyc +0 -0
  330. package/pennyfarthing_scripts/sprint/__pycache__/loader.cpython-314.pyc +0 -0
  331. package/pennyfarthing_scripts/sprint/__pycache__/story_finish.cpython-314.pyc +0 -0
  332. package/pennyfarthing_scripts/sprint/__pycache__/story_update.cpython-314.pyc +0 -0
  333. package/pennyfarthing_scripts/sprint/cli.py +121 -0
  334. package/pennyfarthing_scripts/sprint/loader.py +154 -3
  335. package/pennyfarthing_scripts/sprint/story_update.py +26 -0
  336. package/pennyfarthing_scripts/tests/__pycache__/test_bikerack.cpython-314-pytest-9.0.2.pyc +0 -0
  337. package/pennyfarthing_scripts/tests/__pycache__/test_handoff_cli.cpython-314-pytest-9.0.2.pyc +0 -0
  338. package/pennyfarthing_scripts/tests/__pycache__/test_workflow_list_team.cpython-314-pytest-9.0.2.pyc +0 -0
  339. package/pennyfarthing_scripts/tests/test_bikerack.py +26 -26
  340. package/pennyfarthing_scripts/tests/test_dialogue_manager.py +0 -1
  341. package/pennyfarthing_scripts/tests/test_sprint_panel.py +344 -265
  342. package/pennyfarthing_scripts/tests/test_workflow_list_team.py +147 -0
  343. package/pennyfarthing_scripts/validate/__pycache__/cli.cpython-314.pyc +0 -0
  344. package/pennyfarthing_scripts/validate/adapters/__pycache__/skill_command.cpython-314.pyc +0 -0
  345. package/pennyfarthing_scripts/validate/adapters/__pycache__/tandem_awareness.cpython-314.pyc +0 -0
  346. package/pennyfarthing_scripts/validate/adapters/__pycache__/team_mode.cpython-314.pyc +0 -0
  347. package/pennyfarthing_scripts/validate/adapters/__pycache__/workflow.cpython-314.pyc +0 -0
  348. package/pennyfarthing_scripts/validate/adapters/team_mode.py +323 -0
  349. package/pennyfarthing_scripts/validate/adapters/workflow.py +19 -0
  350. package/pennyfarthing_scripts/welcome_hook.py +3 -149
  351. package/pennyfarthing_scripts/workflow/__pycache__/__init__.cpython-314.pyc +0 -0
  352. package/pennyfarthing_scripts/workflow/__pycache__/cli.cpython-314.pyc +0 -0
  353. package/pennyfarthing_scripts/workflow/__pycache__/helpers.cpython-314.pyc +0 -0
  354. package/pennyfarthing_scripts/workflow/__pycache__/scale.cpython-314.pyc +0 -0
  355. package/pennyfarthing_scripts/workflow/__pycache__/state.cpython-314.pyc +0 -0
  356. package/pennyfarthing_scripts/workflow/__pycache__/team_lifecycle.cpython-314.pyc +0 -0
  357. package/pennyfarthing_scripts/workflow/cli.py +22 -20
  358. package/pennyfarthing_scripts/workflow/state.py +0 -1
  359. package/pennyfarthing_scripts/workflow/team_lifecycle.py +256 -0
  360. package/packages/core/dist/cli/cyclist-migration.test.d.ts +0 -16
  361. package/packages/core/dist/cli/cyclist-migration.test.d.ts.map +0 -1
  362. package/packages/core/dist/cli/cyclist-migration.test.js +0 -229
  363. package/packages/core/dist/cli/cyclist-migration.test.js.map +0 -1
  364. package/packages/core/dist/scripts/theme-detail.test.d.ts +0 -10
  365. package/packages/core/dist/scripts/theme-detail.test.d.ts.map +0 -1
  366. package/packages/core/dist/scripts/theme-detail.test.js +0 -199
  367. package/packages/core/dist/scripts/theme-detail.test.js.map +0 -1
@@ -4,7 +4,7 @@ Pennyfarthing uses Claude Code hooks to integrate with session lifecycle events
4
4
 
5
5
  ## Overview
6
6
 
7
- Hooks are shell scripts that Claude Code runs at specific events:
7
+ Hooks are commands that Claude Code runs at specific events:
8
8
 
9
9
  | Hook Type | When It Runs | Purpose |
10
10
  |-----------|--------------|---------|
@@ -16,18 +16,18 @@ Hooks are shell scripts that Claude Code runs at specific events:
16
16
 
17
17
  ### SessionStart Hooks
18
18
 
19
- #### session-start.sh
19
+ #### pf.sh hooks session-start
20
20
 
21
- **Location:** `.pennyfarthing/scripts/hooks/session-start.sh`
21
+ **Location:** `pf.sh hooks session-start`
22
22
 
23
23
  Initializes the Pennyfarthing environment:
24
24
  - Creates `.session/` directory structure
25
25
  - Clears stale agent state from previous sessions
26
26
  - Sets `PROJECT_ROOT` and `SESSION_ID` environment variables
27
27
 
28
- #### session-stop.sh
28
+ #### pf.sh hooks session-stop
29
29
 
30
- **Location:** `.pennyfarthing/scripts/hooks/session-stop.sh`
30
+ **Location:** `pf.sh hooks session-stop`
31
31
 
32
32
  Cleans up session state when Claude Code exits.
33
33
 
@@ -44,68 +44,68 @@ Project-specific environment setup. Edit this file to:
44
44
 
45
45
  **Location:** `.pennyfarthing/scripts/hooks/otel-auto-config.sh`
46
46
 
47
- Auto-configures OTEL telemetry for Cyclist web mode. Checks for a `.wheelhub-port` file and sets `OTEL_EXPORTER_OTLP_PROTOCOL` and `OTEL_EXPORTER_OTLP_ENDPOINT` to route Claude Code telemetry to the running Cyclist/BikeRack server.
47
+ Auto-configures OTEL telemetry for Cyclist web mode. Checks for a `.bikerack-port` file and sets `OTEL_EXPORTER_OTLP_PROTOCOL` and `OTEL_EXPORTER_OTLP_ENDPOINT` to route Claude Code telemetry to the running Cyclist/BikeRack server.
48
48
 
49
- #### welcome-hook.sh
49
+ #### pf.sh hooks session-start (welcome)
50
50
 
51
- **Location:** `.pennyfarthing/scripts/hooks/welcome-hook.sh`
51
+ **Location:** `pf.sh hooks session-start`
52
52
 
53
- Displays a welcome message on session start. In CLI mode, shows ASCII art. In Cyclist mode, sends a WebSocket message to display the logo. Runs once per session (lock file guard).
53
+ Welcome display is now folded into `pf.sh hooks session-start`. In CLI mode, shows ASCII art. In Cyclist mode, sends a WebSocket message to display the logo. Runs once per session (lock file guard).
54
54
 
55
55
  ### PreToolUse Hooks
56
56
 
57
- #### pre-edit-check.sh
57
+ #### pf.sh hooks pre-edit-check
58
58
 
59
- **Location:** `.pennyfarthing/scripts/hooks/pre-edit-check.sh`
59
+ **Location:** `pf.sh hooks pre-edit-check`
60
60
 
61
61
  Protects sensitive files from accidental edits:
62
62
  - Blocks: `.env`, `.pem`, `.key`, credentials, secrets
63
63
  - Blocks: `.git/`, `node_modules/`, `vendor/`
64
64
  - Blocks: `.pennyfarthing/*` (managed files)
65
65
 
66
- #### cyclist-pretooluse-hook.sh
66
+ #### pf.sh hooks cyclist-pretooluse
67
67
 
68
- **Location:** `.pennyfarthing/scripts/hooks/cyclist-pretooluse-hook.sh`
68
+ **Location:** `pf.sh hooks cyclist-pretooluse`
69
69
 
70
70
  Cyclist-specific pre-tool validation. Runs additional safety checks when operating inside Cyclist.
71
71
 
72
- #### context-warning.sh
72
+ #### pf.sh hooks context-warning
73
73
 
74
- **Location:** `.pennyfarthing/scripts/hooks/context-warning.sh`
74
+ **Location:** `pf.sh hooks context-warning`
75
75
 
76
76
  Warns agents when context usage is high. Outputs a warning at 60% usage and a critical warning at 85%. Never blocks — warning only (always exits 0).
77
77
 
78
- #### context-circuit-breaker.sh
78
+ #### pf.sh hooks context-breaker
79
79
 
80
- **Location:** `.pennyfarthing/scripts/hooks/context-circuit-breaker.sh`
80
+ **Location:** `pf.sh hooks context-breaker`
81
81
 
82
- Hard stop when context reaches 80% (configurable via `CRITICAL_THRESHOLD`). Unlike `context-warning.sh`, this **blocks tool execution** (exit 2). Auto-saves the active agent to a checkpoint so `/pf-session continue` can restore it with FULL tier context.
82
+ Hard stop when context reaches 80% (configurable via `CRITICAL_THRESHOLD`). Unlike `pf.sh hooks context-warning`, this **blocks tool execution** (exit 2). Auto-saves the active agent to a checkpoint so `/pf-session continue` can restore it with FULL tier context.
83
83
 
84
- #### schema-validation.sh
84
+ #### pf.sh hooks schema-validation
85
85
 
86
- **Location:** `.pennyfarthing/scripts/hooks/schema-validation.sh`
86
+ **Location:** `pf.sh hooks schema-validation`
87
87
 
88
88
  Validates file writes against XML schema rules for agent definitions, workflow files, and other structured content.
89
89
 
90
- #### sprint-yaml-validation.sh
90
+ #### pf.sh hooks sprint-yaml
91
91
 
92
- **Location:** `.pennyfarthing/scripts/hooks/sprint-yaml-validation.sh`
92
+ **Location:** `pf.sh hooks sprint-yaml`
93
93
 
94
94
  Validates sprint YAML files on write to prevent structural corruption.
95
95
 
96
96
  ### PostToolUse Hooks
97
97
 
98
- #### bell-mode-hook.sh
98
+ #### pf.sh hooks bell-mode
99
99
 
100
- **Location:** `.pennyfarthing/scripts/hooks/bell-mode-hook.sh`
100
+ **Location:** `pf.sh hooks bell-mode`
101
101
 
102
102
  Bell mode message injection. Checks the bell mode queue and injects queued messages into the agent's context at the next tool execution. Also handles tandem observation injection.
103
103
 
104
- #### question-reflector-check.sh / question_reflector_check.py
104
+ #### pf.sh hooks reflector-check
105
105
 
106
- **Location:** `.pennyfarthing/scripts/hooks/question-reflector-check.sh`
106
+ **Location:** `pf.sh hooks reflector-check`
107
107
 
108
- Stop hook enforcing that every agent turn ends with a CYCLIST marker. Detects questions, handoff phrases, and validates marker presence. Blocks turns without valid markers in Cyclist mode. The `.sh` file wraps the Python implementation.
108
+ Stop hook enforcing that every agent turn ends with a CYCLIST marker. Detects questions, handoff phrases, and validates marker presence. Blocks turns without valid markers in Cyclist mode.
109
109
 
110
110
  ### Git Hooks
111
111
 
@@ -133,7 +133,7 @@ Hooks are configured in `.claude/settings.local.json`:
133
133
  "hooks": [
134
134
  {
135
135
  "type": "command",
136
- "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/pennyfarthing/scripts/hooks/session-start.sh"
136
+ "command": "pf.sh hooks session-start"
137
137
  }
138
138
  ]
139
139
  }
@@ -144,7 +144,7 @@ Hooks are configured in `.claude/settings.local.json`:
144
144
  "hooks": [
145
145
  {
146
146
  "type": "command",
147
- "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/pennyfarthing/scripts/hooks/pre-edit-check.sh"
147
+ "command": "pf.sh hooks pre-edit-check"
148
148
  }
149
149
  ]
150
150
  }
@@ -53,7 +53,7 @@ Prime selects a context tier based on session state to manage token overhead:
53
53
 
54
54
  ```bash
55
55
  # From agent commands (via pf CLI)
56
- pf agent start "<agent>" --quiet
56
+ pf.sh agent start "<agent>" --quiet
57
57
 
58
58
  # TypeScript API (from Cyclist)
59
59
  getPrimeContext(agentName, projectDir)
@@ -63,7 +63,7 @@ getPrimeContextJson(agentName, projectDir, tier) # JSON for Cyclist
63
63
 
64
64
  ## Integration Points
65
65
 
66
- - **Agent commands** (`/sm`, `/dev`, `/tea`) invoke prime on activation
66
+ - **Agent commands** (`/pf-sm`, `/pf-dev`, `/pf-tea`) invoke prime on activation
67
67
  - **TirePump** calls prime to reload agent context after clearing
68
68
  - **Cyclist** uses JSON output for context display and token tracking
69
69
 
@@ -41,7 +41,7 @@ Marker pattern: /<!--\s*CYCLIST:(\w+)(?::([^>]+?))?\s*-->/gi
41
41
  | `packages/cyclist/src/public/components/QuickActions.tsx` | Renders action buttons from detected markers |
42
42
  | `packages/cyclist/src/public/hooks/useMarkerActions.ts` | Detects markers, builds action metadata |
43
43
  | `pennyfarthing-dist/scripts/hooks/question_reflector_check.py` | Stop hook — enforces marker presence |
44
- | `pennyfarthing-dist/scripts/hooks/question-reflector-check.sh` | Bash wrapper for stop hook |
44
+ | `pf.sh hooks reflector-check` | CLI entry point for stop hook |
45
45
 
46
46
  ## Enforcement Hook
47
47
 
@@ -146,7 +146,7 @@ args: "[arg1|arg2]" # Optional: argument summary
146
146
  **Example:**
147
147
  ```xml
148
148
  <run>
149
- pf sprint status [filter]
149
+ pf.sh sprint status [filter]
150
150
  </run>
151
151
  ```
152
152
 
@@ -195,7 +195,7 @@ pf sprint status [filter]
195
195
  **Example:**
196
196
  ```xml
197
197
  <example>
198
- pf sprint check MSSCI-12038
198
+ pf.sh sprint check MSSCI-12038
199
199
  # Returns: {"type": "story", "available": true, "title": "...", ...}
200
200
  </example>
201
201
  ```
@@ -292,7 +292,7 @@ Never manually edit sprint YAML. Use the provided commands.
292
292
  Add a new story to an epic.
293
293
 
294
294
  <run>
295
- pf sprint story add <epic-id> "<title>" <points>
295
+ pf.sh sprint story add <epic-id> "<title>" <points>
296
296
  </run>
297
297
 
298
298
  <args>
@@ -304,7 +304,7 @@ pf sprint story add <epic-id> "<title>" <points>
304
304
  </args>
305
305
 
306
306
  <example>
307
- pf sprint story add epic-76 "Add user authentication" 3
307
+ pf.sh sprint story add epic-76 "Add user authentication" 3
308
308
  </example>
309
309
 
310
310
  <output>
@@ -322,7 +322,7 @@ After creating, use `/pf-sprint story size` for sizing guidelines.
322
322
  Complete a story after PR merge.
323
323
 
324
324
  <run>
325
- pf sprint story finish <story-id>
325
+ pf.sh sprint story finish <story-id>
326
326
  </run>
327
327
 
328
328
  <args>
@@ -332,7 +332,7 @@ pf sprint story finish <story-id>
332
332
  </args>
333
333
 
334
334
  <example>
335
- pf sprint story finish MSSCI-12052
335
+ pf.sh sprint story finish MSSCI-12052
336
336
  # Archives story, updates Jira, cleans session files
337
337
  </example>
338
338
 
@@ -13,7 +13,7 @@ Primary Agent (Opus) Backseat Agent (Haiku, background)
13
13
  │ │ .session/{story}-tandem-{partner}.md
14
14
  │ │
15
15
  ├── PostToolUse hook fires ────┤
16
- │ bell-mode-hook.sh detects
16
+ pf.sh hooks bell-mode detects
17
17
  │ new observation, injects │
18
18
  │ "[Tandem] Character: ..." │
19
19
  │ │
@@ -163,8 +163,8 @@ For active, synchronous agent-to-agent questions (as opposed to passive observat
163
163
  | `observation-writer.ts` | Built | TypeScript API for observation file I/O |
164
164
  | `file-watch.ts` | Built | File system change detection |
165
165
  | `tool-watch.ts` | Built | Tool call log monitoring |
166
- | `bell-mode-hook.sh` | Built | PostToolUse hook with tandem injection |
166
+ | `pf.sh hooks bell-mode` | Built | PostToolUse hook with tandem injection |
167
167
  | `bellmode_hook.py` | Built | Python implementation of bell mode hook |
168
- | `statusline.sh` | Built | CLI statusline with tandem indicator |
168
+ | `pf.sh hooks statusline` | Built | CLI statusline with tandem indicator |
169
169
  | `tandem-backseat.md` | Built | Backseat agent prompt template |
170
170
  | `agent-behavior.md` | Built | Shared agent behavior with tandem protocol |
@@ -253,5 +253,5 @@ Error: workflow.triggers.points min (10) cannot be greater than max (5)
253
253
 
254
254
  - Story 31-2: Workflow loader and validator
255
255
  - Story 31-3: Story-to-workflow routing engine
256
- - Story 31-5: /workflow skill for listing and switching
256
+ - Story 31-5: /pf-workflow skill for listing and switching
257
257
  - Story MSSCI-11710: Permission presets by workflow
@@ -86,8 +86,8 @@ Ports are stored in the session file and passed to agents.
86
86
  | Command | Purpose |
87
87
  |---------|---------|
88
88
  | `/pf-session parallel` | Start a new parallel work session |
89
- | `pf git worktree list` | Show active worktrees |
90
- | `pf git worktree remove <name>` | Clean up a worktree |
89
+ | `pf.sh git worktree list` | Show active worktrees |
90
+ | `pf.sh git worktree remove <name>` | Clean up a worktree |
91
91
 
92
92
  ## TDD Flow in Worktrees
93
93
 
@@ -104,7 +104,7 @@ Agents use worktree paths from session file for all operations.
104
104
  When story is complete, SM archives the session and the worktree can be removed:
105
105
 
106
106
  ```bash
107
- pf git worktree remove wt-5-3a
107
+ pf.sh git worktree remove wt-5-3a
108
108
  ```
109
109
 
110
110
  This removes:
@@ -124,7 +124,7 @@ Tags used by agents participating in the TDD workflow cycle (SM, TEA, Dev, Revie
124
124
 
125
125
  **Purpose:** Verify agent owns the current workflow phase before proceeding. Prevents agents from acting on stories they shouldn't own.
126
126
 
127
- **Usage:** SM, TEA, Dev, Reviewer - runs `pf workflow phase-check` on activation to determine correct owner.
127
+ **Usage:** SM, TEA, Dev, Reviewer - runs `pf.sh workflow phase-check` on activation to determine correct owner.
128
128
 
129
129
  ```markdown
130
130
  <phase-check>
@@ -132,10 +132,10 @@ Tags used by agents participating in the TDD workflow cycle (SM, TEA, Dev, Revie
132
132
 
133
133
  Read `**Workflow:**` and `**Phase:**` from session. Query:
134
134
  ```bash
135
- OWNER=$(pf workflow phase-check {workflow} {phase})
135
+ OWNER=$("$CLAUDE_PROJECT_DIR"/.pennyfarthing/scripts/core/pf.sh workflow phase-check {workflow} {phase})
136
136
  ```
137
137
 
138
- **If OWNER != "dev":** Run `pf handoff marker $OWNER`, output result, tell user.
138
+ **If OWNER != "dev":** Run `pf.sh handoff marker $OWNER`, output result, tell user.
139
139
  </phase-check>
140
140
  ```
141
141
 
@@ -150,9 +150,9 @@ OWNER=$(pf workflow phase-check {workflow} {phase})
150
150
  ## MANDATORY: Complete Before Exiting
151
151
 
152
152
  - [ ] Write Assessment to session file
153
- - [ ] Run `pf handoff resolve-gate` — verify gate status
154
- - [ ] Run `pf handoff complete-phase` — atomic session update
155
- - [ ] Run `pf handoff marker {next_agent}` — emit marker and EXIT
153
+ - [ ] Run `pf.sh handoff resolve-gate` — verify gate status
154
+ - [ ] Run `pf.sh handoff complete-phase` — atomic session update
155
+ - [ ] Run `pf.sh handoff marker {next_agent}` — emit marker and EXIT
156
156
  </handoff-gate>
157
157
  ```
158
158
 
@@ -448,7 +448,7 @@ Tags used in skill files (`skills/{name}/SKILL.md`) for command documentation.
448
448
 
449
449
  ```markdown
450
450
  <run>
451
- pf sprint status [filter]
451
+ pf.sh sprint status [filter]
452
452
  </run>
453
453
  ```
454
454
 
@@ -474,7 +474,7 @@ pf sprint status [filter]
474
474
 
475
475
  ```markdown
476
476
  <example>
477
- pf sprint check MSSCI-12038
477
+ pf.sh sprint check MSSCI-12038
478
478
  # Returns: {"type": "story", "available": true}
479
479
  </example>
480
480
  ```
@@ -8,10 +8,10 @@ Scripts are organized into categorical subdirectories. **Full paths are required
8
8
  scripts/
9
9
  ├── core/ # Essential scripts (agent-session.sh)
10
10
  ├── workflow/ # Workflow mechanics (finish-story.sh, check.sh)
11
- ├── sprint/ # Sprint YAML operations (migrated to pf sprint CLI)
11
+ ├── sprint/ # Sprint YAML operations (migrated to pf.sh sprint CLI)
12
12
  ├── story/ # Story operations (create-story.sh)
13
13
  ├── jira/ # Jira integration (jira-claim-story.sh)
14
- ├── git/ # Git operations (deprecated shims → pf git CLI)
14
+ ├── git/ # Git operations (deprecated shims → pf.sh git CLI)
15
15
  ├── theme/ # Theme operations (list-themes.sh)
16
16
  ├── test/ # Test infrastructure (test-setup.sh)
17
17
  ├── lib/ # Shared bash libraries (common.sh, logging.sh)
@@ -27,9 +27,9 @@ Scripts are invoked directly with **full category paths**:
27
27
  ```bash
28
28
  # From project root
29
29
  .pennyfarthing/scripts/core/agent-session.sh start sm
30
- pf sprint status
30
+ pf.sh sprint status
31
31
  .pennyfarthing/scripts/jira/jira-claim-story.sh MSSCI-12345
32
- pf sprint story finish MSSCI-12345
32
+ pf.sh sprint story finish MSSCI-12345
33
33
  ```
34
34
 
35
35
  ## Distributed Scripts
@@ -232,11 +232,8 @@ case "$1" in
232
232
  PRIME_ARGS+=(--no-persona)
233
233
  fi
234
234
 
235
- if command -v pf &>/dev/null; then
236
- pf prime "${PRIME_ARGS[@]}"
237
- else
238
- python3 -m pennyfarthing_scripts.prime "${PRIME_ARGS[@]}"
239
- fi
235
+ source "$SCRIPT_DIR/../lib/run-pf.sh"
236
+ run_pf prime "${PRIME_ARGS[@]}"
240
237
  ;;
241
238
  stop)
242
239
  # Use provided session ID, fall back to SESSION_ID env var
@@ -12,6 +12,8 @@
12
12
 
13
13
  set -euo pipefail
14
14
 
15
+ echo "DEPRECATED: check-context.sh — use 'pf context' instead" >&2
16
+
15
17
  # Find project root (where pennyfarthing_scripts lives)
16
18
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
17
19
 
@@ -154,7 +156,7 @@ if last_total:
154
156
  status = 'HIGH' if usable_pct > $WARNING_THRESHOLD else 'OK'
155
157
  relay = '$RELAY_MODE' == 'true'
156
158
  tirepump = (relay or '$PERMISSION_MODE' == 'turbo') and usable_pct > $TIREPUMP_THRESHOLD
157
- is_cyclist = os.environ.get('CYCLIST') == '1' or Path('$PROJECT_DIR/packages/cyclist/.wheelhub-port').exists()
159
+ is_cyclist = os.environ.get('CYCLIST') == '1' or Path('$PROJECT_DIR/packages/cyclist/.bikerack-port').exists()
158
160
 
159
161
  print(f'CONTEXT_TOKENS={last_total}')
160
162
  print(f'CONTEXT_PERCENT={total_pct}')
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env bash
2
+ # Wrapper: run `pf` CLI via uv run — no global pf install needed.
3
+ # Usage: "$CLAUDE_PROJECT_DIR"/.pennyfarthing/scripts/core/pf.sh <command> [args...]
4
+ source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)/../lib/run-pf.sh"
5
+ exec_pf "$@"
@@ -1,90 +1,5 @@
1
1
  #!/bin/bash
2
- # Start an agent with phase check
3
- # If the current story's phase belongs to a different agent, emit handoff marker instead
4
- #
5
- # Usage: .pennyfarthing/scripts/core/phase-check-start.sh <agent>
6
- # Example: phase-check-start.sh dev
7
-
8
- set -euo pipefail
9
-
10
- AGENT="${1:-}"
11
-
12
- if [[ -z "$AGENT" ]]; then
13
- echo "Usage: phase-check-start.sh <agent>" >&2
14
- exit 1
15
- fi
16
-
17
- # Self-locate and set up PROJECT_ROOT
18
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
19
- source "$SCRIPT_DIR/../lib/find-root.sh"
20
-
21
- SCRIPTS_DIR="$SCRIPT_DIR/.."
22
- SESSION_DIR="$PROJECT_ROOT/.session"
23
-
24
- # Find active session file
25
- SESSION_FILE=$(find "$SESSION_DIR" -maxdepth 1 -name "*-session.md" 2>/dev/null | head -1)
26
-
27
- if [[ -z "$SESSION_FILE" || ! -f "$SESSION_FILE" ]]; then
28
- # No session - just start the agent normally
29
- exec "$SCRIPTS_DIR/core/agent-session.sh" start "$AGENT"
30
- fi
31
-
32
- # Extract workflow and phase from session (handles multiple formats)
33
- # Format 1: **Workflow:** value
34
- # Format 2: - **Workflow**: value
35
- WORKFLOW=$(grep -E "\*\*Workflow\*?\*?:" "$SESSION_FILE" 2>/dev/null | head -1 | sed 's/.*\*\*Workflow\*\*[:\*]* *//' | tr -d ' ' || echo "")
36
- PHASE=$(grep -E "\*\*Phase\*?\*?:" "$SESSION_FILE" 2>/dev/null | head -1 | sed 's/.*\*\*Phase\*\*[:\*]* *//' | tr -d ' ' || echo "")
37
-
38
- if [[ -z "$WORKFLOW" ]]; then
39
- # Can't determine workflow - start normally
40
- exec "$SCRIPTS_DIR/core/agent-session.sh" start "$AGENT"
41
- fi
42
-
43
- # If no Phase field, try to infer from status patterns
44
- if [[ -z "$PHASE" ]]; then
45
- # Check for approval status (story is done, needs SM to close)
46
- if grep -qE "\*\*Status\*\*:.*APPROVED" "$SESSION_FILE" 2>/dev/null; then
47
- PHASE="approved"
48
- # Check for review status
49
- elif grep -qE "Reviewer Assessment|Review.*REJECTED\|Review.*APPROVED" "$SESSION_FILE" 2>/dev/null; then
50
- PHASE="review"
51
- # Check for green/implementation complete
52
- elif grep -qE "Dev Assessment|\*\*Status\*\*:.*GREEN" "$SESSION_FILE" 2>/dev/null; then
53
- # Has dev assessment - could be in review or approved
54
- if grep -qE "Reviewer Assessment" "$SESSION_FILE" 2>/dev/null; then
55
- PHASE="approved" # Reviewer already assessed
56
- else
57
- PHASE="review" # Needs reviewer
58
- fi
59
- # Check for red/test phase
60
- elif grep -qE "TEA Assessment|\*\*Status\*\*:.*RED" "$SESSION_FILE" 2>/dev/null; then
61
- PHASE="green" # TEA done, Dev's turn
62
- else
63
- # Can't determine phase - start normally
64
- exec "$SCRIPTS_DIR/core/agent-session.sh" start "$AGENT"
65
- fi
66
- fi
67
-
68
- # Get the owner of this phase
69
- OWNER=$("$SCRIPTS_DIR/workflow/phase-owner.sh" "$WORKFLOW" "$PHASE" 2>/dev/null || echo "")
70
-
71
- if [[ -z "$OWNER" ]]; then
72
- # Phase owner lookup failed - start normally
73
- exec "$SCRIPTS_DIR/core/agent-session.sh" start "$AGENT"
74
- fi
75
-
76
- # Check if this agent owns the phase
77
- if [[ "$OWNER" == "$AGENT" ]]; then
78
- # Correct agent - start normally
79
- exec "$SCRIPTS_DIR/core/agent-session.sh" start "$AGENT"
80
- fi
81
-
82
- # Wrong agent! Output the handoff marker and info
83
- STORY_ID=$(basename "$SESSION_FILE" -session.md)
84
-
85
- echo "Phase check: Story $STORY_ID is in '$PHASE' phase (workflow: $WORKFLOW)"
86
- echo "Phase owner: $OWNER (you requested: $AGENT)"
87
- echo ""
88
-
89
- # Generate and output the handoff marker
90
- pf handoff marker "$OWNER"
2
+ # DEPRECATED: Use `pf handoff phase-check <agent>` instead.
3
+ echo "DEPRECATED: phase-check-start.sh use 'pf handoff phase-check $1' instead" >&2
4
+ source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)/../lib/run-pf.sh"
5
+ exec_pf handoff phase-check "$@"
@@ -1,28 +1,5 @@
1
1
  #!/usr/bin/env bash
2
2
  # prime.sh - Load essential project context at agent activation
3
3
  # Usage: prime.sh [--minimal] [--full] [--quiet] [--agent <name>]
4
- #
5
- # Uses the `pf` CLI (installed via uv/pipx during pennyfarthing init).
6
- # Falls back to python3 -m with PYTHONPATH if pf is not available.
7
-
8
- # Prefer pf CLI if available
9
- if command -v pf &>/dev/null; then
10
- exec pf prime "$@"
11
- fi
12
-
13
- # Fallback: find pennyfarthing_scripts via PYTHONPATH
14
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
15
- PACKAGE_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd -P)"
16
-
17
- if [[ ! -d "$PACKAGE_ROOT/pennyfarthing_scripts" ]]; then
18
- PROJECT_ROOT="$PWD"
19
- while [[ ! -d "$PROJECT_ROOT/.pennyfarthing" ]] && [[ "$PROJECT_ROOT" != "/" ]]; do
20
- PROJECT_ROOT="$(dirname "$PROJECT_ROOT")"
21
- done
22
- if [[ -d "$PROJECT_ROOT/node_modules/@pennyfarthing/core/pennyfarthing_scripts" ]]; then
23
- PACKAGE_ROOT="$PROJECT_ROOT/node_modules/@pennyfarthing/core"
24
- fi
25
- fi
26
-
27
- export PYTHONPATH="${PACKAGE_ROOT}:${PYTHONPATH:-}"
28
- exec python3 -m pennyfarthing_scripts.prime "$@"
4
+ source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)/../lib/run-pf.sh"
5
+ exec_pf prime "$@"
@@ -4,29 +4,29 @@ Scripts for Git operations, branching, and worktree management.
4
4
 
5
5
  ## CLI Commands (preferred)
6
6
 
7
- All git operations are available via the `pf git` CLI:
7
+ All git operations are available via the `pf.sh git` CLI:
8
8
 
9
9
  | Command | Purpose |
10
10
  |---------|---------|
11
- | `pf git status [--brief]` | Show git status across all repos |
12
- | `pf git branches <name> [--repos all\|api\|ui]` | Create feature branches in repos |
13
- | `pf git worktree create <name> <branch>` | Create worktrees for parallel work |
14
- | `pf git worktree remove <name>` | Remove worktree and clean up |
15
- | `pf git worktree list` | List all active worktrees |
16
- | `pf git worktree status` | Show detailed worktree status |
17
- | `pf git install-hooks` | Install git hooks with .d/ dispatcher |
18
- | `pf git cleanup` | Organize changes into commits/branches |
11
+ | `pf.sh git status [--brief]` | Show git status across all repos |
12
+ | `pf.sh git branches <name> [--repos all\|api\|ui]` | Create feature branches in repos |
13
+ | `pf.sh git worktree create <name> <branch>` | Create worktrees for parallel work |
14
+ | `pf.sh git worktree remove <name>` | Remove worktree and clean up |
15
+ | `pf.sh git worktree list` | List all active worktrees |
16
+ | `pf.sh git worktree status` | Show detailed worktree status |
17
+ | `pf.sh git install-hooks` | Install git hooks with .d/ dispatcher |
18
+ | `pf.sh git cleanup` | Organize changes into commits/branches |
19
19
 
20
20
  ## Legacy Scripts (deprecated shims)
21
21
 
22
- These scripts now forward to `pf git` commands:
22
+ These scripts now forward to `pf.sh git` commands:
23
23
 
24
24
  | Script | Forwards to |
25
25
  |--------|-------------|
26
- | `git-status-all.sh` | `pf git status` |
27
- | `create-feature-branches.sh` | `pf git branches` |
28
- | `worktree-manager.sh` | `pf git worktree` |
29
- | `install-git-hooks.sh` | `pf git install-hooks` |
26
+ | `git-status-all.sh` | `pf.sh git status` |
27
+ | `create-feature-branches.sh` | `pf.sh git branches` |
28
+ | `worktree-manager.sh` | `pf.sh git worktree` |
29
+ | `install-git-hooks.sh` | `pf.sh git install-hooks` |
30
30
  | `release.sh` | Release workflow (use `/pf-workflow start release`) |
31
31
 
32
32
  ## Ownership
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env bash
2
2
  # DEPRECATED: Use `pf git branches` instead.
3
- # This shim forwards to the Python CLI.
4
- set -e
5
3
  echo "DEPRECATED: create-feature-branches.sh — use 'pf git branches' instead" >&2
6
- exec pf git branches "$@"
4
+ source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)/../lib/run-pf.sh"
5
+ exec_pf git branches "$@"
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env bash
2
2
  # DEPRECATED: Use `pf git status` instead.
3
- # This shim forwards to the Python CLI.
4
- set -e
5
3
  echo "DEPRECATED: git-status-all.sh — use 'pf git status' instead" >&2
6
- exec pf git status "$@"
4
+ source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)/../lib/run-pf.sh"
5
+ exec_pf git status "$@"
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env bash
2
2
  # DEPRECATED: Use `pf git install-hooks` instead.
3
- # This shim forwards to the Python CLI.
4
- set -e
5
3
  echo "DEPRECATED: install-git-hooks.sh — use 'pf git install-hooks' instead" >&2
6
- exec pf git install-hooks "$@"
4
+ source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)/../lib/run-pf.sh"
5
+ exec_pf git install-hooks "$@"
@@ -1,6 +1,4 @@
1
1
  #!/usr/bin/env bash
2
2
  # DEPRECATED: Use `pf git worktree` instead.
3
- # This shim forwards to the Python CLI.
4
- set -e
5
- echo "DEPRECATED: worktree-manager.sh — use 'pf git worktree' instead" >&2
6
- exec pf git worktree "$@"
3
+ source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)/../lib/run-pf.sh"
4
+ exec_pf git worktree "$@"
@@ -6,22 +6,22 @@ Git hooks and Claude Code hooks.
6
6
 
7
7
  | Script | Purpose |
8
8
  |--------|---------|
9
- | `context-circuit-breaker.sh` | Claude hook: halt at context limit |
10
- | `context-warning.sh` | Claude hook: warn on high context |
9
+ | `pf.sh hooks context-breaker` | Claude hook: halt at context limit |
10
+ | `pf.sh hooks context-warning` | Claude hook: warn on high context |
11
11
  | `otel-auto-config.sh` | Claude hook: configure OTEL |
12
12
  | `post-merge.sh` | Git hook: post-merge actions |
13
13
  | `pre-commit.sh` | Git hook: branch protection, agent validation, sprint YAML validation |
14
- | `pre-edit-check.sh` | Claude hook: validate before edit |
14
+ | `pf.sh hooks pre-edit-check` | Claude hook: validate before edit |
15
15
  | `pre-push.sh` | Git hook: pre-push validation |
16
- | `session-start.sh` | Claude hook: session start |
17
- | `session-stop.sh` | Claude hook: session stop |
16
+ | `pf.sh hooks session-start` | Claude hook: session start |
17
+ | `pf.sh hooks session-stop` | Claude hook: session stop |
18
18
 
19
19
  ## Installation
20
20
 
21
21
  Git hooks are installed via:
22
22
 
23
23
  ```bash
24
- pf git install-hooks
24
+ pf.sh git install-hooks
25
25
  ```
26
26
 
27
27
  Claude hooks are configured in `.claude/settings.json`.