@ryuenn3123/agentic-senior-core 3.0.36 → 3.0.38
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 -113
- package/.agent-context/rules/frontend-architecture.md +92 -104
- package/.agent-context/state/README.md +26 -0
- 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 +5 -2
- package/GEMINI.md +43 -0
- package/README.md +24 -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 +32 -7
- package/lib/cli/compiler.mjs +59 -17
- package/lib/cli/constants.mjs +5 -0
- package/lib/cli/detector.mjs +4 -0
- 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 +137 -861
- package/lib/cli/project-scaffolder/prompt-builders.mjs +73 -81
- 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/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 +21 -0
- package/scripts/validate/coverage-checks.mjs +55 -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
|
@@ -1,134 +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, 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
|
-
|
|
64
|
-
|
|
65
|
-
-
|
|
84
|
+
## Token Derivation Audit
|
|
85
|
+
|
|
86
|
+
Before implementation, `docs/design-intent.json` must include top-level `derivedTokenLogic`:
|
|
87
|
+
- `anchorReference`
|
|
88
|
+
- `colorDerivationSource`
|
|
89
|
+
- `spacingDerivationSource`
|
|
90
|
+
- `typographyDerivationSource`
|
|
91
|
+
- `motionDerivationSource`
|
|
92
|
+
- `validationRule`
|
|
66
93
|
|
|
67
|
-
If the
|
|
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
|
-
|
|
93
|
-
|
|
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
|
-
Do:
|
|
102
|
-
- Synthesize a visual direction from the project context and explain why it fits.
|
|
103
|
-
- Choose color, typography, spacing, motion, density, and component morphology dynamically from the product and audience.
|
|
104
|
-
- 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.
|
|
105
|
-
- 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.
|
|
106
|
-
- Use modern, expressive interaction and motion as part of the core design language, especially when it improves hierarchy, feedback, delight, confidence, or memorability.
|
|
107
|
-
- 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.
|
|
108
|
-
- Keep frontend code clean, componentized, accessible, and easy to maintain.
|
|
109
|
-
- Use tokens and semantic aliases so future changes do not require rewriting components.
|
|
110
|
-
- Make design decisions explicit before coding, then implement consistently.
|
|
111
|
-
|
|
112
|
-
Do not:
|
|
113
|
-
- 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.
|
|
114
|
-
- Default to generic SaaS heroes, balanced card grids, soft startup gradients, or dashboard chrome without product rationale.
|
|
115
|
-
- 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.
|
|
116
|
-
- Let desktop, tablet, and mobile be the same design merely scaled down.
|
|
117
|
-
- Let heading, body, data, and metadata collapse into one safe typographic treatment without rationale.
|
|
118
|
-
- Reuse colors, layout shapes, or motion signatures from unrelated memory.
|
|
119
|
-
- Add decorative animation that hurts clarity, accessibility, or runtime performance.
|
|
120
|
-
- Let 3D visuals hide navigation, replace readable content, block core actions, or require a powerful device before the product can be understood.
|
|
121
|
-
- Choose a dependency because this repo scaffold mentioned it. The LLM must verify fit from current project context and official docs.
|
|
122
|
-
|
|
123
|
-
## Responsive Rule
|
|
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.
|
|
118
|
+
|
|
119
|
+
## Responsive Recomposition Plan
|
|
124
120
|
|
|
125
121
|
Responsive design means recomposition, not resizing.
|
|
126
122
|
|
|
127
|
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
-
|
|
131
|
-
-
|
|
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.
|
|
132
128
|
|
|
133
129
|
## Required `docs/DESIGN.md` Sections
|
|
134
130
|
|
|
@@ -147,35 +143,35 @@ For every UI task, define how major surfaces change across mobile, tablet, and d
|
|
|
147
143
|
|
|
148
144
|
## Required `docs/design-intent.json` Behavior
|
|
149
145
|
|
|
150
|
-
The JSON
|
|
151
|
-
-
|
|
152
|
-
- agent-chosen visual direction
|
|
153
|
-
-
|
|
154
|
-
- `
|
|
155
|
-
- `
|
|
156
|
-
- `
|
|
157
|
-
- `
|
|
158
|
-
-
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
-
|
|
162
|
-
-
|
|
163
|
-
-
|
|
164
|
-
-
|
|
165
|
-
-
|
|
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
|
|
166
162
|
|
|
167
163
|
## Accessibility and Review
|
|
168
164
|
|
|
169
|
-
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.
|
|
170
168
|
|
|
171
|
-
|
|
169
|
+
Block or flag:
|
|
172
170
|
- inaccessible contrast, focus, target size, keyboard, auth, or dynamic-status behavior
|
|
173
171
|
- scale-only responsive behavior
|
|
174
|
-
- unresearched dependency choices
|
|
175
|
-
- 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
|
|
176
|
-
- palette choices that use readability as a reason to stay in safe defaults instead of deriving a richer but accessible palette from the product
|
|
177
172
|
- default component-kit styling without product rationale
|
|
178
|
-
-
|
|
173
|
+
- nonfunctional background effects, including decorative grid wallpaper
|
|
174
|
+
- palette choices that use readability as an excuse for safe defaults
|
|
179
175
|
- visual direction copied from unrelated memory or external references
|
|
180
176
|
- genericity findings that cannot name the exact drift signal
|
|
181
177
|
|
|
@@ -1,112 +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
|
-
|
|
95
|
-
- 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.
|
|
96
|
-
- Mobile must prioritize the first decisive action, not preserve desktop balance out of habit.
|
|
97
|
-
- Tablet must simplify simultaneous surfaces without becoming a shrunken desktop.
|
|
98
|
-
- Desktop may expose more context, but it must not become an interchangeable admin shell by default.
|
|
99
|
-
|
|
100
|
-
## Surface and Morphology Requirements
|
|
101
|
-
|
|
102
|
-
- Define the primary user task or reading path from current evidence before arranging surfaces.
|
|
103
|
-
- Supporting surfaces must earn their placement through role, priority, or behavior. They must not feel like cloned modules.
|
|
104
|
-
- Component states must preserve identity under hover, focus, loading, success, empty, and error. Do not let everything collapse into anonymous rounded panels.
|
|
105
|
-
- 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. 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.
|
|
106
93
|
|
|
107
94
|
## Implementation Boundaries
|
|
108
95
|
|
|
109
|
-
- Follow the shipped project stack and current repo patterns
|
|
110
|
-
- Do not hardcode Zustand, React Query, smart/dumb component doctrine, or
|
|
111
|
-
-
|
|
112
|
-
- 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.
|
package/.cursor/mcp.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Agentic Senior Core bootstrap adapter
|
|
3
|
+
alwaysApply: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Cursor Rule - Thin Adapter
|
|
7
|
+
|
|
8
|
+
Adapter Mode: thin
|
|
9
|
+
Adapter Source: .instructions.md
|
|
10
|
+
Canonical Snapshot SHA256: 75652106d1fc453e9407eb9301e7f38de2e0159190dc47fb0b6e377859d91a46
|
|
11
|
+
|
|
12
|
+
This repository is governed by a strict instruction contract.
|
|
13
|
+
Use [.instructions.md](../../.instructions.md) as the canonical policy source.
|
|
14
|
+
Use .agent-context/ for technical rules, prompts, checklists, policies, and state.
|
|
15
|
+
Treat README.md as overview/install/user context only when governance files conflict.
|
|
16
|
+
|
|
17
|
+
## Critical Bootstrap Floor
|
|
18
|
+
|
|
19
|
+
- If your host stops at this file, continue the chain manually before coding.
|
|
20
|
+
- Read `.agent-instructions.md` next when it exists.
|
|
21
|
+
- Memory continuity does not replace bootstrap loading.
|
|
22
|
+
- For UI, UX, layout, screen, tailwind, frontend, or redesign requests, load [bootstrap-design.md](../../.agent-context/prompts/bootstrap-design.md) and [frontend-architecture.md](../../.agent-context/rules/frontend-architecture.md) before code edits.
|
|
23
|
+
- For UI scope, include a one-line Motion/Palette Decision in the Bootstrap Receipt; product categories are heuristics, not style presets.
|
|
24
|
+
- For UI scope, create or refine `docs/DESIGN.md` and `docs/design-intent.json` before UI implementation.
|
|
25
|
+
- For documentation-first requests, create or refine required project docs in English by default and do not write application, firmware, or UI code until the user asks or approves.
|
|
26
|
+
- For backend, API, data, auth, error, event, queue, worker, or distributed-system requests, load only relevant global rules from .agent-context/rules/ ([link](../../.agent-context/rules)).
|
|
27
|
+
- For ecosystem, framework, dependency, or Docker claims, perform live web research.
|
|
28
|
+
- Resolve runtime choices from project evidence and live official documentation; resolve structural planning from constraints and architecture boundaries.
|
|
29
|
+
|
|
30
|
+
## Mandatory Bootstrap Chain
|
|
31
|
+
|
|
32
|
+
1. Load [.instructions.md](../../.instructions.md).
|
|
33
|
+
2. Load `.agent-instructions.md` when present.
|
|
34
|
+
3. Load only relevant files from .agent-context/rules/ ([link](../../.agent-context/rules)).
|
|
35
|
+
4. Apply matching prompts from .agent-context/prompts/ ([link](../../.agent-context/prompts)).
|
|
36
|
+
5. Enforce .agent-context/review-checklists/ ([link](../../.agent-context/review-checklists/pr-checklist.md)).
|
|
37
|
+
6. Use .agent-context/state/ ([link](../../.agent-context/state)) and .agent-context/policies/ ([link](../../.agent-context/policies)) only when relevant.
|
|
38
|
+
7. Use project docs and live evidence for runtime, dependency, and architecture claims.
|
|
39
|
+
|
|
40
|
+
## Bootstrap Receipt
|
|
41
|
+
|
|
42
|
+
For non-trivial coding, review, planning, or governance work, produce a short Bootstrap Receipt before implementation output: `loaded_files`, `selected_rules`, `skipped_rules`, `unreachable_files`, and `validation_plan`.
|
|
43
|
+
|
|
44
|
+
## Completion Gate
|
|
45
|
+
|
|
46
|
+
Run [pr-checklist.md](../../.agent-context/review-checklists/pr-checklist.md) before declaring work complete.
|
|
47
|
+
|
|
48
|
+
If this adapter drifts from canonical behavior, refresh from [.instructions.md](../../.instructions.md) and update the hash metadata.
|