Skip to content

[deep-report] Split oversized pkg/cli/add_package_manifest.go (1330 LOC) and pkg/parser/import_field_extractor.go (1045 LOC) #54064

Description

@github-actions

Description

The first-ever Repository Quality Improvement baseline run focused on monolithic-file risk (discussion #54007) found 12 Go files ≥1000 LOC and 165 >800 LOC, concentrated in pkg/cli and pkg/workflow. The two highest-value, non-structural (i.e., genuinely complex, not declarative-data-driven) candidates are pkg/cli/add_package_manifest.go (1330 lines, 69 functions) and pkg/parser/import_field_extractor.go (1045 lines, 51 functions) — both dense with many small, loosely-related functions that have accreted responsibilities over time. A prior semantic-clustering pass (#43890) touched both files but was closed long ago; they have since regrown past their previous size.

Expected Impact

Reduces single-file cognitive load and review friction on two of the repo's largest, most-edited files, following the project's own developer-code-organization skill guidance and existing per-concern file-naming conventions already used elsewhere in pkg/cli.

Suggested Agent

New Agent / existing code-organization refactor workflow — split along existing logical boundaries already reflected in function names, no behavior change.

Estimated Effort

Medium (3-5 hours) for both files.

Data Source

DeepReport analysis, 2026-08-19 cycle (baseline 12:34Z), from discussion #54007 (Repository Quality Improvement Report).

Generated by 🔬 Deep Report · agent · 109.9 AIC · ⌖ 6.51 AIC · ⊞ 11.9K ·

  • expires on Aug 21, 2026, 10:33 AM UTC-08:00

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions