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
DMC's AgentsMdSections.php hand-typed core's entire `datamachine` command
surface as a static heredoc, a layer inversion: core now registers its own
reflected AGENTS.md section (data-machine#2640), and the hand-copy had already
drifted (the `datamachine analytics|logs` line was wrong — analytics moved to
data-machine-business).
- Remove the hand-typed core `datamachine ...` narration (Memory/Automation/
Communication/Content-ops/System bullets). Core owns that section.
- Rename the section to `datamachine-code` and keep only the workspace/worktree/
github guidance DMC rightfully owns.
- Reflect the `worktree` operation list from its dispatch `match` arms via a new
CommandIntrospector::match_arm_pipe_list() helper, mirroring how workspace/
github are already reflected. No hand-typed DMC command lists remain; the
reflected list also recovers operations the literal omitted.
Refs #734
Data Machine is your operating layer — memory, automation, and orchestration via WP-CLI.
110
-
111
-
Discover the full command surface: `{$wp} datamachine --help`. The groups below are the major command families — always run `--help` on any subcommand to see its options.
112
-
113
-
**Memory & Agents:** Persistent files across sessions plus agent identity management.
**Code (data-machine-code):** All code changes happen in Data Machine Code worktrees under `{$workspace_path}`. DMC owns workspace lifecycle, evidence capture, and GitHub workflow glue; file CRUD inside a worktree uses whatever tool is fastest.
111
+
## Data Machine Code
112
+
113
+
All code changes happen in Data Machine Code worktrees under `{$workspace_path}`. DMC owns workspace lifecycle, evidence capture, and GitHub workflow glue; file CRUD inside a worktree uses whatever tool is fastest. Core's `datamachine` operating layer (memory, automation, communication, content ops, system) is documented in its own AGENTS.md section — run `{$wp} datamachine --help` to discover it.
114
+
141
115
- Workspace root: `{$workspace_path}`
142
116
- **Workspace:** `{$wp} datamachine-code workspace {$workspace_subcmds}` — lifecycle (clone/adopt/list/show/path/hygiene/remove/worktree), plus the file-I/O surface you work through inside a worktree (`read`, `write`, `grep`, `edit`, `patch`, `ls`, `git`). Keeps the on-disk registry consistent and enforces the `<repo>@<slug>` handle convention.
- **GitHub:** `{$wp} datamachine-code github {$github_subcmds}` — list/read GitHub state, manage issues and PRs, install review flows, and comment on reviews.
145
119
- **Editing inside a worktree:** any tool. Local agents on the same disk should use native file I/O and raw `git`; routing edits through workspace abilities is ceremony, not safety.
146
120
- **Workspace lifecycle:** use `workspace clone` for primary checkout adoption/cloning and `workspace worktree add` for isolated branches. Use the CLI `--help` output for current flags and subcommands.
147
121
- **Primary freshness:** before using a primary checkout for investigation or verification, inspect `workspace list|show|hygiene` freshness metadata. If the primary is stale, run `workspace git pull <repo> --allow-primary-refresh` or create the worktree from an explicit remote ref with `worktree add <repo> <branch> --from=origin/<base>`. Stale primary reads require an explicit `--allow-stale-primary` opt-in. Do not clone a second top-level primary for the same remote just to get fresh code.
148
122
- **Primary is read-only.** Never edit `<workspace>/<repo>` (no `@slug`). Safe primary refresh uses `--allow-primary-refresh`; primary commit, push, reset, and rebase require the stronger `--allow-dangerous-primary-mutation` approval. The primary tracks the deployed branch — operate on a worktree.
149
123
- **Rule:** Never modify files under `wp-content/plugins/` or `wp-content/themes/` directly. Those paths are **read-only reference**. All code changes go through the workspace so they are tracked in git and reviewed via pull requests.
150
-
151
-
**System:** `{$wp} datamachine system health|prompts|run` — site health, prompt inspection, diagnostic runs.
152
-
153
-
Use `--help` on any command to discover options and subcommands.
154
124
MD;
155
125
}, array(
156
-
'label' => 'Data Machine',
157
-
'description' => 'Memory, automation, workspace, and system operations.',
126
+
'label' => 'Data Machine Code',
127
+
'description' => 'Workspace, worktree, and GitHub operations owned by Data Machine Code.',
158
128
'owner' => 'data-machine-code',
159
129
'freshness' => 'snapshot',
160
130
'conditions' => 'Always registered when Data Machine Code and composable memory section registration are available.',
0 commit comments