harrisonhjohnson/productagent · /harnesses/loops/ops/night/agents/claude.sh
000%

claude.sh

view on github ↗24 lines · bash
#!/bin/bash
# Agent adapter: Claude Code. Sourced by run-night.sh after run_with_timeout is defined.
# Contract (same for every adapter):
#   agent_canary <outfile>                       -> outfile contains READY on success
#   agent_run    <outfile> <promptfile> <model> <effort> <timeout_secs>
#                                                -> outfile is JSON {result, total_cost_usd, ...}
CLAUDE_BIN="${CLAUDE_BIN:-$(command -v claude || echo "$HOME/.local/bin/claude")}"

agent_canary() {
  run_with_timeout 180 "$1" "$CLAUDE_BIN" -p 'Reply with exactly: READY' \
    --model "$MODEL" --effort low --setting-sources project \
    --strict-mcp-config --mcp-config "$OPS/night-mcp.json" </dev/null
}

agent_run() { # outfile promptfile model effort timeout
  run_with_timeout "$5" "$1" \
    "$CLAUDE_BIN" -p "$(cat "$2")" \
      --model "$3" --effort "$4" \
      --output-format json \
      --setting-sources project \
      --strict-mcp-config --mcp-config "$OPS/night-mcp.json" </dev/null
}

agent_relogin_hint() { echo "Run 'claude' interactively to re-login."; }
flow-designflow-designwhat this folder doesA progressive design interview: one question per screen, ending in a clickable HTML prototype of a linear user journey (onboarding, checkout, wizard).global
SKILL.md74 lines
loopsloopswhat this folder doesGive an agent a goal, a budget, a cadence and a model. It works one bounded run at a time while you sleep, inside a fence, and hands you four plain sentences in the morning.system
ops03 items
night06 items
agents02 items
claude.sh24 lines
codex.sh79 lines
night-mcp.json1 lines
night-prompt.md44 lines
plan.py464 lines
quota.py215 lines
run-night.sh323 lines
README.md178 lines
init.sh171 lines
install.sh144 lines
loops-spec.md244 lines
MACHINE.md161 lines
settings.json116 lines
prototype-swarmprototype-swarmwhat this folder doesCrawls a multi-screen HTML prototype for undefined click destinations and spawns one generator agent per missing screen, with a handoff packet written by the source screen, until the click graph is covered.global
SKILL.md162 lines
self-maintenanceself-maintenancewhat this folder doesThe one way an unattended run may touch its own loop registry, and the one place a "need from you" becomes a decision you settle with a single command instead of a paste.system
README.md126 lines
loopctl.py599 lines
loops_registry.py122 lines
pm-strategistpm-strategistwhat this folder doesA product and strategy advisor agent that blends three lenses (build taste, business structure, PM execution) and pressure-tests ideas instead of cheerleading.global
pm-strategist.md51 lines
todotodowhat this folder doesA TODO list for PMs in one markdown file, reachable from Claude Code and from Telegram: capture, see what's due, triage, and hand items to an agent that asks before it acts.system
README.md59 lines
README.md68 lines