# Plan: Multilingual Hello-World State Machine

## Context
The project is a fresh repo with no existing Python code. We need to create a simple state machine that cycles through English and Spanish greetings, along with pytest tests.

## Files to Create

### 1. `project/state_machine.py` — State machine implementation
- Define a `StateMachine` class with two states: `"english"` and `"spanish"`
- Store states as an ordered list: `["english", "spanish"]`
- Track current state index (starting at 0 / English)
- `run()` method: prints the greeting for the current state and advances to the next state (wrapping around)
- Greeting map: `{"english": "hello world", "spanish": "hola mundo"}`

### 2. `project/test_state_machine.py` — Pytest unit tests
- **`test_english_output`**: Create a `StateMachine`, call `run()`, assert captured stdout is `"hello world\n"`
- **`test_spanish_output`**: Create a `StateMachine`, advance to Spanish state, call `run()`, assert captured stdout is `"hola mundo\n"`
- **`test_cycles_through_languages`**: Call `run()` twice, verify outputs cycle English → Spanish; call again to verify it wraps back to English
- Use pytest's `capsys` fixture to capture print output

## Verification
```bash
cd project && python -m pytest test_state_machine.py -v
```
All tests should pass. Additionally, run `python -c "from state_machine import StateMachine; sm = StateMachine(); sm.run(); sm.run(); sm.run()"` to visually confirm cycling output.
