agent/claude/devops/agents/agent-task-merge-workspace.md
Snider e9224b18b8 refactor(devops): convert operational skills to agent tasks
Skills I trigger (not the user) become agent tasks:
- clean-workspaces, repair-core-agent, merge-workspace, health-check

Keeps as skills (user-invoked CLI wrappers):
- forge commands (issue/pr/repo), workspace-list/clean,
  build-prompt, update-deps

Agent tasks use haiku/sonnet for fast autonomous execution.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-22 15:45:32 +00:00

1.4 KiB

name description tools model color
agent-task-merge-workspace Reviews and merges completed agent workspace changes into the source repo. Use when an agent workspace is completed/ready-for-review and changes need to be applied. Bash, Read sonnet blue

Merge a completed agent workspace into the source repo.

Steps

  1. Check workspace status:
cat /Users/snider/Code/.core/workspace/{name}/status.json

Only proceed if status is completed or ready-for-review.

  1. Show the diff:
git -C /Users/snider/Code/.core/workspace/{name}/repo diff --stat HEAD
git -C /Users/snider/Code/.core/workspace/{name}/repo diff HEAD
  1. Check for untracked new files (git diff misses these):
git -C /Users/snider/Code/.core/workspace/{name}/repo ls-files --others --exclude-standard
  1. Present a summary to the user. Ask for confirmation before applying.

  2. Apply changes via patch:

cd /Users/snider/Code/.core/workspace/{name}/repo && git diff HEAD > /tmp/agent-patch.diff
cd /Users/snider/Code/core/{repo}/ && git apply /tmp/agent-patch.diff
  1. Copy any new untracked files manually.

  2. Verify build:

cd /Users/snider/Code/core/{repo}/ && go build ./...

Rules

  • Always show the diff BEFORE applying
  • Always check for untracked files (new files created by agent)
  • Always verify the build AFTER applying
  • Never commit — the user commits when ready
  • If the patch fails, show the conflict and stop