Wc transfer planner

From lyndonkl/claude · View interactive version

Wc transfer planner is an AI agent skill from the GitHub repository lyndonkl/claude. Plans between-round FIFA World Cup Fantasy transfers — budgets the round's free transfer(s), forces out players whose nation has been eliminated, chases fixture-swing drops, upgrades on value, and decides when a rebuild is large enough to fire the Wildcard instead of spending free transfers one at a

How to use this skill

Skill file

wc-transfer-planner — between-round transfer optimisation

The engine behind wc-squad-architect's transfer work. Given the current 15 and the round's signals, it answers four questions in priority order: who is dead weight and must go (eliminated nations), where the fixtures are swinging (chase the drop), where value is left on the table (upgrade), and is the rebuild big enough that the Wildcard beats spending free transfers. It does not pick the squad and it does not present a board — it ranks in/out pairs, budgets the free transfer(s), prices any hit, and recommends (or rejects) the Wildcard, then emits a transfer-plan signal for wc-squad-architect and the Director to act on.

The discipline that defines this skill: a transfer is only worth making if its EV gain over the horizon the player will actually survive exceeds its cost. Two failure modes sit on either side of that line — under-trading (leaving an eliminated player in the squad to rot) and over-trading (transfer thrash: churning the squad chasing every one-band fixture wobble, burning free transfers and paying hits for swings the field hasn't even priced). This skill exists to find the moves that clear the bar and stop at the ones that don't.

This is between-round, transfer-adjacent search. A structural rebuild — most of the squad re-pointed at the surviving nations at the group→knockout transition — is not a transfer plan; it is a Wildcard, and the whole candidate space reopens to the full market (chip-catalog.md §1). The rule for when the rebuild crosses that threshold is below.

When to invoke

Workflow

- [ ] 1. Read state: FT count this round, whether extra transfers cost points, budget, nation cap, in-the-bank — from tournament-state.md. Read each owned player's elimination-risk horizon.
- [ ] 2. Read signals (never re-derive): the round `fixture` signal (swing_calendar, p_advance, mismatch_list, dead_rubber_flags) and the `player-ev` signals for owned players and transfer targets. Read `ownership` if differentiating.
- [ ] 3. FORCED MOVES — list every owned player whose nation is eliminated (p_advance = 0). These are dead weight: zero future xEV. Mark each a forced OUT for the next window.
- [ ] 4. SWING MOVES — from swing_calendar, list owned players hitting an easy→hard flip (sell) and market targets hitting a hard→easy flip (buy), respecting each one's elimination horizon.
- [ ] 5. UPGRADE MOVES — find in/out pairs where a target's horizon-weighted xEV beats an owned player's at affordable cost (value left on the table).
- [ ] 6. SCORE every candidate in→out pair: net_gain = ΔxEV_horizon − transfer_cost. Rank by net_gain. Tag each pair forced | fixture | upgrade.
- [ ] 7. BUDGET the free transfer(s): assign FTs to the highest-net-gain pairs first (forced moves take precedence even at equal gain). Price any pair beyond the FT count as a hit; keep it only if net_gain still clears the hit.
- [ ] 8. WILDCARD CHECK — count the moves that genuinely clear the bar. If the rebuild scope crosses the Wildcard threshold (rule below), recommend the Wildcard instead of free transfers + hits, and hand off to build-squad.
- [ ] 9. Repair: confirm the post-transfer 15 stays feasible (budget, nation cap, formation) per building-blocks.md repair order. Flag if a move breaks a building block.
- [ ] 10. Emit the `transfer-plan` signal (ordered pairs, FT usage, any hit + its justification, Wildcard recommendation) via wc-signal-emitter. Return its path.

Method

0. Read the round's transfer budget (state first — it sets the whole cost side)

From tournament-state.md:

1. The EV-gain-minus-cost model (the core ranking)

A transfer replaces an owned player out with a target in. Its worth is the extra expected points it buys over the rounds the new player will actually survive to play, minus what the move costs:

ΔxEV_horizon(in, out) =  Σ_{r = next .. H}  [ xEV(in, r) · P(in's nation alive at r)
                                            − xEV(out, r) · P(out's nation alive at r) ] · discount^r

net_gain(in, out)     =  ΔxEV_horizon(in, out)  −  transfer_cost

transfer_cost:

2. Priority classes — what to do, in order

Every candidate pair is tagged with exactly one class. Classes set precedence when free transfers are scarce: a forced move outranks a fixture move outranks an upgrade at comparable net gain, because the forced move's out player has collapsed to zero future value.

(1) FORCED — eliminated-player replacement (highest priority).

A player whose nation is eliminated (p_advance = 0 in the fixture signal) is dead weight: his xEV(out, r) is zero for every future round — he cannot score, cannot be captained, cannot fill an XI slot. Leaving him in the squad is strictly dominated; he must be transferred out next window. Because xEV(out) over the horizon is ~0, any viable replacement has a large positive ΔxEV_horizon, so forced moves almost always clear the bar even on a hit — but spend a free transfer on them first, because they are the cheapest large gains available. (Distinguish eliminated — a hard forced move — from elimination-risk — a nation that could go out soon, which is a fixture/horizon consideration, not yet forced. Also distinguish the dead-rubber flag: a clinched team resting starters in a final group game is a one-round minutes problem, not an elimination — discount that fixture's xEV, but do not force the player out.)

(2) FIXTURE-SWING — chase the difficulty drop (second priority).

From the fixture signal's swing_calendar (built by wc-fixture-progression):

(3) UPGRADE ON VALUE — bank the EV left on the table (third priority).

With forced and fixture moves placed, look for pairs where a target's horizon-weighted xEV simply beats an owned player's at an affordable price — funded by in_the_bank plus the price of the player sold. These are the value plays: a higher-floor pen-taker for a non-taker, a nailed starter for a rotation risk (p60 gap), a deep-run nation's asset for a coin-flip nation's (progression_carry gap). They are lowest priority because the out player still has positive value — the gain is the margin, which must beat the cost. An upgrade is only worth a hit if ΔxEV_horizon over the remaining rounds comfortably exceeds the hit (a multi-round upgrade can; a one-round +1 cannot).

3. Budgeting the free transfer(s) and pricing hits

  1. Rank all candidate pairs by net_gain, with the priority class as the tie-breaker (forced > fixture > upgrade at comparable gain).
  2. Assign the free transfer(s) to the top pairs — forced moves first (cheapest large gains), then the highest-net-gain fixture/upgrade pairs, until the free count is exhausted.
  3. For each additional pair beyond the free count:
  1. Never burn a free transfer on a marginal swing. A free transfer is a scarce, renewable-but-limited resource; spending it on a +1-over-one-round move forecloses funding a forced or value move next window. If the best available move's net gain is small and no forced move is pending, the correct plan can be zero transfers — bank the move.

4. The Wildcard threshold — when to stop transferring and rebuild

The Wildcard gives unlimited transfers for one round (chip-catalog.md §1) — a free full rebuild. Spending free transfers one at a time (and paying hits) to patch a squad that needs many changes is strictly worse than one Wildcard that re-points everything at once. So the decision is scope: how many moves does the squad genuinely need?

Recommend the Wildcard when the rebuild scope crosses the threshold:

```

value(Wildcard) = Σ ΔxEV_horizon over ALL needed moves (transfer_cost = 0, unlimited)

value(free transfers) = Σ ΔxEV_horizon over the moves you can afford this window

− Σ hits paid to exceed the free count

− (deferred gain lost on moves you must postpone)

→ recommend Wildcard when value(Wildcard) − value(free transfers) > 0

AND no later round has a clearly higher-leverage Wildcard use queued (don't spend the

one Wildcard on a 4-move group patch if the KO transition rebuild is imminent).

```

5. Repair — keep the post-transfer squad feasible

After applying the chosen pairs, the new 15 must still satisfy the constraint layer (BB6 in building-blocks.md). Run the repair operator in its priority order — formation, then nation cap, then budget, then matchday spread — preserving value-bearing blocks:

Output — the `transfer-plan` signal

Emit via wc-signal-emitter to signals/<round>-transfer-plan.md. Per the registry (signal-framework.md), the transfer-plan type is carried by wc-squad-architect; when this skill runs standalone it emits the same shape with emitted_by: wc-transfer-planner.

---
type: transfer-plan
round: <round id, e.g. 2026-grp-md3>
date: <YYYY-MM-DD>
emitted_by: wc-squad-architect | wc-transfer-planner
confidence: <0.00-1.00>          # ≤0.35 if FT count / hit-regime / a target's minutes are web-unconfirmed
source_urls:
  - <fixture signal path>        # swing_calendar, p_advance, mismatch_list
  - <player-ev signal paths for in/out players>
  - <url confirming free-transfer count and hit rule>   # or "manager-provided"
provisional_cost_rule: <true|false>   # true until the live game confirms hit vs hard-cap regime
---

state:
  phase: <group-mdN | r32 | r16 | qf | sf | final>
  free_transfers_this_round: <n>          # confirmed from game; note carry-over if applicable
  extra_transfer_rule: hit | hard_cap | unconfirmed
  hit_points: <n | n/a>                   # e.g. 4 in the hit regime
  budget: <100.0 | 105.0>
  in_the_bank: <m>
  nation_cap: <current-phase cap>

forced_moves:                              # eliminated nations — dead weight, OUT next window
  - out: { player: <name>, nation: <nation>, reason: "nation eliminated (p_advance 0)", future_xEV: 0 }
    in:  { player: <name>, nation: <nation>, price: <m>, xEV_next: <n> }
    delta_xEV_horizon: <n>
    class: forced
    funded_by: free_transfer | hit

ranked_pairs:                              # all candidate in/out pairs, best net_gain first
  - rank: <n>
    out: { player: <name>, nation: <nation>, price: <m>, horizon_xEV: <n>, elim_risk_round: <round|none> }
    in:  { player: <name>, nation: <nation>, price: <m>, horizon_xEV: <n>, elim_risk_round: <round|none> }
    delta_xEV_horizon: <n>                 # Σ (in − out) · P(alive) · discount over H
    transfer_cost: <0 | hit_points>
    net_gain: <delta_xEV_horizon − transfer_cost>
    class: forced | fixture | upgrade
    swing_ref: <swing_calendar round + direction, if class=fixture>
    rationale: <one football-literate line — fixture drop / minutes upgrade / pen-taker / deep-run carry>

plan:                                      # the recommended moves this window
  transfers:
    - { out: <name>, in: <name>, funded_by: free_transfer, net_gain: <n> }
  free_transfers_used: <n> / <available>
  hits_taken: <n>
  hit_justification: <the horizon gain that beats each hit, or "none — no hit taken">
  no_move_recommended: <true|false>        # true when the best net_gain is marginal and no forced move pends — bank the FT
  feasible_after: { formation: <y/n>, nation_cap: <y/n>, budget: <y/n> }
  block_warnings: [ <e.g. "this pair breaks the Norway BB2 spine — sell as a unit or hold"> ]

wildcard:
  recommend: <true|false>
  N_needed: <n>                            # moves that genuinely clear the bar this window + next
  trigger: group_to_KO_transition | dead_fixture_cluster | none
  value_wildcard: <Σ ΔxEV_horizon over all needed moves, cost 0>
  value_free_transfers: <Σ affordable ΔxEV − hits − deferred gain>
  rationale: <why the rebuild does/doesn't cross the threshold>
  handoff: <"re-seed population from full market via wc-squad-architect build-squad" if recommend=true>
  defer_to: wc-chip-strategist            # chip ledger owns deployment; manager fires
---

Every numeric field declares its meaning so the emitter can range-check it (signal-framework.md). The Director routes this to wc-squad-architect and onto the board; the manager decides — this skill never auto-commits a transfer.

Guardrails

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.