Skip to content

[plan] Split audit_report_render.go into domain-focused render files #23906

@github-actions

Description

@github-actions

Objective

Split pkg/cli/audit_report_render.go (1,045 lines) into domain-focused render files without changing any function signatures.

Context

From discussion #23903 (Repository Quality: File Size Discipline). This file has 25+ render functions spanning many distinct report domains, violating the 300-line hard limit documented in AGENTS.md. The file already has good function-level organization — just redistribute functions into logical groups.

Approach

Split by domain:

  1. pkg/cli/audit_render_overview.gorenderJSON, renderConsole, renderOverview, renderMetrics, renderJobsTable, renderAuditComparison
  2. pkg/cli/audit_render_tools.gorenderToolUsageTable, renderMCPToolUsageTable
  3. pkg/cli/audit_render_security.gorenderGuardPolicySummary, renderFirewallAnalysis, renderRedactedDomainsAnalysis, renderPolicyAnalysis
  4. pkg/cli/audit_render_insights.gorenderKeyFindings, renderRecommendations, renderAgenticAssessments, renderBehaviorFingerprint, renderTaskDomain
  5. pkg/cli/audit_render_metrics.gorenderPerformanceMetrics, renderEngineConfig, renderPromptAnalysis, renderSessionAnalysis, renderCreatedItemsTable, formatUnixTimestamp

Rules

  • Keep the same package (package cli)
  • Do NOT change any function signatures or type definitions
  • Run make fmt after changes
  • Run go test ./pkg/cli/ -run ".*[Aa]udit.*" to validate
  • Run make agent-finish before committing

Acceptance Criteria

  • Each of the 5 domain-focused files is created with the appropriate functions
  • Original audit_report_render.go removed or reduced
  • All audit-related tests pass
  • Each new file is under 300 lines

Generated by Plan Command for issue #discussion #23903 ·

  • expires on Apr 3, 2026, 2:40 PM UTC

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions