pokemon-champions-team · diff
git:20260628.9de3cd7 to git:20260710.66eec11
123 added, 75 removed. Audit A to A.
---
name: pokemon-champions-team
- description: Pokemon Champions single/double team building, legality validation, and team diagnostics. Use to parse a team (team-json or Showdown text), validate it against Champions rules (Species/Item Clause, SP caps, roster/learnset/item-pool legality, Mega form/stone match), diagnose coverage/speed/role gaps, analyze 6v6 selection, compare matchups vs the meta top-K (damage/speed/KO both ways), fine-tune SP/EV spreads to survival/speed/KO benchmarks (cliff detection), and retrieve candidate Pokemon to fill a diagnosed gap or diff a replacement's impact. Builds on the dex/meta/damage skills for all facts; holds no duplicate battle data. Also the home of the real-team sample library (tournament + ladder) used as factual reference, never as a synthetic strength score.
+ description: Pokemon Champions single/double team building, legality validation, and team diagnostics. Use when the whole request is about producing, completing, changing, reviewing, or evaluating a Pokemon Champions team; do not trigger from isolated generic words like core/style/include. Chinese examples include "帮我组一队", "配一套双打", "带X组一队", "围绕X做一队", "这队怎么改", "这队怎么选". English examples include "build me a team", "make a doubles team", "team around X", "include X in the team", "rework this team", "review/evaluate my team". Japanese examples include "チームを組んで", "ダブルの構築を作って", "X入りで組んで", "Xを軸にした構築", "この構築を直して", "選出を見て". The mandatory UEP flow uses context-audit, intake, frame, slate-evaluate, checkpoint, and answer-audit receipt gates before presenting build results. Also use to parse or validate a team, diagnose coverage/speed/role gaps, analyze 6v6 selection, compare matchups, fine-tune SP spreads, and retrieve factual real-team evidence.
---
# Pokemon Champions Team
- Build and review Pokemon Champions single and double teams. This skill is an **orchestrator**:
- deterministic scripts emit verifiable facts and legality verdicts; strength trade-offs are left to the
- model. It does **not** invent a "team strength score".
+ Build, validate, diagnose, tune, and review Pokemon Champions teams. This skill is an orchestrator:
+ its scripts emit deterministic facts, legality verdicts, and auditable evidence; the model makes and
+ explains strategic trade-offs. Never invent a composite team-strength score or an objective "best"
+ team.
- Facts always come from the sibling skills — this skill stores no duplicate battle data:
+ Use the sibling skills as factual authorities:
- - `$pokemon-champions-dex` — roster, types, stats, abilities, learnsets, Mega stones, name resolution.
- - `$pokemon-champions-meta` — usage / partners / spreads for the current season/rule.
- - `$ncp-damage-calculator` — damage ranges, KO/survival, speed lines.
+ - `$pokemon-champions-dex`: names, roster, forms, types, stats, abilities, learnsets, and items.
+ - `$pokemon-champions-meta`: current or historical usage, common configurations, and partners.
+ - `$ncp-damage-calculator`: exact damage, KO/survival, and speed calculations.
- ## Status
+ ## Mandatory Protocol
- Route is M1–M5, risk-increasing (see `references/design.md` §13). M1–M4 are implemented; M5 step 1
- (the representative-set query — up-to-3 real-team archetypes per species) and M5 step 2 (the opponent
- standard-set matchup cache) are both done.
+ Read `references/assisted_workflow.md` before every build, diagnose, evaluate, rework, or tune request.
+ It is the authoritative reasoning and routing protocol. The non-negotiable sequence is:
- | Stage | CLI | State |
- |---|---|---|
- | M1 I/O + hard validation: team-json/Showdown, build-context, completeness, validate (incl item pool), owned | `team.py parse` / `validate [--context]` | implemented |
- | M2 diagnose (evidence+confidence+reason) | `team.py diagnose [--aspect defense\|offense\|speed\|roles\|all]` | **defense + offense + speed + roles done** (offense models -ate skins, completeness-aware gaps; speed = landscape + control inventory; roles = objective functional signals + compression, no role labels/score) |
- | M2 selection: 6-pick-3/4, one-Mega, form resolution, objective facts (no score) | `team.py select [--context]` | **v1 done** (speed-control deferred) |
- | M2 matchup: each member vs meta top-K — exact speed, type, **we→them and them→us** ncp damage, speed_coverage; objective facts (no score) | `team.py matchup [--top-k N] [--context]` | **done** (precise them→us threat face ≥15% usage ∪ real-team joint; min–max + possible/guaranteed KO buckets; speed as field coverage) |
- | M2.5 tune: SP fine-tuning as cliff detection — survival + join-speed + kill (ohko/2hko) + slack + nature lanes | `team.py tune --context ctx.json` | **done** (explicit `benchmarks`; SP×nature as bounded discrete lanes, never a top-ranked spread) |
- | M3 candidates: multi-view ranking + replace-impact diff (no blended score) | `team.py fill` / `replace` | **done** (`fill` multi-view candidate pool; `replace` objective before/after diagnose diff) |
- | M4 real-team library → opponent-set resolver (real joint ⊕ meta spread) | wired into `matchup`/`tune` | **done** (singles + doubles libraries ship as data; facts only, confidence-capped) |
- | M5 step 1 representative sets: up-to-3 real-team (item,ability) archetypes per species, each with cluster/coverage/share/spread_origin/confidence; facts only, no score | `team.py repset <species> --game-format single\|double` | **done** (`representative_sets`; prevalence-ordered multi-view, fragmented fallback; spread from real co-occurring SP when source has one) |
- | M5 step 2 opponent cache: precomputed standard-set matchup matrix over meta top-K (offense band/KO + speed line per ordered pair); cell low confidence (vs-standard-set) | `team.py oppmatrix [species] --game-format single\|double [--vs def]` | **done** (ships as data per format; attacker rows only for real-team-backed species; rebuilt by `update.py team-cache`; a reference grid, NOT your team) |
+ 1. Normalize every user-supplied name through the dex, then translate free-form intent into
+ `team-json` and `build-context`. The scripts do not parse conversation text.
+ 2. Run `context-audit` before building or changing a team. Resolve blocking/conflicting gaps and
+ disclose any safe defaults. Keep its `audit_receipt`.
+ 3. For an open-ended new build, drive `intake --next` until the guided walk reports `done:true`.
+ Existing-team analysis does not require onboarding; ask only for blocking/conflicting gaps.
+ 4. Ground a build in current ranking plus real joint evidence (`landscape`, `observed`, `search`, and
+ `repset`). Run `frame` with the audit receipt and build on its grounded skeletons. Do not construct
+ joint sets by stitching together independent usage marginals.
+ 5. Assemble 2-5 candidates unless the user explicitly requests one. Run `slate-evaluate` with the
+ original context, audit receipt, frame output, and frame bindings. Never present an unslated or
+ eliminated candidate.
+ 6. Run `checkpoint` after every build-flow slate. Surface a required pause unless the user explicitly
+ delegated final convergence or asked not to pause.
+ 7. Run targeted `tune` only when adjustment intent or explicit benchmarks exist. Bare NCP calls answer
+ as-is fact questions; they do not replace cliff detection for SP tuning.
+ 8. Initialize the response with `draft-init`, fill its substantive fields, and run `answer-audit` with
+ the original slate and saved slate output. Fix violations and present only a passing draft.
+ 9. Validate every team before presenting it. Doubles six-member evaluation also requires `select`;
+ team-level matchup claims require the full `matchup` table, not hand-picked calculations.
- ## Quick Start
+ At entry, state the phases that will run and track them with the host's available plan/checklist tool.
+ If a phase is later dropped, disclose why. The receipt chain is
+ `context-audit -> frame -> slate-evaluate -> answer-audit`; save every JSON artifact unchanged.
+ The explicit keyword `建队流程` and its aliases listed in `references/assisted_workflow.md` enter the
+ full guided flow unconditionally.
+
+ ## Contract Discovery
+
+ Do not guess payload shapes. The CLI exposes its commands and structured contracts:
+
```bash
- # Parse a team from Showdown text or team-json into canonical team-json:
- python scripts/team.py parse path/to/team.txt --format json
+ python scripts/team.py schema
+ python scripts/team.py vocab
+ ```
- # Validate a team against Champions rules (uses the sibling dex skill for facts):
- python scripts/team.py validate path/to/team.json
- python scripts/team.py validate path/to/team.json --context path/to/context.json
+ `schema` describes command inputs, `team-json`, context specs, session specs, and answer drafts.
+ `vocab` describes enumerated intent fields and which fields are enforced by scripts versus interpreted
+ by the orchestration layer. Read `references/schema.md` for durable domain and cache contracts.
- # Diagnose defense / offense / speed / roles (accepts partial teams; --aspect picks one or all):
- python scripts/team.py diagnose path/to/team.json
- python scripts/team.py diagnose path/to/team.json --aspect roles
+ ## Core Commands
- # Selection matrix: enumerate legal 6-pick-3 (singles) / pick-4 (doubles), one-Mega, objective facts:
- python scripts/team.py select path/to/team.json --context path/to/context.json
+ Parse and validate:
- # Matchup: each member vs the meta's most-used Pokemon (speed / type / we->them damage), no score:
- python scripts/team.py matchup path/to/team.json --top-k 8
+ ```bash
+ python scripts/team.py parse team.txt --format json
+ python scripts/team.py validate team.json --context ctx.json --format json
+ python scripts/team.py diagnose team.json --aspect all --format json
+ ```
- # Representative sets: a species' up-to-3 real-team (item,ability) archetypes by prevalence (facts,
- # not a ranking; spread from real co-occurring SP when the source carries one):
- python scripts/team.py repset Garchomp --game-format double
+ Selection, matchup, and tuning:
- # Opponent matrix: the precomputed standard-set matchup grid over the meta top-K (offense band/KO +
- # speed line per ordered pair). A reference grid, NOT your team — match a real team live via `matchup`.
- # No species = whole matrix; a species = its attacker row; --vs = one (attacker -> defender) cell:
- python scripts/team.py oppmatrix Garchomp --game-format single
- python scripts/team.py oppmatrix Garchomp --game-format single --vs Mimikyu
+ ```bash
+ python scripts/team.py select team.json --context ctx.json --format json
+ python scripts/team.py matchup team.json --top-k 20 --context ctx.json --format json
+ python scripts/team.py tune team.json --context ctx.json --format json
+ ```
- # Session: run several operators on one team in ONE process (siblings stay resident — much faster
- # than separate calls). The spec is a JSON list; output is a JSON list of {op, rc, result}:
- # [{"op":"validate","file":"team.json"},
- # {"op":"diagnose","file":"team.json"},
- # {"op":"matchup","file":"team.json","top_k":8},
- # {"op":"tune","file":"team.json","context":"ctx.json"}]
- python scripts/team.py session path/to/spec.json
+ Run several operators in one process when they belong to the same request:
+
+ ```bash
+ python scripts/team.py session session.json
```
- For a full build that runs validate + diagnose + matchup + tune + select on one team, prefer a single
- `session` call: the dex / meta / ncp siblings are loaded once and reused, cutting wall-clock by ~70%
- versus invoking each operator as its own process. Results are identical to the per-operator calls.
+ The session spec is a JSON array of operations such as `validate`, `diagnose`, `select`, `matchup`,
+ and `tune`. Use the shape emitted by `schema`.
- `--format md` (default) prints a readable report; `--format json` is for programmatic use.
+ ## Build Gates
- ## Data
+ Audit intent and, for new builds, drive intake:
- - `data/teams/` — **real-team sample library** (tournament + ladder), one `<season>_<format>.jsonl`
- per context, each line a `team-json`. This is **factual reference** (cores, performance metadata),
- never a synthetic strength score. It **ships as a snapshot** (facts-only: source identifiers and
- PII are stripped — see `references/schema.md` §2); the maintainer refreshes it via the private
- `dev/update/team/` pipeline, not at query time.
- - `data/opponent_cache/` — **opponent standard-set matchup cache** (M5 step 2), one
- `<season>_<format>.json` per context: a precomputed standard-vs-standard grid over the meta top-K
- (offense band/KO + speed line per ordered pair). Every cell is **low** confidence
- (`vs-standard-set`) — a reference grid, never your team. Served as the current environment (design
- §9); the maintainer rebuilds it via `dev/update/update.py team-cache`. Read via `team.py oppmatrix`.
- - The skill ships query/validation scripts; it does **not** regenerate dex/meta/damage data.
+ ```bash
+ python scripts/team.py context-audit --context ctx.json --format json
+ python scripts/team.py intake --onboarding --context ctx.json --format json
+ python scripts/team.py intake --next --context ctx.json --answered format,purpose --format json
+ ```
- Read `references/design.md` for the full design (philosophy, L1/L2/L3 operators, precomputed
- matchup cache, representative-set algorithm, iterative loop) and `references/schema.md` for the
- `team-json` structure, the multi-source data pipeline, persistence layout, and cache contracts.
+ Ground and evaluate candidates:
- ## Principles
+ ```bash
+ python scripts/team.py landscape --game-format double --context ctx.json --format json
+ python scripts/team.py observed --game-format double --context ctx.json --format json
+ python scripts/team.py frame --game-format double --context ctx.json --audit-receipt audit.json --format json
+ python scripts/team.py slate-evaluate slate.json --frame-output frame.json --format json
+ python scripts/team.py checkpoint slate-output.json --slate slate.json --format json
+ ```
- - Deterministic facts only; the model decides strength. Never emit a single team-strength number.
- - Real performance data (records, placings, ladder rating) is kept as **fact tags** with provenance,
- not normalized into a score, and **never merged across single/double** (different metagames).
- - Old-regulation data (M-A and earlier) is always labeled and never treated as current.
+ Audit the answer:
+
+ ```bash
+ python scripts/team.py draft-init --slate slate.json --slate-output slate-output.json --format json
+ python scripts/team.py answer-audit draft.json --slate slate.json --slate-output slate-output.json --format json
+ ```
+
+ For build flows, set `frame_required:true` in the context/slate and preserve matching receipt files.
+ `slate-evaluate` eliminates invalid or ungrounded candidates and emits the evidence IDs used by the
+ final answer. `answer-audit` certifies structure and recomputable claims, not strategic quality.
+
+ ## Real-Team Evidence
+
+ The bundled sample library is factual evidence, not a leaderboard:
+
+ ```bash
+ python scripts/team.py repset Garchomp --game-format double --format json
+ python scripts/team.py search --game-format double --species Gengar Froslass --format json
+ python scripts/team.py show <team-id> --game-format double --format json
+ python scripts/team.py oppmatrix --game-format double --species Garchomp --vs Charizard --format json
+ ```
+
+ Use `observed` for constraint-shaped retrieval and `search`/`show` for exact library inspection.
+ Adopting an observed team is allowed only with the provenance and adoption-review disclosures required
+ by `answer-audit`. Never silently reproduce a stored team.
+
+ ## Output And Boundaries
+
+ - Use canonical English names in structured JSON; render localized names in the final user-facing
+ response through the dex.
+ - Pass `--lang zh|ja|en` for human-readable CLI output. JSON remains canonical and language-independent.
+ - Keep single and double evidence separate. Keep historical regulations explicitly labeled.
+ - A six-member doubles roster is a toolbox selected 4-of-6; do not judge it as a flat six-member set.
+ - Expose assumptions, confidence, evidence, trade-offs, and omitted alternatives.
+ - Do not infer strength from usage, sample performance tags, or provenance tier alone.
+
+ ## References
+
+ - `references/assisted_workflow.md`: mandatory routing, guided intake, grounding, gates, and final audit.
+ - `references/schema.md`: `team-json`, provenance, representative-set/cache, build-context, evidence,
+ and frame contracts.