From htmlgraph
Create a parallelized development plan with research synthesis and worktree-based execution. Activate when asked to create a plan, parallelize work, or organize development tasks.
npx claudepluginhub shakestzd/htmlgraphThis skill uses the workspace's default tool permissions.
Use this skill when asked to plan development work, create a parallel execution plan, or organize tasks for multi-agent execution.
Provides Ktor server patterns for routing DSL, plugins (auth, CORS, serialization), Koin DI, WebSockets, services, and testApplication testing.
Conducts multi-source web research with firecrawl and exa MCPs: searches, scrapes pages, synthesizes cited reports. For deep dives, competitive analysis, tech evaluations, or due diligence.
Provides demand forecasting, safety stock optimization, replenishment planning, and promotional lift estimation for multi-location retailers managing 300-800 SKUs.
Use this skill when asked to plan development work, create a parallel execution plan, or organize tasks for multi-agent execution.
Trigger keywords: create plan, development plan, parallel plan, plan tasks, parallelize work, organize work, task breakdown
A good parallel plan has three properties:
Extract all tasks from the conversation. For each task, identify:
Before building the plan, gather evidence. Spawn all five simultaneously (single message):
# Agent 1: Similar solutions in codebase
Task(
subagent_type="gemini",
description="Find similar existing implementations",
prompt="""
Search the codebase for patterns similar to [task description].
Look for: existing patterns, naming conventions, module structure.
Report file paths and relevant code snippets.
"""
)
# Agent 2: Library and dependency analysis
Task(
subagent_type="gemini",
description="Analyze available libraries and dependencies",
prompt="""
Check pyproject.toml and existing imports for relevant libraries.
What tools are already available for [task domain]?
Report: available packages, their usage patterns in codebase.
"""
)
# Agent 3: Codebase patterns and conventions
Task(
subagent_type="gemini",
description="Identify codebase patterns and conventions",
prompt="""
Search for coding conventions relevant to [task domain].
Check: type annotation style, error handling patterns, test structure.
Report patterns with file examples.
"""
)
# Agent 4: Spec validation
Task(
subagent_type="gemini",
description="Validate task specifications for completeness",
prompt="""
Review the task requirements:
[task list]
For each task, identify:
- Missing requirements or ambiguities
- Edge cases not addressed
- Potential conflicts between tasks
Report findings concisely.
"""
)
# Agent 5: Dependency and file conflict analysis
Task(
subagent_type="gemini",
description="Analyze file dependencies and conflict risks",
prompt="""
For these tasks: [task list]
Analyze which files each task would likely touch.
Identify: shared files that multiple tasks edit, circular dependencies.
Report conflict risks.
"""
)
After all five agents complete, read their findings and synthesize:
from htmlgraph.planning import PlanBuilder
from htmlgraph import SDK
sdk = SDK(agent="claude-code")
builder = PlanBuilder(sdk, name="[Descriptive Plan Name]")
# Add tasks with dependencies and metadata
builder.add_task(
id="task-001",
title="[Task title]",
description="[Detailed spec including: files to create/edit, expected output, acceptance criteria]",
priority="blocker", # blocker | high | medium | low
agent_type="haiku", # haiku for well-defined, sonnet for complex
files=["src/module/file.py"] # Files this task touches (for conflict detection)
)
builder.add_task(
id="task-002",
title="[Task title]",
description="[Detailed spec]",
priority="high",
agent_type="sonnet",
files=["src/module/other.py"],
depends_on=["task-001"] # Only add when there's a real dependency
)
# Build and display
plan = builder.build()
print(plan.summary())
Independent tasks (same wave):
Dependent tasks (later waves):
Agent type selection:
haiku: Single-file change, clear spec, < 50 lines, no design decisionssonnet: Multi-file, requires reading existing code to understand context, moderate complexityopus: Architecture decisions, complex algorithm design (use sparingly)Priority levels:
blocker: Other tasks cannot start without thishigh: Core functionality, needed soonmedium: Important but not urgentlow: Nice to have, can deferBefore finalizing the plan, check for conflicts:
# Check for tasks touching the same files
conflicts = plan.detect_conflicts()
if conflicts:
for conflict in conflicts:
print(f"WARNING: Tasks {conflict.task_a} and {conflict.task_b} both edit {conflict.file}")
print(f" Resolution: Move {conflict.task_b} to wave after {conflict.task_a}")
Resolve conflicts by:
Show the user:
Plan: [Name]
Total tasks: N | Waves: W | Estimated speedup: Xx
Wave 1 (parallel):
- task-001 [haiku] [blocker] - Title
- task-003 [haiku] [high] - Title
Wave 2 (parallel, after Wave 1):
- task-002 [sonnet] [high] - Title (depends on: task-001)
- task-004 [haiku] [medium] - Title (depends on: task-003)
Wave 3 (parallel, after Wave 2):
- task-005 [sonnet] [medium] - Title (depends on: task-002, task-004)
Conflict warnings:
[none | list any detected]
To execute: /htmlgraph:execute
After plan approval, prepare the execution environment:
# Set up isolated worktrees for each task
uv run htmlgraph worktree setup
# Verify worktrees are ready
git worktree list
Each task gets its own worktree branch feature/<task-id> so agents work in isolation without conflicts.
from htmlgraph import SDK
sdk = SDK(agent="claude-code")
# Track plan creation
spike = sdk.spikes.create("Plan: [plan name]")
spike.set_findings(f"""
Research synthesis:
- Patterns found: [summary]
- Conflicts detected: [summary]
- Ambiguities resolved: [summary]
Plan: {plan.summary()}
""").save()