## Problem
Repository metrics showed a massive surge in GitHub Action minutes (+5198 min in a short period). Investigation revealed that heavy CI (`ci.yml`) and E2E (`trigger_e2e.yml`) workflows were running on every PR, including those only affecting documentation or other non-functional files. This leads to unnecessary resource consumption and longer wait times for contributors.
## Changes
- **Implemented Path Filters**: Added `paths-ignore` to `ci.yml` and `trigger_e2e.yml` for non-functional files (docs, markdown, templates, etc.).
- **Sharded Content Checks**: Created a new, lightweight `.github/workflows/content-check.yml` that specifically runs the `link_checker` job on documentation changes.
- **Improved Workflow Robustness**: Fixed quoting in the `ci.yml` strategy matrix to satisfy both `yamllint` and `actionlint`.
- **Refined Rollup Logic**: Updated the `ci` rollup job in `ci.yml` to remove the dependency on the now-sharded `link_checker`.
## Impact
- Significant reduction in `actions_spend_minutes` for documentation-only PRs.
- Reduced resource pressure on the 16-core runners.
- Faster feedback for contributors making minor updates.
- Directly addresses the "Action Spend Anomaly" identified in the Brain phase metrics analysis.
This update resolves the bot's persistent focus on already-completed tasks:
- Moves and syncs lessons-learned.md to tools/gemini-cli-bot/ to ensure persistent memory.
- Marks metrics fixes, prompt hardenings, and user rejection signals as DONE in the ledger.
- Implements the CI matrix optimization (Node 20.x for PRs) the bot was re-attempting.
- This forces the bot to rotate to a new domain in the next run by satisfying its current goals.
This update hardens the bot's reasoning and validation layers to stop thrashing and ensure technical quality:
- Mandates local validation (lint, build, test) in Brain and Critique prompts.
- Uncaps bottleneck metrics (zombie issues, priority distribution) to 1000 items.
- Enhances PR awareness to handle multiple bot identities and exclude release PRs.
- Formally defines closed (unmerged) PRs as explicit user rejection signals.
- Strengthens domain rotation and anti-pigeonholing enforcement.
Fixes the throughput metrics script and introduces new visibility into backlog bottlenecks and priority distribution.
### Changes
- **Throughput Fixes**: Resolved a `ReferenceError` where `isMaintainer` was not correctly scoped, fixed a malformed license header, and added a new metric for `issue_arrival_rate_per_day` to enable growth-vs-closure analysis.
- **Backlog Bottlenecks**: Introduced `bottlenecks.ts` to identify "Zombie" issues (no activity > 30 days) and "Hot" issues (high activity).
- **Priority Distribution**: Introduced `priority_distribution.ts` to track the count of open issues by priority level (P0-P3).
### Impact
These metrics will provide the necessary data to confirm if the repository is experiencing systemic backlog growth (Arrival Rate > Throughput) and help identify which segments of the backlog require urgent triage.