Pokeswift extractor contract change

From Dimillian/PokeSwift · View interactive version

Pokeswift extractor contract change is an AI agent skill from the GitHub repository Dimillian/PokeSwift. Investigate, implement, and validate PokeSwift extraction or shared-contract changes without breaking the source-driven pipeline. Use when work touches `PokeExtractCLI`, `PokeDataModel`, `PokeContent`, generated `Content/Red` artifacts, or any bug where the issue may be in extracted data, schema sha

How to use this skill

Skill file

PokeSwift Extractor Contract Change

Read AGENTS.md and SWIFT_PORT.md before changing milestone-sensitive behavior.

Treat generated content as evidence, not authoring surface. Prefer fixing the first broken contract layer instead of compensating in runtime code.

Workflow

  1. Define the failing contract.

Capture the exact value or shape that is wrong: missing dialogue ID, wrong warp/checkpoint, broken map script, bad trainer manifest, missing audio cue metadata, stale item/species/move field, or loader decode mismatch.

  1. Trace the first diverging layer.

Use this order:

pret/pokered asm/data -> PokeExtractCLI -> Content/Red -> PokeDataModel/PokeContent -> PokeCore/PokeUI.

Fix the first layer that differs from the expected source-driven result.

  1. Pick the right ownership boundary.

If the extracted value is wrong, change PokeExtractCLI.

If the extracted value is right but the shared model cannot represent it, change PokeDataModel first.

If the model is right but loading or validation is wrong, change PokeContent.

Only change PokeCore or PokeUI after the upstream contract is correct.

  1. Regenerate instead of patching artifacts.

After extractor changes, run ./scripts/extract_red.sh.

Never hand-edit Content/Red/** as the fix.

  1. Validate upstream first, then downstream.

Run focused PokeExtractCLITests and PokeContentTests.

Then run the smallest runtime or UI tests that consume the changed contract.

Update SWIFT_PORT.md if the shipped scope, milestone boundary, or system ledger changed.

Ownership Guide

Own parsing, normalization, template assembly, and deterministic manifest generation.

Search here for battle text templates, trainer dialogues, encounter tables, map objects/scripts, warps, marts, items, audio cues, and source-derived flags.

Treat as generated output.

Diff it to confirm what changed, but do not author fixes here.

Own shared manifests and save/telemetry schemas.

Put contract changes here before duplicating structure in loaders or runtime code.

Own content loading, validation, and repo-contract tests.

Fix this layer when manifests are correct but decoding, validation, or loader defaults are wrong.

Consume contracts.

Change these only after upstream data and shared types are proven correct.

Common Triggers

File Checklist

Validation Matrix

Run ./scripts/extract_red.sh.

Run focused PokeExtractCLITests and PokeContentTests.

Run the smallest relevant PokeCoreTests or PokeUITests slice.

Run tuist generate --no-open before broader validation.

Failure Shields

Review Mode

When reviewing an extractor or contract patch:

Output Expectations

Report these points clearly:

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.