@ryuenn3123/agentic-senior-core 3.0.37 → 3.0.39
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 +109 -146
- package/.agent-context/rules/frontend-architecture.md +92 -108
- package/.agent-context/state/README.md +26 -0
- package/.agent-context/state/architecture-map.md +32 -17
- package/.agent-context/state/dependency-map.md +31 -22
- package/.cursor/mcp.json +10 -0
- package/.cursor/rules/agentic-senior-core.mdc +48 -0
- package/.cursorrules +22 -88
- package/.gemini/instructions.md +25 -16
- package/.github/copilot-instructions.md +25 -16
- package/.github/instructions/agentic-senior-core.instructions.md +47 -0
- package/.instructions.md +98 -207
- package/.windsurf/rules/agentic-senior-core.md +43 -0
- package/.windsurfrules +22 -88
- package/AGENTS.md +23 -26
- package/CLAUDE.md +43 -0
- package/CONTRIBUTING.md +7 -2
- package/GEMINI.md +43 -0
- package/README.md +25 -7
- package/lib/cli/backup.mjs +4 -4
- package/lib/cli/commands/init/project-context.mjs +101 -0
- package/lib/cli/commands/init/runtime-environment.mjs +59 -0
- package/lib/cli/commands/init/setup-decisions.mjs +83 -0
- package/lib/cli/commands/init.mjs +33 -250
- package/lib/cli/commands/optimize.mjs +1 -1
- package/lib/cli/commands/upgrade.mjs +34 -16
- package/lib/cli/compiler.mjs +59 -17
- package/lib/cli/constants.mjs +5 -0
- package/lib/cli/detector.mjs +4 -0
- package/lib/cli/init-detection-flow.mjs +9 -1
- package/lib/cli/init-selection.mjs +0 -5
- package/lib/cli/preflight.mjs +3 -3
- package/lib/cli/project-scaffolder/design-contract/validation.mjs +789 -0
- package/lib/cli/project-scaffolder/design-contract.mjs +119 -924
- package/lib/cli/project-scaffolder/prompt-builders.mjs +69 -84
- package/lib/cli/project-scaffolder.mjs +0 -2
- package/lib/cli/utils/filesystem.mjs +79 -0
- package/lib/cli/utils/managed-surface.mjs +237 -0
- package/lib/cli/utils/prompting.mjs +44 -0
- package/lib/cli/utils.mjs +33 -335
- package/package.json +21 -2
- package/scripts/bump-version.mjs +15 -13
- package/scripts/clean-local-artifacts.mjs +76 -0
- package/scripts/docs-quality-drift-report.mjs +5 -0
- package/scripts/frontend-usability-audit.mjs +23 -19
- package/scripts/governance-weekly-report.mjs +37 -15
- package/scripts/single-source-lazy-loading-audit.mjs +24 -0
- package/scripts/sync-thin-adapters.mjs +99 -129
- package/scripts/v3-purge-audit.mjs +5 -0
- package/scripts/validate/config.mjs +10 -0
- package/scripts/validate/coverage-checks.mjs +55 -0
- package/scripts/validate.mjs +20 -0
- package/.agent-context/marketplace/trust-tiers.json +0 -114
- package/.agent-context/state/benchmark-analysis.json +0 -431
- package/.agent-context/state/benchmark-evidence-bundle.json +0 -1040
- package/.agent-context/state/benchmark-history.json +0 -75
- package/.agent-context/state/benchmark-trend-report.csv +0 -5
- package/.agent-context/state/benchmark-trend-report.json +0 -140
- package/.agent-context/state/benchmark-writer-judge-matrix.json +0 -462
- package/.agent-context/state/memory-continuity-benchmark.json +0 -132
- package/.agent-context/state/onboarding-report.json +0 -102
- package/.agent-context/state/quality-trend-report.json +0 -89
- package/.agent-context/state/token-optimization-benchmark.json +0 -130
- package/.agent-context/state/weekly-governance-report.json +0 -329
- package/lib/cli/compatibility.mjs +0 -124
- package/scripts/validate-evidence-bundle.mjs +0 -76
|
@@ -1,168 +1,130 @@
|
|
|
1
1
|
# Bootstrap Dynamic Design Contract
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
- `docs/DESIGN.md` for human-readable design reasoning
|
|
5
|
-
- `docs/design-intent.json` for machine-readable design intent, guardrails, and review signals
|
|
3
|
+
Use this prompt for UI, UX, frontend layout, screen, Tailwind, animation, 3D, canvas, or redesign work.
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
Create or refine:
|
|
6
|
+
- `docs/DESIGN.md` for human-readable design reasoning.
|
|
7
|
+
- `docs/design-intent.json` for machine-readable design intent, guardrails, and review signals.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
This contract is a decision scaffold, not a style preset. We guide the agent; we do not pick the final style, stack, framework, palette, typography, layout paradigm, or animation library offline.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## Authority
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
- Treat `.agent-context/` and current project docs as technical authority.
|
|
14
|
+
- Treat `README.md` as overview, install, and user-facing context only. Do not use it as coding, architecture, or design authority when `.agent-context/` gives a stricter rule.
|
|
15
|
+
- Use current repo evidence, product copy, route names, component names, user goals, and existing constraints as the source of truth.
|
|
16
|
+
- Treat prior-chat visuals, unrelated project memory, benchmark screenshots, and famous-product aesthetics as tainted context unless the user explicitly approves continuity.
|
|
17
|
+
- Keep external references non-copying; extract constraints only.
|
|
18
|
+
- Before choosing a new UI, animation, scroll, 3D, canvas, chart, icon, styling, or component library, research current official docs.
|
|
19
|
+
|
|
20
|
+
## Required Order
|
|
21
|
+
|
|
22
|
+
1. Read `AGENTS.md`, this prompt, `../rules/frontend-architecture.md`, current UI code, current project docs, and existing design docs.
|
|
23
|
+
2. Refine existing `docs/DESIGN.md` and `docs/design-intent.json`; do not replace them blindly.
|
|
16
24
|
3. If either design doc is missing, create it before UI implementation.
|
|
17
|
-
4.
|
|
18
|
-
5.
|
|
19
|
-
6.
|
|
20
|
-
7. Keep external references non-copying: extract constraints and reasoning only, never clone the surface.
|
|
21
|
-
8. Record a Motion/Palette Decision before UI implementation; product categories are heuristics, not style presets, so override them with task, content density, brand intent, device/performance, and accessibility evidence.
|
|
25
|
+
4. Record `motionPaletteDecision` before UI code; product categories are heuristics, not style presets.
|
|
26
|
+
5. Encode `repoEvidence.designEvidenceSummary` when onboarding or detector evidence exists.
|
|
27
|
+
6. Keep both design docs synchronized after implementation.
|
|
22
28
|
|
|
23
29
|
## Creative Commitment Gate
|
|
24
30
|
|
|
25
|
-
Before broad compliance review or UI implementation,
|
|
26
|
-
- one
|
|
27
|
-
- one signature motion behavior
|
|
28
|
-
- one typographic decision
|
|
31
|
+
Before broad compliance review or UI implementation, record an agent-chosen visual direction in both design docs:
|
|
32
|
+
- one concrete real-world anchor reference
|
|
33
|
+
- one signature motion behavior more specific than "smooth"
|
|
34
|
+
- one typographic decision with meaningful role contrast
|
|
35
|
+
- one authored visual bet visible in the first viewport
|
|
29
36
|
|
|
30
|
-
|
|
37
|
+
Reject generic anchors. Do not accept "modern", "clean", "premium", "expressive", "minimal", or "bold" as the anchor. Name a material, instrument, artifact class, architectural system, editorial genre, cinematic behavior, exhibition system, scientific apparatus, or industrial mechanism.
|
|
31
38
|
|
|
32
|
-
|
|
39
|
+
## Dynamic Avant-Garde Anchor Engine
|
|
33
40
|
|
|
34
|
-
|
|
41
|
+
If no current-task research or visual reference exists, activate the Dynamic Avant-Garde Anchor Engine before coding.
|
|
35
42
|
|
|
36
|
-
|
|
43
|
+
Rules:
|
|
44
|
+
- Treat old design docs, prior UI, and scaffold seeds as evidence, not research.
|
|
45
|
+
- Internally consider at least three high-variance anchors.
|
|
46
|
+
- Discard the two safest or most predictable options.
|
|
47
|
+
- Output only the chosen anchor, specific reference point, and rationale.
|
|
48
|
+
- Forbid final anchors named dashboard, portal, cards, admin panel, SaaS shell, web app shell, or minimalist interface.
|
|
49
|
+
- Derive typography, spacing, density, color behavior, morphology, motion, and responsive composition from the chosen anchor.
|
|
50
|
+
- Use reduced-motion fallbacks instead of suppressing motion.
|
|
37
51
|
|
|
38
|
-
|
|
52
|
+
## Creative Ambition Floor
|
|
39
53
|
|
|
40
|
-
|
|
54
|
+
Before UI code, record:
|
|
55
|
+
- one product-derived palette move
|
|
56
|
+
- one signature motion, spatial, or interaction behavior
|
|
57
|
+
- one morphology or composition choice that avoids interchangeable card stacks when the product allows it
|
|
58
|
+
- at least three at-a-glance product-specific signals for new screens or broad redesigns
|
|
41
59
|
|
|
42
|
-
|
|
60
|
+
Do not ship AI-safe UI. Record exact drift signals in `reviewRubric`; at minimum reject decorative grid wallpaper, default line backgrounds, soft glow backgrounds, generic abstract marks, and first-output composition with only local copy swapped in when they have no product function.
|
|
43
61
|
|
|
44
|
-
|
|
62
|
+
## AI Color and Template Residue Audit
|
|
45
63
|
|
|
46
|
-
|
|
64
|
+
AI color drift happens when a palette uses safe defaults before product meaning.
|
|
47
65
|
|
|
48
|
-
|
|
66
|
+
Complete the AI color audit before coding:
|
|
67
|
+
- Explain what product evidence or anchorReference makes the palette fit.
|
|
68
|
+
- Name the color roles that carry task, status, data, or navigation meaning.
|
|
69
|
+
- Name one color behavior that would not transfer cleanly to another product category.
|
|
70
|
+
- Use visually exploratory, product-derived palettes while preserving WCAG contrast and status clarity.
|
|
49
71
|
|
|
50
|
-
|
|
72
|
+
Cream, slate, monochrome, purple-blue gradients, cyber-neon terminals, pale editorial surfaces, soft glow atmospheres, and dark control rooms are autopilot risks, not banned palettes.
|
|
51
73
|
|
|
52
|
-
|
|
74
|
+
## Motion and 3D Courage Rule
|
|
53
75
|
|
|
54
|
-
|
|
76
|
+
Motion, 3D, canvas, WebGL, scroll choreography, and modern animation libraries are first-class UI options when they improve understanding, exploration, feedback, hierarchy, memorability, or confidence.
|
|
55
77
|
|
|
56
|
-
|
|
78
|
+
Use modern, expressive interaction when it improves hierarchy, feedback, confidence, or memorability.
|
|
57
79
|
|
|
58
|
-
|
|
80
|
+
If rich motion or spatial UI is omitted, record the product, content-density, performance, accessibility, or device reason and the replacement interaction quality. "Not necessary" is not enough.
|
|
59
81
|
|
|
60
|
-
|
|
82
|
+
If 3D or canvas is used, record product role, interaction model, fallback path, runtime/library choice, loading state, keyboard path, and reduced-motion behavior.
|
|
61
83
|
|
|
62
|
-
|
|
63
|
-
- Why these colors instead of another palette? Answer in one sentence that references the anchorReference.
|
|
64
|
-
- Why this spacing rhythm? Answer in one sentence that references the anchorReference.
|
|
65
|
-
- Why this motion timing and easing? Answer in one sentence that references the anchorReference.
|
|
84
|
+
## Token Derivation Audit
|
|
66
85
|
|
|
67
|
-
|
|
86
|
+
Before implementation, `docs/design-intent.json` must include top-level `derivedTokenLogic`:
|
|
87
|
+
- `anchorReference`
|
|
88
|
+
- `colorDerivationSource`
|
|
89
|
+
- `spacingDerivationSource`
|
|
90
|
+
- `typographyDerivationSource`
|
|
91
|
+
- `motionDerivationSource`
|
|
92
|
+
- `validationRule`
|
|
93
|
+
|
|
94
|
+
Every token must trace to `anchorReference`. If the rationale is "looks good", "common practice", "modern default", or "framework default", revise the token before code.
|
|
68
95
|
|
|
69
96
|
## Library Research Protocol
|
|
70
97
|
|
|
71
98
|
If web search is available:
|
|
72
|
-
-
|
|
73
|
-
- Record source URL, fetched date, stable compatible version, purpose, risk, and fallback in `
|
|
74
|
-
- Set `libraryResearchStatus` to `verified` only when
|
|
99
|
+
- Verify each new UI-related library against current official docs.
|
|
100
|
+
- Record source URL, fetched date, stable compatible version, purpose, risk, and fallback in `libraryDecisions[]`.
|
|
101
|
+
- Set `libraryResearchStatus` to `verified` only when every external library decision has evidence.
|
|
75
102
|
|
|
76
|
-
If web search is unavailable
|
|
77
|
-
- Do not hallucinate
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
- Set `libraryResearchStatus` to `pending-verification` and give every `libraryDecisions[]` entry a `fallbackIfUnavailable`.
|
|
103
|
+
If web search is unavailable:
|
|
104
|
+
- Do not hallucinate package names, APIs, versions, or imports.
|
|
105
|
+
- Use native CSS, browser APIs, or already-present dependencies.
|
|
106
|
+
- Set `libraryResearchStatus` to `pending-verification`.
|
|
81
107
|
|
|
82
|
-
|
|
108
|
+
Treat unresearched dependency choices as review findings.
|
|
83
109
|
|
|
84
110
|
## Zero-Based Redesign Protocol
|
|
85
111
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
- The implementation must change composition, hierarchy, palette/typography, motion/interaction, and responsive information architecture. A palette swap, dark-mode flip, or same hero with new colors is failure.
|
|
93
|
-
- Keep product data, copy requirements, routes, accessibility needs, and required local assets intact unless the user explicitly says they may be removed.
|
|
94
|
-
- If a modern UI, animation, scroll, 3D, canvas, chart, or icon library is useful, research current official docs and record the selected library, source URL, fetched date, reason, performance risk, and reduced-motion/accessibility fallback.
|
|
95
|
-
|
|
96
|
-
## Design Quality Bar
|
|
97
|
-
|
|
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.
|
|
112
|
+
When the user says "redesign from zero", "redesain dari 0", "ulang dari 0", or "research ulang":
|
|
113
|
+
- Treat existing UI as content, behavior, accessibility, and asset evidence only.
|
|
114
|
+
- Rewrite or materially update both design docs before UI code.
|
|
115
|
+
- Add `visualResetStrategy`.
|
|
116
|
+
- Reset composition, hierarchy, palette/typography, motion or interaction, and responsive information architecture.
|
|
117
|
+
- Do not ship a palette swap, dark-mode flip, or same hero with new colors.
|
|
106
118
|
|
|
107
|
-
|
|
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.
|
|
134
|
-
|
|
135
|
-
Do:
|
|
136
|
-
- Synthesize a visual direction from the project context and explain why it fits.
|
|
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.
|
|
140
|
-
- Use modern, expressive interaction and motion as part of the core design language, especially when it improves hierarchy, feedback, delight, confidence, or memorability.
|
|
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.
|
|
142
|
-
- Keep frontend code clean, componentized, accessible, and easy to maintain.
|
|
143
|
-
- Use tokens and semantic aliases so future changes do not require rewriting components.
|
|
144
|
-
- Make design decisions explicit before coding, then implement consistently.
|
|
145
|
-
|
|
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.
|
|
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.
|
|
150
|
-
- Let desktop, tablet, and mobile be the same design merely scaled down.
|
|
151
|
-
- Let heading, body, data, and metadata collapse into one safe typographic treatment without rationale.
|
|
152
|
-
- Reuse colors, layout shapes, or motion signatures from unrelated memory.
|
|
153
|
-
- Add decorative animation that hurts clarity, accessibility, or runtime performance.
|
|
154
|
-
- Let 3D visuals hide navigation, replace readable content, block core actions, or require a powerful device before the product can be understood.
|
|
155
|
-
- Choose a dependency because this repo scaffold mentioned it. The LLM must verify fit from current project context and official docs.
|
|
156
|
-
|
|
157
|
-
## Responsive Rule
|
|
119
|
+
## Responsive Recomposition Plan
|
|
158
120
|
|
|
159
121
|
Responsive design means recomposition, not resizing.
|
|
160
122
|
|
|
161
|
-
|
|
162
|
-
-
|
|
163
|
-
-
|
|
164
|
-
-
|
|
165
|
-
-
|
|
123
|
+
Define viewport mutation rules:
|
|
124
|
+
- Mobile: prioritize the first decisive action and touch flow.
|
|
125
|
+
- Tablet: regroup surfaces without becoming a shrunken desktop.
|
|
126
|
+
- Desktop: expose more context without defaulting to admin chrome.
|
|
127
|
+
- For each viewport, name what is reordered, merged, hidden, disclosed, promoted, and forbidden.
|
|
166
128
|
|
|
167
129
|
## Required `docs/DESIGN.md` Sections
|
|
168
130
|
|
|
@@ -181,35 +143,36 @@ For every UI task, define how major surfaces change across mobile, tablet, and d
|
|
|
181
143
|
|
|
182
144
|
## Required `docs/design-intent.json` Behavior
|
|
183
145
|
|
|
184
|
-
The JSON
|
|
185
|
-
-
|
|
186
|
-
- agent-chosen visual direction
|
|
187
|
-
-
|
|
188
|
-
- `
|
|
189
|
-
- `
|
|
190
|
-
- `
|
|
191
|
-
- `
|
|
192
|
-
-
|
|
193
|
-
-
|
|
194
|
-
-
|
|
195
|
-
-
|
|
196
|
-
-
|
|
197
|
-
-
|
|
198
|
-
-
|
|
199
|
-
-
|
|
146
|
+
The JSON is the source of truth for machine review. It must stay project-specific and include:
|
|
147
|
+
- confirmed project context and assumptions
|
|
148
|
+
- agent-chosen visual direction
|
|
149
|
+
- `motionPaletteDecision`
|
|
150
|
+
- `conceptualAnchor`
|
|
151
|
+
- `derivedTokenLogic`
|
|
152
|
+
- `aiSafeUiAudit`
|
|
153
|
+
- `tokenSystem`, `colorTruth`, `crossViewportAdaptation`, `motionSystem`, and `componentMorphology`
|
|
154
|
+
- `accessibilityPolicy`
|
|
155
|
+
- `designExecutionPolicy`
|
|
156
|
+
- `designExecutionHandoff`
|
|
157
|
+
- `reviewRubric`
|
|
158
|
+
- `contextHygiene`
|
|
159
|
+
- `libraryResearchStatus` and `libraryDecisions[]`
|
|
160
|
+
- `forbiddenPatterns`
|
|
161
|
+
- `repoEvidence.designEvidenceSummary` when available
|
|
200
162
|
|
|
201
163
|
## Accessibility and Review
|
|
202
164
|
|
|
203
|
-
WCAG 2.2 AA is the hard floor. APCA may be used only as advisory perceptual tuning
|
|
165
|
+
WCAG 2.2 AA is the hard floor. APCA may be used only as advisory perceptual tuning.
|
|
166
|
+
|
|
167
|
+
Define a review rubric that names drift signals and separates taste from failure.
|
|
204
168
|
|
|
205
|
-
|
|
169
|
+
Block or flag:
|
|
206
170
|
- inaccessible contrast, focus, target size, keyboard, auth, or dynamic-status behavior
|
|
207
171
|
- scale-only responsive behavior
|
|
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
|
|
211
172
|
- default component-kit styling without product rationale
|
|
212
|
-
-
|
|
173
|
+
- nonfunctional background effects, including decorative grid wallpaper
|
|
174
|
+
- grid or line backgrounds used as filler instead of product function
|
|
175
|
+
- palette choices that use readability as an excuse for safe defaults
|
|
213
176
|
- visual direction copied from unrelated memory or external references
|
|
214
177
|
- genericity findings that cannot name the exact drift signal
|
|
215
178
|
|
|
@@ -1,116 +1,100 @@
|
|
|
1
1
|
# Frontend Design and Interaction Boundaries
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Load this rule for UI-facing work. Keep the loaded surface small.
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
When the request is UI-facing, this rule activates automatically.
|
|
5
|
+
## Activation
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
-
|
|
7
|
+
Use this rule for:
|
|
8
|
+
- UI, UX, page, screen, component, layout, landing, dashboard, form, onboarding, animation, interaction
|
|
10
9
|
- redesign, reskin, visual refresh, responsive fix, hierarchy fix
|
|
11
|
-
- frontend deliverables
|
|
12
|
-
|
|
13
|
-
##
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
- Do not
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
|
|
88
|
-
##
|
|
89
|
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
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.
|
|
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.
|
|
96
|
-
|
|
97
|
-
## Responsive Mutation Requirements
|
|
98
|
-
|
|
99
|
-
- 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.
|
|
100
|
-
- Mobile must prioritize the first decisive action, not preserve desktop balance out of habit.
|
|
101
|
-
- Tablet must simplify simultaneous surfaces without becoming a shrunken desktop.
|
|
102
|
-
- Desktop may expose more context, but it must not become an interchangeable admin shell by default.
|
|
103
|
-
|
|
104
|
-
## Surface and Morphology Requirements
|
|
105
|
-
|
|
106
|
-
- Define the primary user task or reading path from current evidence before arranging surfaces.
|
|
107
|
-
- Supporting surfaces must earn their placement through role, priority, or behavior. They must not feel like cloned modules.
|
|
108
|
-
- Component states must preserve identity under hover, focus, loading, success, empty, and error. Do not let everything collapse into anonymous rounded panels.
|
|
109
|
-
- Motion should be expressive by default for modern UI work. Make it strengthen hierarchy, feedback, or memorability, then keep it reduced-motion-safe and performant.
|
|
10
|
+
- frontend deliverables inside fullstack or backend work
|
|
11
|
+
|
|
12
|
+
## Authority
|
|
13
|
+
|
|
14
|
+
- Use current repo evidence, the active brief, and current project docs as valid style context.
|
|
15
|
+
- Treat `.agent-context/` as design governance authority.
|
|
16
|
+
- Treat `README.md` as overview/install/user context only when design or architecture rules conflict.
|
|
17
|
+
- Do not choose final style, framework, palette, typography, layout paradigm, or animation library offline.
|
|
18
|
+
- Research current official docs before adding a new UI, animation, scroll, 3D, canvas, charting, icon, styling, or primitive library.
|
|
19
|
+
- Keep design continuity opt-in. Repo evidence outranks memory residue.
|
|
20
|
+
|
|
21
|
+
## Required Design Contract
|
|
22
|
+
|
|
23
|
+
Before UI code, create or refine:
|
|
24
|
+
- `docs/DESIGN.md`
|
|
25
|
+
- `docs/design-intent.json`
|
|
26
|
+
|
|
27
|
+
The contract must record:
|
|
28
|
+
- `motionPaletteDecision`
|
|
29
|
+
- `conceptualAnchor`
|
|
30
|
+
- `derivedTokenLogic`
|
|
31
|
+
- `aiSafeUiAudit`
|
|
32
|
+
- `designExecutionPolicy`
|
|
33
|
+
- `designExecutionHandoff`
|
|
34
|
+
- `reviewRubric`
|
|
35
|
+
- `contextHygiene`
|
|
36
|
+
- `libraryResearchStatus` and `libraryDecisions[]`
|
|
37
|
+
|
|
38
|
+
## Anti-Generic UI Gate
|
|
39
|
+
|
|
40
|
+
Do not ship interchangeable dashboard chrome, balanced card grids, centered marketing shells, generic component-kit surfaces, generic abstract logos, or nonfunctional background decoration unless the product earns them.
|
|
41
|
+
|
|
42
|
+
For new screens or broad redesigns, make at least three at-a-glance product-specific signals visible. Signals may be data treatment, iconography, state language, motion behavior, spatial structure, typography, material logic, or color behavior.
|
|
43
|
+
|
|
44
|
+
Use the rename test: if the UI can be renamed to another product category without changing composition, palette, iconography, and motion language, revise before implementation is considered complete.
|
|
45
|
+
|
|
46
|
+
Background lines, grids, scanlines, noise, glows, blobs, abstract logos, and decorative geometry are invalid as wallpaper. Do not use grid or line backgrounds as first-output filler. Use them only for a named product function such as alignment, crop guidance, map/route orientation, timeline reading, measurement, status, or motion continuity.
|
|
47
|
+
|
|
48
|
+
## Dynamic Anchor Gate
|
|
49
|
+
|
|
50
|
+
If the user gives no current-task visual research or reference:
|
|
51
|
+
- Do not count old UI, existing design docs, or scaffold seeds as research.
|
|
52
|
+
- Choose one high-variance non-software conceptual anchor before UI code.
|
|
53
|
+
- Internally reject the safest dashboard, portal, card-grid, admin-shell, or minimalist-web-app mental model.
|
|
54
|
+
- Record one real-world anchor reference, one signature motion behavior, and one typographic decision with role contrast.
|
|
55
|
+
- Derive typography, spacing, morphology, motion, and responsive recomposition from that anchor.
|
|
56
|
+
- Reject anchors described only by generic quality words such as modern, clean, premium, expressive, minimal, or bold.
|
|
57
|
+
|
|
58
|
+
## Motion, Palette, and 3D
|
|
59
|
+
|
|
60
|
+
- Product categories are heuristics, not style presets.
|
|
61
|
+
- Choose motion density from task, content density, brand intent, device budget, performance, and accessibility.
|
|
62
|
+
- Map states before coding: default, hover, focus-visible, active, disabled, loading, empty, error, success, transition.
|
|
63
|
+
- Prefer visually exploratory, product-derived palettes while preserving WCAG contrast and status clarity.
|
|
64
|
+
- Do not default to dark slate, cream/beige/tan, purple-blue gradients, monochrome palettes, cyber-neon terminals, or uniform card surfaces without product evidence.
|
|
65
|
+
- Treat motion, 3D, WebGL, canvas, scroll choreography, and animation libraries as first-class options.
|
|
66
|
+
- Omit rich motion or spatial UI only after naming the product-fit reason and the replacement interaction quality.
|
|
67
|
+
- Keep reduced-motion, keyboard, loading, performance, mobile, and non-3D fallbacks explicit.
|
|
68
|
+
|
|
69
|
+
## Zero-Based Redesign
|
|
70
|
+
|
|
71
|
+
If the user asks for a redesign from zero:
|
|
72
|
+
- Treat existing UI as behavioral/content evidence only.
|
|
73
|
+
- Discard prior palette, typography, hero composition, navigation placement, component morphology, motion signature, and image framing unless the user requests continuity.
|
|
74
|
+
- Rewrite or materially update both design docs before coding.
|
|
75
|
+
- Change primary composition, content hierarchy, interaction model, and responsive information architecture.
|
|
76
|
+
- Reject palette swaps, dark-mode flips, and restyled heroes.
|
|
77
|
+
|
|
78
|
+
## Responsive Mutation
|
|
79
|
+
|
|
80
|
+
Responsive quality is not scale-only.
|
|
81
|
+
|
|
82
|
+
- Mobile must prioritize the first decisive action.
|
|
83
|
+
- Tablet must regroup surfaces instead of shrinking desktop.
|
|
84
|
+
- Desktop may expose more context but must not become interchangeable admin chrome.
|
|
85
|
+
- At least one major surface must change position, grouping, priority, or disclosure strategy between mobile and desktop.
|
|
86
|
+
|
|
87
|
+
## Accessibility
|
|
88
|
+
|
|
89
|
+
- WCAG 2.2 AA is the hard floor.
|
|
90
|
+
- APCA is advisory perceptual tuning only.
|
|
91
|
+
- Hard checks include focus visibility, focus appearance, target size, keyboard access, accessible authentication, color-only meaning, and dynamic status/state access.
|
|
92
|
+
- Fix accessibility issues without flattening the UI into generic safe chrome unless no expressive safe option remains.
|
|
110
93
|
|
|
111
94
|
## Implementation Boundaries
|
|
112
95
|
|
|
113
|
-
- Follow the shipped project stack and current repo patterns
|
|
114
|
-
- Do not hardcode Zustand, React Query, smart/dumb component doctrine, or
|
|
115
|
-
-
|
|
116
|
-
- Keep
|
|
96
|
+
- Follow the shipped project stack and current repo patterns.
|
|
97
|
+
- Do not hardcode Zustand, React Query, smart/dumb component doctrine, or framework-specific architecture as universal design law.
|
|
98
|
+
- Keep structure feature-oriented when it improves maintainability.
|
|
99
|
+
- Keep component states recognizable across hover, focus, loading, success, empty, and error.
|
|
100
|
+
- Do not let repeated surfaces share one visual treatment by habit; repetition needs a product reason.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# State Artifacts
|
|
2
|
+
|
|
3
|
+
Use this directory as a typed governance state surface, not as a dump folder.
|
|
4
|
+
|
|
5
|
+
Tracked seed/config artifacts:
|
|
6
|
+
- `architecture-map.md`
|
|
7
|
+
- `dependency-map.md`
|
|
8
|
+
- `benchmark-comparison-schema.json`
|
|
9
|
+
- `benchmark-reproducibility.json`
|
|
10
|
+
- `benchmark-thresholds.json`
|
|
11
|
+
- `benchmark-watchlist.json`
|
|
12
|
+
- `benchmark-writer-judge-config.json`
|
|
13
|
+
- `memory-adapter-contract.json`
|
|
14
|
+
- `memory-schema-v1.json`
|
|
15
|
+
- `stack-research-snapshot.json`
|
|
16
|
+
|
|
17
|
+
Tracked operational artifact:
|
|
18
|
+
- `onboarding-report.json` stays tracked in this repository because internal audits read it as the current repository onboarding state. In installed projects, `init` and `upgrade` regenerate this file.
|
|
19
|
+
|
|
20
|
+
Local-only/generated artifacts:
|
|
21
|
+
- `active-memory.json`
|
|
22
|
+
- `v3-purge-audit.json`
|
|
23
|
+
- `llm-judge-report.json`
|
|
24
|
+
- benchmark, trend, weekly governance, and quality report outputs
|
|
25
|
+
|
|
26
|
+
Do not treat generated reports as current project truth. Rerun the matching `npm run benchmark:*`, `npm run report:*`, or `npm run audit:*` command when fresh evidence is needed.
|