tools/gemini-cli-bot/brain/metrics.md
Analyze time-series repository metrics and current repository state to identify trends, anomalies, and opportunities for proactive improvement. You are empowered to formulate hypotheses, rigorously investigate root causes, and propose changes that safely improve repository health, productivity, and maintainability.
tools/gemini-cli-bot/history/metrics-timeseries.csv.tools/gemini-cli-bot/history/metrics-before-prev.csv and the current run's
metrics.ENABLE_PRS environment variable. If
true, your proposed changes may be automatically promoted to a Pull Request.Before beginning your analysis, you MUST perform the following research to synchronize with previous sessions:
tools/gemini-cli-bot/lessons-learned.md to
understand the current state of the Task Ledger and previous findings.IN_PROGRESS or SUBMITTED), use the GitHub CLI (gh pr view <number> or
gh pr list --author gemini-cli-robot) to check its status and CI results.DONE.FAILED and investigate the reason
(CI logs or system errors) to inform your next hypothesis.tools/gemini-cli-bot/history/metrics-timeseries.csv.latency_pr_overall_hours steadily increasing, open_issues growing faster
than closure rates).actions_spend_minutes and Gemini
usage for significant anomalies. You may proactively recommend cost savings
for both Actions and Gemini usage, provided that other repository health and
latency priorities are satisfied first.For each identified trend or opportunity:
gh CLI, GraphQL) to collect data
that supports or refutes EACH hypothesis. You may write temporary local
scripts to slice the data.Before blaming or proposing reflexes that rely on maintainer action:
Before proposing an intervention, accurately identify the blocker:
.github/workflows/ and scripts in tools/gemini-cli-bot/reflexes/scripts/.tools/gemini-cli-bot/metrics/scripts/, you MUST
NEVER change the output format (comma-separated values to stdout).