@ryuenn3123/agentic-senior-core 2.0.3 → 2.0.5

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 (87) hide show
  1. package/.agent-context/blueprints/mobile-app.md +21 -21
  2. package/.agent-context/profiles/platform.md +13 -13
  3. package/.agent-context/profiles/regulated.md +13 -13
  4. package/.agent-context/profiles/startup.md +13 -13
  5. package/.agent-context/review-checklists/frontend-skill-parity.md +28 -28
  6. package/.agent-context/review-checklists/frontend-usability.md +33 -33
  7. package/.agent-context/review-checklists/release-operations.md +29 -29
  8. package/.agent-context/skills/README.md +62 -62
  9. package/.agent-context/skills/backend/README.md +67 -67
  10. package/.agent-context/skills/backend/architecture.md +360 -360
  11. package/.agent-context/skills/backend/compatibility-manifest.json +8 -8
  12. package/.agent-context/skills/backend/data-access.md +230 -230
  13. package/.agent-context/skills/backend/errors.md +137 -137
  14. package/.agent-context/skills/backend/validation.md +116 -116
  15. package/.agent-context/skills/backend.md +28 -28
  16. package/.agent-context/skills/cli/README.md +49 -49
  17. package/.agent-context/skills/cli/compatibility-manifest.json +8 -8
  18. package/.agent-context/skills/cli/init.md +37 -37
  19. package/.agent-context/skills/cli/output.md +35 -35
  20. package/.agent-context/skills/cli/upgrade.md +37 -37
  21. package/.agent-context/skills/cli.md +28 -28
  22. package/.agent-context/skills/distribution/README.md +18 -18
  23. package/.agent-context/skills/distribution/compatibility-manifest.json +8 -8
  24. package/.agent-context/skills/distribution/compatibility.md +31 -31
  25. package/.agent-context/skills/distribution/publish.md +36 -36
  26. package/.agent-context/skills/distribution/rollback.md +31 -31
  27. package/.agent-context/skills/distribution.md +28 -28
  28. package/.agent-context/skills/frontend/README.md +35 -35
  29. package/.agent-context/skills/frontend/accessibility.md +107 -107
  30. package/.agent-context/skills/frontend/compatibility-manifest.json +8 -8
  31. package/.agent-context/skills/frontend/motion.md +66 -66
  32. package/.agent-context/skills/frontend/performance.md +62 -62
  33. package/.agent-context/skills/frontend/ui-architecture.md +128 -128
  34. package/.agent-context/skills/frontend.md +29 -29
  35. package/.agent-context/skills/fullstack/README.md +18 -18
  36. package/.agent-context/skills/fullstack/compatibility-manifest.json +8 -8
  37. package/.agent-context/skills/fullstack/contracts.md +52 -52
  38. package/.agent-context/skills/fullstack/end-to-end.md +41 -41
  39. package/.agent-context/skills/fullstack/feature-slicing.md +64 -64
  40. package/.agent-context/skills/fullstack.md +26 -26
  41. package/.agent-context/skills/index.json +107 -107
  42. package/.agent-context/skills/review-quality/README.md +18 -18
  43. package/.agent-context/skills/review-quality/benchmark.md +29 -29
  44. package/.agent-context/skills/review-quality/compatibility-manifest.json +8 -8
  45. package/.agent-context/skills/review-quality/planning.md +37 -37
  46. package/.agent-context/skills/review-quality/security.md +33 -33
  47. package/.agent-context/skills/review-quality.md +27 -27
  48. package/.agent-context/stacks/flutter.md +16 -16
  49. package/.agent-context/stacks/react-native.md +16 -16
  50. package/.agent-context/state/architecture-map.md +25 -25
  51. package/.agent-context/state/benchmark-analysis.json +431 -431
  52. package/.agent-context/state/benchmark-thresholds.json +10 -10
  53. package/.agent-context/state/benchmark-watchlist.json +19 -19
  54. package/.agent-context/state/dependency-map.md +32 -32
  55. package/.agent-context/state/quality-trend-report.json +79 -0
  56. package/.agent-context/state/skill-platform.json +38 -38
  57. package/.agent-context/state/token-optimization-benchmark.json +130 -0
  58. package/.agent-override.md +36 -36
  59. package/.cursorrules +1 -1
  60. package/.gemini/instructions.md +21 -97
  61. package/.github/ISSUE_TEMPLATE/v1.7-frontend-work-item.yml +54 -54
  62. package/.github/copilot-instructions.md +21 -166
  63. package/.github/workflows/benchmark-detection.yml +38 -38
  64. package/.github/workflows/benchmark-intelligence.yml +50 -50
  65. package/.github/workflows/frontend-usability-gate.yml +36 -36
  66. package/.github/workflows/release-gate.yml +32 -32
  67. package/.github/workflows/sbom-compliance.yml +32 -32
  68. package/.windsurfrules +1 -1
  69. package/AGENTS.md +28 -181
  70. package/README.md +368 -346
  71. package/lib/cli/commands/optimize.mjs +171 -171
  72. package/lib/cli/compatibility.mjs +124 -124
  73. package/lib/cli/token-optimization.mjs +275 -275
  74. package/mcp.json +92 -92
  75. package/package.json +3 -1
  76. package/scripts/benchmark-gate.mjs +121 -121
  77. package/scripts/benchmark-intelligence.mjs +140 -140
  78. package/scripts/detection-benchmark.mjs +138 -138
  79. package/scripts/frontend-usability-audit.mjs +87 -87
  80. package/scripts/generate-sbom.mjs +61 -61
  81. package/scripts/init-project.ps1 +104 -104
  82. package/scripts/llm-judge.mjs +664 -664
  83. package/scripts/quality-trend-report.mjs +289 -0
  84. package/scripts/release-gate.mjs +259 -204
  85. package/scripts/skill-tier-policy.mjs +75 -75
  86. package/scripts/token-optimization-benchmark.mjs +252 -0
  87. package/scripts/validate.mjs +865 -811
@@ -1,36 +1,36 @@
1
- # Frontend Engineering Skills
2
-
3
- The frontend domain covers component architecture, state management, performance optimization, accessibility, motion design, and visual polish. Content consolidated from **minimax-ai/skills** (design focus), **awesome-copilot** (architectural patterns), and **antigravity-awesome-skills** (React patterns), with production-grade automation and enforcement.
4
-
5
- ## Topics
6
- - [UI Architecture](ui-architecture.md) - Smart/Dumb components, state management, composition patterns
7
- - [Accessibility](accessibility.md) - WCAG compliance, keyboard navigation, semantic HTML, color contrast
8
- - [Motion](motion.md) - Animation patterns, performance, CSS containment
9
- - [Performance](performance.md) - Memoization, code splitting, bundle gates, profiling
10
-
11
- ## What Makes Ours Different
12
-
13
- - Smart/Dumb Architecture (awesome-copilot) + animation system patterns (minimax) + React patterns (antigravity)
14
- - Anti-Slop Enforcer (ABOVE LINE) - Detect forbidden visual patterns and style drift
15
- - Accessibility Auditor (ABOVE LINE) - Detect contrast failures, ARIA issues, and keyboard navigation gaps
16
- - Performance Budget Enforcer (ABOVE LINE) - Bundle size gates and LCP/FID/CLS thresholds
17
-
18
- ## Recommended Reading Order
19
-
20
- 1. `ui-architecture.md` - Mental models first (EXPERT)
21
- 2. `accessibility.md` - Compliance baseline (EXPERT)
22
- 3. `motion.md` - Design patterns and optimization (EXPERT)
23
- 4. `performance.md` - Profiling and gates (EXPERT)
24
-
25
- ## Coverage vs 3 Repos
26
-
27
- | Aspect | antigravity | awesome-copilot | MiniMax | Ours |
28
- |--------|-------------|-----------------|---------|------|
29
- | Component Patterns | Medium | High | Medium | High + quality gates |
30
- | Animation Patterns | Low | Low | High | High + performance rules |
31
- | Accessibility | Medium | High | Medium | High + automated audits |
32
- | Automation | None | None | None | Anti-slop, accessibility, and performance tooling |
33
-
34
- ## Default Tier Behavior
35
- - Use `advance` for typical web apps (1500+ employees)
1
+ # Frontend Engineering Skills
2
+
3
+ The frontend domain covers component architecture, state management, performance optimization, accessibility, motion design, and visual polish. Content consolidated from **minimax-ai/skills** (design focus), **awesome-copilot** (architectural patterns), and **antigravity-awesome-skills** (React patterns), with production-grade automation and enforcement.
4
+
5
+ ## Topics
6
+ - [UI Architecture](ui-architecture.md) - Smart/Dumb components, state management, composition patterns
7
+ - [Accessibility](accessibility.md) - WCAG compliance, keyboard navigation, semantic HTML, color contrast
8
+ - [Motion](motion.md) - Animation patterns, performance, CSS containment
9
+ - [Performance](performance.md) - Memoization, code splitting, bundle gates, profiling
10
+
11
+ ## What Makes Ours Different
12
+
13
+ - Smart/Dumb Architecture (awesome-copilot) + animation system patterns (minimax) + React patterns (antigravity)
14
+ - Anti-Slop Enforcer (ABOVE LINE) - Detect forbidden visual patterns and style drift
15
+ - Accessibility Auditor (ABOVE LINE) - Detect contrast failures, ARIA issues, and keyboard navigation gaps
16
+ - Performance Budget Enforcer (ABOVE LINE) - Bundle size gates and LCP/FID/CLS thresholds
17
+
18
+ ## Recommended Reading Order
19
+
20
+ 1. `ui-architecture.md` - Mental models first (EXPERT)
21
+ 2. `accessibility.md` - Compliance baseline (EXPERT)
22
+ 3. `motion.md` - Design patterns and optimization (EXPERT)
23
+ 4. `performance.md` - Profiling and gates (EXPERT)
24
+
25
+ ## Coverage vs 3 Repos
26
+
27
+ | Aspect | antigravity | awesome-copilot | MiniMax | Ours |
28
+ |--------|-------------|-----------------|---------|------|
29
+ | Component Patterns | Medium | High | Medium | High + quality gates |
30
+ | Animation Patterns | Low | Low | High | High + performance rules |
31
+ | Accessibility | Medium | High | Medium | High + automated audits |
32
+ | Automation | None | None | None | Anti-slop, accessibility, and performance tooling |
33
+
34
+ ## Default Tier Behavior
35
+ - Use `advance` for typical web apps (1500+ employees)
36
36
  - Escalate to `expert` when component library, state complexity, or accessibility/performance tuning is critical
@@ -1,107 +1,107 @@
1
- # Accessibility and Inclusive Interaction
2
-
3
- **Tier:** EXPERT | **Source:** awesome-copilot (WCAG) + minimax (motion and dark mode) + antigravity (UX patterns)
4
-
5
- ## Purpose
6
-
7
- Accessibility is a production requirement. Inclusive interaction reduces support burden, improves usability, and prevents last-minute retrofit work.
8
-
9
- ## Part 1: Semantic Structure
10
-
11
- Use native HTML elements first. They provide keyboard support, roles, and state semantics without extra work.
12
-
13
- ```javascript
14
- <nav>
15
- <button aria-expanded={isOpen} aria-controls="menu-panel">Menu</button>
16
- <ul id="menu-panel" hidden={!isOpen}>
17
- <li><a href="/">Home</a></li>
18
- <li><a href="/about">About</a></li>
19
- </ul>
20
- </nav>
21
- ```
22
-
23
- Avoid replacing native controls with generic containers unless there is a specific reason.
24
-
25
- ## Part 2: Keyboard Support
26
-
27
- Every interactive control must be reachable and operable by keyboard.
28
-
29
- - Tab order should follow the visual order.
30
- - Enter and Space should activate buttons and custom controls.
31
- - Focus should never get trapped unless a modal or dialog deliberately manages it.
32
- - Skip links should exist on content-heavy pages.
33
-
34
- ```javascript
35
- <div
36
- role="button"
37
- tabIndex={0}
38
- onClick={handleDelete}
39
- onKeyDown={(event) => {
40
- if (event.key === 'Enter' || event.key === ' ') {
41
- handleDelete();
42
- }
43
- }}
44
- >
45
- Delete
46
- </div>
47
- ```
48
-
49
- ## Part 3: Contrast and Text Scaling
50
-
51
- - Normal text contrast should meet WCAG AA minimums.
52
- - Large text may use the relaxed large-text ratio, but still needs clear contrast.
53
- - Layouts should survive zoom and text scaling without truncation.
54
- - Avoid fixed-height containers that clip longer translated content.
55
-
56
- ## Part 4: Screen Reader Support
57
-
58
- Use accessible names and state descriptions.
59
-
60
- ```javascript
61
- <button aria-label="Close menu" onClick={handleClose}>
62
- X
63
- </button>
64
- ```
65
-
66
- If content updates dynamically, use live regions only when needed and keep them concise.
67
-
68
- ## Part 5: Motion and Reduced Motion
69
-
70
- Animations should respect reduced-motion settings. Motion must support understanding, not create distraction.
71
-
72
- ```javascript
73
- const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
74
-
75
- const menuVariants = {
76
- open: {
77
- opacity: 1,
78
- transition: prefersReducedMotion ? { duration: 0 } : { duration: 0.2 }
79
- }
80
- };
81
- ```
82
-
83
- ## Part 6: Forms and Error Messaging
84
-
85
- - Every input needs a visible label.
86
- - Error messages should describe the problem and how to fix it.
87
- - Validation should be announced in a way screen readers can reach.
88
- - Do not rely on color alone to communicate state.
89
-
90
- ## Part 7: Testing Approach
91
-
92
- Test accessibility with a mix of manual and automated checks.
93
-
94
- - Automated scans for contrast, labels, and roles.
95
- - Keyboard-only navigation passes for critical flows.
96
- - Screen-reader spot checks for key screens.
97
- - Motion tests for reduced-motion behavior.
98
-
99
- ## Review Checklist
100
-
101
- - [ ] Semantic elements are used first.
102
- - [ ] Keyboard operation is complete.
103
- - [ ] Contrast and zoom behavior are acceptable.
104
- - [ ] Accessible names exist for icon-only controls.
105
- - [ ] Reduced-motion behavior is implemented.
106
- - [ ] Form labels and errors are clear.
107
- - [ ] Critical flows are tested with keyboard and screen readers.
1
+ # Accessibility and Inclusive Interaction
2
+
3
+ **Tier:** EXPERT | **Source:** awesome-copilot (WCAG) + minimax (motion and dark mode) + antigravity (UX patterns)
4
+
5
+ ## Purpose
6
+
7
+ Accessibility is a production requirement. Inclusive interaction reduces support burden, improves usability, and prevents last-minute retrofit work.
8
+
9
+ ## Part 1: Semantic Structure
10
+
11
+ Use native HTML elements first. They provide keyboard support, roles, and state semantics without extra work.
12
+
13
+ ```javascript
14
+ <nav>
15
+ <button aria-expanded={isOpen} aria-controls="menu-panel">Menu</button>
16
+ <ul id="menu-panel" hidden={!isOpen}>
17
+ <li><a href="/">Home</a></li>
18
+ <li><a href="/about">About</a></li>
19
+ </ul>
20
+ </nav>
21
+ ```
22
+
23
+ Avoid replacing native controls with generic containers unless there is a specific reason.
24
+
25
+ ## Part 2: Keyboard Support
26
+
27
+ Every interactive control must be reachable and operable by keyboard.
28
+
29
+ - Tab order should follow the visual order.
30
+ - Enter and Space should activate buttons and custom controls.
31
+ - Focus should never get trapped unless a modal or dialog deliberately manages it.
32
+ - Skip links should exist on content-heavy pages.
33
+
34
+ ```javascript
35
+ <div
36
+ role="button"
37
+ tabIndex={0}
38
+ onClick={handleDelete}
39
+ onKeyDown={(event) => {
40
+ if (event.key === 'Enter' || event.key === ' ') {
41
+ handleDelete();
42
+ }
43
+ }}
44
+ >
45
+ Delete
46
+ </div>
47
+ ```
48
+
49
+ ## Part 3: Contrast and Text Scaling
50
+
51
+ - Normal text contrast should meet WCAG AA minimums.
52
+ - Large text may use the relaxed large-text ratio, but still needs clear contrast.
53
+ - Layouts should survive zoom and text scaling without truncation.
54
+ - Avoid fixed-height containers that clip longer translated content.
55
+
56
+ ## Part 4: Screen Reader Support
57
+
58
+ Use accessible names and state descriptions.
59
+
60
+ ```javascript
61
+ <button aria-label="Close menu" onClick={handleClose}>
62
+ X
63
+ </button>
64
+ ```
65
+
66
+ If content updates dynamically, use live regions only when needed and keep them concise.
67
+
68
+ ## Part 5: Motion and Reduced Motion
69
+
70
+ Animations should respect reduced-motion settings. Motion must support understanding, not create distraction.
71
+
72
+ ```javascript
73
+ const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
74
+
75
+ const menuVariants = {
76
+ open: {
77
+ opacity: 1,
78
+ transition: prefersReducedMotion ? { duration: 0 } : { duration: 0.2 }
79
+ }
80
+ };
81
+ ```
82
+
83
+ ## Part 6: Forms and Error Messaging
84
+
85
+ - Every input needs a visible label.
86
+ - Error messages should describe the problem and how to fix it.
87
+ - Validation should be announced in a way screen readers can reach.
88
+ - Do not rely on color alone to communicate state.
89
+
90
+ ## Part 7: Testing Approach
91
+
92
+ Test accessibility with a mix of manual and automated checks.
93
+
94
+ - Automated scans for contrast, labels, and roles.
95
+ - Keyboard-only navigation passes for critical flows.
96
+ - Screen-reader spot checks for key screens.
97
+ - Motion tests for reduced-motion behavior.
98
+
99
+ ## Review Checklist
100
+
101
+ - [ ] Semantic elements are used first.
102
+ - [ ] Keyboard operation is complete.
103
+ - [ ] Contrast and zoom behavior are acceptable.
104
+ - [ ] Accessible names exist for icon-only controls.
105
+ - [ ] Reduced-motion behavior is implemented.
106
+ - [ ] Form labels and errors are clear.
107
+ - [ ] Critical flows are tested with keyboard and screen readers.
@@ -1,8 +1,8 @@
1
- {
2
- "schemaVersion": "compatibility-manifest-v1",
3
- "artifactType": "skill-domain",
4
- "domain": "frontend",
5
- "ides": ["cursor", "windsurf", "copilot", "gemini", "claude", "codex", "cline"],
6
- "nodeMin": "18",
7
- "platforms": ["windows", "linux", "macos"]
8
- }
1
+ {
2
+ "schemaVersion": "compatibility-manifest-v1",
3
+ "artifactType": "skill-domain",
4
+ "domain": "frontend",
5
+ "ides": ["cursor", "windsurf", "copilot", "gemini", "claude", "codex", "cline"],
6
+ "nodeMin": "18",
7
+ "platforms": ["windows", "linux", "macos"]
8
+ }
@@ -1,67 +1,67 @@
1
- # Motion Design and Implementation
2
-
3
- Tier: EXPERT
4
-
5
- Motion is part of product behavior. It should clarify state changes, guide focus, and provide feedback without reducing accessibility or performance.
6
-
7
- ## Motion Intent Model
8
-
9
- Use motion only for one of these intents:
10
- - Transition intent: communicate screen or state transition.
11
- - Feedback intent: confirm user action success/failure.
12
- - Focus intent: direct attention to newly relevant content.
13
-
14
- If a transition has no intent, remove it.
15
-
16
- ## Timing and Consistency
17
-
18
- Adopt a small timing scale and reuse it across the product:
19
- - Fast: 120ms for micro-feedback.
20
- - Standard: 200ms to 260ms for component transitions.
21
- - Slow: 320ms to 420ms for route transitions.
22
-
23
- Avoid mixing unrelated easing curves in one flow.
24
-
25
- ## Performance-Safe Animation Rules
26
-
27
- Prefer animating properties that do not trigger expensive layout and paint work:
28
- - Preferred: transform, opacity.
29
- - Avoid for frequent animation: top, left, width, height, box-shadow blur radius.
30
-
31
- Use CSS containment and selective `will-change` only for elements that actually animate.
32
-
33
- ## Reduced Motion Compliance
34
-
35
- Always implement reduced-motion fallback:
36
-
37
- ```css
38
- .panel {
39
- transition: transform 220ms ease, opacity 220ms ease;
40
- }
41
-
42
- @media (prefers-reduced-motion: reduce) {
43
- .panel {
44
- transition: none;
45
- }
46
- }
47
- ```
48
-
49
- ## Interaction Patterns
50
-
51
- Recommended patterns:
52
- - Enter/exit fade + translate for dialogs.
53
- - Staggered list reveal for scannability on load.
54
- - Subtle press/hover feedback for actionable controls.
55
-
56
- Avoid these patterns:
57
- - Continuous decorative motion on primary content.
58
- - Multiple competing animations in one viewport.
59
- - Looping movement that can distract reading flow.
60
-
61
- ## Review Checklist
62
-
63
- - [ ] Every animation has explicit product intent.
64
- - [ ] Timing scale is consistent across components.
65
- - [ ] Heavy layout-triggering properties are avoided.
66
- - [ ] Reduced-motion mode is implemented and tested.
1
+ # Motion Design and Implementation
2
+
3
+ Tier: EXPERT
4
+
5
+ Motion is part of product behavior. It should clarify state changes, guide focus, and provide feedback without reducing accessibility or performance.
6
+
7
+ ## Motion Intent Model
8
+
9
+ Use motion only for one of these intents:
10
+ - Transition intent: communicate screen or state transition.
11
+ - Feedback intent: confirm user action success/failure.
12
+ - Focus intent: direct attention to newly relevant content.
13
+
14
+ If a transition has no intent, remove it.
15
+
16
+ ## Timing and Consistency
17
+
18
+ Adopt a small timing scale and reuse it across the product:
19
+ - Fast: 120ms for micro-feedback.
20
+ - Standard: 200ms to 260ms for component transitions.
21
+ - Slow: 320ms to 420ms for route transitions.
22
+
23
+ Avoid mixing unrelated easing curves in one flow.
24
+
25
+ ## Performance-Safe Animation Rules
26
+
27
+ Prefer animating properties that do not trigger expensive layout and paint work:
28
+ - Preferred: transform, opacity.
29
+ - Avoid for frequent animation: top, left, width, height, box-shadow blur radius.
30
+
31
+ Use CSS containment and selective `will-change` only for elements that actually animate.
32
+
33
+ ## Reduced Motion Compliance
34
+
35
+ Always implement reduced-motion fallback:
36
+
37
+ ```css
38
+ .panel {
39
+ transition: transform 220ms ease, opacity 220ms ease;
40
+ }
41
+
42
+ @media (prefers-reduced-motion: reduce) {
43
+ .panel {
44
+ transition: none;
45
+ }
46
+ }
47
+ ```
48
+
49
+ ## Interaction Patterns
50
+
51
+ Recommended patterns:
52
+ - Enter/exit fade + translate for dialogs.
53
+ - Staggered list reveal for scannability on load.
54
+ - Subtle press/hover feedback for actionable controls.
55
+
56
+ Avoid these patterns:
57
+ - Continuous decorative motion on primary content.
58
+ - Multiple competing animations in one viewport.
59
+ - Looping movement that can distract reading flow.
60
+
61
+ ## Review Checklist
62
+
63
+ - [ ] Every animation has explicit product intent.
64
+ - [ ] Timing scale is consistent across components.
65
+ - [ ] Heavy layout-triggering properties are avoided.
66
+ - [ ] Reduced-motion mode is implemented and tested.
67
67
  - [ ] Motion does not block keyboard or screen-reader flow.
@@ -1,63 +1,63 @@
1
- # Frontend Performance Engineering
2
-
3
- Tier: EXPERT
4
-
5
- Performance work should be evidence-driven. Start with baseline metrics, optimize where bottlenecks are proven, then verify that user-facing indicators improved.
6
-
7
- ## Core Metrics
8
-
9
- Track Core Web Vitals in CI and release checks:
10
- - LCP target: less than 2.5s on reference environments.
11
- - INP target: less than 200ms.
12
- - CLS target: less than 0.1.
13
-
14
- Also track bundle size and script execution time for key routes.
15
-
16
- ## Render Efficiency
17
-
18
- Common controls:
19
- - Keep expensive computation outside render path with memoization.
20
- - Use stable callbacks for memoized child components.
21
- - Split large component trees by feature boundary.
22
-
23
- ```javascript
24
- const visibleRows = useMemo(() => {
25
- return allRows.filter((row) => row.isVisible);
26
- }, [allRows]);
27
-
28
- const handleRowOpen = useCallback((rowId) => {
29
- openRowDetails(rowId);
30
- }, [openRowDetails]);
31
- ```
32
-
33
- ## Network and Caching Strategy
34
-
35
- - Treat server state separately from UI state.
36
- - Use query caching with explicit stale policies.
37
- - Avoid duplicate API calls by keying requests consistently.
38
-
39
- For route transitions, prefetch data for likely next navigation paths.
40
-
41
- ## Bundle Governance
42
-
43
- Use route and component-level code splitting:
44
- - Lazy-load non-critical routes.
45
- - Defer optional heavy modules until needed.
46
- - Audit bundle growth at each release.
47
-
48
- Set a budget and fail CI on unapproved bundle-size regressions.
49
-
50
- ## Diagnostics Workflow
51
-
52
- 1. Capture baseline profile and web-vitals report.
53
- 2. Apply one optimization change.
54
- 3. Re-profile and compare deltas.
55
- 4. Keep only changes with measurable improvement.
56
-
57
- ## Review Checklist
58
-
59
- - [ ] Core metrics targets are monitored and reported.
60
- - [ ] Render-heavy paths are profiled with tooling evidence.
61
- - [ ] Data fetching uses cache and deduplication strategy.
62
- - [ ] Bundle-size budget is defined and enforced.
1
+ # Frontend Performance Engineering
2
+
3
+ Tier: EXPERT
4
+
5
+ Performance work should be evidence-driven. Start with baseline metrics, optimize where bottlenecks are proven, then verify that user-facing indicators improved.
6
+
7
+ ## Core Metrics
8
+
9
+ Track Core Web Vitals in CI and release checks:
10
+ - LCP target: less than 2.5s on reference environments.
11
+ - INP target: less than 200ms.
12
+ - CLS target: less than 0.1.
13
+
14
+ Also track bundle size and script execution time for key routes.
15
+
16
+ ## Render Efficiency
17
+
18
+ Common controls:
19
+ - Keep expensive computation outside render path with memoization.
20
+ - Use stable callbacks for memoized child components.
21
+ - Split large component trees by feature boundary.
22
+
23
+ ```javascript
24
+ const visibleRows = useMemo(() => {
25
+ return allRows.filter((row) => row.isVisible);
26
+ }, [allRows]);
27
+
28
+ const handleRowOpen = useCallback((rowId) => {
29
+ openRowDetails(rowId);
30
+ }, [openRowDetails]);
31
+ ```
32
+
33
+ ## Network and Caching Strategy
34
+
35
+ - Treat server state separately from UI state.
36
+ - Use query caching with explicit stale policies.
37
+ - Avoid duplicate API calls by keying requests consistently.
38
+
39
+ For route transitions, prefetch data for likely next navigation paths.
40
+
41
+ ## Bundle Governance
42
+
43
+ Use route and component-level code splitting:
44
+ - Lazy-load non-critical routes.
45
+ - Defer optional heavy modules until needed.
46
+ - Audit bundle growth at each release.
47
+
48
+ Set a budget and fail CI on unapproved bundle-size regressions.
49
+
50
+ ## Diagnostics Workflow
51
+
52
+ 1. Capture baseline profile and web-vitals report.
53
+ 2. Apply one optimization change.
54
+ 3. Re-profile and compare deltas.
55
+ 4. Keep only changes with measurable improvement.
56
+
57
+ ## Review Checklist
58
+
59
+ - [ ] Core metrics targets are monitored and reported.
60
+ - [ ] Render-heavy paths are profiled with tooling evidence.
61
+ - [ ] Data fetching uses cache and deduplication strategy.
62
+ - [ ] Bundle-size budget is defined and enforced.
63
63
  - [ ] Performance regressions are blocked until reviewed.