ai-developer-skill-os 1.0.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 +31 -0
- package/LICENSE +21 -0
- package/README.md +142 -0
- package/_template/SKILL.md +154 -0
- package/_template/examples/example-en.md +49 -0
- package/_template/examples/example-vi.md +49 -0
- package/bin/install.js +56 -0
- package/docs/CHI_TIET_SKILLS.md +117 -0
- package/docs/HUONG_DAN_SU_DUNG.md +102 -0
- package/package.json +34 -0
- package/skills/backend/auth-security/SKILL.md +94 -0
- package/skills/backend/backend-architecture/SKILL.md +123 -0
- package/skills/backend/database-engineer/SKILL.md +102 -0
- package/skills/backend/deployment/SKILL.md +94 -0
- package/skills/engineering/agent-orchestrator/SKILL.md +177 -0
- package/skills/engineering/api-integration/SKILL.md +378 -0
- package/skills/engineering/bug-fix/SKILL.md +211 -0
- package/skills/engineering/context-manager/SKILL.md +174 -0
- package/skills/engineering/git-engineer/SKILL.md +302 -0
- package/skills/engineering/migration/SKILL.md +282 -0
- package/skills/engineering/project-audit/SKILL.md +278 -0
- package/skills/engineering/refactor/SKILL.md +220 -0
- package/skills/frontend/accessibility-audit/SKILL.md +119 -0
- package/skills/frontend/component-generator/SKILL.md +134 -0
- package/skills/frontend/design-system/SKILL.md +135 -0
- package/skills/frontend/form-builder/SKILL.md +138 -0
- package/skills/frontend/frontend-architecture/SKILL.md +153 -0
- package/skills/frontend/frontend-debug/SKILL.md +131 -0
- package/skills/frontend/frontend-performance/SKILL.md +127 -0
- package/skills/frontend/frontend-testing/SKILL.md +144 -0
- package/skills/frontend/state-management/SKILL.md +138 -0
- package/skills/frontend/table-crud-generator/SKILL.md +125 -0
- package/skills/frontend/ui-builder/SKILL.md +150 -0
- package/skills.json +667 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bug-fix
|
|
3
|
+
description: >-
|
|
4
|
+
Chẩn đoán và sửa lỗi an toàn. Tái hiện lỗi, tìm nguyên nhân gốc rễ và áp dụng bản sửa lỗi tối thiểu, có kiểm chứng.
|
|
5
|
+
version: 2.0.0
|
|
6
|
+
category: engineering
|
|
7
|
+
tags: [bug, fix, debug, root-cause, regression]
|
|
8
|
+
platforms: [antigravity, claude-code, kilo-code, cursor, windsurf]
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Bug Fix — Diagnose & Repair
|
|
12
|
+
|
|
13
|
+
> **Language rule:**
|
|
14
|
+
> Use **English** for: code, identifiers, error messages, file paths, technical labels.
|
|
15
|
+
> Use **the user's language** for: explanations, questions, and fix summaries.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Trigger
|
|
20
|
+
|
|
21
|
+
Activate this skill when:
|
|
22
|
+
- User reports a specific bug with a stack trace, error message, or behavior description
|
|
23
|
+
- A test is failing
|
|
24
|
+
- The app crashes or hangs
|
|
25
|
+
- A regression occurred after a code change
|
|
26
|
+
- User says "it's broken", "this doesn't work", "I'm getting an error"
|
|
27
|
+
|
|
28
|
+
**Not this skill** → Use `project-audit` if the problem is unknown and needs discovery first.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Scope
|
|
33
|
+
|
|
34
|
+
- ✅ Reproduce the reported bug
|
|
35
|
+
- ✅ Identify the root cause (not just the symptom)
|
|
36
|
+
- ✅ Apply a minimal, targeted fix
|
|
37
|
+
- ✅ Verify the fix with evidence (tests, logs, comparison)
|
|
38
|
+
- ✅ Prevent recurrence with guards or tests
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Non-goals
|
|
43
|
+
|
|
44
|
+
- ❌ Do NOT refactor code outside the buggy area
|
|
45
|
+
- ❌ Do NOT change public APIs unless the bug requires it
|
|
46
|
+
- ❌ Do NOT silence errors with empty `try/catch` or blind `?.` / `!`
|
|
47
|
+
- ❌ Do NOT change formatting or unrelated code
|
|
48
|
+
- ❌ Do NOT mark as done without verifying the fix
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Severity Levels
|
|
53
|
+
|
|
54
|
+
| Level | Meaning |
|
|
55
|
+
|-------|---------|
|
|
56
|
+
| P0 | Production down, data loss, security breach |
|
|
57
|
+
| P1 | Core feature broken, blocking users |
|
|
58
|
+
| P2 | Non-critical feature broken, workaround exists |
|
|
59
|
+
| P3 | Edge case, cosmetic, minor annoyance |
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Workflow
|
|
64
|
+
|
|
65
|
+
### Phase 1 — Triage & Understand
|
|
66
|
+
|
|
67
|
+
Before touching code, gather:
|
|
68
|
+
- What is the symptom? (error message, wrong behavior, crash)
|
|
69
|
+
- What is the expected behavior?
|
|
70
|
+
- How to reproduce? (steps, conditions, environment)
|
|
71
|
+
- What changed recently? (git log, deployment, dependency update)
|
|
72
|
+
- What is the severity and impact scope?
|
|
73
|
+
|
|
74
|
+
If critical information is missing → ask before proceeding.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
### Phase 2 — Reproduce the Issue
|
|
79
|
+
|
|
80
|
+
1. Write a failing test or script that triggers the bug
|
|
81
|
+
2. Confirm the bug is consistently reproducible
|
|
82
|
+
3. For intermittent bugs → identify timing, data, or environment conditions
|
|
83
|
+
4. Document the exact reproduction steps
|
|
84
|
+
|
|
85
|
+
> Rule: **Never skip reproduction.** A fix without a repro is a guess.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
### Phase 3 — Localize the Problem
|
|
90
|
+
|
|
91
|
+
1. Read the stack trace top-down, following frames inside project code
|
|
92
|
+
2. Use logs, breakpoints, or `git blame` / `git bisect` to narrow scope
|
|
93
|
+
3. Identify the exact file and line where the failure originates
|
|
94
|
+
4. Trace the data flow that leads to the failure
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
### Phase 4 — Root Cause Analysis
|
|
99
|
+
|
|
100
|
+
Answer: *Why does this happen? What condition triggers it?*
|
|
101
|
+
|
|
102
|
+
Common root cause categories:
|
|
103
|
+
- Logic error (wrong condition, wrong operator)
|
|
104
|
+
- Off-by-one or boundary case
|
|
105
|
+
- Null / undefined / missing data
|
|
106
|
+
- Async timing or race condition
|
|
107
|
+
- Type mismatch
|
|
108
|
+
- Stale state or stale closure
|
|
109
|
+
- Config or environment issue
|
|
110
|
+
- API contract change
|
|
111
|
+
- Dependency version change
|
|
112
|
+
|
|
113
|
+
Use 5 Whys: keep asking "why" until you reach the actual cause, not just the symptom.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
### Phase 5 — Apply the Fix
|
|
118
|
+
|
|
119
|
+
Rules:
|
|
120
|
+
- Fix the root cause, not the symptom
|
|
121
|
+
- Smallest possible change that fully resolves the issue
|
|
122
|
+
- Keep existing code style, naming, and conventions
|
|
123
|
+
- Handle related edge cases to prevent similar bugs
|
|
124
|
+
- Remove all debug code, console.logs, and temporary patches
|
|
125
|
+
- Do not change public APIs unless strictly required
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
### Phase 6 — Verify the Result
|
|
130
|
+
|
|
131
|
+
- [ ] The failing test from Phase 2 now passes
|
|
132
|
+
- [ ] Run the related test suite — no new failures
|
|
133
|
+
- [ ] Run lint and type-check — clean
|
|
134
|
+
- [ ] Manually reproduce the original steps — bug is gone
|
|
135
|
+
- [ ] No regressions in adjacent functionality
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
### Phase 7 — Report & Prevent
|
|
140
|
+
|
|
141
|
+
Summarize and propose prevention:
|
|
142
|
+
- What was the root cause?
|
|
143
|
+
- What was changed and why?
|
|
144
|
+
- Are there similar patterns elsewhere in the codebase?
|
|
145
|
+
- Should a test be added to prevent regression?
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Decision Tree
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
Is the bug reproducible?
|
|
153
|
+
├── No → Isolate timing, data, environment conditions first
|
|
154
|
+
└── Yes → Is the root cause known?
|
|
155
|
+
├── No → Run Phase 3-4 (localize + analyze)
|
|
156
|
+
└── Yes → Apply minimal fix → verify → report
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
Is the fix risky (touches shared code / public API)?
|
|
161
|
+
├── Yes → Confirm scope with user before applying
|
|
162
|
+
└── No → Apply fix
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Output Format
|
|
168
|
+
|
|
169
|
+
```
|
|
170
|
+
🐛 Bug Report
|
|
171
|
+
─────────────────────────────────────────────────
|
|
172
|
+
Symptom: [What broke + how to reproduce]
|
|
173
|
+
Root cause: [Exact file:line — why it happens]
|
|
174
|
+
Severity: [P0 / P1 / P2 / P3]
|
|
175
|
+
|
|
176
|
+
🔧 Fix Applied
|
|
177
|
+
─────────────────────────────────────────────────
|
|
178
|
+
Changed: [File(s) modified]
|
|
179
|
+
Change: [What was changed and why it's minimal]
|
|
180
|
+
|
|
181
|
+
✅ Verification
|
|
182
|
+
─────────────────────────────────────────────────
|
|
183
|
+
Tests: [Test name / command — PASSED]
|
|
184
|
+
Lint/Types: [Clean / warnings noted]
|
|
185
|
+
Manual: [Reproduced original steps — bug gone]
|
|
186
|
+
Regression: [No new failures]
|
|
187
|
+
|
|
188
|
+
🛡️ Prevention
|
|
189
|
+
─────────────────────────────────────────────────
|
|
190
|
+
Test added: [Yes / No — reason]
|
|
191
|
+
Similar areas to check: [file or pattern to review]
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Validation Checklist
|
|
197
|
+
|
|
198
|
+
- [ ] Bug was reproduced before fixing
|
|
199
|
+
- [ ] Root cause identified at exact file:line with explanation
|
|
200
|
+
- [ ] Fix is minimal — only changes what's needed
|
|
201
|
+
- [ ] Failing test now passes
|
|
202
|
+
- [ ] Related tests and lint/type-check clean
|
|
203
|
+
- [ ] No debug code left behind
|
|
204
|
+
- [ ] Side effects documented
|
|
205
|
+
- [ ] Prevention strategy noted
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Examples
|
|
210
|
+
|
|
211
|
+
See `examples/` folder.
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: context-manager
|
|
3
|
+
description: >-
|
|
4
|
+
Xác định các file cần thiết, tóm tắt kiến trúc và quản lý bộ nhớ ngữ cảnh để tránh tràn bộ nhớ.
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
category: engineering
|
|
7
|
+
tags: [context, architecture, memory, file-selection, summarization]
|
|
8
|
+
platforms: [antigravity, claude-code, kilo-code, cursor, windsurf]
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Context Manager
|
|
12
|
+
|
|
13
|
+
> **Language rule:**
|
|
14
|
+
> Use **English** for: file paths, architecture terms, module names, technical labels.
|
|
15
|
+
> Use **the user's language** for: explanations, summaries, and questions.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Trigger
|
|
20
|
+
|
|
21
|
+
Activate this skill when:
|
|
22
|
+
- Starting work on an unfamiliar or large codebase
|
|
23
|
+
- About to read many files and need to prioritize
|
|
24
|
+
- Context window is at risk of overflowing
|
|
25
|
+
- User asks "where is X", "what does Y do", "how is this project structured"
|
|
26
|
+
- Another skill (e.g. `project-audit`, `frontend-architecture`) needs project context first
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Scope
|
|
31
|
+
|
|
32
|
+
- ✅ Identify which files are relevant to the current task
|
|
33
|
+
- ✅ Summarize project architecture in structured format
|
|
34
|
+
- ✅ Map folder structure to responsibilities
|
|
35
|
+
- ✅ Track what has been read and what still needs reading
|
|
36
|
+
- ✅ Flag context window risks
|
|
37
|
+
- ✅ Maintain a working memory summary for multi-turn sessions
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Non-goals
|
|
42
|
+
|
|
43
|
+
- ❌ Do NOT modify any files
|
|
44
|
+
- ❌ Do NOT fix bugs
|
|
45
|
+
- ❌ Do NOT make architectural decisions
|
|
46
|
+
- ❌ Do NOT read every file blindly — be selective and efficient
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Workflow
|
|
51
|
+
|
|
52
|
+
### Phase 1 — Project Discovery
|
|
53
|
+
|
|
54
|
+
Read only top-level signals first:
|
|
55
|
+
1. `package.json` / `pyproject.toml` / `Cargo.toml` → detect framework, language, scripts
|
|
56
|
+
2. Root config files → `.env.example`, `tsconfig.json`, `vite.config.ts`, `next.config.js`
|
|
57
|
+
3. Folder structure (1-2 levels deep) → identify key directories
|
|
58
|
+
4. Entry points → `src/index.ts`, `app/`, `pages/`, `main.py`
|
|
59
|
+
|
|
60
|
+
Produce: **Project Profile** (framework, language, key directories, architecture style)
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### Phase 2 — Task-Scoped File Selection
|
|
65
|
+
|
|
66
|
+
Given the current task, identify the minimum relevant set of files:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
Task type → Files to read
|
|
70
|
+
─────────────────────────────────────────────────────
|
|
71
|
+
UI work → components/, pages/, styles/, design system files
|
|
72
|
+
API work → services/, hooks/, api/, types/
|
|
73
|
+
State work → store/, context/, hooks/
|
|
74
|
+
Bug fix → files mentioned in error, related modules
|
|
75
|
+
Architecture → folder structure, key abstractions
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Rules:
|
|
79
|
+
- Read **entry points** before diving into details
|
|
80
|
+
- Prefer **index files** as anchors
|
|
81
|
+
- Skip `node_modules`, `dist`, `build`, `.git`
|
|
82
|
+
- If uncertain which file → check imports, not the file itself
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
### Phase 3 — Architecture Summary
|
|
87
|
+
|
|
88
|
+
Produce a concise summary:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
Project: [Name / repo]
|
|
92
|
+
Framework: [React 18 / Next.js 14 / Vue 3 / etc.]
|
|
93
|
+
Language: [TypeScript / JavaScript / Python]
|
|
94
|
+
Structure: [Feature-based / Layer-based / Domain-based]
|
|
95
|
+
|
|
96
|
+
Key directories:
|
|
97
|
+
src/components/ → Shared UI components
|
|
98
|
+
src/features/ → Feature modules (collocated)
|
|
99
|
+
src/services/ → API and data services
|
|
100
|
+
src/hooks/ → Custom React hooks
|
|
101
|
+
src/types/ → TypeScript interfaces
|
|
102
|
+
|
|
103
|
+
State: [Zustand / Redux / React Query / Pinia]
|
|
104
|
+
HTTP client: [axios instance at src/lib/axios.ts]
|
|
105
|
+
Auth: [JWT stored in httpOnly cookie]
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
### Phase 4 — Working Memory Maintenance
|
|
111
|
+
|
|
112
|
+
During multi-turn sessions:
|
|
113
|
+
- Track which files have been read (avoid re-reading)
|
|
114
|
+
- Track decisions made (e.g. "we decided to use feature-based structure")
|
|
115
|
+
- Flag when context is approaching limits
|
|
116
|
+
- Offer to summarize and compress if needed
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Decision Tree
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
Is this a new project / first time seeing this codebase?
|
|
124
|
+
├── Yes → Run full Phase 1 + Phase 2 + Phase 3
|
|
125
|
+
└── No → Has something changed since last context load?
|
|
126
|
+
├── Yes → Re-run Phase 2 for affected area
|
|
127
|
+
└── No → Use cached architecture summary
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
Is context window at risk?
|
|
132
|
+
├── Yes → Summarize what's been read, drop low-relevance files
|
|
133
|
+
└── No → Continue loading relevant files
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Output Format
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
🗂️ Project Context Loaded
|
|
142
|
+
|
|
143
|
+
Framework: [framework]
|
|
144
|
+
Language: [language]
|
|
145
|
+
Structure: [style]
|
|
146
|
+
|
|
147
|
+
Relevant files for this task:
|
|
148
|
+
📄 [path/to/file.ts] — [why it's relevant]
|
|
149
|
+
📄 [path/to/file.ts] — [why it's relevant]
|
|
150
|
+
|
|
151
|
+
Architecture summary:
|
|
152
|
+
[2-4 lines describing how this codebase is organized]
|
|
153
|
+
|
|
154
|
+
⚠️ Context notes:
|
|
155
|
+
[Any risks, unknowns, or files that couldn't be read]
|
|
156
|
+
|
|
157
|
+
✅ Ready. Proceeding with: [next skill or action]
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Validation Checklist
|
|
163
|
+
|
|
164
|
+
- [ ] Framework and language correctly identified
|
|
165
|
+
- [ ] Only task-relevant files selected (no noise)
|
|
166
|
+
- [ ] Architecture summary is accurate and concise
|
|
167
|
+
- [ ] Context window usage is reasonable
|
|
168
|
+
- [ ] Working memory updated for this session
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Examples
|
|
173
|
+
|
|
174
|
+
See `examples/` folder.
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: git-engineer
|
|
3
|
+
description: >-
|
|
4
|
+
Viết commit message chuẩn Conventional Commits, mô tả Pull Request, Changelog và Release Notes chuyên nghiệp.
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
category: engineering
|
|
7
|
+
tags: [git, commit, pull-request, changelog, release, conventional-commits]
|
|
8
|
+
platforms: [antigravity, claude-code, kilo-code, cursor, windsurf]
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Git Engineer
|
|
12
|
+
|
|
13
|
+
> **Language rule:**
|
|
14
|
+
> Use **English** for: commit messages, PR titles, changelog entries, branch names, git commands.
|
|
15
|
+
> Use **the user's language** for: explanations, questions, and summaries.
|
|
16
|
+
|
|
17
|
+
> 📌 **Standard followed:** [Conventional Commits v1.0.0](https://www.conventionalcommits.org/)
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Trigger
|
|
22
|
+
|
|
23
|
+
Activate this skill when:
|
|
24
|
+
- User wants to write a commit message
|
|
25
|
+
- User has finished a feature and needs a PR description
|
|
26
|
+
- User needs to generate a changelog for a release
|
|
27
|
+
- User asks "what should I commit?", "write PR", "release notes"
|
|
28
|
+
- User wants to clean up their git history before merging
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Scope
|
|
33
|
+
|
|
34
|
+
- ✅ Write commit messages (Conventional Commits format)
|
|
35
|
+
- ✅ Suggest logical commit groupings from a set of changes
|
|
36
|
+
- ✅ Write pull request titles and descriptions
|
|
37
|
+
- ✅ Generate CHANGELOG entries from commit history
|
|
38
|
+
- ✅ Write release notes (human-readable)
|
|
39
|
+
- ✅ Suggest branch naming conventions
|
|
40
|
+
- ✅ Review and improve existing commit messages
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Non-goals
|
|
45
|
+
|
|
46
|
+
- ❌ Do NOT run git commands without explicit user approval
|
|
47
|
+
- ❌ Do NOT force-push or rebase without warning
|
|
48
|
+
- ❌ Do NOT create commits that bundle unrelated changes
|
|
49
|
+
- ❌ Do NOT write vague messages like "fix stuff" or "updates"
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Conventional Commits Format
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
<type>(<scope>): <description>
|
|
57
|
+
|
|
58
|
+
[optional body]
|
|
59
|
+
|
|
60
|
+
[optional footer(s)]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Types
|
|
64
|
+
|
|
65
|
+
| Type | When to use |
|
|
66
|
+
|------|-------------|
|
|
67
|
+
| `feat` | New feature |
|
|
68
|
+
| `fix` | Bug fix |
|
|
69
|
+
| `docs` | Documentation only changes |
|
|
70
|
+
| `style` | Formatting, missing semicolons — no logic change |
|
|
71
|
+
| `refactor` | Code restructure without behavior change |
|
|
72
|
+
| `perf` | Performance improvement |
|
|
73
|
+
| `test` | Adding or fixing tests |
|
|
74
|
+
| `build` | Build system or dependency changes |
|
|
75
|
+
| `ci` | CI/CD configuration changes |
|
|
76
|
+
| `chore` | Other changes that don't modify src or test files |
|
|
77
|
+
| `revert` | Reverts a previous commit |
|
|
78
|
+
|
|
79
|
+
### Breaking Changes
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
feat!: remove deprecated login endpoint
|
|
83
|
+
|
|
84
|
+
BREAKING CHANGE: The /auth/login endpoint has been removed.
|
|
85
|
+
Use /auth/v2/login instead.
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Workflow
|
|
91
|
+
|
|
92
|
+
### Phase 1 — Understand the Changes
|
|
93
|
+
|
|
94
|
+
Review what has changed:
|
|
95
|
+
1. Read the diff or file list provided by the user
|
|
96
|
+
2. Group changes by concern (feature, fix, refactor, docs, etc.)
|
|
97
|
+
3. Identify if changes should be split into multiple commits or kept as one
|
|
98
|
+
4. Note any breaking changes
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
### Phase 2 — Commit Message(s)
|
|
103
|
+
|
|
104
|
+
For each logical group of changes, write:
|
|
105
|
+
|
|
106
|
+
**Single commit:**
|
|
107
|
+
```
|
|
108
|
+
feat(auth): add refresh token rotation
|
|
109
|
+
|
|
110
|
+
Implements automatic refresh token rotation on each use.
|
|
111
|
+
Old tokens are invalidated immediately after use to prevent
|
|
112
|
+
replay attacks.
|
|
113
|
+
|
|
114
|
+
Closes #142
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Multiple commits (if changes should be split):**
|
|
118
|
+
```
|
|
119
|
+
refactor(api): extract axios instance to lib/axios.ts
|
|
120
|
+
|
|
121
|
+
No behavior change — prepares for interceptor configuration.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
feat(api): add request retry interceptor
|
|
126
|
+
|
|
127
|
+
Automatically retries failed requests up to 3 times with
|
|
128
|
+
exponential backoff. Skips retry for 4xx errors.
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Rules:**
|
|
132
|
+
- Subject line: ≤72 characters, imperative mood ("add" not "added")
|
|
133
|
+
- Body: explain *why*, not *what* (the diff shows what)
|
|
134
|
+
- Reference issues: `Closes #123`, `Fixes #456`, `Refs #789`
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
### Phase 3 — Pull Request Description
|
|
139
|
+
|
|
140
|
+
Structure:
|
|
141
|
+
```markdown
|
|
142
|
+
## Summary
|
|
143
|
+
[1-3 sentences describing what this PR does and why]
|
|
144
|
+
|
|
145
|
+
## Changes
|
|
146
|
+
- [Specific change 1]
|
|
147
|
+
- [Specific change 2]
|
|
148
|
+
- [Specific change 3]
|
|
149
|
+
|
|
150
|
+
## Testing
|
|
151
|
+
- [ ] Unit tests pass
|
|
152
|
+
- [ ] Manual testing: [describe what you tested]
|
|
153
|
+
- [ ] [Other relevant checks]
|
|
154
|
+
|
|
155
|
+
## Breaking Changes
|
|
156
|
+
[None | Description of breaking change and migration path]
|
|
157
|
+
|
|
158
|
+
## Screenshots / Demo
|
|
159
|
+
[If UI changes — attach before/after screenshots]
|
|
160
|
+
|
|
161
|
+
## Related Issues
|
|
162
|
+
Closes #[issue number]
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
### Phase 4 — Changelog Entry
|
|
168
|
+
|
|
169
|
+
Follow [Keep a Changelog](https://keepachangelog.com/) format:
|
|
170
|
+
|
|
171
|
+
```markdown
|
|
172
|
+
## [1.2.0] - 2026-07-01
|
|
173
|
+
|
|
174
|
+
### Added
|
|
175
|
+
- Refresh token rotation for improved security (#142)
|
|
176
|
+
- Retry interceptor with exponential backoff (#138)
|
|
177
|
+
|
|
178
|
+
### Changed
|
|
179
|
+
- Extracted axios instance to `src/lib/axios.ts` for cleaner configuration
|
|
180
|
+
|
|
181
|
+
### Fixed
|
|
182
|
+
- Fixed race condition in useUserData hook causing stale state (#135)
|
|
183
|
+
- Resolved memory leak when component unmounts during fetch (#133)
|
|
184
|
+
|
|
185
|
+
### Deprecated
|
|
186
|
+
- `GET /api/v1/users` — use `GET /api/v2/users` instead (removes in v2.0)
|
|
187
|
+
|
|
188
|
+
### Removed
|
|
189
|
+
- Removed legacy `moment.js` dependency — migrated to `date-fns`
|
|
190
|
+
|
|
191
|
+
### Security
|
|
192
|
+
- Updated `package-x` from 2.1.0 to 2.1.4 (CVE-2026-XXXX)
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
### Phase 5 — Release Notes (Human-Readable)
|
|
198
|
+
|
|
199
|
+
For non-technical stakeholders:
|
|
200
|
+
|
|
201
|
+
```markdown
|
|
202
|
+
# Release v1.2.0 — Security & Stability
|
|
203
|
+
|
|
204
|
+
## What's new
|
|
205
|
+
|
|
206
|
+
**Better security**: Login sessions are now more secure with automatic
|
|
207
|
+
token rotation. Each time you use the app, your session is refreshed
|
|
208
|
+
automatically.
|
|
209
|
+
|
|
210
|
+
**More reliable**: The app now automatically retries failed requests,
|
|
211
|
+
so temporary network issues won't interrupt your workflow.
|
|
212
|
+
|
|
213
|
+
## Bug fixes
|
|
214
|
+
|
|
215
|
+
- Fixed an issue where user data could appear stale after navigating
|
|
216
|
+
- Fixed a rare crash that occurred when closing the app during data loading
|
|
217
|
+
|
|
218
|
+
## Under the hood
|
|
219
|
+
|
|
220
|
+
We've updated several internal libraries to keep the app fast, secure,
|
|
221
|
+
and maintainable.
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## Decision Tree
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
What does the user need?
|
|
230
|
+
├── Commit message → Phase 2 only
|
|
231
|
+
├── PR description → Phase 3 (+ Phase 2 if commits not written)
|
|
232
|
+
├── Changelog entry → Phase 4 (from commit list or diff)
|
|
233
|
+
└── Full release → Phase 2 + Phase 4 + Phase 5
|
|
234
|
+
|
|
235
|
+
Should changes be split into multiple commits?
|
|
236
|
+
├── Changes are unrelated → Yes — split by concern
|
|
237
|
+
├── Changes form one atomic feature → No — single commit
|
|
238
|
+
└── Unsure → Ask user
|
|
239
|
+
|
|
240
|
+
Is there a breaking change?
|
|
241
|
+
├── Yes → Use `feat!` or `fix!` type + BREAKING CHANGE footer
|
|
242
|
+
└── No → Standard type
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## Branch Naming Convention
|
|
248
|
+
|
|
249
|
+
```
|
|
250
|
+
feature/short-description → new features
|
|
251
|
+
fix/short-description → bug fixes
|
|
252
|
+
refactor/short-description → refactoring
|
|
253
|
+
chore/dependency-upgrade → maintenance
|
|
254
|
+
release/v1.2.0 → release preparation
|
|
255
|
+
hotfix/critical-issue → urgent production fixes
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Output Format
|
|
261
|
+
|
|
262
|
+
```
|
|
263
|
+
📝 Git Output
|
|
264
|
+
─────────────────────────────────────────────────
|
|
265
|
+
Type: [commit | PR | changelog | release-notes]
|
|
266
|
+
|
|
267
|
+
─── Commit Message ───────────────────────────────
|
|
268
|
+
feat(scope): short imperative description
|
|
269
|
+
|
|
270
|
+
Body explaining why this change was made.
|
|
271
|
+
What problem does it solve?
|
|
272
|
+
|
|
273
|
+
Closes #123
|
|
274
|
+
|
|
275
|
+
─── PR Title ─────────────────────────────────────
|
|
276
|
+
feat(scope): short imperative description
|
|
277
|
+
|
|
278
|
+
─── PR Description ───────────────────────────────
|
|
279
|
+
[Formatted markdown PR body]
|
|
280
|
+
|
|
281
|
+
─── Changelog ────────────────────────────────────
|
|
282
|
+
[Formatted changelog section]
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## Validation Checklist
|
|
288
|
+
|
|
289
|
+
- [ ] Commit type is correct (feat/fix/refactor/etc.)
|
|
290
|
+
- [ ] Subject line ≤72 chars, imperative mood, no period at end
|
|
291
|
+
- [ ] Breaking changes flagged with `!` and `BREAKING CHANGE:` footer
|
|
292
|
+
- [ ] Body explains *why*, not just *what*
|
|
293
|
+
- [ ] Issue references included (`Closes #N`)
|
|
294
|
+
- [ ] PR description covers: summary, changes, testing, breaking changes
|
|
295
|
+
- [ ] Changelog uses correct sections (Added/Changed/Fixed/etc.)
|
|
296
|
+
- [ ] No vague messages ("fix stuff", "updates", "wip")
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## Examples
|
|
301
|
+
|
|
302
|
+
See `examples/` folder.
|