@pennyfarthing/core 11.2.2 → 11.3.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 (448) hide show
  1. package/README.md +3 -3
  2. package/package.json +1 -1
  3. package/packages/core/dist/cli/commands/doctor-legacy.test.js +2 -2
  4. package/packages/core/dist/cli/commands/doctor-legacy.test.js.map +1 -1
  5. package/packages/core/dist/cli/commands/doctor.d.ts +55 -0
  6. package/packages/core/dist/cli/commands/doctor.d.ts.map +1 -1
  7. package/packages/core/dist/cli/commands/doctor.js +204 -23
  8. package/packages/core/dist/cli/commands/doctor.js.map +1 -1
  9. package/packages/core/dist/cli/commands/init.d.ts +12 -0
  10. package/packages/core/dist/cli/commands/init.d.ts.map +1 -1
  11. package/packages/core/dist/cli/commands/init.js +45 -0
  12. package/packages/core/dist/cli/commands/init.js.map +1 -1
  13. package/packages/core/dist/cli/commands/pyproject-install.test.d.ts +19 -0
  14. package/packages/core/dist/cli/commands/pyproject-install.test.d.ts.map +1 -0
  15. package/packages/core/dist/cli/commands/pyproject-install.test.js +261 -0
  16. package/packages/core/dist/cli/commands/pyproject-install.test.js.map +1 -0
  17. package/packages/core/dist/cli/commands/stale-artifacts-cleanup.test.d.ts +17 -0
  18. package/packages/core/dist/cli/commands/stale-artifacts-cleanup.test.d.ts.map +1 -0
  19. package/packages/core/dist/cli/commands/stale-artifacts-cleanup.test.js +470 -0
  20. package/packages/core/dist/cli/commands/stale-artifacts-cleanup.test.js.map +1 -0
  21. package/packages/core/dist/cli/commands/update-consolidation.test.js +14 -6
  22. package/packages/core/dist/cli/commands/update-consolidation.test.js.map +1 -1
  23. package/packages/core/dist/cli/commands/update.d.ts.map +1 -1
  24. package/packages/core/dist/cli/commands/update.js +31 -2
  25. package/packages/core/dist/cli/commands/update.js.map +1 -1
  26. package/packages/core/dist/cli/cyclist-migration.test.d.ts +16 -0
  27. package/packages/core/dist/cli/cyclist-migration.test.d.ts.map +1 -0
  28. package/packages/core/dist/cli/cyclist-migration.test.js +229 -0
  29. package/packages/core/dist/cli/cyclist-migration.test.js.map +1 -0
  30. package/packages/core/dist/cli/index.js +2 -0
  31. package/packages/core/dist/cli/index.js.map +1 -1
  32. package/packages/core/dist/cli/utils/python.d.ts.map +1 -1
  33. package/packages/core/dist/cli/utils/python.js +11 -0
  34. package/packages/core/dist/cli/utils/python.js.map +1 -1
  35. package/packages/core/dist/cli/utils/settings-hook-migration.test.d.ts +17 -0
  36. package/packages/core/dist/cli/utils/settings-hook-migration.test.d.ts.map +1 -0
  37. package/packages/core/dist/cli/utils/settings-hook-migration.test.js +382 -0
  38. package/packages/core/dist/cli/utils/settings-hook-migration.test.js.map +1 -0
  39. package/packages/core/dist/cli/utils/settings.d.ts.map +1 -1
  40. package/packages/core/dist/cli/utils/settings.js +15 -2
  41. package/packages/core/dist/cli/utils/settings.js.map +1 -1
  42. package/packages/core/dist/cli/utils/stale-artifacts.d.ts +59 -0
  43. package/packages/core/dist/cli/utils/stale-artifacts.d.ts.map +1 -0
  44. package/packages/core/dist/cli/utils/stale-artifacts.js +163 -0
  45. package/packages/core/dist/cli/utils/stale-artifacts.js.map +1 -0
  46. package/packages/core/dist/scripts/benchmark-integration.d.ts +182 -0
  47. package/packages/core/dist/scripts/benchmark-integration.d.ts.map +1 -0
  48. package/packages/core/dist/scripts/benchmark-integration.js +691 -0
  49. package/packages/core/dist/scripts/benchmark-integration.js.map +1 -0
  50. package/packages/core/dist/scripts/job-fair-aggregator.d.ts +150 -0
  51. package/packages/core/dist/scripts/job-fair-aggregator.d.ts.map +1 -0
  52. package/packages/core/dist/scripts/job-fair-aggregator.js +547 -0
  53. package/packages/core/dist/scripts/job-fair-aggregator.js.map +1 -0
  54. package/packages/core/dist/scripts/theme-detail.test.d.ts.map +1 -0
  55. package/packages/core/dist/scripts/theme-detail.test.js.map +1 -0
  56. package/packages/core/dist/server/settings.d.ts.map +1 -1
  57. package/packages/core/dist/server/settings.js +5 -0
  58. package/packages/core/dist/server/settings.js.map +1 -1
  59. package/packages/core/dist/workflow/tandem-workflow-templates.test.js +7 -5
  60. package/packages/core/dist/workflow/tandem-workflow-templates.test.js.map +1 -1
  61. package/packages/core/dist/workflow/workflow-migration.test.js +6 -5
  62. package/packages/core/dist/workflow/workflow-migration.test.js.map +1 -1
  63. package/pennyfarthing-dist/agents/dev.md +4 -2
  64. package/pennyfarthing-dist/agents/devops.md +2 -10
  65. package/pennyfarthing-dist/agents/reviewer-preflight.md +4 -5
  66. package/pennyfarthing-dist/agents/sm.md +4 -17
  67. package/pennyfarthing-dist/commands/pf-health-check.md +30 -11
  68. package/pennyfarthing-dist/gates/{confidence-sm.md → confidence.md} +16 -17
  69. package/pennyfarthing-dist/gates/dev-exit.md +75 -0
  70. package/pennyfarthing-dist/gates/merge-ready.md +49 -0
  71. package/pennyfarthing-dist/gates/release-ready.md +95 -0
  72. package/pennyfarthing-dist/gates/reviewer-preflight-check.md +90 -0
  73. package/pennyfarthing-dist/gates/sm-setup-exit.md +82 -0
  74. package/pennyfarthing-dist/guides/agent-behavior.md +88 -30
  75. package/pennyfarthing-dist/guides/gates.md +7 -2
  76. package/pennyfarthing-dist/scripts/hooks/__pycache__/question_reflector_check.cpython-314.pyc +0 -0
  77. package/pennyfarthing-dist/scripts/lib/find-root.sh +5 -0
  78. package/pennyfarthing-dist/scripts/lib/run-pf.sh +4 -0
  79. package/pennyfarthing-dist/skills/pf-settings/skill.md +42 -0
  80. package/pennyfarthing-dist/skills/skill-registry.yaml +15 -0
  81. package/pennyfarthing-dist/templates/pyproject.toml +27 -0
  82. package/pennyfarthing-dist/workflows/bdd-tandem.yaml +7 -3
  83. package/pennyfarthing-dist/workflows/bdd.yaml +7 -3
  84. package/pennyfarthing-dist/workflows/installation-check/steps/step-01-foundation.md +77 -0
  85. package/pennyfarthing-dist/workflows/installation-check/steps/step-02-commands.md +82 -0
  86. package/pennyfarthing-dist/workflows/installation-check/steps/step-03-hooks.md +121 -0
  87. package/pennyfarthing-dist/workflows/installation-check/steps/step-04-scripts.md +83 -0
  88. package/pennyfarthing-dist/workflows/installation-check/steps/step-05-layout.md +81 -0
  89. package/pennyfarthing-dist/workflows/installation-check/steps/step-06-legacy.md +94 -0
  90. package/pennyfarthing-dist/workflows/installation-check/steps/step-07-tools.md +80 -0
  91. package/pennyfarthing-dist/workflows/installation-check/steps/step-08-summary.md +99 -0
  92. package/pennyfarthing-dist/workflows/installation-check/workflow.yaml +47 -0
  93. package/pennyfarthing-dist/workflows/tdd-tandem.yaml +7 -3
  94. package/pennyfarthing-dist/workflows/tdd.yaml +7 -3
  95. package/pennyfarthing-dist/workflows/trivial.yaml +7 -3
  96. package/pennyfarthing_scripts/__pycache__/__init__.cpython-311.pyc +0 -0
  97. package/pennyfarthing_scripts/__pycache__/__init__.cpython-314.pyc +0 -0
  98. package/pennyfarthing_scripts/__pycache__/bellmode_hook.cpython-314.pyc +0 -0
  99. package/pennyfarthing_scripts/__pycache__/cli.cpython-311.pyc +0 -0
  100. package/pennyfarthing_scripts/__pycache__/cli.cpython-314.pyc +0 -0
  101. package/pennyfarthing_scripts/__pycache__/config.cpython-314.pyc +0 -0
  102. package/pennyfarthing_scripts/__pycache__/context.cpython-311.pyc +0 -0
  103. package/pennyfarthing_scripts/__pycache__/context.cpython-314.pyc +0 -0
  104. package/pennyfarthing_scripts/__pycache__/hooks.cpython-314.pyc +0 -0
  105. package/pennyfarthing_scripts/__pycache__/jira.cpython-314.pyc +0 -0
  106. package/pennyfarthing_scripts/__pycache__/jira_bidirectional_sync.cpython-314.pyc +0 -0
  107. package/pennyfarthing_scripts/__pycache__/jira_epic_creation.cpython-314.pyc +0 -0
  108. package/pennyfarthing_scripts/__pycache__/jira_sync.cpython-314.pyc +0 -0
  109. package/pennyfarthing_scripts/__pycache__/jira_sync_story.cpython-314.pyc +0 -0
  110. package/pennyfarthing_scripts/__pycache__/output.cpython-314.pyc +0 -0
  111. package/pennyfarthing_scripts/__pycache__/patch_mode.cpython-314.pyc +0 -0
  112. package/pennyfarthing_scripts/__pycache__/pretooluse_hook.cpython-314.pyc +0 -0
  113. package/pennyfarthing_scripts/__pycache__/schema_validation_hook.cpython-314.pyc +0 -0
  114. package/pennyfarthing_scripts/__pycache__/session_start_hook.cpython-314.pyc +0 -0
  115. package/pennyfarthing_scripts/__pycache__/sprint.cpython-314.pyc +0 -0
  116. package/pennyfarthing_scripts/__pycache__/workflow.cpython-311.pyc +0 -0
  117. package/pennyfarthing_scripts/__pycache__/workflow.cpython-314.pyc +0 -0
  118. package/pennyfarthing_scripts/bc/__pycache__/__init__.cpython-311.pyc +0 -0
  119. package/pennyfarthing_scripts/bc/__pycache__/__init__.cpython-314.pyc +0 -0
  120. package/pennyfarthing_scripts/bc/__pycache__/cli.cpython-311.pyc +0 -0
  121. package/pennyfarthing_scripts/bc/__pycache__/cli.cpython-314.pyc +0 -0
  122. package/pennyfarthing_scripts/bc/__pycache__/focus.cpython-311.pyc +0 -0
  123. package/pennyfarthing_scripts/bc/__pycache__/focus.cpython-314.pyc +0 -0
  124. package/pennyfarthing_scripts/bc/__pycache__/split.cpython-314.pyc +0 -0
  125. package/pennyfarthing_scripts/bc/cli.py +21 -0
  126. package/pennyfarthing_scripts/bc/focus.py +1 -0
  127. package/pennyfarthing_scripts/bc/split.py +52 -0
  128. package/pennyfarthing_scripts/bikerack/__pycache__/__init__.cpython-311.pyc +0 -0
  129. package/pennyfarthing_scripts/bikerack/__pycache__/__init__.cpython-314.pyc +0 -0
  130. package/pennyfarthing_scripts/bikerack/__pycache__/__main__.cpython-314.pyc +0 -0
  131. package/pennyfarthing_scripts/bikerack/__pycache__/audit_log_panel.cpython-314.pyc +0 -0
  132. package/pennyfarthing_scripts/bikerack/__pycache__/background_panel.cpython-314.pyc +0 -0
  133. package/pennyfarthing_scripts/bikerack/__pycache__/base_panel.cpython-314.pyc +0 -0
  134. package/pennyfarthing_scripts/bikerack/__pycache__/changed_panel.cpython-314.pyc +0 -0
  135. package/pennyfarthing_scripts/bikerack/__pycache__/cli.cpython-311.pyc +0 -0
  136. package/pennyfarthing_scripts/bikerack/__pycache__/cli.cpython-314.pyc +0 -0
  137. package/pennyfarthing_scripts/bikerack/__pycache__/context_meter_footer.cpython-314.pyc +0 -0
  138. package/pennyfarthing_scripts/bikerack/__pycache__/debug_panel.cpython-314.pyc +0 -0
  139. package/pennyfarthing_scripts/bikerack/__pycache__/diffs_panel.cpython-314.pyc +0 -0
  140. package/pennyfarthing_scripts/bikerack/__pycache__/events.cpython-314.pyc +0 -0
  141. package/pennyfarthing_scripts/bikerack/__pycache__/git_panel.cpython-314.pyc +0 -0
  142. package/pennyfarthing_scripts/bikerack/__pycache__/launcher.cpython-311.pyc +0 -0
  143. package/pennyfarthing_scripts/bikerack/__pycache__/launcher.cpython-314.pyc +0 -0
  144. package/pennyfarthing_scripts/bikerack/__pycache__/portrait_resolver.cpython-314.pyc +0 -0
  145. package/pennyfarthing_scripts/bikerack/__pycache__/progress_panel.cpython-314.pyc +0 -0
  146. package/pennyfarthing_scripts/bikerack/__pycache__/sprint_panel.cpython-314.pyc +0 -0
  147. package/pennyfarthing_scripts/bikerack/__pycache__/story_detail_data.cpython-314.pyc +0 -0
  148. package/pennyfarthing_scripts/bikerack/__pycache__/story_detail_screen.cpython-314.pyc +0 -0
  149. package/pennyfarthing_scripts/bikerack/__pycache__/tui.cpython-314.pyc +0 -0
  150. package/pennyfarthing_scripts/bikerack/__pycache__/ws_client.cpython-314.pyc +0 -0
  151. package/pennyfarthing_scripts/bikerack/context_meter_footer.py +53 -3
  152. package/pennyfarthing_scripts/bikerack/tui.py +202 -8
  153. package/pennyfarthing_scripts/brownfield/__pycache__/__init__.cpython-314.pyc +0 -0
  154. package/pennyfarthing_scripts/brownfield/__pycache__/__main__.cpython-314.pyc +0 -0
  155. package/pennyfarthing_scripts/brownfield/__pycache__/cli.cpython-314.pyc +0 -0
  156. package/pennyfarthing_scripts/brownfield/__pycache__/discover.cpython-314.pyc +0 -0
  157. package/pennyfarthing_scripts/cli.py +5 -0
  158. package/pennyfarthing_scripts/codemarkers/__pycache__/__init__.cpython-314.pyc +0 -0
  159. package/pennyfarthing_scripts/codemarkers/__pycache__/__main__.cpython-314.pyc +0 -0
  160. package/pennyfarthing_scripts/codemarkers/__pycache__/analyze.cpython-314.pyc +0 -0
  161. package/pennyfarthing_scripts/codemarkers/__pycache__/cli.cpython-314.pyc +0 -0
  162. package/pennyfarthing_scripts/codemarkers/__pycache__/formatters.cpython-314.pyc +0 -0
  163. package/pennyfarthing_scripts/codemarkers/__pycache__/models.cpython-314.pyc +0 -0
  164. package/pennyfarthing_scripts/common/__pycache__/__init__.cpython-311.pyc +0 -0
  165. package/pennyfarthing_scripts/common/__pycache__/__init__.cpython-314.pyc +0 -0
  166. package/pennyfarthing_scripts/common/__pycache__/config.cpython-311.pyc +0 -0
  167. package/pennyfarthing_scripts/common/__pycache__/config.cpython-314.pyc +0 -0
  168. package/pennyfarthing_scripts/common/__pycache__/output.cpython-311.pyc +0 -0
  169. package/pennyfarthing_scripts/common/__pycache__/output.cpython-314.pyc +0 -0
  170. package/pennyfarthing_scripts/common/__pycache__/pr_config.cpython-314.pyc +0 -0
  171. package/pennyfarthing_scripts/common/__pycache__/themes.cpython-314.pyc +0 -0
  172. package/pennyfarthing_scripts/complexity/__pycache__/__init__.cpython-314.pyc +0 -0
  173. package/pennyfarthing_scripts/complexity/__pycache__/__main__.cpython-314.pyc +0 -0
  174. package/pennyfarthing_scripts/complexity/__pycache__/analyze.cpython-314.pyc +0 -0
  175. package/pennyfarthing_scripts/complexity/__pycache__/cli.cpython-314.pyc +0 -0
  176. package/pennyfarthing_scripts/complexity/__pycache__/formatters.cpython-314.pyc +0 -0
  177. package/pennyfarthing_scripts/complexity/__pycache__/models.cpython-314.pyc +0 -0
  178. package/pennyfarthing_scripts/consultation/__pycache__/__init__.cpython-311.pyc +0 -0
  179. package/pennyfarthing_scripts/consultation/__pycache__/__init__.cpython-314.pyc +0 -0
  180. package/pennyfarthing_scripts/consultation/__pycache__/cli.cpython-311.pyc +0 -0
  181. package/pennyfarthing_scripts/consultation/__pycache__/cli.cpython-314.pyc +0 -0
  182. package/pennyfarthing_scripts/consultation/__pycache__/dialogue_manager.cpython-314.pyc +0 -0
  183. package/pennyfarthing_scripts/deadcode/__pycache__/__init__.cpython-311.pyc +0 -0
  184. package/pennyfarthing_scripts/deadcode/__pycache__/__init__.cpython-314.pyc +0 -0
  185. package/pennyfarthing_scripts/deadcode/__pycache__/__main__.cpython-314.pyc +0 -0
  186. package/pennyfarthing_scripts/deadcode/__pycache__/analyze.cpython-314.pyc +0 -0
  187. package/pennyfarthing_scripts/deadcode/__pycache__/cli.cpython-311.pyc +0 -0
  188. package/pennyfarthing_scripts/deadcode/__pycache__/cli.cpython-314.pyc +0 -0
  189. package/pennyfarthing_scripts/deadcode/__pycache__/formatters.cpython-314.pyc +0 -0
  190. package/pennyfarthing_scripts/deadcode/__pycache__/models.cpython-314.pyc +0 -0
  191. package/pennyfarthing_scripts/dependencies/__pycache__/__init__.cpython-314.pyc +0 -0
  192. package/pennyfarthing_scripts/dependencies/__pycache__/__main__.cpython-314.pyc +0 -0
  193. package/pennyfarthing_scripts/dependencies/__pycache__/analyze.cpython-314.pyc +0 -0
  194. package/pennyfarthing_scripts/dependencies/__pycache__/cli.cpython-314.pyc +0 -0
  195. package/pennyfarthing_scripts/dependencies/__pycache__/formatters.cpython-314.pyc +0 -0
  196. package/pennyfarthing_scripts/dependencies/__pycache__/models.cpython-314.pyc +0 -0
  197. package/pennyfarthing_scripts/epic/__pycache__/__init__.cpython-311.pyc +0 -0
  198. package/pennyfarthing_scripts/epic/__pycache__/__init__.cpython-314.pyc +0 -0
  199. package/pennyfarthing_scripts/epic/__pycache__/cli.cpython-311.pyc +0 -0
  200. package/pennyfarthing_scripts/epic/__pycache__/cli.cpython-314.pyc +0 -0
  201. package/pennyfarthing_scripts/git/__pycache__/__init__.cpython-314.pyc +0 -0
  202. package/pennyfarthing_scripts/git/__pycache__/create_branches.cpython-314.pyc +0 -0
  203. package/pennyfarthing_scripts/git/__pycache__/status_all.cpython-314.pyc +0 -0
  204. package/pennyfarthing_scripts/git_group/__pycache__/__init__.cpython-311.pyc +0 -0
  205. package/pennyfarthing_scripts/git_group/__pycache__/__init__.cpython-314.pyc +0 -0
  206. package/pennyfarthing_scripts/git_group/__pycache__/cli.cpython-311.pyc +0 -0
  207. package/pennyfarthing_scripts/git_group/__pycache__/cli.cpython-314.pyc +0 -0
  208. package/pennyfarthing_scripts/handoff/__pycache__/__init__.cpython-311.pyc +0 -0
  209. package/pennyfarthing_scripts/handoff/__pycache__/__init__.cpython-314.pyc +0 -0
  210. package/pennyfarthing_scripts/handoff/__pycache__/cli.cpython-311.pyc +0 -0
  211. package/pennyfarthing_scripts/handoff/__pycache__/cli.cpython-314.pyc +0 -0
  212. package/pennyfarthing_scripts/handoff/__pycache__/complete_phase.cpython-314.pyc +0 -0
  213. package/pennyfarthing_scripts/handoff/__pycache__/gate_file.cpython-314.pyc +0 -0
  214. package/pennyfarthing_scripts/handoff/__pycache__/gate_runner.cpython-314.pyc +0 -0
  215. package/pennyfarthing_scripts/handoff/__pycache__/marker.cpython-314.pyc +0 -0
  216. package/pennyfarthing_scripts/handoff/__pycache__/phase_check.cpython-314.pyc +0 -0
  217. package/pennyfarthing_scripts/handoff/__pycache__/resolve_gate.cpython-314.pyc +0 -0
  218. package/pennyfarthing_scripts/healthscore/__pycache__/__init__.cpython-311.pyc +0 -0
  219. package/pennyfarthing_scripts/healthscore/__pycache__/__init__.cpython-314.pyc +0 -0
  220. package/pennyfarthing_scripts/healthscore/__pycache__/__main__.cpython-314.pyc +0 -0
  221. package/pennyfarthing_scripts/healthscore/__pycache__/analyze.cpython-311.pyc +0 -0
  222. package/pennyfarthing_scripts/healthscore/__pycache__/analyze.cpython-314.pyc +0 -0
  223. package/pennyfarthing_scripts/healthscore/__pycache__/cli.cpython-311.pyc +0 -0
  224. package/pennyfarthing_scripts/healthscore/__pycache__/cli.cpython-314.pyc +0 -0
  225. package/pennyfarthing_scripts/healthscore/__pycache__/formatters.cpython-314.pyc +0 -0
  226. package/pennyfarthing_scripts/healthscore/__pycache__/models.cpython-311.pyc +0 -0
  227. package/pennyfarthing_scripts/healthscore/__pycache__/models.cpython-314.pyc +0 -0
  228. package/pennyfarthing_scripts/hooks/__pycache__/__init__.cpython-311.pyc +0 -0
  229. package/pennyfarthing_scripts/hooks/__pycache__/__init__.cpython-314.pyc +0 -0
  230. package/pennyfarthing_scripts/hooks/__pycache__/bell_mode.cpython-311.pyc +0 -0
  231. package/pennyfarthing_scripts/hooks/__pycache__/bell_mode.cpython-314.pyc +0 -0
  232. package/pennyfarthing_scripts/hooks/__pycache__/cli.cpython-311.pyc +0 -0
  233. package/pennyfarthing_scripts/hooks/__pycache__/cli.cpython-314.pyc +0 -0
  234. package/pennyfarthing_scripts/hooks/__pycache__/context_breaker.cpython-311.pyc +0 -0
  235. package/pennyfarthing_scripts/hooks/__pycache__/context_breaker.cpython-314.pyc +0 -0
  236. package/pennyfarthing_scripts/hooks/__pycache__/context_warning.cpython-311.pyc +0 -0
  237. package/pennyfarthing_scripts/hooks/__pycache__/context_warning.cpython-314.pyc +0 -0
  238. package/pennyfarthing_scripts/hooks/__pycache__/cyclist_pretooluse.cpython-311.pyc +0 -0
  239. package/pennyfarthing_scripts/hooks/__pycache__/cyclist_pretooluse.cpython-314.pyc +0 -0
  240. package/pennyfarthing_scripts/hooks/__pycache__/pre_edit_check.cpython-311.pyc +0 -0
  241. package/pennyfarthing_scripts/hooks/__pycache__/pre_edit_check.cpython-314.pyc +0 -0
  242. package/pennyfarthing_scripts/hooks/__pycache__/reflector_check.cpython-311.pyc +0 -0
  243. package/pennyfarthing_scripts/hooks/__pycache__/reflector_check.cpython-314.pyc +0 -0
  244. package/pennyfarthing_scripts/hooks/__pycache__/schema_validation.cpython-311.pyc +0 -0
  245. package/pennyfarthing_scripts/hooks/__pycache__/schema_validation.cpython-314.pyc +0 -0
  246. package/pennyfarthing_scripts/hooks/__pycache__/session_start.cpython-311.pyc +0 -0
  247. package/pennyfarthing_scripts/hooks/__pycache__/session_start.cpython-314.pyc +0 -0
  248. package/pennyfarthing_scripts/hooks/__pycache__/session_stop.cpython-314.pyc +0 -0
  249. package/pennyfarthing_scripts/hooks/__pycache__/sprint_yaml_validation.cpython-311.pyc +0 -0
  250. package/pennyfarthing_scripts/hooks/__pycache__/sprint_yaml_validation.cpython-314.pyc +0 -0
  251. package/pennyfarthing_scripts/hooks/__pycache__/statusline.cpython-311.pyc +0 -0
  252. package/pennyfarthing_scripts/hooks/__pycache__/statusline.cpython-314.pyc +0 -0
  253. package/pennyfarthing_scripts/hotspots/__pycache__/__init__.cpython-311.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-311.pyc +0 -0
  257. package/pennyfarthing_scripts/hotspots/__pycache__/analyze.cpython-314.pyc +0 -0
  258. package/pennyfarthing_scripts/hotspots/__pycache__/cli.cpython-311.pyc +0 -0
  259. package/pennyfarthing_scripts/hotspots/__pycache__/cli.cpython-314.pyc +0 -0
  260. package/pennyfarthing_scripts/hotspots/__pycache__/formatters.cpython-314.pyc +0 -0
  261. package/pennyfarthing_scripts/hotspots/__pycache__/models.cpython-311.pyc +0 -0
  262. package/pennyfarthing_scripts/hotspots/__pycache__/models.cpython-314.pyc +0 -0
  263. package/pennyfarthing_scripts/jira/__pycache__/__init__.cpython-311.pyc +0 -0
  264. package/pennyfarthing_scripts/jira/__pycache__/__init__.cpython-314.pyc +0 -0
  265. package/pennyfarthing_scripts/jira/__pycache__/__main__.cpython-314.pyc +0 -0
  266. package/pennyfarthing_scripts/jira/__pycache__/bidirectional.cpython-311.pyc +0 -0
  267. package/pennyfarthing_scripts/jira/__pycache__/bidirectional.cpython-314.pyc +0 -0
  268. package/pennyfarthing_scripts/jira/__pycache__/claim.cpython-311.pyc +0 -0
  269. package/pennyfarthing_scripts/jira/__pycache__/claim.cpython-314.pyc +0 -0
  270. package/pennyfarthing_scripts/jira/__pycache__/cli.cpython-311.pyc +0 -0
  271. package/pennyfarthing_scripts/jira/__pycache__/cli.cpython-314.pyc +0 -0
  272. package/pennyfarthing_scripts/jira/__pycache__/client.cpython-311.pyc +0 -0
  273. package/pennyfarthing_scripts/jira/__pycache__/client.cpython-314.pyc +0 -0
  274. package/pennyfarthing_scripts/jira/__pycache__/compat.cpython-314.pyc +0 -0
  275. package/pennyfarthing_scripts/jira/__pycache__/create.cpython-311.pyc +0 -0
  276. package/pennyfarthing_scripts/jira/__pycache__/create.cpython-314.pyc +0 -0
  277. package/pennyfarthing_scripts/jira/__pycache__/epic.cpython-311.pyc +0 -0
  278. package/pennyfarthing_scripts/jira/__pycache__/epic.cpython-314.pyc +0 -0
  279. package/pennyfarthing_scripts/jira/__pycache__/mappings.cpython-314.pyc +0 -0
  280. package/pennyfarthing_scripts/jira/__pycache__/models.cpython-314.pyc +0 -0
  281. package/pennyfarthing_scripts/jira/__pycache__/operations.cpython-311.pyc +0 -0
  282. package/pennyfarthing_scripts/jira/__pycache__/operations.cpython-314.pyc +0 -0
  283. package/pennyfarthing_scripts/jira/__pycache__/reconcile.cpython-311.pyc +0 -0
  284. package/pennyfarthing_scripts/jira/__pycache__/reconcile.cpython-314.pyc +0 -0
  285. package/pennyfarthing_scripts/jira/__pycache__/story.cpython-311.pyc +0 -0
  286. package/pennyfarthing_scripts/jira/__pycache__/story.cpython-314.pyc +0 -0
  287. package/pennyfarthing_scripts/jira/__pycache__/sync.cpython-311.pyc +0 -0
  288. package/pennyfarthing_scripts/jira/__pycache__/sync.cpython-314.pyc +0 -0
  289. package/pennyfarthing_scripts/launch/__pycache__/__init__.cpython-311.pyc +0 -0
  290. package/pennyfarthing_scripts/launch/__pycache__/__init__.cpython-314.pyc +0 -0
  291. package/pennyfarthing_scripts/launch/__pycache__/cli.cpython-311.pyc +0 -0
  292. package/pennyfarthing_scripts/launch/__pycache__/cli.cpython-314.pyc +0 -0
  293. package/pennyfarthing_scripts/migration/__pycache__/__init__.cpython-314.pyc +0 -0
  294. package/pennyfarthing_scripts/migration/__pycache__/__main__.cpython-314.pyc +0 -0
  295. package/pennyfarthing_scripts/migration/__pycache__/cli.cpython-314.pyc +0 -0
  296. package/pennyfarthing_scripts/migration/__pycache__/session.cpython-314.pyc +0 -0
  297. package/pennyfarthing_scripts/migration/__pycache__/skill.cpython-314.pyc +0 -0
  298. package/pennyfarthing_scripts/migration/__pycache__/step.cpython-314.pyc +0 -0
  299. package/pennyfarthing_scripts/migration/__pycache__/validate.cpython-314.pyc +0 -0
  300. package/pennyfarthing_scripts/preflight/__pycache__/__init__.cpython-314.pyc +0 -0
  301. package/pennyfarthing_scripts/preflight/__pycache__/__main__.cpython-314.pyc +0 -0
  302. package/pennyfarthing_scripts/preflight/__pycache__/cli.cpython-314.pyc +0 -0
  303. package/pennyfarthing_scripts/preflight/__pycache__/finish.cpython-314.pyc +0 -0
  304. package/pennyfarthing_scripts/prime/__pycache__/__init__.cpython-314.pyc +0 -0
  305. package/pennyfarthing_scripts/prime/__pycache__/__main__.cpython-314.pyc +0 -0
  306. package/pennyfarthing_scripts/prime/__pycache__/cli.cpython-314.pyc +0 -0
  307. package/pennyfarthing_scripts/prime/__pycache__/loader.cpython-314.pyc +0 -0
  308. package/pennyfarthing_scripts/prime/__pycache__/models.cpython-314.pyc +0 -0
  309. package/pennyfarthing_scripts/prime/__pycache__/persona.cpython-314.pyc +0 -0
  310. package/pennyfarthing_scripts/prime/__pycache__/session.cpython-314.pyc +0 -0
  311. package/pennyfarthing_scripts/prime/__pycache__/tiers.cpython-314.pyc +0 -0
  312. package/pennyfarthing_scripts/prime/__pycache__/version_sentinel.cpython-314.pyc +0 -0
  313. package/pennyfarthing_scripts/prime/__pycache__/workflow.cpython-314.pyc +0 -0
  314. package/pennyfarthing_scripts/session/__pycache__/__init__.cpython-311.pyc +0 -0
  315. package/pennyfarthing_scripts/session/__pycache__/__init__.cpython-314.pyc +0 -0
  316. package/pennyfarthing_scripts/session/__pycache__/cli.cpython-311.pyc +0 -0
  317. package/pennyfarthing_scripts/session/__pycache__/cli.cpython-314.pyc +0 -0
  318. package/pennyfarthing_scripts/settings/__init__.py +0 -0
  319. package/pennyfarthing_scripts/settings/__pycache__/__init__.cpython-314.pyc +0 -0
  320. package/pennyfarthing_scripts/settings/__pycache__/cli.cpython-314.pyc +0 -0
  321. package/pennyfarthing_scripts/settings/__pycache__/settings.cpython-314.pyc +0 -0
  322. package/pennyfarthing_scripts/settings/cli.py +55 -0
  323. package/pennyfarthing_scripts/settings/settings.py +98 -0
  324. package/pennyfarthing_scripts/sprint/__pycache__/__init__.cpython-311.pyc +0 -0
  325. package/pennyfarthing_scripts/sprint/__pycache__/__init__.cpython-314.pyc +0 -0
  326. package/pennyfarthing_scripts/sprint/__pycache__/__main__.cpython-314.pyc +0 -0
  327. package/pennyfarthing_scripts/sprint/__pycache__/archive.cpython-311.pyc +0 -0
  328. package/pennyfarthing_scripts/sprint/__pycache__/archive.cpython-314.pyc +0 -0
  329. package/pennyfarthing_scripts/sprint/__pycache__/archive_epic.cpython-314.pyc +0 -0
  330. package/pennyfarthing_scripts/sprint/__pycache__/cli.cpython-311.pyc +0 -0
  331. package/pennyfarthing_scripts/sprint/__pycache__/cli.cpython-314.pyc +0 -0
  332. package/pennyfarthing_scripts/sprint/__pycache__/epic_add.cpython-311.pyc +0 -0
  333. package/pennyfarthing_scripts/sprint/__pycache__/epic_add.cpython-314.pyc +0 -0
  334. package/pennyfarthing_scripts/sprint/__pycache__/epic_update.cpython-311.pyc +0 -0
  335. package/pennyfarthing_scripts/sprint/__pycache__/epic_update.cpython-314.pyc +0 -0
  336. package/pennyfarthing_scripts/sprint/__pycache__/import_epic.cpython-314.pyc +0 -0
  337. package/pennyfarthing_scripts/sprint/__pycache__/loader.cpython-311.pyc +0 -0
  338. package/pennyfarthing_scripts/sprint/__pycache__/loader.cpython-314.pyc +0 -0
  339. package/pennyfarthing_scripts/sprint/__pycache__/status.cpython-311.pyc +0 -0
  340. package/pennyfarthing_scripts/sprint/__pycache__/status.cpython-314.pyc +0 -0
  341. package/pennyfarthing_scripts/sprint/__pycache__/story_add.cpython-311.pyc +0 -0
  342. package/pennyfarthing_scripts/sprint/__pycache__/story_add.cpython-314.pyc +0 -0
  343. package/pennyfarthing_scripts/sprint/__pycache__/story_finish.cpython-314.pyc +0 -0
  344. package/pennyfarthing_scripts/sprint/__pycache__/story_update.cpython-311.pyc +0 -0
  345. package/pennyfarthing_scripts/sprint/__pycache__/story_update.cpython-314.pyc +0 -0
  346. package/pennyfarthing_scripts/sprint/__pycache__/validate_cmd.cpython-311.pyc +0 -0
  347. package/pennyfarthing_scripts/sprint/__pycache__/validate_cmd.cpython-314.pyc +0 -0
  348. package/pennyfarthing_scripts/sprint/__pycache__/validator.cpython-311.pyc +0 -0
  349. package/pennyfarthing_scripts/sprint/__pycache__/validator.cpython-314.pyc +0 -0
  350. package/pennyfarthing_scripts/sprint/__pycache__/work.cpython-311.pyc +0 -0
  351. package/pennyfarthing_scripts/sprint/__pycache__/work.cpython-314.pyc +0 -0
  352. package/pennyfarthing_scripts/sprint/__pycache__/yaml_io.cpython-311.pyc +0 -0
  353. package/pennyfarthing_scripts/sprint/__pycache__/yaml_io.cpython-314.pyc +0 -0
  354. package/pennyfarthing_scripts/story/__pycache__/__init__.cpython-314.pyc +0 -0
  355. package/pennyfarthing_scripts/story/__pycache__/__main__.cpython-314.pyc +0 -0
  356. package/pennyfarthing_scripts/story/__pycache__/cli.cpython-314.pyc +0 -0
  357. package/pennyfarthing_scripts/story/__pycache__/create.cpython-314.pyc +0 -0
  358. package/pennyfarthing_scripts/story/__pycache__/size.cpython-314.pyc +0 -0
  359. package/pennyfarthing_scripts/story/__pycache__/template.cpython-314.pyc +0 -0
  360. package/pennyfarthing_scripts/tests/__pycache__/__init__.cpython-314.pyc +0 -0
  361. package/pennyfarthing_scripts/tests/__pycache__/conftest.cpython-314-pytest-9.0.2.pyc +0 -0
  362. package/pennyfarthing_scripts/tests/__pycache__/test_108_1_gate_migration.cpython-314-pytest-9.0.2.pyc +0 -0
  363. package/pennyfarthing_scripts/tests/__pycache__/test_archive_epic.cpython-314-pytest-9.0.2.pyc +0 -0
  364. package/pennyfarthing_scripts/tests/__pycache__/test_bc.cpython-314-pytest-9.0.2.pyc +0 -0
  365. package/pennyfarthing_scripts/tests/__pycache__/test_bikerack.cpython-314-pytest-9.0.2.pyc +0 -0
  366. package/pennyfarthing_scripts/tests/__pycache__/test_brownfield.cpython-314-pytest-9.0.2.pyc +0 -0
  367. package/pennyfarthing_scripts/tests/__pycache__/test_cli_modules.cpython-314-pytest-9.0.2.pyc +0 -0
  368. package/pennyfarthing_scripts/tests/__pycache__/test_cli_normalization.cpython-314-pytest-9.0.2.pyc +0 -0
  369. package/pennyfarthing_scripts/tests/__pycache__/test_codemarkers.cpython-314-pytest-9.0.2.pyc +0 -0
  370. package/pennyfarthing_scripts/tests/__pycache__/test_common.cpython-314-pytest-9.0.2.pyc +0 -0
  371. package/pennyfarthing_scripts/tests/__pycache__/test_confidence_sm_evaluation.cpython-314-pytest-9.0.2.pyc +0 -0
  372. package/pennyfarthing_scripts/tests/__pycache__/test_confidence_sm_gate.cpython-314-pytest-9.0.2.pyc +0 -0
  373. package/pennyfarthing_scripts/tests/__pycache__/test_dialogue_manager.cpython-314-pytest-9.0.2.pyc +0 -0
  374. package/pennyfarthing_scripts/tests/__pycache__/test_epic_shard_validation.cpython-314-pytest-9.0.2.pyc +0 -0
  375. package/pennyfarthing_scripts/tests/__pycache__/test_git_utils.cpython-314-pytest-9.0.2.pyc +0 -0
  376. package/pennyfarthing_scripts/tests/__pycache__/test_handoff_cli.cpython-314-pytest-9.0.2.pyc +0 -0
  377. package/pennyfarthing_scripts/tests/__pycache__/test_handoff_e2e.cpython-314-pytest-9.0.2.pyc +0 -0
  378. package/pennyfarthing_scripts/tests/__pycache__/test_healthscore.cpython-314-pytest-9.0.2.pyc +0 -0
  379. package/pennyfarthing_scripts/tests/__pycache__/test_jira_package.cpython-314-pytest-9.0.2.pyc +0 -0
  380. package/pennyfarthing_scripts/tests/__pycache__/test_package_structure.cpython-314-pytest-9.0.2.pyc +0 -0
  381. package/pennyfarthing_scripts/tests/__pycache__/test_patch_mode.cpython-314-pytest-9.0.2.pyc +0 -0
  382. package/pennyfarthing_scripts/tests/__pycache__/test_prime.cpython-314-pytest-9.0.2.pyc +0 -0
  383. package/pennyfarthing_scripts/tests/__pycache__/test_sprint_package.cpython-314-pytest-9.0.2.pyc +0 -0
  384. package/pennyfarthing_scripts/tests/__pycache__/test_sprint_panel.cpython-314-pytest-9.0.2.pyc +0 -0
  385. package/pennyfarthing_scripts/tests/__pycache__/test_sprint_validator.cpython-314-pytest-9.0.2.pyc +0 -0
  386. package/pennyfarthing_scripts/tests/__pycache__/test_story_add.cpython-314-pytest-9.0.2.pyc +0 -0
  387. package/pennyfarthing_scripts/tests/__pycache__/test_story_package.cpython-314-pytest-9.0.2.pyc +0 -0
  388. package/pennyfarthing_scripts/tests/__pycache__/test_story_update.cpython-314-pytest-9.0.2.pyc +0 -0
  389. package/pennyfarthing_scripts/tests/__pycache__/test_tiers.cpython-314-pytest-9.0.2.pyc +0 -0
  390. package/pennyfarthing_scripts/tests/__pycache__/test_token_counting.cpython-314-pytest-9.0.2.pyc +0 -0
  391. package/pennyfarthing_scripts/tests/__pycache__/test_topology_loader.cpython-314-pytest-9.0.2.pyc +0 -0
  392. package/pennyfarthing_scripts/tests/__pycache__/test_tui_focus.cpython-314-pytest-9.0.2.pyc +0 -0
  393. package/pennyfarthing_scripts/tests/__pycache__/test_tui_panel_persistence.cpython-314-pytest-9.0.2.pyc +0 -0
  394. package/pennyfarthing_scripts/tests/__pycache__/test_validate_cmd.cpython-314-pytest-9.0.2.pyc +0 -0
  395. package/pennyfarthing_scripts/tests/__pycache__/test_version_sentinel.cpython-314-pytest-9.0.2.pyc +0 -0
  396. package/pennyfarthing_scripts/tests/__pycache__/test_workflow_check.cpython-314-pytest-9.0.2.pyc +0 -0
  397. package/pennyfarthing_scripts/tests/__pycache__/test_workflow_cli.cpython-314-pytest-9.0.2.pyc +0 -0
  398. package/pennyfarthing_scripts/tests/__pycache__/test_yaml_io.cpython-314-pytest-9.0.2.pyc +0 -0
  399. package/pennyfarthing_scripts/tests/test_confidence_sm_gate.py +17 -16
  400. package/pennyfarthing_scripts/tests/test_resolve_gate_file_field.py +45 -47
  401. package/pennyfarthing_scripts/tests/test_workflow_list_team.py +0 -4
  402. package/pennyfarthing_scripts/theme/__pycache__/__init__.cpython-311.pyc +0 -0
  403. package/pennyfarthing_scripts/theme/__pycache__/__init__.cpython-314.pyc +0 -0
  404. package/pennyfarthing_scripts/theme/__pycache__/cli.cpython-311.pyc +0 -0
  405. package/pennyfarthing_scripts/theme/__pycache__/cli.cpython-314.pyc +0 -0
  406. package/pennyfarthing_scripts/validate/__pycache__/__init__.cpython-311.pyc +0 -0
  407. package/pennyfarthing_scripts/validate/__pycache__/__init__.cpython-314.pyc +0 -0
  408. package/pennyfarthing_scripts/validate/__pycache__/cli.cpython-311.pyc +0 -0
  409. package/pennyfarthing_scripts/validate/__pycache__/cli.cpython-314.pyc +0 -0
  410. package/pennyfarthing_scripts/validate/adapters/__pycache__/__init__.cpython-314.pyc +0 -0
  411. package/pennyfarthing_scripts/validate/adapters/__pycache__/agent.cpython-314.pyc +0 -0
  412. package/pennyfarthing_scripts/validate/adapters/__pycache__/schema.cpython-314.pyc +0 -0
  413. package/pennyfarthing_scripts/validate/adapters/__pycache__/skill_command.cpython-314.pyc +0 -0
  414. package/pennyfarthing_scripts/validate/adapters/__pycache__/sprint.cpython-314.pyc +0 -0
  415. package/pennyfarthing_scripts/validate/adapters/__pycache__/tandem_awareness.cpython-314.pyc +0 -0
  416. package/pennyfarthing_scripts/validate/adapters/__pycache__/workflow.cpython-314.pyc +0 -0
  417. package/pennyfarthing_scripts/workflow/__pycache__/__init__.cpython-311.pyc +0 -0
  418. package/pennyfarthing_scripts/workflow/__pycache__/__init__.cpython-314.pyc +0 -0
  419. package/pennyfarthing_scripts/workflow/__pycache__/cli.cpython-311.pyc +0 -0
  420. package/pennyfarthing_scripts/workflow/__pycache__/cli.cpython-314.pyc +0 -0
  421. package/pennyfarthing_scripts/workflow/__pycache__/helpers.cpython-314.pyc +0 -0
  422. package/pennyfarthing_scripts/workflow/__pycache__/scale.cpython-311.pyc +0 -0
  423. package/pennyfarthing_scripts/workflow/__pycache__/scale.cpython-314.pyc +0 -0
  424. package/pennyfarthing_scripts/workflow/__pycache__/state.cpython-311.pyc +0 -0
  425. package/pennyfarthing_scripts/workflow/__pycache__/state.cpython-314.pyc +0 -0
  426. package/packages/core/dist/workflow/team-lifecycle.d.ts +0 -169
  427. package/packages/core/dist/workflow/team-lifecycle.d.ts.map +0 -1
  428. package/packages/core/dist/workflow/team-lifecycle.js +0 -217
  429. package/packages/core/dist/workflow/team-lifecycle.js.map +0 -1
  430. package/packages/core/dist/workflow/team-lifecycle.test.d.ts +0 -20
  431. package/packages/core/dist/workflow/team-lifecycle.test.d.ts.map +0 -1
  432. package/packages/core/dist/workflow/team-lifecycle.test.js +0 -966
  433. package/packages/core/dist/workflow/team-lifecycle.test.js.map +0 -1
  434. package/pennyfarthing_scripts/bikerack/__pycache__/portrait.cpython-314.pyc +0 -0
  435. package/pennyfarthing_scripts/gate/__pycache__/__init__.cpython-314.pyc +0 -0
  436. package/pennyfarthing_scripts/gate/__pycache__/cli.cpython-314.pyc +0 -0
  437. package/pennyfarthing_scripts/gate/__pycache__/validate.cpython-314.pyc +0 -0
  438. package/pennyfarthing_scripts/git/__pycache__/hooks_installer.cpython-314.pyc +0 -0
  439. package/pennyfarthing_scripts/git/__pycache__/repos.cpython-314.pyc +0 -0
  440. package/pennyfarthing_scripts/git/__pycache__/worktree.cpython-314.pyc +0 -0
  441. package/pennyfarthing_scripts/prime/__pycache__/heatmap.cpython-314.pyc +0 -0
  442. package/pennyfarthing_scripts/tests/__pycache__/test_108_2_remove_handoff_fallback.cpython-314-pytest-9.0.2.pyc +0 -0
  443. package/pennyfarthing_scripts/tests/__pycache__/test_gate_file_resolution.cpython-314-pytest-9.0.2.pyc +0 -0
  444. package/pennyfarthing_scripts/tests/__pycache__/test_gate_runner.cpython-314-pytest-9.0.2.pyc +0 -0
  445. package/pennyfarthing_scripts/tests/__pycache__/test_resolve_gate_file_field.cpython-314-pytest-9.0.2.pyc +0 -0
  446. package/pennyfarthing_scripts/tests/__pycache__/test_workflow_list_team.cpython-314-pytest-9.0.2.pyc +0 -0
  447. package/pennyfarthing_scripts/validate/adapters/__pycache__/team_mode.cpython-314.pyc +0 -0
  448. package/pennyfarthing_scripts/workflow/__pycache__/team_lifecycle.cpython-314.pyc +0 -0
@@ -6,7 +6,7 @@ Story: 106-3 — Workflow YAML gate.file integration
6
6
  Tests the gate.file field support in resolve_gate():
7
7
  - Schema extension: gate.file extracted from workflow YAML
8
8
  - Backward compatibility: gate.type-only workflows unchanged
9
- - TDD workflow migration: green phase has file: gates/tests-pass
9
+ - TDD workflow migration: all phases now have gate.file fields
10
10
 
11
11
  Acceptance Criteria:
12
12
  - [AC1] resolve-gate.py reads gate.file field from workflow YAML phases
@@ -15,9 +15,9 @@ Acceptance Criteria:
15
15
  - [AC2] Workflows with only gate.type continue to work unchanged
16
16
  - [AC2] Existing gate type logic remains functional
17
17
  - [AC2] No breaking changes to resolve-gate API
18
- - [AC3] Green phase in tdd.yaml has file: gates/tests-pass and type: tests_pass
19
- - [AC3] Other phases remain unchanged (backward compat period)
20
- - [AC3] File path is relative: gates/tests-pass (not absolute)
18
+ - [AC3] Green phase in tdd.yaml has file: gates/dev-exit and type: dev_exit
19
+ - [AC3] All phases have gate.file fields (full migration complete)
20
+ - [AC3] File paths are relative (not absolute)
21
21
  """
22
22
 
23
23
  from __future__ import annotations
@@ -202,21 +202,19 @@ class TestResolveGateFileOnly:
202
202
  )
203
203
  assert result["gate_type"] is None
204
204
 
205
- def test_status_skip_when_no_type_and_file_only(
205
+ def test_status_ready_when_no_type_and_file_only(
206
206
  self, project: Path
207
207
  ) -> None:
208
- """AC1: gate with file-only and no type → status depends on gate_type logic.
208
+ """AC1: gate with file-only and no type → status is 'ready'.
209
209
 
210
- Current resolve_gate checks gate_type for skip logic:
211
- - gate_type == 'manual' → skip
212
- - gate_type is None → skip
213
- So file-only gates (no type) currently get 'skip' status.
214
- This is expected during migration — consumers check gate_file separately.
210
+ File-only gates (no type) are resolvable — the gate runner uses
211
+ gate_file to locate and execute the gate. Status is 'ready' when
212
+ an assessment exists.
215
213
  """
216
214
  result = resolve_gate(
217
215
  "106-3", "file-only", "green", project_root=project
218
216
  )
219
- assert result["status"] == "skip"
217
+ assert result["status"] == "ready"
220
218
 
221
219
 
222
220
  # ===========================================================================
@@ -315,11 +313,10 @@ class TestResolveGateBackwardCompat:
315
313
 
316
314
 
317
315
  class TestTddWorkflowMigration:
318
- """AC3: TDD workflow green phase has file: gates/tests-pass.
316
+ """AC3: TDD workflow phases have gate.file fields after full migration.
319
317
 
320
318
  These tests read the ACTUAL tdd.yaml from the project to verify
321
- the migration has been applied. They will FAIL until the Dev
322
- updates tdd.yaml.
319
+ the migration has been applied.
323
320
  """
324
321
 
325
322
  @pytest.fixture
@@ -342,54 +339,55 @@ class TestTddWorkflowMigration:
342
339
  raise ValueError(f"Phase '{name}' not found")
343
340
 
344
341
  def test_green_phase_has_gate_file(self, tdd_yaml: dict) -> None:
345
- """AC3: Green phase should have gate.file = 'gates/tests-pass'."""
342
+ """AC3: Green phase should have gate.file = 'gates/dev-exit'."""
346
343
  green = self._get_phase(tdd_yaml, "green")
347
344
  gate = green.get("gate", {})
348
- assert gate.get("file") == "gates/tests-pass", (
349
- f"Expected gate.file='gates/tests-pass', got gate={gate}"
345
+ assert gate.get("file") == "gates/dev-exit", (
346
+ f"Expected gate.file='gates/dev-exit', got gate={gate}"
350
347
  )
351
348
 
352
- def test_green_phase_keeps_legacy_type(self, tdd_yaml: dict) -> None:
353
- """AC3: Green phase should keep gate.type = 'tests_pass' for backward compat."""
349
+ def test_green_phase_has_dev_exit_type(self, tdd_yaml: dict) -> None:
350
+ """AC3: Green phase should have gate.type = 'dev_exit'."""
354
351
  green = self._get_phase(tdd_yaml, "green")
355
352
  gate = green.get("gate", {})
356
- assert gate.get("type") == "tests_pass", (
357
- f"Expected gate.type='tests_pass', got gate={gate}"
353
+ assert gate.get("type") == "dev_exit", (
354
+ f"Expected gate.type='dev_exit', got gate={gate}"
358
355
  )
359
356
 
360
357
  def test_green_phase_file_is_relative(self, tdd_yaml: dict) -> None:
361
- """AC3: File path should be relative (gates/tests-pass), not absolute."""
358
+ """AC3: File path should be relative (gates/dev-exit), not absolute."""
362
359
  green = self._get_phase(tdd_yaml, "green")
363
360
  gate = green.get("gate", {})
364
361
  file_path = gate.get("file", "")
365
362
  assert not file_path.startswith("/"), (
366
363
  f"gate.file should be relative, got: {file_path}"
367
364
  )
368
- assert file_path == "gates/tests-pass", (
369
- f"Expected 'gates/tests-pass', got: {file_path}"
365
+ assert file_path == "gates/dev-exit", (
366
+ f"Expected 'gates/dev-exit', got: {file_path}"
370
367
  )
371
368
 
372
- def test_red_phase_unchanged(self, tdd_yaml: dict) -> None:
373
- """AC3: Red phase should NOT have gate.file (backward compat period)."""
369
+ def test_red_phase_has_gate_file(self, tdd_yaml: dict) -> None:
370
+ """AC3: Red phase should have gate.file = 'gates/tests-fail'."""
374
371
  red = self._get_phase(tdd_yaml, "red")
375
372
  gate = red.get("gate", {})
376
- assert "file" not in gate, (
377
- f"Red phase should not have gate.file yet, got gate={gate}"
373
+ assert gate.get("file") == "gates/tests-fail", (
374
+ f"Expected gate.file='gates/tests-fail', got gate={gate}"
378
375
  )
379
376
 
380
- def test_review_phase_unchanged(self, tdd_yaml: dict) -> None:
381
- """AC3: Review phase should NOT have gate.file (backward compat period)."""
377
+ def test_review_phase_has_gate_file(self, tdd_yaml: dict) -> None:
378
+ """AC3: Review phase should have gate.file = 'gates/approval'."""
382
379
  review = self._get_phase(tdd_yaml, "review")
383
380
  gate = review.get("gate", {})
384
- assert "file" not in gate, (
385
- f"Review phase should not have gate.file yet, got gate={gate}"
381
+ assert gate.get("file") == "gates/approval", (
382
+ f"Expected gate.file='gates/approval', got gate={gate}"
386
383
  )
387
384
 
388
- def test_setup_phase_unchanged(self, tdd_yaml: dict) -> None:
389
- """AC3: Setup phase should remain gateless."""
385
+ def test_setup_phase_has_gate(self, tdd_yaml: dict) -> None:
386
+ """AC3: Setup phase should have gate.file = 'gates/sm-setup-exit'."""
390
387
  setup = self._get_phase(tdd_yaml, "setup")
391
- assert "gate" not in setup, (
392
- f"Setup phase should not have a gate, got: {setup}"
388
+ gate = setup.get("gate", {})
389
+ assert gate.get("file") == "gates/sm-setup-exit", (
390
+ f"Expected gate.file='gates/sm-setup-exit', got gate={gate}"
393
391
  )
394
392
 
395
393
  def test_finish_phase_unchanged(self, tdd_yaml: dict) -> None:
@@ -435,30 +433,30 @@ class TestResolveGateWithRealTddYaml:
435
433
  def test_green_phase_returns_gate_file(
436
434
  self, real_project: Path
437
435
  ) -> None:
438
- """AC3: resolve_gate for tdd/green should return gate_file='gates/tests-pass'."""
436
+ """AC3: resolve_gate for tdd/green should return gate_file='gates/dev-exit'."""
439
437
  result = resolve_gate(
440
438
  "106-3", "tdd", "green", project_root=real_project
441
439
  )
442
- assert result["gate_file"] == "gates/tests-pass", (
443
- f"Expected gate_file='gates/tests-pass', got: {result}"
440
+ assert result["gate_file"] == "gates/dev-exit", (
441
+ f"Expected gate_file='gates/dev-exit', got: {result}"
444
442
  )
445
443
 
446
- def test_green_phase_still_returns_gate_type(
444
+ def test_green_phase_returns_dev_exit_type(
447
445
  self, real_project: Path
448
446
  ) -> None:
449
- """AC3: resolve_gate for tdd/green should still return gate_type='tests_pass'."""
447
+ """AC3: resolve_gate for tdd/green should return gate_type='dev_exit'."""
450
448
  result = resolve_gate(
451
449
  "106-3", "tdd", "green", project_root=real_project
452
450
  )
453
- assert result["gate_type"] == "tests_pass", (
454
- f"Expected gate_type='tests_pass', got: {result}"
451
+ assert result["gate_type"] == "dev_exit", (
452
+ f"Expected gate_type='dev_exit', got: {result}"
455
453
  )
456
454
 
457
- def test_red_phase_gate_file_is_none(
455
+ def test_red_phase_gate_file_is_tests_fail(
458
456
  self, real_project: Path
459
457
  ) -> None:
460
- """AC3: resolve_gate for tdd/red should have gate_file=None (not migrated yet)."""
458
+ """AC3: resolve_gate for tdd/red should have gate_file='gates/tests-fail'."""
461
459
  result = resolve_gate(
462
460
  "106-3", "tdd", "red", project_root=real_project
463
461
  )
464
- assert result["gate_file"] is None
462
+ assert result["gate_file"] == "gates/tests-fail"
@@ -17,11 +17,7 @@ workflow list team indicator are implemented.
17
17
 
18
18
  from __future__ import annotations
19
19
 
20
- from pathlib import Path
21
- from unittest.mock import patch
22
-
23
20
  import pytest
24
- import yaml
25
21
  from click.testing import CliRunner
26
22
 
27
23
  from pennyfarthing_scripts.cli import cli
@@ -1,169 +0,0 @@
1
- /**
2
- * Phase-scoped Team Lifecycle for Story 86-10
3
- *
4
- * Manages the lifecycle of native Agent Teams within workflow phases.
5
- * When a workflow phase has a `team:` config block, the lead agent creates
6
- * a team at phase start, spawns teammates, and cleans up before handoff.
7
- *
8
- * Follows the same ProcessAdapter injection pattern as tandem-lifecycle.ts.
9
- */
10
- import type { WorkflowPhase, TeamConfig } from './workflow-schema.js';
11
- /** Handle to an active team for a workflow phase */
12
- export interface TeamHandle {
13
- /** Team name (format: {storyId}-{phase}) */
14
- teamName: string;
15
- /** Story ID this team belongs to */
16
- storyId: string;
17
- /** Workflow phase name */
18
- phase: string;
19
- /** Active teammate handles */
20
- teammates: TeammateHandle[];
21
- /** ISO timestamp when team was created */
22
- createdAt: string;
23
- }
24
- /** Handle to an individual teammate within a team */
25
- export interface TeammateHandle {
26
- /** Agent name (e.g., 'architect', 'tea') */
27
- agent: string;
28
- /** Task description from workflow YAML */
29
- task?: string;
30
- /** Current teammate status */
31
- status: 'spawned' | 'active' | 'idle' | 'crashed' | 'shutdown';
32
- }
33
- /** Parameters for creating a phase-scoped team */
34
- export interface CreateTeamParams {
35
- /** Phase config (must have team block to create) */
36
- phase: WorkflowPhase;
37
- /** Current story ID */
38
- storyId: string;
39
- /** Path to .session directory */
40
- sessionDir: string;
41
- /** Process adapter for real team operations. Omit for in-memory (tests). */
42
- adapter?: TeamProcessAdapter;
43
- }
44
- /** Result of a gate check (TaskCompleted or TeammateIdle hook) */
45
- export interface GateCheckResult {
46
- /** Whether the gate passed */
47
- passed: boolean;
48
- /** Gate type that was checked */
49
- gate: string;
50
- /** Reason for pass/fail */
51
- reason?: string;
52
- }
53
- /** Team activity summary for session file audit trail */
54
- export interface TeamActivitySummary {
55
- /** Team name */
56
- teamName: string;
57
- /** Story ID */
58
- storyId: string;
59
- /** Phase name */
60
- phase: string;
61
- /** Member details */
62
- members: Array<{
63
- agent: string;
64
- status: string;
65
- task?: string;
66
- }>;
67
- /** Whether all teammates were cleaned up properly */
68
- cleanShutdown: boolean;
69
- }
70
- /** Sidecar lock handle */
71
- export interface SidecarLock {
72
- /** Path to the lock file */
73
- lockPath: string;
74
- /** Story ID that owns the lock */
75
- storyId: string;
76
- /** Timestamp when lock was acquired */
77
- acquiredAt: string;
78
- }
79
- /** Standard result object per framework pattern */
80
- export interface TeamResult<T = unknown> {
81
- success: boolean;
82
- data?: T;
83
- error?: string;
84
- }
85
- /**
86
- * Adapter for real team operations.
87
- *
88
- * The library module cannot call Claude Code's TeamCreate/SendMessage tools
89
- * directly — callers inject the real implementation.
90
- * Tests use the default no-op adapter.
91
- */
92
- export interface TeamProcessAdapter {
93
- /** Create a team. Returns team name. */
94
- createTeam(params: {
95
- teamName: string;
96
- description?: string;
97
- }): Promise<{
98
- teamName: string;
99
- }>;
100
- /** Delete a team. */
101
- deleteTeam(teamName: string): Promise<void>;
102
- /** Spawn a teammate within a team. */
103
- spawnTeammate(params: {
104
- teamName: string;
105
- agent: string;
106
- prompt: string;
107
- model?: string;
108
- }): Promise<{
109
- agentId: string;
110
- }>;
111
- /** Send shutdown request to a teammate. */
112
- shutdownTeammate(params: {
113
- teamName: string;
114
- agent: string;
115
- }): Promise<void>;
116
- }
117
- /**
118
- * Reset all in-memory state. For testing only.
119
- */
120
- export declare function _resetForTesting(): void;
121
- /**
122
- * Create a phase-scoped team.
123
- *
124
- * If phase has no team config, returns success with no handle (no-op).
125
- * If phase has team config, creates team and returns handle.
126
- */
127
- export declare function createTeam(params: CreateTeamParams): Promise<TeamResult<TeamHandle>>;
128
- /**
129
- * Spawn all teammates for a team based on workflow YAML config.
130
- */
131
- export declare function spawnTeammates(handle: TeamHandle, config: TeamConfig, storyId: string, phase: string, adapter?: TeamProcessAdapter): Promise<TeamResult<TeammateHandle[]>>;
132
- /**
133
- * Shut down all active teammates in a team.
134
- */
135
- export declare function shutdownAllTeammates(handle: TeamHandle, adapter?: TeamProcessAdapter): Promise<TeamResult<{
136
- shutdownCount: number;
137
- }>>;
138
- /**
139
- * Clean up a team entirely (TeamDelete).
140
- * Must run before pf handoff.
141
- */
142
- export declare function cleanupTeam(handle: TeamHandle, adapter?: TeamProcessAdapter): Promise<TeamResult<{
143
- cleaned: boolean;
144
- }>>;
145
- /**
146
- * Check gate condition when a TaskCompleted event fires.
147
- */
148
- export declare function checkGateOnTaskCompleted(handle: TeamHandle, phase: WorkflowPhase): GateCheckResult;
149
- /**
150
- * Check gate condition when a TeammateIdle event fires.
151
- */
152
- export declare function checkGateOnTeammateIdle(_handle: TeamHandle, teammate: TeammateHandle, phase: WorkflowPhase): GateCheckResult;
153
- /**
154
- * Generate a team activity summary for the session file audit trail.
155
- */
156
- export declare function generateTeamSummary(handle: TeamHandle): TeamActivitySummary;
157
- /**
158
- * Acquire an exclusive lock for sidecar file writing.
159
- */
160
- export declare function acquireSidecarLock(filePath: string, storyId: string, _timeout?: number): Promise<TeamResult<SidecarLock>>;
161
- /**
162
- * Release a sidecar file lock.
163
- */
164
- export declare function releaseSidecarLock(lock: SidecarLock): TeamResult<void>;
165
- /**
166
- * Get the active team for a story, if any.
167
- */
168
- export declare function getActiveTeam(storyId: string): TeamHandle | null;
169
- //# sourceMappingURL=team-lifecycle.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"team-lifecycle.d.ts","sourceRoot":"","sources":["../../src/workflow/team-lifecycle.ts"],"names":[],"mappings":"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"}
@@ -1,217 +0,0 @@
1
- /**
2
- * Phase-scoped Team Lifecycle for Story 86-10
3
- *
4
- * Manages the lifecycle of native Agent Teams within workflow phases.
5
- * When a workflow phase has a `team:` config block, the lead agent creates
6
- * a team at phase start, spawns teammates, and cleans up before handoff.
7
- *
8
- * Follows the same ProcessAdapter injection pattern as tandem-lifecycle.ts.
9
- */
10
- // =============================================================================
11
- // In-memory registries
12
- // =============================================================================
13
- /** Active teams keyed by storyId */
14
- const activeTeams = new Map();
15
- /** Sidecar locks keyed by file path */
16
- const sidecarLocks = new Map();
17
- /**
18
- * Reset all in-memory state. For testing only.
19
- */
20
- export function _resetForTesting() {
21
- activeTeams.clear();
22
- sidecarLocks.clear();
23
- }
24
- // =============================================================================
25
- // Implementations
26
- // =============================================================================
27
- /**
28
- * Create a phase-scoped team.
29
- *
30
- * If phase has no team config, returns success with no handle (no-op).
31
- * If phase has team config, creates team and returns handle.
32
- */
33
- export async function createTeam(params) {
34
- const { phase, storyId, adapter } = params;
35
- if (!phase.team) {
36
- return { success: true };
37
- }
38
- const teamName = `${storyId}-${phase.name}`;
39
- // Clean up existing team for same story
40
- const existing = activeTeams.get(storyId);
41
- if (existing && adapter) {
42
- try {
43
- await adapter.deleteTeam(existing.teamName);
44
- }
45
- catch { /* swallow */ }
46
- activeTeams.delete(storyId);
47
- }
48
- const handle = {
49
- teamName,
50
- storyId,
51
- phase: phase.name,
52
- teammates: [],
53
- createdAt: new Date().toISOString(),
54
- };
55
- if (adapter) {
56
- try {
57
- await adapter.createTeam({ teamName });
58
- }
59
- catch (err) {
60
- return { success: false, error: err.message };
61
- }
62
- }
63
- activeTeams.set(storyId, handle);
64
- return { success: true, data: handle };
65
- }
66
- /**
67
- * Spawn all teammates for a team based on workflow YAML config.
68
- */
69
- export async function spawnTeammates(handle, config, storyId, phase, adapter) {
70
- const teammates = [];
71
- for (const member of config.teammates) {
72
- const teammate = {
73
- agent: member.agent,
74
- task: member.task,
75
- status: 'spawned',
76
- };
77
- if (adapter) {
78
- try {
79
- await adapter.spawnTeammate({
80
- teamName: handle.teamName,
81
- agent: member.agent,
82
- prompt: `pf agent start "${member.agent}"`,
83
- model: config.model,
84
- });
85
- }
86
- catch {
87
- teammate.status = 'crashed';
88
- }
89
- }
90
- teammates.push(teammate);
91
- }
92
- handle.teammates = teammates;
93
- // Update registry
94
- if (activeTeams.has(handle.storyId)) {
95
- activeTeams.set(handle.storyId, handle);
96
- }
97
- return { success: true, data: teammates };
98
- }
99
- /**
100
- * Shut down all active teammates in a team.
101
- */
102
- export async function shutdownAllTeammates(handle, adapter) {
103
- let shutdownCount = 0;
104
- for (const teammate of handle.teammates) {
105
- if (teammate.status === 'shutdown' || teammate.status === 'crashed') {
106
- continue;
107
- }
108
- if (adapter) {
109
- try {
110
- await adapter.shutdownTeammate({
111
- teamName: handle.teamName,
112
- agent: teammate.agent,
113
- });
114
- }
115
- catch { /* swallow — graceful degradation */ }
116
- }
117
- teammate.status = 'shutdown';
118
- shutdownCount++;
119
- }
120
- return { success: true, data: { shutdownCount } };
121
- }
122
- /**
123
- * Clean up a team entirely (TeamDelete).
124
- * Must run before pf handoff.
125
- */
126
- export async function cleanupTeam(handle, adapter) {
127
- if (adapter) {
128
- try {
129
- await adapter.deleteTeam(handle.teamName);
130
- }
131
- catch { /* swallow */ }
132
- }
133
- activeTeams.delete(handle.storyId);
134
- return { success: true, data: { cleaned: true } };
135
- }
136
- /**
137
- * Check gate condition when a TaskCompleted event fires.
138
- */
139
- export function checkGateOnTaskCompleted(handle, phase) {
140
- if (!phase.gate) {
141
- return { passed: true, gate: 'none' };
142
- }
143
- const gateType = phase.gate.type ?? 'unknown';
144
- const hasActive = handle.teammates.some((t) => t.status === 'active');
145
- if (hasActive) {
146
- return { passed: false, gate: gateType, reason: 'Teammates still active' };
147
- }
148
- return { passed: true, gate: gateType };
149
- }
150
- /**
151
- * Check gate condition when a TeammateIdle event fires.
152
- */
153
- export function checkGateOnTeammateIdle(_handle, teammate, phase) {
154
- if (!phase.gate) {
155
- return { passed: true, gate: 'none' };
156
- }
157
- const gateType = phase.gate.type ?? 'unknown';
158
- if (teammate.status === 'crashed') {
159
- return { passed: false, gate: gateType, reason: 'Teammate crashed' };
160
- }
161
- return { passed: true, gate: gateType };
162
- }
163
- /**
164
- * Generate a team activity summary for the session file audit trail.
165
- */
166
- export function generateTeamSummary(handle) {
167
- return {
168
- teamName: handle.teamName,
169
- storyId: handle.storyId,
170
- phase: handle.phase,
171
- members: handle.teammates.map((t) => ({
172
- agent: t.agent,
173
- status: t.status,
174
- task: t.task,
175
- })),
176
- cleanShutdown: handle.teammates.every((t) => t.status === 'shutdown'),
177
- };
178
- }
179
- /**
180
- * Acquire an exclusive lock for sidecar file writing.
181
- */
182
- export async function acquireSidecarLock(filePath, storyId, _timeout) {
183
- const existing = sidecarLocks.get(filePath);
184
- if (existing) {
185
- if (existing.storyId === storyId) {
186
- return { success: true, data: existing };
187
- }
188
- return { success: false, error: `Lock held by story ${existing.storyId}` };
189
- }
190
- const lock = {
191
- lockPath: `${filePath}.lock`,
192
- storyId,
193
- acquiredAt: new Date().toISOString(),
194
- };
195
- sidecarLocks.set(filePath, lock);
196
- return { success: true, data: lock };
197
- }
198
- /**
199
- * Release a sidecar file lock.
200
- */
201
- export function releaseSidecarLock(lock) {
202
- // Find and remove by lockPath
203
- for (const [path, held] of sidecarLocks) {
204
- if (held.lockPath === lock.lockPath) {
205
- sidecarLocks.delete(path);
206
- break;
207
- }
208
- }
209
- return { success: true };
210
- }
211
- /**
212
- * Get the active team for a story, if any.
213
- */
214
- export function getActiveTeam(storyId) {
215
- return activeTeams.get(storyId) ?? null;
216
- }
217
- //# sourceMappingURL=team-lifecycle.js.map