codingbuddy-rules 4.5.0 → 5.1.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 (129) hide show
  1. package/.ai-rules/adapters/aider.md +374 -0
  2. package/.ai-rules/adapters/antigravity.md +6 -6
  3. package/.ai-rules/adapters/claude-code.md +68 -4
  4. package/.ai-rules/adapters/codex.md +5 -5
  5. package/.ai-rules/adapters/cursor.md +2 -2
  6. package/.ai-rules/adapters/kiro.md +8 -8
  7. package/.ai-rules/adapters/opencode.md +7 -7
  8. package/.ai-rules/adapters/q.md +2 -2
  9. package/.ai-rules/adapters/windsurf.md +395 -0
  10. package/.ai-rules/agents/README.md +66 -16
  11. package/.ai-rules/agents/accessibility-specialist.json +8 -1
  12. package/.ai-rules/agents/act-mode.json +8 -1
  13. package/.ai-rules/agents/agent-architect.json +14 -7
  14. package/.ai-rules/agents/ai-ml-engineer.json +7 -0
  15. package/.ai-rules/agents/architecture-specialist.json +7 -0
  16. package/.ai-rules/agents/auto-mode.json +10 -2
  17. package/.ai-rules/agents/backend-developer.json +7 -0
  18. package/.ai-rules/agents/code-quality-specialist.json +7 -0
  19. package/.ai-rules/agents/code-reviewer.json +86 -64
  20. package/.ai-rules/agents/data-engineer.json +14 -7
  21. package/.ai-rules/agents/data-scientist.json +16 -9
  22. package/.ai-rules/agents/devops-engineer.json +7 -0
  23. package/.ai-rules/agents/documentation-specialist.json +7 -0
  24. package/.ai-rules/agents/eval-mode.json +30 -19
  25. package/.ai-rules/agents/event-architecture-specialist.json +7 -0
  26. package/.ai-rules/agents/frontend-developer.json +7 -0
  27. package/.ai-rules/agents/i18n-specialist.json +8 -1
  28. package/.ai-rules/agents/integration-specialist.json +7 -0
  29. package/.ai-rules/agents/migration-specialist.json +7 -0
  30. package/.ai-rules/agents/mobile-developer.json +8 -10
  31. package/.ai-rules/agents/observability-specialist.json +7 -0
  32. package/.ai-rules/agents/parallel-orchestrator.json +352 -0
  33. package/.ai-rules/agents/performance-specialist.json +7 -0
  34. package/.ai-rules/agents/plan-mode.json +9 -1
  35. package/.ai-rules/agents/plan-reviewer.json +211 -0
  36. package/.ai-rules/agents/platform-engineer.json +7 -0
  37. package/.ai-rules/agents/security-engineer.json +15 -8
  38. package/.ai-rules/agents/security-specialist.json +8 -1
  39. package/.ai-rules/agents/seo-specialist.json +7 -0
  40. package/.ai-rules/agents/software-engineer.json +7 -0
  41. package/.ai-rules/agents/solution-architect.json +17 -10
  42. package/.ai-rules/agents/systems-developer.json +15 -8
  43. package/.ai-rules/agents/technical-planner.json +17 -10
  44. package/.ai-rules/agents/test-engineer.json +13 -6
  45. package/.ai-rules/agents/test-strategy-specialist.json +7 -0
  46. package/.ai-rules/agents/tooling-engineer.json +10 -3
  47. package/.ai-rules/agents/ui-ux-designer.json +7 -0
  48. package/.ai-rules/keyword-modes.json +4 -4
  49. package/.ai-rules/rules/clarification-guide.md +14 -14
  50. package/.ai-rules/rules/core.md +73 -0
  51. package/.ai-rules/rules/parallel-execution.md +217 -0
  52. package/.ai-rules/schemas/agent.schema.json +38 -0
  53. package/.ai-rules/skills/README.md +29 -1
  54. package/.ai-rules/skills/agent-design/SKILL.md +5 -0
  55. package/.ai-rules/skills/agent-design/examples/agent-template.json +55 -0
  56. package/.ai-rules/skills/agent-design/references/expertise-guidelines.md +112 -0
  57. package/.ai-rules/skills/agent-discussion/SKILL.md +199 -0
  58. package/.ai-rules/skills/agent-discussion-panel/SKILL.md +448 -0
  59. package/.ai-rules/skills/api-design/SKILL.md +5 -0
  60. package/.ai-rules/skills/api-design/examples/error-response.json +159 -0
  61. package/.ai-rules/skills/api-design/examples/openapi-template.yaml +393 -0
  62. package/.ai-rules/skills/build-fix/SKILL.md +234 -0
  63. package/.ai-rules/skills/code-explanation/SKILL.md +4 -0
  64. package/.ai-rules/skills/context-management/SKILL.md +1 -0
  65. package/.ai-rules/skills/cost-budget/SKILL.md +348 -0
  66. package/.ai-rules/skills/cross-repo-issues/SKILL.md +257 -0
  67. package/.ai-rules/skills/database-migration/SKILL.md +1 -0
  68. package/.ai-rules/skills/deepsearch/SKILL.md +214 -0
  69. package/.ai-rules/skills/deployment-checklist/SKILL.md +1 -0
  70. package/.ai-rules/skills/error-analysis/SKILL.md +1 -0
  71. package/.ai-rules/skills/finishing-a-development-branch/SKILL.md +281 -0
  72. package/.ai-rules/skills/frontend-design/SKILL.md +5 -0
  73. package/.ai-rules/skills/frontend-design/examples/component-template.tsx +203 -0
  74. package/.ai-rules/skills/frontend-design/references/css-patterns.md +243 -0
  75. package/.ai-rules/skills/git-master/SKILL.md +358 -0
  76. package/.ai-rules/skills/incident-response/SKILL.md +1 -0
  77. package/.ai-rules/skills/legacy-modernization/SKILL.md +1 -0
  78. package/.ai-rules/skills/mcp-builder/SKILL.md +7 -0
  79. package/.ai-rules/skills/mcp-builder/examples/resource-example.ts +233 -0
  80. package/.ai-rules/skills/mcp-builder/examples/tool-example.ts +198 -0
  81. package/.ai-rules/skills/mcp-builder/references/protocol-spec.md +215 -0
  82. package/.ai-rules/skills/onboard/SKILL.md +150 -0
  83. package/.ai-rules/skills/performance-optimization/SKILL.md +3 -0
  84. package/.ai-rules/skills/plan-and-review/SKILL.md +115 -0
  85. package/.ai-rules/skills/plan-to-issues/SKILL.md +318 -0
  86. package/.ai-rules/skills/pr-all-in-one/SKILL.md +15 -13
  87. package/.ai-rules/skills/pr-all-in-one/configuration-guide.md +7 -7
  88. package/.ai-rules/skills/pr-all-in-one/pr-templates.md +10 -10
  89. package/.ai-rules/skills/pr-review/SKILL.md +4 -0
  90. package/.ai-rules/skills/receiving-code-review/SKILL.md +347 -0
  91. package/.ai-rules/skills/refactoring/SKILL.md +1 -0
  92. package/.ai-rules/skills/requesting-code-review/SKILL.md +348 -0
  93. package/.ai-rules/skills/retrospective/SKILL.md +192 -0
  94. package/.ai-rules/skills/rule-authoring/SKILL.md +5 -0
  95. package/.ai-rules/skills/rule-authoring/examples/rule-template.md +142 -0
  96. package/.ai-rules/skills/rule-authoring/examples/trigger-patterns.md +126 -0
  97. package/.ai-rules/skills/security-audit/SKILL.md +4 -0
  98. package/.ai-rules/skills/ship/SKILL.md +242 -0
  99. package/.ai-rules/skills/skill-creator/SKILL.md +461 -0
  100. package/.ai-rules/skills/skill-creator/agents/analyzer.md +206 -0
  101. package/.ai-rules/skills/skill-creator/agents/comparator.md +167 -0
  102. package/.ai-rules/skills/skill-creator/agents/grader.md +152 -0
  103. package/.ai-rules/skills/skill-creator/assets/eval_review.html +568 -0
  104. package/.ai-rules/skills/skill-creator/assets/skill-template.md +43 -0
  105. package/.ai-rules/skills/skill-creator/eval-viewer/generate_review.py +496 -0
  106. package/.ai-rules/skills/skill-creator/references/frontmatter-guide.md +632 -0
  107. package/.ai-rules/skills/skill-creator/references/multi-tool-compat.md +480 -0
  108. package/.ai-rules/skills/skill-creator/references/schemas.md +784 -0
  109. package/.ai-rules/skills/skill-creator/scripts/aggregate_benchmark.py +302 -0
  110. package/.ai-rules/skills/skill-creator/scripts/init_skill.sh +196 -0
  111. package/.ai-rules/skills/skill-creator/scripts/run_loop.py +327 -0
  112. package/.ai-rules/skills/systematic-debugging/SKILL.md +1 -0
  113. package/.ai-rules/skills/tech-debt/SKILL.md +1 -0
  114. package/.ai-rules/skills/test-coverage-gate/SKILL.md +303 -0
  115. package/.ai-rules/skills/tmux-master/SKILL.md +491 -0
  116. package/.ai-rules/skills/using-git-worktrees/SKILL.md +368 -0
  117. package/.ai-rules/skills/verification-before-completion/SKILL.md +234 -0
  118. package/.ai-rules/skills/widget-slot-architecture/SKILL.md +6 -0
  119. package/.ai-rules/skills/widget-slot-architecture/examples/parallel-route-setup.tsx +206 -0
  120. package/.ai-rules/skills/widget-slot-architecture/examples/widget-component.tsx +250 -0
  121. package/.ai-rules/skills/writing-plans/SKILL.md +78 -0
  122. package/bin/cli.js +170 -0
  123. package/lib/init/detect-stack.js +162 -0
  124. package/lib/init/generate-config.js +31 -0
  125. package/lib/init/index.js +86 -0
  126. package/lib/init/prompt.js +60 -0
  127. package/lib/init/scaffold.js +67 -0
  128. package/lib/init/suggest-agent.js +57 -0
  129. package/package.json +10 -2
@@ -0,0 +1,281 @@
1
+ ---
2
+ name: finishing-a-development-branch
3
+ description: Use when implementation is complete and you need to decide how to integrate the work - merge, PR, or cleanup
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Finishing a Development Branch
8
+
9
+ ## Overview
10
+
11
+ Guide the completion of development work on a branch — decide how to integrate, verify readiness, execute the choice, and clean up.
12
+
13
+ **Core principle:** Verify before you ship. Present options, don't assume. Clean up after yourself.
14
+
15
+ ## The Iron Law
16
+
17
+ ```
18
+ NO MERGE WITHOUT GREEN TESTS AND CLEAN STATUS
19
+ ```
20
+
21
+ If tests fail or uncommitted changes exist, STOP. Fix first. No exceptions.
22
+
23
+ **Corollary:** Never push directly to main/master. Always use a PR for protected branches.
24
+
25
+ ## When to Use
26
+
27
+ - Implementation is complete on a feature branch
28
+ - All planned tasks are done (or intentionally deferred)
29
+ - Ready to integrate work back to base branch
30
+ - Need to decide: merge, PR, or abandon
31
+ - End of an executing-plans or subagent-driven-development session
32
+ - Wrapping up work in a git worktree
33
+
34
+ ## When NOT to Use
35
+
36
+ - Work is still in progress (keep working)
37
+ - You haven't run tests yet (run them first)
38
+ - You're on the main/master branch (nothing to finish)
39
+
40
+ ## Phase 1: Pre-Completion Checklist
41
+
42
+ **MANDATORY. Complete every item before proceeding.**
43
+
44
+ ### Must Pass (blocking)
45
+
46
+ ```bash
47
+ # 1. All tests pass
48
+ npm test # or: yarn test, pytest, go test ./...
49
+
50
+ # 2. No type errors
51
+ npx tsc --noEmit # or equivalent for your language
52
+
53
+ # 3. No uncommitted changes
54
+ git status # must be clean
55
+
56
+ # 4. Branch is up to date with base
57
+ git fetch origin
58
+ git merge-base --is-ancestor origin/<base> HEAD # exit 0 = up to date
59
+ ```
60
+
61
+ - [ ] All tests pass (zero failures)
62
+ - [ ] No type errors (`tsc --noEmit` or equivalent)
63
+ - [ ] Working directory clean (`git status` shows nothing)
64
+ - [ ] No untracked files that should be committed
65
+ - [ ] Branch is up to date with base branch
66
+
67
+ ### Should Check (non-blocking)
68
+
69
+ - [ ] Linting passes (eslint/prettier or equivalent)
70
+ - [ ] No TODO/FIXME left in new code
71
+ - [ ] Commits are logically grouped (not a mess of WIP)
72
+ - [ ] Commit messages follow project conventions
73
+
74
+ ### Context-Dependent
75
+
76
+ - [ ] If in worktree: confirmed correct worktree
77
+ - [ ] If linked to issue: issue number in branch name or commits
78
+ - [ ] If PR already exists: PR is up to date with latest commits
79
+
80
+ **Any blocking item fails? STOP. Fix it. Re-run the checklist.**
81
+
82
+ ## Phase 2: Decision Tree
83
+
84
+ ```dot
85
+ digraph decision {
86
+ rankdir=TB;
87
+ node [shape=diamond, style=filled, fillcolor="#ffffcc"];
88
+
89
+ start [label="Pre-completion\nchecklist passed?", shape=diamond];
90
+ keep [label="Work worth\nkeeping?"];
91
+ protected [label="Target branch\nprotected?"];
92
+ review [label="Changes need\nreview?"];
93
+ simple [label="Single commit,\npersonal branch?"];
94
+
95
+ stop [label="STOP\nFix issues first", fillcolor="#ffcccc", shape=box];
96
+ abandon [label="PATH C\nCleanup / Abandon", fillcolor="#ffcccc", shape=box];
97
+ pr [label="PATH B\nCreate PR", fillcolor="#ccffcc", shape=box];
98
+ merge [label="PATH A\nMerge Directly", fillcolor="#ccccff", shape=box];
99
+
100
+ start -> keep [label="yes"];
101
+ start -> stop [label="no"];
102
+ keep -> abandon [label="no"];
103
+ keep -> protected [label="yes"];
104
+ protected -> pr [label="yes"];
105
+ protected -> review [label="no"];
106
+ review -> pr [label="yes"];
107
+ review -> simple [label="no"];
108
+ simple -> merge [label="yes"];
109
+ simple -> pr [label="no"];
110
+ }
111
+ ```
112
+
113
+ ### Quick Reference
114
+
115
+ | Condition | Path |
116
+ |-----------|------|
117
+ | Checklist fails | **STOP** — fix first |
118
+ | Work not worth keeping | **PATH C** — Cleanup/Abandon |
119
+ | Target branch is protected | **PATH B** — Create PR |
120
+ | Changes need review | **PATH B** — Create PR |
121
+ | Simple change, personal branch | **PATH A** — Merge Directly |
122
+ | Unsure which path | **PATH B** — Create PR (safe default) |
123
+
124
+ ## Phase 3: Execute Choice
125
+
126
+ ### PATH A: Merge Directly
127
+
128
+ For simple, single-commit changes on unprotected personal branches.
129
+
130
+ ```bash
131
+ # 1. Update base branch
132
+ git checkout <base>
133
+ git pull origin <base>
134
+
135
+ # 2. Merge feature branch
136
+ git merge <feature-branch>
137
+
138
+ # 3. Push
139
+ git push origin <base>
140
+ ```
141
+
142
+ **WARNING:** Never use PATH A if `<base>` is main/master or any protected branch. Use PATH B instead.
143
+
144
+ **When to use:** Solo work, unprotected branch, trivial change, no review needed.
145
+
146
+ **If merge conflicts arise:** Resolve conflicts, run tests again, then commit. If conflicts are complex, abort with `git merge --abort` and switch to PATH B.
147
+
148
+ ### PATH B: Create PR (Recommended Default)
149
+
150
+ The safe default for most workflows. Use the `pr-all-in-one` skill if available.
151
+
152
+ ```bash
153
+ # 1. Push feature branch
154
+ git push -u origin <feature-branch>
155
+
156
+ # 2. Create PR (adjust title and body as needed)
157
+ gh pr create \
158
+ --title "feat: description of change" \
159
+ --body "## Summary
160
+ - What changed and why
161
+
162
+ ## Test plan
163
+ - [ ] Tests pass
164
+ - [ ] Manual verification done
165
+
166
+ Closes #<issue-number>"
167
+ ```
168
+
169
+ **Squash before PR (if commits are messy):**
170
+ ```bash
171
+ # Clean up commits (use interactive rebase for manual control,
172
+ # or --autosquash for automated fixup commits)
173
+ git rebase -i origin/<base>
174
+ # Then force-push (ALWAYS use --force-with-lease, NEVER --force)
175
+ git push --force-with-lease
176
+ ```
177
+
178
+ **When to use:** Team projects, protected branches, changes needing review, anything non-trivial.
179
+
180
+ ### PATH C: Cleanup / Abandon
181
+
182
+ For experimental, superseded, or failed work.
183
+
184
+ **Before abandoning, check for salvageable work:**
185
+ ```bash
186
+ # Review what would be lost
187
+ git log origin/<base>..HEAD --oneline
188
+ git diff origin/<base>..HEAD --stat
189
+
190
+ # Cherry-pick specific commits if needed
191
+ git checkout <base>
192
+ git cherry-pick <commit-hash>
193
+ ```
194
+
195
+ Then proceed to Phase 4 cleanup.
196
+
197
+ ## Phase 4: Post-Completion Cleanup
198
+
199
+ ### After Merge or PR Creation
200
+
201
+ ```bash
202
+ # 1. Switch to base branch
203
+ git checkout <base>
204
+ git pull origin <base>
205
+
206
+ # 2. Delete local branch (-d is safe; use -D only if unmerged and intentional)
207
+ git branch -d <feature-branch>
208
+
209
+ # 3. Delete remote branch (if merged or abandoned)
210
+ git push origin --delete <feature-branch>
211
+ ```
212
+
213
+ ### If in a Git Worktree
214
+
215
+ **IMPORTANT: Remove worktree BEFORE deleting the branch.**
216
+
217
+ ```bash
218
+ # 1. Leave the worktree directory
219
+ cd <main-repo-path>
220
+
221
+ # 2. Remove the worktree
222
+ git worktree remove <worktree-path>
223
+
224
+ # 3. Prune stale worktree references
225
+ git worktree prune
226
+
227
+ # 4. NOW delete the branch (-d is safe; use -D only if unmerged and intentional)
228
+ git branch -d <feature-branch>
229
+ ```
230
+
231
+ **Why this order matters:** You cannot delete a branch that is checked out in a worktree. Attempting to do so will fail. Always remove the worktree first.
232
+
233
+ ### Verification
234
+
235
+ ```bash
236
+ # Confirm cleanup
237
+ git branch # feature branch should be gone
238
+ git branch -r # remote branch should be gone
239
+ git worktree list # no stale worktrees
240
+ ```
241
+
242
+ ## Common Rationalizations
243
+
244
+ | Excuse | Reality |
245
+ |--------|---------|
246
+ | "Tests mostly pass" | Mostly ≠ all. Fix the failures. |
247
+ | "I'll clean up commits later" | Later never comes. Squash now. |
248
+ | "Direct push is faster" | Fast now, broken later. Use a PR. |
249
+ | "It's just a small change" | Small changes break things too. Follow the checklist. |
250
+ | "I'll delete the branch later" | Stale branches accumulate. Clean up now. |
251
+ | "The worktree is fine to leave" | Orphaned worktrees waste disk and cause confusion. Remove it. |
252
+ | "Force push is fine here" | Use `--force-with-lease`. Always. No exceptions. |
253
+ | "No one reviews my PRs anyway" | The PR is the review record. Create it anyway. |
254
+ | "I'll rebase after merge" | Rebase before. Conflicts after merge are worse. |
255
+
256
+ ## Red Flags — STOP
257
+
258
+ - Tests failing or skipped
259
+ - Uncommitted changes in working directory
260
+ - Pushing directly to main/master
261
+ - Using `git push --force` (use `--force-with-lease`)
262
+ - Deleting a branch before removing its worktree
263
+ - Merging without updating base branch first
264
+ - Skipping the pre-completion checklist
265
+ - "Just this once" thinking
266
+
267
+ **Any red flag means: STOP. Go back to Phase 1.**
268
+
269
+ ## Verification Checklist
270
+
271
+ Before marking branch work as complete:
272
+
273
+ - [ ] Pre-completion checklist passed (Phase 1)
274
+ - [ ] Decision made and executed (Phase 2 + 3)
275
+ - [ ] Local branch deleted
276
+ - [ ] Remote branch deleted (if applicable)
277
+ - [ ] Worktree removed (if applicable)
278
+ - [ ] On base branch with latest changes
279
+ - [ ] No stale worktree references
280
+
281
+ Can't check all boxes? You're not done yet.
@@ -40,3 +40,8 @@ Interpret creatively and make unexpected choices that feel genuinely designed fo
40
40
  **IMPORTANT**: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well.
41
41
 
42
42
  Remember: Claude is capable of extraordinary creative work. Don't hold back, show what can truly be created when thinking outside the box and committing fully to a distinctive vision.
43
+
44
+ ## Additional resources
45
+
46
+ - [CSS design patterns](references/css-patterns.md) — Typography systems, color tokens, layout patterns, animations, and texture techniques
47
+ - [Component template](examples/component-template.tsx) — Production-grade React component with staggered animations, CSS variables, and accessibility
@@ -0,0 +1,203 @@
1
+ /**
2
+ * Distinctive React Component Template
3
+ *
4
+ * This template demonstrates a production-grade React component
5
+ * with intentional design choices that avoid generic AI aesthetics.
6
+ *
7
+ * Key patterns:
8
+ * - CSS variables for theming consistency
9
+ * - Staggered reveal animations
10
+ * - Fluid typography with clamp()
11
+ * - Accessible focus management
12
+ * - Motion library integration (optional)
13
+ */
14
+
15
+ import { type ReactNode, type HTMLAttributes, forwardRef } from 'react';
16
+
17
+ // ─── Types ───────────────────────────────────────────────
18
+
19
+ interface FeatureCardProps extends HTMLAttributes<HTMLDivElement> {
20
+ /** Card title — displayed as the main heading */
21
+ title: string;
22
+ /** Supporting description text */
23
+ description: string;
24
+ /** Icon or visual element displayed above the title */
25
+ icon?: ReactNode;
26
+ /** Visual variant controlling the color scheme */
27
+ variant?: 'default' | 'accent' | 'muted';
28
+ /** Stagger delay index for entrance animation (0-based) */
29
+ staggerIndex?: number;
30
+ }
31
+
32
+ // ─── Component ───────────────────────────────────────────
33
+
34
+ export const FeatureCard = forwardRef<HTMLDivElement, FeatureCardProps>(
35
+ function FeatureCard(
36
+ {
37
+ title,
38
+ description,
39
+ icon,
40
+ variant = 'default',
41
+ staggerIndex = 0,
42
+ className = '',
43
+ style,
44
+ ...rest
45
+ },
46
+ ref,
47
+ ) {
48
+ return (
49
+ <div
50
+ ref={ref}
51
+ className={`feature-card feature-card--${variant} ${className}`}
52
+ style={{
53
+ '--stagger-delay': `${staggerIndex * 0.1}s`,
54
+ ...style,
55
+ } as React.CSSProperties}
56
+ {...rest}
57
+ >
58
+ {icon && <div className="feature-card__icon">{icon}</div>}
59
+ <h3 className="feature-card__title">{title}</h3>
60
+ <p className="feature-card__description">{description}</p>
61
+ </div>
62
+ );
63
+ },
64
+ );
65
+
66
+ // ─── Styles (CSS Module or global stylesheet) ────────────
67
+
68
+ /*
69
+ Use a separate .module.css file in production. Inline styles shown
70
+ here for template completeness.
71
+
72
+ .feature-card {
73
+ --card-bg: var(--color-surface-raised, hsl(0 0% 98%));
74
+ --card-border: var(--color-border, hsl(0 0% 90%));
75
+ --card-radius: 1rem;
76
+
77
+ position: relative;
78
+ padding: clamp(1.5rem, 3vw, 2.5rem);
79
+ background: var(--card-bg);
80
+ border: 1px solid var(--card-border);
81
+ border-radius: var(--card-radius);
82
+
83
+ /* Staggered entrance animation */
84
+ opacity: 0;
85
+ animation: card-reveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
86
+ animation-delay: var(--stagger-delay);
87
+
88
+ /* Hover interaction */
89
+ transition:
90
+ transform 0.25s cubic-bezier(0.33, 1, 0.68, 1),
91
+ box-shadow 0.25s ease,
92
+ border-color 0.25s ease;
93
+ }
94
+
95
+ .feature-card:hover {
96
+ transform: translateY(-4px);
97
+ border-color: var(--color-primary, hsl(230 65% 50%));
98
+ box-shadow:
99
+ 0 4px 6px -1px rgba(0, 0, 0, 0.05),
100
+ 0 10px 15px -3px rgba(0, 0, 0, 0.07);
101
+ }
102
+
103
+ .feature-card:active {
104
+ transform: translateY(-1px);
105
+ transition-duration: 0.1s;
106
+ }
107
+
108
+ .feature-card:focus-visible {
109
+ outline: 2px solid var(--color-primary);
110
+ outline-offset: 3px;
111
+ }
112
+
113
+ /* --- Variants --- */
114
+
115
+ .feature-card--accent {
116
+ --card-bg: hsl(var(--hue-accent, 350) 80% 97%);
117
+ --card-border: hsl(var(--hue-accent, 350) 60% 85%);
118
+ }
119
+
120
+ .feature-card--muted {
121
+ --card-bg: hsl(0 0% 96%);
122
+ --card-border: transparent;
123
+ }
124
+
125
+ /* --- Children --- */
126
+
127
+ .feature-card__icon {
128
+ display: flex;
129
+ align-items: center;
130
+ justify-content: center;
131
+ width: 3rem;
132
+ height: 3rem;
133
+ margin-bottom: 1rem;
134
+ border-radius: 0.75rem;
135
+ background: var(--color-primary-light, hsl(230 65% 95%));
136
+ color: var(--color-primary, hsl(230 65% 50%));
137
+ font-size: 1.25rem;
138
+ }
139
+
140
+ .feature-card__title {
141
+ margin: 0 0 0.5rem;
142
+ font-family: var(--font-display, 'Playfair Display', serif);
143
+ font-size: clamp(1.125rem, 0.9rem + 0.5vw, 1.375rem);
144
+ font-weight: 700;
145
+ line-height: 1.2;
146
+ letter-spacing: -0.01em;
147
+ color: var(--color-text, hsl(0 0% 12%));
148
+ }
149
+
150
+ .feature-card__description {
151
+ margin: 0;
152
+ font-family: var(--font-body, 'Source Sans 3', sans-serif);
153
+ font-size: var(--text-base, 1rem);
154
+ line-height: 1.6;
155
+ color: var(--color-text-muted, hsl(0 0% 45%));
156
+ }
157
+
158
+ /* --- Animation --- */
159
+
160
+ @keyframes card-reveal {
161
+ from {
162
+ opacity: 0;
163
+ transform: translateY(1.5rem);
164
+ }
165
+ to {
166
+ opacity: 1;
167
+ transform: translateY(0);
168
+ }
169
+ }
170
+
171
+ @media (prefers-reduced-motion: reduce) {
172
+ .feature-card {
173
+ animation: none;
174
+ opacity: 1;
175
+ }
176
+ .feature-card:hover {
177
+ transform: none;
178
+ }
179
+ }
180
+ */
181
+
182
+ // ─── Usage Example ───────────────────────────────────────
183
+
184
+ /*
185
+ import { FeatureCard } from './FeatureCard';
186
+ import { Zap, Shield, Palette } from 'lucide-react';
187
+
188
+ export function FeaturesSection() {
189
+ const features = [
190
+ { icon: <Zap />, title: 'Lightning Fast', description: 'Sub-100ms response times.' },
191
+ { icon: <Shield />, title: 'Secure by Default', description: 'Zero-trust architecture.' },
192
+ { icon: <Palette />, title: 'Fully Themeable', description: 'CSS variable driven.' },
193
+ ];
194
+
195
+ return (
196
+ <section className="features-grid">
197
+ {features.map((f, i) => (
198
+ <FeatureCard key={f.title} {...f} staggerIndex={i} />
199
+ ))}
200
+ </section>
201
+ );
202
+ }
203
+ */