Agent skill
build-task-graph
Build task dependency graph YAML from interface and pseudocode
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/build-task-graph
SKILL.md
Build Task Graph
Create the task dependency graph from interface and pseudocode documents.
When Invoked
After rough-draft-skeleton completes, before rough-draft-handoff.
Process
Step 1: Read Interface and Pseudocode Documents
Read all interface-item-N.md and pseudocode-item-N.md documents:
Tool: mcp__plugin_mermaid-collab_mermaid__list_documents
Args: { "project": "<cwd>", "session": "<session>" }
Filter for interface-* and pseudocode-* documents and read each.
Step 2: Extract File Changes
For each item's interface document:
- Find "File Structure" section
- Extract all file paths (new and modified)
- Note which files depend on others (imports, references)
Step 3: Build Task List
For each file:
- Create task ID from file path (e.g., src/auth/service.ts → auth-service)
- Set files array
- Generate test file paths:
- {dir}/{name}.test{ext}
- {dir}/tests/{name}.test{ext}
- Extract description from interface doc
- Analyze dependencies:
- If file imports from another file, add dependency
- If pseudocode mentions "after X", add dependency
Step 4: Identify Parallel Tasks
Mark tasks as parallel: true if:
- No dependencies
- Or all dependencies are from previous waves
Step 5: Calculate Execution Waves
Group tasks by wave:
- Wave 1: Tasks with no dependencies
- Wave N: Tasks depending only on waves 1 to N-1
Step 6: Check File Conflicts
Identify tasks that modify the same file:
- Warn about conflicts
- Suggest ordering to avoid merge issues
Step 7: Create task-graph.md
Tool: mcp__plugin_mermaid-collab_mermaid__create_document
Args: {
"project": "<cwd>",
"session": "<session>",
"name": "task-graph",
"content": "<task graph content>"
}
Output Format
# Task Dependency Graph
## YAML Task Graph
```yaml
tasks:
- id: task-id
files: [path/to/file.ts]
tests: [path/to/file.test.ts]
description: What this task implements
parallel: true
depends-on: [other-task-id]
Execution Waves
Wave 1 (no dependencies):
- task-1
- task-2
Wave 2 (depends on Wave 1):
- task-3
File Conflict Analysis
[Note any files modified by multiple tasks]
Summary
- Total tasks: N
- Total waves: M
- Max parallelism: P
## Completion
At the end of this skill's work, call complete_skill:
Tool: mcp__plugin_mermaid-collab_mermaid__complete_skill Args: { "project": "", "session": "", "skill": "build-task-graph" }
**Handle response:**
- If `action == "clear"`: Invoke skill: collab-clear
- If `next_skill` is not null: Invoke that skill
- If `next_skill` is null: Workflow complete
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?