k-skill/scripts
Jeffrey (Dongkyu) Kim 614aa68075 Preserve korean spell-check layout in corrected output
The Nara payload can collapse paragraph separators into normalized page text, so the helper now maps corrections back onto the original chunk before rebuilding corrected_text. The CLI also rejects non-positive --max-chars values, and regression tests cover both the layout-preservation path and invalid argument handling.

Constraint: Nara result pages can normalize blank lines and sentence spacing before exposing errInfo offsets
Rejected: Narrow docs away from file/Markdown proofreading | preserving original chunk separators keeps the documented workflow intact
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep multiline separator preservation tied to the original chunk whenever a suggestion only changes whitespace across collapsed boundaries
Tested: python3 -m unittest scripts.test_korean_spell_check; npm run lint; npm run typecheck; npm test; npm run build; python3 scripts/korean_spell_check.py --text '아버지가방에들어가신다.' --format json; python3 scripts/korean_spell_check.py --text $'아버지가방에들어가신다.\n\n아버지가방에들어가신다.' --max-chars 15 --format json; python3 scripts/korean_spell_check.py --text $'아버지가방에들어가신다.\n\n왠지 않되요.' --format json; python3 scripts/korean_spell_check.py --text 테스트 --max-chars 0 --format json
Not-tested: Live multi-page Nara payloads with separator-sensitive corrections across multiple returned pages
2026-04-03 21:58:23 +09:00
..
fixtures Add local air-quality lookup so k-skill covers location-based dust checks 2026-03-27 22:06:19 +09:00
check-setup.sh Replace sops+age encryption with plain dotenv and agent-native credential resolution 2026-03-30 22:12:04 +09:00
fine_dust.py Replace sops+age encryption with plain dotenv and agent-native credential resolution 2026-03-30 22:12:04 +09:00
korean_spell_check.py Preserve korean spell-check layout in corrected output 2026-04-03 21:58:23 +09:00
ktx_booking.py Replace sops+age encryption with plain dotenv and agent-native credential resolution 2026-03-30 22:12:04 +09:00
run-k-skill-proxy.sh Replace sops+age encryption with plain dotenv and agent-native credential resolution 2026-03-30 22:12:04 +09:00
skill-docs.test.js Enable policy-aware Korean spell checking from the official Nara surface 2026-04-03 21:39:11 +09:00
test_fine_dust.py Make the fine-dust proxy easier to consume than the upstream APIs 2026-03-28 17:14:18 +09:00
test_korean_spell_check.py Preserve korean spell-check layout in corrected output 2026-04-03 21:58:23 +09:00
test_ktx_booking.py Keep waiting-list reservations aligned with the selected train 2026-03-27 11:26:38 +09:00
validate-skills.sh Prepare k-skill for packaged releases and broader skill discovery 2026-03-25 23:57:53 +09:00