diff --git a/factory/models.py b/factory/models.py index 99304f6d0..1cdd5235d 100644 --- a/factory/models.py +++ b/factory/models.py @@ -491,24 +491,7 @@ class CycleState(BaseModel): cycle_id: str started_at: datetime - mode: Literal[ - "build", - "create", - "deep-qa", - "deep-research", - "design", - "discover", - "founder", - "improve", - "meta", - "parallel-improve", - "qa", - "refine", - "research", - "review", - "study", - "swebench", - ] + mode: str initial_prompt: str = "" respawns: int = 0 runner_name: str | None = None diff --git a/factory/worktree.py b/factory/worktree.py index 13961247e..d0d036d06 100644 --- a/factory/worktree.py +++ b/factory/worktree.py @@ -140,6 +140,16 @@ def create_worktree( if backlog_src.exists(): shutil.copy2(backlog_src, wt_factory / "strategy" / "backlog.md") + # Copy remaining plugin-created subdirectories not already handled. + _handled = set(_SHARED_SYMLINK_ENTRIES) | set(_COPY_ENTRIES) + if factory_dir.is_dir(): + for child in factory_dir.iterdir(): + if child.name in _handled or not child.is_dir(): + continue + dst = wt_factory / child.name + if not dst.exists(): + shutil.copytree(child, dst) + log.info("worktree_created", branch=branch, path=str(wt_dir)) try: