Skip to content

sdd-triage over-decomposes: per-task PR overhead exceeds the work delivered #252

@norrietaylor

Description

@norrietaylor

Problem

sdd-triage decomposes a feature tracking issue into task sub-issues at the granularity of a single function or component. Each task becomes one dispatched sdd-execute run, one PR, one CI cycle, one sdd-validate pass, one sdd-review pass, and one merge decision. When the resulting change is 40–90 lines across 2–4 files, the fixed per-task pipeline cost dwarfs the implementation.

Evidence

A representative feature was split into 6 tasks. Three of the resulting implementation PRs:

PR diff Files What it did
+98 / -0 2 add one helper function + its unit test
+97 / -0 4 add one component + one helper + i18n keys + test
+70 / -7 3 wire the above into one tab

These three are a single cohesive change (~265 lines) split across three task issues, three agent runs, three PRs, three CI cycles, three reviews, three merges. The triage pass that produced the split consumed ~25M tokens; each sdd-execute run adds ~1M+ on top.

Root cause

The decomposition rule optimizes for task isolation — one file / one requirement per task, clean depends on edges — with no lower bound on task size and no accounting for the fixed per-PR cost. A requirement that maps to a 40-line diff still earns its own task, PR, and full validate/review/merge cycle.

Cost shape

Per task, incurred regardless of diff size:

  • 1 dispatched sdd-execute run (agent tokens + CI minutes)
  • 1 PR open + CI pipeline
  • 1 sdd-validate pass
  • 1 sdd-review pass (+ up to SDD_MAX_REVIEW_ITERATIONS revise cycles)
  • 1 merge (human or auto)

For a sub-100-line PR this is mostly overhead. The ratio of pipeline cost to delivered diff is the metric to drive down.

Proposed direction

Give triage a task-sizing target and let it bundle sub-threshold work:

  • Add a minimum-task-size / "merge small siblings" rule: tasks under a diff or file-count threshold that share a file set or a dependency chain collapse into one task.
  • Decompose by cohesive unit of review — a slice a human would review in one sitting — rather than one task per function or file.
  • Expose a triage granularity knob (e.g. SDD_TRIAGE_MIN_TASK) so an operator can tune decomposition per repo.
  • Route features whose entire scope is small down a single-PR fastpath instead of a spec → triage → N-task fan-out.

Acceptance

  • A feature whose total scope is ~250 lines across a handful of files produces 1–2 tasks, not 6.
  • The sizing rule is documented in sdd-triage and its threshold is configurable.
  • No regression in dependency correctness: bundled tasks still respect blocked by ordering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions