# task-007

status: done

## goal
Define `RouterConfig` as a serializable data class holding conversation keep-last count and token budget parameters.

## target artifact
`core/router/src/main/kotlin/com/correx/core/router/model/RouterConfig.kt`

## execution steps
- Add `@Serializable` annotation to `TokenBudget` in `core/context/src/main/kotlin/com/correx/core/context/model/TokenBudget.kt` (pre-existing type must be serializable for RouterConfig to compile with `@Serializable`)
- Create `RouterConfig.kt` with `@Serializable` data class:
  - `keepLast: Int` — conversation history keep-last count (default `10`)
  - `tokenBudget: TokenBudget` — token budget from `:core:context` (default `TokenBudget(limit = 5000)`)
- Compile `:core:context:compileKotlin` — succeeds
- Compile `:core:router:compileKotlin` — succeeds
- Compile dependent modules (`infrastructure`, `apps:server`, `apps:cli`) — all succeed
- Run `:core:router:detekt` — clean
- Run `:core:context:detekt` — clean

## changed artifacts
- `core/context/src/main/kotlin/com/correx/core/context/model/TokenBudget.kt` — added `@Serializable` annotation
- `core/router/src/main/kotlin/com/correx/core/router/model/RouterConfig.kt` — new file

## blockers
- None

## notes
- `TokenBudget` was missing `@Serializable` despite being a data class used as a field type. Adding the annotation is a minimal necessary change — it has only `Int` properties and no custom serialization logic needed.
- `RouterConfig` references `TokenBudget` from `:core:context` via the existing dependency declared in `core/router/build.gradle`.
