Skip to content

Latest commit

Β 

History

History
99 lines (71 loc) Β· 3.63 KB

File metadata and controls

99 lines (71 loc) Β· 3.63 KB

πŸ—ΊοΈ Weekly Repository Map

For an overview of all available workflows, see the main README.

Visualize your repository's file structure and size distribution with a weekly ASCII tree map

The Weekly Repository Map workflow analyzes your repository's structure every week using standard bash tools, then creates a GitHub issue containing an ASCII tree map visualization showing directory hierarchy, file sizes, and key statistics.

Installation

Add the workflow to your repository:

gh aw add https://github.com/githubnext/agentics/blob/main/workflows/weekly-repo-map.md

Then compile:

gh aw compile

Note: This workflow creates GitHub Issues with the documentation label.

What It Does

The Weekly Repository Map runs every Monday and:

  1. Collects Repository Statistics β€” Counts files, measures sizes, and maps the directory structure using standard bash tools
  2. Generates ASCII Tree Map β€” Creates a visual representation of the repository hierarchy with proportional size bars
  3. Summarizes Key Metrics β€” Reports file type distribution, largest files, and directory sizes
  4. Creates an Issue β€” Posts the complete visualization as a GitHub issue, closing the previous week's issue

How It Works

graph LR
    A[Collect File Statistics] --> B[Compute Sizes & Counts]
    B --> C[Generate ASCII Tree Map]
    C --> D[Compute Key Statistics]
    D --> E[Create Issue Report]
Loading

Output: GitHub Issues

Each run produces one issue containing:

  • Repository Overview β€” Brief summary of the repository's structure and size
  • ASCII Tree Map β€” Visual directory hierarchy with size bars using box-drawing characters
  • File Type Breakdown β€” Count of files by extension
  • Largest Files β€” Top 10 files by size
  • Directory Sizes β€” Top directories ranked by total size

Example excerpt from an issue:

Repository Tree Map
===================

/ [1234 files, 45.2 MB]
β”‚
β”œβ”€ src/ [456 files, 28.5 MB] β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘
β”‚  β”œβ”€ core/ [78 files, 5.2 MB] β–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘
β”‚  └─ utils/ [34 files, 3.1 MB] β–ˆβ–ˆβ–ˆβ–‘β–‘
β”‚
β”œβ”€ docs/ [234 files, 8.7 MB] β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘
β”‚
└─ tests/ [78 files, 3.5 MB] β–ˆβ–ˆβ–ˆβ–‘β–‘

Configuration

The workflow uses these default settings:

Setting Default Description
Schedule Weekly on Monday When to run the analysis
Issue label documentation Label applied to created issues
Max issues per run 1 Prevents duplicate reports
Issue expiry 7 days Older issues are closed when a new one is posted
Timeout 10 minutes Per-run time limit

Customization

gh aw edit weekly-repo-map

Common customizations:

  • Change issue labels β€” Set the labels field in safe-outputs.create-issue to labels that exist in your repository
  • Adjust the schedule β€” Change to run more or less frequently (e.g., daily or monthly)
  • Customize exclusions β€” Update the bash commands to exclude additional directories (e.g., vendor/, dist/)
  • Adjust tree depth β€” Edit the prompt to change how deep the tree visualization goes (default max is 3–4 levels)

Related Workflows