Wc tournament state

From lyndonkl/claude · View interactive version

Wc tournament state is an AI agent skill from the GitHub repository lyndonkl/claude. Reads and updates the FIFA World Cup Fantasy tournament state machine (footballfantasy/context/tournament-state.md) — the temporal backbone tracking phase (pre-tournament → group MD1-3 → R32 → R16 → QF → SF → final), budget ($100m group / $105m knockouts), nation cap (3 group, loosening in knockouts

How to use this skill

Skill file

wc-tournament-state — the temporal state machine

Owns footballfantasy/context/tournament-state.md. The World Cup is a month-long state machine and tracking it correctly is a core deliverable — budget rises at the knockouts, the nation cap loosens as teams are eliminated, five chips burn down once each, and every owned player has an elimination horizon that caps his value. This skill is the single writer of that file (everyone else reads it).

Two modes

LOAD (start of every run)

  1. Read tournament-state.md. Parse: current phase, round id, next deadline, budget, squad value, in-the-bank, nation cap, free transfers, chips remaining, surviving nations, owned-player exposure.
  2. Validate:
  1. Return the parsed state + any validation flags to the caller. Do not proceed a decision on invalid state — surface the break.

UPDATE (after a move / phase transition)

  1. Apply the change (transfer in/out, chip used, XI/captain set, phase advance).
  2. On a phase transition run the transition rules:
  1. Rewrite only the changed fields.
  2. Append to the State log (append-only): YYYY-MM-DD HH:MMZ — phase — what changed — why. Never overwrite log history — it's how we reconstruct what was true at each decision.
  3. Mirror chip changes to tracker/chip-ledger.md and squad changes to context/squad.md.

Owned-player exposure (the clock on each asset)

For every owned player, maintain elimination_risk_round = the earliest round his nation could be knocked out (from fixtures/progression-odds.md). This is the horizon on that asset's value and the transfer-strategist's primary watch list. When a nation is eliminated, immediately flag its players as dead — transfer out next window and surface them to the Director.

Workflow

- [ ] LOAD: parse → validate → return state + flags
- [ ] UPDATE: apply change → run transition rules if phase changed → rewrite fields →
              append state-log line → mirror to chip-ledger / squad.md

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.