agentleFS
junhjangjunhjang/claude-harness/.claude/skills/error-taxonomy/SKILL.md

error-taxonomy

Skill0 starsChanged 6 months agoMITView on GitHub

Adding a new error variant or error enum, wiring an error path between components, or adding a retry loop. Enforces 3-layer taxonomy (boundary/core/coordination), retry policy table, escalation contract.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Preserve cause across boundaries: Use From impls or #[source].

    line 11
  2. Distinctive:

    If unclear which layer a new error belongs to, ask before defining.

    line 16

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Apply when adding an error variant, defining a new error enum, wiring an error path, or adding a retry loop.

  1. Three layers. Boundary (parsers, network ingress, deserializers — never retry the same bytes), core (domain logic, state machines, validators — policy varies by sub-category), coordination (config, startup, supervisors — process-abort on fatal).
  2. Unrecoverable core errors escalate; never auto-correct. A drift between in-memory state and persisted state, an illegal state transition, or a violated invariant must halt the affected subsystem and surface to the operator. Silent auto-correction hides bugs.
  3. Preserve cause across boundaries. Use From impls or #[source]. Never stringify lower-layer errors. Never .map_err(|_| MyError::Whatever) that loses the underlying variant. No catch-all Other(String) variants in long-lived enums.
  4. Structured variants only. Carry typed fields (field: &'static str, offset: usize, expected/got, request id, etc.). No String-typed variants in performance-critical paths.
  5. Forbidden retries. Same input that already failed deterministic parsing; encode/decode errors on unsupported shapes; any illegal-transition error; anything after the subsystem has tripped its circuit breaker. Explicit retry policy or no retry — implicit "user kicks the process" is forbidden.
  6. Vocabulary-mapping errors escalate (unknown enum value, unknown discriminator) — upstream contracts don't add cases silently; if you see one, that's a contract drift and needs operator attention, not a fallback default.

If unclear which layer a new error belongs to, ask before defining.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.