diff --git a/.forgejo/workflows/research-improve.yml b/.forgejo/workflows/research-improve.yml index c4934c0..1bd245b 100644 --- a/.forgejo/workflows/research-improve.yml +++ b/.forgejo/workflows/research-improve.yml @@ -1,60 +1,50 @@ -# Research & Improve — Scrape AI agent research, generate proposals -# Machine A (Forgejo Runner): scrape + commit pipeline signals -# Machine B (Docker Host): auto-pipeline.sh detects signals, processes with agents +# Research & Improve — Trigger research analysis from Forgejo +# +# This Action is a lightweight trigger. It writes a flag file to git. +# The Docker host cron (T2h) pulls, detects the flag, runs full pipeline. # # Architecture: -# ┌─────────────────┐ git push ┌────────────────────┐ -# │ Forgejo Action │ ──────────────► │ OpenCode Container │ -# │ (cron: weekly) │ main │ (cron: every 2h) │ -# │ │ │ │ -# │ 1. Scrape │ │ 1. git pull │ -# │ 2. LLM analyze │ │ 2. Detect signals │ -# │ 3. Write │ │ 3. opencode run │ -# │ pipeline/* │ │ → analyze+fix │ -# │ 4. git commit │ │ → learning+heal │ -# └─────────────────┘ │ 4. commit+push back│ -# └────────────────────┘ +# Forgejo Runner ── push trigger file ──► Git +# │ +# Docker Host (cron) ◄── git pull ────────────────┘ +# auto-pipeline.sh: +# ├─ Scrape Github + Arxiv (curl, no API key) +# ├─ opencode run --auto (uses built-in LLM provider) +# │ → research-agent analyzes → generates proposals +# ├─ dev-agent implements low-risk improvements +# ├─ learning-agent learns from changes +# ├─ heal.sh --apply +# └─ git commit + push back +# +# No external API key needed — OpenCode uses its own model provider. name: 🔬 Research & Improve on: schedule: - - cron: '0 6 * * 1' # Every Monday at 6:00 UTC + - cron: '0 6 * * 1' # Every Monday 6:00 UTC workflow_dispatch: # Manual trigger -env: - LLM_API_KEY: ${{ secrets.LLM_API_KEY }} - -concurrency: - group: research-improve-${{ forgeji.ref }} - cancel-in-progress: true - jobs: - research: + trigger: runs-on: debian-12 steps: - uses: https://forgejo.tordais.cc/actions/checkout@v4 with: fetch-depth: 0 - - name: 🔍 Scrape AI agent research - run: bash .opencode/scripts/research-scrape.sh - env: - LLM_API_KEY: ${{ secrets.LLM_API_KEY }} - - - name: 📦 Commit proposals to main + - name: 🚀 Trigger research pipeline run: | + mkdir -p .opencode/local/research + date -u +"%Y-%m-%dT%H:%M:%SZ" > .opencode/local/research/force-run git config user.name "openpipe-research" git config user.email "research@opencode.bot" - - git add .opencode/local/pipeline/ .opencode/local/research/ + git add .opencode/local/research/force-run if git diff --cached --quiet; then - echo "No new proposals — nothing to commit." + echo "No changes — trigger already active." exit 0 fi - git commit -m "chore: research proposals $(date -u +'%Y-%m-%d') [skip-ci]" + git commit -m "chore: force research run $(date -u +'%Y-%m-%d') [skip-ci]" git push origin HEAD - - env: - GIT_TERMINAL_PROMPT: 0 + echo "✅ Trigger pushed — Docker host cron will pick it up within 2h." diff --git a/.opencode b/.opencode index 54964f4..4e67548 160000 --- a/.opencode +++ b/.opencode @@ -1 +1 @@ -Subproject commit 54964f4ad59665ab333d93c6a0a2fc41860c6f50 +Subproject commit 4e675483eb177b4494ae6f163e0923253b48bfa7