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
{$workspace_policy_intro}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.
84
+
{$workspace_policy_intro}DMC owns authoritative repository, primary-checkout, worktree, and GitHub workspace state. Homeboy consumes DMC-managed worktrees for agent execution, deterministic gates, promotion, evidence, and publication.
98
85
99
-
- Workspace root: `{$workspace_path}`
100
-
- **Workspace:** `{$wp} datamachine-code workspace --help` is the live lifecycle and file-I/O command reference. It enforces `<repo>@<slug>` handles and maintains workspace registry state.
101
-
- **Worktrees:** `{$wp} datamachine-code workspace worktree --help` is the live branch lifecycle reference.
102
-
- **GitHub:** `{$wp} datamachine-code github --help` is the live GitHub command reference.
103
-
- **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.
104
-
- **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.
86
+
**Default routing**
87
+
- Inspect workspace state: `{$wp} datamachine-code workspace list`, `{$wp} datamachine-code workspace show <repo>`, or `{$wp} datamachine-code workspace hygiene`
- Inspect or manage GitHub state: `{$wp} datamachine-code github --help`
92
+
- Edit inside a local worktree with native file tools and raw `git`; routing local file I/O through workspace abilities is ceremony, not safety.
93
+
94
+
**Safety**
105
95
{$workspace_policy_section}
96
+
97
+
**Discovery**
98
+
Use `{$wp} datamachine-code workspace --help` and `{$wp} datamachine-code workspace worktree --help` for the live lifecycle contract. Query `workspace list`, `workspace show`, or `workspace hygiene` for current state instead of relying on an embedded inventory snapshot.
106
99
MD;
107
100
}, array(
108
101
'label' => 'Data Machine Code',
109
-
'description' => 'Workspace, worktree, and GitHub operations owned by Data Machine Code.',
102
+
'description' => 'Authoritative workspace routing, lifecycle, and safety guidance.',
110
103
'owner' => 'data-machine-code',
111
104
'freshness' => 'snapshot',
112
105
'conditions' => 'Always registered when Data Machine Code and composable memory section registration are available.',
- **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.
129
+
$default = <<<MD
130
+
- **Primary freshness:** before using a primary checkout for investigation or verification, inspect `{$wp} datamachine-code workspace show <repo>` or `{$wp} datamachine-code workspace hygiene`. If the primary is stale, run `{$wp} datamachine-code workspace git pull <repo> --allow-primary-refresh` or create a worktree 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.
138
131
- **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.
139
-
- **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.
140
132
MD;
141
133
142
134
/**
@@ -159,20 +151,6 @@ private static function render_workspace_policy_section( string $workspace_path,
Live workspace state is intentionally not embedded here. Run `{$wp} datamachine-code workspace list` for the authoritative inventory, `{$wp} datamachine-code workspace show <repo>` for one checkout, or `{$wp} datamachine-code workspace hygiene` for freshness and cleanup diagnostics.
373
-
374
-
Snapshot summary: {$primary_count} primary {$primary_label} and {$worktree_count}{$worktree_label} under `{$workspace_path}`.
375
-
376
-
{$attention_block}
377
-
MD;
378
-
}
379
-
380
-
return<<<MD
381
-
## Workspace Inventory
382
-
383
-
Detailed snapshot from cloned repos in `{$workspace_path}`. `{$wp} datamachine-code workspace list` remains the source of truth for current worktrees and branches.
384
-
385
-
Refresh this file with `{$wp} datamachine memory compose AGENTS.md{$agent_suffix}` after workspace changes.
$shown[] = sprintf('- %d more primary checkout(s) need attention; run `wp datamachine-code workspace list` for the full set.', $omitted);
488
-
}
489
-
490
-
$body = implode("\n", $shown);
491
-
492
-
return<<<MD
493
-
**Primary Checkout Attention**
494
-
495
-
These primary checkouts may be stale or unsafe to read. Refresh them or create a worktree from an explicit remote ref before using them as source evidence.
0 commit comments