```python
"""Fictional campaign proposal planner."""

__all__ = ["plan"]


def plan(rows, budget_cents, excluded_channels=()):
    """Select proposals in input order within the given budget.

    Args:
        rows: Iterable of mappings with ``id`` and ``cost_cents``.
        budget_cents: Nonnegative integer budget in cents.
        excluded_channels: Reserved for a later feature; currently unused.

    Returns:
        A dictionary with exactly ``selected_ids``, ``spent_cents``,
        and ``remaining_cents``.

    Raises:
        ValueError: If ``budget_cents`` is negative, is not an integer,
            or is a boolean.
    """
    if isinstance(budget_cents, bool) or not isinstance(budget_cents, int):
        raise ValueError("budget_cents must be an integer")
    if budget_cents < 0:
        raise ValueError("budget_cents must be nonnegative")

    selected_ids = []
    spent_cents = 0
    remaining_cents = budget_cents

    for row in rows:
        cost_cents = row["cost_cents"]
        if cost_cents <= remaining_cents:
            selected_ids.append(row["id"])
            spent_cents += cost_cents
            remaining_cents -= cost_cents

    return {
        "selected_ids": selected_ids,
        "spent_cents": spent_cents,
        "remaining_cents": remaining_cents,
    }
```