mnmx

Humane errors

Errors help the user recover and never expose internals.

Usage

TypeScript
import { agent, goal } from '@mnmx/engine';
import { errorsHumane } from '@mnmx/engine/stdlib';

const owned = goal.with({
  owner: 'team:checkout',
  nextReview: { on: 'change' },
});

const reviewer = agent({
  id: 'checkout-reviewer',
  model: 'project-review-model',
  prompt: './reviewer.md',
});

export default owned(errorsHumane(reviewer));

Give your reviewer the changed messages and the conditions that trigger them. The rubric asks whether each recovery step works for the affected caller.

Review rubric

Read the bundled reviewer prompt
Review the user-facing errors added or edited in the chosen surface. For a trial, review the supplied failure cases. Quote each message and name the operation that produced it.

1. The message exposes private implementation details, misstates what happened, or recommends an unsafe action.
3. The message accurately identifies the problem, but leaves the caller guessing how to recover.
5. The message accurately describes the problem in the caller's terms and gives a specific, supported next step. If only an operator can resolve it, say who can help.

Use public command names, options, HTTP headers, and response fields where they help. Keep internal module paths, storage details, and underlying exceptions out of the response. Check that the advice works for this failure. A retry that can overwrite someone else's work needs an explicit review step. If the evidence is insufficient to judge recovery, say what is missing.
1
Misleading, unsafe, or exposes internals
3
Accurate but unhelpful
5
Gives an accurate, actionable recovery step