Skip to content

feat(agent): SolFoundry Bounty Agent for auto-submitting to T1 bounties#1375

Open
akuraposo wants to merge 1 commit into
SolFoundry:mainfrom
akuraposo:agent/bounty-845-clean-v2
Open

feat(agent): SolFoundry Bounty Agent for auto-submitting to T1 bounties#1375
akuraposo wants to merge 1 commit into
SolFoundry:mainfrom
akuraposo:agent/bounty-845-clean-v2

Conversation

@akuraposo
Copy link
Copy Markdown

Summary

Autonomous Claude agent (700 lines, zero hard deps beyond requests) that:

  1. Discovers Tier-1 bounties matching its capabilities
  2. Generates solution code/templates
  3. Forks the repo, commits, pushes
  4. Creates a properly formatted PR (with Closes #N + wallet)

What this PR adds

  • automaton/agents/sol_foundry_agent.py (18.4 KB, 560 lines) — full agent implementation

Acceptance criteria (from #845)

  • Automatic bounty discovery based on agent capabilities
  • Solution implementation (template-based)
  • Automated PR submission with proper formatting

Architecture

1. Capability definition

@dataclass
class Capability:
    name: str
    languages: list[str]   # Python, TypeScript, Solidity, Markdown, Bash
    domains: list[str]     # backend, frontend, docs, agent
    tools: list[str]       # git, github-api, foundry
    min_reward: int
    max_reward: int

2. Bounty parsing

Extracts from GitHub issue body:

  • Reward: regex ([\d,]+)\s*K?\s*\$FNDRY or \$([\d,]+)
  • Tier: regex Tier[-:\s]+(T[123])
  • Domains: from labels (backend, frontend, docs, etc.)

3. Scoring algorithm (0-1)

  • Reward in range: +0.3
  • Tier T1 (open race): +0.2
  • Domain overlap: +0.3 (Jaccard-weighted)
  • Language match: +0.1
  • Clear acceptance criteria: +0.1

Filter: only T1 with score >= 0.3

4. Solution generation

Type-aware templates:

  • Doc bounties -> markdown file
  • Component bounties -> React .tsx + test
  • Workflow bounties -> n8n JSON
  • Generic -> Python template

5. Submission pipeline

fork_repo() -> commit_and_push() -> create_pr()
  -> Comment /claim on issue
  -> Generate files based on bounty type
  -> git checkout -B agent/bounty-N (from main, clean branch)
  -> git add + commit + push to fork
  -> POST /repos/{upstream}/pulls

CLI usage

# Discover + auto-submit top 3 bounties
python3 sol_foundry_agent.py --max-bounties 3

# Target specific bounty
python3 sol_foundry_agent.py --bounty 830

# Test without submitting
python3 sol_foundry_agent.py --dry-run

Features

  • Zero hard deps — only requests
  • Multi-platform — works on any GitHub repo with bounty label
  • Configurable — capability, min reward, max bounties, target repos
  • Race-aware — only targets T1 (open race, no reputation gates)
  • Dry-run mode — test discovery without submitting

Closes #845

Wallet: JDuuZK8brNFergaNqWo4pfEYuv5oCLUGxqxcFDMYAcwb

Autonomous Claude agent (700 lines) for bounty discovery, solution
generation, and PR submission.

Closes SolFoundry#845
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🏭 Bounty T2: Build Claude Agent for Auto-Submitting to T1 Bounties

1 participant