# Plan: Multilingual Hello-World State Machine

## Context
The project has no existing Python source code. We need to create a simple state machine that cycles through English and Spanish "hello world" greetings, plus pytest tests to verify correctness.

## Files to Create

### 1. `state_machine.py` — Core implementation
- **`StateMachine` class** with:
  - `states` list: `["English", "Spanish"]`
  - `current_state_index` initialized to `0`
  - `greetings` dict mapping state names to their greeting strings:
    - `"English"` → `"hello world"`
    - `"Spanish"` → `"hola mundo"`
  - `current_state` property returning the current state name
  - `run()` method: prints the greeting for the current state and advances to the next state (wrapping around via modulo)

### 2. `test_state_machine.py` — Pytest unit tests
- **`test_english_output`**: Create a `StateMachine`, call `run()`, capture stdout with `capsys`, assert output is `"hello world\n"`
- **`test_spanish_output`**: Create a `StateMachine`, call `run()` once (advance past English), call `run()` again, capture stdout, assert the second output is `"hola mundo\n"`
- **`test_cycles_back`**: Call `run()` twice (through both languages), then call `run()` a third time and verify it outputs `"hello world\n"` again (confirming wrap-around)
- **`test_current_state`**: Verify `current_state` returns `"English"` initially, then `"Spanish"` after one `run()` call

## Verification
```bash
pytest test_state_machine.py -v
```
All 4 tests should pass.
