Skip to content

feat(contribute): recognize Japanese course-correction prompts - #431

Merged
jeff-r2026 merged 1 commit into
Tencent:mainfrom
Rererr:feat/japanese-correction-keywords
Sep 8, 2026
Merged

feat(contribute): recognize Japanese course-correction prompts#431
jeff-r2026 merged 1 commit into
Tencent:mainfrom
Rererr:feat/japanese-correction-keywords

Conversation

@Rererr

@Rererr Rererr commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

CORRECTION_KEYWORDS only covers Chinese and English, so a Japanese user correcting the agent right after a stop (e.g. 「違う、やり直して」) is never counted as a correction. For Japanese-speaking teams this quietly lowers the friction score (the share-learnings hint rarely fires) and under-reports corrections in digest / dashboard intervention metrics. This PR adds the common Japanese correction phrases and documents the language coverage.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature causing existing behavior to change)
  • Documentation only
  • Refactor / internal cleanup

Test Plan

  • npx tsc --noEmit passes
  • npx vitest run passes (full suite; the only failures on my macOS machine are lock-atomic.test.ts and push-*.test.ts concurrency/timing tests, which fail identically on a pristine main checkout and are unrelated to this change)
  • Added/updated tests for the change

New tests in dashboard-collector.test.ts:

  • a Japanese correction prompt within the 60s window counts as correction: 1
  • a Japanese follow-up task (「次はテスト環境へデプロイして」) does not count

Mutation check: removing the new keyword line makes the first new test fail, so the test actually guards the change.

Related Issues

None. Found while integrating TeamAI with a Japanese team's personal retrospective loop.

Notes for Reviewers

  • Matching stays a plain substring check on the lowercased prompt summary, so no logic changes — only the keyword list and two doc lines (docs/usage-guide.md, docs/usage-guide.zh-CN.md) that describe the correction signal.
  • Keyword choice: I kept to phrases that are almost always a course-correction in a follow-up prompt (違う / ちがう / そうじゃな / そうではな / やり直 / やりなおし / 間違って / 間違え / 勝手に / 戻して). I deliberately left out bare 「間違」 because 「間違いない」 ("no doubt") is a common affirmative, and 「不要」-style single words that read differently in Japanese.
  • Happy to trim or extend the list if you'd prefer a different balance between recall and false positives.

CORRECTION_KEYWORDS only covered Chinese and English, so a Japanese user
correcting the agent right after a stop ("違う、やり直して") never counted
as a correction. That silently lowered the friction score for Japanese
teams: the share-learnings hint rarely fired, and the intervention
metrics in digest/dashboard under-reported corrections.

Add the common Japanese correction phrases (wrong / not that / redo /
you got it wrong / on your own / put it back). Matching stays a plain
substring check on the lowercased prompt summary, so no other code
changes. Document the language coverage in both usage guides.
@jeff-r2026
jeff-r2026 merged commit dca9008 into Tencent:main Sep 8, 2026
6 checks passed
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