-
Notifications
You must be signed in to change notification settings - Fork 28
Add Mermaid diagram for safe output message flow #3428
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
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a visual flow diagram and explanatory content to document how AI-generated content flows through the safe output message system to GitHub API operations. The documentation is added to both the specification file and the developer instructions.
Key Changes:
- Added a Mermaid flow diagram showing the safe output message processing pipeline
- Documented six flow stages from AI Agent Output to Step Summary display
- Maintained consistency between spec and developer instruction files
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| specs/safe-output-messages.md | Added "Safe Output Message Flow" section with Mermaid diagram and flow stage descriptions to the specification document |
| .github/instructions/developer.instructions.md | Added identical "Safe Output Message Flow" section to developer instructions for internal reference |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| H --> N[Apply Message Patterns] | ||
| I --> N | ||
| J --> N | ||
| K --> N | ||
| L --> N | ||
| M --> N | ||
| N --> O[Add AI Attribution Footer] | ||
| N --> P[Add Installation Instructions] | ||
| N --> Q[Add Related Items Links] | ||
| N --> R[Add Patch Preview] | ||
| O --> S[Execute GitHub API Operation] | ||
| P --> S | ||
| Q --> S | ||
| R --> S |
Copilot
AI
Nov 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The flow diagram shows that "Apply Message Patterns" (N) branches into four parallel operations (O, P, Q, R) that each independently flow to "Execute GitHub API Operation" (S). This implies four separate API executions, which is inaccurate.
In the actual implementation (e.g., pkg/workflow/js/create_issue.cjs), all message patterns (AI attribution footer, installation instructions, related items links, patch preview) are applied within a single JavaScript function that executes as part of one GitHub API operation.
Consider revising the diagram to show that O, P, Q, and R all converge into a single path before reaching S, or restructure it to show these as aspects/attributes of the message preparation rather than sequential steps. For example:
N --> O[Prepare Message Content]
O --> |Add AI Attribution| O
O --> |Add Installation Instructions| O
O --> |Add Related Items Links| O
O --> |Add Patch Preview| O
O --> S[Execute GitHub API Operation]
Or simply show them as a grouped operation that happens before the API call.
| H --> N[Apply Message Patterns] | |
| I --> N | |
| J --> N | |
| K --> N | |
| L --> N | |
| M --> N | |
| N --> O[Add AI Attribution Footer] | |
| N --> P[Add Installation Instructions] | |
| N --> Q[Add Related Items Links] | |
| N --> R[Add Patch Preview] | |
| O --> S[Execute GitHub API Operation] | |
| P --> S | |
| Q --> S | |
| R --> S | |
| H --> N[Prepare Message Content] | |
| I --> N | |
| J --> N | |
| K --> N | |
| L --> N | |
| M --> N | |
| N --> N1[Add AI Attribution] | |
| N1 --> N2[Add Installation Instructions] | |
| N2 --> N3[Add Related Items Links] | |
| N3 --> N4[Add Patch Preview] | |
| N4 --> S[Execute GitHub API Operation] |
| H --> N[Apply Message Patterns] | ||
| I --> N | ||
| J --> N | ||
| K --> N | ||
| L --> N | ||
| M --> N | ||
| N --> O[Add AI Attribution Footer] | ||
| N --> P[Add Installation Instructions] | ||
| N --> Q[Add Related Items Links] | ||
| N --> R[Add Patch Preview] | ||
| O --> S[Execute GitHub API Operation] | ||
| P --> S | ||
| Q --> S | ||
| R --> S |
Copilot
AI
Nov 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The flow diagram shows that "Apply Message Patterns" (N) branches into four parallel operations (O, P, Q, R) that each independently flow to "Execute GitHub API Operation" (S). This implies four separate API executions, which is inaccurate.
In the actual implementation (e.g., pkg/workflow/js/create_issue.cjs), all message patterns (AI attribution footer, installation instructions, related items links, patch preview) are applied within a single JavaScript function that executes as part of one GitHub API operation.
Consider revising the diagram to show that O, P, Q, and R all converge into a single path before reaching S, or restructure it to show these as aspects/attributes of the message preparation rather than sequential steps. For example:
N --> O[Prepare Message Content]
O --> |Add AI Attribution| O
O --> |Add Installation Instructions| O
O --> |Add Related Items Links| O
O --> |Add Patch Preview| O
O --> S[Execute GitHub API Operation]
Or simply show them as a grouped operation that happens before the API call.
| H --> N[Apply Message Patterns] | |
| I --> N | |
| J --> N | |
| K --> N | |
| L --> N | |
| M --> N | |
| N --> O[Add AI Attribution Footer] | |
| N --> P[Add Installation Instructions] | |
| N --> Q[Add Related Items Links] | |
| N --> R[Add Patch Preview] | |
| O --> S[Execute GitHub API Operation] | |
| P --> S | |
| Q --> S | |
| R --> S | |
| H --> N[Prepare Message Content] | |
| I --> N | |
| J --> N | |
| K --> N | |
| L --> N | |
| M --> N | |
| N --> |Add AI Attribution| N | |
| N --> |Add Installation Instructions| N | |
| N --> |Add Related Items Links| N | |
| N --> |Add Patch Preview| N | |
| N --> S[Execute GitHub API Operation] |
🎉 PR Nitpick Review - Clean Code!After carefully reviewing this PR, I'm pleased to report that no nitpicks were found. The code changes demonstrate excellent quality and consistency with the project's established patterns. What Was Reviewed
Positive Highlights ✅1. Excellent Diagram Design
2. Strong Documentation Structure
3. Consistency with Project Standards
4. Diagram Accuracy
SummaryThis is a model documentation PR:
Great work! 🎯 This diagram will significantly help developers understand the safe output message flow at a glance. Related Items
|
Adds visual representation of the safe output system flow from AI-generated content to GitHub API operations, addressing documentation enhancement request from #3416.
Changes
Added flowchart showing complete message flow:
create-issue,create-discussion,add-comment,create-pull-request,create-pr-review-comment,update-issueFiles modified:
specs/safe-output-messages.md- Source specification.github/instructions/developer.instructions.md- Consolidated developer docsDiagram Structure
graph TD A[AI Agent Output] --> B{Staged Mode?} B -->|Yes| C[Generate Preview Messages] B -->|No| D[Process Safe Output] D --> G{Safe Output Type} G -->|create-issue| H[Create GitHub Issue] G -->|create-discussion| I[Create GitHub Discussion] ... H --> N[Apply Message Patterns] N --> O[Add AI Attribution Footer] N --> P[Add Installation Instructions] ... O --> S[Execute GitHub API Operation] S --> T[Generate Success Summary]Follows existing diagram conventions (top-down layout, node naming, decision syntax). Diagram count: 9 → 10.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.