Skip to content

feat: unify agent read/write to support all files, not just MEMORY.md#1045

Merged
chubes4 merged 2 commits intomainfrom
feature/unify-agent-file-read-write
Apr 13, 2026
Merged

feat: unify agent read/write to support all files, not just MEMORY.md#1045
chubes4 merged 2 commits intomainfrom
feature/unify-agent-file-read-write

Conversation

@chubes4
Copy link
Copy Markdown
Member

@chubes4 chubes4 commented Apr 13, 2026

Summary

Closes #1044. Unifies the dual agent read/write and agent files read/write command paths into a single interface that supports section-level operations on any agent file.

Before: agent read/write was silently hardcoded to MEMORY.md. To read SOUL.md or USER.md, you had to use agent files read — which had no section awareness.

After: One interface, full capability:

wp datamachine agent read SOUL.md "Identity"     # section read on any file
wp datamachine agent write USER.md "Goals" "..."  # section write on any file
wp datamachine agent search "term" --file=SOUL.md # search any file
wp datamachine agent sections --file=USER.md      # list sections in any file

Changes

  • AgentMemory service — accepts $filename param (default MEMORY.md), resolves path via MemoryFileRegistry layer system (shared, agent, user, network)
  • AgentMemoryAbilities — adds file to all 4 ability input schemas, enforces editability for non-MEMORY.md writes
  • MemoryCommand CLIread/write use .md suffix heuristic for arg disambiguation; search/sections use --file flag
  • AgentMemory AI tool — adds file parameter so AI agents can do section ops on any file
  • Deprecationagent files read/write emit warnings pointing to the unified commands

Backwards compatibility

Fully backwards compatible. file defaults to MEMORY.md in all APIs. Existing commands, abilities, REST endpoints, and AI tool calls work unchanged.

Testing

Manually verified on live site:

  • agent read / agent read "Section" — MEMORY.md (default, unchanged)
  • agent read SOUL.md / agent read SOUL.md "Identity" — agent layer
  • agent read USER.md "About" — user layer resolution
  • agent read SITE.md — shared layer resolution
  • agent sections --file=SOUL.md / agent sections --file=USER.md
  • agent search "Charleston" --file=USER.md
  • agent write "Key Facts" "..." --mode=append — backwards compat
  • agent files read SOUL.md — deprecation warning emitted

chubes4 added 2 commits April 13, 2026 16:40
…closes #1044)

Generalize AgentMemory service, abilities, CLI, and AI tool to accept a
file parameter. Section-level operations (read, write, search, sections)
now work on any agent file — SOUL.md, USER.md, SITE.md, etc. — not just
MEMORY.md.

- AgentMemory: add $filename constructor param with layer-aware path
  resolution via MemoryFileRegistry (shared, agent, user, network)
- AgentMemoryAbilities: add 'file' to all 4 ability input schemas
  with editability enforcement for non-MEMORY.md writes
- MemoryCommand CLI: read/write use .md heuristic for disambiguation,
  search/sections use --file flag. Deprecation warnings on agent files
  read/write subcommands
- AgentMemory AI tool: add 'file' parameter to tool definition

Backwards compatible — file defaults to MEMORY.md everywhere.
The unified agent read/write now handles all file operations with section
awareness. Remove the redundant files_read and files_write methods and
their helper functions. agent files retains list and check actions.
@homeboy-ci
Copy link
Copy Markdown
Contributor

homeboy-ci bot commented Apr 13, 2026

Homeboy Results — data-machine

Audit

⚡ Scope: changed files only

audit (changed files only)

Tooling versions
  • Homeboy CLI: homeboy 0.88.7+b75258fe
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: unknown
  • Action: Extra-Chill/homeboy-action@v2

Homeboy Action v1

@chubes4 chubes4 merged commit aee71da into main Apr 13, 2026
1 check passed
@chubes4 chubes4 deleted the feature/unify-agent-file-read-write branch April 13, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unify agent read/write to support all files, not just MEMORY.md

1 participant