diff --git a/docs/superpowers/specs/2026-05-08-maturity-matrix-editor-integration-design.md b/docs/superpowers/specs/2026-05-08-maturity-matrix-editor-integration-design.md new file mode 100644 index 00000000..cf432e48 --- /dev/null +++ b/docs/superpowers/specs/2026-05-08-maturity-matrix-editor-integration-design.md @@ -0,0 +1,207 @@ +# Maturity Matrix Editor Integration — Design Spec + +**Date:** 2026-05-08 +**Status:** Approved +**Author:** Tayeb Chlyah + +--- + +## Goal + +Integrate the Couchbase Use Case Maturity Assessment Matrix HTML tool into the Wiki.js markdown editor, following the same pattern as the existing draw.io integration. Users can insert a new matrix or edit an existing one via a visual editor, with the result stored as readable markdown in the wiki page. + +--- + +## Context + +The draw.io integration (`editor-modal-drawio.vue`) serves as the reference pattern: +- A sidebar button opens a full-screen iframe +- The iframe communicates with the Vue component via `postMessage` +- The result is stored as a fenced code block in the markdown +- `processMarkers` in `editor-markdown.vue` detects the stored block and renders an "Edit Diagram" inline button + +The maturity matrix integration follows this pattern with one key difference: the stored format is plain readable markdown (tables + summary scores), not base64 binary, making it parseable by any tool or AI. + +--- + +## Storage Format + +When saved, the wiki page contains: + +``` + +# Use Case Maturity Assessment Matrix + +**Customer:** +**Use Case:** +**Generated:** + +--- + +## Summary Scores + +| Section | Score | Status | +... + +--- + +## + +**Section Score:** ... + +```vega +{...radar chart JSON spec...} +``` + +| KPI | Score | Weight | Final | Max | Applicable | Notes | Action Plan | +|-----|-------|--------|-------|-----|------------|-------|-------------| +| | (