skills/wc-fitness-eval/SKILL.md
Scores a FIFA World Cup Fantasy candidate squad/plan as risk-adjusted, rank-relative fitness under a stated rank objective (protect / gain / neutral). Sums fixture-scaled player xEV + captaincy uplift, adds clean-sheet correlation and progression-carry, applies an ownership-leverage term (cover chalk when protecting, fade it when gaining), and a variance term whose SIGN flips with the objective (penalty when protecting, reward when chasing) — the selection-pressure dial. Returns one fitness number plus the full decomposition. Use to score the population in the evolution engine, or to evaluate any single squad/plan. The objective makes the same candidate score differently for a leader vs a chaser; never returns raw expected points.
npx skillsauth add lyndonkl/claude wc-fitness-evalInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Implements footballfantasy/context/frameworks/fitness-function.md. The whole evolution engine selects on this number, so it must encode the two things that make fantasy fitness not raw points: rank is relative (ownership matters) and the rank objective sets the variance target (the selection-pressure dial).
fitness(c | θ) = raw_xEV(c) # Σ player xEV (fixture-scaled) + captaincy uplift
+ cs_corr_bonus(c) # within-team clean-sheet correlation (BB2 stacks)
+ progression_carry(c, horizon) # discounted future-round value of deep-team players
+ ownership_leverage(c | θ) # rank term — sign/shape set by θ
− variance_term(c | θ) # selection pressure — sign flips with θ
− feasibility_penalty(c) # 0 after clean repair; disqualifying if infeasible
- [ ] 1. Read inputs: candidate (with block tags), round signals (player-ev, clean-sheet, fixture, ownership), θ and k
- [ ] 2. raw_xEV: sum per-player xEV (from wc-player-ev signals); add captaincy uplift (from wc-captain-ladder)
- [ ] 3. cs_corr_bonus: from wc-clean-sheet-model for each defensive stack
- [ ] 4. progression_carry: Σ player_xEV_future × P(team advances)^rounds, discounted; weight up in KO phases
- [ ] 5. ownership_leverage: apply θ (cover high-EO when protect; overweight low-EO ceilings when gain)
- [ ] 6. variance_term: estimate candidate variance; multiply by ±k per θ
- [ ] 7. feasibility_penalty: 0 if repair-clean; large if not
- [ ] 8. Sum → fitness; emit fitness + the full decomposition
raw_xEV — sum the xEV field from each player's player-ev signal (already fixture-scaled, minutes-weighted, with the 60' tier and card/concede downside). Captaincy uplift = the expected extra from the captain ladder (from wc-captain-ladder), i.e. E[best ladder-reachable captain outcome], not a naive 2× of the top player. For a squad-build (no fixed matchday yet), use the round-1 captaincy estimate.
cs_corr_bonus — for each Clean-Sheet Spine stack (BB2), wc-clean-sheet-model returns the joint-distribution bonus capturing that a 3-defender + GK stack hauls together. Sign by θ: amplify the correlated-haul upside when gain; lightly discount when protect (they also blank together).
progression_carry — Σ_player xEV_typical(player) × Σ_{r=next..horizon} P(team alive at r) × discount^r. A steady player on a likely semi-finalist accrues several future rounds; a coin-flip nation's player accrues little. Weight ≈0 in the final, high in early knockouts (this is what makes A3 Progression Theorist competitive on fitness). Advance probabilities from wc-fixture-progression.
ownership_leverage(c | θ) — using effective ownership EO from wc-ownership-meta:
θ=protect: − w · Σ_{high-EO players NOT owned} EO_haul_risk → rewards covering chalk (penalise gaps in the template).θ=gain: + w · Σ_{owned, low-EO, live-ceiling} (ceiling × (1−EO)) → rewards differentiation.θ=neutral: small symmetric term; mostly defer to raw_xEV.variance_term(c | θ) — candidate variance from the spread of its players' point distributions + captaincy variance + stack correlation:
| θ | term |
|---|---|
| protect | + k · variance (penalty) — damp swings, bank the lead |
| gain | − k · variance written as a reward (subtract a negative) — you need the swing |
| neutral | small penalty |
k scales with how extreme the standing is (big lead + few rounds → high k_protect; big deficit + few rounds → high k_gain).
feasibility_penalty — 0 if the candidate passed repair (budget, nation cap, formation, 15-man shape). Large/disqualifying otherwise (keeps infeasible candidates out of the elite set; their blocks can still be harvested in crossover before they drop).
Revealed-preference soft terms — add the small bonuses/penalties accrued in manager-profile.md (e.g. "+ minutes-secure mids", "− benching the favourite nation"). Soft: they tilt, never dominate.
fitness: <number>
decomposition:
raw_xEV: <n>
captaincy_uplift: <n>
cs_corr_bonus: <n>
progression_carry: <n>
ownership_leverage: <+/- n> # under θ
variance: <n> variance_term: <+/- n> # under θ, with k
feasibility_penalty: <n>
objective: { theta: protect|gain|neutral, k: <n> }
variance_band: low|medium|high
The decomposition is mandatory — the board explains options through it, and the engine needs variance_band to mandate spectrum coverage in selection.
system-dynamics.md §4, invariants.md §6)Fitness is multi-term by design, and that is non-negotiable — the systems-thinking digest's cautionary tale (held "close before writing any agent-fitness metric"): every "maximise X" rule produces a substitution effect at a node the rule did not name. Collapsing fitness to one dominant term is forbidden; if you ever find one term swamping the rest (one weight set so high the others are noise), that is the Goodhart failure in progress — re-balance.
Emit, alongside the decomposition, a one-line substitution-watch per candidate when one term is doing most of the work: name what the candidate gave up to score there. Examples:
The thing that quietly degraded is usually the node the objective didn't name. Surfacing it on the artifact lets round-review run the substitution-watch across rounds before it compounds.
scoring-rules.md are confirmed: true before trusting absolute magnitudes; otherwise flag every fitness as provisional.testing
Cluster a conference's event records into a small set of coarse themes with finer sub-clusters, an explicit outlier bucket, and soft (multi-membership) affinities — using the hybrid embed-then-label pipeline (embed abstracts, reduce, density-cluster, then LLM-label the clusters) when embedding libraries are available, and an LLM-reasoned hierarchical fallback when they are not. Embeddings do the grouping; the LLM only names the groups. Conference-agnostic. Use when turning structured event records into a navigable theme map for preference elicitation and scheduling, when you need 6-8 reasonable themes rather than 20 muddy ones, or when overlapping talks must belong to more than one theme. Trigger keywords - theme clustering, cluster talks, embed then label, soft membership, outlier talks, conference themes, topic map.
development
Build a personal conference schedule as a constraint-optimization problem — hard constraints (no time overlap, room-to-room travel time, capacity/registration, the attendee's own must-attends and blackouts) plus a user-owned weighted objective trading interest against breadth, pacing (maximize contiguous free time), and serendipity. Surfaces unbreakable conflicts (two high-value overlapping talks the model cannot rank) as decisions for the human rather than silently picking, and reports what each choice traded away. Conference-agnostic. Use to turn a preference profile plus a theme map into a day-by-day plan, to resolve overlapping sessions, or to balance a packed vs paced schedule. Trigger keywords - schedule optimization, conference schedule, constraint optimization, overlapping talks, contiguous free time, conflict surfacing, packed vs paced.
development
Parse a heterogeneous conference program (markdown, HTML, PDF-derived text, or JSON) into normalized event records with per-field confidence scores and independent classification axes (topic, depth, format, prerequisites, recorded, capacity). Detects the program's format before extracting, treats every inferred field as uncertain (present vs inferred vs missing), and flags thin or missing abstracts so downstream enrichment can target them. Conference-agnostic. Use when ingesting a conference or event schedule into a structured store, normalizing a talk/session list, or extracting per-session metadata with calibrated confidence. Trigger keywords - program ingestion, parse schedule, session extraction, event records, conference program, talk metadata, per-field confidence.
development
Build a personalized preference profile from a small number of well-chosen, cluster-grounded questions instead of a long survey. Represents the person's interests as an uncertainty region over the theme map, picks the single highest-information-gain choice-based question (contrasting real talks from different clusters), balances exploiting known interests against exploring uncertain ones, deliberately injects outlier probes to fight selection bias, and stops as soon as the schedule would be stable. Also elicits the user-owned objective weights and hard constraints. Interactive — runs where it can actually ask the person. Conference-agnostic. Use to turn a theme map into a preference profile, to decide what to ask a conference attendee, or to elicit scheduling priorities. Trigger keywords - preference elicitation, ask few questions, information gain, choice-based questions, selection bias probe, objective weights, attendee preferences.