claude-autopm 2.11.0 → 2.12.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.
@@ -16,15 +16,9 @@
16
16
  └─────────────────────────────────────────────────────────────────────┘
17
17
  ```
18
18
 
19
- ### 📋 Overview
20
-
21
- Every task follows a structured workflow to ensure quality, traceability, and team coordination. This workflow applies to all development tasks: features, bugs, improvements, and technical debt.
22
-
23
- **MANDATORY**: All code development MUST follow TDD (Test-Driven Development) cycle. This is not optional.
24
-
25
19
  ### 🎯 Core Workflow Principles
26
20
 
27
- 1. **Follow TDD Religiously** - Test FIRST, code SECOND (see banner above)
21
+ 1. **Follow TDD Religiously** - Test FIRST, code SECOND
28
22
  2. **Work in Branches** - Never commit directly to main
29
23
  3. **Create Pull Requests** - All changes go through PR review
30
24
  4. **Resolve Conflicts** - Address merge conflicts immediately
@@ -32,134 +26,26 @@ Every task follows a structured workflow to ensure quality, traceability, and te
32
26
  6. **Merge When Ready** - Only merge after all checks pass
33
27
  7. **Mark Complete** - Update task status and move to next task
34
28
 
35
- ### 🚀 Standard Task Workflow
36
-
37
- #### 1. Pick a Task from Backlog
38
-
39
- ```bash
40
- # View available tasks (GitHub Issues, Azure DevOps, Jira, etc.)
41
- gh issue list --label="ready"
42
-
43
- # Or use project management commands
44
- /pm:backlog
45
- /azure:work-items --state=Ready
46
- ```
47
-
48
- **Task Selection Criteria:**
49
- - Task has clear **Acceptance Criteria**
50
- - Task has **Definition of Done** documented
51
- - Dependencies are resolved
52
- - Task is properly sized (not too large)
53
-
54
- #### 2. Create Feature Branch
55
-
56
- ```bash
57
- # Create branch from latest main
58
- git checkout main
59
- git pull origin main
60
- git checkout -b feature/TASK-ID-short-description
61
-
62
- # Examples:
63
- # git checkout -b feature/ISSUE-123-user-authentication
64
- # git checkout -b bugfix/ISSUE-456-fix-login-error
65
- # git checkout -b improvement/ISSUE-789-optimize-api
66
- ```
67
-
68
- **Branch Naming Convention:**
69
- - `feature/TASK-ID-description` - New features
70
- - `bugfix/TASK-ID-description` - Bug fixes
71
- - `improvement/TASK-ID-description` - Improvements
72
- - `docs/TASK-ID-description` - Documentation
73
- - `refactor/TASK-ID-description` - Refactoring
74
-
75
- #### 3. Implement Solution
76
-
77
- **🚨 CRITICAL: ALWAYS Follow TDD Cycle (RED-GREEN-REFACTOR)**
78
-
79
- See `.claude/rules/tdd.enforcement.md` for complete TDD enforcement rules.
80
-
81
- **Before Starting:**
82
- ```bash
83
- # Use specialized agents for implementation
84
- @python-backend-engineer implement user authentication API following TDD
85
- @react-frontend-engineer create login component following TDD
86
- @test-runner run existing tests to ensure baseline
87
- ```
88
-
89
- **🔴 TDD STEP 1: RED Phase (Write Failing Test First)**
90
-
91
- ```bash
92
- # ALWAYS write the test FIRST
93
- # Example for authentication endpoint:
94
-
95
- # 1. Create test file BEFORE implementation
96
- touch tests/test_authentication.py # Python
97
- touch __tests__/authentication.test.ts # TypeScript
98
-
99
- # 2. Write failing test that describes desired behavior
100
- # Example test:
101
- ```
102
-
103
- ```python
104
- # tests/test_authentication.py
105
- def test_user_registration_creates_user():
106
- """Test that user registration creates a new user in database"""
107
- response = client.post('/api/register', json={
108
- 'email': 'test@example.com',
109
- 'password': 'SecurePassword123!'
110
- })
111
-
112
- assert response.status_code == 201
113
- assert 'id' in response.json()
114
- assert 'token' in response.json()
115
- # Test MUST fail because endpoint doesn't exist yet
116
- ```
117
-
118
- ```bash
119
- # 3. Run test and CONFIRM it fails
120
- @test-runner run authentication tests # MUST SEE RED ❌
121
-
122
- # 4. Commit the failing test
123
- git add tests/test_authentication.py
124
- git commit -m "test: add failing test for user registration"
125
- ```
29
+ ### 🚀 Task Execution Steps
126
30
 
127
- **✅ TDD STEP 2: GREEN Phase (Minimum Code to Pass)**
31
+ #### 1. Pick Task → 2. Create Branch → 3. Implement (TDD) 4. Verify → 5. Create PR → 6. Address Feedback → 7. Merge → 8. Complete → 9. Next Task
128
32
 
33
+ **TDD Implementation (Step 3):**
129
34
  ```bash
130
- # 1. Write MINIMUM code to make test pass
131
- # Don't add extra features, don't over-engineer
132
- # Just make the test green
35
+ # 🔴 RED: Write failing test FIRST
36
+ touch tests/test_feature.py
37
+ @test-runner run tests/test_feature.py # MUST FAIL
38
+ git commit -m "test: add failing test for feature"
133
39
 
134
- # 2. Run test and CONFIRM it passes
135
- @test-runner run authentication tests # MUST SEE GREEN
136
-
137
- # 3. Commit the passing implementation
138
- git add src/routes/authentication.py
139
- git commit -m "feat: add user registration endpoint"
140
- ```
141
-
142
- **♻️ TDD STEP 3: REFACTOR Phase (Clean Up Code)**
143
-
144
- ```bash
145
- # 1. Improve code structure
146
- # 2. Remove duplication
147
- # 3. Enhance readability
148
- # 4. Run tests to ensure they STAY GREEN
149
- @test-runner run all tests # ALL must be GREEN ✅
40
+ # GREEN: Write MINIMUM code to pass
41
+ @test-runner run tests/test_feature.py # MUST PASS
42
+ git commit -m "feat: implement feature"
150
43
 
151
- # 5. Commit the refactored code
152
- git add .
153
- git commit -m "refactor: improve authentication code structure"
44
+ # ♻️ REFACTOR: Improve while tests stay green
45
+ @test-runner run all tests # ALL MUST PASS ✅
46
+ git commit -m "refactor: improve feature structure"
154
47
  ```
155
48
 
156
- **🔁 REPEAT TDD Cycle for Each Feature**
157
-
158
- For EVERY new function, class, or feature:
159
- 1. 🔴 Write failing test FIRST
160
- 2. ✅ Write minimum code to pass
161
- 3. ♻️ Refactor while keeping tests green
162
-
163
49
  **Integration with Context7:**
164
50
  ```bash
165
51
  # Query documentation BEFORE implementing
@@ -168,445 +54,62 @@ mcp://context7/<framework>/authentication-patterns
168
54
  mcp://context7/<language>/test-frameworks
169
55
  ```
170
56
 
171
- **TDD Commit Pattern (MANDATORY):**
172
- ```bash
173
- # For each feature, you MUST have this commit sequence:
174
- git commit -m "test: add failing test for [feature]" # RED ❌
175
- git commit -m "feat: implement [feature]" # GREEN ✅
176
- git commit -m "refactor: improve [feature] structure" # REFACTOR ♻️
177
- git commit -m "docs: document [feature]" # DOCS 📚
178
- ```
179
-
180
- **❌ PROHIBITED (Will be rejected):**
181
- ```bash
182
- # DON'T do this:
183
- git commit -m "feat: add feature without tests" # ❌ NO TESTS
184
- git commit -m "WIP: partial implementation" # ❌ PARTIAL CODE
185
- git commit -m "TODO: add tests later" # ❌ DELAYED TESTING
186
- ```
187
-
188
- **Commit Message Format:**
189
- - `test:` - Test additions/changes (ALWAYS FIRST)
190
- - `feat:` - New feature (AFTER test passes)
191
- - `refactor:` - Code refactoring (AFTER test stays green)
192
- - `fix:` - Bug fix (AFTER failing test reproduces bug)
193
- - `docs:` - Documentation
194
- - `perf:` - Performance improvements
195
- - `chore:` - Maintenance tasks
196
-
197
- #### 4. Verify Acceptance Criteria
198
-
199
- **Before Creating PR:**
200
-
201
- Check against task's **Acceptance Criteria:**
202
- ```markdown
203
- Example Acceptance Criteria:
204
- - [ ] User can register with email and password
205
- - [ ] Password is hashed and stored securely
206
- - [ ] Registration sends confirmation email
207
- - [ ] User receives JWT token after successful registration
208
- - [ ] All tests pass (unit, integration, e2e)
209
- - [ ] API documentation is updated
210
- ```
211
-
212
- **Run Quality Checks:**
213
- ```bash
214
- # Run tests
215
- npm test # JavaScript/TypeScript
216
- pytest # Python
217
- go test ./... # Go
218
-
219
- # Run linters
220
- npm run lint # JavaScript/TypeScript
221
- ruff check # Python
222
- golangci-lint run # Go
223
-
224
- # Check type safety
225
- npm run typecheck # TypeScript
226
- mypy src/ # Python
227
-
228
- # Run formatters
229
- npm run format # JavaScript/TypeScript
230
- black . # Python
231
- go fmt ./... # Go
232
- ```
233
-
234
- #### 5. Create Pull Request
235
-
236
- ```bash
237
- # Push branch to remote
238
- git push origin feature/TASK-ID-short-description
239
-
240
- # Create PR using GitHub CLI
241
- gh pr create \
242
- --title "Feature: TASK-ID Short Description" \
243
- --body "$(cat <<'EOF'
244
- ## Summary
245
- Brief description of changes
246
-
247
- ## Related Issue
248
- Closes #TASK-ID
249
-
250
- ## Acceptance Criteria
251
- - [x] Criterion 1
252
- - [x] Criterion 2
253
- - [x] Criterion 3
254
-
255
- ## Definition of Done
256
- - [x] Code implemented and tested
257
- - [x] All tests passing
258
- - [x] Documentation updated
259
- - [x] No breaking changes (or documented)
260
- - [x] Security considerations addressed
261
-
262
- ## Test Plan
263
- 1. Unit tests: `npm test`
264
- 2. Integration tests: `npm run test:integration`
265
- 3. Manual testing: [steps performed]
266
-
267
- ## Screenshots/Evidence
268
- [If applicable]
269
-
270
- 🤖 Generated with [Claude Code](https://claude.com/claude-code)
271
- EOF
272
- )"
273
- ```
274
-
275
- **PR Title Format:**
276
- - `Feature: TASK-ID Short description`
277
- - `Bugfix: TASK-ID Short description`
278
- - `Improvement: TASK-ID Short description`
279
-
280
- #### 6. Monitor and Address PR Feedback
281
-
282
- **Check PR Status:**
283
- ```bash
284
- # View PR status
285
- gh pr view --web
286
-
287
- # Check for CI/CD failures
288
- gh pr checks
289
-
290
- # View PR comments
291
- gh pr view
292
- ```
293
-
294
- **If CI/CD Fails:**
295
- ```bash
296
- # Analyze failures
297
- @test-runner analyze failed tests
298
- @code-analyzer review changes for issues
299
-
300
- # Fix issues
301
- git add .
302
- git commit -m "fix: address CI failures"
303
- git push origin feature/TASK-ID-short-description
304
- ```
305
-
306
- **If Merge Conflicts:**
307
- ```bash
308
- # Update branch with latest main
309
- git checkout main
310
- git pull origin main
311
- git checkout feature/TASK-ID-short-description
312
- git merge main
313
-
314
- # Resolve conflicts (use specialized agents)
315
- @code-analyzer help resolve merge conflicts in <file>
316
-
317
- # After resolving
318
- git add .
319
- git commit -m "chore: resolve merge conflicts with main"
320
- git push origin feature/TASK-ID-short-description
321
- ```
322
-
323
- **Address Review Comments:**
324
- ```bash
325
- # Interpret reviewer feedback
326
- # Make requested changes
327
- git add .
328
- git commit -m "refactor: address PR feedback - improve error handling"
329
- git push origin feature/TASK-ID-short-description
330
-
331
- # Respond to comments on GitHub
332
- gh pr comment <PR-NUMBER> --body "Fixed as requested"
333
- ```
334
-
335
- #### 7. Merge Pull Request
336
-
337
- **Pre-merge Checklist:**
338
- - [ ] All CI/CD checks passing
339
- - [ ] No merge conflicts
340
- - [ ] All review comments addressed
341
- - [ ] At least one approval (if required)
342
- - [ ] Definition of Done satisfied
343
- - [ ] Documentation updated
344
-
345
- **Merge:**
346
- ```bash
347
- # Merge PR (using GitHub CLI)
348
- gh pr merge --squash --delete-branch
349
-
350
- # Or via web interface
351
- # Click "Squash and merge" button
352
- # Delete branch after merge
353
- ```
354
-
355
- #### 8. Mark Task Complete
356
-
357
- **Update Task Status:**
358
- ```bash
359
- # GitHub Issues
360
- gh issue close TASK-ID --comment "Completed in PR #PR-NUMBER"
361
-
362
- # Azure DevOps
363
- /azure:update-work-item TASK-ID --state=Closed
364
-
365
- # Jira (via MCP)
366
- mcp://jira/update TASK-ID status:Done
367
- ```
368
-
369
- **Update Task Labels:**
370
- - Remove: `in-progress`, `ready`
371
- - Add: `completed`, `merged`
372
-
373
- **Verify Deployment:**
374
- ```bash
375
- # Check if changes are deployed
376
- # (depends on your CD pipeline)
377
- git checkout main
378
- git pull origin main
379
- git log --oneline -5 # Verify your commit is in main
380
- ```
381
-
382
- #### 9. Move to Next Task
383
-
384
- ```bash
385
- # Clean up local branches
386
- git branch -d feature/TASK-ID-short-description
387
-
388
- # Return to main
389
- git checkout main
390
- git pull origin main
391
-
392
- # Pick next task and repeat workflow
393
- /pm:backlog
394
- gh issue list --label="ready"
395
- ```
396
-
397
- ### 🎨 Workflow Variations
398
-
399
- #### Hotfix Workflow (Production Bugs)
400
-
57
+ **Quality Checks (Step 4):**
401
58
  ```bash
402
- # Create hotfix from main
403
- git checkout main
404
- git pull origin main
405
- git checkout -b hotfix/ISSUE-ID-critical-bug
406
-
407
- # Implement fix
408
- # ...
409
-
410
- # Create PR with HIGH PRIORITY label
411
- gh pr create --label="priority:high,type:hotfix"
412
-
413
- # After merge, ensure it's deployed immediately
414
- # Follow your emergency deployment process
59
+ npm test # or pytest, go test, etc.
60
+ npm run lint # or ruff check, golangci-lint, etc.
61
+ npm run typecheck # or mypy, go vet, etc.
415
62
  ```
416
63
 
417
- #### Feature Flag Workflow
418
-
64
+ **PR Creation (Step 5):**
419
65
  ```bash
420
- # For large features, use feature flags
421
- # Implement behind flag
422
- # Deploy to production (flag disabled)
423
- # Test in production environment
424
- # Gradually enable for users
425
-
426
- # Example:
427
- if (featureFlags.newAuthentication) {
428
- // New implementation
429
- } else {
430
- // Existing implementation
431
- }
432
- ```
433
-
434
- ### 📊 Definition of Done (Standard)
435
-
436
- Every task is **complete** when:
437
-
438
- - [ ] **Code Complete**
439
- - All Acceptance Criteria met
440
- - Code follows project conventions
441
- - No TODOs or FIXMEs left unresolved
442
-
443
- - [ ] **Tests Pass**
444
- - All unit tests passing
445
- - All integration tests passing
446
- - All e2e tests passing (if applicable)
447
- - Code coverage meets threshold
448
-
449
- - [ ] **Quality Checks**
450
- - Linters pass (no warnings)
451
- - Formatters applied
452
- - Type checking passes
453
- - Security scan passes
454
-
455
- - [ ] **Documentation**
456
- - Code comments added (why, not what)
457
- - API documentation updated
458
- - README updated (if needed)
459
- - CHANGELOG updated (if applicable)
460
-
461
- - [ ] **Review Complete**
462
- - PR created and approved
463
- - All comments addressed
464
- - No merge conflicts
465
- - CI/CD pipeline green
466
-
467
- - [ ] **Deployed**
468
- - Changes merged to main
469
- - Deployed to target environment
470
- - Verified in production/staging
471
-
472
- - [ ] **Task Closed**
473
- - Issue/ticket closed
474
- - Status updated to "completed"
475
- - Labels updated
476
-
477
- ### 🔍 Common Acceptance Criteria Patterns
478
-
479
- #### For Features
480
- ```markdown
481
- ## Acceptance Criteria
482
- - [ ] User can [action] with [constraints]
483
- - [ ] System responds with [expected output]
484
- - [ ] Error handling for [edge case]
485
- - [ ] Performance: [metric] under [threshold]
486
- - [ ] Security: [requirement] implemented
487
- - [ ] Accessibility: [WCAG level] compliance
488
- ```
489
-
490
- #### For Bug Fixes
491
- ```markdown
492
- ## Acceptance Criteria
493
- - [ ] Bug no longer reproducible
494
- - [ ] Root cause identified and documented
495
- - [ ] Regression test added
496
- - [ ] Related bugs checked (not introduced)
497
- - [ ] Error logging improved
66
+ git push origin feature/TASK-ID-description
67
+ gh pr create --title "Feature: TASK-ID Description" --body "..."
498
68
  ```
499
69
 
500
- #### For Improvements
501
- ```markdown
502
- ## Acceptance Criteria
503
- - [ ] Performance improved by [X%]
504
- - [ ] Code complexity reduced
505
- - [ ] Technical debt addressed
506
- - [ ] Backward compatibility maintained
507
- - [ ] Migration path documented (if breaking)
508
- ```
509
-
510
- ### 🛠️ Using Specialized Agents in Workflow
511
-
512
- #### Throughout Workflow:
513
- ```bash
514
- # Code Analysis
515
- @code-analyzer review my changes for potential issues
516
- @code-analyzer trace logic flow in authentication module
517
-
518
- # Testing
519
- @test-runner execute test suite and analyze failures
520
- @test-runner run only authentication-related tests
70
+ ### 📊 Definition of Done
521
71
 
522
- # File Analysis
523
- @file-analyzer summarize large log file
524
- @file-analyzer extract errors from CI output
72
+ - [ ] Code Complete (Acceptance Criteria met, no TODOs)
73
+ - [ ] Tests Pass (unit, integration, e2e, coverage threshold met)
74
+ - [ ] Quality Checks (linters pass, formatters applied, type checking)
75
+ - [ ] Documentation (code comments, API docs, README, CHANGELOG)
76
+ - [ ] Review Complete (PR approved, comments addressed, CI/CD green)
77
+ - [ ] Deployed (merged to main, deployed, verified in production)
78
+ - [ ] Task Closed (issue closed, status updated)
525
79
 
526
- # Documentation
527
- @agent-manager document this workflow pattern
528
-
529
- # Multi-stream Work (Advanced)
530
- @parallel-worker coordinate feature implementation across services
531
- ```
532
-
533
- ### ⚠️ Important Reminders
80
+ ### ⚠️ Critical Rules
534
81
 
535
82
  **🚨 HIGHEST PRIORITY:**
536
-
537
- 1. **FOLLOW TDD CYCLE (RED-GREEN-REFACTOR)** - This is MANDATORY, not optional
538
- - 🔴 Write failing test FIRST (ALWAYS!)
539
- - ✅ Write minimum code to pass (no more, no less)
540
- - ♻️ Refactor while keeping tests green (never skip)
541
- - See `.claude/rules/tdd.enforcement.md` for enforcement rules
542
- - **ZERO TOLERANCE**: No code without tests. No exceptions.
543
-
544
- **📋 Critical Workflow Rules:**
545
-
546
- 2. **ALWAYS query Context7** before implementing:
547
- ```bash
548
- mcp://context7/<framework>/<topic>
549
- ```
550
-
551
- 3. **NEVER commit code before tests**:
552
- - First commit: `test: add failing test`
553
- - Second commit: `feat: implement feature`
554
- - Third commit: `refactor: improve structure`
555
-
83
+ 1. **FOLLOW TDD CYCLE** - ZERO TOLERANCE for code without tests
84
+ 2. **ALWAYS query Context7** before implementing: `mcp://context7/<framework>/<topic>`
85
+ 3. **NEVER commit code before tests** - Test first, code second, refactor third
556
86
  4. **ALWAYS use specialized agents** for non-trivial tasks
557
87
 
558
- 5. **NEVER commit to main** - always work in branches
559
-
560
- 6. **ALWAYS address PR feedback** - don't merge until resolved
561
-
562
- 7. **REMEMBER Definition of Done** - not complete until all criteria met
563
-
564
- 8. **VERIFY in production** - deployment is part of completion
565
-
566
- **❌ PROHIBITED PATTERNS (Auto-Reject):**
88
+ **❌ PROHIBITED PATTERNS:**
567
89
  - Writing code before tests
568
90
  - Committing "WIP" or "TODO: add tests"
569
91
  - Partial implementations without test coverage
570
92
  - Skipping refactor phase
571
93
  - Mock services in tests (use real implementations)
572
94
 
573
- ### 📚 Additional Resources
574
-
575
- - `.claude/rules/development-workflow.md` - Complete development patterns
576
- - `.claude/rules/git-strategy.md` - Git branch and merge strategies
577
- - `.claude/rules/tdd.enforcement.md` - Test-Driven Development requirements
578
- - `.claude/rules/github-operations.md` - GitHub CLI and PR management
579
- - `.claude/commands/pm/` - Project management command reference
580
-
581
- ### 🎯 Quick Reference Commands
95
+ ### 🎯 Quick Commands
582
96
 
583
97
  ```bash
584
98
  # Start task
585
- /pm:backlog # View tasks
99
+ /pm:backlog
586
100
  git checkout -b feature/ID-desc
587
101
 
588
102
  # During work
589
- @<agent> <task> # Use specialized agents
590
- mcp://context7/<lib>/<topic> # Query documentation
103
+ @<agent> <task>
104
+ mcp://context7/<lib>/<topic>
591
105
  git commit -m "type: message"
592
106
 
593
107
  # Before PR
594
- npm test # Run tests
595
- npm run lint # Run linters
108
+ npm test && npm run lint
596
109
  git push origin <branch>
597
110
 
598
- # Create PR
111
+ # Create & merge PR
599
112
  gh pr create
600
-
601
- # After feedback
602
- git merge main # Update branch
603
- git push origin <branch>
604
-
605
- # Merge and complete
606
113
  gh pr merge --squash --delete-branch
607
114
  gh issue close ID
608
- git checkout main && git pull
609
-
610
- # Next task
611
- /pm:backlog
612
115
  ```