@mmerterden/multi-agent-pipeline 11.1.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 (342) hide show
  1. package/CHANGELOG.md +58 -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/_common.mjs +9 -1
  7. package/install/_dev-only-files.mjs +0 -6
  8. package/install/claude.mjs +45 -18
  9. package/install/copilot.mjs +16 -14
  10. package/install/templates/copilot-instructions.md +3 -3
  11. package/package.json +1 -1
  12. package/pipeline/commands/{multi-agent.md → multi-agent/SKILL.md} +39 -39
  13. package/pipeline/commands/multi-agent/{analysis.md → analysis/SKILL.md} +18 -18
  14. package/pipeline/commands/multi-agent/{analysis-resolve.md → analysis-resolve/SKILL.md} +4 -4
  15. package/pipeline/commands/multi-agent/{autopilot.md → autopilot/SKILL.md} +4 -4
  16. package/pipeline/commands/multi-agent/{build-optimize.md → build-optimize/SKILL.md} +1 -1
  17. package/pipeline/commands/multi-agent/{channels.md → channels/SKILL.md} +12 -12
  18. package/pipeline/commands/multi-agent/{dev.md → dev/SKILL.md} +4 -4
  19. package/pipeline/commands/multi-agent/{dev-autopilot.md → dev-autopilot/SKILL.md} +4 -4
  20. package/pipeline/commands/multi-agent/{dev-local.md → dev-local/SKILL.md} +5 -5
  21. package/pipeline/commands/multi-agent/{dev-local-autopilot.md → dev-local-autopilot/SKILL.md} +4 -4
  22. package/pipeline/commands/multi-agent/{finish.md → finish/SKILL.md} +6 -6
  23. package/pipeline/commands/multi-agent/{generate.md → generate/SKILL.md} +3 -3
  24. package/pipeline/commands/multi-agent/{help.md → help/SKILL.md} +4 -4
  25. package/pipeline/commands/multi-agent/{local.md → local/SKILL.md} +5 -5
  26. package/pipeline/commands/multi-agent/{local-autopilot.md → local-autopilot/SKILL.md} +5 -5
  27. package/pipeline/commands/multi-agent/{manual-test.md → manual-test/SKILL.md} +1 -1
  28. package/pipeline/commands/multi-agent/refactor/SKILL.md +257 -0
  29. package/pipeline/commands/multi-agent/{resume.md → resume/SKILL.md} +1 -1
  30. package/pipeline/commands/multi-agent/{review.md → review/SKILL.md} +5 -5
  31. package/pipeline/commands/multi-agent/{setup.md → setup/SKILL.md} +1 -1
  32. package/pipeline/commands/multi-agent/{sync.md → sync/SKILL.md} +20 -58
  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-stack-plugins.mjs +1 -1
  66. package/pipeline/scripts/fixtures/install-layout.tsv +6 -5
  67. package/pipeline/scripts/gen-mode-dispatch.mjs +3 -3
  68. package/pipeline/scripts/phase-banner.sh +2 -2
  69. package/pipeline/scripts/review-scope.mjs +94 -0
  70. package/pipeline/scripts/scan-agent-config.sh +2 -2
  71. package/pipeline/scripts/smoke-agent-log-cost.sh +1 -1
  72. package/pipeline/scripts/smoke-agent-model-routing.sh +4 -4
  73. package/pipeline/scripts/smoke-autopilot-circuit-breaker.sh +2 -2
  74. package/pipeline/scripts/smoke-channels-approval-gate.sh +2 -2
  75. package/pipeline/scripts/smoke-channels-flow.sh +5 -5
  76. package/pipeline/scripts/smoke-clarify.sh +1 -1
  77. package/pipeline/scripts/smoke-commands-skills-parity.sh +3 -3
  78. package/pipeline/scripts/smoke-community-gates.sh +1 -1
  79. package/pipeline/scripts/smoke-compliance-skills.sh +2 -2
  80. package/pipeline/scripts/smoke-cost-summary.sh +1 -1
  81. package/pipeline/scripts/smoke-cross-cli-behavior.sh +17 -43
  82. package/pipeline/scripts/smoke-cross-phase-cohesion.sh +1 -1
  83. package/pipeline/scripts/smoke-dev-critic.sh +1 -1
  84. package/pipeline/scripts/smoke-diff-explain.sh +1 -1
  85. package/pipeline/scripts/smoke-diff-risk.sh +1 -1
  86. package/pipeline/scripts/smoke-evidence-gate.sh +1 -1
  87. package/pipeline/scripts/smoke-figma-dispatch.sh +46 -57
  88. package/pipeline/scripts/smoke-gate-hooks.sh +1 -1
  89. package/pipeline/scripts/smoke-generate-issue.sh +8 -8
  90. package/pipeline/scripts/smoke-handoff-contract.sh +3 -3
  91. package/pipeline/scripts/smoke-identity-isolation.sh +2 -2
  92. package/pipeline/scripts/smoke-intent-guard.sh +1 -1
  93. package/pipeline/scripts/smoke-issue-comment-template.sh +2 -2
  94. package/pipeline/scripts/smoke-issue-jira-triad.sh +4 -4
  95. package/pipeline/scripts/smoke-language-axis.sh +6 -6
  96. package/pipeline/scripts/smoke-learnings-ledger.sh +3 -3
  97. package/pipeline/scripts/smoke-mode-dispatch-drift.sh +16 -16
  98. package/pipeline/scripts/smoke-model-fallback.sh +3 -3
  99. package/pipeline/scripts/smoke-multi-repo-integration.sh +2 -2
  100. package/pipeline/scripts/smoke-multi-repo-worktree.sh +1 -1
  101. package/pipeline/scripts/smoke-no-token-prompt.sh +5 -5
  102. package/pipeline/scripts/smoke-phase-0-multi-repo.sh +1 -1
  103. package/pipeline/scripts/smoke-phase-6-multi.sh +1 -1
  104. package/pipeline/scripts/smoke-phase4-gates.sh +45 -0
  105. package/pipeline/scripts/smoke-plan-approval-gate.sh +5 -5
  106. package/pipeline/scripts/smoke-plan-todos.sh +3 -3
  107. package/pipeline/scripts/smoke-pr-review-actions.sh +3 -3
  108. package/pipeline/scripts/smoke-prefs-language.sh +1 -1
  109. package/pipeline/scripts/smoke-progress-contract.sh +2 -2
  110. package/pipeline/scripts/smoke-push-retry.sh +1 -1
  111. package/pipeline/scripts/smoke-repo-map.sh +2 -2
  112. package/pipeline/scripts/smoke-shadow-git.sh +1 -1
  113. package/pipeline/scripts/smoke-skill-authoring.sh +4 -9
  114. package/pipeline/scripts/smoke-tasklist-ordering.sh +10 -10
  115. package/pipeline/scripts/smoke-test-gap.sh +1 -1
  116. package/pipeline/scripts/smoke-token-budget.sh +1 -1
  117. package/pipeline/scripts/smoke-token-preflight.sh +2 -2
  118. package/pipeline/scripts/smoke-tracker-contract.sh +13 -13
  119. package/pipeline/scripts/smoke-tracker-tokens-invocation.sh +5 -5
  120. package/pipeline/scripts/smoke-triage-memory.sh +2 -2
  121. package/pipeline/scripts/smoke-update-check.sh +1 -1
  122. package/pipeline/scripts/smoke-url-enrichment.sh +2 -2
  123. package/pipeline/scripts/smoke-validator-gates.sh +1 -1
  124. package/pipeline/scripts/smoke-verify-by-test.sh +3 -3
  125. package/pipeline/scripts/smoke-wiki-integration.sh +9 -33
  126. package/pipeline/scripts/smoke-work-summary.sh +1 -1
  127. package/pipeline/scripts/smoke-worktree-path-convention.sh +4 -4
  128. package/pipeline/scripts/test-integrity-gate.mjs +83 -0
  129. package/pipeline/scripts/uninstall.mjs +2 -2
  130. package/pipeline/skills/.skill-manifest.json +40 -160
  131. package/pipeline/skills/.skills-index.json +21 -372
  132. package/pipeline/skills/shared/README.md +1 -1
  133. package/pipeline/skills/shared/core/multi-agent/SKILL.md +1 -1
  134. package/pipeline/skills/shared/core/multi-agent-analysis/SKILL.md +2 -2
  135. package/pipeline/skills/shared/core/multi-agent-analysis-resolve/SKILL.md +3 -3
  136. package/pipeline/skills/shared/core/multi-agent-build-optimize/SKILL.md +1 -1
  137. package/pipeline/skills/shared/core/multi-agent-channels/SKILL.md +1 -1
  138. package/pipeline/skills/shared/core/multi-agent-finish/SKILL.md +1 -1
  139. package/pipeline/skills/shared/core/multi-agent-help/SKILL.md +1 -1
  140. package/pipeline/skills/shared/core/multi-agent-refactor/SKILL.md +116 -51
  141. package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +8 -30
  142. package/pipeline/skills/shared/external/backlog/BACKLOG.md +32 -0
  143. package/pipeline/skills/shared/external/backlog/SKILL.md +49 -0
  144. package/pipeline/skills/shared/external/compose-components/SKILL.md +14 -14
  145. package/pipeline/skills/shared/external/skill-creator/SKILL.md +48 -0
  146. package/pipeline/skills/shared/external/skill-creator/audit.md +59 -0
  147. package/pipeline/skills/shared/external/skill-creator/checklist.md +32 -0
  148. package/pipeline/skills/shared/external/skill-creator/examples.md +65 -0
  149. package/pipeline/skills/shared/external/skill-creator/label-check.md +43 -0
  150. package/pipeline/skills/shared/external/skill-creator/scripts/audit-panel.js +83 -0
  151. package/pipeline/skills/shared/external/skill-creator/template.md +67 -0
  152. package/pipeline/skills/skills-index.md +4 -43
  153. package/pipeline/commands/multi-agent/refactor.md +0 -188
  154. package/pipeline/commands/multi-agent/refs/component-dispatch.md +0 -92
  155. package/pipeline/scripts/smoke-existing-discovery-gate.sh +0 -71
  156. package/pipeline/scripts/smoke-figma-android-parity.sh +0 -148
  157. package/pipeline/scripts/smoke-figma-credential-store.sh +0 -105
  158. package/pipeline/scripts/smoke-figma-cross-cli-inventory.sh +0 -177
  159. package/pipeline/scripts/smoke-figma-sync.sh +0 -149
  160. package/pipeline/scripts/smoke-sync-delegation.sh +0 -74
  161. package/pipeline/skills/figma-android/README.md +0 -38
  162. package/pipeline/skills/figma-android/figma-component-code-connect/SKILL.md +0 -62
  163. package/pipeline/skills/figma-android/figma-component-implement/SKILL.md +0 -158
  164. package/pipeline/skills/figma-android/figma-component-test/SKILL.md +0 -120
  165. package/pipeline/skills/figma-android/figma-component-wiki/SKILL.md +0 -35
  166. package/pipeline/skills/figma-android/figma-to-component/SKILL.md +0 -124
  167. package/pipeline/skills/figma-common/README.md +0 -64
  168. package/pipeline/skills/figma-common/figma-bottom-sheets/SKILL.md +0 -152
  169. package/pipeline/skills/figma-common/figma-cli-iterate/SKILL.md +0 -282
  170. package/pipeline/skills/figma-common/figma-cli-iterate-mend/SKILL.md +0 -503
  171. package/pipeline/skills/figma-common/figma-cli-lean-iterate/SKILL.md +0 -288
  172. package/pipeline/skills/figma-common/figma-cli-skip/SKILL.md +0 -362
  173. package/pipeline/skills/figma-common/figma-commit/COMMON_REBASE.md +0 -206
  174. package/pipeline/skills/figma-common/figma-commit/REVIEW.md +0 -337
  175. package/pipeline/skills/figma-common/figma-commit/SKILL.md +0 -216
  176. package/pipeline/skills/figma-common/figma-component-confluence-sync/SKILL.md +0 -223
  177. package/pipeline/skills/figma-common/figma-component-start/SKILL.md +0 -251
  178. package/pipeline/skills/figma-common/figma-component-status-update/SKILL.md +0 -78
  179. package/pipeline/skills/figma-common/figma-evolve-component/SKILL.md +0 -61
  180. package/pipeline/skills/figma-common/figma-fix/SKILL.md +0 -321
  181. package/pipeline/skills/figma-common/figma-form-integration/SKILL.md +0 -542
  182. package/pipeline/skills/figma-common/figma-issue/SKILL.md +0 -750
  183. package/pipeline/skills/figma-common/figma-iterate/SKILL.md +0 -208
  184. package/pipeline/skills/figma-common/figma-iteration-commit/SKILL.md +0 -1020
  185. package/pipeline/skills/figma-common/figma-mend/SKILL.md +0 -331
  186. package/pipeline/skills/figma-common/figma-navigation/SKILL.md +0 -156
  187. package/pipeline/skills/figma-common/figma-overlays/SKILL.md +0 -142
  188. package/pipeline/skills/figma-common/figma-price-integration/SKILL.md +0 -398
  189. package/pipeline/skills/figma-common/figma-remote-mcp-auth/SKILL.md +0 -104
  190. package/pipeline/skills/figma-common/figma-review/SKILL.md +0 -400
  191. package/pipeline/skills/figma-common/figma-setup/SKILL.md +0 -514
  192. package/pipeline/skills/figma-common/figma-setup/scripts/fetch-mcp-token.py +0 -592
  193. package/pipeline/skills/figma-common/figma-skip/SKILL.md +0 -129
  194. package/pipeline/skills/figma-common/figma-ui-patterns/SKILL.md +0 -105
  195. package/pipeline/skills/figma-common/figma-ui-patterns/patterns/animated-gradient-border.md +0 -116
  196. package/pipeline/skills/figma-common/figma-utility/SKILL.md +0 -274
  197. package/pipeline/skills/figma-common/figma-utility/scripts/figma-utility.py +0 -808
  198. package/pipeline/skills/figma-common/figma-validate/SKILL.md +0 -633
  199. package/pipeline/skills/figma-common/performance-iteration-commit-all/SKILL.md +0 -716
  200. package/pipeline/skills/figma-common/performance-review-next/SKILL.md +0 -238
  201. package/pipeline/skills/figma-common/performance-start/SKILL.md +0 -430
  202. package/pipeline/skills/figma-common/performance-swiftui/SKILL.md +0 -706
  203. package/pipeline/skills/figma-common/performance-tour/SKILL.md +0 -423
  204. package/pipeline/skills/figma-ios/REVIEW_CHECKLIST.md +0 -67
  205. package/pipeline/skills/figma-ios/figma-component-code-connect/SKILL.md +0 -178
  206. package/pipeline/skills/figma-ios/figma-component-implement/SKILL.md +0 -184
  207. package/pipeline/skills/figma-ios/figma-component-test/SKILL.md +0 -219
  208. package/pipeline/skills/figma-ios/figma-component-wiki/SKILL.md +0 -274
  209. package/pipeline/skills/figma-ios/figma-to-component/SKILL.md +0 -416
  210. package/pipeline/skills/figma-ios/figma-to-component/halt-return-protocol.md +0 -57
  211. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-0-init.md +0 -307
  212. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-1-gathering.md +0 -119
  213. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-1.5-existing-discovery.md +0 -174
  214. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-2-orchestrator.md +0 -333
  215. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-2a-testing-identifiers.md +0 -368
  216. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-2b-localization.md +0 -393
  217. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-2c-accessibility.md +0 -617
  218. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-2d-analytics.md +0 -352
  219. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3-orchestrator.md +0 -337
  220. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3a-location.md +0 -206
  221. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3b-tokens.md +0 -235
  222. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3c-nested.md +0 -214
  223. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3d-patterns.md +0 -902
  224. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3e-assets.md +0 -156
  225. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3f-utilities.md +0 -175
  226. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3g-property-coverage.md +0 -176
  227. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3h-variant-config.md +0 -333
  228. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4-orchestrator.md +0 -412
  229. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4a-configuration.md +0 -336
  230. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4b-view.md +0 -705
  231. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4c-documentation.md +0 -332
  232. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4d-preview.md +0 -380
  233. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4e-modifiers.md +0 -262
  234. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-5-orchestrator.md +0 -482
  235. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-5a-viewinspector.md +0 -274
  236. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-5b-snapshot.md +0 -636
  237. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-5c-unit.md +0 -142
  238. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-6-code-connect.md +0 -547
  239. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-7-wiki.md +0 -39
  240. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-7a-confluence-generate.md +0 -659
  241. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-7a-wiki-generate.md +0 -580
  242. package/pipeline/skills/figma-ios/figma-to-component/phases/phase-8-cleanup.md +0 -51
  243. package/pipeline/skills/figma-ios/figma-to-component/reference/accessibility.md +0 -183
  244. package/pipeline/skills/figma-ios/figma-to-component/reference/analytics-events.md +0 -64
  245. package/pipeline/skills/figma-ios/figma-to-component/reference/code-connect.md +0 -531
  246. package/pipeline/skills/figma-ios/figma-to-component/reference/confluence-api.md +0 -89
  247. package/pipeline/skills/figma-ios/figma-to-component/reference/confluence-xhtml.md +0 -155
  248. package/pipeline/skills/figma-ios/figma-to-component/reference/figma-to-swiftui-effects.md +0 -196
  249. package/pipeline/skills/figma-ios/figma-to-component/reference/halt-return-protocol.md +0 -57
  250. package/pipeline/skills/figma-ios/figma-to-component/reference/localization-naming.md +0 -89
  251. package/pipeline/skills/figma-ios/figma-to-component/reference/macros.md +0 -227
  252. package/pipeline/skills/figma-ios/figma-to-component/reference/missing-tokens.md +0 -157
  253. package/pipeline/skills/figma-ios/figma-to-component/reference/orchestrator-discipline.md +0 -90
  254. package/pipeline/skills/figma-ios/figma-to-component/reference/registry.md +0 -116
  255. package/pipeline/skills/figma-ios/figma-to-component/reference/remote-mcp-script.md +0 -153
  256. package/pipeline/skills/figma-ios/figma-to-component/reference/rest-api-script.md +0 -130
  257. package/pipeline/skills/figma-ios/figma-to-component/reference/scripts-inventory.md +0 -218
  258. package/pipeline/skills/figma-ios/figma-to-component/reference/snapshot-testing.md +0 -188
  259. package/pipeline/skills/figma-ios/figma-to-component/reference/subcomponent-graph.md +0 -93
  260. package/pipeline/skills/figma-ios/figma-to-component/reference/testing-identifiers-naming.md +0 -98
  261. package/pipeline/skills/figma-ios/figma-to-component/reference/tools.md +0 -261
  262. package/pipeline/skills/figma-ios/figma-to-component/reference/viewinspector.md +0 -147
  263. package/pipeline/skills/figma-ios/figma-to-component/reference/wiki-to-confluence-mapping.md +0 -182
  264. package/pipeline/skills/figma-ios/figma-to-component/scripts/apply-author-login-map.py +0 -185
  265. package/pipeline/skills/figma-ios/figma-to-component/scripts/backfill-status.py +0 -609
  266. package/pipeline/skills/figma-ios/figma-to-component/scripts/build-author-registry.py +0 -332
  267. package/pipeline/skills/figma-ios/figma-to-component/scripts/bulk-sync-issues.py +0 -261
  268. package/pipeline/skills/figma-ios/figma-to-component/scripts/code-connect-data-gather.py +0 -184
  269. package/pipeline/skills/figma-ios/figma-to-component/scripts/code-connect-publish.sh +0 -188
  270. package/pipeline/skills/figma-ios/figma-to-component/scripts/confluence-component-status-upload.py +0 -768
  271. package/pipeline/skills/figma-ios/figma-to-component/scripts/confluence-component-status.py +0 -191
  272. package/pipeline/skills/figma-ios/figma-to-component/scripts/confluence-data-gather.py +0 -420
  273. package/pipeline/skills/figma-ios/figma-to-component/scripts/confluence-page-ids.example.json +0 -9
  274. package/pipeline/skills/figma-ios/figma-to-component/scripts/confluence-publish.py +0 -336
  275. package/pipeline/skills/figma-ios/figma-to-component/scripts/figma-subcomponent-graph.py +0 -391
  276. package/pipeline/skills/figma-ios/figma-to-component/scripts/figma-update.py +0 -292
  277. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/__init__.py +0 -1
  278. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/issue_sync_propagate.py +0 -93
  279. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/registry_writer.py +0 -299
  280. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_backfill_status.py +0 -343
  281. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_figma_update.py +0 -206
  282. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_figma_update_http.py +0 -149
  283. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_phase_clis.py +0 -281
  284. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_registry_writer.py +0 -332
  285. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_skill_figma_issue.py +0 -176
  286. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_skill_figma_review.py +0 -98
  287. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_update_issue.py +0 -298
  288. package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_update_issue_gh.py +0 -195
  289. package/pipeline/skills/figma-ios/figma-to-component/scripts/phase1-gather.py +0 -1298
  290. package/pipeline/skills/figma-ios/figma-to-component/scripts/phase2-finalize.py +0 -228
  291. package/pipeline/skills/figma-ios/figma-to-component/scripts/phase3-scripts.py +0 -1089
  292. package/pipeline/skills/figma-ios/figma-to-component/scripts/phase4-finalize.py +0 -141
  293. package/pipeline/skills/figma-ios/figma-to-component/scripts/phase5-finalize.py +0 -106
  294. package/pipeline/skills/figma-ios/figma-to-component/scripts/phase6-finalize.py +0 -162
  295. package/pipeline/skills/figma-ios/figma-to-component/scripts/phase7-finalize.py +0 -105
  296. package/pipeline/skills/figma-ios/figma-to-component/scripts/register-icons-codeconnect.py +0 -179
  297. package/pipeline/skills/figma-ios/figma-to-component/scripts/remote-mcp-fetch.py +0 -260
  298. package/pipeline/skills/figma-ios/figma-to-component/scripts/resolve-author-logins.py +0 -260
  299. package/pipeline/skills/figma-ios/figma-to-component/scripts/run-uicomponents-tests.sh +0 -86
  300. package/pipeline/skills/figma-ios/figma-to-component/scripts/sidebar-generator.py +0 -321
  301. package/pipeline/skills/figma-ios/figma-to-component/scripts/update-issue-from-registry.py +0 -1470
  302. package/pipeline/skills/figma-ios/figma-to-component/scripts/validate-phase4.sh +0 -176
  303. package/pipeline/skills/figma-ios/figma-to-component/scripts/validate-phase6.sh +0 -147
  304. package/pipeline/skills/figma-ios/figma-to-component/scripts/validate-phase7a.py +0 -629
  305. /package/pipeline/commands/multi-agent/{delete.md → delete/SKILL.md} +0 -0
  306. /package/pipeline/commands/multi-agent/{diff-explain.md → diff-explain/SKILL.md} +0 -0
  307. /package/pipeline/commands/multi-agent/{garbage-collect.md → garbage-collect/SKILL.md} +0 -0
  308. /package/pipeline/commands/multi-agent/{issue.md → issue/SKILL.md} +0 -0
  309. /package/pipeline/commands/multi-agent/{jira.md → jira/SKILL.md} +0 -0
  310. /package/pipeline/commands/multi-agent/{kill.md → kill/SKILL.md} +0 -0
  311. /package/pipeline/commands/multi-agent/{language.md → language/SKILL.md} +0 -0
  312. /package/pipeline/commands/multi-agent/{log.md → log/SKILL.md} +0 -0
  313. /package/pipeline/commands/multi-agent/{prune-logs.md → prune-logs/SKILL.md} +0 -0
  314. /package/pipeline/commands/multi-agent/{purge.md → purge/SKILL.md} +0 -0
  315. /package/pipeline/commands/multi-agent/{scan.md → scan/SKILL.md} +0 -0
  316. /package/pipeline/commands/multi-agent/{search.md → search/SKILL.md} +0 -0
  317. /package/pipeline/commands/multi-agent/{stack.md → stack/SKILL.md} +0 -0
  318. /package/pipeline/commands/multi-agent/{status.md → status/SKILL.md} +0 -0
  319. /package/pipeline/commands/multi-agent/{test.md → test/SKILL.md} +0 -0
  320. /package/pipeline/commands/multi-agent/{update.md → update/SKILL.md} +0 -0
  321. /package/pipeline/{commands/multi-agent → multi-agent-refs}/_input-parser.md +0 -0
  322. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/analysis-template.md +0 -0
  323. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/audit-guide.md +0 -0
  324. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/backend-guide.md +0 -0
  325. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/channels/confluence.md +0 -0
  326. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/channels/issue-comment.md +0 -0
  327. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/channels/pr-review-actions.md +0 -0
  328. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/channels/pr.md +0 -0
  329. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/conventions-defaults.md +0 -0
  330. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/autopilot-circuit-breaker.md +0 -0
  331. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/dev-critic.md +0 -0
  332. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/external-context-injection.md +0 -0
  333. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/model-fallback.md +0 -0
  334. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/plan-todos.md +0 -0
  335. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/prior-fix-detection.md +0 -0
  336. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/repo-map.md +0 -0
  337. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/shadow-git.md +0 -0
  338. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/frontend-guide.md +0 -0
  339. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/knowledge.md +0 -0
  340. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/multi-repo-integration-build.md +0 -0
  341. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/picker-contract.md +0 -0
  342. /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/rules.md +0 -0
@@ -1,141 +0,0 @@
1
- #!/usr/bin/env python3
2
- """phase4-finalize.py - Post-Phase 4 registry update.
3
-
4
- Marks status.<platform>.implemented in the component registry JSON after
5
- Phase 4 writes the .swift (or .kt) source file. Uses content-hash to skip
6
- version bumps on byte-identical re-runs.
7
-
8
- Usage:
9
- python3 phase4-finalize.py \\
10
- --node-id 5:17752 \\
11
- --component-name TurkishButton \\
12
- --source-file /path/to/TurkishButton.swift \\
13
- [--platform ios] \\
14
- [--registry-dir /path/to/Shared/Figma/Components]
15
-
16
- Exit codes:
17
- 0 - Success (registry updated, or no-op on byte-identical)
18
- 1 - Error (bad JSON, missing required flag, etc.)
19
- """
20
-
21
- import argparse
22
- import json
23
- import sys
24
- from pathlib import Path
25
-
26
- # Import the shared registry writer + issue-sync propagation helper
27
- sys.path.insert(0, str(Path(__file__).parent))
28
- from lib.registry_writer import set_implemented # noqa: E402
29
- from lib.issue_sync_propagate import propagate_to_issue, should_skip_sync # noqa: E402
30
-
31
-
32
- def find_repo_root() -> Path:
33
- """Walk up from cwd to find .git directory. Falls back to cwd."""
34
- p = Path.cwd()
35
- while p != p.parent:
36
- if (p / ".git").exists():
37
- return p
38
- p = p.parent
39
- return Path.cwd()
40
-
41
-
42
- def default_registry_dir() -> Path:
43
- return (
44
- find_repo_root()
45
- / "{repos.packagesContainer}"
46
- / "Packages"
47
- / "{project.slug}-common"
48
- / "Shared"
49
- / "Figma"
50
- / "Components"
51
- )
52
-
53
-
54
- def main() -> int:
55
- parser = argparse.ArgumentParser(
56
- description="Phase 4 finalize - update registry status.<platform>.implemented",
57
- )
58
- parser.add_argument("--node-id", required=True, help="Figma node ID (e.g. 5:17752)")
59
- parser.add_argument("--component-name", required=True, help="PascalCase component name")
60
- parser.add_argument(
61
- "--source-file",
62
- required=False,
63
- help="Path to the .swift/.kt file written by Phase 4. If provided, content hashing "
64
- "prevents spurious version bumps on byte-identical re-runs.",
65
- )
66
- parser.add_argument("--platform", default="ios", choices=["ios", "android"])
67
- parser.add_argument(
68
- "--registry-dir",
69
- required=False,
70
- help="Override registry directory (defaults to the {project.slug}-common path).",
71
- )
72
- parser.add_argument(
73
- "--updater",
74
- default="phase-4-view",
75
- help="String recorded in the registry's updatedBy field.",
76
- )
77
- parser.add_argument(
78
- "--no-sync",
79
- action="store_true",
80
- help="Skip the Projects V2 issue sync propagation step after the "
81
- "registry write. Useful for tests, CI dry-runs, or when the "
82
- "caller wants to batch-sync later.",
83
- )
84
- args = parser.parse_args()
85
-
86
- registry_dir = Path(args.registry_dir) if args.registry_dir else default_registry_dir()
87
-
88
- if not registry_dir.exists():
89
- print(
90
- f"ERROR: registry directory does not exist: {registry_dir}",
91
- file=sys.stderr,
92
- )
93
- return 1
94
-
95
- source_file = None
96
- if args.source_file:
97
- source_file = Path(args.source_file)
98
- if not source_file.exists():
99
- print(
100
- f"ERROR: --source-file does not exist: {source_file}",
101
- file=sys.stderr,
102
- )
103
- return 1
104
-
105
- try:
106
- impl_block = set_implemented(
107
- registry_dir=registry_dir,
108
- node_id=args.node_id,
109
- platform=args.platform,
110
- updater=args.updater,
111
- source_file=source_file,
112
- )
113
- except (OSError, json.JSONDecodeError, ValueError) as e:
114
- print(f"ERROR: {type(e).__name__}: {e}", file=sys.stderr)
115
- return 1
116
-
117
- node_id_dash = args.node_id.replace(":", "-")
118
- registry_file = registry_dir / f"{node_id_dash}.json"
119
- result = {
120
- "status": "ok",
121
- "action": "updated",
122
- "file": str(registry_file),
123
- "platform": args.platform,
124
- "implemented": impl_block,
125
- }
126
-
127
- # Propagate to GitHub issue + Projects V2 board (non-fatal on failure).
128
- if not args.no_sync and not should_skip_sync():
129
- sync = propagate_to_issue(
130
- node_id=args.node_id,
131
- platform=args.platform,
132
- registry_dir=registry_dir,
133
- )
134
- result["issue_sync"] = sync
135
-
136
- print(json.dumps(result, indent=2, ensure_ascii=False))
137
- return 0
138
-
139
-
140
- if __name__ == "__main__":
141
- sys.exit(main())
@@ -1,106 +0,0 @@
1
- #!/usr/bin/env python3
2
- """phase5-finalize.py - Post-Phase 5 registry update.
3
-
4
- Marks status.<platform>.tested=true in the component registry JSON after
5
- Phase 5 test waves (ViewInspector, snapshot, unit) complete successfully.
6
-
7
- The flag is recorded against the current status.<platform>.implemented.version,
8
- so if Phase 4 later re-runs and bumps the impl version, `tested` goes yellow
9
- until Phase 5 re-runs or the user acknowledges via a no-op re-run.
10
-
11
- Usage:
12
- python3 phase5-finalize.py \\
13
- --node-id 5:17752 \\
14
- [--platform ios] \\
15
- [--registry-dir /path/to/Shared/Figma/Components]
16
-
17
- Exit codes:
18
- 0 - Success
19
- 1 - Error
20
- """
21
-
22
- import argparse
23
- import json
24
- import sys
25
- from pathlib import Path
26
-
27
- sys.path.insert(0, str(Path(__file__).parent))
28
- from lib.registry_writer import set_flag # noqa: E402
29
- from lib.issue_sync_propagate import propagate_to_issue, should_skip_sync # noqa: E402
30
-
31
-
32
- def find_repo_root() -> Path:
33
- p = Path.cwd()
34
- while p != p.parent:
35
- if (p / ".git").exists():
36
- return p
37
- p = p.parent
38
- return Path.cwd()
39
-
40
-
41
- def default_registry_dir() -> Path:
42
- return (
43
- find_repo_root()
44
- / "{repos.packagesContainer}"
45
- / "Packages"
46
- / "{project.slug}-common"
47
- / "Shared"
48
- / "Figma"
49
- / "Components"
50
- )
51
-
52
-
53
- def main() -> int:
54
- parser = argparse.ArgumentParser(
55
- description="Phase 5 finalize - update registry status.<platform>.tested",
56
- )
57
- parser.add_argument("--node-id", required=True)
58
- parser.add_argument("--platform", default="ios", choices=["ios", "android"])
59
- parser.add_argument("--registry-dir", required=False)
60
- parser.add_argument("--updater", default="phase-5-test")
61
- parser.add_argument(
62
- "--no-sync",
63
- action="store_true",
64
- help="Skip the Projects V2 issue sync propagation step after the registry write.",
65
- )
66
- args = parser.parse_args()
67
-
68
- registry_dir = Path(args.registry_dir) if args.registry_dir else default_registry_dir()
69
- if not registry_dir.exists():
70
- print(f"ERROR: registry directory does not exist: {registry_dir}", file=sys.stderr)
71
- return 1
72
-
73
- try:
74
- tested_block = set_flag(
75
- registry_dir=registry_dir,
76
- node_id=args.node_id,
77
- platform=args.platform,
78
- flag="tested",
79
- updater=args.updater,
80
- )
81
- except (OSError, json.JSONDecodeError, ValueError) as e:
82
- print(f"ERROR: {type(e).__name__}: {e}", file=sys.stderr)
83
- return 1
84
-
85
- node_id_dash = args.node_id.replace(":", "-")
86
- result = {
87
- "status": "ok",
88
- "action": "updated",
89
- "file": str(registry_dir / f"{node_id_dash}.json"),
90
- "platform": args.platform,
91
- "tested": tested_block,
92
- }
93
-
94
- if not args.no_sync and not should_skip_sync():
95
- result["issue_sync"] = propagate_to_issue(
96
- node_id=args.node_id,
97
- platform=args.platform,
98
- registry_dir=registry_dir,
99
- )
100
-
101
- print(json.dumps(result, indent=2, ensure_ascii=False))
102
- return 0
103
-
104
-
105
- if __name__ == "__main__":
106
- sys.exit(main())
@@ -1,162 +0,0 @@
1
- #!/usr/bin/env python3
2
- """phase6-finalize.py - Post-Phase 6 registry update.
3
-
4
- Marks status.<platform>.codeConnect=true in the component registry JSON
5
- after `figma connect publish` succeeds. Also mirrors to the legacy
6
- top-level `codeConnect.{ios,android}` field so the Confluence status
7
- dashboard and register-icons-codeconnect.py keep working unchanged.
8
-
9
- CLI interface is BACKWARD-COMPATIBLE with the prior version of this
10
- script so `.instructions/figma/figma-to-swiftui/phases/phase-6-code-connect.md`
11
- can keep calling it verbatim - only the internals changed.
12
-
13
- Usage:
14
- python3 phase6-finalize.py \\
15
- --node-id 5:17752 \\
16
- --file-key ps4xrJzhn7WNbfkZs895Bi \\
17
- --component-name TurkishButton \\
18
- [--platform ios]
19
-
20
- Exit codes:
21
- 0 - Success
22
- 1 - Error
23
- """
24
-
25
- import argparse
26
- import json
27
- import sys
28
- from pathlib import Path
29
-
30
- sys.path.insert(0, str(Path(__file__).parent))
31
- from lib.registry_writer import set_flag # noqa: E402
32
- from lib.issue_sync_propagate import propagate_to_issue, should_skip_sync # noqa: E402
33
-
34
-
35
- def find_repo_root() -> Path:
36
- p = Path.cwd()
37
- while p != p.parent:
38
- if (p / ".git").exists():
39
- return p
40
- p = p.parent
41
- return Path.cwd()
42
-
43
-
44
- def default_registry_dir() -> Path:
45
- return (
46
- find_repo_root()
47
- / "{repos.packagesContainer}"
48
- / "Packages"
49
- / "{project.slug}-common"
50
- / "Shared"
51
- / "Figma"
52
- / "Components"
53
- )
54
-
55
-
56
- def ensure_legacy_shell(
57
- registry_file: Path,
58
- node_id: str,
59
- file_key: str,
60
- component_name: str,
61
- platform: str,
62
- ) -> str:
63
- """If the registry file is missing, create a minimal shell with the
64
- legacy fields that downstream scripts (confluence-component-status.py,
65
- register-icons-codeconnect.py) expect.
66
-
67
- Returns 'created' or 'existed'.
68
- """
69
- if registry_file.exists():
70
- return "existed"
71
-
72
- initial = {
73
- "nodeId": node_id,
74
- "fileKey": file_key,
75
- "componentName": {platform: component_name},
76
- "codeConnect": {"ios": False, "android": False},
77
- "confluence": {"page": None, "ios": None, "android": None},
78
- "testingIdentifiers": [],
79
- "localizationKeys": [],
80
- "accessibilityKeys": [],
81
- "analyticsEvents": [],
82
- }
83
- registry_file.parent.mkdir(parents=True, exist_ok=True)
84
- registry_file.write_text(
85
- json.dumps(initial, indent=2, ensure_ascii=False) + "\n",
86
- encoding="utf-8",
87
- )
88
- return "created"
89
-
90
-
91
- def main() -> int:
92
- parser = argparse.ArgumentParser(
93
- description="Phase 6 finalize - update registry codeConnect flag",
94
- )
95
- parser.add_argument("--node-id", required=True)
96
- parser.add_argument("--file-key", required=True)
97
- parser.add_argument("--component-name", required=True)
98
- parser.add_argument("--platform", default="ios", choices=["ios", "android"])
99
- parser.add_argument("--registry-dir", required=False)
100
- parser.add_argument("--updater", default="phase-6-code-connect")
101
- parser.add_argument(
102
- "--no-sync",
103
- action="store_true",
104
- help="Skip the Projects V2 issue sync propagation step after the registry write.",
105
- )
106
- args = parser.parse_args()
107
-
108
- registry_dir = Path(args.registry_dir) if args.registry_dir else default_registry_dir()
109
- if not registry_dir.exists():
110
- print(f"ERROR: registry directory does not exist: {registry_dir}", file=sys.stderr)
111
- return 1
112
-
113
- node_id_dash = args.node_id.replace(":", "-")
114
- registry_file = registry_dir / f"{node_id_dash}.json"
115
-
116
- # Back-compat: create the legacy shell if the file is missing
117
- try:
118
- shell_action = ensure_legacy_shell(
119
- registry_file=registry_file,
120
- node_id=args.node_id,
121
- file_key=args.file_key,
122
- component_name=args.component_name,
123
- platform=args.platform,
124
- )
125
- except OSError as e:
126
- print(f"ERROR: failed to create registry shell: {e}", file=sys.stderr)
127
- return 1
128
-
129
- # Delegate actual write to the shared library
130
- try:
131
- cc_block = set_flag(
132
- registry_dir=registry_dir,
133
- node_id=args.node_id,
134
- platform=args.platform,
135
- flag="codeConnect",
136
- updater=args.updater,
137
- )
138
- except (OSError, json.JSONDecodeError, ValueError) as e:
139
- print(f"ERROR: {type(e).__name__}: {e}", file=sys.stderr)
140
- return 1
141
-
142
- result = {
143
- "status": "ok",
144
- "action": "updated" if shell_action == "existed" else "created",
145
- "file": str(registry_file),
146
- "platform": args.platform,
147
- "codeConnect": cc_block,
148
- }
149
-
150
- if not args.no_sync and not should_skip_sync():
151
- result["issue_sync"] = propagate_to_issue(
152
- node_id=args.node_id,
153
- platform=args.platform,
154
- registry_dir=registry_dir,
155
- )
156
-
157
- print(json.dumps(result, indent=2, ensure_ascii=False))
158
- return 0
159
-
160
-
161
- if __name__ == "__main__":
162
- sys.exit(main())
@@ -1,105 +0,0 @@
1
- #!/usr/bin/env python3
2
- """phase7-finalize.py - Post-Phase 7 registry update.
3
-
4
- Marks status.<platform>.wiki=true in the component registry JSON after
5
- Phase 7 writes the wiki page for a component.
6
-
7
- Recorded against the current implemented.version, same yellow rule as
8
- tested/codeConnect.
9
-
10
- Usage:
11
- python3 phase7-finalize.py \\
12
- --node-id 5:17752 \\
13
- [--platform ios] \\
14
- [--registry-dir /path/to/Shared/Figma/Components]
15
-
16
- Exit codes:
17
- 0 - Success
18
- 1 - Error
19
- """
20
-
21
- import argparse
22
- import json
23
- import sys
24
- from pathlib import Path
25
-
26
- sys.path.insert(0, str(Path(__file__).parent))
27
- from lib.registry_writer import set_flag # noqa: E402
28
- from lib.issue_sync_propagate import propagate_to_issue, should_skip_sync # noqa: E402
29
-
30
-
31
- def find_repo_root() -> Path:
32
- p = Path.cwd()
33
- while p != p.parent:
34
- if (p / ".git").exists():
35
- return p
36
- p = p.parent
37
- return Path.cwd()
38
-
39
-
40
- def default_registry_dir() -> Path:
41
- return (
42
- find_repo_root()
43
- / "{repos.packagesContainer}"
44
- / "Packages"
45
- / "{project.slug}-common"
46
- / "Shared"
47
- / "Figma"
48
- / "Components"
49
- )
50
-
51
-
52
- def main() -> int:
53
- parser = argparse.ArgumentParser(
54
- description="Phase 7 finalize - update registry status.<platform>.wiki",
55
- )
56
- parser.add_argument("--node-id", required=True)
57
- parser.add_argument("--platform", default="ios", choices=["ios", "android"])
58
- parser.add_argument("--registry-dir", required=False)
59
- parser.add_argument("--updater", default="phase-7-wiki")
60
- parser.add_argument(
61
- "--no-sync",
62
- action="store_true",
63
- help="Skip the Projects V2 issue sync propagation step after the registry write.",
64
- )
65
- args = parser.parse_args()
66
-
67
- registry_dir = Path(args.registry_dir) if args.registry_dir else default_registry_dir()
68
- if not registry_dir.exists():
69
- print(f"ERROR: registry directory does not exist: {registry_dir}", file=sys.stderr)
70
- return 1
71
-
72
- try:
73
- wiki_block = set_flag(
74
- registry_dir=registry_dir,
75
- node_id=args.node_id,
76
- platform=args.platform,
77
- flag="wiki",
78
- updater=args.updater,
79
- )
80
- except (OSError, json.JSONDecodeError, ValueError) as e:
81
- print(f"ERROR: {type(e).__name__}: {e}", file=sys.stderr)
82
- return 1
83
-
84
- node_id_dash = args.node_id.replace(":", "-")
85
- result = {
86
- "status": "ok",
87
- "action": "updated",
88
- "file": str(registry_dir / f"{node_id_dash}.json"),
89
- "platform": args.platform,
90
- "wiki": wiki_block,
91
- }
92
-
93
- if not args.no_sync and not should_skip_sync():
94
- result["issue_sync"] = propagate_to_issue(
95
- node_id=args.node_id,
96
- platform=args.platform,
97
- registry_dir=registry_dir,
98
- )
99
-
100
- print(json.dumps(result, indent=2, ensure_ascii=False))
101
- return 0
102
-
103
-
104
- if __name__ == "__main__":
105
- sys.exit(main())
@@ -1,179 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Register Figma Code-Connected icons in the component registry.
4
-
5
- Reads FIGMA_ICONS from generate_icons.py and resolves Swift names from
6
- UIAssetsGeneratedTokens.swift to set proper componentName values:
7
- - ios: "Image.{swiftName}"
8
- - android: "Images.{swiftName}"
9
-
10
- Location: .instructions/figma/figma-to-swiftui/scripts/register-icons-codeconnect.py
11
- Usage: python3 .instructions/figma/figma-to-swiftui/scripts/register-icons-codeconnect.py
12
- """
13
-
14
- import json
15
- import os
16
- import re
17
- from datetime import date
18
-
19
- SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
20
- REPO_ROOT = os.path.abspath(os.path.join(SCRIPT_DIR, "..", "..", "..", ".."))
21
- CONFIG_PKG = os.path.join(
22
- REPO_ROOT, "{repos.packagesContainer}", "Packages",
23
- "{project.slug}-common"
24
- )
25
- REGISTRY_DIR = os.path.join(CONFIG_PKG, "Shared", "Figma", "Components")
26
- GENERATE_ICONS_PY = os.path.join(
27
- CONFIG_PKG, "iOS", "Sources", "UIAssets", "CodeConnect", "generate_icons.py"
28
- )
29
- TOKENS_FILE = os.path.join(
30
- CONFIG_PKG, "iOS", "Sources", "UIAssets", "Generated", "UIAssetsGeneratedTokens.swift"
31
- )
32
-
33
- FILE_KEY = "{FIGMA_FILE_KEY}"
34
- CONFLUENCE_PAGE = "{confluence.baseUrl}/display/{SPACE}/Custom+Icons"
35
- CONFLUENCE_PAGE_ID = "{CUSTOM_ICONS_PAGE_ID}"
36
- TODAY = date.today().isoformat()
37
-
38
-
39
- def build_swift_map(path):
40
- """Parse UIAssetsGeneratedTokens.swift: rawValue → swiftName (CustomIcons only)."""
41
- swift_map = {}
42
- with open(path, "r") as f:
43
- for line in f:
44
- m = re.match(r'\s+case\s+(\w+)\s*=\s*"([^"]+)"', line)
45
- if m:
46
- swift_name, raw_value = m.group(1), m.group(2)
47
- if "/" not in raw_value:
48
- swift_map[raw_value] = swift_name
49
- return swift_map
50
-
51
-
52
- def parse_figma_icons(path):
53
- """Parse FIGMA_ICONS list from generate_icons.py."""
54
- with open(path, "r") as f:
55
- content = f.read()
56
-
57
- match = re.search(r'FIGMA_ICONS\s*=\s*\[(.*?)\]', content, re.DOTALL)
58
- if not match:
59
- raise ValueError("Could not find FIGMA_ICONS in generate_icons.py")
60
-
61
- icons = []
62
- for m in re.finditer(r'\("([^"]+)",\s*"([^"]+)"\)', match.group(1)):
63
- icons.append((m.group(1), m.group(2)))
64
- return icons
65
-
66
-
67
- def make_registry_entry(node_id, figma_name, swift_name):
68
- """Create a registry JSON entry for an icon."""
69
- return {
70
- "nodeId": node_id,
71
- "componentName": {
72
- "ios": f"Image.{swift_name}",
73
- "android": f"Images.{swift_name}"
74
- },
75
- "skip": False,
76
- "codeConnect": {
77
- "ios": True,
78
- "android": True
79
- },
80
- "confluence": {
81
- "page": CONFLUENCE_PAGE,
82
- "pageId": CONFLUENCE_PAGE_ID,
83
- "ios": None,
84
- "android": None
85
- },
86
- "fileKey": FILE_KEY,
87
- "lastUpdated": TODAY,
88
- "updatedBy": "script:register-icons-codeconnect",
89
- "testingIdentifiers": [],
90
- "localizationKeys": [],
91
- "accessibilityKeys": [],
92
- "analyticsEvents": []
93
- }
94
-
95
-
96
- def main():
97
- swift_map = build_swift_map(TOKENS_FILE)
98
- print(f"Swift tokens: {len(swift_map)} CustomIcons entries")
99
-
100
- icons = parse_figma_icons(GENERATE_ICONS_PY)
101
- print(f"Parsed {len(icons)} icons from generate_icons.py")
102
-
103
- os.makedirs(REGISTRY_DIR, exist_ok=True)
104
-
105
- created = 0
106
- updated = 0
107
- unchanged = 0
108
- unmatched = 0
109
-
110
- for node_id, figma_name in icons:
111
- swift_name = swift_map.get(figma_name.strip())
112
- if not swift_name:
113
- unmatched += 1
114
- print(f" SKIP: {figma_name} ({node_id}) - no Swift match")
115
- continue
116
-
117
- ios_name = f"Image.{swift_name}"
118
- android_name = f"Images.{swift_name}"
119
-
120
- filename = node_id.replace(":", "-") + ".json"
121
- filepath = os.path.join(REGISTRY_DIR, filename)
122
-
123
- if os.path.exists(filepath):
124
- with open(filepath, "r") as f:
125
- existing = json.load(f)
126
-
127
- changed = False
128
-
129
- cc = existing.get("codeConnect", {})
130
- if not cc.get("ios", False):
131
- existing.setdefault("codeConnect", {})["ios"] = True
132
- changed = True
133
- if not cc.get("android", False):
134
- existing.setdefault("codeConnect", {})["android"] = True
135
- changed = True
136
-
137
- # Fix componentName to use resolved Swift names
138
- comp_name = existing.get("componentName", {})
139
- if comp_name.get("ios") != ios_name:
140
- existing.setdefault("componentName", {})["ios"] = ios_name
141
- changed = True
142
- if comp_name.get("android") != android_name:
143
- existing.setdefault("componentName", {})["android"] = android_name
144
- changed = True
145
-
146
- conf = existing.get("confluence", {})
147
- if conf.get("page") != CONFLUENCE_PAGE:
148
- existing.setdefault("confluence", {})["page"] = CONFLUENCE_PAGE
149
- existing["confluence"]["pageId"] = CONFLUENCE_PAGE_ID
150
- changed = True
151
-
152
- if existing.get("fileKey") != FILE_KEY:
153
- existing["fileKey"] = FILE_KEY
154
- changed = True
155
-
156
- if changed:
157
- existing["lastUpdated"] = TODAY
158
- existing["updatedBy"] = "script:register-icons-codeconnect"
159
- with open(filepath, "w") as f:
160
- json.dump(existing, f, indent=2, ensure_ascii=False)
161
- f.write("\n")
162
- updated += 1
163
- print(f" UPDATED: {filename} → {ios_name}")
164
- else:
165
- unchanged += 1
166
- else:
167
- entry = make_registry_entry(node_id, figma_name, swift_name)
168
- with open(filepath, "w") as f:
169
- json.dump(entry, f, indent=2, ensure_ascii=False)
170
- f.write("\n")
171
- created += 1
172
- print(f" CREATED: {filename} → {ios_name}")
173
-
174
- print(f"\nDone: {created} created, {updated} updated, {unchanged} unchanged, {unmatched} unmatched")
175
- print(f"Registry: {REGISTRY_DIR}")
176
-
177
-
178
- if __name__ == "__main__":
179
- main()