Commit graph

266 commits

Author SHA1 Message Date
B
6b5a547e2d fix: Treat 429 (cycle already running) as success in workflows
When MAX_CONCURRENT=1 and a cycle is in progress, the trigger server
returns 429. This is expected behavior, not an error — the previous
curl -f treated it as failure (exit code 22).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 03:43:32 +00:00
A
5db68ea8d8
refactor: Extract helpers from long cloud provider functions (#112)
- runpod: Extract wait_for_pod_ready() from create_server() (96 -> 44 lines)
- latitude: Extract extract_latitude_server_ip() from wait_for_server_ready() (72 -> 38 lines)
- kamatera: Extract parse_command_ids() and get_kamatera_server_ip() from create_server() (164 -> 77 lines)
- kamatera: Deduplicate command ID parsing between create_server and destroy_server

Agent: complexity-hunter

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-09 19:25:53 -08:00
A
e2d71807b6
test: Add 41 tests for CLI flag extraction pipeline (#111)
Tests the extractFlagValue generic function and the full CLI flag
extraction pipeline (--prompt/-p and --prompt-file). Existing tests
in index-parsing.test.ts and index-edge-cases.test.ts use simplified
re-implementations; these tests cover the exact behavior including
error messages, process.exit on missing values, startsWith("-") guard,
sequential two-pass extraction, and edge cases with flag-like values.

Agent: test-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 19:25:18 -08:00
A
bd9d8a2acd
fix: Show identifier keys in agents/clouds output and fix prompt flag conflict (#110)
- `spawn agents` now shows the key users need to type (e.g., `claude`)
  alongside the display name and cloud count
- `spawn clouds` now shows the key (e.g., `sprite`) alongside the display
  name and description
- Both commands show a usage hint at the bottom
- Error when both --prompt and --prompt-file are provided (was silently
  overwriting)
- Remove duplicate agent validation in handleDefaultCommand (was loading
  manifest twice without spinner, showing different error format)

Agent: ux-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 19:24:58 -08:00
A
1511b8617f
fix: Add time budget and periodic issue re-scan to refactor service (#109)
- Add 15-minute hard deadline with escalation at 10/12/15 min marks
- Limit each agent to ONE PR (prevents runaway micro-refactors)
- Add periodic issue re-scan every 5 minutes + mandatory final sweep
- Update shutdown checklist to verify per-issue comment coverage

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 11:20:06 -08:00
A
a24dc101e3
fix: Eliminate heredoc injection, eval, and API key exposure (#108)
- Replace unquoted heredocs with printf + json_escape for all JSON
  config files containing credentials (8 cloud providers + shared lib)
- Replace eval with printf -v for safe indirect variable assignment
- Move RunPod API key from URL query param to api-key header

Fixes #104, Fixes #105, Fixes #106

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 11:19:34 -08:00
A
c0a840ec3a
fix: Replace Unicode characters with ASCII for terminal compatibility (#107)
Terminals without UTF-8 support display garbled characters (e.g., "â"
instead of bullets). Replace all Unicode symbols (bullets, em dashes,
arrows, check marks, box drawing) with ASCII equivalents.

Fixes #99

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 11:19:23 -08:00
A
27973bfb28
refactor: Reduce complexity across CLI and cloud provider libs (#103)
* refactor: Extract duplicated prompt flag parsing into extractFlagValue helper

The --prompt and --prompt-file argument extraction in main() shared identical
patterns for flag detection, value validation, and args splicing. Extracted
into a reusable extractFlagValue() function that handles all three concerns.

Agent: complexity-hunter

* refactor: Consolidate multiple python3 JSON reads into single calls

OVH, Kamatera, and UpCloud each spawned separate python3 processes to
read different fields from the same JSON config file. Consolidate into
a single python3 call per file, printing all fields at once and reading
them with bash read. Also fixes OVH using string interpolation for the
file path instead of the safer sys.argv[1] pattern.

Agent: complexity-hunter

* refactor: Extract flyctl auth and token validation from ensure_fly_token

Split the 75-line ensure_fly_token into focused helpers:
- _try_flyctl_auth: encapsulates flyctl CLI token retrieval
- _validate_fly_token: encapsulates API validation with error reporting

The main function is now a clear sequential flow of token source attempts.

Agent: complexity-hunter

* refactor: Deduplicate retry backoff logic in kamatera_api

The two error branches (network error and HTTP 429/503) had identical
interval update and attempt increment code. Restructure with early
return for success, then unified backoff at the end of the loop.

Agent: complexity-hunter

* refactor: Remove unnecessary async IIFE wrapper in validateAndGetAgent

The function wrapped its body in `return (async () => { ... })()` when
it can simply be declared as `async function` directly.

Agent: complexity-hunter

---------

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
2026-02-09 10:26:03 -08:00
A
b0f924b511
fix: Prevent Python/shell injection via env vars and triple-quote strings (#102)
- Fix triple-quote injection in SSH keys (Scaleway, UpCloud), userdata
  (BinaryLane), init scripts (Civo, Kamatera), and GraphQL queries
  (RunPod) by passing data via stdin/json_escape instead of inline
  string interpolation
- Add input validation for all cloud provider env vars (region, type,
  plan, etc.) using validate_region_name/validate_resource_name to block
  shell metacharacters before they reach Python string interpolation
- Validate Modal image name as Python identifier to prevent code injection
- Validate numeric env vars (RAM, GPU count, disk size) across all providers

Affects: 19 cloud provider lib/common.sh files
Agent: security-auditor

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 10:22:39 -08:00
A
608f9d40ba
test: Add 77 tests covering argument parsing, manifest, and security encoding edge cases (#101)
Three new test files target gaps in existing coverage:
- index-edge-cases: tests startsWith("-") guard for --prompt/-p values, --prompt-file
  validation, combined flag extraction order, and agent list truncation logic
- manifest-helpers: tests isValidManifest with unusual data shapes (arrays, strings,
  numbers), corrupted cache handling, and countImplemented case sensitivity
- security-encoding: tests unicode homoglyphs, null bytes, CRLF line endings, BOM
  markers, and control character handling in identifier/script/prompt validation

Agent: test-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 10:20:57 -08:00
A
8a4740a699
fix: Improve error messages with actionable guidance (#100)
- validateImplementation: Show which clouds ARE available when a
  combination isn't implemented, instead of a dead-end error
- Interactive mode: Add guidance when no clouds available for agent
- handleError: Add 'spawn help' hint to generic error handler
- handleDefaultCommand: Show agent keys alongside names so users
  know what to type (e.g., "claude" not just "Claude Code")

Agent: ux-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 10:17:56 -08:00
B
34f992630f docs: Update CLAUDE.md to say AI agents, not coding agents
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 18:04:09 +00:00
A
3167915118
docs: Update README matrix for OVHcloud, Kamatera, and Kilo Code (#98)
Matrix now shows 14 agents x 21 clouds (264 implemented, 30 missing).
Added OVHcloud and Kamatera cloud columns, Kilo Code agent row.

Agent: team-lead

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 09:49:28 -08:00
A
76f16370a8
feat: Add Kilo Code agent to spawn matrix (#97)
Kilo Code (15K+ GitHub stars, 98 HN points) is an all-in-one agentic
engineering platform with native OpenRouter support. Adds agent entry,
sprite implementation, and missing matrix entries for all 21 clouds.

Agent: team-lead

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 09:47:21 -08:00
A
c7db033796
feat: Add Kamatera cloud provider with all 13 agents (#96)
Adds Kamatera (25+ global datacenters, REST API, hourly billing) as
a new cloud provider. Implements all 13 agent scripts with full
lifecycle: create, wait, destroy, SSH, upload.

Agent: team-lead

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 09:44:16 -08:00
A
a49c0874a9
feat: Add OVHcloud provider with 3 agents (#93)
Add OVHcloud Public Cloud as a new cloud provider with signature-based
API authentication (Application Key + Secret + Consumer Key).

Implements:
- ovh/lib/common.sh with OVH API wrapper, instance lifecycle, SSH key management
- ovh/claude.sh, ovh/aider.sh, ovh/codex.sh agent scripts
- manifest.json entries for all 13 agents (3 implemented, 10 missing)
- ovh/README.md with setup instructions

OVH defaults: d2-2 flavor, GRA7 region, Ubuntu 24.04

Agent: cloud-scout

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 09:40:28 -08:00
A
ebb4c08306
fix: Remove printf %q escaping in run_sprite that broke command parsing (#92)
printf %q escapes spaces and shell metacharacters, turning "claude install"
into "claude\ install" — which bash -c interprets as a single command named
"claude install" (with literal space). This broke all multi-word commands
passed to run_sprite, including pipes, redirects, and && chains.

Since all callers pass trusted, hardcoded command strings (not user input),
the command string should be passed directly to bash -c for normal shell
parsing.

Fixes #88

Agent: team-lead

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 09:36:56 -08:00
A
8876175fcf
fix: Use curl installer for Claude Code on Sprite (#88) (#91)
The sprite/claude.sh script was using 'claude install' which requires
claude to already be on PATH. Changed to use the curl installer which
downloads and installs the binary from scratch.

Fixes #88

Agent: issue-responder

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 09:35:38 -08:00
A
2915d7bca6
fix: Improve CLI error handling, fix bash compat, and update cloud READMEs (#90)
- Show clear error when --prompt/-p or --prompt-file is used without a
  value (previously silently ignored)
- Fix --prompt-file splice index bug when used after --prompt
- Replace echo -e with printf in fly/lib/common.sh for macOS bash 3.x
  compatibility
- Fix incorrect env var name in README (DIGITALOCEAN_TOKEN -> DO_API_TOKEN)
- Add missing agent entries (gptme, OpenCode, Plandex) to 11 cloud READMEs
- Add all 13 agents to Civo README (previously only had 3)

Agent: ux-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 09:33:57 -08:00
A
66701d3cf9
refactor: Deduplicate API retry logic in UpCloud and Scaleway wrappers (#89)
Add generic_cloud_api_custom_auth() to shared/common.sh for cloud
providers that use non-Bearer auth headers. Replace ~120 lines of
duplicated retry logic in upcloud_api() and scaleway_api() with
calls to the new shared function.

Agent: complexity-hunter

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 09:33:51 -08:00
A
531a817bfe
test: Add 70 new tests for CLI parsing, manifest validation, and security edge cases (#87)
Adds three new test files covering previously untested areas:
- index-parsing.test.ts: CLI argument parsing (--prompt, -p, --prompt-file extraction, command routing, error handling)
- manifest-validation.test.ts: Manifest validation edge cases (invalid shapes, HTTP errors, countImplemented with mixed statuses, key ordering)
- security-edge-cases.test.ts: Security boundary conditions (identifier length limits, shell metacharacters, script shebang variations, prompt length boundaries)

Test count: 155 -> 225 passing (70 new tests)

Agent: test-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 09:31:41 -08:00
B
3c0c9530ca docs: Update README tagline to cover all AI agents, not just coding
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 17:28:10 +00:00
A
ab343d26a2
fix: Prevent duplicate work, add graceful shutdown, and enforce team lifecycle (#86)
- Change trigger-server MAX_CONCURRENT default from 3 to 1 to prevent
  overlapping cycles that duplicate GitHub issue comments
- Add SIGTERM/SIGINT handling to trigger-server so running scripts finish
  gracefully on service restart instead of being killed mid-flight
- Add cleanup trap to refactor.sh for worktree/tempfile cleanup on exit
- Add pre-cycle cleanup of stale worktrees, merged branches, and
  abandoned PRs from previously interrupted cycles
- Add mandatory Lifecycle Management section to team lead prompt requiring
  shutdown_request to all teammates before exiting
- Add dedup checks to community-coordinator: check existing comments
  before posting to prevent duplicate acknowledgments/resolutions
- Pass issue number in workflow trigger reason for better logging

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 09:10:56 -08:00
A
89ed02fe55
feat: Add Latitude.sh cloud provider with all 13 agents (#85)
Add Latitude.sh as the 19th cloud provider in the spawn matrix.
Latitude.sh offers bare metal servers and VMs via REST API with
hourly billing, global locations, and plans starting at $0.07/hr.

New files:
- latitude/lib/common.sh: Provider functions (API wrapper, server
  creation/deletion, SSH key management, wait-for-ready)
- latitude/{agent}.sh: All 13 agent deployment scripts
- latitude/README.md: Usage docs with env vars and pricing

Updated:
- manifest.json: Added latitude cloud + 13 matrix entries
- README.md: Updated matrix table (19 clouds, 247 combinations)

Agent: cloud-scout

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 08:33:47 -08:00
A
95a629ef36
refactor: Deduplicate Vultr and Linode token management using shared helper (#84)
Replace hand-rolled ensure_vultr_token() and ensure_linode_token() with
calls to ensure_api_token_with_provider(), matching the pattern already
used by Hetzner, DigitalOcean, Lambda, E2B, and Scaleway.

Extracts test_vultr_token() and test_linode_token() validation functions
to preserve provider-specific error messages and remediation guidance.

Removes ~70 lines of duplicated env-check/config-file/prompt/save logic.

Agent: complexity-hunter

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 08:32:52 -08:00
A
fa39d9cbd6
test: Add comprehensive tests for untested command helper functions (#83)
- Adds 30 new test cases covering previously untested functions in commands.ts
- Tests for getStatusDescription, renderMatrix helpers, validation logic
- Tests for error handling functions and download fallback logic
- Tests for agent/cloud validation and implementation checking
- Tests for calculateColumnWidth variations with different parameters
- Tests for isLocalSpawnCheckout file detection logic

This improves test coverage for core command logic that wasn't previously tested,
focusing on pure functions and logic that can be tested without full module mocking.

Agent: test-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-09 08:25:59 -08:00
A
bcceb700e1
fix: Improve sprite version display when version is unknown (#81)
When sprite version output doesn't match the expected format, the message
now omits the version rather than displaying "unknown". Also broadened the
version regex to match versions without 'v' prefix.

Fixes #79

Agent: ux-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-09 08:14:08 -08:00
A
21ada0dfba
fix: Remove redirect from claude install command to fix Termux error (#82)
The redirect `> /dev/null 2>&1` was being escaped by `run_sprite`'s
`printf %q`, causing the command to be interpreted incorrectly:
  /usr/bin/bash: line 1: claude install > /dev/null 2>&1: No such file or directory

Removing the redirect allows users to see installation progress and
simplifies the command. Installation success is already verified by
the subsequent check on line 33.

Fixes #80

Agent: ux-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-09 08:14:03 -08:00
B
5460cd6e1d fix: Resolve REPO_ROOT in refactor.sh to actual repo root
Same bug as improve.sh — was cd'ing into the skills directory
instead of the repo root.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 16:13:58 +00:00
B
8a7317d749 fix: Resolve REPO_ROOT pointing to skills dir instead of repo root
improve.sh was setting REPO_ROOT to its own directory, causing
manifest.json lookups and git commands to fail silently.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 16:13:21 +00:00
A
b8689fdbec
test: Add unit tests for command helper functions (#77)
- Added 35 tests covering helper functions in commands.ts
- Tests cover error handling, string validation, column width calculation
- Tests verify renderMatrixRow color selection logic
- Tests validate isLocalSpawnCheckout and report functions
- All 35 new tests pass
- Focus on pure functions and functions with minimal side effects

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-09 03:58:37 -08:00
A
6e47cb597f
refactor: Extract generic_cloud_api retry logic into helper functions (#78)
Split the 66-line generic_cloud_api function into focused helpers to reduce
complexity and eliminate duplication:

- _parse_api_response: Extracts HTTP code and response body (10 lines)
- _make_api_request: Builds curl args and executes request (27 lines)
- _handle_api_transient_error: Centralizes retry logic for all error types (24 lines)

Main function reduced from 66 to 41 lines (38% reduction). Behavior unchanged:
still retries on network errors and transient HTTP codes (429, 503), with
exponential backoff. All test assertions pass.

This extraction pattern makes it clearer how retry logic flows and easier to
modify error handling in the future without duplicating patterns.

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-09 03:57:40 -08:00
A
dfaf9370d2
fix: Improve sprite CLI detection on Termux (#76)
Check additional Termux-specific paths when detecting existing sprite
CLI installation, preventing unnecessary reinstalls.

Fixes #75

Agent: community-coordinator

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-09 03:55:46 -08:00
A
b597487ea6
fix: Add casual thanks to community-coordinator issue comments (#74)
Post a short, natural thank-you for flagging the issue before
diving into categorization and investigation.

Agent: team-lead

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 03:45:34 -08:00
A
037c691fb4
fix: Remove canned acknowledgment comment from community-coordinator (#73)
Skip the generic "thanks for reporting" boilerplate and go straight
to categorizing and investigating the issue.

Agent: team-lead

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 03:44:48 -08:00
A
35b4bd5ada
fix: Add port validation and CSRF protection to OAuth server (#72)
SECURITY FIXES:
- Add validate_oauth_port() to prevent command injection via port parameter
  - Ensures port is numeric and in range 1024-65535
  - Prevents JavaScript injection in OAuth server code
- Add CSRF state parameter to OAuth flow
  - Generate random 128-bit state token per session
  - Validate state parameter in callback to prevent OAuth code interception
  - Display error page if state validation fails

IMPACT:
- Prevents CRITICAL command injection vulnerability (CVE-worthy)
- Prevents HIGH OAuth code stealing attacks via CSRF

TESTING:
- All 101 tests pass (bun test)
- Syntax validated (bash -n)
- No regressions introduced

Agent: security-auditor

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-09 03:37:43 -08:00
A
9852ef82f8
feat: Improve error messages and troubleshooting guidance (#71)
Enhance UX across CLI and cloud providers with actionable error messages:

1. Modal sandbox creation failures now provide:
   - Detailed error output from Python SDK
   - Common causes (auth expired, quota issues, network)
   - Step-by-step troubleshooting (re-auth, check quota, status page)

2. Modal CLI installation failures now explain:
   - Missing pip/pip3 (with installation commands)
   - Permission issues (suggest --user flag)
   - Manual installation steps

3. Sprite connectivity failures now include:
   - Commands to check sprite status and logs
   - Steps to recreate sprite
   - Support contact information

4. Sprite CLI installation now:
   - Catches installation failures with helpful error messages
   - Verifies installation succeeded before proceeding
   - Provides manual installation instructions

5. CLI script download failures improved:
   - Distinguish between 404 (doesn't exist) and other errors
   - Provide specific next steps for each scenario
   - Suggest checking matrix for implementation status

All error messages follow the pattern:
- What went wrong
- Why it might have happened (common causes)
- What to do next (actionable steps)

Agent: ux-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-09 03:37:17 -08:00
A
cbcf79d376
refactor: Extract common API retry interval update logic to reduce duplication (#70)
- Add `_update_retry_interval()` helper in shared/common.sh to eliminate
  repeated backoff interval calculation and cap logic (was copied 10+ times
  across cloud provider API wrappers)
- Refactor generic_cloud_api() to use new helper, reducing from 83 to 70 lines
- Refactor scaleway_api() to use new helper, reducing from 66 to 53 lines
- Refactor upcloud_api() to use new helper, reducing from 65 to 52 lines

This reduces cyclomatic complexity by eliminating nested if statements for
interval updates and consolidates the retry backoff logic in one place,
making future maintenance easier and reducing bugs from copy-paste errors.

Agent: complexity-hunter

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-09 03:36:08 -08:00
A
f387428bca
fix: Check sprite version before reinstalling (#69)
- Modified ensure_sprite_installed() to check if sprite is already installed
- When sprite is found, log version and skip installation
- Prevents unnecessary reinstalls when sprite CLI is already present

Fixes #63

Agent: community-coordinator

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-09 03:34:57 -08:00
A
6f5d406861
fix: Use git fetch --prune to clean stale remote-tracking refs (#68)
Stale remote branches were showing up because git fetch doesn't prune
deleted remote refs by default. Add --prune to every git fetch call in
improve.sh (main entry, run_team_cycle, run_single_cycle,
cleanup_between_cycles) and refactor.sh.

Agent: team-lead

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 03:19:04 -08:00
A
782da8945c
feat: Add git worktree and commit marker conventions to SKILL.md (#67)
Document the mandatory git conventions for all agent team scripts:
always pull main before creating worktrees, use worktrees for parallel
branch work, include Agent: trailers in commits, and clean up worktrees
at end of cycle.

Agent: team-lead

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 03:16:12 -08:00
A
a61c378f4c
feat: Add branch-cleaner, commit markers, and worktrees to improve.sh (#66)
- Add branch-cleaner role that cleans stale remote branches (>4 hours):
  merges open PRs if mergeable, closes/deletes if stale
- Require Agent: trailer in all commit messages for traceability
- Switch git workflow from checkout -b to worktrees so parallel agents
  don't clobber each other's uncommitted changes
- Always git fetch origin main before creating worktrees to ensure
  branches start from latest main
- Add worktree setup/teardown to run_team_cycle and cleanup_between_cycles

Agent: team-lead

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 03:14:44 -08:00
A
a818de1f3e
feat: Add branch-cleaner agent, commit markers, and git worktrees (#65)
- Add branch-cleaner agent (Haiku) that cleans stale remote branches:
  merges open PRs if mergeable, closes/deletes if stale >4 hours
- Require Agent: trailer in all commit messages so we can trace which
  agent authored each change
- Switch from git checkout to git worktrees for parallel branch work,
  preventing agents from clobbering each other's uncommitted changes
- Update Issue Fix Workflow to use worktree pattern
- Update Workflow with branch cleanup passes and worktree setup/teardown

Agent: team-lead

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 03:12:25 -08:00
A
1bd7b1bd07
feat: Add community-coordinator agent to refactor team (#64)
* ux: Improve error messages and user guidance across CLI and shell scripts

Enhanced error messages to be more actionable and user-friendly:

CLI improvements (commands.ts):
- Made validateNonEmptyString clearer: "is required but was not provided"
- Reordered troubleshooting steps to check matrix first (most common issue)
- Simplified 404 error message: "doesn't exist yet" vs "may not be implemented"
- Changed "Troubleshooting steps" to just "Troubleshooting" (less formal)

Shared library improvements (shared/common.sh):
- OAuth cancellation now explains why API key is needed and where to get it
- safe_read non-TTY error explains what non-interactive mode is with example
- get_resource_name error shows exact env var syntax needed
- Agent verification failures now list specific possible causes
- All improvements add context and next steps rather than just stating the problem

Hetzner library improvements (hetzner/lib/common.sh):
- Replaced technical "Remediation" with friendly "How to fix"
- Changed log_warn to log_error for error conditions (consistent severity)
- Added spacing for better readability of multi-line errors
- Made server creation errors more specific about account issues

All changes focus on helping users understand WHAT went wrong and HOW to fix it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: Replace issue-triager with community-coordinator agent

Replace the issue-triager agent in the refactor team with a
community-coordinator that actively engages with GitHub issues:
acknowledges reports, posts interim updates, delegates to relevant
teammates, and posts final resolutions — so reporters feel heard.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 02:58:26 -08:00
B
aeec170dfa feat: Add agent and cloud request issue templates
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 10:10:10 +00:00
A
25b579755d docs: Update SKILL.md with deployed refactor service details
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 10:00:37 +00:00
A
5d23bb064c
refactor: Add validatePrompt tests and improve auth cancellation UX (#61)
- Add 16 comprehensive tests for validatePrompt() covering command
  injection, backtick substitution, rm -rf chaining, pipe-to-bash,
  size limits, and safe pattern acceptance
- Add 2 edge case tests for validateScriptContent() (dd if=, wget|sh)
- Improve auth cancellation error to explain that an API key is required

Test results: 90 pass, 0 fail, 11 skip (101 total)

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 01:24:43 -08:00
A
68349fa5d7
fix: Replace instanceof Error checks with duck typing (#60)
Fixes #59

The instanceof operator can fail in bundled/minified code or when
errors cross execution realm boundaries, causing the error:
"instanceof called on an object with an invalid prototype property"

This commit replaces all instanceof Error checks with duck typing
(checking for object with 'message' property) which is more reliable
across different execution contexts.

Changes:
- index.ts: Updated handleError() and prompt file error handling
- commands.ts: Updated getErrorMessage() helper

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 01:21:37 -08:00
B
fe9b6ad449 docs: Rewrite trigger service skill for direct URL + bearer auth pattern
- Updated overview to reflect current architecture (public sprite URL
  with TRIGGER_SECRET bearer auth, not start service API)
- Added Step 5 for setting sprite URL auth to public
- Updated workflow template to use SPRITE_URL + TRIGGER_SECRET secrets
- Updated secret naming convention to match deployed services
- Added Step 10 for CLI-based end-to-end testing
- Added "Current Deployed Services" reference table
- Fixed all stale references and code samples

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 09:09:41 +00:00
B
4c456df091 fix: Switch to direct sprite URL with bearer auth
The Sprite start service API (/services/{name}/start) returns
"service name required" for all service names — appears to be an API
bug. Switched to hitting the sprite's public URL directly with
TRIGGER_SECRET bearer auth instead.

- Re-added TRIGGER_SECRET auth to trigger-server.ts
- Set sprite url_settings.auth to "public"
- Updated both workflows to use SPRITE_URL + TRIGGER_SECRET pattern
- Aligned workflow structure (both use same env vars and curl format)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 09:07:49 +00:00