From htmlgraph
Create a dependency-first parallel plan using native TaskCreate with addBlockedBy. Maximizes parallelism by dispatching ALL independent tasks simultaneously. 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
Before creating any plan, ensure work items exist:
htmlgraph track create "Track Title" for the body of workhtmlgraph feature create "Feature Title" --track <track-id>htmlgraph track start <track-id>htmlgraph help for available commandsPlans without attributed features produce untracked work.
Do NOT manually assign tasks to waves. Instead:
TaskCreate + addBlockedBy for real dependenciesTraditional (wrong): Dependency-first (correct):
Wave 1: [A] [B] [C] All independent: [A] [B] [C] [D] [E] [F]
Wave 2: [D] [E] Blocked on A: [G] (addBlockedBy: [A])
Wave 3: [F] Blocked on G: [H] (addBlockedBy: [G])
Artificial sequencing Only real dependencies block
Extract every task from the conversation, track, or feature list. For each task, determine:
| Field | How to Determine |
|---|---|
| Files it creates/edits | Analyze the spec — what new files, what existing files modified |
| Real dependencies | Does this task need another task's OUTPUT? (import, schema, API) |
| File conflicts | Does another task also edit the same file? (not a dependency — a merge concern) |
| Complexity | haiku: single-file, clear spec. sonnet: multi-file, design needed. opus: architecture |
Dependency (use addBlockedBy): Task B literally cannot be written until Task A exists.
File conflict (handle at merge time, NOT with addBlockedBy): Both tasks edit the same file but don't depend on each other's logic.
main.go registering their commandFile conflicts are resolved at merge time, not by serializing tasks.
Spawn research agents in a single message to gather evidence:
Agent(description="Find existing patterns", subagent_type="Explore", prompt="...")
Agent(description="Check dependencies", subagent_type="Explore", prompt="...")
Agent(description="Detect file conflicts", subagent_type="Explore", prompt="...")
Research should answer:
main.go, hooks.json)After research, classify every task pair:
For each pair (A, B):
if B needs A's output → B.addBlockedBy(A)
if both edit same file → note as FILE_CONFLICT (resolve at merge)
else → independent (both dispatch immediately)
Many projects have "registration files" that multiple tasks edit (e.g., main.go adding commands, hooks.json adding handlers). These are NOT dependencies — they're predictable merge conflicts.
Strategy: Identify shared registration files upfront. Tell each agent: "Add your registration to [file] — expect a merge conflict that the orchestrator will resolve."
Use TaskCreate for each task. Use TaskUpdate with addBlockedBy for real dependencies only.
# Independent tasks — no blockers, dispatch immediately
TaskCreate(subject="feat-001: Add check command", description="...",
metadata={"files": ["check.go", "main.go"], "agent": "sonnet-coder", "feature_id": "feat-41114e5d"})
TaskCreate(subject="feat-002: Add budget command", description="...",
metadata={"files": ["budget.go", "main.go"], "agent": "sonnet-coder", "feature_id": "feat-9ef589b4"})
TaskCreate(subject="feat-003: Add health command", description="...",
metadata={"files": ["health.go", "main.go"], "agent": "sonnet-coder", "feature_id": "feat-e745f68f"})
# Dependent task — needs feat-001's quality gate infrastructure
TaskCreate(subject="feat-004: Spec compliance scoring", description="...",
metadata={"files": ["compliance.go"], "agent": "sonnet-coder", "feature_id": "feat-abb438f5"})
# Link the dependency
TaskUpdate(taskId="4", addBlockedBy=["1"]) # feat-004 needs feat-001
Each task description must be self-contained (agents have no shared context). TDD is mandatory — every task includes test specifications that the agent writes BEFORE implementation.
## Goal
[One sentence: what this task produces]
## Files to Create/Edit
- NEW: path/to/new_file.go
- EDIT: path/to/existing_file.go (add registration line)
## Shared Files (expect merge conflict)
- main.go: Add `rootCmd.AddCommand(yourCmd())` — orchestrator resolves conflicts
## Acceptance Criteria
1. [Specific, measurable pass/fail condition]
2. [Specific, measurable pass/fail condition]
## Test Plan (TDD — mandatory)
### Test Strategy
[What kind of testing: "unit test the parser", "integration test the CLI command",
"table-driven tests for edge cases". Match the strategy to the task's risk profile.]
### Expected Behavior
[Concrete input/output examples that tests must verify:]
- Given [input/state], expect [output/behavior]
- Given [edge case], expect [error/fallback]
- Given [invalid input], expect [specific error message]
### Tests to Write FIRST
Write these tests BEFORE any implementation. They must compile and FAIL.
- Test: [TestFunctionName] — verifies [acceptance criterion 1]
- Test: [TestFunctionName] — verifies [acceptance criterion 2]
- Test: [TestEdgeCase] — verifies [boundary/error condition]
## Quality Gate
(cd packages/go && go build ./... && go vet ./... && go test ./...)
## Commit
git commit -m "feat(scope): description (feat-XXXXXXXX)"
Before presenting, compute the parallelism profile:
Total tasks: N
Independent: X (dispatch immediately)
Blocked: Y (wait for dependencies)
Max parallel: X (first round)
File conflicts: Z (handled at merge)
Merge rounds: ceil(Y / batch_size) + 1
If most tasks are independent, nearly everything runs in the first dispatch. Only genuinely blocked tasks wait.
Show the dependency graph, NOT waves:
Plan: [Name]
Total tasks: 13 | Independent: 10 | Blocked: 3 | File conflicts: 5
DISPATCH IMMEDIATELY (10 tasks, all parallel):
#1 feat-001 [sonnet] Add check command files: check.go, main.go
#2 feat-002 [sonnet] Add budget command files: budget.go, main.go
#3 feat-003 [sonnet] Add health command files: health.go, main.go
#4 feat-004 [sonnet] Research gate files: research.go, main.go
#5 feat-005 [sonnet] Feature spec generator files: specgen.go, main.go
#6 feat-006 [sonnet] TDD test case generator files: tdd.go, main.go
#7 feat-007 [sonnet] Worktree isolation files: yolo.go
#8 feat-008 [sonnet] Commit attribution files: hook.go, hooks.json
#9 feat-009 [sonnet] Diff review gate files: review.go
#10 feat-010 [sonnet] Agent lineage tracking files: lineage.go
BLOCKED (3 tasks, dispatch after dependencies complete):
#11 feat-011 [sonnet] Spec compliance scoring blocked-by: #5 (needs spec generator)
#12 feat-012 [sonnet] Session timeline dashboard blocked-by: #8, #10 (needs tracking data)
#13 feat-013 [sonnet] UI validation blocked-by: #12 (needs dashboard)
FILE CONFLICTS (resolved at merge, not by serialization):
main.go: tasks #1-#6 all add registrations — merge sequentially
hooks.json: task #8 — single owner, no conflict
Merge strategy:
Round 1: Merge all 10 independent branches, resolve main.go conflicts
Round 2: Dispatch #11 after #5 merges. Dispatch #12 after #8+#10 merge.
Round 3: Dispatch #13 after #12 merges.
To execute: /htmlgraph:execute
| Agent | When to Use | Cost |
|---|---|---|
htmlgraph:haiku-coder | Single-file, clear spec, <50 lines, no design decisions | Lowest |
htmlgraph:sonnet-coder | Multi-file, needs codebase context, moderate complexity | Medium |
htmlgraph:opus-coder | Architecture decisions, complex algorithms, novel design | Highest |
Default to sonnet unless the task is trivially simple (haiku) or requires deep reasoning (opus).
addBlockedByAdd ONLY when:
Do NOT add when:
Split when: