Skip to content

Comments

Daily Repo Goal Achiever: Add Daily File Diet workflow#194

Draft
github-actions[bot] wants to merge 1 commit intomainfrom
daily-goal-achiever-2026-02-22-file-diet-a9538b722d2e30ac
Draft

Daily Repo Goal Achiever: Add Daily File Diet workflow#194
github-actions[bot] wants to merge 1 commit intomainfrom
daily-goal-achiever-2026-02-22-file-diet-a9538b722d2e30ac

Conversation

@github-actions
Copy link
Contributor

This PR adds the Daily File Diet workflow from Phase 2 of the Daily Repo Goal Achiever task.

Phase 1: Consistency Check

No new consistency issues were found. The four docs pages previously missing the standard README backlink are already being addressed by open PR #192.

Phase 2: Daily File Diet Workflow

Source: daily-file-diet.md in gh-aw

Merge rate: 79% — 26 merged PRs out of 33 proposed in gh-aw, making it one of the more successful refactoring workflows in Peli's Agent Factory.

Why it's valuable: Large files are a universal code smell that slows every team down regardless of language. Files over 500 lines are harder to navigate, create more merge conflicts, mix concerns, and are harder to test in isolation. This workflow finds the largest non-test source file each weekday and creates a targeted refactoring issue with a concrete split strategy — one file at a time to keep the backlog manageable. If no file exceeds the threshold, it reports all-clear.

Generalization plan: The original workflow was deeply Go-specific: it used the Serena Go language server for semantic analysis, restricted scanning to the pkg/ directory, and used Go-specific bash commands. The adapted version:

  • Removes Serena entirely and uses basic bash (find, wc -l, grep) instead
  • Scans for common source extensions (.go, .py, .ts, .js, .rb, .java, .rs, .cs, .cpp, .c) across the full repository
  • Excludes standard non-source directories (node_modules, vendor, dist, build, target, __pycache__, venv, coverage)
  • Skips test files (files matching _test.go, .test.ts, .spec.js, test_*.py, etc.)
  • Adjusts the threshold from 800 to 500 lines, which is more appropriate for general repositories
  • Provides language-agnostic refactoring guidance based on each language's conventions

Proposed name: Daily File Diet (same as original)

Files Added

  • workflows/daily-file-diet.md — workflow definition
  • docs/daily-file-diet.md — documentation page
  • README.md — added entry in the "Code Improvement Workflows (by making changes)" section

Generated by Daily Repo Goal Achiever

Generated by Daily Repo Goal Achiever

Adds a language-agnostic workflow that monitors source file sizes
and creates actionable refactoring issues when files exceed 500 lines.

Adapted from Peli's Agent Factory (79% merge rate, 26 merged PRs).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Contributor Author

✅ Pull request created: #194

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants