Skip to content

[plan] Monitor and document large file size guidelines #7145

Description

@github-actions

Objective

Establish monitoring for large files and document guidelines for when to consider splitting files.

Context

The analysis identified files approaching the "consider splitting" threshold:

  • js.go (41 functions) - JavaScript bundling/execution
  • scripts.go (37 functions) - Script generation
  • permissions.go (37 functions) - Permission handling
  • compiler_safe_outputs_consolidated.go (30 functions) - Already consolidated

Current guideline: Consider splitting when files exceed 50 functions.

Approach

  1. Document file size guidelines in developer documentation:

    • Add to AGENTS.md or DEVGUIDE.md
    • Specify: 50+ functions warrants consideration for splitting
    • Clarify: Domain complexity may justify larger files
    • Note: Current large files are appropriately sized for their domains
  2. Create monitoring mechanism:

    • Add a simple script or test that warns when files exceed thresholds
    • Could be integrated into CI or make targets
    • Non-blocking - just informational
  3. Document current large files:

    • Note why each large file is justified (domain complexity)
    • Set baseline for future comparison

Files to Create/Modify

  • AGENTS.md or DEVGUIDE.md - Add file size guidelines
  • scripts/check-file-sizes.sh (optional) - Monitoring script
  • .github/workflows/code-quality.yml (optional) - CI integration

Acceptance Criteria

AI generated by Plan Command for #7136

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