Usage
import { agent, goal } from '@mnmx/engine';
import {
mnmxVisualLanguage,
visualLanguageGoal,
} 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(visualLanguageGoal(mnmxVisualLanguage, reviewer));
Pass a resolved VisualLanguage and your project’s reviewer. The goal takes its ID from the language. Each token and rule becomes an acceptance entry the reviewer can evaluate.
Example acceptance entries
token-paper- Use #f6f0e7 for the paper token.
token-ink- Use #30221d for the ink token.
token-muted- Use #69564b for the muted token.
token-line- Use #d8cabd for the line token.
token-accent- Use #934b32 for the accent token.
token-highlight- Use #ebcba8 for the highlight token.
token-focus- Use #b56743 for the focus token.
token-heading-font- Use 'Manrope', sans-serif for the heading-font token.
token-body-font- Use 'DM Sans', sans-serif for the body-font token.
token-control-radius- Use 5px for the control-radius token.
token-panel-radius- Use 10px for the panel-radius token.
rule-palette- Use paper for the canvas, ink for primary text, muted for supporting text, and line for separators. Reserve accent for the main action. On an inverse ink surface, use paper text and highlight for emphasis.
rule-type- Use the heading face at medium weight with tight tracking for the main title. Use the body face for reading and compact control labels. Use local sans-serif fallbacks when the fonts are unavailable.
rule-layout- Align headings and controls to shared edges. Give the main content generous outer space. Group related rows with thin rules and tighter internal spacing. Let controls wrap or stack on small screens.
rule-surfaces- Use flat surfaces and modest radii. Where a working group needs emphasis, an inverse panel can frame a group of paper-colored elements. Choose its role according to the content.
rule-interaction- Distinguish the main action with a filled accent control. Keep secondary actions quiet and readable. Show keyboard focus with a visible offset ring. Distinguish selection, completion and disabled states by more than hue.
Review rubric
Read the bundled reviewer prompt
Review the rendered interface against the selected goal's resolved tokens and design rules. A project can supply a reference screen. Assess resemblance through roles such as hierarchy, action emphasis, surfaces, and spacing. A different product may need a different layout. Inspect the primary workflow at desktop and narrow widths, including an empty state, representative content, and an edit or keyboard-focus state. Cite a visible element and the applicable rule for each material finding. Report readability, affordance or clipping issues even when colors match. State which judgments depend on viewing a screenshot and which interactions you exercised. Score 1 for a material conflict with the adopted language or a blocked workflow, 3 for a recognizable language with visible inconsistencies, and 5 for consistent use that supports the interface across the inspected states. Use the child language's resolved values when a project overrides a parent choice.
- 1
- Material design or usability conflicts
- 3
- Recognizable language with visible gaps
- 5
- Consistent, usable expression of the adopted language