plugins/github-copilot-modernization/skills/business-workflows/SKILL.md
Generate core business workflow documentation with sequence diagram
npx skillsauth add microsoft/github-copilot-modernization business-workflowsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Analyze the project to document business processes end-to-end, domain entities, business rules, service-to-domain mapping, cross-service data flows, and decision logic. Generate a Mermaid sequence diagram showing the primary business workflow. Save to .github/modernize/assessment/engines/facts/business-workflows.md.
workspace-path (optional): Path to the project to analyze (defaults to current directory)Mermaid sequenceDiagram is unforgiving in a few specific ways: one bad alias or one missing end crashes the whole diagram with Syntax error in text, not just the offending line. Stay strictly inside this subset for the sequence diagram:
Chart kind. sequenceDiagram only. Never sequence-diagram, never sequence.
Participants. Always declare with the alias form participant <AlphaNumId> as "Display Label". The id must match [A-Za-z][A-Za-z0-9_]*. Never omit the id — even a one-word participant should be participant Owner as "Owner". This is the single biggest cause of past failures.
Arrows.
->> synchronous request-->> synchronous response-) async fire-and-forget: and is plain text — keep it short and on one line.Blocks. alt / else / opt / loop / par / critical MUST be closed by end on its own line. Every open block must have a matching end. Missing end is the #2 cause of past failures.
No line breaks anywhere. The escape \n was removed in modern Mermaid. Aliases, message text, and Note over content must all be single-line. Split a long note into multiple consecutive Note over lines; split a long message into multiple arrows. This is the #1 cause of past failures.
Banned characters inside participant aliases specifically (message text is more permissive — only \n is banned there):
| Banned in alias | Why it breaks | Replacement |
|---|---|---|
| \n (literal two chars) | escape removed | drop |
| " (a second double-quote) | closes the alias early | ' (single quote) |
| ` (backtick) | breaks alias quoting | drop |
| smart quotes " " ' ' | not ASCII | regular " and ' |
| : | confuses with message delimiter | rephrase, e.g. "Order Service (v2)" not "Order Service: v2" |
| <br/> | not interpreted inside aliases | rephrase as shorter alias |
Quote the alias. participant Svc as "Order Service" — never participant Svc as Order Service (unquoted multi-word aliases break).
Immediately before writing the ```mermaid opening fence, emit this exact one-line HTML comment in the markdown (it does not render — it is for your own visible attestation):
<!-- mermaid-checked: every participant uses `participant Id as "Label"`, no \n in aliases/messages/notes, every alt/opt/loop closed by end, no `:` inside any alias -->
If you cannot truthfully emit that comment, fix the diagram first.
This skill is part of a set of four complementary assessment skills. To avoid content duplication across their output documents, observe these scope rules:
data-architecture skill.data-architecture skill.api-service-contracts skill.Identify the domain model and produce the complete ## Domain Entities section:
data-architecture skillMap each service to its bounded context and owned entities, then produce the complete ## Service-to-Domain Mapping section (applies to microservice or multi-module architectures):
customers-service → Customer Management, visits-service → Appointment Management)petId as a foreign key in visits-service referencing customers-service's Pet entity)Scan for business process entry points, trace each significant workflow end-to-end, and produce the complete ## Primary Workflows section:
Entry points to scan:
@Scheduled, Quartz, Hangfire, cron jobs, BackgroundService)@EventListener, @KafkaListener, INotificationHandler, message handlers)For each significant entry point, trace the flow:
Trace cross-service data composition flows end-to-end and produce the complete ## Cross-Service Data Flows section:
Create a Mermaid sequenceDiagram showing the primary business workflow end-to-end and produce the complete ## Business Workflow Sequence section:
alt/else blocks to show circuit breaker fallback paths that affect business outcomesReference example (this block satisfies every Safety Constraint — match its shape):
<!-- mermaid-checked: every participant uses `participant Id as "Label"`, no \n in aliases/messages/notes, every alt/opt/loop closed by end, no `:` inside any alias -->sequenceDiagram
participant Owner as "Owner"
participant Gateway as "API Gateway"
participant CustSvc as "Customer Service"
participant VisitSvc as "Visit Service"
participant DB as "Database"
Owner->>Gateway: View my pets and visits
Gateway->>CustSvc: Get owner details
CustSvc->>DB: Find owner with pets
DB-->>CustSvc: Owner + Pet list
CustSvc-->>Gateway: OwnerDetails(pets)
Gateway->>Gateway: Extract pet IDs from response
Gateway->>VisitSvc: Get visits for pets (batch)
alt Visit Service Available
VisitSvc->>DB: Find visits by pet IDs
DB-->>VisitSvc: Visit records
VisitSvc-->>Gateway: Visits per pet
Gateway->>Gateway: Merge visits into pet records
else Visit Service Unavailable (Circuit Breaker)
Note over Gateway: Fallback - return owner without visits
end
Gateway-->>Owner: Complete owner profile with visits
Extract and document business rules and cross-cutting concerns, and produce the complete ## Business Rules & Decision Logic section:
Business Rules:
owner.addPet(pet) ensuring both sides of the relationship are set)Cross-Cutting Concerns:
@Transactional scope, saga patterns, eventual consistencySave to .github/modernize/assessment/engines/facts/business-workflows.md with this exact structure:
# Core Business Workflows
A brief introduction (1-2 sentences) summarizing the application's business domain.
## Domain Entities
[Table: Entity | Service / Bounded Context | Description | Key Relationships]
## Service-to-Domain Mapping
[Table: Service | Domain Context | Owned Entities | External Dependencies]
## Primary Workflows
### Workflow 1: [Name]
[Description, steps, business rules involved, cross-service interactions]
### Workflow 2: [Name]
[Description, steps, business rules involved]
## Cross-Service Data Flows
[Description of aggregation/composition patterns, which service provides which data, how data is joined, fallback behavior when services are unavailable]
## Business Workflow Sequence
< Mermaid sequenceDiagram here, with alt/else blocks for fallback paths >
## Business Rules & Decision Logic
[Summary of key business rules, validation rules, state transitions, and decision points]
Each row below is something the model actually produced that crashed the diagram. Use the ✅ form.
| ❌ Past mistake | ✅ Safe form | Why the ❌ crashed |
|---|---|---|
| participant Owner (no alias) | participant Owner as "Owner" | Bare participants can break when used later with spaces |
| participant Tx as "Transcoding\nService" | participant Tx as "Transcoding Service" | Literal \n in alias |
| participant API as "REST API: v2" | participant API as "REST API (v2)" | : in alias collides with message delimiter |
| Note over Client,API: First fact\nSecond fact | Two consecutive Note over Client,API: ... lines | \n in note text |
| alt happy path ... missing end | alt happy path ... end | Unclosed block |
| participant Svc as Order Service (unquoted) | participant Svc as "Order Service" | Multi-word alias must be quoted |
> ERROR: Unsupported project type. This skill supports Java, .NET, JavaScript, and TypeScript projects only.> ERROR: No recognized business logic or workflows found at workspace-path. The project may be a library or framework without business processes.> Note: Some workflows or business rules could not be fully traced.alt/else blocks for fallbacks<!-- mermaid-checked: ... --> attestation comment.github/modernize/assessment/engines/facts/business-workflows.mddevelopment
Scan dependency manifests against known CVEs and remediate by upgrading vulnerable dependencies to patched versions, then rebuild and re-scan to confirm. Self-contained scan→fix→verify loop for any project with a dependency manifest. Use when: a cve-remediation task is dispatched; dependency set changed (version bump, new framework); assessment flagged vulnerable or EOL dependencies; or user asked to "fix CVEs", "patch vulnerabilities", or "dependency security". Triggers: "cve", "remediate cve", "fix cves", "patch vulnerable dependencies", "vulnerability scanning", "dependency security", "vulnerable dependencies", "security advisories", "npm audit", "pnpm audit", "maven audit", "gradle audit", "dependency scan", "vulnerability remediation". NOT for: security audit of auth/input/secrets/OWASP code paths (use security-review).
development
Generate dependency map diagram from project build files
documentation
Generate data architecture and persistence layer documentation with data model diagram
data-ai
Generate architecture diagram with component relationship details from project analysis