@tyroneross/build-loop 0.30.3
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/.agents/plugins/marketplace.json +10 -0
- package/.claude-plugin/marketplace.json +38 -0
- package/.claude-plugin/plugin.json +30 -0
- package/.codex-plugin/plugin.json +41 -0
- package/.cursor/rules/build-loop-surface.mdc +22 -0
- package/AGENTS.md +498 -0
- package/LICENSE +202 -0
- package/README.md +403 -0
- package/agents/alignment-checker.md +124 -0
- package/agents/api-assessor.md +136 -0
- package/agents/architecture-scout.md +185 -0
- package/agents/assessment-orchestrator.md +163 -0
- package/agents/build-orchestrator.md +198 -0
- package/agents/database-assessor.md +133 -0
- package/agents/design-contract-specialist.md +239 -0
- package/agents/fact-checker.md +69 -0
- package/agents/fix-critique.md +161 -0
- package/agents/frontend-assessor.md +136 -0
- package/agents/implementer.md +185 -0
- package/agents/independent-auditor.md +143 -0
- package/agents/mock-scanner.md +78 -0
- package/agents/optimize-runner.md +112 -0
- package/agents/overfitting-reviewer.md +96 -0
- package/agents/performance-assessor.md +159 -0
- package/agents/plan-critic.md +85 -0
- package/agents/promotion-reviewer.md +121 -0
- package/agents/recurring-pattern-detector.md +248 -0
- package/agents/retrospective-synthesizer.md +109 -0
- package/agents/root-cause-investigator.md +285 -0
- package/agents/scope-auditor.md +121 -0
- package/agents/security-reviewer.md +151 -0
- package/agents/self-improvement-architect.md +125 -0
- package/agents/synthesis-critic.md +99 -0
- package/agents/transcript-pattern-miner.md +165 -0
- package/agents/ui-validator.md +193 -0
- package/codex-skills/build-loop/SKILL.md +20 -0
- package/codex-skills/debug-loop/SKILL.md +18 -0
- package/codex-skills/handoff/SKILL.md +22 -0
- package/codex-skills/knowledge/SKILL.md +21 -0
- package/codex-skills/optimize/SKILL.md +18 -0
- package/codex-skills/research/SKILL.md +18 -0
- package/commands/agent-rally-point.md +301 -0
- package/commands/assess.md +41 -0
- package/commands/debug.md +20 -0
- package/commands/debugger-detail.md +34 -0
- package/commands/debugger-scan.md +15 -0
- package/commands/debugger-status.md +20 -0
- package/commands/debugger.md +32 -0
- package/commands/handoff.md +113 -0
- package/commands/knowledge-review.md +16 -0
- package/commands/optimize.md +31 -0
- package/commands/plan-verify.md +39 -0
- package/commands/promote-experiment.md +129 -0
- package/commands/research.md +22 -0
- package/commands/run.md +12 -0
- package/commands/self-review.md +51 -0
- package/commands/start-prd.md +57 -0
- package/commands/test.md +34 -0
- package/dist/src/assessment-orchestrator.d.ts +78 -0
- package/dist/src/assessment-orchestrator.d.ts.map +1 -0
- package/dist/src/assessment-orchestrator.js +304 -0
- package/dist/src/assessment-orchestrator.js.map +1 -0
- package/dist/src/audit-miner.d.ts +21 -0
- package/dist/src/audit-miner.d.ts.map +1 -0
- package/dist/src/audit-miner.js +421 -0
- package/dist/src/audit-miner.js.map +1 -0
- package/dist/src/batch-operations.d.ts +30 -0
- package/dist/src/batch-operations.d.ts.map +1 -0
- package/dist/src/batch-operations.js +339 -0
- package/dist/src/batch-operations.js.map +1 -0
- package/dist/src/config.d.ts +83 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +176 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/context-engine.d.ts +45 -0
- package/dist/src/context-engine.d.ts.map +1 -0
- package/dist/src/context-engine.js +135 -0
- package/dist/src/context-engine.js.map +1 -0
- package/dist/src/debug-wrapper.d.ts +58 -0
- package/dist/src/debug-wrapper.d.ts.map +1 -0
- package/dist/src/debug-wrapper.js +285 -0
- package/dist/src/debug-wrapper.js.map +1 -0
- package/dist/src/index.d.ts +31 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +149 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/interactive-verifier.d.ts +26 -0
- package/dist/src/interactive-verifier.d.ts.map +1 -0
- package/dist/src/interactive-verifier.js +435 -0
- package/dist/src/interactive-verifier.js.map +1 -0
- package/dist/src/lessons.d.ts +59 -0
- package/dist/src/lessons.d.ts.map +1 -0
- package/dist/src/lessons.js +172 -0
- package/dist/src/lessons.js.map +1 -0
- package/dist/src/log-reader.d.ts +39 -0
- package/dist/src/log-reader.d.ts.map +1 -0
- package/dist/src/log-reader.js +291 -0
- package/dist/src/log-reader.js.map +1 -0
- package/dist/src/logger.d.ts +59 -0
- package/dist/src/logger.d.ts.map +1 -0
- package/dist/src/logger.js +328 -0
- package/dist/src/logger.js.map +1 -0
- package/dist/src/parallel-retrieval.d.ts +52 -0
- package/dist/src/parallel-retrieval.d.ts.map +1 -0
- package/dist/src/parallel-retrieval.js +309 -0
- package/dist/src/parallel-retrieval.js.map +1 -0
- package/dist/src/pattern-extractor.d.ts +30 -0
- package/dist/src/pattern-extractor.d.ts.map +1 -0
- package/dist/src/pattern-extractor.js +386 -0
- package/dist/src/pattern-extractor.js.map +1 -0
- package/dist/src/result-aggregator.d.ts +44 -0
- package/dist/src/result-aggregator.d.ts.map +1 -0
- package/dist/src/result-aggregator.js +315 -0
- package/dist/src/result-aggregator.js.map +1 -0
- package/dist/src/retrieval.d.ts +139 -0
- package/dist/src/retrieval.d.ts.map +1 -0
- package/dist/src/retrieval.js +724 -0
- package/dist/src/retrieval.js.map +1 -0
- package/dist/src/setup/auto-setup.d.ts +15 -0
- package/dist/src/setup/auto-setup.d.ts.map +1 -0
- package/dist/src/setup/auto-setup.js +157 -0
- package/dist/src/setup/auto-setup.js.map +1 -0
- package/dist/src/setup/configure-hooks.d.ts +8 -0
- package/dist/src/setup/configure-hooks.d.ts.map +1 -0
- package/dist/src/setup/configure-hooks.js +16 -0
- package/dist/src/setup/configure-hooks.js.map +1 -0
- package/dist/src/setup/create-slash-commands.d.ts +8 -0
- package/dist/src/setup/create-slash-commands.d.ts.map +1 -0
- package/dist/src/setup/create-slash-commands.js +101 -0
- package/dist/src/setup/create-slash-commands.js.map +1 -0
- package/dist/src/setup/index.d.ts +8 -0
- package/dist/src/setup/index.d.ts.map +1 -0
- package/dist/src/setup/index.js +17 -0
- package/dist/src/setup/index.js.map +1 -0
- package/dist/src/setup/inject-claude-md.d.ts +10 -0
- package/dist/src/setup/inject-claude-md.d.ts.map +1 -0
- package/dist/src/setup/inject-claude-md.js +150 -0
- package/dist/src/setup/inject-claude-md.js.map +1 -0
- package/dist/src/setup/uninstall.d.ts +22 -0
- package/dist/src/setup/uninstall.d.ts.map +1 -0
- package/dist/src/setup/uninstall.js +235 -0
- package/dist/src/setup/uninstall.js.map +1 -0
- package/dist/src/storage.d.ts +192 -0
- package/dist/src/storage.d.ts.map +1 -0
- package/dist/src/storage.js +1037 -0
- package/dist/src/storage.js.map +1 -0
- package/dist/src/string-similarity.d.ts +8 -0
- package/dist/src/string-similarity.d.ts.map +1 -0
- package/dist/src/string-similarity.js +57 -0
- package/dist/src/string-similarity.js.map +1 -0
- package/dist/src/traces/adapters/browser.d.ts +69 -0
- package/dist/src/traces/adapters/browser.d.ts.map +1 -0
- package/dist/src/traces/adapters/browser.js +280 -0
- package/dist/src/traces/adapters/browser.js.map +1 -0
- package/dist/src/traces/adapters/index.d.ts +23 -0
- package/dist/src/traces/adapters/index.d.ts.map +1 -0
- package/dist/src/traces/adapters/index.js +67 -0
- package/dist/src/traces/adapters/index.js.map +1 -0
- package/dist/src/traces/adapters/langchain.d.ts +42 -0
- package/dist/src/traces/adapters/langchain.d.ts.map +1 -0
- package/dist/src/traces/adapters/langchain.js +151 -0
- package/dist/src/traces/adapters/langchain.js.map +1 -0
- package/dist/src/traces/adapters/opentelemetry.d.ts +46 -0
- package/dist/src/traces/adapters/opentelemetry.d.ts.map +1 -0
- package/dist/src/traces/adapters/opentelemetry.js +164 -0
- package/dist/src/traces/adapters/opentelemetry.js.map +1 -0
- package/dist/src/traces/adapters/sentry.d.ts +58 -0
- package/dist/src/traces/adapters/sentry.d.ts.map +1 -0
- package/dist/src/traces/adapters/sentry.js +212 -0
- package/dist/src/traces/adapters/sentry.js.map +1 -0
- package/dist/src/traces/index.d.ts +10 -0
- package/dist/src/traces/index.d.ts.map +1 -0
- package/dist/src/traces/index.js +45 -0
- package/dist/src/traces/index.js.map +1 -0
- package/dist/src/traces/storage.d.ts +78 -0
- package/dist/src/traces/storage.d.ts.map +1 -0
- package/dist/src/traces/storage.js +399 -0
- package/dist/src/traces/storage.js.map +1 -0
- package/dist/src/traces/summarizer.d.ts +83 -0
- package/dist/src/traces/summarizer.d.ts.map +1 -0
- package/dist/src/traces/summarizer.js +247 -0
- package/dist/src/traces/summarizer.js.map +1 -0
- package/dist/src/traces/types.d.ts +365 -0
- package/dist/src/traces/types.d.ts.map +1 -0
- package/dist/src/traces/types.js +14 -0
- package/dist/src/traces/types.js.map +1 -0
- package/dist/src/types.d.ts +495 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +27 -0
- package/dist/src/types.js.map +1 -0
- package/docs/agent-surface-policy.md +45 -0
- package/docs/memory-setup.md +226 -0
- package/hooks/_arch_scan_bg.py +88 -0
- package/hooks/_plugin_drift_check_bg.py +85 -0
- package/hooks/_session_start_lib.sh +42 -0
- package/hooks/git/pre-push +141 -0
- package/hooks/hooks.json +126 -0
- package/hooks/post-commit +30 -0
- package/hooks/pre-commit +29 -0
- package/hooks/pre-edit-apppulse.sh +6 -0
- package/hooks/pre-edit-architecture.sh +106 -0
- package/hooks/pre-edit-rally-point.sh +92 -0
- package/hooks/session-start-apppulse.sh +6 -0
- package/hooks/session-start-architecture.sh +10 -0
- package/hooks/session-start-git-hooks.sh +12 -0
- package/hooks/session-start-plugin-drift.sh +27 -0
- package/hooks/session-start-rally-point.sh +44 -0
- package/hooks/session-start-retrieval.sh +24 -0
- package/hooks/session-start-worktree-gc.sh +105 -0
- package/hooks/test_apppulse_hooks.sh +6 -0
- package/hooks/test_rally_point_hooks.sh +388 -0
- package/hooks/test_sec008_hooks.sh +66 -0
- package/package.json +111 -0
- package/scripts/README.md +301 -0
- package/scripts/_db_url.py +61 -0
- package/scripts/_paths.py +445 -0
- package/scripts/blm.py +162 -0
- package/scripts/blm_api.py +263 -0
- package/scripts/check_cache_sync.py +490 -0
- package/scripts/embed_backend.py +475 -0
- package/scripts/install_memory.py +556 -0
- package/scripts/lessons_index/__init__.py +77 -0
- package/scripts/lessons_index/__main__.py +135 -0
- package/scripts/lessons_index/ingest.py +288 -0
- package/scripts/lessons_index/query.py +285 -0
- package/scripts/lessons_index/schema.py +114 -0
- package/scripts/memory_context/__init__.py +610 -0
- package/scripts/memory_graph/__init__.py +393 -0
- package/scripts/project_resolver.py +172 -0
- package/scripts/prune_codex_plugin_cache.py +23 -0
- package/scripts/prune_plugin_cache.py +359 -0
- package/scripts/semantic_index/__init__.py +482 -0
- package/scripts/semantic_index/_bench_hybrid.py +175 -0
- package/scripts/semantic_index/backfill.py +263 -0
- package/scripts/semantic_index/hybrid.py +174 -0
- package/scripts/semantic_index/test_backfill.py +292 -0
- package/scripts/semantic_index/test_hybrid.py +541 -0
- package/scripts/sync_navgator_lessons.py +666 -0
- package/scripts/sync_plugin_cache.py +388 -0
- package/skills/agent-rally-point/SKILL.md +165 -0
- package/skills/agent-rally-watcher/SKILL.md +83 -0
- package/skills/api-registry-bridge/SKILL.md +59 -0
- package/skills/architecture/dead/SKILL.md +56 -0
- package/skills/architecture/impact/SKILL.md +88 -0
- package/skills/architecture/review/SKILL.md +227 -0
- package/skills/architecture/rules/SKILL.md +72 -0
- package/skills/architecture/scan/SKILL.md +79 -0
- package/skills/architecture/trace/SKILL.md +65 -0
- package/skills/attribution-standard/SKILL.md +122 -0
- package/skills/authentication/SKILL.md +81 -0
- package/skills/authentication/references/better-auth-magic-link.md +135 -0
- package/skills/authentication/references/better-auth-setup.md +224 -0
- package/skills/authentication/references/google-calendar-sync.md +278 -0
- package/skills/authentication/references/google-cloud-console.md +159 -0
- package/skills/authentication/references/google-geocoding-directions.md +126 -0
- package/skills/authentication/references/google-lessons-example-web-app.md +177 -0
- package/skills/authentication/references/google-maps.md +162 -0
- package/skills/authentication/references/google-oauth-setup.md +343 -0
- package/skills/authentication/references/google-places.md +173 -0
- package/skills/authentication/references/lessons-example-web-app-better-auth.md +126 -0
- package/skills/authentication/references/resend-email.md +227 -0
- package/skills/authentication/references/resend-otp-magic-link.md +153 -0
- package/skills/authentication/references/supabase-auth.md +172 -0
- package/skills/auto-decision-capture/SKILL.md +419 -0
- package/skills/build-loop/SKILL.md +516 -0
- package/skills/build-loop/detect-plugins.mjs +82 -0
- package/skills/build-loop/eval-guide.md +65 -0
- package/skills/build-loop/fallbacks.md +549 -0
- package/skills/build-loop/phases/fact-check.md +42 -0
- package/skills/build-loop/phases/ui-validation.md +267 -0
- package/skills/build-loop/references/apple-native-planning.md +439 -0
- package/skills/build-loop/references/capability-routing.md +181 -0
- package/skills/build-loop/references/codex-subagents.md +98 -0
- package/skills/build-loop/references/coordination.md +161 -0
- package/skills/build-loop/references/correction-aware-capture.md +177 -0
- package/skills/build-loop/references/independent-auditor.md +72 -0
- package/skills/build-loop/references/intent-capability-pack.md +170 -0
- package/skills/build-loop/references/intent-exploration-prompts.md +96 -0
- package/skills/build-loop/references/leadership.md +72 -0
- package/skills/build-loop/references/memory.md +284 -0
- package/skills/build-loop/references/modular-systems-pack.md +96 -0
- package/skills/build-loop/references/output-style.md +129 -0
- package/skills/build-loop/references/pay-it-forward-arch.md +98 -0
- package/skills/build-loop/references/phase-1-assess.md +218 -0
- package/skills/build-loop/references/phase-2-plan.md +77 -0
- package/skills/build-loop/references/phase-3-execute.md +47 -0
- package/skills/build-loop/references/phase-4-review.md +310 -0
- package/skills/build-loop/references/phase-5-iterate.md +71 -0
- package/skills/build-loop/references/phase-6-learn.md +56 -0
- package/skills/build-loop/references/recent-design-structures.md +274 -0
- package/skills/build-loop/references/refactor-history/ASSESSMENT.md +85 -0
- package/skills/build-loop/references/refactor-history/STANDALONE_TEST_RUN.md +149 -0
- package/skills/build-loop/references/refactor-history/scenarios/01-simple-bugfix.md +32 -0
- package/skills/build-loop/references/refactor-history/scenarios/02-ui-build-with-iteration.md +48 -0
- package/skills/build-loop/references/refactor-history/scenarios/03-multi-failure-escalation.md +60 -0
- package/skills/build-loop/references/refactor-history/scenarios/04-ui-build-ibr-absent.md +51 -0
- package/skills/build-loop/references/refactor-history/scenarios/05-refactor-navgator-absent.md +71 -0
- package/skills/build-loop/references/refactor-history/scenarios/06-recurring-bug-debugger-absent.md +52 -0
- package/skills/build-loop/references/refactor-history/trace-comparison.md +202 -0
- package/skills/build-loop/references/self-recursive-dev.md +77 -0
- package/skills/build-loop/references/self-review.md +232 -0
- package/skills/build-loop/references/ui-io-contract.md +116 -0
- package/skills/build-loop/scanners/audit-design-rules.mjs +476 -0
- package/skills/build-loop/scanners/require-visual-evidence.mjs +239 -0
- package/skills/build-loop/templates/backlog-item.md +35 -0
- package/skills/build-loop/templates/codex-worker-prompt.md +89 -0
- package/skills/build-loop/templates/ui-subagent-prompt.md +179 -0
- package/skills/build-loop/templates/ux-fix-plan.md +40 -0
- package/skills/building-with-deepagents/SKILL.md +195 -0
- package/skills/building-with-deepagents/references/anti-patterns.md +141 -0
- package/skills/building-with-deepagents/references/api-quick-reference.md +184 -0
- package/skills/capabilities/SKILL.md +91 -0
- package/skills/debug-loop/SKILL.md +278 -0
- package/skills/debug-loop/references/convergence-rules.md +145 -0
- package/skills/debug-loop/references/swiftui-macos-clunky-ui-debugger.html +823 -0
- package/skills/debugging/assess/SKILL.md +111 -0
- package/skills/debugging/debug-loop/SKILL.md +231 -0
- package/skills/debugging/memory/SKILL.md +147 -0
- package/skills/debugging/store/SKILL.md +153 -0
- package/skills/debugging-memory/SKILL.md +440 -0
- package/skills/debugging-memory/examples/incident-example.json +67 -0
- package/skills/debugging-memory/references/incident-documentation.md +280 -0
- package/skills/debugging-memory/references/ios-notification-alarm-playbook.md +300 -0
- package/skills/debugging-memory/references/pattern-extraction.md +163 -0
- package/skills/debugging-memory/references/subagent-integration.md +312 -0
- package/skills/defenseclaw-bridge/SKILL.md +156 -0
- package/skills/defenseclaw-bridge/references/dc-config-mapping.md +162 -0
- package/skills/defenseclaw-bridge/references/output-format.md +108 -0
- package/skills/handoff/SKILL.md +94 -0
- package/skills/ibr-bridge/SKILL.md +68 -0
- package/skills/knowledge/SKILL.md +127 -0
- package/skills/knowledge/references/recall-integration.md +83 -0
- package/skills/knowledge/templates/madr-minimal.md +56 -0
- package/skills/knowledge-review/SKILL.md +112 -0
- package/skills/logging-tracer/SKILL.md +202 -0
- package/skills/logging-tracer/references/log-analysis.md +128 -0
- package/skills/logging-tracer/references/stack-templates.md +274 -0
- package/skills/logging-tracer-bridge/SKILL.md +70 -0
- package/skills/mcp-builder/SKILL.md +278 -0
- package/skills/mcp-builder/references/mcp-security.md +106 -0
- package/skills/model-tiering/SKILL.md +216 -0
- package/skills/native-ax-driver/SKILL.md +220 -0
- package/skills/native-ax-driver/scripts/layout_fill.py +222 -0
- package/skills/native-ax-driver/scripts/native_driver.py +495 -0
- package/skills/native-ax-driver/swift/bl-ax-driver/Package.swift +20 -0
- package/skills/native-ax-driver/swift/bl-ax-driver/Sources/main.swift +542 -0
- package/skills/optimize/SKILL.md +202 -0
- package/skills/optimize/profiles.md +61 -0
- package/skills/plan-verify/SKILL.md +115 -0
- package/skills/plan-verify/test-fixtures/example-app-v20-findings.json +27 -0
- package/skills/plan-verify/test-fixtures/example-app-v20.md +42 -0
- package/skills/plan-verify/test-fixtures/example-app-v22-findings.json +15 -0
- package/skills/plan-verify/test-fixtures/example-app-v22.md +1608 -0
- package/skills/plan-verify/test-fixtures/unrelated-good-plan-findings.json +15 -0
- package/skills/plan-verify/test-fixtures/unrelated-good-plan.md +55 -0
- package/skills/plugin-builder/SKILL.md +329 -0
- package/skills/plugin-builder/references/authoritative-sources.md +104 -0
- package/skills/plugin-builder/references/build-loop-phase-guidance.md +94 -0
- package/skills/plugin-builder/references/components-guide.md +221 -0
- package/skills/plugin-builder/references/distribution.md +317 -0
- package/skills/plugin-builder/references/dual-host-claude-codex.md +220 -0
- package/skills/plugin-builder/references/hooks-reference.md +210 -0
- package/skills/plugin-builder/references/manifest-schema.md +111 -0
- package/skills/plugin-builder/references/plugin-hygiene-lessons.md +307 -0
- package/skills/plugin-tests/SKILL.md +94 -0
- package/skills/prd-bridge/SKILL.md +135 -0
- package/skills/research/SKILL.md +80 -0
- package/skills/security-methodology/SKILL.md +105 -0
- package/skills/security-methodology/references/cross-source-matrix.md +77 -0
- package/skills/security-methodology/references/mitre-atlas-starter.md +83 -0
- package/skills/security-methodology/references/nist-600-1-mapping.md +119 -0
- package/skills/security-methodology/references/owasp-agentic-top-10.md +157 -0
- package/skills/security-methodology/references/owasp-llm-top-10.md +144 -0
- package/skills/security-methodology/references/owasp-web-top-10.md +65 -0
- package/skills/self-improve/SKILL.md +298 -0
- package/skills/spec-writing/SKILL.md +548 -0
- package/skills/spec-writing/scripts/check_checklist.py +478 -0
- package/skills/sync-skills/SKILL.md +132 -0
- package/skills/telemetry/SKILL.md +66 -0
- package/skills/ui-design/SKILL.md +75 -0
- package/skills/ui-design/references/design-patterns-multi.md +165 -0
- package/skills/ui-design/references/design-preferences-from-owned-apps.md +150 -0
- package/skills/ui-design/references/evidence-capture-policy.md +55 -0
- package/skills/ui-design/references/ui-guidance-sources.md +330 -0
- package/skills/ui-design/references/universal-design-principles.alt.md +182 -0
- package/skills/ui-design/references/universal-design-principles.md +419 -0
- package/templates/memory/MEMORY.md.template +55 -0
- package/templates/memory/constitution.md.template +64 -0
- package/templates/memory/manifest.json +47 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ui-design
|
|
3
|
+
description: Use when build-loop needs UI design direction, visual style selection, UI guidance inventory, a .build-loop/app-contract/ui.md design contract, or non-trivial web/mobile/native UI planning. Build-loop-owned design route for design-contract-specialist; selects from project tokens, recent structures, UI Guidance, IBR artifacts, Mockup Gallery, and research based on product/workflow/data/platform fit.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
8
|
+
|
|
9
|
+
# UI Design
|
|
10
|
+
|
|
11
|
+
Build-loop-owned guidance for choosing UI direction. This skill is the design selection layer; `design-contract-specialist` is the agent that writes the resulting contract.
|
|
12
|
+
|
|
13
|
+
For broader communication and information-design artifacts such as writing, images, decks, documents, reports, spreadsheets, PDFs, or UI-generated exports, start from `references/universal-design-principles.md`, then load the medium-specific skill.
|
|
14
|
+
|
|
15
|
+
## Runtime Contract
|
|
16
|
+
|
|
17
|
+
Use this skill when `uiTarget != null` and the work is not copy-only:
|
|
18
|
+
|
|
19
|
+
1. Load the UI input/output contract from the plan.
|
|
20
|
+
2. Load `references/universal-design-principles.md` when the surface presents information, contains charts/tables/reports, creates document/deck/image-like outputs, or needs continuity, wayfinding, process visibility, or graceful degradation.
|
|
21
|
+
3. Apply Calm Precision as the structural foundation: hierarchy, grouping, disclosure, action weight, touch targets, motion restraint, copy clarity, and functional integrity.
|
|
22
|
+
4. Run a Calm Precision core-consideration pass before selecting style: name the principles most relevant to the surface, the perceptual foundation behind each one, and the concrete implication for this build.
|
|
23
|
+
5. Load project-local visual evidence: current screens, screenshots, tokens, components, selected mockups, and existing `.build-loop/app-contract/ui.md`.
|
|
24
|
+
6. Select only the guidance sources needed for the surface from `references/ui-guidance-sources.md`.
|
|
25
|
+
7. Choose the design direction from product fit: user job, workflow frequency, data shape, information density, platform, accessibility risk, error cost, and the Calm Precision core-consideration pass.
|
|
26
|
+
8. Have `design-contract-specialist` write the decision to `.build-loop/app-contract/ui.md`.
|
|
27
|
+
|
|
28
|
+
## Design Layers
|
|
29
|
+
|
|
30
|
+
Think in layers, not competing design systems:
|
|
31
|
+
|
|
32
|
+
1. **Product contract** — the UI input/output contract, user job, platform, data shape, and risk.
|
|
33
|
+
2. **Universal communication and experience design** — answer-first structure, one primary focus, continuity, wayfinding, process visibility, graceful degradation, MECE grouping, hierarchy, source integrity, native primitives, accessibility, and visual QA across UI, writing, images, decks, docs, operational workflows, and data artifacts.
|
|
34
|
+
3. **Calm Precision core considerations** — the baseline rules and perceptual-science foundations that every design direction must satisfy or explicitly except.
|
|
35
|
+
4. **Project surface** — existing tokens, components, brand, screenshots, and selected mockups.
|
|
36
|
+
5. **Structure or style mode** — recent design structures such as Conversational Command Surface, Bento Operating Dashboard, Pipeline Wizard, Outcome Ledger, Pyramid Detail, Glass Workspace, Warm Craft, Data Narrative, native mobile, or AI Artifact Canvas.
|
|
37
|
+
6. **Validation evidence** — `ui-validator`, design-rule scanner, browser/simulator screenshots, and contract traceability.
|
|
38
|
+
|
|
39
|
+
Calm Precision is not just one optional theme or reference. It is a core design gate. Every non-trivial UI decision should be checked against the relevant Calm Precision principles before selecting structure, style mode, token treatment, motion, or interaction behavior. A Glass, Warm Craft, Aurora, Data Narrative, or native mobile direction can change surface treatment, density, and mood, but it must not override Calm Precision's hierarchy, accessibility, motion, interaction, and real-data rules unless the app contract records an explicit exception.
|
|
40
|
+
|
|
41
|
+
## Source Priority
|
|
42
|
+
|
|
43
|
+
Resolve conflicts in this order:
|
|
44
|
+
|
|
45
|
+
1. Explicit user requirement for this build.
|
|
46
|
+
2. Current product/workflow/data/platform need.
|
|
47
|
+
3. Existing project tokens, components, and current UI conventions.
|
|
48
|
+
4. `.build-loop/app-contract/ui.md` and the plan's UI input/output contract.
|
|
49
|
+
5. Universal information-design principles from `references/universal-design-principles.md`.
|
|
50
|
+
6. Calm Precision structural rules.
|
|
51
|
+
7. Build-loop references: `skills/build-loop/references/ui-io-contract.md`, `skills/build-loop/references/recent-design-structures.md`, and `skills/build-loop/templates/ui-subagent-prompt.md`.
|
|
52
|
+
8. Local guidance sources from `references/ui-guidance-sources.md`.
|
|
53
|
+
9. Research or vault material, summarized into a concrete decision before implementers receive it.
|
|
54
|
+
|
|
55
|
+
## Required Output
|
|
56
|
+
|
|
57
|
+
The design decision must be written into `.build-loop/app-contract/ui.md` before implementation for non-trivial UI work. Include:
|
|
58
|
+
|
|
59
|
+
- `selected_structure` and why it fits.
|
|
60
|
+
- At least one rejected structure and why it was rejected.
|
|
61
|
+
- Source refs used, with absolute paths when outside the repo.
|
|
62
|
+
- `calm_precision_core_considerations`: relevant principles, perceptual foundations, implications for the surface, and any explicit exceptions.
|
|
63
|
+
- Density, hierarchy, surface model, typography roles, token source, action hierarchy, visual non-goals, and validation implications.
|
|
64
|
+
|
|
65
|
+
Implementers should read the app contract and UI input/output contract, not the whole guidance corpus.
|
|
66
|
+
|
|
67
|
+
## Guardrails
|
|
68
|
+
|
|
69
|
+
- Do not route to IBR unless the user explicitly asks for IBR, Interface Built Right, or an IBR-specific artifact.
|
|
70
|
+
- Do not force recent structures. They are options, not requirements.
|
|
71
|
+
- Do not treat Calm Precision as a citation, theme, or surface style. Use it as the shared baseline and decision gate under the selected mode.
|
|
72
|
+
- Do not load broad vault/research folders into implementation prompts. Select one to three relevant sources and synthesize them.
|
|
73
|
+
- Do not introduce mock data, fake affordances, arbitrary palettes, or decorative visual complexity that does not serve the workflow.
|
|
74
|
+
- If a major UI build lacks enough visual evidence, ask the orchestrator for mockup/screenshot/design-tool artifacts; keep the final design decision in `.build-loop/app-contract/ui.md`.
|
|
75
|
+
- When gathering evidence from owned/reference apps, route token-extraction to source-of-truth reads and interaction-texture (motion, haptics, render gradients, transition states) to live IBR capture — see `references/evidence-capture-policy.md`.
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# Multi-Pattern Token Framework — Feasibility Draft
|
|
2
|
+
|
|
3
|
+
> **DEPRECATION SHIM (one release cycle).** Canonical source migrated to the `ui-guidance` plugin → load via `Skill("ui-guidance:tokens")`. This file remains in build-loop as a transition aid; future updates land in the plugin. *(Renamed from `multi-pattern-tokens` in ui-guidance v0.2.0.)*
|
|
4
|
+
>
|
|
5
|
+
> **Status:** DRAFT — exploration only. Not active, not loaded by ui-design. Decision pending the Feasibility verdict at the bottom.
|
|
6
|
+
>
|
|
7
|
+
> **Source attribution:** Adapted from Google Labs' DESIGN.md spec at <https://github.com/google-labs-code/design.md> (fetched 2026-05-26 from the raw README at `main`, 337 lines). DESIGN.md proposes a YAML-front-matter + markdown-prose hybrid: tokens are normative, prose tells agents *why* they exist. This document explores whether the same hybrid can extend to **multi-pattern** tokens — i.e., one design language expressing different concrete values per form factor (mobile / tablet / web / watch) without forking the system.
|
|
8
|
+
|
|
9
|
+
## The motivating problem
|
|
10
|
+
|
|
11
|
+
Calm Precision currently states sizes, spacing, and color in single concrete values:
|
|
12
|
+
|
|
13
|
+
- `44px mobile, 24px desktop touch` (two values, hard-coded into the principle line).
|
|
14
|
+
- `4.5:1 contrast` (one value, universal).
|
|
15
|
+
- `8pt grid` (one value, universal).
|
|
16
|
+
- `Title (14-16px bold) → Description (12-14px) → Metadata (11-12px muted)` (ranges, but flat — no per-form-factor resolution).
|
|
17
|
+
|
|
18
|
+
When the same agent ships across iPhone, iPad, macOS, and web, it has to *interpret* these ranges every time. A typography token like `body-md: 16px` means one thing in a tablet reading view, another in a watch glance, another in a desktop dashboard. Today this interpretation lives in the agent's head — re-derived per surface, drift-prone, easy to get wrong on the small or far-from-default surface.
|
|
19
|
+
|
|
20
|
+
A multi-pattern framework lets the design system *declare* the resolution once, as a structured token, and ship the same `DESIGN.md` everywhere.
|
|
21
|
+
|
|
22
|
+
## The format
|
|
23
|
+
|
|
24
|
+
Three patterns are proposed. Each extends DESIGN.md's existing YAML-front-matter shape — none of them require a new top-level concept; they expand what a token *value* can be.
|
|
25
|
+
|
|
26
|
+
### Pattern 1 — `pattern: scale` (responsive scalar)
|
|
27
|
+
|
|
28
|
+
A single token resolves to different concrete values per named breakpoint or form factor. The consumer picks the value based on its render context.
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
typography:
|
|
32
|
+
body-md:
|
|
33
|
+
pattern: scale
|
|
34
|
+
fontFamily: Public Sans
|
|
35
|
+
fontSize:
|
|
36
|
+
watch: 13px # 38mm-44mm Apple Watch — small viewport, denser scale
|
|
37
|
+
mobile: 16px # iPhone default
|
|
38
|
+
tablet: 17px # iPad — bumped one step for reading-distance
|
|
39
|
+
web: 16px # desktop browser, 1280px+
|
|
40
|
+
lineHeight: 1.5 # universal — does not vary
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Consumer behavior: an iOS app picks `mobile`, an iPad app picks `tablet`, a watch app picks `watch`. Tokens that don't declare a `pattern: scale` shape fall back to a single value (back-compat with DESIGN.md alpha).
|
|
44
|
+
|
|
45
|
+
### Pattern 2 — `pattern: ladder` (semantic step with named rungs)
|
|
46
|
+
|
|
47
|
+
A token is a *step* on a named ladder rather than a fixed value. The ladder definition lives once at the top of the doc; tokens reference rungs by name. Lets a designer change "what `space-loose` means on tablet" once and have every consuming token pick it up.
|
|
48
|
+
|
|
49
|
+
```yaml
|
|
50
|
+
ladders:
|
|
51
|
+
spacing:
|
|
52
|
+
tight: { mobile: 4px, tablet: 6px, web: 8px }
|
|
53
|
+
snug: { mobile: 8px, tablet: 12px, web: 12px }
|
|
54
|
+
loose: { mobile: 16px, tablet: 24px, web: 24px }
|
|
55
|
+
roomy: { mobile: 24px, tablet: 32px, web: 40px }
|
|
56
|
+
|
|
57
|
+
components:
|
|
58
|
+
card:
|
|
59
|
+
pattern: ladder
|
|
60
|
+
padding: "{ladders.spacing.snug}" # resolves to 8/12/12 depending on surface
|
|
61
|
+
gap: "{ladders.spacing.tight}" # resolves to 4/6/8
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Compared to Pattern 1, Pattern 2 separates *naming* from *value*. The cost is one extra layer of indirection; the benefit is changing all `snug` paddings across the system in one edit.
|
|
65
|
+
|
|
66
|
+
### Pattern 3 — `pattern: condition` (state-driven token)
|
|
67
|
+
|
|
68
|
+
A token resolves to different values based on a runtime condition the consumer reports — not just form factor. Useful for accessibility-sensitive properties (contrast, motion, density), dark/light mode, and reduced-motion preferences.
|
|
69
|
+
|
|
70
|
+
```yaml
|
|
71
|
+
colors:
|
|
72
|
+
primary-text:
|
|
73
|
+
pattern: condition
|
|
74
|
+
default: "#1A1C1E"
|
|
75
|
+
when:
|
|
76
|
+
colorScheme=dark: "#F2F2F2"
|
|
77
|
+
contrastLevel=high: "#000000" # WCAG AAA-locked surface
|
|
78
|
+
reduceTransparency=true: "#1A1C1E"
|
|
79
|
+
|
|
80
|
+
motion:
|
|
81
|
+
card-enter-duration:
|
|
82
|
+
pattern: condition
|
|
83
|
+
default: 240ms
|
|
84
|
+
when:
|
|
85
|
+
reduceMotion=true: 0ms
|
|
86
|
+
density=compact: 160ms
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Consumers report their condition bag at render time; the token resolver picks the most-specific match (with a documented precedence order).
|
|
90
|
+
|
|
91
|
+
### Pattern 4 — `pattern: composite` (cross-token resolution)
|
|
92
|
+
|
|
93
|
+
A component token resolves multiple sub-tokens together to enforce internal consistency. The composite shape is the unit of legal variation, not the individual sub-tokens.
|
|
94
|
+
|
|
95
|
+
```yaml
|
|
96
|
+
components:
|
|
97
|
+
button-primary:
|
|
98
|
+
pattern: composite
|
|
99
|
+
variants:
|
|
100
|
+
mobile:
|
|
101
|
+
backgroundColor: "{colors.tertiary}"
|
|
102
|
+
textColor: "{colors.on-tertiary}"
|
|
103
|
+
padding: 12px
|
|
104
|
+
minHeight: 44px # iOS touch target
|
|
105
|
+
tablet:
|
|
106
|
+
backgroundColor: "{colors.tertiary}"
|
|
107
|
+
textColor: "{colors.on-tertiary}"
|
|
108
|
+
padding: 14px
|
|
109
|
+
minHeight: 48px
|
|
110
|
+
web:
|
|
111
|
+
backgroundColor: "{colors.tertiary}"
|
|
112
|
+
textColor: "{colors.on-tertiary}"
|
|
113
|
+
padding: 10px 16px
|
|
114
|
+
minHeight: 36px # desktop hover-driven, not touch
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Pattern 4 is the most opinionated and the most useful for the touch-target case: the touch-vs-pointer split is a *composite* concern (size + padding + minHeight all change together), and expressing it as one variant block makes the intent legible.
|
|
118
|
+
|
|
119
|
+
## Calm Precision compatibility
|
|
120
|
+
|
|
121
|
+
The four patterns are extensions, not replacements. Calm Precision principles map directly:
|
|
122
|
+
|
|
123
|
+
| Calm Precision rule | Today | Multi-pattern expression |
|
|
124
|
+
|---|---|---|
|
|
125
|
+
| `44px mobile, 24px desktop touch` | inline two-value statement | Pattern 4 (composite `button-primary` with mobile/web variants) |
|
|
126
|
+
| `Title 14-16px bold → Description 12-14px → Metadata 11-12px` | range, agent interprets | Pattern 1 (scale by form factor) or Pattern 2 (ladder rungs) |
|
|
127
|
+
| `4.5:1 contrast` | universal | Pattern 3 (condition: high-contrast surface picks AAA values) |
|
|
128
|
+
| `8pt grid` | universal | unchanged — no pattern needed |
|
|
129
|
+
| `Status = text color only, no background badges` | universal rule | unchanged — qualitative, not a token |
|
|
130
|
+
|
|
131
|
+
Two non-negotiables stay outside the framework because they are *behavioral*, not numeric: "No fake buttons / backend must exist before UI" and "Real data default — mock requires explicit permission". The framework expresses values, not data contracts.
|
|
132
|
+
|
|
133
|
+
## Implementation risk
|
|
134
|
+
|
|
135
|
+
| Risk | Severity | Mitigation |
|
|
136
|
+
|---|---|---|
|
|
137
|
+
| Token resolution becomes a build-time dependency every consumer needs | **High** | Ship a stdlib-only Python resolver (≤200 LOC) in `ui-design/scripts/` so consumers can shell out. No JS toolchain required for read-only consumers. |
|
|
138
|
+
| Conditions can interact (dark + high-contrast + reduceMotion all true) | **Medium** | Declared precedence order in spec; resolver picks most-specific then falls back. Test matrix at the resolver level. |
|
|
139
|
+
| Naming sprawl — ladders + patterns + components overlap | **Medium** | One pattern per use case; document a decision tree (form factor → scale; cross-token consistency → composite; runtime state → condition; named tiers → ladder). |
|
|
140
|
+
| Drift from DESIGN.md upstream — they may evolve the spec | **Medium** | Keep our extension namespaced as `pattern: <name>`; if upstream ships native support we can deprecate ours. Track the upstream repo at v0.x and re-evaluate on each minor bump. |
|
|
141
|
+
| Tokens become opaque at the source — readers can't tell what value an agent will pick | **Medium** | Resolver MUST emit a "resolved view" markdown file as a build artifact, showing what each token resolves to on each declared form factor. Reviewable in PRs. |
|
|
142
|
+
| Adoption cost across 8 existing apps is non-trivial | **Low** | Pattern adoption is opt-in per project; existing single-value tokens keep working. |
|
|
143
|
+
|
|
144
|
+
## Build-time complexity
|
|
145
|
+
|
|
146
|
+
- **Resolver**: ~200 LOC Python, stdlib-only (yaml parsing via `PyYAML` already in build-loop deps). Pure function: `(token_path, form_factor, conditions) → value`.
|
|
147
|
+
- **Linter extension**: extend DESIGN.md's existing `lint` command to recognize the four new `pattern:` values and validate their internal shape (e.g., a `scale` token MUST declare at least 2 form factors).
|
|
148
|
+
- **Diff tool**: extend `diff` to compare resolved values per form factor, not just raw token values — otherwise diffs would miss the case where the `mobile` value changed but `tablet` didn't.
|
|
149
|
+
- **CI integration**: every consuming app's CI runs the resolver and asserts the resolved view matches a checked-in snapshot. Drift becomes a PR-time signal, not a runtime surprise.
|
|
150
|
+
|
|
151
|
+
Estimated effort to ship a v0.1 of all four patterns + resolver + linter extension: M (medium). Estimated effort to retrofit Calm Precision's three numeric rules: S (small) — three token files.
|
|
152
|
+
|
|
153
|
+
## Feasibility verdict
|
|
154
|
+
|
|
155
|
+
**Verdict: ITERATE.** The pattern shapes are compatible with Calm Precision and address a real drift problem (the touch-target rule, the typography range rule, the dark-mode color rule). But the implementation risk concentrates in two places — *token opacity at the source* (readers can't see what an agent will pick) and *condition-interaction ambiguity* — that would burn trust if shipped without a resolved-view artifact and a precedence test matrix.
|
|
156
|
+
|
|
157
|
+
**Recommended next step (NOT executed in this build):** prototype Pattern 4 (composite) only, on Calm Precision's touch-target rule, in one app (TruePace — iPad-primary with iPhone secondary, so it actually exercises the variant resolution). Measure: does the composite token reduce the per-form-factor interpretation work an agent has to do? If yes, expand to Pattern 1. If no, the abstraction isn't paying for its complexity.
|
|
158
|
+
|
|
159
|
+
**Rejected today:** shipping all four patterns to active use simultaneously. The composite case is the highest-value, lowest-risk entry point; the other three patterns should be gated on the composite prototype's outcome.
|
|
160
|
+
|
|
161
|
+
**Not adopted, not rejected:** patterns themselves are sound; the question is sequencing and prototype evidence, not design correctness. This document stays as a draft until a single-pattern prototype confirms or denies the value claim.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
*Drafted in build-loop run 2026-05-26 against the universal-design enrichment intent. Re-evaluate when the Pattern 4 prototype lands or when DESIGN.md upstream releases a `pattern:` shape natively.*
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
+
|
|
3
|
+
> **DEPRECATION SHIM (one release cycle).** Canonical source migrated to the `ui-guidance` plugin → load via `Skill("ui-guidance:preferences")`. This file remains in build-loop as a transition aid; future updates land in the plugin. *(Renamed from `design-preferences-evidence` in ui-guidance v0.2.0.)*
|
|
4
|
+
|
|
5
|
+
# Design Preferences — Sourced from Owned Apps
|
|
6
|
+
|
|
7
|
+
> Sourced from `.build-loop/design-evidence/*.md` (8 apps scanned 2026-05-26). Every claim in this file traces to a specific evidence file. The evidence files are the ground truth — when this doc and an evidence file disagree, the evidence file wins.
|
|
8
|
+
>
|
|
9
|
+
> **Primary preferred references** (per intent.md): Sample Voice iOS, Sample Timer (iPad primary), Sample Reader, Sample Product App.
|
|
10
|
+
> **Secondary / directional** (note what works AND what user dislikes): Secrets Vault macOS, Sample Decision App, Sample Offline iOS, Sample Onboarding App.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 1. Typography: tokenized three-line hierarchy, not inline pixel sizes
|
|
15
|
+
|
|
16
|
+
**Universal non-negotiable:** *"Visual hierarchy is one-glance recoverable"* (alt doc §2.12) + Calm Precision's *"Title (14-16px bold) → Description (12-14px) → Metadata (11-12px muted)"*.
|
|
17
|
+
|
|
18
|
+
**What works (primary apps):**
|
|
19
|
+
- **Secrets Vault** — verbatim CP 6.4.1 implementation in `VaultTypography.swift` (evidence: `secrets-vault-macos.md`). Token comment in source code: *"L1: Title 15px medium high contrast → L2: Description 13px regular medium contrast → L3: Metadata 11px regular low contrast."* This is the textbook reference.
|
|
20
|
+
- **Sample Timer App** — `TextRole` enum (`Theme.swift:689-721` per `sample-timer.md`) ladders seven named roles (display/title/headline/subheadline/body/caption/micro) with explicit baseSize + defaultWeight per rung. Tokens cite role purpose: *"display: 30pt — single largest element on a screen."*
|
|
21
|
+
- **Sample Voice App** — nine named typography tokens (`Theme.swift:31-35,70-75` per `sample-voice-ios.md`) including `fontTabular` (10pt mono-equivalent for numerics) — a use-case that single-purpose token sets miss.
|
|
22
|
+
|
|
23
|
+
**Anti-pattern (secondary apps):**
|
|
24
|
+
- **Sample Onboarding App** — typography is **inline pixel sizes scattered across call sites**: `.font(.system(size: 34))`, `.system(size: 20)`, `.system(size: 18)`, `.system(size: 16)`, `.system(size: 15)`, `.system(size: 14)`, `.system(size: 13)`, `.system(size: 12)` — all in `SetupView.swift` alone (evidence: `sample-onboarding-app.md`). Cannot grep for "title size." Cannot bump the scale once. The ladder is not a ladder; it is a pile.
|
|
25
|
+
|
|
26
|
+
**Preference recorded:** **define a typography token enum (TextRole-style) before writing the first view.** Inline pixel sizes are tolerated only when the role doesn't yet exist in the enum — and that gap becomes a follow-up to extend the enum, not a permanent state.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 2. Color: single accent, hierarchical text, status-as-text
|
|
31
|
+
|
|
32
|
+
**Universal non-negotiable:** *"Visual hierarchy is one-glance recoverable [...] If color is removed, the hierarchy still holds"* (alt doc §2.12) + Calm Precision's *"Status = text color only, no background badges."*
|
|
33
|
+
|
|
34
|
+
**What works (primary apps):**
|
|
35
|
+
- **Sample Product App** — strictest single-accent enforcement in inventory: `--primary === --accent === --ring === #f0b65e` (`index.css:18,22,26` per `sample-product.md`). The entire palette is warm-monochromatic; the only "second color" is `--success: #7bc67e` (muted sage) and `--destructive: #e06356` (warm red-orange, not pure red — palette discipline holds even on error).
|
|
36
|
+
- **Sample Reader** — explicit semantic separation: `--color-error-bg` and `--color-error-border` exist for tinted alert containers, but they are tokens distinct from `--status-error` (the foreground text color). Container surfaces are gated to reading flow where text-color-only would underread (`sample-reader.md` cites the divergence with rationale).
|
|
37
|
+
- **Secrets Vault** — three-tier text contrast (`textPrimary / textSecondary / textMuted` = stone-900 / stone-600 / stone-400 in light; stone-100 / stone-300 / stone-450 in dark, per `secrets-vault-macos.md`). Each tier maps directly to L1/L2/L3 of the typography ladder — text size + text contrast move together.
|
|
38
|
+
|
|
39
|
+
**Anti-pattern (secondary apps):**
|
|
40
|
+
- **Sample Decision App theme-toggle pattern** — three switchable themes (F default, A "Case File," B "Conversation") via `[data-theme="A"|"B"]` on `<html>` (evidence: `sample-decision-app.md`). Each theme owns the same 6 token names but different brand colors. *Works for*: keeping semantic meaning constant across visual presentation. *Fails for*: brand identity — a brand that can become blue or terracotta or red is brand-fungible. Likely user-dislike: the existence of the toggle dilutes the canonical voice (Theme F).
|
|
41
|
+
- **Sample Reader tinted error containers** — divergence from Calm Precision noted above. **Not always a flaw** — the sample reader justifies it by reading-flow density, and the divergence is contained to status containers — but it is a divergence, and absent a similar rationale, default to text-color-only.
|
|
42
|
+
|
|
43
|
+
**Preference recorded:** **one accent color per app. Status uses text color first; tinted containers only when reading-flow density justifies and the divergence is documented in the token file's comments.**
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 3. Touch targets: tokenized at component layer, never per-view
|
|
48
|
+
|
|
49
|
+
**Universal non-negotiable:** *"Interaction targets match input precision"* (alt doc §2 visual-craft inheritance) + Calm Precision's *"44px mobile, 24px desktop touch."*
|
|
50
|
+
|
|
51
|
+
**What works (primary apps):**
|
|
52
|
+
- **Sample Product App** — `.btn-primary` class explicitly enforces `min-h-[44px] min-w-[44px]` at the **component layer** (`index.css:52` per `sample-product.md`). Every primary button passes the Calm Precision touch target without any per-view code.
|
|
53
|
+
- **Sample Voice App** — primary CTA is 52pt height (`HomeView.swift:92` per `sample-voice-ios.md`), exceeds the 44pt floor, and the tab bar uses a 100pt reserve token (`Theme.tabBarReserve`) so list items never clip behind the iOS 26 floating bar.
|
|
54
|
+
|
|
55
|
+
**Cited Calm Precision compliance via system defaults:**
|
|
56
|
+
- **Sample Offline iOS** — uses Apple system `List` rows and `.plus` button — both meet 44pt via Apple defaults. Demonstrates that *"system primitives over visual fakes"* (alt doc §2.14) can be the touch-target win — but only when the app doesn't need brand-distinct controls.
|
|
57
|
+
|
|
58
|
+
**Preference recorded:** **encode touch-target minimums in the component class itself, not in per-view padding math.** When using system primitives, prefer them — Apple has already done the work.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 4. Responsive form factor: token-scaled, not per-platform fork
|
|
63
|
+
|
|
64
|
+
**Universal non-negotiable:** *"Content fits its container, or the container fits the content"* (alt doc §2.11).
|
|
65
|
+
|
|
66
|
+
**What works (gold standard — Sample Timer App):**
|
|
67
|
+
- Single typography hierarchy multiplied by `\.viewportScale` env var (`sample-timer.md` cites `Theme.swift:689-836`):
|
|
68
|
+
- iPhone compact size class: 1.0×
|
|
69
|
+
- iPad / Mac regular-width: 1.5×
|
|
70
|
+
- Mac live window resize: `max(0.85, min(1.5, shorterEdge / 600))`
|
|
71
|
+
- iPad sheets: additional 1.15× uplift over canvas (1.5 × 1.15 = 1.725×)
|
|
72
|
+
- Watch palette has its own warm/cool dual mode: cool primary palette when display is active, warm `Dim` variants when `isLuminanceReduced == true` (Always-On Display) — circadian-safe >560nm tones.
|
|
73
|
+
- Mode accents (timer / flow / adaptive / break) ship as `GradientColorSet` with **7 distinct color slots** per mode (core + 5-stop dark gradient + 5-stop light gradient + blob primary + blob secondary + warm target + ring end).
|
|
74
|
+
|
|
75
|
+
**What doesn't work (anti-pattern — none in inventory, but absence noted):**
|
|
76
|
+
- No app in the inventory ships separate iPhone and iPad themes as forked codepaths. The closest is Sample Timer App's `#if os(watchOS)` block which uses a separate warm-cool palette for watch — but that is platform-isolated, not a fork.
|
|
77
|
+
|
|
78
|
+
**Preference recorded:** **viewport-scale tokens that read a single env var. iPad is the iPhone hierarchy × 1.5; Mac is the iPad math but live-window-resize-aware; Watch is its own palette but the same role names.** Forking iPhone and iPad theme files is the failure mode; the multi-pattern framework draft (`design-patterns-multi.md`) Pattern 1 / Pattern 4 are the formal expression of this preference.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## 5. Motion: respect-reduce-motion is mandatory, anti-flicker is intentional
|
|
83
|
+
|
|
84
|
+
**Universal non-negotiable:** *"Motion serves comprehension, not decoration"* (alt doc §2 visual-craft inheritance).
|
|
85
|
+
|
|
86
|
+
**What works (primary apps):**
|
|
87
|
+
- **Sample Decision App** — `@media (prefers-reduced-motion: reduce)` overrides all animations to 0.01ms at the globals level (`app/globals.css:65-71` per `sample-decision-app.md`). Single CSS rule covers the whole app.
|
|
88
|
+
- **Sample Voice App** — `@Environment(\.accessibilityReduceMotion)` honored on HomeView; first-time onboarding animation gated to once per AppStorage flag (`HomeView.swift:16,47` per `sample-voice-ios.md`).
|
|
89
|
+
- **Secrets Vault** — stagger animation capped at 400ms total (`60ms × N items, max 400ms`) — prevents the long-list "wave" anti-pattern (per project CLAUDE.md cited in `secrets-vault-macos.md`).
|
|
90
|
+
- **Sample Onboarding App** — StatusBanner's `phase label itself stays visible briefly after a stage transition so the user sees the most recent phase without flicker` (verbatim from `StatusBanner.swift` per `sample-onboarding-app.md`). Anti-flicker is a documented design decision, encoded in code comments.
|
|
91
|
+
|
|
92
|
+
**Preference recorded:** **`prefers-reduced-motion` / `accessibilityReduceMotion` must be respected by default, not opt-in. Stagger animations have a total-time cap, not just a per-item interval. Anti-flicker behavior is a first-class design concern, not an afterthought.**
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 6. Voice + error UX: verb+object, what→why→fix, calm degradation
|
|
97
|
+
|
|
98
|
+
**Universal non-negotiable:** *"When something fails, explain what happened, preserve context, give a next step"* (alt doc §1.5 Recover) + *"Resilient to imperfect input"* (alt doc §2.9).
|
|
99
|
+
|
|
100
|
+
**What works (primary apps):**
|
|
101
|
+
- **Secrets Vault** — explicit three-part error pattern named in project CLAUDE.md (cited `secrets-vault-macos.md`): *"Errors: what → why → fix pattern."* Plus voice rule: *"Verb+Object labels, contextual loading ('Deriving encryption key…')"* — loading messages name the actual operation.
|
|
102
|
+
- **Sample Offline iOS** — *"Errors surface inline (red footnote) without removing cached rows — offline still shows the last good list"* (`CampsListView.swift` code comment per `sample-offline-ios.md`). On error, the cache is preserved — graceful degradation in action.
|
|
103
|
+
- **Sample Voice App** — `Haptics.impact(.light)` paired with state change on every CTA tap (`HomeView.swift:81` per `sample-voice-ios.md`) — action feedback via haptic + visible state, not just one or the other.
|
|
104
|
+
|
|
105
|
+
**Preference recorded:** **errors are calm and informative (what / why / fix); they never wipe state; loading is named ('Deriving encryption key…' not 'Loading…'); actions get both haptic + visual confirmation on mobile.**
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## 7. Anti-pattern roundup (avoid these by default)
|
|
110
|
+
|
|
111
|
+
| Anti-pattern | Source | Why it fails |
|
|
112
|
+
|---|---|---|
|
|
113
|
+
| Inline pixel-size typography | `sample-onboarding-app.md` | Ladder not enforceable, scale bump not greppable, accessibility uplift impossible at scale |
|
|
114
|
+
| Theme-toggle for brand color | `sample-decision-app.md` | Brand fungibility — *"design-toggle app"* not *"Decision Doctor"* |
|
|
115
|
+
| Tinted error containers without rationale | (sample reader gets a pass with rationale) | Default fails Calm Precision's text-color-only rule; needs reading-flow density justification when used |
|
|
116
|
+
| System-default with no brand voice | `sample-offline-ios.md` | Indistinct from any other camp-management list; appropriate for offline-first utility, inappropriate for a brand-led product |
|
|
117
|
+
| Off-grid spacing without flag | (Sample Timer App handles this well — off-grid values are noted as "exotic" in code comments per `sample-timer.md`) | Drift cause; the discipline is the comment, not the value |
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## 8. What this means for new builds
|
|
122
|
+
|
|
123
|
+
A new app in this ecosystem should, in priority order:
|
|
124
|
+
|
|
125
|
+
1. **Token files first** — `Theme/Colors`, `Theme/Typography` (or `index.css`-equivalent for web) before the first view is written. Use Sample Voice App / Sample Timer App / Secrets Vault as templates.
|
|
126
|
+
2. **One accent. Single. Don't theme-toggle.** Sample Product App is the strictest example.
|
|
127
|
+
3. **Three-line text hierarchy** baked into the typography enum. Secrets Vault's `VaultTypography.title/.description/.metadata` is the textbook.
|
|
128
|
+
4. **Touch targets at the component layer.** Sample Product App's `.btn-primary` is the example.
|
|
129
|
+
5. **`prefers-reduced-motion` / `accessibilityReduceMotion` from day one.** The sample decision app's single-CSS-rule approach is the cheapest implementation.
|
|
130
|
+
6. **Errors are calm, informative, non-destructive.** The sample offline app's offline-preserves-cache + Secrets Vault's what→why→fix pattern combine into a single rule.
|
|
131
|
+
7. **Multi-form-factor via viewport-scale tokens, not forked themes.** Sample Timer App's `\.viewportScale` is the reference; the multi-pattern framework draft (`design-patterns-multi.md`) is where this becomes formal if/when prototyped.
|
|
132
|
+
|
|
133
|
+
When deviating: name the deviation in the token file's comments, the way Sample Timer App flags off-grid spacing and Sample Reader flags tinted error containers. The discipline is the comment.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## 9. Live-Capture Addendum (2026-05-26)
|
|
138
|
+
|
|
139
|
+
Live IBR captures on the 4 primaries surfaced texture observations source-read could not:
|
|
140
|
+
|
|
141
|
+
- **Tokens extend to haptics.** Sample Voice App's `HapticVocabulary.swift` (`.confirm/.reward/.warn/.progress/.selection`) is a semantic layer above UIKit feedback generators, parallel to `Theme.fontDisplay` above `Font.system(...)`. Treat haptics as first-class tokens on mobile. Evidence: `sample-voice-ios.md` §Live IBR Capture.
|
|
142
|
+
- **Selection signaling is NOT consistent across primaries.** Sample Voice App uses solid-fill on selected (filter pills, tab); Sample Timer App uses 1pt border + glyph check on selected mode card. Both legitimate; choose per surface density and decision weight, not by a single rule. Evidence: `sample-voice-ios.md` + `sample-timer.md`.
|
|
143
|
+
- **Empty states diverge by intent.** Sample Voice App floats SF Symbol + copy (first-use); Sample Timer App renders milestone ladder (unlock-progression); Sample Product App uses text label (transient load). Match vocabulary to user reason-for-emptiness.
|
|
144
|
+
- **AI-assist lives inside input when input is the primary action.** Sample Product App's sparkle "Enhance" sat inside the textarea (`sample-product.md` §Live IBR Capture, 2026-05-03). Generalizable. (As of 2026-05-26 refresh, Sample Product App's landing has been redesigned to headline+CTA-first; the input-with-Enhance pattern moved one click deeper. Pattern still holds, citation is historical.)
|
|
145
|
+
- **Brand-identity-in-chrome is universal, treatment is product-specific.** All 4 primary apps have distinct brand chrome — no two alike. System-default brand chrome is the explicit deviation.
|
|
146
|
+
- **Two-speed motion on a single control.** Sample Product App primary CTA: `transition: background 0.2s, transform 0.15s` — geometry settles 50ms faster than color for snappier press feedback while color carries texture. When a control shifts both color and shape, tune per channel. (`sample-product.md` §Fresh Live IBR Capture)
|
|
147
|
+
- **Error-state restraint mirrors main-app restraint.** Sample Product App 404 = 5 elements (icon, title, body, CTA, card). No illustration, no error code, no search. Empty space carries the signal. Pattern: error/empty states inherit the app's restraint discipline; do not overcompensate.
|
|
148
|
+
- **Friction-removal microcopy has a stable shape:** short / two-clause / bulleted (`·`) / muted ≤12pt, placed under a CTA when account/cost/lock-in friction is the user concern. Sample Product App uses the same recipe on the landing CTA (`No account required · Free to try`) and the auth card (`No account · Groq Llama 3.3`).
|
|
149
|
+
|
|
150
|
+
These supersede any prior synthesis claim that read selection-signaling or empty-state vocabulary as universal. The `evidence-capture-policy.md` reference codifies why source-read alone could not produce these observations.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Evidence Capture Policy
|
|
2
|
+
|
|
3
|
+
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
4
|
+
|
|
5
|
+
> **DEPRECATION SHIM (one release cycle).** Canonical source migrated to the `ui-guidance` plugin → load via `Skill("ui-guidance:evidence-policy")`. This file remains in build-loop as a transition aid; future updates land in the plugin. *(Renamed from `evidence-capture-policy` in ui-guidance v0.2.0.)*
|
|
6
|
+
|
|
7
|
+
How to gather design evidence from owned apps. Routes a build-loop dispatch to the right collection method based on what's being asked.
|
|
8
|
+
|
|
9
|
+
## Two evidence types, two methods
|
|
10
|
+
|
|
11
|
+
### 1. Token extraction — source-of-truth read is canonical
|
|
12
|
+
|
|
13
|
+
For numbers, role names, palette values, breakpoints, type ladders, spacing units, and any other tokenized design primitive:
|
|
14
|
+
|
|
15
|
+
- Read the source-of-truth file directly: `Theme.swift`, `globals.css`, `tailwind.config.{ts,js}`, `tokens.json`, `design-tokens/*.scss`, equivalent.
|
|
16
|
+
- This is cheaper, more accurate, version-locked to the commit, and immune to render-time variation (theme overrides, accessibility scaling, dynamic type).
|
|
17
|
+
- A screenshot of a rendered button cannot tell you whether its corner radius is 8pt or 9pt; the token file can.
|
|
18
|
+
|
|
19
|
+
### 2. Interaction texture — live IBR capture is mandatory
|
|
20
|
+
|
|
21
|
+
For motion timing, haptic feedback intensity, real-render gradients / shadows / blur, hit-target responsiveness, scroll feel, transition mid-states, and any moment where the rendered output may diverge from what the token file predicts:
|
|
22
|
+
|
|
23
|
+
- Boot the simulator / start the dev server / open the binary.
|
|
24
|
+
- Capture screens via IBR (`ibr:native-testing`, `ibr:screenshot`) or simctl + idb for iOS, or browser screenshot for web.
|
|
25
|
+
- Augment (do not replace) the source-read evidence with observed render behavior.
|
|
26
|
+
- Source files cannot show: a glow shadow that renders subtler than its parameters predict; a haptic vocabulary layer above the visual tokens; a selection state that uses border+glyph instead of fill; an empty-state ladder pattern that has no token representation.
|
|
27
|
+
|
|
28
|
+
## Decision rule for build-loop dispatches
|
|
29
|
+
|
|
30
|
+
When a build's evidence requirement is:
|
|
31
|
+
|
|
32
|
+
| Question | Method |
|
|
33
|
+
|---|---|
|
|
34
|
+
| "What are the tokens?" | Source-read only |
|
|
35
|
+
| "How does it feel?" | Live capture only |
|
|
36
|
+
| Both | Both, with explicit chunks per evidence type in the plan |
|
|
37
|
+
|
|
38
|
+
Default: when in doubt, do both. Source-read is cheap; live capture surfaces what source-read structurally cannot.
|
|
39
|
+
|
|
40
|
+
## Failure protocol
|
|
41
|
+
|
|
42
|
+
Live capture failures are non-blocking. Record verbatim in the evidence file:
|
|
43
|
+
|
|
44
|
+
- The specific error string (`xcodebuild` output, `npm run dev` stderr, `idb` failure).
|
|
45
|
+
- What was attempted (commands run, env probed).
|
|
46
|
+
- What would unblock (missing env var, missing Postgres, missing sim).
|
|
47
|
+
- The capture date of any pre-existing IBR artifacts used as fallback live-render evidence (with a freshness window — typically ≤30 days under no-functional-changes conditions).
|
|
48
|
+
|
|
49
|
+
A documented failure block is acceptable evidence. The synthesis layer must not silently treat missing live capture as "no observation."
|
|
50
|
+
|
|
51
|
+
## Cross-reference
|
|
52
|
+
|
|
53
|
+
This policy supersedes the Phase 6 Learn entry from the prior universal-design enrichment run, which reported a "scan-attempt vs source-read tradeoff" as if they were substitutes. They are not substitutes — they are complementary, and a build-loop dispatch must choose explicitly per evidence type. The prior recurring-pattern entry should be re-tagged: "source-read is canonical for tokens, live capture is mandatory for texture; do not collapse one into the other."
|
|
54
|
+
|
|
55
|
+
When this policy and another reference disagree about evidence sourcing, this policy wins for token-vs-texture routing.
|