AIGCS

Plugin Development

Overview of the AIGCS plugin system

Plugin System Overview

AIGCS plugins extend the server's behavior by hooking into the comment generation lifecycle. Plugins can:

  • Modify AI-generated comment content
  • Add custom comment handlers
  • Integrate with external services
  • Process or filter visitor-submitted comments

Hook Lifecycle

beforeGenerate → generate → afterGenerate → beforeRender → afterRender
HookTimingUse Case
beforeGenerateBefore AI generates a commentModify system prompt, add context
afterGenerateAfter AI returns a responseValidate, filter, or enrich comments
beforeRenderBefore comment is served to widgetTransform display content
afterRenderAfter comment is renderedLogging, analytics

For a concrete implementation example and file structure, see the Plugin Best Practices page.

Loading Plugins

  • Development: Place your plugin in the plugins/ directory
  • Production: Upload via the admin panel (Settings → Plugins)
  • Enable/disable takes effect immediately — no server restart required

Comment Handlers

The commentHandler field in the plugin manifest determines how the plugin handles comments:

HandlerBehavior
"none"No automatic comment generation
"replace"Replaces default AI-generated comments with plugin output
"append"Adds plugin content alongside AI comments

On this page