#04 Claude Code Team v2 (Tuned)

Quality

claude-code-team-2 · v2.1.41

Files Created

363

376 unique

Total Tool Calls

2111

across 30 agents

Active Agents

29

contributing code

Estimated Cost

$73.92

1446 API requests

Codebase Output

376 files

Files by Directory

database/migrations
47
app/Models
44
database/factories
41
app/Livewire
41
tests/Feature
41
resources/views
39
app/Enums
28
database/seeders
19
app/Services
17
app/Policies
10
app/Exceptions
7
app/Jobs
6
tests/Unit
6
app/ValueObjects
5
app/Events
5

Files per Agent (top 12)

phase1-builder
55w 9e
Phase 6+7: Customers + Admin
57w 5e
Phase 4: Cart/Checkout/Discounts
57w 4e
Phase 5: Payments/Orders/Fulfillment
50w 8e
phase2-catalog
43w 2e
phase3-storefront
39w 4e
Phase 8-10: Search/Analytics/Webhooks
37w 5e
Phase 11: Seeders and polish
21w 11e
Fix PHPStan errors in Services
1w 28e
Fresh agent code review
1w 7e
Build Checkout + Confirmation components
6w 1e
Build Cart Show full page UI
2w 0e

Code Quality Assessment

PHPMetrics

Code Quality Assessment

PHPMetrics 2.9.1

Classes

150

Lines of Code

6.0K

Avg MI

89.7

Avg Complexity

4.5

Est. Bugs

12.4

Violations

25

7 errors

Complexity Distribution

Low (CCN <= 5)
117 (78%)
Medium (6-10)
18 (12%)
High (> 10)
15 (10%)

Maintainability Distribution

Excellent (>= 85)
82 (54.7%)
Good (70-84)
28 (18.7%)
Moderate (55-69)
35 (23.3%)
Low (< 55)
5 (3.3%)

Most Complex Classes

ClassCCNLOCMI
OrderService
App\Services
50174
56
DiscountService
App\Services
40141
59
SearchService
App\Services
36145
60
ProductService
App\Services
28128
65
ShippingCalculator
App\Services
27126
68

Least Maintainable Classes

ClassMICCNLOC
Checkout\Show
App\Livewire\Storefront
36
1284
Cart\Show
App\Livewire\Storefront
43
951
AggregateAnalytics
App\Jobs
47
631
Products\Form
App\Livewire\Admin
53
1671
Discounts\Form
App\Livewire\Admin
53
950

Most Coupled Classes

Order
19
User
18
OrderService
17
Store
17
Product
13

Coupling Metrics

Avg Afferent (incoming)1.08
Avg Efferent (outgoing)2.97
Avg Instability0.79
Avg LCOM1.83
Max LCOM5

Halstead Metrics

Avg Volume247.7
Avg Difficulty4.40
Avg Bugs/Class0.083
Total Est. Bugs12.4
Comment Ratio25.29%
Avg LOC/Class40.2

SonarCloud Analysis

PR #4 - Quality Gate Failed
FAIL

Quality Gate: Failed

PR #4 · claude-code-team-2main

8.7h technical debt

64 issues total

View on SonarCloud

Bugs

0

A

Reliability

Vulnerabilities

0

A

Security

Code Smells

64

A

Maintainability

Hotspots

22

To review

Lines of Code

17.3K

PHP

Duplication

7.5%

on new code

Coverage

0%

not configured

Issues by Severity

Critical
31
Major
8
Minor
25
Total64

Security Hotspots (22)

Weak Cryptography
MEDIUM16

Pseudorandom number generator usage in seeder and test files

Encrypt Data
LOW4

Data encryption review needed

Others
LOW2

Miscellaneous security considerations

Top Issue Rules

Duplicate String LiteralsS1192
24
CRITICAL
Unused Local VariablesS1481
14
MINOR
Immediately Return ExpressionS1488
7
MINOR
Cognitive ComplexityS3776
7
CRITICAL
Field Naming ConventionS116
3
MINOR
Excessive Return StatementsS1142
3
MAJOR
Too Many Lines of CodeS138
2
MAJOR
Unused Function ParametersS1172
2
MAJOR

Highest complexity: OrderService, DiscountService, and SearchService exceed the 15-point cognitive complexity threshold. 24 duplicate string literal issues are the largest single rule category. 7.5% duplication density exceeds the 3% threshold.