spec-kitty

How to Handle Work Package Dependencies

Use dependencies to tell Spec Kitty which work packages (WPs) must land before another WP can safely build on them. Dependencies drive the --base workflow 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, implement it with a base WP so your workspace branches from the correct upstream:

spec-kitty implement WP02 --base WP01

This creates the WP02 workspace with WP01’s changes already present.

Multiple Dependencies

Git can only branch from one base commit, so you choose the primary dependency and merge the others manually:

spec-kitty implement WP04 --base WP03
cd .worktrees/###-feature-WP04

# Merge the other dependency manually
git merge ###-feature-WP02

With jujutsu (jj): Multiple dependencies are handled automatically via auto-rebase. No manual merge is needed. See Jujutsu for Multi-Agent Development.

Keeping Dependencies Updated

When a dependency changes after you’ve started work, use spec-kitty sync to update your workspace:

cd .worktrees/###-feature-WP02
spec-kitty sync

With jj, sync always succeeds (conflicts are non-blocking). With git, you may need to resolve conflicts. See Sync Workspaces.

What --base Does

Handling Rebase When Parent Changes

If the parent WP changes after your dependent WP is in progress, rebase the child workspace:

cd .worktrees/###-feature-WP02

git rebase ###-feature-WP01

Repeat for each dependent WP that needs the updated base.

Common Dependency Patterns

Linear Chain

WP01 -> WP02 -> WP03 -> WP04

Fan-Out

        WP01
      /  |  \
   WP02 WP03 WP04

Diamond

      WP01
     /    \
  WP02   WP03
     \    /
      WP04

Common Errors and Fixes

Error:

WP02 has dependencies. Use: spec-kitty implement WP02 --base WP01

Fix: Re-run with the suggested --base flag.

Tips


Command Reference

See Also

Background

Getting Started