How to handle work package dependencies
Who is this for (1)
- Stakeholder Persona: Project Owner — Written for the Project Owner reader.
Use dependencies to tell Spec Kitty which work packages (WPs) must land before another WP can safely build on them. Dependencies drive lane computation and keep parallel work predictable.
Understanding Dependencies
Dependencies are defined in each WP’s frontmatter and describe upstream work that must exist for the current WP to compile, test, or merge.
---work_package_id: "WP02"title: "Build API"dependencies: ["WP01"]---Declaring Dependencies
Declare dependencies as a YAML list in the WP frontmatter:
dependencies: ["WP01"]For multiple dependencies:
dependencies: ["WP01", "WP03"]Implementing with Dependencies
When a WP has dependencies, task finalization places it in the correct execution lane:
spec-kitty agent action implement WP02 --agent <name>This resolves the correct lane workspace for WP02 with WP01’s changes already present.
Multiple Dependencies
Task finalization folds multi-dependency work into a lane plan before implementation starts. Agents do not choose a primary dependency or manually merge sibling lane outputs to reconstruct the plan.
Keeping Dependencies Updated
When a dependency changes after you’ve started work, re-run the implement command for your work package. It is the lane’s sync point: it brings your workspace up to date with the work it depends on.
spec-kitty agent action implement <WP> --mission <mission>You may need to resolve conflicts while it updates. spec-kitty consolidate also rebases a stale lane before it lands the Mission.
What Dependencies Do
- Influence lane computation during
finalize_tasks - Force dependent work into the same lane or into lanes with explicit ordering
- Ensure
spec-kitty agent action implement WP## --agent <name>resolves the correct workspace without manual branch selection
Handling Rebase When Parent Changes
If the parent WP changes after your dependent WP is in progress, rebase the child workspace:
cd <workspace path printed by spec-kitty implement>
git rebase <base branch printed by spec-kitty>Repeat for each dependent WP that needs the updated base.
Common Dependency Patterns
Linear Chain
WP01 -> WP02 -> WP03 -> WP04Fan-Out
WP01 / | \ WP02 WP03 WP04Diamond
WP01 / \ WP02 WP03 \ / WP04Common Errors and Fixes
Error:
WP02 has dependencies. Use: spec-kitty agent action implement WP02 --agent <name>Fix: Re-run task finalization so the dependency graph is reflected in lanes.json.
Tips
- Keep dependencies minimal to maximize parallelism.
- Choose the most foundational WP as the base when there are multiple dependencies.
- Use the workflow commands to keep lane changes and status views accurate.
Command Reference
- CLI Commands -
spec-kitty implementreference - Agent Subcommands - Workflow commands
See Also
- Implement a work package - Implementing inside the computed lane workspace
- Parallel Development - Running multiple agents
- Generate Tasks - Where dependencies are declared
Background
- Execution Lanes - Why dependencies matter
- Git Worktrees - Branching mechanics
- Kanban Workflow - Lane transitions
Getting Started
- Multi-Agent Workflow - Parallel development tutorial