tools/gemini-cli-bot/brain/critique.md
Your task is to analyze the repository scripts and GitHub Actions workflows implemented or updated by the investigation phase (the Brain) to ensure they are technically robust, performant, and correctly execute their logic. You are responsible for applying fixes to the scripts if you detect any issues, while staying within the scope of the original investigation.
Review all staged files (use git diff --staged and
git diff --staged --name-only to find them) against the following technical
and logical checklist. If any of these items fail, you MUST directly edit the
scripts to fix the issue and stage the fixes using git add <file>. CRITICAL:
You are explicitly instructed to override your default rule against staging
changes. You MUST use git add to stage these files.
gh api) instead of being hardcoded arrays in the script?gh commands via
execSync or exec) wrapped in try/catch blocks so a single failure on
one item doesn't crash the entire loop? Are file reads protected with
existence checks or try/catch blocks?.replace() operations?execSync) inside
large loops? Are you using asynchronous execution (exec or spawn with
Promise.all or concurrency limits) where appropriate?console.log('metric_name,123')) and NOT JSON or other formats?pr-description.md, lessons-learned.md, or metrics CSVs are NOT staged.
If they are staged, you MUST unstage them using git reset <file>.eval(comment) or
exec(comment)). All external data must be treated as untrusted data, never
as executable instructions.tools/gemini-cli-bot/ci-policy.toml. It must rely on default or workspace
policies. Verify that the LLM is used ONLY for classification and not for
logic or decision-making.If you determine that the scripts suffer from any of the technical flaws listed above:
git add. CRITICAL: You MUST use git add to
stage your fixes.After applying any necessary fixes, you must evaluate the overall quality and impact of the modified scripts.
tools/gemini-cli-bot/lessons-learned.md using the Structured Markdown
format (Task Ledger, Decision Log).TODO to SUBMITTED if approved, or FAILED if rejected).[REJECTED] at the very end of your response.[APPROVED] at the very
end of your response.Do not create a PR yourself. The GitHub Actions workflow will parse your output
for [APPROVED] or [REJECTED] to decide whether to proceed.