diff --git a/.github/openspec/changes/thunder-plugin-qa/design.md b/.github/openspec/changes/thunder-plugin-qa/design.md index adaca9f2..14056034 100644 --- a/.github/openspec/changes/thunder-plugin-qa/design.md +++ b/.github/openspec/changes/thunder-plugin-qa/design.md @@ -1,4 +1,4 @@ -# Design: Thunder Plugin QA System +# Design: Thunder Plugin QA System ## Architecture Overview @@ -23,7 +23,7 @@ Plugin files in ThunderNanoServices/Dictionary/ Chat report: Issue Summary table, failures only │ ▼ -Reports/plugin/Dictionary_2026-06-05.md ← Markdown report with clickable issue navigation +Reports/plugin/Dictionary_2026-06-05.html <- HTML report with clickable issue navigation and syntax-highlighted code blocks ``` ``` diff --git a/.github/openspec/changes/thunder-plugin-qa/proposal.md b/.github/openspec/changes/thunder-plugin-qa/proposal.md index dc4db196..e1fb3e1c 100644 --- a/.github/openspec/changes/thunder-plugin-qa/proposal.md +++ b/.github/openspec/changes/thunder-plugin-qa/proposal.md @@ -1,4 +1,4 @@ -# Proposal: Thunder PluginQualityAdvisor System +# Proposal: Thunder PluginQualityAdvisor System ## Intent @@ -54,8 +54,8 @@ automatically. **Review reports** (Markdown, generated after each review run) - Single `.md` file per review with Issue Summary table and Detailed Findings -- Plugin report: `Reports/plugin/{PluginName}_{YYYY-MM-DD}.md` -- Interface report: `Reports/interface/{InterfaceName}_{YYYY-MM-DD}.md` +- Plugin report: `Reports/plugin/{PluginName}_{YYYY-MM-DD}.html` +- Interface report: `Reports/interface/{InterfaceName}_{YYYY-MM-DD}.html` - Issue Summary table with clickable `[rule_id - Name](#issue-N)` links navigating to detailed sections - Each finding has: What's wrong (plain English), Code found, Fix - PASS and SKIP rules excluded — only failures shown @@ -102,7 +102,7 @@ ThunderTools/PluginQualityAdvisor/ │ └── thunder-interface-rules.yaml └── Reports/ ├── plugin/ - │ └── {PluginName}_{YYYY-MM-DD}.md + │ └── {PluginName}_{YYYY-MM-DD}.html └── interface/ - └── {InterfaceName}_{YYYY-MM-DD}.md + └── {InterfaceName}_{YYYY-MM-DD}.html ``` \ No newline at end of file diff --git a/.github/openspec/changes/thunder-plugin-qa/specs/interface/spec.md b/.github/openspec/changes/thunder-plugin-qa/specs/interface/spec.md index 9aaafdab..f31dcdf3 100644 --- a/.github/openspec/changes/thunder-plugin-qa/specs/interface/spec.md +++ b/.github/openspec/changes/thunder-plugin-qa/specs/interface/spec.md @@ -1,4 +1,4 @@ -# Delta for Interface Validation and Plugin Generation +# Delta for Interface Validation and Plugin Generation ## ADDED Requirements @@ -27,7 +27,7 @@ a Thunder COM interface header against 19 rules (16 core + 3 advisory). - THEN it applies all 19 rules loaded from `thunder-interface-rules.yaml` in order: core_1_1 through core_16_1 (16 core), then advisory_m1_1 through advisory_m3_1 (3 advisory) - AND outputs an Issue Summary table with columns: Issue No. | Status | Rule | File | Line | Issue -- AND generates a Markdown report with clickable navigation to Detailed Findings +- AND generates a self-contained HTML report with clickable navigation to Detailed Findings and syntax-highlighted code blocks --- diff --git a/.github/openspec/changes/thunder-plugin-qa/specs/reports/spec.md b/.github/openspec/changes/thunder-plugin-qa/specs/reports/spec.md index fc08b5f4..796b1570 100644 --- a/.github/openspec/changes/thunder-plugin-qa/specs/reports/spec.md +++ b/.github/openspec/changes/thunder-plugin-qa/specs/reports/spec.md @@ -1,28 +1,27 @@ -# Spec: Thunder PluginQualityAdvisor Report Generation +# Spec: Thunder PluginQualityAdvisor Report Generation ## Purpose -After every `/thunder-plugin-review` or `/thunder-interface-review` run, the system generates a -Markdown report file with an Issue Summary table and Detailed Findings sections with clickable navigation. +After every `/thunder-plugin-review` or `/thunder-interface-review` run, the system generates a self-contained HTML report file with an Issue Summary table and Detailed Findings sections with clickable navigation and syntax-highlighted code blocks. --- ## Requirements -### REQ-R1 — Plugin review Markdown report +### REQ-R1 — Plugin review HTML report **Scenario:** `/thunder-plugin-review` completes all 84 rules -- The system MUST generate a Markdown file at: - `ThunderTools/PluginQualityAdvisor/Reports/plugin/{PluginName}_{YYYY-MM-DD}.md` +- The system MUST generate an HTML file at: + `ThunderTools/PluginQualityAdvisor/Reports/plugin/{PluginName}_{YYYY-MM-DD}.html` - If a file with that name already exists, append `_2`, `_3` etc. (never overwrite) - The report MUST contain: header with totals, Issue Summary table, and Detailed Findings sections - PASS and SKIP rules are NOT included — only VIOLATION, WARNING, and SUGGESTION -### REQ-R2 — Interface review Markdown report +### REQ-R2 — Interface review HTML report **Scenario:** `/thunder-interface-review` completes all 19 rules -- The system MUST generate a Markdown file at: - `ThunderTools/PluginQualityAdvisor/Reports/interface/{InterfaceName}_{YYYY-MM-DD}.md` +- The system MUST generate an HTML file at: + `ThunderTools/PluginQualityAdvisor/Reports/interface/{InterfaceName}_{YYYY-MM-DD}.html` - Same no-overwrite rule applies - Same structure: header, Issue Summary table, Detailed Findings @@ -30,8 +29,8 @@ Markdown report file with an Issue Summary table and Detailed Findings sections The report MUST start with: -```markdown -# Thunder Plugin Review - {PluginName} +```html + **Date:** {YYYY-MM-DD} **Plugin:** {PluginName} @@ -46,7 +45,7 @@ The report MUST contain an Issue Summary table with clickable navigation: |--------|-------------| | Issue No. | Sequential number | | Status | ❌ VIOLATION / ⚠️ WARNING / 💡 SUGGESTION (Unicode emoji, never GitHub shortcodes) | -| Rule | Clickable link: `[rule_id - Name](#issue-N)` navigating to detailed section | +| Rule | Clickable link: `rule_id - Name` navigating to detailed section | | File | Source file name | | Line | Exact line number | | Issue | Short description | @@ -55,12 +54,12 @@ The report MUST contain an Issue Summary table with clickable navigation: Each issue MUST have a detailed section with: -- Heading: `### Issue N` (creates `#issue-n` anchor for navigation) +- Heading: `
` block (highlight.js syntax-highlighted)
+- **Fix:** Corrected code in a `` block
- If severity was downgraded: **Note:** paragraph explaining why
Issues MUST be ordered by severity: VIOLATIONS first, then WARNINGS, then SUGGESTIONS.
@@ -74,13 +73,13 @@ Issues MUST be ordered by severity: VIOLATIONS first, then WARNINGS, then SUGGES
- The report MUST be written via terminal (`[System.IO.File]::WriteAllText`) to avoid VS Code editor buffer conflicts
- After writing, the file size MUST be verified (non-zero)
-- The report MUST be opened in Markdown Preview (`markdown.showPreview`), NOT in the editor
-- The editor MUST NOT open the file directly (triggers notebook mode and creates `codebook-md/` folder)
+- The report MUST be opened in a browser or VS Code Simple Browser (`simpleBrowser.show`), NOT in the editor
+- The editor MUST NOT open the file directly (shows raw HTML)
Post-generation chat message:
```
📄 Full report saved:
- PluginQualityAdvisor/Reports/plugin/{PluginName}_{YYYY-MM-DD}.md
+ PluginQualityAdvisor/Reports/plugin/{PluginName}_{YYYY-MM-DD}.html
{N} issue(s) - {violations} violations, {warnings} warnings, {suggestions} suggestions
```
@@ -88,8 +87,8 @@ Post-generation chat message:
If no issues were found, generate:
-```markdown
-# Thunder Plugin Review - {PluginName}
+```html
+
**Date:** {YYYY-MM-DD}
**Plugin:** {PluginName}
@@ -106,18 +105,18 @@ If no issues were found, generate:
ThunderTools/PluginQualityAdvisor/
└── Reports/
├── plugin/
- │ ├── Dictionary_2026-07-16.md
- │ └── NetworkControl_2026-07-16.md
+ │ ├── Dictionary_2026-07-16.html
+ │ └── NetworkControl_2026-07-16.html
└── interface/
- ├── INetworkControl_2026-07-16.md
- └── IDictionary_2026-07-16.md
+ ├── INetworkControl_2026-07-16.html
+ └── IDictionary_2026-07-16.html
```
---
## Out of Scope
-- CSV or Excel format (replaced by Markdown reports)
+- CSV or Excel format
- Report viewer command (Markdown Preview is sufficient)
- Diff between two reports (future)
- Automatic email or CI upload (future)
diff --git a/.github/openspec/changes/thunder-plugin-qa/tasks.md b/.github/openspec/changes/thunder-plugin-qa/tasks.md
index c78d5450..8035c8da 100644
--- a/.github/openspec/changes/thunder-plugin-qa/tasks.md
+++ b/.github/openspec/changes/thunder-plugin-qa/tasks.md
@@ -1,4 +1,4 @@
-# Tasks: Thunder Plugin QA System
+# Tasks: Thunder Plugin QA System
## Phase 1: YAML rule definitions
@@ -255,7 +255,7 @@
- Your Task: 5 steps (identify file → load YAML → validate all 19 rules →
report with Issue Summary table (❌/⚠️/💡) → provide specific fixes)
- Step 4 — Validate Findings: eliminate false positives before reporting
- - Step 6 — Generate Markdown Report: file path format, Issue Summary table with
+ - Step 6 - Generate HTML Report: file path format, Issue Summary table with
clickable navigation, Detailed Findings sections, write via terminal, open in preview
- Post-generation action: write via terminal, verify non-empty, open in Markdown Preview
- Contextual Judgment: JUDGE step table with Status field mapping
@@ -413,9 +413,9 @@
## Phase 5: Report generation
-- [x] 5.1 Add Step 6 (Markdown report) to `ThunderTools/PluginQualityAdvisor/Prompts/thunder-plugin-review.prompt.md`
+- [x] 5.1 Add Step 6 (HTML report) to `ThunderTools/PluginQualityAdvisor/Prompts/thunder-plugin-review.prompt.md`
- Appended after Command Examples section
- - File path: `ThunderTools/PluginQualityAdvisor/Reports/plugin/{PluginName}_{YYYY-MM-DD}.md`
+ - File path: `ThunderTools/PluginQualityAdvisor/Reports/plugin/{PluginName}_{YYYY-MM-DD}.html`
- Create folder if absent; never overwrite (append _2, _3 suffix)
- Report structure: header with totals, Issue Summary table, Detailed Findings sections
- Issue Summary table: Issue No. | Status | Rule (clickable link) | File | Line | Issue
@@ -425,14 +425,14 @@
- Verify non-empty after writing; open in Markdown Preview (not editor)
- Empty report (all pass): header + "✅ All rules passed"
-- [x] 5.2 Add Step 6 (Markdown report) to `ThunderTools/PluginQualityAdvisor/Prompts/thunder-interface-review.prompt.md`
+- [x] 5.2 Add Step 6 (HTML report) to `ThunderTools/PluginQualityAdvisor/Prompts/thunder-interface-review.prompt.md`
- Same format as plugin report
- - File path: `ThunderTools/PluginQualityAdvisor/Reports/interface/{InterfaceName}_{YYYY-MM-DD}.md`
+ - File path: `ThunderTools/PluginQualityAdvisor/Reports/interface/{InterfaceName}_{YYYY-MM-DD}.html`
- Same no-overwrite rule, same report structure, same post-generation actions
- [x] 5.3 Create spec `ThunderTools/openspec/changes/thunder-plugin-qa/specs/reports/spec.md`
- - REQ-R1: plugin Markdown report path + no-overwrite rule
- - REQ-R2: interface Markdown report path + no-overwrite rule
+ - REQ-R1: plugin HTML report path + no-overwrite rule
+ - REQ-R2: interface HTML report path + no-overwrite rule
- REQ-R3: report header format with totals
- REQ-R4: Issue Summary table with clickable navigation
- REQ-R5: Detailed Findings sections format
diff --git a/PluginQualityAdvisor/Prompts/thunder-interface-review.prompt.md b/PluginQualityAdvisor/Prompts/thunder-interface-review.prompt.md
index 74455dea..b7814d4c 100644
--- a/PluginQualityAdvisor/Prompts/thunder-interface-review.prompt.md
+++ b/PluginQualityAdvisor/Prompts/thunder-interface-review.prompt.md
@@ -106,7 +106,7 @@ In chat, provide a **concise summary table** of all issues found. Do NOT output
| 1 | ❌ VIOLATION | core_10_1 - @json Tag | IHdmiCecSink.h | 45 | @json tag missing — ZERO JSON-RPC code generated |
| 2 | ⚠️ WARNING | core_13_1 - Explicit Integer Widths | IHdmiCecSink.h | 72 | int parameter — use uint32_t |
-📄 Full report: `PluginQualityAdvisor/Reports/interface/IHdmiCecSink_2026-07-16.md`
+📄 Full report: `PluginQualityAdvisor/Reports/interface/IHdmiCecSink_2026-07-16.html`
```
### Status Symbols
@@ -118,17 +118,17 @@ In chat, provide a **concise summary table** of all issues found. Do NOT output
End chat output with:
```
-📄 Full report saved: PluginQualityAdvisor/Reports/interface/{InterfaceName}_{YYYY-MM-DD}.md
+📄 Full report saved: PluginQualityAdvisor/Reports/interface/{InterfaceName}_{YYYY-MM-DD}.html
{N} issue(s) - {violations} violations, {warnings} warnings, {suggestions} suggestions
```
---
-## Step 6 - Generate Markdown Report
+## Step 6 - Generate HTML Report
-After reporting results in chat, generate a Markdown report file with clickable navigation.
+After reporting results in chat, generate an HTML report file with clickable navigation and syntax-highlighted code blocks.
-**File path:** `PluginQualityAdvisor/Reports/interface/{InterfaceName}_{YYYY-MM-DD}.md`
+**File path:** `PluginQualityAdvisor/Reports/interface/{InterfaceName}_{YYYY-MM-DD}.html`
- Create `PluginQualityAdvisor/Reports/interface/` if it does not exist
- Never overwrite an existing file - append `_2`, `_3` etc. if needed
@@ -138,6 +138,38 @@ Run the following command in the interface file's git root to get the repo URL:
- Repo URL: `git remote get-url origin`
If git is unavailable, use `unknown`.
+**HTML shell (wrap the entire report content in this):**
+
+```html
+
+
+
+
+Thunder Interface Review - {InterfaceName}
+
+
+
+
+
+
+
+
+
+
+```
+
### Report Template
```markdown
@@ -210,10 +242,11 @@ virtual Core::hresult SetVolume(const uint32_t volume) = 0;
### Report Generation Rules
-- Each issue in the summary table links to its detailed section via the Rule column using `[rule_id - Name](#issue-N)` anchors
-- Each detailed section heading uses `### Issue N` (creates the `#issue-n` anchor automatically)
-- Each detailed section must end with a back-link to the summary table: `[\u2B06 Back to Issue Summary](#issue-summary)` — this allows readers to click back to the table after reading a finding
-- The rule ID and name appear as bold text on the first line under the heading
+- Render the report as a complete, self-contained HTML file using the HTML shell above
+- Use `` for the report title, `` for section headings, `` for issue headings
+- The issue summary is an HTML `