@daniel-da-silva-alves/sddk 2.0.0 → 2.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.
- package/CHANGELOG.md +23 -0
- package/README.md +21 -4
- package/bin/cli.js +4 -4
- package/package.json +7 -2
- package/sddk/plugin.json +1 -1
- package/sddk/skills/code-review/SKILL.md +142 -141
- package/sddk/skills/code-review/references/anti-ai-design-patterns.md +90 -90
- package/sddk/skills/code-review/references/refactoring-severity-guide.md +60 -60
- package/sddk/skills/code-review/references/security-checklist.md +59 -59
- package/sddk/skills/fullstack-development/SKILL.md +79 -78
- package/sddk/skills/fullstack-development/references/clean-code-rules.md +65 -65
- package/sddk/skills/fullstack-development/references/self-review-checklist.md +42 -42
- package/sddk/skills/implementation-planning/SKILL.md +65 -64
- package/sddk/skills/implementation-planning/references/manual-tests-template.md +53 -53
- package/sddk/skills/implementation-planning/references/microtask-template.md +47 -47
- package/sddk/skills/software-requirements-specification/SKILL.md +46 -45
- package/sddk/skills/software-requirements-specification/references/checklist-template.md +48 -48
- package/sddk/skills/software-requirements-specification/references/ieee-830-template.md +94 -94
- package/sddk/skills/software-requirements-specification/references/socratic-interview-guide.md +65 -65
- package/sddk/skills/system-design-document/SKILL.md +108 -107
- package/sddk/skills/system-design-document/references/architecture-patterns.md +59 -59
- package/sddk/skills/system-design-document/references/documentation-sources-guide.md +69 -69
- package/sddk/skills/system-design-document/references/sdd-template.md +117 -117
- package/sddk/skills/system-design-document/references/standards-api-template.md +47 -47
- package/sddk/skills/system-design-document/references/standards-architecture-template.md +42 -42
- package/sddk/skills/system-design-document/references/standards-coding-template.md +64 -64
- package/sddk/skills/system-design-document/references/standards-design-system-template.md +81 -81
- package/sddk/skills/system-design-document/references/standards-naming-template.md +59 -59
- package/sddk/skills/system-design-document/references/standards-onboarding-guide.md +80 -80
- package/sddk/skills/system-design-document/references/tech-stack-analysis.md +37 -37
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
# Template: Design System
|
|
1
|
+
# Template: Project Design System
|
|
2
2
|
|
|
3
|
-
Use
|
|
3
|
+
Use this template to generate `.specs/standards/design-system.md`. Fill in with the onboarding interview answers. If the project is backend-only, create the file with content "N/A — backend-only project".
|
|
4
4
|
|
|
5
5
|
```markdown
|
|
6
6
|
# Design System
|
|
7
7
|
|
|
8
|
-
**
|
|
9
|
-
|
|
8
|
+
**Project**: {project name}
|
|
9
|
+
**Last updated**: {date}
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
## 1.
|
|
13
|
+
## 1. Color Palette
|
|
14
14
|
|
|
15
|
-
###
|
|
16
|
-
| Token |
|
|
15
|
+
### Primary Colors
|
|
16
|
+
| Token | Value | Usage |
|
|
17
17
|
|:---|:---|:---|
|
|
18
|
-
| `--color-primary-50` | {
|
|
19
|
-
| `--color-primary-100` | {
|
|
20
|
-
| `--color-primary-500` | {
|
|
21
|
-
| `--color-primary-700` | {
|
|
22
|
-
| `--color-primary-900` | {
|
|
23
|
-
|
|
24
|
-
###
|
|
25
|
-
| Token |
|
|
18
|
+
| `--color-primary-50` | {e.g.: #e8f0fe} | Soft backgrounds |
|
|
19
|
+
| `--color-primary-100` | {e.g.: #d2e3fc} | Hover on backgrounds |
|
|
20
|
+
| `--color-primary-500` | {e.g.: #4285f4} | Primary actions, links |
|
|
21
|
+
| `--color-primary-700` | {e.g.: #1a73e8} | Hover on primary actions |
|
|
22
|
+
| `--color-primary-900` | {e.g.: #174ea6} | Highlighted text |
|
|
23
|
+
|
|
24
|
+
### Surface Colors
|
|
25
|
+
| Token | Value | Usage |
|
|
26
26
|
|:---|:---|:---|
|
|
27
|
-
| `--color-surface` | {
|
|
28
|
-
| `--color-surface-variant` | {
|
|
29
|
-
| `--color-on-surface` | {
|
|
30
|
-
| `--color-on-surface-secondary` | {
|
|
31
|
-
| `--color-outline` | {
|
|
32
|
-
|
|
33
|
-
###
|
|
34
|
-
| Token |
|
|
27
|
+
| `--color-surface` | {e.g.: #ffffff} | Card, modal backgrounds |
|
|
28
|
+
| `--color-surface-variant` | {e.g.: #f8f9fa} | Alternating section backgrounds |
|
|
29
|
+
| `--color-on-surface` | {e.g.: #1f1f1f} | Text on surfaces |
|
|
30
|
+
| `--color-on-surface-secondary` | {e.g.: #5f6368} | Secondary text |
|
|
31
|
+
| `--color-outline` | {e.g.: #dadce0} | Borders, dividers |
|
|
32
|
+
|
|
33
|
+
### Semantic Colors
|
|
34
|
+
| Token | Value | Usage |
|
|
35
35
|
|:---|:---|:---|
|
|
36
|
-
| `--color-error` | {
|
|
37
|
-
| `--color-success` | {
|
|
38
|
-
| `--color-warning` | {
|
|
39
|
-
| `--color-info` | {
|
|
36
|
+
| `--color-error` | {e.g.: #d32f2f} | Errors, validation |
|
|
37
|
+
| `--color-success` | {e.g.: #0f9d58} | Success, confirmation |
|
|
38
|
+
| `--color-warning` | {e.g.: #f9ab00} | Alerts, warnings |
|
|
39
|
+
| `--color-info` | {e.g.: #4285f4} | Information |
|
|
40
40
|
|
|
41
|
-
###
|
|
42
|
-
| Token
|
|
41
|
+
### Dark Mode (if applicable)
|
|
42
|
+
| Light Token | Dark Token | Dark Value |
|
|
43
43
|
|:---|:---|:---|
|
|
44
|
-
| `--color-surface` | `--color-surface-dark` | {
|
|
44
|
+
| `--color-surface` | `--color-surface-dark` | {e.g.: #1e1e1e} |
|
|
45
45
|
|
|
46
46
|
---
|
|
47
47
|
|
|
48
|
-
## 2.
|
|
48
|
+
## 2. Typography
|
|
49
49
|
|
|
50
|
-
###
|
|
51
|
-
| Token |
|
|
50
|
+
### Fonts
|
|
51
|
+
| Token | Value | Usage |
|
|
52
52
|
|:---|:---|:---|
|
|
53
|
-
| `--font-family` | {
|
|
54
|
-
| `--font-family-heading` | {
|
|
55
|
-
| `--font-family-mono` | {
|
|
53
|
+
| `--font-family` | {e.g.: 'Inter', sans-serif} | General text |
|
|
54
|
+
| `--font-family-heading` | {e.g.: 'Outfit', sans-serif} | Headings |
|
|
55
|
+
| `--font-family-mono` | {e.g.: 'JetBrains Mono', monospace} | Code |
|
|
56
56
|
|
|
57
|
-
###
|
|
58
|
-
| Token |
|
|
57
|
+
### Sizes
|
|
58
|
+
| Token | Value | Line Height | Usage |
|
|
59
59
|
|:---|:---|:---|:---|
|
|
60
|
-
| `--text-xs` | {
|
|
61
|
-
| `--text-sm` | {
|
|
62
|
-
| `--text-base` | {
|
|
63
|
-
| `--text-lg` | {
|
|
64
|
-
| `--text-xl` | {
|
|
65
|
-
| `--text-2xl` | {
|
|
66
|
-
| `--text-3xl` | {
|
|
67
|
-
| `--text-4xl` | {
|
|
68
|
-
|
|
69
|
-
###
|
|
70
|
-
| Token |
|
|
60
|
+
| `--text-xs` | {e.g.: 0.75rem} | {e.g.: 1rem} | Labels, captions |
|
|
61
|
+
| `--text-sm` | {e.g.: 0.875rem} | {e.g.: 1.25rem} | Body small |
|
|
62
|
+
| `--text-base` | {e.g.: 1rem} | {e.g.: 1.5rem} | Body default |
|
|
63
|
+
| `--text-lg` | {e.g.: 1.125rem} | {e.g.: 1.75rem} | Body large |
|
|
64
|
+
| `--text-xl` | {e.g.: 1.25rem} | {e.g.: 1.75rem} | Heading 4 |
|
|
65
|
+
| `--text-2xl` | {e.g.: 1.5rem} | {e.g.: 2rem} | Heading 3 |
|
|
66
|
+
| `--text-3xl` | {e.g.: 1.875rem} | {e.g.: 2.25rem} | Heading 2 |
|
|
67
|
+
| `--text-4xl` | {e.g.: 2.25rem} | {e.g.: 2.5rem} | Heading 1 |
|
|
68
|
+
|
|
69
|
+
### Weights
|
|
70
|
+
| Token | Value | Usage |
|
|
71
71
|
|:---|:---|:---|
|
|
72
|
-
| `--font-regular` | {
|
|
73
|
-
| `--font-medium` | {
|
|
74
|
-
| `--font-semibold` | {
|
|
75
|
-
| `--font-bold` | {
|
|
72
|
+
| `--font-regular` | {e.g.: 400} | Normal text |
|
|
73
|
+
| `--font-medium` | {e.g.: 500} | Soft emphasis |
|
|
74
|
+
| `--font-semibold` | {e.g.: 600} | Headings, labels |
|
|
75
|
+
| `--font-bold` | {e.g.: 700} | Strong emphasis |
|
|
76
76
|
|
|
77
77
|
---
|
|
78
78
|
|
|
79
|
-
## 3.
|
|
79
|
+
## 3. Spacing
|
|
80
80
|
|
|
81
|
-
| Token |
|
|
81
|
+
| Token | Value | Usage |
|
|
82
82
|
|:---|:---|:---|
|
|
83
|
-
| `--spacing-xs` | {
|
|
84
|
-
| `--spacing-sm` | {
|
|
85
|
-
| `--spacing-md` | {
|
|
86
|
-
| `--spacing-lg` | {
|
|
87
|
-
| `--spacing-xl` | {
|
|
88
|
-
| `--spacing-2xl` | {
|
|
83
|
+
| `--spacing-xs` | {e.g.: 0.25rem (4px)} | Minimum spacing |
|
|
84
|
+
| `--spacing-sm` | {e.g.: 0.5rem (8px)} | Inside components |
|
|
85
|
+
| `--spacing-md` | {e.g.: 1rem (16px)} | Between elements |
|
|
86
|
+
| `--spacing-lg` | {e.g.: 1.5rem (24px)} | Between sections |
|
|
87
|
+
| `--spacing-xl` | {e.g.: 2rem (32px)} | Between blocks |
|
|
88
|
+
| `--spacing-2xl` | {e.g.: 3rem (48px)} | Between larger sections |
|
|
89
89
|
|
|
90
90
|
---
|
|
91
91
|
|
|
92
|
-
## 4.
|
|
92
|
+
## 4. Borders and Shadows
|
|
93
93
|
|
|
94
94
|
### Border Radius
|
|
95
|
-
| Token |
|
|
95
|
+
| Token | Value | Usage |
|
|
96
96
|
|:---|:---|:---|
|
|
97
|
-
| `--radius-sm` | {
|
|
98
|
-
| `--radius-md` | {
|
|
99
|
-
| `--radius-lg` | {
|
|
100
|
-
| `--radius-full` | {
|
|
97
|
+
| `--radius-sm` | {e.g.: 4px} | Buttons, inputs |
|
|
98
|
+
| `--radius-md` | {e.g.: 8px} | Cards |
|
|
99
|
+
| `--radius-lg` | {e.g.: 12px} | Modals, containers |
|
|
100
|
+
| `--radius-full` | {e.g.: 9999px} | Avatars, badges |
|
|
101
101
|
|
|
102
102
|
### Shadows
|
|
103
|
-
| Token |
|
|
103
|
+
| Token | Value | Usage |
|
|
104
104
|
|:---|:---|:---|
|
|
105
|
-
| `--shadow-sm` | {
|
|
106
|
-
| `--shadow-md` | {
|
|
107
|
-
| `--shadow-lg` | {
|
|
105
|
+
| `--shadow-sm` | {e.g.: 0 1px 2px rgba(0,0,0,0.05)} | Subtle cards |
|
|
106
|
+
| `--shadow-md` | {e.g.: 0 4px 6px rgba(0,0,0,0.07)} | Elevated cards |
|
|
107
|
+
| `--shadow-lg` | {e.g.: 0 10px 15px rgba(0,0,0,0.1)} | Modals, dropdowns |
|
|
108
108
|
|
|
109
109
|
---
|
|
110
110
|
|
|
111
|
-
## 5.
|
|
111
|
+
## 5. Base Components
|
|
112
112
|
|
|
113
|
-
|
|
|
113
|
+
| Component | Background | Padding | Radius | Shadow |
|
|
114
114
|
|:---|:---|:---|:---|:---|
|
|
115
115
|
| Card | `--color-surface` | `--spacing-lg` | `--radius-md` | `--shadow-sm` |
|
|
116
116
|
| Button Primary | `--color-primary-500` | `--spacing-sm` `--spacing-md` | `--radius-sm` | none |
|
|
@@ -121,17 +121,17 @@ Use este template para gerar `.specs/standards/design-system.md`. Preencha com a
|
|
|
121
121
|
|
|
122
122
|
---
|
|
123
123
|
|
|
124
|
-
## 6. Breakpoints (
|
|
124
|
+
## 6. Breakpoints (Responsiveness)
|
|
125
125
|
|
|
126
|
-
| Token |
|
|
126
|
+
| Token | Value | Device |
|
|
127
127
|
|:---|:---|:---|
|
|
128
|
-
| `--breakpoint-sm` | {
|
|
129
|
-
| `--breakpoint-md` | {
|
|
130
|
-
| `--breakpoint-lg` | {
|
|
131
|
-
| `--breakpoint-xl` | {
|
|
128
|
+
| `--breakpoint-sm` | {e.g.: 640px} | Mobile landscape |
|
|
129
|
+
| `--breakpoint-md` | {e.g.: 768px} | Tablet |
|
|
130
|
+
| `--breakpoint-lg` | {e.g.: 1024px} | Desktop |
|
|
131
|
+
| `--breakpoint-xl` | {e.g.: 1280px} | Wide desktop |
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
##
|
|
134
|
+
## Rule for the Agent
|
|
135
135
|
|
|
136
136
|
> [!IMPORTANT]
|
|
137
|
-
>
|
|
137
|
+
> When the design system is defined, the agent must NEVER use hardcoded values for colors, spacing, typography, or border-radius. ALWAYS use the tokens defined in this document.
|
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
# Template:
|
|
1
|
+
# Template: Project Naming Conventions
|
|
2
2
|
|
|
3
|
-
Use
|
|
3
|
+
Use this template to generate `.specs/standards/naming-conventions.md`. Fill in with the onboarding interview answers.
|
|
4
4
|
|
|
5
5
|
```markdown
|
|
6
|
-
#
|
|
6
|
+
# Naming Conventions
|
|
7
7
|
|
|
8
|
-
**
|
|
9
|
-
|
|
8
|
+
**Project**: {project name}
|
|
9
|
+
**Last updated**: {date}
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
## 1.
|
|
13
|
+
## 1. Database
|
|
14
14
|
|
|
15
|
-
|
|
|
15
|
+
| Element | Convention | Example | Anti-example |
|
|
16
16
|
|:---|:---|:---|:---|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
| Primary Keys | {
|
|
20
|
-
| Foreign Keys | {
|
|
21
|
-
|
|
|
22
|
-
| Enums (
|
|
23
|
-
| Timestamps | {
|
|
24
|
-
| Soft delete | {
|
|
25
|
-
|
|
|
26
|
-
|
|
27
|
-
###
|
|
28
|
-
|
|
|
17
|
+
| Tables | {e.g.: snake_case, plural} | {e.g.: `auth_users`} | {e.g.: `User`, `authUser`} |
|
|
18
|
+
| Columns | {e.g.: snake_case, singular} | {e.g.: `first_name`} | {e.g.: `firstName`, `FirstName`} |
|
|
19
|
+
| Primary Keys | {e.g.: `id` (UUID v4)} | {e.g.: `id`} | {e.g.: `user_id`, `ID`} |
|
|
20
|
+
| Foreign Keys | {e.g.: `{singular_table}_id`} | {e.g.: `user_id`} | {e.g.: `fk_user`, `userId`} |
|
|
21
|
+
| Indexes | {e.g.: `idx_{table}_{columns}`} | {e.g.: `idx_users_email`} | {e.g.: `index1`} |
|
|
22
|
+
| Enums (values) | {e.g.: UPPER_SNAKE_CASE} | {e.g.: `PENDING_PAYMENT`} | {e.g.: `pendingPayment`} |
|
|
23
|
+
| Timestamps | {e.g.: `created_at`, `updated_at`} | — | {e.g.: `createdAt`, `date_created`} |
|
|
24
|
+
| Soft delete | {e.g.: `deleted_at` nullable} | — | {e.g.: `is_deleted`} |
|
|
25
|
+
| Booleans | {e.g.: `is_` prefix} | {e.g.: `is_active`} | {e.g.: `active`, `status`} |
|
|
26
|
+
|
|
27
|
+
### Module Prefixes (if applicable)
|
|
28
|
+
| Module | Prefix | Example |
|
|
29
29
|
|:---|:---|:---|
|
|
30
|
-
| {
|
|
31
|
-
| {
|
|
30
|
+
| {e.g.: Authentication} | {e.g.: `auth_`} | {e.g.: `auth_users`, `auth_sessions`} |
|
|
31
|
+
| {e.g.: Payments} | {e.g.: `pay_`} | {e.g.: `pay_transactions`} |
|
|
32
32
|
|
|
33
33
|
---
|
|
34
34
|
|
|
35
|
-
## 2.
|
|
35
|
+
## 2. Code ({language})
|
|
36
36
|
|
|
37
|
-
###
|
|
37
|
+
### Variables
|
|
38
38
|
|
|
39
|
-
|
|
|
39
|
+
| Type | Convention | Example | Anti-example |
|
|
40
40
|
|:---|:---|:---|:---|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
| Arrays/
|
|
41
|
+
| Local variables | {e.g.: camelCase} | {e.g.: `userName`} | {e.g.: `user_name`, `UserName`} |
|
|
42
|
+
| Constants | {e.g.: UPPER_SNAKE_CASE} | {e.g.: `MAX_RETRIES`} | {e.g.: `maxRetries`} |
|
|
43
|
+
| Booleans | {e.g.: is/has/can/should prefix} | {e.g.: `isAuthenticated`} | {e.g.: `authenticated`, `auth`} |
|
|
44
|
+
| Arrays/Collections | {e.g.: plural} | {e.g.: `activeUsers`} | {e.g.: `userList`, `data`} |
|
|
45
45
|
|
|
46
|
-
###
|
|
46
|
+
### Functions
|
|
47
47
|
|
|
48
|
-
|
|
|
48
|
+
| Type | Convention | Example | Anti-example |
|
|
49
49
|
|:---|:---|:---|:---|
|
|
50
|
-
|
|
|
51
|
-
| Handlers | {
|
|
52
|
-
| Getters | {
|
|
53
|
-
|
|
|
54
|
-
|
|
|
50
|
+
| General functions | {e.g.: verb + noun, camelCase} | {e.g.: `calculateTotal`} | {e.g.: `calc`, `doStuff`} |
|
|
51
|
+
| Handlers | {e.g.: handle + specific event} | {e.g.: `handleLoginSubmit`} | {e.g.: `handleClick`} |
|
|
52
|
+
| Getters | {e.g.: get + what} | {e.g.: `getUserOrders`} | {e.g.: `getData`} |
|
|
53
|
+
| Validators | {e.g.: is/validate + what} | {e.g.: `isValidEmail`} | {e.g.: `check`} |
|
|
54
|
+
| Transformers | {e.g.: format + To + format} | {e.g.: `dtoToEntity`} | {e.g.: `convert`} |
|
|
55
55
|
|
|
56
|
-
### Classes
|
|
56
|
+
### Classes and Types
|
|
57
57
|
|
|
58
|
-
|
|
|
58
|
+
| Type | Convention | Example | Anti-example |
|
|
59
59
|
|:---|:---|:---|:---|
|
|
60
|
-
| Classes | {
|
|
61
|
-
| Interfaces | {
|
|
62
|
-
| Types | {
|
|
63
|
-
| Enums | {
|
|
60
|
+
| Classes | {e.g.: PascalCase, noun} | {e.g.: `UserService`} | {e.g.: `userService`} |
|
|
61
|
+
| Interfaces | {e.g.: PascalCase, no I prefix} | {e.g.: `UserProfile`} | {e.g.: `IUserProfile`} |
|
|
62
|
+
| Types | {e.g.: PascalCase} | {e.g.: `OrderStatus`} | {e.g.: `TOrderStatus`} |
|
|
63
|
+
| Enums | {e.g.: PascalCase singular} | {e.g.: `PaymentMethod`} | {e.g.: `PaymentMethods`} |
|
|
64
64
|
|
|
65
|
-
###
|
|
65
|
+
### Components (Frontend)
|
|
66
66
|
|
|
67
|
-
|
|
|
67
|
+
| Type | Convention | Example | Anti-example |
|
|
68
68
|
|:---|:---|:---|:---|
|
|
69
|
-
|
|
|
70
|
-
| Hooks | {
|
|
71
|
-
| Context | {
|
|
69
|
+
| Components | {e.g.: PascalCase, specific} | {e.g.: `ProductCard`} | {e.g.: `Card`} |
|
|
70
|
+
| Hooks | {e.g.: use + context} | {e.g.: `useOrderData`} | {e.g.: `useData`} |
|
|
71
|
+
| Context | {e.g.: PascalCase + Context} | {e.g.: `AuthContext`} | {e.g.: `ctx`} |
|
|
72
72
|
|
|
73
73
|
---
|
|
74
74
|
|
|
75
|
-
## 3.
|
|
75
|
+
## 3. Files and Directories
|
|
76
76
|
|
|
77
|
-
|
|
|
77
|
+
| Type | Convention | Example |
|
|
78
78
|
|:---|:---|:---|
|
|
79
|
-
|
|
|
80
|
-
| Hooks | {
|
|
81
|
-
| Utils | {
|
|
82
|
-
| Types | {
|
|
83
|
-
| Services | {
|
|
84
|
-
| Repositories | {
|
|
85
|
-
| Migrations | {
|
|
79
|
+
| Components | {e.g.: PascalCase.tsx} | {e.g.: `ProductCard.tsx`} |
|
|
80
|
+
| Hooks | {e.g.: camelCase.ts} | {e.g.: `useAuth.ts`} |
|
|
81
|
+
| Utils | {e.g.: camelCase.ts} | {e.g.: `formatCurrency.ts`} |
|
|
82
|
+
| Types | {e.g.: camelCase.ts} | {e.g.: `userTypes.ts`} |
|
|
83
|
+
| Services | {e.g.: camelCase.service.ts} | {e.g.: `auth.service.ts`} |
|
|
84
|
+
| Repositories | {e.g.: camelCase.repository.ts} | {e.g.: `user.repository.ts`} |
|
|
85
|
+
| Migrations | {e.g.: NNN_description.sql} | {e.g.: `001_create_users.sql`} |
|
|
86
86
|
|
|
87
87
|
---
|
|
88
88
|
|
|
89
89
|
## 4. Git
|
|
90
90
|
|
|
91
|
-
|
|
|
91
|
+
| Type | Convention | Example |
|
|
92
92
|
|:---|:---|:---|
|
|
93
|
-
| Branches | {
|
|
94
|
-
| Commits | {
|
|
95
|
-
| Tags | {
|
|
93
|
+
| Branches | {e.g.: type/short-description} | {e.g.: `feat/user-auth`, `fix/login-redirect`} |
|
|
94
|
+
| Commits | {e.g.: Conventional Commits} | {e.g.: `feat(auth): add login endpoint`} |
|
|
95
|
+
| Tags | {e.g.: semver} | {e.g.: `v1.2.3`} |
|
|
96
96
|
```
|
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Project Standards Onboarding Guide
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Purpose
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This guide instructs the agent to conduct an onboarding interview to define the project's standards. Standards are saved in `.specs/standards/` and function as **persistent static memory** — consulted by ALL features in the project.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## When to Execute
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Onboarding is triggered by **Skill SDD (Skill 2)** in the following scenarios:
|
|
10
10
|
|
|
11
|
-
|
|
|
11
|
+
| Scenario | Action |
|
|
12
12
|
|:---|:---|
|
|
13
|
-
| `.specs/standards/` **
|
|
14
|
-
| `.specs/standards/` **
|
|
15
|
-
| `.specs/standards/` **
|
|
13
|
+
| `.specs/standards/` **does not exist** | Conduct full onboarding |
|
|
14
|
+
| `.specs/standards/` **exists but incomplete** | Ask if they want to complete it |
|
|
15
|
+
| `.specs/standards/` **exists and complete** | Read and respect, propose additions if necessary |
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Standards Structure
|
|
18
18
|
|
|
19
19
|
```
|
|
20
20
|
.specs/
|
|
21
21
|
└── standards/
|
|
22
|
-
├── architecture.md ←
|
|
23
|
-
├── naming-conventions.md ←
|
|
24
|
-
├── design-system.md ← Tokens,
|
|
25
|
-
├── api-conventions.md ←
|
|
26
|
-
└── coding-standards.md ←
|
|
22
|
+
├── architecture.md ← Architectural patterns (DDD, CQRS, BFF, etc.)
|
|
23
|
+
├── naming-conventions.md ← Naming (functions, tables, variables)
|
|
24
|
+
├── design-system.md ← Tokens, palette, typography, components
|
|
25
|
+
├── api-conventions.md ← API patterns (REST, GraphQL, error format)
|
|
26
|
+
└── coding-standards.md ← Best practices and principles (SSOT, DRY, etc.)
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
##
|
|
29
|
+
## Onboarding Flow
|
|
30
30
|
|
|
31
|
-
###
|
|
31
|
+
### Step 1: Verification
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
33
|
+
Check if `.specs/standards/` exists in the project:
|
|
34
|
+
- If it DOES NOT exist → proceed to Step 2
|
|
35
|
+
- If it exists → read all files and proceed directly to the SDD technical interview
|
|
36
36
|
|
|
37
|
-
###
|
|
37
|
+
### Step 2: Announcement
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
> "
|
|
39
|
+
Announce to the user:
|
|
40
|
+
> "This project doesn't have standards defined in `.specs/standards/` yet. I'll conduct a quick interview to define the project standards. These standards will be used as a reference for ALL future features."
|
|
41
41
|
|
|
42
|
-
###
|
|
42
|
+
### Step 3: Interview by Category
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
For each category, conduct a mini-interview via `ask_question`:
|
|
45
45
|
|
|
46
|
-
#### 3.1
|
|
47
|
-
|
|
48
|
-
1. "
|
|
49
|
-
2. "
|
|
50
|
-
3. "
|
|
51
|
-
4. "
|
|
46
|
+
#### 3.1 Architecture
|
|
47
|
+
Questions to ask:
|
|
48
|
+
1. "What architectural pattern does the project follow?" (options: MVC, Clean Architecture, DDD, Hexagonal, Feature-Based, or describe)
|
|
49
|
+
2. "Does it use any advanced pattern?" (options: Event Sourcing, CQRS, BFF, Microservices, Monolith, or describe)
|
|
50
|
+
3. "What is the layer/module structure?"
|
|
51
|
+
4. "Are there dependency rules between layers?" (e.g.: Domain never imports Infrastructure)
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
Generate: `.specs/standards/architecture.md` using template `references/standards-architecture-template.md`
|
|
54
54
|
|
|
55
|
-
#### 3.2
|
|
56
|
-
|
|
57
|
-
1. "
|
|
58
|
-
2. "
|
|
59
|
-
3. "
|
|
60
|
-
4. "
|
|
61
|
-
5. "
|
|
62
|
-
6. "
|
|
55
|
+
#### 3.2 Naming
|
|
56
|
+
Questions to ask:
|
|
57
|
+
1. "Convention for database tables?" (snake_case plural, PascalCase singular, etc.)
|
|
58
|
+
2. "Convention for columns?" (snake_case, camelCase)
|
|
59
|
+
3. "Convention for foreign keys?" ({table}_id, fk_{table}, etc.)
|
|
60
|
+
4. "Convention for JS/TS variables/functions?" (camelCase, verb+noun for functions)
|
|
61
|
+
5. "Convention for React/Vue components?" (PascalCase, kebab-case)
|
|
62
|
+
6. "Convention for files?" (PascalCase for components, camelCase for utils, etc.)
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
Generate: `.specs/standards/naming-conventions.md` using template `references/standards-naming-template.md`
|
|
65
65
|
|
|
66
|
-
#### 3.3 Design System (
|
|
67
|
-
|
|
68
|
-
1. "
|
|
69
|
-
2. "
|
|
70
|
-
3. "
|
|
71
|
-
4. "
|
|
72
|
-
5. "Border radius
|
|
73
|
-
6. "
|
|
66
|
+
#### 3.3 Design System (if the project has frontend)
|
|
67
|
+
Questions to ask:
|
|
68
|
+
1. "Does the project have a defined design system?" (if yes, which tokens)
|
|
69
|
+
2. "Color palette?" (primary, secondary, surface, error, etc.)
|
|
70
|
+
3. "Typography?" (main font, headings, sizes)
|
|
71
|
+
4. "Spacing?" (spacing scale)
|
|
72
|
+
5. "Border radius and shadows?" (shape tokens)
|
|
73
|
+
6. "Base components?" (Card, Button, Input — which tokens they use)
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
Generate: `.specs/standards/design-system.md` using template `references/standards-design-system-template.md`
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
If there's no frontend, mark as "N/A — backend-only project".
|
|
78
78
|
|
|
79
|
-
#### 3.4
|
|
80
|
-
|
|
81
|
-
1. "
|
|
82
|
-
2. "
|
|
83
|
-
3. "
|
|
84
|
-
4. "
|
|
85
|
-
5. "
|
|
86
|
-
6. "
|
|
79
|
+
#### 3.4 API Conventions (if it has an API)
|
|
80
|
+
Questions to ask:
|
|
81
|
+
1. "API pattern?" (REST, GraphQL, tRPC, gRPC)
|
|
82
|
+
2. "Response format?" (envelope `{data, error, meta}`, flat, etc.)
|
|
83
|
+
3. "API versioning?" (/v1/, header, query param)
|
|
84
|
+
4. "Error pattern?" (HTTP status + standardized body)
|
|
85
|
+
5. "Pagination?" (cursor, offset, keyset)
|
|
86
|
+
6. "API authentication?" (Bearer token, cookie, API key)
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
Generate: `.specs/standards/api-conventions.md` using template `references/standards-api-template.md`
|
|
89
89
|
|
|
90
|
-
#### 3.5
|
|
91
|
-
|
|
92
|
-
1. "
|
|
93
|
-
2. "
|
|
94
|
-
3. "
|
|
95
|
-
4. "Logging?" (structured logging,
|
|
96
|
-
5. "
|
|
90
|
+
#### 3.5 Best Practices and Principles
|
|
91
|
+
Questions to ask:
|
|
92
|
+
1. "Which principles does the project adopt?" (SSOT, DRY, KISS, YAGNI, SOLID — select relevant ones)
|
|
93
|
+
2. "Are there abstraction rules?" (when to extract function, component, hook)
|
|
94
|
+
3. "Error handling?" (custom exceptions, error boundary, etc.)
|
|
95
|
+
4. "Logging?" (structured logging, levels, what to log)
|
|
96
|
+
5. "Testing?" (strategy, minimum coverage, test types)
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
Generate: `.specs/standards/coding-standards.md` using template `references/standards-coding-template.md`
|
|
99
99
|
|
|
100
|
-
###
|
|
100
|
+
### Step 4: Presentation
|
|
101
101
|
|
|
102
|
-
1.
|
|
103
|
-
2.
|
|
104
|
-
3.
|
|
102
|
+
1. Present a summary of all defined standards
|
|
103
|
+
2. Ask: "Are the standards correct? Would you like to adjust anything?"
|
|
104
|
+
3. Save all files to `.specs/standards/`
|
|
105
105
|
|
|
106
|
-
###
|
|
106
|
+
### Step 5: Continue to SDD
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
After onboarding, proceed normally with Phase 1 of the SDD (Context Analysis).
|
|
109
109
|
|
|
110
110
|
---
|
|
111
111
|
|
|
112
|
-
##
|
|
112
|
+
## Incremental Evolution
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
During SDDs of future features, the agent may propose additions to standards:
|
|
115
115
|
|
|
116
|
-
1.
|
|
117
|
-
2.
|
|
118
|
-
3.
|
|
119
|
-
4.
|
|
116
|
+
1. If a new technical decision is not covered by existing standards
|
|
117
|
+
2. Ask: "Should this decision become a project standard for future features?"
|
|
118
|
+
3. If yes, update the relevant standards file
|
|
119
|
+
4. If no, document only in the feature's SDD
|