Skip to content

feat(understand): auto-detect conversation language on first run#378

Merged
Lum1104 merged 2 commits into
Egonex-AI:mainfrom
BozhengLong:feat/understand-language-auto-detection
Jun 4, 2026
Merged

feat(understand): auto-detect conversation language on first run#378
Lum1104 merged 2 commits into
Egonex-AI:mainfrom
BozhengLong:feat/understand-language-auto-detection

Conversation

@BozhengLong

Copy link
Copy Markdown
Contributor

Summary

On the first /understand run in a project (no --language flag, no stored outputLanguage), the skill now detects the conversation language and — only when it is non-English — confirms once before generating, persisting the choice to config.json. This fixes the silent English-default surprise for non-English users, who previously only discovered the mismatch after paying the full cost of an analysis run.

The confirmation gate fires only when the detected language is non-English and no language has been chosen yet. English conversations follow the exact same silent en path as before. The --language flag and stored config both take priority over detection. Non-interactive invocations fall back to the detected language with a notice instead of blocking.

Linked issue(s)

Refs #141 (the --language foundation this builds on). Complementary to #374 (dashboard runtime switcher) — this sets the generation-time default rather than the view-time UI.

How I tested this

  • Traced all 5 scenarios against the edited step 3.6: (1) Chinese conversation → detect + confirm → zh persisted; (2) re-run uses stored config, no gate; (3) English conversation → silent, no gate (no regression); (4) --language ja → flag wins; (5) override at gate (zh detected, type en) → en.
  • pnpm test — not run; this is a markdown-only change (SKILL.md prompt + README), no code paths touched.
  • Manual reasoning smoke test.

Versioning

  • Version bumped in all five manifests (2.7.5 → 2.7.6) — user-visible behavior change.

Design + plan included under docs/superpowers/ (consistent with the repo's existing specs there).

🤖 Generated with Claude Code

BozhengLong and others added 2 commits June 3, 2026 21:19
When /understand runs with no --language flag and no stored outputLanguage,
step 3.6 now infers the conversation language and — only when it is non-English
— confirms once before generating, then persists the choice to config.json.
English conversations keep the exact same silent `en` path; --language flag and
stored config still take priority. README documents the behavior; version
bumped 2.7.5 -> 2.7.6 across all five manifests (user-visible behavior change).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Lum1104 Lum1104 merged commit 7a3b751 into Egonex-AI:main Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants