ADR: bilingual structure — EN canonical in adr/, KO mirror in adr-ko/
Establish English as the canonical ADR language with Korean translations held in a parallel docs/adr-ko/ tree as derived artifacts (1:1 mirror). Promotion from adr-proposed/ to adr/ now writes English to adr/ and the Korean to adr-ko/; bidirectional sync rule documented in CLAUDE.md. - Migrate 30 ADRs in docs/adr/: 28 Korean-only translated to English, 2 bilingual pairs (ADR-0020, ADR-0023) consolidated (.en.md suffix dropped). ADR-0023 EN regenerated against KO source which had newer HW Realization Notes (D16-D23) section. - docs/adr-history/ left frozen by design (transitional state). - CLAUDE.md (Part 2): update ADR Lifecycle for 4-folder layout, mark docs/adr-ko/ as a Derived Artifact, add ADR Translation Discipline section covering bidirectional sync, conflict resolution (EN wins), and proposed-language freedom. - tools/verify_adr_lang_pairs.py: new verification tool checking pair completeness, filename mirroring, ADR-ID match, Status byte-equality. Pre-commit hook intentionally not added; run on demand or in CI. - tests/test_verify_adr_lang_pairs.py: 11 cases including CRLF/LF normalization, em-dash title separator, underscore-slug edge case. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -92,6 +92,18 @@ def test_crlf_normalization(tmp_path: Path) -> None:
|
||||
assert v.verify(tmp_path) == []
|
||||
|
||||
|
||||
def test_em_dash_title_separator_recognized(tmp_path: Path) -> None:
|
||||
"""ADR-0033 uses ' — ' instead of ': ' between ADR-NNNN and the title."""
|
||||
en = tmp_path / "docs/adr/ADR-0033-foo-bar.md"
|
||||
ko = tmp_path / "docs/adr-ko/ADR-0033-foo-bar.md"
|
||||
en.parent.mkdir(parents=True, exist_ok=True)
|
||||
ko.parent.mkdir(parents=True, exist_ok=True)
|
||||
body = "## Status\n\nAccepted\n\n## Context\n\nbody\n"
|
||||
en.write_text("# ADR-0033 — Latency Model\n\n" + body, encoding="utf-8")
|
||||
ko.write_text("# ADR-0033 — Latency Model\n\n" + body, encoding="utf-8")
|
||||
assert v.verify(tmp_path) == []
|
||||
|
||||
|
||||
def test_underscore_in_slug_recognized(tmp_path: Path) -> None:
|
||||
"""ADR-0013 uses an underscore in its slug; the regex must accept it."""
|
||||
_make_adr(tmp_path / "docs/adr/ADR-0013-ver-verification_strategy.md", "0013")
|
||||
|
||||
Reference in New Issue
Block a user