Skip to content
This repository was archived by the owner on Sep 2, 2026. It is now read-only.

Commit f09f7d1

Browse files
authored
Decouple DMC guidance from Homeboy (#1318)
1 parent d38578a commit f09f7d1

2 files changed

Lines changed: 22 additions & 6 deletions

File tree

‎inc/Runtime/AgentsMdSections.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ private static function register_datamachine_section( string $wp ): void {
8181
return <<<MD
8282
## Data Machine Code
8383
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.
84+
Data Machine Code provides repository, primary-checkout, worktree, and GitHub workspace management. {$workspace_policy_intro}
8585
8686
**Default routing**
8787
- Inspect workspace state: `{$wp} datamachine-code workspace list`, `{$wp} datamachine-code workspace show <repo>`, or `{$wp} datamachine-code workspace hygiene`
@@ -99,7 +99,7 @@ private static function register_datamachine_section( string $wp ): void {
9999
MD;
100100
}, array(
101101
'label' => 'Data Machine Code',
102-
'description' => 'Authoritative workspace routing, lifecycle, and safety guidance.',
102+
'description' => 'Data Machine Code workspace lifecycle, GitHub, and safety guidance.',
103103
'owner' => 'data-machine-code',
104104
'freshness' => 'snapshot',
105105
'conditions' => 'Always registered when Data Machine Code and composable memory section registration are available.',
@@ -108,7 +108,7 @@ private static function register_datamachine_section( string $wp ): void {
108108
}
109109

110110
private static function render_workspace_policy_intro( string $workspace_path ): string {
111-
$default = "All code changes happen in Data Machine Code worktrees. The controller workspace root is `{$workspace_path}`. ";
111+
$default = "When using Data Machine Code to manage code changes, work in a Data Machine Code worktree. The controller workspace root is `{$workspace_path}`. ";
112112

113113
/**
114114
* Filters the site-owned workspace policy sentence rendered before DMC command facts.

‎tests/smoke-agents-md-sections.php‎

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,27 @@ function assert_not_contains( string $needle, string $haystack, string $message
8484
$default = $render();
8585

8686
assert_contains(
87-
'All code changes happen in Data Machine Code worktrees. The controller workspace root is `unavailable; run datamachine-code workspace path to diagnose`.',
87+
'Data Machine Code provides repository, primary-checkout, worktree, and GitHub workspace management.',
88+
$default,
89+
'DMC standalone capabilities missing'
90+
);
91+
assert_contains(
92+
'When using Data Machine Code to manage code changes, work in a Data Machine Code worktree. The controller workspace root is `unavailable; run datamachine-code workspace path to diagnose`.',
8893
$default,
8994
'default workspace policy intro changed'
9095
);
91-
assert_contains('DMC owns authoritative repository, primary-checkout, worktree, and GitHub workspace state. Homeboy consumes DMC-managed worktrees', $default, 'DMC/Homeboy ownership boundary missing');
96+
assert_not_contains('Homeboy', $default, 'DMC guidance must not couple to Homeboy');
97+
assert_not_contains('All code changes happen', $default, 'DMC guidance must not claim universal routing authority');
98+
assert_not_contains(
99+
'Homeboy',
100+
json_encode($sections['datamachine-code']['metadata'], JSON_THROW_ON_ERROR),
101+
'DMC section metadata must not couple to Homeboy'
102+
);
103+
assert_contains(
104+
'Data Machine Code workspace lifecycle, GitHub, and safety guidance.',
105+
$sections['datamachine-code']['metadata']['description'],
106+
'DMC section metadata must describe DMC only'
107+
);
92108
assert_contains(
93109
'- **Primary is read-only.** Never edit `<workspace>/<repo>` (no `@slug`).',
94110
$default,
@@ -116,7 +132,7 @@ static function (): string {
116132
);
117133

118134
$filtered = $render();
119-
assert_contains('Use local project policy for `unavailable; run datamachine-code workspace path to diagnose`. DMC owns authoritative repository', $filtered, 'workspace policy intro filter was not applied');
135+
assert_contains('Use local project policy for `unavailable; run datamachine-code workspace path to diagnose`.', $filtered, 'workspace policy intro filter was not applied');
120136
assert_contains('- **Local policy:** caller-owned workspace rules.', $filtered, 'workspace policy section filter was not applied');
121137
assert_not_contains('- **Primary is read-only.** Never edit `<workspace>/<repo>` (no `@slug`).', $filtered, 'default policy section remained after filter override');
122138
assert_contains('**Default routing**', $filtered, 'DMC routing changed after policy filter');

0 commit comments

Comments
 (0)