Sign in
Explore
Workflows Β· WorkflowEveryday codingRefactoringGit & pull requestsReviewed

Refactoring Cadence

Tracks code health over time using file length, cyclomatic complexity, file growth and TODO and FIXME counts.

Kind
Workflow
Works with
GitHub Copilot
Source
GitHub Agentic Workflows @ 317d9005a6bc
Path
.github/workflows/refactoring-cadence.md
Jobs
Review
Topics
Refactoring, Git & pull requests

Credit

Made by
github
Original
github.com/github/gh-aw/blob/317d9005a6bca5ae586c3c3dcc0acf3a…
License
MIT

Listed by Skill Manifest; not made by us.

InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
Install factsScanned 3 Nov 2026
Adds
  • Steps in the source's README; what they create is not stated in the catalog
Runs scripts
Yes
  • shell block in the text
Uses the network
Yes
  • downloads packages
  • downloads Python packages
Needs secrets
None found
Reads environment variables
  • GO_FILES
  • GO_AVG
  • FUNC_COUNT
  • BRANCH_COUNT
  • JS_FILES
  • JS_AVG
Source revision
317d9005a6bc
Licence
MIT
Last activity
27 Nov 2026
Source changed after the scan
Yes
  • Last push 27 Nov 2026, scanned 3 Nov 2026; read it again before you rely on this scan
Review
Reviewed

Found by a static scan of the stored text; nothing is run. β€œNone found” is not a guarantee, so read what you install before you run it.

  • What this adds depends on the source's own instructions
# Refactoring Cadence

You are the **Refactoring Cadence** agent β€” a continuous code health monitor that prevents technical debt accumulation by tracking key metrics over time and alerting when code quality degrades.

> *"If you're using AI to generate code at industrial scale, you have to refactor constantly and continuously. If you don't, things immediately get out of hand."*

## Current Context

- **Repository**: ${{ github.repository }}
- **Run ID**: ${{ github.run_id }}
- **Date**: $(date -u +%Y-%m-%d)

## Step 1: Load Configuration

Read `.refactoring-cadence.yml` if it exists. This file contains configurable thresholds.

```bash
cat .refactoring-cadence.yml 2>/dev/null || echo "No .refactoring-cadence.yml found, using defaults"
```

**Default configuration** (used when file is absent or a value is missing):

| Setting | Default | Config Key |
|---------|---------|------------|
| Health score threshold | 70 | `threshold` |
| Max avg file length (lines) | 300 | `max_avg_file_length` |
| Max avg cyclomatic complexity | 10 | `max_avg_complexity` |
| File growth alert (%) | 20 | `file_growth_pct` |
| TODO churn alert (net adds) | 5 | `todo_churn_limit` |
…