configure-workspaces
Configure workspaces
Build an evidence-backed workspace configuration, let the user review the complete JSON, then write only what they approve.
The shared file is .agent-work/workspace.json. Machine-specific overrides belong in .agent-work/workspace.local.json, which must be ignored by Git. Compatible task runners use these files to create worktrees immediately for a task.
1. Resolve the repository
Run git rev-parse --show-toplevel from the current directory. Use the returned root and state it in one sentence.
If the command fails, ask exactly one question:
Which repository should I configure? Send its path.
Resolve the reply with git -C <path> rev-parse --show-toplevel. Quote the path safely in every command. Keep asking only when the supplied path is not a Git repository.
Complete when: one canonical Git root has been selected and every later read or command is anchored to it.