class AgentRenderer

Methods

string
render(DiagnosticReport $report)

Render the report as a single line of agent-optimized JSON.

array
payload(DiagnosticReport $report)

Build the agent-optimized report payload.

array
issue(DiagnosticOutcome $outcome)

Build the payload entry for an actionable diagnostic outcome.

array
fix(DiagnosticFixOutcome $outcome)

Build the payload entry for an applied fix.

Details

at line 17
string render(DiagnosticReport $report)

Render the report as a single line of agent-optimized JSON.

Parameters

DiagnosticReport $report

Return Value

string

at line 31
protected array payload(DiagnosticReport $report)

Build the agent-optimized report payload.

Follows the agent-optimized output convention established by Laravel PAO: aggregate counts up front and only actionable outcomes itemized, so agents get a minimal, parseable report.

Parameters

DiagnosticReport $report

Return Value

array

at line 67
protected array issue(DiagnosticOutcome $outcome)

Build the payload entry for an actionable diagnostic outcome.

The fixable flag is an instruction to re-run with --fix, so fixes that require a choice omit it and expose their options instead, letting the agent apply the change itself or escalate a concrete shortlist.

Parameters

DiagnosticOutcome $outcome

Return Value

array

at line 86
protected array fix(DiagnosticFixOutcome $outcome)

Build the payload entry for an applied fix.

Parameters

DiagnosticFixOutcome $outcome

Return Value

array