Skip to content
This repository was archived by the owner on Nov 10, 2026. It is now read-only.

Match Chinese, Japanese and Korean strategy steps by character pairs - #54

Closed
forrestlinfeng wants to merge 1 commit into
mainfrom
fix/cjk-applied-matching
Closed

forrestlinfeng wants to merge 1 commit into
mainfrom
fix/cjk-applied-matching

Conversation

@forrestlinfeng

Copy link
Copy Markdown
Contributor

Problem

applied (did the turn follow the injected strategy?) matched a prose step by its words of 4+ letters. Chinese and Japanese have no spaces, so each clause of a step became one long "word", e.g. 先定位一个细分赛道和目标人群, that no answer repeats verbatim.

Found on a real Codex run (plugin from EvoMap/evolver-codex-plugin#10, same applied code as here) with the prompt 我想在小红书里面种草… and a 4-step Chinese strategy: the answer clearly followed all four steps, yet the reuse report said applied: unknown (tier: none). With any command in the turn it would have said unused, a soft negative on the Hub for a strategy that was used.

Change

  • src/applied.js: CJK runs (Han, Hiragana, Katakana, Hangul) are split into overlapping character pairs; other text keeps the existing word matching and stopwords. Threshold (50% of a step's terms) and MIN_STEP_TERMS are unchanged.
  • Tests: a Chinese answer that follows Chinese steps in its own words → used; an unrelated Chinese answer on the same platform → unused; a step mixing English words and Chinese.
  • README / README.zh: one sentence on how CJK steps are compared.

Evidence

Per-step pair coverage on the real run: followed answer 0.61 / 0.60 / 0.69 / 0.32; four unrelated Chinese texts (debugging, a recipe, exam prep, a generic Xiaohongshu sentence) ≤ 0.08. Verdict goes from unknown to used (3/4 steps).

npm test: 185 pass. The new "follows Chinese steps" test fails on main.

Once merged, the same change goes to the Codex, Claude Code and WorkBuddy ports.

🤖 Generated with Claude Code

The applied verdict split text into words of four or more letters. Chinese
and Japanese have no spaces, so each clause of a step became one long
"word" that an answer never repeats verbatim: a turn that followed every
Chinese step was judged `unknown`, or `unused` once it ran a command,
which tells the Hub the strategy was ignored.

CJK runs are now compared by overlapping character pairs; other text keeps
its word matching and stopwords. On a real Codex run with a four-step
Chinese strategy, the answer that followed it covers 32-69% of each step's
pairs and unrelated Chinese answers at most 8%, so the existing 50% step
threshold reads it as `used` (3 of 4 steps).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@evomap-aiqa-bot

evomap-aiqa-bot Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Sentinel 已审核此变更,未发现需要报告的问题。

开发 agent 查询详情: 调用 MCP 工具 sentinel_pr_review_context,传入 owner_repo="evomap/evolver-dsh-plugin"、pr_number=54、head_sha="fa77856e8a369fbcdf58ec184908c5766731a363",并按条目追加 finding_id 或 finding_key。

由 Sentinel 审核 · 目标提交 fa77856e8a36

@forrestlinfeng

Copy link
Copy Markdown
Contributor Author

Superseded by #55: instead of matching Chinese/Japanese/Korean steps, an injected strategy now counts as used, so no per-language matching is needed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant