@pennyfarthing/core 7.9.2 → 7.9.5

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 (538) hide show
  1. package/package.json +2 -2
  2. package/pennyfarthing-dist/agents/README.md +348 -0
  3. package/pennyfarthing-dist/agents/architect.md +180 -0
  4. package/pennyfarthing-dist/agents/dev.md +169 -0
  5. package/pennyfarthing-dist/agents/devops.md +203 -0
  6. package/pennyfarthing-dist/agents/handoff.md +235 -0
  7. package/pennyfarthing-dist/agents/orchestrator.md +182 -0
  8. package/pennyfarthing-dist/agents/pm.md +152 -0
  9. package/pennyfarthing-dist/agents/reviewer-preflight.md +129 -0
  10. package/pennyfarthing-dist/agents/reviewer.md +180 -0
  11. package/pennyfarthing-dist/agents/sm-file-summary.md +79 -0
  12. package/pennyfarthing-dist/agents/sm-finish.md +82 -0
  13. package/pennyfarthing-dist/agents/sm-handoff.md +129 -0
  14. package/pennyfarthing-dist/agents/sm-setup.md +251 -0
  15. package/pennyfarthing-dist/agents/sm.md +284 -0
  16. package/pennyfarthing-dist/agents/tea.md +161 -0
  17. package/pennyfarthing-dist/agents/tech-writer.md +226 -0
  18. package/pennyfarthing-dist/agents/testing-runner.md +184 -0
  19. package/pennyfarthing-dist/agents/ux-designer.md +236 -0
  20. package/pennyfarthing-dist/agents/workflow-status-check.md +96 -0
  21. package/pennyfarthing-dist/commands/architect.md +7 -0
  22. package/pennyfarthing-dist/commands/benchmark-control.md +69 -0
  23. package/pennyfarthing-dist/commands/benchmark.md +485 -0
  24. package/pennyfarthing-dist/commands/brainstorming.md +91 -0
  25. package/pennyfarthing-dist/commands/check.md +156 -0
  26. package/pennyfarthing-dist/commands/chore.md +178 -0
  27. package/pennyfarthing-dist/commands/close-epic.md +139 -0
  28. package/pennyfarthing-dist/commands/continue-session.md +184 -0
  29. package/pennyfarthing-dist/commands/create-branches-from-story.md +358 -0
  30. package/pennyfarthing-dist/commands/create-theme.md +29 -0
  31. package/pennyfarthing-dist/commands/dev.md +7 -0
  32. package/pennyfarthing-dist/commands/devops.md +7 -0
  33. package/pennyfarthing-dist/commands/git-cleanup.md +51 -0
  34. package/pennyfarthing-dist/commands/health-check.md +141 -0
  35. package/pennyfarthing-dist/commands/help.md +264 -0
  36. package/pennyfarthing-dist/commands/job-fair.md +102 -0
  37. package/pennyfarthing-dist/commands/list-themes.md +21 -0
  38. package/pennyfarthing-dist/commands/orchestrator.md +7 -0
  39. package/pennyfarthing-dist/commands/parallel-work.md +71 -0
  40. package/pennyfarthing-dist/commands/party-mode.md +77 -0
  41. package/pennyfarthing-dist/commands/permissions.md +193 -0
  42. package/pennyfarthing-dist/commands/pm.md +7 -0
  43. package/pennyfarthing-dist/commands/prime.md +140 -0
  44. package/pennyfarthing-dist/commands/release.md +58 -0
  45. package/pennyfarthing-dist/commands/repo-status.md +49 -0
  46. package/pennyfarthing-dist/commands/retro.md +200 -0
  47. package/pennyfarthing-dist/commands/reviewer.md +7 -0
  48. package/pennyfarthing-dist/commands/run-ci.md +116 -0
  49. package/pennyfarthing-dist/commands/set-theme.md +56 -0
  50. package/pennyfarthing-dist/commands/show-theme.md +21 -0
  51. package/pennyfarthing-dist/commands/sm.md +7 -0
  52. package/pennyfarthing-dist/commands/solo.md +447 -0
  53. package/pennyfarthing-dist/commands/sprint-planning.md +109 -0
  54. package/pennyfarthing-dist/commands/sprint.md +133 -0
  55. package/pennyfarthing-dist/commands/standalone.md +194 -0
  56. package/pennyfarthing-dist/commands/start-epic.md +168 -0
  57. package/pennyfarthing-dist/commands/sync-epic-to-jira.md +184 -0
  58. package/pennyfarthing-dist/commands/sync-work-with-sprint.md +373 -0
  59. package/pennyfarthing-dist/commands/tea.md +7 -0
  60. package/pennyfarthing-dist/commands/tech-writer.md +7 -0
  61. package/pennyfarthing-dist/commands/theme-maker.md +676 -0
  62. package/pennyfarthing-dist/commands/update-domain-docs.md +83 -0
  63. package/pennyfarthing-dist/commands/ux-designer.md +7 -0
  64. package/pennyfarthing-dist/commands/work.md +23 -0
  65. package/pennyfarthing-dist/commands/workflow.md +21 -0
  66. package/pennyfarthing-dist/guides/agent-behavior.md +311 -0
  67. package/pennyfarthing-dist/guides/agent-coordination.md +480 -0
  68. package/pennyfarthing-dist/guides/agent-tag-taxonomy.md +432 -0
  69. package/pennyfarthing-dist/guides/agent-template-strategic.md +148 -0
  70. package/pennyfarthing-dist/guides/agent-template-tactical.md +162 -0
  71. package/pennyfarthing-dist/guides/hooks.md +230 -0
  72. package/pennyfarthing-dist/guides/measurement-framework.md +210 -0
  73. package/pennyfarthing-dist/guides/patterns/approval-gates-pattern.md +766 -0
  74. package/pennyfarthing-dist/guides/patterns/fan-out-fan-in-pattern.md +574 -0
  75. package/pennyfarthing-dist/guides/patterns/helper-delegation-pattern.md +488 -0
  76. package/pennyfarthing-dist/guides/patterns/tdd-flow-pattern.md +402 -0
  77. package/pennyfarthing-dist/guides/permission-protocol.md +188 -0
  78. package/pennyfarthing-dist/guides/persona-loading.md +46 -0
  79. package/pennyfarthing-dist/guides/prompt-patterns.md +338 -0
  80. package/pennyfarthing-dist/guides/scale-levels.md +114 -0
  81. package/pennyfarthing-dist/guides/session-artifacts.md +193 -0
  82. package/pennyfarthing-dist/guides/workflow-schema.md +257 -0
  83. package/pennyfarthing-dist/guides/worktree-mode.md +113 -0
  84. package/pennyfarthing-dist/guides/xml-tags.md +335 -0
  85. package/pennyfarthing-dist/output-styles/teaching.md +33 -0
  86. package/pennyfarthing-dist/output-styles/terse.md +20 -0
  87. package/pennyfarthing-dist/output-styles/verbose.md +28 -0
  88. package/pennyfarthing-dist/personas/BENCHMARK-METHODOLOGY.md +105 -0
  89. package/pennyfarthing-dist/personas/OCEAN-BENCHMARKING.md +210 -0
  90. package/pennyfarthing-dist/personas/TRAIL-OCEAN-MAPPING.md +168 -0
  91. package/pennyfarthing-dist/personas/ZEITGEIST-ANALYSIS.md +171 -0
  92. package/pennyfarthing-dist/personas/attributes.yaml +69 -0
  93. package/pennyfarthing-dist/personas/scripts/add-zeitgeist-calibrated.py +81 -0
  94. package/pennyfarthing-dist/personas/scripts/add-zeitgeist-scores.sh +56 -0
  95. package/pennyfarthing-dist/personas/themes/1984.yaml +304 -0
  96. package/pennyfarthing-dist/personas/themes/a-team.yaml +331 -0
  97. package/pennyfarthing-dist/personas/themes/agatha-christie.yaml +294 -0
  98. package/pennyfarthing-dist/personas/themes/alice-in-wonderland.yaml +324 -0
  99. package/pennyfarthing-dist/personas/themes/all-stars.yaml +326 -0
  100. package/pennyfarthing-dist/personas/themes/ancient-philosophers.yaml +312 -0
  101. package/pennyfarthing-dist/personas/themes/ancient-strategists.yaml +298 -0
  102. package/pennyfarthing-dist/personas/themes/arcane.yaml +282 -0
  103. package/pennyfarthing-dist/personas/themes/arthurian-mythos.yaml +327 -0
  104. package/pennyfarthing-dist/personas/themes/avatar-the-last-airbender.yaml +282 -0
  105. package/pennyfarthing-dist/personas/themes/babylon-5.yaml +282 -0
  106. package/pennyfarthing-dist/personas/themes/battlestar-galactica.yaml +282 -0
  107. package/pennyfarthing-dist/personas/themes/better-call-saul.yaml +282 -0
  108. package/pennyfarthing-dist/personas/themes/big-lebowski.yaml +294 -0
  109. package/pennyfarthing-dist/personas/themes/black-sails.yaml +294 -0
  110. package/pennyfarthing-dist/personas/themes/blade-runner.yaml +289 -0
  111. package/pennyfarthing-dist/personas/themes/bobiverse.yaml +282 -0
  112. package/pennyfarthing-dist/personas/themes/breaking-bad.yaml +319 -0
  113. package/pennyfarthing-dist/personas/themes/catch-22.yaml +304 -0
  114. package/pennyfarthing-dist/personas/themes/classical-composers.yaml +302 -0
  115. package/pennyfarthing-dist/personas/themes/control.yaml +201 -0
  116. package/pennyfarthing-dist/personas/themes/count-of-monte-cristo.yaml +312 -0
  117. package/pennyfarthing-dist/personas/themes/cowboy-bebop.yaml +315 -0
  118. package/pennyfarthing-dist/personas/themes/deadwood.yaml +294 -0
  119. package/pennyfarthing-dist/personas/themes/dickens.yaml +312 -0
  120. package/pennyfarthing-dist/personas/themes/discworld.yaml +334 -0
  121. package/pennyfarthing-dist/personas/themes/doctor-who.yaml +284 -0
  122. package/pennyfarthing-dist/personas/themes/don-quixote.yaml +312 -0
  123. package/pennyfarthing-dist/personas/themes/dune.yaml +301 -0
  124. package/pennyfarthing-dist/personas/themes/enlightenment-thinkers.yaml +312 -0
  125. package/pennyfarthing-dist/personas/themes/expeditionary-force.yaml +282 -0
  126. package/pennyfarthing-dist/personas/themes/fargo.yaml +322 -0
  127. package/pennyfarthing-dist/personas/themes/film-auteurs.yaml +304 -0
  128. package/pennyfarthing-dist/personas/themes/firefly.yaml +320 -0
  129. package/pennyfarthing-dist/personas/themes/foundation.yaml +284 -0
  130. package/pennyfarthing-dist/personas/themes/futurama.yaml +313 -0
  131. package/pennyfarthing-dist/personas/themes/game-of-thrones.yaml +284 -0
  132. package/pennyfarthing-dist/personas/themes/gilligans-island.yaml +365 -0
  133. package/pennyfarthing-dist/personas/themes/gothic-literature.yaml +300 -0
  134. package/pennyfarthing-dist/personas/themes/great-gatsby.yaml +300 -0
  135. package/pennyfarthing-dist/personas/themes/greek-mythology.yaml +326 -0
  136. package/pennyfarthing-dist/personas/themes/hannibal.yaml +294 -0
  137. package/pennyfarthing-dist/personas/themes/harry-potter.yaml +316 -0
  138. package/pennyfarthing-dist/personas/themes/his-dark-materials.yaml +285 -0
  139. package/pennyfarthing-dist/personas/themes/historical-figures.yaml +282 -0
  140. package/pennyfarthing-dist/personas/themes/hitchhikers-guide.yaml +323 -0
  141. package/pennyfarthing-dist/personas/themes/house-md.yaml +313 -0
  142. package/pennyfarthing-dist/personas/themes/imperial-radch.yaml +283 -0
  143. package/pennyfarthing-dist/personas/themes/inspector-morse.yaml +294 -0
  144. package/pennyfarthing-dist/personas/themes/jane-austen.yaml +281 -0
  145. package/pennyfarthing-dist/personas/themes/jazz-legends.yaml +312 -0
  146. package/pennyfarthing-dist/personas/themes/justified.yaml +294 -0
  147. package/pennyfarthing-dist/personas/themes/legion-of-doom.yaml +343 -0
  148. package/pennyfarthing-dist/personas/themes/les-miserables.yaml +293 -0
  149. package/pennyfarthing-dist/personas/themes/lord-of-the-rings.yaml +326 -0
  150. package/pennyfarthing-dist/personas/themes/lovecraft-mythos.yaml +325 -0
  151. package/pennyfarthing-dist/personas/themes/mad-max.yaml +349 -0
  152. package/pennyfarthing-dist/personas/themes/mad-men.yaml +283 -0
  153. package/pennyfarthing-dist/personas/themes/marvel-mcu.yaml +294 -0
  154. package/pennyfarthing-dist/personas/themes/mash.yaml +329 -0
  155. package/pennyfarthing-dist/personas/themes/mass-effect.yaml +283 -0
  156. package/pennyfarthing-dist/personas/themes/military-commanders.yaml +298 -0
  157. package/pennyfarthing-dist/personas/themes/moby-dick.yaml +312 -0
  158. package/pennyfarthing-dist/personas/themes/monty-python.yaml +297 -0
  159. package/pennyfarthing-dist/personas/themes/neuromancer.yaml +294 -0
  160. package/pennyfarthing-dist/personas/themes/norse-mythology.yaml +321 -0
  161. package/pennyfarthing-dist/personas/themes/parks-and-rec.yaml +364 -0
  162. package/pennyfarthing-dist/personas/themes/peaky-blinders.yaml +292 -0
  163. package/pennyfarthing-dist/personas/themes/princess-bride.yaml +344 -0
  164. package/pennyfarthing-dist/personas/themes/renaissance-masters.yaml +312 -0
  165. package/pennyfarthing-dist/personas/themes/rome.yaml +294 -0
  166. package/pennyfarthing-dist/personas/themes/russian-masters.yaml +310 -0
  167. package/pennyfarthing-dist/personas/themes/sandman.yaml +282 -0
  168. package/pennyfarthing-dist/personas/themes/scientific-revolutionaries.yaml +312 -0
  169. package/pennyfarthing-dist/personas/themes/shakespeare.yaml +295 -0
  170. package/pennyfarthing-dist/personas/themes/sherlock-holmes.yaml +283 -0
  171. package/pennyfarthing-dist/personas/themes/snow-crash.yaml +290 -0
  172. package/pennyfarthing-dist/personas/themes/software-pioneers.yaml +294 -0
  173. package/pennyfarthing-dist/personas/themes/star-trek-tng.yaml +358 -0
  174. package/pennyfarthing-dist/personas/themes/star-trek-tos.yaml +327 -0
  175. package/pennyfarthing-dist/personas/themes/star-wars.yaml +297 -0
  176. package/pennyfarthing-dist/personas/themes/succession.yaml +294 -0
  177. package/pennyfarthing-dist/personas/themes/superfriends.yaml +332 -0
  178. package/pennyfarthing-dist/personas/themes/ted-lasso.yaml +359 -0
  179. package/pennyfarthing-dist/personas/themes/the-americans.yaml +294 -0
  180. package/pennyfarthing-dist/personas/themes/the-crown.yaml +294 -0
  181. package/pennyfarthing-dist/personas/themes/the-expanse.yaml +337 -0
  182. package/pennyfarthing-dist/personas/themes/the-good-place.yaml +315 -0
  183. package/pennyfarthing-dist/personas/themes/the-matrix.yaml +342 -0
  184. package/pennyfarthing-dist/personas/themes/the-odyssey.yaml +294 -0
  185. package/pennyfarthing-dist/personas/themes/the-office.yaml +323 -0
  186. package/pennyfarthing-dist/personas/themes/the-simpsons.yaml +300 -0
  187. package/pennyfarthing-dist/personas/themes/the-sopranos.yaml +294 -0
  188. package/pennyfarthing-dist/personas/themes/the-wire.yaml +303 -0
  189. package/pennyfarthing-dist/personas/themes/the-witcher.yaml +294 -0
  190. package/pennyfarthing-dist/personas/themes/twin-peaks.yaml +296 -0
  191. package/pennyfarthing-dist/personas/themes/vorkosigan-saga.yaml +294 -0
  192. package/pennyfarthing-dist/personas/themes/watchmen.yaml +285 -0
  193. package/pennyfarthing-dist/personas/themes/west-wing.yaml +285 -0
  194. package/pennyfarthing-dist/personas/themes/world-explorers.yaml +312 -0
  195. package/pennyfarthing-dist/personas/themes/wwii-leaders.yaml +299 -0
  196. package/pennyfarthing-dist/personas/themes/x-files.yaml +296 -0
  197. package/pennyfarthing-dist/personas/zeitgeist-scores.yaml +1172 -0
  198. package/pennyfarthing-dist/scripts/README.md +87 -0
  199. package/pennyfarthing-dist/scripts/core/README.md +26 -0
  200. package/pennyfarthing-dist/scripts/core/agent-session.sh +383 -0
  201. package/pennyfarthing-dist/scripts/core/check-context.sh +280 -0
  202. package/pennyfarthing-dist/scripts/core/handoff-marker.sh +101 -0
  203. package/pennyfarthing-dist/scripts/core/phase-check-start.sh +95 -0
  204. package/pennyfarthing-dist/scripts/core/prime.sh +30 -0
  205. package/pennyfarthing-dist/scripts/core/run.sh +92 -0
  206. package/pennyfarthing-dist/scripts/cyclist/is-cyclist.sh +21 -0
  207. package/pennyfarthing-dist/scripts/git/README.md +25 -0
  208. package/pennyfarthing-dist/scripts/git/create-feature-branches.sh +267 -0
  209. package/pennyfarthing-dist/scripts/git/git-status-all.sh +152 -0
  210. package/pennyfarthing-dist/scripts/git/install-git-hooks.sh +91 -0
  211. package/pennyfarthing-dist/scripts/git/release.sh +215 -0
  212. package/pennyfarthing-dist/scripts/git/worktree-manager.sh +494 -0
  213. package/pennyfarthing-dist/scripts/health/drift-detection.sh +162 -0
  214. package/pennyfarthing-dist/scripts/hooks/README.md +32 -0
  215. package/pennyfarthing-dist/scripts/hooks/bell-mode-hook.sh +106 -0
  216. package/pennyfarthing-dist/scripts/hooks/context-circuit-breaker.sh +60 -0
  217. package/pennyfarthing-dist/scripts/hooks/context-warning.sh +65 -0
  218. package/pennyfarthing-dist/scripts/hooks/otel-auto-config.sh +35 -0
  219. package/pennyfarthing-dist/scripts/hooks/post-merge.sh +166 -0
  220. package/pennyfarthing-dist/scripts/hooks/pre-commit.sh +107 -0
  221. package/pennyfarthing-dist/scripts/hooks/pre-edit-check.sh +71 -0
  222. package/pennyfarthing-dist/scripts/hooks/pre-push.sh +54 -0
  223. package/pennyfarthing-dist/scripts/hooks/question-reflector-check.sh +20 -0
  224. package/pennyfarthing-dist/scripts/hooks/question_reflector_check.py +499 -0
  225. package/pennyfarthing-dist/scripts/hooks/session-start.sh +97 -0
  226. package/pennyfarthing-dist/scripts/hooks/session-stop.sh +65 -0
  227. package/pennyfarthing-dist/scripts/hooks/welcome-hook.sh +94 -0
  228. package/pennyfarthing-dist/scripts/jira/README.md +36 -0
  229. package/pennyfarthing-dist/scripts/jira/create-jira-epic.sh +101 -0
  230. package/pennyfarthing-dist/scripts/jira/create-jira-story.sh +97 -0
  231. package/pennyfarthing-dist/scripts/jira/jira-claim-story.sh +22 -0
  232. package/pennyfarthing-dist/scripts/jira/jira-lib.sh +464 -0
  233. package/pennyfarthing-dist/scripts/jira/jira-reconcile.sh +266 -0
  234. package/pennyfarthing-dist/scripts/jira/jira-sync-story.sh +18 -0
  235. package/pennyfarthing-dist/scripts/jira/jira-sync.sh +16 -0
  236. package/pennyfarthing-dist/scripts/jira/sync-epic-jira.sh +16 -0
  237. package/pennyfarthing-dist/scripts/jira/sync-epic-to-jira.sh +16 -0
  238. package/pennyfarthing-dist/scripts/lib/README.md +29 -0
  239. package/pennyfarthing-dist/scripts/lib/background-tasks.sh +177 -0
  240. package/pennyfarthing-dist/scripts/lib/checkpoint.sh +136 -0
  241. package/pennyfarthing-dist/scripts/lib/common.sh +212 -0
  242. package/pennyfarthing-dist/scripts/lib/file-lock.sh +269 -0
  243. package/pennyfarthing-dist/scripts/lib/find-root.sh +35 -0
  244. package/pennyfarthing-dist/scripts/lib/logging.sh +186 -0
  245. package/pennyfarthing-dist/scripts/lib/retry.sh +76 -0
  246. package/pennyfarthing-dist/scripts/maintenance/migrate-theme-schema.mjs +102 -0
  247. package/pennyfarthing-dist/scripts/maintenance/sidecar-health.sh +97 -0
  248. package/pennyfarthing-dist/scripts/misc/README.md +44 -0
  249. package/pennyfarthing-dist/scripts/misc/add-short-names.sh +13 -0
  250. package/pennyfarthing-dist/scripts/misc/add_short_names.py +226 -0
  251. package/pennyfarthing-dist/scripts/misc/backlog.sh +91 -0
  252. package/pennyfarthing-dist/scripts/misc/check-status.sh +247 -0
  253. package/pennyfarthing-dist/scripts/misc/find-related-work.sh +231 -0
  254. package/pennyfarthing-dist/scripts/misc/generate-skill-docs.sh +122 -0
  255. package/pennyfarthing-dist/scripts/misc/log-skill-usage.sh +74 -0
  256. package/pennyfarthing-dist/scripts/misc/migrate-bmad-workflow.sh +10 -0
  257. package/pennyfarthing-dist/scripts/misc/migrate_bmad_workflow.py +319 -0
  258. package/pennyfarthing-dist/scripts/misc/repo-scan.sh +141 -0
  259. package/pennyfarthing-dist/scripts/misc/repo-utils.sh +778 -0
  260. package/pennyfarthing-dist/scripts/misc/run-ci.sh +219 -0
  261. package/pennyfarthing-dist/scripts/misc/run-timestamp.sh +7 -0
  262. package/pennyfarthing-dist/scripts/misc/session-cleanup.sh +319 -0
  263. package/pennyfarthing-dist/scripts/misc/skill-usage-report.sh +193 -0
  264. package/pennyfarthing-dist/scripts/misc/statusline.sh +259 -0
  265. package/pennyfarthing-dist/scripts/misc/uninstall.sh +270 -0
  266. package/pennyfarthing-dist/scripts/misc/validate-subagent-frontmatter.sh +160 -0
  267. package/pennyfarthing-dist/scripts/portraits/generate-portraits.py +400 -0
  268. package/pennyfarthing-dist/scripts/portraits/generate-portraits.sh +54 -0
  269. package/pennyfarthing-dist/scripts/sprint/README.md +29 -0
  270. package/pennyfarthing-dist/scripts/sprint/archive-story.sh +139 -0
  271. package/pennyfarthing-dist/scripts/sprint/available-stories.sh +97 -0
  272. package/pennyfarthing-dist/scripts/sprint/check-story.sh +164 -0
  273. package/pennyfarthing-dist/scripts/sprint/get-epic-field.sh +58 -0
  274. package/pennyfarthing-dist/scripts/sprint/get-story-field.sh +69 -0
  275. package/pennyfarthing-dist/scripts/sprint/import-epic-to-future.sh +10 -0
  276. package/pennyfarthing-dist/scripts/sprint/import_epic_to_future.py +270 -0
  277. package/pennyfarthing-dist/scripts/sprint/list-future.sh +151 -0
  278. package/pennyfarthing-dist/scripts/sprint/new-sprint.sh +116 -0
  279. package/pennyfarthing-dist/scripts/sprint/promote-epic.sh +154 -0
  280. package/pennyfarthing-dist/scripts/sprint/sprint-common.sh +421 -0
  281. package/pennyfarthing-dist/scripts/sprint/sprint-info.sh +39 -0
  282. package/pennyfarthing-dist/scripts/sprint/sprint-metrics.sh +241 -0
  283. package/pennyfarthing-dist/scripts/sprint/sprint-status.sh +134 -0
  284. package/pennyfarthing-dist/scripts/story/README.md +23 -0
  285. package/pennyfarthing-dist/scripts/story/create-story.sh +19 -0
  286. package/pennyfarthing-dist/scripts/story/size-story.sh +18 -0
  287. package/pennyfarthing-dist/scripts/story/story-template.sh +18 -0
  288. package/pennyfarthing-dist/scripts/test/README.md +23 -0
  289. package/pennyfarthing-dist/scripts/test/ensure-swebench-data.sh +59 -0
  290. package/pennyfarthing-dist/scripts/test/ground-truth-judge.py +220 -0
  291. package/pennyfarthing-dist/scripts/test/swebench-judge.py +374 -0
  292. package/pennyfarthing-dist/scripts/test/test-cache.sh +165 -0
  293. package/pennyfarthing-dist/scripts/test/test-setup.sh +337 -0
  294. package/pennyfarthing-dist/scripts/tests/check.test.sh +582 -0
  295. package/pennyfarthing-dist/scripts/tests/dev-story-workflow-import.test.sh +515 -0
  296. package/pennyfarthing-dist/scripts/tests/epics-and-stories-workflow-import.test.sh +599 -0
  297. package/pennyfarthing-dist/scripts/tests/handoff-phase-update.test.sh +332 -0
  298. package/pennyfarthing-dist/scripts/tests/implementation-readiness-workflow-import.test.sh +573 -0
  299. package/pennyfarthing-dist/scripts/tests/migrate-bmad-workflow.test.sh +859 -0
  300. package/pennyfarthing-dist/scripts/tests/prd-workflow-import.test.sh +662 -0
  301. package/pennyfarthing-dist/scripts/tests/project-context-workflow-import.test.sh +589 -0
  302. package/pennyfarthing-dist/scripts/tests/test-character-voice.sh +105 -0
  303. package/pennyfarthing-dist/scripts/tests/test-drift-detection.sh +597 -0
  304. package/pennyfarthing-dist/scripts/tests/test-post-merge-hook.sh +514 -0
  305. package/pennyfarthing-dist/scripts/tests/test-session-checkpoint.sh +517 -0
  306. package/pennyfarthing-dist/scripts/tests/test-solo-command.sh +331 -0
  307. package/pennyfarthing-dist/scripts/tests/ux-design-workflow-import.test.sh +647 -0
  308. package/pennyfarthing-dist/scripts/theme/README.md +22 -0
  309. package/pennyfarthing-dist/scripts/theme/compute-theme-tiers.sh +13 -0
  310. package/pennyfarthing-dist/scripts/theme/compute_theme_tiers.py +402 -0
  311. package/pennyfarthing-dist/scripts/theme/list-themes.sh +73 -0
  312. package/pennyfarthing-dist/scripts/theme/update-theme-tiers.sh +97 -0
  313. package/pennyfarthing-dist/scripts/validation/validate-agent-schema.sh +576 -0
  314. package/pennyfarthing-dist/scripts/workflow/README.md +28 -0
  315. package/pennyfarthing-dist/scripts/workflow/check.py +502 -0
  316. package/pennyfarthing-dist/scripts/workflow/check.sh +24 -0
  317. package/pennyfarthing-dist/scripts/workflow/finish-story.sh +159 -0
  318. package/pennyfarthing-dist/scripts/workflow/fix-session-phase.sh +228 -0
  319. package/pennyfarthing-dist/scripts/workflow/get-workflow-type.py +61 -0
  320. package/pennyfarthing-dist/scripts/workflow/get-workflow-type.sh +13 -0
  321. package/pennyfarthing-dist/scripts/workflow/list-workflows.sh +130 -0
  322. package/pennyfarthing-dist/scripts/workflow/phase-owner.sh +40 -0
  323. package/pennyfarthing-dist/scripts/workflow/resume-workflow.sh +163 -0
  324. package/pennyfarthing-dist/scripts/workflow/show-workflow.sh +138 -0
  325. package/pennyfarthing-dist/scripts/workflow/start-workflow.sh +256 -0
  326. package/pennyfarthing-dist/scripts/workflow/workflow-status.sh +167 -0
  327. package/pennyfarthing-dist/skills/agentic-patterns/SKILL.md +242 -0
  328. package/pennyfarthing-dist/skills/changelog/SKILL.md +367 -0
  329. package/pennyfarthing-dist/skills/code-review/SKILL.md +168 -0
  330. package/pennyfarthing-dist/skills/context-engineering/SKILL.md +274 -0
  331. package/pennyfarthing-dist/skills/cyclist/SKILL.md +88 -0
  332. package/pennyfarthing-dist/skills/dev-patterns/SKILL.md +437 -0
  333. package/pennyfarthing-dist/skills/finalize-run/SKILL.md +258 -0
  334. package/pennyfarthing-dist/skills/jira/SKILL.md +484 -0
  335. package/pennyfarthing-dist/skills/judge/SKILL.md +636 -0
  336. package/pennyfarthing-dist/skills/just/SKILL.md +403 -0
  337. package/pennyfarthing-dist/skills/mermaid/SKILL.md +240 -0
  338. package/pennyfarthing-dist/skills/otel/skill.md +223 -0
  339. package/pennyfarthing-dist/skills/permissions/skill.md +172 -0
  340. package/pennyfarthing-dist/skills/persona-benchmark/SKILL.md +178 -0
  341. package/pennyfarthing-dist/skills/skill-registry.schema.json +107 -0
  342. package/pennyfarthing-dist/skills/skill-registry.yaml +393 -0
  343. package/pennyfarthing-dist/skills/sprint/scripts/archive-story.sh +101 -0
  344. package/pennyfarthing-dist/skills/sprint/scripts/available-stories.sh +97 -0
  345. package/pennyfarthing-dist/skills/sprint/scripts/check-story.sh +164 -0
  346. package/pennyfarthing-dist/skills/sprint/scripts/create-jira-epic.sh +101 -0
  347. package/pennyfarthing-dist/skills/sprint/scripts/new-sprint.sh +116 -0
  348. package/pennyfarthing-dist/skills/sprint/scripts/promote-epic.sh +164 -0
  349. package/pennyfarthing-dist/skills/sprint/scripts/sprint-info.sh +39 -0
  350. package/pennyfarthing-dist/skills/sprint/scripts/sprint-status.sh +147 -0
  351. package/pennyfarthing-dist/skills/sprint/scripts/sync-epic-jira.sh +86 -0
  352. package/pennyfarthing-dist/skills/sprint/skill.md +465 -0
  353. package/pennyfarthing-dist/skills/story/scripts/create-story.sh +159 -0
  354. package/pennyfarthing-dist/skills/story/scripts/size-story.sh +198 -0
  355. package/pennyfarthing-dist/skills/story/scripts/story-template.sh +162 -0
  356. package/pennyfarthing-dist/skills/story/skill.md +219 -0
  357. package/pennyfarthing-dist/skills/systematic-debugging/SKILL.md +390 -0
  358. package/pennyfarthing-dist/skills/testing/SKILL.md +99 -0
  359. package/pennyfarthing-dist/skills/testing/references/troubleshooting.md +124 -0
  360. package/pennyfarthing-dist/skills/theme/skill.md +129 -0
  361. package/pennyfarthing-dist/skills/theme-creation/SKILL.md +174 -0
  362. package/pennyfarthing-dist/skills/workflow/scripts/list-workflows.sh +91 -0
  363. package/pennyfarthing-dist/skills/workflow/scripts/resume-workflow.sh +163 -0
  364. package/pennyfarthing-dist/skills/workflow/scripts/show-workflow.sh +138 -0
  365. package/pennyfarthing-dist/skills/workflow/scripts/start-workflow.sh +273 -0
  366. package/pennyfarthing-dist/skills/workflow/scripts/workflow-status.sh +167 -0
  367. package/pennyfarthing-dist/skills/workflow/skill.md +337 -0
  368. package/pennyfarthing-dist/skills/yq/SKILL.md +264 -0
  369. package/pennyfarthing-dist/templates/LEADERBOARD.schema.yaml +187 -0
  370. package/pennyfarthing-dist/templates/LEADERBOARD.template.md +59 -0
  371. package/pennyfarthing-dist/templates/agent-scopes.yaml.template +276 -0
  372. package/pennyfarthing-dist/templates/pennyfarthing-settings.yaml.template +61 -0
  373. package/pennyfarthing-dist/templates/persona-config.yaml.template +22 -0
  374. package/pennyfarthing-dist/templates/preferences.yaml.template +15 -0
  375. package/pennyfarthing-dist/templates/settings.local.json.template +101 -0
  376. package/pennyfarthing-dist/templates/setup-env.sh.template +18 -0
  377. package/pennyfarthing-dist/templates/shared-context.md.template +70 -0
  378. package/pennyfarthing-dist/templates/sidecar/decisions.md.template +40 -0
  379. package/pennyfarthing-dist/templates/sidecar/gotchas.md.template +37 -0
  380. package/pennyfarthing-dist/templates/sidecar/patterns.md.template +34 -0
  381. package/pennyfarthing-dist/workflows/agent-docs.yaml +70 -0
  382. package/pennyfarthing-dist/workflows/architecture/steps/step-01-initialize.md +101 -0
  383. package/pennyfarthing-dist/workflows/architecture/steps/step-01b-continue.md +93 -0
  384. package/pennyfarthing-dist/workflows/architecture/steps/step-02-context.md +115 -0
  385. package/pennyfarthing-dist/workflows/architecture/steps/step-03-patterns.md +133 -0
  386. package/pennyfarthing-dist/workflows/architecture/steps/step-04-components.md +138 -0
  387. package/pennyfarthing-dist/workflows/architecture/steps/step-05-interfaces.md +133 -0
  388. package/pennyfarthing-dist/workflows/architecture/steps/step-06-risks.md +142 -0
  389. package/pennyfarthing-dist/workflows/architecture/steps/step-07-document.md +160 -0
  390. package/pennyfarthing-dist/workflows/architecture/templates/architecture-decision.md +102 -0
  391. package/pennyfarthing-dist/workflows/architecture.yaml +65 -0
  392. package/pennyfarthing-dist/workflows/bdd.yaml +60 -0
  393. package/pennyfarthing-dist/workflows/brainstorming/brain-methods.csv +62 -0
  394. package/pennyfarthing-dist/workflows/brainstorming/checklist.md +44 -0
  395. package/pennyfarthing-dist/workflows/brainstorming/instructions.md +736 -0
  396. package/pennyfarthing-dist/workflows/brainstorming/workflow.yaml +49 -0
  397. package/pennyfarthing-dist/workflows/code-review/checklist.md +23 -0
  398. package/pennyfarthing-dist/workflows/code-review/instructions.md +234 -0
  399. package/pennyfarthing-dist/workflows/code-review/workflow.yaml +51 -0
  400. package/pennyfarthing-dist/workflows/dev-story/checklist.md +80 -0
  401. package/pennyfarthing-dist/workflows/dev-story/instructions.xml +410 -0
  402. package/pennyfarthing-dist/workflows/dev-story/workflow.yaml +50 -0
  403. package/pennyfarthing-dist/workflows/epics-and-stories/steps/step-01-validate-prerequisites.md +256 -0
  404. package/pennyfarthing-dist/workflows/epics-and-stories/steps/step-02-design-epics.md +233 -0
  405. package/pennyfarthing-dist/workflows/epics-and-stories/steps/step-03-create-stories.md +272 -0
  406. package/pennyfarthing-dist/workflows/epics-and-stories/steps/step-04-final-validation.md +153 -0
  407. package/pennyfarthing-dist/workflows/epics-and-stories/steps/step-05-import-to-future.md +122 -0
  408. package/pennyfarthing-dist/workflows/epics-and-stories/templates/epics-template.md +57 -0
  409. package/pennyfarthing-dist/workflows/epics-and-stories/workflow.yaml +28 -0
  410. package/pennyfarthing-dist/workflows/git-cleanup/steps/step-01-analyze.md +101 -0
  411. package/pennyfarthing-dist/workflows/git-cleanup/steps/step-02-categorize.md +116 -0
  412. package/pennyfarthing-dist/workflows/git-cleanup/steps/step-03-execute.md +224 -0
  413. package/pennyfarthing-dist/workflows/git-cleanup/steps/step-04-verify.md +88 -0
  414. package/pennyfarthing-dist/workflows/git-cleanup/steps/step-05-complete.md +79 -0
  415. package/pennyfarthing-dist/workflows/git-cleanup.yaml +59 -0
  416. package/pennyfarthing-dist/workflows/implementation-readiness/steps/step-01-document-discovery.md +190 -0
  417. package/pennyfarthing-dist/workflows/implementation-readiness/steps/step-02-prd-analysis.md +178 -0
  418. package/pennyfarthing-dist/workflows/implementation-readiness/steps/step-03-epic-coverage-validation.md +179 -0
  419. package/pennyfarthing-dist/workflows/implementation-readiness/steps/step-04-ux-alignment.md +139 -0
  420. package/pennyfarthing-dist/workflows/implementation-readiness/steps/step-05-epic-quality-review.md +252 -0
  421. package/pennyfarthing-dist/workflows/implementation-readiness/steps/step-06-final-assessment.md +133 -0
  422. package/pennyfarthing-dist/workflows/implementation-readiness/templates/readiness-report-template.md +4 -0
  423. package/pennyfarthing-dist/workflows/implementation-readiness/workflow.yaml +40 -0
  424. package/pennyfarthing-dist/workflows/prd/data/domain-complexity.csv +13 -0
  425. package/pennyfarthing-dist/workflows/prd/data/prd-purpose.md +197 -0
  426. package/pennyfarthing-dist/workflows/prd/data/project-types.csv +11 -0
  427. package/pennyfarthing-dist/workflows/prd/steps-c/step-01-init.md +191 -0
  428. package/pennyfarthing-dist/workflows/prd/steps-c/step-01b-continue.md +153 -0
  429. package/pennyfarthing-dist/workflows/prd/steps-c/step-02-discovery.md +224 -0
  430. package/pennyfarthing-dist/workflows/prd/steps-c/step-03-success.md +226 -0
  431. package/pennyfarthing-dist/workflows/prd/steps-c/step-04-journeys.md +213 -0
  432. package/pennyfarthing-dist/workflows/prd/steps-c/step-05-domain.md +207 -0
  433. package/pennyfarthing-dist/workflows/prd/steps-c/step-06-innovation.md +226 -0
  434. package/pennyfarthing-dist/workflows/prd/steps-c/step-07-project-type.md +237 -0
  435. package/pennyfarthing-dist/workflows/prd/steps-c/step-08-scoping.md +228 -0
  436. package/pennyfarthing-dist/workflows/prd/steps-c/step-09-functional.md +231 -0
  437. package/pennyfarthing-dist/workflows/prd/steps-c/step-10-nonfunctional.md +242 -0
  438. package/pennyfarthing-dist/workflows/prd/steps-c/step-11-polish.md +217 -0
  439. package/pennyfarthing-dist/workflows/prd/steps-c/step-12-complete.md +180 -0
  440. package/pennyfarthing-dist/workflows/prd/steps-e/step-e-01-discovery.md +247 -0
  441. package/pennyfarthing-dist/workflows/prd/steps-e/step-e-01b-legacy-conversion.md +208 -0
  442. package/pennyfarthing-dist/workflows/prd/steps-e/step-e-02-review.md +249 -0
  443. package/pennyfarthing-dist/workflows/prd/steps-e/step-e-03-edit.md +253 -0
  444. package/pennyfarthing-dist/workflows/prd/steps-e/step-e-04-complete.md +168 -0
  445. package/pennyfarthing-dist/workflows/prd/steps-v/step-v-01-discovery.md +218 -0
  446. package/pennyfarthing-dist/workflows/prd/steps-v/step-v-02-format-detection.md +191 -0
  447. package/pennyfarthing-dist/workflows/prd/steps-v/step-v-02b-parity-check.md +209 -0
  448. package/pennyfarthing-dist/workflows/prd/steps-v/step-v-03-density-validation.md +174 -0
  449. package/pennyfarthing-dist/workflows/prd/steps-v/step-v-04-brief-coverage-validation.md +214 -0
  450. package/pennyfarthing-dist/workflows/prd/steps-v/step-v-05-measurability-validation.md +228 -0
  451. package/pennyfarthing-dist/workflows/prd/steps-v/step-v-06-traceability-validation.md +217 -0
  452. package/pennyfarthing-dist/workflows/prd/steps-v/step-v-07-implementation-leakage-validation.md +205 -0
  453. package/pennyfarthing-dist/workflows/prd/steps-v/step-v-08-domain-compliance-validation.md +243 -0
  454. package/pennyfarthing-dist/workflows/prd/steps-v/step-v-09-project-type-validation.md +263 -0
  455. package/pennyfarthing-dist/workflows/prd/steps-v/step-v-10-smart-validation.md +209 -0
  456. package/pennyfarthing-dist/workflows/prd/steps-v/step-v-11-holistic-quality-validation.md +264 -0
  457. package/pennyfarthing-dist/workflows/prd/steps-v/step-v-12-completeness-validation.md +242 -0
  458. package/pennyfarthing-dist/workflows/prd/steps-v/step-v-13-report-complete.md +232 -0
  459. package/pennyfarthing-dist/workflows/prd/templates/prd-template.md +10 -0
  460. package/pennyfarthing-dist/workflows/prd/workflow.yaml +42 -0
  461. package/pennyfarthing-dist/workflows/product-brief/steps/step-01-init.md +177 -0
  462. package/pennyfarthing-dist/workflows/product-brief/steps/step-01b-continue.md +161 -0
  463. package/pennyfarthing-dist/workflows/product-brief/steps/step-02-vision.md +199 -0
  464. package/pennyfarthing-dist/workflows/product-brief/steps/step-03-users.md +202 -0
  465. package/pennyfarthing-dist/workflows/product-brief/steps/step-04-metrics.md +205 -0
  466. package/pennyfarthing-dist/workflows/product-brief/steps/step-05-scope.md +219 -0
  467. package/pennyfarthing-dist/workflows/product-brief/steps/step-06-complete.md +194 -0
  468. package/pennyfarthing-dist/workflows/product-brief/templates/product-brief.template.md +10 -0
  469. package/pennyfarthing-dist/workflows/product-brief/workflow.yaml +31 -0
  470. package/pennyfarthing-dist/workflows/project-context/project-context-template.md +21 -0
  471. package/pennyfarthing-dist/workflows/project-context/steps/step-01-discover.md +184 -0
  472. package/pennyfarthing-dist/workflows/project-context/steps/step-02-generate.md +318 -0
  473. package/pennyfarthing-dist/workflows/project-context/steps/step-03-complete.md +278 -0
  474. package/pennyfarthing-dist/workflows/project-context/workflow.yaml +27 -0
  475. package/pennyfarthing-dist/workflows/quick-dev/steps/step-01-mode-detection.md +156 -0
  476. package/pennyfarthing-dist/workflows/quick-dev/steps/step-02-context-gathering.md +120 -0
  477. package/pennyfarthing-dist/workflows/quick-dev/steps/step-03-execute.md +113 -0
  478. package/pennyfarthing-dist/workflows/quick-dev/steps/step-04-self-check.md +113 -0
  479. package/pennyfarthing-dist/workflows/quick-dev/steps/step-05-adversarial-review.md +106 -0
  480. package/pennyfarthing-dist/workflows/quick-dev/steps/step-06-resolve-findings.md +140 -0
  481. package/pennyfarthing-dist/workflows/quick-dev/workflow.yaml +27 -0
  482. package/pennyfarthing-dist/workflows/quick-spec/steps/step-01-understand.md +189 -0
  483. package/pennyfarthing-dist/workflows/quick-spec/steps/step-02-investigate.md +144 -0
  484. package/pennyfarthing-dist/workflows/quick-spec/steps/step-03-generate.md +128 -0
  485. package/pennyfarthing-dist/workflows/quick-spec/steps/step-04-review.md +191 -0
  486. package/pennyfarthing-dist/workflows/quick-spec/tech-spec-template.md +74 -0
  487. package/pennyfarthing-dist/workflows/quick-spec/workflow.yaml +27 -0
  488. package/pennyfarthing-dist/workflows/research/steps-domain/step-01-init.md +137 -0
  489. package/pennyfarthing-dist/workflows/research/steps-domain/step-02-domain-analysis.md +229 -0
  490. package/pennyfarthing-dist/workflows/research/steps-domain/step-03-competitive-landscape.md +238 -0
  491. package/pennyfarthing-dist/workflows/research/steps-domain/step-04-regulatory-focus.md +206 -0
  492. package/pennyfarthing-dist/workflows/research/steps-domain/step-05-technical-trends.md +234 -0
  493. package/pennyfarthing-dist/workflows/research/steps-domain/step-06-research-synthesis.md +443 -0
  494. package/pennyfarthing-dist/workflows/research/steps-market/step-01-init.md +182 -0
  495. package/pennyfarthing-dist/workflows/research/steps-market/step-02-customer-behavior.md +237 -0
  496. package/pennyfarthing-dist/workflows/research/steps-market/step-02-customer-insights.md +200 -0
  497. package/pennyfarthing-dist/workflows/research/steps-market/step-03-customer-pain-points.md +249 -0
  498. package/pennyfarthing-dist/workflows/research/steps-market/step-04-customer-decisions.md +259 -0
  499. package/pennyfarthing-dist/workflows/research/steps-market/step-05-competitive-analysis.md +177 -0
  500. package/pennyfarthing-dist/workflows/research/steps-market/step-06-research-completion.md +475 -0
  501. package/pennyfarthing-dist/workflows/research/steps-technical/step-01-init.md +137 -0
  502. package/pennyfarthing-dist/workflows/research/steps-technical/step-02-technical-overview.md +239 -0
  503. package/pennyfarthing-dist/workflows/research/steps-technical/step-03-integration-patterns.md +248 -0
  504. package/pennyfarthing-dist/workflows/research/steps-technical/step-04-architectural-patterns.md +202 -0
  505. package/pennyfarthing-dist/workflows/research/steps-technical/step-05-implementation-research.md +239 -0
  506. package/pennyfarthing-dist/workflows/research/steps-technical/step-06-research-synthesis.md +486 -0
  507. package/pennyfarthing-dist/workflows/research/templates/research.template.md +29 -0
  508. package/pennyfarthing-dist/workflows/research/workflow.yaml +45 -0
  509. package/pennyfarthing-dist/workflows/retrospective/checklist.md +31 -0
  510. package/pennyfarthing-dist/workflows/retrospective/instructions.md +1443 -0
  511. package/pennyfarthing-dist/workflows/retrospective/workflow.yaml +50 -0
  512. package/pennyfarthing-dist/workflows/sprint-planning/checklist.md +33 -0
  513. package/pennyfarthing-dist/workflows/sprint-planning/sprint-status-template.yaml +55 -0
  514. package/pennyfarthing-dist/workflows/sprint-planning/steps/step-01-parse-epic-files.md +54 -0
  515. package/pennyfarthing-dist/workflows/sprint-planning/steps/step-02-build-sprint-status.md +44 -0
  516. package/pennyfarthing-dist/workflows/sprint-planning/steps/step-03-status-detection.md +64 -0
  517. package/pennyfarthing-dist/workflows/sprint-planning/steps/step-04-generate-status-file.md +73 -0
  518. package/pennyfarthing-dist/workflows/sprint-planning/steps/step-05-validate-and-report.md +56 -0
  519. package/pennyfarthing-dist/workflows/sprint-planning/workflow.yaml +34 -0
  520. package/pennyfarthing-dist/workflows/tdd.yaml +50 -0
  521. package/pennyfarthing-dist/workflows/trivial.yaml +40 -0
  522. package/pennyfarthing-dist/workflows/ux-design/steps/step-01-init.md +135 -0
  523. package/pennyfarthing-dist/workflows/ux-design/steps/step-01b-continue.md +127 -0
  524. package/pennyfarthing-dist/workflows/ux-design/steps/step-02-discovery.md +190 -0
  525. package/pennyfarthing-dist/workflows/ux-design/steps/step-03-core-experience.md +216 -0
  526. package/pennyfarthing-dist/workflows/ux-design/steps/step-04-emotional-response.md +219 -0
  527. package/pennyfarthing-dist/workflows/ux-design/steps/step-05-inspiration.md +234 -0
  528. package/pennyfarthing-dist/workflows/ux-design/steps/step-06-design-system.md +252 -0
  529. package/pennyfarthing-dist/workflows/ux-design/steps/step-07-defining-experience.md +254 -0
  530. package/pennyfarthing-dist/workflows/ux-design/steps/step-08-visual-foundation.md +224 -0
  531. package/pennyfarthing-dist/workflows/ux-design/steps/step-09-design-directions.md +224 -0
  532. package/pennyfarthing-dist/workflows/ux-design/steps/step-10-user-journeys.md +241 -0
  533. package/pennyfarthing-dist/workflows/ux-design/steps/step-11-component-strategy.md +248 -0
  534. package/pennyfarthing-dist/workflows/ux-design/steps/step-12-ux-patterns.md +237 -0
  535. package/pennyfarthing-dist/workflows/ux-design/steps/step-13-responsive-accessibility.md +264 -0
  536. package/pennyfarthing-dist/workflows/ux-design/steps/step-14-complete.md +228 -0
  537. package/pennyfarthing-dist/workflows/ux-design/ux-design-template.md +13 -0
  538. package/pennyfarthing-dist/workflows/ux-design/workflow.yaml +41 -0
@@ -0,0 +1,280 @@
1
+ #!/usr/bin/env bash
2
+ # check-context.sh - Check current Claude Code context usage
3
+ # Returns: percentage and recommendation for handoff
4
+ #
5
+ # Usage:
6
+ # ./check-context.sh # Output env vars (most recent transcript)
7
+ # ./check-context.sh --human # Human-readable output
8
+ # ./check-context.sh --session <id> # Check specific session transcript
9
+ # SESSION_ID=<id> ./check-context.sh # Alternative: session via env var
10
+ # eval $(./check-context.sh) # Load vars into shell
11
+
12
+ # Parse command line arguments
13
+ HUMAN_MODE=false
14
+ while [[ $# -gt 0 ]]; do
15
+ case "$1" in
16
+ --human)
17
+ HUMAN_MODE=true
18
+ shift
19
+ ;;
20
+ --session)
21
+ SESSION_ID="$2"
22
+ shift 2
23
+ ;;
24
+ *)
25
+ shift
26
+ ;;
27
+ esac
28
+ done
29
+
30
+ # Derive Claude project path from current directory
31
+ # Claude Code stores transcripts at ~/.claude/projects/<path-with-dashes>
32
+ # The path format is: -Users-name-Projects-project (leading dash, all slashes become dashes)
33
+ PROJECT_DIR="${PROJECT_ROOT:-$(pwd)}"
34
+ CLAUDE_PROJECT_PATH="$HOME/.claude/projects/$(echo "$PROJECT_DIR" | tr '/' '-')"
35
+
36
+ # Default thresholds (can be overridden by settings.local.json or config.local.yaml)
37
+ DEFAULT_IMMINENT_THRESHOLD=65
38
+ DEFAULT_WARNING_THRESHOLD=60
39
+ DEFAULT_CRITICAL_THRESHOLD=85
40
+ DEFAULT_MAX_TOKENS=200000
41
+ DEFAULT_TIREPUMP_THRESHOLD=60
42
+
43
+ # Load thresholds and permission_mode from .pennyfarthing/config.local.yaml (preferred) or settings.local.json (fallback)
44
+ PENNYFARTHING_CONFIG="${CLAUDE_PROJECT_DIR:-$PROJECT_DIR}/.pennyfarthing/config.local.yaml"
45
+ SETTINGS_FILE="${CLAUDE_PROJECT_DIR:-$PROJECT_DIR}/.claude/settings.local.json"
46
+ CONFIG=$(python3 -c "
47
+ import json
48
+ import sys
49
+
50
+ imminent_threshold = $DEFAULT_IMMINENT_THRESHOLD
51
+ warning_threshold = $DEFAULT_WARNING_THRESHOLD
52
+ critical_threshold = $DEFAULT_CRITICAL_THRESHOLD
53
+ max_tokens = $DEFAULT_MAX_TOKENS
54
+ tirepump_threshold = $DEFAULT_TIREPUMP_THRESHOLD
55
+ permission_mode = 'manual' # Default to manual
56
+ relay_mode = False # MSSCI-12395: Independent auto-handoff toggle
57
+
58
+ # First try .pennyfarthing/config.local.yaml (preferred location)
59
+ try:
60
+ import yaml
61
+ with open('$PENNYFARTHING_CONFIG', 'r') as f:
62
+ config = yaml.safe_load(f)
63
+ if config:
64
+ if 'context_budget' in config:
65
+ cb = config['context_budget']
66
+ imminent_threshold = cb.get('imminent_threshold', imminent_threshold)
67
+ warning_threshold = cb.get('warning_threshold', warning_threshold)
68
+ critical_threshold = cb.get('critical_threshold', critical_threshold)
69
+ max_tokens = cb.get('max_tokens', max_tokens)
70
+ tirepump_threshold = cb.get('tirepump_threshold', tirepump_threshold)
71
+ # Read permission_mode and relay_mode from workflow section
72
+ if 'workflow' in config:
73
+ if 'permission_mode' in config['workflow']:
74
+ permission_mode = config['workflow']['permission_mode']
75
+ # MSSCI-12395: relay_mode for auto-handoff (independent of permission_mode)
76
+ if 'relay_mode' in config['workflow']:
77
+ relay_mode = config['workflow']['relay_mode'] == True
78
+ except:
79
+ # Fallback to settings.local.json (legacy location)
80
+ try:
81
+ with open('$SETTINGS_FILE', 'r') as f:
82
+ settings = json.load(f)
83
+ if 'context_budget' in settings:
84
+ cb = settings['context_budget']
85
+ imminent_threshold = cb.get('imminent_threshold', imminent_threshold)
86
+ warning_threshold = cb.get('warning_threshold', warning_threshold)
87
+ critical_threshold = cb.get('critical_threshold', critical_threshold)
88
+ max_tokens = cb.get('max_tokens', max_tokens)
89
+ tirepump_threshold = cb.get('tirepump_threshold', tirepump_threshold)
90
+ if 'workflow' in settings:
91
+ if 'permission_mode' in settings['workflow']:
92
+ permission_mode = settings['workflow']['permission_mode']
93
+ # MSSCI-12395: relay_mode for auto-handoff (independent of permission_mode)
94
+ if 'relay_mode' in settings['workflow']:
95
+ relay_mode = settings['workflow']['relay_mode'] == True
96
+ except:
97
+ pass
98
+
99
+ print(f'IMMINENT_THRESHOLD={imminent_threshold}')
100
+ print(f'WARNING_THRESHOLD={warning_threshold}')
101
+ print(f'CRITICAL_THRESHOLD={critical_threshold}')
102
+ print(f'MAX_TOKENS={max_tokens}')
103
+ print(f'TIREPUMP_THRESHOLD={tirepump_threshold}')
104
+ print(f'PERMISSION_MODE={permission_mode}')
105
+ print(f'RELAY_MODE={str(relay_mode).lower()}')
106
+ " 2>/dev/null)
107
+
108
+ # Apply config or use defaults
109
+ eval "$CONFIG" 2>/dev/null || {
110
+ IMMINENT_THRESHOLD=$DEFAULT_IMMINENT_THRESHOLD
111
+ WARNING_THRESHOLD=$DEFAULT_WARNING_THRESHOLD
112
+ CRITICAL_THRESHOLD=$DEFAULT_CRITICAL_THRESHOLD
113
+ MAX_TOKENS=$DEFAULT_MAX_TOKENS
114
+ TIREPUMP_THRESHOLD=$DEFAULT_TIREPUMP_THRESHOLD
115
+ }
116
+
117
+ # Find transcript - either specific session or most recent
118
+ if [ -n "$SESSION_ID" ]; then
119
+ # Session-specific: look for transcript with matching session ID
120
+ TRANSCRIPT="$CLAUDE_PROJECT_PATH/${SESSION_ID}.jsonl"
121
+ if [ ! -f "$TRANSCRIPT" ]; then
122
+ if [ "$HUMAN_MODE" = "true" ]; then
123
+ echo "⚠️ Context: unknown (session transcript not found: $SESSION_ID)"
124
+ else
125
+ echo "CONTEXT_ERROR=session_not_found"
126
+ echo "CONTEXT_SESSION=$SESSION_ID"
127
+ fi
128
+ exit 1
129
+ fi
130
+ else
131
+ # Default: find most recent transcript (current session)
132
+ TRANSCRIPT=$(ls -t "$CLAUDE_PROJECT_PATH"/*.jsonl 2>/dev/null | grep -v "agent-" | head -1)
133
+ if [ -z "$TRANSCRIPT" ]; then
134
+ if [ "$HUMAN_MODE" = "true" ]; then
135
+ echo "⚠️ Context: unknown (no transcript found)"
136
+ else
137
+ echo "CONTEXT_ERROR=no_transcript"
138
+ fi
139
+ exit 1
140
+ fi
141
+ fi
142
+
143
+ # Parse transcript for baseline (first turn) and current (last turn) usage data
144
+ # Baseline = system prompt overhead, cached per session
145
+ # Usable = current - baseline (what the user's conversation has consumed)
146
+ RESULT=$(python3 -c "
147
+ import sys
148
+ import json
149
+
150
+ warning_threshold = $WARNING_THRESHOLD
151
+ max_tokens = $MAX_TOKENS
152
+ permission_mode = '$PERMISSION_MODE'
153
+ relay_mode = '$RELAY_MODE' == 'true' # MSSCI-12395: Independent auto-handoff toggle
154
+ tirepump_threshold = $TIREPUMP_THRESHOLD # Threshold for TirePump auto-handoff (configurable)
155
+
156
+ with open('$TRANSCRIPT', 'r') as f:
157
+ lines = f.readlines()
158
+
159
+ # Find first and last lines with usage data
160
+ first_total = None
161
+ last_total = None
162
+
163
+ for line in lines:
164
+ try:
165
+ data = json.loads(line.strip())
166
+ if 'message' in data and 'usage' in data['message']:
167
+ usage = data['message']['usage']
168
+ input_t = usage.get('input_tokens', 0)
169
+ cache_read = usage.get('cache_read_input_tokens', 0)
170
+ cache_create = usage.get('cache_creation_input_tokens', 0)
171
+ total = cache_read + cache_create + input_t
172
+
173
+ if first_total is None:
174
+ first_total = total
175
+ last_total = total
176
+ except:
177
+ continue
178
+
179
+ if last_total is not None:
180
+ # Baseline is first turn's total (system prompt + tools + CLAUDE.md etc)
181
+ baseline = first_total if first_total is not None else 0
182
+
183
+ # Usable tokens = what user's conversation has consumed
184
+ usable_tokens = last_total - baseline
185
+
186
+ # Available capacity = max minus baseline overhead
187
+ available_capacity = max_tokens - baseline
188
+
189
+ # Usable percent = conversation usage as % of available capacity
190
+ usable_pct = (usable_tokens / available_capacity * 100) if available_capacity > 0 else 0
191
+
192
+ # Total percent (for backwards compatibility)
193
+ total_pct = (last_total / max_tokens) * 100
194
+
195
+ # Output all values
196
+ print(f'CONTEXT_TOKENS={last_total}')
197
+ print(f'CONTEXT_PERCENT={total_pct:.0f}')
198
+ print(f'CONTEXT_BASELINE={baseline}')
199
+ print(f'CONTEXT_USABLE_TOKENS={usable_tokens}')
200
+ print(f'CONTEXT_USABLE_PERCENT={usable_pct:.0f}')
201
+ print(f'CONTEXT_AVAILABLE={available_capacity}')
202
+ print(f'PERMISSION_MODE={permission_mode}')
203
+
204
+ # Use usable percent for status decisions (more accurate for user)
205
+ if usable_pct > warning_threshold:
206
+ print('CONTEXT_STATUS=HIGH')
207
+ else:
208
+ print('CONTEXT_STATUS=OK')
209
+
210
+ # RELAY_MODE: Output for handoff-marker.sh to use
211
+ print(f'RELAY_MODE={str(relay_mode).lower()}')
212
+
213
+ # HANDOFF_MODE: 'auto' if relay_mode enabled, 'ask' otherwise
214
+ # MSSCI-12395: relay_mode controls autohandoff independent of context level
215
+ if relay_mode:
216
+ print('HANDOFF_MODE=auto')
217
+ else:
218
+ print('HANDOFF_MODE=ask')
219
+
220
+ # TirePump: Use CONTEXT_CLEAR (clear + load next agent) when:
221
+ # 1. relay_mode is true (auto-handoff enabled) - MSSCI-12395
222
+ # 2. context > 60% (tirepump_threshold)
223
+ # This enables continuous autonomous runs without manual intervention
224
+ # Legacy: also support permission_mode == 'turbo' for backwards compatibility
225
+ use_tirepump = (relay_mode or permission_mode == 'turbo') and usable_pct > tirepump_threshold
226
+ print(f'USE_TIREPUMP={str(use_tirepump).lower()}')
227
+
228
+ # Cyclist detection: Multiple methods for robustness
229
+ # 1. CYCLIST env var set to '1' (Electron mode - Cyclist spawns Claude)
230
+ # 2. .cyclist-port file exists (Web mode - Claude connects to running Cyclist)
231
+ import os
232
+ from pathlib import Path
233
+ is_cyclist = os.environ.get('CYCLIST', '') == '1'
234
+ if not is_cyclist:
235
+ # Check for .cyclist-port file in packages/cyclist directory
236
+ # This indicates Cyclist is running in web mode
237
+ project_dir = os.environ.get('CYCLIST_PROJECT_DIR', os.getcwd())
238
+ port_file = Path(project_dir) / 'packages' / 'cyclist' / '.cyclist-port'
239
+ if not port_file.exists():
240
+ # Also check cwd in case we're already in cyclist dir
241
+ port_file = Path(os.getcwd()) / '.cyclist-port'
242
+ is_cyclist = port_file.exists()
243
+ print(f'IS_CYCLIST={str(is_cyclist).lower()}')
244
+ " 2>/dev/null)
245
+
246
+ if [ "$HUMAN_MODE" = "true" ]; then
247
+ eval "$RESULT"
248
+ if [ "$USE_TIREPUMP" = "true" ]; then
249
+ echo "🔄 Context: ${CONTEXT_USABLE_PERCENT}% used (${CONTEXT_USABLE_TOKENS} of ${CONTEXT_AVAILABLE} available) - TIREPUMP (clear + next agent)"
250
+ elif [ "$CONTEXT_STATUS" = "HIGH" ]; then
251
+ echo "⚠️ Context: ${CONTEXT_USABLE_PERCENT}% used (${CONTEXT_USABLE_TOKENS} of ${CONTEXT_AVAILABLE} available) - AUTO-HANDOFF"
252
+ else
253
+ echo "✅ Context: ${CONTEXT_USABLE_PERCENT}% used (${CONTEXT_USABLE_TOKENS} of ${CONTEXT_AVAILABLE} available)"
254
+ fi
255
+ echo " Overhead: ${CONTEXT_BASELINE} tokens (system prompt + tools)"
256
+ echo " Mode: ${PERMISSION_MODE}"
257
+
258
+ # Output warning messages at configurable thresholds (use usable percent)
259
+ if [ -n "$CONTEXT_USABLE_PERCENT" ]; then
260
+ if [ "$CONTEXT_USABLE_PERCENT" -ge "$CRITICAL_THRESHOLD" ] 2>/dev/null; then
261
+ echo "CONTEXT_WARNING: Critical (${CONTEXT_USABLE_PERCENT}%) - checkpoint and handoff recommended"
262
+ elif [ "$CONTEXT_USABLE_PERCENT" -ge "$WARNING_THRESHOLD" ] 2>/dev/null; then
263
+ echo "CONTEXT_WARNING: High (${CONTEXT_USABLE_PERCENT}%) - consider handoff soon"
264
+ fi
265
+ fi
266
+ else
267
+ echo "$RESULT"
268
+
269
+ # Also output warnings in non-human mode for scripting (use usable percent)
270
+ eval "$RESULT" 2>/dev/null || true
271
+ if [ -n "$CONTEXT_USABLE_PERCENT" ]; then
272
+ if [ "$CONTEXT_USABLE_PERCENT" -ge "$CRITICAL_THRESHOLD" ] 2>/dev/null; then
273
+ echo "CONTEXT_WARNING=Critical"
274
+ echo "CONTEXT_RECOMMENDATION='checkpoint and handoff recommended'"
275
+ elif [ "$CONTEXT_USABLE_PERCENT" -ge "$WARNING_THRESHOLD" ] 2>/dev/null; then
276
+ echo "CONTEXT_WARNING=High"
277
+ echo "CONTEXT_RECOMMENDATION='consider handoff soon'"
278
+ fi
279
+ fi
280
+ fi
@@ -0,0 +1,101 @@
1
+ #!/bin/bash
2
+ # Generate complete AGENT_COMMAND block with pre-rendered marker
3
+ # Usage: handoff-marker.sh <next-agent> [--error <message>]
4
+ #
5
+ # Outputs a complete AGENT_COMMAND block that subagents can emit verbatim.
6
+ # Handles IS_CYCLIST and USE_TIREPUMP detection automatically.
7
+ #
8
+ # Single source of truth for marker format - both agents and quick-actions.js
9
+ # should reference this script's output format.
10
+
11
+ set -euo pipefail
12
+
13
+ NEXT_AGENT=""
14
+ IS_ERROR=false
15
+ ERROR_MSG=""
16
+
17
+ # Parse args
18
+ while [[ $# -gt 0 ]]; do
19
+ case "$1" in
20
+ --error)
21
+ IS_ERROR=true
22
+ ERROR_MSG="${2:-Error occurred}"
23
+ shift 2
24
+ ;;
25
+ *)
26
+ if [[ -z "$NEXT_AGENT" ]]; then
27
+ NEXT_AGENT="$1"
28
+ fi
29
+ shift
30
+ ;;
31
+ esac
32
+ done
33
+
34
+ if [[ -z "$NEXT_AGENT" && "$IS_ERROR" != "true" ]]; then
35
+ echo "Usage: handoff-marker.sh <next-agent> [--error <message>]" >&2
36
+ echo "" >&2
37
+ echo "Examples:" >&2
38
+ echo " handoff-marker.sh dev # Normal handoff to dev" >&2
39
+ echo " handoff-marker.sh tea # Normal handoff to tea" >&2
40
+ echo " handoff-marker.sh --error 'Tests failing' # Error case" >&2
41
+ exit 1
42
+ fi
43
+
44
+ # Get environment from check-context.sh
45
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
46
+ eval "$("$SCRIPT_DIR/check-context.sh" 2>/dev/null)" || true
47
+
48
+ # Default values if check-context.sh failed
49
+ IS_CYCLIST="${IS_CYCLIST:-false}"
50
+ USE_TIREPUMP="${USE_TIREPUMP:-false}"
51
+ RELAY_MODE="${RELAY_MODE:-false}"
52
+
53
+ # Generate marker based on environment
54
+ if [[ "$IS_ERROR" == "true" ]]; then
55
+ # Error case - no marker
56
+ cat <<EOF
57
+ ---
58
+ AGENT_COMMAND:
59
+ marker: ""
60
+ fallback: "$ERROR_MSG"
61
+ error: true
62
+ ---
63
+ EOF
64
+ elif [[ "$IS_CYCLIST" != "true" ]]; then
65
+ # Not in Cyclist - no marker
66
+ cat <<EOF
67
+ ---
68
+ AGENT_COMMAND:
69
+ marker: ""
70
+ fallback: "Run \`/${NEXT_AGENT}\` to continue"
71
+ ---
72
+ EOF
73
+ elif [[ "$RELAY_MODE" != "true" ]]; then
74
+ # Cyclist + Relay OFF - emit question marker for manual handoff confirmation
75
+ cat <<EOF
76
+ ---
77
+ AGENT_COMMAND:
78
+ marker: "<!-- CYCLIST:QUESTION:yesno -->"
79
+ question: "Ready to hand off to /${NEXT_AGENT}?"
80
+ fallback: "Run \`/${NEXT_AGENT}\` to continue"
81
+ ---
82
+ EOF
83
+ elif [[ "$USE_TIREPUMP" == "true" ]]; then
84
+ # Cyclist + Relay ON + high context - context clear marker
85
+ cat <<EOF
86
+ ---
87
+ AGENT_COMMAND:
88
+ marker: "<!-- CYCLIST:CONTEXT_CLEAR:/${NEXT_AGENT} -->"
89
+ fallback: "Run \`/${NEXT_AGENT}\` to continue"
90
+ ---
91
+ EOF
92
+ else
93
+ # Cyclist + Relay ON + low context - handoff marker
94
+ cat <<EOF
95
+ ---
96
+ AGENT_COMMAND:
97
+ marker: "<!-- CYCLIST:HANDOFF:/${NEXT_AGENT} -->"
98
+ fallback: "Run \`/${NEXT_AGENT}\` to continue"
99
+ ---
100
+ EOF
101
+ fi
@@ -0,0 +1,95 @@
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: 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
+ # Find project root
18
+ if [[ -z "${PROJECT_ROOT:-}" ]]; then
19
+ d="$PWD"
20
+ while [[ ! -d "$d/.pennyfarthing" ]] && [[ "$d" != "/" ]]; do
21
+ d="$(dirname "$d")"
22
+ done
23
+ PROJECT_ROOT="$d"
24
+ fi
25
+
26
+ SCRIPT_DIR="$PROJECT_ROOT/.pennyfarthing/scripts/core"
27
+ SESSION_DIR="$PROJECT_ROOT/.session"
28
+
29
+ # Find active session file
30
+ SESSION_FILE=$(find "$SESSION_DIR" -maxdepth 1 -name "*-session.md" 2>/dev/null | head -1)
31
+
32
+ if [[ -z "$SESSION_FILE" || ! -f "$SESSION_FILE" ]]; then
33
+ # No session - just start the agent normally
34
+ exec "$SCRIPT_DIR/run.sh" core/agent-session.sh start "$AGENT"
35
+ fi
36
+
37
+ # Extract workflow and phase from session (handles multiple formats)
38
+ # Format 1: **Workflow:** value
39
+ # Format 2: - **Workflow**: value
40
+ WORKFLOW=$(grep -E "\*\*Workflow\*?\*?:" "$SESSION_FILE" 2>/dev/null | head -1 | sed 's/.*\*\*Workflow\*\*[:\*]* *//' | tr -d ' ' || echo "")
41
+ PHASE=$(grep -E "\*\*Phase\*?\*?:" "$SESSION_FILE" 2>/dev/null | head -1 | sed 's/.*\*\*Phase\*\*[:\*]* *//' | tr -d ' ' || echo "")
42
+
43
+ if [[ -z "$WORKFLOW" ]]; then
44
+ # Can't determine workflow - start normally
45
+ exec "$SCRIPT_DIR/run.sh" core/agent-session.sh start "$AGENT"
46
+ fi
47
+
48
+ # If no Phase field, try to infer from status patterns
49
+ if [[ -z "$PHASE" ]]; then
50
+ # Check for approval status (story is done, needs SM to close)
51
+ if grep -qE "\*\*Status\*\*:.*APPROVED" "$SESSION_FILE" 2>/dev/null; then
52
+ PHASE="approved"
53
+ # Check for review status
54
+ elif grep -qE "Reviewer Assessment|Review.*REJECTED\|Review.*APPROVED" "$SESSION_FILE" 2>/dev/null; then
55
+ PHASE="review"
56
+ # Check for green/implementation complete
57
+ elif grep -qE "Dev Assessment|\*\*Status\*\*:.*GREEN" "$SESSION_FILE" 2>/dev/null; then
58
+ # Has dev assessment - could be in review or approved
59
+ if grep -qE "Reviewer Assessment" "$SESSION_FILE" 2>/dev/null; then
60
+ PHASE="approved" # Reviewer already assessed
61
+ else
62
+ PHASE="review" # Needs reviewer
63
+ fi
64
+ # Check for red/test phase
65
+ elif grep -qE "TEA Assessment|\*\*Status\*\*:.*RED" "$SESSION_FILE" 2>/dev/null; then
66
+ PHASE="green" # TEA done, Dev's turn
67
+ else
68
+ # Can't determine phase - start normally
69
+ exec "$SCRIPT_DIR/run.sh" core/agent-session.sh start "$AGENT"
70
+ fi
71
+ fi
72
+
73
+ # Get the owner of this phase
74
+ OWNER=$("$SCRIPT_DIR/run.sh" workflow/phase-owner.sh "$WORKFLOW" "$PHASE" 2>/dev/null || echo "")
75
+
76
+ if [[ -z "$OWNER" ]]; then
77
+ # Phase owner lookup failed - start normally
78
+ exec "$SCRIPT_DIR/run.sh" core/agent-session.sh start "$AGENT"
79
+ fi
80
+
81
+ # Check if this agent owns the phase
82
+ if [[ "$OWNER" == "$AGENT" ]]; then
83
+ # Correct agent - start normally
84
+ exec "$SCRIPT_DIR/run.sh" core/agent-session.sh start "$AGENT"
85
+ fi
86
+
87
+ # Wrong agent! Output the handoff marker and info
88
+ STORY_ID=$(basename "$SESSION_FILE" -session.md)
89
+
90
+ echo "Phase check: Story $STORY_ID is in '$PHASE' phase (workflow: $WORKFLOW)"
91
+ echo "Phase owner: $OWNER (you requested: $AGENT)"
92
+ echo ""
93
+
94
+ # Generate and output the handoff marker
95
+ "$SCRIPT_DIR/handoff-marker.sh" "$OWNER"
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env bash
2
+ # prime.sh - Load essential project context at agent activation
3
+ # Usage: prime.sh [--minimal] [--full] [--quiet] [--agent <name>]
4
+ #
5
+ # Thin wrapper around python -m pennyfarthing_scripts.prime
6
+
7
+ # Find the package root (where pennyfarthing_scripts lives)
8
+ # Works for both npm installs (node_modules/@pennyfarthing/core) and local dev
9
+ # Use pwd -P to resolve symlinks in the path (handles symlinked parent dirs)
10
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
11
+ PACKAGE_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd -P)"
12
+
13
+ # Fallback: if pennyfarthing_scripts not found at expected location,
14
+ # look in node_modules (handles edge cases like stale copies)
15
+ if [[ ! -d "$PACKAGE_ROOT/pennyfarthing_scripts" ]]; then
16
+ # Find project root by looking for .pennyfarthing marker
17
+ PROJECT_ROOT="$PWD"
18
+ while [[ ! -d "$PROJECT_ROOT/.pennyfarthing" ]] && [[ "$PROJECT_ROOT" != "/" ]]; do
19
+ PROJECT_ROOT="$(dirname "$PROJECT_ROOT")"
20
+ done
21
+ # Try node_modules location
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
+ # Set PYTHONPATH so Python can find pennyfarthing_scripts
28
+ export PYTHONPATH="${PACKAGE_ROOT}:${PYTHONPATH:-}"
29
+
30
+ exec python3 -m pennyfarthing_scripts.prime "$@"
@@ -0,0 +1,92 @@
1
+ #!/usr/bin/env zsh
2
+ # Bootstrap script - finds PROJECT_ROOT and runs the requested script
3
+ # Usage: ./scripts/run.sh <category/script-name> [args...]
4
+ #
5
+ # Scripts are organized in categorical subdirectories:
6
+ # core/ - Essential scripts (agent-session.sh, check-context.sh)
7
+ # workflow/ - Workflow mechanics (finish-story.sh, check.sh)
8
+ # sprint/ - Sprint operations (sprint-status.sh, archive-story.sh)
9
+ # story/ - Story operations (create-story.sh, size-story.sh)
10
+ # jira/ - Jira integration (jira-claim-story.sh, jira-reconcile.sh)
11
+ # git/ - Git operations (create-feature-branches.sh, release.sh)
12
+ # theme/ - Theme operations (list-themes.sh)
13
+ # test/ - Test infrastructure (test-setup.sh)
14
+ # lib/ - Shared libraries (common.sh, logging.sh)
15
+ # misc/ - Uncategorized utilities
16
+ # hooks/ - Git and Claude hooks
17
+ #
18
+ # Full paths are REQUIRED to avoid ambiguity:
19
+ # ./scripts/run.sh core/agent-session.sh start sm
20
+ # ./scripts/run.sh jira/jira-claim-story.sh MSSCI-12345
21
+ #
22
+ # This solves the absolute path problem by:
23
+ # 1. Finding PROJECT_ROOT by looking for the .pennyfarthing/ directory
24
+ # 2. Exporting PROJECT_ROOT for the script to use
25
+ # 3. Running the script with full absolute paths
26
+
27
+ set -euo pipefail
28
+
29
+ # Find PROJECT_ROOT by looking for .pennyfarthing/ marker
30
+ find_project_root() {
31
+ local dir="$PWD"
32
+ while [[ ! -d "$dir/.pennyfarthing" ]] && [[ "$dir" != "/" ]]; do
33
+ dir="$(dirname "$dir")"
34
+ done
35
+ if [[ -d "$dir/.pennyfarthing" ]]; then
36
+ echo "$dir"
37
+ else
38
+ echo "Error: Could not find project root (no .pennyfarthing/ directory found)" >&2
39
+ exit 1
40
+ fi
41
+ }
42
+
43
+ PROJECT_ROOT="$(find_project_root)"
44
+ export PROJECT_ROOT
45
+
46
+ # Get the script to run
47
+ if [[ $# -lt 1 ]]; then
48
+ echo "Usage: ./scripts/run.sh <category/script-name> [args...]" >&2
49
+ echo "Example: ./scripts/run.sh core/agent-session.sh start sm" >&2
50
+ echo "Example: ./scripts/run.sh jira/jira-claim-story.sh MSSCI-12345" >&2
51
+ exit 1
52
+ fi
53
+
54
+ SCRIPT_NAME="$1"
55
+ shift
56
+
57
+ # Single source of truth: .pennyfarthing/scripts
58
+ SCRIPTS_DIR="$PROJECT_ROOT/.pennyfarthing/scripts"
59
+ if [[ ! -d "$SCRIPTS_DIR" ]]; then
60
+ echo "Error: Scripts directory not found: $SCRIPTS_DIR" >&2
61
+ exit 1
62
+ fi
63
+
64
+ # Set PYTHONPATH to find pennyfarthing_scripts module
65
+ # Resolve symlink and go up to package root (pennyfarthing-dist/scripts -> package root)
66
+ SCRIPTS_REAL_PATH="$(cd "$SCRIPTS_DIR" && pwd -P)"
67
+ PENNYFARTHING_PKG_ROOT="$(dirname "$(dirname "$SCRIPTS_REAL_PATH")")"
68
+ if [[ -d "$PENNYFARTHING_PKG_ROOT/pennyfarthing_scripts" ]]; then
69
+ export PYTHONPATH="${PENNYFARTHING_PKG_ROOT}${PYTHONPATH:+:$PYTHONPATH}"
70
+ fi
71
+
72
+ # Full path required - script must include category
73
+ SCRIPT_PATH="$SCRIPTS_DIR/$SCRIPT_NAME"
74
+
75
+ # Python-first dispatch: prefer .py over .sh when available
76
+ # This enables transparent migration of shell scripts to Python
77
+ SCRIPT_BASE="${SCRIPT_NAME%.sh}"
78
+ PYTHON_PATH="$SCRIPTS_DIR/${SCRIPT_BASE}.py"
79
+
80
+ if [[ -f "$PYTHON_PATH" ]] && command -v python3 &>/dev/null; then
81
+ exec python3 "$PYTHON_PATH" "$@"
82
+ fi
83
+
84
+ if [[ -f "$SCRIPT_PATH" ]]; then
85
+ exec "$SCRIPT_PATH" "$@"
86
+ else
87
+ echo "Error: Script not found: $SCRIPT_NAME" >&2
88
+ echo "Full path required. Available categories:" >&2
89
+ echo " core/, workflow/, sprint/, story/, jira/, git/, theme/, test/, lib/, misc/, hooks/, cyclist/" >&2
90
+ echo "Example: run.sh core/agent-session.sh start sm" >&2
91
+ exit 1
92
+ fi
@@ -0,0 +1,21 @@
1
+ #!/bin/bash
2
+ # Check if running inside Cyclist visual terminal
3
+ # Usage: .pennyfarthing/scripts/core/run.sh cyclist/is-cyclist.sh
4
+ #
5
+ # Exit codes:
6
+ # 0 - Running in Cyclist
7
+ # 1 - Not running in Cyclist
8
+ #
9
+ # Output (JSON):
10
+ # {"cyclist": true/false}
11
+
12
+ set -euo pipefail
13
+
14
+ # Check the CYCLIST environment variable (set by ClaudeService.ensureProcess)
15
+ if [[ "${CYCLIST:-}" == "1" ]]; then
16
+ echo '{"cyclist": true}'
17
+ exit 0
18
+ else
19
+ echo '{"cyclist": false}'
20
+ exit 1
21
+ fi
@@ -0,0 +1,25 @@
1
+ # Git Scripts
2
+
3
+ Scripts for Git operations, branching, and release management.
4
+
5
+ ## Scripts
6
+
7
+ | Script | Purpose |
8
+ |--------|---------|
9
+ | `create-feature-branches.sh` | Create feature branches in repos |
10
+ | `git-status-all.sh` | Show git status across all repos |
11
+ | `worktree-manager.sh` | Manage git worktrees for parallel work |
12
+ | `install-git-hooks.sh` | Install git hooks in project |
13
+ | `release.sh` | Release workflow (merge develop to main) |
14
+
15
+ ## Usage
16
+
17
+ ```bash
18
+ .pennyfarthing/scripts/core/run.sh git/create-feature-branches.sh feat/my-feature
19
+ .pennyfarthing/scripts/core/run.sh git/release.sh
20
+ ```
21
+
22
+ ## Ownership
23
+
24
+ - **Primary users:** SM agent, DevOps agent
25
+ - **Maintained by:** Core Pennyfarthing team