Problem
WordPressActionDispatchObserver receives canonical Agents API pending-action objects, but on_resolved() still builds and emits a legacy Data Machine payload shape.
Code references on origin/main (008878b6):
inc/Engine/AI/Actions/WordPressActionDispatchObserver.php:25 — builds $payload = $this->legacy_payload( $action ).
inc/Engine/AI/Actions/WordPressActionDispatchObserver.php:45 — legacy_payload() maps Agents API action data into old DM field names.
Related closed issue: #1928.
Why this matters
The observer interface is already object-shaped. Keeping the old hook argument contract alive duplicates pending-action shapes and makes extension consumers pick between old arrays and canonical objects.
Acceptance criteria
- Audit current consumers of
datamachine_pending_action_resolved.
- Decide the 1.0 hook signature: canonical
WP_Agent_Pending_Action / decision object, or legacy array retained intentionally.
- Remove
legacy_payload() if no longer needed, or move legacy details under metadata.datamachine with clear docs.
- Update docs/tests for the final hook signature.
AI assistance
- AI assistance: Yes
- Tool(s): OpenCode (GPT-5.5)
- Used for: 1.0 technical-debt audit and issue drafting; Chris requested tracking issues for the findings.
Problem
WordPressActionDispatchObserverreceives canonical Agents API pending-action objects, buton_resolved()still builds and emits a legacy Data Machine payload shape.Code references on
origin/main(008878b6):inc/Engine/AI/Actions/WordPressActionDispatchObserver.php:25— builds$payload = $this->legacy_payload( $action ).inc/Engine/AI/Actions/WordPressActionDispatchObserver.php:45—legacy_payload()maps Agents API action data into old DM field names.Related closed issue: #1928.
Why this matters
The observer interface is already object-shaped. Keeping the old hook argument contract alive duplicates pending-action shapes and makes extension consumers pick between old arrays and canonical objects.
Acceptance criteria
datamachine_pending_action_resolved.WP_Agent_Pending_Action/ decision object, or legacy array retained intentionally.legacy_payload()if no longer needed, or move legacy details undermetadata.datamachinewith clear docs.AI assistance