contract-compass CLAUDE.md

contract-compass CLAUDE.md is an instructions file for Claude Code from sallim-app/contract-compass. It costs 1,738 tokens per session, scanned B, original, MIT.

A set of instructions for Contract Compass, a web service and MCP server that checks Korean public-contract rules and shows the supporting legal text. MCP is a standard way for AI applications to call external tools and retrieve data.

In plain words
What is it for?
Use it when developing, deploying, testing, or reviewing Contract Compass, especially its legal-rule engine, document search, MCP service, and frontend build.
Why use it?
It explains the project’s operating rules, deployment process, quota handling, and sources of legal decisions so changes do not undermine its rule-based results. It also warns where the built website and authoritative rules actually come from.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Codex.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/sallim-app/contract-compass/claude-md
Clone the repo
git clone --depth 1 https://github.com/sallim-app/contract-compass

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for contract-compass CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/sallim-app/contract-compass/claude-md.svg)](https://agentmods.dev/instructions/sallim-app/contract-compass/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/sallim-app/contract-compass/claude-md"><img src="https://agentmods.dev/badge/instructions/sallim-app/contract-compass/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,738 This file is loaded in full into every session.
When invoked 1,738 The same file — it is already loaded in full.
Security scan B 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01738 $0.01738
Opus 5 $0.00869 $0.00869
Sonnet 5 $0.00348 $0.00348
Haiku 4.5 $0.00174 $0.00174

Measured 5d ago against content hash b7a25cba71a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade B, and why

contract-compass CLAUDE.md scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

`contract-mcp.service`(:8403 — MCP Streamable HTTP). 배포 = `sudo systemctl restart contract-compass|contract-mcp`

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s https://contract.sallim.app/mcp/health
CLAUDE.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md — contract-compass (계약나침반)

한국 공공계약 법령(국가·지방·공기업)을 결정론 룰엔진 + 검증 가능한 조문 원문으로 노출하는 웹서비스 + MCP 서버. 공개 저장소이므로 특정 기관·업무 고유 정보는 넣지 않는다 (커밋 훅 scripts/scan_confidential.sh가 실제로 거부한다 — 우회하지 말고 표현을 고쳐라).

무엇이 살아있나

  • 서비스 2개: contract-compass.service(:8402 — FastAPI 백엔드 + 프런트 dist 서빙) · contract-mcp.service(:8403 — MCP Streamable HTTP). 배포 = sudo systemctl restart contract-compass|contract-mcp
  • 공개 주소: https://contract.sallim.app · MCP …/mcp · 헬스 …/mcp/health · 가격 …/mcp/pricing (별칭 contract.naru.build 유지). 원격 git = github.com/kwenhwang/contract-compass(공개)
  • 프런트는 커밋만으로 안 바뀐다frontend/dist/가 .gitignore인데 백엔드가 그걸 서빙한다. 배포는 반드시 scripts/deploy.sh(생성→빌드→교체→판정). 백엔드 재시작 불필요
  • 티어 게이트: 무료 IP당 50콜/일, 유료 키 cc_live_*. 루프백·stdio는 무제한(야간 QA· 회귀 하네스가 자기 쿼터에 막히는 사고 방지). 구현 = mcp/auth.py·keystore.py + QuotaGate 미들웨어
  • 판정의 진실원은 rules/contract_rules.json(94룰) — 코드에 금액·수치를 박지 마라. 법령 원문 코퍼스는 chroma_db(법령 38건 + 예규·별표·실무가이드), 판례는 law.go.kr 실시간 프록시

이 저장소의 중심 규칙

  1. 모든 MCP 도구는 무LLM — 클라이언트가 이미 LLM이다. 서버는 결정론 판정과 원문만 준다. 백엔드 LLM(웹 /ask 전용)을 MCP 경로로 되살리지 마라(일일 캡·비용 축이 갈린다).
  2. 폴백·절단 은폐 금지. 요청과 다른 것을 줬으면 응답에 적는다 — 상한으로 잘랐으면 무엇이 잘렸는지(omitted_candidates), 요청 건수를 못 지켰으면 그 사실을, 코퍼스 밖 법령이면 "없다"가 아니라 "우리가 못 본다"(law_in_corpus:false)를. 이 프로젝트에서 반복 재발한 결함 계열이 정확히 이것이다(R7·R9·R21·R22·R27·R28·R29·R30·R31).
  3. 후보를 상한으로 자를 때 방법 다양성이 우선한다 — 같은 계약방법 중복이 슬롯을 채우고 유일한 다른 방법(예: 소액수의)이 잘리면 적법한 선택지가 통째로 사라진다(T-2026W33-158).
  4. 코퍼스를 바꿨으면 재색인 → BM25 재구축 → 백엔드 재시작 → 회귀 확인 순서를 지킨다. 실행 중인 uvicorn이 옛 BM25 pickle·chroma 핸들을 물고 있어 삭제된 청크를 참조하면 검색 경로가 500을 낸다(2026-08-14 실측 — 회귀가 backend_error로 잡았다).
  5. 수리한 결함은 tools/mcp_regression.pyR* 회귀로 박는다. 기대값은 반드시 실측으로 확정(지어낸 문항은 회귀를 헛돌게 한다). 사람이 읽는 문항지는 루트 evaluation.xml.
  6. 도구·응답 필드가 바뀌면 SERVER_VERSION 마이너 범프 + server.json 동기. 클라이언트는 옛 도구 목록·응답 계약을 캐시하므로 /mcp/health의 version이 스테일 판별의 유일한 단서다.
  7. 이 파일은 얇게 유지한다 — 상세는 docs/. 새 함정은 여기 쌓지 말고 해당 문서에 넣어라.

Read the full file on GitHub · 71 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 71 lines · 1,738 tokens per session scan B b7a25cba71a4

Subscribe to this mod's changes

contract-compass CLAUDE.md is an instructions file published in the GitHub repository sallim-app/contract-compass (0 stars, last pushed 19d ago), licensed MIT. It adds 1,738 tokens to every session, about $0.0087 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories