@mmerterden/multi-agent-pipeline 11.2.0 → 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 (335) hide show
  1. package/CHANGELOG.md +68 -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 +39 -17
  8. package/install/copilot.mjs +22 -16
  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/lib/credential-store.sh +8 -4
  33. package/pipeline/{commands/multi-agent → multi-agent-refs}/_account-picker.md +2 -2
  34. package/pipeline/{commands/multi-agent → multi-agent-refs}/_dev-context.md +2 -2
  35. package/pipeline/{commands/multi-agent → multi-agent-refs}/_repo-picker.md +2 -2
  36. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/android-guide.md +1 -1
  37. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/channels/jira.md +1 -1
  38. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/channels/wiki.md +7 -7
  39. package/pipeline/multi-agent-refs/component-dispatch.md +92 -0
  40. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/cross-cli-contract.md +10 -77
  41. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/verify-by-test.md +1 -1
  42. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/generate-issue.md +2 -2
  43. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/issue-jira-triad.md +1 -1
  44. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/keychain.md +1 -1
  45. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/log-format.md +1 -1
  46. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/modes.md +2 -2
  47. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/operations.md +1 -1
  48. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-0-init.md +10 -10
  49. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-1-analysis.md +6 -6
  50. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-2-planning.md +3 -3
  51. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-3-dev.md +10 -10
  52. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-4-review.md +8 -8
  53. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-5-test.md +3 -3
  54. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-6-commit.md +4 -4
  55. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-7-report.md +6 -6
  56. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases.md +12 -12
  57. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/progress-contract.md +4 -4
  58. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/swiftui-guide.md +1 -1
  59. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/tracker-contract.md +3 -3
  60. package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/wiki-capture.md +4 -4
  61. package/pipeline/preferences-template.json +17 -1
  62. package/pipeline/rules/figma-pipeline.md +2 -2
  63. package/pipeline/schemas/prefs.schema.json +0 -34
  64. package/pipeline/scripts/README.md +1 -3
  65. package/pipeline/scripts/build-skills-index.mjs +3 -6
  66. package/pipeline/scripts/eval-mine-corpus.mjs +187 -0
  67. package/pipeline/scripts/fixtures/install-layout.tsv +6 -5
  68. package/pipeline/scripts/gen-mode-dispatch.mjs +3 -3
  69. package/pipeline/scripts/lint-skills.mjs +26 -1
  70. package/pipeline/scripts/phase-banner.sh +2 -2
  71. package/pipeline/scripts/review-scope.mjs +94 -0
  72. package/pipeline/scripts/scan-agent-config.sh +2 -2
  73. package/pipeline/scripts/smoke-agent-log-cost.sh +1 -1
  74. package/pipeline/scripts/smoke-agent-model-routing.sh +4 -4
  75. package/pipeline/scripts/smoke-autopilot-circuit-breaker.sh +2 -2
  76. package/pipeline/scripts/smoke-channels-approval-gate.sh +2 -2
  77. package/pipeline/scripts/smoke-channels-flow.sh +5 -5
  78. package/pipeline/scripts/smoke-clarify.sh +1 -1
  79. package/pipeline/scripts/smoke-commands-skills-parity.sh +3 -3
  80. package/pipeline/scripts/smoke-community-gates.sh +1 -1
  81. package/pipeline/scripts/smoke-compliance-skills.sh +2 -2
  82. package/pipeline/scripts/smoke-cost-summary.sh +1 -1
  83. package/pipeline/scripts/smoke-cross-cli-behavior.sh +17 -43
  84. package/pipeline/scripts/smoke-cross-phase-cohesion.sh +1 -1
  85. package/pipeline/scripts/smoke-dev-critic.sh +1 -1
  86. package/pipeline/scripts/smoke-diff-explain.sh +1 -1
  87. package/pipeline/scripts/smoke-diff-risk.sh +1 -1
  88. package/pipeline/scripts/smoke-evidence-gate.sh +1 -1
  89. package/pipeline/scripts/smoke-figma-dispatch.sh +46 -57
  90. package/pipeline/scripts/smoke-gate-hooks.sh +1 -1
  91. package/pipeline/scripts/smoke-generate-issue.sh +8 -8
  92. package/pipeline/scripts/smoke-handoff-contract.sh +3 -3
  93. package/pipeline/scripts/smoke-identity-isolation.sh +2 -2
  94. package/pipeline/scripts/smoke-intent-guard.sh +1 -1
  95. package/pipeline/scripts/smoke-issue-comment-template.sh +2 -2
  96. package/pipeline/scripts/smoke-issue-jira-triad.sh +4 -4
  97. package/pipeline/scripts/smoke-language-axis.sh +6 -6
  98. package/pipeline/scripts/smoke-learnings-ledger.sh +3 -3
  99. package/pipeline/scripts/smoke-mode-dispatch-drift.sh +16 -16
  100. package/pipeline/scripts/smoke-model-fallback.sh +3 -3
  101. package/pipeline/scripts/smoke-multi-repo-integration.sh +2 -2
  102. package/pipeline/scripts/smoke-multi-repo-worktree.sh +1 -1
  103. package/pipeline/scripts/smoke-no-token-prompt.sh +5 -5
  104. package/pipeline/scripts/smoke-phase-0-multi-repo.sh +1 -1
  105. package/pipeline/scripts/smoke-phase-6-multi.sh +1 -1
  106. package/pipeline/scripts/smoke-phase4-gates.sh +45 -0
  107. package/pipeline/scripts/smoke-plan-approval-gate.sh +5 -5
  108. package/pipeline/scripts/smoke-plan-todos.sh +3 -3
  109. package/pipeline/scripts/smoke-pr-review-actions.sh +3 -3
  110. package/pipeline/scripts/smoke-prefs-language.sh +1 -1
  111. package/pipeline/scripts/smoke-progress-contract.sh +2 -2
  112. package/pipeline/scripts/smoke-push-retry.sh +1 -1
  113. package/pipeline/scripts/smoke-repo-map.sh +2 -2
  114. package/pipeline/scripts/smoke-shadow-git.sh +1 -1
  115. package/pipeline/scripts/smoke-skill-authoring.sh +4 -9
  116. package/pipeline/scripts/smoke-tasklist-ordering.sh +10 -10
  117. package/pipeline/scripts/smoke-test-gap.sh +1 -1
  118. package/pipeline/scripts/smoke-token-budget.sh +1 -1
  119. package/pipeline/scripts/smoke-token-preflight.sh +2 -2
  120. package/pipeline/scripts/smoke-tracker-contract.sh +13 -13
  121. package/pipeline/scripts/smoke-tracker-tokens-invocation.sh +5 -5
  122. package/pipeline/scripts/smoke-triage-memory.sh +2 -2
  123. package/pipeline/scripts/smoke-update-check.sh +1 -1
  124. package/pipeline/scripts/smoke-url-enrichment.sh +2 -2
  125. package/pipeline/scripts/smoke-validator-gates.sh +1 -1
  126. package/pipeline/scripts/smoke-verify-by-test.sh +3 -3
  127. package/pipeline/scripts/smoke-wiki-integration.sh +9 -33
  128. package/pipeline/scripts/smoke-work-summary.sh +1 -1
  129. package/pipeline/scripts/smoke-worktree-path-convention.sh +4 -4
  130. package/pipeline/scripts/test-integrity-gate.mjs +83 -0
  131. package/pipeline/scripts/uninstall.mjs +17 -6
  132. package/pipeline/skills/.skill-manifest.json +40 -160
  133. package/pipeline/skills/.skills-index.json +3 -373
  134. package/pipeline/skills/shared/README.md +1 -1
  135. package/pipeline/skills/shared/core/multi-agent/SKILL.md +1 -1
  136. package/pipeline/skills/shared/core/multi-agent-analysis/SKILL.md +2 -2
  137. package/pipeline/skills/shared/core/multi-agent-analysis-resolve/SKILL.md +3 -3
  138. package/pipeline/skills/shared/core/multi-agent-build-optimize/SKILL.md +1 -1
  139. package/pipeline/skills/shared/core/multi-agent-channels/SKILL.md +1 -1
  140. package/pipeline/skills/shared/core/multi-agent-finish/SKILL.md +1 -1
  141. package/pipeline/skills/shared/core/multi-agent-help/SKILL.md +1 -1
  142. package/pipeline/skills/shared/core/multi-agent-refactor/SKILL.md +116 -51
  143. package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +8 -30
  144. package/pipeline/skills/shared/external/compose-components/SKILL.md +14 -14
  145. package/pipeline/skills/skills-index.md +3 -44
  146. package/pipeline/commands/multi-agent/refactor.md +0 -188
  147. package/pipeline/commands/multi-agent/refs/component-dispatch.md +0 -92
  148. package/pipeline/scripts/smoke-existing-discovery-gate.sh +0 -71
  149. package/pipeline/scripts/smoke-figma-android-parity.sh +0 -148
  150. package/pipeline/scripts/smoke-figma-credential-store.sh +0 -105
  151. package/pipeline/scripts/smoke-figma-cross-cli-inventory.sh +0 -177
  152. package/pipeline/scripts/smoke-figma-sync.sh +0 -149
  153. package/pipeline/scripts/smoke-sync-delegation.sh +0 -74
  154. package/pipeline/skills/figma-android/README.md +0 -38
  155. package/pipeline/skills/figma-android/figma-component-code-connect/SKILL.md +0 -62
  156. package/pipeline/skills/figma-android/figma-component-implement/SKILL.md +0 -158
  157. package/pipeline/skills/figma-android/figma-component-test/SKILL.md +0 -120
  158. package/pipeline/skills/figma-android/figma-component-wiki/SKILL.md +0 -35
  159. package/pipeline/skills/figma-android/figma-to-component/SKILL.md +0 -124
  160. package/pipeline/skills/figma-common/README.md +0 -64
  161. package/pipeline/skills/figma-common/figma-bottom-sheets/SKILL.md +0 -152
  162. package/pipeline/skills/figma-common/figma-cli-iterate/SKILL.md +0 -282
  163. package/pipeline/skills/figma-common/figma-cli-iterate-mend/SKILL.md +0 -503
  164. package/pipeline/skills/figma-common/figma-cli-lean-iterate/SKILL.md +0 -288
  165. package/pipeline/skills/figma-common/figma-cli-skip/SKILL.md +0 -362
  166. package/pipeline/skills/figma-common/figma-commit/COMMON_REBASE.md +0 -206
  167. package/pipeline/skills/figma-common/figma-commit/REVIEW.md +0 -337
  168. package/pipeline/skills/figma-common/figma-commit/SKILL.md +0 -216
  169. package/pipeline/skills/figma-common/figma-component-confluence-sync/SKILL.md +0 -223
  170. package/pipeline/skills/figma-common/figma-component-start/SKILL.md +0 -251
  171. package/pipeline/skills/figma-common/figma-component-status-update/SKILL.md +0 -78
  172. package/pipeline/skills/figma-common/figma-evolve-component/SKILL.md +0 -61
  173. package/pipeline/skills/figma-common/figma-fix/SKILL.md +0 -321
  174. package/pipeline/skills/figma-common/figma-form-integration/SKILL.md +0 -542
  175. package/pipeline/skills/figma-common/figma-issue/SKILL.md +0 -750
  176. package/pipeline/skills/figma-common/figma-iterate/SKILL.md +0 -208
  177. package/pipeline/skills/figma-common/figma-iteration-commit/SKILL.md +0 -1020
  178. package/pipeline/skills/figma-common/figma-mend/SKILL.md +0 -331
  179. package/pipeline/skills/figma-common/figma-navigation/SKILL.md +0 -156
  180. package/pipeline/skills/figma-common/figma-overlays/SKILL.md +0 -142
  181. package/pipeline/skills/figma-common/figma-price-integration/SKILL.md +0 -398
  182. package/pipeline/skills/figma-common/figma-remote-mcp-auth/SKILL.md +0 -104
  183. package/pipeline/skills/figma-common/figma-review/SKILL.md +0 -400
  184. package/pipeline/skills/figma-common/figma-setup/SKILL.md +0 -514
  185. package/pipeline/skills/figma-common/figma-setup/scripts/fetch-mcp-token.py +0 -592
  186. package/pipeline/skills/figma-common/figma-skip/SKILL.md +0 -129
  187. package/pipeline/skills/figma-common/figma-ui-patterns/SKILL.md +0 -105
  188. package/pipeline/skills/figma-common/figma-ui-patterns/patterns/animated-gradient-border.md +0 -116
  189. package/pipeline/skills/figma-common/figma-utility/SKILL.md +0 -274
  190. package/pipeline/skills/figma-common/figma-utility/scripts/figma-utility.py +0 -808
  191. package/pipeline/skills/figma-common/figma-validate/SKILL.md +0 -633
  192. package/pipeline/skills/figma-common/performance-iteration-commit-all/SKILL.md +0 -716
  193. package/pipeline/skills/figma-common/performance-review-next/SKILL.md +0 -238
  194. package/pipeline/skills/figma-common/performance-start/SKILL.md +0 -430
  195. package/pipeline/skills/figma-common/performance-swiftui/SKILL.md +0 -706
  196. package/pipeline/skills/figma-common/performance-tour/SKILL.md +0 -423
  197. package/pipeline/skills/figma-ios/REVIEW_CHECKLIST.md +0 -67
  198. package/pipeline/skills/figma-ios/figma-component-code-connect/SKILL.md +0 -178
  199. package/pipeline/skills/figma-ios/figma-component-implement/SKILL.md +0 -184
  200. package/pipeline/skills/figma-ios/figma-component-test/SKILL.md +0 -219
  201. package/pipeline/skills/figma-ios/figma-component-wiki/SKILL.md +0 -274
  202. package/pipeline/skills/figma-ios/figma-to-component/SKILL.md +0 -416
  203. package/pipeline/skills/figma-ios/figma-to-component/halt-return-protocol.md +0 -57
  204. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-0-init.md +0 -307
  205. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-1-gathering.md +0 -119
  206. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-1.5-existing-discovery.md +0 -174
  207. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-2-orchestrator.md +0 -333
  208. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-2a-testing-identifiers.md +0 -368
  209. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-2b-localization.md +0 -393
  210. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-2c-accessibility.md +0 -617
  211. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-2d-analytics.md +0 -352
  212. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3-orchestrator.md +0 -337
  213. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3a-location.md +0 -206
  214. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3b-tokens.md +0 -235
  215. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3c-nested.md +0 -214
  216. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3d-patterns.md +0 -902
  217. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3e-assets.md +0 -156
  218. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3f-utilities.md +0 -175
  219. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3g-property-coverage.md +0 -176
  220. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3h-variant-config.md +0 -333
  221. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4-orchestrator.md +0 -412
  222. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4a-configuration.md +0 -336
  223. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4b-view.md +0 -705
  224. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4c-documentation.md +0 -332
  225. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4d-preview.md +0 -380
  226. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4e-modifiers.md +0 -262
  227. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-5-orchestrator.md +0 -482
  228. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-5a-viewinspector.md +0 -274
  229. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-5b-snapshot.md +0 -636
  230. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-5c-unit.md +0 -142
  231. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-6-code-connect.md +0 -547
  232. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-7-wiki.md +0 -39
  233. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-7a-confluence-generate.md +0 -659
  234. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-7a-wiki-generate.md +0 -580
  235. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-8-cleanup.md +0 -51
  236. package/pipeline/skills/figma-ios/figma-to-component/reference/accessibility.md +0 -183
  237. package/pipeline/skills/figma-ios/figma-to-component/reference/analytics-events.md +0 -64
  238. package/pipeline/skills/figma-ios/figma-to-component/reference/code-connect.md +0 -531
  239. package/pipeline/skills/figma-ios/figma-to-component/reference/confluence-api.md +0 -89
  240. package/pipeline/skills/figma-ios/figma-to-component/reference/confluence-xhtml.md +0 -155
  241. package/pipeline/skills/figma-ios/figma-to-component/reference/figma-to-swiftui-effects.md +0 -196
  242. package/pipeline/skills/figma-ios/figma-to-component/reference/halt-return-protocol.md +0 -57
  243. package/pipeline/skills/figma-ios/figma-to-component/reference/localization-naming.md +0 -89
  244. package/pipeline/skills/figma-ios/figma-to-component/reference/macros.md +0 -227
  245. package/pipeline/skills/figma-ios/figma-to-component/reference/missing-tokens.md +0 -157
  246. package/pipeline/skills/figma-ios/figma-to-component/reference/orchestrator-discipline.md +0 -90
  247. package/pipeline/skills/figma-ios/figma-to-component/reference/registry.md +0 -116
  248. package/pipeline/skills/figma-ios/figma-to-component/reference/remote-mcp-script.md +0 -153
  249. package/pipeline/skills/figma-ios/figma-to-component/reference/rest-api-script.md +0 -130
  250. package/pipeline/skills/figma-ios/figma-to-component/reference/scripts-inventory.md +0 -218
  251. package/pipeline/skills/figma-ios/figma-to-component/reference/snapshot-testing.md +0 -188
  252. package/pipeline/skills/figma-ios/figma-to-component/reference/subcomponent-graph.md +0 -93
  253. package/pipeline/skills/figma-ios/figma-to-component/reference/testing-identifiers-naming.md +0 -98
  254. package/pipeline/skills/figma-ios/figma-to-component/reference/tools.md +0 -261
  255. package/pipeline/skills/figma-ios/figma-to-component/reference/viewinspector.md +0 -147
  256. package/pipeline/skills/figma-ios/figma-to-component/reference/wiki-to-confluence-mapping.md +0 -182
  257. package/pipeline/skills/figma-ios/figma-to-component/scripts/apply-author-login-map.py +0 -185
  258. package/pipeline/skills/figma-ios/figma-to-component/scripts/backfill-status.py +0 -609
  259. package/pipeline/skills/figma-ios/figma-to-component/scripts/build-author-registry.py +0 -332
  260. package/pipeline/skills/figma-ios/figma-to-component/scripts/bulk-sync-issues.py +0 -261
  261. package/pipeline/skills/figma-ios/figma-to-component/scripts/code-connect-data-gather.py +0 -184
  262. package/pipeline/skills/figma-ios/figma-to-component/scripts/code-connect-publish.sh +0 -188
  263. package/pipeline/skills/figma-ios/figma-to-component/scripts/confluence-component-status-upload.py +0 -768
  264. package/pipeline/skills/figma-ios/figma-to-component/scripts/confluence-component-status.py +0 -191
  265. package/pipeline/skills/figma-ios/figma-to-component/scripts/confluence-data-gather.py +0 -420
  266. package/pipeline/skills/figma-ios/figma-to-component/scripts/confluence-page-ids.example.json +0 -9
  267. package/pipeline/skills/figma-ios/figma-to-component/scripts/confluence-publish.py +0 -336
  268. package/pipeline/skills/figma-ios/figma-to-component/scripts/figma-subcomponent-graph.py +0 -391
  269. package/pipeline/skills/figma-ios/figma-to-component/scripts/figma-update.py +0 -292
  270. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/__init__.py +0 -1
  271. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/issue_sync_propagate.py +0 -93
  272. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/registry_writer.py +0 -299
  273. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_backfill_status.py +0 -343
  274. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_figma_update.py +0 -206
  275. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_figma_update_http.py +0 -149
  276. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_phase_clis.py +0 -281
  277. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_registry_writer.py +0 -332
  278. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_skill_figma_issue.py +0 -176
  279. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_skill_figma_review.py +0 -98
  280. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_update_issue.py +0 -298
  281. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_update_issue_gh.py +0 -195
  282. package/pipeline/skills/figma-ios/figma-to-component/scripts/phase1-gather.py +0 -1298
  283. package/pipeline/skills/figma-ios/figma-to-component/scripts/phase2-finalize.py +0 -228
  284. package/pipeline/skills/figma-ios/figma-to-component/scripts/phase3-scripts.py +0 -1089
  285. package/pipeline/skills/figma-ios/figma-to-component/scripts/phase4-finalize.py +0 -141
  286. package/pipeline/skills/figma-ios/figma-to-component/scripts/phase5-finalize.py +0 -106
  287. package/pipeline/skills/figma-ios/figma-to-component/scripts/phase6-finalize.py +0 -162
  288. package/pipeline/skills/figma-ios/figma-to-component/scripts/phase7-finalize.py +0 -105
  289. package/pipeline/skills/figma-ios/figma-to-component/scripts/register-icons-codeconnect.py +0 -179
  290. package/pipeline/skills/figma-ios/figma-to-component/scripts/remote-mcp-fetch.py +0 -260
  291. package/pipeline/skills/figma-ios/figma-to-component/scripts/resolve-author-logins.py +0 -260
  292. package/pipeline/skills/figma-ios/figma-to-component/scripts/run-uicomponents-tests.sh +0 -86
  293. package/pipeline/skills/figma-ios/figma-to-component/scripts/sidebar-generator.py +0 -321
  294. package/pipeline/skills/figma-ios/figma-to-component/scripts/update-issue-from-registry.py +0 -1470
  295. package/pipeline/skills/figma-ios/figma-to-component/scripts/validate-phase4.sh +0 -176
  296. package/pipeline/skills/figma-ios/figma-to-component/scripts/validate-phase6.sh +0 -147
  297. package/pipeline/skills/figma-ios/figma-to-component/scripts/validate-phase7a.py +0 -629
  298. /package/pipeline/commands/multi-agent/{delete.md → delete/SKILL.md} +0 -0
  299. /package/pipeline/commands/multi-agent/{diff-explain.md → diff-explain/SKILL.md} +0 -0
  300. /package/pipeline/commands/multi-agent/{garbage-collect.md → garbage-collect/SKILL.md} +0 -0
  301. /package/pipeline/commands/multi-agent/{issue.md → issue/SKILL.md} +0 -0
  302. /package/pipeline/commands/multi-agent/{jira.md → jira/SKILL.md} +0 -0
  303. /package/pipeline/commands/multi-agent/{kill.md → kill/SKILL.md} +0 -0
  304. /package/pipeline/commands/multi-agent/{language.md → language/SKILL.md} +0 -0
  305. /package/pipeline/commands/multi-agent/{log.md → log/SKILL.md} +0 -0
  306. /package/pipeline/commands/multi-agent/{prune-logs.md → prune-logs/SKILL.md} +0 -0
  307. /package/pipeline/commands/multi-agent/{purge.md → purge/SKILL.md} +0 -0
  308. /package/pipeline/commands/multi-agent/{scan.md → scan/SKILL.md} +0 -0
  309. /package/pipeline/commands/multi-agent/{search.md → search/SKILL.md} +0 -0
  310. /package/pipeline/commands/multi-agent/{stack.md → stack/SKILL.md} +0 -0
  311. /package/pipeline/commands/multi-agent/{status.md → status/SKILL.md} +0 -0
  312. /package/pipeline/commands/multi-agent/{test.md → test/SKILL.md} +0 -0
  313. /package/pipeline/commands/multi-agent/{update.md → update/SKILL.md} +0 -0
  314. /package/pipeline/{commands/multi-agent → multi-agent-refs}/_input-parser.md +0 -0
  315. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/analysis-template.md +0 -0
  316. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/audit-guide.md +0 -0
  317. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/backend-guide.md +0 -0
  318. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/channels/confluence.md +0 -0
  319. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/channels/issue-comment.md +0 -0
  320. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/channels/pr-review-actions.md +0 -0
  321. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/channels/pr.md +0 -0
  322. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/conventions-defaults.md +0 -0
  323. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/autopilot-circuit-breaker.md +0 -0
  324. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/dev-critic.md +0 -0
  325. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/external-context-injection.md +0 -0
  326. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/model-fallback.md +0 -0
  327. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/plan-todos.md +0 -0
  328. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/prior-fix-detection.md +0 -0
  329. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/repo-map.md +0 -0
  330. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/shadow-git.md +0 -0
  331. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/frontend-guide.md +0 -0
  332. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/knowledge.md +0 -0
  333. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/multi-repo-integration-build.md +0 -0
  334. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/picker-contract.md +0 -0
  335. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/rules.md +0 -0
@@ -1,705 +0,0 @@
1
- # PHASE 4B - View Implementation + Preview
2
-
3
- Write the main View struct and Preview.
4
- This is the most critical implementation phase - it produces the actual SwiftUI component.
5
-
6
- required - always execute this phase.
7
- PARALLEL WITH: Phase 4A (Configuration), Phase 4C (FIGMA.md)
8
-
9
- ---
10
-
11
- ## CONTEXT VARIABLES
12
-
13
- These are provided by the orchestrator in the dispatch prompt:
14
- - `componentName` - e.g., "LabelBadge"
15
- - `componentLocation` - e.g., "Sources/UIComponents/.../LabelBadge/"
16
- - `artifactPath` - path to implementation artifacts
17
- - `nodeId` - Figma node ID
18
- - `fileKey` - Figma file key
19
- - `complexity` - SIMPLE or COMPLEX
20
- - `gitUser` - from `git config user.name`
21
- - `date` - current date in DD.MM.YYYY format
22
- - `issueNumber` - GitHub issue number (e.g., "340"). May be empty if not available.
23
-
24
- ---
25
-
26
- ## PRE-CHECK
27
-
28
- Read all required analysis files **in this order** (compact context first, large files last):
29
-
30
- ```
31
- {artifactPath}/pass1/component_summary.json → Component overview (~100 lines) - READ FIRST
32
- {artifactPath}/pass3/00_property_coverage.json → Property mandate (IMPLEMENT/SKIP/DEFER)
33
- {artifactPath}/pass3/07_implementation_spec.md → Compiled blueprint
34
- {artifactPath}/pass3/04b_component_architecture.md → API shape, enums, properties
35
- {artifactPath}/pass3/04c_variant_config_analysis.json → Boolean classifications, sub-component types (from 3H)
36
- {artifactPath}/pass3/02_token_mapping.md → Swift token usage patterns
37
- {artifactPath}/pass3/03_nested_components.md → Child component init signatures
38
- {artifactPath}/pass3/08_utility_integration.md → Testing IDs, accessibility, analytics
39
- {artifactPath}/pass3/04_patterns.md → Dimensions, variant examples
40
- {artifactPath}/pass1/screenshot.png → Visual reference
41
- {artifactPath}/pass1/design_context_response.json → Layout hierarchy (ONLY if needed for complex layout detail)
42
- ```
43
-
44
- If `component_summary.json` does not exist, fall back to reading `component_properties.json` directly.
45
- If `00_property_coverage.json` does not exist, proceed without it (backward compatibility with pre-3G components).
46
-
47
- Read macros reference:
48
- ```
49
- .instructions/figma/figma-to-swiftui/reference/macros.md
50
- ```
51
-
52
- Read effects conversion reference (shadows, blur, gradients, animations):
53
- ```
54
- .instructions/figma/figma-to-swiftui/reference/figma-to-swiftui-effects.md
55
- ```
56
-
57
- **(strict) CSS effect lookup:** If `design_context_response.json` contains any of `backdrop-blur-[...]`, `backdrop-filter`, `filter: blur(...)`, `box-shadow`, `linear-gradient(...deg, ...)`, you MUST apply the mapping from `figma-to-swiftui-effects.md` verbatim. Cite the section number in a code comment next to the translated line.
58
-
59
- **ANTI-PATTERN - do NOT reach for system Materials:** CSS `backdrop-blur-[Npx]` maps to `.blur(radius: N/2)` per effects-reference section2 - NOT to `.ultraThinMaterial`, `.regularMaterial`, or `.thinMaterial`. iOS Materials adapt their tint based on underlying content (darker on dark backgrounds, lighter on light) which does not match CSS `backdrop-filter` semantics. Use a plain gradient/fill + `.blur(radius:)` following the reference. If a stroke border must stay sharp, put it in an overlay above the blurred layer.
60
-
61
- If any required file is missing:
62
-
63
- ```
64
- STATUS: HALT
65
- PHASE: phase-4b
66
- GATE: PRE_CHECK
67
- REASON: Required artifacts missing.
68
- COMPLETED_GATES: []
69
- ARTIFACTS_CREATED: none
70
- USER_ACTION_REQUIRED: Run Phase 3 first.
71
- ```
72
-
73
- ---
74
-
75
- ## GATE 1: FILE_HEADER
76
-
77
- ```swift
78
- //
79
- // {ComponentName}.swift
80
- // UIComponents
81
- //
82
- // Created by {gitUser} on {date}.
83
- //
84
-
85
- import SwiftUI
86
- ```
87
-
88
- ### Import resolution
89
-
90
- Add imports based on what the component needs:
91
-
92
- | Condition | Import | When |
93
- |-----------|--------|------|
94
- | COMPLEX component | `import UIMacros` | @GenerateViewConfiguration macro |
95
- | Design tokens used | `import UIAssetTokens` | Color, Spacing, Radius, Font tokens |
96
- | Utility modifiers | `import UIComponentUtilities` | Testing IDs, accessibility, analytics |
97
- | Direct analytics | `import AnalyticsEvents` | Direct `.track()` calls |
98
- | Nested component from another module | `import {ModuleName}` | Cross-module dependency |
99
-
100
- ---
101
-
102
- ## GATE 2: CONSTANTS
103
-
104
- Extract ALL raw numbers from Figma metadata and design_context. No magic numbers in the body.
105
-
106
- INPUT: `pass3/04_patterns.md` → Dimensions section
107
- INPUT: `pass1/design_context_response.json` → any raw values (opacity, gradient stops, etc.)
108
-
109
- ```swift
110
- private enum Constants {
111
- static let width: CGFloat = {from metadata}
112
- static let height: CGFloat = {from metadata}
113
- // Only values NOT covered by design tokens
114
- // Do NOT duplicate token values here (spacing, radius, colors are tokens)
115
- }
116
- ```
117
-
118
- **Rules:**
119
- - Spacing values → use `.Spacing.spacingN` tokens, NOT constants
120
- - Radius values → use `.Radius.radiusN` tokens, NOT constants
121
- - Colors → use `Color.Namespace.tokenName` tokens, NOT constants
122
- - Only truly component-specific numbers go in Constants (opacity, gradient stops, fixed dimensions)
123
- - If no component-specific constants exist, omit the Constants enum entirely
124
-
125
- **Constants Placement Rule:**
126
- - Constants MUST be `private enum Constants` nested INSIDE the View struct, NOT at file scope
127
- - Place it as the first item inside the struct, before `// MARK: - Properties`
128
- - Token values (`.Spacing.*`, `.Radius.*`, `Color.*`, `.Size.*`) are used directly in the body - do NOT wrap them in Constants
129
-
130
- ---
131
-
132
- ## GATE 2.5: PROPERTY_MANDATE_CHECK
133
-
134
- **If `pass3/00_property_coverage.json` exists**, verify that every property with `status: "IMPLEMENT"` has a corresponding Swift init parameter or configuration property in the view being implemented.
135
-
136
- For each IMPLEMENT property:
137
- - VARIANT → must have an enum type and init parameter
138
- - BOOLEAN → must have a Bool parameter (or merged into Optional per Boolean Visibility Merge Rule)
139
- - TEXT → must have a String parameter
140
- - INSTANCE_SWAP → must have an Image?, AnyView?, or typed view parameter, OR be documented as fixed in FIGMA.md
141
-
142
- If any IMPLEMENT property is missing from the view's init:
143
-
144
- ```
145
- STATUS: HALT
146
- PHASE: phase-4b
147
- GATE: PROPERTY_MANDATE_CHECK
148
- REASON: IMPLEMENT property not exposed in view init.
149
- MISSING_PROPERTIES: [{list names and expected Swift types}]
150
- COMPLETED_GATES: [PRE_CHECK, FILE_HEADER, CONSTANTS, VIEW_STRUCT]
151
- ARTIFACTS_CREATED:
152
- - {componentLocation}/{ComponentName}.swift (partial)
153
- USER_ACTION_REQUIRED: Options:
154
- 1) Add the missing properties to the view
155
- 2) Update 00_property_coverage.json to mark as SKIP with reason
156
- ```
157
-
158
- If `00_property_coverage.json` does not exist, skip this gate (backward compatibility).
159
-
160
- ---
161
-
162
- ## GATE 3: VIEW_STRUCT
163
-
164
- > **Issue link:** If `issueNumber` is provided, include the `/// Issue:` doc comment line. If empty or not available, omit the line entirely.
165
-
166
- ### SIMPLE component (≤3 properties)
167
-
168
- ```swift
169
- /// {Brief description of component}
170
- ///
171
- /// Figma: [{ComponentName}](https://www.figma.com/design/{fileKey}/?node-id={nodeId})
172
- /// Issue: [#{issueNumber}](https://github.com/{github.componentsRepo}/issues/{issueNumber})
173
- public struct {ComponentName}: View {
174
- // MARK: - Properties
175
-
176
- {All properties from Final API Design - public let}
177
-
178
- // MARK: - Initialization
179
-
180
- public init(
181
- {param1}: {Type},
182
- {param2}: {Type} = {default}
183
- ) {
184
- self.{param1} = {param1}
185
- self.{param2} = {param2}
186
- }
187
-
188
- // MARK: - Body
189
-
190
- public var body: some View {
191
- {implementation}
192
- }
193
- }
194
- ```
195
-
196
- **CRITICAL - Type Placement:**
197
- - ALL component-specific enums/types MUST be nested inside the View struct (SIMPLE) or Configuration struct (COMPLEX)
198
- - **For COMPLEX components: ALL data model types MUST be defined inside `{ComponentName}Configuration`, NOT inside the View struct.** The View then exposes them via `public typealias` for backwards-compatible API: `public typealias MyType = {ComponentName}Configuration.MyType`
199
- - NEVER define them as top-level types outside the struct
200
- - NEVER define data model types inside a COMPLEX View struct - they belong in Configuration
201
- - Name them WITHOUT the component prefix: `Size` not `{ComponentName}Size`, `State` not `{ComponentName}State`
202
- - Extensions on nested types use `extension {ComponentName}.TypeName { }` after the struct closing brace
203
-
204
- For SIMPLE components, define enums inside the View struct:
205
-
206
- ```swift
207
- public struct {ComponentName}: View {
208
- // MARK: - Types
209
-
210
- public enum State: String, CaseIterable, Sendable {
211
- case active
212
- case inactive
213
- }
214
-
215
- // MARK: - Properties
216
-
217
- private let state: State
218
- // ...
219
- }
220
-
221
- // Extensions on nested types go after the struct
222
- extension {ComponentName}.State {
223
- var backgroundColor: Color {
224
- switch self {
225
- case .active: return .Success.n100
226
- case .inactive: return .Background.backgroundGrey
227
- }
228
- }
229
- }
230
- ```
231
-
232
- ### COMPLEX component (>3 properties)
233
-
234
- ```swift
235
- /// {Brief description of component}
236
- ///
237
- /// Figma: [{ComponentName}](https://www.figma.com/design/{fileKey}/?node-id={nodeId})
238
- /// Issue: [#{issueNumber}](https://github.com/{github.componentsRepo}/issues/{issueNumber})
239
- @GenerateViewConfiguration
240
- public struct {ComponentName}: View {
241
- // MARK: - Properties
242
-
243
- private let configuration: {ComponentName}Configuration
244
- // Closure dependencies (from always-present actions)
245
- private let primaryAction: () -> Void
246
- // Optional closure dependencies (from PAIRED_ACTION_SUBCOMPONENT)
247
- private var secondaryAction: (() -> Void)?
248
-
249
- // MARK: - Initialization
250
-
251
- public init({requiredDynamicProps}, {requiredClosures}) {
252
- self.configuration = .init({requiredDynamicProps})
253
- self.{closure} = {closure}
254
- }
255
-
256
- // MARK: - Body
257
-
258
- public var body: some View {
259
- {implementation}
260
- }
261
- }
262
- ```
263
-
264
- **CRITICAL for COMPLEX:**
265
- - `@GenerateViewConfiguration` macro generates ONLY:
266
- - `configured(_:)` method - post-init configuration transform
267
- - **AI writes the custom init** - the macro does NOT generate inits
268
- - **Phase 4E writes +Modifiers** - View-level forwarding modifiers (`.state()`, `.title()`, etc.) are written by AI in +Modifiers.swift because Swift macros cannot introspect the Configuration struct
269
- - Init includes **required dynamic props** as direct parameters + **required closures**
270
- - Optional props with defaults → set via chain modifiers (generated by macro)
271
- - Configuration is `private let` - the macro-generated `configured()` method reconstructs via init, not mutation
272
-
273
- **Init generation rules:**
274
- 1. **Required props** = Configuration props that have no sensible default (the component is meaningless without them). These become init parameters. AI infers this from component semantics, not from whether a default exists in config.
275
- 2. **Required closures** = Always-present actions (e.g., primary button action). These become init parameters.
276
- 3. **Optional config props** = Props with defaults or optional props. Set via chain modifiers, NOT init params.
277
- 4. **Paired action closures** = From `PAIRED_ACTION_SUBCOMPONENT`. NOT in init - set via paired modifiers.
278
-
279
- ### With dependencies (Bindings, ObservedObjects)
280
-
281
- ```swift
282
- @GenerateViewConfiguration
283
- public struct {ComponentName}: View {
284
- private let configuration: {ComponentName}Configuration
285
- @Binding private var isExpanded: Bool
286
-
287
- public init(isExpanded: Binding<Bool>, {requiredProps}) {
288
- self._isExpanded = isExpanded
289
- self.configuration = .init({requiredProps})
290
- }
291
-
292
- public var body: some View { ... }
293
- }
294
- ```
295
-
296
- ### Paired modifiers (from PAIRED_ACTION_SUBCOMPONENT)
297
-
298
- For each `PAIRED_ACTION_SUBCOMPONENT` from 3H, generate a View-level modifier that binds data + closure atomically:
299
-
300
- ```swift
301
- // 1 dynamic prop + action:
302
- public func secondaryButton(_ title: String, action: @escaping () -> Void) -> {ComponentName} {
303
- var copy = self.configured { $0.secondaryButtonTitle(title) }
304
- copy.secondaryAction = action
305
- return copy
306
- }
307
-
308
- // 2+ dynamic props + action:
309
- public func actionLink(_ config: {ComponentName}Configuration.ActionLinkConfiguration,
310
- action: @escaping () -> Void) -> {ComponentName} {
311
- var copy = self.configured { $0.actionLinkConfiguration(config) }
312
- copy.actionLinkAction = action
313
- return copy
314
- }
315
-
316
- // 0 dynamic props + action (fully static sub-component):
317
- public func dismissButton(action: @escaping () -> Void) -> {ComponentName} {
318
- var copy = self
319
- copy.dismissAction = action
320
- return copy
321
- }
322
- ```
323
-
324
- **NOTE:** Paired modifiers use `configured()` for the config part (reconstructs via init, keeps `let configuration`), then mutate only the closure property on the copy. Optional closure properties (`secondaryAction`, etc.) must be `var` on the View for this pattern.
325
-
326
- Place paired modifiers in the View file after the body, before Preview.
327
-
328
- ---
329
-
330
- ## GATE 4: BODY_IMPLEMENTATION
331
-
332
- INPUT: `pass1/design_context_response.json` → `code` field for layout structure
333
- INPUT: `pass3/02_token_mapping.md` → token usage patterns
334
- INPUT: `pass3/04b_component_architecture.md` → API shape
335
- INPUT: `pass1/screenshot.png` → visual reference
336
-
337
- ### 4.1 Layout translation
338
-
339
- Translate Figma layout to SwiftUI:
340
-
341
- | Figma | SwiftUI |
342
- |-------|---------|
343
- | Horizontal auto-layout | `HStack(spacing:)` |
344
- | Vertical auto-layout | `VStack(alignment:, spacing:)` |
345
- | Padding (uniform) | `.padding(.Spacing.spacingN)` |
346
- | Padding (per-side) | `.padding(.horizontal, .Spacing.spacingN)` |
347
- | Border radius | `.clipShape(RoundedRectangle(cornerRadius: .Radius.radiusN))` |
348
- | Background fill | `.background(Color.Namespace.token)` |
349
- | Fixed width | `.frame(width: Constants.width)` |
350
- | Hug contents | No frame modifier (natural sizing) |
351
- | Fill container | `.frame(maxWidth: .infinity)` |
352
-
353
- ### 4.2 Alignment rules
354
-
355
- Figma flex → SwiftUI alignment:
356
-
357
- | Figma | SwiftUI |
358
- |-------|---------|
359
- | `flex-start` / `left` | `.leading` |
360
- | `flex-end` / `right` | `.trailing` |
361
- | `center` | `.center` |
362
- | `space-between` | `Spacer()` between children |
363
-
364
- ### 4.3 Token application
365
-
366
- INPUT: `pass3/02_token_mapping.md`
367
-
368
- Apply Swift tokens from the mapping. Use the exact Swift usage patterns documented:
369
-
370
- ```swift
371
- // Typography
372
- Text(title)
373
- .typographyStyle(.smallBold)
374
-
375
- // Colors
376
- .foregroundStyle(Color.Text.textPrimary)
377
- .background(Color.Background.background)
378
-
379
- // Spacing
380
- .padding(.horizontal, .Spacing.spacing4)
381
- HStack(spacing: .Spacing.spacing8) { ... }
382
-
383
- // Radius
384
- .clipShape(RoundedRectangle(cornerRadius: .Radius.radius4))
385
- ```
386
-
387
- ### 4.4 Conditional rendering
388
-
389
- For optional properties and boolean toggles:
390
-
391
- ```swift
392
- // Optional content
393
- if let subtitle = configuration.subtitle {
394
- Text(subtitle)
395
- .typographyStyle(.captionRegular)
396
- }
397
-
398
- // Boolean toggle
399
- if configuration.showIcon, let icon = configuration.leftIcon {
400
- icon
401
- .resizable()
402
- .frame(width: Constants.iconSize, height: Constants.iconSize)
403
- }
404
- ```
405
-
406
- ### 4.5 Computed properties for state-driven styling
407
-
408
- When an enum drives visual changes (colors, icons), use computed properties:
409
-
410
- ```swift
411
- // MARK: - Computed Properties
412
-
413
- private var backgroundColor: Color {
414
- switch configuration.state {
415
- case .success: return .Success.n100
416
- case .warning: return .Warning.n100
417
- case .error: return .Error.n100
418
- case .standard: return .Background.backgroundGrey
419
- case .secondary: return .Badge.badgeBackgroundInfo
420
- }
421
- }
422
-
423
- private var textColor: Color {
424
- switch configuration.state {
425
- case .success: return .Text.textSuccess
426
- case .warning: return .Text.textWarning
427
- // ...
428
- }
429
- }
430
- ```
431
-
432
- ### 4.6 Nested component integration
433
-
434
- INPUT: `pass3/03_nested_components.md`
435
- INPUT: `pass3/04c_variant_config_analysis.json` → `staticProps` for boolean-gated sub-components
436
-
437
- Use EXACT init signatures from the nested components analysis:
438
-
439
- ```swift
440
- // From analysis: TextLink(_ text: String, action: () -> Void)
441
- TextLink(configuration.linkText, action: configuration.action)
442
-
443
- // From analysis: LabelBadge(text: String, state: LabelBadge.State)
444
- LabelBadge(text: statusText, state: .success)
445
- ```
446
-
447
- **For boolean-gated sub-components (KNOWN_SUBCOMPONENT / PAIRED_ACTION_SUBCOMPONENT):**
448
-
449
- Static props from 3H `staticProps` are hardcoded in the View body. Only dynamic props come from Configuration:
450
-
451
- ```swift
452
- // Secondary button: title is dynamic, style/size/colorTheme are static
453
- if let title = configuration.secondaryButtonTitle {
454
- TurkishButton { secondaryAction?() }
455
- .title(title)
456
- .style(.ghost) // static - hardcoded from 3H staticProps
457
- .size(.default) // static
458
- .colorTheme(.brand) // static
459
- }
460
- ```
461
-
462
- ### 4.7 Layer text - static vs dynamic
463
-
464
- Texts from Figma layers are classified in `pass3/04_patterns.md` (Layer Text Classification table) as STATIC or DYNAMIC.
465
-
466
- - **DYNAMIC** texts → MUST use the corresponding Configuration property: `Text(configuration.currencyCode)`, NOT `Text("TRY")`
467
- - **STATIC** texts → use localization key if available (`Text(.Price.totalAmount)`), or hardcode only if truly fixed structural text (separators like "/", operators like "+")
468
-
469
- **Never hardcode text that represents variable data.** If a text looks like sample data (a price, an amount, a percentage, a currency code, a date), it MUST come from a configuration property. If no matching property exists in the architecture, HALT - the architecture is incomplete.
470
-
471
- ### 4.7.1 Price pattern rendering
472
-
473
- When the architecture identifies a **price pattern** (section1.5.1 in Phase 3D), use `CurrencyTextRenderer` for rendering:
474
-
475
- ```swift
476
- // Create a style with the component's fonts
477
- let style = CurrencyTextStyle(
478
- currencyFont: .smallRegular,
479
- amountFont: .smallBold,
480
- color: .Text.textWhite
481
- )
482
-
483
- // Render as AttributedString - handles placement, formatting, grouping
484
- Text(CurrencyTextRenderer.attributedString(
485
- value: amount, // Double
486
- currencyCode: currencyCode, // String
487
- style: style
488
- ))
489
- ```
490
-
491
- Do NOT manually place currency code left/right - `CurrencyTextRenderer` resolves placement from `CurrencyFormatProvider`. Do NOT format the amount as String - pass `Double`, the renderer formats it.
492
-
493
- ### 4.7.1a Attributed text rendering (multi-font)
494
-
495
- When a text has mixed typography (section1.5.1a in Phase 3D), use `AttributedString.format()` from `UIExtensions`. The highlight value can be a dynamic prop or a localization key - use `.localized` (no args) to keep `%@` placeholders intact:
496
-
497
- ```swift
498
- // Highlight from localization key (static but styled differently)
499
- var highlight = AttributedString(LocalizationStringKey.Component.highlightKey.localized)
500
- highlight.font = .xSmallBold
501
- highlight.foregroundColor = .Text.textWhite
502
-
503
- // Template with %@ placeholder
504
- var template = AttributedString(LocalizationStringKey.Component.templateKey.localized)
505
- template.font = .xSmallRegular
506
- template.foregroundColor = .Text.textWhite
507
-
508
- Text(template.format(highlight))
509
- ```
510
-
511
- ### 4.7.2 Image asset rendering
512
-
513
- When the architecture identifies image assets (section1.5.2 in Phase 3D):
514
-
515
- **DYNAMIC images (remote):**
516
- ```swift
517
- import CoreUI
518
-
519
- // Use the remote image component from CoreUI
520
- RemoteImage(url: configuration.imageURL)
521
- .frame(width: Constants.imageWidth, height: Constants.imageHeight)
522
- .clipShape(RoundedRectangle(cornerRadius: .Radius.radius8))
523
- ```
524
-
525
- Do NOT embed Figma placeholder photos as bundled assets - they are sample data. The component takes a `URL` and loads the real image at runtime.
526
-
527
- **STATIC images (bundled):**
528
- ```swift
529
- // Use generated Image accessor from UIAssets
530
- Image.CategoryName.assetName
531
- .resizable()
532
- .frame(width: Constants.iconSize, height: Constants.iconSize)
533
- ```
534
-
535
- Static assets are added to `Shared/UIAssets/Images/` in mobile-common and regenerated via `generate-ui-assets` plugin.
536
-
537
- ### 4.7.3 Collapsible sections
538
-
539
- When a Figma component has expanded/collapsed variants (accordion, expandable card, FAQ item, disclosure group):
540
-
541
- - Use `@State private var isExpanded: Bool` (or `@Binding` if parent controls it)
542
- - **Arrow/chevron:** Rotate with `.rotationEffect(.degrees(isExpanded ? 180 : 0))` and animate with `.animation(.easeInOut(duration: 0.25), value: isExpanded)`
543
- - **Content:** Wrap in conditional with height transition:
544
- ```swift
545
- if isExpanded {
546
- contentView
547
- .transition(.opacity.combined(with: .move(edge: .top)))
548
- }
549
- ```
550
- - **Container:** Apply `.animation(.easeInOut(duration: 0.25), value: isExpanded)` on the outer VStack so SwiftUI animates the height change
551
- - **Tap:** Toggle via `.onTapGesture { withAnimation { isExpanded.toggle() } }` on the header row
552
-
553
- Do NOT use `DisclosureGroup` - it has limited styling control. Build the expand/collapse manually for pixel-perfect Figma match.
554
-
555
- ### 4.7.4 Interaction pattern rendering (navigation / overlays / bottom sheets)
556
-
557
- When the architecture identifies an **interaction pattern** (section1.5.4 in Phase 3D), read the matching skill and follow its "Integration with Phase 4B". The component **emits intent / takes a caller-owned binding - it never routes, presents an app-level overlay, or owns the sheet surface.** Native SwiftUI is the default; use a project system only when `figma-config` declares `ui.<system>`.
558
-
559
- - **Navigation** (`/figma-navigation`): emit a typed `output`/`onSelect` for push/detail/back; system back or `@Environment(\.dismiss)`; tab via a caller-owned `Binding`. Never hardcode `NavigationLink(destination: ConcreteScreen())` in a reusable component.
560
- - **Overlays** (`/figma-overlays`): the component emits `.saved` / `.removeRequested(id)`; the caller shows the toast/alert/modal. Native `.alert`/`.confirmationDialog` for 1-3 button dialogs; `.sheet(item:)` for a data modal card; rich content via a local `.sheet/.modal { }`. Loading is ref-counted with min-show. No `AnyView` through a center.
561
- - **Bottom sheets** (`/figma-bottom-sheets`): author the component as sheet **content**; the caller owns `isPresented`/`item` + `.presentationDetents([...])`. A pinned CTA is `.safeAreaInset(edge:.bottom)`, not a presented sheet. Multi-step = `NavigationStack` inside the sheet (native) or the project engine's nav sheet (custom).
562
-
563
- If `figma-config` sets `ui.navigationSystem`/`ui.overlaySystem`/`ui.sheetSystem` to `custom`, use that project's types (router/route enum/scene container, overlay center, branded/headless sheet modifiers) resolved from config - do not hardcode their names.
564
-
565
- ### 4.8 @ViewBuilder for complex conditional views
566
-
567
- ```swift
568
- @ViewBuilder
569
- private var iconView: some View {
570
- if let icon = configuration.leftIcon {
571
- icon
572
- .resizable()
573
- .frame(width: Constants.iconSize, height: Constants.iconSize)
574
- .foregroundStyle(textColor)
575
- }
576
- }
577
- ```
578
-
579
- ---
580
-
581
- ## GATE 5: UTILITY_INTEGRATION
582
-
583
- INPUT: `pass3/08_utility_integration.md`
584
-
585
- Apply utility modifiers from the Element-to-Utility Mapping table.
586
-
587
- ### 5.1 Testing identifiers
588
-
589
- ```swift
590
- import UIComponentUtilities
591
-
592
- // Static identifier
593
- someView
594
- .accessibilityIdentifier(.{ComponentName}.badge)
595
-
596
- // Dynamic identifier (list items)
597
- ForEach(items.indices, id: \.self) { index in
598
- ItemRow(item: items[index])
599
- .accessibilityIdentifier(.{ComponentName}.Item.row.with(index))
600
- }
601
- ```
602
-
603
- ### 5.2 Localization keys
604
-
605
- ```swift
606
- // Static text from localization key
607
- Text(.{ComponentName}.title)
608
-
609
- // Format string
610
- Text(String(format: LocalizationStringKey.{ComponentName}.subtitle.localized, count))
611
- ```
612
-
613
- If utility_integration says "No localization keys" → skip. Dynamic text uses caller-provided strings.
614
-
615
- ### 5.3 Accessibility
616
-
617
- INPUT: `pass3/08_utility_integration.md` → Accessibility section
618
-
619
- Apply ONLY what the analysis specifies. If the analysis says 0 accessibility keys and no modifiers, add NOTHING.
620
-
621
- **CRITICAL - No unnecessary accessibility annotations:**
622
- - Accessibility is for vision-impaired users to **navigate and use** the app
623
- - Ask: "Does a vision-impaired person need this information?" - if NO, do not add it
624
- - Do NOT generate per-enum-variant accessibility keys for visual state the user already knows (loyalty tier, color-coded status)
625
- - Do NOT add `localizedAccessibilityName` computed properties on enums unless Phase 2C explicitly defined those keys
626
- - If any accessibility text IS needed, it MUST use `LocalizedAccessibilityStringKey` - never hardcode English strings
627
-
628
- **Before adding ANY modifier, ask: "What breaks if I remove this?"** If the answer is "nothing", do not add it.
629
-
630
- ```swift
631
- // Decorative elements → hide from VoiceOver
632
- icon.accessibilityHidden(true)
633
-
634
- // Group children into single VoiceOver stop
635
- // SwiftUI reads visible Text automatically - do NOT add .accessibilityLabel on top
636
- .accessibilityElement(children: .combine)
637
-
638
- // Do NOT add .accessibilityLabel when SwiftUI reads visible text correctly
639
- // Do NOT add .accessibilityAddTraits(.isStaticText) to Text - SwiftUI already knows
640
- // Do NOT add .accessibilityRemoveTraits(.isButton) when there is no Button
641
- // Do NOT announce visual state (color) for non-interactive display components
642
- ```
643
-
644
- ### 5.4 Analytics
645
-
646
- ```swift
647
- // Button tracking (from snippet in utility_integration)
648
- .analyticsButton(
649
- id: UITestingIdentifierKey.{ComponentName}.submitButton.description,
650
- label: "Submit",
651
- type: .primary
652
- )
653
- ```
654
-
655
- If utility_integration says "No analytics events" → skip.
656
-
657
- ### 5.5 NO utilities
658
-
659
- If `pass3/08_utility_integration.md` shows all counts as 0, skip all utility modifiers.
660
- Do NOT invent utility modifiers that weren't specified in the analysis.
661
-
662
- ---
663
-
664
- ## VALIDATION CHECKLIST
665
-
666
- Before marking complete, verify:
667
-
668
- ```
669
- [ ] File exists at {componentLocation}/{ComponentName}.swift
670
- [ ] Correct file header (author, date, module name)
671
- [ ] Correct imports (UIMacros if COMPLEX, UIAssetTokens, UIComponentUtilities if needed)
672
- [ ] @GenerateViewConfiguration applied (if COMPLEX)
673
- [ ] Custom init present with required dynamic props + required closures (if COMPLEX)
674
- [ ] Paired modifiers present for each PAIRED_ACTION_SUBCOMPONENT from 3H
675
- [ ] Every config property (including data props from paired modifiers) will get a forwarding modifier in Phase 4E
676
- [ ] Static sub-component props hardcoded in body (from 3H staticProps)
677
- [ ] Manual init present (if SIMPLE - no macro)
678
- [ ] SwiftDoc with Figma link above struct declaration
679
- [ ] Constants enum: private, nested inside View struct, no raw numbers in body (or omitted if no component-specific constants)
680
- [ ] ALL tokens from pass3/02_token_mapping.md applied (no hardcoded colors/spacing/fonts)
681
- [ ] No hardcoded sample/placeholder text - all DYNAMIC layer texts use configuration properties (per pass3/04_patterns.md classification)
682
- [ ] Layout matches Figma: correct stacks, spacing, alignment, padding
683
- [ ] State-driven styling via computed properties (not inline switch in body)
684
- [ ] Nested components use exact init signatures from pass3/03_nested_components.md
685
- [ ] Testing identifiers applied per pass3/08_utility_integration.md (or skipped if 0)
686
- [ ] Accessibility modifiers applied per pass3/08_utility_integration.md (or skipped if 0)
687
- [ ] Analytics modifiers applied per pass3/08_utility_integration.md (or skipped if 0)
688
- [ ] No invented utility modifiers - only what analysis specifies
689
- [ ] NO Preview code in this file - Phase 4D handles Preview separately
690
- [ ] Every IMPLEMENT property from 00_property_coverage.json has a Swift init parameter (if coverage file exists)
691
- [ ] ALL types nested inside View or Configuration struct - no top-level enums
692
- ```
693
-
694
- ---
695
-
696
- ## SUCCESS OUTPUT
697
-
698
- ```
699
- STATUS: COMPLETE
700
- PHASE: phase-4b
701
- GATES_PASSED: [PRE_CHECK, FILE_HEADER, CONSTANTS, VIEW_STRUCT, BODY_IMPLEMENTATION, UTILITY_INTEGRATION]
702
- ARTIFACTS_CREATED:
703
- - {componentLocation}/{ComponentName}.swift
704
- SUMMARY: View implementation complete. {COMPLEXITY} component. {TOKEN_COUNT} tokens applied. {UTILITY_COUNT} utility modifiers. Preview handled by Phase 4D.
705
- ```