Problem
slugify() in training-import.ts strips all non-ASCII characters, returning an empty string for non-English content:
slugify("日本語スタイルガイド")// → ""slugify("SQL Style Guide")// → "sql-style-guide" ✓This breaks training import for teams with Japanese, Chinese, Korean, or other non-Latin style guides.
Location
packages/opencode/src/altimate/tools/training-import.ts:225-231
Suggested Fix
Use transliterate or fall back to a hash-based name when the result is empty:
functionslugify(text: string): string{constslug=text.toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/^-+|-+$/g,"").slice(0,64)returnslug||`entry-${Date.now()}`}Found During
PR #350 adversarial testing.
Problem
slugify()intraining-import.tsstrips all non-ASCII characters, returning an empty string for non-English content:This breaks training import for teams with Japanese, Chinese, Korean, or other non-Latin style guides.
Location
packages/opencode/src/altimate/tools/training-import.ts:225-231Suggested Fix
Use
transliterateor fall back to a hash-based name when the result is empty:Found During
PR #350 adversarial testing.