con un clic
mtg-pure
mtg-pure contiene 11 skills recopiladas de thomaseding, con cobertura ocupacional por repositorio y páginas de detalle dentro del sitio.
Skills en este repositorio
Add a new Magic card (or token) definition to mtg-pure. Use whenever the user asks to add, implement, model, or encode an MTG card/token — anything that ends up as a new binding in src/MtgPure/Cards.hs. Handles the DSL body plus the three-place wiring (export, AllCards, cSpell) that is easy to miss by hand.
Add a card-authoring combinator to MtgPure.Model.Combinators in mtg-pure. Use when a card definition needs DSL vocabulary that doesn't exist yet (a new effect/cost/requirement/ability helper), or when card code is reaching for a raw Recursive constructor because no combinator wraps it. Explains the thin-wrapper + As* coercion pattern and how combinators relate to the Recursive DSL.
Add or wire a cross-module engine operation through the Fwd indirection in mtg-pure (the Fwd/Type, Fwd/Impl, Fwd/Api trio). Use when an engine function in one MtgPure.Engine.* module needs to call a function defined in another engine module, when you hit an import cycle between engine modules, or when adding a new primitive the engine exposes. Also covers the Magic visibility/read-write capability types those signatures use.
Add a scripted gameplay test under src/Test/Game/ in mtg-pure (a replayed terminal game that exercises specific cards/interactions). Use when the user wants a test for a card or rules interaction, a regression test for an engine change, or a reproducible game scenario. Covers the test skeleton, the replay-input mini-language, and registering the module.
Build the mtg-pure Haskell project with cabal/GHC. Use whenever you need to compile the project, verify a change type-checks, do a clean build, or diagnose a build failure. Covers the PowerShell/Windows setup and the ToObjectN code-generation prestep (which you should NOT run proactively — it forces a long recompile).
Rewrite a specified file so it reads as if Thomas Eding (the project maintainer and sole original author of mtg-pure) wrote it himself. Use whenever the user asks to make a file "look like I wrote it", "match my style", "sound like me", "de-AI-ify", "blend in", "chameleon" a file, or clean up AI-authored or contributed code so it matches the house voice — even if they only say "fix the style of X.hs". Also use as a final pass after generating any substantial new module, when asked to make it indistinguishable from hand-written code.
Add or change a constructor in the recursive card DSL (MtgPure.Model.Recursive types like Effect, Elect, Cost, Requirement, Condition, abilities) in mtg-pure, keeping the hand-written ConsIndex / Show / Ord instances in lockstep. Use whenever you add, remove, or rename a constructor of a Recursive.* GADT — the project's "a card reproduces its own source" invariant depends on these instances being updated together.
Scaffold a new Haskell module in mtg-pure that conforms to the strict house style (Safe header, HLINT-ignore block, mandatory export list, `import safe`, GADT-syntax data decls, InstanceSigs). Use when adding any new .hs module under src/, or when an existing module's header/imports need to be brought in line with the project conventions.
Regenerate the git-ignored generated ToObjectN instance code in mtg-pure. Use when the user changes the ObjectN / OT type machinery and needs the ToObjectN.Instances files rebuilt, when a build fails on missing ToObject instances, or when someone has hand-edited a generated file (which must never be done). Explains what regenerates, how, and what to change instead of the output.
Run mtg-pure's tests and demo. Use when the user wants to run/verify a test, exercise a card or rules interaction, reproduce a game scenario, or check that a change still passes. Prefer the `run-tests` executable (unit + headless game replays) — it runs non-interactively. mtg-pure has no cabal test-suite; the terminal game replays and demo are `main<Name>` entry points run from cabal repl.
Update mtg-pure's cabal dependency bounds and source to build on a newer GHC/toolchain than it was pinned to. Use when cabal build fails with dependency version-bound conflicts, "unknown package", Cabal-8011 configure errors, or newly-fatal GHC warnings after a compiler upgrade. Covers bumping build-depends to the boot-library versions and the recurring GHC-9.10 / base-4.20 source fixes.