@ryuenn3123/agentic-senior-core 3.0.23 → 3.0.25
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 +10 -6
- package/.agent-context/rules/frontend-architecture.md +8 -0
- package/.agent-context/state/memory-continuity-benchmark.json +1 -1
- package/.cursorrules +1 -1
- package/.windsurfrules +1 -1
- package/README.md +20 -5
- package/lib/cli/project-scaffolder/design-contract.mjs +118 -108
- package/lib/cli/project-scaffolder/prompt-builders.mjs +5 -2
- package/package.json +1 -1
|
@@ -27,17 +27,21 @@ The agent must summarize what it used from that research, discard what does not
|
|
|
27
27
|
|
|
28
28
|
User-supplied research may influence the candidate set for motion, scroll, UI primitives, canvas/3D, charts, icons, typography, and interaction patterns, but the final choice must still be project-fit, accessible, performant, and maintainable.
|
|
29
29
|
|
|
30
|
-
##
|
|
30
|
+
## Dynamic Avant-Garde Anchor Engine
|
|
31
31
|
|
|
32
|
-
If the user requests UI work but provides no
|
|
32
|
+
If the user requests UI work but provides no user-supplied research, design reference, screenshot study, or library note, do not start coding immediately. This is not permission to fall back to the scaffold, prior UI, or generic software metaphors. First synthesize one advanced conceptual anchor that will unify the interface.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
User-supplied research means current-task evidence from the user. The scaffold seed, this repo's offline examples, old design docs, and prior UI do not count as research. If live research is available, perform agent-led research into current official docs for any technology choices and current premium interaction/design patterns before selecting the anchor. If live research is unavailable, state that limitation in the design docs and synthesize from product context plus broad design knowledge without pretending the seed was research.
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
Do not use basic software UI labels as the final anchor, including "dashboard", "portal", "cards", "admin panel", "SaaS shell", "web app shell", or "minimalist interface".
|
|
37
37
|
|
|
38
|
-
The
|
|
38
|
+
The agent must internally consider at least three substantially different, high-variance candidate anchors, discard the two most obvious, safest, or easiest-to-predict options, and record only the surviving anchor and concise rationale. Do not expose hidden deliberation or the rejected candidate list.
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
The final anchor must come from broad non-template domains such as complex physical engineering, high-end industrial design, cinematic spatial interfaces, experimental editorial structure, advanced architecture, scientific instrumentation, advanced data visualization, exhibition/wayfinding systems, or premium interactive web experiences. These are search domains, not style presets.
|
|
41
|
+
|
|
42
|
+
Write the chosen anchor into `docs/design-intent.json` as `conceptualAnchor`, including agentResearchMode, sourceDomain, rationale, derivedTokenLogic, visualRiskBudget, motionRiskBudget, and cohesionChecks. Typography, spacing, density, color behavior, morphology, motion, and responsive composition must logically derive from that single anchor. If a later design choice does not follow from the anchor, revise the contract before coding.
|
|
43
|
+
|
|
44
|
+
Motion is not a garnish. The agent may use rich animation, fluid transitions, spatial reveals, scroll choreography, micro-interactions, and modern motion libraries when they support the anchor, remain performant, and include reduced-motion fallbacks. Do not suppress motion merely to look safe.
|
|
41
45
|
|
|
42
46
|
## Zero-Based Redesign Protocol
|
|
43
47
|
|
|
@@ -52,6 +52,14 @@ Do not use this file to teach generic frontend basics the model already knows.
|
|
|
52
52
|
- Do not let heading, body, and data/meta roles collapse into one safe typographic family without explicit rationale.
|
|
53
53
|
- At least one visual, interaction, content, motion, or state behavior must read as project-specific at a glance.
|
|
54
54
|
|
|
55
|
+
## Dynamic Avant-Garde Anchor Boundary
|
|
56
|
+
|
|
57
|
+
- If the user gives no current-task visual research or reference, the scaffold, old UI, and existing design docs do not count as research.
|
|
58
|
+
- Before UI code, choose one agent-synthesized conceptual anchor from high-variance non-software domains and record only the final anchor in `docs/design-intent.json`.
|
|
59
|
+
- Internally reject the safest dashboard, portal, card-grid, admin-shell, or minimalist-web-app mental model before writing CSS.
|
|
60
|
+
- Typography, spacing, morphology, motion, and responsive recomposition must derive from the chosen anchor, not from framework defaults.
|
|
61
|
+
- Rich motion, spatial transitions, and micro-interactions are allowed when they support the anchor and include reduced-motion and performance safeguards.
|
|
62
|
+
|
|
55
63
|
## Responsive Mutation Requirements
|
|
56
64
|
|
|
57
65
|
- Responsive quality is not allowed to be scale-only. At least one surface must materially change position, grouping, priority, or disclosure strategy between mobile and desktop.
|
package/.cursorrules
CHANGED
package/.windsurfrules
CHANGED
package/README.md
CHANGED
|
@@ -10,12 +10,13 @@
|
|
|
10
10
|
**Production-grade Rules Engine (Governance Engine) for AI coding agents.**
|
|
11
11
|
Works with Cursor, Windsurf, GitHub Copilot, Claude Code, Gemini, and other LLM-powered IDE workflows.
|
|
12
12
|
|
|
13
|
-
Latest release: 3.0.
|
|
13
|
+
Latest release: 3.0.25 (2026-04-25).
|
|
14
14
|
|
|
15
|
-
Highlights in 3.0.
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
15
|
+
Highlights in 3.0.25:
|
|
16
|
+
- UI design bootstrap now forces a dynamic conceptual anchor when no current-task visual research is provided.
|
|
17
|
+
- Agents must use live/current-year research for ecosystem, framework, dependency, Docker, and modern UI/library claims instead of offline repository guesses.
|
|
18
|
+
- Frontend guidance now rejects safe dashboard/admin-panel defaults, requires responsive recomposition, and allows rich modern motion when it supports the chosen concept.
|
|
19
|
+
- Generated design-intent seeds are more compact, leaving the LLM room to synthesize project-specific visual direction instead of inheriting verbose scaffold bias.
|
|
19
20
|
|
|
20
21
|
</div>
|
|
21
22
|
|
|
@@ -37,6 +38,20 @@ One command to initialize rules, checklists, and strict AI coding guidelines con
|
|
|
37
38
|
|
|
38
39
|
---
|
|
39
40
|
|
|
41
|
+
## Design Direction
|
|
42
|
+
|
|
43
|
+
For UI, UX, layout, screen, Tailwind, frontend, or redesign work, the pack routes agents through the design bootstrap and frontend architecture rules before code changes.
|
|
44
|
+
|
|
45
|
+
The intended behavior is agent-led, not offline-template-led:
|
|
46
|
+
|
|
47
|
+
- Existing projects: read the real repository, docs, UI surface, and current user brief before changing design.
|
|
48
|
+
- Fresh projects: ask the LLM agent to recommend the stack and design approach from current evidence instead of silently choosing a hardcoded framework.
|
|
49
|
+
- No visual reference provided: synthesize one modern conceptual anchor first, then derive typography, spacing, morphology, motion, and responsive behavior from that anchor.
|
|
50
|
+
- Modern UI claims: research current-year libraries and patterns when relevant; 2026 work should use 2026 evidence, and future years should update automatically through agent research.
|
|
51
|
+
- Anti-generic rule: avoid safe dashboard shells, admin panels, card grids, scale-only mobile layouts, and static no-motion interfaces unless the product context explicitly justifies them.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
40
55
|
## MCP Quick Setup (VS Code)
|
|
41
56
|
|
|
42
57
|
1. Generate workspace MCP config:
|
|
@@ -51,8 +51,6 @@ function buildStructureFirstSeedSignals({
|
|
|
51
51
|
|
|
52
52
|
return {
|
|
53
53
|
designPhilosophy: `Use ${evidenceSourceLabel} to synthesize the design system for ${projectName || 'this project'}. This seed is only a decision scaffold: the LLM must choose the visual language, libraries, color system, typography, spacing, and interaction model from ${projectContextLabel}, current repo evidence, and live official documentation when a technology claim is needed.`,
|
|
54
|
-
brandAdjectives: ['agent-synthesized-from-current-context'],
|
|
55
|
-
antiAdjectives: ['offline-prescribed-style', 'template-by-default', 'scale-only-responsive', 'unresearched-library-choice'],
|
|
56
54
|
typographyScaleRatio: 'agent-calibrated-from-content-platform-and-readability',
|
|
57
55
|
baseGridUnit: 'agent-calibrated-from-platform-density-and-implementation-stack',
|
|
58
56
|
spacingPattern: 'agent-defined-from-task-flow-and-viewport-needs',
|
|
@@ -60,16 +58,9 @@ function buildStructureFirstSeedSignals({
|
|
|
60
58
|
colorIntent: `Choose semantic palette roles from ${projectContextLabel}, current repo evidence, and accessibility needs. Do not inherit fixed palettes or generic SaaS color defaults from this scaffold.`,
|
|
61
59
|
paletteRoles: ['agent-defined-semantic-roles'],
|
|
62
60
|
distinctiveMoves: [
|
|
63
|
-
'
|
|
64
|
-
'Define at least one recognizable design move from the product task, audience, content, and repo evidence before implementation.',
|
|
65
|
-
'Document why the chosen move belongs to this project and which common LLM bad habit it intentionally avoids.',
|
|
61
|
+
'Choose one recognizable design move from product task, audience, content, repo evidence, and current docs; do not inherit a scaffold preset.',
|
|
66
62
|
],
|
|
67
63
|
motionPurpose: 'Use modern motion when it improves hierarchy, continuity, feedback, memorability, or perceived product quality. If implementation needs a motion library, the LLM must choose a current compatible option from official docs instead of relying on an offline default.',
|
|
68
|
-
motionChoreography: 'Define choreography from the product experience and implementation stack. Keep it performant and reduced-motion-safe; do not suppress rich interaction by default.',
|
|
69
|
-
motionDurations: {
|
|
70
|
-
desktop: 'agent-calibrated',
|
|
71
|
-
mobile: 'agent-calibrated',
|
|
72
|
-
},
|
|
73
64
|
componentMorphology: {
|
|
74
65
|
mobile: 'Recompose the experience for touch, task priority, and constrained attention. Mobile should be a deliberate mobile design, not a shrunken desktop.',
|
|
75
66
|
tablet: 'Regroup surfaces for medium-width use, preserving task clarity without cloning either desktop or mobile blindly.',
|
|
@@ -121,8 +112,6 @@ function buildDesignIntentContractObject({
|
|
|
121
112
|
: toTitleCase(initContext.blueprintFileName),
|
|
122
113
|
},
|
|
123
114
|
designPhilosophy: inferredKeywords.designPhilosophy,
|
|
124
|
-
brandAdjectives: inferredKeywords.brandAdjectives,
|
|
125
|
-
antiAdjectives: inferredKeywords.antiAdjectives,
|
|
126
115
|
visualDirection: {
|
|
127
116
|
seedMode: 'scaffold-only',
|
|
128
117
|
requiresProjectSpecificSynthesis: true,
|
|
@@ -139,11 +128,8 @@ function buildDesignIntentContractObject({
|
|
|
139
128
|
candidateDomains: [
|
|
140
129
|
'visual-direction',
|
|
141
130
|
'motion-and-scroll',
|
|
142
|
-
'ui-primitives',
|
|
143
|
-
'
|
|
144
|
-
'charts-and-data-visualization',
|
|
145
|
-
'icons-and-illustration',
|
|
146
|
-
'typography-and-interaction-patterns',
|
|
131
|
+
'ui-primitives-or-rich-media',
|
|
132
|
+
'typography-and-interaction',
|
|
147
133
|
],
|
|
148
134
|
finalDecisionAuthority: 'agent-llm-from-project-fit-accessibility-performance-maintainability-and-current-official-docs',
|
|
149
135
|
},
|
|
@@ -151,33 +137,44 @@ function buildDesignIntentContractObject({
|
|
|
151
137
|
mode: 'required-when-no-external-research',
|
|
152
138
|
seedMode: 'selection-policy-only',
|
|
153
139
|
requiresAgentSelectionBeforeUiImplementation: true,
|
|
140
|
+
userResearchAbsencePolicy: {
|
|
141
|
+
userSuppliedResearchOnly: true,
|
|
142
|
+
scaffoldSeedDoesNotCountAsResearch: true,
|
|
143
|
+
priorUiDoesNotCountAsResearch: true,
|
|
144
|
+
requireAgentLedResearchWhenAvailable: true,
|
|
145
|
+
},
|
|
154
146
|
candidateSelectionPolicy: {
|
|
155
147
|
considerAtLeast: 3,
|
|
148
|
+
discardObviousCandidateCount: 2,
|
|
149
|
+
minimumCandidateDistance: 'high',
|
|
156
150
|
discardPredictableCandidates: true,
|
|
151
|
+
preferDistinctiveOverSafe: true,
|
|
157
152
|
doNotRevealHiddenCandidateList: true,
|
|
158
153
|
outputOnlyChosenAnchor: true,
|
|
159
154
|
},
|
|
160
155
|
forbiddenFinalAnchorTerms: [
|
|
161
156
|
'dashboard',
|
|
162
|
-
'portal',
|
|
163
157
|
'cards',
|
|
164
158
|
'admin-panel',
|
|
165
159
|
'saas-shell',
|
|
166
160
|
'minimalist-interface',
|
|
161
|
+
'safe-admin-layout',
|
|
167
162
|
],
|
|
168
163
|
sourceDomains: [
|
|
169
164
|
'complex-physical-engineering',
|
|
170
|
-
'
|
|
165
|
+
'cinematic-spatial-interface',
|
|
171
166
|
'experimental-editorial-structure',
|
|
172
|
-
'advanced-architecture',
|
|
173
167
|
'scientific-instrumentation',
|
|
174
|
-
'
|
|
168
|
+
'premium-interactive-web-experiences',
|
|
175
169
|
],
|
|
170
|
+
visualRiskBudget: {
|
|
171
|
+
mode: 'high-distinctiveness-with-accessibility-and-performance-guardrails',
|
|
172
|
+
allowRichMotionAndMicroInteraction: true,
|
|
173
|
+
rejectTimidDefaultWhenAnchorSupportsExpressiveUi: true,
|
|
174
|
+
requireReducedMotionFallback: true,
|
|
175
|
+
},
|
|
176
176
|
requiredDerivedAxes: [
|
|
177
177
|
'typography',
|
|
178
|
-
'spacing',
|
|
179
|
-
'density',
|
|
180
|
-
'color-behavior',
|
|
181
178
|
'morphology',
|
|
182
179
|
'motion',
|
|
183
180
|
'responsive-composition',
|
|
@@ -185,19 +182,21 @@ function buildDesignIntentContractObject({
|
|
|
185
182
|
finalAnchorContract: {
|
|
186
183
|
requiredFields: [
|
|
187
184
|
'name',
|
|
185
|
+
'agentResearchMode',
|
|
188
186
|
'sourceDomain',
|
|
189
187
|
'rationale',
|
|
190
188
|
'derivedTokenLogic',
|
|
189
|
+
'visualRiskBudget',
|
|
190
|
+
'motionRiskBudget',
|
|
191
191
|
'cohesionChecks',
|
|
192
192
|
],
|
|
193
193
|
derivedTokenLogicAxes: [
|
|
194
|
-
'typography',
|
|
195
|
-
'spacing',
|
|
196
|
-
'density',
|
|
197
|
-
'color-behavior',
|
|
198
194
|
'morphology',
|
|
199
195
|
'motion',
|
|
200
|
-
|
|
196
|
+
],
|
|
197
|
+
cohesionChecks: [
|
|
198
|
+
'no-dashboard-mental-model',
|
|
199
|
+
'motion-derived-from-anchor',
|
|
201
200
|
],
|
|
202
201
|
},
|
|
203
202
|
},
|
|
@@ -217,7 +216,6 @@ function buildDesignIntentContractObject({
|
|
|
217
216
|
componentTokensConsumeSemantic: true,
|
|
218
217
|
forbidDirectComponentPrimitiveBypass: true,
|
|
219
218
|
aliasReferenceStyle: 'brace-reference',
|
|
220
|
-
aliasingStrategy: 'Primitive tokens hold raw values, semantic tokens carry intent, and component tokens consume semantic aliases instead of raw values.',
|
|
221
219
|
fallbackPolicy: {
|
|
222
220
|
forbidRawHexOutsidePrimitives: true,
|
|
223
221
|
forbidRawSpacingOutsidePrimitives: true,
|
|
@@ -228,12 +226,6 @@ function buildDesignIntentContractObject({
|
|
|
228
226
|
forbidDotsInNames: true,
|
|
229
227
|
forbidSquareBracketsInNames: true,
|
|
230
228
|
},
|
|
231
|
-
tokenLayerRoles: {
|
|
232
|
-
primitive: 'Raw values such as colors, spacing, radius, typography, and motion primitives.',
|
|
233
|
-
semantic: 'Contextual intent tokens such as primary action, muted surface, emphasis text, or critical state.',
|
|
234
|
-
component: 'Component-scoped tokens that consume semantic aliases and preserve local consistency without redefining the system.',
|
|
235
|
-
},
|
|
236
|
-
platformOutputs: ['json-contract', 'css-variables'],
|
|
237
229
|
},
|
|
238
230
|
colorTruth: {
|
|
239
231
|
format: 'OKLCH',
|
|
@@ -253,19 +245,14 @@ function buildDesignIntentContractObject({
|
|
|
253
245
|
motionSystem: {
|
|
254
246
|
allowMeaningfulMotion: true,
|
|
255
247
|
purpose: inferredKeywords.motionPurpose,
|
|
256
|
-
choreography: inferredKeywords.motionChoreography,
|
|
257
|
-
desktopDurationMs: inferredKeywords.motionDurations.desktop,
|
|
258
|
-
mobileDurationMs: inferredKeywords.motionDurations.mobile,
|
|
259
248
|
seedToneLocked: false,
|
|
260
249
|
respectReducedMotion: true,
|
|
261
|
-
preferTransformAndOpacity: true,
|
|
262
|
-
avoidDecorativeMotionForItsOwnSake: true,
|
|
263
250
|
},
|
|
264
251
|
componentMorphology: {
|
|
265
252
|
requireStateBehaviorMatrix: true,
|
|
266
253
|
preserveIdentityAcrossViewports: true,
|
|
267
254
|
seedBehaviorsRequireRefinement: true,
|
|
268
|
-
stateKeys: ['default', '
|
|
255
|
+
stateKeys: ['default', 'focus', 'loading', 'error'],
|
|
269
256
|
viewportBehavior: inferredKeywords.componentMorphology,
|
|
270
257
|
},
|
|
271
258
|
accessibilityPolicy: {
|
|
@@ -322,45 +309,33 @@ function buildDesignIntentContractObject({
|
|
|
322
309
|
status: 'seed-needs-refinement',
|
|
323
310
|
seedMode: 'structure-first-scaffold',
|
|
324
311
|
requiresTaskSpecificRefinement: true,
|
|
325
|
-
primaryExperienceGoal: `
|
|
312
|
+
primaryExperienceGoal: `Define the main ${String(primaryDomain || 'product').toLowerCase()} journey for ${projectName} from repo evidence, the brief, and current docs. The seed must not prescribe final layout.`,
|
|
326
313
|
surfacePlan: [
|
|
327
314
|
{
|
|
328
315
|
surfaceId: 'agent-defined-primary-experience',
|
|
329
|
-
role: '
|
|
330
|
-
goal:
|
|
331
|
-
|
|
332
|
-
supportingModules: ['agent-defined-from-current-context'],
|
|
333
|
-
layoutAntiPatternToAvoid: 'template-default-without-product-rationale',
|
|
334
|
-
signatureMoveHint: 'Choose and document one project-specific visual, interaction, or content move. Do not inherit it from this scaffold.',
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
surfaceId: 'agent-defined-supporting-experience',
|
|
338
|
-
role: 'llm-synthesized-supporting-context',
|
|
339
|
-
goal: 'Define supporting, proof, utility, or recovery surfaces from actual user needs instead of cloning generic cards or rails.',
|
|
340
|
-
primaryAction: 'The LLM must decide what belongs beside, below, hidden behind disclosure, or removed based on task priority.',
|
|
341
|
-
supportingModules: ['agent-defined-from-current-context'],
|
|
342
|
-
layoutAntiPatternToAvoid: 'scale-only-responsive-layout',
|
|
343
|
-
signatureMoveHint: 'Explain how supporting content changes across viewports and why the change improves the experience.',
|
|
316
|
+
role: 'primary-context-synthesized-by-agent',
|
|
317
|
+
goal: 'Choose the first task or reading path from product evidence and reject template shells.',
|
|
318
|
+
antiPatterns: ['dashboard-default', 'scale-only-responsive-layout'],
|
|
344
319
|
},
|
|
345
320
|
],
|
|
346
321
|
componentGraph: {
|
|
347
322
|
nodes: [
|
|
348
323
|
{
|
|
349
|
-
id: '
|
|
350
|
-
role: '
|
|
324
|
+
id: 'primary-experience',
|
|
325
|
+
role: 'agent-defined-primary',
|
|
351
326
|
priority: 'high',
|
|
352
327
|
},
|
|
353
328
|
{
|
|
354
|
-
id: '
|
|
355
|
-
role: '
|
|
329
|
+
id: 'supporting-context',
|
|
330
|
+
role: 'agent-defined-support',
|
|
356
331
|
priority: 'medium',
|
|
357
332
|
},
|
|
358
333
|
],
|
|
359
334
|
edges: [
|
|
360
335
|
{
|
|
361
|
-
from: '
|
|
362
|
-
to: '
|
|
363
|
-
relationship: '
|
|
336
|
+
from: 'primary-experience',
|
|
337
|
+
to: 'supporting-context',
|
|
338
|
+
relationship: 'task-priority-support',
|
|
364
339
|
},
|
|
365
340
|
],
|
|
366
341
|
},
|
|
@@ -379,25 +354,21 @@ function buildDesignIntentContractObject({
|
|
|
379
354
|
mobile: {
|
|
380
355
|
primaryOperation: 'agent-defined-mobile-recomposition',
|
|
381
356
|
requiredSurfaceActions: [
|
|
382
|
-
'choose-mobile-
|
|
383
|
-
'
|
|
384
|
-
'adapt-interaction-model-for-touch',
|
|
357
|
+
'choose-mobile-task-order',
|
|
358
|
+
'disclose-or-remove-low-priority-content',
|
|
385
359
|
],
|
|
386
360
|
forbiddenPatterns: [
|
|
387
361
|
'scale-only-shrink',
|
|
388
|
-
'desktop-order-preserved-without-priority-shift',
|
|
389
362
|
],
|
|
390
363
|
rationale: inferredKeywords.mutationRules.mobile,
|
|
391
364
|
},
|
|
392
365
|
tablet: {
|
|
393
366
|
primaryOperation: 'agent-defined-tablet-regrouping',
|
|
394
367
|
requiredSurfaceActions: [
|
|
395
|
-
'define-medium-width-
|
|
396
|
-
'avoid-cloning-desktop-by-width-only',
|
|
368
|
+
'define-medium-width-grouping',
|
|
397
369
|
'preserve-task-clarity',
|
|
398
370
|
],
|
|
399
371
|
forbiddenPatterns: [
|
|
400
|
-
'desktop-layout-reduced-by-width-only',
|
|
401
372
|
'uniform-module-grid-without-role-change',
|
|
402
373
|
],
|
|
403
374
|
rationale: inferredKeywords.mutationRules.tablet,
|
|
@@ -406,11 +377,9 @@ function buildDesignIntentContractObject({
|
|
|
406
377
|
primaryOperation: 'agent-defined-desktop-composition',
|
|
407
378
|
requiredSurfaceActions: [
|
|
408
379
|
'use-space-to-improve-hierarchy',
|
|
409
|
-
'define-scan-pattern-and-action-priority',
|
|
410
380
|
'avoid-equalizing-unrelated-content',
|
|
411
381
|
],
|
|
412
382
|
forbiddenPatterns: [
|
|
413
|
-
'template-shell-without-product-rationale',
|
|
414
383
|
'interchangeable-dashboard-or-landing-chrome',
|
|
415
384
|
],
|
|
416
385
|
rationale: inferredKeywords.mutationRules.desktop,
|
|
@@ -418,33 +387,25 @@ function buildDesignIntentContractObject({
|
|
|
418
387
|
},
|
|
419
388
|
interactionStateMatrix: [
|
|
420
389
|
{
|
|
421
|
-
componentId: 'primary-
|
|
422
|
-
states: ['default', 'hover', 'focus', 'loading', '
|
|
423
|
-
notes: 'Refine
|
|
424
|
-
},
|
|
425
|
-
{
|
|
426
|
-
componentId: 'primary-content-module',
|
|
427
|
-
states: ['default', 'focus', 'expanded', 'loading', 'error'],
|
|
428
|
-
notes: 'Refine this module so it preserves hierarchy and progressive disclosure without collapsing into anonymous cards or safe default dashboard panels.',
|
|
390
|
+
componentId: 'primary-interaction',
|
|
391
|
+
states: ['default', 'hover', 'focus', 'loading', 'error'],
|
|
392
|
+
notes: 'Refine states from project language and the conceptual anchor; do not use anonymous default panels.',
|
|
429
393
|
},
|
|
430
394
|
],
|
|
431
395
|
taskFlowNarrative: [
|
|
432
|
-
`Entry:
|
|
433
|
-
'
|
|
434
|
-
'Resolution: the LLM must define feedback, recovery, and next-useful-action behavior without defaulting to leftover template chrome.',
|
|
396
|
+
`Entry: define how ${projectName} starts the journey from real evidence, not a generic opener.`,
|
|
397
|
+
'Resolution: define proof, feedback, recovery, and next action without leftover template chrome.',
|
|
435
398
|
],
|
|
436
399
|
visualResetStrategy: {
|
|
437
400
|
activatesWhenUserRequests: [
|
|
438
401
|
'redesign from zero',
|
|
439
402
|
'redesain dari 0',
|
|
440
|
-
'ulang dari 0',
|
|
441
|
-
'research ulang',
|
|
442
403
|
],
|
|
443
|
-
existingUiAllowedAs: ['content-evidence', 'behavior-evidence', '
|
|
444
|
-
existingUiForbiddenAs: ['palette-source', '
|
|
445
|
-
requiredResetAxes: ['composition', 'hierarchy', '
|
|
404
|
+
existingUiAllowedAs: ['content-evidence', 'behavior-evidence', 'asset-source-evidence'],
|
|
405
|
+
existingUiForbiddenAs: ['palette-source', 'layout-source', 'motion-source'],
|
|
406
|
+
requiredResetAxes: ['composition', 'hierarchy', 'motion-or-interaction', 'responsive-information-architecture'],
|
|
446
407
|
},
|
|
447
|
-
signatureMoveRationale: '
|
|
408
|
+
signatureMoveRationale: 'Agent must choose one project-specific visual, motion, typographic, or interaction move and explain why generic fallback weakens it.',
|
|
448
409
|
implementationGuardrails: {
|
|
449
410
|
requireBuildFromHandoff: true,
|
|
450
411
|
requireGapNotesBeforeFallback: true,
|
|
@@ -486,21 +447,18 @@ function buildDesignIntentContractObject({
|
|
|
486
447
|
'unresearched-library-or-framework-choice',
|
|
487
448
|
'missing-conceptual-anchor-without-external-research',
|
|
488
449
|
'visual-decisions-not-derived-from-conceptual-anchor',
|
|
489
|
-
'
|
|
450
|
+
'timid-anchor-that-renames-dashboard-or-admin-shell',
|
|
451
|
+
'motion-suppressed-without-accessibility-or-performance-reason',
|
|
490
452
|
'scale-only-responsive-layout',
|
|
491
|
-
'template-shell-without-product-rationale',
|
|
492
453
|
'zero-based-redesign-kept-prior-visual-dna',
|
|
493
454
|
'restyle-instead-of-recomposition',
|
|
494
|
-
'inaccessible-or-decorative-motion',
|
|
495
455
|
],
|
|
496
456
|
validBoldSignals: [
|
|
497
457
|
'single-cohesive-conceptual-anchor',
|
|
458
|
+
'high-variance-candidate-selection',
|
|
498
459
|
'context-derived-visual-direction',
|
|
499
|
-
'official-docs-backed-library-choice',
|
|
500
460
|
'responsive-recomposition-by-task-priority',
|
|
501
461
|
'purposeful-motion-with-reduced-motion-path',
|
|
502
|
-
'documented-design-rationale-before-code',
|
|
503
|
-
'clean-component-and-token-architecture',
|
|
504
462
|
],
|
|
505
463
|
reportingRules: {
|
|
506
464
|
mustExplainGenericity: true,
|
|
@@ -528,10 +486,7 @@ function buildDesignIntentContractObject({
|
|
|
528
486
|
approvedExternalConstraintUsage: 'Convert explicit user-supplied external constraints into current-project rules without comparing against or imitating the source surface.',
|
|
529
487
|
driftSignals: [
|
|
530
488
|
'palette-reused-without-brief-support',
|
|
531
|
-
'motion-signature-reused-without-approval',
|
|
532
|
-
'layout-shape-matches-unrelated-project-memory',
|
|
533
489
|
'prior-ui-visual-dna-carried-into-reset-request',
|
|
534
|
-
'existing-design-doc-treated-as-style-continuity-during-zero-based-redesign',
|
|
535
490
|
],
|
|
536
491
|
},
|
|
537
492
|
experiencePrinciples: [
|
|
@@ -539,20 +494,17 @@ function buildDesignIntentContractObject({
|
|
|
539
494
|
'Major interface decisions must be explainable in product and user terms.',
|
|
540
495
|
'Accessibility, responsiveness, and implementation realism are non-negotiable.',
|
|
541
496
|
'Cross-viewport behavior must reorganize tasks and navigation, not just scale the desktop layout down.',
|
|
542
|
-
'
|
|
543
|
-
'
|
|
544
|
-
'At least one visual, interaction, content, or motion decision must be recognizable at a glance and justified from context.',
|
|
545
|
-
'When no external design research is provided, a single advanced conceptual anchor must unify typography, spacing, morphology, motion, and responsive composition.',
|
|
497
|
+
'A single agent-chosen conceptual anchor must unify typography, spacing, morphology, motion, and responsive composition when user research is absent.',
|
|
498
|
+
'Expressive motion and spatial interaction are allowed when they support the anchor and remain accessible and performant.',
|
|
546
499
|
'When the user asks for a zero-based redesign, existing UI becomes content and behavior evidence only; prior visual DNA must be discarded unless explicitly approved.',
|
|
547
500
|
],
|
|
548
501
|
forbiddenPatterns: [
|
|
549
502
|
'offline-prescribed-style-used-as-final-direction',
|
|
550
|
-
'unresearched-library-or-framework-choice',
|
|
551
503
|
'missing-conceptual-anchor-without-external-research',
|
|
552
504
|
'visual-decisions-not-derived-from-conceptual-anchor',
|
|
553
|
-
'
|
|
505
|
+
'timid-anchor-that-renames-dashboard-or-admin-shell',
|
|
506
|
+
'motion-suppressed-without-accessibility-or-performance-reason',
|
|
554
507
|
'scale-only-responsive-layout',
|
|
555
|
-
'template-shell-without-product-rationale',
|
|
556
508
|
'zero-based-redesign-kept-prior-visual-dna',
|
|
557
509
|
'restyle-instead-of-recomposition',
|
|
558
510
|
'single-safe-typographic-family-without-role-contrast-or-rationale',
|
|
@@ -572,6 +524,8 @@ function buildDesignIntentContractObject({
|
|
|
572
524
|
requireStructuredDesignHandoff: true,
|
|
573
525
|
requireVisualResetStrategyWhenZeroBasedRedesignRequested: true,
|
|
574
526
|
requireConceptualAnchorWhenNoExternalResearch: true,
|
|
527
|
+
requireAgentLedAnchorResearchWhenUserResearchMissing: true,
|
|
528
|
+
rejectTimidDashboardAnchor: true,
|
|
575
529
|
requireReviewRubric: true,
|
|
576
530
|
requireGenericityExplanation: true,
|
|
577
531
|
genericityAutoFail: true,
|
|
@@ -652,6 +606,23 @@ export function validateDesignIntentContract(designIntentContract) {
|
|
|
652
606
|
if (conceptualAnchor.requiresAgentSelectionBeforeUiImplementation !== true) {
|
|
653
607
|
validationErrors.push('designIntent.conceptualAnchor.requiresAgentSelectionBeforeUiImplementation must equal true.');
|
|
654
608
|
}
|
|
609
|
+
const userResearchAbsencePolicy = conceptualAnchor.userResearchAbsencePolicy;
|
|
610
|
+
if (!userResearchAbsencePolicy || typeof userResearchAbsencePolicy !== 'object') {
|
|
611
|
+
validationErrors.push('designIntent.conceptualAnchor.userResearchAbsencePolicy must exist.');
|
|
612
|
+
} else {
|
|
613
|
+
if (userResearchAbsencePolicy.userSuppliedResearchOnly !== true) {
|
|
614
|
+
validationErrors.push('designIntent.conceptualAnchor.userResearchAbsencePolicy.userSuppliedResearchOnly must equal true.');
|
|
615
|
+
}
|
|
616
|
+
if (userResearchAbsencePolicy.scaffoldSeedDoesNotCountAsResearch !== true) {
|
|
617
|
+
validationErrors.push('designIntent.conceptualAnchor.userResearchAbsencePolicy.scaffoldSeedDoesNotCountAsResearch must equal true.');
|
|
618
|
+
}
|
|
619
|
+
if (userResearchAbsencePolicy.priorUiDoesNotCountAsResearch !== true) {
|
|
620
|
+
validationErrors.push('designIntent.conceptualAnchor.userResearchAbsencePolicy.priorUiDoesNotCountAsResearch must equal true.');
|
|
621
|
+
}
|
|
622
|
+
if (userResearchAbsencePolicy.requireAgentLedResearchWhenAvailable !== true) {
|
|
623
|
+
validationErrors.push('designIntent.conceptualAnchor.userResearchAbsencePolicy.requireAgentLedResearchWhenAvailable must equal true.');
|
|
624
|
+
}
|
|
625
|
+
}
|
|
655
626
|
const candidateSelectionPolicy = conceptualAnchor.candidateSelectionPolicy;
|
|
656
627
|
if (!candidateSelectionPolicy || typeof candidateSelectionPolicy !== 'object') {
|
|
657
628
|
validationErrors.push('designIntent.conceptualAnchor.candidateSelectionPolicy must exist.');
|
|
@@ -659,9 +630,18 @@ export function validateDesignIntentContract(designIntentContract) {
|
|
|
659
630
|
if (candidateSelectionPolicy.considerAtLeast < 3) {
|
|
660
631
|
validationErrors.push('designIntent.conceptualAnchor.candidateSelectionPolicy.considerAtLeast must be at least 3.');
|
|
661
632
|
}
|
|
633
|
+
if (candidateSelectionPolicy.discardObviousCandidateCount < 2) {
|
|
634
|
+
validationErrors.push('designIntent.conceptualAnchor.candidateSelectionPolicy.discardObviousCandidateCount must be at least 2.');
|
|
635
|
+
}
|
|
636
|
+
if (candidateSelectionPolicy.minimumCandidateDistance !== 'high') {
|
|
637
|
+
validationErrors.push('designIntent.conceptualAnchor.candidateSelectionPolicy.minimumCandidateDistance must equal "high".');
|
|
638
|
+
}
|
|
662
639
|
if (candidateSelectionPolicy.discardPredictableCandidates !== true) {
|
|
663
640
|
validationErrors.push('designIntent.conceptualAnchor.candidateSelectionPolicy.discardPredictableCandidates must equal true.');
|
|
664
641
|
}
|
|
642
|
+
if (candidateSelectionPolicy.preferDistinctiveOverSafe !== true) {
|
|
643
|
+
validationErrors.push('designIntent.conceptualAnchor.candidateSelectionPolicy.preferDistinctiveOverSafe must equal true.');
|
|
644
|
+
}
|
|
665
645
|
if (candidateSelectionPolicy.doNotRevealHiddenCandidateList !== true) {
|
|
666
646
|
validationErrors.push('designIntent.conceptualAnchor.candidateSelectionPolicy.doNotRevealHiddenCandidateList must equal true.');
|
|
667
647
|
}
|
|
@@ -673,6 +653,7 @@ export function validateDesignIntentContract(designIntentContract) {
|
|
|
673
653
|
!Array.isArray(conceptualAnchor.forbiddenFinalAnchorTerms)
|
|
674
654
|
|| !conceptualAnchor.forbiddenFinalAnchorTerms.includes('dashboard')
|
|
675
655
|
|| !conceptualAnchor.forbiddenFinalAnchorTerms.includes('cards')
|
|
656
|
+
|| !conceptualAnchor.forbiddenFinalAnchorTerms.includes('safe-admin-layout')
|
|
676
657
|
) {
|
|
677
658
|
validationErrors.push('designIntent.conceptualAnchor.forbiddenFinalAnchorTerms must reject basic UI labels.');
|
|
678
659
|
}
|
|
@@ -680,9 +661,28 @@ export function validateDesignIntentContract(designIntentContract) {
|
|
|
680
661
|
!Array.isArray(conceptualAnchor.sourceDomains)
|
|
681
662
|
|| conceptualAnchor.sourceDomains.length < 4
|
|
682
663
|
|| !conceptualAnchor.sourceDomains.includes('complex-physical-engineering')
|
|
664
|
+
|| !conceptualAnchor.sourceDomains.includes('cinematic-spatial-interface')
|
|
665
|
+
|| !conceptualAnchor.sourceDomains.includes('premium-interactive-web-experiences')
|
|
683
666
|
) {
|
|
684
667
|
validationErrors.push('designIntent.conceptualAnchor.sourceDomains must list broad non-template anchor domains.');
|
|
685
668
|
}
|
|
669
|
+
const visualRiskBudget = conceptualAnchor.visualRiskBudget;
|
|
670
|
+
if (!visualRiskBudget || typeof visualRiskBudget !== 'object') {
|
|
671
|
+
validationErrors.push('designIntent.conceptualAnchor.visualRiskBudget must exist.');
|
|
672
|
+
} else {
|
|
673
|
+
if (visualRiskBudget.mode !== 'high-distinctiveness-with-accessibility-and-performance-guardrails') {
|
|
674
|
+
validationErrors.push('designIntent.conceptualAnchor.visualRiskBudget.mode must preserve high-distinctiveness guardrails.');
|
|
675
|
+
}
|
|
676
|
+
if (visualRiskBudget.allowRichMotionAndMicroInteraction !== true) {
|
|
677
|
+
validationErrors.push('designIntent.conceptualAnchor.visualRiskBudget.allowRichMotionAndMicroInteraction must equal true.');
|
|
678
|
+
}
|
|
679
|
+
if (visualRiskBudget.rejectTimidDefaultWhenAnchorSupportsExpressiveUi !== true) {
|
|
680
|
+
validationErrors.push('designIntent.conceptualAnchor.visualRiskBudget.rejectTimidDefaultWhenAnchorSupportsExpressiveUi must equal true.');
|
|
681
|
+
}
|
|
682
|
+
if (visualRiskBudget.requireReducedMotionFallback !== true) {
|
|
683
|
+
validationErrors.push('designIntent.conceptualAnchor.visualRiskBudget.requireReducedMotionFallback must equal true.');
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
686
|
if (
|
|
687
687
|
!Array.isArray(conceptualAnchor.requiredDerivedAxes)
|
|
688
688
|
|| !conceptualAnchor.requiredDerivedAxes.includes('typography')
|
|
@@ -696,10 +696,13 @@ export function validateDesignIntentContract(designIntentContract) {
|
|
|
696
696
|
} else {
|
|
697
697
|
if (
|
|
698
698
|
!Array.isArray(finalAnchorContract.requiredFields)
|
|
699
|
+
|| !finalAnchorContract.requiredFields.includes('agentResearchMode')
|
|
699
700
|
|| !finalAnchorContract.requiredFields.includes('derivedTokenLogic')
|
|
701
|
+
|| !finalAnchorContract.requiredFields.includes('visualRiskBudget')
|
|
702
|
+
|| !finalAnchorContract.requiredFields.includes('motionRiskBudget')
|
|
700
703
|
|| !finalAnchorContract.requiredFields.includes('cohesionChecks')
|
|
701
704
|
) {
|
|
702
|
-
validationErrors.push('designIntent.conceptualAnchor.finalAnchorContract.requiredFields must require derivedTokenLogic and cohesionChecks.');
|
|
705
|
+
validationErrors.push('designIntent.conceptualAnchor.finalAnchorContract.requiredFields must require agentResearchMode, derivedTokenLogic, visualRiskBudget, motionRiskBudget, and cohesionChecks.');
|
|
703
706
|
}
|
|
704
707
|
if (
|
|
705
708
|
!Array.isArray(finalAnchorContract.derivedTokenLogicAxes)
|
|
@@ -708,6 +711,13 @@ export function validateDesignIntentContract(designIntentContract) {
|
|
|
708
711
|
) {
|
|
709
712
|
validationErrors.push('designIntent.conceptualAnchor.finalAnchorContract.derivedTokenLogicAxes must include motion and morphology.');
|
|
710
713
|
}
|
|
714
|
+
if (
|
|
715
|
+
!Array.isArray(finalAnchorContract.cohesionChecks)
|
|
716
|
+
|| !finalAnchorContract.cohesionChecks.includes('no-dashboard-mental-model')
|
|
717
|
+
|| !finalAnchorContract.cohesionChecks.includes('motion-derived-from-anchor')
|
|
718
|
+
) {
|
|
719
|
+
validationErrors.push('designIntent.conceptualAnchor.finalAnchorContract.cohesionChecks must reject dashboard mental models and require motion derivation.');
|
|
720
|
+
}
|
|
711
721
|
}
|
|
712
722
|
}
|
|
713
723
|
|
|
@@ -176,7 +176,9 @@ export function buildDesignBootstrapPrompt({
|
|
|
176
176
|
'30. In zero-based redesign mode, the new contract must name the discarded prior visual DNA and materially reset composition, hierarchy, palette/typography, motion or interaction, and responsive information architecture.',
|
|
177
177
|
'31. If modern UI, animation, scroll, 3D, canvas, chart, or icon libraries are useful, choose them from current official docs and record source URL, fetched date, reason, risk, and accessibility fallback.',
|
|
178
178
|
'32. If the user supplies research files, library lists, screenshots, articles, or benchmark notes, read them as candidate evidence, summarize the useful signals, filter by project fit, and verify technology claims against current official docs before implementation.',
|
|
179
|
-
'33. If no
|
|
179
|
+
'33. If no user-supplied research or reference is supplied for UI work, activate the Dynamic Avant-Garde Anchor Engine before coding. User-supplied research means current-task evidence from the user; this scaffold, prior UI, and old design docs do not count as research.',
|
|
180
|
+
'34. In Dynamic Avant-Garde mode, perform agent-led research when available, then internally consider at least three high-variance conceptual anchors, discard the two safest or most predictable options, output only the chosen anchor and rationale, and forbid final anchors named dashboard, portal, cards, admin panel, SaaS shell, web app shell, or minimalist interface.',
|
|
181
|
+
'35. The chosen anchor must drive typography, spacing, density, color behavior, morphology, motion, and responsive composition. If expressive motion, spatial transitions, micro-interactions, or modern animation libraries support the anchor, use them with performance notes and reduced-motion fallbacks instead of suppressing motion to look safe.',
|
|
180
182
|
'',
|
|
181
183
|
'## Project Inputs',
|
|
182
184
|
`- Project name: ${discoveryAnswers.projectName}`,
|
|
@@ -207,7 +209,8 @@ export function buildDesignBootstrapPrompt({
|
|
|
207
209
|
'12. Keep visualResetStrategy in the machine-readable handoff so reset-language tasks cannot quietly become restyles of the previous UI.',
|
|
208
210
|
'13. Preserve externalResearchIntake so user-provided research becomes reviewed evidence without turning into an offline style or dependency preset.',
|
|
209
211
|
'14. Preserve conceptualAnchor so prompt-only UI work has one cohesive non-template concept instead of a mixed collection of bold but unrelated visual decisions.',
|
|
210
|
-
'15.
|
|
212
|
+
'15. Record conceptualAnchor.agentResearchMode, visualRiskBudget, motionRiskBudget, and cohesionChecks so the final UI cannot quietly fall back to a timid dashboard/admin mental model.',
|
|
213
|
+
'16. After the contract exists, use it as a first-class source for future UI tasks.',
|
|
211
214
|
'',
|
|
212
215
|
].join('\n');
|
|
213
216
|
}
|