@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.
- package/CHANGELOG.md +58 -0
- package/README.md +2 -2
- package/docs/FIGMA_PIPELINE.md +12 -25
- package/docs/architecture.md +3 -5
- package/docs/features.md +8 -8
- package/install/_common.mjs +9 -1
- package/install/_dev-only-files.mjs +0 -6
- package/install/claude.mjs +45 -18
- package/install/copilot.mjs +16 -14
- package/install/templates/copilot-instructions.md +3 -3
- package/package.json +1 -1
- package/pipeline/commands/{multi-agent.md → multi-agent/SKILL.md} +39 -39
- package/pipeline/commands/multi-agent/{analysis.md → analysis/SKILL.md} +18 -18
- package/pipeline/commands/multi-agent/{analysis-resolve.md → analysis-resolve/SKILL.md} +4 -4
- package/pipeline/commands/multi-agent/{autopilot.md → autopilot/SKILL.md} +4 -4
- package/pipeline/commands/multi-agent/{build-optimize.md → build-optimize/SKILL.md} +1 -1
- package/pipeline/commands/multi-agent/{channels.md → channels/SKILL.md} +12 -12
- package/pipeline/commands/multi-agent/{dev.md → dev/SKILL.md} +4 -4
- package/pipeline/commands/multi-agent/{dev-autopilot.md → dev-autopilot/SKILL.md} +4 -4
- package/pipeline/commands/multi-agent/{dev-local.md → dev-local/SKILL.md} +5 -5
- package/pipeline/commands/multi-agent/{dev-local-autopilot.md → dev-local-autopilot/SKILL.md} +4 -4
- package/pipeline/commands/multi-agent/{finish.md → finish/SKILL.md} +6 -6
- package/pipeline/commands/multi-agent/{generate.md → generate/SKILL.md} +3 -3
- package/pipeline/commands/multi-agent/{help.md → help/SKILL.md} +4 -4
- package/pipeline/commands/multi-agent/{local.md → local/SKILL.md} +5 -5
- package/pipeline/commands/multi-agent/{local-autopilot.md → local-autopilot/SKILL.md} +5 -5
- package/pipeline/commands/multi-agent/{manual-test.md → manual-test/SKILL.md} +1 -1
- package/pipeline/commands/multi-agent/refactor/SKILL.md +257 -0
- package/pipeline/commands/multi-agent/{resume.md → resume/SKILL.md} +1 -1
- package/pipeline/commands/multi-agent/{review.md → review/SKILL.md} +5 -5
- package/pipeline/commands/multi-agent/{setup.md → setup/SKILL.md} +1 -1
- package/pipeline/commands/multi-agent/{sync.md → sync/SKILL.md} +20 -58
- package/pipeline/{commands/multi-agent → multi-agent-refs}/_account-picker.md +2 -2
- package/pipeline/{commands/multi-agent → multi-agent-refs}/_dev-context.md +2 -2
- package/pipeline/{commands/multi-agent → multi-agent-refs}/_repo-picker.md +2 -2
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/android-guide.md +1 -1
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/channels/jira.md +1 -1
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/channels/wiki.md +7 -7
- package/pipeline/multi-agent-refs/component-dispatch.md +92 -0
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/cross-cli-contract.md +10 -77
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/verify-by-test.md +1 -1
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/generate-issue.md +2 -2
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/issue-jira-triad.md +1 -1
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/keychain.md +1 -1
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/log-format.md +1 -1
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/modes.md +2 -2
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/operations.md +1 -1
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-0-init.md +10 -10
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-1-analysis.md +6 -6
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-2-planning.md +3 -3
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-3-dev.md +10 -10
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-4-review.md +8 -8
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-5-test.md +3 -3
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-6-commit.md +4 -4
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases/phase-7-report.md +6 -6
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/phases.md +12 -12
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/progress-contract.md +4 -4
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/swiftui-guide.md +1 -1
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/tracker-contract.md +3 -3
- package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/wiki-capture.md +4 -4
- package/pipeline/preferences-template.json +17 -1
- package/pipeline/rules/figma-pipeline.md +2 -2
- package/pipeline/schemas/prefs.schema.json +0 -34
- package/pipeline/scripts/README.md +1 -3
- package/pipeline/scripts/build-stack-plugins.mjs +1 -1
- package/pipeline/scripts/fixtures/install-layout.tsv +6 -5
- package/pipeline/scripts/gen-mode-dispatch.mjs +3 -3
- package/pipeline/scripts/phase-banner.sh +2 -2
- package/pipeline/scripts/review-scope.mjs +94 -0
- package/pipeline/scripts/scan-agent-config.sh +2 -2
- package/pipeline/scripts/smoke-agent-log-cost.sh +1 -1
- package/pipeline/scripts/smoke-agent-model-routing.sh +4 -4
- package/pipeline/scripts/smoke-autopilot-circuit-breaker.sh +2 -2
- package/pipeline/scripts/smoke-channels-approval-gate.sh +2 -2
- package/pipeline/scripts/smoke-channels-flow.sh +5 -5
- package/pipeline/scripts/smoke-clarify.sh +1 -1
- package/pipeline/scripts/smoke-commands-skills-parity.sh +3 -3
- package/pipeline/scripts/smoke-community-gates.sh +1 -1
- package/pipeline/scripts/smoke-compliance-skills.sh +2 -2
- package/pipeline/scripts/smoke-cost-summary.sh +1 -1
- package/pipeline/scripts/smoke-cross-cli-behavior.sh +17 -43
- package/pipeline/scripts/smoke-cross-phase-cohesion.sh +1 -1
- package/pipeline/scripts/smoke-dev-critic.sh +1 -1
- package/pipeline/scripts/smoke-diff-explain.sh +1 -1
- package/pipeline/scripts/smoke-diff-risk.sh +1 -1
- package/pipeline/scripts/smoke-evidence-gate.sh +1 -1
- package/pipeline/scripts/smoke-figma-dispatch.sh +46 -57
- package/pipeline/scripts/smoke-gate-hooks.sh +1 -1
- package/pipeline/scripts/smoke-generate-issue.sh +8 -8
- package/pipeline/scripts/smoke-handoff-contract.sh +3 -3
- package/pipeline/scripts/smoke-identity-isolation.sh +2 -2
- package/pipeline/scripts/smoke-intent-guard.sh +1 -1
- package/pipeline/scripts/smoke-issue-comment-template.sh +2 -2
- package/pipeline/scripts/smoke-issue-jira-triad.sh +4 -4
- package/pipeline/scripts/smoke-language-axis.sh +6 -6
- package/pipeline/scripts/smoke-learnings-ledger.sh +3 -3
- package/pipeline/scripts/smoke-mode-dispatch-drift.sh +16 -16
- package/pipeline/scripts/smoke-model-fallback.sh +3 -3
- package/pipeline/scripts/smoke-multi-repo-integration.sh +2 -2
- package/pipeline/scripts/smoke-multi-repo-worktree.sh +1 -1
- package/pipeline/scripts/smoke-no-token-prompt.sh +5 -5
- package/pipeline/scripts/smoke-phase-0-multi-repo.sh +1 -1
- package/pipeline/scripts/smoke-phase-6-multi.sh +1 -1
- package/pipeline/scripts/smoke-phase4-gates.sh +45 -0
- package/pipeline/scripts/smoke-plan-approval-gate.sh +5 -5
- package/pipeline/scripts/smoke-plan-todos.sh +3 -3
- package/pipeline/scripts/smoke-pr-review-actions.sh +3 -3
- package/pipeline/scripts/smoke-prefs-language.sh +1 -1
- package/pipeline/scripts/smoke-progress-contract.sh +2 -2
- package/pipeline/scripts/smoke-push-retry.sh +1 -1
- package/pipeline/scripts/smoke-repo-map.sh +2 -2
- package/pipeline/scripts/smoke-shadow-git.sh +1 -1
- package/pipeline/scripts/smoke-skill-authoring.sh +4 -9
- package/pipeline/scripts/smoke-tasklist-ordering.sh +10 -10
- package/pipeline/scripts/smoke-test-gap.sh +1 -1
- package/pipeline/scripts/smoke-token-budget.sh +1 -1
- package/pipeline/scripts/smoke-token-preflight.sh +2 -2
- package/pipeline/scripts/smoke-tracker-contract.sh +13 -13
- package/pipeline/scripts/smoke-tracker-tokens-invocation.sh +5 -5
- package/pipeline/scripts/smoke-triage-memory.sh +2 -2
- package/pipeline/scripts/smoke-update-check.sh +1 -1
- package/pipeline/scripts/smoke-url-enrichment.sh +2 -2
- package/pipeline/scripts/smoke-validator-gates.sh +1 -1
- package/pipeline/scripts/smoke-verify-by-test.sh +3 -3
- package/pipeline/scripts/smoke-wiki-integration.sh +9 -33
- package/pipeline/scripts/smoke-work-summary.sh +1 -1
- package/pipeline/scripts/smoke-worktree-path-convention.sh +4 -4
- package/pipeline/scripts/test-integrity-gate.mjs +83 -0
- package/pipeline/scripts/uninstall.mjs +2 -2
- package/pipeline/skills/.skill-manifest.json +40 -160
- package/pipeline/skills/.skills-index.json +21 -372
- package/pipeline/skills/shared/README.md +1 -1
- package/pipeline/skills/shared/core/multi-agent/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-analysis/SKILL.md +2 -2
- package/pipeline/skills/shared/core/multi-agent-analysis-resolve/SKILL.md +3 -3
- package/pipeline/skills/shared/core/multi-agent-build-optimize/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-channels/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-finish/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-help/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-refactor/SKILL.md +116 -51
- package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +8 -30
- package/pipeline/skills/shared/external/backlog/BACKLOG.md +32 -0
- package/pipeline/skills/shared/external/backlog/SKILL.md +49 -0
- package/pipeline/skills/shared/external/compose-components/SKILL.md +14 -14
- package/pipeline/skills/shared/external/skill-creator/SKILL.md +48 -0
- package/pipeline/skills/shared/external/skill-creator/audit.md +59 -0
- package/pipeline/skills/shared/external/skill-creator/checklist.md +32 -0
- package/pipeline/skills/shared/external/skill-creator/examples.md +65 -0
- package/pipeline/skills/shared/external/skill-creator/label-check.md +43 -0
- package/pipeline/skills/shared/external/skill-creator/scripts/audit-panel.js +83 -0
- package/pipeline/skills/shared/external/skill-creator/template.md +67 -0
- package/pipeline/skills/skills-index.md +4 -43
- package/pipeline/commands/multi-agent/refactor.md +0 -188
- package/pipeline/commands/multi-agent/refs/component-dispatch.md +0 -92
- package/pipeline/scripts/smoke-existing-discovery-gate.sh +0 -71
- package/pipeline/scripts/smoke-figma-android-parity.sh +0 -148
- package/pipeline/scripts/smoke-figma-credential-store.sh +0 -105
- package/pipeline/scripts/smoke-figma-cross-cli-inventory.sh +0 -177
- package/pipeline/scripts/smoke-figma-sync.sh +0 -149
- package/pipeline/scripts/smoke-sync-delegation.sh +0 -74
- package/pipeline/skills/figma-android/README.md +0 -38
- package/pipeline/skills/figma-android/figma-component-code-connect/SKILL.md +0 -62
- package/pipeline/skills/figma-android/figma-component-implement/SKILL.md +0 -158
- package/pipeline/skills/figma-android/figma-component-test/SKILL.md +0 -120
- package/pipeline/skills/figma-android/figma-component-wiki/SKILL.md +0 -35
- package/pipeline/skills/figma-android/figma-to-component/SKILL.md +0 -124
- package/pipeline/skills/figma-common/README.md +0 -64
- package/pipeline/skills/figma-common/figma-bottom-sheets/SKILL.md +0 -152
- package/pipeline/skills/figma-common/figma-cli-iterate/SKILL.md +0 -282
- package/pipeline/skills/figma-common/figma-cli-iterate-mend/SKILL.md +0 -503
- package/pipeline/skills/figma-common/figma-cli-lean-iterate/SKILL.md +0 -288
- package/pipeline/skills/figma-common/figma-cli-skip/SKILL.md +0 -362
- package/pipeline/skills/figma-common/figma-commit/COMMON_REBASE.md +0 -206
- package/pipeline/skills/figma-common/figma-commit/REVIEW.md +0 -337
- package/pipeline/skills/figma-common/figma-commit/SKILL.md +0 -216
- package/pipeline/skills/figma-common/figma-component-confluence-sync/SKILL.md +0 -223
- package/pipeline/skills/figma-common/figma-component-start/SKILL.md +0 -251
- package/pipeline/skills/figma-common/figma-component-status-update/SKILL.md +0 -78
- package/pipeline/skills/figma-common/figma-evolve-component/SKILL.md +0 -61
- package/pipeline/skills/figma-common/figma-fix/SKILL.md +0 -321
- package/pipeline/skills/figma-common/figma-form-integration/SKILL.md +0 -542
- package/pipeline/skills/figma-common/figma-issue/SKILL.md +0 -750
- package/pipeline/skills/figma-common/figma-iterate/SKILL.md +0 -208
- package/pipeline/skills/figma-common/figma-iteration-commit/SKILL.md +0 -1020
- package/pipeline/skills/figma-common/figma-mend/SKILL.md +0 -331
- package/pipeline/skills/figma-common/figma-navigation/SKILL.md +0 -156
- package/pipeline/skills/figma-common/figma-overlays/SKILL.md +0 -142
- package/pipeline/skills/figma-common/figma-price-integration/SKILL.md +0 -398
- package/pipeline/skills/figma-common/figma-remote-mcp-auth/SKILL.md +0 -104
- package/pipeline/skills/figma-common/figma-review/SKILL.md +0 -400
- package/pipeline/skills/figma-common/figma-setup/SKILL.md +0 -514
- package/pipeline/skills/figma-common/figma-setup/scripts/fetch-mcp-token.py +0 -592
- package/pipeline/skills/figma-common/figma-skip/SKILL.md +0 -129
- package/pipeline/skills/figma-common/figma-ui-patterns/SKILL.md +0 -105
- package/pipeline/skills/figma-common/figma-ui-patterns/patterns/animated-gradient-border.md +0 -116
- package/pipeline/skills/figma-common/figma-utility/SKILL.md +0 -274
- package/pipeline/skills/figma-common/figma-utility/scripts/figma-utility.py +0 -808
- package/pipeline/skills/figma-common/figma-validate/SKILL.md +0 -633
- package/pipeline/skills/figma-common/performance-iteration-commit-all/SKILL.md +0 -716
- package/pipeline/skills/figma-common/performance-review-next/SKILL.md +0 -238
- package/pipeline/skills/figma-common/performance-start/SKILL.md +0 -430
- package/pipeline/skills/figma-common/performance-swiftui/SKILL.md +0 -706
- package/pipeline/skills/figma-common/performance-tour/SKILL.md +0 -423
- package/pipeline/skills/figma-ios/REVIEW_CHECKLIST.md +0 -67
- package/pipeline/skills/figma-ios/figma-component-code-connect/SKILL.md +0 -178
- package/pipeline/skills/figma-ios/figma-component-implement/SKILL.md +0 -184
- package/pipeline/skills/figma-ios/figma-component-test/SKILL.md +0 -219
- package/pipeline/skills/figma-ios/figma-component-wiki/SKILL.md +0 -274
- package/pipeline/skills/figma-ios/figma-to-component/SKILL.md +0 -416
- package/pipeline/skills/figma-ios/figma-to-component/halt-return-protocol.md +0 -57
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-0-init.md +0 -307
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-1-gathering.md +0 -119
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-1.5-existing-discovery.md +0 -174
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-2-orchestrator.md +0 -333
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-2a-testing-identifiers.md +0 -368
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-2b-localization.md +0 -393
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-2c-accessibility.md +0 -617
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-2d-analytics.md +0 -352
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3-orchestrator.md +0 -337
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3a-location.md +0 -206
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3b-tokens.md +0 -235
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3c-nested.md +0 -214
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3d-patterns.md +0 -902
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3e-assets.md +0 -156
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3f-utilities.md +0 -175
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3g-property-coverage.md +0 -176
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-3h-variant-config.md +0 -333
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4-orchestrator.md +0 -412
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4a-configuration.md +0 -336
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4b-view.md +0 -705
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4c-documentation.md +0 -332
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4d-preview.md +0 -380
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-4e-modifiers.md +0 -262
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-5-orchestrator.md +0 -482
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-5a-viewinspector.md +0 -274
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-5b-snapshot.md +0 -636
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-5c-unit.md +0 -142
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-6-code-connect.md +0 -547
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-7-wiki.md +0 -39
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-7a-confluence-generate.md +0 -659
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-7a-wiki-generate.md +0 -580
- package/pipeline/skills/figma-ios/figma-to-component/phases/phase-8-cleanup.md +0 -51
- package/pipeline/skills/figma-ios/figma-to-component/reference/accessibility.md +0 -183
- package/pipeline/skills/figma-ios/figma-to-component/reference/analytics-events.md +0 -64
- package/pipeline/skills/figma-ios/figma-to-component/reference/code-connect.md +0 -531
- package/pipeline/skills/figma-ios/figma-to-component/reference/confluence-api.md +0 -89
- package/pipeline/skills/figma-ios/figma-to-component/reference/confluence-xhtml.md +0 -155
- package/pipeline/skills/figma-ios/figma-to-component/reference/figma-to-swiftui-effects.md +0 -196
- package/pipeline/skills/figma-ios/figma-to-component/reference/halt-return-protocol.md +0 -57
- package/pipeline/skills/figma-ios/figma-to-component/reference/localization-naming.md +0 -89
- package/pipeline/skills/figma-ios/figma-to-component/reference/macros.md +0 -227
- package/pipeline/skills/figma-ios/figma-to-component/reference/missing-tokens.md +0 -157
- package/pipeline/skills/figma-ios/figma-to-component/reference/orchestrator-discipline.md +0 -90
- package/pipeline/skills/figma-ios/figma-to-component/reference/registry.md +0 -116
- package/pipeline/skills/figma-ios/figma-to-component/reference/remote-mcp-script.md +0 -153
- package/pipeline/skills/figma-ios/figma-to-component/reference/rest-api-script.md +0 -130
- package/pipeline/skills/figma-ios/figma-to-component/reference/scripts-inventory.md +0 -218
- package/pipeline/skills/figma-ios/figma-to-component/reference/snapshot-testing.md +0 -188
- package/pipeline/skills/figma-ios/figma-to-component/reference/subcomponent-graph.md +0 -93
- package/pipeline/skills/figma-ios/figma-to-component/reference/testing-identifiers-naming.md +0 -98
- package/pipeline/skills/figma-ios/figma-to-component/reference/tools.md +0 -261
- package/pipeline/skills/figma-ios/figma-to-component/reference/viewinspector.md +0 -147
- package/pipeline/skills/figma-ios/figma-to-component/reference/wiki-to-confluence-mapping.md +0 -182
- package/pipeline/skills/figma-ios/figma-to-component/scripts/apply-author-login-map.py +0 -185
- package/pipeline/skills/figma-ios/figma-to-component/scripts/backfill-status.py +0 -609
- package/pipeline/skills/figma-ios/figma-to-component/scripts/build-author-registry.py +0 -332
- package/pipeline/skills/figma-ios/figma-to-component/scripts/bulk-sync-issues.py +0 -261
- package/pipeline/skills/figma-ios/figma-to-component/scripts/code-connect-data-gather.py +0 -184
- package/pipeline/skills/figma-ios/figma-to-component/scripts/code-connect-publish.sh +0 -188
- package/pipeline/skills/figma-ios/figma-to-component/scripts/confluence-component-status-upload.py +0 -768
- package/pipeline/skills/figma-ios/figma-to-component/scripts/confluence-component-status.py +0 -191
- package/pipeline/skills/figma-ios/figma-to-component/scripts/confluence-data-gather.py +0 -420
- package/pipeline/skills/figma-ios/figma-to-component/scripts/confluence-page-ids.example.json +0 -9
- package/pipeline/skills/figma-ios/figma-to-component/scripts/confluence-publish.py +0 -336
- package/pipeline/skills/figma-ios/figma-to-component/scripts/figma-subcomponent-graph.py +0 -391
- package/pipeline/skills/figma-ios/figma-to-component/scripts/figma-update.py +0 -292
- package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/__init__.py +0 -1
- package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/issue_sync_propagate.py +0 -93
- package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/registry_writer.py +0 -299
- package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_backfill_status.py +0 -343
- package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_figma_update.py +0 -206
- package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_figma_update_http.py +0 -149
- package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_phase_clis.py +0 -281
- package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_registry_writer.py +0 -332
- package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_skill_figma_issue.py +0 -176
- package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_skill_figma_review.py +0 -98
- package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_update_issue.py +0 -298
- package/pipeline/skills/figma-ios/figma-to-component/scripts/lib/test_update_issue_gh.py +0 -195
- package/pipeline/skills/figma-ios/figma-to-component/scripts/phase1-gather.py +0 -1298
- package/pipeline/skills/figma-ios/figma-to-component/scripts/phase2-finalize.py +0 -228
- package/pipeline/skills/figma-ios/figma-to-component/scripts/phase3-scripts.py +0 -1089
- package/pipeline/skills/figma-ios/figma-to-component/scripts/phase4-finalize.py +0 -141
- package/pipeline/skills/figma-ios/figma-to-component/scripts/phase5-finalize.py +0 -106
- package/pipeline/skills/figma-ios/figma-to-component/scripts/phase6-finalize.py +0 -162
- package/pipeline/skills/figma-ios/figma-to-component/scripts/phase7-finalize.py +0 -105
- package/pipeline/skills/figma-ios/figma-to-component/scripts/register-icons-codeconnect.py +0 -179
- package/pipeline/skills/figma-ios/figma-to-component/scripts/remote-mcp-fetch.py +0 -260
- package/pipeline/skills/figma-ios/figma-to-component/scripts/resolve-author-logins.py +0 -260
- package/pipeline/skills/figma-ios/figma-to-component/scripts/run-uicomponents-tests.sh +0 -86
- package/pipeline/skills/figma-ios/figma-to-component/scripts/sidebar-generator.py +0 -321
- package/pipeline/skills/figma-ios/figma-to-component/scripts/update-issue-from-registry.py +0 -1470
- package/pipeline/skills/figma-ios/figma-to-component/scripts/validate-phase4.sh +0 -176
- package/pipeline/skills/figma-ios/figma-to-component/scripts/validate-phase6.sh +0 -147
- package/pipeline/skills/figma-ios/figma-to-component/scripts/validate-phase7a.py +0 -629
- /package/pipeline/commands/multi-agent/{delete.md → delete/SKILL.md} +0 -0
- /package/pipeline/commands/multi-agent/{diff-explain.md → diff-explain/SKILL.md} +0 -0
- /package/pipeline/commands/multi-agent/{garbage-collect.md → garbage-collect/SKILL.md} +0 -0
- /package/pipeline/commands/multi-agent/{issue.md → issue/SKILL.md} +0 -0
- /package/pipeline/commands/multi-agent/{jira.md → jira/SKILL.md} +0 -0
- /package/pipeline/commands/multi-agent/{kill.md → kill/SKILL.md} +0 -0
- /package/pipeline/commands/multi-agent/{language.md → language/SKILL.md} +0 -0
- /package/pipeline/commands/multi-agent/{log.md → log/SKILL.md} +0 -0
- /package/pipeline/commands/multi-agent/{prune-logs.md → prune-logs/SKILL.md} +0 -0
- /package/pipeline/commands/multi-agent/{purge.md → purge/SKILL.md} +0 -0
- /package/pipeline/commands/multi-agent/{scan.md → scan/SKILL.md} +0 -0
- /package/pipeline/commands/multi-agent/{search.md → search/SKILL.md} +0 -0
- /package/pipeline/commands/multi-agent/{stack.md → stack/SKILL.md} +0 -0
- /package/pipeline/commands/multi-agent/{status.md → status/SKILL.md} +0 -0
- /package/pipeline/commands/multi-agent/{test.md → test/SKILL.md} +0 -0
- /package/pipeline/commands/multi-agent/{update.md → update/SKILL.md} +0 -0
- /package/pipeline/{commands/multi-agent → multi-agent-refs}/_input-parser.md +0 -0
- /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/analysis-template.md +0 -0
- /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/audit-guide.md +0 -0
- /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/backend-guide.md +0 -0
- /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/channels/confluence.md +0 -0
- /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/channels/issue-comment.md +0 -0
- /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/channels/pr-review-actions.md +0 -0
- /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/channels/pr.md +0 -0
- /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/conventions-defaults.md +0 -0
- /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/autopilot-circuit-breaker.md +0 -0
- /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/dev-critic.md +0 -0
- /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/external-context-injection.md +0 -0
- /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/model-fallback.md +0 -0
- /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/plan-todos.md +0 -0
- /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/prior-fix-detection.md +0 -0
- /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/repo-map.md +0 -0
- /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/features/shadow-git.md +0 -0
- /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/frontend-guide.md +0 -0
- /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/knowledge.md +0 -0
- /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/multi-repo-integration-build.md +0 -0
- /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/picker-contract.md +0 -0
- /package/pipeline/{commands/multi-agent/refs → multi-agent-refs}/rules.md +0 -0
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
# PHASE 5C - Unit Tests
|
|
2
|
-
|
|
3
|
-
Unit tests for component logic: ViewModel, model computed properties, data transformations.
|
|
4
|
-
|
|
5
|
-
PARENT: `phase-5-orchestrator.md`
|
|
6
|
-
CONDITIONAL - only execute if component has testable logic.
|
|
7
|
-
|
|
8
|
-
**FRAMEWORK**: Swift Testing (`@Test`, `#expect`, `@Suite`)
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## ENTRY_GATE: LOGIC_CHECK
|
|
13
|
-
|
|
14
|
-
Read the component source file. Determine if testable logic exists.
|
|
15
|
-
|
|
16
|
-
| Component Has | Action |
|
|
17
|
-
|---------------|--------|
|
|
18
|
-
| ViewModel class (`ObservableObject`) | Execute - test state mutations |
|
|
19
|
-
| Model with computed properties | Execute - test computations |
|
|
20
|
-
| Data transformation functions | Execute - test transformations |
|
|
21
|
-
| Action handlers with branching logic | Execute - test branches |
|
|
22
|
-
| Pure View only (configuration + body) | **N/A - skip this sub-phase** |
|
|
23
|
-
|
|
24
|
-
Most Figma-generated components are pure Views with a Configuration struct and a body.
|
|
25
|
-
Configuration structs with only stored properties have no testable logic.
|
|
26
|
-
`@GenerateChainModifiers` and `@GenerateConfiguredInit` are macro-generated - tested by UIMacrosTests, not here.
|
|
27
|
-
|
|
28
|
-
N/A →
|
|
29
|
-
```
|
|
30
|
-
STATUS: N/A
|
|
31
|
-
PHASE: phase-5c
|
|
32
|
-
REASON: Component is pure View with Configuration struct. No testable logic.
|
|
33
|
-
NOTE: Configuration struct chain modifiers are macro-generated and tested in UIMacrosTests.
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## PRE-CHECK: Load Test Index
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
Read: {artifactPath}/pass5/_test_index.md
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
EXTRACT: componentName, sourceModule, componentPath, source file path.
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
## GATE 1: DETERMINE_TEST_LOCATION
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
Test Target: {sourceModule}Tests
|
|
52
|
-
Test Dir: Tests/{sourceModule}Tests/Unit/{componentPath}/
|
|
53
|
-
Test File: {componentName}Tests.swift
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
## GATE 2: IDENTIFY_TESTABLE_UNITS
|
|
59
|
-
|
|
60
|
-
Scan component source and list testable units:
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
Testable Units:
|
|
64
|
-
- {componentName}ViewModel
|
|
65
|
-
- @Published var items: [Item]
|
|
66
|
-
- func loadItems() async
|
|
67
|
-
- func deleteItem(at:)
|
|
68
|
-
- {componentName}Model
|
|
69
|
-
- var formattedDate: String { get }
|
|
70
|
-
- var isValid: Bool { get }
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
## GATE 3: CREATE_TEST_FILE
|
|
76
|
-
|
|
77
|
-
### Template (Swift Testing)
|
|
78
|
-
|
|
79
|
-
```swift
|
|
80
|
-
//
|
|
81
|
-
// {componentName}Tests.swift
|
|
82
|
-
// {sourceModule}Tests
|
|
83
|
-
//
|
|
84
|
-
// Created by {AUTHOR} on {DD.MM.YYYY}.
|
|
85
|
-
//
|
|
86
|
-
|
|
87
|
-
import Testing
|
|
88
|
-
@testable import {sourceModule}
|
|
89
|
-
|
|
90
|
-
@Suite("{componentName} Tests")
|
|
91
|
-
struct {componentName}Tests {
|
|
92
|
-
|
|
93
|
-
// MARK: - ViewModel Tests
|
|
94
|
-
|
|
95
|
-
@Test("ViewModel initializes with default state")
|
|
96
|
-
func viewModelInitialState() {
|
|
97
|
-
let sut = {componentName}ViewModel()
|
|
98
|
-
#expect(sut.items.isEmpty)
|
|
99
|
-
#expect(sut.isLoading == false)
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// MARK: - Model Tests
|
|
103
|
-
|
|
104
|
-
@Test("Computed property returns expected value")
|
|
105
|
-
func computedPropertyReturnsExpected() {
|
|
106
|
-
let sut = {ModelType}(value: "test")
|
|
107
|
-
#expect(sut.computedProperty == "expected")
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
## GATE 4: RUN_TESTS
|
|
115
|
-
|
|
116
|
-
**IMPORTANT:** Use `xcodebuild`, NOT `swift test`. The project uses Xcode-specific features (`ColorResource`, `ImageResource`, asset catalogs) that are unavailable in SPM's `swift build`/`swift test`.
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
cd {repos.components.path} && \
|
|
120
|
-
xcodebuild test \
|
|
121
|
-
-scheme UIComponents-Package \
|
|
122
|
-
-destination 'platform=iOS Simulator,name=iPhone 17 Pro' \
|
|
123
|
-
-only-testing:{sourceModule}Tests/{componentName}Tests
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
| Result | Action |
|
|
127
|
-
|--------|--------|
|
|
128
|
-
| All pass | Proceed to OUTPUT |
|
|
129
|
-
| Failure | Fix test or implementation |
|
|
130
|
-
|
|
131
|
-
---
|
|
132
|
-
|
|
133
|
-
## OUTPUT
|
|
134
|
-
|
|
135
|
-
```
|
|
136
|
-
STATUS: COMPLETE
|
|
137
|
-
PHASE: phase-5c
|
|
138
|
-
GATES_PASSED: [LOGIC_CHECK, PRE_CHECK, DETERMINE_TEST_LOCATION, IDENTIFY_TESTABLE_UNITS, CREATE_TEST_FILE, RUN_TESTS]
|
|
139
|
-
ARTIFACTS_CREATED:
|
|
140
|
-
- Tests/{sourceModule}Tests/Unit/{componentPath}/{componentName}Tests.swift
|
|
141
|
-
SUMMARY: {COUNT} unit tests - ViewModel ({VM_COUNT}), Model ({MODEL_COUNT}).
|
|
142
|
-
```
|
|
@@ -1,547 +0,0 @@
|
|
|
1
|
-
# PHASE 6 - Code Connect Publish
|
|
2
|
-
|
|
3
|
-
Publish Code Connect mapping to Figma so developers see live Swift snippets in Dev Mode.
|
|
4
|
-
|
|
5
|
-
PREV: Phase 5 (Testing)
|
|
6
|
-
NEXT: Phase 7 (Confluence Documentation)
|
|
7
|
-
REF: `reference/code-connect.md`
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## ENTRY GATE
|
|
12
|
-
|
|
13
|
-
| Condition | Action |
|
|
14
|
-
|-----------|--------|
|
|
15
|
-
| User requested "skip Code Connect" | SKIP → Output "Phase 6 skipped per user request" |
|
|
16
|
-
| `agent-state.discovery.status === "ALREADY_MAPPED"` and `"Code Connect" not in discovery.gaps` | SKIP → Output "Phase 6 skipped - already published per Phase 1.5 discovery" |
|
|
17
|
-
| `agent-state.discovery.status === "GAP_ANALYSIS"` and `"Code Connect" not in discovery.gaps` | SKIP - same as above |
|
|
18
|
-
| `.figma.swift` already exists at the target component path AND `figma client status` reports it published | SKIP → Output "Phase 6 skipped - .figma.swift already published" |
|
|
19
|
-
| All other cases | EXECUTE |
|
|
20
|
-
|
|
21
|
-
The discovery state is the primary signal; the local `.figma.swift` check is a secondary safety net for runs that bypassed Phase 1.5 (e.g. legacy resume from an older state file). Both checks default to EXECUTE when uncertain - duplicate publishes are idempotent on Figma's side.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## PRE-CHECK: CLI & Context
|
|
26
|
-
|
|
27
|
-
### 1. Verify CLI
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
figma --version
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
| Result | Action |
|
|
34
|
-
|--------|--------|
|
|
35
|
-
| Version returned | Proceed |
|
|
36
|
-
| `command not found` | Use npx fallback: `npx @figma/code-connect@latest connect <cmd>` |
|
|
37
|
-
|
|
38
|
-
### 2. Verify Swift
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
swift --version
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Requires Swift 6.0+ (Xcode 16.0+). Lower version → HALT.
|
|
45
|
-
|
|
46
|
-
### 3. Verify Token
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
TOKEN=$("$HOME/.claude/lib/credential-store.sh" get \1 2>/dev/null) && echo "OK" || echo "MISSING"
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
| Result | Action |
|
|
53
|
-
|--------|--------|
|
|
54
|
-
| `OK` | Verify prefix (see below) |
|
|
55
|
-
| `MISSING` | HALT |
|
|
56
|
-
|
|
57
|
-
**CRITICAL - Token prefix check:**
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
TOKEN=$("$HOME/.claude/lib/credential-store.sh" get \1 2>/dev/null)
|
|
61
|
-
if [[ "$TOKEN" == figd_* ]]; then
|
|
62
|
-
echo "VALID_PAT"
|
|
63
|
-
elif [[ "$TOKEN" == figu_* ]]; then
|
|
64
|
-
echo "WRONG_TOKEN_TYPE"
|
|
65
|
-
else
|
|
66
|
-
echo "UNKNOWN_TOKEN"
|
|
67
|
-
fi
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
| Result | Action |
|
|
71
|
-
|--------|--------|
|
|
72
|
-
| `VALID_PAT` | Proceed - this is a Figma Personal Access Token |
|
|
73
|
-
| `WRONG_TOKEN_TYPE` | **HALT** - `figu_` prefix = MCP OAuth token. This token does NOT work with Code Connect CLI (returns 403). The `FIGMA_ACCESS_TOKEN` keychain entry contains an MCP token instead of a PAT. User must save a valid PAT: `"$HOME/.claude/lib/credential-store.sh" set \1 \"\2\"` |
|
|
74
|
-
| `UNKNOWN_TOKEN` | Proceed with caution, verify publish output for 403 errors |
|
|
75
|
-
|
|
76
|
-
**Do NOT use `FIGMA_MCP_TOKEN`** for Code Connect. MCP OAuth tokens (`figu_*`) lack the scopes needed by the Code Connect REST API.
|
|
77
|
-
|
|
78
|
-
FAIL (any check) →
|
|
79
|
-
```
|
|
80
|
-
STATUS: HALT
|
|
81
|
-
PHASE: phase-6
|
|
82
|
-
GATE: PRE_CHECK
|
|
83
|
-
REASON: Figma Code Connect CLI not configured.
|
|
84
|
-
COMPLETED_GATES: []
|
|
85
|
-
ARTIFACTS_CREATED: none
|
|
86
|
-
USER_ACTION_REQUIRED: REF: reference/code-connect.md → SETUP, AUTHENTICATION
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### 4. Load Context
|
|
90
|
-
|
|
91
|
-
```
|
|
92
|
-
Read: {artifactPath}/IMPLEMENTATION_HISTORY.md
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
EXTRACT: `nodeId`, `fileKey`, `componentName`, `sourceLocation`, `artifactPath`
|
|
96
|
-
|
|
97
|
-
### 5. Verify Files
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
ls {sourceLocation}/{componentName}.swift
|
|
101
|
-
ls {sourceLocation}/FIGMA.md
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
Both must exist. Missing → HALT, run Phase 4 first.
|
|
105
|
-
|
|
106
|
-
### 6. Check Component Properties
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
ls {artifactPath}/pass1/component_properties.json
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
| Result | Action |
|
|
113
|
-
|--------|--------|
|
|
114
|
-
| Exists | Read it, check for MAPPED_PROPERTIES |
|
|
115
|
-
| Missing | Use STATIC_VALUES strategy |
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## GATE 1: DETERMINE_STRATEGY
|
|
120
|
-
|
|
121
|
-
### 1.1 Read Data Sources
|
|
122
|
-
|
|
123
|
-
| Source | Data |
|
|
124
|
-
|--------|------|
|
|
125
|
-
| `pass1/component_properties.json` | `isComponent`, `componentPropertyDefinitions` |
|
|
126
|
-
| `pass3/04c_variant_config_analysis.json` | Boolean classifications and Swift types (from Phase 3H). Use to determine correct `@FigmaBoolean` mappings - e.g., `KNOWN_SUBCOMPONENT` → map to `nil`/default-config, `ICON_BOOLEAN_GATED` with `Optional3<Image>` → map to `.default`/`.none`. **No ternary expressions.** |
|
|
127
|
-
| `{sourceLocation}/FIGMA.md` Variant Mapping | Figma Value → Swift enum mapping |
|
|
128
|
-
| `{sourceLocation}/FIGMA.md` Usage | Default values, body template |
|
|
129
|
-
|
|
130
|
-
### 1.2 Strategy Decision
|
|
131
|
-
|
|
132
|
-
| Condition | Strategy |
|
|
133
|
-
|-----------|----------|
|
|
134
|
-
| `isComponent: false` OR `null` | STATIC_VALUES |
|
|
135
|
-
| `isComponent: true` AND no `componentPropertyDefinitions` | STATIC_VALUES |
|
|
136
|
-
| `isComponent: true` AND has `componentPropertyDefinitions` | MAPPED_PROPERTIES |
|
|
137
|
-
|
|
138
|
-
### 1.3 Property Type Mapping
|
|
139
|
-
|
|
140
|
-
| Figma Type | Swift Annotation | Example |
|
|
141
|
-
|------------|------------------|---------|
|
|
142
|
-
| `TEXT` | `@FigmaString("Name")` | `@FigmaString("Label") var label: String = "Default"` |
|
|
143
|
-
| `BOOLEAN` | `@FigmaBoolean("Name", hideDefault: true)` | `@FigmaBoolean("Disabled") var disabled: Bool = false` |
|
|
144
|
-
| `BOOLEAN` (non-Bool type) | `@FigmaBoolean("Name", mapping: [...], hideDefault: true)` | `@FigmaBoolean("Left Icon", mapping: [true: Image(...), false: nil], hideDefault: true) var leftIcon: Image? = nil` - **hideDefault trap:** set default to the value you want HIDDEN (typically `nil`), NOT the `true` mapping value. See `reference/code-connect.md` section3 for details. |
|
|
145
|
-
| `VARIANT` | `@FigmaEnum("Name", mapping: [...])` | `@FigmaEnum("Size", mapping: ["S": .small])` - MUST use implicit shorthand (`.small` NEVER `Type.small`) |
|
|
146
|
-
| `INSTANCE_SWAP` | `@FigmaInstance("Name")` | `@FigmaInstance("Icon") var icon: AnyView?` - **no hideDefault support**, use `@FigmaBoolean` with mapping instead when controlled by a boolean toggle |
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
## GATE 2: CREATE_FIGMA_SWIFT
|
|
151
|
-
|
|
152
|
-
### 2.1 File Location
|
|
153
|
-
|
|
154
|
-
```
|
|
155
|
-
{sourceLocation}/{componentName}.figma.swift
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### 2.2 Template: STATIC_VALUES
|
|
159
|
-
|
|
160
|
-
```swift
|
|
161
|
-
import Figma
|
|
162
|
-
import SwiftUI
|
|
163
|
-
|
|
164
|
-
struct {componentName}FigmaConnect: FigmaConnect {
|
|
165
|
-
let component = {componentName}.self
|
|
166
|
-
let figmaNodeUrl: String = "https://figma.com/design/{fileKey}/?node-id={nodeId}"
|
|
167
|
-
|
|
168
|
-
var body: some View {
|
|
169
|
-
// Copy from FIGMA.md Usage section
|
|
170
|
-
{componentName}(
|
|
171
|
-
{staticParamsFromFigmaMd}
|
|
172
|
-
)
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
#Preview {
|
|
177
|
-
{componentName}FigmaConnect()
|
|
178
|
-
}
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
### 2.3 Template: MAPPED_PROPERTIES
|
|
182
|
-
|
|
183
|
-
**Preferred style:** Use view-level `+Modifiers` chain methods in the `body`. For components with closure dependencies, use trailing closure for the dependency and chain modifiers for configuration. For components without closure dependencies, use `{componentName}()`.
|
|
184
|
-
|
|
185
|
-
```swift
|
|
186
|
-
import Figma
|
|
187
|
-
import SwiftUI
|
|
188
|
-
|
|
189
|
-
struct {componentName}FigmaConnect: FigmaConnect {
|
|
190
|
-
let component = {componentName}.self
|
|
191
|
-
let figmaNodeUrl: String = "https://figma.com/design/{fileKey}/?node-id={nodeId}"
|
|
192
|
-
|
|
193
|
-
// VARIANT properties
|
|
194
|
-
@FigmaEnum("{FigmaPropertyName}", mapping: [
|
|
195
|
-
"{FigmaValue1}": {SwiftType}.{case1},
|
|
196
|
-
"{FigmaValue2}": {SwiftType}.{case2}
|
|
197
|
-
])
|
|
198
|
-
var {propertyName}: {SwiftType} = .{defaultCase}
|
|
199
|
-
|
|
200
|
-
// TEXT properties
|
|
201
|
-
@FigmaString("{FigmaPropertyName}")
|
|
202
|
-
var {propertyName}: String = "{defaultValue}"
|
|
203
|
-
|
|
204
|
-
// BOOLEAN properties
|
|
205
|
-
@FigmaBoolean("{FigmaPropertyName}", hideDefault: true)
|
|
206
|
-
var {propertyName}: Bool = {defaultValue}
|
|
207
|
-
|
|
208
|
-
var body: some View {
|
|
209
|
-
{componentName} { /* action */ }
|
|
210
|
-
.{property}({mappedVar})
|
|
211
|
-
.{property}({mappedVar})
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
#Preview {
|
|
216
|
-
{componentName}FigmaConnect()
|
|
217
|
-
}
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
### 2.4 Multi-Variant (string enum - separate structs per variant)
|
|
221
|
-
|
|
222
|
-
```swift
|
|
223
|
-
struct {componentName}PrimaryFigmaConnect: FigmaConnect {
|
|
224
|
-
let component = {componentName}.self
|
|
225
|
-
let figmaNodeUrl: String = "https://figma.com/design/{fileKey}/?node-id={nodeId}"
|
|
226
|
-
let variant = ["{VariantProp}": "{VariantValue}"]
|
|
227
|
-
var body: some View { {componentName} { $0.style(.primary) } }
|
|
228
|
-
}
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
### 2.5 Multi-Variant (boolean gate - computed variant property)
|
|
232
|
-
|
|
233
|
-
When a boolean toggle changes the component's form (e.g., "Label" on/off):
|
|
234
|
-
```swift
|
|
235
|
-
// Default struct - no variant property (matches when boolean is true/default)
|
|
236
|
-
struct {componentName}FigmaConnect: FigmaConnect {
|
|
237
|
-
let component = {componentName}.self
|
|
238
|
-
let figmaNodeUrl: String = "https://figma.com/design/{fileKey}/?node-id={nodeId}"
|
|
239
|
-
var body: some View { ... }
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
// Alternative struct - matches when boolean is false
|
|
243
|
-
struct {componentName}IconOnlyFigmaConnect: FigmaConnect {
|
|
244
|
-
let component = {componentName}.self
|
|
245
|
-
let figmaNodeUrl: String = "https://figma.com/design/{fileKey}/?node-id={nodeId}"
|
|
246
|
-
var variant: [String: Any]? { ["{BooleanPropName}": false] }
|
|
247
|
-
var body: some View { ... }
|
|
248
|
-
}
|
|
249
|
-
```
|
|
250
|
-
Figma shows the most specific matching struct.
|
|
251
|
-
|
|
252
|
-
### 2.6 Icon/Symbol (no component - for bulk icon Code Connect)
|
|
253
|
-
|
|
254
|
-
For simple icon nodes without component properties:
|
|
255
|
-
```swift
|
|
256
|
-
struct {IconName}IconConnect: FigmaConnect {
|
|
257
|
-
let figmaNodeUrl = "https://figma.com/design/{fileKey}/?node-id={nodeId}"
|
|
258
|
-
var body: some View { Image.{swiftName} }
|
|
259
|
-
}
|
|
260
|
-
```
|
|
261
|
-
No `let component`, no property wrappers. Generated in bulk via `generate_icons.py` in the configuration package.
|
|
262
|
-
|
|
263
|
-
Use `FIGMA.md` Variant Mapping section to build the `@FigmaEnum` mappings.
|
|
264
|
-
|
|
265
|
-
**CRITICAL - Implicit Enum Shorthand:**
|
|
266
|
-
- ALL enum values in `@FigmaEnum` mappings MUST use implicit shorthand: `.large` NOT `AvatarPassengers.Size.large`
|
|
267
|
-
- Variable types use the nested type path: `AvatarPassengers.Size` NOT the old top-level name
|
|
268
|
-
- The `body` init call MUST also use implicit shorthand: `AvatarPassengers(size: size, loyaltyType: loyaltyType)` - the variable already carries the type
|
|
269
|
-
|
|
270
|
-
---
|
|
271
|
-
|
|
272
|
-
## GATE 3: UPDATE_FIGMA_MD
|
|
273
|
-
|
|
274
|
-
Add Code Connect section to `{sourceLocation}/FIGMA.md`:
|
|
275
|
-
|
|
276
|
-
```markdown
|
|
277
|
-
## Code Connect
|
|
278
|
-
|
|
279
|
-
**Status:** Published
|
|
280
|
-
**File:** `{componentName}.figma.swift`
|
|
281
|
-
**Strategy:** {STATIC_VALUES|MAPPED_PROPERTIES}
|
|
282
|
-
|
|
283
|
-
### Property Mappings
|
|
284
|
-
|
|
285
|
-
| Figma Property | Type | Annotation |
|
|
286
|
-
|----------------|------|------------|
|
|
287
|
-
| {Name} | {TYPE} | {annotation} |
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
---
|
|
291
|
-
|
|
292
|
-
## GATE 3.5: SCRIPT_VALIDATE
|
|
293
|
-
|
|
294
|
-
Run the Phase 6 validation script before `figma connect parse`:
|
|
295
|
-
|
|
296
|
-
```bash
|
|
297
|
-
bash .instructions/figma/figma-to-swiftui/scripts/validate-phase6.sh \
|
|
298
|
-
"{sourceLocation}/{componentName}.figma.swift" \
|
|
299
|
-
"{ComponentName}" \
|
|
300
|
-
"{artifactPath}/pass1/component_properties.json"
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
| Result | Action |
|
|
304
|
-
|--------|--------|
|
|
305
|
-
| Exit 0 (PASS) | Proceed to GATE 4 |
|
|
306
|
-
| Exit 1 (FAIL) | Fix violations, re-validate |
|
|
307
|
-
|
|
308
|
-
**Common violations:**
|
|
309
|
-
- Fully-qualified enum path → Change `ComponentName.EnumType.case` to `.case`
|
|
310
|
-
- Property coverage gap → Add missing `@FigmaEnum`/`@FigmaBoolean`/`@FigmaString` annotations
|
|
311
|
-
|
|
312
|
-
---
|
|
313
|
-
|
|
314
|
-
## GATE 4: VALIDATE
|
|
315
|
-
|
|
316
|
-
```bash
|
|
317
|
-
export FIGMA_ACCESS_TOKEN=$("$HOME/.claude/lib/credential-store.sh" get \1)
|
|
318
|
-
figma connect parse
|
|
319
|
-
```
|
|
320
|
-
|
|
321
|
-
If `figma` not installed globally, use:
|
|
322
|
-
```bash
|
|
323
|
-
npx @figma/code-connect@latest connect parse
|
|
324
|
-
```
|
|
325
|
-
|
|
326
|
-
| Result | Action |
|
|
327
|
-
|--------|--------|
|
|
328
|
-
| Shows component | Proceed to GATE 5 |
|
|
329
|
-
| Error | HALT |
|
|
330
|
-
|
|
331
|
-
FAIL →
|
|
332
|
-
```
|
|
333
|
-
STATUS: HALT
|
|
334
|
-
PHASE: phase-6
|
|
335
|
-
GATE: VALIDATE
|
|
336
|
-
REASON: Code Connect validation failed.
|
|
337
|
-
ERROR: {errorMessage}
|
|
338
|
-
COMPLETED_GATES: [PRE_CHECK, DETERMINE_STRATEGY, CREATE_FIGMA_SWIFT, UPDATE_FIGMA_MD]
|
|
339
|
-
ARTIFACTS_CREATED:
|
|
340
|
-
- {sourceLocation}/{componentName}.figma.swift
|
|
341
|
-
USER_ACTION_REQUIRED: Options:
|
|
342
|
-
1) Fix .figma.swift and retry
|
|
343
|
-
2) Switch to STATIC_VALUES strategy
|
|
344
|
-
3) Common: "Property 'X' does not exist" → remove @FigmaX, use static value
|
|
345
|
-
REF: reference/code-connect.md → ERROR REFERENCE
|
|
346
|
-
```
|
|
347
|
-
|
|
348
|
-
---
|
|
349
|
-
|
|
350
|
-
## GATE 5: PUBLISH
|
|
351
|
-
|
|
352
|
-
### 5.1 Set Token
|
|
353
|
-
|
|
354
|
-
```bash
|
|
355
|
-
export FIGMA_ACCESS_TOKEN=$("$HOME/.claude/lib/credential-store.sh" get \1)
|
|
356
|
-
```
|
|
357
|
-
|
|
358
|
-
### 5.2 Publish via Wrapper Script
|
|
359
|
-
|
|
360
|
-
**Always use the wrapper script** - it handles validation failures from other components automatically:
|
|
361
|
-
|
|
362
|
-
```bash
|
|
363
|
-
bash .instructions/figma/figma-to-swiftui/scripts/code-connect-publish.sh
|
|
364
|
-
```
|
|
365
|
-
|
|
366
|
-
Optional dry-run first:
|
|
367
|
-
```bash
|
|
368
|
-
bash .instructions/figma/figma-to-swiftui/scripts/code-connect-publish.sh --dry-run
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
The wrapper script:
|
|
372
|
-
1. Attempts `npx @figma/code-connect@latest connect publish`
|
|
373
|
-
2. If exit code 1 due to **other** components' validation failures → auto-excludes them in `figma.config.json` → retries once
|
|
374
|
-
3. Restores `figma.config.json` to original state via trap (crash-safe)
|
|
375
|
-
4. Reports excluded components as warnings
|
|
376
|
-
|
|
377
|
-
**CRITICAL - Check exit code.** `exit code 0` = components published. `exit code 1` = **NOTHING published** (entire batch rejected). The "Successfully connected component" lines in output mean **parse success**, NOT publish success.
|
|
378
|
-
|
|
379
|
-
### 5.3 Result Handling
|
|
380
|
-
|
|
381
|
-
| Result | Action |
|
|
382
|
-
|--------|--------|
|
|
383
|
-
| Script exits 0 | Proceed to GATE 6 |
|
|
384
|
-
| Script exits 0 with WARNING block | Proceed - stale components were auto-excluded and config restored. Note excluded components in IMPLEMENTATION_HISTORY. |
|
|
385
|
-
| Script exits 1 with "403" | **HALT** - token invalid or wrong type. Check prefix: `figd_` = PAT (correct), `figu_` = MCP token (wrong). Re-read PRE-CHECK step 3 token prefix check. |
|
|
386
|
-
| Script exits 1, validation failure on **current** component | Fix the `.figma.swift` mapping, retry |
|
|
387
|
-
| Script exits 1, retry also failed | **HALT** - deeper issue. Check output for details. |
|
|
388
|
-
| Other error | HALT |
|
|
389
|
-
|
|
390
|
-
### 5.4 Fallback (manual publish)
|
|
391
|
-
|
|
392
|
-
If the wrapper script is unavailable, publish directly:
|
|
393
|
-
|
|
394
|
-
```bash
|
|
395
|
-
npx @figma/code-connect@latest connect publish
|
|
396
|
-
```
|
|
397
|
-
|
|
398
|
-
If this fails with exit code 1 due to validation errors on **other** components, manually add them to the `exclude` list in `figma.config.json`, retry, then revert the exclude change.
|
|
399
|
-
|
|
400
|
-
FAIL →
|
|
401
|
-
```
|
|
402
|
-
STATUS: HALT
|
|
403
|
-
PHASE: phase-6
|
|
404
|
-
GATE: PUBLISH
|
|
405
|
-
REASON: Code Connect publish failed.
|
|
406
|
-
ERROR: {errorMessage}
|
|
407
|
-
COMPLETED_GATES: [PRE_CHECK, DETERMINE_STRATEGY, CREATE_FIGMA_SWIFT, UPDATE_FIGMA_MD, VALIDATE]
|
|
408
|
-
ARTIFACTS_CREATED:
|
|
409
|
-
- {sourceLocation}/{componentName}.figma.swift
|
|
410
|
-
USER_ACTION_REQUIRED: Options:
|
|
411
|
-
1) Dry-run: bash .instructions/figma/figma-to-swiftui/scripts/code-connect-publish.sh --dry-run
|
|
412
|
-
2) Check node ID still exists in Figma
|
|
413
|
-
3) Skip publishing
|
|
414
|
-
```
|
|
415
|
-
|
|
416
|
-
---
|
|
417
|
-
|
|
418
|
-
## GATE 5.5: BUILD_VERIFY
|
|
419
|
-
|
|
420
|
-
Code Connect publish does NOT compile Swift - it only validates against the Figma API. A `.figma.swift` file with compile errors will publish successfully but break the project build. Verify compilation after publish:
|
|
421
|
-
|
|
422
|
-
```bash
|
|
423
|
-
xcodebuild build -project "$(git rev-parse --show-toplevel)/{build.xcodeproj}" \
|
|
424
|
-
-scheme {build.scheme} -destination 'generic/platform=iOS' \
|
|
425
|
-
CODE_SIGNING_ALLOWED=NO -quiet
|
|
426
|
-
```
|
|
427
|
-
|
|
428
|
-
| Result | Action |
|
|
429
|
-
|--------|--------|
|
|
430
|
-
| Build succeeds | Proceed to GATE 6 |
|
|
431
|
-
| Build fails on `.figma.swift` | Fix compile errors, re-run build |
|
|
432
|
-
| Build fails on unrelated file | Pre-existing error - proceed (note in history) |
|
|
433
|
-
|
|
434
|
-
**Common `.figma.swift` compile errors:**
|
|
435
|
-
- Fully-qualified enum path: `ComponentName.EnumType.case` → change to `.case`
|
|
436
|
-
- Wrong type: `var x: EnumType` → should be `ComponentName.EnumType`
|
|
437
|
-
- Missing import: add `import Figma` and `import SwiftUI`
|
|
438
|
-
- Stale property: component changed after Code Connect was written - update mapping
|
|
439
|
-
|
|
440
|
-
---
|
|
441
|
-
|
|
442
|
-
## GATE 6: VERIFY
|
|
443
|
-
|
|
444
|
-
Use MCP to verify the mapping is visible in Figma:
|
|
445
|
-
|
|
446
|
-
```
|
|
447
|
-
mcp__figma-remote__get_code_connect_map(nodeId: "{nodeId}", fileKey: "{fileKey}")
|
|
448
|
-
```
|
|
449
|
-
|
|
450
|
-
| Result | Action |
|
|
451
|
-
|--------|--------|
|
|
452
|
-
| Returns mapping | Proceed to GATE 7 |
|
|
453
|
-
| Empty/error | Wait 1-2 min (propagation), retry. Still fails → HALT |
|
|
454
|
-
|
|
455
|
-
FAIL →
|
|
456
|
-
```
|
|
457
|
-
STATUS: HALT
|
|
458
|
-
PHASE: phase-6
|
|
459
|
-
GATE: VERIFY
|
|
460
|
-
REASON: Published Code Connect not visible in Figma.
|
|
461
|
-
COMPLETED_GATES: [PRE_CHECK, DETERMINE_STRATEGY, CREATE_FIGMA_SWIFT, UPDATE_FIGMA_MD, VALIDATE, PUBLISH]
|
|
462
|
-
ARTIFACTS_CREATED:
|
|
463
|
-
- {sourceLocation}/{componentName}.figma.swift
|
|
464
|
-
USER_ACTION_REQUIRED: Options:
|
|
465
|
-
1) Wait 1-2 minutes, retry verification
|
|
466
|
-
2) Check Figma Dev Mode manually
|
|
467
|
-
3) Re-publish
|
|
468
|
-
```
|
|
469
|
-
|
|
470
|
-
---
|
|
471
|
-
|
|
472
|
-
## GATE 7: UPDATE_REGISTRY
|
|
473
|
-
|
|
474
|
-
Run the Phase 6 finalize script to mark Code Connect as published in the registry:
|
|
475
|
-
|
|
476
|
-
```bash
|
|
477
|
-
python3 .instructions/figma/figma-to-swiftui/scripts/phase6-finalize.py \
|
|
478
|
-
--node-id "{nodeId}" \
|
|
479
|
-
--file-key "{fileKey}" \
|
|
480
|
-
--component-name "{componentName}" \
|
|
481
|
-
--platform ios
|
|
482
|
-
```
|
|
483
|
-
|
|
484
|
-
| Result | Action |
|
|
485
|
-
|--------|--------|
|
|
486
|
-
| Exit 0, `"action": "updated"` | Registry updated - proceed |
|
|
487
|
-
| Exit 0, `"action": "created"` | New registry file created - proceed |
|
|
488
|
-
| Exit 0, `"action": "already_set"` | Already marked - proceed |
|
|
489
|
-
| Exit 1 | HALT - registry update failed |
|
|
490
|
-
|
|
491
|
-
**Why this matters:** The `confluence-component-status.py` dashboard reads `codeConnect.ios` from these registry files to determine if a component is "implemented". Without this update, the component won't appear as implemented in the status dashboard.
|
|
492
|
-
|
|
493
|
-
---
|
|
494
|
-
|
|
495
|
-
## GATE 8: UPDATE_HISTORY
|
|
496
|
-
|
|
497
|
-
Update `{artifactPath}/IMPLEMENTATION_HISTORY.md`:
|
|
498
|
-
|
|
499
|
-
```markdown
|
|
500
|
-
## Phase 6: Code Connect
|
|
501
|
-
|
|
502
|
-
- Strategy: {STATIC_VALUES|MAPPED_PROPERTIES}
|
|
503
|
-
- File: {sourceLocation}/{componentName}.figma.swift
|
|
504
|
-
- Properties Mapped: {COUNT}
|
|
505
|
-
- Published: {ISO_DATE}
|
|
506
|
-
- Verified: Yes
|
|
507
|
-
- Registry: Updated codeConnect.ios=true in {nodeId}.json
|
|
508
|
-
```
|
|
509
|
-
|
|
510
|
-
---
|
|
511
|
-
|
|
512
|
-
## VALIDATION CHECKLIST
|
|
513
|
-
|
|
514
|
-
```
|
|
515
|
-
[ ] Strategy determined (STATIC_VALUES or MAPPED_PROPERTIES)
|
|
516
|
-
[ ] {componentName}.figma.swift created at {sourceLocation}/
|
|
517
|
-
[ ] Uses correct figmaNodeUrl with fileKey and nodeId
|
|
518
|
-
[ ] MAPPED_PROPERTIES: @FigmaEnum mappings match FIGMA.md Variant Mapping
|
|
519
|
-
[ ] MAPPED_PROPERTIES: ALL enum values use implicit shorthand (.case NOT Type.case)
|
|
520
|
-
[ ] MAPPED_PROPERTIES: Variable types use nested paths (Component.Type NOT ComponentType)
|
|
521
|
-
[ ] MAPPED_PROPERTIES: body uses +Modifiers style: {componentName} { }.prop(val)
|
|
522
|
-
[ ] STATIC_VALUES: body copies from FIGMA.md Usage section
|
|
523
|
-
[ ] FIGMA.md updated with Code Connect section
|
|
524
|
-
[ ] validate-phase6.sh passed (no implicit shorthand or coverage violations)
|
|
525
|
-
[ ] `figma connect parse` passes
|
|
526
|
-
[ ] `code-connect-publish.sh` succeeds (exit code 0)
|
|
527
|
-
[ ] xcodebuild succeeds (`.figma.swift` compiles without errors)
|
|
528
|
-
[ ] MCP verification returns mapping
|
|
529
|
-
[ ] Registry JSON updated (codeConnect.ios = true)
|
|
530
|
-
[ ] IMPLEMENTATION_HISTORY.md updated
|
|
531
|
-
```
|
|
532
|
-
|
|
533
|
-
---
|
|
534
|
-
|
|
535
|
-
## SUCCESS OUTPUT
|
|
536
|
-
|
|
537
|
-
```
|
|
538
|
-
STATUS: COMPLETE
|
|
539
|
-
PHASE: phase-6
|
|
540
|
-
GATES_PASSED: [PRE_CHECK, DETERMINE_STRATEGY, CREATE_FIGMA_SWIFT, UPDATE_FIGMA_MD, SCRIPT_VALIDATE, VALIDATE, PUBLISH, BUILD_VERIFY, VERIFY, UPDATE_REGISTRY, UPDATE_HISTORY]
|
|
541
|
-
ARTIFACTS_CREATED:
|
|
542
|
-
- {sourceLocation}/{componentName}.figma.swift
|
|
543
|
-
- {sourceLocation}/FIGMA.md (updated)
|
|
544
|
-
- {artifactPath}/IMPLEMENTATION_HISTORY.md (updated)
|
|
545
|
-
- {repos.common.path}/Shared/Figma/Components/{nodeId}.json (codeConnect.ios = true)
|
|
546
|
-
SUMMARY: Code Connect published. Strategy: {strategy}. {COUNT} properties mapped. Verified in Figma Dev Mode. Registry updated. Status dashboard will be refreshed in Phase 7B.
|
|
547
|
-
```
|