Skip to content

Comments

Enhance Dev Hawk with deep PR analysis and automatic agent task creation#7151

Merged
pelikhan merged 2 commits intomainfrom
copilot/update-dev-hawk-prompting
Dec 21, 2025
Merged

Enhance Dev Hawk with deep PR analysis and automatic agent task creation#7151
pelikhan merged 2 commits intomainfrom
copilot/update-dev-hawk-prompting

Conversation

Copy link
Contributor

Copilot AI commented Dec 21, 2025

Dev Hawk now performs root cause analysis by correlating workflow failures with PR code changes, then automatically creates agent tasks for Copilot to fix identified issues.

Changes

  • Deep research workflow: 4-step systematic analysis

    1. Extract audit data (errors, stack traces, job failures, MCP metrics)
    2. Analyze PR changes (diffs, modified files, code deltas)
    3. Correlate errors to specific file/line changes
    4. Synthesize root cause from combined signals
  • Agent task creation: Creates gh agent-task with structured problem statement when root cause is actionable

    • Template includes: failure context, root cause analysis, affected files, expected fix, verification checklist
    • Added bash tool access for gh agent-task create *
    • Only triggers when all criteria met (clear root cause, code issue, actionable fix, specific files identified)
  • Enhanced reporting: Three comment templates

    • Success: simple confirmation
    • Failure with root cause: detailed analysis + agent task link
    • Failure without root cause: honest assessment with investigation guidance
  • Increased timeout: 10→15 minutes for deeper analysis

Example Task Creation

When correlation succeeds:

gh agent-task create -F - <<EOF
# Fix syntax error in validation.go

## Root Cause
Line 127 in pkg/workflow/validation.go introduced unclosed string literal
causing compilation failure in all Go files.

## Files to Fix
- pkg/workflow/validation.go:127 - Close string literal

## Verification
- [ ] Code compiles successfully
- [ ] Tests pass
EOF
Original prompt

Update dev hawk prompting to do a deep research into the pull request changes and the workflow run audit data to find a root cause of the problem.

If found, respond with an agentic task description in the comment for copilot.

Custom agent used: create-agentic-workflow
Design agentic workflows using GitHub Agentic Workflows (gh-aw) extension with interactive guidance on triggers, tools, and security best practices.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

- Add deep research instructions to analyze PR changes and audit data
- Correlate errors from workflow run audit with specific PR changes
- Create agent tasks for Copilot when root cause is identified
- Add bash tool access for gh agent-task create command
- Increase timeout from 10 to 15 minutes for deeper analysis
- Provide systematic process for root cause determination
- Include criteria for when to create agent tasks
- Update comment templates for different failure scenarios

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update dev hawk prompting for deep research into PR changes Enhance Dev Hawk with deep PR analysis and automatic agent task creation Dec 21, 2025
Copilot AI requested a review from pelikhan December 21, 2025 17:29
@pelikhan pelikhan marked this pull request as ready for review December 21, 2025 17:49
@pelikhan pelikhan merged commit cd8f138 into main Dec 21, 2025
4 checks passed
@pelikhan pelikhan deleted the copilot/update-dev-hawk-prompting branch December 21, 2025 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants