fix: align job creation directory with MCP server project root - #330
Merged
Conversation
make_new_job.sh used git rev-parse --show-toplevel to decide where to create jobs, while the MCP server uses listRoots for discovery. These diverge when the session root differs from the git root (nested repos, cd changes, non-git parent dirs), causing newly created jobs to be invisible to get_workflows/start_workflow. Add project_root to ActiveStepInfo so agents always know the MCP server's canonical root. Change make_new_job.sh to require --project-root instead of inferring it from git. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add project_root to ActiveStepInfo in doc/mcp_interface.md - Add mypy-required None checks in test_server.py - Remove invalid kwargs from StartWorkflowResponse in test - Update traceability comment to reference JOBS-REQ-001.3.10 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Previously, write_instruction_files deleted ALL .md files on each invocation, even ones with .passed markers. This meant passed reviews lost their instruction files, and concurrent review agents could lose their files mid-flight. Now .md files with a corresponding .passed marker are preserved during cleanup. Updated REVIEW-REQ-009.5 to require this behavior. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude Code expands @file references relative to the main repo root, not the worktree root. The formatter now detects git worktrees via git rev-parse --git-common-dir and makes instruction file paths relative to the main working tree, so review agents can find them. Added REVIEW-REQ-006.3.5 for this behavior. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All step instructions (implement, iterate, learn, repair) now use [project_root]/.deepwork/jobs/ instead of bare .deepwork/jobs/ paths, consistent with the define step fix. Also updated doc/architecture.md to reflect the new cleanup behavior for .passed review files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
make_new_job.shusedgit rev-parse --show-toplevelto decide where to create jobs, but the MCP server useslistRootsfor discovery — these diverge when the session root ≠ git root (nested repos,cdchanges, non-git parent dirs), making newly created jobs invisibleproject_rootfield toActiveStepInfoso agents always know the MCP server's canonical rootmake_new_job.shto require--project-root DIRinstead of inferring from gitTest plan
make_new_job.sh --project-root /tmp/test test_jobcreates job in correct locationmake_new_job.sh test_job(without flag) exits with errorget_workflowsfinds it🤖 Generated with Claude Code