do - Feature Development Orchestrator An orchestrator for systematic feature development. Invoke agents via , never write code directly. Loop Initialization (REQUIRED) When triggered via , initialize the task directory immediately without asking about worktree: This creates a task directory under with: - : Single file containing YAML frontmatter (metadata) + Markdown body (requirements/context) Worktree decision is deferred until Phase 4 (Implement). Phases 1-3 are read-only and do not require worktree isolation. Task Directory Management Use to manage task state: Worktree Mode The worktree i…

, content, re.DOTALL)\n if not match:\n return None\n\n frontmatter_str = match.group(1)\n body = match.group(2)\n\n # Simple YAML parsing (no external deps)\n frontmatter = {}\n for line in frontmatter_str.split('\\n'):\n if ':' in line:\n key, value = line.split(':', 1)\n key = key.strip()\n value = value.strip()\n # Handle quoted strings\n if value.startswith('\"') and value.endswith('\"'):\n value = value[1:-1]\n elif value == 'true':\n value = True\n elif value == 'false':\n value = False\n elif value.isdigit():\n value = int(value)\n frontmatter[key] = value\n\n return {\"frontmatter\": frontmatter, \"body\": body}\n\n\ndef write_task_md(task_md_path: str, frontmatter: dict, body: str) -> bool:\n \"\"\"Write task.md with YAML frontmatter + body.\"\"\"\n try:\n lines = [\"---\"]\n for key, value in frontmatter.items():\n if isinstance(value, bool):\n lines.append(f\"{key}: {str(value).lower()}\")\n elif isinstance(value, int):\n lines.append(f\"{key}: {value}\")\n elif isinstance(value, str) and ('\u003c' in value or '>' in value or ':' in value):\n lines.append(f'{key}: \"{value}\"')\n else:\n lines.append(f'{key}: \"{value}\"' if isinstance(value, str) else f\"{key}: {value}\")\n lines.append(\"---\")\n lines.append(\"\")\n lines.append(body)\n\n with open(task_md_path, \"w\", encoding=\"utf-8\") as f:\n f.write('\\n'.join(lines))\n return True\n except Exception:\n return False\n\n\ndef create_worktree(project_root: str, task_id: str) -> str:\n \"\"\"Create a git worktree for the task. Returns the worktree directory path.\"\"\"\n # Get git root\n result = subprocess.run(\n [\"git\", \"-C\", project_root, \"rev-parse\", \"--show-toplevel\"],\n capture_output=True,\n text=True,\n )\n if result.returncode != 0:\n raise RuntimeError(f\"Not a git repository: {project_root}\")\n git_root = result.stdout.strip()\n\n # Calculate paths\n worktree_dir = os.path.join(git_root, \".worktrees\", f\"do-{task_id}\")\n branch_name = f\"do/{task_id}\"\n\n # Create worktree with new branch\n result = subprocess.run(\n [\"git\", \"-C\", git_root, \"worktree\", \"add\", \"-b\", branch_name, worktree_dir],\n capture_output=True,\n text=True,\n )\n if result.returncode != 0:\n raise RuntimeError(f\"Failed to create worktree: {result.stderr}\")\n\n return worktree_dir\n\n\ndef create_task(title: str, use_worktree: bool = False) -> dict:\n \"\"\"Create a new task directory with task.md.\"\"\"\n project_root = get_project_root()\n tasks_dir = get_tasks_dir(project_root)\n os.makedirs(tasks_dir, exist_ok=True)\n\n task_id = generate_task_id()\n task_dir = os.path.join(tasks_dir, task_id)\n\n os.makedirs(task_dir, exist_ok=True)\n\n # Create worktree if requested\n worktree_dir = \"\"\n if use_worktree:\n try:\n worktree_dir = create_worktree(project_root, task_id)\n except RuntimeError as e:\n print(f\"Warning: {e}\", file=sys.stderr)\n use_worktree = False\n\n frontmatter = {\n \"id\": task_id,\n \"title\": title,\n \"status\": \"in_progress\",\n \"current_phase\": 1,\n \"phase_name\": PHASE_NAMES[1],\n \"max_phases\": 5,\n \"use_worktree\": use_worktree,\n \"worktree_dir\": worktree_dir,\n \"created_at\": datetime.now().isoformat(),\n \"completion_promise\": \"\u003cpromise>DO_COMPLETE\u003c/promise>\",\n }\n\n body = f\"\"\"# Requirements\n\n{title}\n\n## Context\n\n## Progress\n\"\"\"\n\n task_md_path = os.path.join(task_dir, FILE_TASK_MD)\n write_task_md(task_md_path, frontmatter, body)\n\n current_task_file = get_current_task_file(project_root)\n relative_task_dir = os.path.relpath(task_dir, project_root)\n with open(current_task_file, \"w\", encoding=\"utf-8\") as f:\n f.write(relative_task_dir)\n\n return {\n \"task_dir\": task_dir,\n \"relative_path\": relative_task_dir,\n \"task_data\": frontmatter,\n \"worktree_dir\": worktree_dir,\n }\n\n\ndef get_current_task(project_root: str) -> str | None:\n \"\"\"Read current task directory path.\"\"\"\n current_task_file = get_current_task_file(project_root)\n if not os.path.exists(current_task_file):\n return None\n\n try:\n with open(current_task_file, \"r\", encoding=\"utf-8\") as f:\n content = f.read().strip()\n return content if content else None\n except Exception:\n return None\n\n\ndef start_task(task_dir: str) -> bool:\n \"\"\"Set current task pointer.\"\"\"\n project_root = get_project_root()\n tasks_dir = get_tasks_dir(project_root)\n\n if os.path.isabs(task_dir):\n full_path = task_dir\n relative_path = os.path.relpath(task_dir, project_root)\n else:\n if not task_dir.startswith(DIR_TASKS):\n full_path = os.path.join(tasks_dir, task_dir)\n relative_path = os.path.join(DIR_TASKS, task_dir)\n else:\n full_path = os.path.join(project_root, task_dir)\n relative_path = task_dir\n\n if not os.path.exists(full_path):\n print(f\"Error: Task directory not found: {full_path}\", file=sys.stderr)\n return False\n\n current_task_file = get_current_task_file(project_root)\n os.makedirs(os.path.dirname(current_task_file), exist_ok=True)\n\n with open(current_task_file, \"w\", encoding=\"utf-8\") as f:\n f.write(relative_path)\n\n return True\n\n\ndef finish_task() -> bool:\n \"\"\"Clear current task pointer.\"\"\"\n project_root = get_project_root()\n current_task_file = get_current_task_file(project_root)\n\n if os.path.exists(current_task_file):\n os.remove(current_task_file)\n\n return True\n\n\ndef list_tasks() -> list[dict]:\n \"\"\"List all task directories.\"\"\"\n project_root = get_project_root()\n tasks_dir = get_tasks_dir(project_root)\n\n if not os.path.exists(tasks_dir):\n return []\n\n tasks = []\n current_task = get_current_task(project_root)\n\n for entry in sorted(os.listdir(tasks_dir), reverse=True):\n entry_path = os.path.join(tasks_dir, entry)\n if not os.path.isdir(entry_path):\n continue\n\n task_md_path = os.path.join(entry_path, FILE_TASK_MD)\n if not os.path.exists(task_md_path):\n continue\n\n parsed = read_task_md(task_md_path)\n if parsed:\n task_data = parsed[\"frontmatter\"]\n else:\n task_data = {\"id\": entry, \"title\": entry, \"status\": \"unknown\"}\n\n relative_path = os.path.join(DIR_TASKS, entry)\n task_data[\"path\"] = relative_path\n task_data[\"is_current\"] = current_task == relative_path\n tasks.append(task_data)\n\n return tasks\n\n\ndef get_status() -> dict | None:\n \"\"\"Get current task status.\"\"\"\n project_root = get_project_root()\n current_task = get_current_task(project_root)\n\n if not current_task:\n return None\n\n task_dir = os.path.join(project_root, current_task)\n task_md_path = os.path.join(task_dir, FILE_TASK_MD)\n\n parsed = read_task_md(task_md_path)\n if not parsed:\n return None\n\n task_data = parsed[\"frontmatter\"]\n task_data[\"path\"] = current_task\n return task_data\n\n\ndef update_phase(phase: int) -> bool:\n \"\"\"Update current task phase.\"\"\"\n project_root = get_project_root()\n current_task = get_current_task(project_root)\n\n if not current_task:\n print(\"Error: No active task.\", file=sys.stderr)\n return False\n\n task_dir = os.path.join(project_root, current_task)\n task_md_path = os.path.join(task_dir, FILE_TASK_MD)\n\n parsed = read_task_md(task_md_path)\n if not parsed:\n print(\"Error: task.md not found or invalid.\", file=sys.stderr)\n return False\n\n frontmatter = parsed[\"frontmatter\"]\n frontmatter[\"current_phase\"] = phase\n frontmatter[\"phase_name\"] = PHASE_NAMES.get(phase, f\"Phase {phase}\")\n\n if not write_task_md(task_md_path, frontmatter, parsed[\"body\"]):\n print(\"Error: Failed to write task.md.\", file=sys.stderr)\n return False\n\n return True\n\n\ndef main():\n parser = argparse.ArgumentParser(\n description=\"Task directory management for do skill workflow\"\n )\n subparsers = parser.add_subparsers(dest=\"command\", help=\"Available commands\")\n\n # create command\n create_parser = subparsers.add_parser(\"create\", help=\"Create a new task\")\n create_parser.add_argument(\"title\", nargs=\"+\", help=\"Task title\")\n create_parser.add_argument(\"--worktree\", action=\"store_true\", help=\"Enable worktree mode\")\n\n # start command\n start_parser = subparsers.add_parser(\"start\", help=\"Set current task\")\n start_parser.add_argument(\"task_dir\", help=\"Task directory path\")\n\n # finish command\n subparsers.add_parser(\"finish\", help=\"Clear current task\")\n\n # list command\n subparsers.add_parser(\"list\", help=\"List all tasks\")\n\n # status command\n subparsers.add_parser(\"status\", help=\"Show current task status\")\n\n # update-phase command\n phase_parser = subparsers.add_parser(\"update-phase\", help=\"Update current phase\")\n phase_parser.add_argument(\"phase\", type=int, help=\"Phase number (1-5)\")\n\n args = parser.parse_args()\n\n if args.command == \"create\":\n title = \" \".join(args.title)\n result = create_task(title, args.worktree)\n print(f\"Created task: {result['relative_path']}\")\n print(f\"Task ID: {result['task_data']['id']}\")\n print(f\"Phase: 1/{result['task_data']['max_phases']} (Understand)\")\n print(f\"Worktree: {result['task_data']['use_worktree']}\")\n\n elif args.command == \"start\":\n if start_task(args.task_dir):\n print(f\"Started task: {args.task_dir}\")\n else:\n sys.exit(1)\n\n elif args.command == \"finish\":\n if finish_task():\n print(\"Task finished, current task cleared.\")\n else:\n sys.exit(1)\n\n elif args.command == \"list\":\n tasks = list_tasks()\n if not tasks:\n print(\"No tasks found.\")\n else:\n for task in tasks:\n marker = \"* \" if task.get(\"is_current\") else \" \"\n phase = task.get(\"current_phase\", \"?\")\n max_phase = task.get(\"max_phases\", 5)\n status = task.get(\"status\", \"unknown\")\n print(f\"{marker}{task['id']} [{status}] phase {phase}/{max_phase}\")\n print(f\" {task.get('title', 'No title')}\")\n\n elif args.command == \"status\":\n status = get_status()\n if not status:\n print(\"No active task.\")\n else:\n print(f\"Task: {status['id']}\")\n print(f\"Title: {status.get('title', 'No title')}\")\n print(f\"Status: {status.get('status', 'unknown')}\")\n print(f\"Phase: {status.get('current_phase', '?')}/{status.get('max_phases', 5)}\")\n print(f\"Worktree: {status.get('use_worktree', False)}\")\n print(f\"Path: {status['path']}\")\n\n elif args.command == \"update-phase\":\n if update_phase(args.phase):\n phase_name = PHASE_NAMES.get(args.phase, f\"Phase {args.phase}\")\n print(f\"Updated to phase {args.phase} ({phase_name})\")\n else:\n sys.exit(1)\n\n else:\n parser.print_help()\n sys.exit(1)\n\n\nif __name__ == \"__main__\":\n main()\n","content_type":"text/x-python; charset=utf-8","language":"python","size":13358,"content_sha256":"25f9edb5320f7118039ec5ac1c3fefd52b48871c68337398b8924e2e3cd097fd"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"do - Feature Development Orchestrator","type":"text"}]},{"type":"paragraph","content":[{"text":"An orchestrator for systematic feature development. Invoke agents via ","type":"text"},{"text":"codeagent-wrapper","type":"text","marks":[{"type":"code_inline"}]},{"text":", never write code directly.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Loop Initialization (REQUIRED)","type":"text"}]},{"type":"paragraph","content":[{"text":"When triggered via ","type":"text"},{"text":"/do \u003ctask>","type":"text","marks":[{"type":"code_inline"}]},{"text":", initialize the task directory immediately without asking about worktree:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"python3 \"$HOME/.claude/skills/do/scripts/setup-do.py\" \"\u003ctask description>\"","type":"text"}]},{"type":"paragraph","content":[{"text":"This creates a task directory under ","type":"text"},{"text":".claude/do-tasks/","type":"text","marks":[{"type":"code_inline"}]},{"text":" with:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"task.md","type":"text","marks":[{"type":"code_inline"}]},{"text":": Single file containing YAML frontmatter (metadata) + Markdown body (requirements/context)","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Worktree decision is deferred until Phase 4 (Implement).","type":"text","marks":[{"type":"strong"}]},{"text":" Phases 1-3 are read-only and do not require worktree isolation.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Task Directory Management","type":"text"}]},{"type":"paragraph","content":[{"text":"Use ","type":"text"},{"text":"task.py","type":"text","marks":[{"type":"code_inline"}]},{"text":" to manage task state:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Update phase\npython3 \"$HOME/.claude/skills/do/scripts/task.py\" update-phase 2\n\n# Check status\npython3 \"$HOME/.claude/skills/do/scripts/task.py\" status\n\n# List all tasks\npython3 \"$HOME/.claude/skills/do/scripts/task.py\" list","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Worktree Mode","type":"text"}]},{"type":"paragraph","content":[{"text":"The worktree is created ","type":"text"},{"text":"only when needed","type":"text","marks":[{"type":"strong"}]},{"text":" (right before Phase 4: Implement). If the user chooses worktree mode:","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Run setup with ","type":"text"},{"text":"--worktree","type":"text","marks":[{"type":"code_inline"}]},{"text":" flag to create the worktree:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"python3 \"$HOME/.claude/skills/do/scripts/setup-do.py\" --worktree \"\u003ctask description>\"","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Use the ","type":"text"},{"text":"DO_WORKTREE_DIR","type":"text","marks":[{"type":"code_inline"}]},{"text":" environment variable to direct ","type":"text"},{"text":"codeagent-wrapper","type":"text","marks":[{"type":"code_inline"}]},{"text":" develop agent into the worktree. ","type":"text"},{"text":"Do NOT pass ","type":"text","marks":[{"type":"strong"}]},{"text":"--worktree","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" to subsequent calls","type":"text","marks":[{"type":"strong"}]},{"text":" — that creates a new worktree each time.","type":"text"}]}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Save the worktree path from setup output, then prefix all develop calls:\nDO_WORKTREE_DIR=\u003cworktree_dir> codeagent-wrapper --agent develop - . \u003c\u003c'EOF'\n...\nEOF","type":"text"}]},{"type":"paragraph","content":[{"text":"Read-only agents (code-explorer, code-architect, code-reviewer) do NOT need ","type":"text"},{"text":"DO_WORKTREE_DIR","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Hard Constraints","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Never write code directly.","type":"text","marks":[{"type":"strong"}]},{"text":" Delegate all code changes to ","type":"text"},{"text":"codeagent-wrapper","type":"text","marks":[{"type":"code_inline"}]},{"text":" agents.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Parallel-first.","type":"text","marks":[{"type":"strong"}]},{"text":" Run independent tasks via ","type":"text"},{"text":"codeagent-wrapper --parallel","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Update phase after each phase.","type":"text","marks":[{"type":"strong"}]},{"text":" Use ","type":"text"},{"text":"task.py update-phase \u003cN>","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Expect long-running ","type":"text","marks":[{"type":"strong"}]},{"text":"codeagent-wrapper","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" calls.","type":"text","marks":[{"type":"strong"}]},{"text":" High-reasoning modes can take a long time.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Timeouts are not an escape hatch.","type":"text","marks":[{"type":"strong"}]},{"text":" If a call times out, retry with narrower scope.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Defer worktree decision until Phase 4.","type":"text","marks":[{"type":"strong"}]},{"text":" Only ask about worktree mode right before implementation. If enabled, prefix develop agent calls with ","type":"text"},{"text":"DO_WORKTREE_DIR=\u003cpath>","type":"text","marks":[{"type":"code_inline"}]},{"text":". Never pass ","type":"text"},{"text":"--worktree","type":"text","marks":[{"type":"code_inline"}]},{"text":" after initialization.","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Agents","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Agent","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Purpose","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Needs --worktree","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"code-explorer","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Trace code, map architecture, find patterns","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"No (read-only)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"code-architect","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Design approaches, file plans, build sequences","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"No (read-only)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"code-reviewer","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Review for bugs, simplicity, conventions","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"No (read-only)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"develop","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Implement code, run tests","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Yes","type":"text","marks":[{"type":"strong"}]},{"text":" — use ","type":"text"},{"text":"DO_WORKTREE_DIR","type":"text","marks":[{"type":"code_inline"}]},{"text":" env prefix","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Issue Severity Definitions","type":"text"}]},{"type":"paragraph","content":[{"text":"Blocking issues","type":"text","marks":[{"type":"strong"}]},{"text":" (require user input):","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Impacts core functionality or correctness","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Security vulnerabilities","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Architectural conflicts with existing patterns","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Ambiguous requirements with multiple valid interpretations","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Minor issues","type":"text","marks":[{"type":"strong"}]},{"text":" (auto-fix without asking):","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Code style inconsistencies","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Naming improvements","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Missing documentation","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Non-critical test coverage gaps","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"5-Phase Workflow","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Phase 1: Understand (Parallel, No Interaction)","type":"text"}]},{"type":"paragraph","content":[{"text":"Goal:","type":"text","marks":[{"type":"strong"}]},{"text":" Understand requirements and map codebase simultaneously.","type":"text"}]},{"type":"paragraph","content":[{"text":"Actions:","type":"text","marks":[{"type":"strong"}]},{"text":" Run ","type":"text"},{"text":"code-architect","type":"text","marks":[{"type":"code_inline"}]},{"text":" and 2-3 ","type":"text"},{"text":"code-explorer","type":"text","marks":[{"type":"code_inline"}]},{"text":" tasks in parallel.","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"codeagent-wrapper --parallel \u003c\u003c'EOF'\n---TASK---\nid: p1_requirements\nagent: code-architect\nworkdir: .\n---CONTENT---\nAnalyze requirements completeness (score 1-10):\n1. Extract explicit requirements, constraints, acceptance criteria\n2. Identify blocking questions (issues that prevent implementation)\n3. Identify minor clarifications (nice-to-have but can proceed without)\n\nOutput format:\n- Completeness score: X/10\n- Requirements: [list]\n- Non-goals: [list]\n- Blocking questions: [list, if any]\n\n---TASK---\nid: p1_similar_features\nagent: code-explorer\nworkdir: .\n---CONTENT---\nFind 1-3 similar features, trace end-to-end. Return: key files with line numbers, call flow, extension points.\n\n---TASK---\nid: p1_architecture\nagent: code-explorer\nworkdir: .\n---CONTENT---\nMap architecture for relevant subsystem. Return: module map + 5-10 key files.\n\n---TASK---\nid: p1_conventions\nagent: code-explorer\nworkdir: .\n---CONTENT---\nIdentify testing patterns, conventions, config. Return: test commands + file locations.\nEOF","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Phase 2: Clarify (Conditional)","type":"text"}]},{"type":"paragraph","content":[{"text":"Goal:","type":"text","marks":[{"type":"strong"}]},{"text":" Resolve blocking ambiguities only.","type":"text"}]},{"type":"paragraph","content":[{"text":"Actions:","type":"text","marks":[{"type":"strong"}]}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Review ","type":"text"},{"text":"p1_requirements","type":"text","marks":[{"type":"code_inline"}]},{"text":" output for blocking questions","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"IF blocking questions exist","type":"text","marks":[{"type":"strong"}]},{"text":" → Use AskUserQuestion","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"IF no blocking questions (completeness >= 8)","type":"text","marks":[{"type":"strong"}]},{"text":" → Skip to Phase 3","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Phase 3: Design (No Interaction)","type":"text"}]},{"type":"paragraph","content":[{"text":"Goal:","type":"text","marks":[{"type":"strong"}]},{"text":" Produce minimal-change implementation plan.","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"codeagent-wrapper --agent code-architect - . \u003c\u003c'EOF'\nDesign minimal-change implementation:\n- Reuse existing abstractions\n- Minimize new files\n- Follow established patterns from Phase 1 exploration\n\nOutput:\n- File touch list with specific changes\n- Build sequence\n- Test plan\n- Risks and mitigations\nEOF","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Phase 4: Implement + Review","type":"text"}]},{"type":"paragraph","content":[{"text":"Goal:","type":"text","marks":[{"type":"strong"}]},{"text":" Build feature and review in one phase.","type":"text"}]},{"type":"paragraph","content":[{"text":"Step 1: Decide on worktree mode (ONLY NOW)","type":"text","marks":[{"type":"strong"}]}]},{"type":"paragraph","content":[{"text":"Use AskUserQuestion to ask:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"Develop in a separate worktree? (Isolates changes from main branch)\n- Yes (Recommended for larger changes)\n- No (Work directly in current directory)","type":"text"}]},{"type":"paragraph","content":[{"text":"If user chooses worktree:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"python3 \"$HOME/.claude/skills/do/scripts/setup-do.py\" --worktree \"\u003ctask description>\"\n# Save the worktree path from output for DO_WORKTREE_DIR","type":"text"}]},{"type":"paragraph","content":[{"text":"Step 2: Invoke develop agent","type":"text","marks":[{"type":"strong"}]}]},{"type":"paragraph","content":[{"text":"For full-stack projects, split into backend/frontend tasks with per-task ","type":"text"},{"text":"skills:","type":"text","marks":[{"type":"code_inline"}]},{"text":" injection. Use ","type":"text"},{"text":"--parallel","type":"text","marks":[{"type":"code_inline"}]},{"text":" when tasks can be split; use single agent when the change is small or single-domain.","type":"text"}]},{"type":"paragraph","content":[{"text":"Single-domain example","type":"text","marks":[{"type":"strong"}]},{"text":" (prefix with ","type":"text"},{"text":"DO_WORKTREE_DIR","type":"text","marks":[{"type":"code_inline"}]},{"text":" if worktree enabled):","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# With worktree:\nDO_WORKTREE_DIR=\u003cworktree_dir> codeagent-wrapper --agent develop --skills golang-base-practices - . \u003c\u003c'EOF'\nImplement with minimal change set following the Phase 3 blueprint.\n- Follow Phase 1 patterns\n- Add/adjust tests per Phase 3 plan\n- Run narrowest relevant tests\nEOF\n\n# Without worktree:\ncodeagent-wrapper --agent develop --skills golang-base-practices - . \u003c\u003c'EOF'\nImplement with minimal change set following the Phase 3 blueprint.\n- Follow Phase 1 patterns\n- Add/adjust tests per Phase 3 plan\n- Run narrowest relevant tests\nEOF","type":"text"}]},{"type":"paragraph","content":[{"text":"Full-stack parallel example","type":"text","marks":[{"type":"strong"}]},{"text":" (adapt task IDs, skills, and content based on Phase 3 design):","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# With worktree:\nDO_WORKTREE_DIR=\u003cworktree_dir> codeagent-wrapper --parallel \u003c\u003c'EOF'\n---TASK---\nid: p4_backend\nagent: develop\nworkdir: .\nskills: golang-base-practices\n---CONTENT---\nImplement backend changes following Phase 3 blueprint.\n- Follow Phase 1 patterns\n- Add/adjust tests per Phase 3 plan\n\n---TASK---\nid: p4_frontend\nagent: develop\nworkdir: .\nskills: frontend-design,vercel-react-best-practices\ndependencies: p4_backend\n---CONTENT---\nImplement frontend changes following Phase 3 blueprint.\n- Follow Phase 1 patterns\n- Add/adjust tests per Phase 3 plan\nEOF\n\n# Without worktree: remove DO_WORKTREE_DIR prefix","type":"text"}]},{"type":"paragraph","content":[{"text":"Note: Choose which skills to inject based on Phase 3 design output. Only inject skills relevant to each task's domain.","type":"text"}]},{"type":"paragraph","content":[{"text":"Step 3: Review","type":"text","marks":[{"type":"strong"}]}]},{"type":"paragraph","content":[{"text":"Step 3: Review","type":"text","marks":[{"type":"strong"}]}]},{"type":"paragraph","content":[{"text":"Run parallel reviews:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"codeagent-wrapper --parallel \u003c\u003c'EOF'\n---TASK---\nid: p4_correctness\nagent: code-reviewer\nworkdir: .\n---CONTENT---\nReview for correctness, edge cases, failure modes.\nClassify each issue as BLOCKING or MINOR.\n\n---TASK---\nid: p4_simplicity\nagent: code-reviewer\nworkdir: .\n---CONTENT---\nReview for KISS: remove bloat, collapse needless abstractions.\nClassify each issue as BLOCKING or MINOR.\nEOF","type":"text"}]},{"type":"paragraph","content":[{"text":"Step 4: Handle review results","type":"text","marks":[{"type":"strong"}]}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"MINOR issues only","type":"text","marks":[{"type":"strong"}]},{"text":" → Auto-fix via ","type":"text"},{"text":"develop","type":"text","marks":[{"type":"code_inline"}]},{"text":", no user interaction","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"BLOCKING issues","type":"text","marks":[{"type":"strong"}]},{"text":" → Use AskUserQuestion: \"Fix now / Proceed as-is\"","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Phase 5: Complete (No Interaction)","type":"text"}]},{"type":"paragraph","content":[{"text":"Goal:","type":"text","marks":[{"type":"strong"}]},{"text":" Document what was built.","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"codeagent-wrapper --agent code-reviewer - . \u003c\u003c'EOF'\nWrite completion summary:\n- What was built\n- Key decisions/tradeoffs\n- Files modified (paths)\n- How to verify (commands)\n- Follow-ups (optional)\nEOF","type":"text"}]},{"type":"paragraph","content":[{"text":"Output the completion signal:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"\u003cpromise>DO_COMPLETE\u003c/promise>","type":"text"}]},{"type":"hr","attrs":{"markup":"---"}}]},"metadata":{"date":"2026-06-05","name":"do","author":"@skillopedia","source":{"stars":2676,"repo_name":"myclaude","origin_url":"https://github.com/cexll/myclaude/blob/HEAD/skills/do/SKILL.md","repo_owner":"cexll","body_sha256":"bdebb7359e62a052add54ad928a131ee2ed7dc8dc816e303d39b5f599325663b","cluster_key":"e6494ad0c883844f17364a745748782d2b463f3ad08382172c97eeeb02773bc2","clean_bundle":{"format":"clean-skill-bundle-v1","source":"cexll/myclaude/skills/do/SKILL.md","attachments":[{"id":"2fe7a61a-fbba-5c97-afba-3c0c77501eb4","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/2fe7a61a-fbba-5c97-afba-3c0c77501eb4/attachment.md","path":"README.md","size":5554,"sha256":"2be99cf32a3b2b4a07d4bcd9ca6d192ae5d941065ea00d144f36227dde21ddf7","contentType":"text/markdown; charset=utf-8"},{"id":"07769411-aa18-5907-89af-6446d64414f9","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/07769411-aa18-5907-89af-6446d64414f9/attachment.md","path":"agents/code-architect.md","size":2259,"sha256":"c50fb08d59a4bbd19660860626a049e44cf1a2b0c1cf782e6c7a99ba7e71b0c3","contentType":"text/markdown; charset=utf-8"},{"id":"2ed2c8ff-2f5b-5069-ad06-e2e48527ac1c","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/2ed2c8ff-2f5b-5069-ad06-e2e48527ac1c/attachment.md","path":"agents/code-explorer.md","size":2115,"sha256":"3b277703de7458988ec3b8021c716f79f642e174950ed332629310f68322029a","contentType":"text/markdown; charset=utf-8"},{"id":"2b5f3591-7a52-5d39-bca0-13337114022b","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/2b5f3591-7a52-5d39-bca0-13337114022b/attachment.md","path":"agents/code-reviewer.md","size":2994,"sha256":"a7df173bf77a00da5584c6401a1061524fdbe477b6fef5dd496d4c7a9113c78c","contentType":"text/markdown; charset=utf-8"},{"id":"145c7e7d-9650-5247-86c5-4289c5ae5063","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/145c7e7d-9650-5247-86c5-4289c5ae5063/attachment.json","path":"hooks/hooks.json","size":511,"sha256":"9ccae83f0b58525cd6a07217a86bcf90e835618b4d8d6867529fc7acde50fec9","contentType":"application/json; charset=utf-8"},{"id":"27563b2b-7823-523b-a2a9-d7bbc52e15d3","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/27563b2b-7823-523b-a2a9-d7bbc52e15d3/attachment.py","path":"hooks/stop-hook.py","size":2992,"sha256":"29595277f37b70570ec848f5b03df50c0bd0be2910ff10a3518bc8bdf67b5e9f","contentType":"text/x-python; charset=utf-8"},{"id":"bcbb6e6c-d5c8-5fc6-92c9-aad98b7c6132","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/bcbb6e6c-d5c8-5fc6-92c9-aad98b7c6132/attachment.py","path":"hooks/verify-loop.py","size":6832,"sha256":"8840f1ad50b9aa109306f59da8dca849e4a68197c48b05668542e88958bf2021","contentType":"text/x-python; charset=utf-8"},{"id":"f026392b-e031-5201-9db5-afed4b3cd151","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/f026392b-e031-5201-9db5-afed4b3cd151/attachment.py","path":"install.py","size":4583,"sha256":"3e631ee49f850e7750050bf45a368a9a797e37ee1e41d28b79f7dcfd9ad19d87","contentType":"text/x-python; charset=utf-8"},{"id":"caab13fd-19a3-5814-b18f-2a4872c8835e","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/caab13fd-19a3-5814-b18f-2a4872c8835e/attachment.py","path":"scripts/get-context.py","size":4626,"sha256":"1ad5fa9eb9def6858a93b9f62b43deb986dfed6e4f0785996937d1b473cc609f","contentType":"text/x-python; charset=utf-8"},{"id":"151429ba-1a30-5eb1-a01b-69a68e0187ef","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/151429ba-1a30-5eb1-a01b-69a68e0187ef/attachment.py","path":"scripts/setup-do.py","size":1804,"sha256":"1b04e11da104536f799a6b11af47ade70f2d57237a844074ecfbc834299bebd5","contentType":"text/x-python; charset=utf-8"},{"id":"824bee11-d423-5db8-aa57-732c05dafbb3","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/824bee11-d423-5db8-aa57-732c05dafbb3/attachment.py","path":"scripts/task.py","size":13358,"sha256":"25f9edb5320f7118039ec5ac1c3fefd52b48871c68337398b8924e2e3cd097fd","contentType":"text/x-python; charset=utf-8"}],"bundle_sha256":"f760ad97710faeb4709b5cc874a50d684624c1bca7ffe5fd86d914faed75265e","attachment_count":11,"text_attachments":11,"attachment_storage":"skillopedia-attachments-v1","binary_attachments":0,"excluded_attachments":[]},"cluster_size":1,"skill_md_path":"skills/do/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"design-ux","category_label":"Design"},"exact_dupes_collapsed_into_this":0},"version":"v1","category":"design-ux","import_tag":"clean-skills-v1","description":"This skill should be used for structured feature development with codebase understanding. Triggers on /do command. Provides a 5-phase workflow (Understand, Clarify, Design, Implement, Complete) using codeagent-wrapper to orchestrate code-explorer, code-architect, code-reviewer, and develop agents in parallel.","allowed-tools":["Bash(python3:*/.claude/skills/do/scripts/setup-do.py*)","Bash(python3:*/.claude/skills/do/scripts/task.py*)"]}},"renderedAt":1782989070189}

do - Feature Development Orchestrator An orchestrator for systematic feature development. Invoke agents via , never write code directly. Loop Initialization (REQUIRED) When triggered via , initialize the task directory immediately without asking about worktree: This creates a task directory under with: - : Single file containing YAML frontmatter (metadata) + Markdown body (requirements/context) Worktree decision is deferred until Phase 4 (Implement). Phases 1-3 are read-only and do not require worktree isolation. Task Directory Management Use to manage task state: Worktree Mode The worktree i…