Loop Primitives Reference

July 27, 2026 ยท View on GitHub

Use this after loop-discovery.md proves a loop candidate but the durable building blocks are still unclear. Keep the decision owner-focused: primitives are ingredients, not answers by themselves.

Primitive Map

PrimitiveUse whenBetter Harness owner
AutomationThe trigger is scheduled or event-like and each run can start from stable inputautomation-readiness.md, then host automation
WorktreeMore than one agent or run may write files, or background work must not touch active local editsGit/worktree policy plus selected loop owner
SkillThe durable asset is procedural knowledge, examples, references, scripts, or validation steps../agent-customize/skill-discovery.md
Plugin / ConnectorThe loop must be installed across repos or access external systemsPlugin packaging or MCP-backed access after an owner exists
SubagentIndependent exploration, maker/checker review, or parallel evidence collection is valuableCustom Agent/Subagent route
StateThe loop spans turns, days, runs, worktrees, or external systemsloop-state-ledger.md

Selection Rules

  • Prefer one primary owner and only the primitives needed to make it reliable.
  • Use automation for the heartbeat, not for broad judgment.
  • Use worktrees when file isolation is the main risk; do not use them as a substitute for review.
  • Use Skills for reusable procedure; do not use them as runtime memory, scheduling, approval, or tracing infrastructure.
  • Use plugins only after the canonical Skill, hook, script, agent, or reference is stable enough to distribute.
  • Use MCP/connectors as access layers. The workflow owner still needs trigger, input, validation, stop, and safety contracts.
  • Use subagents when the split improves evidence quality, not merely to make a task sound more autonomous.
  • Use state ledgers when the next run must know what already happened.

Output Addendum

When Loop Discovery needs primitive detail, add this compact line to the result:

Primitives: primary=<owner>; support=<automation|worktree|skill|plugin|connector|subagent|state>; why=<one sentence>

If no primitive is needed beyond the selected owner, say so explicitly.