Skip to content

Added Plugin and Interface rules for Thunder QA#286

Open
workkavint-ship-it wants to merge 17 commits into
masterfrom
spec/plugin-qa-tool-integration
Open

Added Plugin and Interface rules for Thunder QA#286
workkavint-ship-it wants to merge 17 commits into
masterfrom
spec/plugin-qa-tool-integration

Conversation

@workkavint-ship-it

@workkavint-ship-it workkavint-ship-it commented Jun 15, 2026

Copy link
Copy Markdown

PR Summary

This PR adds the rule reference documents that will be used as the basis for the automated Thunder QA checks:

  1. Plugin Rules (openspec/changes/thunder-plugin-qa/specs/plugin/Thunder-plugin-rules.md) – 79 plugin-related rules
  2. Interface Rules (openspec/changes/thunder-plugin-qa/specs/interface/Thunder-interface-rules.md) – 19 interface-related rules

If you think a rule should be added, removed, reworded, or have its severity changed, please edit the relevant .md file and push to this branch.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 introduces an OpenSpec change bundle for a proposed “Thunder PluginQA” system, adding specification and planning documents for plugin/interface rule validation and CSV report generation.

Changes:

  • Added OpenSpec configuration plus a new change package (openspec/changes/thunder-plugin-qa/) containing proposal, design, tasks, and specs.
  • Added detailed rule reference documents for Thunder plugin rules (v3.3.0) and Thunder interface validation rules.
  • Added a report-generation spec describing CSV output formats for plugin and interface validation runs.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
openspec/config.yaml Adds baseline OpenSpec configuration stub (schema + optional context/rules sections).
openspec/changes/thunder-plugin-qa/tasks.md Adds a comprehensive implementation task breakdown for the PluginQA system.
openspec/changes/thunder-plugin-qa/specs/reports/spec.md Defines CSV report requirements/formatting for plugin & interface review outputs.
openspec/changes/thunder-plugin-qa/specs/plugin/Thunder-plugin-rules.md Adds the plugin rules reference document (v3.3.0) with 79 rules and examples.
openspec/changes/thunder-plugin-qa/specs/plugin/spec.md Adds the plugin validation delta/spec (folder structure, setup script behavior, rule loading).
openspec/changes/thunder-plugin-qa/specs/interface/Thunder-interface-rules.md Adds the interface validation rules reference document (core + advisory rules).
openspec/changes/thunder-plugin-qa/specs/interface/spec.md Adds the interface validation + plugin generation delta/spec (commands, setup, rule updates).
openspec/changes/thunder-plugin-qa/proposal.md Adds the PluginQA proposal and delivery structure overview.
openspec/changes/thunder-plugin-qa/design.md Adds the architecture/design document describing prompts, rule loading, reporting, and setup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread openspec/changes/thunder-plugin-qa/specs/interface/Thunder-interface-rules.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/interface/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/interface/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/interface/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/reports/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/design.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/proposal.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/interface/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/reports/spec.md Outdated
Comment thread .github/openspec/changes/thunder-plugin-qa/proposal.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 9 out of 9 changed files in this pull request and generated 11 comments.

Comment thread openspec/changes/thunder-plugin-qa/specs/plugin/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/plugin/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/plugin/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/plugin/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/interface/Thunder-interface-rules.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/design.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/tasks.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/interface/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/interface/spec.md Outdated
Comment thread .github/openspec/changes/thunder-plugin-qa/proposal.md Outdated
workkavint-ship-it and others added 2 commits June 15, 2026 19:46
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 9 out of 9 changed files in this pull request and generated 10 comments.

Comment thread .github/openspec/changes/thunder-plugin-qa/specs/plugin/spec.md
Comment thread openspec/changes/thunder-plugin-qa/specs/plugin/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/tasks.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/tasks.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/tasks.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/interface/Thunder-interface-rules.md Outdated
Comment thread .github/openspec/changes/thunder-plugin-qa/specs/plugin/Thunder-plugin-rules.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/plugin/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/plugin/spec.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 9 out of 9 changed files in this pull request and generated 2 comments.

Comment thread openspec/changes/thunder-plugin-qa/tasks.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 9 out of 9 changed files in this pull request and generated 10 comments.

Comment thread openspec/changes/thunder-plugin-qa/tasks.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/tasks.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/plugin/spec.md Outdated
Comment thread .github/openspec/changes/thunder-plugin-qa/specs/plugin/spec.md
Comment thread .github/openspec/changes/thunder-plugin-qa/specs/reports/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/design.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/design.md Outdated
Comment thread .github/openspec/changes/thunder-plugin-qa/specs/interface/spec.md
Comment thread .github/openspec/changes/thunder-plugin-qa/specs/plugin/spec.md Outdated
Comment thread .github/openspec/changes/thunder-plugin-qa/tasks.md
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@MFransen69 MFransen69 requested review from sebaszm and removed request for msieben June 16, 2026 06:42
@workkavint-ship-it workkavint-ship-it dismissed stale reviews from sramani-metro and sebaszm via fee8994 July 14, 2026 06:24
@workkavint-ship-it workkavint-ship-it marked this pull request as ready for review July 15, 2026 07:56
Copilot AI review requested due to automatic review settings July 15, 2026 07:56
sramani-metro
sramani-metro previously approved these changes Jul 15, 2026
@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Copyright scan failure
Commit: 13b0a7e
Report detail: https://gist.github.com/rdkcmf-jenkins/4df78243c711ac1494a6ac7cfaa16371'

@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/ThunderTools/286/rdkcentral/ThunderTools

  • Commit: 13b0a7e

Report detail: gist'

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 19 out of 20 changed files in this pull request and generated 27 comments.

Comment on lines +1 to +3
title: "Thunder Interface Validation Rules"
description: |
Rules for validating Thunder COM interface headers in ThunderInterfaces/interfaces/.
};

// Correct: pure declarations only
struct EXTERNAL IDictionary : virtual public Core::/t {
Comment on lines +69 to +72
class IDictionary : public Core::IUnknown {
enum { ID = 0x100 }; // ← raw value, not RPC::ID_*
virtual void Get(const string& key) { } // ← not pure virtual

@@ -0,0 +1,199 @@
## Purpose
Comment on lines +3 to +7
This prompt manages rules in `ThunderTools/PluginQualityAdvisor/rules/thunder-interface-rules.yaml` and keeps all related files in sync atomically:

1. `ThunderTools/PluginQualityAdvisor/rules/thunder-interface-rules.yaml` — rule data
2. `ThunderTools/PluginQualityAdvisor/Prompts/thunder-interface-review.prompt.md` — Quick Reference table + rule detail blocks
3. `ThunderTools/.github/openspec/changes/thunder-plugin-qa/specs/interface/spec.md` — spec requirements
Comment thread PluginQualityAdvisor/Update-Template-Guide/interface-rule-template-guide.md Outdated
Comment on lines +47 to +48
### Requirement: Setup script modifies VS Code settings.json to register prompt location
The `setup-prompts.py` script MUST modify the user-level VS Code `settings.json` to add `"ThunderTools/PluginQualityAdvisor/Prompts": true` under `chat.promptFilesLocations`.
Comment thread .github/openspec/changes/thunder-plugin-qa/specs/plugin/spec.md Outdated
Comment on lines +60 to +63
1. Verify the primary interface struct name matches the file name (e.g. IDictionary in IDictionary.h)
- Exception: multi-interface files or platform-specific groupings may have different naming
2. Verify there is no implementation code — only forward declarations, typedefs, struct/enum declarations
3. If issues are found → WARNING
@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Copyright scan failure
Commit: bfc2145
Report detail: https://gist.github.com/rdkcmf-jenkins/0d31b830646451eab2ca8156959abbc7'

@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/ThunderTools/286/rdkcentral/ThunderTools

  • Commit: bfc2145

Report detail: gist'

@sramani-metro sramani-metro removed the request for review from MFransen69 July 15, 2026 09:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 19 out of 20 changed files in this pull request and generated 19 comments.

Comment on lines +61 to +73
def read_settings(settings_path):
"""Read and parse settings.json, returning {} if missing or empty."""
if not os.path.isfile(settings_path):
return {}
with open(settings_path, "r", encoding="utf-8") as f:
content = f.read().strip()
if not content:
return {}
try:
return json.loads(content)
except (json.JSONDecodeError, ValueError):
print("WARNING: Could not parse settings.json as JSON. Starting with empty settings.")
return {}
Comment on lines +16 to +20
Use this table to pick the right template. Both follow the same semantic-review methodology.

| Question | Template A | Template B |
|---|---|---|


---

### `### Description` *(required for Add; optional for Update)*

---

### `### How to Find It (Extraction Logic)` *(required for Add; optional for Update)*

---

### `### How to Verify It (Verification Logic)` *(required for Add; optional for Update)*
Comment on lines +300 to +304
PluginQualityAdvisor/Reports/plugin/{PluginName}_{YYYY-MM-DD}.csv
{N} issue(s) logged - {violations} violations, {warnings} warnings, {suggestions} suggestions

To open in Excel (Windows):
Start-Process "PluginQualityAdvisor\Reports\plugin\{PluginName}_{YYYY-MM-DD}.csv"
Comment on lines +83 to +86
**File path:** `PluginQualityAdvisor/Reports/interface/{InterfaceName}_{YYYY-MM-DD}.csv`

- Create `PluginQualityAdvisor/Reports/interface/` if it does not exist
- Never overwrite an existing file - append `_2`, `_3` etc. if needed
Comment on lines +117 to +118
,,,,,,,,,,All rules passed - no issues found,,
```
Comment on lines +123 to +127
PluginQualityAdvisor/Reports/interface/{InterfaceName}_{YYYY-MM-DD}.csv
{N} issue(s) logged - {violations} violations, {warnings} warnings, {suggestions} suggestions

To open in Excel (Windows):
Start-Process "PluginQualityAdvisor\Reports\interface\{InterfaceName}_{YYYY-MM-DD}.csv"
Comment on lines +1 to +5
# Proposal: Thunder PluginQualityAdvisor System

## Intent

Thunder plugin development lacks automated validation. Developers ship plugins
@sramani-metro sramani-metro dismissed MFransen69’s stale review July 15, 2026 09:45

All changes requested by Marcel are addressed in subsequent changesets.

sramani-metro
sramani-metro previously approved these changes Jul 15, 2026
@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Copyright scan failure
Commit: 4dbaa88
Report detail: https://gist.github.com/rdkcmf-jenkins/2113f91c48c20afad8ca9fec1d3e33e4'

@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Copyright scan failure
Commit: 4dbaa88
Report detail: https://gist.github.com/rdkcmf-jenkins/cd05ebe28744245c7f638ef5e899c6eb'

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 19 out of 20 changed files in this pull request and generated 14 comments.

Comment on lines +69 to +73
try:
return json.loads(content)
except (json.JSONDecodeError, ValueError):
print("WARNING: Could not parse settings.json as JSON. Starting with empty settings.")
return {}
Comment on lines +293 to +294
No,Plugin,Date,Phase,Rule_ID,Rule_Name,Status,Severity,File,Line,Citation,Issue_Description,Fix_Summary,Reasoning
,,,,,,,,,,,,All checkpoints passed - no issues found,
@@ -0,0 +1,658 @@
version: 3.2.2
2. Verify inheritance is 'virtual public Core::IUnknown'
3. Verify a nested enum contains ID = RPC::ID_*
4. Verify all methods are pure virtual (= 0)
5. If any fails → VIOLATION
2. No method may have a body (even {})
3. No static methods allowed in interfaces
4. No non-virtual methods (constructors, operators excepted)
5. If any violation → VIOLATION
1. If the interface is intended to generate JSON-RPC code: verify // @json N.N.N appears immediately above the struct declaration
2. No blank lines between the @json tag and the struct line
3. If the interface is intentionally JSON-RPC-free (pure COM) → acceptable, note as design choice
4. If @json is missing from an interface that should have it → VIOLATION
**Verification Logic:**

1. Reason about the interface's overall purpose from its name and method set
2. If methods clearly belong to two or more distinct responsibilities → VIOLATION
Comment on lines +48 to +52
### Fix
// WRONG:

// CORRECT:

- **Yes/No Question** - single binary question; Yes = PASS, No = VIOLATION
- **Verification Steps** - 3-8 numbered steps using semantic reasoning (never regex)
- **Violation Pattern** - one-line citation summary, under 10 words
- **Fix** - `// WRONG:` and `// CORRECT:` code snippets
Comment on lines +18 to +20
| Question | Template A | Template B |
|---|---|---|

@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Copyright scan failure
Commit: 4dbaa88
Report detail: https://gist.github.com/rdkcmf-jenkins/4d42fd3331e8772edc73ebb4f236c36a'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants