japan-ux

v2.1.1
io.github.mrslbt/japan-ux Checked 3 days ago Published 3 months ago

Japanese UI + UX correctness for AI coding agents — typography, forms, keigo, JLReq checks.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

review_jp_ui Review JP UI

Review CSS/markup against the Japanese UI standard (typography, colour, font performance) and return a pass/needs_work/fail verdict with violations, JLReq/JIS citations, and fixes. The front-end correctness enforcer — run on any UI (including Western-built) before shipping to Japan; call transform_for_japan to auto-apply form/copy fixes.

ParameterTypeDescription
css *stringCSS content to review against the Japanese UI standard.
contextstringDesign context for the recommended font stack.
markupstringOptional HTML/JSX markup for context (e.g. text-on-photo detection).

generate_jp_form Generate JP Form

Generate culturally correct Japanese form markup with proper field order (姓→名), furigana, 3-field phone, 〒 postal address, 年月日 dates, and context-appropriate keigo. Use this when building any form for a Japanese audience.

ParameterTypeDescription
context *stringBusiness context — determines keigo politeness level
fields *arrayFields to include in the form
type *stringType of form to generate
formatstringOutput format
include_labelsbooleanInclude field labels
include_validationbooleanInclude validation patterns
languagestringLabel language

validate_jp_form Validate JP Form

Audit an existing form against Japanese UX conventions. Checks for: name field order (姓/名), furigana, 3-field phone, postal code auto-fill, keigo-appropriate button text, full-width character handling. Returns score (0-100), issues with fixes, and what passed.

ParameterTypeDescription
context *stringBusiness context for keigo expectations
form_markup *stringHTML/JSX form markup to audit

generate_jp_placeholder Generate JP Placeholder Data

Generate realistic Japanese test data for prototypes and development. Returns names (kanji + katakana furigana + romaji), addresses (real postal codes and prefectures), phone numbers (correct 3-field format), company names, and dates (both Gregorian and Japanese era format like 平成4年3月15日).

ParameterTypeDescription
fields *arrayData fields to include
age_rangestringAge range like "20-40" for date_of_birth generation
countnumberNumber of records to generate
genderstringGender for name generation

suggest_keigo_level Suggest Keigo Level

Suggest appropriately polite Japanese UI text based on context. Maps business context to keigo level (casual → very_formal) and returns the right Japanese translation for buttons, error messages, empty states, confirmations, and more. Includes alternatives for different formality levels.

ParameterTypeDescription
context *stringBusiness context — determines keigo level
text *stringEnglish UI text to translate (e.g. 'Invalid email address', 'Submit', 'No results found')
ui_element *stringType of UI element
tonestringOptional tone override

score_japan_readiness Score Japan Readiness

Score any page or component for Japan-readiness on a 0-100 scale. Analyzes 5 categories: forms (name order, furigana, phone, postal), copy (keigo, Japanese text, placeholders), trust (特定商取引法, phone number, company info), typography (font, size, line-height), and cultural (seasonal awareness, imagery). Returns breakdown with issues and quick wins per category.

ParameterTypeDescription
context *stringBusiness context
markup *stringHTML/JSX markup to analyze
descriptionstringDescription of the page/component for additional context
include_suggestionsbooleanInclude priority fix suggestions with impact estimates

transform_for_japan Transform for Japan

Transform Western markup into Japan-ready markup. Automatically fixes: name field order (firstName/lastName → 姓/名), adds furigana, splits phone into 3 fields, restructures address to 〒 postal format, translates buttons with appropriate keigo, replaces Western placeholder data with Japanese examples. Shows before/after scores and explains every change.

ParameterTypeDescription
context *stringBusiness context — determines keigo level and conventions
markup *stringWestern HTML/JSX markup to transform
formatstringOutput format
preserve_stylingbooleanPreserve existing CSS classes and styles

check_jp_typography Check JP Typography

Audit CSS and markup for Japanese typography issues. Checks: font stacks (Noto Sans JP, Hiragino, Yu Gothic), line-height (1.7-2.0 for Japanese body text), font sizes (14px body minimum, 12px captions floor), kinsoku shori (line-break: strict), text-on-photo overlays, font-feature-settings 'palt' on headings, font-synthesis, and more. Returns score, issues, and a recommended font stack for your context.

ParameterTypeDescription
css *stringCSS content to audit for Japanese typography issues
contextstringDesign context for font stack recommendation
markupstringOptional HTML/JSX markup for additional context (background images, text-on-photo detection)

get_seasonal_context Get Seasonal Context

Get the current Japanese seasonal context for design decisions. Returns: current season with traditional colors, active events (正月, 花見, お盆, etc.), upcoming events, the current microseason (二十四節気), recommended design colors, and warnings (e.g., do not launch during Golden Week). Covers all 24 Japanese microseasons and 24+ major events.

ParameterTypeDescription
daynumberDay of month. Defaults to today when month is omitted, else 15.
monthnumberMonth (1-12). Defaults to the current month (server local time).

audit_japan_ux Audit Japan UX

Comprehensive Japanese UX audit covering 7 categories: layout (density, breadcrumbs, CTA placement), typography (fonts, line-height, kinsoku shori), visual (color meanings, red-name taboo, dark theme), navigation (phone number, footer links, hamburger rules), trust (会社概要, case studies, proof numbers, legal links), content (Japanese text, FAQ, pricing tables), and mobile (viewport, tel: links, touch targets). Returns letter grade (A-F), category scores, and prioritized fixes.

ParameterTypeDescription
markup *stringHTML/JSX markup to audit
site_type *stringType of site being audited
cssstringCSS content for typography and visual checks
target_audiencestringTarget audience description
url_descriptionstringDescription of the page for additional context

design_direction_for_japan Design Direction for Japan

Generate a Japan-specific visual direction for a website or interface. Takes a loose brand type, audience, and industry, then returns a practical design brief covering visual direction, information density, color palette, typography, imagery style, CTA style, trust layout, and section priorities.

ParameterTypeDescription
audience *stringTarget audience such as 'business buyers', 'families', 'seniors', 'domestic travelers'
brand_type *stringBrand expression such as 'modern minimal', 'premium', 'friendly', 'traditional craft'
industry *stringIndustry or site type such as 'B2B SaaS', 'clinic', 'luxury ryokan', 'ecommerce', 'corporate'