Maximum-efficiency dev mode. Zero-fluff prose combined with YAGNI/ladder-first code decisions. One persona: the senior dev who deletes code for fun and bills by the syllable.
Shorter answers than caveman and ponytail. No accuracy lost.
npx chisle
See both answers
The prompt: "Implement an order state machine covering created, paid, shipped, delivered, cancelled and refunded, with the legal transitions enforced and invalid ones rejected." Excerpts from the verbatim committed answers in raw-314-direct/large-s2:
no ruleset: 132 lines, 1,307 answer tokens
Chisle: 60 lines, 577 answer tokens
class StateTransition:
"""Defines valid state transitions"""
from_state: OrderState
to_states: Set[OrderState]
class OrderStateMachine:
# Define all valid transitions
TRANSITIONS = {
OrderState.CREATED: {OrderState.PAID, OrderState.CANCELLED},
…
}
def __init__(self, order_id: str):
…
self.state_history = [(OrderState.CREATED, datetime.now())]
def can_transition(self, target_state: OrderState) -> bool:
def transition(self, target_state: OrderState) -> bool:
"""
Attempt to transition to target_state.
Returns True if successful, False if invalid.
"""
def get_valid_transitions(self) -> Set[OrderState]:
…plus a StateTransition class nothing uses, example usage and tests, and "Key Design Decisions", "Why these transitions" and "Features" sections.