Skip to content

docs: add Copilot instructions modeled on plugin_evidence - #3

Merged
TheWitness merged 2 commits into
developfrom
chore/copilot-instructions
Sep 18, 2026
Merged

TheWitness merged 2 commits into
developfrom
chore/copilot-instructions

Conversation

@TheWitness

Copy link
Copy Markdown
Member

Adds/aligns .github/copilot-instructions.md to follow the structure used in Cacti/plugin_evidence, tailored to this plugin's actual hooks, database tables, naming conventions, and security-sensitive areas.

Copilot AI lite review requested due to automatic review settings September 15, 2026 13:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The reviewed guidance has unresolved documentation inaccuracies and omissions.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds repository-specific GitHub Copilot guidance for the Cacti Tags plugin.

Changes:

  • Documents architecture, hooks, naming, security, and database conventions.
  • Adds cleanup, upgrade, automatic-tag, and version-control guidance.
File summaries
File Summary Findings
.github/copilot-instructions.md Adds tailored Copilot instructions for the Tags plugin. Five nit-level documentation issues remain regarding naming, cleanup, changelog guidance, paths, and upgrade wording.
Review details

Suppressed comments (2)

.github/copilot-instructions.md:133

  • The “CORRECT” cleanup example is incomplete: the actual plugin_tags_remove_data() also deletes the plugin's settings rows (setup.php:76-77), but this sample only drops the four tables. An assistant following this example can leave configuration behind; include the settings deletes here as well.
function plugin_tags_remove_data() {
	db_execute('DROP TABLE IF EXISTS plugin_tags_event');
	db_execute('DROP TABLE IF EXISTS plugin_tags_event_archive');
	db_execute('DROP TABLE IF EXISTS plugin_tags_uptime');
	db_execute('DROP TABLE IF EXISTS plugin_tags_state');

.github/copilot-instructions.md:85

  • plugin_tags_check_config() calls plugin_tags_upgrade(), but include/database.php:30-43 does not perform an old/new version comparison: it always updates the plugin version and ensures the state table exists. Calling this a normal version check is misleading; describe it as upgrade/setup work unless the implementation is changed to gate upgrades on the old version.
`plugin_tags_check_config()` re-registers the `run_data_query` hook if missing (self-healing pattern) in addition to the normal `plugin_tags_upgrade()` version check — follow this same self-healing approach for any hook that might be silently missing after an upgrade.
  • Files reviewed: 1/1 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/copilot-instructions.md
Comment thread .github/copilot-instructions.md
Comment thread .github/copilot-instructions.md
bmfmancini
bmfmancini previously approved these changes Sep 15, 2026

@bmfmancini bmfmancini left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@TheWitness
TheWitness merged commit d013158 into develop Sep 18, 2026
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.

3 participants