Problem
When a new worktree is created (e.g., via git worktree add during /implement --batch or single-issue runs), the worktree directory does not inherit two untracked files from the parent repo that are required for pytest collection to work:
plugins/__init__.py — makes the plugins directory a Python package
plugins/autonomous_dev symlink → plugins/autonomous-dev — resolves the underscore/hyphen name mismatch that Python module imports require
Both are untracked (not in .gitignore, not committed), so git worktree add does not copy them. The first pytest collection attempt in a new worktree fails with import errors until these are manually recreated:
# Required manual fixup after worktree creation:
touch plugins/__init__.py
ln -s autonomous-dev plugins/autonomous_dev
This surfaced during the Issue #991 pipeline run (2026-05-24) where pytest collection failed in the worktree until manually fixed.
Evidence
Suggested Fix
Add a post-worktree-creation step in the pipeline coordinator that runs after git worktree add and before the first pytest invocation:
# After: git worktree add {path} {branch}
touch {path}/plugins/__init__.py
ln -sf autonomous-dev {path}/plugins/autonomous_dev
Alternative: commit plugins/__init__.py (1-byte file) and the symlink so git worktree add propagates them automatically. The symlink can be committed as-is on macOS/Linux. This is the simpler fix.
The worktree command in commands/implement.md STEP 3 setup block should include this fixup.
Repo: autonomous-dev
Session: 2026-05-24T01:17:32
Plugin Version: 3.50.0 (fcfec4b)
Filed automatically by continuous-improvement-analyst
Problem
When a new worktree is created (e.g., via
git worktree addduring/implement --batchor single-issue runs), the worktree directory does not inherit two untracked files from the parent repo that are required for pytest collection to work:plugins/__init__.py— makes thepluginsdirectory a Python packageplugins/autonomous_devsymlink →plugins/autonomous-dev— resolves the underscore/hyphen name mismatch that Python module imports requireBoth are untracked (not in
.gitignore, not committed), sogit worktree adddoes not copy them. The first pytest collection attempt in a new worktree fails with import errors until these are manually recreated:# Required manual fixup after worktree creation: touch plugins/__init__.py ln -s autonomous-dev plugins/autonomous_devThis surfaced during the Issue #991 pipeline run (2026-05-24) where pytest collection failed in the worktree until manually fixed.
Evidence
plugins/__init__.pyandplugins/autonomous_dev → autonomous-devsymlink (untracked). I had to recreate these manually for test collection to work."Suggested Fix
Add a post-worktree-creation step in the pipeline coordinator that runs after
git worktree addand before the first pytest invocation:# After: git worktree add {path} {branch} touch {path}/plugins/__init__.py ln -sf autonomous-dev {path}/plugins/autonomous_devAlternative: commit
plugins/__init__.py(1-byte file) and the symlink sogit worktree addpropagates them automatically. The symlink can be committed as-is on macOS/Linux. This is the simpler fix.The
worktreecommand incommands/implement.mdSTEP 3 setup block should include this fixup.Repo: autonomous-dev
Session: 2026-05-24T01:17:32
Plugin Version: 3.50.0 (fcfec4b)
Filed automatically by continuous-improvement-analyst