chore(release): v4.13.0 — 준법 등록부 감시 3건 (#157·#158·#159) · chrisryugj/korean-law-mcp@e3b6db1 · GitHub
Skip to content

Commit e3b6db1

Browse files
chrisryugjclaude
andcommitted
chore(release): v4.13.0 — 준법 등록부 감시 3건 (#157·#158·#159)
ISO 법규준수 등록부(8개 영역 108개 법령)를 이 서버로 주간 감시하던 실사용 보고 3건(@thkim660207-cmd)을 처리한다. 테스트 738 → 758. - search_law_bulk: 등록부 대량 조회 + MST diff 감시 (#157) - amendment_track 조문별 개정 이력 opt-in (#158) - 이미지-only 별표 경고 + 원문·첨부파일 링크 (#159) 문서: 내부 도구 수 98 → 99, API.md 검색 표에 search_law_bulk, README/README-EN v4.13.0 절. CHANGELOG 에 v4.12.4·v4.12.5 절을 커밋 이력 기준으로 소급 기록했다 — 릴리스 당시 누락돼 있었다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NMcUqjf1R2TzCRZMrv5TfY
1 parent fb32c6f commit e3b6db1

8 files changed

Lines changed: 125 additions & 12 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 75 additions & 0 deletions

‎CLAUDE.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
> - `.github/workflows/publish.yml`(GitHub Release → OIDC trusted publishing + provenance)은 **npm 쪽 trusted publisher 등록이 아직 안 됐다**. 그래서 게시는 위 로컬 `npm publish` 가 정규 경로이고, Release 는 그 뒤에 만든다 — 워크플로는 같은 버전이 이미 레지스트리에 있으면 게시를 건너뛰고 검증(typecheck·test·build·verify:package·audit)만 릴리스 시점에 재확인한다.
1010
> - **🚫 이 레포에서 `fly deploy` 직접 실행 절대 금지** — 통합 이미지를 law 단독 이미지로 덮어써 stats·patent·archhub·school까지 전부 죽는다. 자세한 배경: [docs/FLY-COST.md](docs/FLY-COST.md)
1111
12-
Korean Law MCP Server v4.12.0 - 법제처 42개 API → 10개 통합 도구 (내부 98개) + 9개 시나리오 + 자연어 CLI + HTTP stateless + 판례 토큰 74% 감축 + **legal_research (체인 8종 통합, task 파라미터)** + **legal_analysis (인용검증·판례생사·행위시법·영향그래프 통합, mode 파라미터)** + **time_travel (시점 diff)** + **action_plan (이럴 땐 이렇게, 5단계 안내)** + **시행예정 감지 (search_law가 제명변경·미시행 개정 자동 병기)** + **ordinance_radar (조례 정비 레이더 — 근거 상위법 개정 자동 대조, v4.7.0)** + **인용 검증 표기 내성 (낫표·가운뎃점·`같은 법` 조응, v4.9.0)** + **폐지 감지 (검색 0건 시 폐지 법령·행정규칙 연혁 추적 — 폐지사유·후속 통합 규정 자동 안내, v4.10.0)**
12+
Korean Law MCP Server v4.13.0 - 법제처 42개 API → 10개 통합 도구 (내부 99개) + 9개 시나리오 + 자연어 CLI + HTTP stateless + 판례 토큰 74% 감축 + **legal_research (체인 8종 통합, task 파라미터)** + **legal_analysis (인용검증·판례생사·행위시법·영향그래프 통합, mode 파라미터)** + **time_travel (시점 diff)** + **action_plan (이럴 땐 이렇게, 5단계 안내)** + **시행예정 감지 (search_law가 제명변경·미시행 개정 자동 병기)** + **ordinance_radar (조례 정비 레이더 — 근거 상위법 개정 자동 대조, v4.7.0)** + **인용 검증 표기 내성 (낫표·가운뎃점·`같은 법` 조응, v4.9.0)** + **폐지 감지 (검색 0건 시 폐지 법령·행정규칙 연혁 추적 — 폐지사유·후속 통합 규정 자동 안내, v4.10.0)** + **search_law_bulk (등록부 대량 조회 + MST diff 감시, v4.13.0)**
1313

1414
## Structure
1515

1616
```
1717
src/
1818
├── index.ts # 엔트리포인트 (STDIO/HTTP 모드)
1919
├── cli.ts # CLI v2.0 (자연어 라우팅 + REPL)
20-
├── tool-registry.ts # 98개 도구 등록, V3_EXPOSED 10개만 노출 (TOOL_COUNTS 파생값)
20+
├── tool-registry.ts # 99개 도구 등록, V3_EXPOSED 10개만 노출 (TOOL_COUNTS 파생값)
2121
├── tools/ # 도구 구현 (76개 파일, scenarios/ 포함)
2222
├── lib/
2323
│ ├── api-client.ts # API 클라이언트 (throwIfError/checkHtmlError 통일)
@@ -161,7 +161,7 @@ get_law_text(mst, jo="006300") → 제63조(휴직) 조회
161161
|------|------|
162162
| `cli.ts` | CLI v2.0 — 자연어 라우팅 + REPL |
163163
| `lib/query-router.ts` | 자연어 → 도구 자동 라우팅 (verify/비교/시간필터/impact_map/time_travel/action_plan 포함) |
164-
| `tool-registry.ts` | 98개 도구 정의, V3_EXPOSED 10개 노출 (TOOL_COUNTS 파생값) |
164+
| `tool-registry.ts` | 99개 도구 정의, V3_EXPOSED 10개 노출 (TOOL_COUNTS 파생값) |
165165
| `tools/legal-research.ts` | chain_* 8개 통합 진입점 — task 파라미터 디스패치 (v4.4.0) |
166166
| `tools/legal-analysis.ts` | 킬러피처 4개 통합 진입점 — mode 파라미터 디스패치 (v4.4.0) |
167167
| `tools/verify-citations.ts` | LLM 환각 방지 인용 검증 (v3.5 killer feature) |

‎README-EN.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,25 @@
3131

3232
---
3333

34+
## v4.13.0 — Compliance-register monitoring: 98 calls down to 1-2
35+
36+
Three field reports from running an ISO compliance register (108 laws across 8 domains) against this server:
37+
[#157](https://github.com/chrisryugj/korean-law-mcp/issues/157) · [#158](https://github.com/chrisryugj/korean-law-mcp/issues/158) · [#159](https://github.com/chrisryugj/korean-law-mcp/issues/159) (@thkim660207-cmd). Tests 738 → **758**.
38+
39+
- **`search_law_bulk`**: takes an array of law names and returns one compact line each — `law_id · MST · effective_date · upcoming`.
40+
Pass `previous={law_id: previous_MST}` for diff mode: only laws whose MST changed come back, so a full register sweep
41+
costs one or two calls. The response ends with a snapshot JSON you feed straight into the next run. Amendments that are
42+
promulgated but not yet in force do not change the current MST, so they are reported separately instead of silently
43+
reading as "unchanged"
44+
- **Per-article amendment history is now opt-in** (`includeHistory=true` to restore): it used to be dumped from original
45+
enactment every time, and on the Occupational Safety and Health Act (enacted 1981) that section alone exhausted the
46+
50k-char response budget — truncating the old-vs-new comparison table people actually needed
47+
- **Image-only annexes now say so**: some notices return discharge-limit tables as `<img>` tags with no text. That used to
48+
pass through as "has content", which is exactly where a model starts guessing numbers. Now it carries a warning plus the
49+
source URL and the **original attachment (hwpx/pdf) links** — which the API was already returning but the code never surfaced
50+
51+
---
52+
3453
## v4.12.0 — 62-issue batch + closing the "it doesn't exist" failure paths
3554

3655
A batch that measured three axes (legal correctness, token efficiency, response latency) and closed **62 filed issues** ([#88–#149](https://github.com/chrisryugj/korean-law-mcp/issues), PR [#150](https://github.com/chrisryugj/korean-law-mcp/pull/150) by @humdrum00001010), plus follow-up repairs for 31 defects found in pre-merge domain review. Tests 196 → **701**.

‎README.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,24 @@
3030

3131
---
3232

33+
## v4.13.0 — 준법 등록부 감시: 98회 호출을 1~2회로
34+
35+
ISO 법규준수 등록부(품질·환경·안전보건·정보보안·BCM·부패방지·AI·ESG 8개 영역 108개 법령)를 이 서버로 주간 감시하던
36+
실사용 보고 3건([#157](https://github.com/chrisryugj/korean-law-mcp/issues/157) · [#158](https://github.com/chrisryugj/korean-law-mcp/issues/158) · [#159](https://github.com/chrisryugj/korean-law-mcp/issues/159), @thkim660207-cmd)을 처리했습니다. 테스트 738 → **758**.
37+
38+
- **`search_law_bulk` — 법령명 배열을 한 번에**: 건당 `법령ID · MST · 시행일 · 시행예정` 한 줄만 돌려줍니다.
39+
`previous={법령ID: 직전 MST}` 를 주면 **MST가 달라진 법령만** 받는 diff 모드 — 등록부 전건 감시가 호출 1~2회로 끝납니다.
40+
응답 말미의 스냅샷 JSON을 다음 감시에 그대로 넣으면 됩니다. 공포됐으나 미시행인 개정은 MST가 아직 안 바뀌므로,
41+
"본문 동일 + 시행예정 있음"으로 따로 표시해 시행일을 놓치지 않게 합니다
42+
- **개정 이력은 이제 opt-in**: `amendment_track` 이 제정 시점부터의 조문별 개정 전건을 항상 싣던 것을 껐습니다
43+
(`includeHistory=true` 로 복원). 산업안전보건법(1981년 제정) 실측에서 이 섹션 혼자 5만 자 응답 상한을 소진해,
44+
정작 필요한 **신구대조표가 잘려나가던** 문제입니다
45+
- **이미지로만 온 별표는 그렇다고 말합니다**: 법제처가 배출허용기준 같은 수치 표를 `<img>` 태그로만 주는 고시가 있습니다.
46+
종전에는 "본문 있음"으로 그대로 나가 LLM이 수치를 추측하기 좋은 자리였습니다 — 이제 경고와 함께 원문 URL,
47+
그리고 **첨부파일 원문(hwpx/pdf) 링크**를 안내합니다
48+
49+
---
50+
3351
## v4.12.0 — 이슈 62건 통합 배치 + "없다고 잘못 말하던" 경로 차단
3452

3553
법률 자문 3축(법적 정합성·토큰 효율·응답 성능)을 실측해 등록 이슈 62건([#88~#149](https://github.com/chrisryugj/korean-law-mcp/issues))을 한 번에 해결한 배치([#150](https://github.com/chrisryugj/korean-law-mcp/pull/150), @humdrum00001010)와, 머지 전 도메인별 리뷰에서 찾은 결함 31건의 후속 수리. 테스트 196 → **701**.

‎docs/API.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Korean Law MCP - API Reference
22

3-
> **v4.12.0** | 10개 노출 도구 (내부 98개, 미노출 도구는 execute_tool 또는 직접 호출로 접근)
3+
> **v4.13.0** | 10개 노출 도구 (내부 99개, 미노출 도구는 execute_tool 또는 직접 호출로 접근)
44
55
도구 구조는 [README.md](../README.md) 참조.
66
상세 파라미터는 각 도구의 Zod 스키마(`src/tools/*.ts`) 참조.
@@ -88,11 +88,12 @@
8888
|------|------|
8989
| `ordinance_radar` | 조례 제1조(목적)에서 근거 상위법령(법률/시행령/시행규칙)을 추출하고, 각 상위법의 현행 시행일 vs 조례 시행일을 대조해 "상위법이 조례 시행 이후 개정 → 정비 검토 대상"을 자동 플래그. `ordinSeq`(또는 `id`)나 `ordinanceName` 중 하나 필수. 본문 전체가 아닌 목적 조문만 스캔해 별표의 무관 인용(감면대상 정의 등) 과잉경보를 배제. lnkOrd 연계 API는 커버리지가 낮아 미사용 |
9090

91-
### 검색 (11개)
91+
### 검색 (12개)
9292

9393
| 도구 | target | 설명 |
9494
|------|--------|------|
9595
| `search_law` | `law`+`eflaw` | 법령명 검색 (약칭 자동 인식, 제명변경·시행예정 개정 자동 병기) |
96+
| `search_law_bulk` | `law`+`eflaw` | 법령명 배열 일괄 조회 — 건당 `법령ID·MST·시행일·시행예정`만 컴팩트 반환. `previous={법령ID:직전MST}` 로 **변경분만** 받는 diff 모드 (준법 등록부 정기 감시용, 최대 40건/호출) |
9697
| `search_admin_rule` | `admrul` | 훈령/예규/고시/공고 |
9798
| `search_ordinance` | `ordin` | 조례/규칙 |
9899
| `search_precedents` | `prec` | 판례 |

‎docs/ARCHITECTURE.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787

8888
1. **Separation of Concerns**: Tools → Shared Libs → API Client
8989
2. **Single Responsibility**: 파일당 200줄 미만, 단일 기능 (예외: `risk-rules.ts`. 기존 초과 파일이 남아 있다 — CLAUDE.md 규칙 2 참조)
90-
3. **Centralized Tool Registry**: 98개 도구를 `tool-registry.ts`의 `allTools[]`에 등록. 그중 `V3_EXPOSED` 10개만 `ListTools`로 노출하고 나머지는 `execute_tool` 경유 — 클라이언트 컨텍스트에 98개 description을 싣지 않기 위한 것
90+
3. **Centralized Tool Registry**: 99개 도구를 `tool-registry.ts`의 `allTools[]`에 등록. 그중 `V3_EXPOSED` 10개만 `ListTools`로 노출하고 나머지는 `execute_tool` 경유 — 클라이언트 컨텍스트에 99개 description을 싣지 않기 위한 것
9191
4. **Type Safety**: TypeScript strict mode + Zod validation
9292
5. **Stateless HTTP**: MCP StreamableHTTP stateless 모드 — 요청마다 fresh Server+Transport, AsyncLocalStorage로 요청별 API 키 격리 (재시작·스케일아웃 내성)
9393
6. **Network Resilience**: 30s timeout, 3 retries with exponential backoff
@@ -103,7 +103,7 @@
103103

104104
- MCP 서버 초기화
105105
- CLI 인자 파싱 (`--mode stdio|sse|http`, `--port`)
106-
- `registerTools(server, apiClient)` 호출로 98개 도구 일괄 등록
106+
- `registerTools(server, apiClient)` 호출로 99개 도구 일괄 등록
107107

108108
### Tool Registry (`src/tool-registry.ts`)
109109

@@ -116,7 +116,7 @@
116116

117117
- `korean-law "민법 제1조"` 자연어 한 줄 → `query-router`가 도구/파라미터 결정 (v2.0)
118118
- `korean-law` 인자 없이 실행하면 REPL 모드
119-
- `korean-law <tool> --param value` 형태로 98개 도구 직접 실행도 유지
119+
- `korean-law <tool> --param value` 형태로 99개 도구 직접 실행도 유지
120120
- `korean-law list [--category ...]` / `help <tool>` / `--json-input`
121121
- CLI 경로(`cli.ts`/`cli-executor.ts`/`cli-format.ts`)는 별도 바이너리라 `console.log`를 쓴다 — STDIO MCP 경로와 섞이지 않는다
122122

@@ -260,7 +260,7 @@ legal_research(task="action_basis") ── 45초 ──▶ 만료
260260
| LRU 캐시 (hit rate ~82%) | 반복 조회 85% 응답 시간 감소 |
261261
| `truncateSections()` | 체인 응답 크기 최적화 |
262262
| 판례 응답 compact | 토큰 74% 감축 |
263-
| `V3_EXPOSED` 10개만 노출 | ListTools 컨텍스트에 98개 description을 싣지 않음 |
263+
| `V3_EXPOSED` 10개만 노출 | ListTools 컨텍스트에 99개 description을 싣지 않음 |
264264
| 체인 데드라인 + 부분 결과 | 꼬리 지연에서 타임아웃 대신 부분 답 |
265265

266266
> 레이턴시 수치는 측정 시점·소스 IP에 따라 흔들린다. 업스트림 실측 방법과 최신 값은
@@ -328,7 +328,7 @@ docker run -e LAW_OC=your-key -e MCP_HTTP_HOST=0.0.0.0 \
328328

329329
## Related Docs
330330

331-
- [API.md](API.md) - 98개 도구 레퍼런스 (노출 10개)
331+
- [API.md](API.md) - 99개 도구 레퍼런스 (노출 10개)
332332
- [DEVELOPMENT.md](DEVELOPMENT.md) - 개발자 가이드
333333
- [UPSTREAM-PERF.md](UPSTREAM-PERF.md) - 업스트림 실측·재시도 정책 근거
334334
- [FLY-COST.md](FLY-COST.md) - 통합 호스트 배포 배경 (이 레포에서 `fly deploy` 금지 이유)

‎docs/DEVELOPMENT.md‎

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)