@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,633 +0,0 @@
1
- ---
2
- name: figma-validate
3
- description: "Pre-implementation validation for Figma components. Checks 7 criteria: (1) Registry presence, (2) Code Connect strategy, (3) Design token compliance, (4) Dependency readiness, (5) Atomic scope, (6) iOS applicability, (7) Already-implemented check. Plus Implementation Intel: complexity score, text node count, image detection, discarded version, wiki status, sibling progress. Target: ≤10s."
4
- user-invocable: true
5
- argument-hint: <figma-url> | <github-issue> | batch [--verbose]
6
- allowed-tools: Bash, Read, Glob, Grep, AskUserQuestion
7
- status: wip-v5
8
- sourced-from: upstream/figma-validate
9
- ---
10
-
11
- # /figma-validate - Pre-Implementation Component Validation
12
-
13
- ## Purpose
14
-
15
- Validates whether a Figma component is ready for the figma-to-swiftui implementation pipeline.
16
- Runs 6 criteria checks and returns a verdict: **VALID**, **CONDITIONAL**, or **INVALID**.
17
-
18
- This is a **read-only diagnostic skill** - it does NOT modify any files.
19
-
20
- ## Parameters
21
-
22
- | Parameter | Required | Description |
23
- |-----------|----------|-------------|
24
- | Figma URL | Yes (single mode) | `https://www.figma.com/design/{fileKey}/...?node-id={nodeId}` |
25
- | GitHub Issue | Yes (single mode) | Issue number from uicomponents repo (e.g., `#260`, `260`) |
26
- | `batch` | No | Validate all unimplemented components in registry |
27
- | `--verbose` | No | Show detailed property analysis per criterion |
28
-
29
- ```
30
- /figma-validate https://www.figma.com/design/ps4xrJzhn7WNbfkZs895Bi/?node-id=11400-406
31
- /figma-validate #260
32
- /figma-validate 260
33
- /figma-validate batch
34
- /figma-validate batch --verbose
35
- ```
36
-
37
- ---
38
-
39
- ## Constants
40
-
41
- ```bash
42
- REPO_ROOT="$(git rev-parse --show-toplevel)"
43
- COMMON_PATH="${REPO_ROOT}/{repos.common.path}"
44
- UICOMPONENTS_PATH="${REPO_ROOT}/{repos.components.path}"
45
- REGISTRY="${COMMON_PATH}/Shared/Figma/Generated/component-registry.json"
46
- REGISTRY_CONFIG="${COMMON_PATH}/Shared/Figma/figma-components-registry-config.json"
47
- GH_REPO="{github.componentsRepo}"
48
- ```
49
-
50
- ---
51
-
52
- ## Parse Arguments
53
-
54
- | Input Pattern | Mode | Action |
55
- |---------------|------|--------|
56
- | `https://www.figma.com/...` | **Single (URL)** | Extract fileKey + nodeId from URL |
57
- | `#N` or bare number | **Single (Issue)** | Fetch Figma URL from GitHub issue body |
58
- | `batch` | **Batch** | Validate all unimplemented registry components |
59
- | `batch --verbose` | **Batch Verbose** | Batch with full per-criterion details |
60
-
61
- ### Input Detection
62
-
63
- ```
64
- if input matches /^https:\/\/www\.figma\.com/ → URL mode
65
- if input matches /^#?\d+$/ → GitHub Issue mode
66
- if input == "batch" → Batch mode
67
- ```
68
-
69
- ### URL Parsing (URL mode)
70
-
71
- ```
72
- https://www.figma.com/design/{fileKey}/{fileName}?node-id={nodeId}
73
- ```
74
- Convert `-` to `:` in node-id (e.g., `11400-406` → `11400:406`).
75
-
76
- ### GitHub Issue Resolution (Issue mode)
77
-
78
- ```bash
79
- gh issue view <N> --repo ${GH_REPO} --json number,title,body
80
- ```
81
-
82
- Extract from the issue body:
83
- - **Figma URL** - from the line after `### Figma URL` heading
84
- - **Component Name** - from `### Component Name (PascalCase)` section (informational)
85
-
86
- ```python
87
- import json, re
88
- body = issue_data['body']
89
- # Extract Figma URL
90
- figma_match = re.search(r'### Figma URL\s+\n(https://www\.figma\.com/design/[^\s]+)', body)
91
- if figma_match:
92
- figma_url = figma_match.group(1)
93
- # Parse fileKey and nodeId from URL
94
- url_match = re.match(r'https://www\.figma\.com/design/([^/]+)/.*\?node-id=([^&\s]+)', figma_url)
95
- file_key = url_match.group(1)
96
- node_id = url_match.group(2).replace('-', ':')
97
- ```
98
-
99
- If Figma URL is not found or is `_No response_` → ask user for URL via AskUserQuestion.
100
-
101
- Print resolved info before proceeding to validation:
102
- ```
103
- ───────────────────────────────────────────
104
- Source: GitHub Issue #<N>
105
- Title: <issue_title>
106
- Figma URL: <extracted_url>
107
- File Key: <fileKey>
108
- Node ID: <nodeId>
109
- ───────────────────────────────────────────
110
- ```
111
-
112
- ---
113
-
114
- ## Validation Criteria
115
-
116
- Seven criteria are checked. Each returns ✅ (pass) or ❌ (fail) with a reason.
117
-
118
- ---
119
-
120
- ### Criterion 1 - Component Registry Presence
121
-
122
- **Question:** Component registry'de (`component-registry.json`) yer alıyor mu?
123
-
124
- **Check:**
125
-
126
- 1. Read `$REGISTRY` and search for an entry whose `nodeId` matches the parsed node ID.
127
- 2. If found → ✅ PASS. Record `name`, `fileName`, `pageName`, `parentPage`, `basePath`.
128
- 3. If not found → ❌ FAIL. Reason: "Component not found in registry. Run `FigmaRegistryUtility update` or verify the Figma URL."
129
-
130
- Also check `excludePatterns` in `$REGISTRY_CONFIG`:
131
- - If the component's `pageName` or `sectionName` matches an exclude pattern → ❌ FAIL. Reason: "Component is in an excluded page: {pageName}."
132
-
133
- **Known valid file keys** (from registry config):
134
- - `ps4xrJzhn7WNbfkZs895Bi` - Design System Core
135
- - `9ipBvrtsq9HlQ175B9k0wx` - Mobile App Components
136
- - `YSs4g0EeGAW53haB0zz5sa` - Visual Assets
137
-
138
- If the URL's `fileKey` does not match any of these → ❌ FAIL. Reason: "Unknown Figma file. Only Design System Core, Mobile App Components, and Visual Assets are supported."
139
-
140
- **Pass Condition:** Component exists in registry, is NOT in an excluded page, and belongs to a known Figma file.
141
-
142
- ---
143
-
144
- ### Criterion 2 - Figma Property Structure & Code Connect Strategy
145
-
146
- **Question:** Uygulanabilir bir Code Connect stratejisi var mı?
147
-
148
- **Check:**
149
-
150
- 1. Fetch component data via Figma REST API:
151
- ```python
152
- # Use python3 urllib.request - curl may be blocked by policy
153
- import subprocess, urllib.request, json
154
- token = subprocess.check_output(
155
- ["security", "find-generic-password", "-s", "FIGMA_ACCESS_TOKEN", "-w"],
156
- text=True
157
- ).strip()
158
- req = urllib.request.Request(
159
- f"https://api.figma.com/v1/files/{fileKey}/nodes?ids={nodeId}",
160
- headers={"X-Figma-Token": token}
161
- )
162
- data = json.loads(urllib.request.urlopen(req).read())
163
- ```
164
- 2. Determine the component type from the response:
165
- - **`COMPONENT_SET`** → has variants → classify properties:
166
- - Variant properties → `@FigmaEnum`
167
- - Text properties → `@FigmaString`
168
- - Boolean properties → `@FigmaBoolean`
169
- - Instance swap properties → `@FigmaInstance`
170
- - **`COMPONENT`** (plain, no variants) → uses **STATIC_VALUES** strategy
171
- 3. Determine Code Connect strategy:
172
-
173
- | Figma Type | Properties | Strategy | C2 Result |
174
- |------------|-----------|----------|-----------|
175
- | `COMPONENT_SET` | ≥1 property | Property Mapping | ✅ PASS |
176
- | `COMPONENT_SET` | 0 properties | Unexpected | ❌ FAIL |
177
- | `COMPONENT` | 0 properties | STATIC_VALUES | ✅ PASS |
178
- | `COMPONENT` | N/A | STATIC_VALUES | ✅ PASS |
179
-
180
- **Pass Condition:** Component has a valid Code Connect strategy - either property mapping (for COMPONENT_SET with ≥1 property) or STATIC_VALUES (for plain COMPONENT).
181
-
182
- **Output:** Always report the detected strategy in the result:
183
- - `✅ STATIC_VALUES - plain COMPONENT, no variant properties (uses static preview in .figma.swift)`
184
- - `✅ Property Mapping - 3 enum, 1 string, 2 bool`
185
- - `❌ COMPONENT_SET with 0 properties - unexpected, needs design review`
186
-
187
- **Warning Flags** (informational, not failures):
188
- - Property named `"Property 1"` → flag as `UNNAMED_PROPERTY`: "Unnamed property detected - design team should rename."
189
- - Property values with likely typos (e.g., `"Standart"`, `"Clasic Plus"`) → flag as `TYPO_DETECTED`.
190
-
191
- **Fallback:** If Figma API is unreachable, mark criterion as ⚠️ SKIPPED. Do NOT fail the entire validation.
192
-
193
- ---
194
-
195
- ### Criterion 3 - Design Token Compliance
196
-
197
- **Question:** Renkler/spacing/typography design token kullanıyor mu?
198
-
199
- **Check:**
200
-
201
- 1. From Figma node data, extract:
202
- - **Fill colors** - check if they correspond to known design token hex values
203
- - **Text styles** - check if they match `UIAssetTokens` typography styles
204
- - **Spacing values** - check if padding/gap values are standard multiples: 2, 4, 8, 12, 16, 24, 32, 48
205
- - **Corner radius** - check if values match known radius tokens: 4, 8, 12, 16, 24
206
- 2. Optionally cross-reference with the token index:
207
- ```bash
208
- cd "${COMMON_PATH}" && .build/debug/FigmaRegistryUtility uitoken-index 2>/dev/null
209
- ```
210
-
211
- **Pass Condition:** No hardcoded hex colors outside the design token palette. Spacing uses standard increments.
212
-
213
- **Soft Pass:** If token verification is not possible from the API response, mark as ⚠️ ASSUMED PASS with note: "Token compliance could not be fully verified from API - manual visual check recommended."
214
-
215
- ---
216
-
217
- ### Criterion 4 - Nested Dependency Readiness
218
-
219
- **Question:** Bağımlı olduğu alt bileşenler zaten implemente mi?
220
-
221
- **Check:**
222
-
223
- 1. From Figma node data, inspect child nodes for component instances (type `INSTANCE`).
224
- 2. For each child instance, extract its `componentId`.
225
- 3. **Resolve the componentId** to a searchable ID using the `components` metadata from the API response.
226
- 4. **Search for implementation** using the decision tree below.
227
-
228
- #### Step 3 - ComponentId Resolution (CRITICAL)
229
-
230
- Figma INSTANCE nodes reference a **variant's node ID** (`componentId`), NOT the COMPONENT_SET's node ID. The API response includes a `components` metadata map at `data.nodes[nodeId].components` that provides the `componentSetId` for each variant.
231
-
232
- ```python
233
- # API response structure
234
- api_components = data['nodes'][node_id].get('components', {})
235
-
236
- for component_id, name in unique_instances.items():
237
- meta = api_components.get(component_id, {})
238
- component_set_id = meta.get('componentSetId', '')
239
-
240
- # Resolution order:
241
- # 1. Try componentId directly in registry
242
- # 2. If not found AND componentSetId exists → try componentSetId in registry
243
- # 3. If still not found → try componentId in COMMON Components/{id}.json
244
- # 4. If still not found → search by component name in registry and COMMON
245
- # 5. If still not found → search Regroup/ by name
246
-
247
- search_ids = [component_id]
248
- if component_set_id:
249
- search_ids.append(component_set_id)
250
- ```
251
-
252
- **Why this matters:** A Logo component set registered as `nodeId=14:619` in the registry may be referenced via its variant `componentId=1338:1632` (e.g., `Color=White`). Without resolving through `componentSetId`, the lookup fails with a false "unknown" result.
253
-
254
- #### Dependency Resolution Decision Tree
255
-
256
- For each child `componentId`, look it up in the component registry (`component-registry.json`) by `nodeId`. Then apply this decision tree:
257
-
258
- ```
259
- ┌──────────────────────┐
260
- │ Found in registry? │
261
- └──────┬───────────────┘
262
- yes │ no
263
- ┌────────────┴──┐ ┌──────────────────────────────┐
264
- │ Check fileKey │ │ Check Components/{nodeId}.json│
265
- └──┬────────────┘ │ in COMMON_PATH │
266
- │ └──────────┬───────────────────┘
267
- ┌────────────┼────────────┐ found │ not found
268
- │ │ │ │ │
269
- VA (Y...sa) DSC (p...Bi) MAC (9...wx) ┌─────┴──────┐ UNKNOWN
270
- │ │ │ │status.ios. │ (warn)
271
- ▼ ▼ ▼ │implemented │
272
- COMMON UICOMP UICOMP │.value=true?│
273
- └──┬──────┬──┘
274
- yes│ no│
275
- COMMON UICOMP
276
- ```
277
-
278
- **File key mapping:**
279
-
280
- | File Key | File Name | Primary Location | Content Type |
281
- |----------|-----------|-----------------|--------------|
282
- | `YSs4g0EeGAW53haB0zz5sa` | Visual Assets | **COMMON** | Icons, Logos, Other Visual Assets |
283
- | `ps4xrJzhn7WNbfkZs895Bi` | Design System Core | **UICOMP** | Core UI components |
284
- | `9ipBvrtsq9HlQ175B9k0wx` | Mobile App Components | **UICOMP** | Flow-based / app-specific components |
285
-
286
- **Registry-based shortcuts** (parentPage check - no filesystem search needed):
287
-
288
- | `parentPage` value | Location | Verification |
289
- |--------------------|----------|-------------|
290
- | `"Icons"` | COMMON | ✅ Auto-pass (registered icon) |
291
- | `"Logos"` | COMMON | Check `Components/{nodeId}.json` or `Regroup/` |
292
- | `"Other Visual Assets"` | COMMON | Check `Components/{nodeId}.json` |
293
- | `"Components"`, `"-"`, `""` | UICOMP | Search `.figma.swift` on `iteration/develop` |
294
- | `"Flow Based Components"` | UICOMP | Search `.figma.swift` on `iteration/develop` |
295
-
296
- #### Verification per location
297
-
298
- **COMMON path** (`${COMMON_PATH}/Shared/Figma/`):
299
- ```bash
300
- # IMPORTANT: Search on iteration/develop, not current HEAD
301
- cd "${COMMON_PATH}"
302
- NODE_DASH="${nodeId//:/-}"
303
- # 1. Check Components/{nodeId}.json - new status.ios.implemented.value (architecture-update)
304
- # with legacy codeConnect.ios fallback for pre-backfill entries
305
- git show iteration/develop:Shared/Figma/Components/${NODE_DASH}.json 2>/dev/null | \
306
- python3 -c "
307
- import json,sys
308
- d = json.load(sys.stdin)
309
- # preferred: new status block
310
- ios = (d.get('status') or {}).get('ios') or {}
311
- impl = (ios.get('implemented') or {}).get('value')
312
- # fallback: legacy codeConnect.ios flag (kept in sync by registry_writer)
313
- if impl is None:
314
- impl = (d.get('codeConnect') or {}).get('ios', False)
315
- print('implemented:', bool(impl), 'skip:', d.get('skip', False))
316
- "
317
- # 2. Also search registry and component-catalog on iteration/develop
318
- git grep -l "${nodeId}" iteration/develop -- 'Shared/Figma/Generated/*.json' 2>/dev/null
319
- ```
320
-
321
- **UICOMP path** (`${UICOMPONENTS_PATH}/Sources/`):
322
- ```bash
323
- # IMPORTANT: Search on iteration/develop, not current HEAD
324
- cd "${UICOMPONENTS_PATH}"
325
- # 1. Search .figma.swift files for nodeId on iteration/develop
326
- git grep -l "${nodeId}" iteration/develop -- '*.figma.swift' 2>/dev/null
327
- # 2. Also check Regroup/ folder (logos that live in uicomponents)
328
- git ls-tree -r --name-only iteration/develop -- Sources/UIComponents/Regroup/ 2>/dev/null
329
- ```
330
-
331
- **Name-based fallback** (when ID lookups fail):
332
- ```bash
333
- # Use the component name from API metadata to search
334
- # Convert name: "Logo - Miles and Smiles" → "MilesAndSmilesLogo" or similar
335
- cd "${COMMON_PATH}"
336
- git grep -rl "${component_name}" iteration/develop -- 'Shared/Figma/Components/*.json' 2>/dev/null
337
- cd "${UICOMPONENTS_PATH}"
338
- git grep -rl "${component_name}" iteration/develop -- 'Sources/UIComponents/Regroup/' 2>/dev/null
339
- ```
340
-
341
- > **⚠️ IMPORTANT:** Both submodule pointers in the main repo's `develop` may lag behind their respective `iteration/develop` branches. Always search on `iteration/develop` using `git grep` / `git show` to avoid false negatives. This applies to **both** `{project.slug}-common` and `{project.slug}-components`.
342
-
343
- **Pass Condition:** ALL child component instances are either:
344
- - Already implemented (have a matching `.figma.swift` on `iteration/develop`), OR
345
- - Have `status.ios.implemented.value = true` in individual `Components/{nodeId}.json` (architecture-update model - with legacy `codeConnect.ios = true` as fallback for pre-backfill entries), OR
346
- - Listed under `parentPage: "Icons"` or `"Logos"` in the component registry, OR
347
- - Found in `Regroup/` folder (cross-file logos like `MilesAndSmilesLogo`), OR
348
- - Marked as skipped in registry (`skip: true`), OR
349
- - Built-in SwiftUI primitives (Text, Image, Shape, etc.)
350
-
351
- **Fail Condition:** One or more child components are unimplemented AND not skipped.
352
- List the missing dependencies with their Figma names and node IDs.
353
-
354
- ---
355
-
356
- ### Criterion 5 - Atomic Component Scope
357
-
358
- **Question:** Atomic (tek başına anlamlı) bir UI parçası mı?
359
-
360
- **Check:**
361
-
362
- 1. From registry data, check `parentPage`:
363
- - `"Components"` or empty → likely atomic ✅
364
- - `"Flow Based Components"` → check further (could be a section of a screen)
365
- 2. From Figma node data, check dimensions:
366
- - Width > 500 AND height > 800 → likely a full screen ❌
367
- 3. Check variant count from component properties:
368
- - 2-50 variant combinations → reasonable ✅
369
- - 0-1 variants → acceptable for STATIC_VALUES components - ⚠️ warn but pass
370
- - 500+ variants → likely needs splitting ❌
371
- 4. Check component name depth:
372
- - Name contains `/` separators with 4+ levels (e.g., `A/B/C/D/E`) → ⚠️ warn, may be deeply nested subcomponent
373
-
374
- **Pass Condition:** Not a full screen, has reasonable variant count, represents a reusable UI piece.
375
-
376
- ---
377
-
378
- ### Criterion 6 - iOS Platform Applicability
379
-
380
- **Question:** iOS platformu için geçerli mi (Hover-only değil)?
381
-
382
- **Check:**
383
-
384
- 1. From component properties, check if ALL variant values are hover/desktop-only:
385
- - If the ONLY states available are `Hover` → ❌ FAIL (iOS doesn't have hover)
386
- - If a `Channel` property exists and has ONLY `Desktop` or `Web` values → ❌ FAIL
387
- 2. Check page mapping:
388
- - Component on a page containing `"iOS"` in registry `pageIdMappings` → ✅ platform-specific, OK
389
- - No platform indicator → ✅ assumed cross-platform
390
- 3. Check for web-only component patterns in the name:
391
- - `"Breadcrumb"`, `"Sidebar"`, `"Tooltip/Hover"` → ⚠️ flag for review but don't auto-fail
392
-
393
- **Pass Condition:** Component is usable on iOS - has non-hover states and is not desktop-only.
394
-
395
- ---
396
-
397
- ### Criterion 7 - Already Implemented Check
398
-
399
- **Question:** Bu component zaten implemente edilmiş mi?
400
-
401
- **Check:**
402
-
403
- 1. During the `os.walk` in C4, also search for files matching the component name or nodeId in `${UICOMPONENTS_PATH}/Sources/` (excluding `Discarded/`).
404
- 2. Match criteria:
405
- - A `.figma.swift` file containing the component's `nodeId`
406
- - A `.swift` file whose name matches the component's last path segment (e.g., `MilesDestination.swift` for `Explore/ProgramWorld/MilesDestination`)
407
- 3. If found → ❌ FAIL. Reason: "Component is already implemented at {path}. Use `/figma-mend` to re-implement or skip."
408
- 4. If not found → ✅ PASS.
409
-
410
- **Pass Condition:** No existing Swift implementation found for this component (excluding `Discarded/`).
411
-
412
- **Note:** This criterion prevents double-implementation. If the component exists in `Discarded/`, C7 still passes but an `MEND_CANDIDATE` info flag is raised in Implementation Intel.
413
-
414
- ---
415
-
416
- ## Implementation Intel (Non-Blocking Info Section)
417
-
418
- These are computed from data already in memory (registry, API response, filesystem walk) with **zero additional cost**. They appear below the verdict box as `📊 Implementation Intel`.
419
-
420
- ### Complexity Score
421
-
422
- Recursive node count + max depth from the API node tree:
423
- ```python
424
- def complexity(n, depth=0):
425
- children = n.get('children', [])
426
- count = len(children)
427
- max_d = depth
428
- for c in children:
429
- cc, cd = complexity(c, depth + 1)
430
- count += cc
431
- max_d = max(max_d, cd)
432
- return count, max_d
433
-
434
- total_nodes, max_depth = complexity(node)
435
- # S: <15 nodes | M: 15-40 | L: 40-100 | XL: >100
436
- ```
437
-
438
- ### Text Node Count (Localization Estimate)
439
-
440
- Count nodes with `type == 'TEXT'` in the tree → approximate localization key count.
441
-
442
- ### Image/Asset Detection
443
-
444
- Check for `IMAGE` fill types or image-related children → signals need for `AsyncImage`/Kingfisher.
445
-
446
- ### Discarded Version Check
447
-
448
- During C4/C7 filesystem walk, if a match is found under `Discarded/` → flag as `MEND_CANDIDATE` with the path. Signals `/figma-mend` should be used instead of `/figma-to-swiftui`.
449
-
450
- ### Wiki Documentation Status
451
-
452
- Check if a wiki markdown file exists at:
453
- ```
454
- ${REPO_ROOT}/{repos.wiki.path}/FigmaComponents/
455
- ```
456
- Matching the component name pattern.
457
-
458
- ### Sibling Page Progress
459
-
460
- From registry, count how many components on the same `pageName` are implemented vs total. Useful for batch planning.
461
-
462
- ---
463
-
464
- ## Scoring & Verdict
465
-
466
- | Score | Verdict | Meaning |
467
- |-------|---------|---------|
468
- | 7/7 ✅ | **VALID** | Ready for `/figma-to-swiftui` implementation pipeline |
469
- | 6/7 ✅ | **CONDITIONAL** | One criterion failed - may be resolvable |
470
- | 5/7 or below | **INVALID** | Not ready - requires design-side changes or scope adjustment |
471
-
472
- **Note on ⚠️ SKIPPED criteria:** A skipped criterion (e.g., Figma API unreachable) counts as a pass for scoring purposes but is noted in the output.
473
-
474
- ---
475
-
476
- ## Output Format
477
-
478
- ### Single Mode
479
-
480
- ```
481
- ╔══════════════════════════════════════════════════════════════╗
482
- ║ FIGMA COMPONENT VALIDATION ║
483
- ╠══════════════════════════════════════════════════════════════╣
484
- ║ Component: {componentName} ║
485
- ║ Node ID: {nodeId} ║
486
- ║ File: {fileName} ║
487
- ║ Page: {pageName} ║
488
- ╠══════════════════════════════════════════════════════════════╣
489
- ║ ║
490
- ║ 1. Registry Presence ✅ Found in Design System Core║
491
- ║ 2. Code Connect Strategy ✅ Property Mapping (3e,1s,2b)║
492
- ║ 3. Design Token Compliance ⚠️ Assumed (API limit) ║
493
- ║ 4. Dependency Readiness ✅ All 2 deps implemented ║
494
- ║ 5. Atomic Scope ✅ 12 variants, 354×265 ║
495
- ║ 6. iOS Applicability ✅ Has mobile states ║
496
- ║ 7. Already Implemented ✅ No existing implementation ║
497
- ║ ║
498
- ║ ────────────────────────────────────────────────────────── ║
499
- ║ VERDICT: ✅ VALID (7/7) ║
500
- ║ Ready for /figma-to-swiftui ║
501
- ╚══════════════════════════════════════════════════════════════╝
502
-
503
- 📊 Implementation Intel:
504
- - Complexity: M (28 nodes, depth 4)
505
- - Text nodes: 5 → ~5 localization keys
506
- - Images: 1 image fill → needs AsyncImage
507
- - Discarded: No previous version
508
- - Wiki: ✅ Documentation exists
509
- - Page progress: Explore 12/18 (67%)
510
-
511
- ⚠️ Warnings:
512
- - UNNAMED_PROPERTY: "Property 1" detected - design team should rename
513
- ```
514
-
515
- If `--verbose`, expand each criterion with detailed findings.
516
-
517
- ### Batch Mode
518
-
519
- ```
520
- ## Batch Validation Results
521
-
522
- | # | Component | File | C1 | C2 | C3 | C4 | C5 | C6 | C7 | Score | Verdict |
523
- |---|-----------|------|----|----|----|----|----|----|----|-------|---------|
524
- | 1 | TextBadge | DSC | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | 7/7 | VALID |
525
- | 2 | FooBar | MAC | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | 6/7 | COND. |
526
- ...
527
-
528
- ### Summary
529
- - VALID: X components
530
- - CONDITIONAL: Y components
531
- - INVALID: Z components
532
- ```
533
-
534
- ---
535
-
536
- ## Warning Flags (Informational, Non-Blocking)
537
-
538
- These are logged but do NOT affect the VALID/INVALID verdict:
539
-
540
- | Flag | Description |
541
- |------|-------------|
542
- | `UNNAMED_PROPERTY` | Figma property named "Property 1" - tasarımcı rename etmeli |
543
- | `TYPO_DETECTED` | Variant value appears misspelled (e.g., "Standart", "Clasic Plus") |
544
- | `DESKTOP_CHANNEL` | Component has Desktop/Web channel mapping - iOS'ta kullanılmaz |
545
- | `MEND_CANDIDATE` | A previous implementation exists in `Discarded/` - use `/figma-mend` instead |
546
- | `URL_FORMAT_INCONSISTENT` | Node URL uses non-standard format (www vs non-www, `:` vs `-`) |
547
- | `LOW_VARIANT_COUNT` | 0-1 variants - uses STATIC_VALUES Code Connect strategy |
548
- | `DEEP_NESTING` | Component name has 4+ path levels - may be a deeply nested subcomponent |
549
-
550
- ---
551
-
552
- ## Error Handling
553
-
554
- | Error | Action |
555
- |-------|--------|
556
- | Figma API unreachable | Skip Criteria 2, 3, 4, 6 - mark as ⚠️ SKIPPED, continue with Criteria 1, 5, 7 |
557
- | Registry file not found | Show command: `cd ${COMMON_PATH} && swift build --product FigmaRegistryUtility && .build/debug/FigmaRegistryUtility update` |
558
- | FigmaRegistryUtility not built | Show: `cd ${COMMON_PATH} && swift build --product FigmaRegistryUtility` |
559
- | Invalid URL format | Ask user for correct URL via AskUserQuestion |
560
- | Figma token not found | Show: `"$HOME/.claude/lib/credential-store.sh" set FIGMA_ACCESS_TOKEN "<YOUR_TOKEN>"` |
561
-
562
- ---
563
-
564
- ## Execution Sequence
565
-
566
- ```
567
- 1. PARSE_URL → Extract fileKey, nodeId from arguments
568
- 2. RUN_SCRIPT → python3 ${REPO_ROOT}/.instructions/figma/figma-validate/figma_validate.py <fileKey> <nodeId>
569
- 3. PARSE_JSON → Read JSON output from script
570
- 4. FORMAT_OUTPUT → Display formatted verdict box with intel + warnings
571
- ```
572
-
573
- ## Performance Requirements
574
-
575
- **Target:** ≤ 10 seconds for single-component validation.
576
-
577
- A permanent Python script at `.instructions/figma/figma-validate/figma_validate.py` handles all criteria + intel in one invocation.
578
-
579
- **How to run:**
580
-
581
- ```bash
582
- python3 "${REPO_ROOT}/.instructions/figma/figma-validate/figma_validate.py" <fileKey> <nodeId>
583
- ```
584
-
585
- Example:
586
- ```bash
587
- python3 .instructions/figma/figma-validate/figma_validate.py 9ipBvrtsq9HlQ175B9k0wx 11797:6100
588
- ```
589
-
590
- The script:
591
- - Auto-detects `REPO_ROOT` via `git rev-parse --show-toplevel`
592
- - Reads the Figma token from macOS Keychain (`FIGMA_ACCESS_TOKEN`)
593
- - Outputs a single JSON object with `results`, `intel`, `warnings`, `score`, `total`, `elapsed_ms`
594
- - Agent parses the JSON and formats the verdict box
595
-
596
- **IMPORTANT - Do NOT create temporary `.py` or `.json` files.** Always use the permanent script above. If for any reason temporary files were created during execution, clean them up before returning the result:
597
-
598
- ```bash
599
- rm -f /tmp/figma_validate*.py /tmp/figma_validate*.json /tmp/figma_qr*.py /tmp/figma_analyze*.py /tmp/figma_lookup*.py
600
- ```
601
-
602
- **No-temp-file principle:** This skill is read-only and must leave zero artifacts. All computation must happen either:
603
- 1. Via the permanent `figma_validate.py` script, OR
604
- 2. Via inline `python3 -c "..."` one-liners piped through shell, OR
605
- 3. Via `git grep` / `git show` commands
606
-
607
- Never write intermediate results to disk.
608
-
609
- **Key rules for speed:**
610
- - ONE terminal command total (the python3 script) - no sequential shell calls
611
- - Use `urllib.request` - never `curl` (may be blocked by auto-approval policy)
612
- - Use `os.walk` / `glob.glob` for file searches - never shell `grep`/`find`
613
- - Never put `#` comments in shell compound commands - causes `zsh` parse errors
614
-
615
- ---
616
-
617
- ## Future Extensibility
618
-
619
- Each criterion is self-contained with:
620
- - A **question** (what it checks - displayed in Turkish for team context)
621
- - A **check** procedure (how to verify)
622
- - A **pass condition** (what constitutes success)
623
-
624
- To add a new criterion:
625
- 1. Add a new `### Criterion N` section following the same structure
626
- 2. Update the scoring thresholds in the "Scoring & Verdict" table
627
- 3. Update the output format to include the new column
628
- 4. Update the description in both SKILL.md files (entry point + instructions)
629
-
630
- To remove a criterion:
631
- 1. Delete the `### Criterion N` section
632
- 2. Adjust scoring thresholds accordingly
633
- 3. Update descriptions