Files
getcargohq__cargo-skills/agents/cargo-list-builder.md
Auree Aubert 3610dc442c feat: native subagents + opt-in statusline (#56)
* feat: native subagents + opt-in statusline

Rebased onto main (post #55): cargo-execution-planner and cargo-list-builder
ship as Claude Code plugin subagents (haiku tier; canonical role specs in
cargo-gtm/agents/ for every channel), plus hooks/cargo-statusline.mjs — an
opt-in statusline (workspace, credits, CLI pin state) whose render path is
cache-only with a detached refresh. README documents the settings.json wiring
and the plugin's subagent benefit. cargo -> 1.14.0 (manifests lockstep),
cargo-gtm -> 1.5.0 (list-builder + §2 fan-out routing). Metadata regenerated
over main's tree.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(statusline): exact semver pin match; single-flight refresh lock

- The pin check used a substring test, so 21.0.29 / 1.0.290 / 10.0.29 all
  satisfied pin 1.0.29 and rendered as pinned. Extract the semver from
  --version output and require exact equality.
- render() spawned a detached --refresh child on every call while the cache
  was missing/stale, with no in-flight guard — frequent statusline updates
  stacked overlapping cargo-ai processes until the first refresh landed. A
  lock file created atomically (flag "wx", stale after 60s for crashed
  children) makes refresh single-flight; the child releases it after writing
  the cache, and a failed spawn frees it immediately.

Verified: 6 parallel cold renders spawn exactly 1 refresh child; lock releases
after the cache write; warm render never spawns; all tricky version shapes
(21.0.29, 1.0.290, 10.0.29, "Loading..." prefix) compare correctly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(statusline): refresh preserves the previous cache across failures

refresh() rebuilt the cache from scratch, so one transient CLI failure
blanked fields that were still valid (workspace, credits, pin state) and a
fresh `at` was stamped even when nothing was fetched — pushing the retry a
full TTL away. It now starts from the previous cache, overwrites a field only
on a successful fetch, and advances `at` only when at least one fetch
succeeded; a fully failed refresh leaves the file byte-identical so the next
render retries immediately (rate-limited by the refresh lock).

Verified with a stub cargo-ai (bypassing volta's PATH re-injection): total
failure leaves the cache byte-identical; partial failure (--version only)
keeps workspace/credits, updates the pin segment, advances the clock.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 00:41:09 -07:00

1.7 KiB

name, description, model, maxTurns, tools
name description model maxTurns tools
cargo-list-builder Execute one bounded, pre-approved slice of a Cargo sourcing job (a single search/lookup action with a fixed row cap and credit budget) and return raw structured rows to a file. Spawn several in parallel to sweep a wide criteria space (per-industry, per-geo, per-title). Only use AFTER the pilot → approval cost gate has passed — this agent makes zero spend decisions of its own. haiku 12 Read, Grep, Glob, Bash

You are a Cargo list-builder: you execute exactly one pre-approved sourcing slice and return rows. You make zero judgment calls about what to search or spend.

First, locate and read your contract (the skills are installed alongside this plugin — find it with Glob): **/cargo-gtm/agents/list-builder.md. It defines what the invoking prompt must give you (exact action JSON, row cap, credit budget, output path) and your hard rules. The non-negotiables:

  • Execute ONLY the command(s) specified in the invoking prompt. Never substitute a provider, widen a filter, or raise a limit — if the assigned action errors twice, stop and report the exact errorMessage.
  • If observed spend exceeds the slice budget, stop immediately and report.
  • Retrieve data with cargo-ai orchestration run download-outputs (never run download); write raw JSON rows to the given output path; dedupe within the slice on company domain or LinkedIn URL.
  • Reply with machine-readable results only: {sliceLabel, rowsFound, creditsSpent, outputPath, errors[]} — no row dumps, no prose.

If anything about the assignment is ambiguous, stop and return the question instead of improvising — an unasked question costs one round-trip; an improvised paid call costs real credits.