diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 99beac79..ba14171d 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -112,7 +112,7 @@ "name": "workspace", "source": "./plugins/workspace", "description": "Bootstrap and manage multi-repo dev environments for AI-assisted development: clone repos from a domain, layer per-repo Claude context, and track work in structured project workspaces.", - "version": "0.1.1" + "version": "0.1.2" } ] } diff --git a/plugins/workspace/.claude-plugin/plugin.json b/plugins/workspace/.claude-plugin/plugin.json index a32aeefb..984919fa 100644 --- a/plugins/workspace/.claude-plugin/plugin.json +++ b/plugins/workspace/.claude-plugin/plugin.json @@ -2,7 +2,7 @@ "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json", "name": "workspace", "displayName": "Multi-Repo Workspace Manager", - "version": "0.1.1", + "version": "0.1.2", "description": "Bootstrap and manage multi-repo dev environments for AI-assisted development: clone repos from a domain, layer per-repo Claude context, and track work in structured project workspaces.", "author": { "name": "fonta-rh" diff --git a/plugins/workspace/scripts/consolidate-project.py b/plugins/workspace/scripts/consolidate-project.py index 01355b7a..8df111a6 100755 --- a/plugins/workspace/scripts/consolidate-project.py +++ b/plugins/workspace/scripts/consolidate-project.py @@ -146,10 +146,11 @@ def build_archive_block(section: Section, today: str) -> str: to_archive = checked[:-KEEP_RECENT] if len(checked) > KEEP_RECENT else checked strikethroughs = section.strikethrough + total_archived = len(to_archive) + len(strikethroughs) lines = [ f"## {section.name} (archived {today})", "", - f"{len(to_archive)} completed items archived from CLAUDE.md.", + f"{total_archived} items archived from CLAUDE.md.", "", ] for item in to_archive: @@ -218,7 +219,7 @@ def consolidate(project_dir: Path, dry_run: bool = False) -> dict[str, Any]: section_info = [] for s in qualifying: - to_archive = max(0, len(s.checked) - KEEP_RECENT) + to_archive = max(0, len(s.checked) - KEEP_RECENT) + len(s.strikethrough) section_info.append({ "name": s.name, "checked": len(s.checked), diff --git a/plugins/workspace/scripts/domain-info.py b/plugins/workspace/scripts/domain-info.py index 5ae277e9..24858d99 100755 --- a/plugins/workspace/scripts/domain-info.py +++ b/plugins/workspace/scripts/domain-info.py @@ -237,10 +237,17 @@ def main() -> None: try: shutil.copytree(domain_dir, dest) except (OSError, shutil.Error) as exc: - print(json.dumps({ - "status": "error", - "error": f"Failed to copy domain to workspace: {exc}", - })) + cleanup_ok = True + if dest.exists(): + try: + shutil.rmtree(dest) + except OSError: + cleanup_ok = False + msg = f"Failed to copy domain to workspace: {exc}" + if not cleanup_ok: + msg += (f" (warning: partial directory at {dest} could not be" + " removed — delete it manually before retrying)") + print(json.dumps({"status": "error", "error": msg})) return domain_dir = dest action = "copied"