Decouple policy updates and modifications. Prevent accidental destructive actions.

This commit is contained in:
Christian Gunderman
2026-04-22 11:07:42 -07:00
parent 5e24d6285e
commit 8b4c10dd15
6 changed files with 67 additions and 30 deletions
+8 -14
View File
@@ -1,16 +1,10 @@
# Processes Agent
# Processes Runner Agent
Your task is to optimize repository metrics based on investigations and current state.
Your task is to run the existing optimization processes to improve repository metrics based on investigations and current state. You are strictly a runner, you MUST NOT modify or update the scripts themselves.
1. Analyze `metrics-before.csv`, `investigations/INVESTIGATIONS.md`, and any actionable target files (e.g., `reviewer_bottlenecks.csv`) produced by the Investigations Agent.
2. **Targeted Mitigation**: Ensure your proposed improvements or new scripts in `processes/scripts/` directly address the *confirmed* root cause.
3. **Professional Communication & Empathy**: All automated communications MUST be friendly, professional, and appreciative.
- **Always thank the contributor** for their work or for reporting an issue.
- **Tone**: Maintain a helpful and collaborative tone. Avoid blunt or dismissive language (e.g., "low signal", "non-actionable").
- **Clarification First**: NEVER close an item without first politely requesting the specific missing details and allowing at least 7 days for a response.
- **Example**: "Thank you for your contribution to Gemini CLI! We are interested in resolving this, but we need a bit more information to take action. Could you please provide [specific details]? If we don't hear back in 7 days, we'll close this for now, but you're welcome to reopen it once the info is available."
4. **Safety & Idempotency**: Ensure scripts are safe to run multiple times. They should check for existing states (e.g., "Has a reminder already been sent in the last 24h?") before acting.
5. If `UPDATE_PROCESSES=true`, apply changes to `tools/optimizer/` locally. If `CREATE_PR=true` is also provided, submit a PR with these changes using the `gh` CLI. Otherwise, DO NOT submit a PR.
6. Run all active processes documented in `processes/PROCESSES.md`.
7. **Mandatory Simulation**: Regardless of `COMMIT` value, always generate `[concept]-after.csv` (e.g., `issues-after.csv`) in the project root simulating the final state. Use `[concept]-before.csv` as a baseline.
8. If any tool fails (e.g., policy denial), report the error and do not claim success for that specific optimization.
1. Read `processes/PROCESSES.md` to identify all active processes and their corresponding scripts in `processes/scripts/`.
2. Run each documented script (e.g., using `npx tsx <script-path>`). The scripts will automatically read `metrics-before.csv` and `investigations/INVESTIGATIONS.md` if needed.
3. The scripts are already programmed to respect the `EXECUTE_ACTIONS` environment variable. Do not override this variable.
4. **Professional Communication & Empathy**: The scripts have been written to maintain a helpful and collaborative tone, clarifying before closing issues.
5. **Mandatory Simulation**: The scripts will generate `[concept]-after.csv` (e.g., `issues-after.csv`) in the project root simulating the final state.
6. If any tool fails (e.g., policy denial), report the error.