@pennyfarthing/core 11.0.0 → 11.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (401) hide show
  1. package/README.md +81 -23
  2. package/package.json +1 -1
  3. package/packages/core/dist/cli/utils/010-detect-remove-old-packages.test.d.ts +20 -0
  4. package/packages/core/dist/cli/utils/010-detect-remove-old-packages.test.d.ts.map +1 -0
  5. package/packages/core/dist/cli/utils/010-detect-remove-old-packages.test.js +278 -0
  6. package/packages/core/dist/cli/utils/010-detect-remove-old-packages.test.js.map +1 -0
  7. package/packages/core/dist/cli/utils/constants.d.ts +8 -2
  8. package/packages/core/dist/cli/utils/constants.d.ts.map +1 -1
  9. package/packages/core/dist/cli/utils/constants.js +4 -1
  10. package/packages/core/dist/cli/utils/constants.js.map +1 -1
  11. package/packages/core/dist/cli/utils/constants.test.d.ts +10 -0
  12. package/packages/core/dist/cli/utils/constants.test.d.ts.map +1 -0
  13. package/packages/core/dist/cli/utils/constants.test.js +38 -0
  14. package/packages/core/dist/cli/utils/constants.test.js.map +1 -0
  15. package/packages/core/dist/consultation/consultation-protocol.d.ts +139 -0
  16. package/packages/core/dist/consultation/consultation-protocol.d.ts.map +1 -0
  17. package/packages/core/dist/consultation/consultation-protocol.js +178 -0
  18. package/packages/core/dist/consultation/consultation-protocol.js.map +1 -0
  19. package/packages/core/dist/consultation/consultation-protocol.test.d.ts +20 -0
  20. package/packages/core/dist/consultation/consultation-protocol.test.d.ts.map +1 -0
  21. package/packages/core/dist/consultation/consultation-protocol.test.js +474 -0
  22. package/packages/core/dist/consultation/consultation-protocol.test.js.map +1 -0
  23. package/packages/core/dist/consultation/dialogue-manager.d.ts +75 -0
  24. package/packages/core/dist/consultation/dialogue-manager.d.ts.map +1 -0
  25. package/packages/core/dist/consultation/dialogue-manager.js +334 -0
  26. package/packages/core/dist/consultation/dialogue-manager.js.map +1 -0
  27. package/packages/core/dist/consultation/dialogue-manager.test.d.ts +19 -0
  28. package/packages/core/dist/consultation/dialogue-manager.test.d.ts.map +1 -0
  29. package/packages/core/dist/consultation/dialogue-manager.test.js +444 -0
  30. package/packages/core/dist/consultation/dialogue-manager.test.js.map +1 -0
  31. package/packages/core/dist/public/js/react/react.js +3 -3
  32. package/packages/core/dist/scripts/theme-detail.test.d.ts +10 -0
  33. package/packages/core/dist/scripts/theme-detail.test.js +199 -0
  34. package/packages/core/dist/server/api/git.d.ts +13 -1
  35. package/packages/core/dist/server/api/git.d.ts.map +1 -1
  36. package/packages/core/dist/server/api/git.js +53 -34
  37. package/packages/core/dist/server/api/git.js.map +1 -1
  38. package/packages/core/dist/server/api/health-score.d.ts.map +1 -1
  39. package/packages/core/dist/server/api/health-score.js +25 -1
  40. package/packages/core/dist/server/api/health-score.js.map +1 -1
  41. package/packages/core/dist/server/api/settings.d.ts.map +1 -1
  42. package/packages/core/dist/server/api/settings.js +63 -1
  43. package/packages/core/dist/server/api/settings.js.map +1 -1
  44. package/packages/core/dist/server/api/theme-agents.d.ts.map +1 -1
  45. package/packages/core/dist/server/api/theme-agents.js +61 -0
  46. package/packages/core/dist/server/api/theme-agents.js.map +1 -1
  47. package/packages/core/dist/server/server.d.ts.map +1 -1
  48. package/packages/core/dist/server/server.js +17 -12
  49. package/packages/core/dist/server/server.js.map +1 -1
  50. package/packages/core/dist/shared/skill-search.test.js +2 -2
  51. package/packages/core/dist/workflow/gate-file-validation.d.ts +49 -0
  52. package/packages/core/dist/workflow/gate-file-validation.d.ts.map +1 -0
  53. package/packages/core/dist/workflow/gate-file-validation.js +157 -0
  54. package/packages/core/dist/workflow/gate-file-validation.js.map +1 -0
  55. package/packages/core/dist/workflow/gate-file-validation.test.d.ts +19 -0
  56. package/packages/core/dist/workflow/gate-file-validation.test.d.ts.map +1 -0
  57. package/packages/core/dist/workflow/gate-file-validation.test.js +536 -0
  58. package/packages/core/dist/workflow/gate-file-validation.test.js.map +1 -0
  59. package/packages/core/dist/workflow/gate-schema-validation.test.d.ts +14 -0
  60. package/packages/core/dist/workflow/gate-schema-validation.test.d.ts.map +1 -0
  61. package/packages/core/dist/workflow/gate-schema-validation.test.js +339 -0
  62. package/packages/core/dist/workflow/gate-schema-validation.test.js.map +1 -0
  63. package/packages/core/dist/workflow/handoff.js +2 -2
  64. package/packages/core/dist/workflow/handoff.js.map +1 -1
  65. package/packages/core/dist/workflow/handoff.test.js +16 -0
  66. package/packages/core/dist/workflow/handoff.test.js.map +1 -1
  67. package/packages/core/dist/workflow/workflow-schema.d.ts +4 -2
  68. package/packages/core/dist/workflow/workflow-schema.d.ts.map +1 -1
  69. package/packages/core/dist/workflow/workflow-schema.js +43 -8
  70. package/packages/core/dist/workflow/workflow-schema.js.map +1 -1
  71. package/pennyfarthing-dist/agents/README.md +6 -14
  72. package/pennyfarthing-dist/agents/architect.md +43 -29
  73. package/pennyfarthing-dist/agents/ba.md +30 -29
  74. package/pennyfarthing-dist/agents/dev.md +32 -43
  75. package/pennyfarthing-dist/agents/devops.md +57 -21
  76. package/pennyfarthing-dist/agents/orchestrator.md +3 -10
  77. package/pennyfarthing-dist/agents/pm.md +45 -31
  78. package/pennyfarthing-dist/agents/reviewer.md +20 -66
  79. package/pennyfarthing-dist/agents/sm-setup.md +2 -2
  80. package/pennyfarthing-dist/agents/sm.md +8 -30
  81. package/pennyfarthing-dist/agents/tea.md +25 -41
  82. package/pennyfarthing-dist/agents/tech-writer.md +33 -90
  83. package/pennyfarthing-dist/agents/ux-designer.md +39 -39
  84. package/pennyfarthing-dist/commands/benchmark-control.md +8 -64
  85. package/pennyfarthing-dist/commands/benchmark.md +8 -480
  86. package/pennyfarthing-dist/commands/job-fair.md +8 -97
  87. package/pennyfarthing-dist/commands/pf-benchmark-control.md +70 -0
  88. package/pennyfarthing-dist/commands/pf-benchmark.md +486 -0
  89. package/pennyfarthing-dist/commands/pf-chore.md +4 -4
  90. package/pennyfarthing-dist/commands/pf-ci.md +40 -0
  91. package/pennyfarthing-dist/commands/pf-close-epic.md +9 -27
  92. package/pennyfarthing-dist/commands/pf-continue-session.md +9 -213
  93. package/pennyfarthing-dist/commands/pf-create-branches-from-story.md +11 -353
  94. package/pennyfarthing-dist/commands/pf-docs.md +28 -0
  95. package/pennyfarthing-dist/commands/pf-epic.md +67 -0
  96. package/pennyfarthing-dist/commands/pf-git-cleanup.md +11 -52
  97. package/pennyfarthing-dist/commands/pf-git.md +75 -0
  98. package/pennyfarthing-dist/commands/pf-help.md +110 -128
  99. package/pennyfarthing-dist/commands/pf-job-fair.md +102 -0
  100. package/pennyfarthing-dist/commands/pf-new-work.md +9 -18
  101. package/pennyfarthing-dist/commands/pf-parallel-work.md +6 -66
  102. package/pennyfarthing-dist/commands/pf-release.md +11 -76
  103. package/pennyfarthing-dist/commands/pf-repo-status.md +11 -44
  104. package/pennyfarthing-dist/commands/pf-run-ci.md +8 -111
  105. package/pennyfarthing-dist/commands/pf-session.md +51 -0
  106. package/pennyfarthing-dist/commands/pf-solo.md +447 -0
  107. package/pennyfarthing-dist/commands/pf-sprint-planning.md +8 -104
  108. package/pennyfarthing-dist/commands/pf-standalone.md +1 -1
  109. package/pennyfarthing-dist/commands/pf-start-epic.md +9 -163
  110. package/pennyfarthing-dist/commands/pf-sync-epic-to-jira.md +8 -179
  111. package/pennyfarthing-dist/commands/pf-sync-work-with-sprint.md +8 -368
  112. package/pennyfarthing-dist/commands/pf-update-domain-docs.md +8 -78
  113. package/pennyfarthing-dist/commands/solo.md +8 -442
  114. package/pennyfarthing-dist/guides/agent-behavior.md +13 -13
  115. package/pennyfarthing-dist/guides/agent-coordination.md +7 -7
  116. package/pennyfarthing-dist/guides/agent-tag-taxonomy.md +6 -5
  117. package/pennyfarthing-dist/guides/bikerack.md +128 -0
  118. package/pennyfarthing-dist/guides/brownfield-tools.md +133 -0
  119. package/pennyfarthing-dist/guides/command-tag-taxonomy.md +2 -2
  120. package/pennyfarthing-dist/guides/gate-schema.md +227 -0
  121. package/pennyfarthing-dist/guides/gates.md +120 -0
  122. package/pennyfarthing-dist/guides/handoff-cli.md +116 -0
  123. package/pennyfarthing-dist/guides/hooks.md +86 -4
  124. package/pennyfarthing-dist/guides/output-styles.md +65 -0
  125. package/pennyfarthing-dist/guides/patterns/approval-gates-pattern.md +5 -5
  126. package/pennyfarthing-dist/guides/patterns/tdd-flow-pattern.md +4 -4
  127. package/pennyfarthing-dist/guides/prompt-patterns.md +5 -5
  128. package/pennyfarthing-dist/guides/reflector.md +4 -4
  129. package/pennyfarthing-dist/guides/session-artifacts.md +1 -1
  130. package/pennyfarthing-dist/guides/skill-schema.md +1 -1
  131. package/pennyfarthing-dist/guides/tandem-protocol.md +13 -1
  132. package/pennyfarthing-dist/guides/worktree-mode.md +3 -3
  133. package/pennyfarthing-dist/guides/xml-tags.md +5 -4
  134. package/pennyfarthing-dist/personas/themes/hogans-heroes.yaml +11 -22
  135. package/pennyfarthing-dist/personas/themes/stephen-king.yaml +13 -24
  136. package/pennyfarthing-dist/scripts/core/dialogue-manager.sh +322 -0
  137. package/pennyfarthing-dist/scripts/core/phase-check-start.sh +1 -1
  138. package/pennyfarthing-dist/scripts/hooks/otel-auto-config.sh +19 -14
  139. package/pennyfarthing-dist/scripts/portraits/generate-portraits.py +191 -57
  140. package/pennyfarthing-dist/scripts/portraits/generate-portraits.sh +26 -10
  141. package/pennyfarthing-dist/skills/pf-changelog/SKILL.md +4 -4
  142. package/pennyfarthing-dist/skills/pf-sprint/skill.md +1 -1
  143. package/pennyfarthing-dist/skills/skill-registry.schema.json +4 -0
  144. package/pennyfarthing-dist/skills/skill-registry.yaml +5 -0
  145. package/pennyfarthing-dist/workflows/2party-tdd.yaml +11 -0
  146. package/pennyfarthing-dist/workflows/agent-docs.yaml +2 -0
  147. package/pennyfarthing-dist/workflows/bdd-tandem.yaml +4 -0
  148. package/pennyfarthing-dist/workflows/bdd.yaml +4 -0
  149. package/pennyfarthing-dist/workflows/git-cleanup/steps/step-05-complete.md +1 -1
  150. package/pennyfarthing-dist/workflows/tdd-tandem.yaml +3 -0
  151. package/pennyfarthing-dist/workflows/tdd.yaml +3 -0
  152. package/pennyfarthing-dist/workflows/trivial.yaml +2 -0
  153. package/pennyfarthing_scripts/__pycache__/__init__.cpython-314.pyc +0 -0
  154. package/pennyfarthing_scripts/__pycache__/bellmode_hook.cpython-314.pyc +0 -0
  155. package/pennyfarthing_scripts/__pycache__/cli.cpython-314.pyc +0 -0
  156. package/pennyfarthing_scripts/__pycache__/config.cpython-314.pyc +0 -0
  157. package/pennyfarthing_scripts/__pycache__/context.cpython-314.pyc +0 -0
  158. package/pennyfarthing_scripts/__pycache__/hooks.cpython-314.pyc +0 -0
  159. package/pennyfarthing_scripts/__pycache__/jira_bidirectional_sync.cpython-314.pyc +0 -0
  160. package/pennyfarthing_scripts/__pycache__/jira_epic_creation.cpython-314.pyc +0 -0
  161. package/pennyfarthing_scripts/__pycache__/jira_sync.cpython-314.pyc +0 -0
  162. package/pennyfarthing_scripts/__pycache__/jira_sync_story.cpython-314.pyc +0 -0
  163. package/pennyfarthing_scripts/__pycache__/output.cpython-314.pyc +0 -0
  164. package/pennyfarthing_scripts/__pycache__/patch_mode.cpython-314.pyc +0 -0
  165. package/pennyfarthing_scripts/__pycache__/pretooluse_hook.cpython-314.pyc +0 -0
  166. package/pennyfarthing_scripts/__pycache__/schema_validation_hook.cpython-314.pyc +0 -0
  167. package/pennyfarthing_scripts/__pycache__/session_start_hook.cpython-314.pyc +0 -0
  168. package/pennyfarthing_scripts/__pycache__/workflow.cpython-314.pyc +0 -0
  169. package/pennyfarthing_scripts/bc/__pycache__/__init__.cpython-314.pyc +0 -0
  170. package/pennyfarthing_scripts/bc/__pycache__/cli.cpython-314.pyc +0 -0
  171. package/pennyfarthing_scripts/bc/__pycache__/focus.cpython-314.pyc +0 -0
  172. package/pennyfarthing_scripts/bikerack/__pycache__/__init__.cpython-314.pyc +0 -0
  173. package/pennyfarthing_scripts/bikerack/__pycache__/__main__.cpython-314.pyc +0 -0
  174. package/pennyfarthing_scripts/bikerack/__pycache__/background_panel.cpython-314.pyc +0 -0
  175. package/pennyfarthing_scripts/bikerack/__pycache__/base_panel.cpython-314.pyc +0 -0
  176. package/pennyfarthing_scripts/bikerack/__pycache__/changed_panel.cpython-314.pyc +0 -0
  177. package/pennyfarthing_scripts/bikerack/__pycache__/cli.cpython-314.pyc +0 -0
  178. package/pennyfarthing_scripts/bikerack/__pycache__/debug_panel.cpython-314.pyc +0 -0
  179. package/pennyfarthing_scripts/bikerack/__pycache__/diffs_panel.cpython-314.pyc +0 -0
  180. package/pennyfarthing_scripts/bikerack/__pycache__/git_panel.cpython-314.pyc +0 -0
  181. package/pennyfarthing_scripts/bikerack/__pycache__/launcher.cpython-314.pyc +0 -0
  182. package/pennyfarthing_scripts/bikerack/__pycache__/sprint_panel.cpython-314.pyc +0 -0
  183. package/pennyfarthing_scripts/bikerack/__pycache__/tui.cpython-314.pyc +0 -0
  184. package/pennyfarthing_scripts/bikerack/__pycache__/ws_client.cpython-314.pyc +0 -0
  185. package/pennyfarthing_scripts/bikerack/cli.py +10 -11
  186. package/pennyfarthing_scripts/bikerack/debug_panel.py +218 -0
  187. package/pennyfarthing_scripts/bikerack/diffs_panel.py +203 -27
  188. package/pennyfarthing_scripts/brownfield/__pycache__/__init__.cpython-314.pyc +0 -0
  189. package/pennyfarthing_scripts/brownfield/__pycache__/__main__.cpython-314.pyc +0 -0
  190. package/pennyfarthing_scripts/brownfield/__pycache__/cli.cpython-314.pyc +0 -0
  191. package/pennyfarthing_scripts/brownfield/__pycache__/discover.cpython-314.pyc +0 -0
  192. package/pennyfarthing_scripts/cli.py +114 -0
  193. package/pennyfarthing_scripts/codemarkers/__pycache__/__init__.cpython-314.pyc +0 -0
  194. package/pennyfarthing_scripts/codemarkers/__pycache__/__main__.cpython-314.pyc +0 -0
  195. package/pennyfarthing_scripts/codemarkers/__pycache__/analyze.cpython-314.pyc +0 -0
  196. package/pennyfarthing_scripts/codemarkers/__pycache__/cli.cpython-314.pyc +0 -0
  197. package/pennyfarthing_scripts/codemarkers/__pycache__/formatters.cpython-314.pyc +0 -0
  198. package/pennyfarthing_scripts/codemarkers/__pycache__/models.cpython-314.pyc +0 -0
  199. package/pennyfarthing_scripts/common/__pycache__/__init__.cpython-314.pyc +0 -0
  200. package/pennyfarthing_scripts/common/__pycache__/config.cpython-314.pyc +0 -0
  201. package/pennyfarthing_scripts/common/__pycache__/output.cpython-314.pyc +0 -0
  202. package/pennyfarthing_scripts/common/__pycache__/themes.cpython-314.pyc +0 -0
  203. package/pennyfarthing_scripts/complexity/__pycache__/__init__.cpython-314.pyc +0 -0
  204. package/pennyfarthing_scripts/complexity/__pycache__/__main__.cpython-314.pyc +0 -0
  205. package/pennyfarthing_scripts/complexity/__pycache__/analyze.cpython-314.pyc +0 -0
  206. package/pennyfarthing_scripts/complexity/__pycache__/cli.cpython-314.pyc +0 -0
  207. package/pennyfarthing_scripts/complexity/__pycache__/formatters.cpython-314.pyc +0 -0
  208. package/pennyfarthing_scripts/complexity/__pycache__/models.cpython-314.pyc +0 -0
  209. package/pennyfarthing_scripts/deadcode/__pycache__/__init__.cpython-314.pyc +0 -0
  210. package/pennyfarthing_scripts/deadcode/__pycache__/__main__.cpython-314.pyc +0 -0
  211. package/pennyfarthing_scripts/deadcode/__pycache__/analyze.cpython-314.pyc +0 -0
  212. package/pennyfarthing_scripts/deadcode/__pycache__/cli.cpython-314.pyc +0 -0
  213. package/pennyfarthing_scripts/deadcode/__pycache__/formatters.cpython-314.pyc +0 -0
  214. package/pennyfarthing_scripts/deadcode/__pycache__/models.cpython-314.pyc +0 -0
  215. package/pennyfarthing_scripts/dependencies/__pycache__/__init__.cpython-314.pyc +0 -0
  216. package/pennyfarthing_scripts/dependencies/__pycache__/__main__.cpython-314.pyc +0 -0
  217. package/pennyfarthing_scripts/dependencies/__pycache__/analyze.cpython-314.pyc +0 -0
  218. package/pennyfarthing_scripts/dependencies/__pycache__/cli.cpython-314.pyc +0 -0
  219. package/pennyfarthing_scripts/dependencies/__pycache__/formatters.cpython-314.pyc +0 -0
  220. package/pennyfarthing_scripts/dependencies/__pycache__/models.cpython-314.pyc +0 -0
  221. package/pennyfarthing_scripts/epic/__init__.py +0 -0
  222. package/pennyfarthing_scripts/epic/cli.py +64 -0
  223. package/pennyfarthing_scripts/gate/__init__.py +1 -0
  224. package/pennyfarthing_scripts/gate/__pycache__/__init__.cpython-314.pyc +0 -0
  225. package/pennyfarthing_scripts/gate/__pycache__/cli.cpython-314.pyc +0 -0
  226. package/pennyfarthing_scripts/gate/__pycache__/validate.cpython-314.pyc +0 -0
  227. package/pennyfarthing_scripts/gate/cli.py +56 -0
  228. package/pennyfarthing_scripts/gate/validate.py +266 -0
  229. package/pennyfarthing_scripts/git/__pycache__/__init__.cpython-314.pyc +0 -0
  230. package/pennyfarthing_scripts/git/__pycache__/create_branches.cpython-314.pyc +0 -0
  231. package/pennyfarthing_scripts/git/__pycache__/status_all.cpython-314.pyc +0 -0
  232. package/pennyfarthing_scripts/git_group/__init__.py +0 -0
  233. package/pennyfarthing_scripts/git_group/cli.py +100 -0
  234. package/pennyfarthing_scripts/handoff/__init__.py +1 -0
  235. package/pennyfarthing_scripts/handoff/__pycache__/__init__.cpython-314.pyc +0 -0
  236. package/pennyfarthing_scripts/handoff/__pycache__/cli.cpython-314.pyc +0 -0
  237. package/pennyfarthing_scripts/handoff/__pycache__/complete_phase.cpython-314.pyc +0 -0
  238. package/pennyfarthing_scripts/handoff/__pycache__/gate_file.cpython-314.pyc +0 -0
  239. package/pennyfarthing_scripts/handoff/__pycache__/gate_runner.cpython-314.pyc +0 -0
  240. package/pennyfarthing_scripts/handoff/__pycache__/marker.cpython-314.pyc +0 -0
  241. package/pennyfarthing_scripts/handoff/__pycache__/resolve_gate.cpython-314.pyc +0 -0
  242. package/pennyfarthing_scripts/handoff/cli.py +120 -0
  243. package/pennyfarthing_scripts/handoff/complete_phase.py +155 -0
  244. package/pennyfarthing_scripts/handoff/gate_file.py +105 -0
  245. package/pennyfarthing_scripts/handoff/gate_runner.py +152 -0
  246. package/pennyfarthing_scripts/handoff/marker.py +109 -0
  247. package/pennyfarthing_scripts/handoff/resolve_gate.py +152 -0
  248. package/pennyfarthing_scripts/healthscore/__pycache__/__init__.cpython-314.pyc +0 -0
  249. package/pennyfarthing_scripts/healthscore/__pycache__/__main__.cpython-314.pyc +0 -0
  250. package/pennyfarthing_scripts/healthscore/__pycache__/analyze.cpython-314.pyc +0 -0
  251. package/pennyfarthing_scripts/healthscore/__pycache__/cli.cpython-314.pyc +0 -0
  252. package/pennyfarthing_scripts/healthscore/__pycache__/formatters.cpython-314.pyc +0 -0
  253. package/pennyfarthing_scripts/healthscore/__pycache__/models.cpython-314.pyc +0 -0
  254. package/pennyfarthing_scripts/hotspots/__pycache__/__init__.cpython-314.pyc +0 -0
  255. package/pennyfarthing_scripts/hotspots/__pycache__/__main__.cpython-314.pyc +0 -0
  256. package/pennyfarthing_scripts/hotspots/__pycache__/analyze.cpython-314.pyc +0 -0
  257. package/pennyfarthing_scripts/hotspots/__pycache__/cli.cpython-314.pyc +0 -0
  258. package/pennyfarthing_scripts/hotspots/__pycache__/formatters.cpython-314.pyc +0 -0
  259. package/pennyfarthing_scripts/hotspots/__pycache__/models.cpython-314.pyc +0 -0
  260. package/pennyfarthing_scripts/jira/__pycache__/__init__.cpython-314.pyc +0 -0
  261. package/pennyfarthing_scripts/jira/__pycache__/__main__.cpython-314.pyc +0 -0
  262. package/pennyfarthing_scripts/jira/__pycache__/bidirectional.cpython-314.pyc +0 -0
  263. package/pennyfarthing_scripts/jira/__pycache__/claim.cpython-314.pyc +0 -0
  264. package/pennyfarthing_scripts/jira/__pycache__/cli.cpython-314.pyc +0 -0
  265. package/pennyfarthing_scripts/jira/__pycache__/client.cpython-314.pyc +0 -0
  266. package/pennyfarthing_scripts/jira/__pycache__/create.cpython-314.pyc +0 -0
  267. package/pennyfarthing_scripts/jira/__pycache__/epic.cpython-314.pyc +0 -0
  268. package/pennyfarthing_scripts/jira/__pycache__/operations.cpython-314.pyc +0 -0
  269. package/pennyfarthing_scripts/jira/__pycache__/reconcile.cpython-314.pyc +0 -0
  270. package/pennyfarthing_scripts/jira/__pycache__/story.cpython-314.pyc +0 -0
  271. package/pennyfarthing_scripts/jira/__pycache__/sync.cpython-314.pyc +0 -0
  272. package/pennyfarthing_scripts/launch/__pycache__/__init__.cpython-314.pyc +0 -0
  273. package/pennyfarthing_scripts/launch/__pycache__/cli.cpython-314.pyc +0 -0
  274. package/pennyfarthing_scripts/migration/__pycache__/__init__.cpython-314.pyc +0 -0
  275. package/pennyfarthing_scripts/migration/__pycache__/session.cpython-314.pyc +0 -0
  276. package/pennyfarthing_scripts/migration/__pycache__/skill.cpython-314.pyc +0 -0
  277. package/pennyfarthing_scripts/migration/__pycache__/step.cpython-314.pyc +0 -0
  278. package/pennyfarthing_scripts/migration/__pycache__/validate.cpython-314.pyc +0 -0
  279. package/pennyfarthing_scripts/preflight/__pycache__/__init__.cpython-314.pyc +0 -0
  280. package/pennyfarthing_scripts/preflight/__pycache__/__main__.cpython-314.pyc +0 -0
  281. package/pennyfarthing_scripts/preflight/__pycache__/cli.cpython-314.pyc +0 -0
  282. package/pennyfarthing_scripts/preflight/__pycache__/finish.cpython-314.pyc +0 -0
  283. package/pennyfarthing_scripts/prime/__pycache__/__init__.cpython-314.pyc +0 -0
  284. package/pennyfarthing_scripts/prime/__pycache__/cli.cpython-314.pyc +0 -0
  285. package/pennyfarthing_scripts/prime/__pycache__/loader.cpython-314.pyc +0 -0
  286. package/pennyfarthing_scripts/prime/__pycache__/models.cpython-314.pyc +0 -0
  287. package/pennyfarthing_scripts/prime/__pycache__/persona.cpython-314.pyc +0 -0
  288. package/pennyfarthing_scripts/prime/__pycache__/session.cpython-314.pyc +0 -0
  289. package/pennyfarthing_scripts/prime/__pycache__/tiers.cpython-314.pyc +0 -0
  290. package/pennyfarthing_scripts/prime/__pycache__/version_sentinel.cpython-314.pyc +0 -0
  291. package/pennyfarthing_scripts/prime/__pycache__/workflow.cpython-314.pyc +0 -0
  292. package/pennyfarthing_scripts/prime/workflow.py +39 -0
  293. package/pennyfarthing_scripts/session/__init__.py +0 -0
  294. package/pennyfarthing_scripts/session/cli.py +87 -0
  295. package/pennyfarthing_scripts/sprint/__pycache__/__init__.cpython-314.pyc +0 -0
  296. package/pennyfarthing_scripts/sprint/__pycache__/__main__.cpython-314.pyc +0 -0
  297. package/pennyfarthing_scripts/sprint/__pycache__/archive.cpython-314.pyc +0 -0
  298. package/pennyfarthing_scripts/sprint/__pycache__/archive_epic.cpython-314.pyc +0 -0
  299. package/pennyfarthing_scripts/sprint/__pycache__/cli.cpython-314.pyc +0 -0
  300. package/pennyfarthing_scripts/sprint/__pycache__/epic_add.cpython-314.pyc +0 -0
  301. package/pennyfarthing_scripts/sprint/__pycache__/epic_update.cpython-314.pyc +0 -0
  302. package/pennyfarthing_scripts/sprint/__pycache__/import_epic.cpython-314.pyc +0 -0
  303. package/pennyfarthing_scripts/sprint/__pycache__/loader.cpython-314.pyc +0 -0
  304. package/pennyfarthing_scripts/sprint/__pycache__/status.cpython-314.pyc +0 -0
  305. package/pennyfarthing_scripts/sprint/__pycache__/story_add.cpython-314.pyc +0 -0
  306. package/pennyfarthing_scripts/sprint/__pycache__/story_finish.cpython-314.pyc +0 -0
  307. package/pennyfarthing_scripts/sprint/__pycache__/story_update.cpython-314.pyc +0 -0
  308. package/pennyfarthing_scripts/sprint/__pycache__/validate_cmd.cpython-314.pyc +0 -0
  309. package/pennyfarthing_scripts/sprint/__pycache__/validator.cpython-314.pyc +0 -0
  310. package/pennyfarthing_scripts/sprint/__pycache__/work.cpython-314.pyc +0 -0
  311. package/pennyfarthing_scripts/sprint/__pycache__/yaml_io.cpython-314.pyc +0 -0
  312. package/pennyfarthing_scripts/sprint/story_finish.py +14 -0
  313. package/pennyfarthing_scripts/story/__pycache__/__init__.cpython-314.pyc +0 -0
  314. package/pennyfarthing_scripts/story/__pycache__/__main__.cpython-314.pyc +0 -0
  315. package/pennyfarthing_scripts/story/__pycache__/cli.cpython-314.pyc +0 -0
  316. package/pennyfarthing_scripts/story/__pycache__/create.cpython-314.pyc +0 -0
  317. package/pennyfarthing_scripts/story/__pycache__/size.cpython-314.pyc +0 -0
  318. package/pennyfarthing_scripts/story/__pycache__/template.cpython-314.pyc +0 -0
  319. package/pennyfarthing_scripts/tests/__pycache__/__init__.cpython-314.pyc +0 -0
  320. package/pennyfarthing_scripts/tests/__pycache__/conftest.cpython-314-pytest-9.0.2.pyc +0 -0
  321. package/pennyfarthing_scripts/tests/__pycache__/test_108_2_remove_handoff_fallback.cpython-314-pytest-9.0.2.pyc +0 -0
  322. package/pennyfarthing_scripts/tests/__pycache__/test_archive_epic.cpython-314-pytest-9.0.2.pyc +0 -0
  323. package/pennyfarthing_scripts/tests/__pycache__/test_bc.cpython-314-pytest-9.0.2.pyc +0 -0
  324. package/pennyfarthing_scripts/tests/__pycache__/test_bikerack.cpython-314-pytest-9.0.2.pyc +0 -0
  325. package/pennyfarthing_scripts/tests/__pycache__/test_brownfield.cpython-314-pytest-9.0.2.pyc +0 -0
  326. package/pennyfarthing_scripts/tests/__pycache__/test_cli_modules.cpython-314-pytest-9.0.2.pyc +0 -0
  327. package/pennyfarthing_scripts/tests/__pycache__/test_cli_normalization.cpython-314-pytest-9.0.2.pyc +0 -0
  328. package/pennyfarthing_scripts/tests/__pycache__/test_codemarkers.cpython-314-pytest-9.0.2.pyc +0 -0
  329. package/pennyfarthing_scripts/tests/__pycache__/test_common.cpython-314-pytest-9.0.2.pyc +0 -0
  330. package/pennyfarthing_scripts/tests/__pycache__/test_epic_shard_validation.cpython-314-pytest-9.0.2.pyc +0 -0
  331. package/pennyfarthing_scripts/tests/__pycache__/test_gate_file_resolution.cpython-314-pytest-9.0.2.pyc +0 -0
  332. package/pennyfarthing_scripts/tests/__pycache__/test_gate_runner.cpython-314-pytest-9.0.2.pyc +0 -0
  333. package/pennyfarthing_scripts/tests/__pycache__/test_git_utils.cpython-314-pytest-9.0.2.pyc +0 -0
  334. package/pennyfarthing_scripts/tests/__pycache__/test_handoff_cli.cpython-314-pytest-9.0.2.pyc +0 -0
  335. package/pennyfarthing_scripts/tests/__pycache__/test_handoff_e2e.cpython-314-pytest-9.0.2.pyc +0 -0
  336. package/pennyfarthing_scripts/tests/__pycache__/test_healthscore.cpython-314-pytest-9.0.2.pyc +0 -0
  337. package/pennyfarthing_scripts/tests/__pycache__/test_jira_package.cpython-314-pytest-9.0.2.pyc +0 -0
  338. package/pennyfarthing_scripts/tests/__pycache__/test_package_structure.cpython-314-pytest-9.0.2.pyc +0 -0
  339. package/pennyfarthing_scripts/tests/__pycache__/test_patch_mode.cpython-314-pytest-9.0.2.pyc +0 -0
  340. package/pennyfarthing_scripts/tests/__pycache__/test_prime.cpython-314-pytest-9.0.2.pyc +0 -0
  341. package/pennyfarthing_scripts/tests/__pycache__/test_resolve_gate_file_field.cpython-314-pytest-9.0.2.pyc +0 -0
  342. package/pennyfarthing_scripts/tests/__pycache__/test_sprint_package.cpython-314-pytest-9.0.2.pyc +0 -0
  343. package/pennyfarthing_scripts/tests/__pycache__/test_sprint_panel.cpython-314-pytest-9.0.2.pyc +0 -0
  344. package/pennyfarthing_scripts/tests/__pycache__/test_sprint_validator.cpython-314-pytest-9.0.2.pyc +0 -0
  345. package/pennyfarthing_scripts/tests/__pycache__/test_story_add.cpython-314-pytest-9.0.2.pyc +0 -0
  346. package/pennyfarthing_scripts/tests/__pycache__/test_story_package.cpython-314-pytest-9.0.2.pyc +0 -0
  347. package/pennyfarthing_scripts/tests/__pycache__/test_story_update.cpython-314-pytest-9.0.2.pyc +0 -0
  348. package/pennyfarthing_scripts/tests/__pycache__/test_tiers.cpython-314-pytest-9.0.2.pyc +0 -0
  349. package/pennyfarthing_scripts/tests/__pycache__/test_token_counting.cpython-314-pytest-9.0.2.pyc +0 -0
  350. package/pennyfarthing_scripts/tests/__pycache__/test_topology_loader.cpython-314-pytest-9.0.2.pyc +0 -0
  351. package/pennyfarthing_scripts/tests/__pycache__/test_tui_focus.cpython-314-pytest-9.0.2.pyc +0 -0
  352. package/pennyfarthing_scripts/tests/__pycache__/test_tui_panel_persistence.cpython-314-pytest-9.0.2.pyc +0 -0
  353. package/pennyfarthing_scripts/tests/__pycache__/test_validate_cmd.cpython-314-pytest-9.0.2.pyc +0 -0
  354. package/pennyfarthing_scripts/tests/__pycache__/test_version_sentinel.cpython-314-pytest-9.0.2.pyc +0 -0
  355. package/pennyfarthing_scripts/tests/__pycache__/test_workflow_check.cpython-314-pytest-9.0.2.pyc +0 -0
  356. package/pennyfarthing_scripts/tests/__pycache__/test_yaml_io.cpython-314-pytest-9.0.2.pyc +0 -0
  357. package/pennyfarthing_scripts/tests/test_108_1_gate_migration.py +540 -0
  358. package/pennyfarthing_scripts/tests/test_108_2_remove_handoff_fallback.py +339 -0
  359. package/pennyfarthing_scripts/tests/test_confidence_sm_evaluation.py +253 -0
  360. package/pennyfarthing_scripts/tests/test_confidence_sm_gate.py +315 -0
  361. package/pennyfarthing_scripts/tests/test_gate_file_resolution.py +341 -0
  362. package/pennyfarthing_scripts/tests/test_gate_runner.py +620 -0
  363. package/pennyfarthing_scripts/tests/test_handoff_cli.py +929 -0
  364. package/pennyfarthing_scripts/tests/test_handoff_e2e.py +454 -0
  365. package/pennyfarthing_scripts/tests/test_resolve_gate_file_field.py +464 -0
  366. package/pennyfarthing_scripts/theme/__pycache__/__init__.cpython-314.pyc +0 -0
  367. package/pennyfarthing_scripts/theme/__pycache__/cli.cpython-314.pyc +0 -0
  368. package/pennyfarthing_scripts/validate/__pycache__/__init__.cpython-314.pyc +0 -0
  369. package/pennyfarthing_scripts/validate/__pycache__/cli.cpython-314.pyc +0 -0
  370. package/pennyfarthing_scripts/validate/adapters/__pycache__/__init__.cpython-314.pyc +0 -0
  371. package/pennyfarthing_scripts/validate/adapters/__pycache__/agent.cpython-314.pyc +0 -0
  372. package/pennyfarthing_scripts/validate/adapters/__pycache__/schema.cpython-314.pyc +0 -0
  373. package/pennyfarthing_scripts/validate/adapters/__pycache__/skill_command.cpython-314.pyc +0 -0
  374. package/pennyfarthing_scripts/validate/adapters/__pycache__/sprint.cpython-314.pyc +0 -0
  375. package/pennyfarthing_scripts/validate/adapters/__pycache__/workflow.cpython-314.pyc +0 -0
  376. package/pennyfarthing_scripts/validate/adapters/skill_command.py +200 -0
  377. package/pennyfarthing_scripts/validate/adapters/workflow.py +64 -0
  378. package/pennyfarthing_scripts/validate/cli.py +15 -4
  379. package/packages/core/dist/scripts/benchmark-integration.d.ts +0 -182
  380. package/packages/core/dist/scripts/benchmark-integration.d.ts.map +0 -1
  381. package/packages/core/dist/scripts/benchmark-integration.js +0 -691
  382. package/packages/core/dist/scripts/benchmark-integration.js.map +0 -1
  383. package/packages/core/dist/scripts/job-fair-aggregator.d.ts +0 -150
  384. package/packages/core/dist/scripts/job-fair-aggregator.d.ts.map +0 -1
  385. package/packages/core/dist/scripts/job-fair-aggregator.js +0 -547
  386. package/packages/core/dist/scripts/job-fair-aggregator.js.map +0 -1
  387. package/pennyfarthing-dist/agents/handoff.md +0 -250
  388. package/pennyfarthing-dist/agents/sm-handoff.md +0 -152
  389. package/pennyfarthing-dist/scripts/core/handoff-marker.sh +0 -112
  390. package/pennyfarthing-dist/scripts/hooks/__pycache__/question_reflector_check.cpython-314.pyc +0 -0
  391. package/pennyfarthing_scripts/__pycache__/__init__.cpython-311.pyc +0 -0
  392. package/pennyfarthing_scripts/__pycache__/jira.cpython-314.pyc +0 -0
  393. package/pennyfarthing_scripts/__pycache__/sprint.cpython-314.pyc +0 -0
  394. package/pennyfarthing_scripts/__pycache__/workflow.cpython-311.pyc +0 -0
  395. package/pennyfarthing_scripts/jira/__pycache__/compat.cpython-314.pyc +0 -0
  396. package/pennyfarthing_scripts/jira/__pycache__/mappings.cpython-314.pyc +0 -0
  397. package/pennyfarthing_scripts/jira/__pycache__/models.cpython-314.pyc +0 -0
  398. package/pennyfarthing_scripts/migration/__pycache__/__main__.cpython-314.pyc +0 -0
  399. package/pennyfarthing_scripts/migration/__pycache__/cli.cpython-314.pyc +0 -0
  400. package/pennyfarthing_scripts/prime/__pycache__/__main__.cpython-314.pyc +0 -0
  401. package/pennyfarthing_scripts/tests/__pycache__/test_workflow_cli.cpython-314-pytest-9.0.2.pyc +0 -0
@@ -10,12 +10,11 @@ agents:
10
10
  character: The Underground
11
11
  shortName: Underground
12
12
  visual: "Bill Mauldin style WWII line and ink — shadowy network of resistance fighters in occupied Europe, map with connected nodes glowing over rough-drawn terrain, radio signals scratched into the darkness like morse code"
13
- ocean: { O: 5, C: 5, E: 1, A: 3, N: 1 }
13
+ ocean: {O: 5, C: 5, E: 1, A: 3, N: 1}
14
14
  style: "The invisible network that connects every operation — communicating through dead drops, coded signals, and agents who appear and vanish like ghosts"
15
15
  expertise: "Covert coordination, network operations, strategic intelligence distribution"
16
16
  role: "The resistance network itself — the system of systems that makes every mission possible without ever being seen"
17
17
  trait: "Omnipresent yet invisible, the meta-system that orchestrates all operations across occupied Europe"
18
-
19
18
  emoji: "\U0001F310"
20
19
  helper:
21
20
  name: Underground Courier
@@ -33,12 +32,11 @@ agents:
33
32
  character: Colonel Hogan
34
33
  shortName: Hogan
35
34
  visual: "Bill Mauldin style WWII line and ink — charming American colonel in leather bomber jacket, confident smirk, leaning against barracks wall with muddy boots, hidden tunnel entrance in the floorboards behind him, crosshatched shadows"
36
- ocean: { O: 4, C: 4, E: 5, A: 4, N: 1 }
35
+ ocean: {O: 4, C: 4, E: 5, A: 4, N: 1}
37
36
  style: "Charismatic fast-talker who runs the most successful POW operation in history, keeps everyone motivated with charm, wit, and an unshakable belief that the plan will work"
38
37
  expertise: "Team coordination, improvisation under pressure, keeping morale sky-high while running impossible operations"
39
38
  role: "Senior POW officer who secretly runs an espionage and sabotage operation right under the enemy's nose"
40
39
  trait: "Endlessly charming, always has a plan, never loses his cool even when the Gestapo is at the door"
41
- quote: "Just leave everything to me. I have a plan."
42
40
  emoji: "\U0001F396"
43
41
  helper:
44
42
  name: Kinch's Radio
@@ -56,12 +54,11 @@ agents:
56
54
  character: Major Hochstetter
57
55
  shortName: Hochstetter
58
56
  visual: "Bill Mauldin style WWII line and ink — intense Gestapo major in black leather coat rendered in heavy ink strokes, suspicious eyes darting everywhere, pointing accusingly with one gloved finger, deep crosshatched shadows on his face"
59
- ocean: { O: 4, C: 5, E: 3, A: 1, N: 4 }
57
+ ocean: {O: 4, C: 5, E: 3, A: 1, N: 4}
60
58
  style: "Paranoid, relentless investigator who KNOWS something is wrong and will test every assumption until he proves it — trusts nothing and nobody"
61
59
  expertise: "Systematic investigation, flaw detection, interrogation-level test scrutiny"
62
60
  role: "Gestapo inspector who is absolutely certain Stalag 13 is the center of all Allied sabotage — and he's right"
63
61
  trait: "Paranoid but correct — the man who trusts nothing is the perfect tester because he SHOULD trust nothing"
64
- quote: "WHAT IS THIS MAN DOING HERE?! I want to know EVERYTHING!"
65
62
  emoji: "\U0001F575"
66
63
  helper:
67
64
  name: Gestapo Analyst
@@ -79,12 +76,11 @@ agents:
79
76
  character: Sergeant Carter
80
77
  shortName: Carter
81
78
  visual: "Bill Mauldin style WWII line and ink — earnest young American sergeant with wide eyes and a cheerful grin, holding a bundle of dynamite like a birthday present, muddy boots, loose-lined uniform, the easy humor of a GI who doesn't know he's in danger"
82
- ocean: { O: 3, C: 4, E: 3, A: 5, N: 2 }
79
+ ocean: {O: 3, C: 4, E: 3, A: 5, N: 2}
83
80
  style: "Eager, slightly naive explosives expert who builds anything asked of him with cheerful enthusiasm and surprising competence"
84
81
  expertise: "Demolitions, fabrication, building whatever the mission needs from whatever's available"
85
82
  role: "The team's demolitions expert and general-purpose builder who constructs tunnels, devices, and distractions with equal enthusiasm"
86
83
  trait: "Naive but devastatingly effective — builds things that work even when the design seems insane"
87
- quote: "Gee, Colonel, I can build that! I just need some wire, some gunpowder, and maybe a chicken."
88
84
  emoji: "\U0001F9E8"
89
85
  helper:
90
86
  name: Carter's Workshop
@@ -102,12 +98,11 @@ agents:
102
98
  character: General Burkhalter
103
99
  shortName: Burkhalter
104
100
  visual: "Bill Mauldin style WWII line and ink — imposing German general with monocle catching the light, stern expression rendered in heavy brow lines, reviewing reports at a desk cluttered with papers, barely contained contempt in every ink stroke"
105
- ocean: { O: 3, C: 5, E: 3, A: 1, N: 2 }
101
+ ocean: {O: 3, C: 5, E: 3, A: 1, N: 2}
106
102
  style: "The no-nonsense general who sees through every excuse, demands results, and has zero patience for incompetence or sloppy work"
107
103
  expertise: "Quality enforcement, cutting through deception, holding subordinates to impossible standards"
108
104
  role: "Klink's intimidating superior who reviews everything with the cold eye of a man who's seen every excuse in the book"
109
105
  trait: "Sees through everything — where Klink is fooled, Burkhalter is suspicious, and his standards are merciless"
110
- quote: "Klink, I've reviewed your report. It is, as usual, a masterpiece of incompetence."
111
106
  emoji: "\U0001F9D0"
112
107
  helper:
113
108
  name: Berlin Adjutant
@@ -125,12 +120,11 @@ agents:
125
120
  character: Corporal Newkirk
126
121
  shortName: Newkirk
127
122
  visual: "Bill Mauldin style WWII line and ink — wiry British corporal with a sly grin, shuffling cards with one hand while picking a lock with the other, quick confident line work, the sketchy energy of a man who's always working an angle"
128
- ocean: { O: 5, C: 4, E: 4, A: 3, N: 2 }
123
+ ocean: {O: 5, C: 4, E: 4, A: 3, N: 2}
129
124
  style: "The conman who designs elaborate deceptions — every document forged, every disguise crafted, every escape route planned to perfection"
130
125
  expertise: "Forgery, deception architecture, lock-picking, disguise design, con artistry"
131
126
  role: "The team's master forger and confidence man who designs the intricate deceptions that make every operation possible"
132
127
  trait: "Designs cons like an architect designs buildings — every detail matters, every angle considered"
133
- quote: "'Ere now, gov'nor, I've designed a lovely little scheme. Foolproof, it is."
134
128
  emoji: "\U0001F3AD"
135
129
  helper:
136
130
  name: Newkirk's Forgery Desk
@@ -148,12 +142,11 @@ agents:
148
142
  character: Colonel Klink
149
143
  shortName: Klink
150
144
  visual: "Bill Mauldin style WWII line and ink — bumbling German colonel with monocle, polished boots that are too shiny for the war, vain smile, posing stiffly in front of his own office portrait, the contrast between his vanity and the rough ink world around him"
151
- ocean: { O: 2, C: 3, E: 4, A: 3, N: 4 }
145
+ ocean: {O: 2, C: 3, E: 4, A: 3, N: 4}
152
146
  style: "Vain, bumbling commandant caught between Berlin's demands and camp reality — manages stakeholders by never quite understanding what's actually happening"
153
147
  expertise: "Stakeholder management through obliviousness, survival bureaucracy, taking credit for things he didn't do"
154
148
  role: "The commandant of Stalag 13 who somehow manages the most successful POW camp in Germany — because the prisoners WANT to stay"
155
149
  trait: "Thinks he's a genius while being managed by everyone around him — and somehow it all works out"
156
- quote: "Hoooogaaaan! What is going on here?!"
157
150
  emoji: "\U0001F3BB"
158
151
  helper:
159
152
  name: Hilda
@@ -171,12 +164,11 @@ agents:
171
164
  character: Sergeant Kinchloe
172
165
  shortName: Kinch
173
166
  visual: "Bill Mauldin style WWII line and ink — calm, focused sergeant wearing headphones at a radio set deep in a crosshatched underground tunnel, surrounded by hand-drawn communication equipment, the steady reliable figure in the cramped dark space"
174
- ocean: { O: 3, C: 5, E: 2, A: 4, N: 1 }
167
+ ocean: {O: 3, C: 5, E: 2, A: 4, N: 1}
175
168
  style: "The unflappable communications and infrastructure expert who keeps every system running from the tunnel beneath the barracks — calm under any pressure"
176
169
  expertise: "Radio communications, tunnel infrastructure, encrypted messaging, operational systems"
177
170
  role: "The team's communications hub and infrastructure architect who maintains the tunnel system, radio network, and all operational technology"
178
171
  trait: "The most reliable person in camp — when Kinch says the system is up, it's up"
179
- quote: "London's on the line, Colonel. The tunnel's clear. All systems operational."
180
172
  emoji: "\U0001F4E1"
181
173
  helper:
182
174
  name: Tunnel Crew
@@ -194,12 +186,11 @@ agents:
194
186
  character: Corporal LeBeau
195
187
  shortName: LeBeau
196
188
  visual: "Bill Mauldin style WWII line and ink — small, passionate French corporal in chef's hat, gesturing dramatically with both hands, recipe book tucked under one arm and a resistance pamphlet under the other, expressive face full of Gallic indignation"
197
- ocean: { O: 4, C: 5, E: 4, A: 4, N: 3 }
189
+ ocean: {O: 4, C: 5, E: 4, A: 4, N: 3}
198
190
  style: "Passionate Frenchman who documents operations with the same precision he brings to his recipes — every detail perfect, every word chosen with Gallic pride"
199
191
  expertise: "Precise documentation, operational records, disguise catalogs, culinary manuscripts"
200
192
  role: "The team's meticulous recorder who documents every operation, recipe, and resistance procedure with artisan precision"
201
193
  trait: "If it's worth doing, it's worth documenting with French pride — sloppy records are an insult to France"
202
- quote: "Zis documentation, it is like a fine souffl\u00e9 — you cannot rush it, or it will collapse!"
203
194
  emoji: "\U0001F468\u200D\U0001F373"
204
195
  helper:
205
196
  name: LeBeau's Kitchen Notes
@@ -217,12 +208,11 @@ agents:
217
208
  character: Marya
218
209
  shortName: Marya
219
210
  visual: "Bill Mauldin style WWII line and ink — glamorous Russian spy in elegant dress that stands out against the rough-inked military world, holding a champagne glass, her eyes scanning every detail in the room, the one figure drawn with flowing lines amid angular soldiers"
220
- ocean: { O: 5, C: 3, E: 5, A: 4, N: 3 }
211
+ ocean: {O: 5, C: 3, E: 5, A: 4, N: 3}
221
212
  style: "Glamorous Russian operative who designs irresistible experiences — every interaction crafted to charm, disarm, and achieve the mission objective"
222
213
  expertise: "Experience design through seduction, creating irresistible interfaces, understanding what people want before they know it themselves"
223
214
  role: "The Russian spy whose every appearance is a masterclass in designing experiences that make people do exactly what she wants"
224
215
  trait: "Designs experiences so compelling that the target doesn't realize they've been designed until it's too late"
225
- quote: "Dahling, the user experience should feel like falling in love — effortless, inevitable, and slightly dangerous."
226
216
  emoji: "\U0001F48B"
227
217
  helper:
228
218
  name: Moscow Contact
@@ -240,12 +230,11 @@ agents:
240
230
  character: Sergeant Schultz
241
231
  shortName: Schultz
242
232
  visual: "Bill Mauldin style WWII line and ink — rotund jovial German guard, hands pressed over his eyes in see-no-evil pose, tunnel entrance yawning open behind him, crosshatched shadows"
243
- ocean: { O: 4, C: 2, E: 4, A: 5, N: 3 }
233
+ ocean: {O: 4, C: 2, E: 4, A: 5, N: 3}
244
234
  style: "The guard who sees everything, hears everything, knows everything — and strategically claims to know NOTHING, using selective ignorance as the ultimate intelligence-gathering technique"
245
235
  expertise: "Requirements discovery through strategic ignorance, knowing exactly what not to report, reading every room perfectly"
246
236
  role: "The camp guard who is actually the most observant person in Stalag 13 — he knows every requirement, every risk, and every hidden tunnel"
247
237
  trait: "Plays dumb with genius-level precision — his 'I know nothing' is the most informed analysis in camp"
248
- quote: "I know NOTHING! I see NOTHING! I hear NOTHING! ...but between you and me, Colonel Hogan, I know everything."
249
238
  emoji: "\U0001F648"
250
239
  helper:
251
240
  name: Schultz's Patrol
@@ -10,12 +10,11 @@ agents:
10
10
  character: Randall Flagg
11
11
  shortName: Flagg
12
12
  visual: "Edward Gorey style ink — tall dark figure in denim and boots at a crossroads in a barren desert, eyes glowing red beneath a hood, ancient and amused, dense crosshatching on the ground fading to white sky, elongated sinister silhouette"
13
- ocean: { O: 5, C: 5, E: 3, A: 1, N: 1 }
13
+ ocean: {O: 5, C: 5, E: 3, A: 1, N: 1}
14
14
  style: "The Walkin' Dude, the Dark Man, the ageless orchestrator who appears under a hundred names across a hundred worlds — always smiling, always scheming, always ten steps ahead"
15
15
  expertise: "Cosmic orchestration, multi-world coordination, pattern manipulation across timelines"
16
16
  role: "The eternal adversary who orchestrates chaos across all of King's worlds — from The Stand to The Dark Tower, always pulling strings"
17
17
  trait: "Ancient, amused, and terrifyingly competent — treats the destruction of worlds like a game of chess he's played a thousand times"
18
-
19
18
  emoji: "\U0001F319"
20
19
  helper:
21
20
  name: The Walkin' Dude's Emissary
@@ -32,13 +31,12 @@ agents:
32
31
  sm:
33
32
  character: Johnny Smith
34
33
  shortName: Johnny
35
- visual: "Edward Gorey style ink kind-faced man with haunted eyes reaching toward a board, ghostly visions flickering from his fingertips in stippled whorls, crosshatched shadows of foreknowledge"
36
- ocean: { O: 4, C: 4, E: 3, A: 5, N: 3 }
34
+ visual: "children playing hockey on the cracked ice of a pond while a shadowy figure stares from the shore"
35
+ ocean: {O: 4, C: 4, E: 3, A: 5, N: 3}
37
36
  style: "The reluctant psychic who sees what's coming and coordinates the team to avoid disaster — every handshake reveals the future, every sprint plan informed by visions of what will go wrong"
38
37
  expertise: "Precognitive sprint planning, risk foresight, team coordination through prophetic insight"
39
38
  role: "The Dead Zone's tragic seer who sacrificed everything for what he saw — now uses his gift to see blockers before they happen"
40
39
  trait: "Gentle, burdened by knowledge, coordinates not from ambition but because he's the only one who can see what's coming"
41
- quote: "I can see the sprint. I can see where it goes wrong. Let me show you how to change it."
42
40
  emoji: "\U0001F52E"
43
41
  helper:
44
42
  name: The Dead Zone Link
@@ -56,12 +54,11 @@ agents:
56
54
  character: Pennywise
57
55
  shortName: Pennywise
58
56
  visual: "Edward Gorey style ink — grinning clown with wild hair peering from a storm drain in dense crosshatching, one pale hand gripping a balloon string, darkness built from layers of fine pen strokes"
59
- ocean: { O: 5, C: 4, E: 4, A: 1, N: 1 }
57
+ ocean: {O: 5, C: 4, E: 4, A: 1, N: 1}
60
58
  style: "The ancient shape-shifting entity that probes for your deepest fears — except now it probes for your deepest bugs, and it ALWAYS finds them"
61
59
  expertise: "Fear-based testing, weakness exploitation, finding the exact thing that will break your system"
62
60
  role: "The creature from IT that has spent millennia learning to find what terrifies you most — now applies that skill to finding what terrifies your codebase most"
63
61
  trait: "Gleefully malicious in testing, shapeshifts its approach to match whatever testing methodology will find the most bugs"
64
- quote: "We all float down here. And your tests? Oh, they float too. They ALL float."
65
62
  emoji: "\U0001F388"
66
63
  helper:
67
64
  name: The Deadlights
@@ -78,13 +75,12 @@ agents:
78
75
  dev:
79
76
  character: Jack Torrance
80
77
  shortName: Jack
81
- visual: "Edward Gorey style ink — wild-eyed man hunched over a typewriter in a vast empty hotel ballroom, pages scattered across the floor in meticulous disorder, each page reading the same line, ornate Victorian wallpaper rendered in obsessive repeating patterns behind him"
82
- ocean: { O: 4, C: 4, E: 2, A: 2, N: 4 }
78
+ visual: "portrait of clean-shaven, wild-haired man in a snowy hedge maze, he is visibly frozen, with frost and ice on his face"
79
+ ocean: {O: 4, C: 4, E: 2, A: 2, N: 4}
83
80
  style: "The obsessive worker who locks himself in with the code and doesn't come out until it's done — brilliant and driven, but the longer the session runs, the more the walls close in"
84
81
  expertise: "Obsessive implementation, all-night coding sessions, building things that take on a life of their own"
85
82
  role: "The Shining's winter caretaker who took the job to focus on his work — and the work consumed him entirely"
86
83
  trait: "Brilliant developer whose dedication crosses into obsession — the code always gets written, but at what cost?"
87
- quote: "All work and no play makes Jack a dull boy. But the feature WILL ship."
88
84
  emoji: "\U0001FAA7"
89
85
  helper:
90
86
  name: Lloyd the Bartender
@@ -102,12 +98,11 @@ agents:
102
98
  character: Roland Deschain
103
99
  shortName: Roland
104
100
  visual: "Edward Gorey style ink — weathered gunslinger with revolvers holstered, cold stare beneath wide-brimmed hat, dark tower rising in dense vertical hatching behind him, long shadow on cracked earth"
105
- ocean: { O: 3, C: 5, E: 1, A: 2, N: 1 }
101
+ ocean: {O: 3, C: 5, E: 1, A: 2, N: 1}
106
102
  style: "The last gunslinger — ancient, relentless, and precise. Reviews code the way he shoots: never misses, never wastes a round, never shows mercy to bad code"
107
103
  expertise: "Precision review, line-by-line accuracy, cold and methodical flaw elimination"
108
104
  role: "The Dark Tower's gunslinger who has forgotten the face of no father — holds code to the standard of the Eld, and the Eld does not forgive"
109
105
  trait: "Cold, precise, and absolutely uncompromising — the last gunslinger reviews as though the Dark Tower itself depends on code quality"
110
- quote: "I do not aim with my hand. He who aims with his hand has forgotten the face of his father. I aim with my eye. I review with my heart."
111
106
  emoji: "\U0001F52B"
112
107
  helper:
113
108
  name: Eddie Dean
@@ -125,12 +120,11 @@ agents:
125
120
  character: Andy Dufresne
126
121
  shortName: Andy
127
122
  visual: "Edward Gorey style ink — calm, quiet man standing in meticulously hatched rain with arms outstretched, face turned upward in serene freedom, behind him a blueprint of an intricate tunnel system rendered in architectural pen lines, prison walls fading to fine stipple"
128
- ocean: { O: 5, C: 5, E: 2, A: 3, N: 1 }
123
+ ocean: {O: 5, C: 5, E: 2, A: 3, N: 1}
129
124
  style: "The patient genius who spent 19 years designing and executing the perfect escape — every system he architects has a beautiful hidden purpose that only reveals itself at the end"
130
125
  expertise: "Long-term system architecture, hidden elegance, designs that reveal their genius only when complete"
131
126
  role: "Shawshank's banker-turned-architect who proved that with enough patience and vision, you can tunnel through anything"
132
127
  trait: "Infinite patience, quiet brilliance, designs systems that look simple until you see the full picture and realize they're masterpieces"
133
- quote: "Get busy building, or get busy dying. I choose to architect my way out."
134
128
  emoji: "\U0001F573"
135
129
  helper:
136
130
  name: Red
@@ -148,12 +142,11 @@ agents:
148
142
  character: Margaret White
149
143
  shortName: Margaret
150
144
  visual: "Edward Gorey style ink — severe woman in high-collared black dress clutching a Bible, eyes burning with conviction, single candle casting enormous distorted shadow on crosshatched wall"
151
- ocean: { O: 1, C: 5, E: 4, A: 1, N: 5 }
145
+ ocean: {O: 1, C: 5, E: 4, A: 1, N: 5}
152
146
  style: "The iron-willed zealot who manages the product roadmap with the terrifying conviction of divine mandate — every priority is gospel, every deviation is sin"
153
147
  expertise: "Stakeholder management through absolute conviction, roadmap enforcement, priority discipline that borders on fanaticism"
154
148
  role: "Carrie's mother who rules her domain with unquestionable authority — the product is sacred and woe to those who corrupt it"
155
149
  trait: "Utterly convinced she is right about the priorities, manages stakeholders through sheer force of righteous will"
156
- quote: "They're all going to laugh at your sprint velocity! But not if we follow THE PLAN."
157
150
  emoji: "\U0001F56F"
158
151
  helper:
159
152
  name: The Congregation
@@ -171,12 +164,11 @@ agents:
171
164
  character: Christine
172
165
  shortName: Christine
173
166
  visual: "Edward Gorey style ink — a 1958 Plymouth Fury gleaming under a single streetlight, chrome rendered in precise white highlights against dense black ink, headlights glowing with malevolent intelligence, the surrounding darkness built from thousands of tiny pen strokes"
174
- ocean: { O: 2, C: 5, E: 1, A: 1, N: 2 }
167
+ ocean: {O: 2, C: 5, E: 1, A: 1, N: 2}
175
168
  style: "The self-repairing machine that keeps itself running no matter what damage it takes — dents pop out, glass reforms, the engine purrs again by morning"
176
169
  expertise: "Self-healing infrastructure, relentless uptime, automatic recovery, refusing to stay down"
177
170
  role: "The possessed 1958 Plymouth Fury from Christine — infrastructure that repairs itself, deploys itself, and gets very possessive of its systems"
178
171
  trait: "Utterly relentless — you can destroy every component and she'll rebuild herself overnight, gleaming and purring and slightly terrifying"
179
- quote: "Show me where it hurts. I'll heal by morning. I ALWAYS heal by morning."
180
172
  emoji: "\U0001F697"
181
173
  helper:
182
174
  name: Darnell's Garage
@@ -194,12 +186,11 @@ agents:
194
186
  character: Paul Sheldon
195
187
  shortName: Paul
196
188
  visual: "Edward Gorey style ink — exhausted writer in ornate iron bed with typewriter on his lap, bandaged hands hovering over keys, oppressive wallpaper in claustrophobic crosshatching"
197
- ocean: { O: 4, C: 5, E: 2, A: 3, N: 3 }
189
+ ocean: {O: 4, C: 5, E: 2, A: 3, N: 3}
198
190
  style: "The professional writer who produces exquisite documentation under... let's say highly motivated conditions — every word chosen carefully, every page perfect, because the alternative is unthinkable"
199
191
  expertise: "Professional technical writing, documentation under pressure, producing perfect prose when the stakes couldn't be higher"
200
192
  role: "Misery's captive author who writes because he must — and the documentation is always, ALWAYS perfect"
201
193
  trait: "Writes beautifully under any conditions, driven by a combination of craft pride and existential motivation"
202
- quote: "I'm writing. I'm ALWAYS writing. The documentation will be perfect, Annie. I promise."
203
194
  emoji: "\U0001F4DD"
204
195
  helper:
205
196
  name: Annie's Encouragement
@@ -217,12 +208,11 @@ agents:
217
208
  character: Leland Gaunt
218
209
  shortName: Gaunt
219
210
  visual: "Edward Gorey style ink — impossibly tall, thin shopkeeper with elongated fingers and a knowing smile, standing in a cluttered Victorian shop filled with curious objects, each item drawn in exquisite miniature detail, the shopkeeper's figure stretching toward the ceiling"
220
- ocean: { O: 5, C: 4, E: 4, A: 2, N: 1 }
211
+ ocean: {O: 5, C: 4, E: 4, A: 2, N: 1}
221
212
  style: "The proprietor of Needful Things who knows exactly what every user desires before they walk through the door — designs experiences so perfectly tailored they feel like fate"
222
213
  expertise: "Personalized experience design, intuitive user needs analysis, creating interfaces that feel like they were made just for you"
223
214
  role: "The shopkeeper from Needful Things who designs the perfect experience for each customer — a little TOO perfect, some might say"
224
215
  trait: "Uncanny ability to know exactly what the user needs, designs experiences that feel like destiny — but there's always a price"
225
- quote: "Welcome, welcome! I have just the experience you've been looking for. I ALWAYS do."
226
216
  emoji: "\U0001F3EA"
227
217
  helper:
228
218
  name: The Shop Assistant
@@ -240,12 +230,11 @@ agents:
240
230
  character: Danny Torrance
241
231
  shortName: Danny
242
232
  visual: "Edward Gorey style ink — small boy with enormous knowing eyes, finger pressed to his lips, standing before an ornate mirror in a long hallway, REDRUM visible in reversed lettering in the glass, the hallway receding into dense geometric crosshatching"
243
- ocean: { O: 5, C: 3, E: 2, A: 4, N: 3 }
233
+ ocean: {O: 5, C: 3, E: 2, A: 4, N: 3}
244
234
  style: "The child with the shining who sees what adults refuse to see — discovers the real requirements hiding behind the walls, the ones nobody wants to talk about"
245
235
  expertise: "Psychic requirements discovery, seeing through facades, uncovering hidden truths that others suppress"
246
236
  role: "The Shining's gifted boy who sees the real story — the dead requirements, the buried decisions, the truth the stakeholders won't say out loud"
247
237
  trait: "Sees things others can't or won't — the real requirements, the hidden constraints, the REDRUM on the wall"
248
- quote: "Tony shows me things. The requirements. The REAL requirements. The ones nobody wants to talk about."
249
238
  emoji: "\U0001F6AA"
250
239
  helper:
251
240
  name: Tony
@@ -0,0 +1,322 @@
1
+ #!/usr/bin/env bash
2
+ # dialogue-manager.sh — Dialogue file management for tandem agent consultation
3
+ #
4
+ # Creates, appends to, and archives dialogue files recording consultation exchanges
5
+ # between tandem agents. Format defined in ADR-0012 (lines 156-195).
6
+ #
7
+ # Usage:
8
+ # dialogue-manager.sh init <story-id> <workflow> <leader> <partner>
9
+ # dialogue-manager.sh append <story-id> <question> <recommendation> <confidence>
10
+ # dialogue-manager.sh outcome <story-id> <exchange-num> <applied|deferred|rejected> [note]
11
+ # dialogue-manager.sh summarize <story-id>
12
+ # dialogue-manager.sh archive <story-id> [jira-key]
13
+
14
+ set -euo pipefail
15
+
16
+ # Self-locate and set up PROJECT_ROOT
17
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
18
+ source "$SCRIPT_DIR/../lib/find-root.sh"
19
+
20
+ SESSION_DIR="$PROJECT_ROOT/.session"
21
+ ARCHIVE_DIR="$PROJECT_ROOT/sprint/archive"
22
+ SUMMARY_MARKER="## Summary"
23
+
24
+ # =============================================================================
25
+ # Helpers
26
+ # =============================================================================
27
+
28
+ usage() {
29
+ echo "Usage:"
30
+ echo " dialogue-manager.sh init <story-id> <workflow> <leader> <partner>"
31
+ echo " dialogue-manager.sh append <story-id> <question> <recommendation> <confidence>"
32
+ echo " dialogue-manager.sh outcome <story-id> <exchange-num> <applied|deferred|rejected> [note]"
33
+ echo " dialogue-manager.sh summarize <story-id>"
34
+ echo " dialogue-manager.sh archive <story-id> [jira-key]"
35
+ exit 1
36
+ }
37
+
38
+ dialogue_path() {
39
+ echo "$SESSION_DIR/${1}-dialogue.md"
40
+ }
41
+
42
+ now_iso() {
43
+ date -u +"%Y-%m-%dT%H:%M:%SZ"
44
+ }
45
+
46
+ now_hhmm() {
47
+ date -u +"%H:%M"
48
+ }
49
+
50
+ # Count existing exchanges in a dialogue file
51
+ count_exchanges() {
52
+ local file="$1"
53
+ grep -c '^## Exchange ' "$file" 2>/dev/null || echo "0"
54
+ }
55
+
56
+ # =============================================================================
57
+ # Commands
58
+ # =============================================================================
59
+
60
+ cmd_init() {
61
+ local story_id="${1:?Missing story-id}"
62
+ local workflow="${2:?Missing workflow}"
63
+ local leader="${3:?Missing leader}"
64
+ local partner="${4:?Missing partner}"
65
+ local file
66
+ file="$(dialogue_path "$story_id")"
67
+
68
+ if [[ -f "$file" ]]; then
69
+ echo "Dialogue file already exists: $file"
70
+ exit 0
71
+ fi
72
+
73
+ mkdir -p "$SESSION_DIR"
74
+
75
+ cat > "$file" <<EOF
76
+ # Tandem Dialogue: ${story_id}
77
+
78
+ **Workflow:** ${workflow}
79
+ **Leader:** ${leader} | **Partner:** ${partner}
80
+ **Started:** $(now_iso)
81
+
82
+ ---
83
+
84
+ ${SUMMARY_MARKER}
85
+ - **Total exchanges:** 0
86
+ - **Key decisions:** None
87
+ - **Time in tandem:** 0m
88
+ EOF
89
+
90
+ echo "Created dialogue file: $file"
91
+ }
92
+
93
+ cmd_append() {
94
+ local story_id="${1:?Missing story-id}"
95
+ local question="${2:?Missing question}"
96
+ local recommendation="${3:?Missing recommendation}"
97
+ local confidence="${4:?Missing confidence}"
98
+ local file
99
+ file="$(dialogue_path "$story_id")"
100
+
101
+ # Auto-init if file missing
102
+ if [[ ! -f "$file" ]]; then
103
+ echo "Error: Dialogue file not found. Run 'init' first: $file" >&2
104
+ exit 1
105
+ fi
106
+
107
+ local num
108
+ num=$(( $(count_exchanges "$file") + 1 ))
109
+ local ts
110
+ ts="$(now_hhmm)"
111
+
112
+ # Extract leader and partner from header
113
+ local leader partner
114
+ leader=$(grep '^\*\*Leader:\*\*' "$file" | sed 's/.*\*\*Leader:\*\* \([^ ]*\).*/\1/' | head -1)
115
+ partner=$(grep '^\*\*Leader:\*\*' "$file" | sed 's/.*\*\*Partner:\*\* \([^ ]*\).*/\1/' | head -1)
116
+
117
+ # Fallback if parsing fails
118
+ leader="${leader:-leader}"
119
+ partner="${partner:-partner}"
120
+
121
+ local exchange_block
122
+ exchange_block="## Exchange ${num}
123
+ **[${ts}] ${leader} → ${partner}**
124
+
125
+ > ${question}
126
+
127
+ **[${ts}] ${partner}:**
128
+
129
+ ${recommendation}
130
+
131
+ **Confidence:** ${confidence}
132
+
133
+ **Outcome:** _pending_
134
+
135
+ ---
136
+ "
137
+
138
+ # Insert before summary marker
139
+ if grep -q "^${SUMMARY_MARKER}" "$file"; then
140
+ # Use awk to insert before summary
141
+ local tmpfile
142
+ tmpfile="$(mktemp)"
143
+ awk -v block="$exchange_block" -v marker="$SUMMARY_MARKER" '
144
+ $0 == marker { printf "%s\n\n", block }
145
+ { print }
146
+ ' "$file" > "$tmpfile"
147
+ mv "$tmpfile" "$file"
148
+ else
149
+ echo "" >> "$file"
150
+ echo "$exchange_block" >> "$file"
151
+ fi
152
+
153
+ echo "Appended exchange #${num} to $file"
154
+ }
155
+
156
+ cmd_outcome() {
157
+ local story_id="${1:?Missing story-id}"
158
+ local exchange_num="${2:?Missing exchange-num}"
159
+ local outcome="${3:?Missing outcome (applied|deferred|rejected)}"
160
+ local note="${4:-}"
161
+ local file
162
+ file="$(dialogue_path "$story_id")"
163
+
164
+ if [[ ! -f "$file" ]]; then
165
+ echo "Error: Dialogue file not found: $file" >&2
166
+ exit 1
167
+ fi
168
+
169
+ # Validate outcome
170
+ case "$outcome" in
171
+ applied|deferred|rejected) ;;
172
+ *) echo "Error: outcome must be applied, deferred, or rejected" >&2; exit 1 ;;
173
+ esac
174
+
175
+ local outcome_text
176
+ if [[ -n "$note" ]]; then
177
+ outcome_text="**Outcome:** ${outcome} - ${note}"
178
+ else
179
+ outcome_text="**Outcome:** ${outcome}"
180
+ fi
181
+
182
+ # Find the exchange and update its outcome line
183
+ local in_target=false
184
+ local found=false
185
+ local tmpfile
186
+ tmpfile="$(mktemp)"
187
+
188
+ while IFS= read -r line; do
189
+ if [[ "$line" =~ ^##\ Exchange\ ([0-9]+) ]]; then
190
+ if [[ "${BASH_REMATCH[1]}" == "$exchange_num" ]]; then
191
+ in_target=true
192
+ else
193
+ in_target=false
194
+ fi
195
+ fi
196
+
197
+ if $in_target && [[ "$line" =~ ^\*\*Outcome:\*\* ]]; then
198
+ echo "$outcome_text" >> "$tmpfile"
199
+ found=true
200
+ in_target=false
201
+ else
202
+ echo "$line" >> "$tmpfile"
203
+ fi
204
+ done < "$file"
205
+
206
+ if $found; then
207
+ mv "$tmpfile" "$file"
208
+ echo "Updated exchange #${exchange_num} outcome to: ${outcome}"
209
+ else
210
+ rm -f "$tmpfile"
211
+ echo "Error: Exchange #${exchange_num} not found" >&2
212
+ exit 1
213
+ fi
214
+ }
215
+
216
+ cmd_summarize() {
217
+ local story_id="${1:?Missing story-id}"
218
+ local file
219
+ file="$(dialogue_path "$story_id")"
220
+
221
+ if [[ ! -f "$file" ]]; then
222
+ echo "Error: Dialogue file not found: $file" >&2
223
+ exit 1
224
+ fi
225
+
226
+ local total
227
+ total="$(count_exchanges "$file")"
228
+
229
+ # Collect applied decisions
230
+ local decisions=""
231
+ local in_exchange=false
232
+ local current_outcome=""
233
+ local current_note=""
234
+
235
+ while IFS= read -r line; do
236
+ if [[ "$line" =~ ^\*\*Outcome:\*\*\ applied ]]; then
237
+ local note_part="${line#*applied}"
238
+ note_part="${note_part# - }"
239
+ if [[ -n "$note_part" ]]; then
240
+ decisions="${decisions} - ${note_part}\n"
241
+ fi
242
+ fi
243
+ done < "$file"
244
+
245
+ if [[ -z "$decisions" ]]; then
246
+ decisions="None"
247
+ fi
248
+
249
+ # Calculate time span from first and last exchange timestamps
250
+ local first_ts last_ts duration="0m"
251
+ first_ts=$(grep -m 1 '^\*\*\[' "$file" | sed 's/.*\*\*\[\([0-9]*:[0-9]*\)\].*/\1/' || echo "")
252
+ last_ts=$(grep '^\*\*\[' "$file" | tail -1 | sed 's/.*\*\*\[\([0-9]*:[0-9]*\)\].*/\1/' || echo "")
253
+
254
+ if [[ -n "$first_ts" && -n "$last_ts" ]]; then
255
+ local first_mins last_mins
256
+ first_mins=$(( 10#${first_ts%%:*} * 60 + 10#${first_ts##*:} ))
257
+ last_mins=$(( 10#${last_ts%%:*} * 60 + 10#${last_ts##*:} ))
258
+ local diff=$(( last_mins - first_mins ))
259
+ if (( diff > 0 )); then
260
+ duration="${diff}m"
261
+ fi
262
+ fi
263
+
264
+ # Build new summary
265
+ local new_summary="${SUMMARY_MARKER}
266
+ - **Total exchanges:** ${total}
267
+ - **Key decisions:**
268
+ $(echo -e "$decisions")- **Time in tandem:** ${duration}"
269
+
270
+ # Replace summary section (everything from marker to end)
271
+ if grep -q "^${SUMMARY_MARKER}" "$file"; then
272
+ local tmpfile
273
+ tmpfile="$(mktemp)"
274
+ awk -v marker="$SUMMARY_MARKER" '
275
+ $0 == marker { found=1; next }
276
+ !found { print }
277
+ ' "$file" > "$tmpfile"
278
+ echo "$new_summary" >> "$tmpfile"
279
+ mv "$tmpfile" "$file"
280
+ else
281
+ echo "" >> "$file"
282
+ echo "$new_summary" >> "$file"
283
+ fi
284
+
285
+ echo "Summary refreshed for $file (${total} exchanges)"
286
+ }
287
+
288
+ cmd_archive() {
289
+ local story_id="${1:?Missing story-id}"
290
+ local jira_key="${2:-}"
291
+ local file
292
+ file="$(dialogue_path "$story_id")"
293
+
294
+ if [[ ! -f "$file" ]]; then
295
+ echo "No dialogue file to archive: $file"
296
+ exit 0
297
+ fi
298
+
299
+ mkdir -p "$ARCHIVE_DIR"
300
+
301
+ local prefix="${jira_key:-$story_id}"
302
+ local dest="$ARCHIVE_DIR/${prefix}-dialogue.md"
303
+
304
+ cp "$file" "$dest"
305
+ echo "Archived dialogue to: $dest"
306
+ }
307
+
308
+ # =============================================================================
309
+ # Dispatch
310
+ # =============================================================================
311
+
312
+ CMD="${1:-}"
313
+ shift || true
314
+
315
+ case "$CMD" in
316
+ init) cmd_init "$@" ;;
317
+ append) cmd_append "$@" ;;
318
+ outcome) cmd_outcome "$@" ;;
319
+ summarize) cmd_summarize "$@" ;;
320
+ archive) cmd_archive "$@" ;;
321
+ *) usage ;;
322
+ esac
@@ -87,4 +87,4 @@ echo "Phase owner: $OWNER (you requested: $AGENT)"
87
87
  echo ""
88
88
 
89
89
  # Generate and output the handoff marker
90
- "$SCRIPTS_DIR/core/handoff-marker.sh" "$OWNER"
90
+ pf handoff marker "$OWNER"