English · Español · 한국어 · 简体中文 · 日本語
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-sidebyside/large-s2:
| no ruleset: 126 lines, 1,571 answer tokens | Chisle: 58 lines, 567 answer tokens |
|---|---|
class OrderStateMachine:
VALID_TRANSITIONS: Dict[OrderState, Set[OrderState]] = {
OrderState.CREATED: {OrderState.PAID, OrderState.CANCELLED},
…
}
def can_transition_to(self, next_state: OrderState) -> bool:
"""Check if transition from current state to next state is valid."""
def transition_to(self, next_state: OrderState) -> None:
"""Transition to the next state. Raises ValueError if transition is invalid."""
def get_current_state(self) -> str:
def get_valid_next_states(self) -> Set[str]:…all inside a file-write tool call it could not make (tools were off), plus a four-scenario demo, a feature list and a recap of the transitions. |
class OrderStateMachine:
VALID_TRANSITIONS = {
OrderState.CREATED: {OrderState.PAID, OrderState.CANCELLED},
OrderState.PAID: {OrderState.SHIPPED, OrderState.CANCELLED, OrderState.REFUNDED},
…
}
def transition(self, new_state: OrderState) -> None:
"""Transition to new_state or raise ValueError if invalid."""
if new_state not in self.VALID_TRANSITIONS[self.state]:
raise ValueError(
f"Cannot transition from {self.state.value} to {new_state.value}"
)
self.state = new_stateThen a short usage block and a one-line recap of the transitions. |
Every raw transcript is committed, losses included. Method and data · why we publish the losses
Other ways to install
# Claude Code plugin marketplace
claude plugin marketplace add JayPokale/Chisle
claude plugin install chisle@chisle
# curl
curl -fsSL https://raw.githubusercontent.com/JayPokale/Chisle/main/install.sh | bash# Windows
irm https://raw.githubusercontent.com/JayPokale/Chisle/main/install.ps1 | iexPer-agent setup, upgrading and config: docs/usage.md.
⭐ Star the repo: it costs zero tokens. · Follow @JayPokale for more tools.
MIT · Contributing · Began as a merge of caveman and ponytail (notices) · Command filters follow RTK's design