Repository navigation
feat(contract-review): ja-JP/de-DE/fr-FR review corpus, jurisdiction checklists, typography round-trip guard (dev-board#1957) - #1960
Merged
Conversation
AIWorkDeckAdmin
temporarily deployed
to
windows-signing
December 5, 2026 05:58 — with
GitHub Actions
Inactive
…checklists and typography round-trip guard (dev-board#1957)
- fixtures/contracts/gen-multilingual-contracts.py: one synthetic supply/sales
contract per language (fictional parties), 4-5 planted review points each,
mapped to checklist items in multilingual-review-points.json.
- contract-review: checklists/{ja-JP,de-DE,fr-FR}.md (JA-*/DE-*/FR-*), appended
by SkillRegistry to both prompt versions; native-language triggers in
triggers_en.
- LOWA revision round-trip guard: the three files round-trip untouched, then
get character-level tracked edits next to 、。「」, „…“/ß/1.000,50 €, « »,
NBSP before : and €, U+202F before ; ! ?; accept/reject text asserted byte
for byte in the export and in the engine.
- Engine loss found and fixed: a NBSP / U+202F / thin space between digits
is a group separator, so 1 000,50 -> 1 250,75 is struck as one figure
(Q23), not "1 " + 000,50. Ported to the Python twin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AIWorkDeckAdmin
force-pushed
the
90d/ml-corpus-multilingual-contracts
branch
from
December 5, 2026 06:31
56d9b1b to
fb10ab5
Compare
AIWorkDeckAdmin
had a problem deploying
to
windows-signing
December 5, 2026 06:32 — with
GitHub Actions
Failure
AIWorkDeckAdmin
temporarily deployed
to
windows-signing
December 5, 2026 07:31 — with
GitHub Actions
Inactive
AIWorkDeckAdmin
added a commit
that referenced
this pull request
Dec 5, 2026
This branch was previously deployed
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.
Card: zeweihan/dev-board#1957
What
fixtures/contracts/gen-multilingual-contracts.pywrites one short commercial contract each for ja-JP (売買基本契約書), de-DE (Liefervertrag) and fr-FR (Contrat de fourniture), with fictional parties and 4, 5 and 4 planted review points. The output is reproducible (fixed zip timestamps; md5 stays the same across runs).multilingual-review-points.jsonmaps each planted point to its paragraph and to a checklist item.backend/skills/contract-review/checklists/{ja-JP,de-DE,fr-FR}.mdcontain items JA-1..5, DE-1..5 and FR-1..5 (2020 Civil Code terminology and the Subcontract Act / 取適法; §§ 271a, 438, 276 III/309 Nr. 7, 307, 305b BGB; L. 441-10, 1170/1231-3 C. civ., L. 442-1 II). Each checklist also states the typography that edits in that language must keep.SkillRegistryappends the files, sorted by name, to both prompt versions. Native-language triggers (契約書をレビュー, Vertrag prüfen, revoir le contrat, …) go intriggers_en, which only matches in a non-Chinese UI, so Chinese matching does not change at all.npm run test:lowa-revision-roundtripnow round-trips the three files unedited. It then applies five scripted character-level tracked edits per file throughmodify_paragraph(the sameapplyMinimalRedlinediff the AI edit tools use), placed right next to 、。「」, „…“ / ß / 1.000,50 €, « », NBSP before : and €, and U+202F before ; ! ?. Checks are byte for byte, NBSP and U+202F included: accept-all and reject-all text in the export, the engine's own Accept All / Reject All on the re-opened export, no deletion that strikes unchanged punctuation or spacing, and every changed figure struck as one token.1 000,50 € -> 1 250,75 €was therefore struck as1kept +000,50->250,75. These spaces are now treated as group separators when they sit between digits; a space between a figure and its unit (€, %) still is not part of the figure. The fix is ported to the Python twin (native_document_edit_uno.py), and the oracle test covers the new pairs.Why locale resources of contract-review, not a new skill
Per
docs/SKILL_SPEC.mda skill is one workflow, injected according to the app language (prompt.md / prompt.en.md). The review workflow is the same in every jurisdiction, and the contract-review prompt already says that the document decides the governing law. What differs by locale is the substantive checklist and the typography, and those depend on the document's language, not the UI's (a Chinese-UI lawyer can review a German contract). Separate per-locale skills would duplicate the workflow and its tool whitelist, and their triggers would compete under the longest-match rule. So the checklists are resources of the one skill and both prompt versions include all of them. Each file says when it applies. Trade-off: about 800 words added to every contract-review prompt. If many more locales are added, select checklists by detected document language instead. Online-market bundles still ship only skill.yml/prompt.md, sochecklists/works for built-in skills only (documented in SKILL_SPEC).Tests (red before, green after)
ContractReviewChecklistsTest(6): red before the loader and triggers (3 failures: checklist not in prompt; 3 errors: ja/de/fr request did not match), green after. The skill package suite (167) and thecom.checkba.service.ai.**suite are green.node --test tests/lowa-unit/minimalEdits.test.mjs: the new French/German amount test is red on master and green with the fix. All lowa-unit tests pass (401/0); the 50 test files that slice office_thread.js pass (432/0).python -m unittest discover -s desktop/tests -p 'test_native_*.py': the old twin fails 2 tests (new test + oracle), and the old worker fails the oracle; green with both fixed.LOWA_DIST_DIR. (1) master worker: fr-FR fails withfigure "1<NNBSP>000,50" is not struck as one token. (2) inserted text NFKC-normalised and 、 -> ", ": ja, de and fr all fail on exact accept-all text, both in the export and in the engine. (3) whole-paragraph replace instead of the char diff: all three fail with deletions that strike unchanged 「」/„“/«»/NBSP and figures not struck as one token.🤖 Generated with Claude Code