@jakkrichm/create-nexus-devflow 2.0.19 → 2.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/update.js +19 -8
- package/dist/lib/update.js.map +1 -1
- package/package.json +1 -1
- package/template/.agents/skills/00-discover/SKILL.md +28 -116
- package/template/.agents/skills/40-execute/SKILL.md +1 -1
- package/template/.agents/skills/50-verify/SKILL.md +28 -161
- package/template/.agents/skills/60-report/SKILL.md +19 -92
- package/template/.agents/skills/70-release/SKILL.md +36 -11
- package/template/.agents/skills/check/SKILL.md +19 -7
- package/template/.agents/skills/complete/SKILL.md +21 -10
- package/template/.claude/skills/00-discover/SKILL.md +28 -116
- package/template/.claude/skills/40-execute/SKILL.md +1 -1
- package/template/.claude/skills/50-verify/SKILL.md +28 -161
- package/template/.claude/skills/60-report/SKILL.md +19 -92
- package/template/.claude/skills/70-release/SKILL.md +36 -11
- package/template/.claude/skills/check/SKILL.md +19 -7
- package/template/.claude/skills/complete/SKILL.md +21 -10
- package/template/AGENTS.md +1 -1
- package/template/devflow/context/coding-standards.md +40 -29
- package/template/.agents/skills/agent/SKILL.md +0 -165
- package/template/.agents/skills/api-and-interface-design/SKILL.md +0 -294
- package/template/.agents/skills/app-builder/SKILL.md +0 -75
- package/template/.agents/skills/app-builder/agent-coordination.md +0 -71
- package/template/.agents/skills/app-builder/feature-building.md +0 -53
- package/template/.agents/skills/app-builder/project-detection.md +0 -34
- package/template/.agents/skills/app-builder/scaffolding.md +0 -118
- package/template/.agents/skills/app-builder/tech-stack.md +0 -40
- package/template/.agents/skills/app-builder/templates/SKILL.md +0 -39
- package/template/.agents/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
- package/template/.agents/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
- package/template/.agents/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
- package/template/.agents/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
- package/template/.agents/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
- package/template/.agents/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
- package/template/.agents/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
- package/template/.agents/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -122
- package/template/.agents/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -122
- package/template/.agents/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -169
- package/template/.agents/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -134
- package/template/.agents/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
- package/template/.agents/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -119
- package/template/.agents/skills/architecture/SKILL.md +0 -55
- package/template/.agents/skills/architecture/context-discovery.md +0 -43
- package/template/.agents/skills/architecture/examples.md +0 -94
- package/template/.agents/skills/architecture/pattern-selection.md +0 -68
- package/template/.agents/skills/architecture/patterns-reference.md +0 -50
- package/template/.agents/skills/architecture/trade-off-analysis.md +0 -77
- package/template/.agents/skills/bash-linux/SKILL.md +0 -199
- package/template/.agents/skills/behavioral-modes/SKILL.md +0 -242
- package/template/.agents/skills/brainstorm/SKILL.md +0 -168
- package/template/.agents/skills/changelog/SKILL.md +0 -109
- package/template/.agents/skills/codebase-design/DEEPENING.md +0 -24
- package/template/.agents/skills/codebase-design/DESIGN-IT-TWICE.md +0 -28
- package/template/.agents/skills/codebase-design/SKILL.md +0 -58
- package/template/.agents/skills/commit/SKILL.md +0 -59
- package/template/.agents/skills/competitor-analysis/SKILL.md +0 -66
- package/template/.agents/skills/context-engineering/SKILL.md +0 -290
- package/template/.agents/skills/database-design/SKILL.md +0 -52
- package/template/.agents/skills/database-design/database-selection.md +0 -43
- package/template/.agents/skills/database-design/indexing.md +0 -39
- package/template/.agents/skills/database-design/migrations.md +0 -48
- package/template/.agents/skills/database-design/optimization.md +0 -36
- package/template/.agents/skills/database-design/orm-selection.md +0 -30
- package/template/.agents/skills/database-design/schema-design.md +0 -56
- package/template/.agents/skills/database-design/scripts/schema_validator.py +0 -172
- package/template/.agents/skills/deploy/SKILL.md +0 -63
- package/template/.agents/skills/documentation-and-adrs/SKILL.md +0 -278
- package/template/.agents/skills/domain-modeling/ADR-FORMAT.md +0 -47
- package/template/.agents/skills/domain-modeling/CONTEXT-FORMAT.md +0 -60
- package/template/.agents/skills/domain-modeling/SKILL.md +0 -74
- package/template/.agents/skills/followup/SKILL.md +0 -83
- package/template/.agents/skills/frontend-ui-engineering/SKILL.md +0 -326
- package/template/.agents/skills/frontend-ui-engineering/accessibility-checklist.md +0 -159
- package/template/.agents/skills/goal/SKILL.md +0 -148
- package/template/.agents/skills/handoff/SKILL.md +0 -46
- package/template/.agents/skills/help/SKILL.md +0 -253
- package/template/.agents/skills/i18n-localization/SKILL.md +0 -154
- package/template/.agents/skills/i18n-localization/scripts/i18n_checker.py +0 -241
- package/template/.agents/skills/insight/SKILL.md +0 -42
- package/template/.agents/skills/issue-triage/SKILL.md +0 -115
- package/template/.agents/skills/lint-and-validate/SKILL.md +0 -45
- package/template/.agents/skills/lint-and-validate/scripts/lint_runner.py +0 -184
- package/template/.agents/skills/lint-and-validate/scripts/type_coverage.py +0 -173
- package/template/.agents/skills/mcp-builder/SKILL.md +0 -176
- package/template/.agents/skills/merge/SKILL.md +0 -76
- package/template/.agents/skills/mobile-design/SKILL.md +0 -394
- package/template/.agents/skills/mobile-design/decision-trees.md +0 -516
- package/template/.agents/skills/mobile-design/mobile-backend.md +0 -491
- package/template/.agents/skills/mobile-design/mobile-color-system.md +0 -420
- package/template/.agents/skills/mobile-design/mobile-debugging.md +0 -122
- package/template/.agents/skills/mobile-design/mobile-design-thinking.md +0 -357
- package/template/.agents/skills/mobile-design/mobile-navigation.md +0 -458
- package/template/.agents/skills/mobile-design/mobile-performance.md +0 -767
- package/template/.agents/skills/mobile-design/mobile-testing.md +0 -356
- package/template/.agents/skills/mobile-design/mobile-typography.md +0 -433
- package/template/.agents/skills/mobile-design/platform-android.md +0 -666
- package/template/.agents/skills/mobile-design/platform-ios.md +0 -561
- package/template/.agents/skills/mobile-design/scripts/mobile_audit.py +0 -670
- package/template/.agents/skills/mobile-design/touch-psychology.md +0 -537
- package/template/.agents/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
- package/template/.agents/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
- package/template/.agents/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
- package/template/.agents/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
- package/template/.agents/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
- package/template/.agents/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
- package/template/.agents/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
- package/template/.agents/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
- package/template/.agents/skills/nextjs-react-expert/SKILL.md +0 -286
- package/template/.agents/skills/nextjs-react-expert/scripts/convert_rules.py +0 -222
- package/template/.agents/skills/nextjs-react-expert/scripts/react_performance_checker.py +0 -252
- package/template/.agents/skills/nodejs-best-practices/SKILL.md +0 -333
- package/template/.agents/skills/package-json-generator/SKILL.md +0 -60
- package/template/.agents/skills/package-json-generator/scripts/generate.js +0 -120
- package/template/.agents/skills/package-json-generator/scripts/run.sh +0 -19
- package/template/.agents/skills/parallel-agents/SKILL.md +0 -144
- package/template/.agents/skills/performance-optimization/SKILL.md +0 -299
- package/template/.agents/skills/performance-optimization/performance-checklist.md +0 -113
- package/template/.agents/skills/powershell-windows/SKILL.md +0 -167
- package/template/.agents/skills/pr/SKILL.md +0 -93
- package/template/.agents/skills/prd/SKILL.md +0 -127
- package/template/.agents/skills/preview/SKILL.md +0 -42
- package/template/.agents/skills/python-patterns/SKILL.md +0 -441
- package/template/.agents/skills/research/SKILL.md +0 -143
- package/template/.agents/skills/review/SKILL.md +0 -71
- package/template/.agents/skills/roadmap-strategy/SKILL.md +0 -94
- package/template/.agents/skills/security-review/SKILL.md +0 -63
- package/template/.agents/skills/seo-fundamentals/SKILL.md +0 -129
- package/template/.agents/skills/seo-fundamentals/scripts/seo_checker.py +0 -219
- package/template/.agents/skills/server-management/SKILL.md +0 -161
- package/template/.agents/skills/simplify/SKILL.md +0 -70
- package/template/.agents/skills/skill-development/SKILL.md +0 -86
- package/template/.agents/skills/spec/SKILL.md +0 -39
- package/template/.agents/skills/spec-driven-development/SKILL.md +0 -207
- package/template/.agents/skills/tailwind-patterns/SKILL.md +0 -269
- package/template/.agents/skills/type-design/SKILL.md +0 -84
- package/template/.agents/skills/ui-ux-pro-max/SKILL.md +0 -75
- package/template/.claude/skills/agent/SKILL.md +0 -165
- package/template/.claude/skills/api-and-interface-design/SKILL.md +0 -294
- package/template/.claude/skills/app-builder/SKILL.md +0 -75
- package/template/.claude/skills/app-builder/agent-coordination.md +0 -71
- package/template/.claude/skills/app-builder/feature-building.md +0 -53
- package/template/.claude/skills/app-builder/project-detection.md +0 -34
- package/template/.claude/skills/app-builder/scaffolding.md +0 -118
- package/template/.claude/skills/app-builder/tech-stack.md +0 -40
- package/template/.claude/skills/app-builder/templates/SKILL.md +0 -39
- package/template/.claude/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
- package/template/.claude/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
- package/template/.claude/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
- package/template/.claude/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
- package/template/.claude/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
- package/template/.claude/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
- package/template/.claude/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
- package/template/.claude/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -122
- package/template/.claude/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -122
- package/template/.claude/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -169
- package/template/.claude/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -134
- package/template/.claude/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
- package/template/.claude/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -119
- package/template/.claude/skills/architecture/SKILL.md +0 -55
- package/template/.claude/skills/architecture/context-discovery.md +0 -43
- package/template/.claude/skills/architecture/examples.md +0 -94
- package/template/.claude/skills/architecture/pattern-selection.md +0 -68
- package/template/.claude/skills/architecture/patterns-reference.md +0 -50
- package/template/.claude/skills/architecture/trade-off-analysis.md +0 -77
- package/template/.claude/skills/bash-linux/SKILL.md +0 -199
- package/template/.claude/skills/behavioral-modes/SKILL.md +0 -242
- package/template/.claude/skills/brainstorm/SKILL.md +0 -168
- package/template/.claude/skills/changelog/SKILL.md +0 -109
- package/template/.claude/skills/codebase-design/DEEPENING.md +0 -24
- package/template/.claude/skills/codebase-design/DESIGN-IT-TWICE.md +0 -28
- package/template/.claude/skills/codebase-design/SKILL.md +0 -58
- package/template/.claude/skills/commit/SKILL.md +0 -59
- package/template/.claude/skills/competitor-analysis/SKILL.md +0 -66
- package/template/.claude/skills/context-engineering/SKILL.md +0 -290
- package/template/.claude/skills/database-design/SKILL.md +0 -52
- package/template/.claude/skills/database-design/database-selection.md +0 -43
- package/template/.claude/skills/database-design/indexing.md +0 -39
- package/template/.claude/skills/database-design/migrations.md +0 -48
- package/template/.claude/skills/database-design/optimization.md +0 -36
- package/template/.claude/skills/database-design/orm-selection.md +0 -30
- package/template/.claude/skills/database-design/schema-design.md +0 -56
- package/template/.claude/skills/database-design/scripts/schema_validator.py +0 -172
- package/template/.claude/skills/deploy/SKILL.md +0 -63
- package/template/.claude/skills/documentation-and-adrs/SKILL.md +0 -278
- package/template/.claude/skills/domain-modeling/ADR-FORMAT.md +0 -47
- package/template/.claude/skills/domain-modeling/CONTEXT-FORMAT.md +0 -60
- package/template/.claude/skills/domain-modeling/SKILL.md +0 -74
- package/template/.claude/skills/followup/SKILL.md +0 -83
- package/template/.claude/skills/frontend-ui-engineering/SKILL.md +0 -326
- package/template/.claude/skills/frontend-ui-engineering/accessibility-checklist.md +0 -159
- package/template/.claude/skills/goal/SKILL.md +0 -148
- package/template/.claude/skills/handoff/SKILL.md +0 -46
- package/template/.claude/skills/help/SKILL.md +0 -253
- package/template/.claude/skills/i18n-localization/SKILL.md +0 -154
- package/template/.claude/skills/i18n-localization/scripts/i18n_checker.py +0 -241
- package/template/.claude/skills/insight/SKILL.md +0 -42
- package/template/.claude/skills/issue-triage/SKILL.md +0 -115
- package/template/.claude/skills/lint-and-validate/SKILL.md +0 -45
- package/template/.claude/skills/lint-and-validate/scripts/lint_runner.py +0 -184
- package/template/.claude/skills/lint-and-validate/scripts/type_coverage.py +0 -173
- package/template/.claude/skills/mcp-builder/SKILL.md +0 -176
- package/template/.claude/skills/merge/SKILL.md +0 -76
- package/template/.claude/skills/mobile-design/SKILL.md +0 -394
- package/template/.claude/skills/mobile-design/decision-trees.md +0 -516
- package/template/.claude/skills/mobile-design/mobile-backend.md +0 -491
- package/template/.claude/skills/mobile-design/mobile-color-system.md +0 -420
- package/template/.claude/skills/mobile-design/mobile-debugging.md +0 -122
- package/template/.claude/skills/mobile-design/mobile-design-thinking.md +0 -357
- package/template/.claude/skills/mobile-design/mobile-navigation.md +0 -458
- package/template/.claude/skills/mobile-design/mobile-performance.md +0 -767
- package/template/.claude/skills/mobile-design/mobile-testing.md +0 -356
- package/template/.claude/skills/mobile-design/mobile-typography.md +0 -433
- package/template/.claude/skills/mobile-design/platform-android.md +0 -666
- package/template/.claude/skills/mobile-design/platform-ios.md +0 -561
- package/template/.claude/skills/mobile-design/scripts/mobile_audit.py +0 -670
- package/template/.claude/skills/mobile-design/touch-psychology.md +0 -537
- package/template/.claude/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
- package/template/.claude/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
- package/template/.claude/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
- package/template/.claude/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
- package/template/.claude/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
- package/template/.claude/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
- package/template/.claude/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
- package/template/.claude/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
- package/template/.claude/skills/nextjs-react-expert/SKILL.md +0 -286
- package/template/.claude/skills/nextjs-react-expert/scripts/convert_rules.py +0 -222
- package/template/.claude/skills/nextjs-react-expert/scripts/react_performance_checker.py +0 -252
- package/template/.claude/skills/nodejs-best-practices/SKILL.md +0 -333
- package/template/.claude/skills/package-json-generator/SKILL.md +0 -60
- package/template/.claude/skills/package-json-generator/scripts/generate.js +0 -120
- package/template/.claude/skills/package-json-generator/scripts/run.sh +0 -19
- package/template/.claude/skills/parallel-agents/SKILL.md +0 -144
- package/template/.claude/skills/performance-optimization/SKILL.md +0 -299
- package/template/.claude/skills/performance-optimization/performance-checklist.md +0 -113
- package/template/.claude/skills/powershell-windows/SKILL.md +0 -167
- package/template/.claude/skills/pr/SKILL.md +0 -93
- package/template/.claude/skills/prd/SKILL.md +0 -127
- package/template/.claude/skills/preview/SKILL.md +0 -42
- package/template/.claude/skills/python-patterns/SKILL.md +0 -441
- package/template/.claude/skills/research/SKILL.md +0 -143
- package/template/.claude/skills/review/SKILL.md +0 -71
- package/template/.claude/skills/roadmap-strategy/SKILL.md +0 -94
- package/template/.claude/skills/security-review/SKILL.md +0 -63
- package/template/.claude/skills/seo-fundamentals/SKILL.md +0 -129
- package/template/.claude/skills/seo-fundamentals/scripts/seo_checker.py +0 -219
- package/template/.claude/skills/server-management/SKILL.md +0 -161
- package/template/.claude/skills/simplify/SKILL.md +0 -70
- package/template/.claude/skills/skill-development/SKILL.md +0 -86
- package/template/.claude/skills/spec/SKILL.md +0 -39
- package/template/.claude/skills/spec-driven-development/SKILL.md +0 -207
- package/template/.claude/skills/tailwind-patterns/SKILL.md +0 -269
- package/template/.claude/skills/type-design/SKILL.md +0 -84
- package/template/.claude/skills/ui-ux-pro-max/SKILL.md +0 -75
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: simplify
|
|
3
|
-
description: "[Devflow] Code simplification and refactoring for clarity and maintainability without altering runtime behavior."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Code Simplification & Refactoring
|
|
7
|
-
|
|
8
|
-
## Overview
|
|
9
|
-
|
|
10
|
-
This is the comprehensive code simplification master skill for Nexus-DevFlow. It reduces cognitive load, cleans up unnecessary abstractions, flattens deep nesting, and removes dead code while **preserving 100% exact runtime behavior**.
|
|
11
|
-
|
|
12
|
-
**Core Rule**: Every simplification must pass: *"Would a new team member understand this faster than the original, without any behavioral regression?"*
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## 1. The Five Principles of Simplification
|
|
17
|
-
|
|
18
|
-
1. **Preserve Behavior Exactly**: Same inputs, outputs, error conditions, side effects, and ordering.
|
|
19
|
-
2. **Follow Project Conventions**: Consistency with neighboring files beats personal style preferences.
|
|
20
|
-
3. **Delete Dead & Unused Code**: Remove abandoned helpers, dead branch paths, and leftover debugging code.
|
|
21
|
-
4. **Flatten Control Flow**: Replace nested conditionals and callback pyramids with guard clauses and early returns.
|
|
22
|
-
5. **Eliminate Speculative Generalization**: Replace single-use abstractions with clear, direct implementations.
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## 2. High-Impact Simplification Techniques
|
|
27
|
-
|
|
28
|
-
### A. Guard Clauses Over Nested Conditionals
|
|
29
|
-
```typescript
|
|
30
|
-
// Before: Deep indentation
|
|
31
|
-
function processOrder(order) {
|
|
32
|
-
if (order) {
|
|
33
|
-
if (order.isValid) {
|
|
34
|
-
if (order.isPaid) {
|
|
35
|
-
return fulfill(order);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// After: Early returns
|
|
42
|
-
function processOrder(order) {
|
|
43
|
-
if (!order || !order.isValid) return;
|
|
44
|
-
if (!order.isPaid) return;
|
|
45
|
-
return fulfill(order);
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### B. Inline Single-Use Helpers & Dead Shims
|
|
50
|
-
If a helper function is only called once and adds indirection without semantic clarity, inline it directly.
|
|
51
|
-
|
|
52
|
-
### C. Remove Dead Code & Leftover Comments
|
|
53
|
-
Delete commented-out code blocks, `// removed` notes, and unused variables (`_unused`). Version control (Git) remembers the history.
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
## 3. Verification & Safety Loop
|
|
58
|
-
|
|
59
|
-
1. Run unit tests before touching code (`npm test` -> GREEN).
|
|
60
|
-
2. Apply one small refactoring step at a time.
|
|
61
|
-
3. Rerun tests immediately after each step. If tests break, revert and reconsider.
|
|
62
|
-
4. Verify overall build and linter checks.
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## Relationship To DevFlow 2.0
|
|
67
|
-
|
|
68
|
-
- **Classification**: Companion command & Refactoring support
|
|
69
|
-
- **Mainline integration**: Used during `40-execute` (Refactor step of TDD) or `50-verify`.
|
|
70
|
-
- **Handoff**: `50-verify` (proves zero regressions).
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: skill-development
|
|
3
|
-
description: "[Devflow] Guides the creation and maintenance of agent skills. Use when building new skills or modifying existing ones to ensure they follow the PRP framework standards."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Skill Development (Skill Anatomy)
|
|
7
|
-
|
|
8
|
-
## Overview
|
|
9
|
-
|
|
10
|
-
This skill defines the standard structure and format of agent-skills skill files. It serves as the "source of truth" for creating new capabilities within the PRP framework.
|
|
11
|
-
|
|
12
|
-
## When to Use
|
|
13
|
-
- When contributing or creating a new skill.
|
|
14
|
-
- When refactoring existing skills to match the standard.
|
|
15
|
-
- When you need to understand the structural requirements of a `SKILL.md` file.
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## 🏗️ Skill Structure (Anatomy)
|
|
20
|
-
|
|
21
|
-
Every skill lives in its own directory under `skills/`:
|
|
22
|
-
|
|
23
|
-
```text
|
|
24
|
-
skills/
|
|
25
|
-
skill-name/
|
|
26
|
-
├── SKILL.md # Required: The skill definition
|
|
27
|
-
└── supporting-file.md # Optional: Reference material loaded on demand
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### 1. Frontmatter (Required)
|
|
31
|
-
|
|
32
|
-
```yaml
|
|
33
|
-
---
|
|
34
|
-
name: skill-name-with-hyphens
|
|
35
|
-
description: Brief statement of what the skill does. Use when [specific trigger conditions].
|
|
36
|
-
---
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
**Rules:**
|
|
40
|
-
- `name`: Lowercase, hyphen-separated. Must match the directory name.
|
|
41
|
-
- `description`: Starts with what the skill does (third person), followed by trigger conditions. Maximum 1024 characters.
|
|
42
|
-
|
|
43
|
-
### 2. Standard Sections
|
|
44
|
-
|
|
45
|
-
A `SKILL.md` should contain these sections:
|
|
46
|
-
|
|
47
|
-
| Section | Purpose |
|
|
48
|
-
|:---|:---|
|
|
49
|
-
| **# Skill Title** | Clear, descriptive title. |
|
|
50
|
-
| **## Overview** | One-two sentences explaining what this skill does and why it matters. |
|
|
51
|
-
| **## When to Use** | Triggers (symptoms/task types) and when NOT to use. |
|
|
52
|
-
| **## Core Process** | The main workflow, broken into numbered steps or phases. |
|
|
53
|
-
| **## Patterns/Techniques**| Detailed guidance, code examples, or templates. |
|
|
54
|
-
| **## Rationalizations** | A table of excuses agents use to skip steps vs. the reality. |
|
|
55
|
-
| **## Red Flags** | Signs that the skill is being violated. |
|
|
56
|
-
| **## Verification** | Checklist of exit criteria with evidence requirements. |
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
## ✍️ Writing Principles
|
|
61
|
-
|
|
62
|
-
1. **Process over knowledge**: Skills are workflows, not reference docs. Focus on steps, not facts.
|
|
63
|
-
2. **Specific over general**: "Run `npm test`" is better than "verify the tests".
|
|
64
|
-
3. **Evidence over assumption**: Every verification checkbox requires proof (logs, output).
|
|
65
|
-
4. **Anti-rationalization**: pair common agent excuses with factual counter-arguments.
|
|
66
|
-
5. **Token-conscious**: If a section doesn't change agent behavior, remove it.
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
## 🚫 Common Rationalizations
|
|
71
|
-
|
|
72
|
-
| Rationalization | Reality |
|
|
73
|
-
|:---|:---|
|
|
74
|
-
| "This is a simple change, I can skip the spec." | Simple changes often have hidden side effects. The spec prevents regressions. |
|
|
75
|
-
| "I'll add tests after the implementation." | TDD ensures the code is testable from the start and prevents "forgetting" tests. |
|
|
76
|
-
| "I don't need to read the explorer findings, I know the code." | Assumed knowledge is the primary source of bugs. Always verify patterns. |
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## ✅ Verification Checklist
|
|
81
|
-
|
|
82
|
-
- [ ] Directory name matches `name` in frontmatter.
|
|
83
|
-
- [ ] `SKILL.md` is all uppercase.
|
|
84
|
-
- [ ] All mandatory sections (Overview, Process, Rationalizations, Verification) are present.
|
|
85
|
-
- [ ] Verification steps are objective and require evidence.
|
|
86
|
-
- [ ] Language is imperative and actionable.
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: spec
|
|
3
|
-
description: "[Devflow] Fast-Track Spec router in DevFlow (Blueprint Mode) - aliases and routes to /feature or /fix to create the living current-feature.md contract in context."
|
|
4
|
-
argument-hint: "{feature title, bug description, IDEA-xxx, or running-id}"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Fast-Track: Spec Router (Blueprint Mode)
|
|
8
|
-
|
|
9
|
-
$ARGUMENTS
|
|
10
|
-
|
|
11
|
-
Unified Fast-Track entry point that routes to `/feature` or `/fix` to create and maintain the **Single Living Spec (`devflow/context/current-feature.md`)**.
|
|
12
|
-
|
|
13
|
-
> [!TIP]
|
|
14
|
-
> **Preferred Commands**:
|
|
15
|
-
> - ใช้ **`/feature <title>`** สำหรับฟีเจอร์ใหม่หรืองานพัฒนาทั่วไป
|
|
16
|
-
> - ใช้ **`/fix <bug-description>`** สำหรับแก้บั๊กหรือ hotfix
|
|
17
|
-
|
|
18
|
-
## Invocations & Aliases
|
|
19
|
-
|
|
20
|
-
- `/feature <title>`: Fast-Track feature workflow (แนะนำ)
|
|
21
|
-
- `/fix <bug-description>`: Fast-Track ad-hoc bugfix workflow (แนะนำ)
|
|
22
|
-
- `/spec <title>` or `/spec IDEA-xxx`: Generic Fast-Track specification
|
|
23
|
-
- `$feature`, `$fix`, `$spec`: Codex CLI invocation
|
|
24
|
-
|
|
25
|
-
## Fast-Track Mainline Workflow
|
|
26
|
-
|
|
27
|
-
```text
|
|
28
|
-
/feature (หรือ /fix) ──▶ /implement ──▶ /check ──▶ /complete
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Behavior & Contract
|
|
32
|
-
|
|
33
|
-
When invoked:
|
|
34
|
-
|
|
35
|
-
1. Checks Single Active Run Guardrail: rejects if an uncompleted active run already exists in `devflow/context/current-stage.md` or `devflow/context/current-feature.md`.
|
|
36
|
-
2. If the input describes a bug or hotfix, routes to `/fix` behavior.
|
|
37
|
-
3. Otherwise, routes to `/feature` behavior.
|
|
38
|
-
4. Allocates sequential ID without prefix (`xxx-slug`), generates `devflow/context/current-feature.md` in **Thai (`th`)**.
|
|
39
|
-
5. Updates `devflow/context/current-stage.md` and reports next step: `/implement`.
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: spec-driven-development
|
|
3
|
-
description: "[Devflow] Creates specs before coding. Use when starting a new project, feature, or significant change and no specification exists yet. Use when requirements are unclear, ambiguous, or only exist as a vague idea."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Spec-Driven Development
|
|
7
|
-
|
|
8
|
-
## Overview
|
|
9
|
-
|
|
10
|
-
Write a structured specification before writing any code. The spec is the shared source of truth between you and the human engineer — it defines what we're building, why, and how we'll know it's done. Code without a spec is guessing.
|
|
11
|
-
|
|
12
|
-
## When to Use
|
|
13
|
-
|
|
14
|
-
- Starting a new project or feature
|
|
15
|
-
- Requirements are ambiguous or incomplete
|
|
16
|
-
- The change touches multiple files or modules
|
|
17
|
-
- You're about to make an architectural decision
|
|
18
|
-
- The task would take more than 30 minutes to implement
|
|
19
|
-
|
|
20
|
-
**When NOT to use:** Single-line fixes, typo corrections, or changes where requirements are unambiguous and self-contained.
|
|
21
|
-
|
|
22
|
-
## The Gated Workflow
|
|
23
|
-
|
|
24
|
-
Spec-driven development has four phases. Do not advance to the next phase until the current one is validated.
|
|
25
|
-
|
|
26
|
-
```
|
|
27
|
-
SPECIFY ──→ PLAN ──→ TASKS ──→ IMPLEMENT
|
|
28
|
-
│ │ │ │
|
|
29
|
-
▼ ▼ ▼ ▼
|
|
30
|
-
Human Human Human Human
|
|
31
|
-
reviews reviews reviews reviews
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### Phase 1: Specify
|
|
35
|
-
|
|
36
|
-
Start with a high-level vision. Ask the human clarifying questions until requirements are concrete.
|
|
37
|
-
|
|
38
|
-
**Surface assumptions immediately.** Before writing any spec content, list what you're assuming:
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
ASSUMPTIONS I'M MAKING:
|
|
42
|
-
1. This is a web application (not native mobile)
|
|
43
|
-
2. Authentication uses session-based cookies (not JWT)
|
|
44
|
-
3. The database is PostgreSQL (based on existing Prisma schema)
|
|
45
|
-
4. We're targeting modern browsers only (no IE11)
|
|
46
|
-
→ Correct me now or I'll proceed with these.
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Don't silently fill in ambiguous requirements. The spec's entire purpose is to surface misunderstandings *before* code gets written — assumptions are the most dangerous form of misunderstanding.
|
|
50
|
-
|
|
51
|
-
**Write a spec document covering these six core areas:**
|
|
52
|
-
|
|
53
|
-
1. **Objective** — What are we building and why? Who is the user? What does success look like?
|
|
54
|
-
|
|
55
|
-
2. **Commands** — Full executable commands with flags, not just tool names.
|
|
56
|
-
```
|
|
57
|
-
Build: npm run build
|
|
58
|
-
Test: npm test -- --coverage
|
|
59
|
-
Lint: npm run lint --fix
|
|
60
|
-
Dev: npm run dev
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
3. **Project Structure** — Where source code lives, where tests go, where docs belong.
|
|
64
|
-
```
|
|
65
|
-
src/ → Application source code
|
|
66
|
-
src/components → React components
|
|
67
|
-
src/lib → Shared utilities
|
|
68
|
-
tests/ → Unit and integration tests
|
|
69
|
-
e2e/ → End-to-end tests
|
|
70
|
-
docs/ → Documentation
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
4. **Code Style** — One real code snippet showing your style beats three paragraphs describing it. Include naming conventions, formatting rules, and examples of good output.
|
|
74
|
-
|
|
75
|
-
5. **Testing Strategy** — What framework, where tests live, coverage expectations, which test levels for which concerns.
|
|
76
|
-
|
|
77
|
-
6. **Boundaries** — Three-tier system:
|
|
78
|
-
- **Always do:** Run tests before commits, follow naming conventions, validate inputs
|
|
79
|
-
- **Ask first:** Database schema changes, adding dependencies, changing CI config
|
|
80
|
-
- **Never do:** Commit secrets, edit vendor directories, remove failing tests without approval
|
|
81
|
-
|
|
82
|
-
## DevFlow 2.0 Specification Contract
|
|
83
|
-
|
|
84
|
-
Every specification must stand on its own in markdown under `devflow/runs/{ID}-*/`:
|
|
85
|
-
|
|
86
|
-
1. **`current-feature.md`**: Fast-Track Single Living Spec delivery contract.
|
|
87
|
-
2. **`20-spec.md`**: Deep-Track formal specification delivery contract.
|
|
88
|
-
|
|
89
|
-
**Spec template:**
|
|
90
|
-
|
|
91
|
-
```markdown
|
|
92
|
-
# Spec: [Project/Feature Name]
|
|
93
|
-
|
|
94
|
-
## Objective
|
|
95
|
-
[What we're building and why. User stories or acceptance criteria.]
|
|
96
|
-
|
|
97
|
-
## Tech Stack
|
|
98
|
-
[Framework, language, key dependencies with versions]
|
|
99
|
-
|
|
100
|
-
## Commands
|
|
101
|
-
[Build, test, lint, dev — full commands]
|
|
102
|
-
|
|
103
|
-
## Project Structure
|
|
104
|
-
[Directory layout with descriptions]
|
|
105
|
-
|
|
106
|
-
## Code Style
|
|
107
|
-
[Example snippet + key conventions]
|
|
108
|
-
|
|
109
|
-
## Testing Strategy
|
|
110
|
-
[Framework, test locations, coverage requirements, test levels]
|
|
111
|
-
|
|
112
|
-
## Boundaries
|
|
113
|
-
- Always: [...]
|
|
114
|
-
- Ask first: [...]
|
|
115
|
-
- Never: [...]
|
|
116
|
-
|
|
117
|
-
## Success Criteria
|
|
118
|
-
[How we'll know this is done — specific, testable conditions]
|
|
119
|
-
|
|
120
|
-
## Open Questions
|
|
121
|
-
[Anything unresolved that needs human input]
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
**Reframe instructions as success criteria.** When receiving vague requirements, translate them into concrete conditions:
|
|
125
|
-
|
|
126
|
-
```
|
|
127
|
-
REQUIREMENT: "Make the dashboard faster"
|
|
128
|
-
|
|
129
|
-
REFRAMED SUCCESS CRITERIA:
|
|
130
|
-
- Dashboard LCP < 2.5s on 4G connection
|
|
131
|
-
- Initial data load completes in < 500ms
|
|
132
|
-
- No layout shift during load (CLS < 0.1)
|
|
133
|
-
→ Are these the right targets?
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
This lets you loop, retry, and problem-solve toward a clear goal rather than guessing what "faster" means.
|
|
137
|
-
|
|
138
|
-
### Phase 2: Plan
|
|
139
|
-
|
|
140
|
-
With the validated spec, generate a technical implementation plan:
|
|
141
|
-
|
|
142
|
-
1. Identify the major components and their dependencies
|
|
143
|
-
2. Determine the implementation order (what must be built first)
|
|
144
|
-
3. Note risks and mitigation strategies
|
|
145
|
-
4. Identify what can be built in parallel vs. what must be sequential
|
|
146
|
-
5. Define verification checkpoints between phases
|
|
147
|
-
|
|
148
|
-
The plan should be reviewable: the human should be able to read it and say "yes, that's the right approach" or "no, change X."
|
|
149
|
-
|
|
150
|
-
### Phase 3: Tasks
|
|
151
|
-
|
|
152
|
-
Break the plan into discrete, implementable tasks:
|
|
153
|
-
|
|
154
|
-
- Each task should be completable in a single focused session
|
|
155
|
-
- Each task has explicit acceptance criteria
|
|
156
|
-
- Each task includes a verification step (test, build, manual check)
|
|
157
|
-
- Tasks are ordered by dependency, not by perceived importance
|
|
158
|
-
- No task should require changing more than ~5 files
|
|
159
|
-
|
|
160
|
-
**Task template:**
|
|
161
|
-
```markdown
|
|
162
|
-
- [ ] Task: [Description]
|
|
163
|
-
- Acceptance: [What must be true when done]
|
|
164
|
-
- Verify: [How to confirm — test command, build, manual check]
|
|
165
|
-
- Files: [Which files will be touched]
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
### Phase 4: Implement
|
|
169
|
-
|
|
170
|
-
Execute tasks one at a time following `incremental-implementation` and `test-driven-development` skills. Use `context-engineering` to load the right spec sections and source files at each step rather than flooding the agent with the entire spec.
|
|
171
|
-
|
|
172
|
-
## Keeping the Spec Alive
|
|
173
|
-
|
|
174
|
-
The spec is a living document, not a one-time artifact:
|
|
175
|
-
|
|
176
|
-
- **Update when decisions change** — If you discover the data model needs to change, update the spec first, then implement.
|
|
177
|
-
- **Update when scope changes** — Features added or cut should be reflected in the spec.
|
|
178
|
-
- **Commit the spec** — The spec belongs in version control alongside the code.
|
|
179
|
-
- **Reference the spec in PRs** — Link back to the spec section that each PR implements.
|
|
180
|
-
|
|
181
|
-
## Common Rationalizations
|
|
182
|
-
|
|
183
|
-
| Rationalization | Reality |
|
|
184
|
-
|---|---|
|
|
185
|
-
| "This is simple, I don't need a spec" | Simple tasks don't need *long* specs, but they still need acceptance criteria. A two-line spec is fine. |
|
|
186
|
-
| "I'll write the spec after I code it" | That's documentation, not specification. The spec's value is in forcing clarity *before* code. |
|
|
187
|
-
| "The spec will slow us down" | A 15-minute spec prevents hours of rework. Waterfall in 15 minutes beats debugging in 15 hours. |
|
|
188
|
-
| "Requirements will change anyway" | That's why the spec is a living document. An outdated spec is still better than no spec. |
|
|
189
|
-
| "The user knows what they want" | Even clear requests have implicit assumptions. The spec surfaces those assumptions. |
|
|
190
|
-
|
|
191
|
-
## Red Flags
|
|
192
|
-
|
|
193
|
-
- Starting to write code without any written requirements
|
|
194
|
-
- Asking "should I just start building?" before clarifying what "done" means
|
|
195
|
-
- Implementing features not mentioned in any spec or task list
|
|
196
|
-
- Making architectural decisions without documenting them
|
|
197
|
-
- Skipping the spec because "it's obvious what to build"
|
|
198
|
-
|
|
199
|
-
## Verification
|
|
200
|
-
|
|
201
|
-
Before proceeding to implementation, confirm:
|
|
202
|
-
|
|
203
|
-
- [ ] The spec covers all six core areas
|
|
204
|
-
- [ ] The human has reviewed and approved the spec
|
|
205
|
-
- [ ] Success criteria are specific and testable
|
|
206
|
-
- [ ] Boundaries (Always/Ask First/Never) are defined
|
|
207
|
-
- [ ] The spec is saved to a file in the repository
|
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: tailwind-patterns
|
|
3
|
-
description: "[Devflow] Tailwind CSS v4 principles. CSS-first configuration, container queries, modern patterns, design token architecture."
|
|
4
|
-
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Tailwind CSS Patterns (v4 - 2025)
|
|
8
|
-
|
|
9
|
-
> Modern utility-first CSS with CSS-native configuration.
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## 1. Tailwind v4 Architecture
|
|
14
|
-
|
|
15
|
-
### What Changed from v3
|
|
16
|
-
|
|
17
|
-
| v3 (Legacy) | v4 (Current) |
|
|
18
|
-
|-------------|--------------|
|
|
19
|
-
| `tailwind.config.js` | CSS-based `@theme` directive |
|
|
20
|
-
| PostCSS plugin | Oxide engine (10x faster) |
|
|
21
|
-
| JIT mode | Native, always-on |
|
|
22
|
-
| Plugin system | CSS-native features |
|
|
23
|
-
| `@apply` directive | Still works, discouraged |
|
|
24
|
-
|
|
25
|
-
### v4 Core Concepts
|
|
26
|
-
|
|
27
|
-
| Concept | Description |
|
|
28
|
-
|---------|-------------|
|
|
29
|
-
| **CSS-first** | Configuration in CSS, not JavaScript |
|
|
30
|
-
| **Oxide Engine** | Rust-based compiler, much faster |
|
|
31
|
-
| **Native Nesting** | CSS nesting without PostCSS |
|
|
32
|
-
| **CSS Variables** | All tokens exposed as `--*` vars |
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## 2. CSS-Based Configuration
|
|
37
|
-
|
|
38
|
-
### Theme Definition
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
@theme {
|
|
42
|
-
/* Colors - use semantic names */
|
|
43
|
-
--color-primary: oklch(0.7 0.15 250);
|
|
44
|
-
--color-surface: oklch(0.98 0 0);
|
|
45
|
-
--color-surface-dark: oklch(0.15 0 0);
|
|
46
|
-
|
|
47
|
-
/* Spacing scale */
|
|
48
|
-
--spacing-xs: 0.25rem;
|
|
49
|
-
--spacing-sm: 0.5rem;
|
|
50
|
-
--spacing-md: 1rem;
|
|
51
|
-
--spacing-lg: 2rem;
|
|
52
|
-
|
|
53
|
-
/* Typography */
|
|
54
|
-
--font-sans: 'Inter', system-ui, sans-serif;
|
|
55
|
-
--font-mono: 'JetBrains Mono', monospace;
|
|
56
|
-
}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### When to Extend vs Override
|
|
60
|
-
|
|
61
|
-
| Action | Use When |
|
|
62
|
-
|--------|----------|
|
|
63
|
-
| **Extend** | Adding new values alongside defaults |
|
|
64
|
-
| **Override** | Replacing default scale entirely |
|
|
65
|
-
| **Semantic tokens** | Project-specific naming (primary, surface) |
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## 3. Container Queries (v4 Native)
|
|
70
|
-
|
|
71
|
-
### Breakpoint vs Container
|
|
72
|
-
|
|
73
|
-
| Type | Responds To |
|
|
74
|
-
|------|-------------|
|
|
75
|
-
| **Breakpoint** (`md:`) | Viewport width |
|
|
76
|
-
| **Container** (`@container`) | Parent element width |
|
|
77
|
-
|
|
78
|
-
### Container Query Usage
|
|
79
|
-
|
|
80
|
-
| Pattern | Classes |
|
|
81
|
-
|---------|---------|
|
|
82
|
-
| Define container | `@container` on parent |
|
|
83
|
-
| Container breakpoint | `@sm:`, `@md:`, `@lg:` on children |
|
|
84
|
-
| Named containers | `@container/card` for specificity |
|
|
85
|
-
|
|
86
|
-
### When to Use
|
|
87
|
-
|
|
88
|
-
| Scenario | Use |
|
|
89
|
-
|----------|-----|
|
|
90
|
-
| Page-level layouts | Viewport breakpoints |
|
|
91
|
-
| Component-level responsive | Container queries |
|
|
92
|
-
| Reusable components | Container queries (context-independent) |
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## 4. Responsive Design
|
|
97
|
-
|
|
98
|
-
### Breakpoint System
|
|
99
|
-
|
|
100
|
-
| Prefix | Min Width | Target |
|
|
101
|
-
|--------|-----------|--------|
|
|
102
|
-
| (none) | 0px | Mobile-first base |
|
|
103
|
-
| `sm:` | 640px | Large phone / small tablet |
|
|
104
|
-
| `md:` | 768px | Tablet |
|
|
105
|
-
| `lg:` | 1024px | Laptop |
|
|
106
|
-
| `xl:` | 1280px | Desktop |
|
|
107
|
-
| `2xl:` | 1536px | Large desktop |
|
|
108
|
-
|
|
109
|
-
### Mobile-First Principle
|
|
110
|
-
|
|
111
|
-
1. Write mobile styles first (no prefix)
|
|
112
|
-
2. Add larger screen overrides with prefixes
|
|
113
|
-
3. Example: `w-full md:w-1/2 lg:w-1/3`
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
## 5. Dark Mode
|
|
118
|
-
|
|
119
|
-
### Configuration Strategies
|
|
120
|
-
|
|
121
|
-
| Method | Behavior | Use When |
|
|
122
|
-
|--------|----------|----------|
|
|
123
|
-
| `class` | `.dark` class toggles | Manual theme switcher |
|
|
124
|
-
| `media` | Follows system preference | No user control |
|
|
125
|
-
| `selector` | Custom selector (v4) | Complex theming |
|
|
126
|
-
|
|
127
|
-
### Dark Mode Pattern
|
|
128
|
-
|
|
129
|
-
| Element | Light | Dark |
|
|
130
|
-
|---------|-------|------|
|
|
131
|
-
| Background | `bg-white` | `dark:bg-zinc-900` |
|
|
132
|
-
| Text | `text-zinc-900` | `dark:text-zinc-100` |
|
|
133
|
-
| Borders | `border-zinc-200` | `dark:border-zinc-700` |
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
## 6. Modern Layout Patterns
|
|
138
|
-
|
|
139
|
-
### Flexbox Patterns
|
|
140
|
-
|
|
141
|
-
| Pattern | Classes |
|
|
142
|
-
|---------|---------|
|
|
143
|
-
| Center (both axes) | `flex items-center justify-center` |
|
|
144
|
-
| Vertical stack | `flex flex-col gap-4` |
|
|
145
|
-
| Horizontal row | `flex gap-4` |
|
|
146
|
-
| Space between | `flex justify-between items-center` |
|
|
147
|
-
| Wrap grid | `flex flex-wrap gap-4` |
|
|
148
|
-
|
|
149
|
-
### Grid Patterns
|
|
150
|
-
|
|
151
|
-
| Pattern | Classes |
|
|
152
|
-
|---------|---------|
|
|
153
|
-
| Auto-fit responsive | `grid grid-cols-[repeat(auto-fit,minmax(250px,1fr))]` |
|
|
154
|
-
| Asymmetric (Bento) | `grid grid-cols-3 grid-rows-2` with spans |
|
|
155
|
-
| Sidebar layout | `grid grid-cols-[auto_1fr]` |
|
|
156
|
-
|
|
157
|
-
> **Note:** Prefer asymmetric/Bento layouts over symmetric 3-column grids.
|
|
158
|
-
|
|
159
|
-
---
|
|
160
|
-
|
|
161
|
-
## 7. Modern Color System
|
|
162
|
-
|
|
163
|
-
### OKLCH vs RGB/HSL
|
|
164
|
-
|
|
165
|
-
| Format | Advantage |
|
|
166
|
-
|--------|-----------|
|
|
167
|
-
| **OKLCH** | Perceptually uniform, better for design |
|
|
168
|
-
| **HSL** | Intuitive hue/saturation |
|
|
169
|
-
| **RGB** | Legacy compatibility |
|
|
170
|
-
|
|
171
|
-
### Color Token Architecture
|
|
172
|
-
|
|
173
|
-
| Layer | Example | Purpose |
|
|
174
|
-
|-------|---------|---------|
|
|
175
|
-
| **Primitive** | `--blue-500` | Raw color values |
|
|
176
|
-
| **Semantic** | `--color-primary` | Purpose-based naming |
|
|
177
|
-
| **Component** | `--button-bg` | Component-specific |
|
|
178
|
-
|
|
179
|
-
---
|
|
180
|
-
|
|
181
|
-
## 8. Typography System
|
|
182
|
-
|
|
183
|
-
### Font Stack Pattern
|
|
184
|
-
|
|
185
|
-
| Type | Recommended |
|
|
186
|
-
|------|-------------|
|
|
187
|
-
| Sans | `'Inter', 'SF Pro', system-ui, sans-serif` |
|
|
188
|
-
| Mono | `'JetBrains Mono', 'Fira Code', monospace` |
|
|
189
|
-
| Display | `'Outfit', 'Poppins', sans-serif` |
|
|
190
|
-
|
|
191
|
-
### Type Scale
|
|
192
|
-
|
|
193
|
-
| Class | Size | Use |
|
|
194
|
-
|-------|------|-----|
|
|
195
|
-
| `text-xs` | 0.75rem | Labels, captions |
|
|
196
|
-
| `text-sm` | 0.875rem | Secondary text |
|
|
197
|
-
| `text-base` | 1rem | Body text |
|
|
198
|
-
| `text-lg` | 1.125rem | Lead text |
|
|
199
|
-
| `text-xl`+ | 1.25rem+ | Headings |
|
|
200
|
-
|
|
201
|
-
---
|
|
202
|
-
|
|
203
|
-
## 9. Animation & Transitions
|
|
204
|
-
|
|
205
|
-
### Built-in Animations
|
|
206
|
-
|
|
207
|
-
| Class | Effect |
|
|
208
|
-
|-------|--------|
|
|
209
|
-
| `animate-spin` | Continuous rotation |
|
|
210
|
-
| `animate-ping` | Attention pulse |
|
|
211
|
-
| `animate-pulse` | Subtle opacity pulse |
|
|
212
|
-
| `animate-bounce` | Bouncing effect |
|
|
213
|
-
|
|
214
|
-
### Transition Patterns
|
|
215
|
-
|
|
216
|
-
| Pattern | Classes |
|
|
217
|
-
|---------|---------|
|
|
218
|
-
| All properties | `transition-all duration-200` |
|
|
219
|
-
| Specific | `transition-colors duration-150` |
|
|
220
|
-
| With easing | `ease-out` or `ease-in-out` |
|
|
221
|
-
| Hover effect | `hover:scale-105 transition-transform` |
|
|
222
|
-
|
|
223
|
-
---
|
|
224
|
-
|
|
225
|
-
## 10. Component Extraction
|
|
226
|
-
|
|
227
|
-
### When to Extract
|
|
228
|
-
|
|
229
|
-
| Signal | Action |
|
|
230
|
-
|--------|--------|
|
|
231
|
-
| Same class combo 3+ times | Extract component |
|
|
232
|
-
| Complex state variants | Extract component |
|
|
233
|
-
| Design system element | Extract + document |
|
|
234
|
-
|
|
235
|
-
### Extraction Methods
|
|
236
|
-
|
|
237
|
-
| Method | Use When |
|
|
238
|
-
|--------|----------|
|
|
239
|
-
| **React/Vue component** | Dynamic, JS needed |
|
|
240
|
-
| **@apply in CSS** | Static, no JS needed |
|
|
241
|
-
| **Design tokens** | Reusable values |
|
|
242
|
-
|
|
243
|
-
---
|
|
244
|
-
|
|
245
|
-
## 11. Anti-Patterns
|
|
246
|
-
|
|
247
|
-
| Don't | Do |
|
|
248
|
-
|-------|-----|
|
|
249
|
-
| Arbitrary values everywhere | Use design system scale |
|
|
250
|
-
| `!important` | Fix specificity properly |
|
|
251
|
-
| Inline `style=` | Use utilities |
|
|
252
|
-
| Duplicate long class lists | Extract component |
|
|
253
|
-
| Mix v3 config with v4 | Migrate fully to CSS-first |
|
|
254
|
-
| Use `@apply` heavily | Prefer components |
|
|
255
|
-
|
|
256
|
-
---
|
|
257
|
-
|
|
258
|
-
## 12. Performance Principles
|
|
259
|
-
|
|
260
|
-
| Principle | Implementation |
|
|
261
|
-
|-----------|----------------|
|
|
262
|
-
| **Purge unused** | Automatic in v4 |
|
|
263
|
-
| **Avoid dynamism** | No template string classes |
|
|
264
|
-
| **Use Oxide** | Default in v4, 10x faster |
|
|
265
|
-
| **Cache builds** | CI/CD caching |
|
|
266
|
-
|
|
267
|
-
---
|
|
268
|
-
|
|
269
|
-
> **Remember:** Tailwind v4 is CSS-first. Embrace CSS variables, container queries, and native features. The config file is now optional.
|