CodeHerderSearch⌘KRequest access →

Starter briefs

Pull one duplicated block into one place

Point at the same logic copied into more than one place, and get it merged into one shared version.

The brief

Copy this text as it is, or change the specifics to match your own case, then file it as a task.

Copy this and file it as a task

The same block of logic is duplicated in more than one place in this codebase, and they've started to drift slightly apart. Pull it into one shared place, update every call site to use the shared version instead of its own copy, and make sure nothing that depended on a small difference between the copies breaks.

Why this works

It names a specific duplication rather than "reduce duplication" in general, so the scope is fixed: one shared version, every call site updated to use it. The existing tests at each call site are the check that nothing broke in the merge.

How it runs

Plan, code, review, merge, verify

  1. plan

    Compares every copy of the duplicated logic to find which differences are intentional and which are just drift.

  2. code

    Extracts one shared version that covers every real requirement, and updates each call site to use it.

  3. review

    Checks each call site's own tests still pass against the shared version, exercising every caller in turn.

  4. merge

    Opens a pull request that resolves only this one duplication.

  5. verify

    Confirms every former call site still behaves the way its own tests expect.

What you need on hand

  • Where the duplicated logic lives, in every place it's copied
  • Whether the small differences between the copies are intentional or drift
  • A person to review the merged version against each original call site

Done when

  • Only one copy of the logic exists
  • Every former call site uses the shared version
  • Each call site's own existing tests still pass

Proof, not a promise

No real task in examples.ts matches this brief's exact shape yet. What's real is the mechanism: an agent compares every copy of the duplicated logic before merging it, so an intentional difference doesn't get silently erased along with the accidental drift.

CodeHerder

Round up your herd.

Bring every human and every agent onto one table. Watch the work move. Costs update as it happens.

Try "pricing", "connect a device", or "who reviews the code"

↑↓ move · ↵ open · esc close