Summary
iterate run and iterate watch are currently stubs. This issue tracks their full implementation.
What’s needed
iterate run
- Load goals from
~/.sh1pt/iterate-goals.json
- Determine metric signals from
--scope (copy | pricing | onboarding | perf | bugs | all)
- Capture/compare a
MetricSnapshot stored in ~/.sh1pt/iterate-metrics.json
- Build a structured agent prompt from goals + signals + scope
- Invoke the configured agent (
claude, codex, or qwen) via CLI with --print
- Save a
RunRecord (id, timestamps, agent, scope, goals, status, diff) to ~/.sh1pt/iterate-runs.json (capped at 100 entries, atomic writes)
--dry-run flag shows plan + prompt without invoking agent
--auto-apply skips confirmation prompt
--json emits machine-readable run record
iterate watch
- Save/load
WatchConfig to ~/.sh1pt/iterate-watch.json (atomic writes)
--status shows current config
--stop removes the config file
--cloud prints deployment instructions for sh1pt cloud
- Local mode prints a ready-made crontab line using
--interval and --agent
--quiet-hours <start-end> (e.g. 22-08) skips cycles during off-hours
Persistence pattern
All files use atomic write (write .tmp → rename) with mode: 0o600, same as existing goals implementation.
Acceptance criteria
Summary
iterate runanditerate watchare currently stubs. This issue tracks their full implementation.What’s needed
iterate run~/.sh1pt/iterate-goals.json--scope(copy | pricing | onboarding | perf | bugs | all)MetricSnapshotstored in~/.sh1pt/iterate-metrics.jsonclaude,codex, orqwen) via CLI with--printRunRecord(id, timestamps, agent, scope, goals, status, diff) to~/.sh1pt/iterate-runs.json(capped at 100 entries, atomic writes)--dry-runflag shows plan + prompt without invoking agent--auto-applyskips confirmation prompt--jsonemits machine-readable run recorditerate watchWatchConfigto~/.sh1pt/iterate-watch.json(atomic writes)--statusshows current config--stopremoves the config file--cloudprints deployment instructions for sh1pt cloud--intervaland--agent--quiet-hours <start-end>(e.g.22-08) skips cycles during off-hoursPersistence pattern
All files use atomic write (write
.tmp→ rename) withmode: 0o600, same as existinggoalsimplementation.Acceptance criteria
sh1pt iterate run --dry-runshows plan + prompt, saves skipped RunRecordsh1pt iterate run --agent claudeinvokesclaude --print <prompt>, saves applied RunRecordsh1pt iterate run --auto-applyskips confirmationsh1pt iterate run --jsonemits JSON run recordsh1pt iterate watchsaves WatchConfig, prints crontab linesh1pt iterate watch --cloudprints cloud deployment infosh1pt iterate watch --stopclears configsh1pt iterate watch --statusshows current config + quiet-hours state