feat(contribute): recognize Japanese course-correction prompts - #431
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CORRECTION_KEYWORDSonly covers Chinese and English, so a Japanese user correcting the agent right after a stop (e.g. 「違う、やり直して」) is never counted as acorrection. For Japanese-speaking teams this quietly lowers the friction score (the share-learnings hint rarely fires) and under-reports corrections indigest/ dashboard intervention metrics. This PR adds the common Japanese correction phrases and documents the language coverage.Type of Change
Test Plan
npx tsc --noEmitpassesnpx vitest runpasses (full suite; the only failures on my macOS machine arelock-atomic.test.tsandpush-*.test.tsconcurrency/timing tests, which fail identically on a pristinemaincheckout and are unrelated to this change)New tests in
dashboard-collector.test.ts:correction: 1Mutation 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
docs/usage-guide.md,docs/usage-guide.zh-CN.md) that describe thecorrectionsignal.