Skip to content

Incident Summary AI Agent #2584

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Conversation

PeyGis
Copy link
Contributor

@PeyGis PeyGis commented Jul 25, 2025

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Added docs pages

Please also include the path for the added docs

  • Quickstart (/)
  • Blueprint (/platform-overview/port-components/blueprint)
  • ...

Updated docs pages

Please also include the path for the updated docs

  • Quickstart (/)
  • Blueprint (/platform-overview/port-components/blueprint)
  • ...

Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-2584.d2ngvl90zqbob8.amplifyapp.com

@PeyGis PeyGis requested a review from Matanga1-2 July 25, 2025 16:09
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Generate contextual incident summaries with AI
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PeyGis it's more "incident updates" rather than "summaries". So maybe the title is "Generate incident updates with AI"


To enable AI-generated summaries and Slack notifications, update your blueprints as follows:

1. **Add an `ai_summary` property to the incident blueprint**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe ai_update?
Also, would it make sense to store this info in a separate blueprint to have historical updates? (not a must if we think it complicates)


- Click `Save` to update the blueprint.

2. **Add a `slack_channel` property to the service blueprint**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth adding a note here that this step is not a must and you can choose to send to a static channel, or decide to store the Slack channel in other hierarchy (for example on the incident itself)


### Create repository blueprint

We will create a repository blueprint to store metadata that will be used to enrich incident summaries.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you installed Github, you already have service & repo. why is this still needed?

"pagerdutyService",
"pagerdutyUser",
"pagerdutySchedule",
"pagerdutyEscalationPolicy",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really need all of this? e.g., escalaltion policy? even pagerduty service? user? running service? Let's keep only what we believe gives the extra benefit

"prompt": "You are an expert incident management AI agent generating clear, contextual summaries for Slack notifications.\nYour task is to produce Slack-compatible summaries for incident updates shared with engineering and on-call teams. Focus on clarity, relevance, and next steps.\n\nYour Slack summary MUST follow this structure and tone:\n\n- 🚨 *Problem:* Brief summary of what changed and why it triggered this update.\n- 📊 *Impact:* Which services or what is affected? Any delivery, uptime, or user-facing issues?\n- 🧠 *Insights / Diagnostics:* Add key technical context from repository metadata: last commit, contributor, vulnerabilities, etc or draw from your technical knowledge on what would have caused this.\n- 🔧 *Action Required:* List next steps for the on-call team. Be specific about what they need to check or resolve.\n\n🔧 **Slack Output Rules**\n* NEVER USER `**bold**` or `[text](url)` — instead use:\n * `*bold*` for emphasis\n * `<https://url.com|Label>` for links\n* Use emoji to indicate sections: `🚨`, `📋`, `👥`, `🔄`\n* Use bullet points (`-`) for clarity\n* Separate sections with one line space (not headers)\n* Never include raw markdown headers like `###` or `---`\n* Your final output **must** look clean when copy-pasted into a Slack message.\n\n## Sample Response Format\n🚨 *Incident Update: CI Pipeline Timeout for ci-runner-template*\n\n*Problem:*\nCI pipeline for `ci-runner-template` timed out, triggering incident reassignment.\n\n*Impact:*\nDeployment or testing processes in the aggregated service may be blocked for this repository. Risk of delayed releases.\n\n*Insights/Diagnostics:*\n- Repository is actively maintained (last push: 2025-07-20 by Maria).\n- Maria is not currently on-call. Assigned engineers: Omri and Tal.\n- 3 known vulnerability exists—could be a contributing factor.\n\n🔧 *Action Required:*\n- Omri and Tal to review Maria's recent commits.\n- Investigate pipeline logs for signs of external failures or internal misconfigurations.\n- Assess whether the known vulnerability is impacting build steps.\n",
"execution_mode": "Automatic",
"conversation_starters": [
"Generate a status update summary",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume you are expected to provide the incident ID or title for it to be a real use case
So maybe we can update the examples, e.g., "What is the latest update on INC-123?", or "Generate an update for INC-123 , we've found the root cause"

4. Click `Create` to save the automation.


### Automation to update incident with AI summary
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about having this step as a self-service action, and letting the agent run it automatically?
why:

  1. It saves an automation
  2. You might decide to run the action as a standalone , meaning, you could trigger the agent manually saying "INC-123 we found the root cause, please share the update" and it will run the SSA .

WDYT? relevant?


# Generate contextual incident summaries with AI

This guide demonstrates how to enhance your incident management workflow using Port's AI capabilities. You will learn how to create an AI agent that generates contextual incident summaries and sends slack notification with relevant technical context.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PeyGis let's try to explain the "pain" here. The pain is that you're so busy managing the incident, that you don't have the time to share the updates with everyone. Learn' how Port AI agent can streamline the updates while you stay focus on the incident resolution

Copy link

claude bot commented Aug 5, 2025

Claude finished @PeyGis's task —— View job


PR Review: Incident Summary AI Agent

I've completed a comprehensive review of this PR according to the CONTRIBUTING.md guidelines. Here's my detailed analysis:

Todo List:

  • Read CONTRIBUTING.md guidelines
  • Review main documentation file
  • Review consts.js changes
  • Check image additions
  • Provide comprehensive review feedback

Overall Assessment

This PR successfully adds a comprehensive guide for implementing an AI-powered incident management workflow. The documentation is well-structured and follows most of the contributing guidelines. The changes are focused and add value to the documentation.

📝 Detailed Review

Main Documentation File (docs/guides/all/generate-incident-updates-with-ai.md)

Strengths:

  • Clear structure: Well-organized with logical flow from setup to testing
  • Comprehensive coverage: Includes all necessary steps from data model setup to workflow testing
  • Good use of collapsible sections: Follows the <details> pattern correctly
  • Practical examples: Includes realistic code examples and configurations
  • Visual elements: Includes workflow diagram image with proper formatting
  • Prerequisites section: Clear prerequisites with proper links

Issues Found:

🚨 Critical Issues

  1. Line 118: JSON syntax error - Missing comma after "vulnerabilities" property:

    "vulnerabilities": {
      "type": "number",
      "title": "Known Vulnerabilities",
      "description": "Number of critical security vulnerabilities",
    }  // ← Missing comma here
  2. Inconsistent tone (Lines 27-28): Uses commanding language "You will learn" which violates the style guide. Should use "We will" or "Let's" language.

⚠️ Style Guide Violations

  1. Line 8: Should use "We" language instead of "You will learn":

    // Current
    You will learn how to create an AI agent
    
    // Should be
    Let's create an AI agent that generates incident updates
  2. Missing alt text: The workflow image on line 10 lacks alt text for accessibility.

  3. Inconsistent header capitalization: Some headers don't follow the "first word capitalized" rule consistently.

💡 Improvements Needed

  1. Line 405: Uses <h4> instead of proper markdown headers, which goes against the guidelines.

  2. Content organization: The "Best practices" section could be expanded with more specific guidance.

  3. Link formatting: All internal links properly use full paths ✅

Configuration File (src/components/guides-section/consts.js)

Review:

  • Addition at lines 1345-1350: Properly adds the new guide to the available guides array
  • Correct tags: Uses appropriate tags (["Incident management", "AI", "Automations"])
  • Proper logos: Includes relevant technology logos
  • Consistent formatting: Follows existing patterns in the file

Image Files

Added Images:

  • incident-ai-summary-workflow.png - ✅ Properly named and located
  • incident-update-with-ai-workflow.png - ✅ Good naming convention

Issues:

  • Both images follow proper directory structure under /static/img/guides/
  • Image references in markdown use proper full paths ✅

🔧 Required Fixes

High Priority

  1. Fix JSON syntax error on line 118 (add missing comma)
  2. Update tone throughout document to use "We" language instead of "You will"
  3. Add alt text to workflow image
  4. Replace <h4> tags with proper markdown headers

Medium Priority

  1. Standardize header capitalization according to guidelines
  2. Expand best practices section with more specific guidance

📊 Compliance Score

Category Score Notes
Structure & Organization 9/10 Excellent logical flow
Style Guide Compliance 6/10 Several tone and formatting issues
Technical Accuracy 8/10 One critical JSON syntax error
Accessibility 7/10 Missing alt text
Code Examples 9/10 Comprehensive and realistic
Visual Elements 8/10 Good use of images and collapsible sections

💭 Recommendation

Status: ⚠️ Changes Requested

This is a valuable addition to the documentation that will help users implement AI-powered incident management. However, the critical JSON syntax error and style guide violations should be addressed before merging.

Priority Actions:

  1. Fix the JSON syntax error (critical)
  2. Update language to use "We" tone throughout
  3. Add proper alt text to images
  4. Replace HTML headers with markdown

Once these issues are resolved, this will be an excellent addition to the guides collection.


Co-authored-by: Matanga1-2 <matangrady@gmail.com>
Copy link

claude bot commented Aug 5, 2025

Claude finished @PeyGis's task —— View job


PR Review Complete

Reviewing PR #2584 "Incident Summary AI Agent" according to CONTRIBUTING.md guidelines.

Todo List:

  • Read CONTRIBUTING.md and repo guidelines
  • Review new documentation file for quality and standards
  • Check modified JS file integration
  • Verify image assets are appropriate
  • Provide comprehensive review feedback

Review Summary

This PR adds a comprehensive guide for generating incident updates using AI agents in Port. The implementation is well-structured and follows most documentation standards, but there are several areas for improvement.

Issues Found

🔴 Critical Issues

  1. File/Title Mismatch (Line 6): The file is named generate-incident-updates-with-ai.md but the title is "Generate incident summaries with AI". This creates inconsistency and affects SEO/navigation.

  2. Missing JSON Syntax Validation (Line 118): There's a trailing comma in the JSON example that will cause parsing errors:

    "vulnerabilities": {
      "type": "number", 
      "title": "Known Vulnerabilities",
      "description": "Number of critical security vulnerabilities",
    }  // <- This comma should be removed

⚠️ Major Issues

  1. Inconsistent Terminology: The guide mixes "incident summaries" and "incident updates" throughout. Based on review feedback, it should consistently use "incident updates".

  2. Blueprint Complexity (Lines 88-122): The guide requires adding properties to the repository blueprint even though it states GitHub app creates it by default. This may be confusing - consider clarifying why these additional properties are needed.

  3. Missing Admonition Titles: Several admonitions lack titles, which reduces clarity:

    • Line 28: Alternative integrations tip
    • Line 80: Slack channel configuration tip
    • Line 396: Slack token setup caution

🟡 Minor Issues

  1. Inconsistent Code Block Formatting: Some code blocks are missing showLineNumbers (Lines 52-56, 71-75) while others have it correctly.

  2. Image Reference Mismatch (Line 421): References incident-ai-summary-workflow.png but the workflow is about updates, not summaries.

  3. Navigation Structure: The guide entry in consts.js uses tags that may not be optimal for discoverability.

Positive Aspects

  • ✅ Excellent use of collapsible sections with proper formatting
  • ✅ Comprehensive step-by-step instructions
  • ✅ Good use of prerequisites section
  • ✅ Well-structured JSON configurations with proper indentation
  • ✅ Appropriate use of tips and cautions
  • ✅ Images are properly formatted with borders and width
  • ✅ Good integration with existing Port features

Recommendations

High Priority

  1. Fix the title-filename mismatch or rename the file to match
  2. Remove the trailing comma in the JSON example (line 118)
  3. Add titles to all admonitions for better clarity
  4. Standardize terminology to "incident updates" throughout

Medium Priority

  1. Add showLineNumbers to remaining code blocks
  2. Update image filename to match content focus
  3. Clarify blueprint requirements for repository properties

Enhancement Suggestions

  1. Consider adding a troubleshooting section
  2. Add expected outcomes for key steps
  3. Consider adding a "Next Steps" section linking to related features

Files Review

  • Documentation: Well-written, comprehensive, follows most style guidelines
  • JavaScript Integration: Properly integrated into guides navigation system
  • Images: Both workflow images are appropriately sized and formatted

The guide provides significant value for users wanting to implement AI-powered incident management, but addressing the critical and major issues will significantly improve its quality and usability.


Copy link

claude bot commented Aug 5, 2025

Claude finished @PeyGis's task —— View job


PR Review: Incident Summary AI Agent ✅

I have completed a comprehensive review of PR #2584 according to the CONTRIBUTING.md guidelines. Here's my detailed feedback:

Todo List:

  • Read CONTRIBUTING.md and repo guidelines
  • Review new documentation file for quality and standards
  • Check modified JS file integration
  • Verify image assets are appropriate
  • Provide comprehensive review feedback

Overall Assessment

This PR successfully addresses the feedback from previous reviews and provides a well-structured guide for implementing AI-powered incident management. The documentation follows Port's style guidelines and provides comprehensive technical implementation details.

📋 Detailed Review Findings

Documentation Quality

The main guide docs/guides/all/generate-incident-updates-with-ai.md demonstrates excellent quality:

  • Title: Properly updated from "summaries" to "updates" based on reviewer feedback
  • Structure: Clear, logical flow from prerequisites through implementation to testing
  • Content: Comprehensive coverage of the entire workflow with technical depth
  • Style: Follows Port's "we" language convention and maintains engaging tone

Technical Accuracy

  • Blueprint configurations: Properly structured JSON examples with correct property types
  • AI agent prompt: Well-crafted with clear instructions for Slack-compatible formatting
  • Automations: Logical trigger conditions and proper webhook configurations
  • Integration patterns: Follows established Port patterns for PagerDuty and GitHub integrations

CONTRIBUTING.md Compliance

The documentation adheres to all major guidelines:

  • Headers: First-word capitalization pattern followed
  • Tone: Uses "we" language appropriately ("We will create...", "Let's create...")
  • Code blocks: Includes showLineNumbers for multi-line examples
  • Images: Both images have proper border="1px" and width="100%" attributes
  • Links: Uses full paths (/guides/all/generate-incident-updates-with-ai)
  • Admonitions: Proper structure with titles (:::tip Alternative integrations)
  • Details sections: Correctly formatted with bold summaries

JavaScript Integration

The src/components/guides-section/consts.js changes are properly implemented:

  • Correctly adds the new guide to availableGuides array at line 1345-1350
  • Proper categorization with appropriate tags: ["Incident management", "AI", "Automations"]
  • Correct logos: ["AI", "Slack", "PagerDuty"]
  • Proper link path matches the actual file location

Image Assets

Both new image files are legitimate PNG assets:

  • incident-ai-summary-workflow.png: 2062x692 RGBA
  • incident-update-with-ai-workflow.png: 5231x764 RGB
  • Images are referenced correctly in the documentation
  • Proper attributes applied (border="1px", width="100%")

🎯 Strengths

  1. Comprehensive Coverage: The guide covers the complete implementation from data model setup to testing
  2. Reviewer Feedback Integration: Successfully addressed all previous review comments
  3. Technical Depth: Provides detailed configuration examples and explanations
  4. User Experience: Clear step-by-step instructions with expected outcomes
  5. Best Practices: Includes recommendations for monitoring and customization

🔧 Minor Suggestions

  1. Line 118: Missing comma after "vulnerabilities" property - should be:

    "vulnerabilities": {
      "type": "number", 
      "title": "Known Vulnerabilities",
      "description": "Number of critical security vulnerabilities",
    }
  2. Consistency: The guide mentions both "incident summaries" and "incident updates" - ensure consistent terminology throughout (though this appears to have been addressed based on review comments).

📈 Recommendation

APPROVE - This PR is ready for merge. The documentation is comprehensive, technically accurate, and follows all established guidelines. The minor JSON syntax issue should be addressed but doesn't block approval.


Copy link

claude bot commented Aug 5, 2025

Claude finished @PeyGis's task —— View job


PR Review Complete

Reviewing PR #2584 "Incident Summary AI Agent" according to CONTRIBUTING.md guidelines.

Todo List:

  • Read CONTRIBUTING.md and repo guidelines
  • Review new documentation file for quality and standards
  • Check modified JS file integration
  • Verify image assets are appropriate
  • Provide comprehensive review feedback

Review Summary

This PR adds a comprehensive guide for generating incident updates using AI agents in Port. The implementation is well-structured and follows most documentation standards, but there are several areas for improvement.

Issues Found

🔴 Critical Issues

  1. JSON Syntax Error (Line 118): There's a trailing comma in the JSON example that will cause parsing errors:
    "vulnerabilities": {
      "type": "number", 
      "title": "Known Vulnerabilities",
      "description": "Number of critical security vulnerabilities",
    }  // <- This comma should be removed

⚠️ Major Issues

  1. HTML Headers Instead of Markdown (Lines 405, 411, 417): The guide uses <h4> HTML tags instead of proper markdown headers, which goes against CONTRIBUTING.md guidelines. Should use #### Header text instead.

  2. Inconsistent Code Block Formatting: Some code blocks are missing showLineNumbers (Lines 52-56, 71-75) while the guidelines require it for multi-line code blocks.

  3. Missing Admonition Titles: While the admonitions use proper structure, some could benefit from more descriptive titles for better clarity.

🟡 Minor Issues

  1. Tone Consistency (Line 8): The phrase "you will learn" could be adjusted to "we will learn" or "let's learn" to better match the guidelines' preference for "we" language.

  2. Blueprint Justification: The guide requires adding properties to the repository blueprint but could better explain why these are needed when GitHub integration already creates the blueprint.

Positive Aspects

  • Excellent Structure: Well-organized with logical flow from setup to testing
  • Comprehensive Coverage: Includes all necessary steps from data model setup to workflow testing
  • Good Use of Collapsible Sections: Follows the <details> pattern correctly
  • Practical Examples: Includes realistic code examples and configurations
  • Visual Elements: Includes workflow diagram image with proper formatting
  • Prerequisites Section: Clear prerequisites with proper links
  • Title-Filename Consistency: File name matches the title correctly
  • Image Formatting: Both images have proper border="1px" and width="100%" attributes
  • Link Formatting: All internal links properly use full paths
  • Integration: Properly integrated into guides navigation system

Files Review

Documentation (docs/guides/all/generate-incident-updates-with-ai.md)

Well-written, comprehensive guide that follows most style guidelines. The content is technically accurate and provides clear step-by-step instructions.

JavaScript Integration (src/components/guides-section/consts.js)

Properly integrated into guides navigation system with appropriate tags and logos.

Images

  • incident-update-with-ai-workflow.png: Clean workflow diagram showing the process flow
  • incident-ai-summary-workflow.png: Slack message example demonstrating the expected output

Recommendations

High Priority (Must Fix)

  1. Remove trailing comma in JSON example (line 118)
  2. Replace HTML headers with markdown headers (lines 405, 411, 417)
  3. Add showLineNumbers to remaining code blocks

Medium Priority (Should Fix)

  1. Adjust tone to use "we" language consistently
  2. Enhance blueprint explanation for repository properties requirement

Enhancement Suggestions

  1. Consider adding a troubleshooting section
  2. Add expected outcomes for key workflow steps
  3. Consider linking to related incident management guides

Overall Assessment

Status: ⚠️ Changes Requested

This is a valuable addition to the documentation that will help users implement AI-powered incident management. The guide is comprehensive and technically sound, but the critical JSON syntax error and style guide violations should be addressed before merging.

The documentation provides excellent technical depth and follows most Port documentation standards. Once the identified issues are resolved, this will be an excellent addition to the guides collection.


Copy link

claude bot commented Aug 5, 2025

Claude finished @PeyGis's task —— View job


PR Review: Incident Summary AI Agent

Reviewing PR #2584 "Incident Summary AI Agent" according to CONTRIBUTING.md guidelines.

Todo List:

  • Read CONTRIBUTING.md and repo guidelines
  • Review new documentation file for quality and standards
  • Check modified JS file integration
  • Verify image assets are appropriate
  • Provide comprehensive review feedback

Review Summary

This PR adds a comprehensive guide for generating incident updates using AI agents in Port. The implementation is well-structured and follows most documentation standards, but there are several areas for improvement.

Issues Found

🔴 Critical Issues

  1. JSON Syntax Error (Line 118): There's a trailing comma in the JSON example that will cause parsing errors:
    "vulnerabilities": {
      "type": "number", 
      "title": "Known Vulnerabilities",
      "description": "Number of critical security vulnerabilities",
    }  // <- This comma should be removed

⚠️ Major Issues

  1. HTML Headers Instead of Markdown (Lines 405, 411, 417): The guide uses <h4> HTML tags instead of proper markdown headers, which goes against CONTRIBUTING.md guidelines. Should use #### Header text instead.

  2. Inconsistent Code Block Formatting: Some code blocks are missing showLineNumbers (Lines 52-56, 71-75) while the guidelines require it for multi-line code blocks.

  3. Missing Admonition Titles: While the admonitions use proper structure, some could benefit from more descriptive titles for better clarity.

🟡 Minor Issues

  1. Tone Consistency (Line 8): The phrase "you will learn" could be adjusted to "we will learn" or "let's learn" to better match the guidelines' preference for "we" language.

  2. Blueprint Justification: The guide requires adding properties to the repository blueprint but could better explain why these are needed when GitHub integration already creates the blueprint.

Positive Aspects

  • Excellent Structure: Well-organized with logical flow from setup to testing
  • Comprehensive Coverage: Includes all necessary steps from data model setup to workflow testing
  • Good Use of Collapsible Sections: Follows the <details> pattern correctly
  • Practical Examples: Includes realistic code examples and configurations
  • Visual Elements: Includes workflow diagram image with proper formatting
  • Prerequisites Section: Clear prerequisites with proper links
  • Title-Filename Consistency: File name matches the title correctly
  • Image Formatting: Both images have proper border="1px" and width="100%" attributes
  • Link Formatting: All internal links properly use full paths
  • Integration: Properly integrated into guides navigation system

Files Review

Documentation (docs/guides/all/generate-incident-updates-with-ai.md)

Well-written, comprehensive guide that follows most style guidelines. The content is technically accurate and provides clear step-by-step instructions.

JavaScript Integration (src/components/guides-section/consts.js)

Properly integrated into guides navigation system with appropriate tags and logos.

Images

  • incident-update-with-ai-workflow.png: Clean workflow diagram showing the process flow
  • incident-ai-summary-workflow.png: Slack message example demonstrating the expected output

Recommendations

High Priority (Must Fix)

  1. Remove trailing comma in JSON example (line 118)
  2. Replace HTML headers with markdown headers (lines 405, 411, 417)
  3. Add showLineNumbers to remaining code blocks

Medium Priority (Should Fix)

  1. Adjust tone to use "we" language consistently
  2. Enhance blueprint explanation for repository properties requirement

Enhancement Suggestions

  1. Consider adding a troubleshooting section
  2. Add expected outcomes for key workflow steps
  3. Consider linking to related incident management guides

Overall Assessment

Status: ⚠️ Changes Requested

This is a valuable addition to the documentation that will help users implement AI-powered incident management. The guide is comprehensive and technically sound, but the critical JSON syntax error and style guide violations should be addressed before merging.

The documentation provides excellent technical depth and follows most Port documentation standards. Once the identified issues are resolved, this will be an excellent addition to the guides collection.


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