CtrlK
BlogDocsLog inGet started
Tessl Logo

jbaruch/coding-policy

General-purpose coding policy for Baruch's AI agents

91

1.15x
Quality

93%

Does it follow best practices?

Impact

91%

1.15x

Average score across 12 eval scenarios

SecuritybySnyk

Advisory

Suggest reviewing before use

Overview
Quality
Evals
Security
Files

error-handling.mdrules/

alwaysApply:
Yes

Error Handling

Specific Exceptions

  • Catch specific exception types, never bare catch-all handlers
  • Let unexpected exceptions propagate — they indicate bugs that need fixing, not hiding

Actionable Messages

  • Error messages must tell the user what to do, not just what went wrong
  • Bad: "File not found"
  • Good: "Config file not found at ~/.config/app.toml — run app init to create one"

Graceful Fallback

  • When multiple approaches exist, try alternatives before failing
  • Example: try the preferred tool, fall back to an alternative, then fail with a clear message listing what was tried

Structured Logging

  • Log at appropriate levels: DEBUG for internals, INFO for progress, WARN for recoverable issues, ERROR for failures
  • Include enough context to diagnose without reproducing: input parameters, relevant state, error details
  • Never log secrets, tokens, passwords, or credentials — not even at DEBUG level

README.md

tile.json