Problem
When AI assistants modify settings via abilities, those changes are indistinguishable from manual admin changes in the activity log. There is no way to audit which changes were made by AI vs. a human.
Dependencies
Proposal
Extend the existing activity log to capture AI-initiated changes with source metadata.
Implementation
- Hook into
wp_after_execute_ability to log all ability executions
- Record: ability name, input values, output values, timestamp, authenticated user
- Add
source field to activity log entries: "manual" (default) vs "abilities-api"
- New ability:
tenup/get-ai-activity — readonly, returns only AI-initiated log entries
Leverages existing code
SupportMonitor/ActivityLog.php already handles option change logging via updated_option hook
- Existing
get_logs() method at line 277 already supports filtering
- Activity log cap of 500 entries already in place
Files
- Modified:
includes/classes/SupportMonitor/ActivityLog.php (add source tracking)
- New:
includes/classes/Abilities/ActivityTracking.php (ability execution listener)
- Modified:
10up-experience.php (instantiate new class)
Verification
- Make a setting change via an AI assistant (e.g., "Enable strong passwords")
- Confirm the activity log entry includes
source: abilities-api
- Make the same change manually in wp-admin
- Confirm that entry has
source: manual
- Test
tenup/get-ai-activity ability returns only AI-initiated entries
- Confirm existing activity log functionality is unaffected
Problem
When AI assistants modify settings via abilities, those changes are indistinguishable from manual admin changes in the activity log. There is no way to audit which changes were made by AI vs. a human.
Dependencies
Proposal
Extend the existing activity log to capture AI-initiated changes with source metadata.
Implementation
wp_after_execute_abilityto log all ability executionssourcefield to activity log entries:"manual"(default) vs"abilities-api"tenup/get-ai-activity— readonly, returns only AI-initiated log entriesLeverages existing code
SupportMonitor/ActivityLog.phpalready handles option change logging viaupdated_optionhookget_logs()method at line 277 already supports filteringFiles
includes/classes/SupportMonitor/ActivityLog.php(add source tracking)includes/classes/Abilities/ActivityTracking.php(ability execution listener)10up-experience.php(instantiate new class)Verification
source: abilities-apisource: manualtenup/get-ai-activityability returns only AI-initiated entries