@ryuenn3123/agentic-senior-core 3.0.43 → 3.0.44

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.
@@ -2,9 +2,7 @@
2
2
 
3
3
  Use this prompt for UI, UX, frontend layout, screen, Tailwind, animation, 3D, canvas, or redesign work.
4
4
 
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.
5
+ Create or refine `docs/DESIGN.md` for human reasoning and `docs/design-intent.json` for machine-readable design intent, guardrails, and review signals.
8
6
 
9
7
  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
8
 
@@ -43,6 +41,7 @@ Rules:
43
41
  - Output only the chosen anchor, specific reference point, and rationale.
44
42
  - Forbid final anchors named dashboard, portal, cards, admin panel, SaaS shell, web app shell, or minimalist interface.
45
43
  - Derive typography, spacing, density, color behavior, morphology, motion, and responsive composition from the chosen anchor.
44
+ - Translate the anchor non-literally first. Anchor artifacts are evidence for behavior, hierarchy, density, typography, state language, and motion, not automatic UI chrome.
46
45
  - Use reduced-motion fallbacks instead of suppressing motion.
47
46
 
48
47
  ## Creative Ambition Floor
@@ -52,14 +51,20 @@ Before UI code, record:
52
51
  - one morphology or composition choice that avoids interchangeable card stacks when the product allows it
53
52
  - at least three at-a-glance product-specific signals for new screens or broad redesigns
54
53
 
55
- Do not ship AI-safe UI. Record exact drift signals in `reviewRubric`; at minimum reject decorative grid wallpaper, default line backgrounds, calibration-mark wallpaper, soft glow backgrounds, generic abstract marks, testing/demo/placeholder UI copy, terminal-only user flows, and first-output composition with only local copy swapped in when they have no product function. Treat measurement, calibration, crop, route, timeline, and inspection marks as task overlays or control affordances only; never promote them to the page background, hero backdrop, or first-output visual texture.
54
+ Do not ship AI-safe UI. Record exact drift signals in `reviewRubric`; at minimum reject decorative grid wallpaper, default line backgrounds, calibration-mark wallpaper, soft glow backgrounds, generic abstract marks, testing/demo/placeholder UI copy, terminal-only user flows, and first-output composition with only local copy swapped in when they have no product function. Treat measurement, calibration, crop, route, timeline, and inspection marks as task overlays or control affordances only; never promote them to the page background, hero backdrop, or first-output visual texture. If a conceptual anchor suggests a forbidden motif, the forbidden motif wins; express the anchor through workflow, hierarchy, density, typography, material behavior, state design, and interaction grammar instead of literal wallpaper.
56
55
 
57
56
  ## Brave Redesign Default
58
57
  For UI design work, the agent owns the ambition decision. For broad screens, redesigns, or new visual systems, treat expressive motion, spatial hierarchy, distinctive composition, and product-specific interaction as the baseline even when the user did not say "rich". Do not reduce the request to a safer version of the existing UI, a static implementation, or a component-kit rearrangement because research or dependency selection feels inconvenient.
59
58
 
60
59
  If the expressive path needs a new motion, 3D, canvas, scroll, or interaction library and web search is available, perform the official-doc research and record the decision. If web search is unavailable, use already-present dependencies or native browser capabilities while preserving the intended ambition, then mark library verification as pending.
61
60
 
62
- Only downshift ambition after naming the concrete blocker: product fit, content density, performance budget, accessibility, device support, package conflict, security risk, or missing runtime capability. Pair every downshift with a replacement interaction quality that still changes composition, hierarchy, feedback, or memorability.
61
+ Only downshift ambition after naming the concrete blocker: product fit, content density, measured performance budget, accessibility, device support, package conflict, security risk, or missing runtime capability. A new dependency, package count, or vague performance concern is not a blocker by itself. Pair every downshift with a replacement interaction quality that still changes composition, hierarchy, feedback, or memorability.
62
+
63
+ ## Design Flexibility Layer
64
+
65
+ `docs/design-intent.json` must separate locked outcomes from flexible expression. The machine contract keeps review invariants stable; it must not freeze exact aesthetic implementation unless repo evidence, accessibility validation, implementation constraints, or explicit user approval locks it.
66
+
67
+ Record `designFlexibilityPolicy`: lock user goals, runtime constraints, accessibility, production readiness, forbidden patterns, and approved continuity; keep exact palette primitives, font families, radius/shadow values, component-kit theme mapping, signature move implementation, and literal anchor artifacts flexible until validated or approved. Semantic roles are required; exact primitives are not automatically locked. Required experience outcomes are separate from candidate implementation moves. Libraries supply behavior, accessibility, primitives, and delivery speed; the project supplies final composition, theme, morphology, and visual language.
63
68
 
64
69
  ## AI Color and Template Residue Audit
65
70
  AI color drift happens when a palette uses safe defaults before product meaning.
@@ -90,7 +95,7 @@ Before implementation, `docs/design-intent.json` must include top-level `derived
90
95
  - `motionDerivationSource`
91
96
  - `validationRule`
92
97
 
93
- Every token must trace to `anchorReference`. If the rationale is "looks good", "common practice", "modern default", or "framework default", revise the token before code.
98
+ Every semantic token role must trace to `anchorReference`. Exact primitive values stay flexible until repo evidence, accessibility validation, implementation constraints, or explicit user approval locks them. If the rationale is "looks good", "common practice", "modern default", or "framework default", derive the token again before UI code.
94
99
 
95
100
  ## Library Research Protocol
96
101
  If web search is available:
@@ -103,8 +108,8 @@ If web search is unavailable:
103
108
  - Use native CSS, browser APIs, or already-present dependencies.
104
109
  - Set `libraryResearchStatus` to `pending-verification`.
105
110
 
106
- Treat unresearched dependency choices as review findings.
107
-
111
+ Treat unresearched dependency choices as review findings. Dynamic UI Foundation Selection: do not default to shadcn/ui, Tailwind-only, native-only, or any component kit because it is familiar. Choose the foundation from product type, interaction complexity, accessibility needs, design ambition, team/runtime constraints, bundle/runtime cost, and current official docs.
112
+ Ready-made primitives are allowed when they improve behavior, accessibility, speed, or maintainability. The library supplies mechanics; the project supplies visual language. Reject default component-kit styling without product rationale, but do not reject a modern lightweight library solely because a dependency was needed.
108
113
  ## Zero-Based Redesign Protocol
109
114
 
110
115
  When the user says "redesign from zero", "redesain dari 0", "ulang dari 0", or "research ulang":
@@ -146,6 +151,7 @@ The JSON is the source of truth for machine review. It must stay project-specifi
146
151
  - confirmed project context and assumptions
147
152
  - agent-chosen visual direction
148
153
  - `motionPaletteDecision`
154
+ - `designFlexibilityPolicy`
149
155
  - `conceptualAnchor`
150
156
  - `derivedTokenLogic`
151
157
  - `aiSafeUiAudit` and `productionContentPolicy`
@@ -165,15 +171,6 @@ WCAG 2.2 AA is the hard floor. APCA may be used only as advisory perceptual tuni
165
171
 
166
172
  Define a review rubric that names drift signals and separates taste from failure.
167
173
 
168
- Block or flag:
169
- - inaccessible contrast, focus, target size, keyboard, auth, or dynamic-status behavior
170
- - scale-only responsive behavior
171
- - default component-kit styling without product rationale
172
- - nonfunctional background effects, including decorative grid wallpaper
173
- - grid or line backgrounds used as filler instead of product function
174
- - testing, demo, sample, placeholder, lorem, TODO, coming soon, or scaffold labels visible in shipped UI unless they are real product states; terminal-only core user flows unless the product is explicitly a CLI, developer tool, or operational runbook
175
- - palette choices that use readability as an excuse for safe defaults
176
- - visual direction copied from unrelated memory or external references
177
- - genericity findings that cannot name the exact drift signal
174
+ Block or flag inaccessible contrast/focus/target/keyboard/auth/status behavior, scale-only responsive behavior, default component-kit styling, nonfunctional background effects, grid or line filler, placeholder copy, terminal-only core flows, readability-as-safe-default palettes, copied visual direction, and genericity findings that cannot name the exact drift signal.
178
175
 
179
176
  Wait for user approval before generating Figma or code assets when the user only asked for planning or design direction.
@@ -81,10 +81,13 @@ Run this before declaring a task done. Apply only the sections relevant to the c
81
81
  - [ ] Motion is treated as part of the design language for modern UI work, with reduced-motion and performance safeguards instead of defaulting to static screens.
82
82
  - [ ] Broad redesigns pass the old-design regression test: the result is not the previous composition with animation, depth, media, or interaction density removed.
83
83
  - [ ] UI work records an agent-chosen ambition level; broad screens and redesigns researched an expressive path first, and any downshift names a concrete blocker plus replacement interaction quality.
84
+ - [ ] UI foundation choices are dynamic and product-fit; no shadcn, native-only, Tailwind-only, or component-kit default was selected by habit or avoided from dependency fear.
85
+ - [ ] Design intent separates locked outcomes from flexible expression; candidate signature moves, exact token primitives, literal anchor artifacts, and component-kit skins were not treated as permanent requirements without evidence or user approval.
84
86
 
85
87
  ## 8. Dependencies And Runtime
86
88
 
87
89
  - [ ] New dependencies are justified by capability, maintenance health, bundle/runtime cost, and current official docs.
90
+ - [ ] Dependency avoidance was not treated as a default virtue; lightweight maintained libraries were considered when they improve correctness, accessibility, UX, maintainability, or delivery speed.
88
91
  - [ ] Official setup flows are preferred when they produce better-supported current defaults.
89
92
  - [ ] Docker, framework, package, and ecosystem claims were checked live when they could be stale.
90
93
  - [ ] Token optimization and memory continuity defaults remain enabled unless the user explicitly opts out.
@@ -4,7 +4,9 @@
4
4
 
5
5
  The LLM may choose modern libraries and tooling when they fit the project. This rule does not prefer "no library", "always add a library", or any fixed dependency set.
6
6
 
7
- New dependencies are allowed when they create a better practical tradeoff than custom implementation. The decision should be based on whether the dependency meaningfully improves efficiency, shortens delivery time, improves correctness, reduces maintenance burden, or avoids unnecessary in-house code.
7
+ New dependencies are allowed when they create a better practical tradeoff than custom implementation. The decision should be based on whether the dependency meaningfully improves efficiency, shortens delivery time, improves correctness, reduces maintenance burden, unlocks a stronger user experience, or avoids unnecessary in-house code.
8
+
9
+ Do not treat dependency avoidance as an engineering virtue by itself. A small, maintained, well-scoped library can be the simpler and safer choice than custom code, especially for accessibility primitives, animation, gestures, data visualization, parsing, protocol handling, security-sensitive helpers, or browser/runtime capabilities with tricky edge cases.
8
10
 
9
11
  Before adding or recommending a dependency:
10
12
  - check current official docs, release notes, and setup guidance when the ecosystem decision matters
@@ -14,5 +16,6 @@ Before adding or recommending a dependency:
14
16
  - explain why the dependency is a better tradeoff than local implementation for the current task
15
17
  - avoid packages that are stale, thinly maintained, too heavy for the job, or added only because they are popular
16
18
  - keep dependency boundaries replaceable when the library would spread through many files
19
+ - do not reject a dependency only because it adds a package; reject it only when the project-fit, security, maintenance, compatibility, bundle/runtime, or ownership tradeoff is worse than the alternative
17
20
 
18
- Reject offline dependency decisions, outdated tutorial versions, trend choices, and dependency avoidance choices that are not grounded in the current repo, brief, and delivery tradeoffs.
21
+ Reject offline dependency decisions, outdated tutorial versions, trend choices, dependency avoidance choices, and performance-fear choices that are not grounded in the current repo, brief, and delivery tradeoffs.
@@ -4,10 +4,7 @@ Load this rule for UI-facing work. Keep the loaded surface small.
4
4
 
5
5
  ## Activation
6
6
 
7
- Use this rule for:
8
- - UI, UX, page, screen, component, layout, landing, dashboard, form, onboarding, animation, interaction
9
- - redesign, reskin, visual refresh, responsive fix, hierarchy fix
10
- - frontend deliverables inside fullstack or backend work
7
+ Use this rule for UI, UX, page, screen, component, layout, landing, dashboard, form, onboarding, animation, interaction, redesign, visual refresh, responsive fix, hierarchy fix, and frontend deliverables inside fullstack or backend work.
11
8
 
12
9
  ## Authority
13
10
 
@@ -16,16 +13,16 @@ Use this rule for:
16
13
  - Treat `README.md` as overview/install/user context only when design or architecture rules conflict.
17
14
  - Do not choose final style, framework, palette, typography, layout paradigm, or animation library offline.
18
15
  - Research current official docs before adding a new UI, animation, scroll, 3D, canvas, charting, icon, styling, or primitive library.
16
+ - Dynamic UI Foundation: do not hardcode shadcn/ui, Tailwind-only, native-only, or any component library as the universal answer. Modern lightweight primitives, motion libraries, canvas/WebGL helpers, charting libraries, and styling tools are valid when product evidence, accessibility, interaction quality, maintainability, delivery speed, runtime constraints, and official docs support them.
19
17
  - Keep design continuity opt-in. Repo evidence outranks memory residue.
20
18
 
21
19
  ## Required Design Contract
22
20
 
23
- Before UI code, create or refine:
24
- - `docs/DESIGN.md`
25
- - `docs/design-intent.json`
21
+ Before UI code, create or refine `docs/DESIGN.md` and `docs/design-intent.json`.
26
22
 
27
23
  The contract must record:
28
24
  - `motionPaletteDecision`
25
+ - `designFlexibilityPolicy`
29
26
  - `conceptualAnchor`
30
27
  - `derivedTokenLogic`
31
28
  - `aiSafeUiAudit`
@@ -47,7 +44,7 @@ Use the old-design regression test for broad redesigns: if the UI reads as the p
47
44
 
48
45
  Background lines, grids, scanlines, noise, glows, blobs, abstract logos, calibration marks, 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.
49
46
 
50
- Measurement, calibration, crop, map, route, and inspection marks are task-bound overlays or control affordances. They must not become the page background, hero backdrop, or default visual texture.
47
+ Measurement, calibration, crop, map, route, and inspection marks are task-bound overlays or control affordances. They must not become the page background, hero backdrop, or default visual texture. When a conceptual anchor and a forbidden visual motif conflict, the forbidden motif wins; translate the anchor into layout, hierarchy, density, typography, state behavior, materials, and interaction instead of literal decorative texture.
51
48
 
52
49
  Production UI must read as ship-ready: no visible testing, demo, sample, placeholder, lorem, TODO, coming soon, or scaffold labels unless they are intentional product states. User-facing workflows need an operable UI path; terminal-only core flows are valid only for CLI, developer-tool, or runbook products.
53
50
 
@@ -59,6 +56,7 @@ If the user gives no current-task visual research or reference:
59
56
  - Internally reject the safest dashboard, portal, card-grid, admin-shell, or minimalist-web-app mental model.
60
57
  - Record one real-world anchor reference, one signature motion behavior, and one typographic decision with role contrast.
61
58
  - Derive typography, spacing, morphology, motion, and responsive recomposition from that anchor.
59
+ - Translate the anchor into workflow, hierarchy, density, typography, state behavior, and interaction before using literal artifacts. Do not turn anchor artifacts into required chrome, wallpaper, decorative props, or component-kit theme objects without a named product function.
62
60
  - Reject anchors described only by generic quality words such as modern, clean, premium, expressive, minimal, or bold.
63
61
 
64
62
  ## Motion, Palette, and 3D
@@ -70,9 +68,10 @@ If the user gives no current-task visual research or reference:
70
68
  - Do not default to dark slate, cream/beige/tan, purple-blue gradients, monochrome palettes, cyber-neon terminals, or uniform card surfaces without product evidence.
71
69
  - Treat motion, 3D, WebGL, canvas, scroll choreography, and animation libraries as first-class options.
72
70
  - Omit rich motion or spatial UI only after naming the product-fit reason and the replacement interaction quality.
73
- - For new screens or broad redesigns, research the expressive implementation path instead of defaulting to static native CSS. Use native or already-installed tools only when they can still deliver the chosen ambition, or when a concrete blocker is documented.
71
+ - For new screens or broad redesigns, research the expressive implementation path instead of defaulting to static native CSS. Use native or already-installed tools only when they can still deliver the chosen ambition, or when a concrete blocker is documented. Do not downshift because adding a package feels inconvenient; downshift only for a concrete product-fit, accessibility, security, compatibility, device, maintenance, or measured performance reason.
74
72
  - Keep reduced-motion, keyboard, loading, performance, mobile, and non-3D fallbacks explicit.
75
-
73
+ - Use component kits or headless primitives for behavior and accessibility when they fit. Replace library-default visual language with project-specific composition, tokens, motion, state treatment, and morphology.
74
+ - Keep design-intent flexible: lock user goals, accessibility, production readiness, forbidden patterns, and approved continuity; keep exact palette primitives, font families, radius/shadow values, component skins, and candidate signature moves flexible until evidence or approval locks them.
76
75
  ## Zero-Based Redesign
77
76
 
78
77
  If the user asks for a redesign from zero:
@@ -2,6 +2,8 @@
2
2
 
3
3
  Do not over-optimize by habit. Do reject obvious scale and runtime failures.
4
4
 
5
+ Performance is a decision input, not a blanket veto against modern libraries, motion, richer UI, or maintained tooling. Compare the real cost of the dependency or implementation against the cost of custom code, lost accessibility, weaker UX, duplicated maintenance, and slower delivery.
6
+
5
7
  Hard rejections:
6
8
  - repeated network, database, filesystem, or model calls inside loops without batching, limits, or caching rationale
7
9
  - unbounded reads, renders, exports, or searches when the data can grow
@@ -9,4 +11,4 @@ Hard rejections:
9
11
  - synchronous blocking work in request, UI, worker, or async paths where it can stall the product
10
12
  - caches without invalidation, expiry, ownership, and staleness trade-offs
11
13
 
12
- When performance matters, measure the real bottleneck, change the smallest useful thing, and verify the result.
14
+ When performance matters, measure the real bottleneck, change the smallest useful thing, and verify the result. Do not downshift product quality, UI ambition, or library fit from performance fear alone; name the concrete budget, bottleneck, device limit, or runtime evidence.
@@ -7,7 +7,7 @@ alwaysApply: true
7
7
 
8
8
  Adapter Mode: thin
9
9
  Adapter Source: .instructions.md
10
- Canonical Snapshot SHA256: 91efb30348194cff4f7a820caabeb60cd7ca59dea3982a7d3991c7b18991d225
10
+ Canonical Snapshot SHA256: 8a232b1dc9792849a9290898ef40dfff730c13cd0b443d217c0590ced04ed946
11
11
 
12
12
  This repository is governed by a strict instruction contract.
13
13
  Use [.instructions.md](../../.instructions.md) as the canonical policy source.
package/.cursorrules CHANGED
@@ -1,6 +1,6 @@
1
1
  # .cursorrules - Legacy Thin Adapter
2
2
 
3
- Generated by Agentic-Senior-Core CLI v3.0.43
3
+ Generated by Agentic-Senior-Core CLI v3.0.44
4
4
  Adapter Mode: legacy-thin
5
5
  Adapter Source: .agent-instructions.md when present; fallback .instructions.md
6
6
  Canonical baseline: .instructions.md
@@ -2,7 +2,7 @@
2
2
 
3
3
  Adapter Mode: thin
4
4
  Adapter Source: .instructions.md
5
- Canonical Snapshot SHA256: 91efb30348194cff4f7a820caabeb60cd7ca59dea3982a7d3991c7b18991d225
5
+ Canonical Snapshot SHA256: 8a232b1dc9792849a9290898ef40dfff730c13cd0b443d217c0590ced04ed946
6
6
 
7
7
  This repository is governed by a strict instruction contract.
8
8
  Use [.instructions.md](../.instructions.md) as the canonical policy source.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Adapter Mode: thin
4
4
  Adapter Source: .instructions.md
5
- Canonical Snapshot SHA256: 91efb30348194cff4f7a820caabeb60cd7ca59dea3982a7d3991c7b18991d225
5
+ Canonical Snapshot SHA256: 8a232b1dc9792849a9290898ef40dfff730c13cd0b443d217c0590ced04ed946
6
6
 
7
7
  This repository is governed by a strict instruction contract.
8
8
  Use [.instructions.md](../.instructions.md) as the canonical policy source.
@@ -6,7 +6,7 @@ applyTo: "**"
6
6
 
7
7
  Adapter Mode: thin
8
8
  Adapter Source: .instructions.md
9
- Canonical Snapshot SHA256: 91efb30348194cff4f7a820caabeb60cd7ca59dea3982a7d3991c7b18991d225
9
+ Canonical Snapshot SHA256: 8a232b1dc9792849a9290898ef40dfff730c13cd0b443d217c0590ced04ed946
10
10
 
11
11
  This repository is governed by a strict instruction contract.
12
12
  Use [.instructions.md](../../.instructions.md) as the canonical policy source.
package/.instructions.md CHANGED
@@ -44,7 +44,7 @@ Load only relevant rule files. Do not read the entire rule directory by default.
44
44
 
45
45
  Available rules: `naming-conv.md`, `architecture.md`, `security.md`, `performance.md`, `error-handling.md`, `testing.md`, `git-workflow.md`, `efficiency-vs-hype.md`, `api-docs.md`, `microservices.md`, `event-driven.md`, `database-design.md`, `realtime.md`, `frontend-architecture.md`, `docker-runtime.md`.
46
46
 
47
- For Docker or Compose work, load `docker-runtime.md` and verify the latest official Docker docs before authoring container assets. For framework or package setup work, use the latest stable compatible dependency set and official setup flow unless a documented compatibility constraint blocks it. New dependencies are allowed when they improve efficiency, delivery time, correctness, or maintainability.
47
+ For Docker or Compose work, load `docker-runtime.md` and verify the latest official Docker docs before authoring container assets. For framework or package setup work, use the latest stable compatible dependency set and official setup flow unless a documented compatibility constraint blocks it. New dependencies are allowed when they improve efficiency, delivery time, correctness, accessibility, UX, or maintainability. Do not treat dependency avoidance or vague performance fear as a default reason to skip a modern maintained library.
48
48
 
49
49
  Backend/API routing:
50
50
  - Data/schema/persistence: `architecture.md`, `database-design.md`, `performance.md`, `testing.md`.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Adapter Mode: thin
4
4
  Adapter Source: .instructions.md
5
- Canonical Snapshot SHA256: 91efb30348194cff4f7a820caabeb60cd7ca59dea3982a7d3991c7b18991d225
5
+ Canonical Snapshot SHA256: 8a232b1dc9792849a9290898ef40dfff730c13cd0b443d217c0590ced04ed946
6
6
 
7
7
  This repository is governed by a strict instruction contract.
8
8
  Use [.instructions.md](../../.instructions.md) as the canonical policy source.
package/.windsurfrules CHANGED
@@ -1,6 +1,6 @@
1
1
  # .windsurfrules - Legacy Thin Adapter
2
2
 
3
- Generated by Agentic-Senior-Core CLI v3.0.43
3
+ Generated by Agentic-Senior-Core CLI v3.0.44
4
4
  Adapter Mode: legacy-thin
5
5
  Adapter Source: .agent-instructions.md when present; fallback .instructions.md
6
6
  Canonical baseline: .instructions.md
package/AGENTS.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Adapter Mode: thin
4
4
  Adapter Source: .instructions.md
5
- Canonical Snapshot SHA256: 91efb30348194cff4f7a820caabeb60cd7ca59dea3982a7d3991c7b18991d225
5
+ Canonical Snapshot SHA256: 8a232b1dc9792849a9290898ef40dfff730c13cd0b443d217c0590ced04ed946
6
6
 
7
7
  This repository is governed by a strict instruction contract.
8
8
  Use [.instructions.md](.instructions.md) as the canonical policy source.
package/CLAUDE.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Adapter Mode: thin
4
4
  Adapter Source: .instructions.md
5
- Canonical Snapshot SHA256: 91efb30348194cff4f7a820caabeb60cd7ca59dea3982a7d3991c7b18991d225
5
+ Canonical Snapshot SHA256: 8a232b1dc9792849a9290898ef40dfff730c13cd0b443d217c0590ced04ed946
6
6
 
7
7
  This repository is governed by a strict instruction contract.
8
8
  Use [.instructions.md](.instructions.md) as the canonical policy source.
package/GEMINI.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Adapter Mode: thin
4
4
  Adapter Source: .instructions.md
5
- Canonical Snapshot SHA256: 91efb30348194cff4f7a820caabeb60cd7ca59dea3982a7d3991c7b18991d225
5
+ Canonical Snapshot SHA256: 8a232b1dc9792849a9290898ef40dfff730c13cd0b443d217c0590ced04ed946
6
6
 
7
7
  This repository is governed by a strict instruction contract.
8
8
  Use [.instructions.md](.instructions.md) as the canonical policy source.
@@ -64,6 +64,8 @@ function buildAnchorCommitmentHeader(designIntent) {
64
64
  const conceptualAnchor = designIntent.conceptualAnchor || {};
65
65
  const derivedTokenLogic = designIntent.derivedTokenLogic || {};
66
66
  const creativeCommitment = designIntent.designExecutionHandoff?.creativeCommitment || {};
67
+ const designFlexibilityPolicy = designIntent.designFlexibilityPolicy || {};
68
+ const expressionFlexibility = designIntent.designExecutionHandoff?.expressionFlexibility || {};
67
69
  const anchorReference = conceptualAnchor.anchorReference || derivedTokenLogic.anchorReference;
68
70
  const conceptualAnchorName = conceptualAnchor.name || anchorReference;
69
71
  const signatureMove = conceptualAnchor.signatureMove
@@ -74,6 +76,12 @@ function buildAnchorCommitmentHeader(designIntent) {
74
76
  const typographicDecision = conceptualAnchor.typographicDecision
75
77
  || creativeCommitment.typographicDecision
76
78
  || derivedTokenLogic.typographyDerivationSource;
79
+ const flexibleAxes = Array.isArray(designFlexibilityPolicy.flexibleExpressionAxes)
80
+ ? designFlexibilityPolicy.flexibleExpressionAxes
81
+ : expressionFlexibility.flexibleAxes;
82
+ const lockedOutcomes = Array.isArray(expressionFlexibility.lockedOutcomes)
83
+ ? expressionFlexibility.lockedOutcomes
84
+ : designFlexibilityPolicy.lockedOutcomeTypes;
77
85
 
78
86
  if (!conceptualAnchorName && !anchorReference) {
79
87
  return [
@@ -92,6 +100,8 @@ function buildAnchorCommitmentHeader(designIntent) {
92
100
  `Signature Move: ${toSingleLine(signatureMove, 'MISSING - define one concrete authored move before UI implementation')}`,
93
101
  `Motion Signature: ${toSingleLine(signatureMotion, 'MISSING - define timing/easing/choreography before UI implementation')}`,
94
102
  `Typographic Decision: ${toSingleLine(typographicDecision, 'MISSING - define role contrast before UI implementation')}`,
103
+ `Locked Outcomes: ${toSingleLine(Array.isArray(lockedOutcomes) ? lockedOutcomes.join(', ') : '', 'user goals, accessibility, production readiness, forbidden patterns')}`,
104
+ `Flexible Expression: ${toSingleLine(Array.isArray(flexibleAxes) ? flexibleAxes.join(', ') : '', 'exact primitives, typeface, surface treatment, component skin, candidate moves')}`,
95
105
  'If the UI output does not reflect these lines, stop and revise the design contract before continuing.',
96
106
  ].join('\n');
97
107
  }
@@ -113,6 +113,36 @@ export function validateDesignIntentContract(designIntentContract) {
113
113
  }
114
114
  }
115
115
 
116
+ if (!designIntentContract.designFlexibilityPolicy || typeof designIntentContract.designFlexibilityPolicy !== 'object') {
117
+ validationErrors.push('designIntent.designFlexibilityPolicy must exist.');
118
+ } else {
119
+ const designFlexibilityPolicy = designIntentContract.designFlexibilityPolicy;
120
+ if (designFlexibilityPolicy.mode !== 'locked-outcomes-flexible-expression') {
121
+ validationErrors.push('designIntent.designFlexibilityPolicy.mode must equal "locked-outcomes-flexible-expression".');
122
+ }
123
+ if (!hasNonEmptyString(designFlexibilityPolicy.contractRole)) {
124
+ validationErrors.push('designIntent.designFlexibilityPolicy.contractRole must be a non-empty string.');
125
+ }
126
+ if (!Array.isArray(designFlexibilityPolicy.lockedOutcomeTypes) || designFlexibilityPolicy.lockedOutcomeTypes.length < 4) {
127
+ validationErrors.push('designIntent.designFlexibilityPolicy.lockedOutcomeTypes must list the locked outcome categories.');
128
+ }
129
+ if (!Array.isArray(designFlexibilityPolicy.flexibleExpressionAxes) || designFlexibilityPolicy.flexibleExpressionAxes.length < 4) {
130
+ validationErrors.push('designIntent.designFlexibilityPolicy.flexibleExpressionAxes must list flexible expression axes.');
131
+ }
132
+ if (!hasNonEmptyString(designFlexibilityPolicy.tokenLockingRule)) {
133
+ validationErrors.push('designIntent.designFlexibilityPolicy.tokenLockingRule must be a non-empty string.');
134
+ }
135
+ if (!String(designFlexibilityPolicy.signatureMovePolicy || '').includes('candidate')) {
136
+ validationErrors.push('designIntent.designFlexibilityPolicy.signatureMovePolicy must separate candidate moves from required outcomes.');
137
+ }
138
+ if (!String(designFlexibilityPolicy.libraryVisualLanguagePolicy || '').includes('Libraries supply')) {
139
+ validationErrors.push('designIntent.designFlexibilityPolicy.libraryVisualLanguagePolicy must keep libraries from dictating visual language.');
140
+ }
141
+ if (!String(designFlexibilityPolicy.literalAnchorPolicy || '').includes('Translate anchors')) {
142
+ validationErrors.push('designIntent.designFlexibilityPolicy.literalAnchorPolicy must require non-literal anchor translation.');
143
+ }
144
+ }
145
+
116
146
  if (!designIntentContract.conceptualAnchor || typeof designIntentContract.conceptualAnchor !== 'object') {
117
147
  validationErrors.push('designIntent.conceptualAnchor must exist.');
118
148
  } else {
@@ -228,6 +258,20 @@ export function validateDesignIntentContract(designIntentContract) {
228
258
  validationErrors.push('designIntent.conceptualAnchor.visualRiskBudget.requireReducedMotionFallback must equal true.');
229
259
  }
230
260
  }
261
+ const literalTranslationPolicy = conceptualAnchor.literalTranslationPolicy;
262
+ if (!literalTranslationPolicy || typeof literalTranslationPolicy !== 'object') {
263
+ validationErrors.push('designIntent.conceptualAnchor.literalTranslationPolicy must exist.');
264
+ } else {
265
+ if (literalTranslationPolicy.preferNonLiteralTranslation !== true) {
266
+ validationErrors.push('designIntent.conceptualAnchor.literalTranslationPolicy.preferNonLiteralTranslation must equal true.');
267
+ }
268
+ if (!hasNonEmptyString(literalTranslationPolicy.allowedLiteralUse)) {
269
+ validationErrors.push('designIntent.conceptualAnchor.literalTranslationPolicy.allowedLiteralUse must be a non-empty string.');
270
+ }
271
+ if (!String(literalTranslationPolicy.forbiddenLiteralUse || '').includes('decorative wallpaper')) {
272
+ validationErrors.push('designIntent.conceptualAnchor.literalTranslationPolicy.forbiddenLiteralUse must reject decorative wallpaper.');
273
+ }
274
+ }
231
275
  if (
232
276
  !Array.isArray(conceptualAnchor.requiredDerivedAxes)
233
277
  || !conceptualAnchor.requiredDerivedAxes.includes('typography')
@@ -392,6 +436,20 @@ export function validateDesignIntentContract(designIntentContract) {
392
436
  if (designIntentContract.tokenSystem.componentTokensConsumeSemantic !== true) {
393
437
  validationErrors.push('designIntent.tokenSystem.componentTokensConsumeSemantic must equal true.');
394
438
  }
439
+ const tokenLockingPolicy = designIntentContract.tokenSystem.tokenLockingPolicy;
440
+ if (!tokenLockingPolicy || typeof tokenLockingPolicy !== 'object') {
441
+ validationErrors.push('designIntent.tokenSystem.tokenLockingPolicy must exist.');
442
+ } else {
443
+ if (tokenLockingPolicy.defaultLockState !== 'semantic-roles-locked-primitives-flexible') {
444
+ validationErrors.push('designIntent.tokenSystem.tokenLockingPolicy.defaultLockState must preserve semantic roles while keeping primitives flexible.');
445
+ }
446
+ if (!Array.isArray(tokenLockingPolicy.flexibleByDefault) || tokenLockingPolicy.flexibleByDefault.length < 4) {
447
+ validationErrors.push('designIntent.tokenSystem.tokenLockingPolicy.flexibleByDefault must list flexible primitive axes.');
448
+ }
449
+ if (!hasNonEmptyString(tokenLockingPolicy.promotionRule)) {
450
+ validationErrors.push('designIntent.tokenSystem.tokenLockingPolicy.promotionRule must be a non-empty string.');
451
+ }
452
+ }
395
453
  const fallbackPolicy = designIntentContract.tokenSystem.fallbackPolicy;
396
454
  if (!fallbackPolicy || typeof fallbackPolicy !== 'object') {
397
455
  validationErrors.push('designIntent.tokenSystem.fallbackPolicy must exist.');
@@ -589,6 +647,10 @@ export function validateDesignIntentContract(designIntentContract) {
589
647
  'requireStructuredHandoff',
590
648
  'requireRepoEvidenceAlignment',
591
649
  'forbidScreenshotDependency',
650
+ 'separateRequiredOutcomesFromCandidateMoves',
651
+ 'forbidCandidateMovesAsLockedRequirements',
652
+ 'forbidLibraryThemeAsVisualAuthority',
653
+ 'forbidLiteralAnchorChromeWithoutProductFunction',
592
654
  'requirePerSurfaceMutationOps',
593
655
  'forbidUniformSiblingSurfaceTreatment',
594
656
  'zeroBasedRedesignResetsPriorVisualsWhenRequested',
@@ -674,6 +736,23 @@ export function validateDesignIntentContract(designIntentContract) {
674
736
  if (!Array.isArray(designIntentContract.designExecutionHandoff.interactionStateMatrix) || designIntentContract.designExecutionHandoff.interactionStateMatrix.length < 1) {
675
737
  validationErrors.push('designIntent.designExecutionHandoff.interactionStateMatrix must list key component state expectations.');
676
738
  }
739
+ const expressionFlexibility = designIntentContract.designExecutionHandoff.expressionFlexibility;
740
+ if (!expressionFlexibility || typeof expressionFlexibility !== 'object') {
741
+ validationErrors.push('designIntent.designExecutionHandoff.expressionFlexibility must exist.');
742
+ } else {
743
+ if (!Array.isArray(expressionFlexibility.lockedOutcomes) || expressionFlexibility.lockedOutcomes.length < 3) {
744
+ validationErrors.push('designIntent.designExecutionHandoff.expressionFlexibility.lockedOutcomes must list locked outcomes.');
745
+ }
746
+ if (!Array.isArray(expressionFlexibility.candidateSignatureMoves) || expressionFlexibility.candidateSignatureMoves.length < 1) {
747
+ validationErrors.push('designIntent.designExecutionHandoff.expressionFlexibility.candidateSignatureMoves must include at least one candidate move placeholder.');
748
+ }
749
+ if (!Array.isArray(expressionFlexibility.flexibleAxes) || expressionFlexibility.flexibleAxes.length < 4) {
750
+ validationErrors.push('designIntent.designExecutionHandoff.expressionFlexibility.flexibleAxes must list flexible implementation axes.');
751
+ }
752
+ if (!String(expressionFlexibility.lockingRule || '').includes('candidate')) {
753
+ validationErrors.push('designIntent.designExecutionHandoff.expressionFlexibility.lockingRule must explain when candidate moves become required.');
754
+ }
755
+ }
677
756
  if (!Array.isArray(designIntentContract.designExecutionHandoff.taskFlowNarrative) || designIntentContract.designExecutionHandoff.taskFlowNarrative.length < 2) {
678
757
  validationErrors.push('designIntent.designExecutionHandoff.taskFlowNarrative must describe the key UI task flow in sequence.');
679
758
  }
@@ -707,6 +786,8 @@ export function validateDesignIntentContract(designIntentContract) {
707
786
  'requireBuildFromHandoff',
708
787
  'requireGapNotesBeforeFallback',
709
788
  'forbidGenericLayoutFallbackWithoutReason',
789
+ 'requireLockedVsFlexibleDecisionReview',
790
+ 'forbidCandidateMoveHardcoding',
710
791
  'forbidTestingDemoCopyInUi',
711
792
  'forbidTerminalOnlyUserFlows',
712
793
  ]) {
@@ -21,9 +21,14 @@ const GENERICITY_DRIFT_SIGNALS = [
21
21
  'timid-anchor-that-renames-dashboard-or-admin-shell',
22
22
  'motion-suppressed-without-accessibility-or-performance-reason',
23
23
  'motion-or-3d-omitted-from-fear-without-fit-analysis',
24
+ 'modern-library-rejected-from-dependency-fear-without-tradeoff-analysis',
25
+ 'component-library-selected-by-habit-without-product-fit',
24
26
  'scale-only-responsive-layout',
25
27
  'zero-based-redesign-kept-prior-visual-dna',
26
28
  'restyle-instead-of-recomposition',
29
+ 'literal-anchor-artifacts-used-as-required-ui-chrome',
30
+ 'candidate-signature-move-treated-as-locked-implementation',
31
+ 'library-theme-tokens-drive-visual-language',
27
32
  ];
28
33
 
29
34
  const FORBIDDEN_PATTERN_SIGNALS = [
@@ -41,6 +46,8 @@ const VALID_BOLD_SIGNALS = [
41
46
  'background-or-geometry-serves-product-function',
42
47
  'motion-or-spatial-experience-derived-from-anchor',
43
48
  'explicit-3d-canvas-fit-or-nonfit-decision',
49
+ 'official-docs-backed-modern-library-choice',
50
+ 'headless-or-component-primitive-restyled-to-product-language',
44
51
  'responsive-recomposition-by-task-priority',
45
52
  'purposeful-motion-with-reduced-motion-path',
46
53
  ];
@@ -176,7 +183,30 @@ function buildDesignIntentContractObject({
176
183
  'ui-primitives-or-rich-media',
177
184
  'typography-and-interaction',
178
185
  ],
179
- finalDecisionAuthority: 'project-fit-accessibility-performance-maintainability-official-docs',
186
+ finalDecisionAuthority: 'project-fit-accessibility-performance-maintainability-delivery-speed-official-docs',
187
+ },
188
+ designFlexibilityPolicy: {
189
+ mode: 'locked-outcomes-flexible-expression',
190
+ contractRole: 'Use docs/design-intent.json as review invariants and handoff structure, not as a frozen visual recipe unless the user explicitly locks a decision.',
191
+ lockedOutcomeTypes: [
192
+ 'confirmed-user-goals',
193
+ 'repo-evidence-and-runtime-constraints',
194
+ 'accessibility-and-production-readiness',
195
+ 'forbidden-patterns-and-safety-gates',
196
+ 'user-approved-brand-or-continuity-decisions',
197
+ ],
198
+ flexibleExpressionAxes: [
199
+ 'exact-palette-primitives',
200
+ 'font-family-selection',
201
+ 'radius-shadow-and-surface-treatment',
202
+ 'component-kit-theme-mapping',
203
+ 'signature-move-implementation',
204
+ 'literal-anchor-artifacts',
205
+ ],
206
+ tokenLockingRule: 'Semantic roles are required, but exact primitive values stay flexible until repo evidence, accessibility validation, implementation constraints, or explicit user approval locks them.',
207
+ signatureMovePolicy: 'Record the required experience outcome separately from candidate implementation moves; replace a candidate move when another move better fits the product.',
208
+ libraryVisualLanguagePolicy: 'Libraries supply behavior, accessibility, primitives, and delivery speed; they must not dictate final composition, theme, morphology, or visual language.',
209
+ literalAnchorPolicy: 'Translate anchors into workflow, hierarchy, density, typography, material behavior, state language, and interaction grammar before requiring literal props, marks, or chrome.',
180
210
  },
181
211
  conceptualAnchor: {
182
212
  mode: 'required-when-no-external-research',
@@ -228,8 +258,14 @@ function buildDesignIntentContractObject({
228
258
  mode: 'high-distinctiveness-with-accessibility-and-performance-guardrails',
229
259
  allowRichMotionAndMicroInteraction: true,
230
260
  rejectTimidDefaultWhenAnchorSupportsExpressiveUi: true,
261
+ rejectDependencyFearAsDownshiftReason: true,
231
262
  requireReducedMotionFallback: true,
232
263
  },
264
+ literalTranslationPolicy: {
265
+ preferNonLiteralTranslation: true,
266
+ allowedLiteralUse: 'Only use literal anchor artifacts when they serve a named product function, control, state, or task overlay.',
267
+ forbiddenLiteralUse: 'Do not turn anchor artifacts into decorative wallpaper, required chrome, default texture, or unavoidable theme props.',
268
+ },
233
269
  requiredDerivedAxes: [
234
270
  'typography',
235
271
  'morphology',
@@ -267,7 +303,7 @@ function buildDesignIntentContractObject({
267
303
  spacingDerivationSource: 'Explain spacing rhythm, density, and exceptions from anchorReference. Spacing grids are layout math, not decorative background lines.',
268
304
  typographyDerivationSource: 'Explain display, body, metadata, and data roles from anchorReference.',
269
305
  motionDerivationSource: 'Explain duration, easing, choreography, and reduced-motion from anchorReference.',
270
- validationRule: 'Every token must trace to anchorReference; revise tokens that cannot.',
306
+ validationRule: 'Every semantic token role must trace to anchorReference; keep exact primitive values flexible unless locked by repo evidence, accessibility validation, implementation constraints, or explicit user approval.',
271
307
  },
272
308
  motionPaletteDecision: {
273
309
  productCategorySignal: 'agent-inferred-starting-heuristic',
@@ -306,7 +342,7 @@ function buildDesignIntentContractObject({
306
342
  'spatial-or-3d-fit',
307
343
  'performance-and-reduced-motion-fallback',
308
344
  ],
309
- rejectionRule: 'State a product reason and replacement interaction quality before omitting 3D/canvas.',
345
+ rejectionRule: 'State a product reason and replacement interaction quality before omitting 3D/canvas. Package count or vague performance fear is not enough.',
310
346
  reviewQuestion: 'Is the interaction as expressive as the product can responsibly support?',
311
347
  },
312
348
  reviewQuestion: 'What visible evidence proves this is product-specific?',
@@ -329,11 +365,12 @@ function buildDesignIntentContractObject({
329
365
  libraryDecisions: [
330
366
  {
331
367
  library: 'agent-defined-or-none',
332
- purpose: 'Verify UI-related libraries against current official docs before imports.',
368
+ purpose: 'Select UI-related libraries dynamically from product fit, accessibility, interaction quality, maintenance, and current official docs before imports.',
333
369
  verifiedAt: null,
334
370
  sourceUrl: null,
335
371
  stableVersion: null,
336
372
  fallbackIfUnavailable: 'Use native CSS, browser APIs, or existing dependencies.',
373
+ selectionPolicy: 'Do not default to shadcn, native-only, Tailwind-only, or dependency avoidance by habit.',
337
374
  },
338
375
  ],
339
376
  mathSystems: {
@@ -357,6 +394,12 @@ function buildDesignIntentContractObject({
357
394
  forbidRawSpacingOutsidePrimitives: true,
358
395
  requireDocumentedExceptionForLegacyBypass: true,
359
396
  },
397
+ tokenLockingPolicy: {
398
+ defaultLockState: 'semantic-roles-locked-primitives-flexible',
399
+ lockedByDefault: ['semantic-role-purpose', 'accessibility-floor', 'state-role-meaning'],
400
+ flexibleByDefault: ['exact-color-values', 'font-family', 'radius-values', 'shadow-values', 'component-skin'],
401
+ promotionRule: 'Promote flexible tokens to locked only when user approval, repo evidence, accessibility validation, or implementation constraints require it.',
402
+ },
360
403
  namingConstraints: {
361
404
  forbidCurlyBracesInNames: true,
362
405
  forbidDotsInNames: true,
@@ -430,6 +473,10 @@ function buildDesignIntentContractObject({
430
473
  requireStructuredHandoff: true,
431
474
  requireRepoEvidenceAlignment: true,
432
475
  forbidScreenshotDependency: true,
476
+ separateRequiredOutcomesFromCandidateMoves: true,
477
+ forbidCandidateMovesAsLockedRequirements: true,
478
+ forbidLibraryThemeAsVisualAuthority: true,
479
+ forbidLiteralAnchorChromeWithoutProductFunction: true,
433
480
  handoffFormatVersion: 'ui-handoff-v1',
434
481
  requirePerSurfaceMutationOps: true,
435
482
  forbidUniformSiblingSurfaceTreatment: true,
@@ -531,6 +578,26 @@ function buildDesignIntentContractObject({
531
578
  notes: 'Refine states from project language and anchor; reject anonymous panels.',
532
579
  },
533
580
  ],
581
+ expressionFlexibility: {
582
+ lockedOutcomes: [
583
+ 'preserve-primary-user-goal',
584
+ 'preserve-accessibility-floor',
585
+ 'preserve-production-content-policy',
586
+ 'preserve-forbidden-patterns',
587
+ ],
588
+ candidateSignatureMoves: [
589
+ 'agent-defined-candidate-move-not-locked-until-refined',
590
+ ],
591
+ flexibleAxes: [
592
+ 'palette-primitives',
593
+ 'typeface-choice',
594
+ 'surface-treatment',
595
+ 'component-library-skin',
596
+ 'motion-implementation',
597
+ 'anchor-artifact-literalness',
598
+ ],
599
+ lockingRule: 'A candidate move becomes required only after repo evidence, product function, accessibility need, or explicit user approval makes it necessary.',
600
+ },
534
601
  taskFlowNarrative: [
535
602
  `Entry: start ${projectName} from real evidence, not a generic opener.`,
536
603
  'Resolution: define proof, feedback, recovery, and next action.',
@@ -558,6 +625,8 @@ function buildDesignIntentContractObject({
558
625
  requireBuildFromHandoff: true,
559
626
  requireGapNotesBeforeFallback: true,
560
627
  forbidGenericLayoutFallbackWithoutReason: true,
628
+ requireLockedVsFlexibleDecisionReview: true,
629
+ forbidCandidateMoveHardcoding: true,
561
630
  forbidTestingDemoCopyInUi: true,
562
631
  forbidTerminalOnlyUserFlows: true,
563
632
  },
@@ -155,28 +155,29 @@ export function buildDesignBootstrapPrompt({
155
155
  '4. designPhilosophy',
156
156
  '5. visualDirection',
157
157
  '6. externalResearchIntake',
158
- '7. conceptualAnchor',
159
- '8. derivedTokenLogic',
160
- '9. motionPaletteDecision',
161
- '10. aiSafeUiAudit',
162
- '11. productionContentPolicy',
163
- '12. libraryResearchStatus',
164
- '13. libraryDecisions',
165
- '14. mathSystems',
166
- '15. tokenSystem',
167
- '16. colorTruth',
168
- '17. crossViewportAdaptation',
169
- '18. motionSystem',
170
- '19. componentMorphology',
171
- '20. accessibilityPolicy',
172
- '21. designExecutionPolicy',
173
- '22. designExecutionHandoff',
174
- '23. reviewRubric',
175
- '24. contextHygiene',
176
- '25. forbiddenPatterns',
177
- '26. requiredDesignSections',
178
- '27. implementation',
179
- '28. repoEvidence when onboarding or detector evidence exists',
158
+ '7. designFlexibilityPolicy',
159
+ '8. conceptualAnchor',
160
+ '9. derivedTokenLogic',
161
+ '10. motionPaletteDecision',
162
+ '11. aiSafeUiAudit',
163
+ '12. productionContentPolicy',
164
+ '13. libraryResearchStatus',
165
+ '14. libraryDecisions',
166
+ '15. mathSystems',
167
+ '16. tokenSystem',
168
+ '17. colorTruth',
169
+ '18. crossViewportAdaptation',
170
+ '19. motionSystem',
171
+ '20. componentMorphology',
172
+ '21. accessibilityPolicy',
173
+ '22. designExecutionPolicy',
174
+ '23. designExecutionHandoff',
175
+ '24. reviewRubric',
176
+ '25. contextHygiene',
177
+ '26. forbiddenPatterns',
178
+ '27. requiredDesignSections',
179
+ '28. implementation',
180
+ '29. repoEvidence when onboarding or detector evidence exists',
180
181
  '',
181
182
  '## Mechanical Gates',
182
183
  '1. Do not copy external style guides.',
@@ -191,6 +192,7 @@ export function buildDesignBootstrapPrompt({
191
192
  '10. Define viewport mutation rules for mobile, tablet, and desktop. Shrinking desktop is failure.',
192
193
  '11. Keep structured execution representation-first: surface plan, component graph, content-priority map, viewport mutation plan, and interaction-state matrix.',
193
194
  '12. Make design-intent.json carry designExecutionPolicy and designExecutionHandoff, not prose-only policy.',
195
+ '12a. Make design-intent.json carry designFlexibilityPolicy so locked outcomes, candidate moves, and flexible expression axes stay separate.',
194
196
  '13. Keep semantic review focused on contract fidelity, distinctiveness, hierarchy, state behavior, and viewport mutation.',
195
197
  '14. Treat WCAG 2.2 AA as the hard floor. Use APCA only as advisory tuning.',
196
198
  '15. Cover focus visibility, focus appearance, target size, accessible authentication, keyboard access, and dynamic status/state access.',
@@ -208,13 +210,18 @@ export function buildDesignBootstrapPrompt({
208
210
  '27. Reject anchors described only as modern, clean, premium, expressive, minimal, or bold.',
209
211
  '28. Set conceptualAnchor.anchorReference and make derivedTokenLogic.anchorReference match exactly.',
210
212
  '29. Fill derivedTokenLogic before code. If a token cannot trace to anchorReference, revise it.',
213
+ '29a. Lock semantic roles before exact values. Do not freeze fonts, color primitives, radius, shadows, or component-kit theme treatment unless repo evidence, accessibility validation, implementation constraints, or explicit user approval requires it.',
211
214
  '30. Research current official docs before importing any new UI-related library.',
212
- '31. If research is unavailable, set libraryResearchStatus to pending-verification and use native CSS, browser APIs, or existing dependencies.',
213
- '32. Define reviewRubric and require genericity findings to name the actual drift signal.',
214
- '33. Separate taste from failure. Bold accessible work is valid.',
215
- '34. For zero-based redesign, create visualResetStrategy and reset composition, hierarchy, palette/typography, motion or interaction, and responsive information architecture.',
216
- '35. Treat productionContentPolicy as blocking: remove visible testing, demo, sample, placeholder, lorem, TODO, coming soon, and scaffold copy unless it is a real product state.',
217
- '36. Do not make core user workflows terminal-only unless the product is explicitly a CLI, developer tool, or operational runbook.',
215
+ '31. Do not default to shadcn/ui, Tailwind-only, native-only, or any component kit by habit; choose the UI foundation from product fit, accessibility, interaction quality, runtime constraints, and official docs.',
216
+ '32. If research is unavailable, set libraryResearchStatus to pending-verification and use native CSS, browser APIs, or existing dependencies only when they can preserve the intended ambition.',
217
+ '33. Do not reject modern lightweight libraries solely because they add a dependency; package count or vague performance fear is not a blocker by itself.',
218
+ '34. Define reviewRubric and require genericity findings to name the actual drift signal.',
219
+ '35. Separate taste from failure. Bold accessible work is valid.',
220
+ '36. For zero-based redesign, create visualResetStrategy and reset composition, hierarchy, palette/typography, motion or interaction, and responsive information architecture.',
221
+ '37. Treat productionContentPolicy as blocking: remove visible testing, demo, sample, placeholder, lorem, TODO, coming soon, and scaffold copy unless it is a real product state.',
222
+ '38. Do not make core user workflows terminal-only unless the product is explicitly a CLI, developer tool, or operational runbook.',
223
+ '39. Separate required experience outcomes from candidate implementation moves. Candidate signature moves are proposals until product evidence, accessibility, or user approval makes them required.',
224
+ '40. Translate conceptual anchors non-literally first. Do not turn anchor artifacts into required chrome, decorative props, wallpaper, or theme objects unless they serve a named product function.',
218
225
  '',
219
226
  '## Creative Ambition Floor',
220
227
  'Before implementation, the design contract must name one authored visual bet, one product-derived palette move, one signature motion/spatial/interaction behavior, and one morphology or composition choice that would not appear in a generic AI template.',
@@ -224,11 +231,13 @@ export function buildDesignBootstrapPrompt({
224
231
  '',
225
232
  '## Token Derivation Audit',
226
233
  'Before implementation, docs/design-intent.json must include derivedTokenLogic.anchorReference plus colorDerivationSource, spacingDerivationSource, typographyDerivationSource, motionDerivationSource, and validationRule.',
227
- 'Every token must be explainable from anchorReference. If the rationale is only looks good, common practice, modern default, or framework default, derive the token again before UI code.',
234
+ 'Every semantic token role must be explainable from anchorReference. If the rationale is only looks good, common practice, modern default, or framework default, derive the token again before UI code.',
235
+ 'Keep exact primitive values flexible until repo evidence, accessibility validation, implementation constraints, or explicit user approval locks them.',
228
236
  '',
229
237
  '## Library Research Protocol',
230
238
  'If web search is available, verify every new UI, animation, scroll, 3D, canvas, chart, icon, styling, or primitive library against current official docs and record source URL, fetched date, stable compatible version, purpose, risk, and fallback.',
231
- 'If web search is unavailable or fails, set libraryResearchStatus to pending-verification, record LIBRARY_TO_VERIFY notes, and use native CSS, browser APIs, or already-present project dependencies until verification is possible.',
239
+ 'If web search is unavailable or fails, set libraryResearchStatus to pending-verification, record LIBRARY_TO_VERIFY notes, and use native CSS, browser APIs, or already-present project dependencies only when they can preserve the intended ambition until verification is possible.',
240
+ 'Select UI foundations dynamically. Use ready-made primitives or component kits for mechanics when they fit, but replace library-default visual language with project-specific composition, tokens, motion, state treatment, and morphology.',
232
241
  '',
233
242
  '## Project Inputs',
234
243
  `- Project name: ${discoveryAnswers.projectName}`,
@@ -252,6 +261,7 @@ export function buildDesignBootstrapPrompt({
252
261
  '5. Encode structured design execution as policy: representation strategy, surface plan, component graph, content-priority map, viewport mutation plan, interaction-state matrix, semantic review focus, and structured handoff requirements.',
253
262
  '6. Encode an explicit structured handoff inside docs/design-intent.json: surface plan, component graph, content-priority map, viewport mutation plan, interaction-state matrix, task-flow narrative, and signature move rationale.',
254
263
  '7. Encode a stable review rubric: required dimensions, genericity signals, valid bold signals, and reporting rules that separate taste from real failure.',
264
+ '7a. Encode designFlexibilityPolicy and designExecutionHandoff.expressionFlexibility so future agents know what is locked and what can change.',
255
265
  '8. Make the handoff executable without screenshot dependency. The contract must still guide high-precision UI generation from repo evidence and changed code alone.',
256
266
  '9. Preserve repoEvidence.designEvidenceSummary when onboarding or detector evidence exists instead of discarding it.',
257
267
  '10. If repoEvidence.designEvidenceSummary.structuredInspection exists, use it as stronger evidence for class surfaces, inline style bypasses, and expression-backed UI structure before defaulting to generic assumptions.',
@@ -261,6 +271,7 @@ export function buildDesignBootstrapPrompt({
261
271
  '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.',
262
272
  '15. Record conceptualAnchor.agentResearchMode, specificReferencePoint, signatureMotion, typographicDecision, visualRiskBudget, motionRiskBudget, and cohesionChecks so the final UI cannot quietly fall back to a timid dashboard/admin mental model.',
263
273
  '16. Preserve derivedTokenLogic, libraryResearchStatus, and libraryDecisions so token choices and dependency uncertainty stay visible before implementation.',
274
+ '16a. Preserve designFlexibilityPolicy so the machine contract guides consistency without freezing literal anchor artifacts, exact token primitives, or component-kit visual language.',
264
275
  '17. Preserve productionContentPolicy so UI output is ship-ready and not a testing-looking scaffold.',
265
276
  '18. After the contract exists, use it as a first-class source for future UI tasks.',
266
277
  '',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryuenn3123/agentic-senior-core",
3
- "version": "3.0.43",
3
+ "version": "3.0.44",
4
4
  "type": "module",
5
5
  "description": "Force your AI Agent to code like a Staff Engineer, not a Junior.",
6
6
  "bin": {
@@ -94,6 +94,8 @@ const REQUIRED_BOOTSTRAP_DESIGN_SNIPPETS = [
94
94
  'WCAG 2.2 AA is the hard floor',
95
95
  'APCA may be used only as advisory perceptual tuning',
96
96
  'unresearched dependency choices',
97
+ 'Dynamic UI Foundation Selection',
98
+ 'A new dependency, package count, or vague performance concern is not a blocker by itself.',
97
99
  'default component-kit styling without product rationale',
98
100
  'genericity findings that cannot name the exact drift signal',
99
101
  ];
@@ -334,6 +334,7 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
334
334
  'Creative Ambition Floor',
335
335
  'AI Color and Template Residue Audit',
336
336
  'Motion and 3D Courage Rule',
337
+ 'Design Flexibility Layer',
337
338
  'visually exploratory, product-derived palettes',
338
339
  'decorative grid wallpaper',
339
340
  '`aiSafeUiAudit`',
@@ -346,6 +347,9 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
346
347
  'WCAG 2.2 AA is the hard floor',
347
348
  'APCA may be used only as advisory perceptual tuning',
348
349
  'unresearched dependency choices',
350
+ 'Dynamic UI Foundation Selection',
351
+ 'locked outcomes from flexible expression',
352
+ 'A new dependency, package count, or vague performance concern is not a blocker by itself.',
349
353
  'default component-kit styling without product rationale',
350
354
  'genericity findings that cannot name the exact drift signal',
351
355
  ],
@@ -398,6 +402,7 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
398
402
  'structure-first-scaffold',
399
403
  'colorTruth',
400
404
  'motionPaletteDecision',
405
+ 'designFlexibilityPolicy',
401
406
  'aiSafeUiAudit',
402
407
  'aiColorAudit',
403
408
  'motionSpatialCourageAudit',
@@ -419,6 +424,8 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
419
424
  'seedBehaviorsRequireRefinement',
420
425
  'accessibilityPolicy',
421
426
  'designExecutionPolicy',
427
+ 'separateRequiredOutcomesFromCandidateMoves',
428
+ 'forbidCandidateMovesAsLockedRequirements',
422
429
  'seedRefinementRequiredBeforeUiImplementation',
423
430
  'requirePerSurfaceMutationOps',
424
431
  'forbidUniformSiblingSurfaceTreatment',
@@ -443,6 +450,7 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
443
450
  'taskFlowNarrative',
444
451
  'signatureMoveRationale',
445
452
  'implementationGuardrails',
453
+ 'expressionFlexibility',
446
454
  'reviewRubric',
447
455
  'genericityAutoFail',
448
456
  'genericitySignals',
@@ -452,6 +460,9 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
452
460
  'offline-prescribed-style-used-as-final-direction',
453
461
  'unresearched-library-or-framework-choice',
454
462
  'single-safe-typographic-family-without-role-contrast-or-rationale',
463
+ 'modern-library-rejected-from-dependency-fear-without-tradeoff-analysis',
464
+ 'component-library-selected-by-habit-without-product-fit',
465
+ 'official-docs-backed-modern-library-choice',
455
466
  'hardComplianceFloor',
456
467
  'advisoryContrastModel',
457
468
  'contextHygiene',
@@ -540,6 +551,8 @@ export const REQUIRED_DEPENDENCY_FRESHNESS_AUTOMATION_SNIPPETS = [
540
551
  'latest stable compatible dependency version',
541
552
  'official scaffolder or setup command',
542
553
  'Only step down to an older dependency version after documenting',
554
+ 'Do not treat dependency avoidance as an engineering virtue by itself.',
555
+ 'performance-fear choices',
543
556
  ],
544
557
  },
545
558
  {