Skip to content

feat: add run workspace option#71

Open
haosenwang1018 wants to merge 1 commit intoopen-gitagent:mainfrom
haosenwang1018:feat/run-workspace
Open

feat: add run workspace option#71
haosenwang1018 wants to merge 1 commit intoopen-gitagent:mainfrom
haosenwang1018:feat/run-workspace

Conversation

@haosenwang1018
Copy link
Copy Markdown

What

Adds gitagent run --workspace <dir> so an agent definition can live separately from the repository or directory it operates on.

Why

Refs #58.

The main use case is running a reusable agent definition, such as a reviewer or autoresearch agent, against a separate target repo without making the agent operate on its own agent.yaml, SOUL.md, and skills directory.

How

  • Adds -w, --workspace <dir> to gitagent run.
  • Passes the workspace through the normal run path and the -a git delegated path.
  • Applies the resolved workspace as the spawned process cwd for direct process runners: Claude, OpenAI, CrewAI, Nanobot, and OpenClaw.
  • Documents the behavior and notes that temp-workspace adapters (opencode, gemini, gitclaw) keep using their prepared workspace to avoid overwriting target repo files like AGENTS.md, GEMINI.md, or agent.yaml.

How Tested

  • npm run build passes
  • npm test passes
  • git diff --check passes
  • node dist/index.js run --help shows --workspace

Checklist

  • My code follows the existing style of this project
  • I have added/updated tests (if applicable)
  • I have updated documentation (if applicable)
  • I have read the CONTRIBUTING.md

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