fplkit 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. fplkit-1.0.0/.agents/README.md +26 -0
  2. fplkit-1.0.0/.agents/TOOLS.md +96 -0
  3. fplkit-1.0.0/.agents/skills/gw-prep/SKILL.md +258 -0
  4. fplkit-1.0.0/.agents/skills/gw-prep/references/output-template.md +161 -0
  5. fplkit-1.0.0/.agents/skills/gw-prep/references/rules.md +137 -0
  6. fplkit-1.0.0/.agents/skills/gw-prep/scripts/bench_order.py +83 -0
  7. fplkit-1.0.0/.agents/skills/gw-prep/scripts/starting_xi.py +75 -0
  8. fplkit-1.0.0/.agents/skills/gw-prep/scripts/transfer_eval.py +104 -0
  9. fplkit-1.0.0/.agents/skills/squad-builder/SKILL.md +387 -0
  10. fplkit-1.0.0/.agents/skills/squad-builder/references/output-template.md +90 -0
  11. fplkit-1.0.0/.agents/skills/squad-builder/references/rules.md +108 -0
  12. fplkit-1.0.0/.agents/skills/update-gw-prep/SKILL.md +228 -0
  13. fplkit-1.0.0/.claude/output-styles/fpl-mate.md +93 -0
  14. fplkit-1.0.0/.claude/settings.json +6 -0
  15. fplkit-1.0.0/.env.example +18 -0
  16. fplkit-1.0.0/.github/workflows/ci.yml +35 -0
  17. fplkit-1.0.0/.github/workflows/release.yml +78 -0
  18. fplkit-1.0.0/.gitignore +85 -0
  19. fplkit-1.0.0/AGENTS.md +1 -0
  20. fplkit-1.0.0/CHANGELOG.md +5 -0
  21. fplkit-1.0.0/CLAUDE.md +65 -0
  22. fplkit-1.0.0/LICENSE +21 -0
  23. fplkit-1.0.0/PKG-INFO +312 -0
  24. fplkit-1.0.0/README.md +280 -0
  25. fplkit-1.0.0/cliff.toml +40 -0
  26. fplkit-1.0.0/config/credentials.yaml.example +11 -0
  27. fplkit-1.0.0/config/defaults.yaml +51 -0
  28. fplkit-1.0.0/docs/architecture.md +658 -0
  29. fplkit-1.0.0/docs/command-reference.md +633 -0
  30. fplkit-1.0.0/docs/fpl-rules.md +205 -0
  31. fplkit-1.0.0/fpl_cli/__init__.py +6 -0
  32. fplkit-1.0.0/fpl_cli/_version.py +24 -0
  33. fplkit-1.0.0/fpl_cli/agents/__init__.py +5 -0
  34. fplkit-1.0.0/fpl_cli/agents/action/__init__.py +1 -0
  35. fplkit-1.0.0/fpl_cli/agents/action/waiver.py +530 -0
  36. fplkit-1.0.0/fpl_cli/agents/analysis/__init__.py +1 -0
  37. fplkit-1.0.0/fpl_cli/agents/analysis/bench_order.py +275 -0
  38. fplkit-1.0.0/fpl_cli/agents/analysis/captain.py +243 -0
  39. fplkit-1.0.0/fpl_cli/agents/analysis/squad_analyzer.py +370 -0
  40. fplkit-1.0.0/fpl_cli/agents/analysis/starting_xi.py +191 -0
  41. fplkit-1.0.0/fpl_cli/agents/analysis/stats.py +752 -0
  42. fplkit-1.0.0/fpl_cli/agents/analysis/transfer_eval.py +281 -0
  43. fplkit-1.0.0/fpl_cli/agents/base.py +164 -0
  44. fplkit-1.0.0/fpl_cli/agents/common.py +224 -0
  45. fplkit-1.0.0/fpl_cli/agents/data/__init__.py +1 -0
  46. fplkit-1.0.0/fpl_cli/agents/data/fixture.py +517 -0
  47. fplkit-1.0.0/fpl_cli/agents/data/price.py +216 -0
  48. fplkit-1.0.0/fpl_cli/agents/data/scout.py +220 -0
  49. fplkit-1.0.0/fpl_cli/agents/orchestration/__init__.py +1 -0
  50. fplkit-1.0.0/fpl_cli/agents/orchestration/report.py +595 -0
  51. fplkit-1.0.0/fpl_cli/api/__init__.py +1 -0
  52. fplkit-1.0.0/fpl_cli/api/football_data.py +140 -0
  53. fplkit-1.0.0/fpl_cli/api/fpl.py +306 -0
  54. fplkit-1.0.0/fpl_cli/api/fpl_draft.py +392 -0
  55. fplkit-1.0.0/fpl_cli/api/providers/__init__.py +152 -0
  56. fplkit-1.0.0/fpl_cli/api/providers/_models.py +31 -0
  57. fplkit-1.0.0/fpl_cli/api/providers/anthropic.py +136 -0
  58. fplkit-1.0.0/fpl_cli/api/providers/openai_compat.py +149 -0
  59. fplkit-1.0.0/fpl_cli/api/providers/perplexity.py +91 -0
  60. fplkit-1.0.0/fpl_cli/api/understat.py +386 -0
  61. fplkit-1.0.0/fpl_cli/api/vaastav.py +395 -0
  62. fplkit-1.0.0/fpl_cli/cli/__init__.py +84 -0
  63. fplkit-1.0.0/fpl_cli/cli/_banner.py +27 -0
  64. fplkit-1.0.0/fpl_cli/cli/_context.py +170 -0
  65. fplkit-1.0.0/fpl_cli/cli/_fines.py +221 -0
  66. fplkit-1.0.0/fpl_cli/cli/_fines_config.py +76 -0
  67. fplkit-1.0.0/fpl_cli/cli/_helpers.py +235 -0
  68. fplkit-1.0.0/fpl_cli/cli/_json.py +92 -0
  69. fplkit-1.0.0/fpl_cli/cli/_league_recap_data.py +751 -0
  70. fplkit-1.0.0/fpl_cli/cli/_league_recap_types.py +111 -0
  71. fplkit-1.0.0/fpl_cli/cli/_plan_grid.py +222 -0
  72. fplkit-1.0.0/fpl_cli/cli/_review_analysis.py +341 -0
  73. fplkit-1.0.0/fpl_cli/cli/_review_classic.py +494 -0
  74. fplkit-1.0.0/fpl_cli/cli/_review_draft.py +430 -0
  75. fplkit-1.0.0/fpl_cli/cli/_review_summarisation.py +666 -0
  76. fplkit-1.0.0/fpl_cli/cli/allocate.py +304 -0
  77. fplkit-1.0.0/fpl_cli/cli/captain.py +119 -0
  78. fplkit-1.0.0/fpl_cli/cli/chips.py +487 -0
  79. fplkit-1.0.0/fpl_cli/cli/credentials.py +46 -0
  80. fplkit-1.0.0/fpl_cli/cli/differentials.py +164 -0
  81. fplkit-1.0.0/fpl_cli/cli/fdr.py +497 -0
  82. fplkit-1.0.0/fpl_cli/cli/fixtures.py +127 -0
  83. fplkit-1.0.0/fpl_cli/cli/history.py +81 -0
  84. fplkit-1.0.0/fpl_cli/cli/init.py +575 -0
  85. fplkit-1.0.0/fpl_cli/cli/league.py +271 -0
  86. fplkit-1.0.0/fpl_cli/cli/league_recap.py +292 -0
  87. fplkit-1.0.0/fpl_cli/cli/player.py +863 -0
  88. fplkit-1.0.0/fpl_cli/cli/preview.py +641 -0
  89. fplkit-1.0.0/fpl_cli/cli/price_changes.py +107 -0
  90. fplkit-1.0.0/fpl_cli/cli/price_history.py +226 -0
  91. fplkit-1.0.0/fpl_cli/cli/ratings.py +229 -0
  92. fplkit-1.0.0/fpl_cli/cli/review.py +371 -0
  93. fplkit-1.0.0/fpl_cli/cli/sell_prices.py +206 -0
  94. fplkit-1.0.0/fpl_cli/cli/squad.py +182 -0
  95. fplkit-1.0.0/fpl_cli/cli/stats.py +356 -0
  96. fplkit-1.0.0/fpl_cli/cli/status.py +689 -0
  97. fplkit-1.0.0/fpl_cli/cli/targets.py +134 -0
  98. fplkit-1.0.0/fpl_cli/cli/transfer_eval.py +287 -0
  99. fplkit-1.0.0/fpl_cli/cli/waivers.py +154 -0
  100. fplkit-1.0.0/fpl_cli/cli/xg.py +135 -0
  101. fplkit-1.0.0/fpl_cli/config/defaults.yaml +51 -0
  102. fplkit-1.0.0/fpl_cli/constants.py +3 -0
  103. fplkit-1.0.0/fpl_cli/models/__init__.py +17 -0
  104. fplkit-1.0.0/fpl_cli/models/chip_plan.py +106 -0
  105. fplkit-1.0.0/fpl_cli/models/fixture.py +142 -0
  106. fplkit-1.0.0/fpl_cli/models/player.py +216 -0
  107. fplkit-1.0.0/fpl_cli/models/team.py +49 -0
  108. fplkit-1.0.0/fpl_cli/models/types.py +139 -0
  109. fplkit-1.0.0/fpl_cli/parsers/__init__.py +0 -0
  110. fplkit-1.0.0/fpl_cli/parsers/recommendations.py +145 -0
  111. fplkit-1.0.0/fpl_cli/paths.py +104 -0
  112. fplkit-1.0.0/fpl_cli/prompts/__init__.py +1 -0
  113. fplkit-1.0.0/fpl_cli/prompts/league_recap.py +134 -0
  114. fplkit-1.0.0/fpl_cli/prompts/review.py +595 -0
  115. fplkit-1.0.0/fpl_cli/prompts/scout.py +130 -0
  116. fplkit-1.0.0/fpl_cli/scraper/__init__.py +1 -0
  117. fplkit-1.0.0/fpl_cli/scraper/fpl_prices.py +519 -0
  118. fplkit-1.0.0/fpl_cli/season.py +76 -0
  119. fplkit-1.0.0/fpl_cli/services/__init__.py +1 -0
  120. fplkit-1.0.0/fpl_cli/services/fixture_predictions.py +351 -0
  121. fplkit-1.0.0/fpl_cli/services/matchup.py +254 -0
  122. fplkit-1.0.0/fpl_cli/services/player_prior.py +233 -0
  123. fplkit-1.0.0/fpl_cli/services/player_scoring.py +1742 -0
  124. fplkit-1.0.0/fpl_cli/services/squad_allocator.py +667 -0
  125. fplkit-1.0.0/fpl_cli/services/team_form.py +108 -0
  126. fplkit-1.0.0/fpl_cli/services/team_ratings.py +681 -0
  127. fplkit-1.0.0/fpl_cli/services/team_ratings_prior.py +291 -0
  128. fplkit-1.0.0/fpl_cli/templates/gw_league_recap.md.j2 +67 -0
  129. fplkit-1.0.0/fpl_cli/templates/gw_preview.md.j2 +128 -0
  130. fplkit-1.0.0/fpl_cli/templates/gw_review.md.j2 +206 -0
  131. fplkit-1.0.0/fpl_cli/utils/__init__.py +0 -0
  132. fplkit-1.0.0/fpl_cli/utils/text.py +10 -0
  133. fplkit-1.0.0/pyproject.toml +71 -0
  134. fplkit-1.0.0/pyrightconfig.json +4 -0
  135. fplkit-1.0.0/requirements.lock +400 -0
  136. fplkit-1.0.0/templates/gw_league_recap.md.j2 +67 -0
  137. fplkit-1.0.0/templates/gw_preview.md.j2 +128 -0
  138. fplkit-1.0.0/templates/gw_review.md.j2 +206 -0
  139. fplkit-1.0.0/tests/__init__.py +1 -0
  140. fplkit-1.0.0/tests/conftest.py +495 -0
  141. fplkit-1.0.0/tests/test_agents_action.py +692 -0
  142. fplkit-1.0.0/tests/test_agents_analysis.py +641 -0
  143. fplkit-1.0.0/tests/test_agents_analysis_squad.py +936 -0
  144. fplkit-1.0.0/tests/test_agents_base.py +311 -0
  145. fplkit-1.0.0/tests/test_agents_data.py +1215 -0
  146. fplkit-1.0.0/tests/test_agents_data_price.py +341 -0
  147. fplkit-1.0.0/tests/test_agents_orchestration.py +208 -0
  148. fplkit-1.0.0/tests/test_allocate.py +108 -0
  149. fplkit-1.0.0/tests/test_api_client.py +572 -0
  150. fplkit-1.0.0/tests/test_api_draft.py +503 -0
  151. fplkit-1.0.0/tests/test_api_football_data.py +123 -0
  152. fplkit-1.0.0/tests/test_api_understat.py +594 -0
  153. fplkit-1.0.0/tests/test_api_vaastav.py +516 -0
  154. fplkit-1.0.0/tests/test_bench_order_script.py +209 -0
  155. fplkit-1.0.0/tests/test_cli_allocate.py +645 -0
  156. fplkit-1.0.0/tests/test_cli_banner.py +34 -0
  157. fplkit-1.0.0/tests/test_cli_captain.py +83 -0
  158. fplkit-1.0.0/tests/test_cli_chips.py +556 -0
  159. fplkit-1.0.0/tests/test_cli_credentials.py +47 -0
  160. fplkit-1.0.0/tests/test_cli_custom_analysis.py +154 -0
  161. fplkit-1.0.0/tests/test_cli_differentials.py +137 -0
  162. fplkit-1.0.0/tests/test_cli_fdr.py +336 -0
  163. fplkit-1.0.0/tests/test_cli_fdr_blanks.py +217 -0
  164. fplkit-1.0.0/tests/test_cli_fixtures.py +182 -0
  165. fplkit-1.0.0/tests/test_cli_format.py +163 -0
  166. fplkit-1.0.0/tests/test_cli_format_suppression.py +378 -0
  167. fplkit-1.0.0/tests/test_cli_history.py +226 -0
  168. fplkit-1.0.0/tests/test_cli_init.py +198 -0
  169. fplkit-1.0.0/tests/test_cli_json.py +122 -0
  170. fplkit-1.0.0/tests/test_cli_plan_grid.py +291 -0
  171. fplkit-1.0.0/tests/test_cli_player.py +756 -0
  172. fplkit-1.0.0/tests/test_cli_preview.py +123 -0
  173. fplkit-1.0.0/tests/test_cli_price_history.py +383 -0
  174. fplkit-1.0.0/tests/test_cli_review.py +718 -0
  175. fplkit-1.0.0/tests/test_cli_sell_prices.py +160 -0
  176. fplkit-1.0.0/tests/test_cli_squad.py +221 -0
  177. fplkit-1.0.0/tests/test_cli_stats.py +705 -0
  178. fplkit-1.0.0/tests/test_cli_status.py +886 -0
  179. fplkit-1.0.0/tests/test_cli_targets.py +86 -0
  180. fplkit-1.0.0/tests/test_cli_transfer_eval.py +337 -0
  181. fplkit-1.0.0/tests/test_cli_waivers.py +139 -0
  182. fplkit-1.0.0/tests/test_cli_xg.py +178 -0
  183. fplkit-1.0.0/tests/test_common.py +296 -0
  184. fplkit-1.0.0/tests/test_common_scoring.py +317 -0
  185. fplkit-1.0.0/tests/test_data_prep_harmonisation.py +409 -0
  186. fplkit-1.0.0/tests/test_fines.py +166 -0
  187. fplkit-1.0.0/tests/test_fines_config.py +99 -0
  188. fplkit-1.0.0/tests/test_fixture_predictions.py +327 -0
  189. fplkit-1.0.0/tests/test_fpl_prices.py +91 -0
  190. fplkit-1.0.0/tests/test_init.py +426 -0
  191. fplkit-1.0.0/tests/test_init_fines.py +102 -0
  192. fplkit-1.0.0/tests/test_league_recap.py +677 -0
  193. fplkit-1.0.0/tests/test_matchup_service.py +259 -0
  194. fplkit-1.0.0/tests/test_models.py +414 -0
  195. fplkit-1.0.0/tests/test_player_prior.py +277 -0
  196. fplkit-1.0.0/tests/test_player_resolution.py +117 -0
  197. fplkit-1.0.0/tests/test_player_scoring.py +2465 -0
  198. fplkit-1.0.0/tests/test_providers.py +447 -0
  199. fplkit-1.0.0/tests/test_recommendations_parser.py +297 -0
  200. fplkit-1.0.0/tests/test_report_agent.py +331 -0
  201. fplkit-1.0.0/tests/test_review.py +1512 -0
  202. fplkit-1.0.0/tests/test_scraper.py +399 -0
  203. fplkit-1.0.0/tests/test_season.py +96 -0
  204. fplkit-1.0.0/tests/test_sell_prices.py +76 -0
  205. fplkit-1.0.0/tests/test_squad_allocator.py +1524 -0
  206. fplkit-1.0.0/tests/test_starting_xi_agent.py +211 -0
  207. fplkit-1.0.0/tests/test_stats.py +111 -0
  208. fplkit-1.0.0/tests/test_team_ratings.py +1103 -0
  209. fplkit-1.0.0/tests/test_team_ratings_prior.py +194 -0
  210. fplkit-1.0.0/tests/test_transfer_eval_agent.py +518 -0
  211. fplkit-1.0.0/tests/test_utils_text.py +27 -0
@@ -0,0 +1,26 @@
1
+ # .agents/
2
+
3
+ Agent skills for fpl-cli. Each subdirectory in `skills/` is a self-contained skill with a `SKILL.md` entry point.
4
+
5
+ ## Discovery
6
+
7
+ Claude Code discovers skills via the `.claude/skills/` symlink, which points here. Other agent tools can read `skills/` directly.
8
+
9
+ For a complete inventory of CLI commands, analysis agents, and skills, see [TOOLS.md](TOOLS.md).
10
+
11
+ ## Adapting Skills
12
+
13
+ Skills are showcase examples - they work out of the box but are designed to be customised:
14
+
15
+ - `<!-- ADAPT: ... -->` comments mark sections you'll want to change for your setup
16
+ - Output paths use `[YOUR_OUTPUT_DIR]` placeholders - replace with your preferred location
17
+ - Supplementary data sources (newsletters, external reports) are noted but not required
18
+ - All CLI data gathering uses `--format json` for structured output
19
+
20
+ ## Private Skills
21
+
22
+ To add a private skill that shouldn't be committed, create it under `skills/` and add the path to `.gitignore`:
23
+
24
+ ```
25
+ .agents/skills/my-private-skill/
26
+ ```
@@ -0,0 +1,96 @@
1
+ # Tools & Capabilities
2
+
3
+ Complete inventory of fpl-cli's composable surface. For architectural diagrams and data flow, see [docs/architecture.md](../docs/architecture.md). For FPL-context usage guidance, see [.claude/output-styles/fpl-mate.md](../.claude/output-styles/fpl-mate.md).
4
+
5
+ ## JSON Envelope
6
+
7
+ All `--format json` commands emit a standard envelope via `emit_json()` in `fpl_cli/cli/_json.py`:
8
+
9
+ ```json
10
+ {
11
+ "command": "<command-name>",
12
+ "metadata": { ... },
13
+ "data": [ ... ]
14
+ }
15
+ ```
16
+
17
+ - `command` - the CLI command name (e.g. `"captain"`, `"chips-timing"`)
18
+ - `metadata` - command-specific context (typically includes `gameweek`)
19
+ - `data` - the payload (list or dict, varies per command)
20
+
21
+ Errors use `emit_json_error()` with `{"command", "error"}` shape.
22
+
23
+ ## CLI Commands
24
+
25
+ | Command | Description | JSON | Format | Experimental | Pattern |
26
+ |---------|-------------|------|--------|-------------|---------|
27
+ | `init` | Set up fpl-cli with your FPL IDs and optional features | No | General | No | direct-api |
28
+ | `status` | Show FPL gameweek status and upcoming deadlines | Yes | General | No | direct-api |
29
+ | `fixtures` | Show fixtures for a gameweek | Yes | General | No | direct-api |
30
+ | `player` | Look up a player's stats, xG, ownership and fixture run | Yes | General | No | direct-api |
31
+ | `stats` | List players with filtering and sorting | Yes | General | No | direct-api |
32
+ | `history` | Show historical player performance across seasons | Yes | General | No | direct-api |
33
+ | `league` | Show live league standings for Classic and Draft leagues | No | General | No | direct-api |
34
+ | `fdr` | Analyse fixture difficulty - easy runs, blanks, doubles | Yes | General | No | via-agent |
35
+ | `xg` | Analyse underlying stats: xG, xA, overperformers | Yes | General | No | via-agent |
36
+ | `price-changes` | Show price changes and transfer activity | No | General | No | via-agent |
37
+ | `price-history` | Show price trajectory and transfer momentum | Yes | General | No | direct-api |
38
+ | `preview` | Run full pre-gameweek analysis and generate report | No | General | No | via-agent |
39
+ | `review` | Review a completed gameweek - squad performance and standings | No | General | No | via-agent |
40
+ | `league-recap` | Recap a completed gameweek - awards, standings, and banter | No | General | No | via-agent |
41
+ | `captain` | Analyse and rank captain options for next gameweek | Yes | Classic | Yes | via-agent |
42
+ | `differentials` | Find differential picks - high potential, low ownership | Yes | Classic | Yes | via-agent |
43
+ | `targets` | Find transfer targets - high performers across all ownership | Yes | Classic | Yes | via-agent |
44
+ | `transfer-eval` | Compare transfer OUT player against IN candidates | Yes | General | Yes | via-agent |
45
+ | `allocate` | Select mathematically optimal 15-player squad within budget | Yes | Classic | Yes | direct-api |
46
+ | `waivers` | Show waiver recommendations for your draft league | Yes | Draft | Yes | via-agent |
47
+ | `squad` | Analyse your FPL squad health and fixtures | Yes | General | No | via-agent |
48
+ | `squad grid` | Show squad fixture difficulty grid | Yes | General | No | via-agent |
49
+ | `squad sell-prices` | Show squad sell prices and financial breakdown | Yes | Classic | No | direct-api |
50
+ | `chips` | View and plan FPL chip usage | Yes | Classic | No | direct-api |
51
+ | `chips timing` | Recommend chip timing based on blank/double GW exposure | Yes | Classic | No | via-agent |
52
+ | `chips add` | Plan a chip for a gameweek | No | Classic | No | direct-api |
53
+ | `chips remove` | Remove a planned chip from a gameweek | No | Classic | No | direct-api |
54
+ | `chips sync` | Sync chip usage from FPL API | No | Classic | No | direct-api |
55
+ | `ratings` | Display team ratings | No | General | Yes | direct-api |
56
+ | `ratings update` | Recalculate ratings from fixture results | No | General | Yes | direct-api |
57
+ | `credentials set` | Store FPL email and password in system keyring | No | Classic | No | direct-api |
58
+ | `credentials clear` | Remove FPL credentials from system keyring | No | Classic | No | direct-api |
59
+
60
+ **Column key:**
61
+ - **JSON** - supports `--format json` output
62
+ - **Format** - Classic (classic league only), Draft (draft league only), General (both)
63
+ - **Experimental** - requires `custom_analysis: true` in settings; hidden from `--help` by default
64
+ - **Pattern** - `direct-api` (API client only), `via-agent` (uses analysis agent), `mixed` (both patterns in subcommands)
65
+
66
+ ## Skills
67
+
68
+ Agent playbooks in `.agents/skills/`. Each has a `SKILL.md` entry point. Claude Code discovers them via the `.claude/skills/` symlink.
69
+
70
+ | Skill | Path | Purpose | Compatibility |
71
+ |-------|------|---------|--------------|
72
+ | gw-prep | `skills/gw-prep/` | Gameweek preparation recommendations for classic and draft | Full: Claude Code. Partial: Codex, Cursor, Copilot |
73
+ | update-gw-prep | `skills/update-gw-prep/` | Append GW update to existing recommendations | Full: Claude Code, Codex, Cursor, Copilot |
74
+ | squad-builder | `skills/squad-builder/` | Build optimal 15-player squad (wildcard, free hit, season start) | Full: Claude Code, Codex, Cursor, Copilot |
75
+
76
+ ## Analysis Agents
77
+
78
+ Python classes in `fpl_cli/agents/` that implement `async run(context) -> AgentResult`.
79
+
80
+ | Agent | Module | Category | CLI Commands | External Consumers |
81
+ |-------|--------|----------|-------------|-------------------|
82
+ | FixtureAgent | `agents/data/fixture.py` | Data | `fdr`, `player -f`, `chips timing`, `preview` | - |
83
+ | PriceAgent | `agents/data/price.py` | Data | `price-changes`, `preview` | - |
84
+ | ScoutAgent | `agents/data/scout.py` | Data | `preview` | - |
85
+ | StatsAgent | `agents/analysis/stats.py` | Analysis | `xg`, `targets`, `differentials`, `preview` | - |
86
+ | CaptainAgent | `agents/analysis/captain.py` | Analysis | `captain`, `differentials` | - |
87
+ | SquadAnalyzerAgent | `agents/analysis/squad_analyzer.py` | Analysis | `squad` | - |
88
+ | BenchOrderAgent | `agents/analysis/bench_order.py` | Analysis | - | gw-prep skill |
89
+ | StartingXIAgent | `agents/analysis/starting_xi.py` | Analysis | - | gw-prep skill |
90
+ | TransferEvalAgent | `agents/analysis/transfer_eval.py` | Analysis | `transfer-eval` | gw-prep skill |
91
+ | WaiverAgent | `agents/action/waiver.py` | Action | `waivers` | - |
92
+ | ReportAgent | `agents/orchestration/report.py` | Orchestration | `preview`, `review`, `league-recap` | - |
93
+
94
+ **Notes:**
95
+ - BenchOrderAgent and StartingXIAgent have no CLI command - they are invoked by gw-prep skill wrapper scripts in `.agents/skills/gw-prep/scripts/`
96
+ - TransferEvalAgent is used by both `transfer-eval` CLI command and gw-prep skill
@@ -0,0 +1,258 @@
1
+ ---
2
+ name: gw-prep
3
+ description: >
4
+ Generate gameweek preparation recommendations for FPL classic and draft leagues.
5
+ Runs data gathering via fpl-cli, then dispatches parallel sub-agent analysis for
6
+ each league format. Use when the user asks to prepare for the next gameweek,
7
+ get transfer/waiver recommendations, or review their squad.
8
+ model: opus
9
+ compatibility:
10
+ claude-code: full (parallel Classic + Draft sub-agents via Agent tool)
11
+ codex: partial (sequential execution - no sub-agent spawning)
12
+ cursor: partial (sequential execution)
13
+ copilot: fallback (sequential execution)
14
+ ---
15
+
16
+ <!-- CLI commands composed: status, chips, chips sync, chips timing, fdr, captain, waivers, squad grid, squad sell-prices, price-history, player, stats -->
17
+
18
+ # Gameweek Preparation
19
+
20
+ Generate transfer/waiver recommendations and squad analysis for the upcoming FPL gameweek across classic and draft formats.
21
+
22
+ ## Environment
23
+
24
+ ```bash
25
+ cd "$FPL_CLI_DIR" && source .venv/bin/activate
26
+ ```
27
+
28
+ ## Execution Strategy
29
+
30
+ **Claude Code:** Launch Phase C sub-agents in parallel (classic + draft simultaneously) using the `Agent tool parameters:` blocks shown in Phase C.
31
+
32
+ **Codex / Cursor / Copilot / other agents:** Do not attempt to spawn sub-agents. Run Phase C-classic then Phase C-draft sequentially in the same context. Use the same prompts and output templates - just one after the other.
33
+
34
+ **In all cases** the final output format is identical: Classic section followed by Draft section (or whichever formats are active).
35
+
36
+ ---
37
+
38
+ ## Phase A: Context Detection
39
+
40
+ ### A1 -- Gameweek and Deadline
41
+
42
+ ```bash
43
+ fpl status --format json
44
+ ```
45
+
46
+ Extract:
47
+ - `gameweek` -- the upcoming GW number (N)
48
+ - `deadline` -- the transfer deadline timestamp
49
+ - `phase` -- current status (e.g. "Fixture day 1 of 2", "Between gameweeks")
50
+ - `metadata.format` -- `"classic"`, `"draft"`, or `"both"`. This determines which sub-agents to dispatch and which Phase B commands to run. If format is not present (no entry IDs configured), ask the user.
51
+
52
+ ### A1.5 -- Chip Status
53
+
54
+ ```bash
55
+ fpl chips sync
56
+ fpl chips --format json
57
+ ```
58
+
59
+ `chips sync` ensures the local chip plan reflects any changes made via the FPL website. Run it silently before reading chip status.
60
+
61
+ Extract active chip status. If **Wildcard** or **Free Hit** is active for GW N:
62
+ - Set `mode = "squad-builder"` (full squad selection, not incremental transfers)
63
+ - Otherwise `mode = "transfer"` (normal incremental recommendations)
64
+
65
+ This mode switch affects which rules apply in Phase C sub-agents.
66
+
67
+ ### A2 -- Budget Data (classic only - skip if format is "draft")
68
+
69
+ ```bash
70
+ fpl squad sell-prices --refresh
71
+ ```
72
+
73
+ Scrapes current sell prices from the FPL website. Requires `FPL_EMAIL` and `FPL_PASSWORD` in `.env`. If credentials are not configured, skip this step - affordability analysis in Phase C will be limited to the data available from other commands.
74
+
75
+ <!-- ADAPT: If you don't use FPL website credentials, remove this step -->
76
+
77
+ ---
78
+
79
+ ## Phase B: Data Gathering
80
+
81
+ Run all applicable commands below. Every command uses `--format json`. Skip commands marked with a format condition that doesn't match `metadata.format` from A1.
82
+
83
+ ### B1 -- Fixture Difficulty
84
+
85
+ ```bash
86
+ fpl fdr --format json
87
+ ```
88
+
89
+ Returns fixture difficulty runs (pFDR, positional ATK/DEF ratings, upcoming fixtures) plus BGW/DGW predictions with confidence levels.
90
+
91
+ ### B2 -- Captain Candidates (classic only - skip if format is "draft")
92
+
93
+ ```bash
94
+ fpl captain --format json
95
+ ```
96
+
97
+ ### B3 -- Waiver Targets (draft only - skip if format is "classic")
98
+
99
+ ```bash
100
+ fpl waivers --format json
101
+ ```
102
+
103
+ ### B4 -- Current Squad
104
+
105
+ ```bash
106
+ fpl squad grid --format json
107
+ ```
108
+
109
+ If format is `"both"`, also run:
110
+
111
+ ```bash
112
+ fpl squad grid --draft --format json
113
+ ```
114
+
115
+ ### B5 -- Price Movements
116
+
117
+ ```bash
118
+ fpl price-history --format json
119
+ ```
120
+
121
+ ### B6 -- Chip Timing Analysis (classic only - skip if format is "draft")
122
+
123
+ ```bash
124
+ fpl chips timing --format json
125
+ ```
126
+
127
+ ### B7 -- Player Detail (on-demand)
128
+
129
+ For deeper analysis of specific players flagged by other commands:
130
+
131
+ ```bash
132
+ fpl player "{player_name}" --format json
133
+ ```
134
+
135
+ ### B8 -- Statistical Leaders
136
+
137
+ ```bash
138
+ fpl stats --format json
139
+ ```
140
+
141
+ <!-- ADAPT: Add your own supplementary data sources here. Examples:
142
+ - `fpl preview --save --scout` generates a GW preview with fixture analysis and scout insights.
143
+ Read the saved file and inject its content into Phase C sub-agents as additional context.
144
+ - Newsletter extracts (e.g. community tips, model projections) saved as markdown files
145
+ -->
146
+
147
+ ---
148
+
149
+ ## Phase C: Analysis Sub-agents
150
+
151
+ Dispatch sub-agents based on `metadata.format` from A1:
152
+ - `"classic"` -- dispatch C1 only
153
+ - `"draft"` -- dispatch C2 only
154
+ - `"both"` -- dispatch C1 and C2 in parallel (or sequentially if parallel is unsupported)
155
+
156
+ Each sub-agent receives the JSON output from Phase B commands as context.
157
+
158
+ ### C1 -- Classic League Analysis (skip if format is "draft")
159
+
160
+ - **model**: opus
161
+ - **subagent_type**: general-purpose
162
+
163
+ **Prompt structure:**
164
+
165
+ > You are an FPL analyst preparing gameweek {N} recommendations for a classic league.
166
+ >
167
+ > **Mode: {mode}** (transfer | squad-builder)
168
+ >
169
+ > Refer to `references/rules.md` for analysis rules and `references/output-template.md` for the output format.
170
+ >
171
+ > **Data (JSON):**
172
+ > - Status: {A1 output}
173
+ > - Chips: {A1.5 output}
174
+ > - pFDR: {B1 output}
175
+ > - Captain candidates: {B2 output}
176
+ > - Squad: {B4 output}
177
+ > - Price movements: {B5 output}
178
+ > - Chip timing: {B6 output}
179
+ > - Stats leaders: {B8 output}
180
+ >
181
+ > <!-- ADAPT: Add your own supplementary data sources here (newsletters, external reports) -->
182
+ >
183
+ > If mode is `squad-builder`, apply squad-builder rules from `references/rules.md` instead of transfer rules.
184
+ >
185
+ > Produce the **Classic** section of the output template.
186
+
187
+ ### C2 -- Draft League Analysis (skip if format is "classic")
188
+
189
+ - **model**: sonnet
190
+ - **subagent_type**: general-purpose
191
+
192
+ **Prompt structure:**
193
+
194
+ > You are an FPL analyst preparing gameweek {N} recommendations for a draft league.
195
+ >
196
+ > Refer to `references/rules.md` for analysis rules and `references/output-template.md` for the output format.
197
+ >
198
+ > **Data (JSON):**
199
+ > - Status: {A1 output}
200
+ > - pFDR: {B1 output}
201
+ > - Waivers: {B3 output}
202
+ > - Squad: {B4 output}
203
+ > - Stats leaders: {B8 output}
204
+ >
205
+ > <!-- ADAPT: Add your own supplementary data sources here (newsletters, external reports) -->
206
+ >
207
+ > Produce the **Draft** section of the output template.
208
+
209
+ ### C2.5 -- Transfer/Waiver Evaluation
210
+
211
+ After each sub-agent identifies OUT candidates and an IN shortlist (from squad analysis, `fpl targets`, `fpl waivers`), run the transfer evaluation script for each OUT/shortlist pair:
212
+
213
+ ```bash
214
+ python3 "${CLAUDE_SKILL_DIR}/scripts/transfer_eval.py" --out "{out_player_name}" --in "{comma-separated IN candidate names}"
215
+ ```
216
+
217
+ The script outputs JSON with Outlook (multi-GW quality) and This GW (lineup impact) deltas for each IN candidate vs the OUT player. Use these scores as the quantitative baseline for transfer/waiver recommendations. Sub-agents may override with qualitative reasons (press conference intel, newsletter signals) using the same `⚡ Override: {reason}` pattern as starting XI overrides.
218
+
219
+ If the script fails (exit 1), fall back to LLM-driven transfer reasoning and note the failure.
220
+
221
+ ### C3 -- Starting XI Selection
222
+
223
+ Run the lineup engine for each active format's squad **before** bench ordering:
224
+
225
+ ```bash
226
+ python3 "${CLAUDE_SKILL_DIR}/scripts/starting_xi.py" --squad "{comma-separated 15 squad player names from squad grid}"
227
+ ```
228
+
229
+ <!-- ADAPT: Replace with your squad player names from the squad grid output -->
230
+
231
+ Use the script's recommended XI as the default lineup. Sub-agents may override specific picks with stated qualitative reasons (press conference intel, newsletter signals, rotation predictions). Mark any overrides with `⚡ Override: {reason}` in the output. If the script fails (exit 1), fall back to manual selection and note the failure.
232
+
233
+ ### C4 -- Bench Ordering
234
+
235
+ Using the starting XI from C3 (or the sub-agent's overridden version), run the bench order script:
236
+
237
+ ```bash
238
+ python3 "${CLAUDE_SKILL_DIR}/scripts/bench_order.py" --starting "{comma-separated starter names}" --bench "{comma-separated bench names}"
239
+ ```
240
+
241
+ Incorporate the bench ordering output into the relevant sections of each sub-agent's recommendations.
242
+
243
+ ---
244
+
245
+ ## Phase D: Output
246
+
247
+ Combine the outputs from whichever sub-agents were dispatched into a single recommendations file. If only one format is active, the file contains only that format's section.
248
+
249
+ <!-- ADAPT: Set your output directory -->
250
+ **Output path:** `[YOUR_OUTPUT_DIR]/gw{N}-recommendations.md`
251
+
252
+ The file should follow the structure defined in `references/output-template.md`, with both Classic and Draft sections populated.
253
+
254
+ Present a brief summary to the user:
255
+ - GW number and deadline
256
+ - Mode (transfer or squad-builder)
257
+ - Key highlights (top captain pick, priority transfer/waiver, chip timing note)
258
+ - Output file path
@@ -0,0 +1,161 @@
1
+ # GW-Prep Output Template
2
+
3
+ Template structure for the gameweek recommendations file.
4
+
5
+ **Output path:** `[YOUR_OUTPUT_DIR]/gw{N}-recommendations.md`
6
+
7
+ ---
8
+
9
+ ## File Structure
10
+
11
+ ```markdown
12
+ # Gameweek {N} Recommendations
13
+
14
+ **Deadline:** {deadline}
15
+ **Mode:** {transfer | squad-builder}
16
+ **Generated:** {timestamp}
17
+
18
+ ---
19
+
20
+ ## Classic League
21
+
22
+ ### Chip Timing
23
+
24
+ Summary of chip timing analysis. Note if any chip is recommended for this GW or upcoming GWs, with rationale.
25
+
26
+ ### Captain Pick
27
+
28
+ | Rank | Player | Team | Opponent (pFDR) | Key Stat | Rationale |
29
+ |------|--------|------|-----------------|----------|-----------|
30
+ | 1 | | | | | |
31
+ | 2 | | | | | |
32
+ | 3 | | | | | |
33
+
34
+ **Recommended captain:** {player} -- {one-line rationale}
35
+
36
+ ### Transfer Recommendations
37
+
38
+ _If mode is `squad-builder`, replace this section with Squad Builder below._
39
+
40
+ | Priority | Out | In | Outlook | This GW | Net Cost | Rationale |
41
+ |----------|-----|----|---------|---------|----------|-----------|
42
+ | 1 | | | | | | |
43
+ | 2 | | | | | | |
44
+ | 3 | | | | | | |
45
+
46
+ Outlook = multi-GW quality delta (target score). This GW = lineup impact delta. Both from `transfer_eval.py`.
47
+
48
+ **Total hits:** {0 or -4/-8} | **Net expected gain:** {points}
49
+
50
+ For each transfer, include:
51
+ - Upcoming fixtures (next 3 GWs)
52
+ - Form summary
53
+ - Price trend
54
+
55
+ ### Squad Builder (Wildcard/Free Hit only)
56
+
57
+ _Replace Transfer Recommendations when mode is `squad-builder`._
58
+
59
+ **Budget:** {available} | **Formation:** {primary} / {secondary}
60
+
61
+ #### Recommended XV
62
+
63
+ | Pos | Player | Team | Price | Next 3 Fixtures | Rationale |
64
+ |-----|--------|------|-------|-----------------|-----------|
65
+ | GK | | | | | |
66
+ | GK | | | | | |
67
+ | DEF | | | | | |
68
+ | DEF | | | | | |
69
+ | DEF | | | | | |
70
+ | DEF | | | | | |
71
+ | DEF | | | | | |
72
+ | MID | | | | | |
73
+ | MID | | | | | |
74
+ | MID | | | | | |
75
+ | MID | | | | | |
76
+ | MID | | | | | |
77
+ | FWD | | | | | |
78
+ | FWD | | | | | |
79
+ | FWD | | | | | |
80
+
81
+ **Total cost:** {total} | **Remaining budget:** {remaining}
82
+
83
+ ### Bench Order
84
+
85
+ BenchOrderAgent recommended order:
86
+
87
+ | Bench Slot | Player | Score | Rationale |
88
+ |------------|--------|-------|-----------|
89
+ | GK | | | |
90
+ | 1st sub | | | |
91
+ | 2nd sub | | | |
92
+ | 3rd sub | | | |
93
+
94
+ Coverage notes (sole-coverage positions, rotation risks).
95
+
96
+ ### Momentum Alerts
97
+
98
+ - **Hot streaks:** {players}
99
+ - **Cold streaks:** {players}
100
+ - **Minutes risks:** {players}
101
+ - **Price alerts:** {players}
102
+
103
+ ### pFDR Overview
104
+
105
+ Best and worst fixture runs by position for the next 5 GWs.
106
+ Cross-referenced against current squad holdings.
107
+
108
+ ---
109
+
110
+ ## Draft League
111
+
112
+ ### Waiver Recommendations
113
+
114
+ | Priority | Drop | Claim | Position | Outlook | This GW | Fixture Run | Rationale |
115
+ |----------|------|-------|----------|---------|---------|-------------|-----------|
116
+ | 1 | | | | | | | |
117
+ | 2 | | | | | | | |
118
+ | 3 | | | | | | | |
119
+ | 4 | | | | | | | |
120
+ | 5 | | | | | | | |
121
+
122
+ Outlook = multi-GW quality delta (target score). This GW = lineup impact delta. Both from `transfer_eval.py`.
123
+
124
+ ### Starting XI
125
+
126
+ Recommended lineup with formation (via lineup engine).
127
+
128
+ | Pos | Player | Score | Opponent (pFDR) | Form | Rationale |
129
+ |-----|--------|-------|----------------|------|-----------|
130
+ | GK | | | | | |
131
+ | DEF | | | | | |
132
+ | DEF | | | | | |
133
+ | ... | | | | | |
134
+
135
+ Score = lineup engine score (0-100). If a player was overridden into/out of the XI, append: `⚡ Override: {reason}`
136
+
137
+ **Formation:** {e.g. 3-4-3}
138
+
139
+ ### Bench Order
140
+
141
+ BenchOrderAgent recommended order:
142
+
143
+ | Bench Slot | Player | Score | Rationale |
144
+ |------------|--------|-------|-----------|
145
+ | GK | | | |
146
+ | 1st sub | | | |
147
+ | 2nd sub | | | |
148
+ | 3rd sub | | | |
149
+
150
+ ### Momentum Alerts
151
+
152
+ - **Hot streaks:** {players}
153
+ - **Cold streaks:** {players}
154
+ - **Minutes risks:** {players}
155
+
156
+ ---
157
+
158
+ ## Notes
159
+
160
+ Any additional context, caveats, or follow-up actions.
161
+ ```
@@ -0,0 +1,137 @@
1
+ # GW-Prep Analysis Rules
2
+
3
+ Rules governing how sub-agents should analyse data and produce recommendations.
4
+
5
+ ---
6
+
7
+ ## Transfer Recommendations (Classic -- Transfer Mode)
8
+
9
+ When `mode = "transfer"`:
10
+
11
+ 1. **Prioritise by horizon** -- rank transfers by expected point gain over the next 3 gameweeks, not just the immediate fixture.
12
+ 2. **FDR weighting** -- weight upcoming fixture difficulty using the pFDR data. Players facing a run of low-pFDR fixtures (2-3 range) are preferred over those with a single good fixture followed by hard ones.
13
+ 3. **Form vs fixtures** -- blend recent form (last 4 GW points, minutes) with fixture difficulty. A player in strong form facing medium fixtures can outperform a cold player facing easy ones.
14
+ 4. **Price trajectory** -- flag players whose price is rising (buy pressure) or falling (sell pressure). Prioritise transfers that protect squad value.
15
+ 5. **Maximum 3 transfer suggestions** -- rank by priority. For each transfer, state: player out, player in, rationale, net cost, and expected point swing.
16
+ 6. **Hit threshold** -- only recommend a points hit (-4) if the expected gain across the planning horizon exceeds 8 points.
17
+
18
+ ## Squad-Builder Rules (Classic -- Wildcard/Free Hit Mode)
19
+
20
+ When `mode = "squad-builder"`:
21
+
22
+ 1. **Full squad optimisation** -- evaluate all 15 slots, not incremental changes.
23
+ 2. **Budget constraint** -- the total squad must fit within the available budget (selling price of current squad + bank).
24
+ 3. **Formation flexibility** -- build a squad that supports at least two viable formations (e.g. 3-4-3 and 4-4-2).
25
+ 4. **Fixture spread** -- avoid more than 3 players from a single team. Distribute across favourable fixture runs.
26
+ 5. **Captaincy ceiling** -- ensure at least 2 premium captaincy options with high expected output over the chip horizon.
27
+ 6. **Bench playability** -- bench players should have a realistic chance of returning points (avoid £4.0m non-players).
28
+
29
+ ## Waiver Recommendations (Draft)
30
+
31
+ 1. **Waiver priority order** -- rank targets by expected impact. The top waiver claim should be the highest-confidence improvement.
32
+ 2. **Positional need** -- prioritise positions where the current squad is weakest (fewest viable starters, worst upcoming fixtures).
33
+ 3. **Availability likelihood** -- consider whether high-value targets are likely to be claimed by opponents with higher waiver priority.
34
+ 4. **Fixture run** -- as with classic, weight the next 3 gameweeks of fixtures rather than just the immediate one.
35
+ 5. **Maximum 5 waiver suggestions** -- for each: player to drop, player to claim, positional context, and fixture rationale.
36
+
37
+ ## Transfer/Waiver Evaluation Script
38
+
39
+ The `transfer_eval.py` script provides quantitative **Outlook** (multi-GW quality, target score 0-100) and **This GW** (lineup impact, lineup score 0-100) deltas for each IN candidate vs the OUT player. Use these as the baseline for transfer and waiver recommendations.
40
+
41
+ - **Positive Outlook delta:** the IN candidate is a better long-term hold
42
+ - **Positive This GW delta:** the IN candidate is a better starter this week
43
+ - **Override only with stated qualitative reasons** (press conference intel, newsletter signals, rotation predictions)
44
+ - All existing transfer rules still apply (hit threshold > 8pts, max 3 suggestions, 3-GW horizon priority, affordability check)
45
+
46
+ ## Blended Analysis
47
+
48
+ For all formats:
49
+
50
+ 1. **Recent form** -- last 4 GW average points, minutes played (flag rotation risks below 60 mins average).
51
+ 2. **Expected stats** -- where available, prefer xG/xA-based analysis over raw goals/assists. Flag players significantly over- or under-performing their expected stats.
52
+ 3. **Set-piece involvement** -- note players on corners, free kicks, and penalties as these provide floor-raising opportunities.
53
+ 4. **Injury/suspension flags** -- check player availability. Never recommend a player flagged as injured or suspended without explicitly noting the risk.
54
+
55
+ ## Momentum Alerts
56
+
57
+ Flag the following situations prominently:
58
+
59
+ - **Hot streak**: 3+ consecutive GWs returning 6+ points
60
+ - **Cold streak**: 3+ consecutive GWs returning 2 or fewer points
61
+ - **Minutes risk**: started fewer than 2 of last 4 matches
62
+ - **Price crash**: lost 0.2+ in value over the last 5 days
63
+
64
+ ## pFDR (Positional FDR) Analysis
65
+
66
+ For each position (GK, DEF, MID, FWD):
67
+
68
+ 1. Identify the 3 best fixture runs over the next 5 GWs (lowest average pFDR).
69
+ 2. Identify the 3 worst fixture runs (highest average pFDR).
70
+ 3. Cross-reference with the user's current squad to surface mismatches (e.g. holding defenders with terrible upcoming fixtures).
71
+
72
+ ## Selection Requirements
73
+
74
+ Every recommendation must include:
75
+
76
+ - **Player name and team**
77
+ - **Position**
78
+ - **Upcoming fixtures** (next 3 GWs with opponent and pFDR)
79
+ - **Key stat** (the single most compelling number supporting the recommendation)
80
+ - **Risk factor** (the primary reason the recommendation could go wrong)
81
+
82
+ For starting XI selection:
83
+ - **11 players exactly:** 1 GK + 10 outfield
84
+ - **Valid formations:** 3-4-3, 3-5-2, 4-3-3, 4-4-2, 4-5-1, 5-3-2, 5-4-1
85
+ - **Positions are fixed:** Each player's Pos must match their actual position. Never reassign a player to fit a formation.
86
+ - **Bench:** 4 players for both Classic and Draft
87
+ - **Bench ordering:** Must use the bench-order script output. Do not manually order bench players.
88
+
89
+ ## Team Exposure Management
90
+
91
+ When making selection decisions, account for team stacking and use pFDR:
92
+
93
+ **High-risk scenarios (consider benching one):**
94
+ - 2+ attackers from a team with ATK pFDR 5+
95
+ - 2+ defenders from a team with DEF pFDR 5+
96
+ - 2+ players from a team facing a blank GW
97
+ - 3 players from any team in an away fixture
98
+
99
+ **Low-risk/opportunity scenarios:**
100
+ - Double-up attackers on team with ATK pFDR 1-2
101
+ - Double-up defenders on team with DEF pFDR 1-2
102
+ - Triple-up in a DGW (returns spread across both games)
103
+
104
+ In squad-builder mode, hard-cap at 3 players per team unless there is an exceptional fixture/form case (state it explicitly).
105
+
106
+ <!-- ADAPT: Adjust exposure thresholds based on your league's scoring system -->
107
+
108
+ ## Lineup Engine Overrides
109
+
110
+ The starting XI is determined by the lineup engine (`starting_xi.py`). Override only when you have qualitative information the engine cannot access:
111
+ - Press conference intel (confirmed fit/injured/rested)
112
+ - Newsletter rotation predictions
113
+ - Injury updates not yet reflected in FPL data
114
+
115
+ **Rules:**
116
+ - State the reason for every override
117
+ - Mark overrides with `⚡ Override: {reason}` in the Selection table
118
+ - Do not override based on vague preference - the engine accounts for form, fixtures, availability, and team exposure
119
+ - If you override more than 2 players, reconsider whether the engine input (squad grid) was correct
120
+
121
+ <!-- ADAPT: Adjust override rules based on your data sources and confidence level -->
122
+
123
+ ## Affordability Analysis
124
+
125
+ If budget data is available (e.g. from `fpl squad sell-prices`), verify affordability for every classic transfer recommendation. Flag any transfer that requires selling another player to fund it.
126
+
127
+ <!-- ADAPT: Add your own supplementary data sources or rules here -->
128
+
129
+ ## Troubleshooting
130
+
131
+ Common issues when running analysis:
132
+
133
+ - **Stale data**: If CLI output looks outdated, re-run `fpl status --format json` to confirm the current GW.
134
+ - **Missing players**: If a recommended player does not appear in stats output, use `fpl player "{name}" --format json` for direct lookup.
135
+ - **Budget discrepancies**: Cross-check squad sell prices against available budget if transfers seem unaffordable.
136
+
137
+ <!-- ADAPT: Add project-specific troubleshooting notes here -->