developer-ai 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.
Files changed (105) hide show
  1. package/README.md +241 -0
  2. package/bin/developer-ai.js +2 -0
  3. package/dist/cli.d.ts +3 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +219 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/config/index.d.ts +7 -0
  8. package/dist/config/index.d.ts.map +1 -0
  9. package/dist/config/index.js +82 -0
  10. package/dist/config/index.js.map +1 -0
  11. package/dist/config/schema.d.ts +115 -0
  12. package/dist/config/schema.d.ts.map +1 -0
  13. package/dist/config/schema.js +29 -0
  14. package/dist/config/schema.js.map +1 -0
  15. package/dist/constants.d.ts +8 -0
  16. package/dist/constants.d.ts.map +1 -0
  17. package/dist/constants.js +8 -0
  18. package/dist/constants.js.map +1 -0
  19. package/dist/core/agent.d.ts +38 -0
  20. package/dist/core/agent.d.ts.map +1 -0
  21. package/dist/core/agent.js +155 -0
  22. package/dist/core/agent.js.map +1 -0
  23. package/dist/core/system-prompt.d.ts +6 -0
  24. package/dist/core/system-prompt.d.ts.map +1 -0
  25. package/dist/core/system-prompt.js +44 -0
  26. package/dist/core/system-prompt.js.map +1 -0
  27. package/dist/core/types.d.ts +42 -0
  28. package/dist/core/types.d.ts.map +1 -0
  29. package/dist/core/types.js +6 -0
  30. package/dist/core/types.js.map +1 -0
  31. package/dist/index.d.ts +15 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +12 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/mcp/client.d.ts +13 -0
  36. package/dist/mcp/client.d.ts.map +1 -0
  37. package/dist/mcp/client.js +202 -0
  38. package/dist/mcp/client.js.map +1 -0
  39. package/dist/providers/ollama.d.ts +13 -0
  40. package/dist/providers/ollama.d.ts.map +1 -0
  41. package/dist/providers/ollama.js +60 -0
  42. package/dist/providers/ollama.js.map +1 -0
  43. package/dist/providers/openai.d.ts +9 -0
  44. package/dist/providers/openai.d.ts.map +1 -0
  45. package/dist/providers/openai.js +40 -0
  46. package/dist/providers/openai.js.map +1 -0
  47. package/dist/skills/loader.d.ts +25 -0
  48. package/dist/skills/loader.d.ts.map +1 -0
  49. package/dist/skills/loader.js +93 -0
  50. package/dist/skills/loader.js.map +1 -0
  51. package/dist/tests/tools.test.d.ts +2 -0
  52. package/dist/tests/tools.test.d.ts.map +1 -0
  53. package/dist/tests/tools.test.js +170 -0
  54. package/dist/tests/tools.test.js.map +1 -0
  55. package/dist/tools/index.d.ts +5 -0
  56. package/dist/tools/index.d.ts.map +1 -0
  57. package/dist/tools/index.js +19 -0
  58. package/dist/tools/index.js.map +1 -0
  59. package/dist/tools/list-files.d.ts +3 -0
  60. package/dist/tools/list-files.d.ts.map +1 -0
  61. package/dist/tools/list-files.js +60 -0
  62. package/dist/tools/list-files.js.map +1 -0
  63. package/dist/tools/read-file.d.ts +3 -0
  64. package/dist/tools/read-file.d.ts.map +1 -0
  65. package/dist/tools/read-file.js +46 -0
  66. package/dist/tools/read-file.js.map +1 -0
  67. package/dist/tools/registry.d.ts +24 -0
  68. package/dist/tools/registry.d.ts.map +1 -0
  69. package/dist/tools/registry.js +37 -0
  70. package/dist/tools/registry.js.map +1 -0
  71. package/dist/tools/run-command.d.ts +3 -0
  72. package/dist/tools/run-command.d.ts.map +1 -0
  73. package/dist/tools/run-command.js +114 -0
  74. package/dist/tools/run-command.js.map +1 -0
  75. package/dist/tools/search-text.d.ts +3 -0
  76. package/dist/tools/search-text.d.ts.map +1 -0
  77. package/dist/tools/search-text.js +103 -0
  78. package/dist/tools/search-text.js.map +1 -0
  79. package/dist/tools/utils.d.ts +6 -0
  80. package/dist/tools/utils.d.ts.map +1 -0
  81. package/dist/tools/utils.js +14 -0
  82. package/dist/tools/utils.js.map +1 -0
  83. package/dist/tools/web-search.d.ts +3 -0
  84. package/dist/tools/web-search.d.ts.map +1 -0
  85. package/dist/tools/web-search.js +80 -0
  86. package/dist/tools/web-search.js.map +1 -0
  87. package/dist/tools/write-file.d.ts +3 -0
  88. package/dist/tools/write-file.d.ts.map +1 -0
  89. package/dist/tools/write-file.js +66 -0
  90. package/dist/tools/write-file.js.map +1 -0
  91. package/package.json +54 -0
  92. package/skills/accessibility/SKILL.md +496 -0
  93. package/skills/api-design/SKILL.md +419 -0
  94. package/skills/code-review/SKILL.md +267 -0
  95. package/skills/debugging/SKILL.md +332 -0
  96. package/skills/documentation/SKILL.md +496 -0
  97. package/skills/error-handling/SKILL.md +504 -0
  98. package/skills/git-workflow/SKILL.md +448 -0
  99. package/skills/human-like-coding/SKILL.md +400 -0
  100. package/skills/performance-optimization/SKILL.md +412 -0
  101. package/skills/prompt-engineering/SKILL.md +362 -0
  102. package/skills/refactoring/SKILL.md +457 -0
  103. package/skills/security-audit/SKILL.md +453 -0
  104. package/skills/testing-strategy/SKILL.md +501 -0
  105. package/skills/webapp-testing/SKILL.md +309 -0
@@ -0,0 +1,448 @@
1
+ ---
2
+ name: git-workflow
3
+ description: Guide for effective Git workflows and conventions. Use when setting up branching strategies, writing commit messages, handling merges, resolving conflicts, or establishing team Git practices. Covers Git Flow, trunk-based development, and common Git operations.
4
+ ---
5
+
6
+ # Git Workflow Skill
7
+
8
+ This skill provides guidance for effective Git workflows, conventions, and best practices.
9
+
10
+ ## Overview
11
+
12
+ A consistent Git workflow improves collaboration, makes history readable, and reduces merge conflicts. This skill covers branching strategies, commit conventions, and common operations.
13
+
14
+ ## Branching Strategies
15
+
16
+ ### Git Flow
17
+
18
+ Best for: Projects with scheduled releases
19
+
20
+ ```
21
+ main ─────●─────────●─────────●───────
22
+ │ ↑ ↑
23
+ │ merge merge
24
+ ↓ │ │
25
+ develop ──●────●────●────●────●───────
26
+ │ │
27
+ │ ┌───┴───┐
28
+ │ │feature│
29
+ │ └───────┘
30
+ ┌────┴────┐
31
+ │ release │
32
+ └─────────┘
33
+ ```
34
+
35
+ **Branches:**
36
+ - `main` - Production-ready code
37
+ - `develop` - Integration branch
38
+ - `feature/*` - New features
39
+ - `release/*` - Release preparation
40
+ - `hotfix/*` - Production fixes
41
+
42
+ ### Trunk-Based Development
43
+
44
+ Best for: Continuous deployment, small teams
45
+
46
+ ```
47
+ main ─────●────●────●────●────●─────
48
+ │ │ │ │ │
49
+ │ │ │ │ └──short-lived
50
+ │ │ │ └───────feature branch
51
+ │ │ └────────────(max 1-2 days)
52
+ │ └─────────────────
53
+ └──────────────────────
54
+ ```
55
+
56
+ **Principles:**
57
+ - Short-lived feature branches (< 2 days)
58
+ - Frequent merges to main
59
+ - Feature flags for incomplete work
60
+
61
+ ### GitHub Flow
62
+
63
+ Best for: Continuous deployment, web applications
64
+
65
+ ```
66
+ main ─────●─────────●─────────●───────
67
+ │ ↑ ↑
68
+ │ merge merge
69
+ ↓ (via PR) (via PR)
70
+ feature ──●────●────●
71
+
72
+ └── commits
73
+ ```
74
+
75
+ **Process:**
76
+ 1. Create branch from main
77
+ 2. Make changes, commit
78
+ 3. Open Pull Request
79
+ 4. Review and discuss
80
+ 5. Deploy and test
81
+ 6. Merge to main
82
+
83
+ ## Commit Conventions
84
+
85
+ ### Conventional Commits
86
+
87
+ ```
88
+ <type>[optional scope]: <description>
89
+
90
+ [optional body]
91
+
92
+ [optional footer(s)]
93
+ ```
94
+
95
+ **Types:**
96
+ - `feat` - New feature
97
+ - `fix` - Bug fix
98
+ - `docs` - Documentation only
99
+ - `style` - Formatting, no code change
100
+ - `refactor` - Code change, no feature/fix
101
+ - `perf` - Performance improvement
102
+ - `test` - Adding tests
103
+ - `chore` - Build process, dependencies
104
+
105
+ **Examples:**
106
+ ```
107
+ feat(auth): add OAuth2 login support
108
+
109
+ Add Google and GitHub OAuth providers.
110
+ Users can now link multiple accounts.
111
+
112
+ Closes #123
113
+ ```
114
+
115
+ ```
116
+ fix(api): handle null response from payment API
117
+
118
+ The payment API occasionally returns null for
119
+ declined transactions. Added null check and
120
+ proper error handling.
121
+
122
+ Fixes #456
123
+ ```
124
+
125
+ ```
126
+ refactor: extract validation logic to separate module
127
+
128
+ No functional changes. Improves testability
129
+ and reduces duplication.
130
+ ```
131
+
132
+ ### Good Commit Messages
133
+
134
+ **Structure:**
135
+ ```
136
+ Short summary (50 chars or less)
137
+
138
+ More detailed explanation if needed. Wrap at 72 characters.
139
+ Explain WHAT changed and WHY, not how.
140
+
141
+ - Bullet points are okay
142
+ - Use imperative mood ("Add feature" not "Added feature")
143
+
144
+ Refs #123
145
+ Fixes #456
146
+ ```
147
+
148
+ **Examples:**
149
+
150
+ ```
151
+ ✓ Add user authentication to API endpoints
152
+ ✗ Added authentication
153
+ ✗ auth
154
+ ✗ Fixed stuff
155
+ ```
156
+
157
+ ## Common Operations
158
+
159
+ ### Start New Feature
160
+
161
+ ```bash
162
+ # Update main
163
+ git checkout main
164
+ git pull origin main
165
+
166
+ # Create feature branch
167
+ git checkout -b feature/user-authentication
168
+
169
+ # Work on feature...
170
+ git add .
171
+ git commit -m "feat(auth): add login endpoint"
172
+
173
+ # Push and create PR
174
+ git push -u origin feature/user-authentication
175
+ ```
176
+
177
+ ### Keep Branch Updated
178
+
179
+ ```bash
180
+ # Option 1: Rebase (clean history)
181
+ git fetch origin
182
+ git rebase origin/main
183
+
184
+ # Option 2: Merge (preserve history)
185
+ git fetch origin
186
+ git merge origin/main
187
+ ```
188
+
189
+ ### Squash Commits Before Merge
190
+
191
+ ```bash
192
+ # Interactive rebase last 5 commits
193
+ git rebase -i HEAD~5
194
+
195
+ # In editor, change 'pick' to 'squash' for commits to combine
196
+ pick abc1234 feat: add login form
197
+ squash def5678 fix: form validation
198
+ squash ghi9012 fix: typo
199
+ squash jkl3456 style: formatting
200
+
201
+ # Save, then edit combined commit message
202
+ ```
203
+
204
+ ### Fix Last Commit
205
+
206
+ ```bash
207
+ # Amend last commit (not pushed)
208
+ git add forgotten-file.js
209
+ git commit --amend
210
+
211
+ # Change just the message
212
+ git commit --amend -m "New commit message"
213
+ ```
214
+
215
+ ### Undo Changes
216
+
217
+ ```bash
218
+ # Undo unstaged changes
219
+ git checkout -- file.js
220
+
221
+ # Unstage files
222
+ git reset HEAD file.js
223
+
224
+ # Undo last commit (keep changes)
225
+ git reset --soft HEAD~1
226
+
227
+ # Undo last commit (discard changes)
228
+ git reset --hard HEAD~1
229
+
230
+ # Undo pushed commit (creates new commit)
231
+ git revert abc1234
232
+ ```
233
+
234
+ ### Resolve Merge Conflicts
235
+
236
+ ```bash
237
+ # During merge/rebase
238
+ git status # See conflicted files
239
+
240
+ # Edit files to resolve conflicts
241
+ # Look for:
242
+ # <<<<<<< HEAD
243
+ # Your changes
244
+ # =======
245
+ # Their changes
246
+ # >>>>>>> branch-name
247
+
248
+ # Mark as resolved
249
+ git add resolved-file.js
250
+
251
+ # Continue
252
+ git merge --continue
253
+ # or
254
+ git rebase --continue
255
+ ```
256
+
257
+ ### Cherry-Pick Commits
258
+
259
+ ```bash
260
+ # Apply specific commit to current branch
261
+ git cherry-pick abc1234
262
+
263
+ # Cherry-pick without committing
264
+ git cherry-pick --no-commit abc1234
265
+
266
+ # Cherry-pick range
267
+ git cherry-pick abc1234..def5678
268
+ ```
269
+
270
+ ### Stash Changes
271
+
272
+ ```bash
273
+ # Save work in progress
274
+ git stash
275
+
276
+ # Save with message
277
+ git stash save "WIP: form validation"
278
+
279
+ # List stashes
280
+ git stash list
281
+
282
+ # Apply most recent stash
283
+ git stash pop
284
+
285
+ # Apply specific stash
286
+ git stash apply stash@{2}
287
+
288
+ # Delete stash
289
+ git stash drop stash@{0}
290
+ ```
291
+
292
+ ### Clean Up Branches
293
+
294
+ ```bash
295
+ # Delete local branch
296
+ git branch -d feature/old-feature
297
+
298
+ # Delete remote branch
299
+ git push origin --delete feature/old-feature
300
+
301
+ # Prune remote-tracking branches
302
+ git fetch --prune
303
+
304
+ # Delete all merged local branches
305
+ git branch --merged main | grep -v main | xargs git branch -d
306
+ ```
307
+
308
+ ## Git Hooks
309
+
310
+ ### Pre-commit Hook
311
+
312
+ `.git/hooks/pre-commit`:
313
+ ```bash
314
+ #!/bin/sh
315
+
316
+ # Run linting
317
+ npm run lint
318
+ if [ $? -ne 0 ]; then
319
+ echo "Linting failed. Fix errors before committing."
320
+ exit 1
321
+ fi
322
+
323
+ # Run tests
324
+ npm test
325
+ if [ $? -ne 0 ]; then
326
+ echo "Tests failed. Fix tests before committing."
327
+ exit 1
328
+ fi
329
+ ```
330
+
331
+ ### Commit Message Hook
332
+
333
+ `.git/hooks/commit-msg`:
334
+ ```bash
335
+ #!/bin/sh
336
+
337
+ # Conventional commit format
338
+ commit_regex='^(feat|fix|docs|style|refactor|perf|test|chore)(\(.+\))?: .{1,50}'
339
+
340
+ if ! grep -qE "$commit_regex" "$1"; then
341
+ echo "Invalid commit message format."
342
+ echo "Use: type(scope): description"
343
+ exit 1
344
+ fi
345
+ ```
346
+
347
+ ### Using Husky
348
+
349
+ ```json
350
+ // package.json
351
+ {
352
+ "husky": {
353
+ "hooks": {
354
+ "pre-commit": "lint-staged",
355
+ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
356
+ }
357
+ },
358
+ "lint-staged": {
359
+ "*.js": ["eslint --fix", "git add"]
360
+ }
361
+ }
362
+ ```
363
+
364
+ ## Pull Request Best Practices
365
+
366
+ ### PR Description Template
367
+
368
+ ```markdown
369
+ ## Summary
370
+ Brief description of changes
371
+
372
+ ## Type of Change
373
+ - [ ] Bug fix
374
+ - [ ] New feature
375
+ - [ ] Breaking change
376
+ - [ ] Documentation update
377
+
378
+ ## Testing
379
+ - [ ] Unit tests added/updated
380
+ - [ ] Manual testing performed
381
+
382
+ ## Screenshots (if UI changes)
383
+
384
+ ## Checklist
385
+ - [ ] Code follows style guidelines
386
+ - [ ] Self-review completed
387
+ - [ ] Documentation updated
388
+ - [ ] No new warnings
389
+ ```
390
+
391
+ ### Code Review Guidelines
392
+
393
+ **As Author:**
394
+ - Keep PRs small (< 400 lines)
395
+ - Write clear descriptions
396
+ - Respond to feedback promptly
397
+ - Don't take feedback personally
398
+
399
+ **As Reviewer:**
400
+ - Review promptly (< 24 hours)
401
+ - Be constructive and specific
402
+ - Approve when "good enough"
403
+ - Block only for serious issues
404
+
405
+ ## Git Configuration
406
+
407
+ ```bash
408
+ # User setup
409
+ git config --global user.name "Your Name"
410
+ git config --global user.email "you@example.com"
411
+
412
+ # Default branch name
413
+ git config --global init.defaultBranch main
414
+
415
+ # Auto-setup remote tracking
416
+ git config --global push.autoSetupRemote true
417
+
418
+ # Pretty log format
419
+ git config --global alias.lg "log --oneline --graph --decorate"
420
+
421
+ # Rebase by default on pull
422
+ git config --global pull.rebase true
423
+ ```
424
+
425
+ ## Workflow Checklist
426
+
427
+ ### Before Starting Work
428
+ - [ ] Pull latest changes
429
+ - [ ] Create branch from main/develop
430
+ - [ ] Use descriptive branch name
431
+
432
+ ### During Development
433
+ - [ ] Commit frequently
434
+ - [ ] Write meaningful commit messages
435
+ - [ ] Keep commits focused
436
+ - [ ] Push regularly
437
+
438
+ ### Before Merging
439
+ - [ ] Rebase/merge latest changes
440
+ - [ ] Resolve conflicts
441
+ - [ ] Squash if needed
442
+ - [ ] Verify tests pass
443
+ - [ ] Request review
444
+
445
+ ### After Merging
446
+ - [ ] Delete feature branch
447
+ - [ ] Verify deployment
448
+ - [ ] Close related issues