@ryuenn3123/agentic-senior-core 6.16.5 → 6.17.0

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.
Files changed (49) hide show
  1. package/.agents/plugins/agentic-senior-core/.codex-plugin/plugin.json +1 -1
  2. package/.agents/plugins/agentic-senior-core/commands/asc-develop.md +1 -1
  3. package/.agents/plugins/agentic-senior-core/commands/asc-develop.toml +2 -3
  4. package/.agents/plugins/agentic-senior-core/commands/asc-test.md +1 -2
  5. package/.agents/plugins/agentic-senior-core/commands/asc-test.toml +2 -3
  6. package/.agents/plugins/agentic-senior-core/commands/asc-ui.md +1 -1
  7. package/.agents/plugins/agentic-senior-core/commands/asc-ui.toml +2 -3
  8. package/.agents/plugins/agentic-senior-core/hooks/lib/known-ui-slop-patterns.json +10 -0
  9. package/.agents/plugins/agentic-senior-core/hooks/post-edit-enforce.js +70 -9
  10. package/.agents/plugins/agentic-senior-core/hooks/stop-verify-gate.js +148 -0
  11. package/.agents/plugins/agentic-senior-core/hooks.json +7 -0
  12. package/.agents/plugins/agentic-senior-core/plugin.json +1 -1
  13. package/.agents/plugins/agentic-senior-core/rules/agentic-senior-core.md +2 -1
  14. package/.agents/plugins/agentic-senior-core/skills/asc/SKILL.md +7 -6
  15. package/.agents/plugins/agentic-senior-core/skills/asc/references/writing-skills.md +16 -1
  16. package/.agents/plugins/agentic-senior-core/skills/asc-develop/SKILL.md +44 -59
  17. package/.agents/plugins/agentic-senior-core/skills/asc-develop/references/execution-plans.md +43 -0
  18. package/.agents/plugins/agentic-senior-core/skills/asc-develop/references/subagent-orchestration.md +55 -0
  19. package/.agents/plugins/agentic-senior-core/skills/asc-pentest/references/fuzzing-dsl.md +1 -1
  20. package/.agents/plugins/agentic-senior-core/skills/asc-test/SKILL.md +5 -3
  21. package/.agents/plugins/agentic-senior-core/skills/asc-test/references/regression-proof.md +2 -2
  22. package/.agents/plugins/agentic-senior-core/skills/asc-test/references/systematic-debugging.md +32 -0
  23. package/.agents/plugins/agentic-senior-core/skills/asc-test/references/tdd-cycle.md +2 -2
  24. package/.agents/plugins/agentic-senior-core/skills/asc-test/references/uat.md +1 -1
  25. package/.agents/plugins/agentic-senior-core/skills/asc-ui/SKILL.md +42 -88
  26. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/data-to-structure.md +96 -0
  27. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/responsive-and-copy.md +32 -0
  28. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/states-and-a11y.md +38 -0
  29. package/gemini-extension.json +1 -1
  30. package/lib/cli/commands/preview.mjs +22 -17
  31. package/package.json +1 -1
  32. package/plugin.yaml +1 -1
  33. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/accessibility.md +0 -102
  34. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/copy-i18n.md +0 -151
  35. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/craft/browser-surfaces.md +0 -69
  36. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/craft/color-surfaces.md +0 -74
  37. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/craft/motion.md +0 -55
  38. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/craft/themes-catalog.md +0 -198
  39. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/craft/typography.md +0 -54
  40. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/divergence.md +0 -159
  41. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/mobile-responsive.md +0 -115
  42. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/modes/experience.md +0 -27
  43. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/modes/genre-calibration.md +0 -89
  44. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/modes/operate.md +0 -79
  45. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/modes/persuade.md +0 -100
  46. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/modes/read.md +0 -43
  47. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/redesign-audit.md +0 -89
  48. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/reflexes.md +0 -59
  49. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/states-feedback.md +0 -148
package/plugin.yaml CHANGED
@@ -1,5 +1,5 @@
1
1
  name: agentic-senior-core
2
- version: 6.16.5
2
+ version: 6.17.0
3
3
  description: Universal AI coding rules. Write code like a staff engineer.
4
4
  author: fatidaprilian
5
5
  provides_hooks:
@@ -1,102 +0,0 @@
1
- # Accessibility Engineering & WCAG 2.2 Compliance
2
-
3
- Accessibility is not an afterthought or an optional overlay. It is the structural floor of web engineering. Every component must be perceivable, operable, understandable, and robust.
4
-
5
- ---
6
-
7
- ## 1. Contrast Ratios & The Grey-on-Grey Trap
8
-
9
- All text and critical visual indicators must meet WCAG 2.2 Level AA mathematical contrast floors.
10
-
11
- ### 1.1 Contrast Floors
12
- - **Normal Body Text (< 18pt / 24px regular, < 14pt bold):** Minimum `4.5:1` contrast ratio against its background.
13
- - **Large Text ($\ge$ 18pt / 24px regular, $\ge$ 14pt bold):** Minimum `3:1` contrast ratio.
14
- - **UI Components & Graphical Boundaries:** Active input borders, toggle switches, and focus indicators require minimum `3:1` against adjacent background colors.
15
-
16
- ### 1.2 The Dark Mode Grey-on-Grey Trap
17
- A frequent aesthetic failure is using low-contrast grey text for "subtle elegance":
18
- - **Failing example:** `text-zinc-500` (`#71717a`) on `bg-zinc-900` (`#18181b`) = **3.8:1** (Fails 4.5:1 AA for body copy).
19
- - **Compliant fix:** `text-zinc-400` (`#a1a1aa`) on `bg-zinc-900` = **6.2:1** (Passes AA).
20
- - **Light mode equivalent:** `text-zinc-400` (`#a1a1aa`) on `bg-white` = **2.6:1** (Fails). Must use `text-zinc-600` (`#52525b`, 5.7:1) or darker for readable secondary copy.
21
-
22
- ---
23
-
24
- ## 2. Focus Management & Keyboard Operability
25
-
26
- Every capability available via pointer must be fully operable via keyboard alone.
27
-
28
- ### 2.1 The Focus-Visible Rule
29
- Never remove browser focus indicators without providing an immediate high-contrast replacement:
30
-
31
- ```html
32
- <!-- BANNED: Strips focus visibility entirely -->
33
- <button class="outline-none">Action</button>
34
-
35
- <!-- ENFORCED: High-contrast focus ring on keyboard interaction -->
36
- <button class="focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background">
37
- Action
38
- </button>
39
- ```
40
-
41
- ### 2.2 Dialog Focus Traps & Escape Key Contract
42
- Any modal, drawer, or sheet must obey the modal contract:
43
- 1. **Focus Trap:** When opened, focus moves to the first focusable element inside the modal. Keyboard `Tab` cycles strictly inside the dialog.
44
- 2. **Escape Key Dismissal:** Pressing `Escape` must immediately close the dialog.
45
- 3. **Return Focus:** Upon closing, focus must return to the element that triggered the dialog open event.
46
- 4. **ARIA Metadata:** Outer container must declare `role="dialog"`, `aria-modal="true"`, and `aria-labelledby="dialog-title-id"`.
47
-
48
- ---
49
-
50
- ## 3. Accessible Form Controls
51
-
52
- Forms must convey intent, association, and error states programmatically.
53
-
54
- ```html
55
- <div class="space-y-1.5">
56
- <label for="user-email" class="text-sm font-medium text-foreground">
57
- Work email
58
- </label>
59
- <input
60
- id="user-email"
61
- name="email"
62
- type="email"
63
- aria-invalid="true"
64
- aria-describedby="email-error-msg"
65
- class="w-full px-3 py-2 rounded-md border border-destructive bg-background text-foreground focus-visible:ring-2 focus-visible:ring-destructive"
66
- />
67
- <p id="email-error-msg" class="text-xs text-destructive flex items-center gap-1" role="alert">
68
- <svg class="w-3.5 h-3.5" aria-hidden="true">...</svg>
69
- <span>Enter a valid corporate email address (e.g. name@company.com).</span>
70
- </p>
71
- </div>
72
- ```
73
-
74
- - Every `<input>` must be explicitly linked via `for` and `id` to a `<label>`. Do not rely solely on `placeholder`.
75
- - Errors must use `role="alert"` and link via `aria-describedby`.
76
- - When invalid, set `aria-invalid="true"`.
77
-
78
- ---
79
-
80
- ## 4. Icon & Image Semantics
81
-
82
- 1. **Decorative Icons:**
83
- All decorative SVG icons alongside visible text must be hidden from screen readers:
84
- ```html
85
- <button>
86
- <svg aria-hidden="true" class="w-4 h-4">...</svg>
87
- <span>Download receipt</span>
88
- </button>
89
- ```
90
-
91
- 2. **Standalone Icon Buttons:**
92
- Buttons containing only an icon must supply an accessible name via `aria-label`:
93
- ```html
94
- <button type="button" aria-label="Delete document" class="p-2">
95
- <svg aria-hidden="true" class="w-4 h-4">...</svg>
96
- </button>
97
- ```
98
-
99
- 3. **Images:**
100
- - Informative graphics, charts, and photos: descriptive `alt="Graph showing 42% revenue increase in Q3"`.
101
- - Purely aesthetic background patterns or decorative dividers: empty `alt=""` so screen readers ignore them.
102
-
@@ -1,151 +0,0 @@
1
- # UX Writing, Microcopy & Internationalization (i18n)
2
-
3
- UI microcopy is an operational tool, not marketing collateral. Every word on screen either reduces user uncertainty or costs attention.
4
-
5
- ---
6
-
7
- ## 1. The 50% Reduction Rule
8
-
9
- Draft the copy, then delete half the words without losing meaning. Remove polite throat-clearing, redundant labels, and ornamental adjectives.
10
-
11
- | Verbose / Conversational | Direct Operational Copy | Rationale |
12
- |---|---|---|
13
- | "In order to get started, please enter your email address below." | "Email address" | Input labels require no preamble. |
14
- | "Are you sure you want to delete this repository? This action cannot be undone." | "Delete `octocat/hello-world`? This permanently removes all code and history." | Name the exact target and concrete consequence. |
15
- | "We couldn't seem to find any results matching your search criteria." | "No results for \"billing\"." | State the outcome, mirror the query. |
16
- | "Successfully updated your preferences." | "Preferences saved." | Past participle, 2 words, passive verb eliminated. |
17
- | "Click here to view our comprehensive documentation." | "View documentation →" | Never write "click here"; state the destination. |
18
-
19
- ---
20
-
21
- ## 2. Action Controls: Verb + Noun Grammar
22
-
23
- Buttons and mutation triggers must name their concrete target. Never use ambiguous lone affirmations.
24
-
25
- - **Banned:** `Submit`, `OK`, `Yes`, `Proceed`, `Continue`, `Go`, `Done`.
26
- - **Enforced:** `Create project`, `Invite member`, `Deploy branch`, `Delete webhook`, `Export CSV`.
27
-
28
- Exception: Standard multi-step navigation controls in fixed wizards (`Back`, `Next`) where the step indicator supplies the context.
29
-
30
- ---
31
-
32
- ## 3. Arithmetic Copy Budgets & The Argument-First Protocol
33
-
34
- ### 3.1 Arithmetic Budgets
35
- Constraint is arithmetic; enforce before falling in love with a sentence:
36
- - **Hero Headline Budget:** Must fit in **two lines or fewer** across all viewports.
37
- - Mobile (390px): $\le 32$ characters ($\sim 4$–$5$ words).
38
- - Desktop (1280px): $\le 42$ characters ($\sim 5$–$6$ words).
39
- - Use `text-wrap: balance` and intentional `<br>` tags to avoid single-word orphans.
40
- - **Supporting Line Budget:** Exactly **1 sentence**, at most **22 words**.
41
- - Directly states concrete function and audience.
42
- - Never repeats or paraphrases headline words.
43
- - **First-Viewport Word Budget:** Maximum **80 words** total across the first screen.
44
-
45
- ### 3.2 The Argument-First Protocol
46
- Before writing any HTML/JSX markup, outline the page as a sequence of claims with verifiable proofs:
47
- ```text
48
- 1. Claim: Three-legged oak stool, made to order. → Proof: High-res macro photography of stool.
49
- 2. Claim: Each seat cut from single solid board. → Proof: 3 close-ups of continuous wood grain.
50
- 3. Claim: Shipped in 6 weeks with tracking. → Proof: Verifiable production stages schedule.
51
- 4. Claim: Costs $240, delivered by the maker. → Proof: Exact price figure + Order button.
52
- ```
53
- *Rule:* Any section that lacks a factual claim or verifiable proof is filler—delete it immediately.
54
-
55
- ---
56
-
57
- ## 4. AI Cadences & Marketing Buzzword Blacklist
58
-
59
- ### 4.1 Banned AI Cadence Formulas
60
- Language models fall into statistical average patterns; recognize and refuse them:
61
- 1. **The Mad-Lib:** *"The [AI-powered/next-gen] platform for modern teams."*
62
- 2. **The Tricolon:** *"Fast. Simple. Secure."* or *"Plan. Build. Ship."*
63
- 3. **The Rebuttal:** *"It’s not just a tool, it’s a workflow."* / *"More than a framework."*
64
- 4. **The Preamble Throat-Clearing:** *"In today’s fast-paced digital world..."* / *"Built for modern teams..."*
65
- 5. **The Em-Dash Habit:** Using multiple em-dashes (`—`) in a single paragraph. Use a full stop.
66
-
67
- ### 4.2 Banned Marketing Buzzwords
68
- The following adjectives and verbs are banned across all surfaces:
69
- `seamless`, `seamlessly`, `empower`, `empowering`, `robust`, `effortless`, `effortlessly`, `cutting-edge`, `game-changing`, `elevate`, `unlock`, `unleash`, `dive in`, `delightful`, `next-generation`, `supercharge`, `blazing-fast`.
70
-
71
- When tempted to write an adjective, state the measurable property instead:
72
- - Instead of: *"A robust, blazing-fast pipeline."*
73
- - Write: *"Builds complete in under 45 seconds with isolated caching."*
74
-
75
- ---
76
-
77
- ## 5. Actionable Error Messages & Recovery
78
-
79
- An operational error message must never produce a dead end or display raw internal stack traces. Every error must answer three questions:
80
- 1. **What failed:** Direct statement of the blocked action.
81
- 2. **Why:** Factual cause (if actionable and known).
82
- 3. **How to recover:** Concrete button or path to unblock the user.
83
-
84
- | Raw / Unhelpful Error | Actionable Engineering Copy | Recovery Path |
85
- |---|---|---|
86
- | "Error 413: Payload too large." | "File exceeds the 25MB limit." | "Choose a smaller file" CTA |
87
- | "Failed to connect to server." | "Unable to reach database. Changes saved locally." | "Retry connection" button |
88
- | "Invalid credentials." | "Incorrect password for user@example.com." | "Reset password →" link |
89
-
90
- ---
91
-
92
- ## 6. Single-Language Purity & Anti-Gado-Gado
93
-
94
- Interfaces must maintain strict language purity. Mixing two languages within the same surface causes cognitive friction and feels unpolished.
95
-
96
- ### 6.1 Strict Monolingual Surface
97
- Choose one language for the entire surface and enforce it across headings, labels, errors, and tooltips:
98
- - **English UI:** All copy, actions, and timestamps in English.
99
- - **Indonesian UI:** All copy, actions, and timestamps in standard Indonesian (KBBI/PUEBI).
100
-
101
- ### 6.2 Ban Hybrid Neologisms (Indonesian Context)
102
- Never prefix Indonesian grammatical affixes (`di-`, `meng-`, `ter-`, `pe-`) onto raw English stems:
103
-
104
- | Hybrid Neologism (Banned) | Standard Indonesian | Pure English Alternative |
105
- |---|---|---|
106
- | `di-submit` | `Dikirim` / `Diserahkan` | `Submitted` |
107
- | `meng-generate` | `Menghasilkan` / `Membuat` | `Generating` |
108
- | `di-cancel` | `Dibatalkan` | `Cancelled` |
109
- | `meng-handle` | `Menangani` | `Handling` |
110
- | `di-approve` | `Disetujui` | `Approved` |
111
- | `meng-update` | `Memperbarui` | `Updating` |
112
- | `di-delete` | `Dihapus` | `Deleted` |
113
- | `me-restore` | `Memulihkan` | `Restoring` |
114
-
115
- ---
116
-
117
- ## 7. Dynamic Text Expansion & Internationalization Layout
118
-
119
- Text length varies drastically between languages:
120
- - German and Dutch expand +20% to +35% compared to English.
121
- - Indonesian expands +15% to +30% for verb-rich phrases.
122
- - Japanese and Chinese are visually dense and vertically taller.
123
-
124
- ### 7.1 Layout Rules for Expanding Strings
125
- 1. **Never set fixed widths on action buttons:**
126
- ```html
127
- <!-- BANNED: clips or overflows in German/Indonesian -->
128
- <button class="w-[120px] truncate">Save settings</button>
129
-
130
- <!-- ENFORCED: content-driven width with min-width safety -->
131
- <button class="min-w-[5rem] px-4 py-2">Save settings</button>
132
- ```
133
-
134
- 2. **Support multi-line wrapping for headings and table headers:**
135
- - Avoid `white-space: nowrap` on containers holding localized strings unless horizontally scrolling is explicitly designed.
136
- - Use `hyphens: auto` or flex wrapping on dense metric cards.
137
-
138
- 3. **Isolate placeholders and interpolated values:**
139
- - Never assemble sentences by concatenating translated strings:
140
- ```javascript
141
- // BANNED: grammar breaks in right-to-left or verb-final languages
142
- const msg = t("Deleted") + " " + count + " " + t("items");
143
-
144
- // ENFORCED: parameterized translation tokens
145
- const msg = t("deleted_items_count", { count });
146
- ```
147
-
148
- 4. **Numeric and Date Formatting:**
149
- - Use `Intl.NumberFormat` and `Intl.DateTimeFormat` with the active locale.
150
- - Never hardcode date patterns (`MM/DD/YYYY` fails in locales expecting `DD/MM/YYYY` or `YYYY-MM-DD`).
151
-
@@ -1,69 +0,0 @@
1
- # Craft: Themed Browser Surfaces
2
-
3
- Grounded in: Impeccable Browser Surfaces Standard and Web Platform Craft.
4
-
5
- > **Why This Matters:** The parts of the viewport you did not author still carry the design. Text selection, input carets, custom scrollbars, and focus rings all ship with unstyled browser defaults that belong to no design system. Theming these surfaces from the project palette is the clearest signal of intentional human craft.
6
-
7
- ---
8
-
9
- ## 1. Text Selection Highlight
10
-
11
- - **Theme the Selection:**
12
- - Standard browser selection (harsh electric blue) frequently clashes with custom brand palettes.
13
- - Apply semantic selection tokens matching the brand accent:
14
- ```css
15
- ::selection {
16
- background-color: var(--primary);
17
- color: var(--primary-foreground);
18
- }
19
- ```
20
- ```html
21
- <!-- Tailwind root or body -->
22
- <body class="selection:bg-primary selection:text-primary-foreground">
23
- ```
24
-
25
- ---
26
-
27
- ## 2. Form Carets & Native Focus
28
-
29
- - **Input Caret Color:**
30
- - Style the text cursor to match the primary brand token:
31
- ```css
32
- input, textarea {
33
- caret-color: var(--primary);
34
- }
35
- ```
36
- - **Consistent Focus Visible:**
37
- - Never let the browser default blue outline show on interactive elements:
38
- ```css
39
- :focus-visible {
40
- outline: 2px solid var(--ring);
41
- outline-offset: 2px;
42
- }
43
- ```
44
-
45
- ---
46
-
47
- ## 3. Custom Scrollbar Theming
48
-
49
- - **Subtle Scrollbars for Overflow Containers:**
50
- - Default browser scrollbars on Windows/Linux are bulky and intrusive.
51
- - Style internal scroll containers (`overflow-y-auto`, `overflow-x-auto`) with sleek, low-contrast scrollbars:
52
- ```css
53
- .custom-scrollbar {
54
- scrollbar-width: thin;
55
- scrollbar-color: var(--border) transparent;
56
- }
57
- .custom-scrollbar::-webkit-scrollbar {
58
- width: 6px;
59
- height: 6px;
60
- }
61
- .custom-scrollbar::-webkit-scrollbar-thumb {
62
- background-color: var(--border);
63
- border-radius: 9999px;
64
- }
65
- .custom-scrollbar::-webkit-scrollbar-track {
66
- background: transparent;
67
- }
68
- ```
69
-
@@ -1,74 +0,0 @@
1
- # Craft: Color Systems & Surface Elevation
2
-
3
- Grounded in: Apple HIG, Google Material Design 3, and Refactoring UI Color Strategies.
4
-
5
- ---
6
-
7
- ## 1. Token-First Color Architecture
8
-
9
- - **Semantic Tokens Only:**
10
- - Every surface, border, and text color must resolve through declared CSS variables or semantic framework tokens:
11
- - Backgrounds: `bg-background`, `bg-card`, `bg-muted`, `bg-popover`.
12
- - Text: `text-foreground`, `text-muted-foreground`, `text-primary-foreground`.
13
- - Borders: `border-border`, `border-input`, `border-primary`.
14
- - **Zero Raw Hex Literals in Markup:** Never write inline hex values (`#6366f1`, `#3b82f6`) or arbitrary utility classes (`bg-blue-600`) outside the root token definition.
15
-
16
- ---
17
-
18
- ## 2. The 60-30-10 Distribution Rule
19
-
20
- - **60% Dominant Neutral Surface:**
21
- - The canvas base floor (tinted neutral like slate, zinc, or warm stone—never dead `#000000` or sterile `#ffffff`).
22
- - **30% Structural Neutral Containers:**
23
- - Cards, table backgrounds, navigation headers, sidebars, and divider lines.
24
- - **10% Purposeful Accent:**
25
- - The dedicated brand accent hue.
26
- - **Accent Exclusivity:** Accent color is reserved strictly for interactive affordances: Primary CTA button, active navigation indicator, unread dot, selected checkbox.
27
- - **Forbidden:** Never use the accent color as background wallpaper, card borders, or decorative section dividers.
28
- - **Full-Field Grounding (Anti-Sterile Surface):**
29
- - To prevent the "sterile white void" trap, at least one major functional region (the Hero Stage, the Signature Canvas, or the Master Header) must own a deep, purposeful surface field (e.g. deep midnight grounding, rich brand tint, or dark canvas container).
30
- - This establishes an optical center of gravity, preventing the page from looking like an unstyled wireframe.
31
-
32
- ---
33
-
34
- ## 3. Surface Elevation & The "Ghost Card" Ban
35
-
36
- - **Stepped Tonal Elevation:**
37
- - Build depth through background tone steps rather than heavy drop shadows:
38
- - *Base Canvas:* `bg-background` (Level 0)
39
- - *Containers & Cards:* `bg-card` (Level 1)
40
- - *Recessed Inset Wells (Search bars, secondary filters, code blocks):* `bg-muted/50`
41
- - **Declare Elevation Once (Ban The Ghost Card):**
42
- - Never apply both a distinct 1px border AND a wide, blurry drop shadow to the same container (`border border-slate-200 shadow-lg`). This creates an unnatural "ghost card".
43
- - Choose one clear depth language:
44
- - *Border-Driven:* Crisp 1px hairline border with alpha (`border-border/60`) and zero or minimal shadow (`shadow-xs`).
45
- - *Shadow-Driven:* Floating elevation (`shadow-md`) with borderless or subtle color shift.
46
- - **Tinted Secondary Text on Colored Surfaces:**
47
- - When placing secondary text on a colored or dark surface, tint the text using the parent background hue or foreground token (`text-primary-foreground/70`).
48
- - **Never use neutral gray text (`text-slate-400`) on a saturated or colored background.** It produces a muddy, dirty optical illusion.
49
-
50
- ---
51
-
52
- ## 4. Integrated Scorecards & Metric Blocks (Anti-Sticker Invariant)
53
-
54
- - **Ban The Sticker Box:** Never place an isolated white box with a thin border floating inside an already white or light header canvas. This creates an optical "detached sticker" artifact.
55
- - **Anchor Into Layout Chrome:**
56
- - Integrate scorecards directly into the identity header rail or stage banner using a unified divider (`border-l border-border/80 pl-6`) or structural inset well (`bg-muted/40`).
57
- - **Semantic Tinting for Evaluation Scores:**
58
- - When communicating aggregate grades (e.g. `84,20 / 100`, Predikat B):
59
- - Background: subtle semantic tint (`bg-emerald-500/10` or `bg-slate-500/10`).
60
- - Border: matching tinted hairline (`border border-emerald-500/20`).
61
- - Typography: tabular numbers (`font-mono tabular-nums`) with clear contrast ($Display \ge 3.5\times Body$).
62
- - Always position the grading scale key (e.g. `A > 85, B 71-85`) in immediate secondary proximity as muted metadata.
63
-
64
- ---
65
-
66
- ## 5. Contextual Inline Alerts & Callouts (The Callout Invariant)
67
-
68
- - **Never Float Warning Text Adrift:** Warning notes, disclaimers, or temporary state alerts must NEVER be dumped as raw floating text between layout sections.
69
- - **The Callout Invariant:** Every alert must reside in a structured callout container:
70
- - Container: 1px hairline border with matching light background tint (e.g. `border border-amber-500/30 bg-amber-500/10 rounded-md p-3`).
71
- - Icon Anchor: Dedicated semantic SVG icon (alert circle, triangle) aligned with first line of text.
72
- - Placement: Positioned immediately above or inside the data table/form it modifies, establishing unmistakable contextual binding.
73
-
74
-
@@ -1,55 +0,0 @@
1
- # Craft: Motion & Micro-Interactions
2
-
3
- Grounded in: W3C Motion Specifications, Google Material Motion, and Apple HIG Fluid Interfaces.
4
-
5
- ---
6
-
7
- ## 1. The Core Motion Philosophy: "One Authored Moment"
8
-
9
- - **Choreography Over Chaos:**
10
- - Limit motion to **one authored focal moment** per view (e.g. an interactive slider responding smoothly, or a key metric settling into place).
11
- - Never scatter uncoordinated entrance animations across every section. Staggered fade-ins on 10 consecutive cards signal generic AI generation and slow down task execution.
12
- - **Ease-Out from a Visible Default:**
13
- - Content should be visible and readable by default if scripts or animation fail to execute.
14
- - Motion must feel natural and physical: fast deceleration / exponential ease-out (`cubic-bezier(0.16, 1, 0.3, 1)`). Avoid linear or cartoonish bouncy transitions.
15
-
16
- ---
17
-
18
- ## 2. Technical Performance Floor
19
-
20
- - **The Absolute Ban on `transition: all`:**
21
- - Never write `transition: all` or `transition-all` in production CSS/Tailwind.
22
- - `transition: all` forces the browser engine to recalculate geometry, repaints, and layout costs on every frame whenever any property shifts.
23
- - **The Law:** Target only specific, GPU-accelerated compositing properties:
24
- ```css
25
- /* Good */
26
- transition: transform 150ms cubic-bezier(0.16, 1, 0.3, 1), opacity 150ms ease-out;
27
- ```
28
- ```html
29
- <!-- Good Tailwind -->
30
- <button class="transition-colors duration-150 active:scale-[0.98]">
31
- ```
32
- - **Never Animate Layout Properties:**
33
- - Never animate `width`, `height`, `top`, `left`, `margin`, or `padding`. Animate `transform: scale()` or `transform: translate3d()` instead.
34
-
35
- ---
36
-
37
- ## 3. Accessibility & Reduced Motion
38
-
39
- - **Mandatory Reduced Motion Fallback:**
40
- - Every CSS animation and transition must respect the user's operating system preferences:
41
- ```css
42
- @media (prefers-reduced-motion: reduce) {
43
- *, ::before, ::after {
44
- animation-duration: 0.01ms !important;
45
- animation-iteration-count: 1 !important;
46
- transition-duration: 0.01ms !important;
47
- scroll-behavior: auto !important;
48
- }
49
- }
50
- ```
51
- ```html
52
- <!-- Tailwind -->
53
- <div class="transition-transform duration-200 motion-reduce:transition-none">
54
- ```
55
-