Skip to content

Project write and git workspace tools for coding agents#606

Merged
chubes4 merged 1 commit into
mainfrom
fix/project-write-workspace-tools
Jun 8, 2026
Merged

Project write and git workspace tools for coding agents#606
chubes4 merged 1 commit into
mainfrom
fix/project-write-workspace-tools

Conversation

@chubes4
Copy link
Copy Markdown
Member

@chubes4 chubes4 commented Jun 8, 2026

Summary

AbilityToolProjections::projected_tools() only exposed read-only workspace tools (workspace_ls, workspace_read, workspace_grep, etc.) as model-facing Data Machine tools. The mutating workspace abilities exist and are registered (datamachine-code/workspace-write, -edit, -apply-patch, -delete, the git add/commit/push/etc., worktree, and PR abilities) but were never projected — so a coding agent in sandbox/chat runs never received a write tool. The model had nothing to call and would either fail or fabricate the edit.

This projects the mutating workspace tools, each gated behind requires_opt_in so a read-only task never receives file-mutating tools by default. They surface only when explicitly named via allow_only or an allow-mode tool policy.

Why this matters

This is the final runtime gap that prevented WP Codebox coding agents from actually editing files. End-to-end trace:

Changes

  • Add workspace_write, workspace_edit, workspace_apply_patch, workspace_delete, workspace_git_status/log/diff/pull/add/commit/push/rebase/reset, workspace_worktree_add, workspace_pr_status/rebase to projected_tools().
  • New workspace_write() declaration helper sets requires_opt_in => true.
  • Extend tests/smoke-ability-tool-projections.php to assert the write tools project with requires_opt_in.

Testing

  • php -l inc/Tools/AbilityToolProjections.php
  • php tests/smoke-ability-tool-projections.php — all new write-tool projection assertions pass (workspace_write/edit/apply_patch/delete/git_add/git_commit/git_push ... requires opt-in).
    • Note: the test's optional trailing transcript-formatter section throws a pre-existing wp_json_encode() fatal when run standalone against a sibling data-machine checkout; this is unrelated to this change and reproduces on clean main.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (openai/gpt-5.5)
  • Used for: End-to-end traced the missing tool-projection through wp-codebox → agents/chat → ToolPolicyResolver → AbilityToolSource, implemented the projection + opt-in gating, and added test coverage; Chris directs the work and remains responsible for review/testing.

AbilityToolProjections only exposed read-only workspace tools
(workspace_ls/read/grep/etc.) as model-facing tools, so agents in sandbox
and chat runs could never receive file-mutating tools — the model had no
write tool to call and would either fail or fabricate edits.

Project the mutating workspace tools (workspace_write, workspace_edit,
workspace_apply_patch, workspace_delete, and the git add/commit/push and
worktree/PR tools), each gated behind requires_opt_in so a read-only task
never receives file-mutating tools by default. They surface only when
named via allow_only or an allow-mode tool policy.

Extends the projection smoke test to assert the write tools project with
requires_opt_in set.
@homeboy-ci
Copy link
Copy Markdown
Contributor

homeboy-ci Bot commented Jun 8, 2026

Homeboy Results — data-machine-code

Lint

lint — passed

ℹ️ Full options: homeboy docs commands/lint
ℹ️ Save lint baseline: homeboy lint data-machine-code --baseline
Deep dive: homeboy lint data-machine-code --changed-since 92085b0

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-code-lint-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-code-lint-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine-code/actions/runs/27114345503

Test

test — passed

ℹ️ Auto-fix lint issues: homeboy refactor data-machine-code --from lint --write
ℹ️ Collect coverage: homeboy test data-machine-code --coverage
ℹ️ Pass args to test runner: homeboy test -- [args]
ℹ️ Full options: homeboy docs commands/test
Deep dive: homeboy test data-machine-code --changed-since 92085b0

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-code-test-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-code-test-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine-code/actions/runs/27114345503

Audit

audit — passed

  • audit — 6 finding(s)
  • Total: 6 finding(s)

Deep dive: homeboy audit data-machine-code --changed-since 92085b0

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-code-audit-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-code-audit-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine-code/actions/runs/27114345503
Tooling versions
  • Homeboy CLI: homeboy 0.222.15+6508679
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: 3c9320c2
  • Action: unknown@unknown

@chubes4 chubes4 merged commit 055fd19 into main Jun 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant