Skip to content

refactor: give Agents API its own source tree #3

@chubes4

Description

@chubes4

Goal

Give Automattic/agents-api its own source-tree shape instead of preserving the Data Machine extraction layout.

Current smell

The standalone repo currently mirrors the old Data Machine module layout:

inc/Core/FilesRepository/*
inc/Core/Database/Chat/*
inc/AI/*
inc/class-wp-agent-package-*.php

That reads like Data Machine internals copied into a repo, not a standalone Agents API substrate.

Desired direction

Move toward an agent-native tree, for example:

src/
  Registry/
  Runtime/
  Tools/
  Memory/
  Transcripts/
  Packages/

Exact naming can differ if the implementation supports a cleaner WordPress convention, but the shape should use Agents API vocabulary rather than Data Machine storage/backend vocabulary.

Scope

  • Move files and update bootstrap/test paths.
  • Preserve public API names and behavior.
  • Preserve global WordPress-shaped facades such as WP_Agent, WP_Agents_Registry, and wp_register_agent().
  • Preserve namespaced public contracts unless the rename is purely path-level and low-risk.
  • Update smoke tests so they pin the new layout and still prove no Data Machine imports leak in.

Out of scope

  • No Data Machine dependency changes in this PR.
  • No REST/admin/runtime feature additions.
  • No compatibility alias ladder back to old paths/classes unless a concrete failing consumer proves it is needed.

Acceptance criteria

  • composer test passes.
  • Bootstrap loads all moved files from the new tree.
  • Source tree no longer contains Core/FilesRepository or Core/Database/Chat as the primary public layout.
  • PR body includes AI assistance disclosure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions