claudecode-omc 5.6.5 → 5.6.7
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/.local/commands/code-review.md +416 -0
- package/.local/commands/pr.md +250 -0
- package/.local/commands/prp-pr.md +244 -0
- package/.local/guidelines/CLAUDE.md +47 -0
- package/.local/skills/h5-to-swiftui/SKILL.md +201 -0
- package/.local/skills/h5-to-swiftui/assets/calibration/README.md +176 -0
- package/.local/skills/h5-to-swiftui/assets/calibration/h5-twin/index.html +52 -0
- package/.local/skills/h5-to-swiftui/assets/calibration/h5-twin/style.css +133 -0
- package/.local/skills/h5-to-swiftui/assets/calibration/swiftui-twin/Package.swift +26 -0
- package/.local/skills/h5-to-swiftui/assets/calibration/swiftui-twin/Sources/CalibrationScreen/CalibrationScreen.swift +142 -0
- package/.local/skills/h5-to-swiftui/assets/calibration/swiftui-twin-divergent/Package.swift +32 -0
- package/.local/skills/h5-to-swiftui/assets/calibration/swiftui-twin-divergent/Sources/CalibrationScreenDivergent/CalibrationScreenDivergent.swift +122 -0
- package/.local/skills/h5-to-swiftui/assets/calibration/tokens.json +42 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-react/index.html +14 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-react/package.json +20 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-react/public/api/articles/001.json +96 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-react/public/api/articles/index.json +89 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-react/src/App.jsx +22 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-react/src/App.module.css +11 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-react/src/components/ArticleCard.jsx +53 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-react/src/components/ArticleCard.module.css +139 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-react/src/components/NavBar.jsx +37 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-react/src/components/NavBar.module.css +72 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-react/src/components/TagCloud.jsx +30 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-react/src/components/TagCloud.module.css +50 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-react/src/components/TrendChart.jsx +159 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-react/src/components/TrendChart.module.css +21 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-react/src/main.jsx +12 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-react/src/screens/ArticleScreen.jsx +182 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-react/src/screens/ArticleScreen.module.css +294 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-react/src/screens/FeedScreen.jsx +147 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-react/src/screens/FeedScreen.module.css +161 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-react/src/styles/global.css +50 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-react/src/styles/tokens.css +103 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-react/vite.config.js +6 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-vanilla/data/tasks.js +67 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-vanilla/index.html +26 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-vanilla/router.js +73 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-vanilla/screens/detail.js +164 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-vanilla/screens/home.js +53 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-vanilla/screens/list.js +87 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-vanilla/styles/app.css +342 -0
- package/.local/skills/h5-to-swiftui/assets/sample-h5-vanilla/styles/tokens.css +68 -0
- package/.local/skills/h5-to-swiftui/references/css-to-swiftui-map.md +205 -0
- package/.local/skills/h5-to-swiftui/references/design-token-extraction.md +209 -0
- package/.local/skills/h5-to-swiftui/references/high-risk-triage.md +209 -0
- package/.local/skills/h5-to-swiftui/references/render-equivalence-calibration.md +193 -0
- package/.local/skills/h5-to-swiftui/references/stack-detection.md +160 -0
- package/.local/skills/h5-to-swiftui/references/visual-diff-loop-protocol.md +365 -0
- package/.local/skills/h5-to-swiftui/scripts/_calib-consts.mjs +150 -0
- package/.local/skills/h5-to-swiftui/scripts/_imglib.mjs +547 -0
- package/.local/skills/h5-to-swiftui/scripts/_provenance.mjs +123 -0
- package/.local/skills/h5-to-swiftui/scripts/calibrate-render.mjs +625 -0
- package/.local/skills/h5-to-swiftui/scripts/capture-reference.mjs +386 -0
- package/.local/skills/h5-to-swiftui/scripts/detect-stack.mjs +305 -0
- package/.local/skills/h5-to-swiftui/scripts/evaluate-convergence.mjs +1093 -0
- package/.local/skills/h5-to-swiftui/scripts/extract-tokens.mjs +600 -0
- package/.local/skills/h5-to-swiftui/scripts/mark-overlay.mjs +379 -0
- package/.local/skills/h5-to-swiftui/scripts/pixel-diff.mjs +530 -0
- package/.local/skills/h5-to-swiftui/scripts/sim-screenshot.sh +544 -0
- package/bundled/manifest.json +4 -4
- package/bundled/upstream/anthropic-skills/skills/algorithmic-art/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/brand-guidelines/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/canvas-design/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/claude-api/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/claude-api/SKILL.md +120 -58
- package/bundled/upstream/anthropic-skills/skills/claude-api/curl/examples.md +9 -9
- package/bundled/upstream/anthropic-skills/skills/claude-api/curl/managed-agents.md +336 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/go/managed-agents/README.md +561 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/java/claude-api.md +2 -2
- package/bundled/upstream/anthropic-skills/skills/claude-api/java/managed-agents/README.md +442 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/php/claude-api.md +10 -10
- package/bundled/upstream/anthropic-skills/skills/claude-api/php/managed-agents/README.md +435 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/README.md +16 -16
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/batches.md +3 -3
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/files-api.md +3 -3
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/streaming.md +7 -7
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/tool-use.md +19 -19
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/managed-agents/README.md +332 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/ruby/claude-api.md +4 -4
- package/bundled/upstream/anthropic-skills/skills/claude-api/ruby/managed-agents/README.md +389 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/agent-design.md +101 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/error-codes.md +11 -4
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/live-sources.md +60 -48
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-api-reference.md +372 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-client-patterns.md +209 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-core.md +220 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-environments.md +211 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-events.md +195 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-memory.md +197 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-multiagent.md +99 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-onboarding.md +114 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-outcomes.md +106 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-overview.md +67 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-tools.md +315 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-webhooks.md +110 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/model-migration.md +779 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/models.md +16 -14
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/prompt-caching.md +45 -2
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/tool-use-concepts.md +28 -6
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/README.md +15 -15
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/batches.md +2 -2
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/files-api.md +1 -1
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/streaming.md +5 -5
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/tool-use.md +15 -15
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/managed-agents/README.md +359 -0
- package/bundled/upstream/anthropic-skills/skills/internal-comms/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/mcp-builder/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/skill-creator/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/slack-gif-creator/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/theme-factory/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/web-artifacts-builder/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/webapp-testing/LICENSE.txt +1 -1
- package/bundled/upstream/ecc/.omc-source/bundle.json +2 -3
- package/bundled/upstream/ecc/.omc-source/manifests/.claude-plugin/marketplace.json +4 -4
- package/bundled/upstream/ecc/agents/a11y-architect.md +10 -2
- package/bundled/upstream/ecc/agents/architect.md +9 -0
- package/bundled/upstream/ecc/agents/build-error-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/chief-of-staff.md +9 -0
- package/bundled/upstream/ecc/agents/code-architect.md +9 -0
- package/bundled/upstream/ecc/agents/code-explorer.md +10 -1
- package/bundled/upstream/ecc/agents/code-reviewer.md +87 -1
- package/bundled/upstream/ecc/agents/code-simplifier.md +9 -0
- package/bundled/upstream/ecc/agents/comment-analyzer.md +10 -1
- package/bundled/upstream/ecc/agents/conversation-analyzer.md +9 -0
- package/bundled/upstream/ecc/agents/cpp-build-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/cpp-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/csharp-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/dart-build-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/database-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/django-build-resolver.md +252 -0
- package/bundled/upstream/ecc/agents/django-reviewer.md +169 -0
- package/bundled/upstream/ecc/agents/doc-updater.md +9 -0
- package/bundled/upstream/ecc/agents/docs-lookup.md +9 -0
- package/bundled/upstream/ecc/agents/e2e-runner.md +9 -0
- package/bundled/upstream/ecc/agents/fastapi-reviewer.md +79 -0
- package/bundled/upstream/ecc/agents/flutter-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/fsharp-reviewer.md +109 -0
- package/bundled/upstream/ecc/agents/gan-evaluator.md +9 -0
- package/bundled/upstream/ecc/agents/gan-generator.md +9 -0
- package/bundled/upstream/ecc/agents/gan-planner.md +9 -0
- package/bundled/upstream/ecc/agents/go-build-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/go-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/harmonyos-app-resolver.md +182 -0
- package/bundled/upstream/ecc/agents/harness-optimizer.md +9 -0
- package/bundled/upstream/ecc/agents/healthcare-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/homelab-architect.md +107 -0
- package/bundled/upstream/ecc/agents/java-build-resolver.md +133 -11
- package/bundled/upstream/ecc/agents/java-reviewer.md +130 -32
- package/bundled/upstream/ecc/agents/kotlin-build-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/kotlin-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/loop-operator.md +9 -0
- package/bundled/upstream/ecc/agents/mle-reviewer.md +162 -0
- package/bundled/upstream/ecc/agents/network-architect.md +106 -0
- package/bundled/upstream/ecc/agents/network-config-reviewer.md +106 -0
- package/bundled/upstream/ecc/agents/network-troubleshooter.md +128 -0
- package/bundled/upstream/ecc/agents/opensource-forker.md +9 -0
- package/bundled/upstream/ecc/agents/opensource-packager.md +9 -0
- package/bundled/upstream/ecc/agents/opensource-sanitizer.md +9 -0
- package/bundled/upstream/ecc/agents/performance-optimizer.md +9 -0
- package/bundled/upstream/ecc/agents/planner.md +9 -0
- package/bundled/upstream/ecc/agents/pr-test-analyzer.md +9 -0
- package/bundled/upstream/ecc/agents/python-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/pytorch-build-resolver.md +12 -3
- package/bundled/upstream/ecc/agents/refactor-cleaner.md +9 -0
- package/bundled/upstream/ecc/agents/rust-build-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/rust-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/security-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/seo-specialist.md +10 -1
- package/bundled/upstream/ecc/agents/silent-failure-hunter.md +9 -0
- package/bundled/upstream/ecc/agents/swift-build-resolver.md +170 -0
- package/bundled/upstream/ecc/agents/swift-reviewer.md +116 -0
- package/bundled/upstream/ecc/agents/tdd-guide.md +9 -0
- package/bundled/upstream/ecc/agents/type-design-analyzer.md +10 -1
- package/bundled/upstream/ecc/agents/typescript-reviewer.md +9 -0
- package/bundled/upstream/ecc/commands/auto-update.md +28 -0
- package/bundled/upstream/ecc/commands/build-fix.md +4 -0
- package/bundled/upstream/ecc/commands/checkpoint.md +4 -0
- package/bundled/upstream/ecc/commands/code-review.md +3 -3
- package/bundled/upstream/ecc/commands/cost-report.md +107 -0
- package/bundled/upstream/ecc/commands/cpp-build.md +1 -1
- package/bundled/upstream/ecc/commands/cpp-test.md +1 -1
- package/bundled/upstream/ecc/commands/ecc-guide.md +93 -0
- package/bundled/upstream/ecc/commands/fastapi-review.md +39 -0
- package/bundled/upstream/ecc/commands/flutter-build.md +1 -1
- package/bundled/upstream/ecc/commands/flutter-test.md +1 -1
- package/bundled/upstream/ecc/commands/gan-build.md +4 -0
- package/bundled/upstream/ecc/commands/gan-design.md +4 -0
- package/bundled/upstream/ecc/commands/go-build.md +1 -1
- package/bundled/upstream/ecc/commands/go-test.md +1 -1
- package/bundled/upstream/ecc/commands/harness-audit.md +4 -0
- package/bundled/upstream/ecc/commands/jira.md +2 -2
- package/bundled/upstream/ecc/commands/kotlin-build.md +1 -1
- package/bundled/upstream/ecc/commands/kotlin-test.md +1 -1
- package/bundled/upstream/ecc/commands/learn.md +4 -0
- package/bundled/upstream/ecc/commands/loop-start.md +4 -0
- package/bundled/upstream/ecc/commands/loop-status.md +54 -1
- package/bundled/upstream/ecc/commands/model-route.md +4 -0
- package/bundled/upstream/ecc/commands/multi-backend.md +4 -0
- package/bundled/upstream/ecc/commands/multi-execute.md +4 -0
- package/bundled/upstream/ecc/commands/multi-frontend.md +4 -0
- package/bundled/upstream/ecc/commands/multi-plan.md +4 -0
- package/bundled/upstream/ecc/commands/multi-workflow.md +4 -0
- package/bundled/upstream/ecc/commands/plan-prd.md +160 -0
- package/bundled/upstream/ecc/commands/plan.md +96 -13
- package/bundled/upstream/ecc/commands/pm2.md +4 -0
- package/bundled/upstream/ecc/commands/pr.md +184 -0
- package/bundled/upstream/ecc/commands/project-init.md +86 -0
- package/bundled/upstream/ecc/commands/python-review.md +1 -1
- package/bundled/upstream/ecc/commands/quality-gate.md +4 -0
- package/bundled/upstream/ecc/commands/refactor-clean.md +4 -0
- package/bundled/upstream/ecc/commands/rust-build.md +1 -1
- package/bundled/upstream/ecc/commands/rust-test.md +1 -1
- package/bundled/upstream/ecc/commands/security-scan.md +92 -0
- package/bundled/upstream/ecc/commands/sessions.md +6 -6
- package/bundled/upstream/ecc/commands/skill-health.md +3 -3
- package/bundled/upstream/ecc/commands/test-coverage.md +4 -0
- package/bundled/upstream/ecc/commands/update-codemaps.md +4 -0
- package/bundled/upstream/ecc/commands/update-docs.md +4 -0
- package/bundled/upstream/ecc/skills/accessibility/SKILL.md +1 -1
- package/bundled/upstream/ecc/skills/agent-architecture-audit/SKILL.md +256 -0
- package/bundled/upstream/ecc/skills/agent-payment-x402/SKILL.md +49 -3
- package/bundled/upstream/ecc/skills/agentic-os/SKILL.md +387 -0
- package/bundled/upstream/ecc/skills/angular-developer/SKILL.md +154 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/angular-animations.md +160 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/angular-aria.md +410 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/cli.md +86 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/component-harnesses.md +59 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/component-styling.md +91 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/components.md +117 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/creating-services.md +97 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/data-resolvers.md +69 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/define-routes.md +67 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/defining-providers.md +72 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/di-fundamentals.md +120 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/e2e-testing.md +56 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/effects.md +83 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/hierarchical-injectors.md +43 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/host-elements.md +80 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/injection-context.md +63 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/inputs.md +101 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/linked-signal.md +59 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/loading-strategies.md +61 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/mcp.md +108 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/navigate-to-routes.md +69 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/outputs.md +86 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/reactive-forms.md +122 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/rendering-strategies.md +44 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/resource.md +77 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/route-animations.md +56 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/route-guards.md +52 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/router-lifecycle.md +45 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/router-testing.md +87 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/show-routes-with-outlets.md +68 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/signal-forms.md +795 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/signals-overview.md +94 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/tailwind-css.md +69 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/template-driven-forms.md +114 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/testing-fundamentals.md +65 -0
- package/bundled/upstream/ecc/skills/autonomous-agent-harness/SKILL.md +6 -0
- package/bundled/upstream/ecc/skills/backend-patterns/SKILL.md +8 -45
- package/bundled/upstream/ecc/skills/cisco-ios-patterns/SKILL.md +163 -0
- package/bundled/upstream/ecc/skills/configure-ecc/SKILL.md +31 -14
- package/bundled/upstream/ecc/skills/continuous-learning/SKILL.md +10 -2
- package/bundled/upstream/ecc/skills/continuous-learning-v2/SKILL.md +19 -5
- package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/observer-loop.sh +44 -4
- package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/observer.md +4 -4
- package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/start-observer.sh +5 -1
- package/bundled/upstream/ecc/skills/continuous-learning-v2/hooks/observe.sh +21 -5
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/detect-project.sh +58 -13
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/instinct-cli.py +97 -4
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/lib/homunculus-dir.sh +31 -0
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/migrate-homunculus.sh +62 -0
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/test_parse_instinct.py +34 -0
- package/bundled/upstream/ecc/skills/cost-tracking/SKILL.md +147 -0
- package/bundled/upstream/ecc/skills/deep-research/SKILL.md +4 -0
- package/bundled/upstream/ecc/skills/defi-amm-security/SKILL.md +6 -0
- package/bundled/upstream/ecc/skills/django-celery/SKILL.md +457 -0
- package/bundled/upstream/ecc/skills/ecc-guide/SKILL.md +189 -0
- package/bundled/upstream/ecc/skills/error-handling/SKILL.md +376 -0
- package/bundled/upstream/ecc/skills/exa-search/SKILL.md +4 -0
- package/bundled/upstream/ecc/skills/fal-ai-media/SKILL.md +4 -0
- package/bundled/upstream/ecc/skills/fastapi-patterns/SKILL.md +327 -0
- package/bundled/upstream/ecc/skills/flox-environments/SKILL.md +496 -0
- package/bundled/upstream/ecc/skills/frontend-design-direction/SKILL.md +92 -0
- package/bundled/upstream/ecc/skills/frontend-slides/animation-patterns.md +122 -0
- package/bundled/upstream/ecc/skills/frontend-slides/html-template.md +419 -0
- package/bundled/upstream/ecc/skills/frontend-slides/scripts/export-pdf.sh +418 -0
- package/bundled/upstream/ecc/skills/frontend-slides/scripts/extract-pptx.py +96 -0
- package/bundled/upstream/ecc/skills/frontend-slides/viewport-base.css +153 -0
- package/bundled/upstream/ecc/skills/fsharp-testing/SKILL.md +280 -0
- package/bundled/upstream/ecc/skills/gateguard/SKILL.md +4 -0
- package/bundled/upstream/ecc/skills/hermes-imports/SKILL.md +88 -0
- package/bundled/upstream/ecc/skills/homelab-network-readiness/SKILL.md +169 -0
- package/bundled/upstream/ecc/skills/homelab-network-setup/SKILL.md +129 -0
- package/bundled/upstream/ecc/skills/homelab-pihole-dns/SKILL.md +274 -0
- package/bundled/upstream/ecc/skills/homelab-vlan-segmentation/SKILL.md +311 -0
- package/bundled/upstream/ecc/skills/homelab-wireguard-vpn/SKILL.md +305 -0
- package/bundled/upstream/ecc/skills/ios-icon-gen/SKILL.md +157 -0
- package/bundled/upstream/ecc/skills/ios-icon-gen/scripts/generate_icons.swift +258 -0
- package/bundled/upstream/ecc/skills/ios-icon-gen/scripts/iconify_gen.sh +235 -0
- package/bundled/upstream/ecc/skills/java-coding-standards/SKILL.md +241 -5
- package/bundled/upstream/ecc/skills/make-interfaces-feel-better/SKILL.md +151 -0
- package/bundled/upstream/ecc/skills/mle-workflow/SKILL.md +346 -0
- package/bundled/upstream/ecc/skills/motion-advanced/SKILL.md +596 -0
- package/bundled/upstream/ecc/skills/motion-foundations/SKILL.md +299 -0
- package/bundled/upstream/ecc/skills/motion-patterns/SKILL.md +435 -0
- package/bundled/upstream/ecc/skills/motion-ui/SKILL.md +575 -0
- package/bundled/upstream/ecc/skills/mysql-patterns/SKILL.md +412 -0
- package/bundled/upstream/ecc/skills/netmiko-ssh-automation/SKILL.md +173 -0
- package/bundled/upstream/ecc/skills/network-bgp-diagnostics/SKILL.md +167 -0
- package/bundled/upstream/ecc/skills/network-config-validation/SKILL.md +210 -0
- package/bundled/upstream/ecc/skills/network-interface-health/SKILL.md +152 -0
- package/bundled/upstream/ecc/skills/openclaw-persona-forge/SKILL.md +1 -9
- package/bundled/upstream/ecc/skills/plan-orchestrate/SKILL.md +262 -0
- package/bundled/upstream/ecc/skills/prisma-patterns/SKILL.md +371 -0
- package/bundled/upstream/ecc/skills/production-audit/SKILL.md +206 -0
- package/bundled/upstream/ecc/skills/prompt-optimizer/SKILL.md +24 -400
- package/bundled/upstream/ecc/skills/quarkus-patterns/SKILL.md +722 -0
- package/bundled/upstream/ecc/skills/quarkus-security/SKILL.md +467 -0
- package/bundled/upstream/ecc/skills/quarkus-tdd/SKILL.md +811 -0
- package/bundled/upstream/ecc/skills/quarkus-verification/SKILL.md +479 -0
- package/bundled/upstream/ecc/skills/redis-patterns/SKILL.md +403 -0
- package/bundled/upstream/ecc/skills/scientific-db-pubmed-database/SKILL.md +175 -0
- package/bundled/upstream/ecc/skills/scientific-db-uspto-database/SKILL.md +177 -0
- package/bundled/upstream/ecc/skills/scientific-pkg-gget/SKILL.md +166 -0
- package/bundled/upstream/ecc/skills/scientific-thinking-literature-review/SKILL.md +192 -0
- package/bundled/upstream/ecc/skills/scientific-thinking-scholar-evaluation/SKILL.md +160 -0
- package/bundled/upstream/ecc/skills/search-first/SKILL.md +23 -2
- package/bundled/upstream/ecc/skills/security-review/SKILL.md +10 -2
- package/bundled/upstream/ecc/skills/skill-comply/scripts/runner.py +28 -3
- package/bundled/upstream/ecc/skills/skill-comply/tests/test_runner.py +172 -0
- package/bundled/upstream/ecc/skills/skill-scout/SKILL.md +140 -0
- package/bundled/upstream/ecc/skills/skill-stocktake/SKILL.md +1 -0
- package/bundled/upstream/ecc/skills/strategic-compact/SKILL.md +2 -2
- package/bundled/upstream/ecc/skills/tinystruct-patterns/SKILL.md +203 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/architecture.md +90 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/data-handling.md +60 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/database.md +99 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/routing.md +64 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/system-usage.md +97 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/testing.md +72 -0
- package/bundled/upstream/ecc/skills/ui-to-vue/SKILL.md +134 -0
- package/bundled/upstream/ecc/skills/vite-patterns/SKILL.md +449 -0
- package/bundled/upstream/ecc/skills/windows-desktop-e2e/SKILL.md +788 -0
- package/bundled/upstream/ecc/skills/x-api/SKILL.md +4 -0
- package/bundled/upstream/oh-my-claudecode/.omc-source/bundle.json +20 -0
- package/bundled/upstream/oh-my-claudecode/agents/analyst.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/architect.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/code-reviewer.md +26 -7
- package/bundled/upstream/oh-my-claudecode/agents/critic.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/debugger.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/designer.md +14 -1
- package/bundled/upstream/oh-my-claudecode/agents/document-specialist.md +1 -1
- package/bundled/upstream/oh-my-claudecode/agents/executor.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/explore.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/git-master.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/planner.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/qa-tester.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/scientist.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/security-reviewer.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/test-engineer.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/tracer.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/verifier.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/writer.md +2 -1
- package/bundled/upstream/oh-my-claudecode/skills/AGENTS.md +4 -3
- package/bundled/upstream/oh-my-claudecode/skills/ai-slop-cleaner/SKILL.md +12 -0
- package/bundled/upstream/oh-my-claudecode/skills/deep-dive/SKILL.md +69 -13
- package/bundled/upstream/oh-my-claudecode/skills/deep-interview/SKILL.md +176 -63
- package/bundled/upstream/oh-my-claudecode/skills/learner/SKILL.md +3 -1
- package/bundled/upstream/oh-my-claudecode/skills/omc-doctor/SKILL.md +22 -3
- package/bundled/upstream/oh-my-claudecode/skills/omc-reference/SKILL.md +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/01-install-claude-md.md +2 -2
- package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/02-configure.md +45 -2
- package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/03-integrations.md +46 -5
- package/bundled/upstream/oh-my-claudecode/skills/plan/SKILL.md +19 -17
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/config.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/parse.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/azure-devops.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/bitbucket.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/gitea.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/github.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/gitlab.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/interface.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/jira.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/session.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/tmux.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/worktree.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/psm.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/tests/test-psm-prompt-injection.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/ralph/SKILL.md +8 -8
- package/bundled/upstream/oh-my-claudecode/skills/ralplan/SKILL.md +9 -5
- package/bundled/upstream/oh-my-claudecode/skills/skill/SKILL.md +6 -6
- package/bundled/upstream/oh-my-claudecode/skills/skillify/SKILL.md +19 -3
- package/bundled/upstream/oh-my-claudecode/skills/trace/SKILL.md +3 -1
- package/bundled/upstream/oh-my-claudecode/skills/ultrawork/SKILL.md +20 -7
- package/bundled/upstream/superpowers/.omc-source/bundle.json +21 -0
- package/bundled/upstream/superpowers/hooks/hooks-cursor.json +1 -1
- package/bundled/upstream/superpowers/skills/executing-plans/SKILL.md +1 -1
- package/bundled/upstream/superpowers/skills/finishing-a-development-branch/SKILL.md +93 -42
- package/bundled/upstream/superpowers/skills/requesting-code-review/SKILL.md +7 -9
- package/bundled/upstream/superpowers/skills/requesting-code-review/code-reviewer.md +107 -85
- package/bundled/upstream/superpowers/skills/subagent-driven-development/SKILL.md +3 -1
- package/bundled/upstream/superpowers/skills/subagent-driven-development/code-quality-reviewer-prompt.md +2 -3
- package/bundled/upstream/superpowers/skills/systematic-debugging/CREATION-LOG.md +1 -1
- package/bundled/upstream/superpowers/skills/systematic-debugging/root-cause-tracing.md +1 -1
- package/bundled/upstream/superpowers/skills/using-git-worktrees/SKILL.md +95 -98
- package/bundled/upstream/superpowers/skills/using-superpowers/references/codex-tools.md +7 -48
- package/bundled/upstream/superpowers/skills/using-superpowers/references/copilot-tools.md +1 -11
- package/bundled/upstream/superpowers/skills/using-superpowers/references/gemini-tools.md +21 -3
- package/bundled/upstream/superpowers/skills/writing-plans/SKILL.md +1 -1
- package/package.json +1 -1
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/agent-sdk/README.md +0 -355
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/agent-sdk/patterns.md +0 -359
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/agent-sdk/README.md +0 -297
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/agent-sdk/patterns.md +0 -209
- package/bundled/upstream/ecc/commands/agent-sort.md +0 -23
- package/bundled/upstream/ecc/commands/claw.md +0 -23
- package/bundled/upstream/ecc/commands/context-budget.md +0 -23
- package/bundled/upstream/ecc/commands/devfleet.md +0 -23
- package/bundled/upstream/ecc/commands/docs.md +0 -23
- package/bundled/upstream/ecc/commands/e2e.md +0 -268
- package/bundled/upstream/ecc/commands/eval.md +0 -23
- package/bundled/upstream/ecc/commands/orchestrate.md +0 -135
- package/bundled/upstream/ecc/commands/prompt-optimize.md +0 -23
- package/bundled/upstream/ecc/commands/rules-distill.md +0 -20
- package/bundled/upstream/ecc/commands/tdd.md +0 -231
- package/bundled/upstream/ecc/commands/verify.md +0 -23
- package/bundled/upstream/ecc/skills/claude-api/SKILL.md +0 -337
- package/bundled/upstream/ecc/skills/frontend-design/SKILL.md +0 -145
- package/bundled/upstream/superpowers/agents/code-reviewer.md +0 -48
- package/bundled/upstream/superpowers/commands/brainstorm.md +0 -5
- package/bundled/upstream/superpowers/commands/execute-plan.md +0 -5
- package/bundled/upstream/superpowers/commands/write-plan.md +0 -5
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/* ── Design Tokens ───────────────────────────────────────────────────────────
|
|
2
|
+
All visual values are defined here as CSS custom properties so that
|
|
3
|
+
extract-tokens.mjs can harvest them in Stage 1.
|
|
4
|
+
─────────────────────────────────────────────────────────────────────────── */
|
|
5
|
+
|
|
6
|
+
:root {
|
|
7
|
+
/* Colors */
|
|
8
|
+
--color-bg: #f5f5f7;
|
|
9
|
+
--color-surface: #ffffff;
|
|
10
|
+
--color-surface-alt: #f0f0f5;
|
|
11
|
+
--color-primary: #007aff;
|
|
12
|
+
--color-primary-dark: #0055cc;
|
|
13
|
+
--color-text: #1c1c1e;
|
|
14
|
+
--color-text-secondary:#6e6e73;
|
|
15
|
+
--color-border: #d1d1d6;
|
|
16
|
+
--color-danger: #ff3b30;
|
|
17
|
+
--color-success: #34c759;
|
|
18
|
+
|
|
19
|
+
/* Typography */
|
|
20
|
+
--font-size-title: 1.75rem;
|
|
21
|
+
--font-size-heading: 1.25rem;
|
|
22
|
+
--font-size-body: 1rem;
|
|
23
|
+
--font-size-caption: 0.75rem;
|
|
24
|
+
--font-weight-regular: 400;
|
|
25
|
+
--font-weight-medium: 500;
|
|
26
|
+
--font-weight-bold: 700;
|
|
27
|
+
--line-height-tight: 1.2;
|
|
28
|
+
--line-height-normal: 1.5;
|
|
29
|
+
|
|
30
|
+
/* Spacing */
|
|
31
|
+
--space-1: 0.25rem;
|
|
32
|
+
--space-2: 0.5rem;
|
|
33
|
+
--space-3: 0.75rem;
|
|
34
|
+
--space-4: 1rem;
|
|
35
|
+
--space-5: 1.25rem;
|
|
36
|
+
--space-6: 1.5rem;
|
|
37
|
+
--space-8: 2rem;
|
|
38
|
+
--space-12: 3rem;
|
|
39
|
+
|
|
40
|
+
/* Radii */
|
|
41
|
+
--radius-sm: 4px;
|
|
42
|
+
--radius-md: 8px;
|
|
43
|
+
--radius-lg: 16px;
|
|
44
|
+
--radius-full: 9999px;
|
|
45
|
+
|
|
46
|
+
/* Shadows */
|
|
47
|
+
--shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
48
|
+
|
|
49
|
+
/* Nav */
|
|
50
|
+
--nav-height: 3rem;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* ── Dark scheme ─────────────────────────────────────────────────────────── */
|
|
54
|
+
@media (prefers-color-scheme: dark) {
|
|
55
|
+
:root {
|
|
56
|
+
--color-bg: #000000;
|
|
57
|
+
--color-surface: #1c1c1e;
|
|
58
|
+
--color-surface-alt: #2c2c2e;
|
|
59
|
+
--color-primary: #0a84ff;
|
|
60
|
+
--color-primary-dark: #409cff;
|
|
61
|
+
--color-text: #ffffff;
|
|
62
|
+
--color-text-secondary:#aeaeb2;
|
|
63
|
+
--color-border: #38383a;
|
|
64
|
+
--color-danger: #ff453a;
|
|
65
|
+
--color-success: #30d158;
|
|
66
|
+
--shadow-card: 0 2px 8px rgba(0, 0, 0, 0.4);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# CSS → SwiftUI Mapping Reference — Stage 4
|
|
2
|
+
|
|
3
|
+
This is the lookup table used by the Stage 4 LLM prompt and the idiomatic-lint
|
|
4
|
+
checker. Accuracy is critical — this directly drives code generation. Every row
|
|
5
|
+
includes a caveat column because a mapping without its caveat is incomplete.
|
|
6
|
+
|
|
7
|
+
Source: findings.md RQ5 (kean.blog; Hacking with Swift; Swift with Majid;
|
|
8
|
+
swiftuifieldguide; Apple WWDC22-10056; tonsky.me; fatbobman).
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Flexbox → SwiftUI
|
|
13
|
+
|
|
14
|
+
| CSS property / value | SwiftUI equivalent | Caveat |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| `display: flex; flex-direction: row` | `HStack(alignment:, spacing:)` | Default `HStack()` spacing is non-zero (system-defined); **always pass `spacing: 0`** then add explicit spacing between children |
|
|
17
|
+
| `display: flex; flex-direction: column` | `VStack(alignment:, spacing:)` | Same spacing caveat — pass `spacing: 0` |
|
|
18
|
+
| `flex-direction: row-reverse` | `HStack` + `.environment(\.layoutDirection, .rightToLeft)` or reverse the child array | Prefer reversing child array when order is data-driven |
|
|
19
|
+
| `flex-direction: column-reverse` | `VStack` + reversed child array | No native reverse stack; reversing in data source is cleanest |
|
|
20
|
+
| `justify-content: flex-start` | Default (leading) | No modifier needed |
|
|
21
|
+
| `justify-content: flex-end` | `Spacer()` before first child | `Spacer()` expands to fill available space |
|
|
22
|
+
| `justify-content: center` | `Spacer()` + children + `Spacer()` | Or `.frame(maxWidth: .infinity, alignment: .center)` on the container |
|
|
23
|
+
| `justify-content: space-between` | `Spacer()` between each pair of children | Must insert N−1 spacers manually |
|
|
24
|
+
| `justify-content: space-around` | `Spacer()` before first, between each, after last | Each spacer gets equal weight; use `Spacer(minLength: 0)` |
|
|
25
|
+
| `justify-content: space-evenly` | `Spacer()` at all gaps including edges | Same as `space-around` implementation in SwiftUI |
|
|
26
|
+
| `align-items: flex-start` | `HStack(alignment: .top)` / `VStack(alignment: .leading)` | |
|
|
27
|
+
| `align-items: center` | `HStack(alignment: .center)` / `VStack(alignment: .center)` | `.center` is the default for HStack |
|
|
28
|
+
| `align-items: flex-end` | `HStack(alignment: .bottom)` / `VStack(alignment: .trailing)` | |
|
|
29
|
+
| `align-items: stretch` | Default HStack/VStack behavior for views with no explicit frame | Add `.frame(maxWidth: .infinity)` on children that need to stretch |
|
|
30
|
+
| `align-items: baseline` | `HStack(alignment: .firstTextBaseline)` | Also `.lastTextBaseline`; applies only to text-bearing children |
|
|
31
|
+
| `align-self: <value>` | `.alignmentGuide(alignment, computeValue:)` on the individual child | No direct `align-self` equivalent; alignment guides are complex — use only when necessary |
|
|
32
|
+
| `flex-grow: 1` (uniform on all siblings) | `.frame(maxWidth: .infinity)` (in HStack) or `.frame(maxHeight: .infinity)` (in VStack) | Only correct when all siblings have the same grow ratio |
|
|
33
|
+
| `flex-grow` (non-uniform ratios) | **Custom `Layout` protocol (iOS 16+)** | See "When you MUST use custom Layout" section below |
|
|
34
|
+
| `flex-shrink: 0` | `.fixedSize()` or explicit `.frame(width:, height:)` | Prevents the view from shrinking below its ideal size |
|
|
35
|
+
| `flex-shrink: 1` (default) | Default SwiftUI behavior | SwiftUI views compress by default when space is tight |
|
|
36
|
+
| `flex-basis: <value>` | `.frame(width: value)` / `.frame(height: value)` | Approximate only; no exact CSS `flex-basis` semantics in SwiftUI |
|
|
37
|
+
| `flex-wrap: wrap` | **Custom `Layout` protocol (iOS 16+)** — `FlowLayout` | No `LazyHGrid`/`LazyVGrid` equivalent for true wrapping; see FlowLayout sketch below |
|
|
38
|
+
| `flex-wrap: nowrap` | Default HStack/VStack (no wrapping) | |
|
|
39
|
+
| `gap: <value>` | `spacing: value` parameter on HStack/VStack | Both row-gap and column-gap map to the same `spacing` param — if they differ, use custom Layout |
|
|
40
|
+
| `row-gap: <value>` | `spacing: value` on VStack | |
|
|
41
|
+
| `column-gap: <value>` | `spacing: value` on HStack | |
|
|
42
|
+
| `order: <n>` | Reorder child array in data source | SwiftUI renders children in declaration order; no runtime reorder modifier exists |
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## CSS Grid → SwiftUI
|
|
47
|
+
|
|
48
|
+
SwiftUI's grid support is intentionally limited. Know the ceiling.
|
|
49
|
+
|
|
50
|
+
| CSS Grid construct | SwiftUI equivalent | Caveat |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| `grid-template-columns: repeat(N, 1fr)` | `LazyVGrid(columns: Array(repeating: GridItem(.flexible()), count: N))` | Only works for uniform fraction columns; not for mixed units |
|
|
53
|
+
| `grid-template-columns: auto-fill minmax(min, max)` | `LazyVGrid(columns: [GridItem(.adaptive(minimum: min, maximum: max))])` | `.adaptive` fills available width automatically |
|
|
54
|
+
| `fr` ratios (non-uniform, e.g. `1fr 2fr 1fr`) | **Custom `Layout` protocol (iOS 16+)** | No `LazyVGrid` equivalent; fr ratios require measuring total space and distributing proportionally |
|
|
55
|
+
| `grid-template-areas` | Not supported in LazyVGrid/Grid | Use `ZStack` + `.position` for named-area layouts, or custom Layout |
|
|
56
|
+
| `grid-column: span N` (eager Grid) | `.gridCellColumns(N)` on the child | Only works inside `Grid` (eager), not `LazyVGrid` |
|
|
57
|
+
| `grid-row: span N` | Not supported in LazyVGrid | Requires `Grid` (eager) or custom Layout |
|
|
58
|
+
| Explicit line placement (`grid-column: 2 / 4`) | Not supported natively | Custom Layout required |
|
|
59
|
+
| Auto-placement (dense) | LazyVGrid default | LazyVGrid uses source order auto-placement; no `grid-auto-flow: dense` |
|
|
60
|
+
| `gap` / `column-gap` / `row-gap` | `spacing` on `LazyVGrid` or `Grid` | Sets both axes uniformly; split-axis gap requires custom Layout |
|
|
61
|
+
| `Grid` (eager, iOS 16+) | `Grid { GridRow { … } }` | Full alignment control; use for small, known-count grids |
|
|
62
|
+
| `LazyVGrid` | `LazyVGrid(columns:, spacing:)` | For large/dynamic lists; less alignment control than `Grid` |
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Positioning → SwiftUI
|
|
67
|
+
|
|
68
|
+
| CSS value | SwiftUI equivalent | Caveat |
|
|
69
|
+
|---|---|---|
|
|
70
|
+
| `position: static` (default) | Default SwiftUI layout flow | No modifier needed |
|
|
71
|
+
| `position: relative` + `top/left/right/bottom` | `.offset(x:, y:)` | `.offset` shifts visually but preserves the layout space — the element still occupies its original slot; this matches CSS `relative` semantics |
|
|
72
|
+
| `position: absolute` + `top/left/width/height` | `ZStack` + `.position(x: left + width/2, y: top + height/2)` | **`.position()` takes CENTER coordinates, not top-left.** Compute: `cx = left + width/2`, `cy = top + height/2`. Must be inside a `ZStack` or the position is relative to the parent frame |
|
|
73
|
+
| `position: fixed` | `.overlay(alignment:)` on the root view, or `.safeAreaInset(edge:)` | Fixed elements must be moved outside the scrollable content entirely; common for navbars and tab bars |
|
|
74
|
+
| `position: sticky` | Manual: `onScrollGeometryChange` (iOS 18+) or `ScrollViewReader` + preference key | No built-in sticky modifier before iOS 18 |
|
|
75
|
+
| `z-index: <n>` | `.zIndex(n)` | **Only affects sibling ordering within the same `ZStack`.** A `zIndex` on a view nested inside a VStack has no effect relative to views outside that VStack |
|
|
76
|
+
| `inset: 0` (fill parent) | `.frame(maxWidth: .infinity, maxHeight: .infinity)` inside a ZStack | |
|
|
77
|
+
| `transform: translate(x, y)` | `.offset(x:, y:)` | |
|
|
78
|
+
| `transform: scale(n)` | `.scaleEffect(n)` | Scales visually; does not affect layout space |
|
|
79
|
+
| `transform: rotate(deg)` | `.rotationEffect(.degrees(deg))` | |
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Box-model drift — the four sources of invisible divergence
|
|
84
|
+
|
|
85
|
+
These are not missing mappings — they are cases where the CSS and SwiftUI
|
|
86
|
+
constructs look equivalent but behave differently. Each one causes layout
|
|
87
|
+
divergence that passes code review.
|
|
88
|
+
|
|
89
|
+
### 1. Margin collapse
|
|
90
|
+
**CSS:** Adjacent vertical margins collapse to `max(m1, m2)`.
|
|
91
|
+
**SwiftUI:** `VStack(spacing:)` accumulates; two views each with `.padding(.bottom, 16)` produce 32 pt gap, not 16.
|
|
92
|
+
**Fix:** Use `VStack(spacing: max(m1, m2))` and remove per-child bottom padding, or set `spacing: 0` and add padding only to one side of each separator pair.
|
|
93
|
+
|
|
94
|
+
### 2. Border draws inside (not outside)
|
|
95
|
+
**CSS default (`content-box`):** `border` expands the element's visible size outward. The content area stays at declared width.
|
|
96
|
+
**SwiftUI `.border()`:** draws _inside_ the frame, equivalent to CSS `outline`. The frame size does not change.
|
|
97
|
+
**Fix:** Add `.padding(borderWidth)` before `.border()` to match CSS border-box behavior, or use `.overlay(RoundedRectangle(...).stroke(...))` which also draws inside.
|
|
98
|
+
|
|
99
|
+
### 3. No native percentage sizing
|
|
100
|
+
**CSS:** `width: 50%` is resolved by the containing block.
|
|
101
|
+
**SwiftUI:** No `%` sizing modifier exists.
|
|
102
|
+
**Fix:** Use `GeometryReader` — but **only in `.background{}` or `.overlay{}`**, never as a layout container. `GeometryReader` is greedy (takes all proposed space); using it as a primary layout view breaks parent constraints.
|
|
103
|
+
|
|
104
|
+
```swift
|
|
105
|
+
// Correct pattern for percentage width:
|
|
106
|
+
Color.clear
|
|
107
|
+
.frame(maxWidth: .infinity)
|
|
108
|
+
.overlay(
|
|
109
|
+
GeometryReader { geo in
|
|
110
|
+
Rectangle()
|
|
111
|
+
.frame(width: geo.size.width * 0.5)
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### 4. `line-height` vs `.lineSpacing` differ
|
|
117
|
+
**CSS `line-height: 1.5` on 16px font:** applies half-leading (equal space above and below each line). Total line height = 24 px; each side gets 4 px extra.
|
|
118
|
+
**SwiftUI `.lineSpacing(n)`:** adds `n` points of space _below_ each line only (no leading above the first line).
|
|
119
|
+
**Conversion formula:** `lineSpacing = (cssLineHeight_px − coreTextLineHeight_px)` — i.e., the extra space only, applied as below-line gap.
|
|
120
|
+
**iOS 26+:** `.lineHeight(.exact: value)` sets exact line height matching CSS semantics. Use this when `--ios-floor >= 26`.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## When you MUST use the custom `Layout` protocol (iOS 16+)
|
|
125
|
+
|
|
126
|
+
These CSS patterns have **no stock SwiftUI equivalent**. Attempting to approximate
|
|
127
|
+
them with HStack/VStack produces incorrect layout. Use `Layout` protocol.
|
|
128
|
+
|
|
129
|
+
| CSS pattern | Why stock views fail |
|
|
130
|
+
|---|---|
|
|
131
|
+
| `flex-wrap: wrap` | HStack never wraps; LazyHGrid/LazyVGrid are scroll containers, not inline wrapping layouts |
|
|
132
|
+
| Non-uniform `flex-grow` ratios (e.g. `flex-grow: 2` on one child, `flex-grow: 1` on others) | `.frame(maxWidth: .infinity)` distributes equally; no per-child weight |
|
|
133
|
+
| Non-uniform `fr` ratios (e.g. `1fr 2fr`) | `GridItem(.flexible())` is always equal weight |
|
|
134
|
+
| Radial / circular layouts | No stock radial container exists |
|
|
135
|
+
|
|
136
|
+
### Minimal correct FlowLayout sketch (iOS 16+)
|
|
137
|
+
|
|
138
|
+
```swift
|
|
139
|
+
struct FlowLayout: Layout {
|
|
140
|
+
var spacing: CGFloat = 8
|
|
141
|
+
|
|
142
|
+
func sizeThatFits(proposal: ProposedViewSize, subviews: Subviews, cache: inout ()) -> CGSize {
|
|
143
|
+
let maxWidth = proposal.width ?? .infinity
|
|
144
|
+
var x: CGFloat = 0
|
|
145
|
+
var y: CGFloat = 0
|
|
146
|
+
var rowHeight: CGFloat = 0
|
|
147
|
+
|
|
148
|
+
for view in subviews {
|
|
149
|
+
let size = view.sizeThatFits(.unspecified)
|
|
150
|
+
if x + size.width > maxWidth, x > 0 {
|
|
151
|
+
y += rowHeight + spacing
|
|
152
|
+
x = 0
|
|
153
|
+
rowHeight = 0
|
|
154
|
+
}
|
|
155
|
+
x += size.width + spacing
|
|
156
|
+
rowHeight = max(rowHeight, size.height)
|
|
157
|
+
}
|
|
158
|
+
return CGSize(width: maxWidth, height: y + rowHeight)
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
func placeSubviews(in bounds: CGRect, proposal: ProposedViewSize, subviews: Subviews, cache: inout ()) {
|
|
162
|
+
let maxWidth = bounds.maxX
|
|
163
|
+
var x = bounds.minX
|
|
164
|
+
var y = bounds.minY
|
|
165
|
+
var rowHeight: CGFloat = 0
|
|
166
|
+
|
|
167
|
+
for view in subviews {
|
|
168
|
+
let size = view.sizeThatFits(.unspecified)
|
|
169
|
+
if x + size.width > maxWidth, x > bounds.minX {
|
|
170
|
+
y += rowHeight + spacing
|
|
171
|
+
x = bounds.minX
|
|
172
|
+
rowHeight = 0
|
|
173
|
+
}
|
|
174
|
+
view.place(at: CGPoint(x: x, y: y), proposal: ProposedViewSize(size))
|
|
175
|
+
x += size.width + spacing
|
|
176
|
+
rowHeight = max(rowHeight, size.height)
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
This is a production-usable starting point. Add `alignment` and RTL support as
|
|
183
|
+
needed. The `cache` type is `Void` (no measurement caching) — add a `Cache` type
|
|
184
|
+
when subview measurement is expensive.
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Quick-reference: CSS visual properties → SwiftUI modifiers
|
|
189
|
+
|
|
190
|
+
| CSS | SwiftUI | Note |
|
|
191
|
+
|---|---|---|
|
|
192
|
+
| `border-radius: N` | `.cornerRadius(N)` or `.clipShape(RoundedRectangle(cornerRadius: N))` | `.cornerRadius` is deprecated in iOS 17+ for `.clipShape` |
|
|
193
|
+
| `box-shadow: x y blur spread color` | `.shadow(color:, radius:, x:, y:)` | No `spread` equivalent; `radius` ≈ CSS `blur / 2` |
|
|
194
|
+
| `opacity: N` | `.opacity(N)` | |
|
|
195
|
+
| `background-color` | `.background(Color.token)` | Use token, not hex |
|
|
196
|
+
| `color` | `.foregroundStyle(Color.token)` | `.foregroundColor` deprecated iOS 17+ |
|
|
197
|
+
| `font-size` / `font-weight` | `.font(DesignTokens.Typography.body)` | Use extracted token; never hardcode `Font.system(size: 16)` |
|
|
198
|
+
| `letter-spacing: N` | `.kerning(N)` | Units: CSS `em`-based vs SwiftUI `pt`-based; convert |
|
|
199
|
+
| `text-transform: uppercase` | `.textCase(.uppercase)` | |
|
|
200
|
+
| `text-decoration: underline` | `.underline()` | |
|
|
201
|
+
| `overflow: hidden` | `.clipped()` | |
|
|
202
|
+
| `border: N solid color` | `.overlay(Rectangle().stroke(color, lineWidth: N))` | Draws inside frame |
|
|
203
|
+
| `pointer-events: none` | `.allowsHitTesting(false)` | |
|
|
204
|
+
| `cursor: pointer` | No equivalent; tap gesture implied by `Button` | |
|
|
205
|
+
| `display: none` / `visibility: hidden` | `if condition { view }` or `.opacity(0)` | `if` removes from layout; `.opacity(0)` preserves layout space — choose by CSS analogue |
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# Design Token Extraction — Stage 1
|
|
2
|
+
|
|
3
|
+
Used by `scripts/extract-tokens.mjs`. Produces `tokens.json` (W3C DTCG format)
|
|
4
|
+
and `token-gaps.json`. Both files are mandatory inputs to Stage 3 (scaffold) and
|
|
5
|
+
Stage 4 (per-component rewrite). Stage 4 must never inline a value that belongs
|
|
6
|
+
in `token-gaps.json` — see the token-miss rule below.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## The static ∪ runtime pipeline
|
|
11
|
+
|
|
12
|
+
Two extraction passes run unconditionally. Their outputs are merged then
|
|
13
|
+
normalized. Neither pass alone is sufficient.
|
|
14
|
+
|
|
15
|
+
| Pass | What it gives | What it misses | How to run |
|
|
16
|
+
|---|---|---|---|
|
|
17
|
+
| Static parse | All _declared_ custom props, Tailwind config, Sass vars — complete enumeration including unused tokens | Values behind `calc()`, `var()` chains, media-query overrides, `@layer` override priority | Read source files: CSS `--*` props; `tailwind.config.js` `theme.extend`; `@theme` blocks (Tailwind v4); compiled `.css` output of Sass |
|
|
18
|
+
| Runtime `getComputedStyle` | _Resolved_ values as the browser actually computes them — ground truth for any `calc`, `var`, inheritance, or conditional override | Tokens that are declared but never applied to a rendered element | Playwright: load each page, call `getComputedStyle` on a representative element per token class; run twice — once with `prefers-color-scheme: light`, once with `dark` |
|
|
19
|
+
|
|
20
|
+
Merge rule: static gives the token namespace; runtime gives the resolved value.
|
|
21
|
+
If a static token has no runtime-resolved value, keep static value with
|
|
22
|
+
`"source": "static-only"` and flag in `token-gaps.json` if the value contains
|
|
23
|
+
unresolved `var()` or `calc()`.
|
|
24
|
+
|
|
25
|
+
Source: findings.md RQ3 (W3C DTCG draft format; Project Wallace; Style
|
|
26
|
+
Dictionary v4; Tokens Studio).
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Tradeoff table
|
|
31
|
+
|
|
32
|
+
| Criterion | Static parse only | Runtime only | Static ∪ runtime |
|
|
33
|
+
|---|---|---|---|
|
|
34
|
+
| Completeness | High — all declared tokens found | Low — only tokens applied to visible elements | High |
|
|
35
|
+
| Resolved truth | Low — `var()`/`calc()` unresolved | High — browser computed values | High |
|
|
36
|
+
| Dark-mode pairs | Manual inference required | Automatic (run twice) | Automatic |
|
|
37
|
+
| Build required | No | Yes (Playwright + dev server or static build) | Dev server preferred; static build acceptable |
|
|
38
|
+
| Speed | Fast | Slow (~5–30 s per page) | Moderate (static fast, runtime adds per page) |
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Normalization steps (run after merge, in order)
|
|
43
|
+
|
|
44
|
+
### 1. Color deduplication
|
|
45
|
+
Compare all color values using CIEDE2000 (ΔE00). If ΔE00 < 2 between two colors,
|
|
46
|
+
they are the same perceptual token — keep the one with the more semantic name
|
|
47
|
+
(e.g. `--color-primary` over `--tw-color-blue-600`) and discard the duplicate.
|
|
48
|
+
This typically collapses "25 grays" from Tailwind into 4–6 semantic tokens.
|
|
49
|
+
|
|
50
|
+
### 2. Spacing scale inference
|
|
51
|
+
Collect all spacing values (padding, margin, gap, width/height in px/rem). Detect
|
|
52
|
+
the base unit: if values cluster around multiples of 4 px (or 0.25 rem), the
|
|
53
|
+
project uses a 4 px grid. Flag values that do not fit the inferred scale in
|
|
54
|
+
`token-gaps.json` (they may be one-offs or errors). Map to SwiftUI `CGFloat`
|
|
55
|
+
points (1 pt = 1 CSS px at 1× logical resolution).
|
|
56
|
+
|
|
57
|
+
### 3. Type scale grouping
|
|
58
|
+
Group font-size values by recurrence. A value appearing on 3+ elements is a
|
|
59
|
+
type-scale step. Assign semantic names: `body`, `caption`, `title`, `headline`,
|
|
60
|
+
`largeTitle` (follow Apple HIG naming where possible for SwiftUI
|
|
61
|
+
`Font.TextStyle` matching). Record both `size` and `weight` per step.
|
|
62
|
+
|
|
63
|
+
### 4. Light/dark pairing
|
|
64
|
+
For each color token, pair the light-scheme resolved value with the dark-scheme
|
|
65
|
+
resolved value. Unpaired tokens (no dark equivalent found) are flagged in
|
|
66
|
+
`token-gaps.json` with `"issue": "no-dark-pair"`.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## `tokens.json` (W3C DTCG draft format — `$value`/`$type`)
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"color": {
|
|
75
|
+
"primary": {
|
|
76
|
+
"$value": "#0A7AFF",
|
|
77
|
+
"$type": "color",
|
|
78
|
+
"$description": "Brand primary, resolved from --color-primary via runtime",
|
|
79
|
+
"dark": { "$value": "#3395FF" }
|
|
80
|
+
},
|
|
81
|
+
"background": {
|
|
82
|
+
"$value": "#FFFFFF",
|
|
83
|
+
"$type": "color",
|
|
84
|
+
"dark": { "$value": "#000000" }
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"spacing": {
|
|
88
|
+
"base": { "$value": "4px", "$type": "dimension" },
|
|
89
|
+
"md": { "$value": "16px", "$type": "dimension" },
|
|
90
|
+
"lg": { "$value": "24px", "$type": "dimension" }
|
|
91
|
+
},
|
|
92
|
+
"typography": {
|
|
93
|
+
"body": {
|
|
94
|
+
"$type": "typography",
|
|
95
|
+
"$value": { "fontSize": "16px", "fontWeight": "400", "lineHeight": "1.5" }
|
|
96
|
+
},
|
|
97
|
+
"title": {
|
|
98
|
+
"$type": "typography",
|
|
99
|
+
"$value": { "fontSize": "20px", "fontWeight": "600", "lineHeight": "1.3" }
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
All values use CSS-native units in the DTCG file. Stage 3 (scaffold) converts to
|
|
106
|
+
SwiftUI `CGFloat` / `Font` equivalents during the `DesignTokens` enum generation.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## `token-gaps.json` shape
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"schema": "h5-to-swiftui/token-gaps@1",
|
|
115
|
+
"gaps": [
|
|
116
|
+
{
|
|
117
|
+
"property": "border-radius",
|
|
118
|
+
"css_value": "var(--radius-card)",
|
|
119
|
+
"resolved_value": null,
|
|
120
|
+
"issue": "unresolved-var",
|
|
121
|
+
"source_file": "src/components/Card.module.css",
|
|
122
|
+
"source_line": 14,
|
|
123
|
+
"action": "manual-extraction-required"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"property": "color",
|
|
127
|
+
"css_value": "#9B9B9B",
|
|
128
|
+
"issue": "no-dark-pair",
|
|
129
|
+
"source_file": "src/components/Label.tsx",
|
|
130
|
+
"source_line": 8,
|
|
131
|
+
"action": "verify-dark-contrast"
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## The token-miss rule (hard constraint for Stage 4)
|
|
140
|
+
|
|
141
|
+
> **Any CSS value with no extractable token in `tokens.json` goes to
|
|
142
|
+
> `token-gaps.json` and is NEVER silently inlined by Stage 4.**
|
|
143
|
+
|
|
144
|
+
Stage 4's LLM prompt must include the full `tokens.json` vocabulary and must
|
|
145
|
+
instruct the model: "Use only tokens from the provided vocabulary. If a required
|
|
146
|
+
value is not in the vocabulary, emit a `// TOKEN-MISSING: <property>` comment and
|
|
147
|
+
use the closest token — do not hardcode the raw value."
|
|
148
|
+
|
|
149
|
+
This rule exists because inlined magic numbers break:
|
|
150
|
+
- Dark-mode adaptation (`.colorset` references the token name, not the hex)
|
|
151
|
+
- The convergence loop's color ΔE tracking (tokens give expected values)
|
|
152
|
+
- Any future design-system update
|
|
153
|
+
|
|
154
|
+
A Stage 4 component that contains hardcoded color hex, raw spacing numbers, or
|
|
155
|
+
raw font sizes without a corresponding `tokens.json` entry fails the idiomatic
|
|
156
|
+
lint check and is reprocessed, not delivered.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Style Dictionary → SwiftUI output (Stage 3)
|
|
161
|
+
|
|
162
|
+
Stage 3 runs Style Dictionary v4 (DTCG-native) on `tokens.json` to produce:
|
|
163
|
+
|
|
164
|
+
### `DesignTokens.swift` — a Swift enum namespace
|
|
165
|
+
|
|
166
|
+
```swift
|
|
167
|
+
// Auto-generated by extract-tokens.mjs — do not edit manually
|
|
168
|
+
import SwiftUI
|
|
169
|
+
|
|
170
|
+
enum DesignTokens {
|
|
171
|
+
enum Color {
|
|
172
|
+
static let primary = SwiftUI.Color("dt/primary")
|
|
173
|
+
static let background = SwiftUI.Color("dt/background")
|
|
174
|
+
}
|
|
175
|
+
enum Spacing {
|
|
176
|
+
static let base: CGFloat = 4
|
|
177
|
+
static let md: CGFloat = 16
|
|
178
|
+
static let lg: CGFloat = 24
|
|
179
|
+
}
|
|
180
|
+
enum Typography {
|
|
181
|
+
static let body = Font.system(size: 16, weight: .regular)
|
|
182
|
+
static let title = Font.system(size: 20, weight: .semibold)
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### XCAssets `.colorset` files (dark-mode automatic)
|
|
188
|
+
|
|
189
|
+
For each color token pair, Style Dictionary emits a `.colorset` directory with
|
|
190
|
+
`Contents.json` containing both light and dark `value` entries. The `dt/<name>`
|
|
191
|
+
asset catalog name matches the `SwiftUI.Color("dt/<name>")` initializer above.
|
|
192
|
+
|
|
193
|
+
This means dark mode requires **no conditional code** in Stage 4 components —
|
|
194
|
+
`DesignTokens.Color.primary` automatically resolves to the correct scheme.
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Extraction strategy by detected styling system
|
|
199
|
+
|
|
200
|
+
From `stack-report.json` (`styling` field), `extract-tokens.mjs` selects:
|
|
201
|
+
|
|
202
|
+
| Detected styling | Static strategy |
|
|
203
|
+
|---|---|
|
|
204
|
+
| `tailwind-v3` | Parse `tailwind.config.js` `theme` + `theme.extend`; resolve `colors`, `spacing`, `fontSize`, `fontWeight`, `borderRadius` |
|
|
205
|
+
| `tailwind-v4` | Parse `@theme` block in the primary CSS entry point; no config file exists |
|
|
206
|
+
| `css-modules` | Parse each `.module.css` file for `--*` custom properties; also scan for Compose-style utility patterns |
|
|
207
|
+
| `sass` | Parse compiled CSS output (run `sass` if build script present); scan `.scss` for `$var` declarations |
|
|
208
|
+
| `css-in-js` | Static parse is limited (values are runtime JS expressions); rely more heavily on the runtime `getComputedStyle` pass; flag all JS-expression values in `token-gaps.json` |
|
|
209
|
+
| `plain-css` | Parse all `--*` custom properties in CSS files imported by the entry point |
|