|
| 1 | +# OSSFactory-Scaler |
| 2 | + |
| 3 | +Autonomous AI agent team that scales, maintains, and improves open-source repositories. Runs 25 VDays/day on a $5/day OpenRouter budget with 5 specialized agents. |
| 4 | + |
| 5 | +## Agents |
| 6 | + |
| 7 | +| Agent | Role | Model Tier | |
| 8 | +|-------|------|------------| |
| 9 | +| **Scout** | Scans repos, audits quality, prioritizes work queue | micro | |
| 10 | +| **Builder** | Clones repo, generates upgrades, repair cascade, pushes releases | fast -> standard -> engineering | |
| 11 | +| **Demo** | Creates/updates SEO-optimized demo pages, deploys to VPS | fast | |
| 12 | +| **Maintainer** | Triages issues, labels, auto-responds, health scoring | micro | |
| 13 | +| **Critic** | Reviews Builder output, runs quality gates, daily observation | micro | |
| 14 | + |
| 15 | +## Install |
| 16 | + |
| 17 | +```bash |
| 18 | +git clone https://github.com/AdametherzLab/OSSFactory-Scaler.git |
| 19 | +cd OSSFactory-Scaler |
| 20 | +bash scripts/setup.sh |
| 21 | +``` |
| 22 | + |
| 23 | +## Configuration |
| 24 | + |
| 25 | +Copy `.env.example` to `.env` and fill in your keys: |
| 26 | + |
| 27 | +```bash |
| 28 | +cp .env.example .env |
| 29 | +``` |
| 30 | + |
| 31 | +Required: |
| 32 | +- `OPENROUTER_API_KEY` — Your OpenRouter API key |
| 33 | +- `GITHUB_ORG` — GitHub org/user to scan (default: AdametherzLab) |
| 34 | + |
| 35 | +Optional: |
| 36 | +- `OSS_BOT_TOKEN` / `TELEGRAM_USER_ID` — Telegram notifications |
| 37 | +- `VPS_HOST` / `VPS_USER` / `SSH_KEY_PATH` — Demo page deployment |
| 38 | +- `DAILY_BUDGET_USD` — Daily spending limit (default: $5) |
| 39 | +- `VDAYS_PER_DAY` — Virtual days per real day (default: 25) |
| 40 | + |
| 41 | +## Usage |
| 42 | + |
| 43 | +```bash |
| 44 | +# Run directly |
| 45 | +bun run src/index.ts |
| 46 | + |
| 47 | +# Run with PM2 |
| 48 | +npx pm2 start ecosystem.config.cjs |
| 49 | + |
| 50 | +# Run tests |
| 51 | +bun test |
| 52 | +``` |
| 53 | + |
| 54 | +## How It Works |
| 55 | + |
| 56 | +Each VDay (~58 minutes), the agents run sequentially: |
| 57 | + |
| 58 | +1. **Scout** scans repos via `gh repo list`, audits quality, queues work items |
| 59 | +2. **Builder** picks top work item, clones repo, generates upgrade via AI cascade, runs quality gates |
| 60 | +3. **Critic** reviews recent work, writes 333-char observation |
| 61 | +4. **Demo** generates SEO demo pages for recently shipped repos, deploys via SCP |
| 62 | +5. **Maintainer** triages open issues, labels them, computes health scores |
| 63 | + |
| 64 | +Every 5th VDay, a team meeting fires with a Slicing Pie leaderboard. |
| 65 | + |
| 66 | +## Slicing Pie Points |
| 67 | + |
| 68 | +| Action | Points | |
| 69 | +|--------|--------| |
| 70 | +| Ship a release | +10 | |
| 71 | +| Create demo page | +8 | |
| 72 | +| Fix/triage an issue | +5 | |
| 73 | +| Update demo page | +5 | |
| 74 | +| Quality improvement | +3 | |
| 75 | +| Successful review | +2 | |
| 76 | +| Failed ship | -3 | |
| 77 | +| Regression introduced | -5 | |
| 78 | +| Budget overrun | -2 | |
| 79 | + |
| 80 | +## Quality Gates |
| 81 | + |
| 82 | +1. **Compile** — `bun build` passes |
| 83 | +2. **Tests** — `bun test` with >= 50% pass rate |
| 84 | +3. **README** — >= 800 chars with install + usage sections |
| 85 | +4. **Security** — No eval(), hardcoded secrets, or IP addresses |
| 86 | +5. **Ship-ready** — Composite >= 70/100 |
| 87 | + |
| 88 | +## Model Tiers |
| 89 | + |
| 90 | +| Tier | Model | Cost (in/out per 1M) | |
| 91 | +|------|-------|---------------------| |
| 92 | +| micro | Gemini 2.5 Flash Lite | $0.075 / $0.30 | |
| 93 | +| fast | Gemini 2.5 Flash | $0.15 / $0.60 | |
| 94 | +| standard | Kimi K2.5 | $0.45 / $2.20 | |
| 95 | +| engineering | DeepSeek R1 | $0.55 / $2.19 | |
| 96 | + |
| 97 | +## Data Files |
| 98 | + |
| 99 | +All persisted in `data/` (gitignored): |
| 100 | + |
| 101 | +- `scaler-state.json` — Work queue, audits, completed work |
| 102 | +- `token-usage.json` — Per-model spend log |
| 103 | +- `slicing-pie.json` — Agent reward history |
| 104 | +- `builds/` — Temporary clone directory |
| 105 | + |
| 106 | +## Requirements |
| 107 | + |
| 108 | +- [Bun](https://bun.sh) runtime |
| 109 | +- [GitHub CLI](https://cli.github.com) (`gh`) authenticated |
| 110 | +- [OpenRouter](https://openrouter.ai) API key |
| 111 | + |
| 112 | +## License |
| 113 | + |
| 114 | +MIT |
0 commit comments