BikeControl (SwiftControl)
使用 Zwift Click、Zwift Play、Shimano Di2 或任何藍牙控制器,搭配 MyWhoosh、Rouvy、Zwift 等。iOS、Android、Windows、macOS 均可免費試用。
AI 翻译
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗Autonomous-ish management of one Yahoo fantasy basketball team (league 44495, 12-team head-to-head
9-category, 2026-27, third-round-reversal draft). It is a hybrid: a deterministic Python quant
engine (the fantasy CLI: projections, valuation, draft optimizer, simulation) used as tools by
Claude Code agents that orchestrate, drive Yahoo in the browser, verify, and keep an audit trail;
Supabase Postgres holds durable state; a Next.js dashboard on Vercel shows it
(https://fantasy.harrisonku.com; fallback https://fantasy-nba-ruby.vercel.app, Vercel login required). Agents never re-derive valuations; they
run the tools and interpret the JSON.
Basketball primer for quants: H2H 9-cat means each week you play one opponent and win or lose each of 9 categories (FG%, FT%, 3PM, PTS, REB, AST, STL, BLK, TO; lower TO is better). Win 5 of 9 to win the week. FG%/FT% are ratios, so they are modeled from makes and attempts, never averaged percentages.
┌──────────── Claude Code agent (local, with a browser) ───────────────────┐
Yahoo <──► │ browser: read league/draft state, click picks, verify │
(web) │ terminal: `fantasy ...` CLI ──► JSON on stdout (recs, status, ledger) │
└───────────────┬──────────────────────────────────────────────────────────┘
│ SQLAlchemy (FANTASY_DB_URL)
▼
data/raw (cached sources, provenance) Supabase Postgres ◄── Next.js dashboard (web/, Vercel)
data/processed (projections CSV) (runs, events, recs, reads with publishable key (RLS read-only),
picks, locks, approvals) writes only via server routes (service key)
Full detail and design trade-offs: docs/ARCHITECTURE.md.
| Path | Purpose |
|---|---|
src/fantasy/league/ | LeagueSettings (categories, roster slots, draft order), Yahoo API client (read-only), roster sync from browser captures (`fantasy league import-capture |
src/fantasy/lineup/ | daily lineup optimizer: exact position-aware slot assignment, matchup-weighted (fantasy lineup plan, lineup-0.4.0; banked matchup totals from fantasy league score; ratio_bench suggestion) |
src/fantasy/inseason/ | in-season analysis: games lost to slot rules, streaming ranker, paired trade evaluation (`fantasy inseason lineup |
scripts/yahoo/ | browser JS that captures all rosters / free agents from Yahoo pages (run by an agent in the logged-in browser) |
src/fantasy/data/ | ingestion into data/raw/ with provenance; fantasy data ... |
src/fantasy/model/ | projections, G-score valuation, category-win model |
src/fantasy/draft/ | draft order (3RR), availability (simulated rooms; analytic ADP), optimizer, Monte Carlo sim, policy evaluation, live draft state |
src/fantasy/valuesearch/ | value search: learned season-outcome model that re-ranks the optimizer's top candidates (default in draft recommend) |
src/fantasy/sim/ | season simulator: P(playoffs)/P(title), weekly matchups, roster-change comparison (fantasy sim ...) |
src/fantasy/ops/ | runs/events, locks, approvals, txn ledger, tasks, policy, status |
src/fantasy/db/ | schema.py (single source of truth), engine, DDL for Supabase, REST publish |
supabase/migrations/ | generated from schema.py plus RLS policies |
web/ | Next.js dashboard (App Router, TS, Tailwind): Matchup / League / Activity / Draft tabs; installable as an app (PWA) |
data/manual/ | human-edited overrides: injuries, roles, rookies, ADP, positions |
data/processed/ |
git clone https://github.com/hmku/nba && cd nba
pip install -e ".[dev]" # Python >= 3.11; adds the `fantasy` command
fantasy status # runs, locks, approvals, data freshness, active draft
Database. With FANTASY_DB_URL unset, everything uses local SQLite at var/fantasy.db (dev, tests).
Production is Supabase Postgres (project fantasy-nba): set FANTASY_DB_URL to its session-pooler URI.
That URL is a secret supplied by the owner (Supabase, Project Settings, Database); keep it in your shell
or an untracked .env, never commit it. If you worked on SQLite, fantasy publish copies rows up.
Mock draft in four commands (rehearsals always use a mock-* id and --mock):
fantasy draft init --draft-id mock-1 --mock
export FANTASY_DRAFT_ID=mock-1
fantasy draft recommend # default policy: value search + simulated availability (about 3 s)
fantasy draft pick <player> --overall N # record a pick; also `draft board`, `draft undo N`, `draft simulate`
In season (all offline except the browser capture; skills daily-routine, season-sim, in-season-ops):
fantasy league import-capture --raw <raw.json> --kind rosters # normalise a Yahoo browser capture (scripts/yahoo/)
fantasy league sync --capture data/raw/yahoo/league_rosters_<date>.json --write # -> data/manual/league_rosters_2026-27.json
fantasy lineup plan --date <YYYY-MM-DD> --week # today's position-aware lineup + IL moves + rest of week
fantasy sim season --league-file data/manual/league_rosters_2026-27.json # P(playoffs)/P(title), weekly odds
fantasy sim compare --add "<FA>" --drop <player_id> --league-file data/manual/league_rosters_2026-27.json
fantasy inseason stream --start <d1> --end <d2> # streaming candidates; `inseason trade` for trades
Checks: pytest (offline), ruff check src tests.
Dashboard: cd web && npm install && npm run dev (see docs/runbooks/dashboard.md;
web/README.md is the stock create-next-app text).
Every command accepts --json; JSON is the agent interface.
gp_sd);
then manual overrides from data/manual/ (injuries, trades, roles, rookies, ADP, positions).
Rebuild with fantasy data build-projections; inspect with fantasy data top.makes - p_pool * attempts. Availability is blended with
streaming replacement and a replacement-level adjustment. fantasy values build [--punt ft_pct].--availability adp. A value search (valuesearch/, value-model-0.2.0) then
re-ranks the optimizer's top 6 by simulated season outcome (). Pick order, including third-round reversal
(slot 1 picks 1, 24, 36, 37, 60, 61, ...), is in ; positional
feasibility is in . A punt-strategy scan is included.Caveats (details in STATUS.md): the opponent is league-average so win probabilities are optimistic;
ADP sd and USAGE are priors (game-to-game noise is fitted: model/noise.py; the first real draft suggests the room
was ~0.6-0.7x the prior ADP spread, one sample: docs/research/draft_calibration_2026.md); the draft's weekly
variance ignores schedule and category correlation; recommendation margins under about 0.03 are noise; the sim edge is in-sample. Every model
run is versioned (model_runs: version, git sha, params, input hashes); model changes bump MODEL_VERSION
and need tests (see the model-eval skill).
Skills in .claude/skills/: draft-prep, live-draft, yahoo-browser,
projections-update, model-eval, season-sim, agent-run, handoff, daily-routine (the scheduled
fantasy-daily morning run: sync, lineup + IL moves on Yahoo, recommendations), league-loop (in-season Muse -> Claude ->
approve -> execute -> verify loop), and in-season-ops (capability map of the in-season tools + approval policy). Read-only subagents in .claude/agents/: quant-reviewer,
data-auditor, draft-shadow.
Operational safety is enforced by the ops ledger (fantasy run|lock|approval|txn|task), described in
docs/runbooks/agent_ops.md:
agrees_with_model). Mode is dry_run (default) or
live; Yahoo roster state is never touched outside a live run.yahoo:roster, yahoo:browser, draft:<id>) are leases held before any Yahoo write.submitted is reconciled, never retried blindly.fantasy approval decide and fantasy lock release --force are
human-only actions.The draft ran Mon 2026-10-19 (13/13 picks verified on Yahoo; docs/handoffs/2026-10-20-draft.md). Draft runbook for
next time: docs/runbooks/live_draft.md (agent protocol: live-draft skill; day-of
checklist: draft-prep skill). Anything that reads league pages or changes the roster needs a local Claude session
with browser tools (the desktop app's built-in browser or Claude in Chrome): roster captures, lineups
(docs/runbooks/roster_sync.md, daily-routine skill). Cloud sessions have no browser
and cannot drive Yahoo (some read-only data endpoints are reachable from the cloud; see docs/STATUS.md, Known limitations).
Yahoo's API is application-only since 2026 (manual approval, weeks of lead time) and read-only; there is
no write access. The OAuth client exists (fantasy settings yahoo-auth) but is untested against live Yahoo.
The browser is the primary path for all reads and writes. See docs/research/yahoo_api.md section 0.
League settings are verified from Yahoo (data/manual/league_settings.json, all fields incl. draft order and slot as of 2026-10-19).
Current state and priorities: docs/STATUS.md; backlog: fantasy task list.
docs/research/draft_calibration_2026.md).fantasy-daily),
season/matchup simulator with IL replacement, conservative market-projection run, streaming ranker and paired trade
evaluation. Next: matchup-weighted streaming (T-006), trade scan (T-008), in-season projection updates, calibration of
in-season priors (T-016).AGENTS.md is a symlink to it): start-of-session steps, safety rules, conventions.docs/STATUS.md and the newest notes in docs/handoffs/; claim work with fantasy task claim T-00N --owner <you>.pytest, ruff check src tests, cd web && npm run build if web changed.docs/handoffs/YYYY-MM-DD-<topic>.md (template in the handoff skill) and update STATUS.md.git pull --rebase --autostash origin main && git push origin main.projections_2026_27.csv (per-game means; contract in ARCHITECTURE.md) |
.claude/skills/, .claude/agents/ | agent playbooks and read-only reviewer subagents |
docs/ | STATUS.md, runbooks/, research/, handoffs/ |
tests/ | offline pytest suite on synthetic data (tests/synthetic.py) |
docs/research/draft_policy.mddraft/roster.pyfantasy draft simulate).season-sim-0.6.0). Plays the real rosters through Yahoo's real
schedule (data/manual/league_schedule.json) and playoffs with fitted priors (docs/research/sim_calibration.md):
game-level noise, injury spells, and IL replacement for long absences (default since 0.6.0). It gives
P(playoffs)/P(title) for every team, weekly matchup odds, and paired add/drop deltas (fantasy sim ...).inseason tools (inseason/) rank streamers and
evaluate trades with paired simulations for both teams.