{"id":"workflow.table_cleanup","version":"1.0.0","label":{"ko":"엑셀·CSV 정리 (열 대응·형식 통일·중복·필수값 검사)","en":"Spreadsheet and CSV cleanup"},"description":{"ko":"CSV·엑셀(.xlsx, .xls) 표 하나와 저장해 둔 열 규칙을 받아 정리합니다. 실행 엔진(P00)이 형식 확인 -> 읽기 -> 열 대응(이름·동의어·비슷한 이름) -> 날짜·전화·사업자등록번호·금액·식별번호 형식 통일 -> 같은 키 중복 제외와 비슷한 행 후보 찾기 -> 필수값·고유값·형식 검사 -> 변경 내역 순으로 실행합니다. 결과는 정상 표(.xlsx), 예외 통합 문서(오류 행, 제외 행, 형식 예외, 중복 후보, 열 대응), 변경 내역(.html)입니다. 입력 행 수는 늘 정상·제외·오류 행 수의 합과 같고, 모든 행에 원본 행 번호가 붙습니다. 앞자리 0을 지키고, 빈 칸·0·NULL 글자를 합치지 않으며, 두 가지로 읽히는 날짜는 고르지 않고 오류로 남깁니다. 비슷한 중복 후보는 지우지 않습니다. 파일은 기기 밖으로 나가지 않습니다.","en":"Cleans one CSV or Excel (.xlsx, .xls) table with saved column rules: detection, reading, column mapping, format normalization (dates, phones, business numbers, amounts, ids), exact-key duplicate exclusion and similar-row candidates, required/unique/format checks, change report. Outputs the clean table, an exceptions workbook and an HTML change report. Input rows always equal clean + excluded + error rows; every row keeps its source row number. Leading zeros are kept, blanks/0/NULL are never merged, ambiguous dates are not guessed and similar candidates are never deleted. Files never leave the device."},"input_schema":{"type":"object","additionalProperties":false,"required":["files","options"],"properties":{"files":{"type":"array","minItems":1,"maxItems":1,"items":{"$ref":"#/$defs/file"}},"options":{"type":"object","additionalProperties":false,"required":["columns"],"properties":{"columns":{"type":"array","minItems":1,"maxItems":200,"items":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100},"source":{"type":["string","integer"],"minimum":0,"maxLength":1000,"description":"file header (exact, trimmed) or 0-based column index; omitted: matched by name and aliases"},"aliases":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":200}},"type":{"enum":["text","id","date","phone","business_number","amount","integer"]},"date_order":{"enum":["ymd","mdy","dmy"]},"required":{"type":"boolean"},"unique":{"type":"boolean"},"pattern":{"type":"string","maxLength":1000},"min":{"type":["number","string"]},"max":{"type":["number","string"]},"min_length":{"type":"integer","minimum":0},"max_length":{"type":"integer","minimum":0},"enum":{"type":"array","maxItems":10000,"items":{"type":["string","number","boolean"]}}}}},"keep_unmapped":{"type":"boolean"},"sheet":{"type":"string","maxLength":31},"csv":{"type":"object","additionalProperties":false,"properties":{"encoding":{"enum":["auto","utf-8","utf-16le","utf-16be","euc-kr"]},"delimiter":{"enum":["auto",",","\t",";","|"]}}},"dedupe":{"type":"object","additionalProperties":false,"properties":{"keys":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":100}},"name_column":{"type":"string","maxLength":100},"phone_column":{"type":"string","maxLength":100},"email_column":{"type":"string","maxLength":100},"threshold":{"type":"number","minimum":0.8,"maximum":1},"exact":{"enum":["exclude","keep"]}}},"exclude":{"type":"array","maxItems":100,"items":{"type":"object","additionalProperties":false,"required":["column"],"minProperties":2,"properties":{"column":{"type":"string","maxLength":100},"blank":{"const":true},"equals":{"type":["string","number","boolean"]},"in":{"type":"array","maxItems":10000,"items":{"type":["string","number","boolean"]}},"pattern":{"type":"string","maxLength":1000}}}},"file_name":{"type":"string","minLength":1,"maxLength":80}}}},"$defs":{"file":{"type":"object","additionalProperties":false,"required":["size"],"properties":{"name":{"type":"string","maxLength":1024},"mime":{"type":"string","maxLength":255},"size":{"type":"integer","minimum":0,"maximum":67108864}}}}},"output_schema":{"type":"object","additionalProperties":false,"required":["state","recipe","engine","counts","checks","stats","mapping","files","steps","warnings"],"properties":{"state":{"enum":["completed","completed_with_exceptions"]},"recipe":{"type":"object","additionalProperties":false,"required":["id","version"],"properties":{"id":{"const":"table.cleanup"},"version":{"type":"string"}}},"engine":{"type":"string"},"counts":{"type":"object","additionalProperties":false,"required":["input","clean","excluded","excluded_duplicates","error"],"properties":{"input":{"type":"integer","minimum":0},"clean":{"type":"integer","minimum":0},"excluded":{"type":"integer","minimum":0},"excluded_duplicates":{"type":"integer","minimum":0},"error":{"type":"integer","minimum":0}}},"checks":{"type":"array","uniqueItems":true,"items":{"enum":["error_rows","duplicate_candidates","ambiguous_dates","ambiguous_mapping","column_missing","duplicates_excluded","rows_excluded"]}},"stats":{"type":"object","additionalProperties":false,"required":["cells_changed","format_exceptions","blocking_format_exceptions","duplicate_candidates","exact_groups","changed_rows"],"properties":{"cells_changed":{"type":"integer"},"format_exceptions":{"type":"integer"},"blocking_format_exceptions":{"type":"integer"},"duplicate_candidates":{"type":"integer"},"exact_groups":{"type":"integer"},"changed_rows":{"type":["integer","null"]}}},"mapping":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["column","source_header","source_index","method","score","ambiguous"],"properties":{"column":{"type":"string"},"source_header":{"type":["string","null"]},"source_index":{"type":["integer","null"]},"method":{"enum":["explicit","exact","synonym","contains","fuzzy","missing","kept"]},"score":{"type":["number","null"]},"ambiguous":{"type":"boolean"}}}},"files":{"type":"object","additionalProperties":false,"required":["clean","exceptions","changes"],"properties":{"clean":{"type":"string"},"exceptions":{"type":"string"},"changes":{"type":"string"}}},"steps":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","kind","state","warnings","exceptions","input_digest","output_digest"],"properties":{"id":{"type":"string"},"kind":{"enum":["tool","fn"]},"tool":{"type":"string"},"tool_version":{"type":"string"},"fn":{"type":"string"},"state":{"enum":["completed","skipped","failed","not_run"]},"warnings":{"type":"array","items":{"type":"string"}},"exceptions":{"type":"array","items":{"type":"string"}},"input_digest":{"type":["string","null"],"pattern":"^[0-9a-f]{64}$"},"output_digest":{"type":["string","null"],"pattern":"^[0-9a-f]{64}$"}}}},"warnings":{"type":"array","uniqueItems":true,"items":{"enum":["needs_review"]}}}},"modes":["browser_local","local"],"egress":[],"side_effect":"none","approval":"none","limits":{"max_input_bytes":67108864,"max_files":1,"max_items":3000000,"timeout_ms":120000,"max_memory_mb":2048},"deterministic":true,"errors":["invalid_input","unsupported","resource_limit","needs_input","permission_denied","timeout","failed"],"dod":{"passed":true,"gates":{"G1":"pass","G2":"pass","G3":"pass","G4":"pass","G5":"pass","G6":"pass","G7":"pass","G8":"pass","G9":"pass","G10":"pass","G11":"pass","G12":"na"},"report":"reports/workflow.table_cleanup/DOD.md","evidence":{"node":"reports/workflow.table_cleanup/20261019-125025-node.json","browser":"reports/workflow.table_cleanup/20261020-112903-browser.json","crosscheck":"reports/workflow.table_cleanup/20261017-203819-crosscheck.json","license":"reports/license-20261020-164840.json","screenshot":"reports/workflow.table_cleanup/20261020-112903-browser.png","provenance":"reports/workflow.table_cleanup/20261020-165515-provenance.json","g12":"reports/bench/g12-status.json"},"checked_at":"2026-10-20T07:56:44.472Z"}}