Documentation
Everything you need to install, configure, and get the most out of RockScout AI.
Installation
From WordPress.org
- In your WordPress dashboard go to Plugins → Add New
- Search for "RockScout AI"
- Click Install Now, then Activate
- Go to Settings → RockScout AI to configure
Manual install
- Download the ZIP from wordpress.org/plugins/rockscout-ai
- Go to Plugins → Add New → Upload Plugin
- Upload the ZIP and activate
Requirements
| WordPress | 6.9 or higher (7.0+ recommended for Abilities API) |
| PHP | 7.4 or higher |
| AI API key | OpenAI or Anthropic key for AI chat features |
| MCP Adapter | Optional — enables MCP tools exposure |
Configuration
After activation, go to Settings → RockScout AI.
AI Provider
Choose your AI provider (OpenAI or Anthropic) and enter your API key. The key is stored encrypted using wp_salt().
// Your API key is never sent anywhere except the AI provider.
Activity Logger
Configure which events to track. All are enabled by default:
- Plugin installs, updates, activations, deactivations, deletions
- Theme changes
- Post and page edits
- User logins
- WordPress option changes
Chat Widget
Control where the chat widget appears: WP Dashboard widget, admin page, or both. Choose which user roles can access the chat (defaults to users with read capability).
Plugin Modes
RockScout AI has two modes, based on whether you've entered an API key:
| Mode | Key | Features |
|---|---|---|
| Demo | None | Activity log (7 days, local), site health dashboard. No AI chat. |
| Free (BYOK) | Your OpenAI / Anthropic key | Activity log (30 days), site health + diagnostics, AI chat with site context, email notifications, MCP abilities. |
Switching is seamless — just add or remove the key. No data is lost.
Activity Logger
Hooks into WordPress actions to record changes. Events are stored in a custom table wp_rockscout_events.
Tracked events
| Hook | Event | Data stored |
|---|---|---|
| upgrader_process_complete | Plugin/theme update | Name, old → new version, user |
| activated_plugin | Plugin activation | Plugin name, user |
| deactivated_plugin | Plugin deactivation | Plugin name, user |
| switch_theme | Theme change | Old → new theme, user |
| save_post | Post/page edit | Post ID, title, user, time |
| wp_login | User login | User ID, IP, time |
| update_option | Option change | Option name, user |
| deleted_plugin | Plugin deletion | Plugin name |
Retention & cleanup
A WP-Cron job runs daily to remove events older than the retention period (7 days in Demo, 30 days with BYOK). Expected volume: ~50–200 records/week on a typical site.
Customizing tracked events
// Disable tracking for specific event types
add_filter( 'rockscout_tracked_events', function( $events ) {
unset( $events['wp_login'] );
return $events;
});
Site Health
Creates a snapshot of the site's technical state. Runs on demand (via chat) and once/day via WP-Cron.
Collected data
- WordPress: version, site URL, multisite status
- PHP: version, memory limit, max execution time
- Theme: name, version, parent theme
- Plugins: active list, versions, updates available
- Database: version, size, table prefix
- Errors: last 20 lines from debug.log
- WP Site Health: native Site Health API results
Chat Widget
Built with vanilla JavaScript — no frameworks, no heavy dependencies. Renders in WP Dashboard.
How queries work
Client asks a question
→ Plugin collects context:
├── Last 10 activity log events
├── Current site health snapshot
└── User's question
→ Builds prompt (in plugin)
→ Sends to AI provider (OpenAI / Claude)
→ Displays response in widget
Styling the widget
The widget uses CSS custom properties for easy theming:
/* Override in your theme or custom CSS */
.rockscout-chat {
--rockscout-primary: #ffc726;
--rockscout-bg: #ffffff;
--rockscout-text: #1a1a2e;
--rockscout-radius: 12px;
}
Abilities API & MCP
On WordPress 6.9+ with Abilities API, RockScout AI registers these abilities that external AI agents can discover via MCP:
| Ability | Description | Input |
|---|---|---|
| rockscout/site-health | Full site health snapshot | None |
| rockscout/activity-log | Recent site changes | days (int, default 7) |
| rockscout/plugin-status | Plugin list with versions & updates | None |
All require manage_options capability. Exposed via MCP only when the MCP Adapter plugin is active.
// How abilities are registered (simplified)
if ( function_exists( 'wp_register_ability' ) ) {
wp_register_ability( 'rockscout/site-health', [
'label' => 'RockScout Site Health Check',
'description' => 'Returns current health status',
'input_schema' => [],
'permission_callback' => function() {
return current_user_can( 'manage_options' );
},
'execute_callback' => 'rockscout_get_site_health',
'meta' => [ 'mcp' => [ 'public' => true ] ],
] );
}
Hooks & Filters
| Hook | Type | Description |
|---|---|---|
| rockscout_tracked_events | Filter | Modify which event types are tracked |
| rockscout_health_data | Filter | Add/remove data from health snapshot |
| rockscout_chat_context | Filter | Modify context sent to AI with each query |
| rockscout_before_chat | Action | Fires before an AI query is sent |
| rockscout_after_chat | Action | Fires after AI response is received |
| rockscout_event_logged | Action | Fires after a new event is recorded |
// Example: Add custom data to health snapshot
add_filter( 'rockscout_health_data', function( $data ) {
$data['custom_check'] = my_custom_health_check();
return $data;
});
REST API
Endpoints under the rockscout/v1 namespace:
| Endpoint | Method | Permission | Description |
|---|---|---|---|
| /rockscout/v1/events | GET | manage_options | Activity log events |
| /rockscout/v1/health | GET | manage_options | Site health snapshot |
| /rockscout/v1/chat | POST | read | Send chat message, get AI response |
| /rockscout/v1/settings | GET/POST | manage_options | Read or update plugin settings |
All endpoints require authentication (nonce or Application Password) and validate capabilities.
Security
- All inputs sanitized:
sanitize_text_field(),wp_kses() - All outputs escaped:
esc_html(),esc_attr(),wp_json_encode() - Nonces on every AJAX and REST call
- Capability checks on every endpoint
- API keys encrypted with
wp_salt()before storing inwp_options - No PII in activity logs — user IDs only, never email or name
Uninstall & Data
Deactivation: No data is deleted. The plugin simply stops hooking into WordPress actions.
Uninstall (delete): When you delete the plugin, uninstall.php runs and:
- Drops the
wp_rockscout_eventscustom table - Removes all
rockscout_*options fromwp_options - Clears any scheduled WP-Cron events
FAQ
Does the plugin slow down my site?
No. The activity logger hooks into existing WordPress actions with minimal overhead. The chat widget loads only in the WP Dashboard — never on the frontend.
What AI providers are supported?
OpenAI and Anthropic (Claude).
Can I use it without an API key?
Yes — Demo mode gives you activity logging (7 days) and the site health dashboard with no key required.
Does it work with WordPress < 6.9?
The core features (activity log, site health, chat) require WordPress 6.9+. The Abilities API and MCP features additionally require the MCP Adapter plugin.
Is client data sent to external services?
The site context and user question are sent to your chosen AI provider (OpenAI or Anthropic) — no other external service. No PII is included. See our Privacy Policy.
Can I customize which data AI sees?
Yes — use the rockscout_chat_context filter to modify or redact data before it's sent.
Changelog
1.0.0 — Initial release
- Activity logger — 8 tracked WordPress events
- Site health collector
- AI chat widget (BYOK: OpenAI & Anthropic)
- Abilities API registration (3 abilities)
- Demo and Free (BYOK) modes
- Graceful degradation for older WP versions
What's Next
We're working on an agency tier that will add white-label branding, escalation to human agents with full context, a per-client knowledge base, and a multi-site management dashboard. If you're interested, follow the project on GitHub or reach out at rocksite.pro.