Skip to content

fix: improve mermaid diagram rendering across all markdown files#8536

Merged
pethers merged 9 commits intomasterfrom
copilot/improve-mermaid-diagrams
Apr 9, 2026
Merged

fix: improve mermaid diagram rendering across all markdown files#8536
pethers merged 9 commits intomasterfrom
copilot/improve-mermaid-diagrams

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

Description

Fix and improve Mermaid diagrams across 31 markdown files to ensure they render correctly on GitHub and follow the Hack23 ISMS Style Guide.

Rendering Error Fixes

  • Fixed 5 xychart blocks with unquoted x-axis items in DATA_ANALYSIS_INTOP_OSINT.md
  • Fixed SWOT.md gantt chart with invalid quarterly date format (YYYY-Q1YYYY-MM-DD)
  • Fixed BUSINESS_PRODUCT_DOCUMENT.md flowchart/API node labels:
    • Prevented /api/... Mermaid shape parsing issues
    • Removed literal Markdown backticks from API node labels so labels render cleanly in diagram text

%%{init} Block Fixes (126 fixes across 29 files)

  • Converted single quotes to double quotes in all %%{init} blocks for GitHub compatibility
  • GitHub Mermaid renderer requires double-quoted JSON in init blocks

Quadrant Chart Styling (18 charts)

  • Added proper %%{init} blocks with ISMS Style Guide color coding to all quadrant charts
  • SWOT charts: Strengths=Green(#2E7D32), Weaknesses=Red(#D32F2F), Opportunities=Blue(#1565C0), Threats=Orange(#FF9800)
  • Risk matrices: quadrant-1 (top-right, highest severity) Red(#D32F2F), quadrant-2 Orange(#FF9800), quadrant-3 Green(#2E7D32), quadrant-4 Amber(#FFC107)
  • Quoted unquoted point labels in FUTURE_SWOT.md

Quadrant Label/Color Consistency (across all risk and SWOT charts)

  • Fixed THREAT_MODEL.md risk heat matrix: quadrant-1 (high likelihood + high impact) correctly labeled "Immediate Action Required" (Red)
  • Fixed FUTURE_THREAT_MODEL.md risk heat matrix: quadrant-1 "Critical Risk" uses Red(#D32F2F) instead of Orange
  • Fixed FUTURE_THREAT_MODEL.md "Threat Agent Capability vs Motivation" chart: quadrant-1 "Critical Priority" uses Red(#D32F2F) instead of Blue
  • Standardized FUTURE_THREAT_MODEL.md low-risk green in both quadrant charts to #2E7D32 (replacing #4CAF50) for consistent palette usage
  • Fixed intelligence-dashboard.md risk matrix: quadrant-1 "Critical Risks" uses Red(#D32F2F) instead of Orange
  • Fixed top10-electoral-risk.md district vulnerability map: quadrant-1 "Critical Risk" uses Red(#D32F2F), quadrant-4 "Moderate Risk" uses Amber(#FFC107)
  • Fixed top10-most-productive.md productivity matrix: swapped "High Efficiency"/"Low Efficiency" labels to match axis directions
  • Fixed SWOT.md alternative network diagram classDef fills and legend to use exact ISMS palette hex values

Dark/Light Mode Compatibility

  • Used "theme": "base" for better dark/light mode rendering
  • Added explicit text colors on quadrant axes and labels for readability

Code Review Fixes

  • Removed duplicate %%{init} blocks in THREAT_MODEL.md and FUTURE_THREAT_MODEL.md
  • Fixed gantt axisFormat to a valid format string

Validation

  • Previously validated all 452 Mermaid blocks across 60 files with mermaid-cli (mmdc) — 0 errors
  • Re-validated branch after latest review fixes with mvn -q -DskipTests clean compile (success)

Type of Change

Primary Changes

  • 🚀 New Feature
  • 🔄 Enhancement
  • 🐛 Bug Fix
  • 📦 Dependency Update

Political Analysis

  • 📊 Political Data Analysis
    • Party Analysis
    • Committee Processing
    • Government Data
    • Riksdagen Integration
  • 📈 Analytics & Metrics
    • Performance Metrics
    • Risk Assessment
    • Decision Analysis
    • Transparency Metrics

Technical Changes

  • 🎨 UI/UX Changes
    • Layout Updates
    • Form Improvements
    • Visualization Updates
  • 🏗️ Infrastructure
    • Database Changes
    • Performance Optimization
    • Configuration Updates
  • 🔒 Security & Compliance
    • Authentication
    • Authorization
    • Data Protection
  • 📝 Documentation
    • Technical Documentation
    • User Documentation
    • API Documentation
  • ✅ Testing
    • Unit Tests
    • Integration Tests
    • Performance Tests

Impact Analysis

Political Analysis Impact

  • Impact on data quality: None — documentation/diagram rendering only
  • Impact on analysis accuracy: N/A
  • Impact on transparency features: Diagrams render consistently and with correct risk semantics

Technical Impact

  • Performance impact: None
  • Security implications: None
  • Dependency changes: None

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Political data validation completed
  • Security compliance verified
  • Performance testing completed
  • mvn -q -DskipTests clean compile passes after final review-driven updates
  • All 452 Mermaid blocks previously validated with mermaid-cli (mmdc) — 0 errors

Documentation

  • JavaDoc updated
  • README updated
  • API documentation updated
  • Package/module documentation updated
  • Political analysis documentation updated

Screenshots

N/A — markdown/mermaid rendering changes are viewable on GitHub.

Related Issues

Checklist

  • Code follows project coding standards
  • Comments are clear and helpful
  • Documentation is updated
  • Tests are passing
  • Security compliance is maintained
  • Performance impact is acceptable
  • Breaking changes are documented
  • Changes are backward compatible

Additional Notes

Files modified remain within the original scope (31 markdown files across root docs, json-export-specs/, and json-export-specs/visualizations/). Latest feedback fixes were limited to:

  • BUSINESS_PRODUCT_DOCUMENT.md
  • FUTURE_THREAT_MODEL.md

Security Considerations

  • No sensitive data exposed
  • Security best practices followed
  • Compliance requirements met

Release Notes

Fix Mermaid rendering and semantic consistency across documentation: normalized init block JSON quoting, corrected chart parse/render issues, aligned quadrant risk/SWOT color mappings to ISMS palette, corrected quadrant label semantics, removed literal backticks in API endpoint Mermaid node labels, and standardized low-risk green (#2E7D32) across FUTURE_THREAT_MODEL.md quadrant charts.

Copilot AI and others added 4 commits April 8, 2026 23:59
…, and SWOT quadrant colors

Agent-Logs-Url: https://github.com/Hack23/cia/sessions/e574c177-17b8-42f1-83d0-327c4ec8831a

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
… flowchart parse error

Agent-Logs-Url: https://github.com/Hack23/cia/sessions/e574c177-17b8-42f1-83d0-327c4ec8831a

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

📊 JSON Schema Validation Results

Validation Summary:

  • ⏰ Generated: 2026-04-09T00:31:43.983927+00:00
  • 📋 Schemas Validated: 5
  • 📁 Sample Files Analyzed: 202
  • ⚠️ Total Mismatches: 144

Schema Status

Schema Fields Views Matched Mismatches Status
Politician 55 12 41 ⚠️ REVIEW
Party 51 17 47 ⚠️ REVIEW
Committee 29 12 25 ⚠️ REVIEW
Ministry 33 8 31 ⚠️ REVIEW
Intelligence 0 5 0 ✅ PASS

📄 Full Report: See uploaded artifacts for detailed validation report

ℹ️ Status: Field mismatches are documented and tracked. These represent differences between original projected schemas and actual implemented data.

📄 Data-Validated Schemas: See *-schema-validated.md files for schemas matching actual data (144 mismatches documented).

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 32f73ef.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Files

None

Copilot AI requested a review from pethers April 9, 2026 00:33
@pethers pethers marked this pull request as ready for review April 9, 2026 00:34
Copilot AI review requested due to automatic review settings April 9, 2026 00:34
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 standardizes and fixes Mermaid diagram syntax across the documentation set so diagrams reliably render on GitHub and align with the Hack23 ISMS styling approach.

Changes:

  • Normalizes Mermaid %%{init}%% blocks to use double-quoted values (GitHub renderer compatibility) and applies consistent "theme": "base".
  • Fixes multiple Mermaid syntax edge-cases (e.g., xychart unquoted x-axis labels, quadrant chart point label quoting, gantt date formats/durations).
  • Updates select flowcharts to prevent Mermaid mis-parsing (e.g., /api/... node labels rendered as shapes).

Reviewed changes

Copilot reviewed 31 out of 31 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
THREAT_MODEL.md Updates init blocks and adds quadrant chart styling for the risk heat matrix.
FUTURE_THREAT_MODEL.md Standardizes init blocks and adds quadrant chart styling/quoting for future-state matrices.
SWOT.md Adds quadrant chart init styling and fixes gantt chart to use valid date/axis formats.
FUTURE_SWOT.md Adds quadrant chart init styling and quotes point labels for reliable rendering.
DATA_ANALYSIS_INTOP_OSINT.md Fixes Mermaid init quoting and x-axis label quoting for multiple xychart blocks; keeps diagrams renderable.
BUSINESS_PRODUCT_DOCUMENT.md Standardizes init blocks and prevents /api/... labels from being parsed as parallelogram shapes.
CRA-ASSESSMENT.md Standardizes Mermaid init blocks to GitHub-compatible quoting.
INTELLIGENCE_DATA_FLOW.md Standardizes Mermaid init blocks to GitHub-compatible quoting.
json-export-specs/README.md Standardizes Mermaid init blocks to GitHub-compatible quoting.
json-export-specs/IMPLEMENTATION_GUIDE.md Standardizes Mermaid init blocks to GitHub-compatible quoting.
json-export-specs/schemas/politician-schema.md Standardizes Mermaid init blocks to GitHub-compatible quoting.
json-export-specs/schemas/party-schema.md Standardizes Mermaid init blocks to GitHub-compatible quoting.
json-export-specs/schemas/ministry-schema.md Standardizes Mermaid init blocks to GitHub-compatible quoting.
json-export-specs/schemas/intelligence-schema.md Standardizes Mermaid init blocks to GitHub-compatible quoting.
json-export-specs/schemas/committee-schema.md Standardizes Mermaid init blocks to GitHub-compatible quoting.
json-export-specs/visualizations/top10-rising-stars.md Standardizes init blocks; adds quadrant chart styling and quotes point labels.
json-export-specs/visualizations/top10-party-rebels.md Standardizes init blocks; adds quadrant chart styling and quotes point labels.
json-export-specs/visualizations/top10-most-productive.md Standardizes init blocks; adds quadrant chart styling and quotes point labels.
json-export-specs/visualizations/top10-most-influential.md Standardizes init blocks; adds quadrant chart styling and quotes point labels.
json-export-specs/visualizations/top10-most-controversial.md Standardizes init blocks; adds quadrant chart styling and quotes point labels.
json-export-specs/visualizations/top10-most-absent.md Standardizes init blocks for GitHub rendering.
json-export-specs/visualizations/top10-media-presence.md Standardizes init blocks; adds quadrant chart styling and quotes point labels.
json-export-specs/visualizations/top10-ethics-concerns.md Standardizes init blocks; adds quadrant chart styling and quotes point labels.
json-export-specs/visualizations/top10-electoral-risk.md Standardizes init blocks; adds quadrant chart styling and quotes point labels.
json-export-specs/visualizations/top10-coalition-brokers.md Standardizes init blocks; adds quadrant chart styling and quotes point labels.
json-export-specs/visualizations/politician-career-analysis.md Standardizes Mermaid init blocks to GitHub-compatible quoting.
json-export-specs/visualizations/party-longitudinal-analysis.md Standardizes Mermaid init blocks to GitHub-compatible quoting.
json-export-specs/visualizations/intelligence-dashboard.md Standardizes init blocks; adds quadrant chart styling and quotes point labels.
json-export-specs/visualizations/government-cabinet.md Standardizes init blocks; adds quadrant chart styling and quotes point labels.
json-export-specs/visualizations/election-cycle-analysis.md Standardizes Mermaid init blocks to GitHub-compatible quoting.
json-export-specs/visualizations/committee-network.md Standardizes init blocks; adds quadrant chart styling and quotes point labels.

Comment on lines 433 to 435
quadrantChart
title 🎯 CIA Platform Risk Heat Matrix
x-axis Low Likelihood --> High Likelihood
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

The quadrant assignments for this risk heat matrix look inconsistent with the axis directions and the plotted high-likelihood/high-impact points. E.g., "🌐 Web App Compromise" ([0.6, 0.9]) is high likelihood + high impact but will land in the top-right quadrant, while the quadrant labeling later in the chart marks quadrant-1 as "Monitor & Prepare" and quadrant-2 as "Immediate Action Required". Consider re-mapping the quadrant labels (and matching fill colors) so the high/high quadrant is the one marked as critical/immediate action.

Copilot uses AI. Check for mistakes.
@pethers
Copy link
Copy Markdown
Member

pethers commented Apr 9, 2026

@copilot apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 9, 2026

@copilot apply changes based on the comments in this thread

Fixed in 800af01. Swapped quadrant-1 and quadrant-2 labels and colors so the top-right quadrant (high likelihood + high impact) is now "Immediate Action Required" (Red #D32F2F) and the top-left quadrant (low likelihood + high impact) is "Monitor & Prepare" (Orange #FF9800).

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

📊 JSON Schema Validation Results

Validation Summary:

  • ⏰ Generated: 2026-04-09T01:07:58.015799+00:00
  • 📋 Schemas Validated: 5
  • 📁 Sample Files Analyzed: 202
  • ⚠️ Total Mismatches: 144

Schema Status

Schema Fields Views Matched Mismatches Status
Politician 55 12 41 ⚠️ REVIEW
Party 51 17 47 ⚠️ REVIEW
Committee 29 12 25 ⚠️ REVIEW
Ministry 33 8 31 ⚠️ REVIEW
Intelligence 0 5 0 ✅ PASS

📄 Full Report: See uploaded artifacts for detailed validation report

ℹ️ Status: Field mismatches are documented and tracked. These represent differences between original projected schemas and actual implemented data.

📄 Data-Validated Schemas: See *-schema-validated.md files for schemas matching actual data (144 mismatches documented).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 31 out of 31 changed files in this pull request and generated 4 comments.

Comment on lines +49 to +50
"quadrant1Fill": "#FF9800",
"quadrant2Fill": "#D32F2F",
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

In this risk matrix, quadrant-1 is labeled "Critical Risks" (top-right based on the axis directions), but the init block assigns quadrant1Fill="#FF9800" (orange) while quadrant2Fill="#D32F2F" (red). This makes the "Critical" quadrant render orange and "Strategic Concerns" red, which is inconsistent with the risk semantics used elsewhere (e.g., THREAT_MODEL.md heat matrix uses red for quadrant-1). Swap the quadrant1Fill/quadrant2Fill colors (or adjust the quadrant labels) so the critical/high-high quadrant renders red.

Suggested change
"quadrant1Fill": "#FF9800",
"quadrant2Fill": "#D32F2F",
"quadrant1Fill": "#D32F2F",
"quadrant2Fill": "#FF9800",

Copilot uses AI. Check for mistakes.
Comment on lines +514 to +515
"quadrant1Fill": "#FF9800",
"quadrant2Fill": "#D32F2F",
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

The heat matrix labels quadrant-1 as "Critical Risk", but the init block sets quadrant1Fill="#FF9800" (orange) and quadrant2Fill="#D32F2F" (red). Given quadrant-1 is the high-likelihood/high-impact quadrant (top-right), this will color "Critical Risk" orange and the adjacent quadrant red. Swap quadrant1Fill/quadrant2Fill (or update quadrant labels) so the critical quadrant renders red, consistent with THREAT_MODEL.md.

Suggested change
"quadrant1Fill": "#FF9800",
"quadrant2Fill": "#D32F2F",
"quadrant1Fill": "#D32F2F",
"quadrant2Fill": "#FF9800",

Copilot uses AI. Check for mistakes.
Comment on lines +66 to +72
%%{init: {
"theme": "base",
"themeVariables": {
"quadrant1Fill": "#1565C0",
"quadrant2Fill": "#2E7D32",
"quadrant3Fill": "#D32F2F",
"quadrant4Fill": "#FF9800",
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

This SWOT quadrant chart uses an updated color mapping (Opportunities=blue, Strengths=green, Weaknesses=red, Threats=orange). Later in the same document, the accompanying legend + the alternative network visualization still describe/use a different palette (e.g., Weaknesses=yellow, Opportunities=purple, Threats=red). Please align the legend/alternative diagram styling with the quadrant chart so readers don’t get conflicting color semantics in one doc.

Copilot uses AI. Check for mistakes.
Comment on lines +87 to +90
"quadrant1Fill": "#1565C0",
"quadrant2Fill": "#2E7D32",
"quadrant3Fill": "#FF9800",
"quadrant4Fill": "#D32F2F",
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

In this quadrant chart, quadrant-1 is labeled "Critical Risk" (top-right given the axis directions), but the init block sets quadrant1Fill="#1565C0" (blue) and quadrant4Fill="#D32F2F" (red). This makes the "Critical Risk" quadrant render blue while "Moderate Risk" renders red. Adjust the quadrant fill assignments (or reorder the quadrant labels) so the critical quadrant uses the highest-severity color (typically red) and the lower-severity quadrants use less severe colors.

Suggested change
"quadrant1Fill": "#1565C0",
"quadrant2Fill": "#2E7D32",
"quadrant3Fill": "#FF9800",
"quadrant4Fill": "#D32F2F",
"quadrant1Fill": "#D32F2F",
"quadrant2Fill": "#FF9800",
"quadrant3Fill": "#2E7D32",
"quadrant4Fill": "#1565C0",

Copilot uses AI. Check for mistakes.
@pethers
Copy link
Copy Markdown
Member

pethers commented Apr 9, 2026

@copilot apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 9, 2026

@copilot apply changes based on the comments in this thread

Applied all 4 review fixes in 2648c83:

  1. intelligence-dashboard.md — Swapped quadrant1Fill/quadrant2Fill so "Critical Risks" (top-right) renders red (#D32F2F).
  2. FUTURE_THREAT_MODEL.md — Swapped quadrant1Fill/quadrant2Fill so "Critical Risk" (top-right) renders red (#D32F2F), consistent with THREAT_MODEL.md.
  3. SWOT.md — Aligned alternative network diagram classDef colors and legend to match the quadrant chart ISMS palette: Strengths=Green(#2E7D32), Weaknesses=Red(#D32F2F), Opportunities=Blue(#1565C0), Threats=Orange(#FF9800).
  4. top10-electoral-risk.md — Reassigned quadrant fills so "Critical Risk" (top-right) uses red (#D32F2F), "High Risk" uses orange (#FF9800), "Low Risk" uses green (#2E7D32), and "Moderate Risk" uses blue (#1565C0).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 31 out of 31 changed files in this pull request and generated 3 comments.

Comment on lines +350 to +353
"quadrant1Fill": "#1565C0",
"quadrant2Fill": "#2E7D32",
"quadrant3Fill": "#FF9800",
"quadrant4Fill": "#D32F2F",
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

In this "Threat Agent Capability vs Motivation" quadrant chart, quadrant-1 is labeled "Critical Priority" but the init sets quadrant1Fill to blue and quadrant4Fill to red. This inverts the intended severity semantics (critical/highest severity should be red in quadrant-1/top-right). Update the quadrant fill assignments so quadrant-1 uses the critical color (e.g., #D32F2F) and lower-severity quadrants use the lower-severity colors.

Suggested change
"quadrant1Fill": "#1565C0",
"quadrant2Fill": "#2E7D32",
"quadrant3Fill": "#FF9800",
"quadrant4Fill": "#D32F2F",
"quadrant1Fill": "#D32F2F",
"quadrant2Fill": "#FF9800",
"quadrant3Fill": "#2E7D32",
"quadrant4Fill": "#1565C0",

Copilot uses AI. Check for mistakes.
Comment on lines 145 to 148
@@ -125,17 +147,18 @@ quadrantChart
quadrant-3 Low Productivity
quadrant-4 High Efficiency
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

These quadrant labels don’t match the axis directions: with x=Low→High Volume and y=Low→High Success, quadrant-2 (top-left) is low volume/high success (high efficiency) and quadrant-4 (bottom-right) is high volume/low success (low efficiency). Swap the "High Efficiency" and "Low Efficiency" labels to avoid misclassifying the quadrants.

Copilot uses AI. Check for mistakes.
"quadrant1Fill": "#D32F2F",
"quadrant2Fill": "#FF9800",
"quadrant3Fill": "#2E7D32",
"quadrant4Fill": "#1565C0",
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

This chart uses quadrant4Fill "#1565C0" (blue) for "Moderate Risk", but other risk heat matrices in this PR use amber (e.g., #FFC107) for the lowest-severity quadrant. Consider aligning quadrant-4’s fill color with the risk-matrix palette used elsewhere to keep severity colors consistent across docs.

Suggested change
"quadrant4Fill": "#1565C0",
"quadrant4Fill": "#FFC107",

Copilot uses AI. Check for mistakes.
@pethers
Copy link
Copy Markdown
Member

pethers commented Apr 9, 2026

@copilot apply changes based on the comments in this thread

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

📊 JSON Schema Validation Results

Validation Summary:

  • ⏰ Generated: 2026-04-09T08:25:52.012161+00:00
  • 📋 Schemas Validated: 5
  • 📁 Sample Files Analyzed: 202
  • ⚠️ Total Mismatches: 144

Schema Status

Schema Fields Views Matched Mismatches Status
Politician 55 12 41 ⚠️ REVIEW
Party 51 17 47 ⚠️ REVIEW
Committee 29 12 25 ⚠️ REVIEW
Ministry 33 8 31 ⚠️ REVIEW
Intelligence 0 5 0 ✅ PASS

📄 Full Report: See uploaded artifacts for detailed validation report

ℹ️ Status: Field mismatches are documented and tracked. These represent differences between original projected schemas and actual implemented data.

📄 Data-Validated Schemas: See *-schema-validated.md files for schemas matching actual data (144 mismatches documented).

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 9, 2026

@copilot apply changes based on the comments in this thread

Applied all 3 review fixes in 4da1f32:

  1. FUTURE_THREAT_MODEL.md — Reordered "Threat Agent Capability vs Motivation" quadrant fills so quadrant-1 ("Critical Priority", top-right) uses red (#D32F2F) and quadrant-4 uses blue (#1565C0).
  2. top10-most-productive.md — Swapped "High Efficiency" (now quadrant-2, top-left = low volume/high success) and "Low Efficiency" (now quadrant-4, bottom-right = high volume/low success) to match axis directions.
  3. top10-electoral-risk.md — Changed quadrant4Fill from blue (#1565C0) to amber (#FFC107) for consistency with the risk-matrix palette used across other docs.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 31 out of 31 changed files in this pull request and generated 1 comment.

Comment on lines +347 to +354
%%{init: {
"theme": "base",
"themeVariables": {
"quadrant1Fill": "#D32F2F",
"quadrant2Fill": "#FF9800",
"quadrant3Fill": "#2E7D32",
"quadrant4Fill": "#1565C0",
"quadrantTitleFill": "#ffffff",
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

In the "Threat Agent Capability vs Motivation" quadrant chart, quadrant-1 is labeled "Critical Priority" but the init themeVariables set quadrant1Fill to blue (#1565C0) and quadrant4Fill to red (#D32F2F). This inverts the repo’s risk/priority color convention where quadrant-1 (top-right, highest severity) should be red (see THREAT_MODEL.md risk heat matrix). Update the quadrant fill mapping here so the "Critical Priority" quadrant uses the red fill and the remaining quadrants follow the intended severity gradient.

Copilot uses AI. Check for mistakes.
@pethers
Copy link
Copy Markdown
Member

pethers commented Apr 9, 2026

@copilot apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 9, 2026

@copilot apply changes based on the comments in this thread

This was already fixed in 4da1f32. The "Threat Agent Capability vs Motivation" chart's quadrant1Fill was changed from blue (#1565C0) to red (#D32F2F) in that commit. The review comment was generated against the pre-fix state. Both quadrant charts in FUTURE_THREAT_MODEL.md now correctly use red (#D32F2F) for quadrant-1 (top-right, highest severity).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 31 out of 31 changed files in this pull request and generated 2 comments.

Comment on lines +2762 to +2765
POL_API["`/api/v1/politicians`"]
PARTY_API["`/api/v1/parties`"]
RISK_API["`/api/v1/risk-assessments`"]
DECISION_API["`/api/v1/decision-analytics`"]
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

Mermaid flowchart node labels don’t render Markdown, so the backticks will appear literally in the diagram. To keep the label readable while avoiding the /.../ shape parsing, use a quoted label without backticks (or escape the leading /) for these API nodes.

Suggested change
POL_API["`/api/v1/politicians`"]
PARTY_API["`/api/v1/parties`"]
RISK_API["`/api/v1/risk-assessments`"]
DECISION_API["`/api/v1/decision-analytics`"]
POL_API["/api/v1/politicians"]
PARTY_API["/api/v1/parties"]
RISK_API["/api/v1/risk-assessments"]
DECISION_API["/api/v1/decision-analytics"]

Copilot uses AI. Check for mistakes.
"themeVariables": {
"quadrant1Fill": "#D32F2F",
"quadrant2Fill": "#FF9800",
"quadrant3Fill": "#4CAF50",
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

This file uses two different greens for the “low risk/low priority” quadrant (#2E7D32 in the Threat Agent chart vs #4CAF50 in the Risk Heat Matrix). To keep the ISMS palette consistent across diagrams, pick one green and use it consistently in both init blocks.

Suggested change
"quadrant3Fill": "#4CAF50",
"quadrant3Fill": "#2E7D32",

Copilot uses AI. Check for mistakes.
@pethers
Copy link
Copy Markdown
Member

pethers commented Apr 9, 2026

@copilot apply changes based on the comments in this thread

@pethers
Copy link
Copy Markdown
Member

pethers commented Apr 9, 2026

This was already fixed in 4da1f32 — the "Threat Agent Capability vs Motivation" quadrant fills were reordered so quadrant-1 ("Critical Priority", top-right) uses red (#D32F2F) and quadrant-4 uses blue (#1565C0). The reviewer comment was generated against the pre-fix state.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

📊 JSON Schema Validation Results

Validation Summary:

  • ⏰ Generated: 2026-04-09T10:26:27.988833+00:00
  • 📋 Schemas Validated: 5
  • 📁 Sample Files Analyzed: 202
  • ⚠️ Total Mismatches: 144

Schema Status

Schema Fields Views Matched Mismatches Status
Politician 55 12 41 ⚠️ REVIEW
Party 51 17 47 ⚠️ REVIEW
Committee 29 12 25 ⚠️ REVIEW
Ministry 33 8 31 ⚠️ REVIEW
Intelligence 0 5 0 ✅ PASS

📄 Full Report: See uploaded artifacts for detailed validation report

ℹ️ Status: Field mismatches are documented and tracked. These represent differences between original projected schemas and actual implemented data.

📄 Data-Validated Schemas: See *-schema-validated.md files for schemas matching actual data (144 mismatches documented).

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 9, 2026

@copilot apply changes based on the comments in this thread

Applied in 32f73ef. Updated BUSINESS_PRODUCT_DOCUMENT.md to remove literal backticks from Mermaid API endpoint node labels, and updated FUTURE_THREAT_MODEL.md to use a consistent low-risk green (quadrant3Fill: "#2E7D32") across both quadrant charts.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 9, 2026

@pethers pethers merged commit 38248e1 into master Apr 9, 2026
12 checks passed
@pethers pethers deleted the copilot/improve-mermaid-diagrams branch April 9, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants