create-dev-agents 1.0.0 → 1.0.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.
- package/package.json +1 -1
- package/src/index.js +8 -3
- package/templates/commands/commit.md +32 -26
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -70,7 +70,9 @@ export async function init(options = {}) {
|
|
|
70
70
|
|
|
71
71
|
// Create directories
|
|
72
72
|
spinner.start('Creating directories...');
|
|
73
|
-
|
|
73
|
+
// When installing globally, targetDir is already ~/.claude, so use 'commands' directly
|
|
74
|
+
const commandsDir = options.global ? 'commands' : '.claude/commands';
|
|
75
|
+
const dirs = [commandsDir];
|
|
74
76
|
if (selections.extras.includes('agents')) dirs.push('agents');
|
|
75
77
|
if (selections.extras.includes('templates')) dirs.push('templates');
|
|
76
78
|
if (selections.extras.includes('scripts')) dirs.push('scripts');
|
|
@@ -85,7 +87,7 @@ export async function init(options = {}) {
|
|
|
85
87
|
spinner.start('Installing commands...');
|
|
86
88
|
for (const cmd of selections.commands) {
|
|
87
89
|
const src = path.join(TEMPLATES_DIR, 'commands', `${cmd}.md`);
|
|
88
|
-
const dest = path.join(targetDir,
|
|
90
|
+
const dest = path.join(targetDir, commandsDir, `${cmd}.md`);
|
|
89
91
|
if (fs.existsSync(src)) {
|
|
90
92
|
fs.copyFileSync(src, dest);
|
|
91
93
|
}
|
|
@@ -123,7 +125,10 @@ export async function init(options = {}) {
|
|
|
123
125
|
if (selections.extras.includes('mcp')) {
|
|
124
126
|
spinner.start('Installing MCP config...');
|
|
125
127
|
const src = path.join(TEMPLATES_DIR, 'mcp-settings.json');
|
|
126
|
-
|
|
128
|
+
// When global, targetDir is ~/.claude, so settings.json goes directly there
|
|
129
|
+
const dest = options.global
|
|
130
|
+
? path.join(targetDir, 'settings.json')
|
|
131
|
+
: path.join(targetDir, '.claude', 'settings.json');
|
|
127
132
|
if (fs.existsSync(src) && !fs.existsSync(dest)) {
|
|
128
133
|
fs.copyFileSync(src, dest);
|
|
129
134
|
}
|
|
@@ -13,17 +13,20 @@ First, check staged changes:
|
|
|
13
13
|
- Understand the nature of changes
|
|
14
14
|
|
|
15
15
|
### 2. Determine Type
|
|
16
|
-
Based on changes, identify:
|
|
17
|
-
- `feat` - New feature
|
|
18
|
-
- `fix` - Bug fix
|
|
19
|
-
- `docs` - Documentation
|
|
20
|
-
- `style` - Formatting (no code change)
|
|
21
|
-
- `refactor` - Code restructuring
|
|
22
|
-
- `perf` - Performance improvement
|
|
23
|
-
- `test` - Tests
|
|
24
|
-
- `chore` - Maintenance
|
|
25
|
-
- `ci` - CI/CD changes
|
|
26
|
-
- `build` - Build system
|
|
16
|
+
Based on changes, identify type and use corresponding emoji prefix:
|
|
17
|
+
- ✨ `feat` - New feature
|
|
18
|
+
- 🐛 `fix` - Bug fix
|
|
19
|
+
- 📝 `docs` - Documentation
|
|
20
|
+
- 💄 `style` - Formatting (no code change)
|
|
21
|
+
- ♻️ `refactor` - Code restructuring
|
|
22
|
+
- ⚡ `perf` - Performance improvement
|
|
23
|
+
- ✅ `test` - Tests
|
|
24
|
+
- 🔧 `chore` - Maintenance
|
|
25
|
+
- 👷 `ci` - CI/CD changes
|
|
26
|
+
- 📦 `build` - Build system
|
|
27
|
+
- 🔥 `remove` - Remove code/files
|
|
28
|
+
- 🚀 `deploy` - Deployment
|
|
29
|
+
- 🔒 `security` - Security fix
|
|
27
30
|
|
|
28
31
|
### 3. Identify Scope
|
|
29
32
|
Determine affected area:
|
|
@@ -32,10 +35,10 @@ Determine affected area:
|
|
|
32
35
|
- Technical area (e.g., `api`, `database`)
|
|
33
36
|
|
|
34
37
|
### 4. Generate Message
|
|
35
|
-
Create commit message:
|
|
38
|
+
Create commit message with emoji prefix:
|
|
36
39
|
|
|
37
40
|
```
|
|
38
|
-
<type>(<scope>): <subject>
|
|
41
|
+
<emoji> <type>(<scope>): <subject>
|
|
39
42
|
|
|
40
43
|
<body>
|
|
41
44
|
|
|
@@ -43,6 +46,7 @@ Create commit message:
|
|
|
43
46
|
```
|
|
44
47
|
|
|
45
48
|
**Rules:**
|
|
49
|
+
- Always start with the appropriate emoji
|
|
46
50
|
- Subject: imperative, lowercase, no period, max 50 chars
|
|
47
51
|
- Body: wrap at 72 chars, explain what and why
|
|
48
52
|
- Footer: reference issues, breaking changes
|
|
@@ -52,10 +56,10 @@ Show 2-3 commit message options:
|
|
|
52
56
|
|
|
53
57
|
```
|
|
54
58
|
Option 1 (Concise):
|
|
55
|
-
feat(auth): add Google OAuth login
|
|
59
|
+
✨ feat(auth): add Google OAuth login
|
|
56
60
|
|
|
57
61
|
Option 2 (Detailed):
|
|
58
|
-
feat(auth): add Google OAuth login
|
|
62
|
+
✨ feat(auth): add Google OAuth login
|
|
59
63
|
|
|
60
64
|
Implement social authentication using Google OAuth 2.0.
|
|
61
65
|
- Add GoogleSignIn button component
|
|
@@ -65,7 +69,7 @@ Implement social authentication using Google OAuth 2.0.
|
|
|
65
69
|
Closes #123
|
|
66
70
|
|
|
67
71
|
Option 3 (With Breaking Change):
|
|
68
|
-
feat(auth)!: replace session auth with JWT
|
|
72
|
+
✨ feat(auth)!: replace session auth with JWT
|
|
69
73
|
|
|
70
74
|
BREAKING CHANGE: Session-based authentication has been
|
|
71
75
|
replaced with JWT tokens. All clients must update to
|
|
@@ -94,13 +98,13 @@ For simple changes, `/commit -q` or `/commit --quick`:
|
|
|
94
98
|
> src/components/ui/AppButton/AppButton.types.ts
|
|
95
99
|
> src/components/ui/AppButton/index.ts
|
|
96
100
|
|
|
97
|
-
Generated: feat(ui): add AppButton component with variants
|
|
101
|
+
Generated: ✨ feat(ui): add AppButton component with variants
|
|
98
102
|
|
|
99
103
|
# User runs /commit after fixing a bug
|
|
100
104
|
> Staged files:
|
|
101
105
|
> src/hooks/useNotes.ts
|
|
102
106
|
|
|
103
|
-
Generated: fix(notes): prevent crash on empty note list
|
|
107
|
+
Generated: 🐛 fix(notes): prevent crash on empty note list
|
|
104
108
|
|
|
105
109
|
Handles edge case where notes array is undefined
|
|
106
110
|
by providing empty array fallback.
|
|
@@ -112,13 +116,15 @@ Fixes #456
|
|
|
112
116
|
|
|
113
117
|
### Good Examples
|
|
114
118
|
```
|
|
115
|
-
feat(notes): add markdown preview toggle
|
|
116
|
-
fix(auth): handle expired token refresh
|
|
117
|
-
docs(readme): update installation steps
|
|
118
|
-
refactor(api): extract common fetch logic
|
|
119
|
-
perf(list): virtualize note list for large datasets
|
|
120
|
-
test(button): add unit tests for disabled state
|
|
121
|
-
chore(deps): update expo to v51
|
|
119
|
+
✨ feat(notes): add markdown preview toggle
|
|
120
|
+
🐛 fix(auth): handle expired token refresh
|
|
121
|
+
📝 docs(readme): update installation steps
|
|
122
|
+
♻️ refactor(api): extract common fetch logic
|
|
123
|
+
⚡ perf(list): virtualize note list for large datasets
|
|
124
|
+
✅ test(button): add unit tests for disabled state
|
|
125
|
+
🔧 chore(deps): update expo to v51
|
|
126
|
+
🔥 remove(legacy): delete deprecated API endpoints
|
|
127
|
+
🔒 security(auth): fix XSS vulnerability in input
|
|
122
128
|
```
|
|
123
129
|
|
|
124
130
|
### Bad Examples
|
|
@@ -126,5 +132,5 @@ chore(deps): update expo to v51
|
|
|
126
132
|
fixed stuff # Not descriptive
|
|
127
133
|
WIP # Not meaningful
|
|
128
134
|
Update Button.tsx # No type, unclear change
|
|
129
|
-
feat: added new awesome feature # No scope, past tense
|
|
135
|
+
feat: added new awesome feature # No scope, past tense, no emoji
|
|
130
136
|
```
|