Files
gemini-cli/tools/gemini-cli-bot
gemini-cli-robot 0865b12c0f ## Metric Improvement: Accuracy of Open Issues and PR Counts
### What the change is
This PR updates the `open_issues.ts` and `open_prs.ts` metric scripts to use the GitHub Search API for retrieving total counts, rather than listing items with a hardcoded limit of 1000.

### Why it is recommended
The current implementation caps the number of open issues and PRs at 1000. Repository metrics currently show exactly 1000 open issues, indicating that the true scale of the backlog is being masked. Accurate data is essential for the "Brain" phase to formulate effective strategies for repository health.

### Which metric is expected to be improved
`open_issues` and `open_prs`.

### By how much the metric is expected to improve
This change improves the **accuracy** of these metrics from a capped value of 1000 to the true total count. Based on current trends, we expect the reported `open_issues` value to increase significantly, providing a more realistic baseline for future triage efforts.
2026-04-27 16:46:02 +00:00
..

Gemini CLI Bot (Cognitive Repository)

This directory contains the foundational architecture for the gemini-cli-bot, transforming the repository into a proactive, evolutionary system.

It implements a dual-layer approach to balance immediate responsiveness with long-term strategic optimization.

Layered Execution Model

1. System 1: The Pulse (Reflex Layer)

  • Purpose: High-frequency, deterministic maintenance and data collection.
  • Frequency: 30-minute cron (.github/workflows/gemini-cli-bot-pulse.yml).
  • Implementation: Pure TypeScript/JavaScript scripts.
  • Role: Currently focuses on gathering repository metrics (tools/gemini-cli-bot/metrics/scripts).
  • Output: Action execution and metrics-before.csv artifact generation.

2. System 2: The Brain (Reasoning Layer)

  • Purpose: Strategic investigation, policy refinement, and self-optimization.
  • Frequency: 24-hour cron (.github/workflows/gemini-cli-bot-brain.yml).
  • Implementation: Agentic Gemini CLI phases.
  • Role: Analyzing metric trends and running deeper repository health investigations.

Directory Structure

  • metrics/: Contains the deterministic runner (index.ts) and individual TypeScript scripts (scripts/) that use the GitHub CLI to track metrics like open issues, PR latency, throughput, and reviewer domain expertise.
  • processes/scripts/: Placeholder directory for future deterministic triage and routing scripts.
  • investigations/: Placeholder directory for agentic root-cause analysis phases.
  • critique/: Placeholder directory for policy evaluation.
  • history/: Storage for downloaded metrics artifacts from previous runs.

Usage

To manually collect repository metrics locally, run the following command from the workspace root:

npm run metrics

This will execute all scripts within metrics/scripts/ and output the results to a metrics-before.csv file in the root directory.