The Mana base guide (prez, deckwright/261109-mana-base-guide) already holds a land and rock catalog that Jaime wants kept exactly as it is. This spec adds a guided builder above it. A player gives a commander or a decklist, gets target land and colour-source counts, walks six steps that each show only the cards for that step, collects a mana base list while watching prices and targets, and exports a buy list. A Craft it for me button runs the same steps automatically under a budget.
It is the user-facing half of the Deckwright mana base feature request of 2026-11-01 (my-lib/runtime/deliverables/261101-deckwright-manabase-package-feature-request.md), and it may be the first Deckwright piece we publish.
1. Decisions already made
These come from Jaime, 2026-11-09:
- The catalog stays. The current Card Catalog (Lands and Rocks, each by colour identity, by cycle and by effect) is unchanged and sits below the builder, with a jump link at the top.
- Prez now, stack.gg later. Nothing in the builder may depend on prez beyond the optional share header.
- No Scryfall at run time. The page never calls Scryfall’s API or image server. Card data, images and prices are hosted on prgn.ai.
- Ultra cheap. This machine does the refresh work for now, and moves to Jaime’s other machine later.
- Refresh on demand, not daily. Jaime runs a Claude Code skill when he wants fresh prices and cards.
- Our own compact card index for reading decklists.
- Images from our own hosting, loaded when needed.
- Colourless utility lands in v1: open slots for the player to choose. Any staples the builder pre-fills must come from research, and none exists yet: a research task (below) produces them, tied to Deckwright backlog B-15. Deckwright excludes inclusion-rate data by design, so popularity is not the method.
- The guided path should be fun: a walk through the steps that presents cards, shows prices and lets the player choose.
- The buy list lives nowhere. It is copied to the clipboard or downloaded as a file.
2. The page
2.1 Order on the page
- A short header and a jump link to the Card Catalog.
- The builder: Step 1 to Step 6, then the list and export.
- The Card Catalog, as today.
2.2 The builder, step by step
- Step 1 · Your deck. Paste a decklist or pick a commander. With only a commander, the player also gives an average mana value and a count of cheap draw and ramp spells, or accepts defaults. Output: colour identity, land count (Karsten’s 99-card formula), colour sources needed per colour (Karsten’s table, from the deck’s hardest costs), the utility land budget (6 to 10), and a ramp target (about 10).
- Step 2 · Any-colour lands. The free ones, the conditional ones (with the share of the deck that meets each condition when a decklist was given), and the costly ones only in three or more colours.
- Step 3 · Lands that make two or more of your colours. The identity’s ranked list, best first.
- Step 4 · Utility lands. First the ones that make your colours, which replace a basic. Then the colourless ones, by job: a few staples pre-filled, the rest open for the player.
- Step 5 · Basics. The remainder, split by colour pips, with a warning when too few basics remain for the lands that count them.
- Step 6 · Rocks. The core, the identity’s rocks, then utility rocks by job.
Each step shows only its own cards, filtered to the identity. Each card row shows its price and an Add button. Cards already on the list are marked.
2.3 The list
- A panel that stays in view (side on desktop, bottom sheet on phone) with the chosen cards grouped by step.
- Live meters against the Step 1 targets: lands, sources per colour, tapped and conditional lands, utility lands used, rocks, total price.
- Add and remove anywhere, including from the Card Catalog.
- Kept in the browser’s local storage per viewer, so a reload does not lose it. Nothing is stored on a server in v1.
2.4 Export
- TCGplayer Mass Entry: one
1 Card Nameper line. Double-faced cards need a check against TCGplayer’s import before release: whether it accepts the fullA // Bname or only the front face is not yet confirmed. - Moxfield text, and plain text.
- Copy to clipboard and download as a
.txtfile.
2.5 Craft it for me
Inputs: Step 1’s deck (or a commander, identity and target average mana value) and a budget preset ($25, $100, $500, no cap) or a number. An Owned only preset arrives with collection upload, since $0 means choosing from a collection. It walks Steps 2 to 6 with the same data the guided path uses: the fill order cut at the budget, Deckwright’s colour-source checks, the free coloured utility lands, then open slots for colourless ones until the research task lands. The result lands in the list, where the player can change anything.
2.6 The guided feel
One step is open at a time, with a progress bar across the six, the recommended picks highlighted, a running price and meters that react to each pick. Finishing a step moves to the next. The player can always jump around. No account, no sign-in.
3. Data
3.1 One data file, versioned
Everything the builder and the catalog show comes from one JSON file, mana-data.json:
| Part | Holds |
|---|---|
meta |
schema version, build date, source dates |
rules |
Karsten formula constants, sources table, utility budget, ramp target |
tiers |
tier ids, labels, explanations, order |
cards |
every land and rock in the catalog |
identities |
per identity: ranked lands and rocks |
steps |
per step: title, explanation, which tiers and groups it shows |
staples |
colourless utility staples, empty until the research task fills it |
The page code reads fields by name, ignores unknown fields and renders whatever tiers, groups and steps the data names. A new cycle, a re-tiered land, a new step or new explanation text is a data change and needs no code change. The page checks meta.schema_version and shows a plain error banner if it cannot read the file. A schema test runs on every build of the file.
3.2 The compact card index
For reading decklists: every Commander-legal card’s name, mana cost, mana value, type and colour identity, plus two fields Deckwright computes and the browser cannot: whether the card counts as cheap draw or ramp, and its coloured pips. Measured 2026-11-09: 32,116 cards, 2.3 MB raw, 0.53 MB compressed. One static file, card-index.json.
3.3 Images
Only the cards the builder and catalog show, about 450, at 240 px wide in WebP: roughly 10 MB in total. Fetched once from Scryfall at build time and served as static files from prgn.ai. The catalog keeps its embedded images until it moves to the same files.
3.4 Prices
From Deckwright’s card store, which already loads Scryfall’s daily bulk files (prices included): the cheapest paper, non-foil USD price of any tournament-legal printing, dated. The page shows the date. Memorabilia printings (Collectors’ Edition, 30th Anniversary Edition, gold-bordered) are excluded: on 2026-11-09 the cheapest Savannah in the store was a $200.05 30th Anniversary copy against $417.79 for Revised.
4. Hosting and refresh
- v1 hosting: static files in the presentations repo, served by prez on Vercel. No database and no server code. Cost: nothing beyond today.
- Refresh on demand: a Claude Code skill,
/refresh-mana-guide, run on this machine. It runs Deckwright’s card store refresh (Scryfall’s daily bulk files), rebuildsmana-data.json, the card index, any new images and the catalog page, runs the schema and drift tests, and, if anything changed and the tests pass, commits and pushes the presentations repo so Vercel redeploys. Running the skill is the go-ahead for that push. - Why not a button on the page: prez serves static files, so a button would need a server that can reach this machine. That adds hosting and an exposed endpoint for something run a few times a month.
- Later: the same skill runs on the other machine. For stack.gg, the builder folder is copied as is. The play.prgn.ai Supabase project comes in only when something needs a server: saved or shared lists, a collection upload.
5. Logic and drift
- Land tiers, fill orders, conditions and jobs come from Deckwright’s manabase data and our curated
utility.json, through one export script on our side that reads Deckwright’s outputs. Deckwright’s code is not edited; a backlog item asks Deckwright to own the export later. - Step 1 math (land count, sources needed, sources counted) is a small JavaScript port of
deckwright_manabase.tune’sland_count,requirementsandcounting.sources. Its constants come fromrulesin the data file. - Drift test: the export script runs Deckwright’s Python on about 20 fixed decks (Leinore, the Scarab God builds and others across one to five colours) and writes the expected numbers. A Node test runs the JavaScript on the same decks and fails if any number differs. Both run on every data build.
6. Phases
Each phase ships to prez, ends with an independent review, and is done only when its checks pass.
| Phase | Ships | Done when |
|---|---|---|
| 1 | Data file, steps layout, identity picker | catalog unchanged; steps match catalog |
| 2 | Step 1 decklist tool | drift test passes on all fixtures |
| 3 | List, meters, export | TCGplayer import tested by hand |
| 4 | Craft it for me | Leinore result matches our hand-built base |
| 5 | /refresh-mana-guide skill |
a run with no changes pushes nothing; a run after new prices pushes |
| R | Research: colourless utility staples | a research note with a ranked list and its method |
7. Not in v1
- Accounts, saved or shared lists, collection upload and owned-card marking.
- Picking colourless utility lands by strategy (needs Deckwright B-15).
- An Owned only budget preset (needs collection upload).
- Edits to Deckwright’s code.
8. Decisions
- Refresh: on demand through a skill (Jaime, 2026-11-09).
- Price basis: cheapest tournament-legal paper non-foil printing (Jaime, 2026-11-09).
- Colourless utility staples: from research only; none until the research task delivers (Jaime, 2026-11-09).
- Budget presets: $25, $100, $500 and no cap; $0 becomes Owned only with collection upload (Jaime, 2026-11-09).