Refs #1561, #1596, #1618.
Problem
Data Machine now contains Agents API-shaped vocabulary and contracts, but they are scattered across Data Machine product directories instead of living behind a core-style in-repo module boundary.
Current examples include:
- inc/Engine/Agents/register-agents.php
- inc/Engine/Agents/class-wp-agent.php
- inc/Engine/Agents/class-wp-agents-registry.php
- inc/Engine/AI/AgentConversationRequest.php
- inc/Engine/AI/AgentMessageEnvelope.php
- inc/Core/FilesRepository/AgentMemoryStoreInterface.php
- inc/Core/Database/Chat/ConversationTranscriptStoreInterface.php
The desired architecture is an in-repo agents-api module that is treated like WordPress core substrate while it still ships inside Data Machine.
Target shape
Create a Data Machine-owned in-repo module:
data-machine/
agents-api/
agents-api.php
inc/
tests/
inc/
...Data Machine product code...
Data Machine loads agents-api first, then consumes it as product code.
Boundary rules
- agents-api must not import Data Machine product namespaces.
- Data Machine may import agents-api.
- agents-api owns WordPress-shaped public vocabulary such as wp_register_agent(), WP_Agent, WP_Agents_Registry, wp_agents_api_init, AgentMessageEnvelope, and runtime contracts.
- Data Machine keeps flows, pipelines, jobs, handlers, queues, retention, admin UI, pending actions, adjacent handler tools, and product adapters.
Acceptance criteria
- data-machine/agents-api exists.
- Data Machine loads the module before product runtime bootstraps.
- agents-api can run a bootstrap smoke without loading Data Machine product code.
- No agents-api file imports DataMachine\Core\Steps, DataMachine\Core\Database\Jobs, handlers, queues, retention, or admin UI.
- Existing Data Machine behavior remains unchanged.
Refs #1561, #1596, #1618.
Problem
Data Machine now contains Agents API-shaped vocabulary and contracts, but they are scattered across Data Machine product directories instead of living behind a core-style in-repo module boundary.
Current examples include:
The desired architecture is an in-repo agents-api module that is treated like WordPress core substrate while it still ships inside Data Machine.
Target shape
Create a Data Machine-owned in-repo module:
Data Machine loads agents-api first, then consumes it as product code.
Boundary rules
Acceptance criteria