@codeharbor/agent-playbook 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/README.md +4 -2
  2. package/package.json +5 -2
  3. package/skills/api-designer/README.md +36 -0
  4. package/skills/api-designer/SKILL.md +232 -0
  5. package/skills/api-designer/references/graphql-patterns.md +12 -0
  6. package/skills/api-designer/references/rest-patterns.md +17 -0
  7. package/skills/api-designer/scripts/generate_api.py +87 -0
  8. package/skills/api-designer/scripts/validate_api.py +48 -0
  9. package/skills/api-documenter/README.md +41 -0
  10. package/skills/api-documenter/SKILL.md +209 -0
  11. package/skills/api-documenter/references/examples/README.md +3 -0
  12. package/skills/api-documenter/references/examples/openapi-example.yaml +10 -0
  13. package/skills/api-documenter/references/openapi-template.yaml +5 -0
  14. package/skills/api-documenter/scripts/generate_openapi.py +84 -0
  15. package/skills/api-documenter/scripts/validate_openapi.py +45 -0
  16. package/skills/architecting-solutions/README.md +22 -0
  17. package/skills/architecting-solutions/SKILL.md +459 -0
  18. package/skills/auto-trigger/README.md +23 -0
  19. package/skills/auto-trigger/SKILL.md +183 -0
  20. package/skills/code-reviewer/README.md +59 -0
  21. package/skills/code-reviewer/SKILL.md +220 -0
  22. package/skills/code-reviewer/references/checklist.md +80 -0
  23. package/skills/code-reviewer/references/patterns.md +226 -0
  24. package/skills/code-reviewer/references/security.md +88 -0
  25. package/skills/code-reviewer/scripts/review_checklist.py +191 -0
  26. package/skills/commit-helper/README.md +58 -0
  27. package/skills/commit-helper/SKILL.md +159 -0
  28. package/skills/commit-helper/references/conventional-commits.md +68 -0
  29. package/skills/commit-helper/references/examples.md +125 -0
  30. package/skills/commit-helper/references/scopes.md +49 -0
  31. package/skills/commit-helper/scripts/validate_commit.py +70 -0
  32. package/skills/create-pr/README.md +182 -0
  33. package/skills/create-pr/SKILL.md +340 -0
  34. package/skills/debugger/README.md +53 -0
  35. package/skills/debugger/SKILL.md +239 -0
  36. package/skills/debugger/references/checklist.md +7 -0
  37. package/skills/debugger/references/errors.md +6 -0
  38. package/skills/debugger/references/patterns.md +5 -0
  39. package/skills/debugger/scripts/debug_report.py +77 -0
  40. package/skills/deployment-engineer/README.md +40 -0
  41. package/skills/deployment-engineer/SKILL.md +242 -0
  42. package/skills/deployment-engineer/references/kubernetes.md +23 -0
  43. package/skills/deployment-engineer/references/monitoring.md +14 -0
  44. package/skills/deployment-engineer/references/pipelines.md +12 -0
  45. package/skills/deployment-engineer/scripts/generate_deploy.py +72 -0
  46. package/skills/deployment-engineer/scripts/validate_deploy.py +46 -0
  47. package/skills/documentation-engineer/README.md +41 -0
  48. package/skills/documentation-engineer/SKILL.md +164 -0
  49. package/skills/documentation-engineer/references/api-template.md +22 -0
  50. package/skills/documentation-engineer/references/readme-template.md +25 -0
  51. package/skills/documentation-engineer/references/style-guide.md +13 -0
  52. package/skills/documentation-engineer/scripts/generate_docs.py +68 -0
  53. package/skills/documentation-engineer/scripts/validate_docs.py +46 -0
  54. package/skills/figma-designer/README.md +222 -0
  55. package/skills/figma-designer/SKILL.md +407 -0
  56. package/skills/figma-designer/references/example-output.md +86 -0
  57. package/skills/performance-engineer/README.md +42 -0
  58. package/skills/performance-engineer/SKILL.md +236 -0
  59. package/skills/performance-engineer/references/checklist.md +6 -0
  60. package/skills/performance-engineer/references/monitoring.md +5 -0
  61. package/skills/performance-engineer/references/optimization.md +7 -0
  62. package/skills/performance-engineer/scripts/perf_report.py +64 -0
  63. package/skills/performance-engineer/scripts/profile.py +63 -0
  64. package/skills/planning-with-files/README.md +27 -0
  65. package/skills/planning-with-files/SKILL.md +103 -0
  66. package/skills/prd-implementation-precheck/README.md +97 -0
  67. package/skills/prd-implementation-precheck/SKILL.md +112 -0
  68. package/skills/prd-planner/README.md +102 -0
  69. package/skills/prd-planner/SKILL.md +449 -0
  70. package/skills/prd-planner/references/edge-case-analysis.md +111 -0
  71. package/skills/qa-expert/README.md +37 -0
  72. package/skills/qa-expert/SKILL.md +225 -0
  73. package/skills/qa-expert/references/gates.md +11 -0
  74. package/skills/qa-expert/references/metrics.md +6 -0
  75. package/skills/qa-expert/references/strategy.md +11 -0
  76. package/skills/qa-expert/scripts/coverage_analysis.py +61 -0
  77. package/skills/qa-expert/scripts/generate_test_plan.py +68 -0
  78. package/skills/refactoring-specialist/README.md +37 -0
  79. package/skills/refactoring-specialist/SKILL.md +283 -0
  80. package/skills/refactoring-specialist/references/checklist.md +6 -0
  81. package/skills/refactoring-specialist/references/smells.md +6 -0
  82. package/skills/refactoring-specialist/references/techniques.md +6 -0
  83. package/skills/security-auditor/README.md +48 -0
  84. package/skills/security-auditor/SKILL.md +256 -0
  85. package/skills/security-auditor/references/checklist.md +7 -0
  86. package/skills/security-auditor/references/owasp.md +12 -0
  87. package/skills/security-auditor/references/remediation.md +7 -0
  88. package/skills/security-auditor/scripts/find_secrets.py +58 -0
  89. package/skills/security-auditor/scripts/security_audit.py +64 -0
  90. package/skills/self-improving-agent/README.md +136 -0
  91. package/skills/self-improving-agent/SKILL.md +407 -0
  92. package/skills/self-improving-agent/hooks/post-bash.sh +10 -0
  93. package/skills/self-improving-agent/hooks/pre-tool.sh +10 -0
  94. package/skills/self-improving-agent/hooks/session-end.sh +4 -0
  95. package/skills/self-improving-agent/memory/semantic-patterns.json +288 -0
  96. package/skills/self-improving-agent/references/appendix.md +131 -0
  97. package/skills/self-improving-agent/templates/correction-template.md +11 -0
  98. package/skills/self-improving-agent/templates/pattern-template.md +15 -0
  99. package/skills/self-improving-agent/templates/validation-template.md +14 -0
  100. package/skills/session-logger/README.md +50 -0
  101. package/skills/session-logger/SKILL.md +156 -0
  102. package/skills/skill-router/README.md +155 -0
  103. package/skills/skill-router/SKILL.md +215 -0
  104. package/skills/test-automator/README.md +41 -0
  105. package/skills/test-automator/SKILL.md +202 -0
  106. package/skills/test-automator/references/best-practices.md +6 -0
  107. package/skills/test-automator/references/examples/README.md +3 -0
  108. package/skills/test-automator/references/examples/unit-test-example.md +8 -0
  109. package/skills/test-automator/references/mocking.md +5 -0
  110. package/skills/test-automator/scripts/coverage_report.py +59 -0
  111. package/skills/test-automator/scripts/generate_test.py +66 -0
  112. package/skills/workflow-orchestrator/README.md +20 -0
  113. package/skills/workflow-orchestrator/SKILL.md +342 -0
  114. package/src/cli.js +107 -20
@@ -0,0 +1,191 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Code Review Checklist Generator
4
+ Generates a structured review checklist for a given PR or diff.
5
+ """
6
+
7
+ import argparse
8
+ import subprocess
9
+ import sys
10
+ from pathlib import Path
11
+
12
+
13
+ def get_changed_files(base_branch: str = "main") -> list[str]:
14
+ """Get list of changed files."""
15
+ try:
16
+ result = subprocess.run(
17
+ ["git", "diff", f"{base_branch}...HEAD", "--name-only"],
18
+ capture_output=True,
19
+ text=True,
20
+ check=True
21
+ )
22
+ return [f.strip() for f in result.stdout.strip().split('\n') if f.strip()]
23
+ except subprocess.CalledProcessError:
24
+ return []
25
+
26
+
27
+ def get_commit_messages(base_branch: str = "main") -> list[str]:
28
+ """Get commit messages in the PR."""
29
+ try:
30
+ result = subprocess.run(
31
+ ["git", "log", f"{base_branch}...HEAD", "--oneline"],
32
+ capture_output=True,
33
+ text=True,
34
+ check=True
35
+ )
36
+ return [line.strip() for line in result.stdout.strip().split('\n') if line.strip()]
37
+ except subprocess.CalledProcessError:
38
+ return []
39
+
40
+
41
+ def get_diff(base_branch: str = "main") -> str:
42
+ """Get the full diff."""
43
+ try:
44
+ result = subprocess.run(
45
+ ["git", "diff", f"{base_branch}...HEAD"],
46
+ capture_output=True,
47
+ text=True,
48
+ check=True
49
+ )
50
+ return result.stdout
51
+ except subprocess.CalledProcessError:
52
+ return ""
53
+
54
+
55
+ def categorize_file(filename: str) -> str:
56
+ """Categorize file by extension for targeted checks."""
57
+ ext = Path(filename).suffix.lower()
58
+ if ext in {'.ts', '.tsx', '.js', '.jsx'}:
59
+ return 'javascript'
60
+ if ext in {'.py'}:
61
+ return 'python'
62
+ if ext in {'.go'}:
63
+ return 'go'
64
+ if ext in {'.rs'}:
65
+ return 'rust'
66
+ if ext in {'.java', '.kt'}:
67
+ return 'jvm'
68
+ if ext in {'.sql'}:
69
+ return 'sql'
70
+ if ext in {'.yml', '.yaml'}:
71
+ return 'yaml'
72
+ if ext in {'.md', '.rst'}:
73
+ return 'docs'
74
+ return 'general'
75
+
76
+
77
+ def generate_review_checklist(base_branch: str = "main") -> str:
78
+ """Generate a structured review checklist."""
79
+ files = get_changed_files(base_branch)
80
+ commits = get_commit_messages(base_branch)
81
+ diff = get_diff(base_branch)
82
+
83
+ if not files:
84
+ return "# No changes found\n\nNo files changed compared to " + base_branch
85
+
86
+ lines = ["# Code Review Checklist\n"]
87
+
88
+ # Overview
89
+ lines.append("## Overview\n")
90
+ lines.append(f"- **Branch**: {base_branch} → HEAD")
91
+ lines.append(f"- **Files changed**: {len(files)}")
92
+ lines.append(f"- **Commits**: {len(commits)}\n")
93
+
94
+ # Commits
95
+ lines.append("### Commits\n")
96
+ for commit in commits:
97
+ lines.append(f"- {commit}")
98
+ lines.append("")
99
+
100
+ # Files by category
101
+ categories = {}
102
+ for f in files:
103
+ cat = categorize_file(f)
104
+ categories.setdefault(cat, []).append(f)
105
+
106
+ lines.append("## Files to Review\n")
107
+ for cat, cat_files in categories.items():
108
+ lines.append(f"\n### {cat.title()}\n")
109
+ for f in cat_files:
110
+ lines.append(f"- [{f}]")
111
+
112
+ # Diff snippet (first 100 lines)
113
+ lines.append("\n## Diff Preview\n")
114
+ lines.append("```diff")
115
+ for line in diff.split('\n')[:100]:
116
+ lines.append(line)
117
+ if len(diff.split('\n')) > 100:
118
+ lines.append("\n... (diff truncated)")
119
+ lines.append("```\n")
120
+
121
+ # Review sections
122
+ lines.append("## Review Sections\n")
123
+
124
+ # Security check
125
+ lines.append("### 🔒 Security\n")
126
+ if any('secret' in f.lower() or 'config' in f.lower() or 'env' in f.lower() for f in files):
127
+ lines.append("- [ ] **Secrets check**: No hardcoded credentials in config/env files\n")
128
+ lines.append("- [ ] **Input validation**: User input is validated and sanitized\n")
129
+ lines.append("- [ ] **Injection**: No SQL/command injection vulnerabilities\n")
130
+ lines.append("- [ ] **Auth**: Proper authentication/authorization on new endpoints\n")
131
+
132
+ # Code quality
133
+ lines.append("\n### 📝 Code Quality\n")
134
+ lines.append("- [ ] **Readability**: Code is clear and understandable\n")
135
+ lines.append("- [ ] **Naming**: Variables/functions are well named\n")
136
+ lines.append("- [ ] **DRY**: No duplicate code\n")
137
+ lines.append("- [ ] **Comments**: Complex logic is explained\n")
138
+
139
+ # Testing
140
+ test_files = [f for f in files if 'test' in f.lower() or 'spec' in f.lower()]
141
+ if test_files:
142
+ lines.append(f"\n### 🧪 Testing ({len(test_files)} test files)\n")
143
+ else:
144
+ lines.append("\n### 🧪 Testing\n")
145
+ lines.append("- [ ] **Tests added**: New functionality has tests\n")
146
+ lines.append("- [ ] **Coverage**: Test coverage not decreased\n")
147
+ lines.append("- [ ] **Edge cases**: Edge cases are tested\n")
148
+
149
+ # Performance
150
+ lines.append("\n### ⚡ Performance\n")
151
+ lines.append("- [ ] **N+1 queries**: No database queries in loops\n")
152
+ lines.append("- [ ] **Caching**: Appropriate caching where needed\n")
153
+ lines.append("- [ ] **Efficiency**: Efficient algorithms/data structures\n")
154
+
155
+ # Documentation
156
+ lines.append("\n### 📚 Documentation\n")
157
+ lines.append("- [ ] **API docs**: Public APIs are documented\n")
158
+ lines.append("- [ ] **README**: README updated if needed\n")
159
+ lines.append("- [ ] **Comments**: Complex logic has comments\n")
160
+
161
+ # Breaking changes
162
+ lines.append("\n### ⚠️ Breaking Changes\n")
163
+ lines.append("- [ ] **Documented**: Breaking changes are documented\n")
164
+ lines.append("- [ ] **Migration**: Migration guide provided if needed\n")
165
+
166
+ # Approval
167
+ lines.append("\n## Approval\n")
168
+ lines.append("- [ ] **Critical issues**: None\n")
169
+ lines.append("- [ ] **Tests pass**: All tests pass locally\n")
170
+ lines.append("- [ ] **Ready to merge**: No blocking issues\n")
171
+
172
+ return '\n'.join(lines)
173
+
174
+
175
+ def main():
176
+ parser = argparse.ArgumentParser(description="Generate code review checklist")
177
+ parser.add_argument("--base", default="main", help="Base branch to compare against")
178
+ parser.add_argument("--output", "-o", help="Output file (default: stdout)")
179
+ args = parser.parse_args()
180
+
181
+ checklist = generate_review_checklist(args.base)
182
+
183
+ if args.output:
184
+ Path(args.output).write_text(checklist)
185
+ print(f"Checklist written to {args.output}")
186
+ else:
187
+ print(checklist)
188
+
189
+
190
+ if __name__ == "__main__":
191
+ main()
@@ -0,0 +1,58 @@
1
+ # Commit Helper
2
+
3
+ > A Claude Code skill for writing Git commit messages following the Conventional Commits specification.
4
+
5
+ ## Installation
6
+
7
+ This skill is part of the [agent-playbook](https://github.com/Charon-Fan/agent-playbook) collection.
8
+
9
+ ## Usage
10
+
11
+ When working with Git, simply ask Claude to commit your changes:
12
+
13
+ ```
14
+ You: commit my changes
15
+ ```
16
+
17
+ The skill will automatically:
18
+ 1. Review your changes with `git diff`
19
+ 2. Generate a properly formatted commit message
20
+ 3. Present it for your approval
21
+ 4. Execute the commit when confirmed
22
+
23
+ ## Examples
24
+
25
+ ### Simple Feature
26
+ ```
27
+ You: Commit the new user authentication feature
28
+
29
+ Claude generates:
30
+ feat(auth): add OAuth2 login support
31
+
32
+ Implement OAuth2 authentication flow for Google and GitHub.
33
+ Users can now link multiple social accounts to their profile.
34
+ ```
35
+
36
+ ### Bug Fix
37
+ ```
38
+ You: Commit the API timeout fix
39
+
40
+ Claude generates:
41
+ fix(api): resolve timeout in user endpoint
42
+
43
+ Added 30-second timeout to database query to prevent slow queries
44
+ from causing request timeouts.
45
+ ```
46
+
47
+ ## Validation
48
+
49
+ The skill includes a validation script to check commit message format:
50
+
51
+ ```bash
52
+ python scripts/validate_commit.py "feat(api): add user endpoint"
53
+ ```
54
+
55
+ ## References
56
+
57
+ - [Conventional Commits Specification](https://www.conventionalcommits.org/)
58
+ - [Angular Commit Guidelines](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit)
@@ -0,0 +1,159 @@
1
+ ---
2
+ name: commit-helper
3
+ description: Helps write Git commit messages following the Conventional Commits specification. Use this skill when the user asks to commit changes, write commit messages, format commits, or mentions git commits.
4
+ allowed-tools: Read, Write, Edit, Bash, Grep
5
+ ---
6
+
7
+ # Commit Message Helper
8
+
9
+ A skill for creating properly formatted Git commit messages following the [Conventional Commits](https://www.conventionalcommits.org/) specification.
10
+
11
+ ## When This Skill Activates
12
+
13
+ This skill activates when you:
14
+ - Ask to commit changes
15
+ - Mention commit messages
16
+ - Request git commit formatting
17
+ - Say "commit" or "git commit"
18
+
19
+ ## Commit Message Format
20
+
21
+ ```
22
+ <type>(<scope>): <subject>
23
+
24
+ <body>
25
+
26
+ <footer>
27
+ ```
28
+
29
+ ## Types
30
+
31
+ | Type | Description |
32
+ |------|-------------|
33
+ | `feat` | A new feature |
34
+ | `fix` | A bug fix |
35
+ | `docs` | Documentation only changes |
36
+ | `style` | Changes that do not affect the meaning of the code (formatting, etc.) |
37
+ | `refactor` | A code change that neither fixes a bug nor adds a feature |
38
+ | `perf` | A code change that improves performance |
39
+ | `test` | Adding missing tests or correcting existing tests |
40
+ | `chore` | Changes to the build process or auxiliary tools |
41
+ | `ci` | Changes to CI configuration files and scripts |
42
+ | `build` | Changes that affect the build system or external dependencies |
43
+
44
+ ## Scope
45
+
46
+ The scope should indicate the area of the codebase affected:
47
+ - For frontend: `components`, `hooks`, `store`, `styles`, `utils`
48
+ - For backend: `api`, `models`, `services`, `database`, `auth`
49
+ - For devops: `ci`, `deploy`, `docker`
50
+ - Project-specific scopes are also acceptable
51
+
52
+ ## Guidelines
53
+
54
+ ### Subject Line
55
+ - Use imperative mood ("add feature" not "added feature" or "adds feature")
56
+ - No period at the end
57
+ - Maximum 50 characters
58
+ - Be specific and concise
59
+
60
+ ### Body
61
+ - Separate subject from body with a blank line
62
+ - Use the body to explain **what** and **why**, not **how**
63
+ - Wrap at 72 characters per line
64
+ - Mention any breaking changes
65
+
66
+ ### Footer
67
+ - Reference issues: `Closes #123`, `Fixes #456`, `Refs #789`
68
+ - Multiple issues: `Closes #123, #456, #789`
69
+ - Breaking changes: Start with `BREAKING CHANGE:` followed by description
70
+
71
+ ## Examples
72
+
73
+ ### Good Examples
74
+
75
+ ```
76
+ feat(auth): add OAuth2 login support
77
+
78
+ Implement OAuth2 authentication flow to allow users to log in
79
+ with their Google or GitHub accounts.
80
+
81
+ This change adds:
82
+ - New OAuth2 middleware for handling callbacks
83
+ - Updated login UI with social login buttons
84
+ - User profile synchronization
85
+
86
+ Closes #123
87
+ ```
88
+
89
+ ```
90
+ fix(api): resolve race condition in user creation
91
+
92
+ The concurrent user creation requests could result in duplicate
93
+ email entries. Added unique constraint and proper error handling.
94
+
95
+ Fixes #456
96
+ ```
97
+
98
+ ```
99
+ refactor(user): simplify profile update logic
100
+
101
+ Extracted common validation logic into a reusable function
102
+ to reduce code duplication across profile update endpoints.
103
+ ```
104
+
105
+ ```
106
+ docs: update API documentation with new endpoints
107
+
108
+ Added documentation for the v2 user management endpoints
109
+ including request/response examples and error codes.
110
+ ```
111
+
112
+ ### Bad Examples
113
+
114
+ ```
115
+ updated stuff # Too vague, no type/scope
116
+ fixed bug # No context about which bug
117
+ feat: added feature # Redundant ("feat" means new feature)
118
+ Feat(User): Add Login # Incorrect capitalization
119
+ feat: A really really really long subject line that exceeds the recommended limit # Too long
120
+ ```
121
+
122
+ ## Breaking Changes
123
+
124
+ When introducing breaking changes, add `BREAKING CHANGE:` to the footer:
125
+
126
+ ```
127
+ feat(api): migrate to REST v2
128
+
129
+ The API endpoints have been restructured for better consistency.
130
+ Old endpoints are deprecated and will be removed in v3.0.
131
+
132
+ BREAKING CHANGE: `/api/v1/users` is now `/api/v2/users`.
133
+ All consumers must update their integration by 2025-03-01.
134
+ ```
135
+
136
+ ## Workflow
137
+
138
+ When writing a commit message:
139
+
140
+ 1. **Review changes** - Run `git diff` to understand what changed
141
+ 2. **Identify type** - Determine the type of change
142
+ 3. **Identify scope** - Determine which area is affected
143
+ 4. **Write subject** - Create a clear, concise subject line
144
+ 5. **Write body** - Explain what and why (if needed)
145
+ 6. **Add footer** - Reference issues or note breaking changes
146
+
147
+ ## Validation
148
+
149
+ Use the validation script to check commit message format:
150
+
151
+ ```bash
152
+ python scripts/validate_commit.py "your commit message"
153
+ ```
154
+
155
+ ## Reference Documents
156
+
157
+ - See `references/conventional-commits.md` for full specification
158
+ - See `references/examples.md` for more examples
159
+ - See `references/scopes.md` for recommended scope naming
@@ -0,0 +1,68 @@
1
+ # Conventional Commits Specification
2
+
3
+ ## Summary
4
+
5
+ The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history.
6
+
7
+ ## Structure
8
+
9
+ ```
10
+ <type>[optional scope]: <description>
11
+
12
+ [optional body]
13
+
14
+ [optional footer(s)]
15
+ ```
16
+
17
+ ## Type
18
+
19
+ Must be one of the following:
20
+
21
+ - **feat**: A new feature
22
+ - **fix**: A bug fix
23
+ - **docs**: Documentation only changes
24
+ - **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
25
+ - **refactor**: A code change that neither fixes a bug nor adds a feature
26
+ - **perf**: A code change that improves performance
27
+ - **test**: Adding missing tests or correcting existing tests
28
+ - **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
29
+ - **ci**: Changes to CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
30
+ - **chore**: Other changes that don't modify src or test files
31
+ - **revert**: Reverts a previous commit
32
+
33
+ ## Scope
34
+
35
+ The scope should be the name of the npm package or module affected.
36
+
37
+ ## Description
38
+
39
+ The description contains a short description of the change:
40
+
41
+ - Use imperative, present tense: "change" not "changed" nor "changes"
42
+ - Don't capitalize the first letter
43
+ - No period (.) at the end
44
+
45
+ ## Body
46
+
47
+ Just as in the subject, use the imperative, present tense: "fix" not "fixed" nor "fixes".
48
+
49
+ Explain **what** and **why** instead of **how**.
50
+
51
+ ## Footer
52
+
53
+ The footer should contain any information about **Breaking Changes** and is also the place to reference GitHub issues that this commit **Closes**.
54
+
55
+ ## Breaking Changes
56
+
57
+ A BREAKING CHANGE must be indicated in the footer. A BREAKING CHANGE must be a part of the type/scope or the description.
58
+
59
+ ```
60
+ feat(api): remove deprecated endpoints
61
+
62
+ BREAKING CHANGE: The /api/v1/users endpoint has been removed.
63
+ ```
64
+
65
+ ## References
66
+
67
+ - https://www.conventionalcommits.org/
68
+ - https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-format
@@ -0,0 +1,125 @@
1
+ # Commit Message Examples
2
+
3
+ ## Features
4
+
5
+ ```
6
+ feat(auth): add OAuth2 login support
7
+
8
+ Implement OAuth2 authentication flow supporting Google and GitHub
9
+ providers. Users can now link multiple social accounts to their profile.
10
+
11
+ Closes #123
12
+ ```
13
+
14
+ ```
15
+ feat(components): add data table component
16
+
17
+ New reusable table component with built-in sorting, filtering, and
18
+ pagination. Uses TanStack Table for performance.
19
+ ```
20
+
21
+ ## Bug Fixes
22
+
23
+ ```
24
+ fix(api): resolve race condition in user creation
25
+
26
+ Concurrent requests could create duplicate users. Added unique constraint
27
+ on email field with proper error handling.
28
+
29
+ Fixes #456
30
+ ```
31
+
32
+ ```
33
+ fix(auth): prevent session token leakage
34
+
35
+ Session tokens were being logged in debug output. Removed sensitive
36
+ data from debug logs.
37
+ ```
38
+
39
+ ## Refactoring
40
+
41
+ ```
42
+ refactor(user): extract validation logic
43
+
44
+ Moved user validation logic into a dedicated validator module to
45
+ enable reuse across different parts of the application.
46
+ ```
47
+
48
+ ```
49
+ refactor(api): simplify error handling middleware
50
+
51
+ Unified error response format across all API endpoints.
52
+ ```
53
+
54
+ ## Documentation
55
+
56
+ ```
57
+ docs: update installation guide with new requirements
58
+
59
+ Added Python 3.12 and Node.js 20 to the supported versions list.
60
+ Updated docker-compose examples.
61
+ ```
62
+
63
+ ```
64
+ docs(api): add OpenAPI specification for v2 endpoints
65
+
66
+ Complete API documentation including request/response schemas and
67
+ authentication requirements.
68
+ ```
69
+
70
+ ## Performance
71
+
72
+ ```
73
+ perf(api): add database query caching
74
+
75
+ Implemented Redis caching for frequently accessed data. Reduced
76
+ average response time from 200ms to 50ms.
77
+ ```
78
+
79
+ ```
80
+ perf(frontend): lazy load images below fold
81
+
82
+ Implemented Intersection Observer for lazy loading. Reduced initial
83
+ page load by 40%.
84
+ ```
85
+
86
+ ## Breaking Changes
87
+
88
+ ```
89
+ feat(api): migrate to REST v2
90
+
91
+ API endpoints have been restructured for better consistency.
92
+ Old v1 endpoints are deprecated.
93
+
94
+ BREAKING CHANGE: All `/api/v1/*` endpoints moved to `/api/v2/*`.
95
+ Migration guide: docs/api-migration-v1-to-v2.md
96
+
97
+ Closes #789
98
+ ```
99
+
100
+ ## Complex Example
101
+
102
+ ```
103
+ feat(payment): integrate Stripe payment processing
104
+
105
+ Add comprehensive Stripe integration for subscription and one-time payments.
106
+ Includes webhook handling for payment events and automatic invoice generation.
107
+
108
+ Key features:
109
+ - Support for multiple payment methods (card, Apple Pay, Google Pay)
110
+ - Subscription lifecycle management
111
+ - Payment failure retry logic
112
+ - PCI-compliant card handling via Stripe Elements
113
+
114
+ Security considerations:
115
+ - All card data is handled directly by Stripe
116
+ - Webhook signatures are verified
117
+ - Sensitive payment data is never stored locally
118
+
119
+ Migration notes:
120
+ - Existing users need to add payment method
121
+ - Trial period extended by 14 days for existing users
122
+
123
+ Related tickets: FEAT-123, FEAT-124
124
+ Breaking Change: Old PayPal integration removed
125
+ ```
@@ -0,0 +1,49 @@
1
+ # Recommended Scopes
2
+
3
+ ## Frontend
4
+
5
+ | Scope | Usage |
6
+ |-------|-------|
7
+ | `components` | UI component changes |
8
+ | `hooks` | Custom React hooks |
9
+ | `store` | State management (Redux, Zustand, etc.) |
10
+ | `styles` | CSS, styled-components, theme |
11
+ | `utils` | Utility functions |
12
+ | `forms` | Form-related changes |
13
+ | `routing` | Route configuration |
14
+
15
+ ## Backend
16
+
17
+ | Scope | Usage |
18
+ |-------|-------|
19
+ | `api` | API endpoints, controllers |
20
+ | `models` | Data models, schemas |
21
+ | `services` | Business logic services |
22
+ | `database` | Database queries, migrations |
23
+ | `auth` | Authentication, authorization |
24
+ | `middleware` | Express/HTTP middleware |
25
+ | `validators` | Input validation |
26
+
27
+ ## DevOps
28
+
29
+ | Scope | Usage |
30
+ |-------|-------|
31
+ | `ci` | Continuous Integration (GitHub Actions, Jenkins) |
32
+ | `cd` | Continuous Deployment |
33
+ | `docker` | Dockerfile, docker-compose |
34
+ | `k8s` | Kubernetes manifests |
35
+ | `terraform` | Infrastructure as Code |
36
+
37
+ ## General
38
+
39
+ | Scope | Usage |
40
+ |-------|-------|
41
+ | `config` | Configuration changes |
42
+ | `deps` | Dependency updates |
43
+ | `tests` | Test files (use `test` type for test code changes) |
44
+ | `types` | TypeScript type definitions |
45
+ | `assets` | Images, fonts, static files |
46
+
47
+ ## Project-Specific
48
+
49
+ Projects should define their own scopes based on their module structure. Document project-specific scopes in the project's CONTRIBUTING.md.