@mmerterden/multi-agent-pipeline 11.2.0 → 11.3.0

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 (331) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +2 -2
  3. package/docs/FIGMA_PIPELINE.md +12 -25
  4. package/docs/architecture.md +3 -5
  5. package/docs/features.md +8 -8
  6. package/install/_dev-only-files.mjs +0 -6
  7. package/install/claude.mjs +33 -15
  8. package/install/copilot.mjs +16 -14
  9. package/install/templates/copilot-instructions.md +3 -3
  10. package/package.json +1 -1
  11. package/pipeline/commands/{multi-agent.md → multi-agent/SKILL.md} +39 -39
  12. package/pipeline/commands/multi-agent/{analysis.md → analysis/SKILL.md} +18 -18
  13. package/pipeline/commands/multi-agent/{analysis-resolve.md → analysis-resolve/SKILL.md} +4 -4
  14. package/pipeline/commands/multi-agent/{autopilot.md → autopilot/SKILL.md} +4 -4
  15. package/pipeline/commands/multi-agent/{build-optimize.md → build-optimize/SKILL.md} +1 -1
  16. package/pipeline/commands/multi-agent/{channels.md → channels/SKILL.md} +12 -12
  17. package/pipeline/commands/multi-agent/{dev.md → dev/SKILL.md} +4 -4
  18. package/pipeline/commands/multi-agent/{dev-autopilot.md → dev-autopilot/SKILL.md} +4 -4
  19. package/pipeline/commands/multi-agent/{dev-local.md → dev-local/SKILL.md} +5 -5
  20. package/pipeline/commands/multi-agent/{dev-local-autopilot.md → dev-local-autopilot/SKILL.md} +4 -4
  21. package/pipeline/commands/multi-agent/{finish.md → finish/SKILL.md} +6 -6
  22. package/pipeline/commands/multi-agent/{generate.md → generate/SKILL.md} +3 -3
  23. package/pipeline/commands/multi-agent/{help.md → help/SKILL.md} +4 -4
  24. package/pipeline/commands/multi-agent/{local.md → local/SKILL.md} +5 -5
  25. package/pipeline/commands/multi-agent/{local-autopilot.md → local-autopilot/SKILL.md} +5 -5
  26. package/pipeline/commands/multi-agent/{manual-test.md → manual-test/SKILL.md} +1 -1
  27. package/pipeline/commands/multi-agent/refactor/SKILL.md +257 -0
  28. package/pipeline/commands/multi-agent/{resume.md → resume/SKILL.md} +1 -1
  29. package/pipeline/commands/multi-agent/{review.md → review/SKILL.md} +5 -5
  30. package/pipeline/commands/multi-agent/{setup.md → setup/SKILL.md} +1 -1
  31. package/pipeline/commands/multi-agent/{sync.md → sync/SKILL.md} +20 -58
  32. package/pipeline/{commands/multi-agent → multi-agent-refs}/_account-picker.md +2 -2
  33. package/pipeline/{commands/multi-agent → multi-agent-refs}/_dev-context.md +2 -2
  34. package/pipeline/{commands/multi-agent → multi-agent-refs}/_repo-picker.md +2 -2
  35. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/android-guide.md +1 -1
  36. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/channels/jira.md +1 -1
  37. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/channels/wiki.md +7 -7
  38. package/pipeline/multi-agent-refs/component-dispatch.md +92 -0
  39. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/cross-cli-contract.md +10 -77
  40. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/verify-by-test.md +1 -1
  41. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/generate-issue.md +2 -2
  42. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/issue-jira-triad.md +1 -1
  43. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/keychain.md +1 -1
  44. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/log-format.md +1 -1
  45. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/modes.md +2 -2
  46. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/operations.md +1 -1
  47. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-0-init.md +10 -10
  48. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-1-analysis.md +6 -6
  49. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-2-planning.md +3 -3
  50. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-3-dev.md +10 -10
  51. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-4-review.md +8 -8
  52. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-5-test.md +3 -3
  53. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-6-commit.md +4 -4
  54. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-7-report.md +6 -6
  55. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases.md +12 -12
  56. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/progress-contract.md +4 -4
  57. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/swiftui-guide.md +1 -1
  58. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/tracker-contract.md +3 -3
  59. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/wiki-capture.md +4 -4
  60. package/pipeline/preferences-template.json +17 -1
  61. package/pipeline/rules/figma-pipeline.md +2 -2
  62. package/pipeline/schemas/prefs.schema.json +0 -34
  63. package/pipeline/scripts/README.md +1 -3
  64. package/pipeline/scripts/fixtures/install-layout.tsv +6 -5
  65. package/pipeline/scripts/gen-mode-dispatch.mjs +3 -3
  66. package/pipeline/scripts/phase-banner.sh +2 -2
  67. package/pipeline/scripts/review-scope.mjs +94 -0
  68. package/pipeline/scripts/scan-agent-config.sh +2 -2
  69. package/pipeline/scripts/smoke-agent-log-cost.sh +1 -1
  70. package/pipeline/scripts/smoke-agent-model-routing.sh +4 -4
  71. package/pipeline/scripts/smoke-autopilot-circuit-breaker.sh +2 -2
  72. package/pipeline/scripts/smoke-channels-approval-gate.sh +2 -2
  73. package/pipeline/scripts/smoke-channels-flow.sh +5 -5
  74. package/pipeline/scripts/smoke-clarify.sh +1 -1
  75. package/pipeline/scripts/smoke-commands-skills-parity.sh +3 -3
  76. package/pipeline/scripts/smoke-community-gates.sh +1 -1
  77. package/pipeline/scripts/smoke-compliance-skills.sh +2 -2
  78. package/pipeline/scripts/smoke-cost-summary.sh +1 -1
  79. package/pipeline/scripts/smoke-cross-cli-behavior.sh +17 -43
  80. package/pipeline/scripts/smoke-cross-phase-cohesion.sh +1 -1
  81. package/pipeline/scripts/smoke-dev-critic.sh +1 -1
  82. package/pipeline/scripts/smoke-diff-explain.sh +1 -1
  83. package/pipeline/scripts/smoke-diff-risk.sh +1 -1
  84. package/pipeline/scripts/smoke-evidence-gate.sh +1 -1
  85. package/pipeline/scripts/smoke-figma-dispatch.sh +46 -57
  86. package/pipeline/scripts/smoke-gate-hooks.sh +1 -1
  87. package/pipeline/scripts/smoke-generate-issue.sh +8 -8
  88. package/pipeline/scripts/smoke-handoff-contract.sh +3 -3
  89. package/pipeline/scripts/smoke-identity-isolation.sh +2 -2
  90. package/pipeline/scripts/smoke-intent-guard.sh +1 -1
  91. package/pipeline/scripts/smoke-issue-comment-template.sh +2 -2
  92. package/pipeline/scripts/smoke-issue-jira-triad.sh +4 -4
  93. package/pipeline/scripts/smoke-language-axis.sh +6 -6
  94. package/pipeline/scripts/smoke-learnings-ledger.sh +3 -3
  95. package/pipeline/scripts/smoke-mode-dispatch-drift.sh +16 -16
  96. package/pipeline/scripts/smoke-model-fallback.sh +3 -3
  97. package/pipeline/scripts/smoke-multi-repo-integration.sh +2 -2
  98. package/pipeline/scripts/smoke-multi-repo-worktree.sh +1 -1
  99. package/pipeline/scripts/smoke-no-token-prompt.sh +5 -5
  100. package/pipeline/scripts/smoke-phase-0-multi-repo.sh +1 -1
  101. package/pipeline/scripts/smoke-phase-6-multi.sh +1 -1
  102. package/pipeline/scripts/smoke-phase4-gates.sh +45 -0
  103. package/pipeline/scripts/smoke-plan-approval-gate.sh +5 -5
  104. package/pipeline/scripts/smoke-plan-todos.sh +3 -3
  105. package/pipeline/scripts/smoke-pr-review-actions.sh +3 -3
  106. package/pipeline/scripts/smoke-prefs-language.sh +1 -1
  107. package/pipeline/scripts/smoke-progress-contract.sh +2 -2
  108. package/pipeline/scripts/smoke-push-retry.sh +1 -1
  109. package/pipeline/scripts/smoke-repo-map.sh +2 -2
  110. package/pipeline/scripts/smoke-shadow-git.sh +1 -1
  111. package/pipeline/scripts/smoke-skill-authoring.sh +4 -9
  112. package/pipeline/scripts/smoke-tasklist-ordering.sh +10 -10
  113. package/pipeline/scripts/smoke-test-gap.sh +1 -1
  114. package/pipeline/scripts/smoke-token-budget.sh +1 -1
  115. package/pipeline/scripts/smoke-token-preflight.sh +2 -2
  116. package/pipeline/scripts/smoke-tracker-contract.sh +13 -13
  117. package/pipeline/scripts/smoke-tracker-tokens-invocation.sh +5 -5
  118. package/pipeline/scripts/smoke-triage-memory.sh +2 -2
  119. package/pipeline/scripts/smoke-update-check.sh +1 -1
  120. package/pipeline/scripts/smoke-url-enrichment.sh +2 -2
  121. package/pipeline/scripts/smoke-validator-gates.sh +1 -1
  122. package/pipeline/scripts/smoke-verify-by-test.sh +3 -3
  123. package/pipeline/scripts/smoke-wiki-integration.sh +9 -33
  124. package/pipeline/scripts/smoke-work-summary.sh +1 -1
  125. package/pipeline/scripts/smoke-worktree-path-convention.sh +4 -4
  126. package/pipeline/scripts/test-integrity-gate.mjs +83 -0
  127. package/pipeline/scripts/uninstall.mjs +2 -2
  128. package/pipeline/skills/.skill-manifest.json +40 -160
  129. package/pipeline/skills/.skills-index.json +3 -372
  130. package/pipeline/skills/shared/README.md +1 -1
  131. package/pipeline/skills/shared/core/multi-agent/SKILL.md +1 -1
  132. package/pipeline/skills/shared/core/multi-agent-analysis/SKILL.md +2 -2
  133. package/pipeline/skills/shared/core/multi-agent-analysis-resolve/SKILL.md +3 -3
  134. package/pipeline/skills/shared/core/multi-agent-build-optimize/SKILL.md +1 -1
  135. package/pipeline/skills/shared/core/multi-agent-channels/SKILL.md +1 -1
  136. package/pipeline/skills/shared/core/multi-agent-finish/SKILL.md +1 -1
  137. package/pipeline/skills/shared/core/multi-agent-help/SKILL.md +1 -1
  138. package/pipeline/skills/shared/core/multi-agent-refactor/SKILL.md +116 -51
  139. package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +8 -30
  140. package/pipeline/skills/shared/external/compose-components/SKILL.md +14 -14
  141. package/pipeline/skills/skills-index.md +2 -43
  142. package/pipeline/commands/multi-agent/refactor.md +0 -188
  143. package/pipeline/commands/multi-agent/refs/component-dispatch.md +0 -92
  144. package/pipeline/scripts/smoke-existing-discovery-gate.sh +0 -71
  145. package/pipeline/scripts/smoke-figma-android-parity.sh +0 -148
  146. package/pipeline/scripts/smoke-figma-credential-store.sh +0 -105
  147. package/pipeline/scripts/smoke-figma-cross-cli-inventory.sh +0 -177
  148. package/pipeline/scripts/smoke-figma-sync.sh +0 -149
  149. package/pipeline/scripts/smoke-sync-delegation.sh +0 -74
  150. package/pipeline/skills/figma-android/README.md +0 -38
  151. package/pipeline/skills/figma-android/figma-component-code-connect/SKILL.md +0 -62
  152. package/pipeline/skills/figma-android/figma-component-implement/SKILL.md +0 -158
  153. package/pipeline/skills/figma-android/figma-component-test/SKILL.md +0 -120
  154. package/pipeline/skills/figma-android/figma-component-wiki/SKILL.md +0 -35
  155. package/pipeline/skills/figma-android/figma-to-component/SKILL.md +0 -124
  156. package/pipeline/skills/figma-common/README.md +0 -64
  157. package/pipeline/skills/figma-common/figma-bottom-sheets/SKILL.md +0 -152
  158. package/pipeline/skills/figma-common/figma-cli-iterate/SKILL.md +0 -282
  159. package/pipeline/skills/figma-common/figma-cli-iterate-mend/SKILL.md +0 -503
  160. package/pipeline/skills/figma-common/figma-cli-lean-iterate/SKILL.md +0 -288
  161. package/pipeline/skills/figma-common/figma-cli-skip/SKILL.md +0 -362
  162. package/pipeline/skills/figma-common/figma-commit/COMMON_REBASE.md +0 -206
  163. package/pipeline/skills/figma-common/figma-commit/REVIEW.md +0 -337
  164. package/pipeline/skills/figma-common/figma-commit/SKILL.md +0 -216
  165. package/pipeline/skills/figma-common/figma-component-confluence-sync/SKILL.md +0 -223
  166. package/pipeline/skills/figma-common/figma-component-start/SKILL.md +0 -251
  167. package/pipeline/skills/figma-common/figma-component-status-update/SKILL.md +0 -78
  168. package/pipeline/skills/figma-common/figma-evolve-component/SKILL.md +0 -61
  169. package/pipeline/skills/figma-common/figma-fix/SKILL.md +0 -321
  170. package/pipeline/skills/figma-common/figma-form-integration/SKILL.md +0 -542
  171. package/pipeline/skills/figma-common/figma-issue/SKILL.md +0 -750
  172. package/pipeline/skills/figma-common/figma-iterate/SKILL.md +0 -208
  173. package/pipeline/skills/figma-common/figma-iteration-commit/SKILL.md +0 -1020
  174. package/pipeline/skills/figma-common/figma-mend/SKILL.md +0 -331
  175. package/pipeline/skills/figma-common/figma-navigation/SKILL.md +0 -156
  176. package/pipeline/skills/figma-common/figma-overlays/SKILL.md +0 -142
  177. package/pipeline/skills/figma-common/figma-price-integration/SKILL.md +0 -398
  178. package/pipeline/skills/figma-common/figma-remote-mcp-auth/SKILL.md +0 -104
  179. package/pipeline/skills/figma-common/figma-review/SKILL.md +0 -400
  180. package/pipeline/skills/figma-common/figma-setup/SKILL.md +0 -514
  181. package/pipeline/skills/figma-common/figma-setup/scripts/fetch-mcp-token.py +0 -592
  182. package/pipeline/skills/figma-common/figma-skip/SKILL.md +0 -129
  183. package/pipeline/skills/figma-common/figma-ui-patterns/SKILL.md +0 -105
  184. package/pipeline/skills/figma-common/figma-ui-patterns/patterns/animated-gradient-border.md +0 -116
  185. package/pipeline/skills/figma-common/figma-utility/SKILL.md +0 -274
  186. package/pipeline/skills/figma-common/figma-utility/scripts/figma-utility.py +0 -808
  187. package/pipeline/skills/figma-common/figma-validate/SKILL.md +0 -633
  188. package/pipeline/skills/figma-common/performance-iteration-commit-all/SKILL.md +0 -716
  189. package/pipeline/skills/figma-common/performance-review-next/SKILL.md +0 -238
  190. package/pipeline/skills/figma-common/performance-start/SKILL.md +0 -430
  191. package/pipeline/skills/figma-common/performance-swiftui/SKILL.md +0 -706
  192. package/pipeline/skills/figma-common/performance-tour/SKILL.md +0 -423
  193. package/pipeline/skills/figma-ios/REVIEW_CHECKLIST.md +0 -67
  194. package/pipeline/skills/figma-ios/figma-component-code-connect/SKILL.md +0 -178
  195. package/pipeline/skills/figma-ios/figma-component-implement/SKILL.md +0 -184
  196. package/pipeline/skills/figma-ios/figma-component-test/SKILL.md +0 -219
  197. package/pipeline/skills/figma-ios/figma-component-wiki/SKILL.md +0 -274
  198. package/pipeline/skills/figma-ios/figma-to-component/SKILL.md +0 -416
  199. package/pipeline/skills/figma-ios/figma-to-component/halt-return-protocol.md +0 -57
  200. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-0-init.md +0 -307
  201. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-1-gathering.md +0 -119
  202. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-1.5-existing-discovery.md +0 -174
  203. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-2-orchestrator.md +0 -333
  204. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-2a-testing-identifiers.md +0 -368
  205. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-2b-localization.md +0 -393
  206. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-2c-accessibility.md +0 -617
  207. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-2d-analytics.md +0 -352
  208. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3-orchestrator.md +0 -337
  209. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3a-location.md +0 -206
  210. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3b-tokens.md +0 -235
  211. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3c-nested.md +0 -214
  212. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3d-patterns.md +0 -902
  213. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3e-assets.md +0 -156
  214. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3f-utilities.md +0 -175
  215. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3g-property-coverage.md +0 -176
  216. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3h-variant-config.md +0 -333
  217. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4-orchestrator.md +0 -412
  218. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4a-configuration.md +0 -336
  219. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4b-view.md +0 -705
  220. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4c-documentation.md +0 -332
  221. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4d-preview.md +0 -380
  222. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4e-modifiers.md +0 -262
  223. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-5-orchestrator.md +0 -482
  224. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-5a-viewinspector.md +0 -274
  225. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-5b-snapshot.md +0 -636
  226. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-5c-unit.md +0 -142
  227. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-6-code-connect.md +0 -547
  228. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-7-wiki.md +0 -39
  229. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-7a-confluence-generate.md +0 -659
  230. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-7a-wiki-generate.md +0 -580
  231. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-8-cleanup.md +0 -51
  232. package/pipeline/skills/figma-ios/figma-to-component/reference/accessibility.md +0 -183
  233. package/pipeline/skills/figma-ios/figma-to-component/reference/analytics-events.md +0 -64
  234. package/pipeline/skills/figma-ios/figma-to-component/reference/code-connect.md +0 -531
  235. package/pipeline/skills/figma-ios/figma-to-component/reference/confluence-api.md +0 -89
  236. package/pipeline/skills/figma-ios/figma-to-component/reference/confluence-xhtml.md +0 -155
  237. package/pipeline/skills/figma-ios/figma-to-component/reference/figma-to-swiftui-effects.md +0 -196
  238. package/pipeline/skills/figma-ios/figma-to-component/reference/halt-return-protocol.md +0 -57
  239. package/pipeline/skills/figma-ios/figma-to-component/reference/localization-naming.md +0 -89
  240. package/pipeline/skills/figma-ios/figma-to-component/reference/macros.md +0 -227
  241. package/pipeline/skills/figma-ios/figma-to-component/reference/missing-tokens.md +0 -157
  242. package/pipeline/skills/figma-ios/figma-to-component/reference/orchestrator-discipline.md +0 -90
  243. package/pipeline/skills/figma-ios/figma-to-component/reference/registry.md +0 -116
  244. package/pipeline/skills/figma-ios/figma-to-component/reference/remote-mcp-script.md +0 -153
  245. package/pipeline/skills/figma-ios/figma-to-component/reference/rest-api-script.md +0 -130
  246. package/pipeline/skills/figma-ios/figma-to-component/reference/scripts-inventory.md +0 -218
  247. package/pipeline/skills/figma-ios/figma-to-component/reference/snapshot-testing.md +0 -188
  248. package/pipeline/skills/figma-ios/figma-to-component/reference/subcomponent-graph.md +0 -93
  249. package/pipeline/skills/figma-ios/figma-to-component/reference/testing-identifiers-naming.md +0 -98
  250. package/pipeline/skills/figma-ios/figma-to-component/reference/tools.md +0 -261
  251. package/pipeline/skills/figma-ios/figma-to-component/reference/viewinspector.md +0 -147
  252. package/pipeline/skills/figma-ios/figma-to-component/reference/wiki-to-confluence-mapping.md +0 -182
  253. package/pipeline/skills/figma-ios/figma-to-component/scripts/apply-author-login-map.py +0 -185
  254. package/pipeline/skills/figma-ios/figma-to-component/scripts/backfill-status.py +0 -609
  255. package/pipeline/skills/figma-ios/figma-to-component/scripts/build-author-registry.py +0 -332
  256. package/pipeline/skills/figma-ios/figma-to-component/scripts/bulk-sync-issues.py +0 -261
  257. package/pipeline/skills/figma-ios/figma-to-component/scripts/code-connect-data-gather.py +0 -184
  258. package/pipeline/skills/figma-ios/figma-to-component/scripts/code-connect-publish.sh +0 -188
  259. package/pipeline/skills/figma-ios/figma-to-component/scripts/confluence-component-status-upload.py +0 -768
  260. package/pipeline/skills/figma-ios/figma-to-component/scripts/confluence-component-status.py +0 -191
  261. package/pipeline/skills/figma-ios/figma-to-component/scripts/confluence-data-gather.py +0 -420
  262. package/pipeline/skills/figma-ios/figma-to-component/scripts/confluence-page-ids.example.json +0 -9
  263. package/pipeline/skills/figma-ios/figma-to-component/scripts/confluence-publish.py +0 -336
  264. package/pipeline/skills/figma-ios/figma-to-component/scripts/figma-subcomponent-graph.py +0 -391
  265. package/pipeline/skills/figma-ios/figma-to-component/scripts/figma-update.py +0 -292
  266. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/__init__.py +0 -1
  267. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/issue_sync_propagate.py +0 -93
  268. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/registry_writer.py +0 -299
  269. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_backfill_status.py +0 -343
  270. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_figma_update.py +0 -206
  271. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_figma_update_http.py +0 -149
  272. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_phase_clis.py +0 -281
  273. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_registry_writer.py +0 -332
  274. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_skill_figma_issue.py +0 -176
  275. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_skill_figma_review.py +0 -98
  276. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_update_issue.py +0 -298
  277. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_update_issue_gh.py +0 -195
  278. package/pipeline/skills/figma-ios/figma-to-component/scripts/phase1-gather.py +0 -1298
  279. package/pipeline/skills/figma-ios/figma-to-component/scripts/phase2-finalize.py +0 -228
  280. package/pipeline/skills/figma-ios/figma-to-component/scripts/phase3-scripts.py +0 -1089
  281. package/pipeline/skills/figma-ios/figma-to-component/scripts/phase4-finalize.py +0 -141
  282. package/pipeline/skills/figma-ios/figma-to-component/scripts/phase5-finalize.py +0 -106
  283. package/pipeline/skills/figma-ios/figma-to-component/scripts/phase6-finalize.py +0 -162
  284. package/pipeline/skills/figma-ios/figma-to-component/scripts/phase7-finalize.py +0 -105
  285. package/pipeline/skills/figma-ios/figma-to-component/scripts/register-icons-codeconnect.py +0 -179
  286. package/pipeline/skills/figma-ios/figma-to-component/scripts/remote-mcp-fetch.py +0 -260
  287. package/pipeline/skills/figma-ios/figma-to-component/scripts/resolve-author-logins.py +0 -260
  288. package/pipeline/skills/figma-ios/figma-to-component/scripts/run-uicomponents-tests.sh +0 -86
  289. package/pipeline/skills/figma-ios/figma-to-component/scripts/sidebar-generator.py +0 -321
  290. package/pipeline/skills/figma-ios/figma-to-component/scripts/update-issue-from-registry.py +0 -1470
  291. package/pipeline/skills/figma-ios/figma-to-component/scripts/validate-phase4.sh +0 -176
  292. package/pipeline/skills/figma-ios/figma-to-component/scripts/validate-phase6.sh +0 -147
  293. package/pipeline/skills/figma-ios/figma-to-component/scripts/validate-phase7a.py +0 -629
  294. /package/pipeline/commands/multi-agent/{delete.md → delete/SKILL.md} +0 -0
  295. /package/pipeline/commands/multi-agent/{diff-explain.md → diff-explain/SKILL.md} +0 -0
  296. /package/pipeline/commands/multi-agent/{garbage-collect.md → garbage-collect/SKILL.md} +0 -0
  297. /package/pipeline/commands/multi-agent/{issue.md → issue/SKILL.md} +0 -0
  298. /package/pipeline/commands/multi-agent/{jira.md → jira/SKILL.md} +0 -0
  299. /package/pipeline/commands/multi-agent/{kill.md → kill/SKILL.md} +0 -0
  300. /package/pipeline/commands/multi-agent/{language.md → language/SKILL.md} +0 -0
  301. /package/pipeline/commands/multi-agent/{log.md → log/SKILL.md} +0 -0
  302. /package/pipeline/commands/multi-agent/{prune-logs.md → prune-logs/SKILL.md} +0 -0
  303. /package/pipeline/commands/multi-agent/{purge.md → purge/SKILL.md} +0 -0
  304. /package/pipeline/commands/multi-agent/{scan.md → scan/SKILL.md} +0 -0
  305. /package/pipeline/commands/multi-agent/{search.md → search/SKILL.md} +0 -0
  306. /package/pipeline/commands/multi-agent/{stack.md → stack/SKILL.md} +0 -0
  307. /package/pipeline/commands/multi-agent/{status.md → status/SKILL.md} +0 -0
  308. /package/pipeline/commands/multi-agent/{test.md → test/SKILL.md} +0 -0
  309. /package/pipeline/commands/multi-agent/{update.md → update/SKILL.md} +0 -0
  310. /package/pipeline/{commands/multi-agent → multi-agent-refs}/_input-parser.md +0 -0
  311. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/analysis-template.md +0 -0
  312. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/audit-guide.md +0 -0
  313. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/backend-guide.md +0 -0
  314. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/channels/confluence.md +0 -0
  315. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/channels/issue-comment.md +0 -0
  316. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/channels/pr-review-actions.md +0 -0
  317. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/channels/pr.md +0 -0
  318. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/conventions-defaults.md +0 -0
  319. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/autopilot-circuit-breaker.md +0 -0
  320. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/dev-critic.md +0 -0
  321. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/external-context-injection.md +0 -0
  322. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/model-fallback.md +0 -0
  323. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/plan-todos.md +0 -0
  324. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/prior-fix-detection.md +0 -0
  325. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/repo-map.md +0 -0
  326. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/shadow-git.md +0 -0
  327. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/frontend-guide.md +0 -0
  328. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/knowledge.md +0 -0
  329. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/multi-repo-integration-build.md +0 -0
  330. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/picker-contract.md +0 -0
  331. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/rules.md +0 -0
@@ -1,482 +0,0 @@
1
- # PHASE 5 - Testing Orchestrator
2
-
3
- Orchestrates Phase 5 sub-phases: dispatches sub-agents to write test files, collects results.
4
- PREV: Phase 4 (Implementation)
5
- NEXT: Phase 6 (Code Connect Publish)
6
-
7
- **Date Format:** Use `DD.MM.YYYY` format (e.g., `23.02.2026`) for file headers.
8
-
9
- ---
10
-
11
- ## PURPOSE
12
-
13
- Phase 5 generates tests for the implemented component.
14
- Each sub-phase writes test files in a specific testing category.
15
- Phase 6 (Code Connect) consumes the verified component.
16
-
17
- ---
18
-
19
- ## PRE-CHECK: Phase 4 Complete
20
-
21
- ```
22
- Read: {artifactPath}/IMPLEMENTATION_HISTORY.md
23
- Read: {artifactPath}/pass3/_index.md
24
- Read: {artifactPath}/pass3/04b_component_architecture.md
25
- ```
26
-
27
- EXTRACT:
28
- - `componentName`
29
- - `artifactPath`
30
- - `sourceModule` (e.g., `UIComponents`)
31
- - `sourceLocation` (full path to component Swift file)
32
- - `componentPath` (path after `Sources/<Module>/`, e.g., `Components/MobileAppComponents/Components/Badges/LabelBadge`)
33
-
34
- Verify the component Swift file exists at `sourceLocation`.
35
-
36
- | Result | Action |
37
- |--------|--------|
38
- | All files exist + component Swift file exists | Proceed to CREATE_TEST_INDEX |
39
- | Missing | HALT |
40
-
41
- FAIL →
42
- ```
43
- STATUS: HALT
44
- PHASE: phase-5
45
- GATE: PRE_CHECK
46
- REASON: Phase 4 artifacts or component Swift file not found.
47
- COMPLETED_GATES: []
48
- ARTIFACTS_CREATED: none
49
- USER_ACTION_REQUIRED: Run Phase 4 first.
50
- ```
51
-
52
- ---
53
-
54
- ## GATE 1: CREATE_TEST_INDEX
55
-
56
- Create a single index file that maps to all artifact paths used by test sub-phases.
57
- This is the ONLY file that knows where artifacts live - sub-phases read this index.
58
-
59
- ### 1.1 Write `{artifactPath}/pass5/_test_index.md`
60
-
61
- ```markdown
62
- # Test Index
63
-
64
- Component: {componentName}
65
- Generated: {DD.MM.YYYY}
66
-
67
- ## Component Source
68
-
69
- | Field | Value |
70
- |-------|-------|
71
- | Module | {sourceModule} |
72
- | Source File | {sourceLocation}/{componentName}.swift |
73
- | Configuration File | {sourceLocation}/{componentName}Configuration.swift |
74
- | Component Path | {componentPath} |
75
-
76
- ## Artifact Paths
77
-
78
- | Artifact | Path | Used By |
79
- |----------|------|---------|
80
- | Component Properties | {artifactPath}/pass1/component_properties.json | 5A, 5B |
81
- | Testing Identifiers | {artifactPath}/pass2/utility_identifiers.md | 5A |
82
- | Component Architecture | {artifactPath}/pass3/04b_component_architecture.md | 5B |
83
- | Patterns | {artifactPath}/pass3/04_patterns.md | 5B |
84
- | Complexity | {artifactPath}/pass3/05_complexity.md | 5A |
85
- | Utility Integration | {artifactPath}/pass3/08_utility_integration.md | 5A |
86
-
87
- ## Test Targets
88
-
89
- | Category | Target | Base Path |
90
- |----------|--------|-----------|
91
- | ViewInspector | {sourceModule}Tests | Tests/{sourceModule}Tests/ViewInspector/{componentPath}/ |
92
- | Snapshot | {sourceModule}Tests | Tests/{sourceModule}Tests/Snapshot/{componentPath}/ |
93
- | Unit | {sourceModule}Tests | Tests/{sourceModule}Tests/Unit/{componentPath}/ |
94
-
95
- ## Test Files (populated by sub-phases)
96
-
97
- | Sub-Phase | File | Status |
98
- |-----------|------|--------|
99
- | 5A ViewInspector | {componentName}ViewInspectorTests.swift | pending |
100
- | 5B Snapshot | {componentName}SnapshotTests.swift | pending |
101
- | 5C Unit | {componentName}Tests.swift | pending / N/A |
102
- ```
103
-
104
- ---
105
-
106
- ## ROUTING
107
-
108
- ### Sub-Phase Inventory
109
-
110
- | Sub-Phase | File | Purpose | Required |
111
- |-----------|------|---------|----------|
112
- | 5A | `phase-5a-viewinspector.md` | ViewInspector structure + accessibility tests | **ALWAYS** |
113
- | 5B | `phase-5b-snapshot.md` | Snapshot tests for ALL Figma variants | **ALWAYS** |
114
- | 5C | `phase-5c-unit.md` | Unit tests for ViewModel/model logic | **CONDITIONAL** - only if testable logic exists |
115
-
116
- ### Execution Flow
117
-
118
- ```
119
- GATE 1: CREATE_TEST_INDEX
120
-
121
- Wave 1 (parallel):
122
- 5A - ViewInspector structure tests
123
- 5B - Snapshot visual tests
124
-
125
- Wave 2 (conditional):
126
- 5C - Unit tests (ONLY if component has ViewModel/model logic)
127
-
128
- GATE 2: UPDATE_TEST_INDEX
129
-
130
- GATE 3: TEST_EXECUTION (xcodebuild test - builds + runs, zero warnings, all tests pass)
131
-
132
- GATE 4: TEST_FILE_VALIDATION
133
-
134
- GATE 5: UPDATE_REGISTRY (phase5-finalize.py)
135
-
136
- PHASE OUTPUT
137
- ```
138
-
139
- ### Sub-Phase Inputs
140
-
141
- All sub-phases read from `{artifactPath}/pass5/_test_index.md` for paths.
142
- They then read the actual artifact files listed in the index - no data duplication.
143
-
144
- | Sub-Phase | Reads From (via index) |
145
- |-----------|----------------------|
146
- | 5A | component_properties.json, utility_identifiers.md, utility_integration.md |
147
- | 5B | component_properties.json, 04b_component_architecture.md, 04_patterns.md |
148
- | 5C | Component source file (scan for ViewModel/models) |
149
-
150
- ---
151
-
152
- ## GATE 2: UPDATE_TEST_INDEX
153
-
154
- After all sub-phases complete, update `pass5/_test_index.md`:
155
- - Set each sub-phase status to `complete` or `N/A`
156
- - Record test counts
157
-
158
- ---
159
-
160
- ## GATE 3: TEST_EXECUTION
161
-
162
- Build and run tests using the `run-uicomponents-tests.sh` script. The script uses `xcodebuild test` which builds before testing - no separate build gate is needed. This gate requires **zero build warnings** and **all tests passing**.
163
-
164
- ### How it works
165
-
166
- The script runs tests via the `UIComponents-Package` scheme inside the SPM package directory (`{repos.components.path}/`). This uses the package's own umbrella scheme, avoiding the need for any one-time Xcode setup. The `xcodebuild test` command compiles first (catching build errors with exit code 65) then runs the tests.
167
-
168
- ### Switch to local common dependency
169
-
170
- The UIComponents SPM package resolves `{project.slug}-common` from remote git, but Phase 2 adds identifiers/keys to the local editable copy. Before running tests, in `{repos.components.path}/Package.swift`, comment out the `.package(url: "...{project.slug}-common...", ...)` line and add `.package(path: "../{project.slug}-common"),` below it.
171
-
172
- ### Run tests
173
-
174
- Run each test class separately to isolate failures:
175
-
176
- ```bash
177
- REPO_ROOT=$(git rev-parse --show-toplevel)
178
- bash "${REPO_ROOT}/.instructions/figma/figma-to-swiftui/scripts/run-uicomponents-tests.sh" \
179
- --filter "{ComponentName}ViewInspectorTests"
180
- ```
181
-
182
- ```bash
183
- bash "${REPO_ROOT}/.instructions/figma/figma-to-swiftui/scripts/run-uicomponents-tests.sh" \
184
- --filter "{ComponentName}SnapshotTests"
185
- ```
186
-
187
- For unit tests (if 5C was generated):
188
-
189
- ```bash
190
- bash "${REPO_ROOT}/.instructions/figma/figma-to-swiftui/scripts/run-uicomponents-tests.sh" \
191
- --filter "{ComponentName}Tests"
192
- ```
193
-
194
- ### Revert to remote dependency
195
-
196
- After all tests pass, uncomment the original `.package(url: ...)` line and remove the `.package(path: ...)` line in `Package.swift`.
197
-
198
- **Important:** Do NOT run multiple test filters in parallel - they share the same DerivedData build database and will fail with a database lock error. Run them sequentially.
199
-
200
- **Note on first-run snapshots:** When snapshot tests run for the first time, `record: .missing` mode will **record** reference images (not fail). The test passes but creates new `__Snapshots__/` directories with `.png` files. These reference images are **gitignored** and must NOT be committed - they are re-recorded automatically on each machine. The wiki/Confluence skill copies them from disk for documentation before they are discarded.
201
-
202
- ### required GATE - SNAPSHOT_DESIGN_FIDELITY
203
-
204
- Snapshot tests passing does NOT mean the rendered component matches the Figma design. It only means "the pixels we recorded match the pixels we recorded". A broken test scaffold (missing image prefetch per `phase-5b-snapshot.md section GATE 3.0.1`, wrong hosting frame, clipped layout, misapplied modifier) records a broken render as "ground truth" and every subsequent run compares broken-vs-broken and reports PASS. The test infrastructure CANNOT catch this class of failure by itself.
205
-
206
- This gate runs automatically after `TEST_EXECUTION` succeeds, every time Phase 5B recorded or re-recorded snapshots (first run or after a test-file change). It is performed by the orchestrator itself - no user involvement, no pause for confirmation.
207
-
208
- **Procedure** (automated fix-and-retry loop, up to 4 attempts):
209
-
210
- 1. Read `{artifactPath}/pass1/screenshot.png` - the Figma reference captured in Phase 1. (Claude is multimodal and sees images via the Read tool.)
211
- 2. Read the LTR light variant from `__Snapshots__/{componentName}SnapshotTests/test_snapshot_light_default.light_default.png` (or the equivalent default-variant filename).
212
- 3. Compare them directly in the orchestrator's own visual judgement - layout, proportions, hierarchy, typography, colors, gradients, background content, text legibility.
213
- 4. **If match** (all match criteria hold): proceed to Phase 6.
214
- 5. **If mismatch** (any non-match criterion triggers): do NOT halt on the first failure. Instead enter the fix-and-retry loop:
215
-
216
- a. **Diagnose the specific mismatch**: what differs, where, and the most likely cause (component layout bug, wrong token, test scaffold issue, etc.). Write the diagnosis to `{artifactPath}/pass5/fidelity_attempt_{N}.md`.
217
-
218
- b. **Apply a fix**:
219
- - If the fault is in the component source (wrong modifier order, wrong token, missing effect, clipped layout), edit `{sourceLocation}/{componentName}.swift` (and/or Configuration file) to correct it.
220
- - If the fault is in the test scaffold (missing image prefetch, wrong hosting frame, padding outside the frame), edit the snapshot test file.
221
- - Do NOT edit Figma or claim the Figma reference is wrong.
222
-
223
- c. **Delete stale snapshots** at `__Snapshots__/{componentName}SnapshotTests/` so the next test run re-records against the fixed component/scaffold.
224
-
225
- d. **Re-run Phase 5B** via `run-uicomponents-tests.sh --filter "{componentName}SnapshotTests"`. The first run records; if you need a clean compare, run again.
226
-
227
- e. **Re-compare** the new snapshot against `pass1/screenshot.png`. Go back to step 3.
228
-
229
- 6. **Attempt budget**: up to 4 fix attempts total. After the 4th failed attempt, HALT with:
230
-
231
- ```
232
- STATUS: HALT
233
- PHASE: phase-5
234
- GATE: SNAPSHOT_DESIGN_FIDELITY
235
- REASON: Rendered snapshot does not match Figma after 4 fix attempts.
236
- ATTEMPTS:
237
- 1. {diagnosis and fix summary from fidelity_attempt_1.md}
238
- 2. {diagnosis and fix summary from fidelity_attempt_2.md}
239
- 3. {diagnosis and fix summary from fidelity_attempt_3.md}
240
- 4. {diagnosis and fix summary from fidelity_attempt_4.md}
241
- CURRENT_MISMATCH: {description of the remaining delta}
242
- USER_ACTION_REQUIRED: The mismatch is beyond automated repair. Review pass5/fidelity_attempt_*.md to see what was tried, then inspect the component manually.
243
- ```
244
-
245
- 7. **Counter tracking**: the attempt counter lives in the orchestrator's own task state - do NOT rely on grepping files. Increment after every mismatch-driven fix. Reset only on successful match.
246
-
247
- **Match criteria** (all must hold):
248
- - Overall layout, proportions, and hierarchy match Figma
249
- - Typography sizes, weights, and colors are correct
250
- - Background images (remote or local) actually render content, not placeholders / spinners / blank areas
251
- - Gradients, shadows, blur effects are visible at roughly the intensity shown in Figma
252
- - Text is legible and positioned where Figma shows it
253
-
254
- **Non-match criteria** (any one triggers HALT):
255
- - Loading spinner instead of the image
256
- - Text clipped or overflowing the container
257
- - Gradient baked in but invisible because of layout bugs
258
- - Wrong typography weight / size
259
- - Colors that look "close enough" but don't match Figma tokens
260
- - Any case where the recorded snapshot is visibly different from `pass1/screenshot.png` beyond expected aspect-ratio or sample-data differences
261
-
262
- **Never ask the user to confirm the match**. The orchestrator is multimodal and has direct visual access to both images. Surfacing the images to the user and asking for confirmation is forbidden - it wastes a round-trip and makes the gate advisory instead of blocking. The orchestrator makes the judgement itself, enters the fix loop on mismatch, and only HALTs after the 4-attempt budget is exhausted.
263
-
264
- **Never explain away a mismatch**. If the visual comparison shows a clear difference, enter the fix loop - do not rationalise that the snapshot is "close enough" or that the difference is "just the sample image". Ambiguous cases also enter the fix loop and surface the specific concern in the `fidelity_attempt_{N}.md` diagnosis.
265
-
266
- ### Pass criteria
267
-
268
- Both conditions must be met:
269
-
270
- 1. **All tests pass** - exit code 0, no test failures
271
- 2. **Zero build warnings** - review xcodebuild output for warnings in the component's test files. Fix any warnings before proceeding.
272
-
273
- ### Exit codes
274
-
275
- | Exit Code | Meaning | Action |
276
- |-----------|---------|--------|
277
- | 0 (PASS) | Build clean + all tests passed | Check output for warnings, then proceed to GATE 4 |
278
- | 2 (PACKAGE_NOT_FOUND) | UIComponents package directory missing | Verify package path exists |
279
- | 3 (NO_SIMULATOR) | No available iPhone simulator | Install an iOS Simulator runtime via Xcode > Settings > Platforms |
280
- | 65 (BUILD_FAIL) | Compilation failed | Read error output, fix build errors, re-run |
281
- | 1 (TEST_FAIL) | One or more tests failed | Read test output, fix failing tests, re-run |
282
-
283
- ### Common build errors and fixes
284
-
285
- | Error | Fix |
286
- |-------|-----|
287
- | Missing import | Add `import SnapshotTesting`, `import ViewInspector`, or `@testable import UIComponents` |
288
- | `@MainActor` missing | Add `@MainActor` on the test class (Swift 6 strict concurrency requires this for classes using SwiftUI views or UIHostingController) |
289
- | Unknown helper method | Ensure `assertSnapshot`/`assertSnapshotDarkMode`/`assertSnapshotRTL`/`assertSnapshotRTLDarkMode` are defined in the test file |
290
-
291
- ### Warning policy
292
-
293
- After tests pass (exit 0), review the output for any warnings in the component's test files. Common warnings to fix:
294
-
295
- | Warning | Fix |
296
- |---------|-----|
297
- | `'Inspectable' is deprecated` | Remove the `extension {ComponentName}: Inspectable {}` line - no longer required by ViewInspector |
298
- | `main actor-isolated property` | Add `@MainActor` to the test class |
299
- | Unused variable | Remove or use the variable |
300
-
301
- If warnings are found: fix them, re-run tests, confirm exit 0 with clean output.
302
-
303
- If tests fail:
304
-
305
- ```
306
- STATUS: HALT
307
- PHASE: phase-5
308
- GATE: TEST_EXECUTION
309
- REASON: Test execution failed.
310
- TEST_ERRORS: {error output from xcodebuild test}
311
- COMPLETED_GATES: [PRE_CHECK, CREATE_TEST_INDEX, ROUTING, UPDATE_TEST_INDEX]
312
- USER_ACTION_REQUIRED: Fix the failing tests and re-run.
313
- ```
314
-
315
- ---
316
-
317
- ## GATE 4: TEST_FILE_VALIDATION
318
-
319
- Validate that all generated test files follow the required patterns and that no tests are skipped.
320
-
321
- ### 5.1 Structural validation - ViewInspector test file
322
-
323
- Check the ViewInspector test file at `Tests/{sourceModule}Tests/ViewInspector/{componentPath}/{componentName}ViewInspectorTests.swift`:
324
-
325
- ```
326
- [ ] File exists
327
- [ ] Has `import ViewInspector`
328
- [ ] Has `import XCTest`
329
- [ ] Has `@testable import UIComponents`
330
- [ ] Does NOT have `extension {ComponentName}: Inspectable {}` (deprecated since ViewInspector 0.10+)
331
- [ ] Class is `@MainActor final class {ComponentName}ViewInspectorTests: XCTestCase`
332
- [ ] Has `makeSUT()` helper method
333
- [ ] Has `test_viewExists()` test
334
- [ ] Has `test_containsExpectedSubviews()` test
335
- [ ] Has variant rendering tests (e.g., `test_allStatesRender`)
336
- [ ] Has accessibility identifier tests for each testing ID
337
- [ ] No `XCTSkip` - all tests must execute
338
- [ ] No `throw XCTSkip` - no conditional skipping
339
- ```
340
-
341
- ### 5.2 Structural validation - Snapshot test file
342
-
343
- Check the Snapshot test file at `Tests/{sourceModule}Tests/Snapshot/{componentPath}/{componentName}SnapshotTests.swift`:
344
-
345
- ```
346
- [ ] File exists
347
- [ ] Has `import SnapshotTesting`
348
- [ ] Has `import XCTest`
349
- [ ] Has `@testable import UIComponents`
350
- [ ] Class is `@MainActor final class {ComponentName}SnapshotTests: XCTestCase`
351
- [ ] Has `override func invokeTest()` with `withSnapshotTesting(record: .missing)`
352
- [ ] Has light + dark variants for EVERY Figma variant dimension
353
- [ ] Has RTL variants if component has text/localized content
354
- [ ] Has 4 snapshot helpers: assertSnapshot, assertSnapshotDarkMode, assertSnapshotRTL, assertSnapshotRTLDarkMode
355
- [ ] Each helper uses UIHostingController wrapping
356
- [ ] Each helper uses `.image(precision: 0.99, perceptualPrecision: 0.98)`
357
- [ ] RTL helpers set `.semanticContentAttribute = .forceRightToLeft`
358
- [ ] Dark helpers set `.overrideUserInterfaceStyle = .dark`
359
- [ ] No `XCTSkip` - all tests must execute
360
- ```
361
-
362
- ### 5.3 Test naming convention
363
-
364
- All test methods must follow the naming pattern:
365
-
366
- | Test type | Pattern | Example |
367
- |-----------|---------|---------|
368
- | ViewInspector | `test_{description}` | `test_viewExists`, `test_containsText` |
369
- | Snapshot Light | `test_snapshot_light_{variant}` | `test_snapshot_light_success` |
370
- | Snapshot Dark | `test_snapshot_dark_{variant}` | `test_snapshot_dark_success` |
371
- | Snapshot RTL Light | `test_snapshot_rtl_light_{variant}` | `test_snapshot_rtl_light_success` |
372
- | Snapshot RTL Dark | `test_snapshot_rtl_dark_{variant}` | `test_snapshot_rtl_dark_success` |
373
-
374
- ### 5.4 Variant coverage check
375
-
376
- Cross-reference test methods against `pass3/04_patterns.md` variant list:
377
-
378
- - Every variant dimension from Figma must have a corresponding **light** snapshot test
379
- - Every variant dimension must have a corresponding **dark** snapshot test
380
- - If component has text/localized content: every key variant must have **RTL light** + **RTL dark** tests
381
- - Boolean toggle variants (e.g., with/without icon) must have separate test methods
382
-
383
- | Result | Action |
384
- |--------|--------|
385
- | All checks pass | Proceed to PHASE OUTPUT |
386
- | Any check fails | Fix the violation and re-validate |
387
-
388
- If validation fails:
389
-
390
- ```
391
- STATUS: HALT
392
- PHASE: phase-5
393
- GATE: TEST_FILE_VALIDATION
394
- REASON: Test file validation failed.
395
- VIOLATIONS: {list of violations}
396
- COMPLETED_GATES: [PRE_CHECK, CREATE_TEST_INDEX, ROUTING, UPDATE_TEST_INDEX, TEST_EXECUTION]
397
- USER_ACTION_REQUIRED: Fix the violations listed above.
398
- ```
399
-
400
- ---
401
-
402
- ## GATE 5: UPDATE_REGISTRY
403
-
404
- Run the Phase 5 finalize script to mark `tested` in the component registry:
405
-
406
- ```bash
407
- python3 .instructions/figma/figma-to-swiftui/scripts/phase5-finalize.py \
408
- --node-id "{nodeId}" \
409
- --platform ios
410
- ```
411
-
412
- | Result | Action |
413
- |--------|--------|
414
- | Exit 0, `"action": "updated"` | `status.ios.tested` set green, `against = implemented.version` - proceed |
415
- | Exit 0, `"action": "already_current"` | Already marked against current implemented.version - proceed |
416
- | Exit 0, `"action": "created"` | New registry file created - proceed |
417
- | Exit 1 | HALT - registry update failed |
418
-
419
- **Why this matters:** This is the single source of truth for `status.ios.tested`. The script records `against = status.ios.implemented.version` so when the next Phase 4 bumps `implemented.version`, this flag automatically drops to yellow until tests are re-run. `figma-iteration-commit` reads this and syncs the GitHub issue via `update-issue-from-registry.py`.
420
-
421
- FAIL →
422
- ```
423
- STATUS: HALT
424
- PHASE: phase-5
425
- GATE: UPDATE_REGISTRY
426
- REASON: phase5-finalize.py failed.
427
- COMPLETED_GATES: [PRE_CHECK, CREATE_TEST_INDEX, ROUTING, UPDATE_TEST_INDEX, TEST_EXECUTION, TEST_FILE_VALIDATION]
428
- USER_ACTION_REQUIRED: Check script error output; verify node-id matches the registry.
429
- ```
430
-
431
- ---
432
-
433
- ## PHASE OUTPUT
434
-
435
- ```
436
- STATUS: COMPLETE
437
- PHASE: phase-5
438
- GATES_PASSED: [PRE_CHECK, CREATE_TEST_INDEX, ROUTING, UPDATE_TEST_INDEX, TEST_EXECUTION, TEST_FILE_VALIDATION, UPDATE_REGISTRY]
439
- ARTIFACTS_CREATED:
440
- - {artifactPath}/pass5/_test_index.md
441
- SUB_PHASES:
442
- - 5A ViewInspector: {COUNT} tests - {testFilePath}
443
- - 5B Snapshot: {COUNT} tests ({LIGHT} light + {DARK} dark + {RTL} RTL) - {testFilePath}
444
- - 5C Unit: {COUNT} tests or N/A - {testFilePath or N/A}
445
- TESTS: ✅ PASS (xcodebuild test - zero warnings, all tests green)
446
- VALIDATION: ✅ PASS (structure + naming + variant coverage)
447
- SUMMARY: Phase 5 testing complete. {TOTAL} tests across {FILE_COUNT} test files. Zero warnings. All tests passing.
448
- ```
449
-
450
- ---
451
-
452
- ## VALIDATION CHECKLIST
453
-
454
- ```
455
- [ ] pass5/_test_index.md created with all artifact paths
456
- [ ] 5A ViewInspector test file created - structure, accessibility, variant rendering tests
457
- [ ] 5B Snapshot test file created - light/dark/RTL variants, snapshot helpers
458
- [ ] 5C Unit tests created OR marked N/A (no testable logic)
459
- [ ] Test index updated with final status
460
- [ ] All test files follow existing project patterns (XCTest, makeSUT, closure init)
461
- [ ] xcodebuild test passed (exit 0, all tests green)
462
- [ ] Zero build warnings in component test files
463
- [ ] No XCTSkip in any test file - all tests must execute
464
- [ ] Snapshot test naming follows test_snapshot_{mode}_{variant} convention
465
- [ ] ViewInspector tests cover all accessibility identifiers
466
- [ ] Snapshot tests cover ALL Figma variant dimensions (light + dark minimum)
467
- [ ] RTL snapshot tests present for components with text/localized content
468
- [ ] Snapshot reference images generated locally (NOT committed - gitignored)
469
- [ ] phase5-finalize.py passed (status.ios.tested updated)
470
- ```
471
-
472
- ---
473
-
474
- ## REFERENCES
475
-
476
- | Topic | File |
477
- |-------|------|
478
- | Phase 5A | `phase-5a-viewinspector.md` |
479
- | Phase 5B | `phase-5b-snapshot.md` |
480
- | Phase 5C | `phase-5c-unit.md` |
481
- | ViewInspector API | `reference/viewinspector.md` |
482
- | Snapshot Testing | `reference/snapshot-testing.md` |