buildanything 1.8.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +17 -3
- package/CHANGELOG.md +57 -0
- package/README.md +57 -61
- package/agents/a11y-architect.md +168 -0
- package/agents/briefing-officer.md +172 -0
- package/agents/business-model.md +82 -29
- package/agents/code-architect.md +80 -0
- package/agents/code-reviewer.md +256 -0
- package/agents/code-simplifier.md +72 -0
- package/agents/design-brand-guardian.md +312 -53
- package/agents/design-critic.md +144 -0
- package/agents/design-inclusive-visuals-specialist.md +8 -19
- package/agents/design-ui-designer.md +352 -56
- package/agents/design-ux-architect.md +418 -55
- package/agents/design-ux-researcher.md +359 -49
- package/agents/engineering-ai-engineer.md +28 -36
- package/agents/engineering-backend-architect.md +187 -36
- package/agents/engineering-data-engineer.md +227 -43
- package/agents/engineering-devops-automator.md +229 -74
- package/agents/engineering-frontend-developer.md +223 -34
- package/agents/engineering-mobile-app-builder.md +8 -1
- package/agents/engineering-rapid-prototyper.md +45 -11
- package/agents/engineering-security-engineer.md +265 -61
- package/agents/engineering-senior-developer.md +141 -19
- package/agents/engineering-sre.md +86 -0
- package/agents/engineering-technical-writer.md +287 -41
- package/agents/feature-intel.md +111 -0
- package/agents/ios-app-review-guardian.md +21 -2
- package/agents/ios-foundation-models-specialist.md +22 -2
- package/agents/ios-product-reality-auditor.md +292 -0
- package/agents/ios-storekit-specialist.md +11 -2
- package/agents/ios-swift-architect.md +29 -1
- package/agents/ios-swift-search.md +9 -1
- package/agents/ios-swift-ui-design.md +40 -5
- package/agents/marketing-app-store-optimizer.md +248 -64
- package/agents/planner.md +221 -0
- package/agents/pr-test-analyzer.md +64 -0
- package/agents/product-feedback-synthesizer.md +70 -2
- package/agents/product-owner.md +163 -0
- package/agents/product-reality-auditor.md +216 -0
- package/agents/product-spec-writer.md +176 -0
- package/agents/refactor-cleaner.md +110 -0
- package/agents/security-reviewer.md +129 -0
- package/agents/silent-failure-hunter.md +55 -0
- package/agents/swift-build-resolver.md +121 -0
- package/agents/swift-reviewer.md +113 -0
- package/agents/tech-feasibility.md +26 -4
- package/agents/testing-api-tester.md +238 -59
- package/agents/testing-evidence-collector.md +50 -1
- package/agents/testing-performance-benchmarker.md +23 -1
- package/agents/testing-reality-checker.md +7 -1
- package/agents/visual-research.md +118 -0
- package/bin/adapters/cycle-counter-tool.ts +155 -0
- package/bin/adapters/scribe-tool.ts +73 -0
- package/bin/adapters/state-save-tool.ts +130 -0
- package/bin/adapters/write-lease-tool.ts +127 -0
- package/bin/buildanything-runtime.js +15 -0
- package/bin/buildanything-runtime.ts +241 -0
- package/bin/graph-index.js +24 -0
- package/bin/graph-index.ts +340 -0
- package/bin/mcp-servers/graph-mcp.js +26 -0
- package/bin/mcp-servers/graph-mcp.ts +481 -0
- package/bin/mcp-servers/orchestrator-mcp.js +26 -0
- package/bin/mcp-servers/orchestrator-mcp.ts +361 -0
- package/bin/setup.js +312 -76
- package/commands/add-feature.md +2 -0
- package/commands/build.md +994 -265
- package/commands/fix.md +1 -1
- package/commands/idea-sweep.md +2 -2
- package/commands/self-check.md +121 -0
- package/commands/setup.md +61 -9
- package/commands/ux-review.md +5 -5
- package/commands/verify.md +9 -9
- package/docs/migration/agents.yaml +729 -0
- package/docs/migration/phase-graph.yaml +1504 -0
- package/docs/migration/sdk-host-compat.md +18 -0
- package/hooks/compile-writer-owner-cache.ts +171 -0
- package/hooks/design-md-lint +4 -0
- package/hooks/design-md-lint.ts +295 -0
- package/hooks/hooks.json +36 -0
- package/hooks/pre-tool-use +19 -0
- package/hooks/pre-tool-use.ts +807 -0
- package/hooks/record-mode-transitions.ts +235 -0
- package/hooks/session-start +71 -1
- package/hooks/subagent-start +17 -0
- package/hooks/subagent-start.ts +472 -0
- package/hooks/subagent-stop +17 -0
- package/hooks/subagent-stop.ts +153 -0
- package/package.json +26 -4
- package/protocols/agent-prompt-authoring.md +165 -0
- package/protocols/architecture-schema.md +178 -0
- package/protocols/cleanup.md +4 -0
- package/protocols/decision-log.md +135 -0
- package/protocols/design-md-authoring.md +520 -0
- package/protocols/design-md-spec.md +362 -0
- package/protocols/fake-data-detector.md +1 -1
- package/protocols/ios-context.md +10 -11
- package/protocols/ios-fake-data-detector.md +65 -0
- package/protocols/ios-phase-branches.md +299 -39
- package/protocols/launch-readiness.md +262 -0
- package/protocols/metric-loop.md +62 -2
- package/protocols/page-spec-schema.md +234 -0
- package/protocols/product-spec-schema.md +354 -0
- package/protocols/smoke-test.md +9 -1
- package/protocols/sprint-tasks-schema.md +53 -0
- package/protocols/state-schema.json +423 -0
- package/protocols/state-schema.md +202 -0
- package/protocols/verify.md +91 -3
- package/protocols/web-phase-branches.md +395 -75
- package/skills/ios/_VENDORED.md +2 -0
- package/skills/ios/app-store-connect-metadata/SKILL.md +148 -0
- package/skills/ios/asc-privacy-manifest/SKILL.md +350 -0
- package/skills/ios/hig-components-content/SKILL.md +86 -0
- package/skills/ios/hig-components-content/references/activity-views.md +79 -0
- package/skills/ios/hig-components-content/references/charts.md +180 -0
- package/skills/ios/hig-components-content/references/collections.md +48 -0
- package/skills/ios/hig-components-content/references/color-wells.md +42 -0
- package/skills/ios/hig-components-content/references/image-views.md +82 -0
- package/skills/ios/hig-components-content/references/image-wells.md +34 -0
- package/skills/ios/hig-components-content/references/lockups.md +78 -0
- package/skills/ios/hig-components-content/references/web-views.md +36 -0
- package/skills/ios/hig-components-controls/SKILL.md +88 -0
- package/skills/ios/hig-components-controls/references/combo-boxes.md +40 -0
- package/skills/ios/hig-components-controls/references/controls.md +112 -0
- package/skills/ios/hig-components-controls/references/gauges.md +74 -0
- package/skills/ios/hig-components-controls/references/labels.md +92 -0
- package/skills/ios/hig-components-controls/references/pickers.md +128 -0
- package/skills/ios/hig-components-controls/references/rating-indicators.md +38 -0
- package/skills/ios/hig-components-controls/references/segmented-controls.md +94 -0
- package/skills/ios/hig-components-controls/references/sliders.md +92 -0
- package/skills/ios/hig-components-controls/references/steppers.md +40 -0
- package/skills/ios/hig-components-controls/references/text-fields.md +88 -0
- package/skills/ios/hig-components-controls/references/text-views.md +56 -0
- package/skills/ios/hig-components-controls/references/toggles.md +127 -0
- package/skills/ios/hig-components-controls/references/token-fields.md +48 -0
- package/skills/ios/hig-components-controls/references/virtual-keyboards.md +156 -0
- package/skills/ios/hig-components-dialogs/SKILL.md +76 -0
- package/skills/ios/hig-components-dialogs/references/action-sheets.md +74 -0
- package/skills/ios/hig-components-dialogs/references/alerts.md +158 -0
- package/skills/ios/hig-components-dialogs/references/digit-entry-views.md +32 -0
- package/skills/ios/hig-components-dialogs/references/popovers.md +81 -0
- package/skills/ios/hig-components-dialogs/references/sheets.md +157 -0
- package/skills/ios/hig-components-layout/SKILL.md +99 -0
- package/skills/ios/hig-components-layout/references/boxes.md +48 -0
- package/skills/ios/hig-components-layout/references/column-views.md +44 -0
- package/skills/ios/hig-components-layout/references/lists-and-tables.md +99 -0
- package/skills/ios/hig-components-layout/references/ornaments.md +56 -0
- package/skills/ios/hig-components-layout/references/outline-views.md +64 -0
- package/skills/ios/hig-components-layout/references/panels.md +75 -0
- package/skills/ios/hig-components-layout/references/scroll-views.md +123 -0
- package/skills/ios/hig-components-layout/references/sidebars.md +109 -0
- package/skills/ios/hig-components-layout/references/split-views.md +110 -0
- package/skills/ios/hig-components-layout/references/tab-bars.md +173 -0
- package/skills/ios/hig-components-layout/references/tab-views.md +68 -0
- package/skills/ios/hig-components-layout/references/windows.md +188 -0
- package/skills/ios/hig-components-menus/SKILL.md +81 -0
- package/skills/ios/hig-components-menus/references/action-button.md +61 -0
- package/skills/ios/hig-components-menus/references/buttons.md +261 -0
- package/skills/ios/hig-components-menus/references/context-menus.md +105 -0
- package/skills/ios/hig-components-menus/references/disclosure-controls.md +84 -0
- package/skills/ios/hig-components-menus/references/dock-menus.md +40 -0
- package/skills/ios/hig-components-menus/references/edit-menus.md +88 -0
- package/skills/ios/hig-components-menus/references/menus.md +171 -0
- package/skills/ios/hig-components-menus/references/pop-up-buttons.md +70 -0
- package/skills/ios/hig-components-menus/references/pull-down-buttons.md +77 -0
- package/skills/ios/hig-components-menus/references/the-menu-bar.md +303 -0
- package/skills/ios/hig-components-menus/references/toolbars.md +256 -0
- package/skills/ios/hig-components-search/SKILL.md +68 -0
- package/skills/ios/hig-components-search/references/page-controls.md +120 -0
- package/skills/ios/hig-components-search/references/path-controls.md +40 -0
- package/skills/ios/hig-components-search/references/search-fields.md +189 -0
- package/skills/ios/hig-components-status/SKILL.md +80 -0
- package/skills/ios/hig-components-status/references/activity-rings.md +105 -0
- package/skills/ios/hig-components-status/references/progress-indicators.md +116 -0
- package/skills/ios/hig-components-status/references/status-bars.md +38 -0
- package/skills/ios/hig-components-system/SKILL.md +88 -0
- package/skills/ios/hig-components-system/references/app-clips.md +387 -0
- package/skills/ios/hig-components-system/references/app-shortcuts.md +114 -0
- package/skills/ios/hig-components-system/references/complications.md +425 -0
- package/skills/ios/hig-components-system/references/home-screen-quick-actions.md +42 -0
- package/skills/ios/hig-components-system/references/live-activities.md +442 -0
- package/skills/ios/hig-components-system/references/notifications.md +153 -0
- package/skills/ios/hig-components-system/references/top-shelf.md +135 -0
- package/skills/ios/hig-components-system/references/watch-faces.md +40 -0
- package/skills/ios/hig-components-system/references/widgets.md +517 -0
- package/skills/ios/hig-foundations/SKILL.md +98 -0
- package/skills/ios/hig-foundations/references/accessibility.md +291 -0
- package/skills/ios/hig-foundations/references/app-icons.md +210 -0
- package/skills/ios/hig-foundations/references/branding.md +44 -0
- package/skills/ios/hig-foundations/references/color.md +274 -0
- package/skills/ios/hig-foundations/references/dark-mode.md +116 -0
- package/skills/ios/hig-foundations/references/icons.md +263 -0
- package/skills/ios/hig-foundations/references/images.md +176 -0
- package/skills/ios/hig-foundations/references/immersive-experiences.md +174 -0
- package/skills/ios/hig-foundations/references/inclusion.md +189 -0
- package/skills/ios/hig-foundations/references/layout.md +425 -0
- package/skills/ios/hig-foundations/references/materials.md +238 -0
- package/skills/ios/hig-foundations/references/motion.md +103 -0
- package/skills/ios/hig-foundations/references/privacy.md +231 -0
- package/skills/ios/hig-foundations/references/right-to-left.md +206 -0
- package/skills/ios/hig-foundations/references/sf-symbols.md +310 -0
- package/skills/ios/hig-foundations/references/spatial-layout.md +142 -0
- package/skills/ios/hig-foundations/references/typography.md +1146 -0
- package/skills/ios/hig-foundations/references/writing.md +91 -0
- package/skills/ios/hig-inputs/SKILL.md +94 -0
- package/skills/ios/hig-inputs/references/apple-pencil-and-scribble.md +148 -0
- package/skills/ios/hig-inputs/references/camera-control.md +107 -0
- package/skills/ios/hig-inputs/references/digital-crown.md +83 -0
- package/skills/ios/hig-inputs/references/eyes.md +120 -0
- package/skills/ios/hig-inputs/references/focus-and-selection.md +120 -0
- package/skills/ios/hig-inputs/references/game-controls.md +156 -0
- package/skills/ios/hig-inputs/references/gestures.md +208 -0
- package/skills/ios/hig-inputs/references/gyro-and-accelerometer.md +40 -0
- package/skills/ios/hig-inputs/references/keyboards.md +234 -0
- package/skills/ios/hig-inputs/references/nearby-interactions.md +70 -0
- package/skills/ios/hig-inputs/references/pointing-devices.md +237 -0
- package/skills/ios/hig-inputs/references/remotes.md +67 -0
- package/skills/ios/hig-inputs/references/spatial-interactions.md +70 -0
- package/skills/ios/hig-patterns/SKILL.md +104 -0
- package/skills/ios/hig-patterns/references/charting-data.md +81 -0
- package/skills/ios/hig-patterns/references/collaboration-and-sharing.md +86 -0
- package/skills/ios/hig-patterns/references/drag-and-drop.md +134 -0
- package/skills/ios/hig-patterns/references/entering-data.md +69 -0
- package/skills/ios/hig-patterns/references/feedback.md +67 -0
- package/skills/ios/hig-patterns/references/file-management.md +135 -0
- package/skills/ios/hig-patterns/references/going-full-screen.md +79 -0
- package/skills/ios/hig-patterns/references/launching.md +81 -0
- package/skills/ios/hig-patterns/references/live-viewing-apps.md +79 -0
- package/skills/ios/hig-patterns/references/loading.md +59 -0
- package/skills/ios/hig-patterns/references/managing-accounts.md +107 -0
- package/skills/ios/hig-patterns/references/managing-notifications.md +99 -0
- package/skills/ios/hig-patterns/references/modality.md +82 -0
- package/skills/ios/hig-patterns/references/multitasking.md +131 -0
- package/skills/ios/hig-patterns/references/offering-help.md +117 -0
- package/skills/ios/hig-patterns/references/onboarding.md +69 -0
- package/skills/ios/hig-patterns/references/playing-audio.md +124 -0
- package/skills/ios/hig-patterns/references/playing-haptics.md +280 -0
- package/skills/ios/hig-patterns/references/playing-video.md +180 -0
- package/skills/ios/hig-patterns/references/printing.md +50 -0
- package/skills/ios/hig-patterns/references/ratings-and-reviews.md +48 -0
- package/skills/ios/hig-patterns/references/searching.md +70 -0
- package/skills/ios/hig-patterns/references/settings.md +84 -0
- package/skills/ios/hig-patterns/references/undo-and-redo.md +58 -0
- package/skills/ios/hig-patterns/references/workouts.md +76 -0
- package/skills/ios/hig-platforms/SKILL.md +84 -0
- package/skills/ios/hig-platforms/references/designing-for-games.md +159 -0
- package/skills/ios/hig-platforms/references/designing-for-ios.md +66 -0
- package/skills/ios/hig-platforms/references/designing-for-ipados.md +64 -0
- package/skills/ios/hig-platforms/references/designing-for-macos.md +70 -0
- package/skills/ios/hig-platforms/references/designing-for-tvos.md +68 -0
- package/skills/ios/hig-platforms/references/designing-for-visionos.md +85 -0
- package/skills/ios/hig-platforms/references/designing-for-watchos.md +74 -0
- package/skills/ios/hig-project-context/SKILL.md +133 -0
- package/skills/ios/hig-technologies/SKILL.md +107 -0
- package/skills/ios/hig-technologies/references/airplay.md +125 -0
- package/skills/ios/hig-technologies/references/always-on.md +62 -0
- package/skills/ios/hig-technologies/references/apple-pay.md +441 -0
- package/skills/ios/hig-technologies/references/augmented-reality.md +247 -0
- package/skills/ios/hig-technologies/references/carekit.md +224 -0
- package/skills/ios/hig-technologies/references/carplay.md +119 -0
- package/skills/ios/hig-technologies/references/game-center.md +343 -0
- package/skills/ios/hig-technologies/references/generative-ai.md +110 -0
- package/skills/ios/hig-technologies/references/healthkit.md +120 -0
- package/skills/ios/hig-technologies/references/homekit.md +343 -0
- package/skills/ios/hig-technologies/references/icloud.md +52 -0
- package/skills/ios/hig-technologies/references/id-verifier.md +73 -0
- package/skills/ios/hig-technologies/references/imessage-apps-and-stickers.md +105 -0
- package/skills/ios/hig-technologies/references/in-app-purchase.md +263 -0
- package/skills/ios/hig-technologies/references/live-photos.md +54 -0
- package/skills/ios/hig-technologies/references/mac-catalyst.md +216 -0
- package/skills/ios/hig-technologies/references/machine-learning.md +394 -0
- package/skills/ios/hig-technologies/references/maps.md +221 -0
- package/skills/ios/hig-technologies/references/nfc.md +51 -0
- package/skills/ios/hig-technologies/references/photo-editing.md +40 -0
- package/skills/ios/hig-technologies/references/researchkit.md +134 -0
- package/skills/ios/hig-technologies/references/shareplay.md +142 -0
- package/skills/ios/hig-technologies/references/shazamkit.md +47 -0
- package/skills/ios/hig-technologies/references/sign-in-with-apple.md +288 -0
- package/skills/ios/hig-technologies/references/siri.md +523 -0
- package/skills/ios/hig-technologies/references/tap-to-pay-on-iphone.md +208 -0
- package/skills/ios/hig-technologies/references/voiceover.md +90 -0
- package/skills/ios/hig-technologies/references/wallet.md +420 -0
- package/skills/ios/ios-bootstrap/SKILL.md +17 -8
- package/skills/ios/swift-actor-persistence/SKILL.md +143 -0
- package/skills/ios/swift-concurrency-6-2/SKILL.md +216 -0
- package/skills/ios/swift-protocol-di-testing/SKILL.md +190 -0
- package/skills/ios/swiftui-design-tokens/SKILL.md +475 -0
- package/skills/ios/writing-for-interfaces/SKILL.md +75 -0
- package/skills/web/accessibility/SKILL.md +146 -0
- package/skills/web/aceternity-ui/SKILL.md +719 -0
- package/skills/web/aceternity-ui/metadata.json +10 -0
- package/skills/web/api-design/SKILL.md +523 -0
- package/skills/web/chart-accessibility/SKILL.md +332 -0
- package/skills/web/composition-patterns/AGENTS.md +946 -0
- package/skills/web/composition-patterns/README.md +60 -0
- package/skills/web/composition-patterns/SKILL.md +89 -0
- package/skills/web/composition-patterns/metadata.json +11 -0
- package/skills/web/composition-patterns/rules/_sections.md +29 -0
- package/skills/web/composition-patterns/rules/_template.md +24 -0
- package/skills/web/composition-patterns/rules/architecture-avoid-boolean-props.md +100 -0
- package/skills/web/composition-patterns/rules/architecture-compound-components.md +112 -0
- package/skills/web/composition-patterns/rules/patterns-children-over-render-props.md +87 -0
- package/skills/web/composition-patterns/rules/patterns-explicit-variants.md +100 -0
- package/skills/web/composition-patterns/rules/react19-no-forwardref.md +42 -0
- package/skills/web/composition-patterns/rules/state-context-interface.md +191 -0
- package/skills/web/composition-patterns/rules/state-decouple-implementation.md +113 -0
- package/skills/web/composition-patterns/rules/state-lift-state.md +125 -0
- package/skills/web/cost-aware-llm-pipeline/SKILL.md +183 -0
- package/skills/web/database-migrations/SKILL.md +429 -0
- package/skills/web/deployment-patterns/SKILL.md +427 -0
- package/skills/web/docker-patterns/SKILL.md +364 -0
- package/skills/web/e2e-testing/SKILL.md +326 -0
- package/skills/web/lighthouse-ci/SKILL.md +361 -0
- package/skills/web/mcp-server-patterns/SKILL.md +69 -0
- package/skills/web/next-best-practices/SKILL.md +153 -0
- package/skills/web/next-best-practices/async-patterns.md +87 -0
- package/skills/web/next-best-practices/bundling.md +180 -0
- package/skills/web/next-best-practices/data-patterns.md +297 -0
- package/skills/web/next-best-practices/debug-tricks.md +105 -0
- package/skills/web/next-best-practices/directives.md +73 -0
- package/skills/web/next-best-practices/error-handling.md +227 -0
- package/skills/web/next-best-practices/file-conventions.md +140 -0
- package/skills/web/next-best-practices/font.md +245 -0
- package/skills/web/next-best-practices/functions.md +108 -0
- package/skills/web/next-best-practices/hydration-error.md +91 -0
- package/skills/web/next-best-practices/image.md +173 -0
- package/skills/web/next-best-practices/metadata.md +301 -0
- package/skills/web/next-best-practices/parallel-routes.md +287 -0
- package/skills/web/next-best-practices/route-handlers.md +146 -0
- package/skills/web/next-best-practices/rsc-boundaries.md +159 -0
- package/skills/web/next-best-practices/runtime-selection.md +39 -0
- package/skills/web/next-best-practices/scripts.md +141 -0
- package/skills/web/next-best-practices/self-hosting.md +371 -0
- package/skills/web/next-best-practices/suspense-boundaries.md +67 -0
- package/skills/web/next-cache-components/SKILL.md +411 -0
- package/skills/web/postgres-best-practices/SKILL.md +14 -0
- package/skills/web/postgres-best-practices/references/schema-design.md +9 -0
- package/skills/web/react-best-practices/AGENTS.md +3810 -0
- package/skills/web/react-best-practices/README.md +123 -0
- package/skills/web/react-best-practices/SKILL.md +149 -0
- package/skills/web/react-best-practices/metadata.json +15 -0
- package/skills/web/react-best-practices/rules/_sections.md +46 -0
- package/skills/web/react-best-practices/rules/_template.md +28 -0
- package/skills/web/react-best-practices/rules/advanced-effect-event-deps.md +56 -0
- package/skills/web/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/skills/web/react-best-practices/rules/advanced-init-once.md +42 -0
- package/skills/web/react-best-practices/rules/advanced-use-latest.md +39 -0
- package/skills/web/react-best-practices/rules/async-api-routes.md +38 -0
- package/skills/web/react-best-practices/rules/async-cheap-condition-before-await.md +37 -0
- package/skills/web/react-best-practices/rules/async-defer-await.md +82 -0
- package/skills/web/react-best-practices/rules/async-dependencies.md +51 -0
- package/skills/web/react-best-practices/rules/async-parallel.md +28 -0
- package/skills/web/react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/skills/web/react-best-practices/rules/bundle-analyzable-paths.md +63 -0
- package/skills/web/react-best-practices/rules/bundle-barrel-imports.md +60 -0
- package/skills/web/react-best-practices/rules/bundle-conditional.md +31 -0
- package/skills/web/react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/skills/web/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/skills/web/react-best-practices/rules/bundle-preload.md +50 -0
- package/skills/web/react-best-practices/rules/client-event-listeners.md +74 -0
- package/skills/web/react-best-practices/rules/client-localstorage-schema.md +71 -0
- package/skills/web/react-best-practices/rules/client-passive-event-listeners.md +48 -0
- package/skills/web/react-best-practices/rules/client-swr-dedup.md +56 -0
- package/skills/web/react-best-practices/rules/js-batch-dom-css.md +107 -0
- package/skills/web/react-best-practices/rules/js-cache-function-results.md +80 -0
- package/skills/web/react-best-practices/rules/js-cache-property-access.md +28 -0
- package/skills/web/react-best-practices/rules/js-cache-storage.md +70 -0
- package/skills/web/react-best-practices/rules/js-combine-iterations.md +32 -0
- package/skills/web/react-best-practices/rules/js-early-exit.md +50 -0
- package/skills/web/react-best-practices/rules/js-flatmap-filter.md +60 -0
- package/skills/web/react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/skills/web/react-best-practices/rules/js-index-maps.md +37 -0
- package/skills/web/react-best-practices/rules/js-length-check-first.md +49 -0
- package/skills/web/react-best-practices/rules/js-min-max-loop.md +82 -0
- package/skills/web/react-best-practices/rules/js-request-idle-callback.md +105 -0
- package/skills/web/react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/skills/web/react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/skills/web/react-best-practices/rules/rendering-activity.md +26 -0
- package/skills/web/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/skills/web/react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/skills/web/react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/skills/web/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/skills/web/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/skills/web/react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
- package/skills/web/react-best-practices/rules/rendering-resource-hints.md +85 -0
- package/skills/web/react-best-practices/rules/rendering-script-defer-async.md +68 -0
- package/skills/web/react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/skills/web/react-best-practices/rules/rendering-usetransition-loading.md +75 -0
- package/skills/web/react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/skills/web/react-best-practices/rules/rerender-dependencies.md +45 -0
- package/skills/web/react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
- package/skills/web/react-best-practices/rules/rerender-derived-state.md +29 -0
- package/skills/web/react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/skills/web/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/skills/web/react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
- package/skills/web/react-best-practices/rules/rerender-memo.md +44 -0
- package/skills/web/react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
- package/skills/web/react-best-practices/rules/rerender-no-inline-components.md +82 -0
- package/skills/web/react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
- package/skills/web/react-best-practices/rules/rerender-split-combined-hooks.md +64 -0
- package/skills/web/react-best-practices/rules/rerender-transitions.md +40 -0
- package/skills/web/react-best-practices/rules/rerender-use-deferred-value.md +59 -0
- package/skills/web/react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
- package/skills/web/react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/skills/web/react-best-practices/rules/server-auth-actions.md +96 -0
- package/skills/web/react-best-practices/rules/server-cache-lru.md +41 -0
- package/skills/web/react-best-practices/rules/server-cache-react.md +76 -0
- package/skills/web/react-best-practices/rules/server-dedup-props.md +65 -0
- package/skills/web/react-best-practices/rules/server-hoist-static-io.md +149 -0
- package/skills/web/react-best-practices/rules/server-no-shared-module-state.md +50 -0
- package/skills/web/react-best-practices/rules/server-parallel-fetching.md +83 -0
- package/skills/web/react-best-practices/rules/server-parallel-nested-fetching.md +34 -0
- package/skills/web/react-best-practices/rules/server-serialization.md +38 -0
- package/skills/web/seo/SKILL.md +154 -0
- package/skills/web/web-design-guidelines/SKILL.md +39 -0
- package/skills/web/zap-scan-config/SKILL.md +444 -0
- package/skills/web/zap-scan-config/assets/.gitkeep +9 -0
- package/skills/web/zap-scan-config/assets/github_action.yml +207 -0
- package/skills/web/zap-scan-config/assets/gitlab_ci.yml +226 -0
- package/skills/web/zap-scan-config/assets/zap_automation.yaml +196 -0
- package/skills/web/zap-scan-config/assets/zap_context.xml +192 -0
- package/skills/web/zap-scan-config/references/EXAMPLE.md +40 -0
- package/skills/web/zap-scan-config/references/api_testing_guide.md +475 -0
- package/skills/web/zap-scan-config/references/authentication_guide.md +431 -0
- package/skills/web/zap-scan-config/references/false_positive_handling.md +427 -0
- package/skills/web/zap-scan-config/references/owasp_mapping.md +255 -0
- package/src/graph/ids.ts +86 -0
- package/src/graph/index.ts +32 -0
- package/src/graph/parser/architecture.ts +603 -0
- package/src/graph/parser/component-manifest.ts +268 -0
- package/src/graph/parser/decisions-jsonl.ts +407 -0
- package/src/graph/parser/design-md-pass2.ts +253 -0
- package/src/graph/parser/design-md.ts +477 -0
- package/src/graph/parser/page-spec.ts +496 -0
- package/src/graph/parser/product-spec.ts +930 -0
- package/src/graph/parser/screenshot.ts +342 -0
- package/src/graph/parser/sprint-tasks.ts +317 -0
- package/src/graph/storage/index.ts +1154 -0
- package/src/graph/types.ts +432 -0
- package/src/graph/util/dhash.ts +84 -0
- package/src/lrr/aggregator.ts +175 -0
- package/src/orchestrator/hooks/context-header.ts +119 -0
- package/src/orchestrator/hooks/token-accounting-emitter.ts +77 -0
- package/src/orchestrator/hooks/token-accounting.ts +112 -0
- package/src/orchestrator/mcp/cycle-counter.ts +130 -0
- package/src/orchestrator/mcp/scribe.ts +294 -0
- package/src/orchestrator/mcp/state-save.ts +149 -0
- package/src/orchestrator/mcp/write-lease.ts +184 -0
- package/src/orchestrator/phase4-shared-context.ts +57 -0
- package/src/orchestrator/schemas/backward-edge.ts +46 -0
- package/agents/agentic-identity-trust.md +0 -121
- package/agents/data-consolidation-agent.md +0 -39
- package/agents/design-image-prompt-engineer.md +0 -105
- package/agents/design-visual-storyteller.md +0 -147
- package/agents/design-whimsy-injector.md +0 -89
- package/agents/engineering-autonomous-optimization-architect.md +0 -105
- package/agents/market-intel.md +0 -35
- package/agents/marketing-instagram-curator.md +0 -111
- package/agents/marketing-reddit-community-builder.md +0 -121
- package/agents/marketing-social-media-strategist.md +0 -74
- package/agents/marketing-tiktok-strategist.md +0 -123
- package/agents/marketing-twitter-engager.md +0 -124
- package/agents/marketing-wechat-official-account.md +0 -143
- package/agents/marketing-xiaohongshu-specialist.md +0 -136
- package/agents/marketing-zhihu-strategist.md +0 -160
- package/agents/product-behavioral-nudge-engine.md +0 -78
- package/agents/project-management-experiment-tracker.md +0 -102
- package/agents/report-distribution-agent.md +0 -43
- package/agents/risk-analysis.md +0 -45
- package/agents/sales-data-extraction-agent.md +0 -46
- package/agents/specialized-cultural-intelligence-strategist.md +0 -65
- package/agents/specialized-developer-advocate.md +0 -146
- package/agents/support-analytics-reporter.md +0 -133
- package/agents/support-executive-summary-generator.md +0 -64
- package/agents/support-finance-tracker.md +0 -145
- package/agents/support-legal-compliance-checker.md +0 -129
- package/agents/support-support-responder.md +0 -91
- package/agents/testing-accessibility-auditor.md +0 -110
- package/agents/testing-test-results-analyzer.md +0 -97
- package/agents/testing-tool-evaluator.md +0 -76
- package/agents/testing-workflow-optimizer.md +0 -99
- package/agents/user-research.md +0 -40
- package/protocols/brainstorm.md +0 -99
- package/protocols/design.md +0 -269
- package/protocols/planning.md +0 -87
- package/skills/ios/ios-hig/SKILL.md +0 -41
- package/skills/ios/ios-hig/references/accessibility.md +0 -81
- package/skills/ios/ios-hig/references/content.md +0 -142
- package/skills/ios/ios-hig/references/feedback.md +0 -123
- package/skills/ios/ios-hig/references/interaction.md +0 -199
- package/skills/ios/ios-hig/references/performance-platform.md +0 -129
- package/skills/ios/ios-hig/references/privacy-permissions.md +0 -181
- package/skills/ios/ios-hig/references/visual-design.md +0 -84
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
# Launch Readiness Review Protocol
|
|
2
|
+
|
|
3
|
+
You are the orchestrator. You are about to run a Launch Readiness Review (LRR) — a multi-chapter, independent-verdict gate that sits between the Phase 6 Reality Check and Phase 7.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
LRR replaces the monolithic Reality Checker verdict with five independent chapter verdicts plus a mechanical aggregator.
|
|
8
|
+
|
|
9
|
+
## Chapters
|
|
10
|
+
|
|
11
|
+
LRR runs **five chapters**: Eng-Quality, Security, SRE, A11y, and Brand Guardian.
|
|
12
|
+
|
|
13
|
+
Future consideration: A Data Privacy/Compliance chapter (covering GDPR consent flows, data retention policies, PII handling, cookie consent, privacy manifest completeness for iOS) is not included in the current 5-chapter panel. For regulated industries (healthcare, finance, education), the orchestrator SHOULD add a 6th chapter by dispatching `security-reviewer` with a privacy-focused prompt. This is advisory, not a HARD-GATE.
|
|
14
|
+
|
|
15
|
+
Requirements coverage is evaluated as a sub-input of the Eng-Quality chapter. There is no separate PM chapter, no `pm.json` file, and the LRR Aggregator runs exactly once. The Eng-Quality chapter agent reads the Design Doc + `sprint-tasks.md` scope directly alongside its other evidence and emits COVERED/PARTIAL/MISSING per feature inline on its own verdict (see the `requirements_coverage` field in the schema below). There is no separate Step 7.0 dispatch and no Aggregator re-run.
|
|
16
|
+
|
|
17
|
+
### Primary evidence inputs
|
|
18
|
+
|
|
19
|
+
| Chapter | Primary evidence inputs |
|
|
20
|
+
|---|---|
|
|
21
|
+
| Eng-Quality | `architecture.md`, `task-outputs/`, `verify.md` check outputs, test results, eval results, Design Doc + `sprint-tasks.md` scope (read directly for the Requirements Coverage sub-input) |
|
|
22
|
+
| Security | `evidence/fake-data-audit.md`, Phase 5 security audit output, eval-harness security cases |
|
|
23
|
+
| SRE | Phase 5 performance-audit outputs, Performance Benchmarker evidence, NFRs from `sprint-tasks.md`, reliability checks |
|
|
24
|
+
| A11y | Phase 5 a11y audit output, Phase 3.7 `a11y-design-review.md`, WCAG 2.2 AA runtime findings, per-page accessibility findings |
|
|
25
|
+
| Brand Guardian | `DESIGN.md` (full file — Overview/Brand DNA/Do's and Don'ts + YAML tokens), `docs/plans/design-references.md`, Playwright screenshots under `docs/plans/evidence/` matching product pages |
|
|
26
|
+
|
|
27
|
+
## Chapter verdict schema
|
|
28
|
+
|
|
29
|
+
Each chapter agent runs fresh-context, reads its own slice of the evidence manifest, and writes a verdict file with this shape:
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"chapter": "eng-quality | security | sre | a11y | brand-guardian",
|
|
34
|
+
"verdict": "PASS | CONCERNS | BLOCK",
|
|
35
|
+
"override_blocks_launch": false,
|
|
36
|
+
"evidence_files_read": ["docs/plans/evidence/..."],
|
|
37
|
+
"findings": [
|
|
38
|
+
{"severity": "block|concern|info", "description": "...", "evidence_ref": "path", "related_decision_id": "D-2-03"}
|
|
39
|
+
],
|
|
40
|
+
"follow_up_spawned": false,
|
|
41
|
+
"follow_up_findings": null
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The **Eng-Quality** chapter additionally carries the Requirements Coverage sub-input inline on its verdict:
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"requirements_coverage": [
|
|
50
|
+
{"feature": "string", "status": "COVERED | PARTIAL | MISSING", "note": "optional string"}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
This field carries the PM coverage signal directly on the Eng-Quality verdict — there is no separate `pm.json` file and no separate PM dispatch. The Eng-Quality chapter agent reads the Design Doc + `sprint-tasks.md` scope as part of its own evidence sweep and emits the coverage list alongside its code-quality judgment.
|
|
56
|
+
|
|
57
|
+
<HARD-GATE>
|
|
58
|
+
SCHEMA CONTRACT:
|
|
59
|
+
|
|
60
|
+
- `verdict` MUST be one of `PASS | CONCERNS | BLOCK`. `CONCERNS` means "I have concerns but won't block" and is aggregated as NEEDS WORK. `BLOCK` means "this fails my chapter's criteria" and is aggregated as NEEDS WORK unless `override_blocks_launch: true`.
|
|
61
|
+
- `override_blocks_launch: true` is a veto-of-vetoes — no other chapter's PASS can override it. Only legal when `verdict == BLOCK`.
|
|
62
|
+
- `evidence_files_read` MUST be non-empty. A verdict file with empty `evidence_files_read` is treated as malformed. "Looks good to me" verdicts are not permitted.
|
|
63
|
+
- `follow_up_spawned` is only legal for the **Security** and **SRE** chapters. Brand Guardian and A11y chapters CANNOT spawn follow-ups — they render their verdict on what they can read and write it directly.
|
|
64
|
+
</HARD-GATE>
|
|
65
|
+
|
|
66
|
+
## A11y chapter rules
|
|
67
|
+
|
|
68
|
+
The A11y chapter gates on WCAG 2.2 AA runtime findings from the Phase 5 accessibility audit and the Phase 3.7 a11y design review.
|
|
69
|
+
|
|
70
|
+
- **PASS** if: zero Critical findings AND zero Serious findings AND zero failed WCAG 2.2 AA success criteria (runtime-measurable ones).
|
|
71
|
+
- **CONCERNS** if: zero Critical AND 1-3 Serious findings (reviewable but not blocking).
|
|
72
|
+
- **BLOCK** if: any Critical finding OR >3 Serious findings OR any failed WCAG 2.2 AA success criterion.
|
|
73
|
+
|
|
74
|
+
Runtime measurement is required — spec-only compliance is not sufficient. Evidence must come from a Playwright + axe-core sweep (or equivalent) run against the actual built product pages, not the design system route alone.
|
|
75
|
+
|
|
76
|
+
## Brand Guardian chapter rules
|
|
77
|
+
|
|
78
|
+
The Brand Guardian chapter gates on **DNA drift** — did the built product stay true to the 6-axis Visual DNA locked at Phase 3.0?
|
|
79
|
+
|
|
80
|
+
Prepend this anti-sycophancy preamble **verbatim** to the chapter dispatch prompt (stolen from ECC `gan-evaluator`):
|
|
81
|
+
|
|
82
|
+
> "Your natural tendency is to be encouraging. Fight it. Default verdict: NEEDS WORK. You are not here to validate — you are here to find the gap."
|
|
83
|
+
|
|
84
|
+
The chapter agent reads: `DESIGN.md` (the locked 7-axis DNA card lives at `## Overview > ### Brand DNA`; YAML tokens are what Phase 4 was supposed to honor; `## Do's and Don'ts` are the explicit guardrails), `docs/plans/design-references.md`, and Playwright screenshots under `docs/plans/evidence/` matching **product pages** (not just `/design-system`).
|
|
85
|
+
|
|
86
|
+
Scoring — 6 DNA axes (20 pts each = 120) + 5 craft dimensions (20 pts each = 100) = **220 total**, target **≥ 180**.
|
|
87
|
+
|
|
88
|
+
- **PASS** if: DNA score ≥ 180 AND craft score ≥ 75 AND no single axis scoring < 12/20.
|
|
89
|
+
- **CONCERNS** if: DNA score 150-179 OR any single axis scoring 10-12/20.
|
|
90
|
+
- **BLOCK** if: DNA score < 150 OR any axis scoring < 10/20.
|
|
91
|
+
|
|
92
|
+
Every finding must cite a specific element with a `file:line` reference and reference either the DNA card or a `design-references.md` path. Vague findings ("the hero needs work") are not admissible — they are rejected by the Aggregator's schema check and the verdict defaults to CONCERNS. Brand Guardian is forbidden from rubber-stamping.
|
|
93
|
+
|
|
94
|
+
## Follow-up investigation flow (Security and SRE only)
|
|
95
|
+
|
|
96
|
+
Security and SRE — and only these chapters — may spawn one read-only follow-up investigation per LRR round. Eng-Quality, A11y, and Brand Guardian render their verdict on what they can read and rely on the existing NEEDS_WORK loop when concerns arise.
|
|
97
|
+
|
|
98
|
+
The trigger is now tightened: follow-ups fire **only on a BLOCK verdict**. The previous "or suspicious, need to verify" escape hatch is gone — suspicion without a BLOCK is recorded as a CONCERNS verdict, not as a follow-up spawn.
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
Security/SRE chapter agent runs → reads evidence manifest + 2-3 targeted files
|
|
102
|
+
|
|
|
103
|
+
If verdict = PASS or CONCERNS → write lrr/{chapter}.json, done (1 dispatch)
|
|
104
|
+
|
|
|
105
|
+
If verdict = BLOCK → CAN spawn ONE follow-up (no longer legal on "suspicion")
|
|
106
|
+
|
|
|
107
|
+
Follow-up agent spawned with:
|
|
108
|
+
- Mode: read-only (no Write, no Edit, no Bash write ops)
|
|
109
|
+
- Allowed tools: Read, Grep, Glob
|
|
110
|
+
- Max tool calls: 15 (enforced via prompt + self-report)
|
|
111
|
+
- Scope: single named concern from parent chapter's findings
|
|
112
|
+
- Returns typed JSON (see below)
|
|
113
|
+
|
|
|
114
|
+
Parent chapter reads follow-up output + its own earlier findings,
|
|
115
|
+
validates follow-up schema, writes FINAL lrr/{chapter}.json with
|
|
116
|
+
follow_up_findings populated.
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Follow-up return schema
|
|
120
|
+
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"confirmed": true,
|
|
124
|
+
"evidence": ["path1", "path2"],
|
|
125
|
+
"findings": [
|
|
126
|
+
{"severity": "block|concern|info", "description": "...", "evidence_ref": "path"}
|
|
127
|
+
],
|
|
128
|
+
"tool_calls_used": 12
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
<HARD-GATE>
|
|
133
|
+
HARD CAPS ON FOLLOW-UPS:
|
|
134
|
+
|
|
135
|
+
- **Max 1 follow-up per chapter per LRR round.** No follow-ups spawning follow-ups — investigation chains are banned because that is where dispatch counts actually explode.
|
|
136
|
+
- **Read-only.** Allowed tools: Read, Grep, Glob. No Write, no Edit, no Bash write ops. If the follow-up finds a real fix, it documents it — the fix is executed in a separate Phase 6 NEEDS_WORK cycle, never inline.
|
|
137
|
+
- **15 tool call cap, self-reported via `tool_calls_used`.** Parent chapter validates `tool_calls_used <= 15` before accepting the follow-up output.
|
|
138
|
+
- **Only Security and SRE have the power.** Eng-Quality, A11y, and Brand Guardian chapters with concerns write a CONCERNS verdict; they do not spawn follow-ups.
|
|
139
|
+
- **BLOCK-only trigger.** A follow-up can only be spawned when the parent chapter's verdict is BLOCK. Concerns without a BLOCK are logged as CONCERNS; they do not justify a second dispatch.
|
|
140
|
+
</HARD-GATE>
|
|
141
|
+
|
|
142
|
+
SDK enforcement (Stage 5+): When dispatched via `claude-agent-sdk`, follow-up investigations MUST use `allowedTools: ["Read", "Grep", "Glob", "Bash(read-only)"]` to enforce read-only at the SDK level. The prompt-level instruction ("Read/Grep/Glob only") remains as defense-in-depth for non-SDK mode. The `maxTurns: 15` cap is enforced by the SDK harness, not self-reported.
|
|
143
|
+
|
|
144
|
+
## Fallback on malformed or timed-out follow-up
|
|
145
|
+
|
|
146
|
+
<HARD-GATE>
|
|
147
|
+
DEFAULT: HARD BLOCK WITH `override_blocks_launch: true`.
|
|
148
|
+
|
|
149
|
+
If a Security/SRE follow-up times out, returns invalid JSON, or reports `tool_calls_used > 15`, the parent chapter writes:
|
|
150
|
+
|
|
151
|
+
```json
|
|
152
|
+
{
|
|
153
|
+
"chapter": "security|sre",
|
|
154
|
+
"verdict": "BLOCK",
|
|
155
|
+
"reason": "follow_up_malformed",
|
|
156
|
+
"override_blocks_launch": true,
|
|
157
|
+
"detail": "Follow-up returned {timeout|invalid_json|cap_violation} — cannot verify security/reliability claim, blocking per pessimistic default"
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
A security or reliability check that cannot produce a typed result is itself a signal — pessimistic-block is the only safe default. You cannot ship a build whose security check is unverifiable.
|
|
162
|
+
</HARD-GATE>
|
|
163
|
+
|
|
164
|
+
## LRR Aggregator
|
|
165
|
+
|
|
166
|
+
The Reality Checker keeps its evidence-manifest sweep role but its verdict generation is replaced by LRR aggregation. The Aggregator now runs a **5-step flow**: file-completeness checkpoint → apply the 6 rules → BLOCK routing via the decision log → classification for NEEDS WORK findings → READY handoff.
|
|
167
|
+
|
|
168
|
+
### Step 1: File-completeness checkpoint (NEW barrier)
|
|
169
|
+
|
|
170
|
+
Before applying any aggregation rule, the Aggregator MUST Glob `docs/plans/evidence/lrr/*.json` and verify all 5 expected chapter files exist and parse as valid JSON:
|
|
171
|
+
|
|
172
|
+
- `eng-quality.json`
|
|
173
|
+
- `security.json`
|
|
174
|
+
- `sre.json`
|
|
175
|
+
- `a11y.json`
|
|
176
|
+
- `brand-guardian.json`
|
|
177
|
+
|
|
178
|
+
The Aggregator does **not** expect or read any `pm.json` file. Requirements coverage lives inline on the Eng-Quality verdict (`requirements_coverage` field) and is not a separate artifact.
|
|
179
|
+
|
|
180
|
+
If any of the 5 required files are missing, OR any file fails to parse as valid JSON, OR any file is missing required schema fields (`chapter`, `verdict`, non-empty `evidence_files_read`), the Aggregator:
|
|
181
|
+
|
|
182
|
+
1. Logs `LRR INCOMPLETE: missing [filename] / malformed [filename]` to `docs/plans/build-log.md`.
|
|
183
|
+
2. Writes `docs/plans/evidence/lrr-aggregate.json` with `combined_verdict = INCOMPLETE` and the list of missing/malformed files.
|
|
184
|
+
3. STOPS — does **NOT** proceed to the 6 aggregation rules.
|
|
185
|
+
|
|
186
|
+
This is the partial-glob race fix — the explicit roster check makes the race impossible: the Aggregator fails loudly instead of silently under-counting.
|
|
187
|
+
|
|
188
|
+
### Step 2: Apply the 6 aggregation rules
|
|
189
|
+
|
|
190
|
+
Once all 5 chapter files are present and parseable, the Aggregator applies these rules:
|
|
191
|
+
|
|
192
|
+
1. **ANY `override_blocks_launch: true`** → `combined_verdict = BLOCKED`, regardless of other verdicts. This is the veto-of-vetoes rule.
|
|
193
|
+
2. **ALL verdicts `PASS` AND zero follow-ups spawned** → `combined_verdict = PRODUCTION READY`.
|
|
194
|
+
3. **ANY verdict `BLOCK` with `override_blocks_launch: false`** → `combined_verdict = NEEDS WORK`, with that chapter's findings routed into the existing fix-and-retest loop.
|
|
195
|
+
4. **ANY verdict `CONCERNS`** → `combined_verdict = NEEDS WORK`, concerns logged to `build-log.md` for later triage.
|
|
196
|
+
5. **Follow-up spawned AND `follow_up.confirmed: true`** → treat the parent chapter's verdict as if it were `BLOCK` (since the follow-up confirmed the concern).
|
|
197
|
+
6. **Contradictions between chapters on typed fields** → `combined_verdict = BLOCKED` with the specific finding `cross-chapter contradiction: {field} differs between {chapter_a} and {chapter_b}`.
|
|
198
|
+
|
|
199
|
+
Rule 6 detects cross-chapter conflicts mechanically on typed fields only — no chapter reads another's draft, preserving fresh-context independence.
|
|
200
|
+
|
|
201
|
+
### Step 3: BLOCK routing via `decisions.jsonl` `decided_by` lookup
|
|
202
|
+
|
|
203
|
+
When the Aggregator determines `combined_verdict = BLOCKED` or `NEEDS WORK` via a BLOCK finding, it MUST NOT stop and wait. Instead:
|
|
204
|
+
|
|
205
|
+
1. For each BLOCK finding in the aggregated output, read the `related_decision_id` field on the finding.
|
|
206
|
+
2. Read `docs/plans/decisions.jsonl` and find the row with that `decision_id`.
|
|
207
|
+
3. Read the `decided_by` field — this is the phase that authored the original decision (e.g., `architect` or `design-brand-guardian`). Cross-reference with the `phase` field on the row to disambiguate between phases that share a `decided_by` value.
|
|
208
|
+
4. Route the finding BACKWARD to that phase as re-entry input. The build resumes at that phase with the BLOCK finding as a correction signal.
|
|
209
|
+
|
|
210
|
+
If no `related_decision_id` is present on the finding (legacy finding, or a non-decision-backed issue such as a runtime crash or a fresh test failure), fall back to the legacy routing: classify by severity and route to Phase 4 (code-level) or Phase 2 (structural) per Step 4 below.
|
|
211
|
+
|
|
212
|
+
This replaces "BLOCKED → return to failing step" with author-aware re-entry — a BLOCK on an auth model flaw routes to the Phase 2 architecture synthesizer who authored the decision, not the Phase 4 implementer.
|
|
213
|
+
|
|
214
|
+
### Step 4: Classification for NEEDS WORK findings
|
|
215
|
+
|
|
216
|
+
For any NEEDS WORK findings that did not carry a `related_decision_id` (and therefore fell through Step 3's `decided_by` lookup), the Aggregator applies the existing legacy classification:
|
|
217
|
+
|
|
218
|
+
- **code-level** findings (test failure, runtime error, lint/type error, per-file bug) → route to Phase 4 target task.
|
|
219
|
+
- **structural** findings (architectural mismatch, API contract violation, persistence model error, DNA drift at the component-library layer) → route to Phase 2 or Phase 3 per the finding's domain.
|
|
220
|
+
- **CONCERNS** entries (no BLOCK) → logged to `build-log.md` for triage, do not block launch on their own.
|
|
221
|
+
|
|
222
|
+
### Step 5: READY handoff
|
|
223
|
+
|
|
224
|
+
If Step 2 resolves to `combined_verdict = PRODUCTION READY`, the Aggregator writes `docs/plans/evidence/lrr-aggregate.json` with the combined verdict, per-chapter summaries, and forwards to Phase 7 (Launch). No backward routing is triggered — the build moves forward.
|
|
225
|
+
|
|
226
|
+
## File paths
|
|
227
|
+
|
|
228
|
+
- Chapter verdicts: `docs/plans/evidence/lrr/{eng-quality,security,sre,a11y,brand-guardian}.json`
|
|
229
|
+
- Aggregator output: `docs/plans/evidence/lrr-aggregate.json`
|
|
230
|
+
|
|
231
|
+
## Token budget
|
|
232
|
+
|
|
233
|
+
~12-17K tokens per LRR cycle, net of PM fold-in: five chapter dispatches at 2-3K each, plus the nested `pr-test-analyzer` sub-dispatch inside Eng-Quality at ~1.5-2K, plus one aggregator at 1-2K. The Aggregator runs exactly once per cycle.
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
## Design Notes (non-operational)
|
|
237
|
+
|
|
238
|
+
### Rationale: single-verdict failure mode
|
|
239
|
+
|
|
240
|
+
The current Reality Checker collapses code quality, security, reliability, accessibility, and product completeness into a single verdict from a single agent — the exact failure mode matrix organizations exist to prevent. Independence matters most for Security and SRE: production incidents from those chapters are asymmetric in consequence — a security finding that goes unchallenged is a breach; a reliability finding is an outage. That asymmetry justifies the extra dispatch power and the pessimistic-block fallback.
|
|
241
|
+
|
|
242
|
+
### Structural shifts from the prior 5-chapter panel
|
|
243
|
+
|
|
244
|
+
- **Eng and QA merged into Eng-Quality.** More than half of their evidence overlapped (tests, verify outputs, task-level quality signals), and two nearly-identical verdicts produced two-thirds the signal of one coherent view.
|
|
245
|
+
- **A11y is a new seat.** The WCAG gap was the biggest coverage hole in the prior panel — a mechanical contrast field on the old Design chapter is not a runtime accessibility check.
|
|
246
|
+
- **Brand Guardian replaces the Design mechanical check.** The prior Design chapter was a 15-line threshold on a Phase 3 metric score — theater, not judgment.
|
|
247
|
+
|
|
248
|
+
### Why each chapter cannot be folded
|
|
249
|
+
|
|
250
|
+
- **Eng-Quality:** Merged from the previous Eng+QA chapters because >50% of their evidence overlapped, which produced two near-identical verdicts instead of one stronger one.
|
|
251
|
+
- **Security:** Production breach risk is asymmetric, so an independent chapter runs fresh-context against security evidence with the power to veto launch outright.
|
|
252
|
+
- **SRE:** Now explicitly reads Performance Benchmarker evidence (previously unclear which chapter owned perf NFRs), plus reliability checks and NFR thresholds from `sprint-tasks.md`.
|
|
253
|
+
- **A11y:** The prior Design chapter had a mechanical contrast check and nothing runtime. A11y reads the Phase 5 runtime accessibility sweep and the Phase 3.7 design review, and gates on Critical/Serious finding counts.
|
|
254
|
+
- **Brand Guardian:** Reads the locked DNA card + rendered screenshots + visual design spec + design references, and judges drift from the DNA. Taste judgment, not checklist theater.
|
|
255
|
+
|
|
256
|
+
### Rule 6 — anchoring cost rationale
|
|
257
|
+
|
|
258
|
+
A naive matrix-org design would have Security read Eng-Quality's draft to catch disagreements — that reintroduces the exact anchoring bias that fresh-context-per-chapter is designed to prevent (Madaan et al. Self-Refine; Gou et al. CRITIC). Instead, the aggregator does the cross-chapter check mechanically on typed fields only. Typed fields are mechanically diffable; free-form findings prose is not — and the prose is where the anchoring bias would come from.
|
|
259
|
+
|
|
260
|
+
### Why under `evidence/`
|
|
261
|
+
|
|
262
|
+
The existing evidence manifest sweep picks up anything under `docs/plans/evidence/` for free, and these files ARE evidence — typed attestations from independent chapters. Putting them elsewhere would create a second manifest path the aggregator has to know about separately.
|
package/protocols/metric-loop.md
CHANGED
|
@@ -19,6 +19,8 @@ Metric: [what you're measuring, in one sentence]
|
|
|
19
19
|
How to measure: [what the measurement agent should do — run tests, audit code, check criteria, etc.]
|
|
20
20
|
Target: [score 0-100 at which you stop]
|
|
21
21
|
Max iterations: [hard cap, default 5]
|
|
22
|
+
Scoring Criteria Checklist: [extracted in Step 0.5 — see .build-state.json]
|
|
23
|
+
Extraction method: [mechanical | one-shot-dispatch | mixed]
|
|
22
24
|
```
|
|
23
25
|
|
|
24
26
|
Then create a score log table:
|
|
@@ -36,11 +38,53 @@ Sub-step: [5.1 Implement | 5.1b Cleanup | 5.2 Metric Loop | 5.3 Loop Exit | 5.4
|
|
|
36
38
|
```
|
|
37
39
|
This tells the orchestrator exactly where to resume after context compaction.
|
|
38
40
|
|
|
41
|
+
## Step 0.5: Extract Scoring Criteria
|
|
42
|
+
|
|
43
|
+
Before the first measurement, extract a **Scoring Criteria Checklist** from the stable reference docs. This checklist is the critic's scoring input for every iteration — it replaces raw doc injection.
|
|
44
|
+
|
|
45
|
+
### Why
|
|
46
|
+
|
|
47
|
+
Reference docs (DNA cards, design specs, architecture docs, acceptance criteria) do not change during the loop. Pre-injecting them into every critic prompt wastes ~20-30K tokens per iteration. The checklist extracts the exact scoring values once and passes ~1-2K tokens instead.
|
|
48
|
+
|
|
49
|
+
### Extraction mechanism (per doc type)
|
|
50
|
+
|
|
51
|
+
Use the cheapest mechanism that preserves fidelity:
|
|
52
|
+
|
|
53
|
+
| Source doc type | Structure | Extraction mechanism | Cost |
|
|
54
|
+
|-----------------|-----------|---------------------|------|
|
|
55
|
+
| Structured (named fields with explicit values) — e.g., `DESIGN.md` YAML front matter (`colors`, `typography`, `components`) and `## Overview > ### Brand DNA` axes, `sprint-tasks.md` Behavioral Test field | YAML/markdown with named axes, fields, or sections | **Mechanical** — orchestrator parses and copies the values directly. No LLM reasoning. | ~0 tokens |
|
|
56
|
+
| Semi-structured (values spread across prose sections) — e.g., `visual-design-spec.md`, Phase 5 audit findings | Long-form with explicit values in multiple sections | **One-shot extractor dispatch** — single agent call reads the full doc once and outputs the structured checklist. | ~20-25K one-time |
|
|
57
|
+
| Unstructured (visual references, screenshots, mood boards) — e.g., `design-references.md` | Screenshot URLs, visual comps | **Not extracted.** Referenced by path in the checklist. Iteration 1 MAY read on-demand; iteration 2+ MUST NOT unless diagnosis explicitly flags a visual-reference gap. | 0 tokens |
|
|
58
|
+
|
|
59
|
+
**Rule: if the source doc has named fields with explicit values, extraction is mechanical (no dispatch). If values are spread across prose sections, use a one-shot extractor dispatch. Never use orchestrator LLM reasoning for extraction — it burns the tokens you're trying to save.**
|
|
60
|
+
|
|
61
|
+
### Persist the checklist
|
|
62
|
+
|
|
63
|
+
Write the checklist to `.build-state.json` under `active_metric_loop.scoring_criteria_checklist`. Record the extraction method in `active_metric_loop.extraction_method` (one of: `mechanical`, `one-shot-dispatch`, `mixed`). The rendered `.build-state.md` view reflects it automatically.
|
|
64
|
+
|
|
65
|
+
### Checklist format
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
Scoring Criteria Checklist
|
|
69
|
+
Source docs: [list of source doc paths]
|
|
70
|
+
Extracted at: [timestamp]
|
|
71
|
+
Extraction method: [mechanical | one-shot-dispatch | mixed]
|
|
72
|
+
|
|
73
|
+
[Structured criteria with exact values, organized by scoring dimension]
|
|
74
|
+
|
|
75
|
+
Reference Anchors:
|
|
76
|
+
- [path] (iteration 1 MAY read; iteration 2+ MUST NOT unless diagnosis flags gap)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The format is flexible — adapt it to the phase and artifact. The protocol gives a template, not a rigid schema. What matters: exact values, not summaries; organized by scoring dimension; reference anchors for unstructured docs.
|
|
80
|
+
|
|
39
81
|
## Step 1: MEASURE
|
|
40
82
|
|
|
41
83
|
Call the Agent tool — description: "Measure [metric]" — prompt:
|
|
42
84
|
|
|
43
|
-
"[How to measure, from your metric definition]. Score the current state 0-100. Return your response with a clear SCORE: [number] line, a list of FINDINGS, and the single TOP ISSUE most likely to improve the score if fixed."
|
|
85
|
+
"SCORING CRITERIA CHECKLIST: [paste the checklist from Step 0.5 — NOT the raw reference docs]. [How to measure, from your metric definition]. Score the current state 0-100 against the checklist criteria. Return your response with a clear SCORE: [number] line, a list of FINDINGS, and the single TOP ISSUE most likely to improve the score if fixed."
|
|
86
|
+
|
|
87
|
+
> **Pass the Scoring Criteria Checklist (from Step 0.5) to the measurement agent. Do NOT paste full reference docs into the prompt. The agent retains Read access for on-demand lookups if the checklist doesn't cover a specific detail, but the prompt must not pre-inject stable docs.**
|
|
44
88
|
|
|
45
89
|
Read the agent's response. You need: the SCORE, the TOP ISSUE, and the file paths for diagnosis in Step 3. Record the score to `docs/plans/.build-state.md`. The full findings list is useful for diagnosis but does NOT need to persist in your context across iterations — once you've picked the top issue, the details of lower-priority findings can go. Append a row to the score log in `docs/plans/.build-state.md`:
|
|
46
90
|
|
|
@@ -52,12 +96,19 @@ Read the agent's response. You need: the SCORE, the TOP ISSUE, and the file path
|
|
|
52
96
|
Stop the loop if ANY of these:
|
|
53
97
|
|
|
54
98
|
- **Score >= target** → done. Log "Target met at iteration [N]."
|
|
99
|
+
- **Iter-1 short-circuit: score >= target + 10 on the first measurement** → done. Log "Short-circuit at iteration 1. Score: [N]." and record `exit_reason: "short_circuit_iter1"` in the loop state.
|
|
55
100
|
- **Iteration >= max** → done. Log "Max iterations reached. Final score: [N]."
|
|
56
101
|
- **Stall: last 2 scores show no improvement** (delta <= 0 twice in a row) → done. Log "Stalled at score [N]."
|
|
57
102
|
|
|
103
|
+
### Early exit — iter-1 short-circuit
|
|
104
|
+
If the first measurement (iter-1) scores >= `target + 10`, exit the loop immediately and commit the iter-1 output. Log `exit_reason: "short_circuit_iter1"` in the loop state. The 10-point margin guards against measurement noise at the boundary; a genuinely excellent first pass does not need rework.
|
|
105
|
+
|
|
58
106
|
On stall or max iterations:
|
|
59
107
|
- **Interactive mode:** present score history + top remaining issue to user. Ask for direction.
|
|
60
|
-
- **Autonomous mode:**
|
|
108
|
+
- **Autonomous mode:**
|
|
109
|
+
- If score >= target: done (this branch is already handled in Step 2's exit conditions; included here for completeness).
|
|
110
|
+
- If score >= 60% of target AND no CRITICAL issues remain in the measurement: accept with WARNING. Log to `docs/plans/build-log.md` with the warning text and the score history. The orchestrator may proceed to the next phase, but the warning MUST be surfaced in the Phase 7 Completion Report's "Verification Gap" section.
|
|
111
|
+
- If score < 60% of target OR any CRITICAL issue remains: HALT. Do NOT skip. Log "METRIC LOOP: BLOCKED" to `docs/plans/.build-state.md` with the score history and the unresolved issues. Either (a) re-dispatch the fix agent with the unresolved issues, OR (b) abort the build with a directive to the user. The orchestrator may NOT silently proceed past a metric loop that did not converge.
|
|
61
112
|
|
|
62
113
|
If not exiting, continue to Step 3.
|
|
63
114
|
|
|
@@ -73,6 +124,11 @@ Call the Agent tool — description: "Fix [top issue]" — mode: "bypassPermissi
|
|
|
73
124
|
|
|
74
125
|
> **Do NOT pass the measurement agent's full findings to this agent. Only pass the single diagnosed issue and relevant file paths.**
|
|
75
126
|
|
|
127
|
+
### Iteration-aware context rule
|
|
128
|
+
|
|
129
|
+
- **Iteration 1 generator** receives the full phase context header + task description (the generator needs full context for its first pass).
|
|
130
|
+
- **Iteration 2+ generator** receives ONLY: (a) the single top issue from diagnosis, (b) the relevant file paths, (c) the specific criteria values from the Scoring Criteria Checklist that relate to the top issue. The full `[CONTEXT header above]` preamble is NOT re-injected. The generator already has the codebase from iteration 1 — it only needs the delta.
|
|
131
|
+
|
|
76
132
|
## Step 5: LOOP
|
|
77
133
|
|
|
78
134
|
Return to Step 1. Re-measure the artifact after the fix.
|
|
@@ -91,3 +147,7 @@ AUTHOR-BIAS ELIMINATION: The measurement agent and the fix agent must NEVER shar
|
|
|
91
147
|
- Track ALL scores in `docs/plans/.build-state.md` so the history survives context compaction.
|
|
92
148
|
- If context was compacted mid-loop: read `docs/plans/.build-state.md`, find the Active Metric Loop section, resume from the last recorded iteration.
|
|
93
149
|
- CONTEXT HYGIENE: Measurement agents are analysis agents — read their full output for diagnosis. But once you've picked the top issue (Step 3) and dispatched the fix (Step 4), the detailed findings from THAT iteration are spent. Don't accumulate findings across iterations — each measurement is fresh.
|
|
150
|
+
<STABLE-CONTEXT-RULE>
|
|
151
|
+
STABLE CONTEXT RULE: Reference docs that do not change during the loop (design specs, DNA cards, architecture docs, acceptance criteria) MUST be extracted into the Scoring Criteria Checklist at Step 0.5 and passed as the checklist — never re-injected as raw content into iteration 2+ prompts. Fresh artifacts (screenshots, test results, rendered output) are fetched each iteration. This is the primary token-saving mechanism: ~1-2K checklist vs ~20-30K raw docs per iteration.
|
|
152
|
+
</STABLE-CONTEXT-RULE>
|
|
153
|
+
- CHECKLIST FALLBACK: If no Scoring Criteria Checklist is provided (Step 0.5 was skipped or caller did not pass one), the critic falls back to raw doc reads. The orchestrator MUST log a WARN to `docs/plans/build-log.md`: "Metric loop iteration [N]: no scoring criteria checklist provided, falling back to raw doc reads." Callers SHOULD always provide a checklist. New callers that omit it will trigger the WARN, making silent regressions visible.
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
# Page Spec Schema
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Step 3.3's UX architect (`design-ux-architect`) produces page specs alongside `ux-architecture.md` — flows and layouts are created together because they inform each other. One file per screen is emitted to `docs/plans/page-specs/{screen-name}.md`. Each file is the spatial blueprint for a single screen — ASCII wireframe + structured metadata — so Phase 4 implementers know exactly what to build without interpreting prose. This protocol defines the required sections, wireframe format, platform conventions, and validation rules.
|
|
6
|
+
|
|
7
|
+
## Inputs
|
|
8
|
+
|
|
9
|
+
The page spec writer reads these artifacts before producing any page spec:
|
|
10
|
+
|
|
11
|
+
- `docs/plans/product-spec.md` — feature states, data requirements, persona constraints, screen inventory (SOURCE OF TRUTH for what each screen does)
|
|
12
|
+
- `docs/plans/architecture.md` — frontend component hierarchy, routing, API contracts
|
|
13
|
+
- `DESIGN.md` `## Overview > ### Brand DNA` — 7-axis DNA card (Density axis drives layout decisions)
|
|
14
|
+
- `docs/plans/component-manifest.md` — library component picks per slot
|
|
15
|
+
- `docs/plans/design-references/` — competitor/inspiration screenshots for layout reference
|
|
16
|
+
|
|
17
|
+
NOTE: `visual-design-spec.md` does NOT exist yet when page specs are produced (it's created at Step 3.4, after Step 3.3). Page specs use the DNA Density axis for spatial decisions (Airy vs Dense) and the component manifest for component choices. Exact spacing values and typography ramp are applied by Phase 4 implementers when they build from the visual design spec.
|
|
18
|
+
|
|
19
|
+
## Questions Answered
|
|
20
|
+
|
|
21
|
+
Page specs close three questions from the Phase 0-3 question map:
|
|
22
|
+
|
|
23
|
+
- **Q50** — Screen layouts (spatial arrangement of every element)
|
|
24
|
+
- **Q51** — Content hierarchy (what's primary, secondary, tertiary per screen)
|
|
25
|
+
- **Q53** — Key copy per screen (headings, CTAs, empty states, errors)
|
|
26
|
+
|
|
27
|
+
## File Convention
|
|
28
|
+
|
|
29
|
+
- Path: `docs/plans/page-specs/{screen-name}.md` (kebab-case)
|
|
30
|
+
- Anchors: `page-specs/{screen-name}#wireframe`, `page-specs/{screen-name}#content-hierarchy`, `page-specs/{screen-name}#key-copy`, etc.
|
|
31
|
+
- One file per screen in the product-spec Screen Inventory. Multi-step flows (e.g., checkout) get one file per step.
|
|
32
|
+
|
|
33
|
+
## Required Sections
|
|
34
|
+
|
|
35
|
+
Every page spec MUST contain these sections, in this order.
|
|
36
|
+
|
|
37
|
+
### 1. Screen Overview
|
|
38
|
+
|
|
39
|
+
One line: what this screen is, which feature(s) it serves.
|
|
40
|
+
|
|
41
|
+
### 2. ASCII Wireframe
|
|
42
|
+
|
|
43
|
+
Spatial layout using box-drawing characters. Desktop wireframe required for all platforms. Mobile wireframe required for web projects. Section labels inside brackets map to Content Hierarchy entries.
|
|
44
|
+
|
|
45
|
+
### 3. Content Hierarchy
|
|
46
|
+
|
|
47
|
+
Ordered list (top → bottom, primary → tertiary) of every content section. Each entry: section name, data shown, component from manifest (or `custom`), data source (API endpoint or `local`/`computed`), visual weight (`primary`/`secondary`/`tertiary`).
|
|
48
|
+
|
|
49
|
+
### 4. Key Copy
|
|
50
|
+
|
|
51
|
+
Headings, CTAs, labels, empty state messages, error messages for this screen. Not every string — the ones that set the tone and guide implementation.
|
|
52
|
+
|
|
53
|
+
### 5. Responsive Behavior (web only)
|
|
54
|
+
|
|
55
|
+
What changes at each breakpoint: desktop (1024px+), tablet (768px), mobile (375px). What reflows, collapses, or hides.
|
|
56
|
+
|
|
57
|
+
### 6. Platform Conventions
|
|
58
|
+
|
|
59
|
+
Which platform patterns this screen follows. iOS: navigation stack, tab bar, sheets. Web: sidebar state, breadcrumbs, header nav. Reference the relevant HIG pattern or web convention.
|
|
60
|
+
|
|
61
|
+
### 7. Data Loading
|
|
62
|
+
|
|
63
|
+
What's fetched on mount, loading skeleton description, refresh strategy (pull-to-refresh, auto-refresh, manual).
|
|
64
|
+
|
|
65
|
+
### 8. States
|
|
66
|
+
|
|
67
|
+
Reference to product-spec feature states, plus screen-specific visual states: skeleton loading, partial data, stale indicator, empty, error.
|
|
68
|
+
|
|
69
|
+
## ASCII Wireframe Format
|
|
70
|
+
|
|
71
|
+
**Characters:** `┌ ┐ └ ┘ ─ │ ├ ┤ ┬ ┴ ┼`
|
|
72
|
+
|
|
73
|
+
**Rules:**
|
|
74
|
+
- Label every section inside brackets: `[Header]`, `[Sidebar]`, `[KPI Cards]`
|
|
75
|
+
- Show relative sizing — sidebar narrower than main content
|
|
76
|
+
- Desktop wireframe: ~60 chars wide
|
|
77
|
+
- Mobile wireframe: ~30 chars wide
|
|
78
|
+
- Include placeholder text for key copy: `[Place Order]`, `[Your cart is empty...]`
|
|
79
|
+
- Density axis from visual-dna.md drives spacing: Airy = generous gaps between sections, fewer items visible. Dense = compact rows, more items per viewport.
|
|
80
|
+
|
|
81
|
+
## Platform-Specific Wireframe Conventions
|
|
82
|
+
|
|
83
|
+
**Web SaaS:** Sidebar + main content area. Header with nav. Sidebar collapses to hamburger on mobile.
|
|
84
|
+
|
|
85
|
+
**iOS:** Navigation bar at top (title, back button if applicable), content area, tab bar at bottom. Standard HIG layout patterns. See iOS-specific conventions section below for full requirements.
|
|
86
|
+
|
|
87
|
+
**Dashboard/Analytics:** Filter bar, card grid, chart placement. Dense layout with data tables.
|
|
88
|
+
|
|
89
|
+
**CLI:** No wireframe. Show command output format with example terminal session instead.
|
|
90
|
+
|
|
91
|
+
**Mobile (React Native/Expo):** Follow target platform conventions — iOS patterns if iOS, Material if Android, cross-platform neutral if both.
|
|
92
|
+
|
|
93
|
+
### iOS-specific wireframe conventions
|
|
94
|
+
|
|
95
|
+
When `project_type=ios`, page-specs follow these conventions:
|
|
96
|
+
|
|
97
|
+
- **Single viewport:** iPhone 16 Pro (393×852 logical) as the primary; iPad layout deltas captured as a Notes section. No second mobile/desktop view.
|
|
98
|
+
- **Navigation annotation:** name the parent NavigationStack / TabView / sheet and the back/dismiss gesture per screen.
|
|
99
|
+
- **Component refs:** every interactive element references a DESIGN.md `components:` token name (e.g., `button-primary`, `list-row-grouped`, `card-elevated`) — these are SwiftUI view modifiers at Phase 4.
|
|
100
|
+
- **Dynamic Type:** declare which typography role tokens the screen uses; flag any layout that breaks at xxxLarge.
|
|
101
|
+
- **Safe-area handling:** name top/bottom safe-area treatments (large title vs nav bar; tab bar inset).
|
|
102
|
+
- **Data loading strategy:** async/await + `.task` modifier vs `ObservableObject` reference; loading/error/empty states sourced from product-spec.md per-feature sections.
|
|
103
|
+
|
|
104
|
+
## Validation Checklist
|
|
105
|
+
|
|
106
|
+
1. Every screen in product-spec.md Screen Inventory has a page spec file
|
|
107
|
+
2. Every page spec has all 8 required sections (skip Responsive Behavior for non-web)
|
|
108
|
+
3. Every content hierarchy entry references a component from `component-manifest.md` or marks it `custom`
|
|
109
|
+
4. Every data source references an API endpoint from `architecture.md#backend/api` or marks it `local`/`computed`
|
|
110
|
+
5. ASCII wireframe exists for desktop (and mobile for web projects)
|
|
111
|
+
6. Section labels in wireframe match content hierarchy entry names
|
|
112
|
+
7. Key copy includes at least: one heading, one primary CTA, one empty state message
|
|
113
|
+
|
|
114
|
+
## Worked Example: Dashboard (Web SaaS)
|
|
115
|
+
|
|
116
|
+
```markdown
|
|
117
|
+
# Page Spec: Dashboard
|
|
118
|
+
|
|
119
|
+
## Screen Overview
|
|
120
|
+
|
|
121
|
+
Main dashboard — KPI summary, recent activity, and quick actions. Features: Dashboard, Notifications.
|
|
122
|
+
|
|
123
|
+
## ASCII Wireframe
|
|
124
|
+
|
|
125
|
+
### Desktop (1024px+)
|
|
126
|
+
|
|
127
|
+
┌──────────────────────────────────────────────────────────┐
|
|
128
|
+
│ [Header] [Search] [Avatar ▼] │
|
|
129
|
+
├────────────┬─────────────────────────────────────────────┤
|
|
130
|
+
│ [Sidebar] │ [Page Title: Dashboard] │
|
|
131
|
+
│ │ │
|
|
132
|
+
│ Dashboard │ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
|
|
133
|
+
│ Orders │ │[KPI: ]│ │[KPI: ]│ │[KPI: ]│ │
|
|
134
|
+
│ Products │ │ Revenue │ │ Orders │ │ Users │ │
|
|
135
|
+
│ Customers │ │ $12,340 │ │ 142 │ │ 1,203 │ │
|
|
136
|
+
│ Settings │ └─────────┘ └─────────┘ └─────────┘ │
|
|
137
|
+
│ │ │
|
|
138
|
+
│ │ ┌──────────────────────────────────────┐ │
|
|
139
|
+
│ │ │[Revenue Chart] │ │
|
|
140
|
+
│ │ │ │ │
|
|
141
|
+
│ │ │ ▁▂▃▅▆▇█▇▆▅▃▂▁▂▃▅▆▇ │ │
|
|
142
|
+
│ │ │ │ │
|
|
143
|
+
│ │ └──────────────────────────────────────┘ │
|
|
144
|
+
│ │ │
|
|
145
|
+
│ │ ┌──────────────────────────────────────┐ │
|
|
146
|
+
│ │ │[Activity Feed] │ │
|
|
147
|
+
│ │ │ • New order #1042 — 2m ago │ │
|
|
148
|
+
│ │ │ • User signed up — 15m ago │ │
|
|
149
|
+
│ │ │ • Payment received — 1h ago │ │
|
|
150
|
+
│ │ └──────────────────────────────────────┘ │
|
|
151
|
+
├────────────┴─────────────────────────────────────────────┤
|
|
152
|
+
│ [Footer] │
|
|
153
|
+
└──────────────────────────────────────────────────────────┘
|
|
154
|
+
|
|
155
|
+
### Mobile (375px)
|
|
156
|
+
|
|
157
|
+
┌────────────────────────────┐
|
|
158
|
+
│ [Header] [☰] [Avatar] │
|
|
159
|
+
├────────────────────────────┤
|
|
160
|
+
│ [Page Title: Dashboard] │
|
|
161
|
+
│ │
|
|
162
|
+
│ ┌────────────────────────┐ │
|
|
163
|
+
│ │[KPI: Revenue] $12,340 │ │
|
|
164
|
+
│ └────────────────────────┘ │
|
|
165
|
+
│ ┌────────────────────────┐ │
|
|
166
|
+
│ │[KPI: Orders] 142 │ │
|
|
167
|
+
│ └────────────────────────┘ │
|
|
168
|
+
│ ┌────────────────────────┐ │
|
|
169
|
+
│ │[KPI: Users] 1,203 │ │
|
|
170
|
+
│ └────────────────────────┘ │
|
|
171
|
+
│ │
|
|
172
|
+
│ ┌────────────────────────┐ │
|
|
173
|
+
│ │[Revenue Chart] │ │
|
|
174
|
+
│ │ ▁▂▃▅▆▇█▇▆▅▃▂▁▂▃▅▆▇ │ │
|
|
175
|
+
│ └────────────────────────┘ │
|
|
176
|
+
│ │
|
|
177
|
+
│ ┌────────────────────────┐ │
|
|
178
|
+
│ │[Activity Feed] │ │
|
|
179
|
+
│ │ • New order — 2m ago │ │
|
|
180
|
+
│ │ • Signup — 15m ago │ │
|
|
181
|
+
│ │ • Payment — 1h ago │ │
|
|
182
|
+
│ └────────────────────────┘ │
|
|
183
|
+
└────────────────────────────┘
|
|
184
|
+
|
|
185
|
+
## Content Hierarchy
|
|
186
|
+
|
|
187
|
+
| # | Section | Data Shown | Component | Data Source | Weight |
|
|
188
|
+
|---|---------|-----------|-----------|-------------|--------|
|
|
189
|
+
| 1 | KPI Cards | Revenue, order count, active users (current period + delta) | `StatCard` from manifest | `GET /api/dashboard/kpis` | primary |
|
|
190
|
+
| 2 | Revenue Chart | 30-day revenue trend line | `AreaChart` from manifest | `GET /api/dashboard/revenue?range=30d` | primary |
|
|
191
|
+
| 3 | Activity Feed | Last 10 events (orders, signups, payments) with relative timestamps | `FeedList` from manifest | `GET /api/dashboard/activity?limit=10` | secondary |
|
|
192
|
+
| 4 | Header | App logo, search, user avatar dropdown | `AppHeader` from manifest | `local` (user session) | tertiary |
|
|
193
|
+
| 5 | Sidebar | Navigation links with active state, unread badge on notifications | `SideNav` from manifest | `local` (route) + `GET /api/notifications/count` | tertiary |
|
|
194
|
+
|
|
195
|
+
## Key Copy
|
|
196
|
+
|
|
197
|
+
- **Page heading:** "Dashboard"
|
|
198
|
+
- **KPI labels:** "Revenue" · "Orders" · "Active Users"
|
|
199
|
+
- **KPI delta format:** "+12% vs last period" / "−3% vs last period"
|
|
200
|
+
- **Activity feed heading:** "Recent Activity"
|
|
201
|
+
- **Empty activity state:** "No activity yet. Once your first order comes in, you'll see it here."
|
|
202
|
+
- **Error state:** "Couldn't load dashboard data. Check your connection and try again." CTA: [Retry]
|
|
203
|
+
- **Stale indicator:** "Last updated 5 minutes ago" (appears after 60s without refresh)
|
|
204
|
+
|
|
205
|
+
## Responsive Behavior
|
|
206
|
+
|
|
207
|
+
| Breakpoint | Changes |
|
|
208
|
+
|-----------|---------|
|
|
209
|
+
| Desktop (1024px+) | Sidebar visible. KPI cards in 3-column row. Chart full width of main area. |
|
|
210
|
+
| Tablet (768px) | Sidebar collapses to icon-only rail. KPI cards in 3-column row (narrower). Chart full width. |
|
|
211
|
+
| Mobile (375px) | Sidebar hidden behind hamburger menu. KPI cards stack vertically (full width each). Chart full width. Activity feed below chart. |
|
|
212
|
+
|
|
213
|
+
## Platform Conventions
|
|
214
|
+
|
|
215
|
+
- **Web SaaS pattern:** Persistent sidebar navigation with active-state highlight on current page. Header with global search and user menu. Breadcrumbs not needed (top-level screen).
|
|
216
|
+
- **Sidebar:** Collapsible — user preference persisted in local storage. Icon-only mode at tablet breakpoint.
|
|
217
|
+
- **Data refresh:** No pull-to-refresh (web). Auto-refresh every 60s via polling. Manual refresh button in header.
|
|
218
|
+
|
|
219
|
+
## Data Loading
|
|
220
|
+
|
|
221
|
+
- **On mount:** Parallel fetch `GET /api/dashboard/kpis`, `GET /api/dashboard/revenue?range=30d`, `GET /api/dashboard/activity?limit=10`
|
|
222
|
+
- **Loading skeleton:** 3 shimmer rectangles for KPI cards (same dimensions as loaded cards). Chart area shows shimmer block. Activity feed shows 3 shimmer rows with avatar circle + text lines.
|
|
223
|
+
- **Refresh:** Auto-poll every 60s. Stale indicator appears if last successful fetch > 60s ago. No full-page reload — data swaps in place.
|
|
224
|
+
|
|
225
|
+
## States
|
|
226
|
+
|
|
227
|
+
- **From product-spec:** `initial`, `loading`, `loaded`, `empty`, `error`, `stale`
|
|
228
|
+
- **Screen-specific visuals:**
|
|
229
|
+
- `skeleton-loading` — shimmer cards + shimmer chart + shimmer feed rows (see Data Loading)
|
|
230
|
+
- `partial-data` — KPIs loaded but chart still loading: show KPI cards, chart area shows shimmer
|
|
231
|
+
- `stale` — data older than 60s: subtle "Last updated X ago" badge below page title
|
|
232
|
+
- `empty` — new account, no data yet: KPI cards show "—", chart shows flat line, activity feed shows empty state copy
|
|
233
|
+
- `error` — fetch failed: inline error banner with retry button, no full-page error
|
|
234
|
+
```
|