You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(readme): describe DMC as the WP↔runtime bridge (#57)
The current README framed DMC as a feature bundle — "developer tools
extension for Data Machine. GitHub integration, workspace management,
git operations, and code tools for WordPress AI agents." That
description is structurally true (DMC is a sibling of socials/business)
but misses what DMC actually is.
The Environment class docblock has the right framing already:
Data Machine Code is the bridge between WordPress and an external
coding agent runtime (Claude Code, OpenCode, kimaki, etc.). Its
mere activation is the declarative answer to "is there a coding
agent here?"
That sentence is the most precise description of DMC anywhere in the
codebase, and it was buried in a capability-helper docblock. This
commit lifts that framing to the README and the plugin header so prose
matches reality.
What changes:
- Plugin header description rewritten from feature-bundle wording to
bridge wording, naming AGENTS.md / workspace / abilities as the
three things DMC owns.
- README opens with "the bridge between WordPress and an external
coding-agent runtime" instead of "developer tools extension."
- New "What It Is" section explains the four things that change when
DMC is loaded (AGENTS.md ownership, abilities surface, workspace
area, Environment capability surface) and why the inverse — DMC
never installed on managed hosts — is the whole point.
- New "How It Differs From Other Data Machine Extensions" section
draws the runtime-altering vs handler-adding distinction explicitly,
so readers understand why DMC's role is different from socials /
business even though the plugin chassis is the same.
- Architecture diagram redrawn to show the runtime ↔ DMC bridge above
DM core, with handler-adding siblings as a separate branch off core
rather than a peer of DMC.
- New "Capability detection" subsection shows the canonical
class_exists guard plus has_shell() / has_writable_fs() as the
recommended pattern for plugins that want to gate disk-side hooks.
- Requirements + Installation now mention the runtime-half of the
pairing and point at wp-coding-agents for opinionated setup.
No behavior changes. Docs only.
Copy file name to clipboardExpand all lines: README.md
+68-12Lines changed: 68 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,23 @@
1
1
# Data Machine Code
2
2
3
-
Developer tools extension for [Data Machine](https://github.com/Extra-Chill/data-machine). GitHub integration, workspace management, git operations, and code tools for WordPress AI agents.
3
+
The bridge between WordPress and an external coding-agent runtime (Claude Code, OpenCode, kimaki, etc.). Built on [Data Machine](https://github.com/Extra-Chill/data-machine).
4
4
5
-
## What It Does
5
+
## What It Is
6
6
7
-
Data Machine Code extracts developer-oriented tooling from Data Machine core into a standalone extension. Not every WordPress site needs GitHub integration or workspace management — but if you're using Data Machine as a coding agent platform, this plugin gives your agents the tools to work with code repositories directly from WordPress.
7
+
Data Machine Code's activation is the declarative answer to **"is there a coding agent here?"** When DMC is loaded, the WordPress install is no longer just a site running an AI — it is the WordPress half of a coding-agent system. The other half is whatever runtime the user pointed at the install (Claude Code, OpenCode, kimaki, Studio Code, etc.).
8
+
9
+
That framing reshapes what every other plugin can assume:
10
+
11
+
-**AGENTS.md is composed and written to the WP root**, where the runtime discovers it on session start. DMC owns the file, contributes core sections, and lets other plugins register more via Data Machine's `SectionRegistry`.
12
+
-**The runtime gains GitHub, workspace, and git abilities** through the Abilities API — every ability is automatically callable from chat, MCP, REST, and WP-CLI.
13
+
-**A worktree-native workspace area** at `~/.datamachine/workspace/` lets agents clone repos, edit files in isolated branches, and push changes — all gated by per-repo policies.
14
+
-**`\DataMachineCode\Environment` is a capability surface** plugins can read to ask "is a coding agent here?", "can we shell out?", "is the filesystem writable outside `/uploads`?". Other DM plugins use it to gate disk-side hooks (e.g. Intelligence's `SKILL.md` sync).
15
+
16
+
On managed hosts (WordPress.com, VIP, sandboxed environments) DMC is **never installed by design**. The class doesn't exist, AGENTS.md isn't composed, no shell capabilities are advertised. Site owners get a vanilla Data Machine install without any expectation of a coding agent running alongside it. That asymmetry is the whole point — DMC is the seam between "WordPress that knows about a coding agent" and "WordPress that doesn't."
17
+
18
+
## How It Differs From Other Data Machine Extensions
19
+
20
+
Sibling extensions like `data-machine-socials` and `data-machine-business` are **handler-adding** — they extend DM's pipeline machinery with new sources, destinations, or transforms. DMC is **runtime-altering** — its presence changes what kind of system this is. That's why DMC owns AGENTS.md, declares environment capabilities, and gates the existence of an entire class of disk-side functionality. Same plugin chassis, fundamentally different role.
8
21
9
22
## Features
10
23
@@ -91,13 +104,15 @@ on it are how parallel agents corrupt each other's work.
- A coding-agent runtime on the same host (Claude Code, OpenCode, kimaki, etc.) — DMC is the WordPress half of that pairing. Without a runtime calling back, DMC's abilities still register but nothing exercises them.
94
108
95
109
## Installation
96
110
97
111
1. Install and activate Data Machine core
98
112
2. Clone this repo to `wp-content/plugins/data-machine-code`
99
113
3. Run `composer install`
100
114
4. Activate the plugin
115
+
5. Point a coding-agent runtime at the install (out of scope for this README; see [`wp-coding-agents`](https://github.com/Extra-Chill/wp-coding-agents) for an opinionated setup)
101
116
102
117
## Configuration
103
118
@@ -110,17 +125,58 @@ Workspace git policies are configured via the `datamachine_workspace_git_policie
110
125
## Architecture
111
126
112
127
```
113
-
data-machine (core)
114
-
├── AI engine, pipelines, jobs, agents
115
-
├── Memory system, tools framework
116
-
└── Base classes for extensions
117
-
│
118
-
├── data-machine-socials (social platforms)
119
-
├── data-machine-code (developer tools) ← this plugin
DMC extends core base classes (`BaseTool`, `SystemTask`, `BaseCommand`, `FetchHandler`) and registers its capabilities through standard Data Machine hooks (`datamachine_tools`, `datamachine_tasks`, `MemoryFileRegistry`, `SectionRegistry`, Abilities API). Its difference from the handler-adding siblings is **what it changes about the install**, not what API it uses to register things.
164
+
165
+
### Capability detection
166
+
167
+
Other plugins gate disk-side or shell-using behavior on DMC's presence rather than on platform sniffing:
168
+
169
+
```php
170
+
if ( class_exists( '\DataMachineCode\Environment' ) ) {
171
+
// Co-located coding-agent runtime exists — register disk hooks,
172
+
// sync SKILL.md to .opencode/skills/, write MEMORY.md, etc.
173
+
}
174
+
175
+
\DataMachineCode\Environment::has_shell(); // can we shell_exec?
176
+
\DataMachineCode\Environment::has_writable_fs(); // can we write outside /uploads?
121
177
```
122
178
123
-
Data Machine Code extends core base classes (`BaseTool`, `SystemTask`, `BaseCommand`, `FetchHandler`) and registers its capabilities through standard Data Machine hooks (`datamachine_tools`, `datamachine_tasks`, Abilities API).
179
+
This is intentionally simpler than detecting WP.com vs VIP vs self-hosted — those distinctions don't matter. What matters is "is a coding agent listening?" and that question has exactly one answer: "is DMC active?"
* Description: Developer tools extension for Data Machine. GitHub integration, workspace management, git operations, and code tools for WordPress AI agents.
5
+
* Description: Bridge between WordPress and an external coding-agent runtime (Claude Code, OpenCode, kimaki, etc.). Owns AGENTS.md, the workspace area, and the GitHub / workspace / git abilities the runtime calls back into. Activation is the declarative "a coding agent lives here" signal.
0 commit comments