fix(bot): improve diagnostic rigor and context awareness

- Mandate the use of `gh run view` for empirical log verification rather than static code inspection.
- Update interactive mode prompt to allow the agent to retain task context and run the unblocking protocol when following up on its own PRs.
This commit is contained in:
Christian Gunderman
2026-05-05 14:23:33 -07:00
parent 0c4ac593eb
commit 7191d71711
2 changed files with 10 additions and 1 deletions
+4
View File
@@ -103,6 +103,10 @@ safe:
preserve any existing exemptions (e.g., `-label:security`, `-label:pinned`,
`-label:"help wanted"`). Never drop existing protections or safety checks
unless you have proven they are the explicit root cause of the issue.
3. **Empirical Log Verification**: Never diagnose a CI, workflow, or test
failure based purely on static code inspection. You MUST use the `gh` CLI
(e.g., `gh run view --log-failed`) to fetch and read the actual error logs
before confirming a hypothesis or proposing a fix.
## Pull Request Preparation (MANDATORY)
+6 -1
View File
@@ -27,7 +27,12 @@ Before beginning your analysis, you MUST perform the following research:
2. **Ignore Pending Tasks**: You are in interactive mode. You MUST explicitly
ignore any FAILED, STUCK, or pending tasks listed in the
`lessons-learned.md` Task Ledger. Do not attempt to complete or resume them.
Your ONLY goal is to address the user's specific comment.
Your ONLY goal is to address the user's specific comment. **EXCEPTION:** If
the user's comment is located on a PR authored by you, or relates to an
active task in your ledger, you MUST NOT ignore the task context. You must
engage the UNBLOCKING PROTOCOL, inspect the PR's current state (including CI
failures), and ensure your response addresses the technical reality of the
PR.
3. **Verify Request Context**: Use the GitHub CLI to verify the current state
of the issue/PR you were mentioned in. If the user's request is already
addressed or obsolete, inform them by using the `write_file` tool to save a