A game where players can change the rules of the game itself.
This repository contains the rules, procedures, and player data for a Nomic game. Players take turns proposing rule changes, which are voted on by all active players. The first player to reach 100 points wins.
-
Install dependencies using
uv(recommended) orpip:uv sync # or pip install -e .
-
Configure game paths (optional):
- Copy
.env.exampleto.envif you need to customize file paths - By default, the game looks for files in the
game/directory
- Copy
Install development dependencies:
uv sync --dev
# or
pip install -e ".[dev]"Run tests:
# Unit tests (Python/pytest)
pytest
# Integration tests (Bash scripts)
./tests/integration/test_game_workflows.shThe nomic command provides a unified interface for managing the game. Here are some common examples:
# Player management
nomic players add "John Doe"
nomic players active
nomic players leaderboard
nomic players forfeit --player "John Doe" # Forfeit game (Rule 113)
# Proposal management
nomic proposals add "John Doe" enactment
nomic proposals vote-interactive --proposal 301
nomic proposals resolve
# Game flow
nomic game turn
# Rules and queries
nomic rules get 201
nomic rules numFor detailed CLI documentation and examples, see the Game State Management Guide.
Use the --env flag to specify a custom .env file:
nomic --env /path/to/.env rules num- Rules - The current set of immutable and mutable rules, including all adopted rule changes
- Player Metadata - Current player roster with scores and active status
- Active players take turns proposing rule changes
- All active players vote on each proposal
- Proposals are adopted or rejected based on voting rules
- Scores are updated after voting closes
See the rules file for the current set of rules and the player metadata file for the current list of players, their scores, and who the active player is.
Comprehensive documentation is available in the docs/ directory:
- Game State Management Guide - Complete guide on updating game state, file formats, and workflows
- Architecture Guide - System design, data flow, and component overview
- API Reference - Detailed documentation for all functions and classes
- Development Guide - Contributing, testing, and development workflow
- "No proposals found": Ensure proposal files exist in the game directory
- "Player not found": Check that player names match exactly (case-insensitive)
- "Rule already exists": Each rule number must be unique
- "Invalid proposal": Check that proposal follows game rules (e.g., immutable rules can only be transmuted)
The CLI provides clear error messages for common issues. All errors are logged with context to help diagnose problems.
For detailed troubleshooting and workflow examples, see the Game State Management Guide.