Community연구 & 데이터 분석github.com

문서 간 충돌 감지기

두 개 이상의 문서, 데이터셋 또는 추출된 사실 테이블 간의 모순을 찾습니다. '충돌 감지', '모순 찾기', '문서 일치 확인' 등의 요청 시 작동합니다.

문서 간 충돌 감지기란 무엇인가요?

이 스킬은 여러 문서 간의 모순을 체계적으로 감지하는 전문 도구입니다. 사용자가 두 개 이상의 문서를 제공하면 각 문서의 사실을 추출하고, 정규화된 키를 기준으로 클레임을 비교하여 수치, 카테고리, 자유 텍스트 수준에서 불일치를 찾아냅니다. CLI 기반으로 작동하며 JSON, CSV, Markdown 형식의 기계 판독 가능한 충돌 보고서를 생성합니다. Claude Code, Cursor, Codex 등 AI 에이전트 플랫폼에서 명령어로 호출할 수 있으며, entity(높은 심각도), clause(중간 심각도), argument(낮은 심각도) 세 가지 감지 수준을 지원합니다. 특히 여러 출처에서 동일한 주장을 비교해야 하는 데이터 검증, 연구 분석, 문서 감사 작업에 유용합니다. PyYAML이 필요한 YAML 입력을 제외하면 순수 표준 라이브러리로 동작하여 의존성이 낮고, 설정 파일로 문서 소스와 출력 형식을 유연하게 구성할 수 있습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/JiamingShi-JsPhys/agent-skills/tree/HEAD/skills/conflict-detector

Installed? Explore more 연구 & 데이터 분석 skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

충돌 감지기 (conflict-detector)

문서 집합에서 모순을 찾는 독립 실행형 스킬입니다. 각 문서(경로 / 인라인 텍스트 / 인라인 JSON)를 로드하고, 사실을 추출한 후, 문서 간 규칙 엔진이 정규화된 키로 클레임을 짝지어 불일치를 표시합니다.

필수 작업 흐름

의존성 부트스트랩 (첫 사용 시)

첫 실행 전, 이 스킬의 런타임 의존성을 확인하세요.

  • 핵심: 순수 표준 라이브러리 — 설치 불필요.
  • 선택 사항: PyYAML (설정/입력이 .yaml일 때만 필요; JSON 입력은 표준 라이브러리만으로 작동).

PyYAML이 없고 입력이 YAML인 경우 사용자에게 알리고 pip install pyyaml 설치 여부를 물으세요. 사용자가 명시적으로 동의한 후에만 설치하세요. 절대 글로벌 환경에 동의 없이 설치하지 마세요.

  1. YAML 설정 파일 (config/examples/two_docs.yaml 참조)을 로드합니다.

  2. 모든 documents[].value / documents[].path에 접근 가능한지 확인합니다.

  3. python -m src.cli run --config <path> [--format json,csv,md]를 실행합니다.

  4. 수준별 충돌 개수를 보고하고 사용자를 ./conflicts/conflicts_<run_id>.* 파일로 안내합니다.

사용 시점

  • 두 개 이상의 문서, 데이터셋 또는 추출된 사실 테이블을 서로 모순 검사해야 할 때.
  • 사용자가 "충돌 감지", "모순 찾기", "클레임 교차 검증"을 요청하거나 "이 문서들이 일치하는지" 물을 때.
  • 여러 출처에 동일한 클레임(숫자, 상태, 명명된 사실)이 나타나 이를 비교해야 할 때.
  • 문서에서 추출한 사실 테이블의 내부 일관성을 신뢰하기 전에 감사해야 할 때.

사용 예시


# 실행 전 설정 파일 검증 (빠름, 보고서 미작성).
python -m src.cli validate --config config/examples/two_docs.yaml

# 설정이 해석하는 문서 소스 목록 확인.
python -m src.cli list-docs --config config/examples/two_docs.yaml

# 탐지 실행; 출력 형식 선택 (기본값: json).
python -m src.cli run --config config/examples/two_docs.yaml --format json,csv,md

보고서는 ./conflicts/conflicts_<run_id>.{json,csv,md}에 작성됩니다. JSON은 기계 판독 가능한 계약 형식입니다.

오류 처리

  • 설정 파일 오류 (validate가 0이 아닌 코드로 종료) - 보고된 필드를 수정하고 재검증하세요. 스키마 위반을 수동으로 편집하지 마세요.
  • 문서 소스에 접근 불가 - 실행이 중단되며 문제의 documents[] 항목을 명시합니다. 경로나 인라인 값을 확인하고 재시도하세요.
  • 충돌 없음 - 유효하고 보고 가능한 결과(빈 보고서)이며 오류가 아닙니다. 재실행 대신 명시적으로 알리세요.
  • 예상치 못한 종료 코드 - 메시지를 그대로 보고하세요. 수동으로 문서를 비교하는 방식으로 대체하지 마세요.

감지 수준

수준종류심각도예시
entitynumeric_mismatch, boolean높음speed = 10 vs speed = 20
clausecategorical중간status = "active" vs status = "archived"
argumentcategorical (텍스트)낮음일치하지 않는 자유 텍스트 줄

제약 사항

  • 추출은 키-값 중심입니다. 자유 텍스트 단락은 argument 수준(줄 단위 비교)에서만 참여합니다.
  • 단위 정규화는 테이블 기반(unit_map)입니다. 사용자 정의 단위 규칙은 설정을 통해 제공해야 합니다.

Individual skills in this repo

This repo contains 3 individual skills — each has its own dedicated page.

JiamingShi-JsPhys/agent-skills

Document evolution tracker. Use when the user has a family of document versions (timestamped or sequentially named files) and wants to see how the document changed over time -- which paragraphs / lines / sentences were added, removed, or modified between consecutive versions, and how a set of named concepts (or auto-detected headings) evolved (introduced / retained / modified / dropped). Triggers on "track document changes", "version history", "what changed between drafts", "concept lineage", "document evolution". Emits a Markdown + JSON timeline.

JiamingShi-JsPhys/agent-skills

Longitudinal statistical analysis pipeline. Use when the user has panel / repeated-measures data (one or more sessions per subject, with between-subject conditions) and wants to run a reproducible analysis: descriptive stats, a manipulation check, a linear mixed model, a lagged mediator, or a sensitivity analysis over random-effects / covariance structures. Triggers on any of the phrases "LMM", "mixed model", "repeated measures", "longitudinal analysis", "mediation over time", "lagged mediator", "sensitivity analysis of RE structure". When fired, load the YAML config that lists the enabled steps, run the pipeline, and report the per-step results plus the generated CSVs.

JiamingShi-JsPhys/agent-skills

State manager for multi-dimensional computational experiments. Iterate a parameter grid over many rounds, snapshot declared critical files each round, audit every round (params, hashes, timestamps, status), and roll back to any round non-destructively. Use it when a workflow runs hundreds of rounds across multiple parameter dimensions and needs per-round snapshots, full audit trail, and arbitrary rollback - e.g. longitudinal studies, parameter scans, or symbolic/ numerical sweeps calling external solvers (Mathematica, GAP, SymPy, custom scripts).

관련 스킬