docs: add git worktree workflow guidance#9
Merged
Merged
Conversation
Documented common issue where `/var/nd/work` directory is not found when
docker containers are started from a different worktree than the current
working directory. The volume mount `${ND_WORKSPACE_ROOT:-./.nd-workspace}:/var/nd`
is relative to where `docker-compose up` was run, not the current directory.
Added troubleshooting section to both CLAUDE.md and AGENTS.md with:
- Root cause explanation and diagnostic commands
- Solution: restart containers from current worktree
- Alternative: shared workspace across worktrees using absolute path
- Container naming pattern clarification (based on directory name)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Expanded the "Lint and format before committing" step in both CLAUDE.md and AGENTS.md to show the exact commands with inline comments explaining what each does. Emphasized that CI enforces linting. Changes: - Added code block showing `ruff check .` and `ruff format .` - Added inline comments explaining each command - Clarified that all linting must pass before committing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fixed bug in _parse_task_body where issue task data was incorrectly stored using mr_number and mr_url keys instead of issue_number and issue_url. The parser now correctly extracts: - issue_number (instead of mr_number) - issue_url (instead of mr_url) This allows _extract_source_metadata to properly construct MR bodies with "Addresses <issue_url>" when creating merge requests for issue tasks. Also includes ruff formatting fixes for nd/worker/agent.py and tests/e2e/test_suite_structure.py. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fixed bug where publish_changes was looking for context["mr_url"] even for issue tasks, causing MR bodies to be "Addresses " with no URL. Now correctly checks for issue_url first, then falls back to mr_url for MR tasks. This ensures MRs created from issues have proper "Addresses <issue_url>" bodies. Co-Authored-By: Claude Opus 4.6 <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
Documents the git worktree workflow and resolves common
/var/nd/workdirectory not found errors when working across multiple worktrees.Changes
Problem Solved
When docker containers are started from one worktree but code is being worked on in another, the volume mount
${ND_WORKSPACE_ROOT:-./.nd-workspace}:/var/ndis relative to wheredocker-compose upwas run, not the current directory. This causesWorkspaceClient.prepare()to fail with[Errno 2] No such file or directory: '/var/nd/work'.Documentation Additions
ND_WORKSPACE_ROOTfor shared workspace across worktreesTest plan
/var/nd/workerror with containers from different worktree/var/nd/workdirectory is accessible after fix🤖 Generated with Claude Code