← ClaudeAtlas

honest-codelisted

Apply the Honest Code principles when writing, reviewing or refactoring code. Use when writing new code, reviewing a diff, refactoring, or when the user asks to make code "honest". Enforces no hidden state, no silent failure, no swallowed error, no implicit default. Delegates every mechanically decidable rule to honest-check and names the ones that need a person.
openhonest/honest-skills · ★ 0 · Code & Development · score 75
Install: claude install-skill openhonest/honest-skills
# Honest Code The other skills in this repository make a model report what it cannot do. This one makes the *code* do it. That is the thread running through every rule below. A class holding hidden state cannot tell you what it will do next. A caught-and-swallowed exception reports success for work that failed. An implicit default absorbs the caller's omission, so the program cannot tell "chose 30 seconds" from "forgot to say." A defensive check re-tests something the signature already promised, which means the promise was never trusted. Each is a way for code to be quietly wrong, and each rule removes one. Nineteen principles follow. The numbering is the Honest Framework's, not this file's, so that a rule number means one thing across every Open Honest artifact. ## What decides each rule, and what cannot Most of these are decidable from source, and a linter decides them. Run it rather than eyeballing them: ```bash honest-check path/to/module.py ``` It ships with the [Honest Framework](https://github.com/openhonest/honest-framework). Its verdict is the operational definition: code that passes is structurally Honest, and there is no "mostly." | # | Principle | Decided by | |---|---|---| | 1 | Dict-lookup polymorphism over if/elif chains | `HC-P001` | | 2 | Typed dicts over classes | `HC-P003`, `HC-P007`, `HC-P010` | | 3 | Pure functions over methods | `HC-P003`, `HC-P004` | | 4 | I/O at the boundary | `HC-P004`, `HC008` | | 5 | Flat composition over inheritance | `HC-P