feat(seo-schema-generator): merge site-extraction + source-to-schema into one skill

Unify the two schema-generation scenarios into a single slot-17 skill, both
feeding one claims register -> build -> validate(16) pipeline:

- Mode 1 (existing site): NEW scripts/extract_site_claims.py turns URLs / local
  HTML / a directory into a claims register. Existing JSON-LD -> CONFIRMED;
  title/OpenGraph -> PENDING (never auto-shipped). + site-extraction-methodology.md
  and bundled fixtures/site/ demo pages.
- Mode 2 (not-yet-published site): land the source-to-schema engine
  (build_schema_drafts.py, type_templates.json, claims/source registers, 3 refs,
  sample_claims.csv) from the Desktop builder.
- Rewrite SKILL.md (v2.0) around the two-mode framing; the claims register is the
  shared pivot. Only CONFIRMED, non-conflicting claims become schema; unfilled
  template slots are pruned, never emitted as placeholders.
- Retire the old template-fill generator (code/ + desktop/); update root CLAUDE.md.

Self-tested both chains end-to-end: Mode 2 sample -> build -> validate PASS (P0=0);
Mode 1 fixtures -> extract -> build -> validate PASS (P0=0), JSON-LD round-trips with
nested address intact. Fixed two adapter bugs (nested node promotion; relative-path URI).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-28 00:38:40 +09:00
parent 3a8edebfef
commit 1706a820fe
39 changed files with 1536 additions and 1599 deletions

View File

@@ -0,0 +1,8 @@
entity_id,entity_type,property,value,lang,url,source_ids,authority,confidence,conflict,status,note
org:example,Organization,@id,https://www.example.com/#org,,,S-OFF,1,high,,CONFIRMED,
org:example,Organization,name,Example Corp,,,S-OFF|S-DART,1,high,,CONFIRMED,
org:example,Organization,url,https://www.example.com/,,,S-OFF,1,high,,CONFIRMED,
org:example,Organization,address.addressLocality,Seoul,,,S-DART,1,high,,CONFIRMED,
org:example,Organization,address.addressCountry,KR,,,S-DART,1,high,,CONFIRMED,
org:example,Organization,sameAs,https://www.wikidata.org/wiki/Q000|https://en.wikipedia.org/wiki/Example,,,S-WD|S-WIKI,2,high,,CONFIRMED,array via pipe
org:example,Organization,foundingDate,1998-01-01,,,S-DART,1,high,Y,PENDING,두 출처 연도 충돌 -> 해소 필요
1 entity_id entity_type property value lang url source_ids authority confidence conflict status note
2 org:example Organization @id https://www.example.com/#org S-OFF 1 high CONFIRMED
3 org:example Organization name Example Corp S-OFF|S-DART 1 high CONFIRMED
4 org:example Organization url https://www.example.com/ S-OFF 1 high CONFIRMED
5 org:example Organization address.addressLocality Seoul S-DART 1 high CONFIRMED
6 org:example Organization address.addressCountry KR S-DART 1 high CONFIRMED
7 org:example Organization sameAs https://www.wikidata.org/wiki/Q000|https://en.wikipedia.org/wiki/Example S-WD|S-WIKI 2 high CONFIRMED array via pipe
8 org:example Organization foundingDate 1998-01-01 S-DART 1 high Y PENDING 두 출처 연도 충돌 -> 해소 필요

View File

@@ -0,0 +1,40 @@
# Schema 초안 리뷰 가이드 (7단계)
> 원칙: **사람은 원본 JSON을 직접 보지 않는다.** 기계가 잡을 수 있는 결함은 검증기 게이트(8단계)가
> 먼저 0건으로 만들고, 사람은 "기계가 못 잡는 것"만 본다. 그래야 "오류 과다" 문제가 재발하지 않는다.
## 검토 순서
1. **먼저 검증기 통과**`zero P0` 확보 (P0가 남은 초안은 검토 대상 아님)
2. 아래 항목은 사람만 판단 가능 → 검토
3. 고객 검토는 P0=0인 깨끗한 초안 + 결함 리포트로만 진행
## 사람이 검토할 항목 (기계가 못 잡는 것)
### A. 사실 정확성 (출처 대조)
- [ ] `name` / `legalName` 이 공식 표기와 정확히 일치하는가 (공백·영문병기 포함)
- [ ] 주소·전화가 **현재 유효한** 값인가 (출처가 오래되지 않았는가)
- [ ] `foundingDate` 등 날짜가 공시값과 일치하는가
- [ ] 인물의 `jobTitle`**현직** 기준인가
### B. 엔티티 정합
- [ ] `sameAs` 가 **정확히 그 엔티티**를 가리키는가 (동명 오정합 없는가)
- [ ] `@id` 참조가 의도한 엔티티로 연결되는가 (Hotel→올바른 Organization)
- [ ] 브랜드 티어(`brand.name`)가 프로퍼티와 일치하는가 (The Shilla/Monogram/Stay)
### C. 언어·번역
- [ ] 언어별 초안의 `inLanguage` 와 실제 값 언어가 일치하는가
- [ ] 번역값이 공식 다국어 표기와 일치하는가 (임의 번역 아님)
### D. 범위 적절성
- [ ] 스키마를 붙이면 안 되는 페이지(mypage/login/booking)에 초안이 없는가
- [ ] 누락된 핵심 엔티티가 없는가 (엔티티-타입 맵 대조)
## 검토 결과 처리
- 수정 필요 → 클레임 레지스터에서 값 수정 후 **빌더 재실행**(JSON 직접 수정 금지: 원천은 항상 클레임)
- 충돌 발견 → `conflict=Y`, `status=PENDING` → 출처 권위로 해소
- 검토 완료 → 저작자·검수자 서명, P1은 `decision-log`에 기록
## 서명
- 저작(빌드): ______ / 일자: 2026-__-__
- 검수(사실확인): ______ / 일자: 2026-__-__
- 게이트(검증기 PASS) 확인: ______ / 일자: 2026-__-__

View File

@@ -0,0 +1,11 @@
source_id,source_type,title_or_name,url_or_filepath,retrieved_date,authority,language,entities_covered,note
S-DART,corporate_disclosure,DART 사업보고서,https://dart.fss.or.kr/...,2026-05-__,1,ko,org:shilla,법인명/설립일/주소/대표자
S-OFF,official_site,공식 홈페이지 About/푸터,https://www.shillahotels.com/,2026-05-__,1,ko,org:shilla|hotel:*|site:ko,공식 표기/연락처/URL
S-SUSTAIN,sustainability_report,지속가능경영보고서 2025,/path/to/esg.pdf,2026-05-__,2,ko,org:shilla,서사/정책
S-WD,wikidata,Wikidata 항목,https://www.wikidata.org/wiki/Q______,2026-05-__,2,en,org:shilla,Q-ID/sameAs
S-WIKI,wikipedia,위키백과,https://en.wikipedia.org/wiki/______,2026-05-__,2,en,org:shilla,sameAs/국제표기
S-RECRUIT,recruitment,채용 사이트 공고,https://recruit._____,2026-05-__,1,ko,job:*,JobPosting 원천
S-YT,youtube,공식 YouTube 채널,https://www.youtube.com/@______,2026-05-__,1,ko,video:*,VideoObject 원천
S-GBP,google_business_profile,Google Business Profile,,2026-05-__,1,ko,hotel:*,NAP/geo
S-BROCH,brochure_pdf,프로퍼티 브로셔,/path/to/brochure.pdf,2026-05-__,2,ko,hotel:*,시설 스펙
S-NEWS,media_article,주요 미디어 기사,https://_____,2026-05-__,3,ko,person:ceo,교차검증
1 source_id source_type title_or_name url_or_filepath retrieved_date authority language entities_covered note
2 S-DART corporate_disclosure DART 사업보고서 https://dart.fss.or.kr/... 2026-05-__ 1 ko org:shilla 법인명/설립일/주소/대표자
3 S-OFF official_site 공식 홈페이지 About/푸터 https://www.shillahotels.com/ 2026-05-__ 1 ko org:shilla|hotel:*|site:ko 공식 표기/연락처/URL
4 S-SUSTAIN sustainability_report 지속가능경영보고서 2025 /path/to/esg.pdf 2026-05-__ 2 ko org:shilla 서사/정책
5 S-WD wikidata Wikidata 항목 https://www.wikidata.org/wiki/Q______ 2026-05-__ 2 en org:shilla Q-ID/sameAs
6 S-WIKI wikipedia 위키백과 https://en.wikipedia.org/wiki/______ 2026-05-__ 2 en org:shilla sameAs/국제표기
7 S-RECRUIT recruitment 채용 사이트 공고 https://recruit._____ 2026-05-__ 1 ko job:* JobPosting 원천
8 S-YT youtube 공식 YouTube 채널 https://www.youtube.com/@______ 2026-05-__ 1 ko video:* VideoObject 원천
9 S-GBP google_business_profile Google Business Profile 2026-05-__ 1 ko hotel:* NAP/geo
10 S-BROCH brochure_pdf 프로퍼티 브로셔 /path/to/brochure.pdf 2026-05-__ 2 ko hotel:* 시설 스펙
11 S-NEWS media_article 주요 미디어 기사 https://_____ 2026-05-__ 3 ko person:ceo 교차검증