#17 Kimi Code · Kimi K3 Max (Sub-Agents + AgentSwarm)

Quality

2026-07-19-kimi-code-k3 · Kimi Code 0.27.0

Main Thread Tool Calls

688

32 unique tools

Sub-agent Tool Calls

2.8K

Bash / Edit / Playwright MCP

Sub-agents

24

19 Agent + 5 AgentSwarm

Estimated Cost

$190.38

485.6M tokens

Tool Usage per Sub-agent

24 agents
Phase 4: Cart/Checkout Engine
192
Browser Suite C: Customer Account + Tenant Isolation + Responsive + Accessibility (36 tests)
190
Phase 5: Payments/Orders
185
Phase 10: Apps/Webhooks/API (retry)
177
Phase 12: Polish (completion, post weekly-quota reset)
167
Phase 6: Accounts + Auth UI (retry)
166
Phase 1: Foundation
162
Phase 8: Search (FTS5)
144
Browser Suite E: Admin Orders + Discounts + Settings + Customers + Analytics (30 tests)
128
Browser Suite D: Admin Auth + Products + Collections + Pages (23 tests)
124
Phase 11: Demo Seeders
116
Phase 3: Themes + Storefront
114
Phase 7a: Admin Core UI
111
Phase 7c: Content/Settings/Themes UI
105
Phase 9: Analytics (attempt 1)
95
Browser Suite B: Cart + Checkout (25 tests)
84
Phase 2: Catalog
83
Browser Suite A: Smoke + Browsing + Inventory (29 tests)
79
Phase 7b: Orders/Customers/Discounts UI (attempt 1)
77
Phase 7b: Orders/Customers/Discounts UI (retry)
77
Phase 6: Accounts + Auth UI (attempt 1)
73
Phase 10: Apps/Webhooks/API (attempt 1)
73
Phase 12: Polish (attempt 1)
68
Phase 9: Analytics (completion)
56

Code Quality Assessment

PHPMetrics

Code Quality Assessment

PHPMetrics 2.9.1

Classes

226

Lines of Code

12.9K

Avg MI

96.4

Avg Complexity

6.3

Est. Bugs

36.3

max 2.4 in Form

Violations

0

0 errors, 0 warnings

Complexity Distribution

Low (CCN <= 5)
171 (75.7%)
Medium (6-10)
18 (8%)
High (> 10)
37 (16.4%)

Maintainability Distribution

Excellent (>= 85)
154 (68.1%)
Good (70-84)
36 (15.9%)
Moderate (55-69)
27 (11.9%)
Low (< 55)
9 (4%)

Most Complex Classes

Form

App\Livewire\Admin\Products

CCN 80

CheckoutService

App\Services

CCN 53

ProductService

App\Services

CCN 49

OrderService

App\Services

CCN 46

SearchService

App\Services

CCN 46

Least Maintainable

Form

CCN 80 · 453 LOC

ProductPolicy

CCN 3 · 35 LOC

ThemePolicy

CCN 3 · 31 LOC

OrderPolicy

CCN 2 · 30 LOC

Shipping

CCN 31 · 274 LOC

Most Coupled Classes

Order

31

CheckoutService

30

Store

28

Product

27

User

21

Max Efferent

30

Max LCOM

6

Notes

  • PHPMetrics flags 0 rule violations across 226 classes, with a strong average MI of 96.4 - second-highest on the page behind #13's 104.5 - despite 12.9K class-LOC that's the largest on the page outside #12's goal-mode run.
  • SonarCloud tells a different story: 105 unresolved issues on PR #27 (15 critical, 76 major, 14 minor) = 2 bugs, 0 vulnerabilities, and 103 code smells. The quality gate FAILED on new-code reliability (C) alone; security and maintainability both passed (A).
  • The two BUG-type issues are both accessibility-adjacent: a missing input id/label pair in the admin theme editor, and a storefront order-history table missing column headers.
  • 12.9K class-LOC (18.7K ncloc) across 226 classes - the largest codebase in this comparison after #12's goal-mode run, built over 20h 21m of active work spread across a week of repeated quota stalls.

SonarCloud Analysis

PR #27 - Quality Gate Failed
Quality Gate: Failedon new code (PR #27)

Reliability on New Code

C> 1

Security on New Code

A> 1

Maintainability on New Code

A> 1

Duplicated Lines on New Code

2.2%> 3.0%

Security Hotspots Reviewed

100.0%< 100%

Bugs

2

Vulnerabilities

0

Code Smells

103

Security Hotspots

0

Lines of Code

18.7K

Duplication

2.3%

Tech Debt

16h

934 min

Reliability

C

new code

Security

A

new code

Maintainability

A

new code

Issues by Severity (105 total)

critical
15
major
76
minor
14

103 of the 105 issues are code smells rather than bugs or vulnerabilities - the gate fails purely on the reliability rating (C), driven by the 2 BUG-type findings: a missing input/label pairing in the admin theme editor and a storefront order-history table with no column headers, both accessibility defects rather than functional breakage.

Top Issue Rules

php:S1172
23

Unused function parameters should be removed

Mostly unused $request/$id parameters left over from the phase-by-phase Livewire component scaffolding across admin CRUD forms.

Web:S6840
13

DOM elements should use the "autocomplete" attribute correctly

Storefront and admin auth/checkout forms are missing autocomplete hints on email, name, and address fields.

php:S1192
13

String literals should not be duplicated

Repeated status strings and validation messages across the 24 sub-agent phases, never centralized into constants or enums.

Web:S6819
11

Prefer tag over ARIA role

Flux UI components use role="button"/role="link" on generic elements instead of native <button>/<a>.

php:S116
11

Field names should comply with a naming convention

Snake_case properties leaking in from Eloquent attribute casts and DTOs.

php:S112
7

Generic exceptions (e.g. RuntimeException, Exception) should not be thrown

Service-layer guard clauses throw bare RuntimeException instead of a domain-specific exception hierarchy.

php:S1142
6

Functions should not contain too many return statements

Concentrated in the admin Products Form component - the same class that tops the PHPMetrics complexity table (CCN 80).

Web:S6851
3

Images should have a non-redundant alternate description

Product-image alt text repeats the product title already present as adjacent visible text.

php:S4144
3

Two methods should not have the same implementation

Near-duplicate authorization checks across sibling admin policies, one per resource type.

php:S3358
3

Ternary operators should not be nested

Nested status-label ternaries in order/fulfillment badge rendering.

The issue mix is almost entirely maintainability code smells (unused parameters, duplicated strings, missing ARIA/autocomplete attributes) rather than correctness bugs - consistent with a 24-way phase pipeline where each sub-agent scaffolded its own forms independently without a shared constants/exception layer.