@ryuenn3123/agentic-senior-core 3.0.35 → 3.0.37
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/.agent-context/prompts/bootstrap-design.md +42 -0
- package/.agent-context/rules/frontend-architecture.md +11 -3
- package/.agent-context/state/memory-continuity-benchmark.json +1 -1
- package/.cursorrules +1 -1
- package/.windsurfrules +1 -1
- package/lib/cli/project-scaffolder/design-contract.mjs +174 -2
- package/lib/cli/project-scaffolder/prompt-builders.mjs +31 -19
- package/package.json +1 -1
- package/scripts/validate/config.mjs +20 -0
|
@@ -96,10 +96,47 @@ In reset mode:
|
|
|
96
96
|
## Design Quality Bar
|
|
97
97
|
|
|
98
98
|
The UI must feel authored by a strong UI/UX designer, not assembled from default cards and safe framework chrome.
|
|
99
|
+
The UI must not look like a first-pass AI template. "Readable" and "safe" are not enough when the brief calls for an authored product experience.
|
|
100
|
+
|
|
101
|
+
## Creative Ambition Floor
|
|
102
|
+
|
|
103
|
+
For new screens and broad redesigns, the agent must make one authored visual bet before coding. This can be a spatial structure, material logic, data treatment, motion language, typographic contrast, image system, or interaction model, but it must be visible in the first viewport and it must come from the chosen product anchor.
|
|
104
|
+
|
|
105
|
+
The ambition floor is not a license to decorate. It is a check against timid AI-template output. The design may still be quiet, dense, utilitarian, or text-heavy when the product needs that, but it must have a clear authored decision that a generic scaffold would not produce.
|
|
106
|
+
|
|
107
|
+
Before implementation, record:
|
|
108
|
+
- one product-derived palette move that does not rely on cream, slate, purple-blue gradient, monochrome, or cyber-neon defaults
|
|
109
|
+
- one signature motion, spatial, or interaction behavior that is more specific than "smooth"
|
|
110
|
+
- one morphology or composition choice that breaks away from interchangeable card stacks when the product allows it
|
|
111
|
+
|
|
112
|
+
If the agent chooses not to use rich motion, 3D, canvas, WebGL, scroll choreography, or an animation library, it must name the product, content-density, performance, accessibility, or device constraint that makes omission better. "Not necessary", "keep it simple", or "avoid complexity" is insufficient without that evidence.
|
|
113
|
+
|
|
114
|
+
## AI Color and Template Residue Audit
|
|
115
|
+
|
|
116
|
+
AI color drift happens when a screen reaches for safe defaults before it understands the product: cream editorial surfaces, dark slate dashboards, purple-blue gradients, monochrome minimalism, neon cyber terminals, soft glow atmospheres, or arbitrary bright accents with no semantic behavior.
|
|
117
|
+
|
|
118
|
+
These palettes are not banned when the product truly earns them. They are banned as autopilot. If one appears, the design contract must explain why that palette belongs to the product, how each semantic role behaves, and what product-specific color behavior prevents the UI from reading like a first-pass AI template.
|
|
119
|
+
|
|
120
|
+
The palette audit must answer:
|
|
121
|
+
- What product evidence or anchorReference makes these colors more appropriate than safer defaults?
|
|
122
|
+
- Which color roles carry task, status, data, or navigation meaning beyond surface decoration?
|
|
123
|
+
- Which color choice would not transfer cleanly to a different product category?
|
|
124
|
+
|
|
125
|
+
Accessibility is the floor, not the personality. Do not use contrast compliance as an excuse to flatten the palette into generic cream, slate, monochrome, or gradient safety.
|
|
126
|
+
|
|
127
|
+
## Motion and 3D Courage Rule
|
|
128
|
+
|
|
129
|
+
Motion, 3D, canvas, WebGL, scroll choreography, and modern animation libraries are first-class UI options when they improve product understanding, exploration, feedback, hierarchy, memorability, or confidence.
|
|
130
|
+
|
|
131
|
+
The agent must not suppress motion or spatial UI because it is afraid of implementation complexity. It must choose the richest responsible interaction model the product can support, then define reduced-motion, keyboard, loading, performance, and non-3D fallbacks.
|
|
132
|
+
|
|
133
|
+
When 3D/canvas is not used, document the non-use reason and the replacement interaction quality that will carry the experience. When 3D/canvas is used, document its product role, interaction model, fallback path, and library/runtime decision before coding.
|
|
99
134
|
|
|
100
135
|
Do:
|
|
101
136
|
- Synthesize a visual direction from the project context and explain why it fits.
|
|
102
137
|
- Choose color, typography, spacing, motion, density, and component morphology dynamically from the product and audience.
|
|
138
|
+
- Make at least three at-a-glance product-specific signals visible on new screens or broad redesigns: for example a data treatment, physical metaphor, motion behavior, iconography system, spatial structure, or state language that would not transfer cleanly to a different product.
|
|
139
|
+
- Use visually exploratory, product-derived palettes while preserving WCAG contrast and status clarity. The design may be quiet, but it must not hide inside safe cream, slate, monochrome, or gradient defaults.
|
|
103
140
|
- Use modern, expressive interaction and motion as part of the core design language, especially when it improves hierarchy, feedback, delight, confidence, or memorability.
|
|
104
141
|
- Use 3D or spatial/canvas experiences as primary UI only when they improve product understanding or exploration while preserving navigation, content clarity, user actions, performance, accessibility, and non-3D fallbacks.
|
|
105
142
|
- Keep frontend code clean, componentized, accessible, and easy to maintain.
|
|
@@ -107,7 +144,9 @@ Do:
|
|
|
107
144
|
- Make design decisions explicit before coding, then implement consistently.
|
|
108
145
|
|
|
109
146
|
Do not:
|
|
147
|
+
- Ship AI-safe UI: predictable card stacks, rounded template panels, generic abstract marks, decorative grid wallpaper, beige or slate safety palettes, soft glow backgrounds, or first-output composition with only local copy swapped in.
|
|
110
148
|
- Default to generic SaaS heroes, balanced card grids, soft startup gradients, or dashboard chrome without product rationale.
|
|
149
|
+
- Use background lines, grids, scanlines, noise, glows, blobs, logos, or geometric decoration unless each motif has a named product function such as alignment, measurement, navigation, crop guidance, timeline reading, status, or motion continuity.
|
|
111
150
|
- Let desktop, tablet, and mobile be the same design merely scaled down.
|
|
112
151
|
- Let heading, body, data, and metadata collapse into one safe typographic treatment without rationale.
|
|
113
152
|
- Reuse colors, layout shapes, or motion signatures from unrelated memory.
|
|
@@ -145,6 +184,7 @@ For every UI task, define how major surfaces change across mobile, tablet, and d
|
|
|
145
184
|
The JSON must stay machine-readable and project-specific. It should record:
|
|
146
185
|
- the confirmed project context and assumptions to validate
|
|
147
186
|
- agent-chosen visual direction, not scaffold-chosen direction
|
|
187
|
+
- an `aiSafeUiAudit` or equivalent review signal that states why the screen is not interchangeable with a generic AI-generated template
|
|
148
188
|
- `motionPaletteDecision` with motion density source, required interaction states, palette autopilot risk, and whether 3D/canvas is useful or unnecessary
|
|
149
189
|
- `conceptualAnchor` and how typography, spacing, morphology, motion, and responsive composition derive from it when no external research was provided
|
|
150
190
|
- `derivedTokenLogic` with exact `anchorReference` traceability for color, spacing, typography, and motion tokens
|
|
@@ -166,6 +206,8 @@ The review must block or flag:
|
|
|
166
206
|
- inaccessible contrast, focus, target size, keyboard, auth, or dynamic-status behavior
|
|
167
207
|
- scale-only responsive behavior
|
|
168
208
|
- unresearched dependency choices
|
|
209
|
+
- AI-safe UI drift: interchangeable card grids, safe cream/slate/monochrome palettes, generic abstract logos, decorative grid wallpaper, or a screen that can be renamed to another product without visual changes
|
|
210
|
+
- palette choices that use readability as a reason to stay in safe defaults instead of deriving a richer but accessible palette from the product
|
|
169
211
|
- default component-kit styling without product rationale
|
|
170
212
|
- missing or disconnected `conceptualAnchor` when no external design research was provided
|
|
171
213
|
- visual direction copied from unrelated memory or external references
|
|
@@ -47,10 +47,12 @@ Do not use this file to teach generic frontend basics the model already knows.
|
|
|
47
47
|
## Anti-Generic UI Boundaries
|
|
48
48
|
|
|
49
49
|
- Do not default to interchangeable dashboard chrome, balanced card grids, centered marketing shells, or generic component-kit surfaces unless the product explicitly needs them.
|
|
50
|
+
- Do not ship "AI-safe UI": predictable card stacks, rounded rectangles, generic abstract logos, decorative grids, beige or slate safety palettes, soft glow backgrounds, and first-output template composition are review findings when they are not directly required by the product.
|
|
50
51
|
- Do not let repeated surfaces share the same visual treatment by habit. Repetition is allowed only when the contract explains the product reason.
|
|
51
52
|
- Do not use default framework button and input treatment as the final UI language.
|
|
52
53
|
- Do not let heading, body, and data/meta roles collapse into one safe typographic family without explicit rationale.
|
|
53
|
-
- At least
|
|
54
|
+
- At least three visual, interaction, content, motion, or state behaviors must read as project-specific at a glance for new screens or broad redesigns. For a narrow component edit, at least one touched behavior must preserve or improve project specificity.
|
|
55
|
+
- If the UI could be renamed to another product category without changing its composition, palette, iconography, and motion language, treat that as genericity drift and revise before implementation is considered complete.
|
|
54
56
|
|
|
55
57
|
## Dynamic Avant-Garde Anchor Boundary
|
|
56
58
|
|
|
@@ -74,15 +76,21 @@ Do not use this file to teach generic frontend basics the model already knows.
|
|
|
74
76
|
- Product categories are heuristics, not style presets. Use them only as a starting signal, then choose motion density from user task, content density, brand intent, device/performance budget, and accessibility needs.
|
|
75
77
|
- If the category is unclear, infer from the dominant task: reading, scanning, form completion, data comparison, product inspection, storytelling, learning, play, or spatial exploration.
|
|
76
78
|
- For interactive UI, map the required states before coding: default, hover, focus-visible, active/pressed, disabled, loading, empty, error, success, and transition.
|
|
77
|
-
-
|
|
79
|
+
- Prefer visually exploratory, product-derived palettes over safe template palettes. High readability is mandatory, but readability must not be used as an excuse for cream/beige/tan, dark slate, purple-blue gradients, monochrome palettes, or uniform card surfaces.
|
|
80
|
+
- Do not default to dark slate, cream/beige/tan, purple-blue gradients, monochrome palettes, or uniform card surfaces unless current project evidence supports them. If one of those palettes is used, document why it fits, add enough role contrast that the UI does not read as a template, and include at least one product-specific color behavior that would not make sense in a generic SaaS screen.
|
|
81
|
+
- Treat cyber-neon terminal palettes, pale editorial cream surfaces, anonymous dark control rooms, soft glow gradients, and monochrome minimalism as autopilot risks, not reusable defaults. They are valid only when the product anchor explains their task role.
|
|
82
|
+
- Palette review must answer why these colors belong to this product, which semantic roles carry task/status/data meaning, and what color behavior would not transfer cleanly to another product category.
|
|
83
|
+
- Background lines, grids, scanlines, noise, glows, blobs, abstract logos, and decorative geometry are invalid when used as wallpaper. They must serve a named product function such as alignment, crop guidance, map/route orientation, timeline reading, measurement, status, or motion continuity.
|
|
78
84
|
- Use the existing motion stack first. Add animation, 3D, canvas, or scroll dependencies only when they materially improve delivery speed, interaction quality, maintainability, or product understanding.
|
|
79
|
-
- Motion should be absent only for a named reason: repeated high-frequency workflow, long-form reading focus, data-density scanning, reduced-motion need, or performance constraint.
|
|
85
|
+
- Motion should be absent only for a named reason: repeated high-frequency workflow, long-form reading focus, data-density scanning, reduced-motion need, device budget, or performance constraint.
|
|
86
|
+
- If rich motion, 3D, canvas, WebGL, scroll choreography, or animation libraries are omitted, the design contract must name the product-fit reason and the replacement interaction quality that will carry hierarchy, feedback, or memorability.
|
|
80
87
|
|
|
81
88
|
## Spatial and 3D Experience Boundary
|
|
82
89
|
|
|
83
90
|
- 3D, WebGL, canvas, and immersive spatial interfaces are allowed as the primary experience when they clarify the product, strengthen the chosen anchor, or make exploration meaningfully better than a flat UI.
|
|
84
91
|
- 3D must not take over the jobs of navigation, content comprehension, or decisive user actions. Core routes, text, forms, and calls to action must remain discoverable, accessible, and usable without solving the scene.
|
|
85
92
|
- Treat 3D as interaction architecture, not decoration. If it is only a modern-looking background or visual stunt, reduce it to a supporting accent or remove it.
|
|
93
|
+
- Do not reject 3D/canvas by habit. Reject it only after naming the product, content-density, performance, accessibility, or device constraint that makes a non-3D interaction stronger.
|
|
86
94
|
- Define performance and accessibility fallbacks before implementation: reduced motion, keyboard reachable controls, readable non-canvas content, mobile budgets, loading states, and a graceful non-3D path when rendering fails.
|
|
87
95
|
- When 3D is central, document its product role, interaction model, fallback path, and library/runtime decision in `docs/DESIGN.md` and `docs/design-intent.json` before coding.
|
|
88
96
|
|
package/.cursorrules
CHANGED
package/.windsurfrules
CHANGED
|
@@ -229,8 +229,44 @@ function buildDesignIntentContractObject({
|
|
|
229
229
|
productCategorySignal: 'agent-inferred-starting-heuristic',
|
|
230
230
|
densityDecisionSource: 'Agent must choose motion density from task, content density, brand intent, device/performance, and accessibility evidence; product categories are heuristics, not style presets.',
|
|
231
231
|
requiredInteractionStates: ['default', 'hover', 'focus-visible', 'active', 'disabled', 'loading', 'empty', 'error', 'success', 'transition'],
|
|
232
|
-
paletteAutopilotRisks: ['dark-slate-default', 'cream-beige-default', 'purple-blue-gradient-default', 'monochrome-template-default', 'uniform-card-surface-default'],
|
|
233
|
-
spatialDecision: 'Agent must state whether 3D/canvas/WebGL is useful or unnecessary for product understanding, exploration, or storytelling.',
|
|
232
|
+
paletteAutopilotRisks: ['dark-slate-default', 'cream-beige-default', 'purple-blue-gradient-default', 'monochrome-template-default', 'uniform-card-surface-default', 'generic-grid-wallpaper-default', 'soft-glow-ai-template-default', 'cyber-neon-terminal-default'],
|
|
233
|
+
spatialDecision: 'Agent must state whether 3D/canvas/WebGL is useful or unnecessary for product understanding, exploration, or storytelling; if omitted, name the product, content-density, performance, accessibility, or device reason and the replacement interaction quality.',
|
|
234
|
+
},
|
|
235
|
+
aiSafeUiAudit: {
|
|
236
|
+
status: 'agent-must-complete-before-ui-implementation',
|
|
237
|
+
failureDefinition: 'UI is AI-safe when it relies on predictable card stacks, rounded template panels, generic abstract logos, decorative grid wallpaper, beige or slate safety palettes, soft glow backgrounds, or first-output composition with only local copy swapped in.',
|
|
238
|
+
interchangeabilityTest: `If this UI can be renamed from ${projectName} to another product category without changing composition, palette, iconography, and motion language, the design is genericity drift and must be revised.`,
|
|
239
|
+
requiredProductSpecificSignals: [
|
|
240
|
+
'agent-defined-product-specific-data-treatment',
|
|
241
|
+
'agent-defined-product-specific-motion-or-state-behavior',
|
|
242
|
+
'agent-defined-product-specific-morphology-iconography-or-spatial-structure',
|
|
243
|
+
],
|
|
244
|
+
paletteExplorationRule: 'Use a visually exploratory product-derived palette while preserving WCAG contrast and status clarity; do not use readability as an excuse for cream, slate, monochrome, or gradient defaults.',
|
|
245
|
+
backgroundPatternRule: 'Lines, grids, scanlines, noise, glows, blobs, logos, and geometric decoration must serve a named product function such as alignment, measurement, navigation, crop guidance, timeline reading, status, or motion continuity.',
|
|
246
|
+
aiColorAudit: {
|
|
247
|
+
status: 'agent-must-complete-before-ui-implementation',
|
|
248
|
+
failureDefinition: 'AI color drift happens when a palette uses safe or fashionable defaults before deriving semantic roles from the product anchor.',
|
|
249
|
+
autopilotRisks: ['cream-editorial-default', 'dark-slate-dashboard-default', 'purple-blue-gradient-default', 'monochrome-minimal-default', 'cyber-neon-terminal-default', 'soft-glow-atmosphere-default'],
|
|
250
|
+
requiredEvidence: [
|
|
251
|
+
'anchor-derived-color-logic',
|
|
252
|
+
'semantic-role-contrast-beyond-surface-decoration',
|
|
253
|
+
'product-specific-color-behavior-that-would-not-transfer',
|
|
254
|
+
],
|
|
255
|
+
reviewQuestion: 'Why does this palette belong to this product instead of a generic first-pass AI UI?',
|
|
256
|
+
},
|
|
257
|
+
motionSpatialCourageAudit: {
|
|
258
|
+
status: 'agent-must-complete-before-ui-implementation',
|
|
259
|
+
defaultStance: 'Treat motion, scroll choreography, canvas, WebGL, and 3D as first-class options; omit them only with a product, content-density, performance, accessibility, or device reason.',
|
|
260
|
+
requiredDecisionFields: [
|
|
261
|
+
'signature-motion-or-interaction',
|
|
262
|
+
'spatial-or-3d-fit',
|
|
263
|
+
'performance-and-reduced-motion-fallback',
|
|
264
|
+
],
|
|
265
|
+
rejectionRule: 'Do not mark 3D/canvas unnecessary by habit; state the product reason and the replacement interaction quality.',
|
|
266
|
+
reviewQuestion: 'Did the agent make the experience as expressive as the product can responsibly support?',
|
|
267
|
+
},
|
|
268
|
+
reviewQuestion: 'What at-a-glance visual evidence proves this screen belongs to this product and not a generic AI-generated template?',
|
|
269
|
+
blockingByDefault: true,
|
|
234
270
|
},
|
|
235
271
|
libraryResearchStatus: 'pending-verification',
|
|
236
272
|
libraryDecisions: [
|
|
@@ -502,8 +538,16 @@ function buildDesignIntentContractObject({
|
|
|
502
538
|
'unresearched-library-or-framework-choice',
|
|
503
539
|
'missing-conceptual-anchor-without-external-research',
|
|
504
540
|
'visual-decisions-not-derived-from-conceptual-anchor',
|
|
541
|
+
'ai-safe-ui-template-look',
|
|
542
|
+
'ai-color-default-palette-without-product-role-behavior',
|
|
543
|
+
'brandless-clean-template-look',
|
|
544
|
+
'interchangeable-product-renaming-test-fails',
|
|
545
|
+
'decorative-grid-or-glow-wallpaper-without-product-function',
|
|
546
|
+
'safe-cream-slate-or-monochrome-palette-used-as-readability-excuse',
|
|
547
|
+
'generic-abstract-logo-or-iconography',
|
|
505
548
|
'timid-anchor-that-renames-dashboard-or-admin-shell',
|
|
506
549
|
'motion-suppressed-without-accessibility-or-performance-reason',
|
|
550
|
+
'motion-or-3d-omitted-from-fear-without-fit-analysis',
|
|
507
551
|
'scale-only-responsive-layout',
|
|
508
552
|
'zero-based-redesign-kept-prior-visual-dna',
|
|
509
553
|
'restyle-instead-of-recomposition',
|
|
@@ -512,6 +556,12 @@ function buildDesignIntentContractObject({
|
|
|
512
556
|
'single-cohesive-conceptual-anchor',
|
|
513
557
|
'high-variance-candidate-selection',
|
|
514
558
|
'context-derived-visual-direction',
|
|
559
|
+
'three-at-a-glance-product-specific-signals',
|
|
560
|
+
'visually-exploratory-accessible-palette-derived-from-product',
|
|
561
|
+
'audacious-accessible-palette-with-product-role-behavior',
|
|
562
|
+
'background-or-geometry-serves-product-function',
|
|
563
|
+
'motion-or-spatial-experience-derived-from-anchor',
|
|
564
|
+
'explicit-3d-canvas-fit-or-nonfit-decision',
|
|
515
565
|
'responsive-recomposition-by-task-priority',
|
|
516
566
|
'purposeful-motion-with-reduced-motion-path',
|
|
517
567
|
],
|
|
@@ -546,8 +596,10 @@ function buildDesignIntentContractObject({
|
|
|
546
596
|
},
|
|
547
597
|
experiencePrinciples: [
|
|
548
598
|
'Design must feel project-specific, not interchangeable with generic SaaS templates.',
|
|
599
|
+
'Readable UI must still avoid AI-safe template look; safety is not a substitute for authored visual direction.',
|
|
549
600
|
'Major interface decisions must be explainable in product and user terms.',
|
|
550
601
|
'Accessibility, responsiveness, and implementation realism are non-negotiable.',
|
|
602
|
+
'Accessibility is the floor, not a reason to erase visual personality or fall back to AI color defaults.',
|
|
551
603
|
'Cross-viewport behavior must reorganize tasks and navigation, not just scale the desktop layout down.',
|
|
552
604
|
'A single agent-chosen conceptual anchor must unify typography, spacing, morphology, motion, and responsive composition when user research is absent.',
|
|
553
605
|
'Expressive motion and spatial interaction are expected for modern UI work when they support the anchor; keep them accessible and performant instead of suppressing them by default.',
|
|
@@ -557,8 +609,16 @@ function buildDesignIntentContractObject({
|
|
|
557
609
|
'offline-prescribed-style-used-as-final-direction',
|
|
558
610
|
'missing-conceptual-anchor-without-external-research',
|
|
559
611
|
'visual-decisions-not-derived-from-conceptual-anchor',
|
|
612
|
+
'ai-safe-ui-template-look',
|
|
613
|
+
'ai-color-default-palette-without-product-role-behavior',
|
|
614
|
+
'brandless-clean-template-look',
|
|
615
|
+
'interchangeable-product-renaming-test-fails',
|
|
616
|
+
'decorative-grid-or-glow-wallpaper-without-product-function',
|
|
617
|
+
'safe-cream-slate-or-monochrome-palette-used-as-readability-excuse',
|
|
618
|
+
'generic-abstract-logo-or-iconography',
|
|
560
619
|
'timid-anchor-that-renames-dashboard-or-admin-shell',
|
|
561
620
|
'motion-suppressed-without-accessibility-or-performance-reason',
|
|
621
|
+
'motion-or-3d-omitted-from-fear-without-fit-analysis',
|
|
562
622
|
'scale-only-responsive-layout',
|
|
563
623
|
'zero-based-redesign-kept-prior-visual-dna',
|
|
564
624
|
'restyle-instead-of-recomposition',
|
|
@@ -586,6 +646,15 @@ function buildDesignIntentContractObject({
|
|
|
586
646
|
genericityAutoFail: true,
|
|
587
647
|
requireSignatureMove: true,
|
|
588
648
|
rejectTemplateNeutralLayout: true,
|
|
649
|
+
requireAiSafeUiAudit: true,
|
|
650
|
+
requireAiColorAudit: true,
|
|
651
|
+
rejectAiColorDefaults: true,
|
|
652
|
+
requireMotionSpatialCourageAudit: true,
|
|
653
|
+
requireExplicit3dCanvasFitDecision: true,
|
|
654
|
+
rejectSafetyAsCreativitySubstitute: true,
|
|
655
|
+
rejectAiSafeUiTemplateLook: true,
|
|
656
|
+
requireThreeProductSpecificSignals: true,
|
|
657
|
+
rejectDecorativeBackgroundPatternsWithoutProductFunction: true,
|
|
589
658
|
},
|
|
590
659
|
requiredDesignSections: DESIGN_REQUIRED_SECTIONS,
|
|
591
660
|
implementation: {
|
|
@@ -893,6 +962,74 @@ export function validateDesignIntentContract(designIntentContract) {
|
|
|
893
962
|
}
|
|
894
963
|
}
|
|
895
964
|
|
|
965
|
+
if (!designIntentContract.aiSafeUiAudit || typeof designIntentContract.aiSafeUiAudit !== 'object') {
|
|
966
|
+
validationErrors.push('designIntent.aiSafeUiAudit must exist.');
|
|
967
|
+
} else {
|
|
968
|
+
const aiSafeUiAudit = designIntentContract.aiSafeUiAudit;
|
|
969
|
+
if (aiSafeUiAudit.status !== 'agent-must-complete-before-ui-implementation') {
|
|
970
|
+
validationErrors.push('designIntent.aiSafeUiAudit.status must require completion before UI implementation.');
|
|
971
|
+
}
|
|
972
|
+
if (!String(aiSafeUiAudit.failureDefinition || '').includes('AI-safe')) {
|
|
973
|
+
validationErrors.push('designIntent.aiSafeUiAudit.failureDefinition must define AI-safe UI drift.');
|
|
974
|
+
}
|
|
975
|
+
if (!String(aiSafeUiAudit.interchangeabilityTest || '').includes('renamed')) {
|
|
976
|
+
validationErrors.push('designIntent.aiSafeUiAudit.interchangeabilityTest must include the rename/interchangeability test.');
|
|
977
|
+
}
|
|
978
|
+
if (!Array.isArray(aiSafeUiAudit.requiredProductSpecificSignals) || aiSafeUiAudit.requiredProductSpecificSignals.length < 3) {
|
|
979
|
+
validationErrors.push('designIntent.aiSafeUiAudit.requiredProductSpecificSignals must list at least three product-specific signals.');
|
|
980
|
+
}
|
|
981
|
+
if (!String(aiSafeUiAudit.paletteExplorationRule || '').trim()) {
|
|
982
|
+
validationErrors.push('designIntent.aiSafeUiAudit.paletteExplorationRule must be a non-empty string.');
|
|
983
|
+
}
|
|
984
|
+
if (!String(aiSafeUiAudit.backgroundPatternRule || '').trim()) {
|
|
985
|
+
validationErrors.push('designIntent.aiSafeUiAudit.backgroundPatternRule must be a non-empty string.');
|
|
986
|
+
}
|
|
987
|
+
if (!aiSafeUiAudit.aiColorAudit || typeof aiSafeUiAudit.aiColorAudit !== 'object') {
|
|
988
|
+
validationErrors.push('designIntent.aiSafeUiAudit.aiColorAudit must exist.');
|
|
989
|
+
} else {
|
|
990
|
+
if (aiSafeUiAudit.aiColorAudit.status !== 'agent-must-complete-before-ui-implementation') {
|
|
991
|
+
validationErrors.push('designIntent.aiSafeUiAudit.aiColorAudit.status must require completion before UI implementation.');
|
|
992
|
+
}
|
|
993
|
+
if (!String(aiSafeUiAudit.aiColorAudit.failureDefinition || '').includes('AI color')) {
|
|
994
|
+
validationErrors.push('designIntent.aiSafeUiAudit.aiColorAudit.failureDefinition must define AI color drift.');
|
|
995
|
+
}
|
|
996
|
+
if (!Array.isArray(aiSafeUiAudit.aiColorAudit.autopilotRisks) || aiSafeUiAudit.aiColorAudit.autopilotRisks.length < 4) {
|
|
997
|
+
validationErrors.push('designIntent.aiSafeUiAudit.aiColorAudit.autopilotRisks must list common autopilot palettes.');
|
|
998
|
+
}
|
|
999
|
+
if (!Array.isArray(aiSafeUiAudit.aiColorAudit.requiredEvidence) || aiSafeUiAudit.aiColorAudit.requiredEvidence.length < 3) {
|
|
1000
|
+
validationErrors.push('designIntent.aiSafeUiAudit.aiColorAudit.requiredEvidence must list color evidence requirements.');
|
|
1001
|
+
}
|
|
1002
|
+
if (!String(aiSafeUiAudit.aiColorAudit.reviewQuestion || '').trim()) {
|
|
1003
|
+
validationErrors.push('designIntent.aiSafeUiAudit.aiColorAudit.reviewQuestion must be a non-empty string.');
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
if (!aiSafeUiAudit.motionSpatialCourageAudit || typeof aiSafeUiAudit.motionSpatialCourageAudit !== 'object') {
|
|
1007
|
+
validationErrors.push('designIntent.aiSafeUiAudit.motionSpatialCourageAudit must exist.');
|
|
1008
|
+
} else {
|
|
1009
|
+
if (aiSafeUiAudit.motionSpatialCourageAudit.status !== 'agent-must-complete-before-ui-implementation') {
|
|
1010
|
+
validationErrors.push('designIntent.aiSafeUiAudit.motionSpatialCourageAudit.status must require completion before UI implementation.');
|
|
1011
|
+
}
|
|
1012
|
+
if (!String(aiSafeUiAudit.motionSpatialCourageAudit.defaultStance || '').includes('first-class options')) {
|
|
1013
|
+
validationErrors.push('designIntent.aiSafeUiAudit.motionSpatialCourageAudit.defaultStance must treat motion and spatial UI as first-class options.');
|
|
1014
|
+
}
|
|
1015
|
+
if (!Array.isArray(aiSafeUiAudit.motionSpatialCourageAudit.requiredDecisionFields) || aiSafeUiAudit.motionSpatialCourageAudit.requiredDecisionFields.length < 3) {
|
|
1016
|
+
validationErrors.push('designIntent.aiSafeUiAudit.motionSpatialCourageAudit.requiredDecisionFields must list required motion/spatial decisions.');
|
|
1017
|
+
}
|
|
1018
|
+
if (!String(aiSafeUiAudit.motionSpatialCourageAudit.rejectionRule || '').includes('product reason')) {
|
|
1019
|
+
validationErrors.push('designIntent.aiSafeUiAudit.motionSpatialCourageAudit.rejectionRule must require a product reason before omitting spatial UI.');
|
|
1020
|
+
}
|
|
1021
|
+
if (!String(aiSafeUiAudit.motionSpatialCourageAudit.reviewQuestion || '').trim()) {
|
|
1022
|
+
validationErrors.push('designIntent.aiSafeUiAudit.motionSpatialCourageAudit.reviewQuestion must be a non-empty string.');
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
if (!String(aiSafeUiAudit.reviewQuestion || '').trim()) {
|
|
1026
|
+
validationErrors.push('designIntent.aiSafeUiAudit.reviewQuestion must be a non-empty string.');
|
|
1027
|
+
}
|
|
1028
|
+
if (aiSafeUiAudit.blockingByDefault !== true) {
|
|
1029
|
+
validationErrors.push('designIntent.aiSafeUiAudit.blockingByDefault must equal true.');
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
|
|
896
1033
|
if (!designIntentContract.tokenSystem || typeof designIntentContract.tokenSystem !== 'object') {
|
|
897
1034
|
validationErrors.push('designIntent.tokenSystem must exist.');
|
|
898
1035
|
} else {
|
|
@@ -1261,9 +1398,32 @@ export function validateDesignIntentContract(designIntentContract) {
|
|
|
1261
1398
|
}
|
|
1262
1399
|
if (!Array.isArray(designIntentContract.reviewRubric.genericitySignals) || designIntentContract.reviewRubric.genericitySignals.length < 3) {
|
|
1263
1400
|
validationErrors.push('designIntent.reviewRubric.genericitySignals must list common genericity drift signals.');
|
|
1401
|
+
} else {
|
|
1402
|
+
for (const requiredSignal of [
|
|
1403
|
+
'ai-safe-ui-template-look',
|
|
1404
|
+
'ai-color-default-palette-without-product-role-behavior',
|
|
1405
|
+
'interchangeable-product-renaming-test-fails',
|
|
1406
|
+
'decorative-grid-or-glow-wallpaper-without-product-function',
|
|
1407
|
+
'motion-or-3d-omitted-from-fear-without-fit-analysis',
|
|
1408
|
+
]) {
|
|
1409
|
+
if (!designIntentContract.reviewRubric.genericitySignals.includes(requiredSignal)) {
|
|
1410
|
+
validationErrors.push(`designIntent.reviewRubric.genericitySignals must include "${requiredSignal}".`);
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1264
1413
|
}
|
|
1265
1414
|
if (!Array.isArray(designIntentContract.reviewRubric.validBoldSignals) || designIntentContract.reviewRubric.validBoldSignals.length < 3) {
|
|
1266
1415
|
validationErrors.push('designIntent.reviewRubric.validBoldSignals must list legitimate authored signals.');
|
|
1416
|
+
} else {
|
|
1417
|
+
for (const requiredSignal of [
|
|
1418
|
+
'three-at-a-glance-product-specific-signals',
|
|
1419
|
+
'visually-exploratory-accessible-palette-derived-from-product',
|
|
1420
|
+
'audacious-accessible-palette-with-product-role-behavior',
|
|
1421
|
+
'motion-or-spatial-experience-derived-from-anchor',
|
|
1422
|
+
]) {
|
|
1423
|
+
if (!designIntentContract.reviewRubric.validBoldSignals.includes(requiredSignal)) {
|
|
1424
|
+
validationErrors.push(`designIntent.reviewRubric.validBoldSignals must include "${requiredSignal}".`);
|
|
1425
|
+
}
|
|
1426
|
+
}
|
|
1267
1427
|
}
|
|
1268
1428
|
if (!designIntentContract.reviewRubric.reportingRules || typeof designIntentContract.reviewRubric.reportingRules !== 'object') {
|
|
1269
1429
|
validationErrors.push('designIntent.reviewRubric.reportingRules must exist.');
|
|
@@ -1292,6 +1452,18 @@ export function validateDesignIntentContract(designIntentContract) {
|
|
|
1292
1452
|
|
|
1293
1453
|
if (!Array.isArray(designIntentContract.forbiddenPatterns) || designIntentContract.forbiddenPatterns.length < 4) {
|
|
1294
1454
|
validationErrors.push('designIntent.forbiddenPatterns must list concrete anti-generic patterns.');
|
|
1455
|
+
} else {
|
|
1456
|
+
for (const requiredPattern of [
|
|
1457
|
+
'ai-safe-ui-template-look',
|
|
1458
|
+
'ai-color-default-palette-without-product-role-behavior',
|
|
1459
|
+
'interchangeable-product-renaming-test-fails',
|
|
1460
|
+
'decorative-grid-or-glow-wallpaper-without-product-function',
|
|
1461
|
+
'motion-or-3d-omitted-from-fear-without-fit-analysis',
|
|
1462
|
+
]) {
|
|
1463
|
+
if (!designIntentContract.forbiddenPatterns.includes(requiredPattern)) {
|
|
1464
|
+
validationErrors.push(`designIntent.forbiddenPatterns must include "${requiredPattern}".`);
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1295
1467
|
}
|
|
1296
1468
|
|
|
1297
1469
|
return validationErrors;
|
|
@@ -126,25 +126,26 @@ export function buildDesignBootstrapPrompt({
|
|
|
126
126
|
'6. antiAdjectives',
|
|
127
127
|
'7. visualDirection',
|
|
128
128
|
'8. derivedTokenLogic',
|
|
129
|
-
'9.
|
|
130
|
-
'10.
|
|
131
|
-
'11.
|
|
132
|
-
'12.
|
|
133
|
-
'13.
|
|
134
|
-
'14.
|
|
135
|
-
'15.
|
|
136
|
-
'16.
|
|
137
|
-
'17.
|
|
138
|
-
'18.
|
|
139
|
-
'19.
|
|
140
|
-
'20.
|
|
141
|
-
'21.
|
|
142
|
-
'22.
|
|
143
|
-
'23.
|
|
144
|
-
'24.
|
|
145
|
-
'25.
|
|
146
|
-
'26.
|
|
147
|
-
'27.
|
|
129
|
+
'9. aiSafeUiAudit',
|
|
130
|
+
'10. libraryResearchStatus',
|
|
131
|
+
'11. libraryDecisions',
|
|
132
|
+
'12. mathSystems',
|
|
133
|
+
'13. tokenSystem',
|
|
134
|
+
'14. colorTruth',
|
|
135
|
+
'15. crossViewportAdaptation',
|
|
136
|
+
'16. motionSystem',
|
|
137
|
+
'17. componentMorphology',
|
|
138
|
+
'18. accessibilityPolicy',
|
|
139
|
+
'19. designExecutionPolicy',
|
|
140
|
+
'20. designExecutionHandoff',
|
|
141
|
+
'21. reviewRubric',
|
|
142
|
+
'22. contextHygiene',
|
|
143
|
+
'23. experiencePrinciples',
|
|
144
|
+
'24. forbiddenPatterns',
|
|
145
|
+
'25. validationHints',
|
|
146
|
+
'26. requiredDesignSections',
|
|
147
|
+
'27. implementation',
|
|
148
|
+
'28. repoEvidence when onboarding or detector evidence exists',
|
|
148
149
|
'',
|
|
149
150
|
'## Hard Rules',
|
|
150
151
|
'1. No copy-paste from external style guides.',
|
|
@@ -171,6 +172,13 @@ export function buildDesignBootstrapPrompt({
|
|
|
171
172
|
'22. Treat prior website memory, unrelated project aesthetics, and remembered screenshots as tainted context unless the user explicitly approves continuity.',
|
|
172
173
|
'23. Design continuity is opt-in. If no approved continuity exists, synthesize from the current repo evidence, current brief, and current project docs only.',
|
|
173
174
|
'24. Make at least one memorable visual bet so the resulting system is recognizable and not template-neutral.',
|
|
175
|
+
'24a. Do not ship AI-safe UI: predictable card stacks, rounded template panels, generic abstract logos, decorative grid wallpaper, beige or slate safety palettes, soft glow backgrounds, or first-output composition with only local copy swapped in are review findings.',
|
|
176
|
+
'24b. New screens and broad redesigns must expose at least three at-a-glance product-specific signals and pass the rename test: if the UI can be renamed to another product category without changing composition, palette, iconography, and motion language, revise it before coding.',
|
|
177
|
+
'24c. Background lines, grids, scanlines, noise, glows, blobs, logos, and geometric decoration must serve a named product function such as alignment, measurement, navigation, crop guidance, timeline reading, status, or motion continuity.',
|
|
178
|
+
'24d. Use visually exploratory, product-derived palettes while preserving WCAG contrast and status clarity; readability must not become an excuse for cream, slate, monochrome, or gradient defaults.',
|
|
179
|
+
'24e. Complete the AI color audit before coding: palette choices must explain product evidence, semantic role behavior, and at least one color behavior that would not transfer cleanly to another product category.',
|
|
180
|
+
'24f. Meet the creative ambition floor before coding: name one authored visual bet, one product-derived palette move, one signature motion/spatial/interaction behavior, and one morphology or composition choice that breaks away from interchangeable card stacks when the product allows it.',
|
|
181
|
+
'24g. Treat motion, 3D, canvas, WebGL, scroll choreography, and modern animation libraries as first-class options. If they are omitted, document the product, content-density, device, performance, or accessibility reason and the replacement interaction quality.',
|
|
174
182
|
'25. Define a stable review rubric for distinctiveness, contract fidelity, visual consistency, heuristic UX quality, and motion discipline.',
|
|
175
183
|
'26. Genericity findings must name the actual drift signal. Do not label something generic without explaining the anti-pattern or rubric dimension.',
|
|
176
184
|
'27. Review rubric must support automatic genericity failure when named drift signals dominate a redesign or new UI surface.',
|
|
@@ -189,6 +197,10 @@ export function buildDesignBootstrapPrompt({
|
|
|
189
197
|
'40. Every libraryDecisions entry must either include current official-doc verification metadata or a fallbackIfUnavailable. Do not import a new library without verification or an accepted blocker.',
|
|
190
198
|
'41. The chosen anchor must drive typography, spacing, density, color behavior, morphology, motion, and responsive composition. Treat expressive motion, spatial transitions, micro-interactions, and modern animation libraries as first-class options; include performance notes and reduced-motion fallbacks instead of suppressing motion to look safe.',
|
|
191
199
|
'',
|
|
200
|
+
'## Creative Ambition Floor',
|
|
201
|
+
'Before implementation, the design contract must name one authored visual bet, one product-derived palette move, one signature motion/spatial/interaction behavior, and one morphology or composition choice that would not appear in a generic AI template.',
|
|
202
|
+
'The ambition floor is not a fixed aesthetic. Quiet, dense, utilitarian, or text-heavy interfaces are allowed when the product requires them, but they still need a project-specific visual decision and a real reason for omitting richer motion, 3D, canvas, WebGL, scroll choreography, or animation libraries.',
|
|
203
|
+
'',
|
|
192
204
|
'## Token Derivation Audit',
|
|
193
205
|
'Before implementation, docs/design-intent.json must include derivedTokenLogic.anchorReference plus colorDerivationSource, spacingDerivationSource, typographyDerivationSource, motionDerivationSource, and validationRule.',
|
|
194
206
|
'Every token must be explainable from anchorReference. If the rationale is only looks good, common practice, modern default, or framework default, derive the token again before UI code.',
|
package/package.json
CHANGED
|
@@ -320,6 +320,15 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
|
|
|
320
320
|
'source of truth',
|
|
321
321
|
'research current official docs',
|
|
322
322
|
'motionPaletteDecision',
|
|
323
|
+
'AI-safe UI',
|
|
324
|
+
'Creative Ambition Floor',
|
|
325
|
+
'AI Color and Template Residue Audit',
|
|
326
|
+
'Motion and 3D Courage Rule',
|
|
327
|
+
'visually exploratory, product-derived palettes',
|
|
328
|
+
'decorative grid wallpaper',
|
|
329
|
+
'`aiSafeUiAudit`',
|
|
330
|
+
'AI color drift',
|
|
331
|
+
'first-class UI options',
|
|
323
332
|
'product categories are heuristics',
|
|
324
333
|
'Responsive design means recomposition, not resizing.',
|
|
325
334
|
'agent-chosen visual direction',
|
|
@@ -379,6 +388,17 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
|
|
|
379
388
|
'structure-first-scaffold',
|
|
380
389
|
'colorTruth',
|
|
381
390
|
'motionPaletteDecision',
|
|
391
|
+
'aiSafeUiAudit',
|
|
392
|
+
'aiColorAudit',
|
|
393
|
+
'motionSpatialCourageAudit',
|
|
394
|
+
'ai-color-default-palette-without-product-role-behavior',
|
|
395
|
+
'motion-or-3d-omitted-from-fear-without-fit-analysis',
|
|
396
|
+
'requireAiColorAudit',
|
|
397
|
+
'requireMotionSpatialCourageAudit',
|
|
398
|
+
'ai-safe-ui-template-look',
|
|
399
|
+
'interchangeable-product-renaming-test-fails',
|
|
400
|
+
'decorative-grid-or-glow-wallpaper-without-product-function',
|
|
401
|
+
'requireAiSafeUiAudit',
|
|
382
402
|
'forbidAutopilotPalettesWithoutEvidence',
|
|
383
403
|
'rolesAreMinimumScaffold',
|
|
384
404
|
'crossViewportAdaptation',
|