{"id":50670333,"url":"https://github.com/9bow/compiler-for-admrule","last_synced_at":"2026-06-08T10:33:43.189Z","repository":{"id":352899138,"uuid":"1217081691","full_name":"9bow/compiler-for-admrule","owner":"9bow","description":"Rust compiler: legalize-pipeline .cache/admrule/*.xml → bare Git repo (9bow/admrule-kr)","archived":false,"fork":false,"pushed_at":"2026-04-21T15:20:27.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-21T17:32:00.384Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/9bow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":"COPYRIGHT","agents":null,"dco":null,"cla":null}},"created_at":"2026-04-21T14:24:27.000Z","updated_at":"2026-04-21T15:20:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/9bow/compiler-for-admrule","commit_stats":null,"previous_names":["9bow/compiler-for-admrule"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/9bow/compiler-for-admrule","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9bow%2Fcompiler-for-admrule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9bow%2Fcompiler-for-admrule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9bow%2Fcompiler-for-admrule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9bow%2Fcompiler-for-admrule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/9bow","download_url":"https://codeload.github.com/9bow/compiler-for-admrule/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9bow%2Fcompiler-for-admrule/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34059156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-08T10:33:40.251Z","updated_at":"2026-06-08T10:33:43.183Z","avatar_url":"https://github.com/9bow.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# admrule-kr-compiler\n\n`legalize-pipeline`의 `.cache/admrule/*.xml`을 입력받아 bare Git 저장소(`admrule-kr`)를 직접 써내는 Rust 컴파일러입니다. 이 프로그램은 법제처 API를 직접 호출하지 않고, 이미 존재하는 캐시만 입력으로 받습니다.\n\n자매 프로젝트: [`compiler-for-precedent`](https://github.com/legalize-kr/compiler-for-precedent) (판례), [`compiler`](https://github.com/legalize-kr/compiler) (법령).\n\n## 현재 상태: 스캐폴드만\n\n이 저장소는 **부트스트랩 단계**입니다. `src/main.rs`는 `unimplemented`를 반환하는 CLI stub이며, 실제 XML → bare repo 변환 로직은 아직 구현되어 있지 않습니다. 의도된 아키텍처는 자매 저장소 [`compiler-for-precedent`](https://github.com/legalize-kr/compiler-for-precedent)의 2-pass 모델(메타데이터 정렬 → 본문 렌더링 병렬화 → 메인 스레드 commit 직렬화)을 미러합니다.\n\n다음 단계에서 구현 예정:\n\n- [ ] `src/xml_parser.rs`: `.cache/admrule/*.xml` 파싱 (발령일자, 행정규칙ID, 행정규칙일련번호, 소관부처명, 행정규칙종류, 조문내용 추출)\n- [ ] `src/render.rs`: XML → Markdown 렌더링 + `{기관코드}/{행정규칙종류}/{NFC(행정규칙명)}/본문.md` 경로 계산\n- [ ] `src/git_repo.rs`: bare repo writer (compiler-for-precedent의 direct packfile writer 재사용)\n- [ ] 별표·서식 첨부는 **metadata-only**로만 frontmatter에 포함 (HARD INVARIANT — 바이너리 미보관)\n- [ ] 발령일자 기준 author/committer date, `1970-01-01` 이전 epoch 클램프\n- [ ] commit author: `legalize-kr-bot \u003cbot@legalize.kr\u003e` (데이터 repo와 일치)\n\n## 의도된 사용법 (구현 후)\n\n```bash\nadmrule-kr-compiler \u003cinput_cache_dir\u003e [-o \u003coutput_git_dir\u003e]\n```\n\n```bash\nadmrule-kr-compiler ../.cache/admrule\ngit clone ./output.git ./admrule-kr\ncd admrule-kr\n```\n\n## 의도된 출력 저장소 구조\n\n```\n{기관코드}/\n  {행정규칙종류}/\n    {NFC(행정규칙명)}/\n      본문.md\n```\n\n예시:\n- `1741000/훈령/공공데이터 관리지침/본문.md` (행정안전부)\n- `1613000/고시/건축물의 구조기준 등에 관한 규칙/본문.md` (국토교통부)\n\n행정규칙종류: 훈령, 예규, 고시, 공고, 지침, 기타 (OpenAPI `knd` 코드 1~6)\n\n## HARD INVARIANT (변경 불가)\n\n- **첨부(별표·서식) 바이너리는 git tree에 두지 않는다.** LFS도 사용하지 않는다.\n- 모든 첨부는 frontmatter `attachments[]` 메타데이터(kind/no/title/source_url/pdf_url/file_type/sha256/size_bytes/fetched_at)로만 보존한다.\n- 컴파일러는 `.cache/admrule/*.xml`만 읽고 외부 URL을 follow하지 않는다.\n- `target/`·tempdir에 HWP/PDF/이미지 write 금지.\n\n위반 시 integration test가 fail-fast합니다. 자세한 내용은 워크스페이스 루트 [`RESOURCE_ADMRULE.md`](https://github.com/legalize-kr/legalize-kr/blob/main/RESOURCE_ADMRULE.md) §\"별표·서식 첨부 처리 정책\" 참조.\n\n## 개발\n\n```bash\ncargo test\ncargo fmt\ncargo clippy --no-deps -- -D warnings\ncargo build --release\n```\n\n### 크로스 컴파일 (macOS)\n\n```bash\nbrew install filosottile/musl-cross/musl-cross\nrustup target add x86_64-unknown-linux-musl aarch64-unknown-linux-musl\n\ncargo build -r --target x86_64-unknown-linux-musl\ncargo build -r --target aarch64-unknown-linux-musl\n```\n\n\u0026nbsp;\n\n---\n\n*admrule-kr-compiler* is primarily distributed under the terms of both the\n[Apache License (Version 2.0)] and the [MIT license].\n\n[MIT license]: LICENSE-MIT\n[Apache License (Version 2.0)]: LICENSE-APACHE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F9bow%2Fcompiler-for-admrule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F9bow%2Fcompiler-for-admrule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F9bow%2Fcompiler-for-admrule/lists"}