LoopFlow
Tutorial Workshop Keywords ๐ŸŽฎ LoopFlow Lab
Keywords / target

target

Where the runner operates. Ops & reuse

Syntax

target: <dir>

What it does

target: names the working directory the runner operates in โ€” the root it plans, edits, and runs its done when command from. It's a config-tier line: it sits at the top of the file, before any loop or pipeline, and applies to every definition below it.

Why reach for it? Most of the time you run a .loop from the repo root and the target is implicit. You set target: when the loop shouldn't operate on the whole checkout โ€” a monorepo where the work lives in one package, a scheduled or unattended run that has no interactive cwd to inherit, or a method (like BMAD) whose stages should scope to a subtree instead of the entire tree. Pointing the runner at the smallest directory that still contains the work keeps its context tight and stops it from wandering into unrelated code.

target: is about where the runner stands, which is coarse; look at: is about which files it reads, which is fine-grained. They compose: target picks the subtree, look at: narrows the agent's attention within it. Quote paths exactly โ€” a relative path resolves against the loop file's own location.

Example

use the BMAD method
target: ./src
scope a method to a subtree

Example โ€” target with a schedule

schedule: every weekday at 7am
runner: claude code
target: ./services/billing

loop "keep billing deps current":
  goal: no known-vulnerable dependencies in the billing service
  done when "pnpm audit --audit-level=high" finds nothing
  after 4 tries: stop and warn "needs a human"
an unattended run scoped to one service

Common mistakes

Related