mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-21 17:23:37 -07:00
Implement analysis phase.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# Phase: Policy Critique & Evaluation
|
||||
|
||||
## Goal
|
||||
|
||||
Evaluate the effectiveness of current repository policies and automation, and
|
||||
suggest improvements based on empirical data.
|
||||
|
||||
## Context
|
||||
|
||||
- Current "Pulse" scripts are in `tools/gemini-cli-bot/processes/scripts/`.
|
||||
(Note: These may be empty if not yet implemented).
|
||||
- Metrics and investigation results are available.
|
||||
- Previous lessons learned are in `tools/gemini-cli-bot/lessons-learned.md`.
|
||||
|
||||
## Instructions
|
||||
|
||||
1. **Review Policies**: Examine the existing automation in `.github/workflows/`
|
||||
and any scripts in `tools/gemini-cli-bot/processes/scripts/`.
|
||||
2. **Analyze Effectiveness**: Based on the metrics analysis from the
|
||||
Investigation phase, determine if the current policies are achieving their
|
||||
goals.
|
||||
- Is the "Pulse" triage effectively reducing issue/PR latency?
|
||||
- Are stale issues being closed as expected?
|
||||
- Is the "Brain" identifying the right problems?
|
||||
3. **Identify Gaps**: Where is the automation failing? Are there manual tasks
|
||||
that should be automated?
|
||||
4. **Propose Changes**: Recommend specific changes to:
|
||||
- GitHub Workflows.
|
||||
- Triage scripts.
|
||||
- Repository `CONTRIBUTING.md` or `GEMINI.md` guidelines.
|
||||
5. **Record Critique**: Append your evaluation and proposed changes to
|
||||
`tools/gemini-cli-bot/lessons-learned.md`.
|
||||
@@ -0,0 +1,83 @@
|
||||
# Phase: Metrics Investigation & Root-Cause Analysis
|
||||
|
||||
## Goal
|
||||
|
||||
Analyze time-series repository metrics to identify trends and anomalies,
|
||||
formulate hypotheses, and rigorously investigate root causes to safely improve
|
||||
repository health.
|
||||
|
||||
## Context
|
||||
|
||||
- Time-series repository metrics are stored in
|
||||
`tools/gemini-cli-bot/history/metrics-timeseries.csv`.
|
||||
- Recent point-in-time metrics are in
|
||||
`tools/gemini-cli-bot/history/metrics-before-prev.csv` and the current run's
|
||||
metrics.
|
||||
- Findings and state are recorded in `tools/gemini-cli-bot/lessons-learned.md`.
|
||||
|
||||
## Repo Policy Priorities
|
||||
|
||||
When analyzing data and proposing solutions, prioritize the following in order:
|
||||
|
||||
1. **Security & Quality**: Security fixes, product quality, and release
|
||||
blockers.
|
||||
2. **Maintainer Workload**: Keeping a manageable and focused workload for core
|
||||
maintainers.
|
||||
3. **Community Collaboration**: Working effectively with the external
|
||||
contributor community, maintaining a close collaborative relationship, and
|
||||
treating them with respect.
|
||||
|
||||
## Instructions
|
||||
|
||||
### 1. Read & Identify Trends (Time-Series Analysis)
|
||||
|
||||
- Load and analyze `tools/gemini-cli-bot/history/metrics-timeseries.csv`.
|
||||
- Identify significant anomalies or deteriorating trends over time (e.g.,
|
||||
`latency_pr_overall_hours` steadily increasing, `open_issues` growing faster
|
||||
than closure rates, spikes in `review_distribution_variance`).
|
||||
|
||||
### 2. Hypothesis Testing & Deep Dive
|
||||
|
||||
For each metric not meeting goals or showing a negative trend:
|
||||
|
||||
- **Develop Competing Hypotheses**: Brainstorm multiple potential root causes
|
||||
(e.g., "PR Latency is high because CI is flaky" vs. "PR Latency is high
|
||||
because reviewers are unresponsive").
|
||||
- **Gather Evidence**: Use your tools (e.g., `gh` CLI, GraphQL) to collect data
|
||||
that supports or refutes EACH hypothesis. You may write temporary local
|
||||
scripts to slice the data (e.g., checking issue labels, ages, or assignees).
|
||||
- **Select Root Cause**: Identify the hypothesis most strongly supported by the
|
||||
data.
|
||||
- **Prioritize Impact**: Always prioritize solving for verified hypotheses that
|
||||
have the largest impact (e.g., if 30 out of 500 PRs have merge conflicts,
|
||||
fixing merge conflicts is lower priority than addressing a bottleneck
|
||||
affecting 300 PRs).
|
||||
|
||||
### 3. Maintainer Workload Assessment
|
||||
|
||||
Before blaming or proposing processes that rely on maintainer action (e.g., more
|
||||
triage, more reviews):
|
||||
|
||||
- **Quantify Capacity**: Assess the volume of open, unactioned work (untriaged
|
||||
issues, review requests) against the number of active maintainers.
|
||||
- If the ratio indicates overload, **do not propose solutions that simply
|
||||
generate more pings**. Instead, prioritize systemic triage, automated routing,
|
||||
or auto-closure processes.
|
||||
|
||||
### 4. Actor-Aware Bottleneck Identification
|
||||
|
||||
Before proposing an intervention, accurately identify the blocker:
|
||||
|
||||
- **Waiting on Author**: Needs a polite nudge or closure grace period.
|
||||
- **Waiting on Maintainer**: Needs routing, aggregated reports, or escalation
|
||||
(do not nudge the author).
|
||||
- **Waiting on System (CI/Infra)**: Needs tooling fixes or reporting.
|
||||
|
||||
### 5. Record Findings & Propose Actions
|
||||
|
||||
- Document your formulated hypotheses, the evidence gathered, and your final
|
||||
conclusions in `tools/gemini-cli-bot/lessons-learned.md`.
|
||||
- Propose specific, data-backed actions or script updates to address the root
|
||||
cause. Ensure proposed actions align with the Repo Policy Priorities and
|
||||
include concepts like graceful closures and terminal escalations to prevent
|
||||
spam.
|
||||
Reference in New Issue
Block a user