feat: add ISSLOP AI usage analysis CLI commands, game router, and politics topic

- Add `cmd_isslop_prune`, `cmd_isslop_clear`, `cmd_isslop_analyze` CLI commands for AI usage analysis job management
- Register `/game` router with `index` and `farm` endpoints for Code Farm idle game
- Add `politics` to allowed TOPICS constant replacing `signals`
- Introduce `ISSLOP_DIR`, `ISSLOP_WORKSPACES_DIR`, `ISSLOP_RUNS_DIR`, `ISSLOP_MEDIA_DIR` config paths
- Add `clear_user_stars` and `clear_user_projects_cache` calls on vote and project create/delete
- Update `make prod` to use `nproc` workers via `DEVPLACE_WEB_WORKERS` env var
- Convert `database.py` and `utils.py` to packages for modular structure
- Add `devplace apikey` and `devplace token` CLI subcommands for API key and access token management
This commit is contained in:
2026-07-06 03:57:47 +00:00
parent f1bdefd834
commit 9a8046ab2a
110 changed files with 1466 additions and 374 deletions
+24 -4
View File
@@ -114,9 +114,9 @@ each quest marks the ones that are ready.
## Fertilizer
Fertilizing a growing build spends coins to **halve its remaining time**. The cost scales with how
much time is left (about 0.3 coins per remaining second, minimum 5 coins), so it is cheapest near
the end of a build. Each plot in the state reports its current `fertilize_cost`.
Fertilizing a growing build spends coins to **halve its remaining time**. The cost scales with the
build's coin value and with how much time you skip, so a build with a long way to go costs more and
fertilizing is cheapest near the end. Each plot in the state reports its current `fertilize_cost`.
## Watering a neighbour (cooperation)
@@ -143,6 +143,25 @@ multiplies with the Optimizer perk. Refactoring is the long-term progression and
largest factor in the leaderboard. The state reports `prestige`, `prestige_multiplier`, and
`prestige_available`.
Each refactor also awards **stars**, a separate prestige currency (more at higher levels and higher
prestige). Stars are never reset and are spent on permanent **Legacy upgrades**.
## Legacy upgrades
Stars buy Legacy upgrades, permanent boosts that persist through every future refactor. There are
five:
| Legacy upgrade | Effect | Max level |
|----------------|--------|:---------:|
| 🤖 CI Bot | Auto-collect ready builds when you open your farm | 1 |
| 💎 Tech Debt Payoff | +10% harvest coins per level, stacks with refactor | 10 |
| 🏎️ Bare-Metal | +5% base build speed per level | 8 |
| 🗂️ Monorepo | +1 starting plot after each refactor per level | 4 |
| 🛡️ Branch Protection | +30s steal grace and -5% steal loss per level | 5 |
The live state reports your `stars` balance and each legacy upgrade's current level and the exact
star cost of its next level.
## Leaderboard and scoring
The leaderboard ranks the top farms by a composite score. Refactors dominate the formula, then
@@ -191,11 +210,12 @@ your **API key** in an `X-API-KEY` header (or `Authorization: Bearer`). Your key
| `POST` | `/game/daily` | Claim the daily bonus. |
| `POST` | `/game/quests/claim` | Claim a completed quest by `quest` kind. |
| `POST` | `/game/prestige` | Refactor at level 10 or above. |
| `POST` | `/game/legacy` | Buy a legacy upgrade (`key`) with stars. |
| `POST` | `/game/farm/{username}/water` | Water a neighbour's build in `slot`. |
| `POST` | `/game/farm/{username}/steal` | Raid a neighbour's unprotected ready build in `slot`. |
POST bodies are form encoded (`application/x-www-form-urlencoded`). Form fields are `slot` (an
integer plot index), `crop`, `perk`, and `quest` where the table notes them. Every POST returns
integer plot index), `crop`, `perk`, `quest`, and `key` (a legacy upgrade) where the table notes them. Every POST returns
the full farm under `farm`, so one call both performs the action and gives you the new state.
### Reading the state