Skip to content

Commit 3502f6f

Browse files
authored
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.
1 parent 6c124a7 commit 3502f6f

2 files changed

Lines changed: 69 additions & 13 deletions

File tree

README.md

Lines changed: 68 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
# Data Machine Code
22

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).
44

5-
## What It Does
5+
## What It Is
66

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.
821

922
## Features
1023

@@ -91,13 +104,15 @@ on it are how parallel agents corrupt each other's work.
91104
- WordPress 6.9+
92105
- PHP 8.2+
93106
- [Data Machine](https://github.com/Extra-Chill/data-machine) plugin (core)
107+
- 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.
94108

95109
## Installation
96110

97111
1. Install and activate Data Machine core
98112
2. Clone this repo to `wp-content/plugins/data-machine-code`
99113
3. Run `composer install`
100114
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)
101116

102117
## Configuration
103118

@@ -110,17 +125,58 @@ Workspace git policies are configured via the `datamachine_workspace_git_policie
110125
## Architecture
111126

112127
```
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
120-
└── data-machine-business (transforms)
128+
┌──────────────────────────────────────────────────────────────────┐
129+
│ Coding-agent runtime (Claude Code, OpenCode, kimaki, ...) │
130+
│ - reads AGENTS.md on session start │
131+
│ - calls back into WP via WP-CLI, MCP, REST │
132+
└──────────────────────────────────────────────────────────────────┘
133+
134+
│ bridge
135+
136+
┌──────────────────────────────────────────────────────────────────┐
137+
│ data-machine-code (this plugin) │
138+
│ - composes & owns AGENTS.md at the WP root │
139+
│ - declares \DataMachineCode\Environment capabilities │
140+
│ - hosts the workspace area (~/.datamachine/workspace/) │
141+
│ - registers GitHub / workspace / git abilities │
142+
└──────────────────────────────────────────────────────────────────┘
143+
144+
│ built on
145+
146+
┌──────────────────────────────────────────────────────────────────┐
147+
│ data-machine (core) │
148+
│ - AI engine, pipelines, jobs, agents │
149+
│ - Memory system, MemoryFileRegistry, SectionRegistry │
150+
│ - Abilities API plumbing, tool framework │
151+
└──────────────────────────────────────────────────────────────────┘
152+
153+
│ also extended by
154+
155+
┌──────────────────────────────────────────────────────────────────┐
156+
│ Handler-adding siblings — different role from DMC │
157+
│ - data-machine-socials (social platforms) │
158+
│ - data-machine-business (transforms) │
159+
│ - ... │
160+
└──────────────────────────────────────────────────────────────────┘
161+
```
162+
163+
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?
121177
```
122178

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?"
124180

125181
## Roadmap
126182

data-machine-code.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Plugin Name: Data Machine Code
44
* Plugin URI: https://github.com/Extra-Chill/data-machine-code
5-
* 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.
66
* Version: 0.10.0
77
* Requires at least: 6.9
88
* Requires PHP: 8.2

0 commit comments

Comments
 (0)