Refactor project structure and update documentation

- Migrated data files to 'data/collection/' and 'data/decks/'.
- Moved 'card_cache.json' to 'cache/'.
- Reorganized 'collection_hydrated/' and 'deck_analysis.json' into 'output/'.
- Updated 'hydrate.py' and script defaults to match the new paths.
- Updated 'README.template.md' and 'AGENTS.template.md' templates.
- Regenerated 'README.md' and 'AGENTS.md'.
This commit is contained in:
Tuan-Dat Tran
2026-02-26 14:51:48 +01:00
parent c6b1a11ebe
commit eea3a6a659
28 changed files with 328 additions and 1126 deletions

View File

@@ -27,21 +27,24 @@ python scripts/analyze_decks.py --help
```
├── hydrate.py # Main CLI - fetches card data from Scryfall
├── card_cache.json # Local cache of Scryfall card data
├── deck_analysis.json # Analysis output
├── collection/ # Raw decklist text files
├── collection_hydrated/ # Enriched card data by type
── deck.json # All cards combined
├── commander.json
│ ├── creatures.json
├── instants.json
├── sorceries.json
├── artifacts.json
├── enchantments.json
├── lands.json
── planeswalkers.json
├── decks/ # Deck definitions (JSON)
│ └── <deck_name>.json # name, commander, colors, archetype, cards
├── cache/
│ └── card_cache.json # Local cache of Scryfall card data
├── output/
│ ├── deck_analysis.json # Analysis output
── hydrated/ # Enriched card data by type
├── deck.json # All cards combined
├── commander.json
├── creatures.json
├── instants.json
├── sorceries.json
├── artifacts.json
├── enchantments.json
── lands.json
│ └── planeswalkers.json
├── data/
│ ├── collection/ # Raw decklist text files
│ └── decks/ # Deck definitions (JSON)
│ └── <deck_name>.json # name, commander, colors, archetype, cards
├── scripts/
│ ├── analyze_decks.py # Find upgrade options for decks
│ ├── find_synergies.py # Search for synergistic cards
@@ -53,7 +56,7 @@ python scripts/analyze_decks.py --help
## Data Formats
### Deck JSON (`decks/*.json`)
### Deck JSON (`data/decks/*.json`)
```json
{
@@ -68,7 +71,7 @@ python scripts/analyze_decks.py --help
}
```
### Card Data (`collection_hydrated/*.json`)
### Card Data (`output/hydrated/*.json`)
Array of card objects with Scryfall fields:
- `name`, `mana_cost`, `cmc`, `colors`, `color_identity`
@@ -79,7 +82,7 @@ Array of card objects with Scryfall fields:
### Adding a New Deck
1. Create `decks/<name>.json` with required fields
1. Create `data/decks/<name>.json` with required fields
2. Run `python scripts/update_docs.py` to regenerate documentation
### Adding a New Script
@@ -97,4 +100,4 @@ Array of card objects with Scryfall fields:
## Current Decks
{{DECK_TABLE}}
{{DECK_TABLE}}