Compare commits
4
Commits
8dfda00c12
...
31035d5757
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
31035d5757 | ||
|
|
2bd5a12902 | ||
|
|
6c7c793b2a | ||
|
|
d8e5b241ac |
@@ -1452,3 +1452,116 @@ sub-agent 1라운드: 지적 9건(MAJOR 6·MINOR 3) — 핵심은 **문서가
|
|||||||
1. **문서 검증이 자산 결함을 잡는다.** "불일치 0" 승계 문장을 재실측하게 했더니 조립본 장부의 빌더 불일치가 나왔다 — 이월 문장(D-2)의 근거가 실측으로 강화된 사례. 승계 수치는 옮길 때마다 다시 센다(⑯·⑲ 교훈의 재확인).
|
1. **문서 검증이 자산 결함을 잡는다.** "불일치 0" 승계 문장을 재실측하게 했더니 조립본 장부의 빌더 불일치가 나왔다 — 이월 문장(D-2)의 근거가 실측으로 강화된 사례. 승계 수치는 옮길 때마다 다시 센다(⑯·⑲ 교훈의 재확인).
|
||||||
2. **"손대지 않은 곳"도 파급 검사 대상이다.** 이월 잔재 지적 6건 중 4건이 앞 판본이 보존한 절(§1.3·§1.4·§3.5·§4.4)에서 나왔다 — 코드가 바뀌면 보존 절의 현재형 서술("R0 가 읽는다")이 거짓이 된다. incremental 갱신 시 보존 절을 "현재형 주장" 기준으로 한 번 훑을 것.
|
2. **"손대지 않은 곳"도 파급 검사 대상이다.** 이월 잔재 지적 6건 중 4건이 앞 판본이 보존한 절(§1.3·§1.4·§3.5·§4.4)에서 나왔다 — 코드가 바뀌면 보존 절의 현재형 서술("R0 가 읽는다")이 거짓이 된다. incremental 갱신 시 보존 절을 "현재형 주장" 기준으로 한 번 훑을 것.
|
||||||
3. 배치 순서가 서술의 참을 정한다 — 회전(구판→outdated)을 신판 배치보다 먼저. 문서에 완료형으로 적은 상태 전이는 그 순서로 실행해야 참이 된다.
|
3. 배치 순서가 서술의 참을 정한다 — 회전(구판→outdated)을 신판 배치보다 먼저. 문서에 완료형으로 적은 상태 전이는 그 순서로 실행해야 참이 된다.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2026-08-19 ㉒ — Part 3 개정 신전략서 작성 (구 전략서 대체 · sub-agent 6라운드 · 지적 0 종결)
|
||||||
|
|
||||||
|
산출 `extension_research/stage_1_part_3_개정_신전략서.md` **신규**(48,467 B · sha 앞 `0fa7c0ddf172dcd3`). `stage_1_part_3_개정방안전략서.md`(09:37 판)를 대체 — 같은 날 완료된 BO 투영 회차가 그 문서의 전제 넷을 무너뜨렸기 때문(구 문서는 참고용 존치).
|
||||||
|
|
||||||
|
### 구 전략서에서 바뀐 전제 넷 (§0.2)
|
||||||
|
① 정본 뿌리 조립본 → **배포 원본 `extension_research/Default_Agent`**(신설 자산 배치·게이트·`--asset-root` 전부 이 기준, 조립본 반영은 이월) ② 빌더 뿌리 교정(P3-0b) → **이미 완료**(6→10, 신선 395⊇370) ③ 사이드카(structure_types·module_role_projection ×25)가 **배포 원본에 0건** → 바이트 복사 배포 + 매니페스트 등재(371→426, 델타 55)로 명세화 ④ BO 레코드가 registry 토큰(`Legal_Keywords`=type_ids · `provenance.source_domain`)을 싣게 됨 → **BO 부착 조인 신설**(별칭 목록 해소 → 부착 → 침묵 금지 3단, BO 보존 등식, `by_bo_id` 색인). +정정: SG-11 조인 키는 `details.request_id`(비보장)가 아니라 **`signal_id`**(request_id 승계).
|
||||||
|
|
||||||
|
### 골격
|
||||||
|
D-4 결정안 승계(Θ=expected_runnable 합집합 · order_key 3키 · by_module · 폴백 폐기) — P3-0a 사용자 승인 게이트 유지. L1 없는 2-task(L0 `Task_C_LE_L0_structure_seed_reducer` · L2 `Task_C_LE_L2_final_structure_index_writer`), pack 금지(판정자 없는 pack = 침묵 삼킴 or 상시 실패). 입력 계약 I-1~I-14(별칭표 = `extension_payload_key_declarations.v1.json` 의 `legacy_alias_targets`). 신설 자산: 모듈 1+미러 · 정책 1(`structure_index_policy.v1.json` — 검증 오라클 선례 승계) · 스키마 2(파일명 판본 금지) · 사이드카 복사 50 · yaml 3. 보존 등식 셋(선언·근거·BO — L2 가 I-9/I-2/I-7 원본에서 바깥 수 직접 계수). 회귀 22종(L-a~L-s, 필수 8종), 26 도메인 합성 실측(Θ 56 · 레코드 73 · by_module 34), 예행 pass3. C-7·C-8 폐쇄(선언표 신규 11줄 + 기존 8줄 갱신, count 34→45).
|
||||||
|
|
||||||
|
### 검증 루프 (지시 방법 5)
|
||||||
|
6라운드: 13(MAJOR 4) → 5(MAJOR 1) → 1 → 1 → 1 → **0건**. MAJOR 는 전부 설계 구멍이었다 — BO 부착 실패의 침묵 경로, `source_domain` 구 이름(B1~B5) 별칭 미배선(F0 `_resolve_domain_ids` 는 **목록** 해소·primary 개념 없음), 회귀 기대 코드가 자기 읽기 규율(`_verify_asset`)과 모순, "매니페스트 전수 일치"가 상위 장부 구조(371 중 트리 실재 94)와 충돌. 라운드 4~5 는 한 단어 수준 — "활성"↔`expected_runnable` 혼용이 L-k 필수 회귀를 오발화시키는 지점, 선언 0 도메인(EC-00)의 사이드카 부재 규칙.
|
||||||
|
|
||||||
|
### 교훈
|
||||||
|
1. **조인을 신설하면 그 조인의 실패 경로·보존 등식·별칭 층까지 한 벌이다.** 부착 규칙만 적은 초안은 "부분 부착이 모든 게이트를 통과"하는 침묵 경로를 남겼다.
|
||||||
|
2. **회귀 시나리오는 자기 문서의 읽기 규율과 대조해야 한다.** `_verify_asset` 로 읽으라고 지시한 자산의 "내용만 변조" 회귀는 해시 게이트에 먼저 걸려 의미 검사에 도달하지 못한다 — 변조 회귀는 장부 동반/미동반 두 변종이 짝이다.
|
||||||
|
3. **용어 하나("활성")가 필수 회귀를 뒤집는다.** 정의역이 둘(`active` ⊊ `expected_runnable`) 있는 시스템에서는 집합 이름을 축약하지 말 것.
|
||||||
|
4. 문서 검증자는 편집 파급 검증에서 가장 세다 — 라운드 2~6 의 지적 전부가 "반영이 만든 새 모순"이었다. 반영 후 재검증을 생략하면 수정이 결함을 재생산한다.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2026-08-19 ㉓ — Part 3 신전략서 실행 완료: stage_1_part_3_v.8.yml 생성 (예행 3패스 · 회귀 24/24 · 적대 검증 2라운드)
|
||||||
|
|
||||||
|
산출: 통합본 `ver_8_yaml_candidates/stage_1_part_3_v.8.yml`(52,878 B · task 2 · IN→L0→L2→OUT) + 조각 P3-L0/L2 v1, 배포 원본 신설 5종(`structure_index_compiler.py`+미러 · `structure_index_policy.v1.json` · 스키마 2 — 파일명 무판본·패턴만) + 사이드카 50 복사(조립본과 바이트 동일), `runtime_manifest` **371→426**(델타 55·기존 행 수정 0), 선언표 34→**45**(C-7 구 이름 소비자 제거·C-8 폐쇄), stage_chain·상위 전략서 2곳, 내역서 `stage_1_part_3_개정작업내역서.md`. P3-0a 는 사용자의 실행 지시를 승인으로 처리.
|
||||||
|
|
||||||
|
### 핵심 실측
|
||||||
|
- 예행 3패스(asset root = 배포 원본): pass1 6/45 · pass2 3/29 · **pass3 2/5 — `legal_effect_structures.json` 실생성**. Θ 4종·레코드 6((도메인,type_id) 쌍)·SG-13 6/6 부착·**BO 2/2 부착**(source_domain+Legal_Keywords 결정론 조인 — BO 투영 회차가 실은 registry 토큰이 여기서 회수됨)·보존 등식 셋(L2 가 config·SG-13·BO 원본에서 바깥 수 직접 계수)·역인덱스 셋(by_domain_id·by_module·by_bo_id).
|
||||||
|
- 26 도메인 합성: Θ 56 · 구조 73 · module 34 · 머리 4줄(rank1 money_claim×2 비병합) · 결정론. 계산 탐침: signal_id 조인·dangling 검토·미연결 형식화 각 실증.
|
||||||
|
- 회귀 L-a~L-s 22종 + 보충 2종 = 24/24(필수 8종 포함). 변조는 전부 사본 트리 — 배포 원본 무변.
|
||||||
|
- 선언표 검사기 finding 0(3 yaml 전수). 트리 210 파일·매니페스트 실재분 전수 일치·__pycache__ 0.
|
||||||
|
|
||||||
|
### 검증 루프 (지적 5 → 0)
|
||||||
|
1차 MAJOR 2: ① 선언표 `client_meeting` 행이 **두 곳에 중복**(entry_inputs·handoffs)인데 절반만 갱신 — 검사기는 handoffs 만 읽으므로 기계 검증면 미반영 ② 도메인 봉투 부재가 침묵 스킵(실주행에서 감시 도메인 봉투 부재는 상시 경로) → `audit.input_gaps` 기록+L-k 단언. MINOR 3: L2 의 계약 밖 signal_manifest 읽기(→ L0 가 transaction_id 를 bundle 에 부착해 승계) · 합성/탐침 증적 미보존(→ SUPP 2종 영구 기록) · `Stage_1.Part_3` 약칭 잔존. 재검증 **지적 0건**.
|
||||||
|
|
||||||
|
### 교훈
|
||||||
|
1. **중복 선언 행은 전수 갱신 대상이다.** 같은 계약 문서 안에 같은 행이 두 배열에 있으면(entry_inputs·handoffs) 하나만 고친 갱신은 검사기가 읽는 쪽에 따라 무효가 된다 — 갱신 전에 대상 행을 grep 으로 전수 나열할 것.
|
||||||
|
2. **"실재하는 것만 읽는다"는 규칙에는 부재 기록이 한 벌이다.** 예행에서 전부 실재하는 입력은 부재 경로가 한 번도 발화하지 않아 침묵 스킵이 숨는다 — 부재가 상시인 실주행 조건을 회귀(L-k)로 강제해야 드러난다.
|
||||||
|
3. **하류가 상류 봉인값을 쓰려면 재독이 아니라 승계다.** L2 가 signal_manifest 를 다시 읽는 것은 계약 밖 읽기이자 봉인 우회 여지 — L0 가 검증한 값을 bundle 로 나르는 것이 계약에 맞다.
|
||||||
|
4. **검증 스크립트의 부산물도 배포 트리 오염원이다.** sys.path 반입이 만든 __pycache__ 가 트리에 두 번 생겼다 — 실측 스크립트에는 dont_write_bytecode 를 상수로 둘 것.
|
||||||
|
5. 검사기의 가시 범위에 맞춰 코드를 쓴다 — read_json 직호출 상수만 보는 U4 앞에서 간접 호출 래퍼는 "선언은 했으나 실측 불가"를 만든다(L0 read-plumbing 재작성으로 해소).
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2026-08-20 ㉔ — Part 3 분석서 작성: stage_1_part_3_updated_yaml_analysis.md (sub-agent 3라운드 · 지적 0 종결)
|
||||||
|
|
||||||
|
산출 `extension_research/stage_1_part_3_updated_yaml_analysis.md` **신규**(41,948 B · 315행 · sha 앞 `7be1310eade795ac`). Part 1|2 분석서와 같은 기준으로 `stage_1_part_3_v.8.yml`(52,878 B / 1,037행 / sha 앞 `9a163a03…`)을 전수 분석 — 전체 DAG(ASCII) · 소작업 2종 표 · IO 표(포맷 포함) · 자산 배포 위치(신설 5종 + 사이드카 50 + 미러, `Default_Agent/` 서브폴더 경로 전부) · upstream–downstream 연결 8행(이유/방식/자료 사용) · 인계면 45줄 · 검증 상태(예행 3패스 · 합성 26 · 회귀 22+2 · 적대 검증 2라운드) · 근거표.
|
||||||
|
|
||||||
|
### 골격 수치 (전부 실측)
|
||||||
|
task 2(L0 50–605 · L2 607–1,015 — 내용 종행 기준, 임베디드 code 547/400행) · task_procedure 1,017–1,034 · LLM 0/code 2 · 노드 4 완전 직렬. D-4 (가)~(라) 구현 흔적, L1 부재 근거(§1.3), 구조 레코드 정의((도메인,type_id) 쌍), 보존 등식 셋의 바깥 수 직접 계수, 역인덱스 셋, PART3_REQUIRED_ASSETS 10 리터럴, 봉인 둘(files 19항 · SG-01→색인→config_sha256 사슬).
|
||||||
|
|
||||||
|
### 검증 루프 (지적 6 → 1 → 0 · 전부 MINOR)
|
||||||
|
라운드 1: code 행수 계수 오류(548/401→547/400 — `code: |-` 헤더 행 포함 여부), 행 범위 규약 비일관, **§2 모듈 체인 순서가 코드 실물과 다름**(L0-2c 가 레코드 생성보다 앞 · L0-5 는 L0-2 안에서 종료), transaction_id 부착 주체 오기(모듈이 아니라 YAML 래퍼), D-4 표의 (다) 갈래 누락, 스키마 패턴 3종→5종. 라운드 2: 교차참조 오기 1(§1.2→§1.3). 라운드 3: 0건.
|
||||||
|
|
||||||
|
### 교훈
|
||||||
|
1. **요약 다이어그램은 설계 문서가 아니라 코드의 실행 순서를 실측으로 옮긴다.** 신전략서의 단계 번호(L0-1~L0-8)를 순서대로 옮긴 그림은 구현이 정당하게 재배열한 순서(교차 검증을 재료 소비 앞에)와 어긋난 채 정확해 보였다 — 분석서의 DAG 박스는 코드 행 순서로 재검증할 것.
|
||||||
|
2. **행 계수에는 계수 규약을 문서에 명문화한다.** "몇 행"은 헤더 포함 여부·공백 처리에 따라 ±1 이 나며, 규약 없는 수치는 검증자마다 다른 값을 낸다 — Part 1|2 분석서 검증(㉑)과 같은 지적이 반복됐다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2026-08-20 ㉕ — Part 1·2·3 자산 배포 위치 총람 작성: stage_1_2_3_assets_distribution_location.md (병렬 추출 3 + 적대 검증 1라운드 PASS)
|
||||||
|
|
||||||
|
산출 `extension_research/stage_1_2_3_assets_distribution_location.md` **신규**(169행). 세 v.8 YAML(6,668 / 3,315 / 1,038행) 전량 판독(병렬 sub-agent 3) 후 자산을 8개 절로 분류 — §0 배포 루트 3계층(ASSET_ROOT `Default_Agent/` ← `extension_research/Default_Agent` 통배포 · localdocs 워크스페이스 루트 · `/tmp/s1` 샌드박스), §1 공통자산 12종(≥2 Part), §2~§4 Part별 전용 정적 자산, §5 사건 입력 2종, §6 실행 생성 산출물(P1 19 · P2 17 · P3 4, 생산→소비 체인), §7 참조 전용·빌드타임, §8 특기 8항. 크기는 배포 트리 실측 바이트(가족 자산은 n·min~max·총합).
|
||||||
|
|
||||||
|
### 실측 근거 수치
|
||||||
|
배포 원본 `extension_research/Default_Agent/` = 210파일(.DS_Store 제외, 도메인 26 · signal 미러 24 · 스키마 폐포 17) — Part 2 자산 8/19 17:15, Part 3 자산 8/19 23:48 배포 확인. `runtime_manifest.json` 426건 등재(P4+ computations 포함 — 물리 실체는 선행구축 트리 1,322파일). `domains/_registry_index.json`은 매니페스트 미등재 — SG-01 봉인 단독 방어. 검증 agent: 35 line-spot + 사이즈 전수 + 존재성 5건 → **PASS, MINOR 3**(PART2_REQUIRED_ASSETS 10종 중 6종만 게이트 전용 · activation 스키마의 §1/§3 집계 중복 · 210파일 단서) 즉시 반영.
|
||||||
|
|
||||||
|
### 교훈
|
||||||
|
1. **자산 배포 문서는 "YAML이 부르는 논리 경로"와 "물리 원본 트리"를 분리해 적는다.** 같은 이름의 Default_Agent 트리가 3곳(선행구축 1,322 · extension_research 210 · ver_8 후보 560)에 있어, 어느 것이 서버 배포 원본인지는 YAML remedy 문구("extension_research/Default_Agent 통째 배포, 부분 복사 불허")와 파일 mtime 대조로만 확정된다.
|
||||||
|
2. **게이트 전용 자산과 소비 자산을 구분해야 표가 참이 된다.** signal_registry.v2·s5_execution_contract.v2는 P3에서 등재·해시·가독 검사만 받고 파싱되지 않는다 — "쓰는 task" 열에 (게이트만)을 명기하지 않으면 의존 관계가 과장된다.
|
||||||
|
3. **가족 자산(도메인 26종 등)의 바이트 집계는 겹침을 명시한다.** domain_activation_manifest.schema.json처럼 공통 표와 폐포 집계 양쪽에 놓이는 파일은 합산 중복 주의를 달지 않으면 총량이 이중 계상된다.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2026-08-20 ㉕ — 자산 위치 문제 식별 v.2 확정 (1차 실측 + sub-agent 재점검 9/9 동의 · 판정 반전 2건)
|
||||||
|
|
||||||
|
산출 `extension_research/problems_identified_in_detecting_assets_location_v.2.md` **신규** — 총람 §8 특기사항 8건 + v.1 신규 1건(manifest 괴리 277)을 전건 재실측해 확정 분류(A: YAML 수정 3건 / B: 자산 등재·삭제 1+2건 / C: 문제 아님 6건 / D: 설계 결정 1건).
|
||||||
|
|
||||||
|
### v.1 판정을 뒤집은 2건 (핵심)
|
||||||
|
1. **277건 복사 권장(높음) → 복사 금지.** 매니페스트는 Stage 1 전 계열의 상위 장부, 배포 트리는 "실행이 읽는 것만" — 명문 4곳(P1|2 분석서 §5.1·§5.3, P3 분석서 §6.3, 신전략서 §1.4·§10-2) + 게이트 실측(자기 목록만 순회·computations/law_versions 참조 0). 복사하면 트리 정의 파괴 + 이월과 충돌.
|
||||||
|
2. **P3 L24 "훼손 의심" → 저작 원문.** git 생성 커밋(130ed0b9) 바이트가 현재와 동일(변경 이력 0), "137종"은 절대 원칙 라벨("제약 2"는 애초 부재).
|
||||||
|
|
||||||
|
### 확정 문제 4건과 처방 요지
|
||||||
|
8.2 R0 사문 상수 2줄(낮음 — 파급: 조각 동기화+분석서 행 범위) · 8.3 legacy_paths 주석 오류(낮음 — R1 사용처도 있음, v.1 누락) · 8.4 P1 자산 6종 무앵커(중간 — **배포 원본 manifest 직접 행 추가**가 회차 관례, 빌더 재실행은 395≠426이라 파괴적; count 동반 갱신 필수) · 8.8b 토큰 평문(**로테이션이 본질** — 402파일 전파 실측, SKILL.md 에 시크릿 주입 문법 부재라 env 치환 단독 처방은 실행 불능 위험).
|
||||||
|
|
||||||
|
### 교훈
|
||||||
|
1. **"권장 조치"는 기존 설계 명문과 대조한 뒤에 낸다.** v.1 의 277 복사 권장은 사실 관찰은 정확했으나 4곳의 설계 명문을 확인하지 않아 정반대 처방이 됐다 — 관찰의 정확성과 처방의 타당성은 별개 검증이다.
|
||||||
|
2. **"훼손 의심"은 git 이력이 즉답한다.** 생성 커밋 바이트 대조 한 번이면 저작/훼손이 갈린다 — 추론(라벨 병렬성)으로 판정하지 말 것.
|
||||||
|
3. **보안 처방은 실행 가능성(백엔드 지원)과 노출 범위(저장소 전파)를 함께 재야 한다** — YAML 3본 치환은 402파일 노출 앞에서 본질이 아니다.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2026-08-20 ㉖ — 자산 정리 회차: v.2 확정 4건 실행 (P2 사문 상수·주석 / manifest +6 / matrix 제거 · sub-agent 2라운드 1→0)
|
||||||
|
|
||||||
|
v.2 §2 의 지정 4건만 수행. 산출:
|
||||||
|
- **P2 통합본 개정** `stage_1_part_2_v.8.yml` → **195,963 B / 3,315행 / sha 앞 `ec407309a5ab43f4`** (구본 `outdated/stage_1_part_2_v.8.pre_asset_triage_fix.yml`). R0 사문 상수 2줄 삭제(ACTIVATION_MANIFEST_PATH 는 S0 2회만 잔존·REGISTRY_INDEX_PATH 전 파일 0회), L28 주석을 "구 slice/seed 경로 한정 + stage_a/universe/postb_* 5파일 정본 유지" 3줄로 교체. R0 조각 동기화(구본 `outdated/_pre_asset_triage_fix/`). 행 이동: A0 62–719 · B 720–849 · R0 850–1,793(주석 +2 · 상수 −2 상쇄로 R1 이후 무변).
|
||||||
|
- **runtime_manifest 426→432**: P1 무앵커 자산 6종 직접 행 추가(count 동반 갱신·왕복 보존) — 복원 기준 확보(게이트 강제는 P1 개정 회차 몫).
|
||||||
|
- **matrix 제거**: `case_kind_domain_matrix.v2.json` 을 배포 트리에서 제거(조립본 원본과 바이트 동일 확인 후 · 빈 폴더 정리) — 트리 209 파일 · 교집합 155/불일치 0 · 실물-미등재 54 · 277 무변.
|
||||||
|
- **총람 회전**: `stage_1_2_3_assets_distribution_location.md` 를 Default_Agent 변화 기록만으로 재작성(전판 `_old.md` 존치).
|
||||||
|
- **분석서 파급 10곳** 갱신(수치·행 범위·상수 서술 §3.3/§3.5 + §8 이력 행 시효 주석 — 원문 보존).
|
||||||
|
|
||||||
|
검증: 예행 3패스 PASS + **BO.json·legal_effect_structures.json·리포트 3본 전부 이전 회차와 바이트 동일**(수정이 값에 무영향 실증). sub-agent 검증 29항 — 지적 1건(§8 갱신 누락 — v.2 파급 문면 vs "§8 은 손대지 않는다" 관례 충돌 자리) 반영 후 0건.
|
||||||
|
|
||||||
|
### 교훈
|
||||||
|
1. **이력 절은 개서하지 않고 시효 주석으로 닫는다** — §8 라운드 기록의 현재형 서술이 낡았을 때 원문 교체는 이력 위조, 방치는 오독 — "(…는 2026-08-20 회차에서 삭제됐다)" 부가가 정답.
|
||||||
|
2. **주석 확장(+2)과 코드 삭제(−2)가 상쇄돼도 중간 블록 행 범위는 이동한다** — A0/B 는 +2, R0 는 시작 +2·끝 0, R1 이후 무변. 파일 총행 무변을 "행 범위 무변"으로 착각하지 말 것.
|
||||||
|
|||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_s2_module_role_projection.v1",
|
||||||
|
"domain_id": "E-00",
|
||||||
|
"legacy_projection_source": {
|
||||||
|
"path": "S_0_GPT/legacy/part4/structure_projection_contract.json",
|
||||||
|
"sha256": "9e615dda7e26e23fcaae381ed05763d16e4887909400277c9996919e09398398"
|
||||||
|
},
|
||||||
|
"structure_type_to_projection": {
|
||||||
|
"general_legal_effect": {
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"default_projection": {
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles",
|
||||||
|
"review_code": "UNREGISTERED_EFFECT_TYPE_REVIEW"
|
||||||
|
},
|
||||||
|
"closure_status": "CLOSED_WITH_LOCAL_FILES"
|
||||||
|
}
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_s2_structure_types.v1",
|
||||||
|
"domain_id": "E-00",
|
||||||
|
"legacy_contract": {
|
||||||
|
"canonical_type_set_frozen": true,
|
||||||
|
"source": "1. Stage_1/v.7/extension_research/선행구축/S_0_GPT/legacy/part3/structure_type_contract.json"
|
||||||
|
},
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type_id": "general_legal_effect",
|
||||||
|
"priority_rank": 11,
|
||||||
|
"legacy_source": "Part3 fallback",
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles",
|
||||||
|
"admission_rule": "registered route only; E-00 unregistered material remains review"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"noncanonical_preservation": "nonrouting_labels",
|
||||||
|
"ordering_preserved": true
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"default_projection":null,"domain_id":"E-01","mappings":[{"module":"juristic_act","role_projection":"act_party_object_roles","source":"s6_registered","structure_type":"juristic_act_validity"},{"module":"juristic_act","role_projection":"declarant_counterparty_roles","source":"s6_registered","structure_type":"declaration_defect"},{"module":"juristic_act","role_projection":"canceller_counterparty_third_party_roles","source":"s6_registered","structure_type":"cancellation_effect"},{"module":"agency","role_projection":"principal_agent_counterparty_roles","source":"s6_registered","structure_type":"unauthorized_agency"},{"module":"agency","role_projection":"principal_apparent_agent_relying_party_roles","source":"s6_registered","structure_type":"apparent_agency"},{"module":"juristic_act","role_projection":"condition_beneficiary_obligor_roles","source":"s6_registered","structure_type":"condition_term_effect"}],"missing_mapping_policy":{"emit_review_code":"UNREGISTERED_EFFECT_TYPE_REVIEW","silent_fallback_forbidden":true},"schema_version":"stage1_domain_module_role_projection.v1","status":"ACTIVE"}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"admission_rules":{"multiple_types_allowed":true,"nonregistered_type_review_code":"UNREGISTERED_EFFECT_TYPE_REVIEW","registered_membership_required":true,"silent_general_legal_effect_fallback_forbidden":true,"source_order_deduplicated":true},"domain_id":"E-01","schema_version":"stage1_domain_structure_types.v1","status":"ACTIVE","structure_types":[{"module":"juristic_act","priority_rank":71,"role_projection":"act_party_object_roles","type_id":"juristic_act_validity"},{"module":"juristic_act","priority_rank":72,"role_projection":"declarant_counterparty_roles","type_id":"declaration_defect"},{"module":"juristic_act","priority_rank":73,"role_projection":"canceller_counterparty_third_party_roles","type_id":"cancellation_effect"},{"module":"agency","priority_rank":74,"role_projection":"principal_agent_counterparty_roles","type_id":"unauthorized_agency"},{"module":"agency","priority_rank":75,"role_projection":"principal_apparent_agent_relying_party_roles","type_id":"apparent_agency"},{"module":"juristic_act","priority_rank":76,"role_projection":"condition_beneficiary_obligor_roles","type_id":"condition_term_effect"}]}
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "s2_module_role_projection.v1",
|
||||||
|
"domain_id": "E-02",
|
||||||
|
"projections": [
|
||||||
|
{
|
||||||
|
"type_id": "money_claim",
|
||||||
|
"module": "money_claim",
|
||||||
|
"role_projection": "claim_chain_ref"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "general_legal_effect",
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"closure_status": "CLOSED"
|
||||||
|
}
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "s2_domain_structure_types.v1",
|
||||||
|
"domain_id": "E-02",
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type_id": "money_claim",
|
||||||
|
"priority_rank": 1,
|
||||||
|
"legacy_source": "B1_Money_Successor",
|
||||||
|
"module": "money_claim",
|
||||||
|
"role_projection": "claim_chain_ref",
|
||||||
|
"registered": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "general_legal_effect",
|
||||||
|
"priority_rank": 11,
|
||||||
|
"legacy_source": "B1_Money_Successor",
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles",
|
||||||
|
"registered": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"fallback_policy": "unregistered_effect_type_review; silent_generalization_forbidden"
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "s2_module_role_projection.v1",
|
||||||
|
"domain_id": "E-03",
|
||||||
|
"projections": [
|
||||||
|
{
|
||||||
|
"type_id": "money_claim",
|
||||||
|
"module": "money_claim",
|
||||||
|
"role_projection": "claim_chain_ref"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "commercial_successor",
|
||||||
|
"module": "commercial_successor",
|
||||||
|
"role_projection": "claim_chain_ref"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "general_legal_effect",
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"closure_status": "CLOSED"
|
||||||
|
}
|
||||||
+31
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "s2_domain_structure_types.v1",
|
||||||
|
"domain_id": "E-03",
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type_id": "money_claim",
|
||||||
|
"priority_rank": 1,
|
||||||
|
"legacy_source": "B1_Money_Successor",
|
||||||
|
"module": "money_claim",
|
||||||
|
"role_projection": "claim_chain_ref",
|
||||||
|
"registered": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "commercial_successor",
|
||||||
|
"priority_rank": 2,
|
||||||
|
"legacy_source": "B1_Money_Successor",
|
||||||
|
"module": "commercial_successor",
|
||||||
|
"role_projection": "claim_chain_ref",
|
||||||
|
"registered": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "general_legal_effect",
|
||||||
|
"priority_rank": 11,
|
||||||
|
"legacy_source": "B1_Money_Successor",
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles",
|
||||||
|
"registered": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"fallback_policy": "unregistered_effect_type_review; silent_generalization_forbidden"
|
||||||
|
}
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_domain_module_role_projection.v1",
|
||||||
|
"domain_id": "E-04",
|
||||||
|
"status": "ACTIVE",
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"structure_type": "land_use_gain",
|
||||||
|
"module": "land_use_gain",
|
||||||
|
"role_projection": "legal_calculation_object",
|
||||||
|
"source": "legacy_preserved_or_additive_registered"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"structure_type": "valuation",
|
||||||
|
"module": "valuation",
|
||||||
|
"role_projection": "legal_calculation_object",
|
||||||
|
"source": "legacy_preserved_or_additive_registered"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"structure_type": "unjust_enrichment",
|
||||||
|
"module": "unjust_enrichment",
|
||||||
|
"role_projection": "restitution_roles",
|
||||||
|
"source": "legacy_preserved_or_additive_registered"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_projection": null,
|
||||||
|
"missing_mapping_policy": {
|
||||||
|
"emit_review_code": "UNREGISTERED_EFFECT_TYPE_REVIEW",
|
||||||
|
"silent_fallback_forbidden": true
|
||||||
|
}
|
||||||
|
}
|
||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_domain_structure_types.v1",
|
||||||
|
"domain_id": "E-04",
|
||||||
|
"status": "ACTIVE",
|
||||||
|
"legacy_source_domain": "B3",
|
||||||
|
"structure_types": [
|
||||||
|
{
|
||||||
|
"type_id": "land_use_gain",
|
||||||
|
"priority_rank": 5,
|
||||||
|
"module": "land_use_gain",
|
||||||
|
"role_projection": "legal_calculation_object"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "valuation",
|
||||||
|
"priority_rank": 6,
|
||||||
|
"module": "valuation",
|
||||||
|
"role_projection": "legal_calculation_object"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "unjust_enrichment",
|
||||||
|
"priority_rank": 12,
|
||||||
|
"module": "unjust_enrichment",
|
||||||
|
"role_projection": "restitution_roles"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"admission_rules": {
|
||||||
|
"registered_membership_required": true,
|
||||||
|
"multiple_types_allowed": true,
|
||||||
|
"source_order_deduplicated": true,
|
||||||
|
"nonregistered_type_review_code": "UNREGISTERED_EFFECT_TYPE_REVIEW",
|
||||||
|
"silent_general_legal_effect_fallback_forbidden": true
|
||||||
|
}
|
||||||
|
}
|
||||||
+42
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_domain_module_role_projection.v1",
|
||||||
|
"domain_id": "E-05",
|
||||||
|
"status": "ACTIVE",
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"structure_type": "tort_liability",
|
||||||
|
"module": "tort",
|
||||||
|
"role_projection": "tort_liability_roles",
|
||||||
|
"source": "s3_registered"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"structure_type": "joint_tort_liability",
|
||||||
|
"module": "tort",
|
||||||
|
"role_projection": "joint_tort_roles",
|
||||||
|
"source": "s3_registered"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"structure_type": "vicarious_liability",
|
||||||
|
"module": "tort",
|
||||||
|
"role_projection": "employer_employee_roles",
|
||||||
|
"source": "s3_registered"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"structure_type": "structure_liability",
|
||||||
|
"module": "tort",
|
||||||
|
"role_projection": "possessor_owner_roles",
|
||||||
|
"source": "s3_registered"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"structure_type": "tort_damage_extent",
|
||||||
|
"module": "damages",
|
||||||
|
"role_projection": "damage_causation_roles",
|
||||||
|
"source": "s3_registered"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_projection": null,
|
||||||
|
"missing_mapping_policy": {
|
||||||
|
"emit_review_code": "UNREGISTERED_EFFECT_TYPE_REVIEW",
|
||||||
|
"silent_fallback_forbidden": true
|
||||||
|
}
|
||||||
|
}
|
||||||
+44
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_domain_structure_types.v1",
|
||||||
|
"domain_id": "E-05",
|
||||||
|
"status": "ACTIVE",
|
||||||
|
"structure_types": [
|
||||||
|
{
|
||||||
|
"type_id": "tort_liability",
|
||||||
|
"priority_rank": 20,
|
||||||
|
"module": "tort",
|
||||||
|
"role_projection": "tort_liability_roles"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "joint_tort_liability",
|
||||||
|
"priority_rank": 21,
|
||||||
|
"module": "tort",
|
||||||
|
"role_projection": "joint_tort_roles"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "vicarious_liability",
|
||||||
|
"priority_rank": 22,
|
||||||
|
"module": "tort",
|
||||||
|
"role_projection": "employer_employee_roles"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "structure_liability",
|
||||||
|
"priority_rank": 23,
|
||||||
|
"module": "tort",
|
||||||
|
"role_projection": "possessor_owner_roles"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "tort_damage_extent",
|
||||||
|
"priority_rank": 24,
|
||||||
|
"module": "damages",
|
||||||
|
"role_projection": "damage_causation_roles"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"admission_rules": {
|
||||||
|
"registered_membership_required": true,
|
||||||
|
"multiple_types_allowed": true,
|
||||||
|
"source_order_deduplicated": true,
|
||||||
|
"nonregistered_type_review_code": "UNREGISTERED_EFFECT_TYPE_REVIEW",
|
||||||
|
"silent_general_legal_effect_fallback_forbidden": true
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"default_projection":null,"domain_id":"E-06","mappings":[{"module":"professional_liability","role_projection":"professional_client_roles","source":"s6_registered","structure_type":"professional_duty_liability"},{"module":"medical_liability","role_projection":"patient_provider_roles","source":"s6_registered","structure_type":"medical_treatment_fault"},{"module":"medical_liability","role_projection":"patient_explainer_consent_roles","source":"s6_registered","structure_type":"medical_disclosure_duty"},{"module":"product_liability","role_projection":"injured_manufacturer_supplier_roles","source":"s6_registered","structure_type":"product_defect_liability"},{"module":"damages","role_projection":"conduct_damage_alternative_cause_roles","source":"s6_registered","structure_type":"professional_damage_causation"}],"missing_mapping_policy":{"emit_review_code":"UNREGISTERED_EFFECT_TYPE_REVIEW","silent_fallback_forbidden":true},"schema_version":"stage1_domain_module_role_projection.v1","status":"ACTIVE"}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"admission_rules":{"multiple_types_allowed":true,"nonregistered_type_review_code":"UNREGISTERED_EFFECT_TYPE_REVIEW","registered_membership_required":true,"silent_general_legal_effect_fallback_forbidden":true,"source_order_deduplicated":true},"domain_id":"E-06","schema_version":"stage1_domain_structure_types.v1","status":"ACTIVE","structure_types":[{"module":"professional_liability","priority_rank":71,"role_projection":"professional_client_roles","type_id":"professional_duty_liability"},{"module":"medical_liability","priority_rank":72,"role_projection":"patient_provider_roles","type_id":"medical_treatment_fault"},{"module":"medical_liability","priority_rank":73,"role_projection":"patient_explainer_consent_roles","type_id":"medical_disclosure_duty"},{"module":"product_liability","priority_rank":74,"role_projection":"injured_manufacturer_supplier_roles","type_id":"product_defect_liability"},{"module":"damages","priority_rank":75,"role_projection":"conduct_damage_alternative_cause_roles","type_id":"professional_damage_causation"}]}
|
||||||
+32
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "s3_module_role_projection.v1",
|
||||||
|
"domain_id": "E-07",
|
||||||
|
"projections": [
|
||||||
|
{
|
||||||
|
"type_id": "construction_payment_claim",
|
||||||
|
"module": "construction_contract",
|
||||||
|
"role_projection": "construction_payment_roles"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "construction_progress_settlement",
|
||||||
|
"module": "construction_contract",
|
||||||
|
"role_projection": "construction_progress_roles"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "construction_defect_remedy",
|
||||||
|
"module": "construction_defect",
|
||||||
|
"role_projection": "construction_defect_roles"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "construction_defect_setoff",
|
||||||
|
"module": "construction_defect",
|
||||||
|
"role_projection": "construction_setoff_roles"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "general_legal_effect",
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"closure_status": "CLOSED"
|
||||||
|
}
|
||||||
+42
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "s3_domain_structure_types.v1",
|
||||||
|
"domain_id": "E-07",
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type_id": "construction_payment_claim",
|
||||||
|
"priority_rank": 1,
|
||||||
|
"module": "construction_contract",
|
||||||
|
"role_projection": "construction_payment_roles",
|
||||||
|
"registered": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "construction_progress_settlement",
|
||||||
|
"priority_rank": 2,
|
||||||
|
"module": "construction_contract",
|
||||||
|
"role_projection": "construction_progress_roles",
|
||||||
|
"registered": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "construction_defect_remedy",
|
||||||
|
"priority_rank": 3,
|
||||||
|
"module": "construction_defect",
|
||||||
|
"role_projection": "construction_defect_roles",
|
||||||
|
"registered": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "construction_defect_setoff",
|
||||||
|
"priority_rank": 4,
|
||||||
|
"module": "construction_defect",
|
||||||
|
"role_projection": "construction_setoff_roles",
|
||||||
|
"registered": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "general_legal_effect",
|
||||||
|
"priority_rank": 11,
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles",
|
||||||
|
"registered": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"fallback_policy": "unregistered_effect_type_review; silent_generalization_forbidden"
|
||||||
|
}
|
||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "s3_module_role_projection.v1",
|
||||||
|
"domain_id": "E-08",
|
||||||
|
"projections": [
|
||||||
|
{
|
||||||
|
"type_id": "lease_deposit_return",
|
||||||
|
"module": "lease_contract",
|
||||||
|
"role_projection": "lease_deposit_return_roles"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "lease_rent_payment",
|
||||||
|
"module": "lease_contract",
|
||||||
|
"role_projection": "lease_rent_roles"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "lease_termination",
|
||||||
|
"module": "lease_lifecycle",
|
||||||
|
"role_projection": "lease_termination_roles"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "lease_delivery_concurrent_performance",
|
||||||
|
"module": "lease_lifecycle",
|
||||||
|
"role_projection": "lease_concurrent_performance_roles"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "lease_attached_property_purchase",
|
||||||
|
"module": "lease_contract",
|
||||||
|
"role_projection": "lease_purchase_claim_roles"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "general_legal_effect",
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"closure_status": "CLOSED"
|
||||||
|
}
|
||||||
+49
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "s3_domain_structure_types.v1",
|
||||||
|
"domain_id": "E-08",
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type_id": "lease_deposit_return",
|
||||||
|
"priority_rank": 1,
|
||||||
|
"module": "lease_contract",
|
||||||
|
"role_projection": "lease_deposit_return_roles",
|
||||||
|
"registered": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "lease_rent_payment",
|
||||||
|
"priority_rank": 2,
|
||||||
|
"module": "lease_contract",
|
||||||
|
"role_projection": "lease_rent_roles",
|
||||||
|
"registered": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "lease_termination",
|
||||||
|
"priority_rank": 3,
|
||||||
|
"module": "lease_lifecycle",
|
||||||
|
"role_projection": "lease_termination_roles",
|
||||||
|
"registered": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "lease_delivery_concurrent_performance",
|
||||||
|
"priority_rank": 4,
|
||||||
|
"module": "lease_lifecycle",
|
||||||
|
"role_projection": "lease_concurrent_performance_roles",
|
||||||
|
"registered": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "lease_attached_property_purchase",
|
||||||
|
"priority_rank": 5,
|
||||||
|
"module": "lease_contract",
|
||||||
|
"role_projection": "lease_purchase_claim_roles",
|
||||||
|
"registered": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "general_legal_effect",
|
||||||
|
"priority_rank": 11,
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles",
|
||||||
|
"registered": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"fallback_policy": "unregistered_effect_type_review; silent_generalization_forbidden"
|
||||||
|
}
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "s2_module_role_projection.v1",
|
||||||
|
"domain_id": "E-09",
|
||||||
|
"projections": [
|
||||||
|
{
|
||||||
|
"type_id": "registry_invalidity",
|
||||||
|
"module": "registry_invalidity",
|
||||||
|
"role_projection": "linked_structures"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "general_legal_effect",
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"closure_status": "CLOSED"
|
||||||
|
}
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "s2_domain_structure_types.v1",
|
||||||
|
"domain_id": "E-09",
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type_id": "registry_invalidity",
|
||||||
|
"priority_rank": 4,
|
||||||
|
"legacy_source": "B2_Secured_Registry",
|
||||||
|
"module": "registry_invalidity",
|
||||||
|
"role_projection": "linked_structures",
|
||||||
|
"registered": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "general_legal_effect",
|
||||||
|
"priority_rank": 11,
|
||||||
|
"legacy_source": "B2_Secured_Registry",
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles",
|
||||||
|
"registered": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"fallback_policy": "unregistered_effect_type_review; silent_generalization_forbidden"
|
||||||
|
}
|
||||||
+27
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "s2_module_role_projection.v1",
|
||||||
|
"domain_id": "E-10",
|
||||||
|
"projections": [
|
||||||
|
{
|
||||||
|
"type_id": "secured_debt",
|
||||||
|
"module": "secured_property",
|
||||||
|
"role_projection": "linked_structures"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "registry_invalidity",
|
||||||
|
"module": "registry_invalidity",
|
||||||
|
"role_projection": "linked_structures"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "succession_notice_lien_asset_defense",
|
||||||
|
"module": "succession_notice_lien_asset_defense",
|
||||||
|
"role_projection": "linked_structures"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "general_legal_effect",
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"closure_status": "CLOSED"
|
||||||
|
}
|
||||||
+39
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "s2_domain_structure_types.v1",
|
||||||
|
"domain_id": "E-10",
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type_id": "secured_debt",
|
||||||
|
"priority_rank": 3,
|
||||||
|
"legacy_source": "B2_Secured_Registry",
|
||||||
|
"module": "secured_property",
|
||||||
|
"role_projection": "linked_structures",
|
||||||
|
"registered": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "registry_invalidity",
|
||||||
|
"priority_rank": 4,
|
||||||
|
"legacy_source": "B2_Secured_Registry",
|
||||||
|
"module": "registry_invalidity",
|
||||||
|
"role_projection": "linked_structures",
|
||||||
|
"registered": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "succession_notice_lien_asset_defense",
|
||||||
|
"priority_rank": 10,
|
||||||
|
"legacy_source": "B2_Secured_Registry",
|
||||||
|
"module": "succession_notice_lien_asset_defense",
|
||||||
|
"role_projection": "linked_structures",
|
||||||
|
"registered": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "general_legal_effect",
|
||||||
|
"priority_rank": 11,
|
||||||
|
"legacy_source": "B2_Secured_Registry",
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles",
|
||||||
|
"registered": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"fallback_policy": "unregistered_effect_type_review; silent_generalization_forbidden"
|
||||||
|
}
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_domain_module_role_projection.v1",
|
||||||
|
"domain_id": "E-11",
|
||||||
|
"status": "ACTIVE",
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"structure_type": "possession_vindication",
|
||||||
|
"module": "possession_vindication",
|
||||||
|
"role_projection": "linked_structures",
|
||||||
|
"source": "legacy_preserved_or_additive_registered"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"structure_type": "land_use_gain",
|
||||||
|
"module": "land_use_gain",
|
||||||
|
"role_projection": "legal_calculation_object",
|
||||||
|
"source": "legacy_preserved_or_additive_registered"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"structure_type": "succession_notice_lien_asset_defense",
|
||||||
|
"module": "succession_notice_lien_asset_defense",
|
||||||
|
"role_projection": "linked_structures",
|
||||||
|
"source": "legacy_preserved_or_additive_registered"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_projection": null,
|
||||||
|
"missing_mapping_policy": {
|
||||||
|
"emit_review_code": "UNREGISTERED_EFFECT_TYPE_REVIEW",
|
||||||
|
"silent_fallback_forbidden": true
|
||||||
|
}
|
||||||
|
}
|
||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_domain_structure_types.v1",
|
||||||
|
"domain_id": "E-11",
|
||||||
|
"status": "ACTIVE",
|
||||||
|
"legacy_source_domain": "B3",
|
||||||
|
"structure_types": [
|
||||||
|
{
|
||||||
|
"type_id": "possession_vindication",
|
||||||
|
"priority_rank": 5,
|
||||||
|
"module": "possession_vindication",
|
||||||
|
"role_projection": "linked_structures"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "land_use_gain",
|
||||||
|
"priority_rank": 6,
|
||||||
|
"module": "land_use_gain",
|
||||||
|
"role_projection": "legal_calculation_object"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "succession_notice_lien_asset_defense",
|
||||||
|
"priority_rank": 10,
|
||||||
|
"module": "succession_notice_lien_asset_defense",
|
||||||
|
"role_projection": "linked_structures"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"admission_rules": {
|
||||||
|
"registered_membership_required": true,
|
||||||
|
"multiple_types_allowed": true,
|
||||||
|
"source_order_deduplicated": true,
|
||||||
|
"nonregistered_type_review_code": "UNREGISTERED_EFFECT_TYPE_REVIEW",
|
||||||
|
"silent_general_legal_effect_fallback_forbidden": true
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"default_projection":null,"domain_id":"E-12","mappings":[{"module":"coownership","role_projection":"coowner_act_consent_roles","source":"s6_registered","structure_type":"coownership_governance"},{"module":"partition","role_projection":"partitioner_coowner_object_roles","source":"s6_registered","structure_type":"coownership_partition"},{"module":"boundary","role_projection":"adjacent_owner_parcel_boundary_roles","source":"s6_registered","structure_type":"boundary_determination"},{"module":"coownership","role_projection":"using_coowner_nonusing_coowner_roles","source":"s6_registered","structure_type":"exclusive_use_settlement"},{"module":"aggregate_building","role_projection":"management_body_unit_owner_roles","source":"s6_registered","structure_type":"aggregate_building_management"}],"missing_mapping_policy":{"emit_review_code":"UNREGISTERED_EFFECT_TYPE_REVIEW","silent_fallback_forbidden":true},"schema_version":"stage1_domain_module_role_projection.v1","status":"ACTIVE"}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"admission_rules":{"multiple_types_allowed":true,"nonregistered_type_review_code":"UNREGISTERED_EFFECT_TYPE_REVIEW","registered_membership_required":true,"silent_general_legal_effect_fallback_forbidden":true,"source_order_deduplicated":true},"domain_id":"E-12","schema_version":"stage1_domain_structure_types.v1","status":"ACTIVE","structure_types":[{"module":"coownership","priority_rank":71,"role_projection":"coowner_act_consent_roles","type_id":"coownership_governance"},{"module":"partition","priority_rank":72,"role_projection":"partitioner_coowner_object_roles","type_id":"coownership_partition"},{"module":"boundary","priority_rank":73,"role_projection":"adjacent_owner_parcel_boundary_roles","type_id":"boundary_determination"},{"module":"coownership","priority_rank":74,"role_projection":"using_coowner_nonusing_coowner_roles","type_id":"exclusive_use_settlement"},{"module":"aggregate_building","priority_rank":75,"role_projection":"management_body_unit_owner_roles","type_id":"aggregate_building_management"}]}
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_domain_module_role_projection.v1",
|
||||||
|
"domain_id": "E-13",
|
||||||
|
"status": "ACTIVE",
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"structure_type": "fraudulent_transfer",
|
||||||
|
"module": "actio",
|
||||||
|
"role_projection": "actio_roles",
|
||||||
|
"source": "legacy_preserved_or_additive_registered"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"structure_type": "preserved_claim",
|
||||||
|
"module": "actio",
|
||||||
|
"role_projection": "claim_chain_ref",
|
||||||
|
"source": "legacy_preserved_or_additive_registered"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"structure_type": "actio_remedy_or_cap",
|
||||||
|
"module": "actio",
|
||||||
|
"role_projection": "linked_actio_structures",
|
||||||
|
"source": "legacy_preserved_or_additive_registered"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_projection": null,
|
||||||
|
"missing_mapping_policy": {
|
||||||
|
"emit_review_code": "UNREGISTERED_EFFECT_TYPE_REVIEW",
|
||||||
|
"silent_fallback_forbidden": true
|
||||||
|
}
|
||||||
|
}
|
||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_domain_structure_types.v1",
|
||||||
|
"domain_id": "E-13",
|
||||||
|
"status": "ACTIVE",
|
||||||
|
"legacy_source_domain": "B4",
|
||||||
|
"structure_types": [
|
||||||
|
{
|
||||||
|
"type_id": "fraudulent_transfer",
|
||||||
|
"priority_rank": 7,
|
||||||
|
"module": "actio",
|
||||||
|
"role_projection": "actio_roles"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "preserved_claim",
|
||||||
|
"priority_rank": 8,
|
||||||
|
"module": "actio",
|
||||||
|
"role_projection": "claim_chain_ref"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "actio_remedy_or_cap",
|
||||||
|
"priority_rank": 9,
|
||||||
|
"module": "actio",
|
||||||
|
"role_projection": "linked_actio_structures"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"admission_rules": {
|
||||||
|
"registered_membership_required": true,
|
||||||
|
"multiple_types_allowed": true,
|
||||||
|
"source_order_deduplicated": true,
|
||||||
|
"nonregistered_type_review_code": "UNREGISTERED_EFFECT_TYPE_REVIEW",
|
||||||
|
"silent_general_legal_effect_fallback_forbidden": true
|
||||||
|
}
|
||||||
|
}
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_s3_module_role_projection.v1",
|
||||||
|
"domain_id": "E-14",
|
||||||
|
"structure_type_to_projection": {
|
||||||
|
"execution_linked_claim": {
|
||||||
|
"module": "execution_linked_claims",
|
||||||
|
"role_projection": "linked_execution_claims"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"default_projection": {
|
||||||
|
"module": "unregistered_effect_review",
|
||||||
|
"role_projection": "unregistered_effect_roles",
|
||||||
|
"review_code": "UNREGISTERED_EFFECT_TYPE_REVIEW"
|
||||||
|
},
|
||||||
|
"closure_status": "CLOSED_WITH_LOCAL_FILES"
|
||||||
|
}
|
||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_s3_structure_types.v1",
|
||||||
|
"domain_id": "E-14",
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type_id": "execution_linked_claim",
|
||||||
|
"priority_rank": 14,
|
||||||
|
"module": "execution_linked_claims",
|
||||||
|
"role_projection": "linked_execution_claims",
|
||||||
|
"admission_rule": "source-backed SG-13 route and registered active domain required"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"unregistered_effect_policy": "UNREGISTERED_EFFECT_TYPE_REVIEW",
|
||||||
|
"ordering_integration_required": true
|
||||||
|
}
|
||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_s2_module_role_projection.v1",
|
||||||
|
"domain_id": "E-15",
|
||||||
|
"legacy_projection_source": {
|
||||||
|
"path": "S_0_GPT/legacy/part4/structure_projection_contract.json",
|
||||||
|
"sha256": "9e615dda7e26e23fcaae381ed05763d16e4887909400277c9996919e09398398"
|
||||||
|
},
|
||||||
|
"structure_type_to_projection": {
|
||||||
|
"succession_notice_lien_asset_defense": {
|
||||||
|
"module": "succession_notice_lien_asset_defense",
|
||||||
|
"role_projection": "linked_structures"
|
||||||
|
},
|
||||||
|
"general_legal_effect": {
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"default_projection": {
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles",
|
||||||
|
"review_code": "UNREGISTERED_EFFECT_TYPE_REVIEW"
|
||||||
|
},
|
||||||
|
"closure_status": "CLOSED_WITH_LOCAL_FILES"
|
||||||
|
}
|
||||||
+28
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_s2_structure_types.v1",
|
||||||
|
"domain_id": "E-15",
|
||||||
|
"legacy_contract": {
|
||||||
|
"canonical_type_set_frozen": true,
|
||||||
|
"source": "1. Stage_1/v.7/extension_research/선행구축/S_0_GPT/legacy/part3/structure_type_contract.json"
|
||||||
|
},
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type_id": "succession_notice_lien_asset_defense",
|
||||||
|
"priority_rank": 10,
|
||||||
|
"legacy_source": "B5",
|
||||||
|
"module": "succession_notice_lien_asset_defense",
|
||||||
|
"role_projection": "linked_structures",
|
||||||
|
"admission_rule": "domain payload or SG-13 candidate must be source-backed"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "general_legal_effect",
|
||||||
|
"priority_rank": 11,
|
||||||
|
"legacy_source": "Part3 fallback",
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles",
|
||||||
|
"admission_rule": "registered route only; E-00 unregistered material remains review"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"noncanonical_preservation": "nonrouting_labels",
|
||||||
|
"ordering_preserved": true
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"default_projection":null,"domain_id":"E-16","mappings":[{"module":"negotiable_instrument","role_projection":"issuer_acceptor_holder_roles","source":"s6_registered","structure_type":"bill_primary_liability"},{"module":"negotiable_instrument","role_projection":"drawer_payee_holder_roles","source":"s6_registered","structure_type":"check_issuer_liability"},{"module":"negotiable_instrument","role_projection":"endorser_endorsee_holder_roles","source":"s6_registered","structure_type":"endorsement_holder_status"},{"module":"negotiable_instrument","role_projection":"presenter_drawee_recourse_party_roles","source":"s6_registered","structure_type":"presentment_recourse_liability"},{"module":"negotiable_instrument","role_projection":"grantor_completer_holder_roles","source":"s6_registered","structure_type":"blank_instrument_completion"},{"module":"negotiable_instrument","role_projection":"instrument_debtor_holder_cause_party_roles","source":"s6_registered","structure_type":"cause_relation_defense"}],"missing_mapping_policy":{"emit_review_code":"UNREGISTERED_EFFECT_TYPE_REVIEW","silent_fallback_forbidden":true},"schema_version":"stage1_domain_module_role_projection.v1","status":"ACTIVE"}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"admission_rules":{"multiple_types_allowed":true,"nonregistered_type_review_code":"UNREGISTERED_EFFECT_TYPE_REVIEW","registered_membership_required":true,"silent_general_legal_effect_fallback_forbidden":true,"source_order_deduplicated":true},"domain_id":"E-16","schema_version":"stage1_domain_structure_types.v1","status":"ACTIVE","structure_types":[{"module":"negotiable_instrument","priority_rank":71,"role_projection":"issuer_acceptor_holder_roles","type_id":"bill_primary_liability"},{"module":"negotiable_instrument","priority_rank":72,"role_projection":"drawer_payee_holder_roles","type_id":"check_issuer_liability"},{"module":"negotiable_instrument","priority_rank":73,"role_projection":"endorser_endorsee_holder_roles","type_id":"endorsement_holder_status"},{"module":"negotiable_instrument","priority_rank":74,"role_projection":"presenter_drawee_recourse_party_roles","type_id":"presentment_recourse_liability"},{"module":"negotiable_instrument","priority_rank":75,"role_projection":"grantor_completer_holder_roles","type_id":"blank_instrument_completion"},{"module":"negotiable_instrument","priority_rank":76,"role_projection":"instrument_debtor_holder_cause_party_roles","type_id":"cause_relation_defense"}]}
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_s3_module_role_projection.v1",
|
||||||
|
"domain_id": "E-17",
|
||||||
|
"structure_type_to_projection": {
|
||||||
|
"labor_wage_claim": {
|
||||||
|
"module": "labor_wage_claims",
|
||||||
|
"role_projection": "linked_labor_claims"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"default_projection": {
|
||||||
|
"module": "unregistered_effect_review",
|
||||||
|
"role_projection": "unregistered_effect_roles",
|
||||||
|
"review_code": "UNREGISTERED_EFFECT_TYPE_REVIEW"
|
||||||
|
},
|
||||||
|
"closure_status": "CLOSED_WITH_LOCAL_FILES"
|
||||||
|
}
|
||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_s3_structure_types.v1",
|
||||||
|
"domain_id": "E-17",
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type_id": "labor_wage_claim",
|
||||||
|
"priority_rank": 17,
|
||||||
|
"module": "labor_wage_claims",
|
||||||
|
"role_projection": "linked_labor_claims",
|
||||||
|
"admission_rule": "source-backed SG-13 route and registered active domain required"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"unregistered_effect_policy": "UNREGISTERED_EFFECT_TYPE_REVIEW",
|
||||||
|
"ordering_integration_required": true
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"closure_status":"CLOSED_WITH_LOCAL_FILES","default_projection":{"module":"unregistered_effect_review","review_code":"UNREGISTERED_EFFECT_TYPE_REVIEW","role_projection":"unregistered_effect_roles"},"domain_id":"E-18","schema_version":"stage1_s6_module_role_projection.v1","structure_type_to_projection":{"org_resolution_status_relation":{"module":"org_resolution_status","role_projection":"resolution_status_roles"}}}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"domain_id":"E-18","entries":[{"admission_rule":"source-backed SG-13 route and registered active domain required","module":"org_resolution_status","priority_rank":18,"role_projection":"resolution_status_roles","type_id":"org_resolution_status_relation"}],"ordering_integration_required":true,"schema_version":"stage1_s6_structure_types.v1","unregistered_effect_policy":"UNREGISTERED_EFFECT_TYPE_REVIEW"}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"closure_status":"CLOSED_WITH_LOCAL_FILES","default_projection":{"module":"unregistered_effect_review","review_code":"UNREGISTERED_EFFECT_TYPE_REVIEW","role_projection":"unregistered_effect_roles"},"domain_id":"E-19","schema_version":"stage1_s6_module_role_projection.v1","structure_type_to_projection":{"insurance_claim_relation":{"module":"insurance_claims","role_projection":"insurance_relation_roles"}}}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"domain_id":"E-19","entries":[{"admission_rule":"source-backed SG-13 route and registered active domain required","module":"insurance_claims","priority_rank":19,"role_projection":"insurance_relation_roles","type_id":"insurance_claim_relation"}],"ordering_integration_required":true,"schema_version":"stage1_s6_structure_types.v1","unregistered_effect_policy":"UNREGISTERED_EFFECT_TYPE_REVIEW"}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"closure_status":"CLOSED_WITH_LOCAL_FILES","default_projection":{"module":"unregistered_effect_review","review_code":"UNREGISTERED_EFFECT_TYPE_REVIEW","role_projection":"unregistered_effect_roles"},"domain_id":"E-20","schema_version":"stage1_s6_module_role_projection.v1","structure_type_to_projection":{"ip_right_claim_relation":{"module":"ip_claims","role_projection":"ip_right_infringement_roles"}}}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"domain_id":"E-20","entries":[{"admission_rule":"source-backed SG-13 route and registered active domain required","module":"ip_claims","priority_rank":20,"role_projection":"ip_right_infringement_roles","type_id":"ip_right_claim_relation"}],"ordering_integration_required":true,"schema_version":"stage1_s6_structure_types.v1","unregistered_effect_policy":"UNREGISTERED_EFFECT_TYPE_REVIEW"}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"closure_status":"CLOSED_WITH_LOCAL_FILES","default_projection":{"module":"unregistered_effect_review","review_code":"UNREGISTERED_EFFECT_TYPE_REVIEW","role_projection":"unregistered_effect_roles"},"domain_id":"E-21","schema_version":"stage1_s6_module_role_projection.v1","structure_type_to_projection":{"media_personality_claim_relation":{"module":"media_personality_rights","role_projection":"publication_personality_roles"}}}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"domain_id":"E-21","entries":[{"admission_rule":"source-backed SG-13 route and registered active domain required","module":"media_personality_rights","priority_rank":21,"role_projection":"publication_personality_roles","type_id":"media_personality_claim_relation"}],"ordering_integration_required":true,"schema_version":"stage1_s6_structure_types.v1","unregistered_effect_policy":"UNREGISTERED_EFFECT_TYPE_REVIEW"}
|
||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_s2_module_role_projection.v1",
|
||||||
|
"domain_id": "X1",
|
||||||
|
"legacy_projection_source": {
|
||||||
|
"path": "S_0_GPT/legacy/part4/structure_projection_contract.json",
|
||||||
|
"sha256": "9e615dda7e26e23fcaae381ed05763d16e4887909400277c9996919e09398398"
|
||||||
|
},
|
||||||
|
"structure_type_to_projection": {
|
||||||
|
"succession_notice_lien_asset_defense": {
|
||||||
|
"module": "succession_notice_lien_asset_defense",
|
||||||
|
"role_projection": "linked_structures"
|
||||||
|
},
|
||||||
|
"general_legal_effect": {
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"default_projection": {
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles",
|
||||||
|
"review_code": "UNREGISTERED_EFFECT_TYPE_REVIEW"
|
||||||
|
},
|
||||||
|
"closure_status": "CLOSED_WITH_LOCAL_FILES"
|
||||||
|
}
|
||||||
+28
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_s2_structure_types.v1",
|
||||||
|
"domain_id": "X1",
|
||||||
|
"legacy_contract": {
|
||||||
|
"canonical_type_set_frozen": true,
|
||||||
|
"source": "1. Stage_1/v.7/extension_research/선행구축/S_0_GPT/legacy/part3/structure_type_contract.json"
|
||||||
|
},
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type_id": "succession_notice_lien_asset_defense",
|
||||||
|
"priority_rank": 10,
|
||||||
|
"legacy_source": "B5",
|
||||||
|
"module": "succession_notice_lien_asset_defense",
|
||||||
|
"role_projection": "linked_structures",
|
||||||
|
"admission_rule": "domain payload or SG-13 candidate must be source-backed"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "general_legal_effect",
|
||||||
|
"priority_rank": 11,
|
||||||
|
"legacy_source": "Part3 fallback",
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles",
|
||||||
|
"admission_rule": "registered route only; E-00 unregistered material remains review"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"noncanonical_preservation": "nonrouting_labels",
|
||||||
|
"ordering_preserved": true
|
||||||
|
}
|
||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_domain_module_role_projection.v1",
|
||||||
|
"domain_id": "X2",
|
||||||
|
"status": "ACTIVE",
|
||||||
|
"mappings": [
|
||||||
|
{
|
||||||
|
"structure_type": "asset_state",
|
||||||
|
"module": "asset_state",
|
||||||
|
"role_projection": "asset_state_projection",
|
||||||
|
"source": "legacy_preserved_or_additive_registered"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"structure_type": "valuation",
|
||||||
|
"module": "valuation",
|
||||||
|
"role_projection": "legal_calculation_object",
|
||||||
|
"source": "legacy_preserved_or_additive_registered"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_projection": null,
|
||||||
|
"missing_mapping_policy": {
|
||||||
|
"emit_review_code": "UNREGISTERED_EFFECT_TYPE_REVIEW",
|
||||||
|
"silent_fallback_forbidden": true
|
||||||
|
}
|
||||||
|
}
|
||||||
+27
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_domain_structure_types.v1",
|
||||||
|
"domain_id": "X2",
|
||||||
|
"status": "ACTIVE",
|
||||||
|
"legacy_source_domain": "B3",
|
||||||
|
"structure_types": [
|
||||||
|
{
|
||||||
|
"type_id": "asset_state",
|
||||||
|
"priority_rank": 4,
|
||||||
|
"module": "asset_state",
|
||||||
|
"role_projection": "asset_state_projection"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "valuation",
|
||||||
|
"priority_rank": 6,
|
||||||
|
"module": "valuation",
|
||||||
|
"role_projection": "legal_calculation_object"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"admission_rules": {
|
||||||
|
"registered_membership_required": true,
|
||||||
|
"multiple_types_allowed": true,
|
||||||
|
"source_order_deduplicated": true,
|
||||||
|
"nonregistered_type_review_code": "UNREGISTERED_EFFECT_TYPE_REVIEW",
|
||||||
|
"silent_general_legal_effect_fallback_forbidden": true
|
||||||
|
}
|
||||||
|
}
|
||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_s2_module_role_projection.v1",
|
||||||
|
"domain_id": "X3",
|
||||||
|
"legacy_projection_source": {
|
||||||
|
"path": "S_0_GPT/legacy/part4/structure_projection_contract.json",
|
||||||
|
"sha256": "9e615dda7e26e23fcaae381ed05763d16e4887909400277c9996919e09398398"
|
||||||
|
},
|
||||||
|
"structure_type_to_projection": {
|
||||||
|
"succession_notice_lien_asset_defense": {
|
||||||
|
"module": "succession_notice_lien_asset_defense",
|
||||||
|
"role_projection": "linked_structures"
|
||||||
|
},
|
||||||
|
"general_legal_effect": {
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"default_projection": {
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles",
|
||||||
|
"review_code": "UNREGISTERED_EFFECT_TYPE_REVIEW"
|
||||||
|
},
|
||||||
|
"closure_status": "CLOSED_WITH_LOCAL_FILES"
|
||||||
|
}
|
||||||
+28
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_s2_structure_types.v1",
|
||||||
|
"domain_id": "X3",
|
||||||
|
"legacy_contract": {
|
||||||
|
"canonical_type_set_frozen": true,
|
||||||
|
"source": "1. Stage_1/v.7/extension_research/선행구축/S_0_GPT/legacy/part3/structure_type_contract.json"
|
||||||
|
},
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type_id": "succession_notice_lien_asset_defense",
|
||||||
|
"priority_rank": 10,
|
||||||
|
"legacy_source": "B5",
|
||||||
|
"module": "succession_notice_lien_asset_defense",
|
||||||
|
"role_projection": "linked_structures",
|
||||||
|
"admission_rule": "domain payload or SG-13 candidate must be source-backed"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type_id": "general_legal_effect",
|
||||||
|
"priority_rank": 11,
|
||||||
|
"legacy_source": "Part3 fallback",
|
||||||
|
"module": "legal_effect",
|
||||||
|
"role_projection": "legal_effect_roles",
|
||||||
|
"admission_rule": "registered route only; E-00 unregistered material remains review"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"noncanonical_preservation": "nonrouting_labels",
|
||||||
|
"ordering_preserved": true
|
||||||
|
}
|
||||||
+150
@@ -0,0 +1,150 @@
|
|||||||
|
{
|
||||||
|
"$id": "https://schemas.liti-agent.local/stage1/part3/legal_effect_structures.schema.json",
|
||||||
|
"title": "stage1_legal_effect_structures.v1",
|
||||||
|
"description": "Part 3 L2 최종 산출 — 법률효과 구조와 역인덱스 셋(by_domain_id · by_module · by_bo_id). by_claim_form 은 만들지 않는다(claim-form 어휘가 registry 에 없다 — D-4 라). 열거를 하드코딩하지 않는다.",
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["schema_version", "status", "expected_runnable_domain_ids", "theta",
|
||||||
|
"structure_records", "structure_index", "quality_gate", "created_by"],
|
||||||
|
"properties": {
|
||||||
|
"schema_version": {"const": "stage1_legal_effect_structures.v1"},
|
||||||
|
"status": {"enum": ["READY", "READY_WITH_REVIEW"]},
|
||||||
|
"registry_version": {"type": ["string", "null"]},
|
||||||
|
"registry_index_sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
|
||||||
|
"activation_manifest_sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
|
||||||
|
"signal_manifest_transaction_id": {"type": "string", "pattern": "^S5TX-[a-f0-9]{20}$"},
|
||||||
|
"expected_runnable_domain_ids": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {"type": "string", "pattern": "^(?:(?:EC|E)-[A-Z0-9]{2,8}|X[A-Z0-9]{1,8})$"}
|
||||||
|
},
|
||||||
|
"theta": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {"type": "string", "pattern": "^[a-z][a-z0-9_]{1,127}$"}
|
||||||
|
},
|
||||||
|
"structure_records": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["structure_id", "domain_id", "type_id", "priority_rank", "order_key",
|
||||||
|
"module", "role_projection", "admission_policy", "routes", "route_count",
|
||||||
|
"evidence_refs", "meeting_clause_refs", "calculation_request_refs",
|
||||||
|
"source_bo_ids", "review_codes", "review_required"],
|
||||||
|
"properties": {
|
||||||
|
"structure_id": {"type": "string", "pattern": "^LES-[A-Za-z0-9._:-]{2,64}-[a-z][a-z0-9_]{1,127}$"},
|
||||||
|
"domain_id": {"type": "string", "pattern": "^(?:(?:EC|E)-[A-Z0-9]{2,8}|X[A-Z0-9]{1,8})$"},
|
||||||
|
"type_id": {"type": "string", "pattern": "^[a-z][a-z0-9_]{1,127}$"},
|
||||||
|
"priority_rank": {"type": ["integer", "null"]},
|
||||||
|
"order_key": {"type": "array", "minItems": 3, "maxItems": 3},
|
||||||
|
"module": {"type": ["string", "null"]},
|
||||||
|
"role_projection": {"type": ["string", "null"]},
|
||||||
|
"admission_policy": {"type": "string", "minLength": 1},
|
||||||
|
"admission_rule": {"type": "string"},
|
||||||
|
"registered_declared": {"type": "boolean"},
|
||||||
|
"extension_key": {"type": "string"},
|
||||||
|
"routes": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["signal_id", "source_seed_id", "registered", "status"],
|
||||||
|
"properties": {
|
||||||
|
"signal_id": {"type": ["string", "null"]},
|
||||||
|
"source_seed_id": {"type": ["string", "null"]},
|
||||||
|
"registered": {"type": ["boolean", "null"]},
|
||||||
|
"status": {"type": ["string", "null"]}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"route_count": {"type": "integer", "minimum": 0},
|
||||||
|
"evidence_refs": {"type": "array", "items": {"type": "string"}},
|
||||||
|
"meeting_clause_refs": {"type": "array", "items": {"type": "string"}},
|
||||||
|
"calculation_request_refs": {"type": "array", "items": {"type": "string"}},
|
||||||
|
"source_bo_ids": {"type": "array", "items": {"type": "string"}},
|
||||||
|
"review_codes": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {"type": "string", "pattern": "^[A-Z][A-Z0-9_]{2,127}$"}
|
||||||
|
},
|
||||||
|
"review_required": {"type": "boolean"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"structure_index": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["by_domain_id", "by_module", "by_bo_id"],
|
||||||
|
"properties": {
|
||||||
|
"by_domain_id": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {"type": "array", "items": {"type": "string"}}
|
||||||
|
},
|
||||||
|
"by_module": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {"type": "array", "items": {"type": "string"}}
|
||||||
|
},
|
||||||
|
"by_bo_id": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {"type": "array", "items": {"type": "string"}}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"quality_gate": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["declaration_conservation", "route_conservation", "bo_conservation",
|
||||||
|
"review_queue"],
|
||||||
|
"properties": {
|
||||||
|
"declaration_conservation": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["structure_records", "declared_total_from_config", "conservation_pass"],
|
||||||
|
"properties": {
|
||||||
|
"structure_records": {"type": "integer", "minimum": 0},
|
||||||
|
"declared_total_from_config": {"type": "integer", "minimum": 0},
|
||||||
|
"conservation_pass": {"type": "boolean"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"route_conservation": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["routes_attached", "routes_unattached", "sg13_route_total_from_source",
|
||||||
|
"conservation_pass"],
|
||||||
|
"properties": {
|
||||||
|
"routes_attached": {"type": "integer", "minimum": 0},
|
||||||
|
"routes_unattached": {"type": "integer", "minimum": 0},
|
||||||
|
"sg13_route_total_from_source": {"type": "integer", "minimum": 0},
|
||||||
|
"conservation_pass": {"type": "boolean"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"bo_conservation": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["bo_attached", "bo_unattached", "bo_total_from_source",
|
||||||
|
"conservation_pass"],
|
||||||
|
"properties": {
|
||||||
|
"bo_attached": {"type": "integer", "minimum": 0},
|
||||||
|
"bo_unattached": {"type": "integer", "minimum": 0},
|
||||||
|
"bo_total_from_source": {"type": "integer", "minimum": 0},
|
||||||
|
"conservation_pass": {"type": "boolean"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"review_queue": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["review_code", "severity"],
|
||||||
|
"properties": {
|
||||||
|
"review_code": {"type": "string", "pattern": "^[A-Z][A-Z0-9_]{2,127}$"},
|
||||||
|
"severity": {"enum": ["SOFT_WARNING", "HARD_WARNING"]},
|
||||||
|
"domain_id": {"type": ["string", "null"]},
|
||||||
|
"structure_id": {"type": ["string", "null"]},
|
||||||
|
"count": {"type": "integer", "minimum": 1}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"created_by": {"const": "Task_C_LE_L2_final_structure_index_writer"}
|
||||||
|
}
|
||||||
|
}
|
||||||
+331
@@ -0,0 +1,331 @@
|
|||||||
|
{
|
||||||
|
"$id": "https://schemas.liti-agent.local/stage1/part3/structure_seed_bundle.schema.json",
|
||||||
|
"title": "stage1_structure_seed_bundle.v1",
|
||||||
|
"description": "Part 3 L0 산출 — 구조 seed 묶음. 레코드는 Θ 의 (도메인, type_id) 쌍마다 하나. 열거를 하드코딩하지 않는다 — type_id·도메인 ID·검토 코드는 패턴만 강제한다(도메인 증설 시 스키마 무수정).",
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"structure_seed_bundle"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"structure_seed_bundle": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"schema_version",
|
||||||
|
"status",
|
||||||
|
"expected_runnable_domain_ids",
|
||||||
|
"theta",
|
||||||
|
"structure_records",
|
||||||
|
"unattached_routes",
|
||||||
|
"unattached_bo",
|
||||||
|
"counts",
|
||||||
|
"created_by"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"schema_version": {
|
||||||
|
"const": "stage1_structure_seed_bundle.v1"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"enum": [
|
||||||
|
"READY",
|
||||||
|
"READY_WITH_REVIEW"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"registry_version": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"expected_runnable_domain_ids": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^(?:(?:EC|E)-[A-Z0-9]{2,8}|X[A-Z0-9]{1,8})$"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"theta": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^[a-z][a-z0-9_]{1,127}$"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"structure_records": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"structure_id",
|
||||||
|
"domain_id",
|
||||||
|
"type_id",
|
||||||
|
"priority_rank",
|
||||||
|
"order_key",
|
||||||
|
"module",
|
||||||
|
"role_projection",
|
||||||
|
"admission_policy",
|
||||||
|
"routes",
|
||||||
|
"route_count",
|
||||||
|
"evidence_refs",
|
||||||
|
"meeting_clause_refs",
|
||||||
|
"calculation_request_refs",
|
||||||
|
"source_bo_ids",
|
||||||
|
"review_codes",
|
||||||
|
"review_required"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"structure_id": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^LES-[A-Za-z0-9._:-]{2,64}-[a-z][a-z0-9_]{1,127}$"
|
||||||
|
},
|
||||||
|
"domain_id": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^(?:(?:EC|E)-[A-Z0-9]{2,8}|X[A-Z0-9]{1,8})$"
|
||||||
|
},
|
||||||
|
"type_id": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^[a-z][a-z0-9_]{1,127}$"
|
||||||
|
},
|
||||||
|
"priority_rank": {
|
||||||
|
"type": [
|
||||||
|
"integer",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"order_key": {
|
||||||
|
"type": "array",
|
||||||
|
"minItems": 3,
|
||||||
|
"maxItems": 3
|
||||||
|
},
|
||||||
|
"module": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"role_projection": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"admission_policy": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1
|
||||||
|
},
|
||||||
|
"admission_rule": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"registered_declared": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"extension_key": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"routes": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"signal_id",
|
||||||
|
"source_seed_id",
|
||||||
|
"registered",
|
||||||
|
"status"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"signal_id": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"source_seed_id": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"registered": {
|
||||||
|
"type": [
|
||||||
|
"boolean",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"route_count": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"evidence_refs": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"meeting_clause_refs": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"calculation_request_refs": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"source_bo_ids": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"review_codes": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^[A-Z][A-Z0-9_]{2,127}$"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"review_required": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"unattached_routes": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"signal_id",
|
||||||
|
"type_id",
|
||||||
|
"reason"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"signal_id": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"type_id": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"reason": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"unattached_bo": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"bo_id",
|
||||||
|
"reason"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"bo_id": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"reason": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"counts": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"structure_records",
|
||||||
|
"declared_structure_types_total",
|
||||||
|
"sg13_route_total",
|
||||||
|
"routes_attached",
|
||||||
|
"routes_unattached",
|
||||||
|
"bo_total",
|
||||||
|
"bo_attached",
|
||||||
|
"bo_unattached",
|
||||||
|
"sg11_total",
|
||||||
|
"sg11_linked",
|
||||||
|
"sg11_unlinked"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"structure_records": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"declared_structure_types_total": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"sg13_route_total": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"routes_attached": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"routes_unattached": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"bo_total": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"bo_attached": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"bo_unattached": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"sg11_total": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"sg11_linked": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"sg11_unlinked": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"created_by": {
|
||||||
|
"const": "Task_C_LE_L0_structure_seed_reducer"
|
||||||
|
},
|
||||||
|
"signal_manifest_transaction_id": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^S5TX-[a-f0-9]{20}$"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+245
-1
@@ -824,6 +824,206 @@
|
|||||||
"path": "contracts/signals/s5_execution_contract.v2.json",
|
"path": "contracts/signals/s5_execution_contract.v2.json",
|
||||||
"sha256": "311ac8721ec297bc86e54c83f0866d61629bd99f15746f86bbbff32914d35e02"
|
"sha256": "311ac8721ec297bc86e54c83f0866d61629bd99f15746f86bbbff32914d35e02"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-00/module_role_projection.json",
|
||||||
|
"sha256": "278ecdd4ac6c004f9994d6357ef439d089456a5e65bed0f74f49170ba3315932"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-00/structure_types.json",
|
||||||
|
"sha256": "ae4a94fdbb0e2a8e0273a259e38c28774a3f2f24985878286f18a9ae05cbabaa"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-01/module_role_projection.json",
|
||||||
|
"sha256": "cb263ca339f7b749a51b57fa12d915fda3644f09e648d15a84202651a23a84fb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-01/structure_types.json",
|
||||||
|
"sha256": "f2c423a0346a347292b3ca33d3a9f33a82d540e83cbb5f79bb8dae7161c68b26"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-02/module_role_projection.json",
|
||||||
|
"sha256": "e21465cf806fb080d75f89526f9c142010c392ee87454a5a19248b9a80eb7c28"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-02/structure_types.json",
|
||||||
|
"sha256": "e470dd3c96f2f9b8bfa6c2c97b05259281005a84b6eea24c38d322abdf16ad8e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-03/module_role_projection.json",
|
||||||
|
"sha256": "f693146dfb3ba2ac5fa6a6221c6b2dc7e32084acb06823b1f46f423a56546704"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-03/structure_types.json",
|
||||||
|
"sha256": "70c579a03c41226e6383fe7b4aa5e60f4b0f5a723db30f6292dd2a0bde4d17bb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-04/module_role_projection.json",
|
||||||
|
"sha256": "4c4bd473a12ad1dfcc8c9392503cd057017385a21287a89cb7ea147f3cf7d2d6"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-04/structure_types.json",
|
||||||
|
"sha256": "e8b15e9e5a39a488bf9ef660d69c7bc2db832248eb33788ba2ae54a9b5200e73"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-05/module_role_projection.json",
|
||||||
|
"sha256": "7fabfa3893a138dccb4e5bc797444f5f999c0e51ec6b0c8fbe0211eff3f03a6c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-05/structure_types.json",
|
||||||
|
"sha256": "22707fbce849991c099a08885cac929d1ba842aa896945f9921c3214e4c701d0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-06/module_role_projection.json",
|
||||||
|
"sha256": "805b73b2b15cb720b62cd83455de85a67bda434255b69d588eb98f2527f88b71"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-06/structure_types.json",
|
||||||
|
"sha256": "a6520f72813caeaf72d62fd63eca10a1f46fd4fb3ffd97f97f222f37c53e8663"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-07/module_role_projection.json",
|
||||||
|
"sha256": "9920ed415f9768beb517100e97fa7d2eb862ca90ca83f802ea460f8f6bbf2445"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-07/structure_types.json",
|
||||||
|
"sha256": "fd4946e24cacc3bcc74c7fee5ce7fca99d3e5f2339fe3a9d698c54e2626a6c01"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-08/module_role_projection.json",
|
||||||
|
"sha256": "4a8c284b5d3bbf8ca224e9f08398e6f563b00cec6de72f5128acc4cd8425eced"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-08/structure_types.json",
|
||||||
|
"sha256": "a7ee6782c6541d0c6f6f6107a1d3615c2e7003a979741f2afc9d5d686a59e51d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-09/module_role_projection.json",
|
||||||
|
"sha256": "ab93656808a832cfd73a6d75ed28d75e50e6cc66c67d59d765fcb8bbf638205f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-09/structure_types.json",
|
||||||
|
"sha256": "c374b8b912679cc765b152c58ecd8320898f947b799e44ca509aa622669d7f4c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-10/module_role_projection.json",
|
||||||
|
"sha256": "80f760d9d8516cc81ebe503a2967418c43e11f8b8410231081111483dfa6477d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-10/structure_types.json",
|
||||||
|
"sha256": "07be97d40e422e14e570574c4e1da875307fe487c39e2ba9862ffd4b1623b748"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-11/module_role_projection.json",
|
||||||
|
"sha256": "0a55ce91b1845d64d085710110aec22bfcea66967ab5fce3a4acf5179faf65f1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-11/structure_types.json",
|
||||||
|
"sha256": "6e565bab389f59866a0eafa8b7b7ff89f90ef2363ced3d9a4240100d3b3c3b90"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-12/module_role_projection.json",
|
||||||
|
"sha256": "207ef7d4a1300c12aa54cb1defa1110a6a9d18850d0fc4e144baebe6ff2b3c27"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-12/structure_types.json",
|
||||||
|
"sha256": "ef97f4b0ed05637165bfb211fc9be0cb3bcf0523e6b5a645c007e8dc2825bea9"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-13/module_role_projection.json",
|
||||||
|
"sha256": "412df6800be576d7f789bc7fc2045091eb9c49fd346e442ba42d6f29300f7313"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-13/structure_types.json",
|
||||||
|
"sha256": "cc18073ca443e98a34e139c08d11121ceb7d4ecd366ad3b3d5cb65ddb53e36f7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-14/module_role_projection.json",
|
||||||
|
"sha256": "cead5634615b6b417390b37a948a050ea89cba37485bb79617bd1296c06829a5"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-14/structure_types.json",
|
||||||
|
"sha256": "5b0025a720a7b9f1ad7c74ce8d79f0969b282690abc0e3171e28dbf41933153b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-15/module_role_projection.json",
|
||||||
|
"sha256": "873f921bbbc86fc07a0c1ecfcbcacee67b1d9592b2efd7319290a10e8c1ba018"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-15/structure_types.json",
|
||||||
|
"sha256": "784ceabd17c6de6d95a30f52dd5fd4036946fbedc556f2bad536225057a0f5fe"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-16/module_role_projection.json",
|
||||||
|
"sha256": "24ad172b32d4942be6f4031c582f928d3c6feb6e442027e3ee02700519744b11"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-16/structure_types.json",
|
||||||
|
"sha256": "b0bb30602ec424d35359c1a676ccca2bb2eda4a676997753da44d1dbbcc1f0b3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-17/module_role_projection.json",
|
||||||
|
"sha256": "498e2320ad04a907680b8588ee1b1b9ee7487e131bece96a601979d60796f5a4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-17/structure_types.json",
|
||||||
|
"sha256": "d306dbdf583453d51f643eb8398920efb1bb5bfa82b3a600caa79f45f790b2eb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-18/module_role_projection.json",
|
||||||
|
"sha256": "b0699a793cdc52e6f74e9df3254f403858e83080be9e402bf3c7dae3cd8ffd0e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-18/structure_types.json",
|
||||||
|
"sha256": "ce4eae3a54bfe7ac31f16b657cc0a891580e025f7bfecb1812c015e7fd0c2500"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-19/module_role_projection.json",
|
||||||
|
"sha256": "00950a8c76d4367ccd6dc000476c810df33e49b07fce124545e350530b008b99"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-19/structure_types.json",
|
||||||
|
"sha256": "58b9503558bcab3fb7ae76532659d54694208d813197e97bac148d50795feb22"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-20/module_role_projection.json",
|
||||||
|
"sha256": "7aef9706b50161693005ee61fc576a1562929fdf20830a3187fdda2a94fae8e3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-20/structure_types.json",
|
||||||
|
"sha256": "6766546fd61d3f46f0d0b71bc3c41d5c63a525954b2568d8003c9f5e90234074"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-21/module_role_projection.json",
|
||||||
|
"sha256": "de6b0f29ad8100744a1a4fe8393a44a8a921d604b5244f832256450cb547722a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/E-21/structure_types.json",
|
||||||
|
"sha256": "b027ff04f21cc4a86c8285e2cde6f8fd23e0ff3a3aeb3fa61a9bd10142814e36"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/X1/module_role_projection.json",
|
||||||
|
"sha256": "1bceacd99f408384fec9547262017d8c857dbdb58ae906446c45ce8f1e322920"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/X1/structure_types.json",
|
||||||
|
"sha256": "3344a27beb548c7d0b083b6e442a8f70ca89ce02d22614fda83203d3ff53e7e9"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/X2/module_role_projection.json",
|
||||||
|
"sha256": "9282422d06035a78b592c110c197c1afa58e78294566eecd2666f0c61820cd5f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/X2/structure_types.json",
|
||||||
|
"sha256": "f51c0404bab1c5f4506012460ba02faf2cee6c958d49ee353095366defacd2ec"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/X3/module_role_projection.json",
|
||||||
|
"sha256": "93d3709c7d01132b82f0445d18eab7e666ea8d7fe2afe9b308bf87af5477be10"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "domains/X3/structure_types.json",
|
||||||
|
"sha256": "91f7ef0a971b519bd7fea8fb2efc61770afeb83b3a6ee774f153aea28a9de913"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "domains/_common/common_worker_contract.md",
|
"path": "domains/_common/common_worker_contract.md",
|
||||||
"sha256": "f133c54c5a9353ae14efc4d7a27d9bee18872b6727713a9a107778eef8990fb1"
|
"sha256": "f133c54c5a9353ae14efc4d7a27d9bee18872b6727713a9a107778eef8990fb1"
|
||||||
@@ -1080,6 +1280,18 @@
|
|||||||
"path": "law_versions/source_status/source_repin_status.json",
|
"path": "law_versions/source_status/source_repin_status.json",
|
||||||
"sha256": "f44e21988306748bfdde5d629d1e955f592d669c2af280eefb88f01c9ae74228"
|
"sha256": "f44e21988306748bfdde5d629d1e955f592d669c2af280eefb88f01c9ae74228"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "platform/contracts/determinism_scope_contract.json",
|
||||||
|
"sha256": "8734102d9e2e9b695a3b12e91e7ab1b7208e1c1403729c082d708ee2c4a70532"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "platform/reference_catalogs/calculation_ids.json",
|
||||||
|
"sha256": "fb14965b8315e01d47d694a10a674eda5db606ab9c7bbb6345de98495ba233b8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "platform/reference_catalogs/domain_ids.json",
|
||||||
|
"sha256": "4740d98e6a31bd0e7d9f792189712a8af1d0a87ec0bbd181deba1e34edb08355"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "platform/router/s3_sg01_router_config.json",
|
"path": "platform/router/s3_sg01_router_config.json",
|
||||||
"sha256": "4913b119f5ee08f96b52e10bd1f8376326564f1ab4742909fd2d0f07ded4efc6"
|
"sha256": "4913b119f5ee08f96b52e10bd1f8376326564f1ab4742909fd2d0f07ded4efc6"
|
||||||
@@ -1092,6 +1304,10 @@
|
|||||||
"path": "platform/router/s3_sg01_router_output.schema.json",
|
"path": "platform/router/s3_sg01_router_output.schema.json",
|
||||||
"sha256": "4af85d52a60254149a3506cd5aa36cce1360e275b3c195d08307876379114b51"
|
"sha256": "4af85d52a60254149a3506cd5aa36cce1360e275b3c195d08307876379114b51"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "platform/schemas/client_goal_domain_profiles.schema.json",
|
||||||
|
"sha256": "ae2bfe0d754a09cbae16b2c15bf1518fc23f9e1bda8fa1f5f949606c8e42c010"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "platform/schemas/domain_fanout_plan.schema.json",
|
"path": "platform/schemas/domain_fanout_plan.schema.json",
|
||||||
"sha256": "3b0948613a5996028b9c030a99f0b51d682f6035e019557756b1a15d43971113"
|
"sha256": "3b0948613a5996028b9c030a99f0b51d682f6035e019557756b1a15d43971113"
|
||||||
@@ -1104,6 +1320,22 @@
|
|||||||
"path": "platform/schemas/domain_slice.schema.v2.json",
|
"path": "platform/schemas/domain_slice.schema.v2.json",
|
||||||
"sha256": "212a405088e7cf7ba2c65528a1c716938c946df7fe3bae3256b613051ed31aa3"
|
"sha256": "212a405088e7cf7ba2c65528a1c716938c946df7fe3bae3256b613051ed31aa3"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "platform/schemas/legal_effect_structures.schema.json",
|
||||||
|
"sha256": "e2879c7a6d7f163c0729e8b863c5ef79b1094482eace78e6b8e1c7d69ce201e3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "platform/schemas/structure_seed_bundle.schema.json",
|
||||||
|
"sha256": "b7af9e422b6ac3876cffea39ec4f617eea76a631a57dfdfcd57d3785a83c667a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "routing/activation_cue_digest.md",
|
||||||
|
"sha256": "7e98885a50e1880b5ee7e2f459ab47010f90387e5c463a484a152054c2321e97"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "routing/evidence_component_union.md",
|
||||||
|
"sha256": "ecd6e1877f476139012b79fdc04380c067b8e81af86707bcc5c2b311b3fabf79"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "routing/extension_payload_key_declarations.v1.json",
|
"path": "routing/extension_payload_key_declarations.v1.json",
|
||||||
"sha256": "1684e13896bc9dfd0e7aa1a3b01354f58b2fa6ed00908bec6f861bce4b47235c"
|
"sha256": "1684e13896bc9dfd0e7aa1a3b01354f58b2fa6ed00908bec6f861bce4b47235c"
|
||||||
@@ -1460,6 +1692,18 @@
|
|||||||
"path": "stage1_runtime/stage_a_context_builder.txt",
|
"path": "stage1_runtime/stage_a_context_builder.txt",
|
||||||
"sha256": "68d984f9d565034c73721dc97c5aab0f9cdb8a8b46e1bf13eabd8c136ec4bcc0"
|
"sha256": "68d984f9d565034c73721dc97c5aab0f9cdb8a8b46e1bf13eabd8c136ec4bcc0"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "stage1_runtime/structure_index_compiler.py",
|
||||||
|
"sha256": "c400adfb7c58e340a17e67aebcdc4a7cf92c35c422f418451c79ce7c531d201f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "stage1_runtime/structure_index_compiler.txt",
|
||||||
|
"sha256": "c400adfb7c58e340a17e67aebcdc4a7cf92c35c422f418451c79ce7c531d201f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "stage1_runtime/structure_index_policy.v1.json",
|
||||||
|
"sha256": "823a7e734a7bc9433966a5629a5a0b153a067c92d8570072fa14a5c42bb722bd"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "stage1_runtime/worker_output_validator.py",
|
"path": "stage1_runtime/worker_output_validator.py",
|
||||||
"sha256": "e5b46f929082faf621731ffb8f4864ccb9bba461ab23caa56d1bcfe5b073fd9d"
|
"sha256": "e5b46f929082faf621731ffb8f4864ccb9bba461ab23caa56d1bcfe5b073fd9d"
|
||||||
@@ -1486,6 +1730,6 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"program_release_status": "STAGE1_NOT_RELEASE_READY",
|
"program_release_status": "STAGE1_NOT_RELEASE_READY",
|
||||||
"runtime_artifact_count": 371,
|
"runtime_artifact_count": 432,
|
||||||
"schema_version": "stage1_runtime_manifest.v1"
|
"schema_version": "stage1_runtime_manifest.v1"
|
||||||
}
|
}
|
||||||
|
|||||||
+529
@@ -0,0 +1,529 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""structure_index_compiler — Stage 1 Part 3 구조 seed 조립기.
|
||||||
|
|
||||||
|
정본 근거
|
||||||
|
전략 stage_1_part_3_개정_신전략서.md §2(D-4) · §4.2(L0-1~L0-8)
|
||||||
|
정책 Default_Agent/stage1_runtime/structure_index_policy.v1.json
|
||||||
|
계약 Θ = SG-01.expected_runnable_domain_ids 에 대한 domain_config.structure_types 합집합
|
||||||
|
구조 레코드 = (도메인, type_id) 쌍마다 하나 · 도메인 간 병합 금지
|
||||||
|
전순서 order_key = (priority_rank, registry_index entries 위치, type_id)
|
||||||
|
|
||||||
|
이 모듈은 순수하다 — 파일을 읽지도 쓰지도 않는다. 호출자가 적재한 문서를 받아
|
||||||
|
{structure_seed_bundle, review_items, audit} 를 돌려준다. 시각·난수를 쓰지 않으므로
|
||||||
|
같은 입력이면 같은 출력이다(L-n).
|
||||||
|
|
||||||
|
사건 종류 이름·도메인 목록·유형 열거를 고정하지 않는다(137종 일반성 §8.1).
|
||||||
|
"""
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
SCHEMA_VERSION = "stage1_structure_seed_bundle.v1"
|
||||||
|
POLICY_SCHEMA_VERSION = "stage1_structure_index_policy.v1"
|
||||||
|
|
||||||
|
# 검토 코드 — registry 선언(UNREGISTERED_EFFECT_TYPE_REVIEW)과 신전략서 §4.2 의 신설분.
|
||||||
|
REVIEW_UNREGISTERED = "UNREGISTERED_EFFECT_TYPE_REVIEW"
|
||||||
|
REVIEW_SLICE_DIVERGENCE = "PART3_SLICE_PROJECTION_DIVERGENCE"
|
||||||
|
REVIEW_SIDECAR_MISMATCH = "PART3_REGISTRY_SIDECAR_MISMATCH"
|
||||||
|
REVIEW_CROSS_DOMAIN = "PART3_EFFECT_TYPE_CROSS_DOMAIN"
|
||||||
|
REVIEW_CALC_DANGLING = "PART3_CALCULATION_REF_DANGLING"
|
||||||
|
REVIEW_BO_UNATTACHED = "PART3_BO_UNATTACHED"
|
||||||
|
REVIEW_BO_UNRESOLVED = "PART3_BO_DOMAIN_UNRESOLVED"
|
||||||
|
|
||||||
|
SG13_ROUTE_RECORD_TYPE = "legal_effect_route"
|
||||||
|
|
||||||
|
|
||||||
|
def _strings(value: Any) -> list[str]:
|
||||||
|
if not isinstance(value, list):
|
||||||
|
return []
|
||||||
|
return [item for item in value if isinstance(item, str) and item]
|
||||||
|
|
||||||
|
|
||||||
|
def _dict(value: Any) -> dict:
|
||||||
|
return value if isinstance(value, dict) else {}
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# 사이드카 정규화 리더 — 방언 지도(신전략서 §1.2): 목록 키 3종 · 투영 키 3종 · 정책 자리 4갈래.
|
||||||
|
# 방언을 다 읽지 않은 리더는 결손을 만들어 낸다(구 전략서 §1.5 의 실패 기록) —
|
||||||
|
# 세 방언 전부를 인정하고, 세지 않은 필드를 공통 필드로 승격하지 않는다.
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
_LIST_KEYS = ("entries", "structure_types", "types")
|
||||||
|
_PROJECTION_KEYS = ("projections", "mappings", "structure_type_to_projection")
|
||||||
|
_FILE_POLICY_KEYS = ("admission_rules", "unregistered_effect_policy", "fallback_policy")
|
||||||
|
|
||||||
|
|
||||||
|
def read_sidecar_types(doc: Any) -> dict[str, Any]:
|
||||||
|
"""structure_types.json 방언을 정규화한다.
|
||||||
|
|
||||||
|
반환: {"list_key": str|None, "schema_version": str|None,
|
||||||
|
"items": [{"type_id", "admission_rule"?, "registered"?}],
|
||||||
|
"file_policy_key": str|None, "file_policy": dict|None,
|
||||||
|
"legacy_contract_style": bool}
|
||||||
|
"""
|
||||||
|
root = _dict(doc)
|
||||||
|
list_key = None
|
||||||
|
rows: list[Any] = []
|
||||||
|
for key in _LIST_KEYS:
|
||||||
|
if isinstance(root.get(key), list):
|
||||||
|
list_key = key
|
||||||
|
rows = root[key]
|
||||||
|
break
|
||||||
|
items = []
|
||||||
|
for row in rows:
|
||||||
|
row = _dict(row)
|
||||||
|
type_id = row.get("type_id") or row.get("structure_type") or row.get("id")
|
||||||
|
if not isinstance(type_id, str) or not type_id:
|
||||||
|
continue
|
||||||
|
item: dict[str, Any] = {"type_id": type_id}
|
||||||
|
if isinstance(row.get("admission_rule"), str) and row.get("admission_rule"):
|
||||||
|
item["admission_rule"] = row["admission_rule"]
|
||||||
|
if isinstance(row.get("registered"), bool):
|
||||||
|
item["registered"] = row["registered"]
|
||||||
|
items.append(item)
|
||||||
|
file_policy_key = None
|
||||||
|
file_policy = None
|
||||||
|
for key in _FILE_POLICY_KEYS:
|
||||||
|
if root.get(key) is not None:
|
||||||
|
file_policy_key = key
|
||||||
|
file_policy = root[key]
|
||||||
|
break
|
||||||
|
legacy_style = file_policy_key is None and any(
|
||||||
|
key in root for key in ("legacy_contract", "noncanonical_preservation", "ordering_preserved"))
|
||||||
|
return {"list_key": list_key,
|
||||||
|
"schema_version": root.get("schema_version"),
|
||||||
|
"items": items,
|
||||||
|
"file_policy_key": file_policy_key,
|
||||||
|
"file_policy": file_policy,
|
||||||
|
"legacy_contract_style": legacy_style}
|
||||||
|
|
||||||
|
|
||||||
|
def read_sidecar_projection(doc: Any) -> dict[str, Any]:
|
||||||
|
"""module_role_projection.json 방언을 정규화한다.
|
||||||
|
|
||||||
|
반환: {"projection_key": str|None, "mappings": {type_id: {"module", "role_projection"}},
|
||||||
|
"default_projection": dict|None, "missing_mapping_policy": dict|None}
|
||||||
|
"""
|
||||||
|
root = _dict(doc)
|
||||||
|
mappings: dict[str, dict[str, Any]] = {}
|
||||||
|
projection_key = None
|
||||||
|
for key in _PROJECTION_KEYS:
|
||||||
|
value = root.get(key)
|
||||||
|
if isinstance(value, list):
|
||||||
|
projection_key = key
|
||||||
|
for row in value:
|
||||||
|
row = _dict(row)
|
||||||
|
type_id = row.get("structure_type") or row.get("type_id")
|
||||||
|
if isinstance(type_id, str) and type_id:
|
||||||
|
mappings[type_id] = {"module": row.get("module"),
|
||||||
|
"role_projection": row.get("role_projection")}
|
||||||
|
break
|
||||||
|
if isinstance(value, dict):
|
||||||
|
projection_key = key
|
||||||
|
for type_id, row in value.items():
|
||||||
|
row = _dict(row)
|
||||||
|
if isinstance(type_id, str) and type_id:
|
||||||
|
mappings[type_id] = {"module": row.get("module"),
|
||||||
|
"role_projection": row.get("role_projection")}
|
||||||
|
break
|
||||||
|
default_projection = root.get("default_projection")
|
||||||
|
if not isinstance(default_projection, dict):
|
||||||
|
default_projection = None
|
||||||
|
missing_policy = root.get("missing_mapping_policy")
|
||||||
|
if not isinstance(missing_policy, dict):
|
||||||
|
missing_policy = None
|
||||||
|
return {"projection_key": projection_key, "mappings": mappings,
|
||||||
|
"default_projection": default_projection,
|
||||||
|
"missing_mapping_policy": missing_policy}
|
||||||
|
|
||||||
|
|
||||||
|
def admission_policy_for(sidecar_types: dict[str, Any], item: dict[str, Any]) -> str:
|
||||||
|
"""두 단 정의(신전략서 §1.2) — 파일 단위 정책(3키 중 있는 것) → 없으면 항목 admission_rule.
|
||||||
|
|
||||||
|
73/73 이 채워지는 값이다. 어느 단도 없으면 빈 문자열이 아니라 명시 문자열을 남긴다 —
|
||||||
|
없는 것을 있는 것처럼 채우지 않되, 부재 자체는 보이게 한다.
|
||||||
|
"""
|
||||||
|
key = sidecar_types.get("file_policy_key")
|
||||||
|
if key:
|
||||||
|
return "file:%s" % key
|
||||||
|
rule = item.get("admission_rule")
|
||||||
|
if isinstance(rule, str) and rule:
|
||||||
|
return "item:admission_rule"
|
||||||
|
return "absent"
|
||||||
|
|
||||||
|
|
||||||
|
def resolve_source_domains(value: Any, alias_targets: dict[str, Any],
|
||||||
|
known_domain_ids: set[str]) -> list[str]:
|
||||||
|
"""BO provenance.source_domain 을 registry 도메인 ID 목록으로 해소한다(L0-7b ①).
|
||||||
|
|
||||||
|
registry ID 면 [값]. 아니면 별칭표의 목록(다중 타깃 실재 — 단일 primary 개념 없음).
|
||||||
|
별칭표에도 없으면 빈 목록 — 호출자가 PART3_BO_DOMAIN_UNRESOLVED 로 격리한다.
|
||||||
|
"""
|
||||||
|
if not isinstance(value, str) or not value:
|
||||||
|
return []
|
||||||
|
if value in known_domain_ids:
|
||||||
|
return [value]
|
||||||
|
targets = _strings(_dict(alias_targets).get(value))
|
||||||
|
return [d for d in targets if d in known_domain_ids]
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# 본체
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
def compile_structure_seeds(activation_manifest: Any,
|
||||||
|
registry_index: Any,
|
||||||
|
domain_configs: dict[str, Any],
|
||||||
|
domain_sidecars: dict[str, Any],
|
||||||
|
policy: Any,
|
||||||
|
alias_declarations: Any,
|
||||||
|
sg13_records: list[Any],
|
||||||
|
sg05_records: list[Any],
|
||||||
|
sg11_records: list[Any],
|
||||||
|
domain_envelopes: dict[str, Any],
|
||||||
|
bo_records: list[Any],
|
||||||
|
slice_documents: dict[str, Any]) -> dict[str, Any]:
|
||||||
|
"""L0-1 ~ L0-8. 반환 dict 는 theta 와 order_key 를 반드시 싣는다(PART3_COMPILER_STALE 의 대조면)."""
|
||||||
|
policy_root = _dict(policy)
|
||||||
|
if policy_root.get("schema_version") != POLICY_SCHEMA_VERSION:
|
||||||
|
raise ValueError("PART3_POLICY_INVALID:%s" % policy_root.get("schema_version"))
|
||||||
|
|
||||||
|
manifest_root = _dict(activation_manifest).get("domain_activation_manifest",
|
||||||
|
_dict(activation_manifest))
|
||||||
|
expected_runnable = _strings(_dict(manifest_root).get("expected_runnable_domain_ids"))
|
||||||
|
if not expected_runnable:
|
||||||
|
raise ValueError("PART3_EXPECTED_RUNNABLE_EMPTY")
|
||||||
|
|
||||||
|
index_root = _dict(_dict(registry_index).get("domain_registry_index", registry_index))
|
||||||
|
index_entries = [row for row in (index_root.get("entries") or []) if isinstance(row, dict)]
|
||||||
|
index_position = {row.get("domain_id"): position
|
||||||
|
for position, row in enumerate(index_entries)
|
||||||
|
if isinstance(row.get("domain_id"), str)}
|
||||||
|
known_domain_ids = set(index_position)
|
||||||
|
|
||||||
|
review_items: list[dict[str, Any]] = []
|
||||||
|
audit: dict[str, Any] = {"sidecar_dialects": {}, "input_gaps": [],
|
||||||
|
"unlinked_sg11": [], "dangling_calculation_refs": {}}
|
||||||
|
|
||||||
|
def review(code: str, severity: str, domain_id: str | None, detail: dict[str, Any]) -> None:
|
||||||
|
item = {"review_code": code, "severity": severity}
|
||||||
|
if domain_id is not None:
|
||||||
|
item["domain_id"] = domain_id
|
||||||
|
item.update(detail)
|
||||||
|
review_items.append(item)
|
||||||
|
|
||||||
|
# ---------------- L0-1 · Θ 조립 ----------------
|
||||||
|
declared_by_domain: dict[str, list[dict[str, Any]]] = {}
|
||||||
|
for domain_id in expected_runnable:
|
||||||
|
if domain_id not in known_domain_ids:
|
||||||
|
raise ValueError("PART3_DOMAIN_NOT_IN_REGISTRY:%s" % domain_id)
|
||||||
|
config_root = _dict(domain_configs.get(domain_id))
|
||||||
|
rows = [row for row in (config_root.get("structure_types") or [])
|
||||||
|
if isinstance(row, dict) and isinstance(row.get("type_id"), str)]
|
||||||
|
declared_by_domain[domain_id] = rows
|
||||||
|
theta = sorted({row["type_id"] for rows in declared_by_domain.values() for row in rows})
|
||||||
|
declaring_domains: dict[str, list[str]] = {}
|
||||||
|
for domain_id in expected_runnable:
|
||||||
|
for row in declared_by_domain[domain_id]:
|
||||||
|
declaring_domains.setdefault(row["type_id"], []).append(domain_id)
|
||||||
|
|
||||||
|
# ---------------- L0-2c · 사이드카 교차 검증 (레코드 생성보다 앞 — admission_policy 재료) ----------------
|
||||||
|
sidecar_norm: dict[str, dict[str, Any]] = {}
|
||||||
|
projection_norm: dict[str, dict[str, Any]] = {}
|
||||||
|
for domain_id in expected_runnable:
|
||||||
|
pair = _dict(domain_sidecars.get(domain_id))
|
||||||
|
declared_ids = sorted({row["type_id"] for row in declared_by_domain[domain_id]})
|
||||||
|
if not pair:
|
||||||
|
# 부재 규칙(신전략서 §5.5) — 선언 0 도메인의 부재만 정상이다.
|
||||||
|
if declared_ids:
|
||||||
|
raise ValueError("PART3_SIDECAR_ABSENT_FOR_DECLARING_DOMAIN:%s" % domain_id)
|
||||||
|
audit["sidecar_dialects"][domain_id] = {"absent": True, "declared": 0}
|
||||||
|
continue
|
||||||
|
types_doc = read_sidecar_types(pair.get("structure_types"))
|
||||||
|
projection_doc = read_sidecar_projection(pair.get("module_role_projection"))
|
||||||
|
sidecar_norm[domain_id] = types_doc
|
||||||
|
projection_norm[domain_id] = projection_doc
|
||||||
|
audit["sidecar_dialects"][domain_id] = {
|
||||||
|
"list_key": types_doc.get("list_key"),
|
||||||
|
"schema_version": types_doc.get("schema_version"),
|
||||||
|
"projection_key": projection_doc.get("projection_key"),
|
||||||
|
"file_policy_key": types_doc.get("file_policy_key"),
|
||||||
|
"legacy_contract_style": types_doc.get("legacy_contract_style"),
|
||||||
|
"item_count": len(types_doc.get("items") or []),
|
||||||
|
}
|
||||||
|
sidecar_ids = sorted({item["type_id"] for item in types_doc.get("items") or []})
|
||||||
|
if sidecar_ids != declared_ids:
|
||||||
|
review(REVIEW_SIDECAR_MISMATCH, "HARD_WARNING", domain_id, {
|
||||||
|
"detail": "type_set_mismatch",
|
||||||
|
"config_only": sorted(set(declared_ids) - set(sidecar_ids)),
|
||||||
|
"sidecar_only": sorted(set(sidecar_ids) - set(declared_ids)),
|
||||||
|
})
|
||||||
|
for type_id, mapping in sorted((projection_doc.get("mappings") or {}).items()):
|
||||||
|
config_row = next((row for row in declared_by_domain[domain_id]
|
||||||
|
if row["type_id"] == type_id), None)
|
||||||
|
if config_row is None:
|
||||||
|
continue
|
||||||
|
if (mapping.get("module") != config_row.get("module")
|
||||||
|
or mapping.get("role_projection") != config_row.get("role_projection")):
|
||||||
|
review(REVIEW_SIDECAR_MISMATCH, "HARD_WARNING", domain_id, {
|
||||||
|
"detail": "projection_mismatch", "type_id": type_id,
|
||||||
|
"config": {"module": config_row.get("module"),
|
||||||
|
"role_projection": config_row.get("role_projection")},
|
||||||
|
"sidecar": mapping,
|
||||||
|
})
|
||||||
|
|
||||||
|
# ---------------- L0-2 · 구조 레코드 — (도메인, type_id) 쌍마다 하나 ----------------
|
||||||
|
e13_extension_key = None
|
||||||
|
contract = _dict(policy_root.get("extension_key_rule"))
|
||||||
|
e13_extension_key = contract.get("extension_key") if isinstance(
|
||||||
|
contract.get("extension_key"), str) else None
|
||||||
|
e13_domain = contract.get("domain_id") if isinstance(contract.get("domain_id"), str) else None
|
||||||
|
|
||||||
|
records: dict[tuple[str, str], dict[str, Any]] = {}
|
||||||
|
for domain_id in expected_runnable:
|
||||||
|
types_doc = sidecar_norm.get(domain_id, {"items": []})
|
||||||
|
item_by_type = {item["type_id"]: item for item in types_doc.get("items") or []}
|
||||||
|
for row in declared_by_domain[domain_id]:
|
||||||
|
type_id = row["type_id"]
|
||||||
|
item = item_by_type.get(type_id, {})
|
||||||
|
record: dict[str, Any] = {
|
||||||
|
"structure_id": "LES-%s-%s" % (domain_id, type_id),
|
||||||
|
"domain_id": domain_id,
|
||||||
|
"type_id": type_id,
|
||||||
|
"priority_rank": row.get("priority_rank"),
|
||||||
|
"order_key": [row.get("priority_rank"), index_position[domain_id], type_id],
|
||||||
|
"module": row.get("module"),
|
||||||
|
"role_projection": row.get("role_projection"),
|
||||||
|
"admission_policy": admission_policy_for(types_doc, item),
|
||||||
|
"routes": [],
|
||||||
|
"route_count": 0,
|
||||||
|
"evidence_refs": [],
|
||||||
|
"meeting_clause_refs": [],
|
||||||
|
"calculation_request_refs": [],
|
||||||
|
"source_bo_ids": [],
|
||||||
|
"review_codes": [],
|
||||||
|
"review_required": False,
|
||||||
|
}
|
||||||
|
if "admission_rule" in item:
|
||||||
|
record["admission_rule"] = item["admission_rule"]
|
||||||
|
if "registered" in item:
|
||||||
|
record["registered_declared"] = item["registered"]
|
||||||
|
if domain_id == e13_domain and e13_extension_key:
|
||||||
|
record["extension_key"] = e13_extension_key
|
||||||
|
if domain_id == "E-00":
|
||||||
|
# E-00 특칙 — 잔여 수집기 유래 구조는 검토 필수(신전략서 §4.2).
|
||||||
|
record["review_required"] = True
|
||||||
|
records[(domain_id, type_id)] = record
|
||||||
|
|
||||||
|
# ---------------- L0-2b · 슬라이스 투영 정합 ----------------
|
||||||
|
for domain_id in expected_runnable:
|
||||||
|
slice_doc = slice_documents.get(domain_id)
|
||||||
|
if slice_doc is None:
|
||||||
|
audit["input_gaps"].append({"kind": "slice_absent", "domain_id": domain_id})
|
||||||
|
continue
|
||||||
|
slice_root = _dict(_dict(slice_doc).get("stage_b_domain_slice", slice_doc))
|
||||||
|
declarations = _dict(slice_root.get("domain_declarations"))
|
||||||
|
slice_ids = sorted(_strings(declarations.get("structure_type_ids")))
|
||||||
|
config_ids = sorted({row["type_id"] for row in declared_by_domain[domain_id]})
|
||||||
|
if slice_ids != config_ids:
|
||||||
|
review(REVIEW_SLICE_DIVERGENCE, "HARD_WARNING", domain_id, {
|
||||||
|
"slice_only": sorted(set(slice_ids) - set(config_ids)),
|
||||||
|
"config_only": sorted(set(config_ids) - set(slice_ids)),
|
||||||
|
})
|
||||||
|
|
||||||
|
# ---------------- L0-3 · SG-13 조인 + L0-4 · 도메인 소속 ----------------
|
||||||
|
routes = [_dict(row) for row in sg13_records
|
||||||
|
if _dict(row).get("record_type") == SG13_ROUTE_RECORD_TYPE]
|
||||||
|
attached_route_count = 0
|
||||||
|
unattached_routes: list[dict[str, Any]] = []
|
||||||
|
for route in routes:
|
||||||
|
details = _dict(route.get("details"))
|
||||||
|
type_id = details.get("type_id")
|
||||||
|
route_domains = _strings(route.get("domain_ids"))
|
||||||
|
route_domain = route_domains[0] if route_domains else None
|
||||||
|
registered = details.get("registered")
|
||||||
|
route_ref = {
|
||||||
|
"signal_id": route.get("signal_id"),
|
||||||
|
"source_seed_id": details.get("source_seed_id"),
|
||||||
|
"registered": registered if isinstance(registered, bool) else None,
|
||||||
|
"status": route.get("status"),
|
||||||
|
}
|
||||||
|
if not isinstance(type_id, str) or type_id not in theta:
|
||||||
|
# Θ 밖 — 버리지 않는다. default_projection 이 있으면 검토 항목에 실어 함께 나른다.
|
||||||
|
projection = None
|
||||||
|
if route_domain and route_domain in projection_norm:
|
||||||
|
projection = projection_norm[route_domain].get("default_projection")
|
||||||
|
review(REVIEW_UNREGISTERED, "HARD_WARNING", route_domain, {
|
||||||
|
"type_id": type_id, "signal_id": route.get("signal_id"),
|
||||||
|
"default_projection": projection,
|
||||||
|
})
|
||||||
|
unattached_routes.append({"signal_id": route.get("signal_id"),
|
||||||
|
"type_id": type_id, "reason": "type_outside_theta"})
|
||||||
|
continue
|
||||||
|
target_keys = []
|
||||||
|
if route_domain and (route_domain, type_id) in records:
|
||||||
|
target_keys = [(route_domain, type_id)]
|
||||||
|
else:
|
||||||
|
# Θ 안이지만 자기 도메인이 선언하지 않은 유형 — 선언 도메인 전부에 붙이고 검토(L0-4).
|
||||||
|
target_keys = [(d, type_id) for d in declaring_domains.get(type_id, [])
|
||||||
|
if (d, type_id) in records]
|
||||||
|
if target_keys:
|
||||||
|
review(REVIEW_CROSS_DOMAIN, "HARD_WARNING", route_domain, {
|
||||||
|
"type_id": type_id, "signal_id": route.get("signal_id"),
|
||||||
|
"attached_to": ["%s:%s" % key for key in target_keys],
|
||||||
|
})
|
||||||
|
if not target_keys:
|
||||||
|
unattached_routes.append({"signal_id": route.get("signal_id"),
|
||||||
|
"type_id": type_id, "reason": "no_declaring_domain"})
|
||||||
|
review(REVIEW_UNREGISTERED, "HARD_WARNING", route_domain, {
|
||||||
|
"type_id": type_id, "signal_id": route.get("signal_id"),
|
||||||
|
"default_projection": None,
|
||||||
|
})
|
||||||
|
continue
|
||||||
|
attached_route_count += 1
|
||||||
|
for key in target_keys:
|
||||||
|
record = records[key]
|
||||||
|
record["routes"].append(dict(route_ref))
|
||||||
|
for field in ("evidence_refs", "meeting_clause_refs"):
|
||||||
|
merged = set(record[field]) | set(_strings(route.get(field)))
|
||||||
|
record[field] = sorted(merged)
|
||||||
|
if registered is False:
|
||||||
|
# 붙은 채로 검토 꼬리표를 단다(L-m2 — 분할은 부착 여부로만 가른다).
|
||||||
|
if REVIEW_UNREGISTERED not in record["review_codes"]:
|
||||||
|
record["review_codes"].append(REVIEW_UNREGISTERED)
|
||||||
|
record["review_required"] = True
|
||||||
|
review(REVIEW_UNREGISTERED, "SOFT_WARNING", key[0], {
|
||||||
|
"type_id": type_id, "signal_id": route.get("signal_id"),
|
||||||
|
"detail": "registered_false_route_attached",
|
||||||
|
})
|
||||||
|
declared_flag = record.get("registered_declared")
|
||||||
|
if isinstance(declared_flag, bool) and isinstance(registered, bool) \
|
||||||
|
and declared_flag != registered:
|
||||||
|
# types 방언의 registered ↔ SG-13 registered 대조(L0-2c 둘째 갈래).
|
||||||
|
if REVIEW_SIDECAR_MISMATCH not in record["review_codes"]:
|
||||||
|
record["review_codes"].append(REVIEW_SIDECAR_MISMATCH)
|
||||||
|
record["review_required"] = True
|
||||||
|
review(REVIEW_SIDECAR_MISMATCH, "HARD_WARNING", key[0], {
|
||||||
|
"detail": "registered_flag_mismatch", "type_id": type_id,
|
||||||
|
"sidecar": declared_flag, "route": registered,
|
||||||
|
})
|
||||||
|
|
||||||
|
# ---------------- L0-5 · module 부여는 L0-2 에서 config 원문으로 끝났다 ----------------
|
||||||
|
|
||||||
|
# ---------------- L0-6 · 계산 조인 — SG-11 signal_id ↔ 도메인 봉투 calculation_refs ----------------
|
||||||
|
# 봉투 부재는 침묵 스킵이 아니라 영수증 계수다(I-5 — expected_runnable 중 실재하는 것만 읽되
|
||||||
|
# 부재를 기록한다). 실주행에서 감시 도메인 봉투가 없는 것은 상시 경로다.
|
||||||
|
for domain_id in expected_runnable:
|
||||||
|
if domain_id not in domain_envelopes:
|
||||||
|
audit["input_gaps"].append({"kind": "domain_envelope_absent",
|
||||||
|
"domain_id": domain_id})
|
||||||
|
sg11_rows = [_dict(row) for row in sg11_records]
|
||||||
|
sg11_ids = {row.get("signal_id") for row in sg11_rows if isinstance(row.get("signal_id"), str)}
|
||||||
|
linked_sg11: set[str] = set()
|
||||||
|
for domain_id in expected_runnable:
|
||||||
|
envelope = _dict(_dict(domain_envelopes.get(domain_id)).get("domain_signal_envelope",
|
||||||
|
domain_envelopes.get(domain_id)))
|
||||||
|
refs = _strings(_dict(envelope).get("calculation_refs"))
|
||||||
|
if not refs:
|
||||||
|
continue
|
||||||
|
matched = sorted(set(refs) & sg11_ids)
|
||||||
|
dangling = sorted(set(refs) - sg11_ids)
|
||||||
|
if dangling:
|
||||||
|
audit["dangling_calculation_refs"][domain_id] = dangling
|
||||||
|
review(REVIEW_CALC_DANGLING, "HARD_WARNING", domain_id, {"dangling": dangling})
|
||||||
|
if matched:
|
||||||
|
linked_sg11.update(matched)
|
||||||
|
for (record_domain, _type_id), record in records.items():
|
||||||
|
if record_domain == domain_id:
|
||||||
|
merged = set(record["calculation_request_refs"]) | set(matched)
|
||||||
|
record["calculation_request_refs"] = sorted(merged)
|
||||||
|
# 봉투 참조에 연결되지 않은 SG-11(합성 id 포함)은 구조에 싣지 않되 형식화 기록(신전략서 L0-6).
|
||||||
|
audit["unlinked_sg11"] = sorted(sg11_ids - linked_sg11)
|
||||||
|
|
||||||
|
# ---------------- L0-7 · SG-05 근거 refs (도메인 단위 합집합) ----------------
|
||||||
|
for row in sg05_records:
|
||||||
|
row = _dict(row)
|
||||||
|
for domain_id in _strings(row.get("domain_ids")):
|
||||||
|
for (record_domain, _type_id), record in records.items():
|
||||||
|
if record_domain == domain_id:
|
||||||
|
for field in ("evidence_refs", "meeting_clause_refs"):
|
||||||
|
merged = set(record[field]) | set(_strings(row.get(field)))
|
||||||
|
record[field] = sorted(merged)
|
||||||
|
|
||||||
|
# ---------------- L0-7b · BO 부착 조인 ----------------
|
||||||
|
alias_targets = _dict(_dict(alias_declarations).get("legacy_alias_targets"))
|
||||||
|
bo_rows = [_dict(row) for row in bo_records]
|
||||||
|
bo_attached: list[str] = []
|
||||||
|
bo_unattached: list[dict[str, Any]] = []
|
||||||
|
for bo in bo_rows:
|
||||||
|
bo_id = bo.get("BO_ID") or bo.get("id")
|
||||||
|
provenance = _dict(bo.get("provenance"))
|
||||||
|
source_domain = provenance.get("source_domain")
|
||||||
|
resolved = resolve_source_domains(source_domain, alias_targets, known_domain_ids)
|
||||||
|
if not resolved:
|
||||||
|
review(REVIEW_BO_UNRESOLVED, "HARD_WARNING", None, {
|
||||||
|
"bo_id": bo_id, "source_domain": source_domain,
|
||||||
|
})
|
||||||
|
bo_unattached.append({"bo_id": bo_id, "reason": "source_domain_unresolved"})
|
||||||
|
continue
|
||||||
|
keywords = _strings(bo.get("Legal_Keywords"))
|
||||||
|
attached_here = False
|
||||||
|
for domain_id in resolved:
|
||||||
|
for type_id in keywords:
|
||||||
|
record = records.get((domain_id, type_id))
|
||||||
|
if record is not None:
|
||||||
|
attached_here = True
|
||||||
|
if isinstance(bo_id, str) and bo_id not in record["source_bo_ids"]:
|
||||||
|
record["source_bo_ids"].append(bo_id)
|
||||||
|
record["source_bo_ids"].sort()
|
||||||
|
if attached_here:
|
||||||
|
bo_attached.append(bo_id if isinstance(bo_id, str) else "")
|
||||||
|
else:
|
||||||
|
# 부착 실패는 침묵 금지(L0-7b ③).
|
||||||
|
review(REVIEW_BO_UNATTACHED, "HARD_WARNING", None, {
|
||||||
|
"bo_id": bo_id, "source_domain": source_domain,
|
||||||
|
"legal_keywords": keywords, "resolved_domains": resolved,
|
||||||
|
})
|
||||||
|
bo_unattached.append({"bo_id": bo_id, "reason": "no_matching_structure"})
|
||||||
|
|
||||||
|
# ---------------- 정렬 · 검토 재료 반영 · 산출 ----------------
|
||||||
|
ordered = sorted(records.values(),
|
||||||
|
key=lambda record: (record["order_key"][0] if isinstance(
|
||||||
|
record["order_key"][0], int) else 999,
|
||||||
|
record["order_key"][1], record["order_key"][2]))
|
||||||
|
for record in ordered:
|
||||||
|
record["route_count"] = len(record["routes"])
|
||||||
|
record["routes"].sort(key=lambda ref: (str(ref.get("signal_id")),
|
||||||
|
str(ref.get("source_seed_id"))))
|
||||||
|
record["review_codes"].sort()
|
||||||
|
if record["review_codes"]:
|
||||||
|
record["review_required"] = True
|
||||||
|
|
||||||
|
status = "READY_WITH_REVIEW" if review_items else "READY"
|
||||||
|
bundle = {
|
||||||
|
"schema_version": SCHEMA_VERSION,
|
||||||
|
"status": status,
|
||||||
|
"registry_version": index_root.get("registry_version"),
|
||||||
|
"expected_runnable_domain_ids": list(expected_runnable),
|
||||||
|
"theta": theta,
|
||||||
|
"structure_records": ordered,
|
||||||
|
"unattached_routes": sorted(unattached_routes,
|
||||||
|
key=lambda row: (str(row.get("signal_id")),
|
||||||
|
str(row.get("type_id")))),
|
||||||
|
"unattached_bo": sorted(bo_unattached, key=lambda row: str(row.get("bo_id"))),
|
||||||
|
"counts": {
|
||||||
|
"structure_records": len(ordered),
|
||||||
|
"declared_structure_types_total": sum(
|
||||||
|
len(rows) for rows in declared_by_domain.values()),
|
||||||
|
"sg13_route_total": len(routes),
|
||||||
|
"routes_attached": attached_route_count,
|
||||||
|
"routes_unattached": len(unattached_routes),
|
||||||
|
"bo_total": len(bo_rows),
|
||||||
|
"bo_attached": len(bo_attached),
|
||||||
|
"bo_unattached": len(bo_unattached),
|
||||||
|
"sg11_total": len(sg11_rows),
|
||||||
|
"sg11_linked": len(linked_sg11),
|
||||||
|
"sg11_unlinked": len(audit["unlinked_sg11"]),
|
||||||
|
},
|
||||||
|
"created_by": "Task_C_LE_L0_structure_seed_reducer",
|
||||||
|
}
|
||||||
|
return {"structure_seed_bundle": bundle, "review_items": review_items, "audit": audit}
|
||||||
+529
@@ -0,0 +1,529 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""structure_index_compiler — Stage 1 Part 3 구조 seed 조립기.
|
||||||
|
|
||||||
|
정본 근거
|
||||||
|
전략 stage_1_part_3_개정_신전략서.md §2(D-4) · §4.2(L0-1~L0-8)
|
||||||
|
정책 Default_Agent/stage1_runtime/structure_index_policy.v1.json
|
||||||
|
계약 Θ = SG-01.expected_runnable_domain_ids 에 대한 domain_config.structure_types 합집합
|
||||||
|
구조 레코드 = (도메인, type_id) 쌍마다 하나 · 도메인 간 병합 금지
|
||||||
|
전순서 order_key = (priority_rank, registry_index entries 위치, type_id)
|
||||||
|
|
||||||
|
이 모듈은 순수하다 — 파일을 읽지도 쓰지도 않는다. 호출자가 적재한 문서를 받아
|
||||||
|
{structure_seed_bundle, review_items, audit} 를 돌려준다. 시각·난수를 쓰지 않으므로
|
||||||
|
같은 입력이면 같은 출력이다(L-n).
|
||||||
|
|
||||||
|
사건 종류 이름·도메인 목록·유형 열거를 고정하지 않는다(137종 일반성 §8.1).
|
||||||
|
"""
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
SCHEMA_VERSION = "stage1_structure_seed_bundle.v1"
|
||||||
|
POLICY_SCHEMA_VERSION = "stage1_structure_index_policy.v1"
|
||||||
|
|
||||||
|
# 검토 코드 — registry 선언(UNREGISTERED_EFFECT_TYPE_REVIEW)과 신전략서 §4.2 의 신설분.
|
||||||
|
REVIEW_UNREGISTERED = "UNREGISTERED_EFFECT_TYPE_REVIEW"
|
||||||
|
REVIEW_SLICE_DIVERGENCE = "PART3_SLICE_PROJECTION_DIVERGENCE"
|
||||||
|
REVIEW_SIDECAR_MISMATCH = "PART3_REGISTRY_SIDECAR_MISMATCH"
|
||||||
|
REVIEW_CROSS_DOMAIN = "PART3_EFFECT_TYPE_CROSS_DOMAIN"
|
||||||
|
REVIEW_CALC_DANGLING = "PART3_CALCULATION_REF_DANGLING"
|
||||||
|
REVIEW_BO_UNATTACHED = "PART3_BO_UNATTACHED"
|
||||||
|
REVIEW_BO_UNRESOLVED = "PART3_BO_DOMAIN_UNRESOLVED"
|
||||||
|
|
||||||
|
SG13_ROUTE_RECORD_TYPE = "legal_effect_route"
|
||||||
|
|
||||||
|
|
||||||
|
def _strings(value: Any) -> list[str]:
|
||||||
|
if not isinstance(value, list):
|
||||||
|
return []
|
||||||
|
return [item for item in value if isinstance(item, str) and item]
|
||||||
|
|
||||||
|
|
||||||
|
def _dict(value: Any) -> dict:
|
||||||
|
return value if isinstance(value, dict) else {}
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# 사이드카 정규화 리더 — 방언 지도(신전략서 §1.2): 목록 키 3종 · 투영 키 3종 · 정책 자리 4갈래.
|
||||||
|
# 방언을 다 읽지 않은 리더는 결손을 만들어 낸다(구 전략서 §1.5 의 실패 기록) —
|
||||||
|
# 세 방언 전부를 인정하고, 세지 않은 필드를 공통 필드로 승격하지 않는다.
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
_LIST_KEYS = ("entries", "structure_types", "types")
|
||||||
|
_PROJECTION_KEYS = ("projections", "mappings", "structure_type_to_projection")
|
||||||
|
_FILE_POLICY_KEYS = ("admission_rules", "unregistered_effect_policy", "fallback_policy")
|
||||||
|
|
||||||
|
|
||||||
|
def read_sidecar_types(doc: Any) -> dict[str, Any]:
|
||||||
|
"""structure_types.json 방언을 정규화한다.
|
||||||
|
|
||||||
|
반환: {"list_key": str|None, "schema_version": str|None,
|
||||||
|
"items": [{"type_id", "admission_rule"?, "registered"?}],
|
||||||
|
"file_policy_key": str|None, "file_policy": dict|None,
|
||||||
|
"legacy_contract_style": bool}
|
||||||
|
"""
|
||||||
|
root = _dict(doc)
|
||||||
|
list_key = None
|
||||||
|
rows: list[Any] = []
|
||||||
|
for key in _LIST_KEYS:
|
||||||
|
if isinstance(root.get(key), list):
|
||||||
|
list_key = key
|
||||||
|
rows = root[key]
|
||||||
|
break
|
||||||
|
items = []
|
||||||
|
for row in rows:
|
||||||
|
row = _dict(row)
|
||||||
|
type_id = row.get("type_id") or row.get("structure_type") or row.get("id")
|
||||||
|
if not isinstance(type_id, str) or not type_id:
|
||||||
|
continue
|
||||||
|
item: dict[str, Any] = {"type_id": type_id}
|
||||||
|
if isinstance(row.get("admission_rule"), str) and row.get("admission_rule"):
|
||||||
|
item["admission_rule"] = row["admission_rule"]
|
||||||
|
if isinstance(row.get("registered"), bool):
|
||||||
|
item["registered"] = row["registered"]
|
||||||
|
items.append(item)
|
||||||
|
file_policy_key = None
|
||||||
|
file_policy = None
|
||||||
|
for key in _FILE_POLICY_KEYS:
|
||||||
|
if root.get(key) is not None:
|
||||||
|
file_policy_key = key
|
||||||
|
file_policy = root[key]
|
||||||
|
break
|
||||||
|
legacy_style = file_policy_key is None and any(
|
||||||
|
key in root for key in ("legacy_contract", "noncanonical_preservation", "ordering_preserved"))
|
||||||
|
return {"list_key": list_key,
|
||||||
|
"schema_version": root.get("schema_version"),
|
||||||
|
"items": items,
|
||||||
|
"file_policy_key": file_policy_key,
|
||||||
|
"file_policy": file_policy,
|
||||||
|
"legacy_contract_style": legacy_style}
|
||||||
|
|
||||||
|
|
||||||
|
def read_sidecar_projection(doc: Any) -> dict[str, Any]:
|
||||||
|
"""module_role_projection.json 방언을 정규화한다.
|
||||||
|
|
||||||
|
반환: {"projection_key": str|None, "mappings": {type_id: {"module", "role_projection"}},
|
||||||
|
"default_projection": dict|None, "missing_mapping_policy": dict|None}
|
||||||
|
"""
|
||||||
|
root = _dict(doc)
|
||||||
|
mappings: dict[str, dict[str, Any]] = {}
|
||||||
|
projection_key = None
|
||||||
|
for key in _PROJECTION_KEYS:
|
||||||
|
value = root.get(key)
|
||||||
|
if isinstance(value, list):
|
||||||
|
projection_key = key
|
||||||
|
for row in value:
|
||||||
|
row = _dict(row)
|
||||||
|
type_id = row.get("structure_type") or row.get("type_id")
|
||||||
|
if isinstance(type_id, str) and type_id:
|
||||||
|
mappings[type_id] = {"module": row.get("module"),
|
||||||
|
"role_projection": row.get("role_projection")}
|
||||||
|
break
|
||||||
|
if isinstance(value, dict):
|
||||||
|
projection_key = key
|
||||||
|
for type_id, row in value.items():
|
||||||
|
row = _dict(row)
|
||||||
|
if isinstance(type_id, str) and type_id:
|
||||||
|
mappings[type_id] = {"module": row.get("module"),
|
||||||
|
"role_projection": row.get("role_projection")}
|
||||||
|
break
|
||||||
|
default_projection = root.get("default_projection")
|
||||||
|
if not isinstance(default_projection, dict):
|
||||||
|
default_projection = None
|
||||||
|
missing_policy = root.get("missing_mapping_policy")
|
||||||
|
if not isinstance(missing_policy, dict):
|
||||||
|
missing_policy = None
|
||||||
|
return {"projection_key": projection_key, "mappings": mappings,
|
||||||
|
"default_projection": default_projection,
|
||||||
|
"missing_mapping_policy": missing_policy}
|
||||||
|
|
||||||
|
|
||||||
|
def admission_policy_for(sidecar_types: dict[str, Any], item: dict[str, Any]) -> str:
|
||||||
|
"""두 단 정의(신전략서 §1.2) — 파일 단위 정책(3키 중 있는 것) → 없으면 항목 admission_rule.
|
||||||
|
|
||||||
|
73/73 이 채워지는 값이다. 어느 단도 없으면 빈 문자열이 아니라 명시 문자열을 남긴다 —
|
||||||
|
없는 것을 있는 것처럼 채우지 않되, 부재 자체는 보이게 한다.
|
||||||
|
"""
|
||||||
|
key = sidecar_types.get("file_policy_key")
|
||||||
|
if key:
|
||||||
|
return "file:%s" % key
|
||||||
|
rule = item.get("admission_rule")
|
||||||
|
if isinstance(rule, str) and rule:
|
||||||
|
return "item:admission_rule"
|
||||||
|
return "absent"
|
||||||
|
|
||||||
|
|
||||||
|
def resolve_source_domains(value: Any, alias_targets: dict[str, Any],
|
||||||
|
known_domain_ids: set[str]) -> list[str]:
|
||||||
|
"""BO provenance.source_domain 을 registry 도메인 ID 목록으로 해소한다(L0-7b ①).
|
||||||
|
|
||||||
|
registry ID 면 [값]. 아니면 별칭표의 목록(다중 타깃 실재 — 단일 primary 개념 없음).
|
||||||
|
별칭표에도 없으면 빈 목록 — 호출자가 PART3_BO_DOMAIN_UNRESOLVED 로 격리한다.
|
||||||
|
"""
|
||||||
|
if not isinstance(value, str) or not value:
|
||||||
|
return []
|
||||||
|
if value in known_domain_ids:
|
||||||
|
return [value]
|
||||||
|
targets = _strings(_dict(alias_targets).get(value))
|
||||||
|
return [d for d in targets if d in known_domain_ids]
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# 본체
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
def compile_structure_seeds(activation_manifest: Any,
|
||||||
|
registry_index: Any,
|
||||||
|
domain_configs: dict[str, Any],
|
||||||
|
domain_sidecars: dict[str, Any],
|
||||||
|
policy: Any,
|
||||||
|
alias_declarations: Any,
|
||||||
|
sg13_records: list[Any],
|
||||||
|
sg05_records: list[Any],
|
||||||
|
sg11_records: list[Any],
|
||||||
|
domain_envelopes: dict[str, Any],
|
||||||
|
bo_records: list[Any],
|
||||||
|
slice_documents: dict[str, Any]) -> dict[str, Any]:
|
||||||
|
"""L0-1 ~ L0-8. 반환 dict 는 theta 와 order_key 를 반드시 싣는다(PART3_COMPILER_STALE 의 대조면)."""
|
||||||
|
policy_root = _dict(policy)
|
||||||
|
if policy_root.get("schema_version") != POLICY_SCHEMA_VERSION:
|
||||||
|
raise ValueError("PART3_POLICY_INVALID:%s" % policy_root.get("schema_version"))
|
||||||
|
|
||||||
|
manifest_root = _dict(activation_manifest).get("domain_activation_manifest",
|
||||||
|
_dict(activation_manifest))
|
||||||
|
expected_runnable = _strings(_dict(manifest_root).get("expected_runnable_domain_ids"))
|
||||||
|
if not expected_runnable:
|
||||||
|
raise ValueError("PART3_EXPECTED_RUNNABLE_EMPTY")
|
||||||
|
|
||||||
|
index_root = _dict(_dict(registry_index).get("domain_registry_index", registry_index))
|
||||||
|
index_entries = [row for row in (index_root.get("entries") or []) if isinstance(row, dict)]
|
||||||
|
index_position = {row.get("domain_id"): position
|
||||||
|
for position, row in enumerate(index_entries)
|
||||||
|
if isinstance(row.get("domain_id"), str)}
|
||||||
|
known_domain_ids = set(index_position)
|
||||||
|
|
||||||
|
review_items: list[dict[str, Any]] = []
|
||||||
|
audit: dict[str, Any] = {"sidecar_dialects": {}, "input_gaps": [],
|
||||||
|
"unlinked_sg11": [], "dangling_calculation_refs": {}}
|
||||||
|
|
||||||
|
def review(code: str, severity: str, domain_id: str | None, detail: dict[str, Any]) -> None:
|
||||||
|
item = {"review_code": code, "severity": severity}
|
||||||
|
if domain_id is not None:
|
||||||
|
item["domain_id"] = domain_id
|
||||||
|
item.update(detail)
|
||||||
|
review_items.append(item)
|
||||||
|
|
||||||
|
# ---------------- L0-1 · Θ 조립 ----------------
|
||||||
|
declared_by_domain: dict[str, list[dict[str, Any]]] = {}
|
||||||
|
for domain_id in expected_runnable:
|
||||||
|
if domain_id not in known_domain_ids:
|
||||||
|
raise ValueError("PART3_DOMAIN_NOT_IN_REGISTRY:%s" % domain_id)
|
||||||
|
config_root = _dict(domain_configs.get(domain_id))
|
||||||
|
rows = [row for row in (config_root.get("structure_types") or [])
|
||||||
|
if isinstance(row, dict) and isinstance(row.get("type_id"), str)]
|
||||||
|
declared_by_domain[domain_id] = rows
|
||||||
|
theta = sorted({row["type_id"] for rows in declared_by_domain.values() for row in rows})
|
||||||
|
declaring_domains: dict[str, list[str]] = {}
|
||||||
|
for domain_id in expected_runnable:
|
||||||
|
for row in declared_by_domain[domain_id]:
|
||||||
|
declaring_domains.setdefault(row["type_id"], []).append(domain_id)
|
||||||
|
|
||||||
|
# ---------------- L0-2c · 사이드카 교차 검증 (레코드 생성보다 앞 — admission_policy 재료) ----------------
|
||||||
|
sidecar_norm: dict[str, dict[str, Any]] = {}
|
||||||
|
projection_norm: dict[str, dict[str, Any]] = {}
|
||||||
|
for domain_id in expected_runnable:
|
||||||
|
pair = _dict(domain_sidecars.get(domain_id))
|
||||||
|
declared_ids = sorted({row["type_id"] for row in declared_by_domain[domain_id]})
|
||||||
|
if not pair:
|
||||||
|
# 부재 규칙(신전략서 §5.5) — 선언 0 도메인의 부재만 정상이다.
|
||||||
|
if declared_ids:
|
||||||
|
raise ValueError("PART3_SIDECAR_ABSENT_FOR_DECLARING_DOMAIN:%s" % domain_id)
|
||||||
|
audit["sidecar_dialects"][domain_id] = {"absent": True, "declared": 0}
|
||||||
|
continue
|
||||||
|
types_doc = read_sidecar_types(pair.get("structure_types"))
|
||||||
|
projection_doc = read_sidecar_projection(pair.get("module_role_projection"))
|
||||||
|
sidecar_norm[domain_id] = types_doc
|
||||||
|
projection_norm[domain_id] = projection_doc
|
||||||
|
audit["sidecar_dialects"][domain_id] = {
|
||||||
|
"list_key": types_doc.get("list_key"),
|
||||||
|
"schema_version": types_doc.get("schema_version"),
|
||||||
|
"projection_key": projection_doc.get("projection_key"),
|
||||||
|
"file_policy_key": types_doc.get("file_policy_key"),
|
||||||
|
"legacy_contract_style": types_doc.get("legacy_contract_style"),
|
||||||
|
"item_count": len(types_doc.get("items") or []),
|
||||||
|
}
|
||||||
|
sidecar_ids = sorted({item["type_id"] for item in types_doc.get("items") or []})
|
||||||
|
if sidecar_ids != declared_ids:
|
||||||
|
review(REVIEW_SIDECAR_MISMATCH, "HARD_WARNING", domain_id, {
|
||||||
|
"detail": "type_set_mismatch",
|
||||||
|
"config_only": sorted(set(declared_ids) - set(sidecar_ids)),
|
||||||
|
"sidecar_only": sorted(set(sidecar_ids) - set(declared_ids)),
|
||||||
|
})
|
||||||
|
for type_id, mapping in sorted((projection_doc.get("mappings") or {}).items()):
|
||||||
|
config_row = next((row for row in declared_by_domain[domain_id]
|
||||||
|
if row["type_id"] == type_id), None)
|
||||||
|
if config_row is None:
|
||||||
|
continue
|
||||||
|
if (mapping.get("module") != config_row.get("module")
|
||||||
|
or mapping.get("role_projection") != config_row.get("role_projection")):
|
||||||
|
review(REVIEW_SIDECAR_MISMATCH, "HARD_WARNING", domain_id, {
|
||||||
|
"detail": "projection_mismatch", "type_id": type_id,
|
||||||
|
"config": {"module": config_row.get("module"),
|
||||||
|
"role_projection": config_row.get("role_projection")},
|
||||||
|
"sidecar": mapping,
|
||||||
|
})
|
||||||
|
|
||||||
|
# ---------------- L0-2 · 구조 레코드 — (도메인, type_id) 쌍마다 하나 ----------------
|
||||||
|
e13_extension_key = None
|
||||||
|
contract = _dict(policy_root.get("extension_key_rule"))
|
||||||
|
e13_extension_key = contract.get("extension_key") if isinstance(
|
||||||
|
contract.get("extension_key"), str) else None
|
||||||
|
e13_domain = contract.get("domain_id") if isinstance(contract.get("domain_id"), str) else None
|
||||||
|
|
||||||
|
records: dict[tuple[str, str], dict[str, Any]] = {}
|
||||||
|
for domain_id in expected_runnable:
|
||||||
|
types_doc = sidecar_norm.get(domain_id, {"items": []})
|
||||||
|
item_by_type = {item["type_id"]: item for item in types_doc.get("items") or []}
|
||||||
|
for row in declared_by_domain[domain_id]:
|
||||||
|
type_id = row["type_id"]
|
||||||
|
item = item_by_type.get(type_id, {})
|
||||||
|
record: dict[str, Any] = {
|
||||||
|
"structure_id": "LES-%s-%s" % (domain_id, type_id),
|
||||||
|
"domain_id": domain_id,
|
||||||
|
"type_id": type_id,
|
||||||
|
"priority_rank": row.get("priority_rank"),
|
||||||
|
"order_key": [row.get("priority_rank"), index_position[domain_id], type_id],
|
||||||
|
"module": row.get("module"),
|
||||||
|
"role_projection": row.get("role_projection"),
|
||||||
|
"admission_policy": admission_policy_for(types_doc, item),
|
||||||
|
"routes": [],
|
||||||
|
"route_count": 0,
|
||||||
|
"evidence_refs": [],
|
||||||
|
"meeting_clause_refs": [],
|
||||||
|
"calculation_request_refs": [],
|
||||||
|
"source_bo_ids": [],
|
||||||
|
"review_codes": [],
|
||||||
|
"review_required": False,
|
||||||
|
}
|
||||||
|
if "admission_rule" in item:
|
||||||
|
record["admission_rule"] = item["admission_rule"]
|
||||||
|
if "registered" in item:
|
||||||
|
record["registered_declared"] = item["registered"]
|
||||||
|
if domain_id == e13_domain and e13_extension_key:
|
||||||
|
record["extension_key"] = e13_extension_key
|
||||||
|
if domain_id == "E-00":
|
||||||
|
# E-00 특칙 — 잔여 수집기 유래 구조는 검토 필수(신전략서 §4.2).
|
||||||
|
record["review_required"] = True
|
||||||
|
records[(domain_id, type_id)] = record
|
||||||
|
|
||||||
|
# ---------------- L0-2b · 슬라이스 투영 정합 ----------------
|
||||||
|
for domain_id in expected_runnable:
|
||||||
|
slice_doc = slice_documents.get(domain_id)
|
||||||
|
if slice_doc is None:
|
||||||
|
audit["input_gaps"].append({"kind": "slice_absent", "domain_id": domain_id})
|
||||||
|
continue
|
||||||
|
slice_root = _dict(_dict(slice_doc).get("stage_b_domain_slice", slice_doc))
|
||||||
|
declarations = _dict(slice_root.get("domain_declarations"))
|
||||||
|
slice_ids = sorted(_strings(declarations.get("structure_type_ids")))
|
||||||
|
config_ids = sorted({row["type_id"] for row in declared_by_domain[domain_id]})
|
||||||
|
if slice_ids != config_ids:
|
||||||
|
review(REVIEW_SLICE_DIVERGENCE, "HARD_WARNING", domain_id, {
|
||||||
|
"slice_only": sorted(set(slice_ids) - set(config_ids)),
|
||||||
|
"config_only": sorted(set(config_ids) - set(slice_ids)),
|
||||||
|
})
|
||||||
|
|
||||||
|
# ---------------- L0-3 · SG-13 조인 + L0-4 · 도메인 소속 ----------------
|
||||||
|
routes = [_dict(row) for row in sg13_records
|
||||||
|
if _dict(row).get("record_type") == SG13_ROUTE_RECORD_TYPE]
|
||||||
|
attached_route_count = 0
|
||||||
|
unattached_routes: list[dict[str, Any]] = []
|
||||||
|
for route in routes:
|
||||||
|
details = _dict(route.get("details"))
|
||||||
|
type_id = details.get("type_id")
|
||||||
|
route_domains = _strings(route.get("domain_ids"))
|
||||||
|
route_domain = route_domains[0] if route_domains else None
|
||||||
|
registered = details.get("registered")
|
||||||
|
route_ref = {
|
||||||
|
"signal_id": route.get("signal_id"),
|
||||||
|
"source_seed_id": details.get("source_seed_id"),
|
||||||
|
"registered": registered if isinstance(registered, bool) else None,
|
||||||
|
"status": route.get("status"),
|
||||||
|
}
|
||||||
|
if not isinstance(type_id, str) or type_id not in theta:
|
||||||
|
# Θ 밖 — 버리지 않는다. default_projection 이 있으면 검토 항목에 실어 함께 나른다.
|
||||||
|
projection = None
|
||||||
|
if route_domain and route_domain in projection_norm:
|
||||||
|
projection = projection_norm[route_domain].get("default_projection")
|
||||||
|
review(REVIEW_UNREGISTERED, "HARD_WARNING", route_domain, {
|
||||||
|
"type_id": type_id, "signal_id": route.get("signal_id"),
|
||||||
|
"default_projection": projection,
|
||||||
|
})
|
||||||
|
unattached_routes.append({"signal_id": route.get("signal_id"),
|
||||||
|
"type_id": type_id, "reason": "type_outside_theta"})
|
||||||
|
continue
|
||||||
|
target_keys = []
|
||||||
|
if route_domain and (route_domain, type_id) in records:
|
||||||
|
target_keys = [(route_domain, type_id)]
|
||||||
|
else:
|
||||||
|
# Θ 안이지만 자기 도메인이 선언하지 않은 유형 — 선언 도메인 전부에 붙이고 검토(L0-4).
|
||||||
|
target_keys = [(d, type_id) for d in declaring_domains.get(type_id, [])
|
||||||
|
if (d, type_id) in records]
|
||||||
|
if target_keys:
|
||||||
|
review(REVIEW_CROSS_DOMAIN, "HARD_WARNING", route_domain, {
|
||||||
|
"type_id": type_id, "signal_id": route.get("signal_id"),
|
||||||
|
"attached_to": ["%s:%s" % key for key in target_keys],
|
||||||
|
})
|
||||||
|
if not target_keys:
|
||||||
|
unattached_routes.append({"signal_id": route.get("signal_id"),
|
||||||
|
"type_id": type_id, "reason": "no_declaring_domain"})
|
||||||
|
review(REVIEW_UNREGISTERED, "HARD_WARNING", route_domain, {
|
||||||
|
"type_id": type_id, "signal_id": route.get("signal_id"),
|
||||||
|
"default_projection": None,
|
||||||
|
})
|
||||||
|
continue
|
||||||
|
attached_route_count += 1
|
||||||
|
for key in target_keys:
|
||||||
|
record = records[key]
|
||||||
|
record["routes"].append(dict(route_ref))
|
||||||
|
for field in ("evidence_refs", "meeting_clause_refs"):
|
||||||
|
merged = set(record[field]) | set(_strings(route.get(field)))
|
||||||
|
record[field] = sorted(merged)
|
||||||
|
if registered is False:
|
||||||
|
# 붙은 채로 검토 꼬리표를 단다(L-m2 — 분할은 부착 여부로만 가른다).
|
||||||
|
if REVIEW_UNREGISTERED not in record["review_codes"]:
|
||||||
|
record["review_codes"].append(REVIEW_UNREGISTERED)
|
||||||
|
record["review_required"] = True
|
||||||
|
review(REVIEW_UNREGISTERED, "SOFT_WARNING", key[0], {
|
||||||
|
"type_id": type_id, "signal_id": route.get("signal_id"),
|
||||||
|
"detail": "registered_false_route_attached",
|
||||||
|
})
|
||||||
|
declared_flag = record.get("registered_declared")
|
||||||
|
if isinstance(declared_flag, bool) and isinstance(registered, bool) \
|
||||||
|
and declared_flag != registered:
|
||||||
|
# types 방언의 registered ↔ SG-13 registered 대조(L0-2c 둘째 갈래).
|
||||||
|
if REVIEW_SIDECAR_MISMATCH not in record["review_codes"]:
|
||||||
|
record["review_codes"].append(REVIEW_SIDECAR_MISMATCH)
|
||||||
|
record["review_required"] = True
|
||||||
|
review(REVIEW_SIDECAR_MISMATCH, "HARD_WARNING", key[0], {
|
||||||
|
"detail": "registered_flag_mismatch", "type_id": type_id,
|
||||||
|
"sidecar": declared_flag, "route": registered,
|
||||||
|
})
|
||||||
|
|
||||||
|
# ---------------- L0-5 · module 부여는 L0-2 에서 config 원문으로 끝났다 ----------------
|
||||||
|
|
||||||
|
# ---------------- L0-6 · 계산 조인 — SG-11 signal_id ↔ 도메인 봉투 calculation_refs ----------------
|
||||||
|
# 봉투 부재는 침묵 스킵이 아니라 영수증 계수다(I-5 — expected_runnable 중 실재하는 것만 읽되
|
||||||
|
# 부재를 기록한다). 실주행에서 감시 도메인 봉투가 없는 것은 상시 경로다.
|
||||||
|
for domain_id in expected_runnable:
|
||||||
|
if domain_id not in domain_envelopes:
|
||||||
|
audit["input_gaps"].append({"kind": "domain_envelope_absent",
|
||||||
|
"domain_id": domain_id})
|
||||||
|
sg11_rows = [_dict(row) for row in sg11_records]
|
||||||
|
sg11_ids = {row.get("signal_id") for row in sg11_rows if isinstance(row.get("signal_id"), str)}
|
||||||
|
linked_sg11: set[str] = set()
|
||||||
|
for domain_id in expected_runnable:
|
||||||
|
envelope = _dict(_dict(domain_envelopes.get(domain_id)).get("domain_signal_envelope",
|
||||||
|
domain_envelopes.get(domain_id)))
|
||||||
|
refs = _strings(_dict(envelope).get("calculation_refs"))
|
||||||
|
if not refs:
|
||||||
|
continue
|
||||||
|
matched = sorted(set(refs) & sg11_ids)
|
||||||
|
dangling = sorted(set(refs) - sg11_ids)
|
||||||
|
if dangling:
|
||||||
|
audit["dangling_calculation_refs"][domain_id] = dangling
|
||||||
|
review(REVIEW_CALC_DANGLING, "HARD_WARNING", domain_id, {"dangling": dangling})
|
||||||
|
if matched:
|
||||||
|
linked_sg11.update(matched)
|
||||||
|
for (record_domain, _type_id), record in records.items():
|
||||||
|
if record_domain == domain_id:
|
||||||
|
merged = set(record["calculation_request_refs"]) | set(matched)
|
||||||
|
record["calculation_request_refs"] = sorted(merged)
|
||||||
|
# 봉투 참조에 연결되지 않은 SG-11(합성 id 포함)은 구조에 싣지 않되 형식화 기록(신전략서 L0-6).
|
||||||
|
audit["unlinked_sg11"] = sorted(sg11_ids - linked_sg11)
|
||||||
|
|
||||||
|
# ---------------- L0-7 · SG-05 근거 refs (도메인 단위 합집합) ----------------
|
||||||
|
for row in sg05_records:
|
||||||
|
row = _dict(row)
|
||||||
|
for domain_id in _strings(row.get("domain_ids")):
|
||||||
|
for (record_domain, _type_id), record in records.items():
|
||||||
|
if record_domain == domain_id:
|
||||||
|
for field in ("evidence_refs", "meeting_clause_refs"):
|
||||||
|
merged = set(record[field]) | set(_strings(row.get(field)))
|
||||||
|
record[field] = sorted(merged)
|
||||||
|
|
||||||
|
# ---------------- L0-7b · BO 부착 조인 ----------------
|
||||||
|
alias_targets = _dict(_dict(alias_declarations).get("legacy_alias_targets"))
|
||||||
|
bo_rows = [_dict(row) for row in bo_records]
|
||||||
|
bo_attached: list[str] = []
|
||||||
|
bo_unattached: list[dict[str, Any]] = []
|
||||||
|
for bo in bo_rows:
|
||||||
|
bo_id = bo.get("BO_ID") or bo.get("id")
|
||||||
|
provenance = _dict(bo.get("provenance"))
|
||||||
|
source_domain = provenance.get("source_domain")
|
||||||
|
resolved = resolve_source_domains(source_domain, alias_targets, known_domain_ids)
|
||||||
|
if not resolved:
|
||||||
|
review(REVIEW_BO_UNRESOLVED, "HARD_WARNING", None, {
|
||||||
|
"bo_id": bo_id, "source_domain": source_domain,
|
||||||
|
})
|
||||||
|
bo_unattached.append({"bo_id": bo_id, "reason": "source_domain_unresolved"})
|
||||||
|
continue
|
||||||
|
keywords = _strings(bo.get("Legal_Keywords"))
|
||||||
|
attached_here = False
|
||||||
|
for domain_id in resolved:
|
||||||
|
for type_id in keywords:
|
||||||
|
record = records.get((domain_id, type_id))
|
||||||
|
if record is not None:
|
||||||
|
attached_here = True
|
||||||
|
if isinstance(bo_id, str) and bo_id not in record["source_bo_ids"]:
|
||||||
|
record["source_bo_ids"].append(bo_id)
|
||||||
|
record["source_bo_ids"].sort()
|
||||||
|
if attached_here:
|
||||||
|
bo_attached.append(bo_id if isinstance(bo_id, str) else "")
|
||||||
|
else:
|
||||||
|
# 부착 실패는 침묵 금지(L0-7b ③).
|
||||||
|
review(REVIEW_BO_UNATTACHED, "HARD_WARNING", None, {
|
||||||
|
"bo_id": bo_id, "source_domain": source_domain,
|
||||||
|
"legal_keywords": keywords, "resolved_domains": resolved,
|
||||||
|
})
|
||||||
|
bo_unattached.append({"bo_id": bo_id, "reason": "no_matching_structure"})
|
||||||
|
|
||||||
|
# ---------------- 정렬 · 검토 재료 반영 · 산출 ----------------
|
||||||
|
ordered = sorted(records.values(),
|
||||||
|
key=lambda record: (record["order_key"][0] if isinstance(
|
||||||
|
record["order_key"][0], int) else 999,
|
||||||
|
record["order_key"][1], record["order_key"][2]))
|
||||||
|
for record in ordered:
|
||||||
|
record["route_count"] = len(record["routes"])
|
||||||
|
record["routes"].sort(key=lambda ref: (str(ref.get("signal_id")),
|
||||||
|
str(ref.get("source_seed_id"))))
|
||||||
|
record["review_codes"].sort()
|
||||||
|
if record["review_codes"]:
|
||||||
|
record["review_required"] = True
|
||||||
|
|
||||||
|
status = "READY_WITH_REVIEW" if review_items else "READY"
|
||||||
|
bundle = {
|
||||||
|
"schema_version": SCHEMA_VERSION,
|
||||||
|
"status": status,
|
||||||
|
"registry_version": index_root.get("registry_version"),
|
||||||
|
"expected_runnable_domain_ids": list(expected_runnable),
|
||||||
|
"theta": theta,
|
||||||
|
"structure_records": ordered,
|
||||||
|
"unattached_routes": sorted(unattached_routes,
|
||||||
|
key=lambda row: (str(row.get("signal_id")),
|
||||||
|
str(row.get("type_id")))),
|
||||||
|
"unattached_bo": sorted(bo_unattached, key=lambda row: str(row.get("bo_id"))),
|
||||||
|
"counts": {
|
||||||
|
"structure_records": len(ordered),
|
||||||
|
"declared_structure_types_total": sum(
|
||||||
|
len(rows) for rows in declared_by_domain.values()),
|
||||||
|
"sg13_route_total": len(routes),
|
||||||
|
"routes_attached": attached_route_count,
|
||||||
|
"routes_unattached": len(unattached_routes),
|
||||||
|
"bo_total": len(bo_rows),
|
||||||
|
"bo_attached": len(bo_attached),
|
||||||
|
"bo_unattached": len(bo_unattached),
|
||||||
|
"sg11_total": len(sg11_rows),
|
||||||
|
"sg11_linked": len(linked_sg11),
|
||||||
|
"sg11_unlinked": len(audit["unlinked_sg11"]),
|
||||||
|
},
|
||||||
|
"created_by": "Task_C_LE_L0_structure_seed_reducer",
|
||||||
|
}
|
||||||
|
return {"structure_seed_bundle": bundle, "review_items": review_items, "audit": audit}
|
||||||
+98
@@ -0,0 +1,98 @@
|
|||||||
|
{
|
||||||
|
"schema_version": "stage1_structure_index_policy.v1",
|
||||||
|
"status": "ACTIVE",
|
||||||
|
"purpose": "Part 3 구조 seed 조립·색인 규칙을 코드 밖에 선언한다. 값의 정본은 registry(domain_config.structure_types)이고, registry 가 말하지 않는 값은 만들지 않고 검토로 올린다. 선언의 목적문은 적대 검증의 오라클이다.",
|
||||||
|
"authority": {
|
||||||
|
"theta_source": "SG-01 domain_activation_manifest.expected_runnable_domain_ids",
|
||||||
|
"structure_type_source": "Default_Agent/domains/<id>/domain_config.json#structure_types",
|
||||||
|
"sidecar_source": "Default_Agent/domains/<id>/structure_types.json · module_role_projection.json",
|
||||||
|
"alias_source": "Default_Agent/routing/extension_payload_key_declarations.v1.json#legacy_alias_targets",
|
||||||
|
"case_kind_names_forbidden": true
|
||||||
|
},
|
||||||
|
"theta_definition": {
|
||||||
|
"formula": "Θ(사건) = ⋃ { domain_config(d).structure_types[].type_id | d ∈ expected_runnable_domain_ids }",
|
||||||
|
"note": "active_domain_ids 가 아니다(D-3 넓은 정의). 좁히면 감시·상시 도메인의 효과가 전부 검토로 쓸려 들어가고 커버리지 등식은 그래도 통과한다 — 조용히 틀리는 경로다."
|
||||||
|
},
|
||||||
|
"record_identity": {
|
||||||
|
"rule": "구조 레코드는 Θ 의 (도메인, type_id) 쌍마다 정확히 하나다. 도메인 간에 유형을 합치지 않는다.",
|
||||||
|
"structure_id": "LES-<domain_id>-<type_id>",
|
||||||
|
"note": "SG-13 route·BO 부착은 레코드 위에 붙는 근거이지 레코드 생성 주체가 아니다. 근거 없는 유형은 '선언됐으나 근거 없음'으로 보이고, 선언 0 도메인(EC-00)은 자연히 0 이다."
|
||||||
|
},
|
||||||
|
"total_order": {
|
||||||
|
"order_key": [
|
||||||
|
"그 도메인이 선언한 priority_rank",
|
||||||
|
"domains/_registry_index.json entries[] 의 도메인 위치",
|
||||||
|
"type_id"
|
||||||
|
],
|
||||||
|
"note": "min(rank) 병합 금지 — 도메인 내부 rank 는 26/26 전부 엄격 오름차순이라 이 3키가 각 도메인의 선언 순서를 보존한다."
|
||||||
|
},
|
||||||
|
"admission_policy": {
|
||||||
|
"definition": "두 단 — 그 도메인 사이드카의 파일 단위 정책 키(admission_rules · unregistered_effect_policy · fallback_policy 중 있는 것, 값 'file:<키>') → 없으면 항목 단위 admission_rule(값 'item:admission_rule') → 어느 단도 없으면 'absent'.",
|
||||||
|
"note": "admission_rule 은 entries 방언 13건에만 있는 선택 필드다 — 게이트 기준으로 쓰지 않는다. 원본 보존을 위해 있는 것만 admission_rule 필드로 함께 싣는다."
|
||||||
|
},
|
||||||
|
"fallback_policy": {
|
||||||
|
"silent_general_legal_effect_fallback_forbidden": true,
|
||||||
|
"rule": "빈 입력은 structure_count 0 으로 기록한다. Θ 밖·registered:false 유형은 버리지도 일반화하지도 않고 UNREGISTERED_EFFECT_TYPE_REVIEW 를 붙인다. 사이드카 default_projection 이 있으면 그 투영을 검토 항목에 실어 나르되 검토 코드를 반드시 동반한다."
|
||||||
|
},
|
||||||
|
"attachment_partition": {
|
||||||
|
"rule": "route 의 분할은 부착 여부로만 가른다 — 붙은(어떤 레코드에 근거로 실림) / 미부착(어느 레코드에도 닿지 못함). 검토 여부는 분할과 무관하다. registered:false 라도 type_id 가 Θ 안·선언 도메인이 있으면 붙은 채로 검토 꼬리표를 단다(이중 계상 금지)."
|
||||||
|
},
|
||||||
|
"bo_attachment": {
|
||||||
|
"alias_resolution": "provenance.source_domain 이 registry 도메인 ID 면 [그 값], 아니면 legacy_alias_targets[값] 목록(다중 타깃 실재 — 단일 primary 개념 없음), 어디에도 없으면 PART3_BO_DOMAIN_UNRESOLVED 검토로 격리.",
|
||||||
|
"join": "해소된 모든 도메인 d 에 대해 t ∈ BO.Legal_Keywords 인 구조 레코드 (d, t) 에 source_bo_ids 로 부착을 시도한다.",
|
||||||
|
"silence_forbidden": "Legal_Keywords 가 비었거나 어느 (d, t) 에도 닿지 않는 BO 는 PART3_BO_UNATTACHED 검토로 싣는다.",
|
||||||
|
"purpose": "원본 review_code 와 마찬가지로 — BO 연결을 잃지 않기 위해서다. SG 층의 source_bo_ids 가 비어 있어도 이 조인이 BO↔구조 연결을 세운다."
|
||||||
|
},
|
||||||
|
"sg11_join": {
|
||||||
|
"key": "SG-11 레코드의 signal_id (worker request_id 승계값 — details.request_id 는 보장되지 않는 키라 쓰지 않는다)",
|
||||||
|
"counterpart": "domain_signal_envelope.calculation_refs",
|
||||||
|
"unlinked_rule": "봉투 참조에 연결되지 않은 SG-11 레코드는 구조에 싣지 않되 영수증에 미연결 계수로 형식화 기록한다.",
|
||||||
|
"dangling_rule": "봉투에 있는데 SG-11 에 없는 참조는 PART3_CALCULATION_REF_DANGLING 검토."
|
||||||
|
},
|
||||||
|
"extension_key_rule": {
|
||||||
|
"domain_id": "E-13",
|
||||||
|
"extension_key": "actio_case_signals.v2",
|
||||||
|
"note": "별도 매핑표를 만들지 않는다 — s5_execution_contract.v2.json 의 e13_extension_domains 선언을 그대로 싣는다."
|
||||||
|
},
|
||||||
|
"conservation_equations": {
|
||||||
|
"declaration": "구조 레코드 수 == Σ(expected_runnable 도메인의 structure_types 개수) — 어긋나면 PART3_STRUCTURE_COUNT_BROKEN",
|
||||||
|
"route": "붙은 route 수 + 미부착 route 수 == SG-13 legal_effect_route 총수 — 어긋나면 PART3_ROUTE_CONSERVATION_BROKEN",
|
||||||
|
"bo": "부착 BO 수 + 미부착 BO 수 == BO.json 레코드 총수 — 어긋나면 PART3_BO_CONSERVATION_BROKEN",
|
||||||
|
"note": "세 등식 다 L2 가 원본 파일(domain_config · legal_effect_routes · BO.json)에서 직접 센 바깥 수와 비교한다. bundle 에 실린 수와 비교하면 항등식으로 퇴행한다."
|
||||||
|
},
|
||||||
|
"structure_index": {
|
||||||
|
"indexes": [
|
||||||
|
"by_domain_id",
|
||||||
|
"by_module",
|
||||||
|
"by_bo_id"
|
||||||
|
],
|
||||||
|
"by_claim_form_forbidden": "claim-form 어휘가 registry 에 없고 (module, role_projection) 은 type_id 와 일대일이라 색인이 되지 못한다. 필요하면 registry 에 어휘를 새로 선언하는 일이며 Part 3 범위 밖이다."
|
||||||
|
},
|
||||||
|
"review_codes": [
|
||||||
|
"UNREGISTERED_EFFECT_TYPE_REVIEW",
|
||||||
|
"PART3_SLICE_PROJECTION_DIVERGENCE",
|
||||||
|
"PART3_REGISTRY_SIDECAR_MISMATCH",
|
||||||
|
"PART3_EFFECT_TYPE_CROSS_DOMAIN",
|
||||||
|
"PART3_CALCULATION_REF_DANGLING",
|
||||||
|
"PART3_BO_UNATTACHED",
|
||||||
|
"PART3_BO_DOMAIN_UNRESOLVED"
|
||||||
|
],
|
||||||
|
"hard_error_codes": [
|
||||||
|
"PART3_ASSET_DEPLOYMENT_INCOMPLETE",
|
||||||
|
"PART3_POLICY_INVALID",
|
||||||
|
"PART3_STRUCTURE_SCHEMA_STALE",
|
||||||
|
"PART3_COMPILER_STALE",
|
||||||
|
"PART3_INDEX_SCHEMA_STALE",
|
||||||
|
"PART3_SIGNAL_SEAL_FAILED",
|
||||||
|
"PART3_REGISTRY_INDEX_SEAL_FAILED",
|
||||||
|
"PART3_DOMAIN_NOT_IN_REGISTRY",
|
||||||
|
"PART3_STRUCTURE_COUNT_BROKEN",
|
||||||
|
"PART3_ROUTE_CONSERVATION_BROKEN",
|
||||||
|
"PART3_BO_CONSERVATION_BROKEN",
|
||||||
|
"PART3_FINAL_SCHEMA_VALIDATION_FAILED",
|
||||||
|
"PART3_EXPECTED_RUNNABLE_EMPTY",
|
||||||
|
"PART3_SIDECAR_ABSENT_FOR_DECLARING_DOMAIN"
|
||||||
|
],
|
||||||
|
"e00_rule": "E-00(잔여 수집기)에서 온 구조 레코드는 review_required true 를 강제한다.",
|
||||||
|
"sidecar_absence_rule": "structure_types 선언이 0 인 도메인(오늘 EC-00 하나)의 사이드카 부재는 정상 — 스킵하고 영수증에 기록한다. 선언이 있는 도메인의 부재·미등재는 경성 실패다."
|
||||||
|
}
|
||||||
-1
File diff suppressed because one or more lines are too long
+56
@@ -0,0 +1,56 @@
|
|||||||
|
# 자산 위치 정리 중 발견한 문제
|
||||||
|
|
||||||
|
- 출처: `stage_1_2_3_assets_distribution_location.md` §8 특기사항 8건의 validity 재검증 (2026-08-20)
|
||||||
|
- 재검증 방법: 세 YAML(`stage_1_part_1_v.8.yml` · `stage_1_part_2_v.8.yml` · `stage_1_part_3_v.8.yml`) 원문 행 단위 대조 + 배포 트리(`extension_research/Default_Agent/`)·`runtime_manifest.json` 실측(등재-실물 diff, 교집합 sha256 전수 대조)
|
||||||
|
- 결론 요약: 8건 중 **실제 문제 4건**(8.2 · 8.3 · 8.4 일부 · 8.8), **문제 아님(설계 의도) 4건**(8.1 · 8.5 · 8.6 · 8.7). 재검증 중 **신규 확정 사실 1건**(manifest 등재-실물 괴리 277건).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. §8 항목별 validity 재검증 결과
|
||||||
|
|
||||||
|
| # | 항목 | 재검증 결과 | 판정 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| 8.1 | 게이트 전용 자산 | 사실 확인 — P2 A0 `assert_deployment`(L311-349)는 MODULE_MIRRORS+PART2_REQUIRED_ASSETS 목록만 검사(매니페스트 전수 스캔 아님). P3에서 `signal_registry.v2.json`·`s5_execution_contract.v2.json`은 PART3_REQUIRED_ASSETS(L229-230)에만 존재하고 어떤 태스크도 파싱하지 않음 | **문제 아님** — 의도된 배포 요구 선언(F-2). 단 P3가 소비하지 않는 2종의 목록 잔존은 선택적 정리 대상 |
|
||||||
|
| 8.2 | R0 죽은 상수 2개 | 확인 — P2 L893-894에 `ACTIVATION_MANIFEST_PATH`·`REGISTRY_INDEX_PATH` 정의 후 R0 블록(L848-1793) 내 사용 0회. S0는 같은 이름을 별도 재정의해 실제 사용(L2742→L3018) | **실제 문제(경미)** → YAML 수정 |
|
||||||
|
| 8.3 | `legacy_paths_forbidden` 모순 | 확인 — P2 L28 주석은 "구 경로 `stage1_tmp/task_c_bo/**`는 쓰지 않는다"고 선언하나, 본문 5개 파일(stage_a_context · source_universe_manifest · postb_seed_ledger · postb_adjudication_decisions · postb_compiled_bundle_compact)이 그 경로를 상시 사용(L271-272 · L922-930 · L1925-1930 · L2744) | **실제 문제(주석 오류)** → YAML 수정 |
|
||||||
|
| 8.4 | `domains/_registry_index.json` 매니페스트 미등재 | 확인 — manifest 426건 중 0회 등재. 추가 실측: **domain_config 26종 · seed_prompt_overlay 25종 · P1 자산 6종도 전부 미등재**. 도메인 계열은 SG-01 봉인 → `_registry_index` → `config_sha256` 사슬이 방어(P3 L222-223 주석으로 의도 명문), overlay는 config 사슬 + OVERLAY_ERROR_CODES 4종 경성 승격(P2 L257-258)으로 방어 | **부분 문제** — 도메인 계열은 설계. 남는 문제: P1 자산 5종(`routing/evidence_component_union.md` · `platform/schemas/client_goal_domain_profiles.schema.json` · `platform/reference_catalogs/domain_ids.json` · `platform/reference_catalogs/calculation_ids.json` · `platform/contracts/determinism_scope_contract.json`)은 **해시 앵커 전무** → Default_Agent 등재 작업 (`routing/activation_cue_digest.md`는 자체 헤더에 registry sha를 실어 반(半)앵커) |
|
||||||
|
| 8.5 | L2의 `signals/signal_manifest.json` 재독 금지 | 확인 — P3 L531-533 명문: L0가 검증한 transaction_id를 bundle로 승계, L2 재독은 계약 밖 | **문제 아님** — 승계 계약이 정본 |
|
||||||
|
| 8.6 | P3 L1 부재 | 확인 — 헤더(L10)·task_procedure(L1027) 주석에 "판정 부류가 생기면 L0–L2 사이에 끼운다" 명문 | **문제 아님** — 의도된 자리 |
|
||||||
|
| 8.7 | worker 유일 기록자 | 확인 — R0-5 규율: seed 파일 기록자는 워커 하나, R0 되쓰기 금지 | **문제 아님** — 안전장치 |
|
||||||
|
| 8.8 | P3 헤더 훼손 + Bearer 토큰 평문 | 확인 — P3 L24 `# 137종 —`(직전 L23이 "제약 1"이므로 "제약 2" 라벨 훼손으로 판단). Bearer 토큰은 **3파일 전부** 평문 하드코딩(P1 L75 · P2 L58 · P3 L48) | **실제 문제 2건** → YAML 수정 |
|
||||||
|
|
||||||
|
### 재검증 중 신규 확정 사실 — manifest 등재-실물 괴리 277건
|
||||||
|
|
||||||
|
`runtime_manifest.json` 426건 등재 vs 배포 원본 `extension_research/Default_Agent/` 210파일(.DS_Store 제외).
|
||||||
|
|
||||||
|
| 괴리 유형 | 건수 | 내역 |
|
||||||
|
|---|---|---|
|
||||||
|
| 등재됐으나 배포 원본에 없음 | **277** | computations 205 · law_versions 63 · platform/router 3 · tools 4 · signals/contracts 1 · stage1_runtime/_asset_bundle.txt 1 — 물리 실체는 `extension_research/선행구축/Default_Agent_Stage_1/`(1,322파일)에 존재 |
|
||||||
|
| 실물이나 미등재 | 61 | domain_config 26 · seed_prompt_overlay 25 · common_fragment 1 · `_registry_index.json` 1 · P1 자산 6 · runtime_manifest 자신 1 · case_kind_domain_matrix 1 (8.4 참조 — 대부분 SG-01 사슬 방어 설계) |
|
||||||
|
| 교집합(149파일) sha256 | 불일치 **0** | 전수 일치 |
|
||||||
|
|
||||||
|
영향: 각 Part의 배포 게이트는 자기 필수 목록만 스캔하므로 **P1~P3 실행은 막히지 않는다**. 그러나 remedy 문구("runtime_manifest의 등재·sha256과 대조해 결손 경로를 복원한다. 부분 복사는 허용되지 않는다")를 그대로 따르면 배포 원본만으로는 복원 불가능한 지시가 된다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. 작업 분류
|
||||||
|
|
||||||
|
### A. YAML 수정 작업 (`stage_1_part_1_v.8.yml` · `stage_1_part_2_v.8.yml` · `stage_1_part_3_v.8.yml`)
|
||||||
|
|
||||||
|
| 우선순위 | 대상 | 작업 |
|
||||||
|
|---|---|---|
|
||||||
|
| **높음(보안)** | P1 L75 · P2 L58 · P3 L48 | code-executor `Authorization: Bearer` 평문 토큰 제거 → 환경변수/시크릿 참조로 치환 |
|
||||||
|
| 중간 | P2 L893-894 | R0 죽은 상수 `ACTIVATION_MANIFEST_PATH` · `REGISTRY_INDEX_PATH` 2줄 삭제 |
|
||||||
|
| 낮음(주석) | P2 L28 | `legacy_paths_forbidden` 문구를 "구 **slice/seed** 경로에 한함"으로 한정하고, 현행 5개 파일 경로는 P-1 개정으로 유지됨을 명시 |
|
||||||
|
| 낮음(주석) | P3 L24 | 훼손 라벨 복원: `# 137종 —` → `# 제약 2 —` |
|
||||||
|
| 선택(설계 판단) | P3 L229-230 | P3가 파싱하지 않는 `signal_registry.v2.json` · `s5_execution_contract.v2.json`의 PART3_REQUIRED_ASSETS 잔존 — "상류(P2 S0) 배포 상태 재확인" 의도면 유지, 아니면 제거 |
|
||||||
|
|
||||||
|
### B. Default_Agent 폴더 자산 등재/삭제 작업
|
||||||
|
|
||||||
|
| 우선순위 | 작업 | 내용 |
|
||||||
|
|---|---|---|
|
||||||
|
| **높음** | 등재-실물 괴리 277건 해소 | **권장: 자산 복사** — `선행구축/Default_Agent_Stage_1`에서 277건(computations · law_versions · platform/router · tools · signals/contracts · _asset_bundle.txt)을 `extension_research/Default_Agent`로 복사해 배포 원본을 manifest와 완결(remedy "통째 배포" 정합). 대안인 manifest 재생성(등재 277건 삭제)은 Part 4+ 계산 및 선행구축 검증 하네스가 같은 manifest를 참조할 위험이 있어 비권장 |
|
||||||
|
| 중간 | P1 무앵커 자산 5종 등재 | `evidence_component_union.md` · `client_goal_domain_profiles.schema.json` · `domain_ids.json` · `calculation_ids.json` · `determinism_scope_contract.json`을 빌더(`build_default_agent_stage1.py`) 재실행으로 manifest에 등재. 등재만으로 복원 기준은 확보 — 게이트 강제까지 원하면 P1 YAML 추가 수정 필요 |
|
||||||
|
| 설계 결정 | `domains/_registry_index.json` 등재 여부 | 현행 = SG-01 봉인 단독 방어(의도 명문). manifest 등재 시 registry 갱신마다 manifest 재빌드가 필요해지는 결합 발생 — 현행 유지도 합리적. 결정 사항 |
|
||||||
|
| 선택(삭제) | `validation_assets/routing/case_kind_domain_matrix.v2.json` | 런타임 입력 금지가 명문화된 오프라인 회귀 전용 자산(72,969B)이 배포 트리에 동봉 — 서버 배포본에서 제외 후보(무해하나 불필요) |
|
||||||
|
| 선택(삭제) | `.DS_Store` 5개 | 배포 트리 내 잡파일 정리 |
|
||||||
+67
@@ -0,0 +1,67 @@
|
|||||||
|
# 자산 위치 정리 중 발견한 문제 — v.2 (확정판)
|
||||||
|
|
||||||
|
- 판본: v2 (2026-08-20) · 대체 대상: `problems_identified_in_detecting_assets_location.md`(v.1 — 참고용 존치)
|
||||||
|
- 점검 방법: v.1 의 판정 전건을 세 YAML 원문·배포 트리(`extension_research/Default_Agent/`)·`runtime_manifest.json`·git 이력·SKILL.md 전문으로 **1차 재실측**한 뒤, 독립 sub-agent 가 같은 원본으로 **1회 더 점검**(9개 판정 초안 전원 동의 + 정밀도 보정 5건 추가).
|
||||||
|
- v.1 대비 **판정이 뒤집힌 것 둘**:
|
||||||
|
1. **manifest 등재-실물 괴리 277건** — v.1 은 "높음: 조립본에서 277건 복사"를 권장했으나, 이는 **명문화된 설계와 정면 충돌**한다. 복사하지 않는다(§2-C).
|
||||||
|
2. **P3 헤더 L24 "훼손 의심"** — 훼손이 아니라 **저작 원문**이다. git 생성 커밋(130ed0b9)의 바이트가 현재와 동일하고(변경 이력 0), "137종"은 신전략서 절대 원칙의 라벨이다(§2-C).
|
||||||
|
- 결론 요약: §8 의 8건 + 신규 1건 중 **실제 문제로 확정 4건** — 8.2(사문 상수) · 8.3(주석 오류) · 8.4 일부(P1 자산 6종 무앵커) · 8.8b(토큰 평문). 나머지는 설계 명문 또는 오판.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. §8 항목별 확정 판정
|
||||||
|
|
||||||
|
| # | 항목 | v.1 판정 | **v.2 확정** | 확정 근거 (전건 실측) |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| 8.1 | P3 게이트 목록의 미파싱 2종(`signal_registry.v2.json` · `s5_execution_contract.v2.json`) | 문제 아님 · 선택 정리 | **문제 아님** (동일) | 신전략서 §5.5 가 10 리터럴을 명문화(스펙 준수). `s5` 계약의 `e13_extension_domains` 는 E-13 `extension_key`(`actio_case_signals.v2`)의 **선언 원천**이라 개념 의존이 실재한다(값은 정책 자산이 복제 선언 — 양쪽 실측 일치). 제거는 선택이며 권하지 않는다 |
|
||||||
|
| 8.2 | R0 사문 상수 2개 | 실제 문제(경미) | **실제 문제(경미)** (동일 + 보정) | P2 L893–894 정의 후 R0 블록 내 사용 0회. 보정 — `ACTIVATION_MANIFEST_PATH` 는 S0 이 별도 재정의해 실사용(L2742→L3018)하지만 **`REGISTRY_INDEX_PATH` 는 파일 전체에서 재정의·사용 모두 0회**다(v.1 서술은 두 상수를 뭉뚱그렸다) |
|
||||||
|
| 8.3 | `legacy_paths_forbidden` 주석 모순 | 실제 문제(주석 오류) | **실제 문제(주석 오류)** (동일 + 보정) | P2 L28 금지 선언 vs `stage1_tmp/task_c_bo/` 아래 5개 파일 상시 사용. 사용처 보정 — A0(L271–272) · R0(L922–925) · **R1(L1867·1872 — v.1 누락)** · F0(L1925–1930) · S0(L2744). 금지의 실뜻은 구 **slice/seed** 경로다 |
|
||||||
|
| 8.4 | `_registry_index.json` 등 매니페스트 미등재 | 부분 문제 | **부분 문제** (동일 · 처방 수정) | 도메인 계열(config 26 · overlay 25 · common_fragment · `_registry_index`)은 SG-01 봉인 → 색인 → `config_sha256` 사슬 설계 — 문제 아님. **P1 자산 6종은 해시 앵커 부재로 실제 문제**: `routing/evidence_component_union.md` · `platform/schemas/client_goal_domain_profiles.schema.json` · `platform/reference_catalogs/domain_ids.json` · `calculation_ids.json` · `platform/contracts/determinism_scope_contract.json`(앵커 전무 5종) + `routing/activation_cue_digest.md`(헤더 registry sha 는 신선도 앵커일 뿐 자체 바이트 무결성 아님 — 반쪽). P1 에는 `_verify_asset`·`assert_deployment` 가 없다(grep 0) |
|
||||||
|
| 8.5 | L2 의 signal_manifest 재독 없음 | 문제 아님 | **문제 아님** | P3 L531–533 — L0 검증 `transaction_id` 의 bundle 승계가 계약 정본("§4.3 입력 계약 밖" 명문) |
|
||||||
|
| 8.6 | P3 L1 부재 | 문제 아님 | **문제 아님** | 헤더 L10 · task_procedure L1027 에 자리와 되돌림 조건 명문 |
|
||||||
|
| 8.7 | worker 유일 seed 기록자 | 문제 아님 | **문제 아님** | R0-5 규율(되쓰기 삭제) — BO 투영 회차의 의도된 안전장치 |
|
||||||
|
| 8.8a | P3 L24 `# 137종 —` 훼손 의심 | 실제 문제(라벨 복원) | **문제 아님 — 오판 정정** | `git show 130ed0b9` 의 생성 시점 파일 sha256 이 현재와 바이트 동일(9a163a03… — 생성 후 변경 이력 0). 원천은 조각 헤더의 병렬 라벨(`# 제약 1 :` · `# 137종 :`)이고 "137종"은 신전략서 §0.1 **절대 원칙**("민사 137종 어느 사건이든 registry 기반")의 라벨이다. "제약 2"는 애초에 존재하지 않았다. 라벨 개명은 선택 |
|
||||||
|
| 8.8b | Bearer 토큰 평문 | 실제 문제 → env 치환 | **실제 문제(보안) — 처방 수정** | 세 YAML(P1 L75 · P2 L58 · P3 L48)뿐 아니라 **저장소 402개 파일**(v3 계열 전부 · `test_code_executor.ipynb` 포함)에 같은 토큰이 평문 전파돼 있다. SKILL.md 전문(881행)에 **env/시크릿 참조 문법이 없다**(템플릿 변수는 `{{item/prev/shared/__user_hash__/__workspace_hash__}}` 뿐) — v.1 의 "환경변수 치환" 단독 처방은 실행 불능 위험. 본질 처방은 **① 서버측 토큰 로테이션**(YAML 3본만 고쳐도 노출은 남는다) **② 백엔드의 헤더 시크릿 주입 지원 확인 후 치환**이다 |
|
||||||
|
| 신규 | manifest 등재 277건이 배포 트리에 없음 | 실제 문제 → **복사(높음)** | **문제 아님 — 판정 반전** | 명문 **4곳**과 충돌: Part 1\|2 분석서 §5.1("배포 트리는 실행이 읽는 자산 전부이자 **그것만**")·§5.3("매니페스트는 Stage 1 전 계열의 **상위 장부**"), Part 3 분석서 §6.3("검사는 자기가 읽는 경로만 건다"), 신전략서 §1.4("매니페스트 전수 존재 검사를 배포 트리에 걸면 안 된다")·§10-2("277항 실물 부재가 정상"). 게이트 실측 — P2 L330·P3 L268 루프는 자기 목록만 순회하고 세 YAML 에 `computations/`·`law_versions/` 문자열 0회 → **P1~P3 실행을 막지 않는다.** 계산기 205·법령판 63 을 복사하면 트리 정의가 깨지고 조립본 동기화 이월과도 충돌한다. remedy 문구("등재·sha256 과 대조해 결손 경로를 복원")는 **자기 게이트가 실측한 결손 경로**에 대한 지시로 읽는다 — 그 해석이 이미 4곳에 명문이다. 궁극 정리는 조립본 동기화 회차의 장부 몫 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. 확정 작업 분류
|
||||||
|
|
||||||
|
### A. YAML 수정으로 해결 (확정 3건)
|
||||||
|
|
||||||
|
| 우선순위 | 대상 | 작업 | 파급 (동반 작업) |
|
||||||
|
|---|---|---|---|
|
||||||
|
| **높음(보안·조건부)** | P1 L75 · P2 L58 · P3 L48 의 `Authorization: Bearer` 평문 | **선행 확인 후** 치환 — ① 백엔드가 mcpServers 헤더에 시크릿 주입을 지원하는지 확인(현행 SKILL.md 에 문법 없음) ② 지원 시 참조 문법으로 치환 ③ 미지원 시 백엔드 기능 추가가 선행 | **토큰 로테이션이 본질이다**(서버측 — 402파일 전파라 YAML 수정만으로 노출 해소 불가). 로테이션 후 신 토큰은 저장소 밖(.env 등)에만 둔다 |
|
||||||
|
| 낮음 | P2 L893–894 사문 상수 2줄 삭제 | `ACTIVATION_MANIFEST_PATH` · `REGISTRY_INDEX_PATH` 제거 | R0 조각(`P2-R0_..._v4.yml` L68–69) 동기화 · 구본 백업 · Part 1\|2 분석서의 행 범위(848–1,793)와 "선언만 하고 읽지 않는 상수 2개" 서술(§3.3·§3.5·§8) 갱신 |
|
||||||
|
| 낮음 | P2 L28 주석 1줄 | "구 경로 `stage1_tmp/task_c_bo/**` 는 쓰지 않는다" → "구 **slice/seed** 경로(`stage1_tmp/task_c_bo/domain_slices\|domain_seed_outputs`)는 쓰지 않는다. `stage_a_context`·`source_universe_manifest`(P-1 복귀)와 `postb_*` 3종은 이 경로를 정본으로 유지한다" | 주석만 — 코드 무변. 통합본·(해당 시) 조각 헤더 동기화 |
|
||||||
|
|
||||||
|
### B. Default_Agent 자산 등재/삭제로 해결 (확정 1건 + 선택 2건)
|
||||||
|
|
||||||
|
| 우선순위 | 작업 | 내용 | 실무 주의 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| 중간 | **P1 자산 6종 manifest 등재** | `evidence_component_union.md` · `client_goal_domain_profiles.schema.json` · `domain_ids.json` · `calculation_ids.json` · `determinism_scope_contract.json` · `activation_cue_digest.md` 의 sha256 행을 **배포 원본 `runtime_manifest.json` 에 직접 추가**(426 → 432). 이것이 이 회차 관례다 — BO 투영 회차 델타 2행·Part 3 회차 55행 모두 직접 추가였고, v.1 의 "빌더 재실행" 처방은 신선 시뮬 395항 ≠ 현행 426항이라 오히려 파괴적이다. 빌더 등록은 조립본 동기화 회차의 이월 묶음(`PART3_ASSEMBLY_AUTHORED` 와 한 벌) | **`runtime_artifact_count` 를 반드시 동반 갱신**(P2·P3 게이트가 count 등식·중복을 `…_RUNTIME_MANIFEST_INVALID` 로 경성 검사) · indent=2 왕복 직렬화 보존. 등재는 **복원 기준** 확보다 — 무결성 **강제**(게이트)까지 원하면 P1 YAML 에 `_verify_asset`/게이트 신설이 필요하며 그것은 별도 설계 판단(P1 개정 회차) |
|
||||||
|
| 선택 | `validation_assets/routing/case_kind_domain_matrix.v2.json` 제거 | 런타임 읽기 금지 명문(P1 L192·L1687) 자산이 배포 트리에 있다 — "실행이 읽는 것만"이라는 트리 정의와 미세 불일치. 제거가 정의에 정합하되 런타임 무해라 강제 아님 | 제거 시 분석서·대응표(154 목록)의 계수 갱신 동반 |
|
||||||
|
| 선택 | `.DS_Store` 5개 삭제 | 파일시스템 잡파일(루트·domains·platform·signals·validation_assets). **git 추적 0건 실측** — 파일시스템 정리만으로 충분 | 없음 |
|
||||||
|
|
||||||
|
### C. 문제 아님 — 조치하지 않는다 (설계 명문 / 오판 정정)
|
||||||
|
|
||||||
|
8.1(게이트 배포 요구 선언 — s5 는 extension_key 선언 원천) · 8.5(승계 계약) · 8.6(L1 자리) · 8.7(단일 기록자) · **8.8a(P3 L24 — 저작 원문, git 이력으로 증명)** · **신규 277건(상위 장부 설계 — 복사 금지. 궁극 정리는 조립본 동기화 회차의 장부 재생성 몫)**.
|
||||||
|
|
||||||
|
### D. 설계 결정 대기 (이번 분류에서 판단하지 않는 것)
|
||||||
|
|
||||||
|
`domains/_registry_index.json` 의 manifest 등재 여부 — 현행(SG-01 봉인 단독 방어)이 명문 설계이고, 등재 시 registry 갱신↔manifest 재빌드 결합이 생긴다. 현행 유지가 합리적이나 registry 소유자 결정 사항(v.1 판단 유지).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. 부록 — 점검 중 확인된 두 문서의 정밀도 보정 (v.2 확정 판정에는 영향 없음)
|
||||||
|
|
||||||
|
| 문서 | 위치 | 보정 |
|
||||||
|
|---|---|---|
|
||||||
|
| 총람 | §0 근거 행수 | "P1 6,668행" → 실측 **6,667** · "P3 1,038행" → 실측 **1,037** (개행 종결 wc -l 기준. P2 3,315 는 정확) |
|
||||||
|
| 총람 | §2 `determinism_scope_contract.json` "모듈 내부 소비 추정" | 실측 반증 — 배포 트리 전 모듈에서 참조 **0회**. 소비처 없는 선언 전용 자산이다(추정 표기를 실측으로 교체할 것) |
|
||||||
|
| v.1 | 8.2 행 "S0 는 같은 이름을 별도 재정의해 실제 사용" | `ACTIVATION_MANIFEST_PATH` 에만 참 — `REGISTRY_INDEX_PATH` 는 전 파일 재정의·사용 0회 |
|
||||||
|
| v.1 | 8.3 행 사용처 열거 | R1(L1867·1872) 누락 |
|
||||||
|
| v.1 | 신규 절 "remedy 를 그대로 따르면 복원 불가능한 지시" | remedy 의 대상은 게이트가 실측한 결손 경로다 — 해석 명문이 4곳에 이미 있다(§1 신규 행) |
|
||||||
|
|
||||||
|
숫자 재검(전건 일치): 277 = computations 205 + law_versions 63 + tools 4 + platform/router 3 + signals/contracts 1 + `_asset_bundle.txt` 1 · 61 = config 26 + overlay 25 + common_fragment 1 + `_registry_index` 1 + P1 자산 6 + manifest 자신 1 + case_kind 1 · 교집합 149 sha256 불일치 0 · manifest 426 = `runtime_artifact_count` 426.
|
||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
# Stage 1 Part 1·2·3 자산 배포 — Default_Agent 변화 기록 (2026-08-20 자산 정리 회차)
|
||||||
|
|
||||||
|
- 이 문서는 `problems_identified_in_detecting_assets_location_v.2.md` §2-B 작업의 실행 결과로 **배포 원본 `extension_research/Default_Agent/` 에 발생한 변화만**을 기록한다.
|
||||||
|
- 변화 이전의 전체 배포 위치 총람은 `stage_1_2_3_assets_distribution_location_old.md`(2026-08-20 조사판)에 보존돼 있다 — 아래 두 변화를 제외한 모든 내용은 그 문서가 그대로 유효하다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. `runtime_manifest.json` — P1 자산 6종 등재 (426 → 432항)
|
||||||
|
|
||||||
|
v.2 §2-B "P1 자산 6종 manifest 등재" 의 실행이다. 해시 앵커가 없던 Part 1 소비 자산 6종의 sha256 행을 배포 원본 매니페스트에 **직접 추가**했다(이 회차 관례 — 빌더 등록은 조립본 동기화 회차의 이월 묶음). `runtime_artifact_count` 를 426 → **432** 로 동반 갱신했고(P2·P3 게이트의 count 등식·중복 경성 검사 대응), indent=2 왕복 직렬화를 보존했다.
|
||||||
|
|
||||||
|
| 등재 경로 (`Default_Agent/` 기준) | 크기 | sha256 (앞 16) |
|
||||||
|
|---|---|---|
|
||||||
|
| `platform/contracts/determinism_scope_contract.json` | 1,473 B | `8734102d9e2e9b69…` |
|
||||||
|
| `platform/reference_catalogs/calculation_ids.json` | 1,139 B | `fb14965b8315e01d…` |
|
||||||
|
| `platform/reference_catalogs/domain_ids.json` | 270 B | `4740d98e6a31bd0e…` |
|
||||||
|
| `platform/schemas/client_goal_domain_profiles.schema.json` | 13,082 B | `ae2bfe0d754a09cb…` |
|
||||||
|
| `routing/activation_cue_digest.md` | 35,110 B | `7e98885a50e1880b…` |
|
||||||
|
| `routing/evidence_component_union.md` | 17,593 B | `ecd6e1877f476139…` |
|
||||||
|
|
||||||
|
갱신 후 매니페스트: **67,474 B · 432항 · sha256 `cebed7ff4bbbe9b4…`**. 등재는 **복원 기준** 확보다 — 무결성 강제(게이트)까지는 P1 YAML 수정이 필요하며 그것은 별도 설계 판단으로 남는다(v.2 §2-B 명문).
|
||||||
|
|
||||||
|
## 2. `validation_assets/routing/case_kind_domain_matrix.v2.json` — 배포 원본에서 제거
|
||||||
|
|
||||||
|
v.2 §2-B 선택 항목의 실행이다. 런타임 읽기 금지가 명문(P1 프롬프트 2곳)인 오프라인 회귀 전용 자산(72,969 B)이 배포 트리에 있던 것을 제거해 트리 정의("실행이 읽는 자산 전부이자 그것만")에 정합시켰다. 제거 전 **조립본 원본(`선행구축/Default_Agent_Stage_1/validation_assets/routing/`)과 바이트 동일임을 확인**했다 — 정본은 조립본에 그대로 있다. 빈 폴더(`validation_assets/routing` · `validation_assets`)도 정리했다.
|
||||||
|
|
||||||
|
## 3. 변화 후 배포 원본 요약
|
||||||
|
|
||||||
|
| 축 | 변화 전 | 변화 후 |
|
||||||
|
|---|---|---|
|
||||||
|
| 트리 파일 수(.DS_Store 제외) | 210 | **209** (−1: matrix 제거. 등재는 행 추가라 파일 수 무변) |
|
||||||
|
| `runtime_manifest.json` | 426항 | **432항** (+6) |
|
||||||
|
| 매니페스트 등재-실물 교집합 | 149 · 불일치 0 | **155 · 불일치 0** (신규 6종 포함 전수 재검) |
|
||||||
|
| 실물-미등재 | 61 | **54** (P1 자산 6종 등재 + matrix 제거로 −7) |
|
||||||
|
| 등재-실물없음(상위 장부 몫 — 설계) | 277 | 277 (무변 — v.2 §2-C: 복사 금지 확정) |
|
||||||
|
|
||||||
|
같은 회차의 YAML 측 작업(P2 R0 사문 상수 2줄 삭제 · legacy_paths 주석 한정)은 이 문서의 범위 밖이며 `stage_1_part_1_and_2_updated_yaml_analysis.md` 머리말과 v.2 §2-A 에 기록돼 있다.
|
||||||
+169
@@ -0,0 +1,169 @@
|
|||||||
|
# Stage 1 Part 1·2·3 자산 배포 위치 총람
|
||||||
|
|
||||||
|
- 근거: `stage_1_part_1_v.8.yml`(6,668행) · `stage_1_part_2_v.8.yml`(3,315행) · `stage_1_part_3_v.8.yml`(1,038행) 전량 판독 + 배포 트리 실측 (2026-08-20)
|
||||||
|
- 크기: 배포 원본 트리(`v.7/extension_research/Default_Agent/`)에서 실측한 바이트 수. 실행 중 생성 산출물은 사건마다 달라져 "실행 생성"으로 표기.
|
||||||
|
- 표기: P1 = Part 1(사건개요파악·기초작업), P2 = Part 2(BO·시그널 생성), P3 = Part 3(법률효과구조 생성)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 0. 배포 루트 3계층 (세 YAML 공통 규약)
|
||||||
|
|
||||||
|
| 계층 | 위치 | 성격 |
|
||||||
|
|---|---|---|
|
||||||
|
| ① 정적 자산 루트 (`ASSET_ROOT`) | localdocs 논리 접두 **`Default_Agent/`** ← 배포 원본 **`v.7/extension_research/Default_Agent/`** 트리(210파일, .DS_Store 제외)를 통째로 배포 | P2·P3 remedy 명문: "배포 원본 extension_research/Default_Agent 트리를 서버 Default_Agent/에 통째로 배포하고 runtime_manifest.json의 등재·sha256과 대조. **부분 복사 불허**" |
|
||||||
|
| ② 사건 워크스페이스 루트 | localdocs 문서 루트 (clientInfo에 `{{__user_hash__}}`/`{{__workspace_hash__}}` 필수 — 빠지면 루트 경로를 봄) | 접두 없는 상대경로 전부: `client_meeting.md`, `BO.json`, `routing/`, `quality_gates/`, `signals/`, `runtime/`, `fanout/`, `stage1_tmp/`, `validation_assets/`, `evidence_*` … |
|
||||||
|
| ③ 실행 샌드박스 | code-executor 컨테이너 `EXECUTION_ROOT=/tmp/s1` (R0만 `/tmp/s1_r0`) — 모듈 반입처 `_rt/`, S0 signal 패키지 `_sig/`·`_signal_out/` | 임시 스테이징. 배포 대상 아님. 실행 인자 계약 `--asset-root/--execution-root/--logical-root` (D-5 §2.4 0-c-2) |
|
||||||
|
|
||||||
|
**모듈 미러 규약**: localdocs가 `.py`를 서빙하지 않으므로 모든 런타임 `.py`는 **같은 디렉터리에 바이트 동일 `.txt` 미러**로 배포된다(유일 예외 = 빌더 `build_default_agent_stage1.py`). 반입 시 `Default_Agent/runtime_manifest.json`의 sha256과 대조하고 불일치면 실행 금지. 아래 표의 `.txt` 미러는 전부 `.py` 정본이 같은 디렉터리에 병존한다(크기 동일).
|
||||||
|
|
||||||
|
**runtime_manifest.json**: `stage1_runtime_manifest.v1`, 426건 등재. computations/ 등 Stage 1 Part 1~3 밖 자산도 등재되어 있으며 그 물리 실체는 `extension_research/선행구축/Default_Agent_Stage_1/`(1,322파일) 및 `ver_8_yaml_candidates/Default_Agent_Stage_1/`(560파일, 빌드·검증 산출 트리)에 있다. P1~P3 게이트는 각 Part가 선언한 필수 자산 목록에 대해서만 등재·sha256·가독을 검사한다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. 공통자산 — 2개 Part 이상이 사용하는 사전배포 정적 자산 (`Default_Agent/`)
|
||||||
|
|
||||||
|
| 배포 위치 (`Default_Agent/` 이하) | 형태 | 크기(B) | 쓰는 task | 비고 (역할) |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| `runtime_manifest.json` | json | 66,526 | P1 D0 · P2 A0/R0/F0/S0 · P3 L0/L2 | 해시 장부(`stage1_runtime_manifest.v1`, entries[].path+sha256). 모든 모듈 반입·배포 게이트의 단일 근거. entries[].path는 `Default_Agent/` 접두를 뗀 상대경로 |
|
||||||
|
| `domains/_registry_index.json` | json | 18,921 | P1 T0-02/T0-03/D0/T9 · P2 A0 · P3 L0/L2 | 도메인 registry 색인 정본(registry_version, entries[].domain_id/config_path/config_sha256). 원문 read_raw sha256이 스크리닝·활성 매니페스트·핸드오프에 봉인됨. **매니페스트 미등재 — SG-01 봉인(activation manifest의 registry_index_sha256)이 교체를 잡음**. P2 R0에는 상수로만 선언(미사용) |
|
||||||
|
| `domains/{domain_id}/domain_config.json` | json ×26 | 2,468~17,324 (총 274,372) | P1 T0-03(후보만)/D0(전 26) · P2 A0 · P3 L0/L2(expected_runnable만) | 도메인별 config: 요건 슬롯·상대사실·증거 구성요소·항변·계산 바인딩·검토코드·structure_types 선언. registry index의 config_path만 따라 열람, config_sha256 사슬 대조. **LLM task(P1 T0-01·T1)는 직접 읽기 금지** |
|
||||||
|
| `stage1_runtime/runtime_common.txt` | txt(py 미러) | 4,496 | P1 D0 · P2 A0/R0 · P3 L0/L2 | 런타임 공용 모듈. `/tmp/s1/_rt/*.py`로 실체화 후 sys.path 삽입 |
|
||||||
|
| `stage1_runtime/schema_subset_validator.txt` | txt(py 미러) | 7,442 | P1 D0 · P2 A0/R0 · P3 L0/L2 | 닫힌 스키마 부분집합 검증기 — 산출물 스키마 검증의 공용 엔진 |
|
||||||
|
| `stage1_runtime/registry_loader.txt` | txt(py 미러) | 6,404 | P1 D0 · P2 A0/R0 · P3 L0 | registry 적재기(load_registry). P3 L0은 compiler 의존 모듈로만 스테이징 |
|
||||||
|
| `routing/evidence_component_union.md` | md | 17,593 | P1 T3(preflight) · P2 worker(어휘 참조) | 증거 구성요소 어휘 합집합(component_id + accepted_source_kinds + owner). `registry_component_ids`의 유일 허용 어휘 — 목록 밖 이름 생성 금지 |
|
||||||
|
| `routing/extension_payload_key_declarations.v1.json` | json | 23,071 | P2 A0(게이트)/F0 · P3 L0 | BOType 합집합·확장 payload declared_key_union·legacy_alias_targets 선언표(`stage1_extension_payload_key_declarations.v1`). 생성기 `routing/_build_extension_payload_declarations.py`(배포 시점 접이, 런타임 미실행) |
|
||||||
|
| `signals/signal_registry.v2.json` | json | 10,907 | P2 A0(게이트)/S0 · P3 L0(게이트만) | signal registry v2 — S0 스키마 $ref 폐포 walk의 출발점. P3에서는 배포 완전성 검사만 받고 파싱되지 않음 |
|
||||||
|
| `contracts/signals/s5_execution_contract.v2.json` | json | 1,451 | P2 A0(게이트)/S0 · P3 L0(게이트만) | S5 실행 계약 — S0가 `/tmp/s1/_sig/contracts/`에 배치(모듈의 parents[1]/contracts 산술 재현). P3에서는 게이트 전용 |
|
||||||
|
| `signals/adapters/sg01_activation_adapter.txt` | txt(py 미러) | 3,738 | P1 D0 · P2 S0 | SG-01 활성 어댑터 — D0 산출 매니페스트 자기검증(adapt_and_validate). 미러 위치는 `stage1_runtime/`이 아니라 `signals/adapters/`(YAML 헤더 명시) |
|
||||||
|
| `signals/schemas/domain_activation_manifest.schema.json` | json | 3,535 | P1 D0(stage, 실패 시 경고) · P2 S0(registry가 결정하는 $ref 폐포에 포함 — 배포된 signal_registry.v2.json 등재 기준) | 활성 매니페스트 스키마 — D0 모듈은 직접 읽지 않음(어댑터가 검증 담당). §3의 폐포 17종 집계(28,476B)에 이 파일이 포함되므로 바이트 합산 시 중복 주의 |
|
||||||
|
|
||||||
|
## 2. Part 1 전용 정적 자산
|
||||||
|
|
||||||
|
| 배포 위치 (`Default_Agent/` 이하) | 형태 | 크기(B) | 쓰는 task | 비고 (역할) |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| `routing/activation_cue_digest.md` | md | 35,110 | T0-01(preflight)/T0-02 | 라우팅 단어 사전 — 26개 도메인 활성 단서(P/N/C/OVR)+GLOBAL_DEFAULTS. "사실 원천이 아니다". 머리말에 registry_version·registry_index sha256 → 스냅숏 낡음 감지 |
|
||||||
|
| `platform/schemas/client_goal_domain_profiles.schema.json` | json | 13,082 | T1(preflight) | client_goal의 domain_profiles 칸 형태를 정하는 닫힌 스키마 — "형식만 정하고 내용은 만들지 않음" |
|
||||||
|
| `platform/reference_catalogs/domain_ids.json` | json | 270 | T0-03 | 도메인 ID 카탈로그 — 후보 멤버십 검사 |
|
||||||
|
| `platform/reference_catalogs/calculation_ids.json` | json | 1,139 | T0-03 | 계산 ID 카탈로그(entries[].calculation_id/status) — calc 바인딩 존재·ready 검사 |
|
||||||
|
| `stage1_runtime/activation_gate.txt` | txt(py 미러) | 66,715 | D0 | **도메인 활성 판정 모듈 본체** — "판정은 이 안에서만 일어난다. 결정 필드는 execution_eligible 하나뿐". main(--asset-root/--execution-root/--logical-root) 호출 |
|
||||||
|
| `platform/contracts/determinism_scope_contract.json` | json | 1,473 | (헤더 선행조건만) | 결정론 범위 계약 — P1 정적 자산 선행 조건 5종의 하나. task 본문 직접 등장 없음(모듈 내부 소비 추정) |
|
||||||
|
| `validation_assets/routing/case_kind_domain_matrix.v2.json` | json | 72,969 | **읽기 금지** (T0-01·T1에 금지 명문) | 사건유형 이름을 담은 **오프라인 회귀 전용** 자산 — 런타임 입력 금지 |
|
||||||
|
|
||||||
|
## 3. Part 2 전용 정적 자산
|
||||||
|
|
||||||
|
| 배포 위치 (`Default_Agent/` 이하) | 형태 | 크기(B) | 쓰는 task | 비고 (역할) |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| `stage1_runtime/registry_validator.txt` | txt(py 미러) | 11,080 | A0 | registry 검증기(validate_registry) — overlay 4개 오류코드만 경성 |
|
||||||
|
| `stage1_runtime/prompt_compiler.txt` | txt(py 미러) | 15,164 | A0 | 프롬프트 조립기 — FragmentSpec/collect_domain_fragments/compile_fragments, rank 10→50 합성, 상한 96,000B/24,000자 |
|
||||||
|
| `stage1_runtime/domain_slice_compiler.txt` | txt(py 미러) | 32,300 | A0 | slice 컴파일러(compile_domain_slices) — 낡으면 PART2_COMPILER_STALE |
|
||||||
|
| `stage1_runtime/domain_fanout_planner.txt` | txt(py 미러) | 12,282 | A0 | fan-out 계획기(build_fanout_plan) |
|
||||||
|
| `stage1_runtime/stage_a_context_builder.txt` | txt(py 미러) | 25,885 | A0 | stage_a_context/source_universe_manifest 빌더(v3 세 builder 이식) |
|
||||||
|
| `stage1_runtime/worker_output_validator.txt` | txt(py 미러) | 21,302 | A0(게이트)/R0 | worker seed 산출 검증기(validate_worker_output; schema·slice 주입). 반입 실패는 경고 강등 |
|
||||||
|
| `stage1_runtime/prompt_composition_policy.json` | json | 1,715 | A0 | 프롬프트 조립 정책(rank 순서·상한) |
|
||||||
|
| `stage1_runtime/bo_surface_projection_policy.v1.json` | json | 6,355 | A0(게이트)/R0/F0 | BO 투영 정책(`stage1_bo_surface_projection_policy.v1`) — f0_normalization·review_item_projection 규칙 정본 |
|
||||||
|
| `platform/schemas/domain_slice.schema.v2.json` | json | 17,725 | A0 | slice 스키마 — F-3 능력검사(stage_b_domain_slice.domain_declarations·compiled_prompt.hash_kind 필수) |
|
||||||
|
| `platform/schemas/domain_fanout_plan.schema.json` | json | 11,148 | A0 | fan-out 계획 스키마(build_fanout_plan에 주입) |
|
||||||
|
| `platform/schemas/domain_seed_output.schema.v3.json` | json | 21,965 | A0(게이트)/worker(참조)/R0 | worker seed 산출 스키마 v3(additionalProperties:false 봉인) |
|
||||||
|
| `domains/_common/common_worker_contract.md` | md | 3,766 | A0 | rank 10 공통 worker 계약 조각 |
|
||||||
|
| `domains/{domain_id}/seed_prompt_overlay.md` | md ×25 | 1,026~5,095 (총 83,177) | A0 | 도메인별 프롬프트 overlay 조각 — config의 `prompt_overlay_ref`가 선언한 경로 추적(실패 시 경고). EC-00은 대신 `common_fragment.md`(1,850B) 보유 |
|
||||||
|
| `signals/compiler/{common, projections, schema_validator, signal_compiler, signal_gate, transaction_writer, writer_boundary}.txt` | txt(py 미러) ×7 | 1,089~11,095 (총 37,276) | S0 | signal 컴파일러 모듈 — `/tmp/s1/_sig/pkg/signals/compiler/`로 실체화. **파일 기록 권한은 transaction_writer 하나**(canonical_writer_uniqueness) |
|
||||||
|
| `signals/adapters/{s3_domain_seed_adapter, s3_envelope_migration_adapter, s4_calculation_adapter}.txt` | txt(py 미러) ×3 | 1,071~7,223 (총 9,578) | S0 | 어댑터 모듈(sg01은 공통표 참조 — S0 어댑터 4종 반입에 포함) |
|
||||||
|
| `signals/emitters/{emitter_runtime, emit_sg02..emit_sg13}.txt` | txt(py 미러) ×13 | 287~7,687 (총 11,131) | S0 | 생성기(emitter) — SG-02~SG-13 12종 + 공용 런타임 |
|
||||||
|
| `signals/schemas/*.json` (signal_manifest·domain_signal_envelope.v2·SG별 12종 등 15종) + `signals/_common/{signal_item, evidence_slot_status}.schema.json` 2종 | json ×17 | 1,133~3,535 (총 28,476) | S0 | registry 선언에서 출발한 **상대 $ref 폐포 17종** — 목록 상수화 금지(F-4c), registry가 동적으로 결정 |
|
||||||
|
|
||||||
|
## 4. Part 3 전용 정적 자산
|
||||||
|
|
||||||
|
| 배포 위치 (`Default_Agent/` 이하) | 형태 | 크기(B) | 쓰는 task | 비고 (역할) |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| `stage1_runtime/structure_index_compiler.txt` | txt(py 미러) | 27,309 | L0 | **구조 seed 컴파일 모듈**(compile_structure_seeds) — Θ 조립·구조 seed·signal 조인. "판정 규칙을 YAML에 쓰지 않는다" |
|
||||||
|
| `stage1_runtime/structure_index_policy.v1.json` | json | 7,032 | L0/L2 | 구조 색인 정책(`stage1_structure_index_policy.v1`) — 불일치 시 PART3_POLICY_INVALID |
|
||||||
|
| `platform/schemas/structure_seed_bundle.schema.json` | json | 9,128 | L0 | seed bundle 닫힌 스키마 — theta·admission_policy 인지 능력검사(PART3_STRUCTURE_SCHEMA_STALE) |
|
||||||
|
| `platform/schemas/legal_effect_structures.schema.json` | json | 6,809 | L0(게이트만)/L2 | 최종 색인 닫힌 스키마 — by_module·by_bo_id 인지 능력검사(PART3_INDEX_SCHEMA_STALE) |
|
||||||
|
| `domains/{domain_id}/structure_types.json` | json ×25 | 390~1,360 (총 21,006) | L0 | 도메인 사이드카 1 — 구조 유형 정의. structure_types 선언 있는 도메인만 반입, 부재·미등재는 경성 실패 |
|
||||||
|
| `domains/{domain_id}/module_role_projection.json` | json ×25 | 382~1,196 (총 18,248) | L0 | 도메인 사이드카 2 — 모듈 역할 사영. 위와 동일 규율 |
|
||||||
|
|
||||||
|
## 5. 사건 입력 자산 (실행 전 사건 워크스페이스에 존재해야 함)
|
||||||
|
|
||||||
|
| 배포 위치 (워크스페이스 루트 이하) | 형태 | 크기 | 쓰는 task | 비고 (역할) |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| `client_meeting.md` | md | 사건별 | P1 T0-01/T0-02/T1/T3/T4 · P2 A0 | 상담록 — "유일한 사실 원천". source unit(MTG.*) 채번·재산출 대조, meeting_clause_ids의 원천 |
|
||||||
|
| `evidence_all.json` | json | 사건별 | P1 T2 | 증거 문서 전체 배열 — 배열 순서 = ordinal 부여 기준(array_order, 법적 재정렬 금지) |
|
||||||
|
|
||||||
|
## 6. 실행 중 생성 산출물 (전부 사건 워크스페이스 루트 이하; 크기 = 실행 생성)
|
||||||
|
|
||||||
|
### 6.1 Part 1 산출 (생산 → 소비)
|
||||||
|
|
||||||
|
| 위치 | 형태 | 생산 → 소비 | 비고 (스키마/역할) |
|
||||||
|
|---|---|---|---|
|
||||||
|
| `routing/domain_screening_draft.json` | json | T0-01 → T0-02 | 스크리닝 개방형 초안(판단 4종). `stage1_domain_screening_draft.v1` |
|
||||||
|
| `routing/domain_screening.json` | json | T0-02 → T0-03/T1/D0/T9 · **P2 A0** | 봉인된 닫힌 스키마 스크리닝(`stage1_domain_screening.v1`, 비판단 6종 부착). T9·P2가 원문 sha256 봉인 대조 |
|
||||||
|
| `routing/candidate_profile_vocabulary.md` | md | T0-03 → T1 · **P2 A0**(부재 허용) | 후보 도메인 낱말 목록(E\|O\|V\|D\|R 줄, 예산 28,000B) — "registry 원문이 정본, 이 파일은 파생본" |
|
||||||
|
| `client_goal.json` | json | T1 → (Part 1 내 소비 없음, 후속 스테이지용) | 고객 소송목적·당사자·사건군 구조화 + domain_profiles. D0 입력 6종에 불포함 |
|
||||||
|
| `evidence_shard_plan.json` | json | T2 → T5/T6 | fan-out/배리어/stale 정책 플랜(`evidence_shard_plan.v1`). stdout의 dynamic_fanout을 오케스트레이터가 소비 |
|
||||||
|
| `evidence_shards/E-{nnn}.json` | json ×N | T2 → T3/T4 (T5 발췌) | 문서별 단일 evidence shard — mapper가 풀 대신 자기 shard만 읽도록 분리 |
|
||||||
|
| `evidence_indexed_parts/E-{nnn}.json` | json ×N | T3 → T4/T5 | B1 mapper part(`evidence_indexed_part.v4`) |
|
||||||
|
| `evidence_event_candidate_parts/E-{nnn}.json` | json ×N | T4 → T6 | B2 mapper part(`evidence_event_candidate_part.v4`) |
|
||||||
|
| `evidence_indexed.json` | json | T5 → D0/T9 · **P2 A0** | 최종 증거 authority catalog(`evidence_indexed.v3`) — 작성은 quality gate 단독 권한 |
|
||||||
|
| `evidence_event_candidates.json` | json | T6 → D0/T9 · **P2 A0** | 최종 event/state candidate(`evidence_event_candidates.v1`) |
|
||||||
|
| `stage1_tmp/quality_gate/finalized_evidence_id_manifest.json` | json | T5 → T6 | 확정 evidence id 집합 + dropped_aliases(`finalized_evidence_id_manifest.v1`) |
|
||||||
|
| `stage1_tmp/quality_gate/B1_precheck.json` | json | T5 → T6/T8 | B1 결정적 검사·suspects(`B1_precheck.v1`) |
|
||||||
|
| `stage1_tmp/quality_gate/B2_precheck.json` | json | T6 → T8 | B2 결정적 검사·suspects(`B2_precheck.v1`) |
|
||||||
|
| `stage1_tmp/quality_gate/B12_exception_pack.json` | json | T6 → T7(preflight)/T8 | GB 판정용 compact exception pack(`B12_exception_pack.v1`) — T7의 유일 입력 |
|
||||||
|
| `stage1_tmp/quality_gate/B12_adjudication_decisions.json` | json | T7 → T8 | exception별 LLM 판정(`B12_adjudication_decisions.v1`) |
|
||||||
|
| `quality_gates/B1_evidence_indexed_gate.json` | json | T8 → D0/T9 | B1 최종 audit(`B1_quality_gate.v3`) |
|
||||||
|
| `quality_gates/B2_event_candidates_gate.json` | json | T8 → D0/T9 | B2 최종 audit(`B2_quality_gate.v3`) |
|
||||||
|
| `routing/domain_activation_manifest.json` | json | D0 → T9 · **P2 A0/S0 · P3 L0/L2** | 도메인 활성 확정 매니페스트 — 모듈 산출 바이트 그대로 업로드(재직렬화 금지). execution_eligible·expected_runnable_domain_ids·registry_index_sha256(SG-01 봉인) |
|
||||||
|
| `quality_gates/stage1_part1_soft_gate_handoff.json` | json | T9 → OUT · **P2 A0** | soft gate handoff sidecar(`stage1_part1_soft_gate_handoff.v1`) — digest_guard 7종·활성봉인 교차검증·review 큐 |
|
||||||
|
|
||||||
|
### 6.2 Part 2 산출
|
||||||
|
|
||||||
|
| 위치 | 형태 | 생산 → 소비 | 비고 (스키마/역할) |
|
||||||
|
|---|---|---|---|
|
||||||
|
| `runtime/compiled_prompts/{domain_id}.md` | md ×도메인 | A0 → worker(preflight) | 도메인별 조립 프롬프트(rank 10→50 합성) — 재조립 금지. 워크스페이스+로컬 이중 기록 |
|
||||||
|
| `runtime/domain_slices/{domain_id}.json` | json ×도메인 | A0 → worker/R0/S0 · **P3 L0(옵션)** | 도메인 slice(`task_c_bo_stage_b_domain_slice.v2`) — source_universe·allowed_legal_effect_bo_types의 원천 |
|
||||||
|
| `runtime/domain_seed_outputs/{domain_id}.json` | json ×도메인 | worker → R0/S0 | worker seed(`task_c_bo_stage_b_domain_bo_seed.v3`) — **기록자는 워커 유일**(R0 되쓰기 금지) |
|
||||||
|
| `fanout/domain_fanout_plan.json` | json | A0 → R0/S0 (+오케스트레이터 {{item}} 주입원) | fan-out 계획(`domain_fanout_plan.v1`) — task_instances[]가 worker 인스턴스 생성, barrier 기대집합=expected_runnable |
|
||||||
|
| `stage1_tmp/task_c_bo/stage_a_context.json` | json | A0 → R0/F0 | stage_a_context(`task_c_bo_stage_a_context.v1`) — P-1 개정으로 구 경로 유지 |
|
||||||
|
| `stage1_tmp/task_c_bo/source_universe_manifest.json` | json | A0 → R0/S0 | 원천 우주 매니페스트(evidence_index_set·event_candidate_ids·meeting_clause_ids) |
|
||||||
|
| `validation_assets/routing/stage_receipt.json` | json | A0 | 스테이지 영수증(`stage1_stage_receipt.v2`) — schema_injection·deployment_gate 실측 기록 |
|
||||||
|
| `stage1_tmp/task_c_bo/postb_seed_ledger.json` | json | R0 → F0 | 원장(`task_c_bo_postb_seed_ledger.v1`): 투영 ledger_candidates + deterministic_decisions |
|
||||||
|
| `quality_gates/stage1_part2_exception_pack.json` | json | R0 → R1(preflight, 유일 입력)/F0 | 예외 pack(`stage1_part2_exception_pack.v1`) — budget 8후보/2,000자 |
|
||||||
|
| `quality_gates/stage1_part2_review_handoff.json` | json | R0 → F0(읽고 되씀) | 검토 핸드오프(`stage1_part2_review_handoff.v1`): PENDING_FINALIZE → FINALIZED |
|
||||||
|
| `stage1_tmp/task_c_bo/postb_adjudication_decisions.json` | json | R1 → F0 | R1 판정(`task_c_bo_postb_exception_adjudication.v1`) — 예외 없어도 no-exception 객체 필수 |
|
||||||
|
| `BO.json` | json | F0(기록+재읽기) → S0 · **P3 L0/L2** | **최종 BO 배열**(bh1..bhN) — 워크스페이스 루트. P3 보존 등식의 BO 계수 원본. 무봉인 입력(P3 receipt에 관찰 기록) |
|
||||||
|
| `stage1_tmp/task_c_bo/postb_compiled_bundle_compact.json` | json | F0 | compact bundle(`task_c_bo_postb_compiled_bundle_compact.v1`): ref→bo_id 표·정규화 노트 |
|
||||||
|
| `signals/signal_manifest.json` | json | S0(기록+재읽기 해시 대조) → **P3 L0**(진입 봉인; L2는 재독 금지) | signal 거래 매니페스트 — transaction_id `S5TX-[a-f0-9]{20}`, files[].file_sha256, downstream_read_sets. files[].path에는 `signals/` 접두 없음(붙여서 대조) |
|
||||||
|
| `signals/**/*.json` (거래 산출 전량) | json | S0 → **P3 L0** | 정본 signal 번들 — `/tmp/s1/_signal_out`에 쓰고 `signals/` 접두로 바이트 그대로 반출. 파일명이 코드에 박힌 것은 SG-05/08/13 셋뿐, 나머지는 emitter 12종+registry가 결정. P3 소비 확인분: `legal_effect_routes.json`(SG-13, L0 조인 주근거+L2 route 보존 등식), `legal_relation_lifecycle_signals.json`(SG-05), `calculation_requirements.json`(SG-11), `procedural_posture_relief_signals.json`(SG-02, 빈 read set), `asset_right_state_signals.json`(SG-07, 빈 read set), `domain_signals/{domain_id}.json`(옵션) |
|
||||||
|
| `signals/compatibility_views/{actio_case, case_liability, legal_effect}_signals.json` | json ×3 | S0 | 호환 뷰 — actio_case(사영원 없음), case_liability(SG-05·08 사영), legal_effect(SG-13 사영) |
|
||||||
|
| `actio_case_signals.json` · `case_liability_signals.json` · `legal_effect_signals.json` (워크스페이스 루트) | json ×3 | S0 | 구 이름 별칭 — Part 3·4 최대 호환면, compatibility_views와 바이트 동일 |
|
||||||
|
|
||||||
|
### 6.3 Part 3 산출
|
||||||
|
|
||||||
|
| 위치 | 형태 | 생산 → 소비 | 비고 (스키마/역할) |
|
||||||
|
|---|---|---|---|
|
||||||
|
| `stage1_tmp/task_le/structure_seed_bundle.json` | json | L0 → L2 | seed bundle(`stage1_structure_seed_bundle.v1`): theta·structure_records·counts + signal_manifest_transaction_id 승계 — L0→L2 유일한 중간 계약 |
|
||||||
|
| `quality_gates/stage1_part3_review_handoff.json` | json | L0 → L2(읽고 되씀) | 검토 핸드오프(`stage1_part3_review_handoff.v1`): OPEN → FINALIZED. review_items 근거 없는 감축 금지 |
|
||||||
|
| `validation_assets/routing/part3_receipt.json` | json | L0 | P3-L0 실측 영수증(`stage1_part3_receipt.v1`) — "상수 PASS는 증거가 아니다". L2는 receipt 미작성 |
|
||||||
|
| `legal_effect_structures.json` | json | L2(기록+재읽기 sha256 대조) → OUT | **Stage 1 최종 산출** — 법률효과 구조 색인(`stage1_legal_effect_structures.v1`): theta·structure_records·structure_index(by_domain_id/by_module/by_bo_id)·quality_gate(보존등식 3종). 워크스페이스 루트, canonical JSON |
|
||||||
|
|
||||||
|
## 7. 참조 전용·빌드타임 자산 (런타임 파일 접근 없음)
|
||||||
|
|
||||||
|
| 자산 | 물리 위치 | 형태/크기(B) | 인용처 | 비고 |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| `SKILL.md` | 경로 미명시(유일하게 접두 없는 인용) | md | P1·P2·P3 code-executor 보일러플레이트 주석("5장/5.2장", "§3.3 stdout 규약") | localdocs·code-executor 사용 규약 문서 |
|
||||||
|
| `platform/schemas/domain_screening.schema.json` | 선행구축 트리(예: `선행구축/Default_Agent_Stage_1/platform/schemas/`) — **extension_research/Default_Agent에는 없음** | json | P1 T0-02 주석 | screening_policy/contract_guards const의 정본 — 값은 코드에 하드코딩, 런타임에 읽지 않음 |
|
||||||
|
| `tools/build_default_agent_stage1.py` | `ver_8_yaml_candidates/Default_Agent_Stage_1/tools/` | py / 102,559 | P1 헤더(미러 규칙의 유일 예외) | Default_Agent 빌더 |
|
||||||
|
| `routing/_build_extension_payload_declarations.py` | `ver_8_yaml_candidates/Default_Agent_Stage_1/routing/` | py / 8,842 | P2 F0 주석 | 확장 payload 선언표(공통표 #8)의 생성기 — 배포 시점 접이 |
|
||||||
|
| `validation_assets/routing/_check_schema_keyword_support.py` | `ver_8_yaml_candidates/Default_Agent_Stage_1/validation_assets/routing/` | py / 8,233 | P2 A0 receipt 필드 | 키워드 지원 점검 스크립트 — receipt에 이름만 인용, 실행하지 않음 |
|
||||||
|
| 전략·명세 문서(`stage_1_update_strategy.md`, `P1-T2_to_T9_update_strategy.md`, `Part_1/2_Improvement_Strategy_Claude_v1.md`, `stage_1_part_2_optimal_update_strategy_v.2.md`, `stage_1_part_3_개정_신전략서.md` 등) 및 조각 출처 YAML(`Task_A_client_goal_v4.yml` 등) | `v.7/` 및 `ver_8_yaml_candidates/` 일대 | md/yml | 각 YAML 헤더·코드 주석 | 정본 근거 설계 문서 — 런타임 미접근 |
|
||||||
|
|
||||||
|
## 8. 특기사항 (판독 중 확인된 사실)
|
||||||
|
|
||||||
|
1. **게이트 전용 자산**: `signal_registry.v2.json`·`s5_execution_contract.v2.json`은 P3에서 등재·해시·가독 검사만 받고 어느 태스크도 파싱하지 않음. P2 A0의 PART2_REQUIRED_ASSETS는 10종이며, 그중 A0 자신이 소비하는 4종(slice 스키마·fanout 스키마·공통 계약·조립 정책)을 제외한 후속 task용 6종(# R0/S0/F0 주석 표기분)은 A0에서 존재·해시 게이트만 수행(배포 요구 선언).
|
||||||
|
2. **R0의 죽은 상수 2개**: `routing/domain_activation_manifest.json`·`Default_Agent/domains/_registry_index.json`은 P2 R0에 상수로만 선언되고 main에서 미사용(잔재).
|
||||||
|
3. **P2 머리말·본문 모순**: "구 경로 `stage1_tmp/task_c_bo/**`는 쓰지 않는다(legacy_paths_forbidden)"고 하나 실제로는 stage_a_context·source_universe(P-1 복귀) + postb_* 3종이 그 경로를 계속 사용. 금지는 사실상 worker slice/seed 구 경로에만 해당.
|
||||||
|
4. **`domains/_registry_index.json`은 runtime_manifest 미등재** — 교체 탐지는 SG-01 봉인(activation manifest의 registry_index_sha256) 하나가 담당(P3 주석 명시).
|
||||||
|
5. **L2는 `signals/signal_manifest.json`을 재독하지 않음** — bundle의 signal_manifest_transaction_id를 승계(§4.3 입력 계약 밖).
|
||||||
|
6. **P3 L1 부재는 의도적** — "판정 부류가 생기면 L0–L2 사이에 끼운다"(task_procedure 주석). P3는 IN→L0→L2→OUT 완전 직렬.
|
||||||
|
7. **worker는 유일한 LLM-파일기록 task**(P2) — seed 파일 기록자는 워커 하나로 못박혀 있고 R0는 되쓰지 않음.
|
||||||
|
8. **P3 YAML 헤더 24행 훼손 의심**("`# 137종 —`" 라벨 잔흔) 및 **code-executor Bearer 토큰 평문 하드코딩**(P2·P3 공통 구조, P3 48행 확인) — 배포 전 정리 필요.
|
||||||
+10
-10
@@ -3,7 +3,7 @@
|
|||||||
- 문서 위치: `YAML_Prompts/1. Stage_1/v.7/extension_research/stage_1_part_1_and_2_updated_yaml_analysis.md`
|
- 문서 위치: `YAML_Prompts/1. Stage_1/v.7/extension_research/stage_1_part_1_and_2_updated_yaml_analysis.md`
|
||||||
- 분석 대상 정본 2종
|
- 분석 대상 정본 2종
|
||||||
- `ver_8_yaml_candidates/stage_1_part_1_v.8.yml` — 467,668 B / 6,667행 / sha256 `195b43edfaf1df1414acc118c17d544c…`
|
- `ver_8_yaml_candidates/stage_1_part_1_v.8.yml` — 467,668 B / 6,667행 / sha256 `195b43edfaf1df1414acc118c17d544c…`
|
||||||
- `ver_8_yaml_candidates/stage_1_part_2_v.8.yml` — **195,938 B / 3,315행 / sha256 `ec4c43027ad85195…`** (2026-08-19 BO 투영 회차 반영본. 직전 판은 193,933 B / 3,307행 / `73644c5620b1bfbc…` — `outdated/stage_1_part_2_v.8.pre_bo_projection.yml` 로 보존)
|
- `ver_8_yaml_candidates/stage_1_part_2_v.8.yml` — **195,963 B / 3,315행 / sha256 `ec407309a5ab43f4…`** (2026-08-20 자산 정리 회차 반영본 — R0 사문 상수 2줄 삭제 · legacy_paths 주석 한정. 값 무변, 예행 산출 바이트 동일. 직전 판 195,938 B / `ec4c43027ad85195…` 는 `outdated/stage_1_part_2_v.8.pre_asset_triage_fix.yml`, 그 전 판은 `outdated/stage_1_part_2_v.8.pre_bo_projection.yml` 로 보존)
|
||||||
- 근거 자료: `v.7/MEMORY.md` · `stage_1_part_1_개정작업_리포트.md` · `ver_8_yaml_candidates/part_1_remaining_update_report.md` · `stage_1_part_2_레지스트리기반개정완료_보고서.md` · `ver_8_yaml_candidates/8월12_to_16일작업압축요약본.md`(316,036 B) · `Default_Agent_Stage_1/handoffs/stage1_part_interface.v1.json`(34 인계면 선언표) · `stage_1_part_2_여전히남은문제해결방안.md`(v2) · `stage_1_part_2_여전히남은문제해결내역.md`
|
- 근거 자료: `v.7/MEMORY.md` · `stage_1_part_1_개정작업_리포트.md` · `ver_8_yaml_candidates/part_1_remaining_update_report.md` · `stage_1_part_2_레지스트리기반개정완료_보고서.md` · `ver_8_yaml_candidates/8월12_to_16일작업압축요약본.md`(316,036 B) · `Default_Agent_Stage_1/handoffs/stage1_part_interface.v1.json`(34 인계면 선언표) · `stage_1_part_2_여전히남은문제해결방안.md`(v2) · `stage_1_part_2_여전히남은문제해결내역.md`
|
||||||
- **Part 2 추가 개정 5회의 작업 내역서** — `stage_1_part_2_추가수정작업.md`(배포 완전성 게이트 F-1~F-7) · `stage_1_part_2_추가수정작업_더.md`(델타 30건 조립본 반영 · R0 라벨 해석) · `stage_1_part_2_추가수정작업_더더.md`(빌더 등록 · 상류 동기화) · `stage_1_part_2_추가수정작업_더더더.md`(스키마 2건 등록 · 예행 seed 보강) · `stage_1_part_2_여전히남은문제해결방안.md`(v2) + `stage_1_part_2_여전히남은문제해결내역.md`(BO 투영 — worker v3 산출이 `BO.json`·검토 handoff 에 닿는 경로 복원)
|
- **Part 2 추가 개정 5회의 작업 내역서** — `stage_1_part_2_추가수정작업.md`(배포 완전성 게이트 F-1~F-7) · `stage_1_part_2_추가수정작업_더.md`(델타 30건 조립본 반영 · R0 라벨 해석) · `stage_1_part_2_추가수정작업_더더.md`(빌더 등록 · 상류 동기화) · `stage_1_part_2_추가수정작업_더더더.md`(스키마 2건 등록 · 예행 seed 보강) · `stage_1_part_2_여전히남은문제해결방안.md`(v2) + `stage_1_part_2_여전히남은문제해결내역.md`(BO 투영 — worker v3 산출이 `BO.json`·검토 handoff 에 닿는 경로 복원)
|
||||||
- 실측 기준: 이 문서의 모든 수치·경로·키는 위 두 YAML 원문과 자산 트리를 **직접 파싱·해시**하여 얻은 것이다. 리포트 본문에서 옮겨 온 값은 §7 근거표에 출처를 적었고, 리포트와 실측이 갈린 곳은 그 자리에 명시했다.
|
- 실측 기준: 이 문서의 모든 수치·경로·키는 위 두 YAML 원문과 자산 트리를 **직접 파싱·해시**하여 얻은 것이다. 리포트 본문에서 옮겨 온 값은 §7 근거표에 출처를 적었고, 리포트와 실측이 갈린 곳은 그 자리에 명시했다.
|
||||||
@@ -256,7 +256,7 @@ YAML이 참조하는 `Default_Agent/…` 자산은 **19개 리터럴**이고,
|
|||||||
| `stage1_runtime/schema_subset_validator.py` + `.txt` | 7,442 B | py + 미러 | D0 | 스키마 부분집합 검증기 |
|
| `stage1_runtime/schema_subset_validator.py` + `.txt` | 7,442 B | py + 미러 | D0 | 스키마 부분집합 검증기 |
|
||||||
| `stage1_runtime/registry_loader.py` + `.txt` | 6,404 B | py + 미러 | D0 | registry 적재기 |
|
| `stage1_runtime/registry_loader.py` + `.txt` | 6,404 B | py + 미러 | D0 | registry 적재기 |
|
||||||
| `signals/adapters/sg01_activation_adapter.py` + `.txt` | 3,738 B | py + 미러 | D0 | SG-01 어댑터. D0 산출의 자기검증 |
|
| `signals/adapters/sg01_activation_adapter.py` + `.txt` | 3,738 B | py + 미러 | D0 | SG-01 어댑터. D0 산출의 자기검증 |
|
||||||
| `validation_assets/routing/case_kind_domain_matrix.v2.json` | 72,969 B | json | **런타임 입력 금지** | 137 사건유형 이름을 담은 오프라인 회귀 전용. T0-01과 T1 두 프롬프트가 각각 읽기를 명시적으로 금지한다(192행 · 1,687행) |
|
| `validation_assets/routing/case_kind_domain_matrix.v2.json` | 72,969 B (조립본 — 배포 원본 트리에서는 2026-08-20 제거) | json | **런타임 입력 금지** | 137 사건유형 이름을 담은 오프라인 회귀 전용. T0-01과 T1 두 프롬프트가 각각 읽기를 명시적으로 금지한다(192행 · 1,687행) |
|
||||||
|
|
||||||
Part 1 개정이 함께 만든 **검증·회귀 자산**(런타임 입력이 아니다).
|
Part 1 개정이 함께 만든 **검증·회귀 자산**(런타임 입력이 아니다).
|
||||||
|
|
||||||
@@ -335,9 +335,9 @@ Part 1 개정이 함께 만든 **검증·회귀 자산**(런타임 입력이 아
|
|||||||
|
|
||||||
| # | task 명칭 | 실행기 / 설정 | 작업 목적 | 작업 내역 |
|
| # | task 명칭 | 실행기 / 설정 | 작업 목적 | 작업 내역 |
|
||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| P2-A0 | `Task_C_BO_A0_context_and_domain_slice_compiler` | code-executor · timeout 300 · 통합본 60–717행 | Part 1의 봉인된 산출을 받아 **도메인별 작업 재료를 컴파일하고 fan-out을 계획**한다 | 모듈 8종(`runtime_common` · `schema_subset_validator` · `registry_loader` · `registry_validator` · `prompt_compiler` · `domain_slice_compiler` · `domain_fanout_planner` · `stage_a_context_builder`)을 미러로 반입한다. 봉인 3해시를 검증한다. registry 26 config를 적재한다. `prompt_compiler.collect_domain_fragments(extra_specs=…)`로 Part 1의 어휘 사전을 도메인 프롬프트에 붙인다(조립 프롬프트 6,967 B → 24,942 B 실측). 슬라이스에 `domain_declarations` 7갈래를 투영한다. 스크리닝의 `candidates[].requested_calculation_domains`를 파싱해 도메인 `calculation_bindings`와 교집합하고, 교집합 밖은 `CALC_NOT_IN_BINDINGS` 리뷰로 남기며 `router_status`를 `READY_WITH_REVIEW`로 내린다. **도메인 상수를 두지 않는다**. 추가 개정 1회차로 `main()` 첫 문장이 `assert_deployment()`가 되었다 — 필수 자산 10 리터럴과 모듈 미러를 **한 벌로** 검사해(실측 18경로 — 다섯째 회차가 BO 투영 정책 자산을 목록에 더했다) 하나라도 빠지거나 해시가 어긋나면 `PART2_ASSET_DEPLOYMENT_INCOMPLETE`로 세운다. 이어 슬라이스 스키마가 `domain_declarations`와 `compiled_prompt.hash_kind`를 아는지 보고(`PART2_SLICE_SCHEMA_STALE`), 컴파일러 산출에 투영이 실제로 실려 나오는지 본다(`PART2_COMPILER_STALE` — 옛 판본은 알 수 없는 인자로 `TypeError`가 먼저 나므로 같은 코드에 `detail: signature_mismatch`를 붙인다). 프롬프트 오버레이 실패 4코드를 승격 대상으로 강제한다 |
|
| P2-A0 | `Task_C_BO_A0_context_and_domain_slice_compiler` | code-executor · timeout 300 · 통합본 62–719행 | Part 1의 봉인된 산출을 받아 **도메인별 작업 재료를 컴파일하고 fan-out을 계획**한다 | 모듈 8종(`runtime_common` · `schema_subset_validator` · `registry_loader` · `registry_validator` · `prompt_compiler` · `domain_slice_compiler` · `domain_fanout_planner` · `stage_a_context_builder`)을 미러로 반입한다. 봉인 3해시를 검증한다. registry 26 config를 적재한다. `prompt_compiler.collect_domain_fragments(extra_specs=…)`로 Part 1의 어휘 사전을 도메인 프롬프트에 붙인다(조립 프롬프트 6,967 B → 24,942 B 실측). 슬라이스에 `domain_declarations` 7갈래를 투영한다. 스크리닝의 `candidates[].requested_calculation_domains`를 파싱해 도메인 `calculation_bindings`와 교집합하고, 교집합 밖은 `CALC_NOT_IN_BINDINGS` 리뷰로 남기며 `router_status`를 `READY_WITH_REVIEW`로 내린다. **도메인 상수를 두지 않는다**. 추가 개정 1회차로 `main()` 첫 문장이 `assert_deployment()`가 되었다 — 필수 자산 10 리터럴과 모듈 미러를 **한 벌로** 검사해(실측 18경로 — 다섯째 회차가 BO 투영 정책 자산을 목록에 더했다) 하나라도 빠지거나 해시가 어긋나면 `PART2_ASSET_DEPLOYMENT_INCOMPLETE`로 세운다. 이어 슬라이스 스키마가 `domain_declarations`와 `compiled_prompt.hash_kind`를 아는지 보고(`PART2_SLICE_SCHEMA_STALE`), 컴파일러 산출에 투영이 실제로 실려 나오는지 본다(`PART2_COMPILER_STALE` — 옛 판본은 알 수 없는 인자로 `TypeError`가 먼저 나므로 같은 코드에 `detail: signature_mismatch`를 붙인다). 프롬프트 오버레이 실패 4코드를 승격 대상으로 강제한다 |
|
||||||
| P2-B | `Task_C_B_domain_worker_*` | LLM `google / gemini-3.1-flash-lite` · reasoning high · verbosity medium · `max_concurrency: 8` · cache 15m · preflight 2 · 통합본 718–847행 | 단일 도메인의 **BO seed 후보**를 만든다 | 읽는 것은 두 파일뿐 — 조립 프롬프트와 슬라이스. **프롬프트를 다시 조립하지 않는다.** 산출 최상위는 `stage_b_domain_bo_seed_output` 한 키, `schema_version`은 `task_c_bo_stage_b_domain_bo_seed.v3` 고정. 다섯 배열(`element_fact_candidates` · `opposing_fact_candidates` · `defense_candidates` · `calculation_requests` · `dependency_refs`) 이름은 스키마가 정한 것이다. `dependency_refs`는 연결만 남기고 의존 도메인의 결론을 복사하지 않는다. 자기검증 6항(최상위 단일 키, `domain_id`·`task_instance_id` 주입값 일치, `source_refs` ⊆ slice source_universe, `bo_type` ∈ `allowed_legal_effect_bo_types`, `registry_component_ids` ⊆ 합집합, 금지 키 `BO_ID`·`Evidence`·`EvidenceTitles`·`final_*` 부재). **결론을 내리지 않는다 — 후보만 남긴다** |
|
| P2-B | `Task_C_B_domain_worker_*` | LLM `google / gemini-3.1-flash-lite` · reasoning high · verbosity medium · `max_concurrency: 8` · cache 15m · preflight 2 · 통합본 720–849행 | 단일 도메인의 **BO seed 후보**를 만든다 | 읽는 것은 두 파일뿐 — 조립 프롬프트와 슬라이스. **프롬프트를 다시 조립하지 않는다.** 산출 최상위는 `stage_b_domain_bo_seed_output` 한 키, `schema_version`은 `task_c_bo_stage_b_domain_bo_seed.v3` 고정. 다섯 배열(`element_fact_candidates` · `opposing_fact_candidates` · `defense_candidates` · `calculation_requests` · `dependency_refs`) 이름은 스키마가 정한 것이다. `dependency_refs`는 연결만 남기고 의존 도메인의 결론을 복사하지 않는다. 자기검증 6항(최상위 단일 키, `domain_id`·`task_instance_id` 주입값 일치, `source_refs` ⊆ slice source_universe, `bo_type` ∈ `allowed_legal_effect_bo_types`, `registry_component_ids` ⊆ 합집합, 금지 키 `BO_ID`·`Evidence`·`EvidenceTitles`·`final_*` 부재). **결론을 내리지 않는다 — 후보만 남긴다** |
|
||||||
| P2-R0 | `Task_C_BO_R0_seed_reducer_and_exception_planner` | code-executor · timeout 240 · 통합본 848–1,793행 | worker 산출 M개를 **결정론으로 합치고 예외를 좁힌다** | fan-out 계획의 기대집합과 실제 seed 집합을 **정확 일치**로 대조한다(누락·초과·중복 모두 실패). 모듈 4종(`runtime_common` · `schema_subset_validator` · `registry_loader` · `worker_output_validator`)을 반입해 `validate_worker_output`을 **실제로 호출**한다. 슬라이스의 `domain_declarations`로 두 대조를 걸어 `CALCULATION_DOMAIN_NOT_DECLARED`와 `EVIDENCE_SLOT_NOT_DECLARED`를 **review 등급**으로 남긴다. 산출은 셋이다 — seed ledger · 예외 pack · review handoff. **worker seed 파일은 읽기만 하고 다시 쓰지 않는다** — 구판의 제자리 재기록(`transport_metadata`·`handoff_guard` 주입)은 다섯째 회차에서 삭제됐고, 되쓰기와 함께 고아가 된 `_domain_label` · `DOMAIN_LABELS` · `_task_instance_id` · `digest_summary` 도 걷어냈다(R0 의 구 이름 B1~B5 의존 0). 앞 회차의 보강 — `try` 밖 자산 선검사 · `ensure_candidate_ref`(v3 봉인 스키마가 `candidate_ref`를 금지하므로 R0 가 순번에서 만든다) · v3 의 평평한 `source_refs` membership 대조 — 은 그대로다. 다섯째 회차의 처방은 다섯이다 — ① 투영 정책 자산을 `_verify_asset`으로 경성 반입한다(미등재·해시 불일치는 `PART2_ASSET_DEPLOYMENT_INCOMPLETE`, 판본 불일치는 `PART2_PROJECTION_POLICY_INVALID`) ② registry 근거 투영기 `project_to_bo_surface`가 v3 후보를 BO 호환면으로 투영한다 — 반환 키 **17개 고정**(입력 무관), registry 가 말하지 않는 칸은 만들지 않고 review 로 올린다. 투영본은 `projected_candidates`에 **별도 보관**하고 원장 루프가 그것을 읽는다(`seed_objects`는 worker 원본 유지). v2 잔재 `expand_candidate` · `_seed_payload` · `ALLOWED_SEED_KEYS` · `DOMAIN_PAYLOAD_CANON` · `_canon_payload` 는 제거 — 병합·정렬·예외 축소 헬퍼 7종(`_source_refs` · `_duplicate_key` · `_sort_key` · `_normalize_juristic` · `_compact_exception_payload` · `ensure_candidate_ref` · `validate_candidate`)은 한 줄도 고치지 않았다 ③ 검토 채널을 v3 두 키(후보별 `review_items` + 루트 `unknown_or_unrouted_reviews`)로 연결하고, 원본 `review_code`를 덧붙이기 키 `source_review_code`로, `reason`을 handoff `template_note`로 보존한다 ④ `validate_seed_object`가 status 를 v3 enum 5종 전체로 다룬다 — READY 계열 수용, `NO_SUPPORT`는 빈 후보 조건으로 수용 + review, `BLOCKED` · `FAILED` · enum 밖은 경성 중단 ⑤ 죽은 `slice_guard` 검사를 fan-out 계획 행의 `slice_sha256` · `compiled_prompt_sha256` ↔ worker echo 대조로 교체한다(`_seed_docs_from_plan`이 계획 행을 함께 보관). 파생 정합 하나 — 원장 flag 판정의 `{"event","state"}` 하드코딩도 슬라이스의 `allowed_legal_effect_bo_types`(registry 선언)로 교체됐다 |
|
| P2-R0 | `Task_C_BO_R0_seed_reducer_and_exception_planner` | code-executor · timeout 240 · 통합본 850–1,793행 | worker 산출 M개를 **결정론으로 합치고 예외를 좁힌다** | fan-out 계획의 기대집합과 실제 seed 집합을 **정확 일치**로 대조한다(누락·초과·중복 모두 실패). 모듈 4종(`runtime_common` · `schema_subset_validator` · `registry_loader` · `worker_output_validator`)을 반입해 `validate_worker_output`을 **실제로 호출**한다. 슬라이스의 `domain_declarations`로 두 대조를 걸어 `CALCULATION_DOMAIN_NOT_DECLARED`와 `EVIDENCE_SLOT_NOT_DECLARED`를 **review 등급**으로 남긴다. 산출은 셋이다 — seed ledger · 예외 pack · review handoff. **worker seed 파일은 읽기만 하고 다시 쓰지 않는다** — 구판의 제자리 재기록(`transport_metadata`·`handoff_guard` 주입)은 다섯째 회차에서 삭제됐고, 되쓰기와 함께 고아가 된 `_domain_label` · `DOMAIN_LABELS` · `_task_instance_id` · `digest_summary` 도 걷어냈다(R0 의 구 이름 B1~B5 의존 0). 앞 회차의 보강 — `try` 밖 자산 선검사 · `ensure_candidate_ref`(v3 봉인 스키마가 `candidate_ref`를 금지하므로 R0 가 순번에서 만든다) · v3 의 평평한 `source_refs` membership 대조 — 은 그대로다. 다섯째 회차의 처방은 다섯이다 — ① 투영 정책 자산을 `_verify_asset`으로 경성 반입한다(미등재·해시 불일치는 `PART2_ASSET_DEPLOYMENT_INCOMPLETE`, 판본 불일치는 `PART2_PROJECTION_POLICY_INVALID`) ② registry 근거 투영기 `project_to_bo_surface`가 v3 후보를 BO 호환면으로 투영한다 — 반환 키 **17개 고정**(입력 무관), registry 가 말하지 않는 칸은 만들지 않고 review 로 올린다. 투영본은 `projected_candidates`에 **별도 보관**하고 원장 루프가 그것을 읽는다(`seed_objects`는 worker 원본 유지). v2 잔재 `expand_candidate` · `_seed_payload` · `ALLOWED_SEED_KEYS` · `DOMAIN_PAYLOAD_CANON` · `_canon_payload` 는 제거 — 병합·정렬·예외 축소 헬퍼 7종(`_source_refs` · `_duplicate_key` · `_sort_key` · `_normalize_juristic` · `_compact_exception_payload` · `ensure_candidate_ref` · `validate_candidate`)은 한 줄도 고치지 않았다 ③ 검토 채널을 v3 두 키(후보별 `review_items` + 루트 `unknown_or_unrouted_reviews`)로 연결하고, 원본 `review_code`를 덧붙이기 키 `source_review_code`로, `reason`을 handoff `template_note`로 보존한다 ④ `validate_seed_object`가 status 를 v3 enum 5종 전체로 다룬다 — READY 계열 수용, `NO_SUPPORT`는 빈 후보 조건으로 수용 + review, `BLOCKED` · `FAILED` · enum 밖은 경성 중단 ⑤ 죽은 `slice_guard` 검사를 fan-out 계획 행의 `slice_sha256` · `compiled_prompt_sha256` ↔ worker echo 대조로 교체한다(`_seed_docs_from_plan`이 계획 행을 함께 보관). 파생 정합 하나 — 원장 flag 판정의 `{"event","state"}` 하드코딩도 슬라이스의 `allowed_legal_effect_bo_types`(registry 선언)로 교체됐다 |
|
||||||
| P2-R1 | `Task_C_BO_R1_exception_adjudicator` | LLM · reasoning low · verbosity low · `max_iterations: 1` · cache 20m · preflight 1 · 통합본 1,794–1,896행 | R0이 non-deferrable로 판정한 **compact exception만 판정**한다 | pack 하나만 읽는다. 병합·최종 파일 작성·사실 창작을 하지 않는다. v3 3,621–3,723행과 바이트 동일(추가 개정 5회에서도 손대지 않았다) |
|
| P2-R1 | `Task_C_BO_R1_exception_adjudicator` | LLM · reasoning low · verbosity low · `max_iterations: 1` · cache 20m · preflight 1 · 통합본 1,794–1,896행 | R0이 non-deferrable로 판정한 **compact exception만 판정**한다 | pack 하나만 읽는다. 병합·최종 파일 작성·사실 창작을 하지 않는다. v3 3,621–3,723행과 바이트 동일(추가 개정 5회에서도 손대지 않았다) |
|
||||||
| P2-F0 | `Task_C_BO_F0_final_bo_compiler_gate_writer` | code-executor · timeout 240 · 통합본 1,897–2,685행 | **최종 `BO.json`을 확정**하고 게이트를 쓴다 | PostB_3(final compiler) + PostB_4(final gate/writer) 통합. 입력은 전부 파일 계약(ledger · decisions · stage_a)이다. BOType 어휘를 하드코딩하지 않고 **registry 합집합**에서 해시 검증과 함께 만든다. 확장 payload 키를 `extension_payload_key_declarations.v1.json`과 대조해 미선언 키는 `EXTENSION_PAYLOAD_KEY_UNDECLARED`로 남긴다. R1 산출은 **조건부**로 요구한다(pack의 `exception_count`가 0이면 부재 허용). 다섯째 회차의 처방 둘 — ① 폴백 판정의 `bo_type not in {"event","state"}` 하드코딩을 registry 합집합 `bo_types`(5종)로 교체했다. `claim` · `communication` · `calculation_request` 를 선언한 도메인의 값이 `event`로 **침묵 덮어쓰기**되던 자리이며, 이제 빌드 루프와 검증 루프의 어휘가 같다 ② `_load_projection_policy`로 투영 정책을 반입해(`_load_declarations`와 같은 규율 — `runtime_manifest` sha 대조 후에만 사용) 정규화 기본값을 정책에서 읽고, `normalization_notes` 각 항목을 review handoff 의 `review_items`에도 올린다(`issue_type: schema_field_fallback` + `source_review_code`). Action 대체 체인(seed.Action → action_summary → Action_proposal)은 방어선으로 유지된다 |
|
| P2-F0 | `Task_C_BO_F0_final_bo_compiler_gate_writer` | code-executor · timeout 240 · 통합본 1,897–2,685행 | **최종 `BO.json`을 확정**하고 게이트를 쓴다 | PostB_3(final compiler) + PostB_4(final gate/writer) 통합. 입력은 전부 파일 계약(ledger · decisions · stage_a)이다. BOType 어휘를 하드코딩하지 않고 **registry 합집합**에서 해시 검증과 함께 만든다. 확장 payload 키를 `extension_payload_key_declarations.v1.json`과 대조해 미선언 키는 `EXTENSION_PAYLOAD_KEY_UNDECLARED`로 남긴다. R1 산출은 **조건부**로 요구한다(pack의 `exception_count`가 0이면 부재 허용). 다섯째 회차의 처방 둘 — ① 폴백 판정의 `bo_type not in {"event","state"}` 하드코딩을 registry 합집합 `bo_types`(5종)로 교체했다. `claim` · `communication` · `calculation_request` 를 선언한 도메인의 값이 `event`로 **침묵 덮어쓰기**되던 자리이며, 이제 빌드 루프와 검증 루프의 어휘가 같다 ② `_load_projection_policy`로 투영 정책을 반입해(`_load_declarations`와 같은 규율 — `runtime_manifest` sha 대조 후에만 사용) 정규화 기본값을 정책에서 읽고, `normalization_notes` 각 항목을 review handoff 의 `review_items`에도 올린다(`issue_type: schema_field_fallback` + `source_review_code`). Action 대체 체인(seed.Action → action_summary → Action_proposal)은 방어선으로 유지된다 |
|
||||||
| P2-S0 | `Task_C_BO_S0_signal_bundle_writer` | code-executor · timeout 300 · 통합본 2,686–3,275행 | **정본 signal 거래 1건**을 기록한다 | 생성기·사영기·기록기를 여기서 만들지 않는다. 조립본 모듈 24종을 반입한다 — compiler 7(`common` · `projections` · `schema_validator` · `signal_compiler` · `signal_gate` · `transaction_writer` · `writer_boundary`) + adapter 4(`s3_domain_seed_adapter` · `s3_envelope_migration_adapter` · `s4_calculation_adapter` · `sg01_activation_adapter`) + emitter 13(`emitter_runtime` + `emit_sg02`~`emit_sg13`). 정본 기록기가 유일한지 검사한다(`S0_CANONICAL_WRITER_NOT_UNIQUE`). `transaction_id`는 `^S5TX-[a-f0-9]{20}$`. 슬라이스의 `emits_signals` 선언과 실제 방출을 대조해 선언 밖 방출은 `SIGNAL_EMISSION_NOT_DECLARED`로 남긴다(**선언보다 적게 나오는 것은 정상**이므로 그 방향은 세지 않는다). 기록 후 `signal_manifest.json`을 다시 읽어 해시 왕복 일치를 확인한다. 추가 개정으로 `signal_registry.v2.json` · `s5_execution_contract.v2.json` · `$ref` 폐포가 닿는 signal 스키마 17종을 `_verify_asset`으로 읽으면서 매니페스트 해시와 대조한다. 다섯째 회차에서는 배포 처방 문구(`PART2_DEPLOYMENT_REMEDY`)만 A0·R0 와 함께 배포 원본 `extension_research/Default_Agent` 기준으로 현행화됐다 |
|
| P2-S0 | `Task_C_BO_S0_signal_bundle_writer` | code-executor · timeout 300 · 통합본 2,686–3,275행 | **정본 signal 거래 1건**을 기록한다 | 생성기·사영기·기록기를 여기서 만들지 않는다. 조립본 모듈 24종을 반입한다 — compiler 7(`common` · `projections` · `schema_validator` · `signal_compiler` · `signal_gate` · `transaction_writer` · `writer_boundary`) + adapter 4(`s3_domain_seed_adapter` · `s3_envelope_migration_adapter` · `s4_calculation_adapter` · `sg01_activation_adapter`) + emitter 13(`emitter_runtime` + `emit_sg02`~`emit_sg13`). 정본 기록기가 유일한지 검사한다(`S0_CANONICAL_WRITER_NOT_UNIQUE`). `transaction_id`는 `^S5TX-[a-f0-9]{20}$`. 슬라이스의 `emits_signals` 선언과 실제 방출을 대조해 선언 밖 방출은 `SIGNAL_EMISSION_NOT_DECLARED`로 남긴다(**선언보다 적게 나오는 것은 정상**이므로 그 방향은 세지 않는다). 기록 후 `signal_manifest.json`을 다시 읽어 해시 왕복 일치를 확인한다. 추가 개정으로 `signal_registry.v2.json` · `s5_execution_contract.v2.json` · `$ref` 폐포가 닿는 signal 스키마 17종을 `_verify_asset`으로 읽으면서 매니페스트 해시와 대조한다. 다섯째 회차에서는 배포 처방 문구(`PART2_DEPLOYMENT_REMEDY`)만 A0·R0 와 함께 배포 원본 `extension_research/Default_Agent` 기준으로 현행화됐다 |
|
||||||
@@ -350,7 +350,7 @@ Part 1 개정이 함께 만든 **검증·회귀 자산**(런타임 입력이 아
|
|||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
| P2-A0 | `Task_C_BO_A0_…slice_compiler` | **Part 1 산출 6종** — `quality_gates/stage1_part1_soft_gate_handoff.json` · `routing/domain_activation_manifest.json` · `routing/domain_screening.json` · `evidence_indexed.json` · `evidence_event_candidates.json` · `routing/candidate_profile_vocabulary.md` + **사건 입력** `client_meeting.md` (md) + **자산** `runtime_manifest.json` · `domains/_registry_index.json` · `domains/_common/common_worker_contract.md` · `domains/<id>/domain_config.json` ×26 · `domains/<id>/seed_prompt_overlay.md` (config의 `prompt_overlay_ref`가 지목) · `stage1_runtime/prompt_composition_policy.json` · `platform/schemas/domain_slice.schema.v2.json` · `platform/schemas/domain_fanout_plan.schema.json` + 모듈 미러 8종(`.txt`) + **배포 게이트가 존재·해시만 확인하는 자산 6종**(`domain_seed_output.schema.v3.json` · `signals/signal_registry.v2.json` · `contracts/signals/s5_execution_contract.v2.json` · `routing/extension_payload_key_declarations.v1.json` · `stage1_runtime/worker_output_validator.txt` · `stage1_runtime/bo_surface_projection_policy.v1.json` — 하류 R0·F0·S0 이 쓸 것을 A0 가 미리 본다) | `runtime/domain_slices/<domain_id>.json` (json ×M, `task_c_bo_stage_b_domain_slice.v2`, 루트 키 `stage_b_domain_slice`) · `runtime/compiled_prompts/<domain_id>.md` (md ×M) · `fanout/domain_fanout_plan.json` (json, `domain_fanout_plan.v1`) · `stage1_tmp/task_c_bo/stage_a_context.json` (json, 루트 `stage_a_context`) · `stage1_tmp/task_c_bo/source_universe_manifest.json` (json) · `validation_assets/routing/stage_receipt.json` (json, `stage1_stage_receipt.v2`) |
|
| P2-A0 | `Task_C_BO_A0_…slice_compiler` | **Part 1 산출 6종** — `quality_gates/stage1_part1_soft_gate_handoff.json` · `routing/domain_activation_manifest.json` · `routing/domain_screening.json` · `evidence_indexed.json` · `evidence_event_candidates.json` · `routing/candidate_profile_vocabulary.md` + **사건 입력** `client_meeting.md` (md) + **자산** `runtime_manifest.json` · `domains/_registry_index.json` · `domains/_common/common_worker_contract.md` · `domains/<id>/domain_config.json` ×26 · `domains/<id>/seed_prompt_overlay.md` (config의 `prompt_overlay_ref`가 지목) · `stage1_runtime/prompt_composition_policy.json` · `platform/schemas/domain_slice.schema.v2.json` · `platform/schemas/domain_fanout_plan.schema.json` + 모듈 미러 8종(`.txt`) + **배포 게이트가 존재·해시만 확인하는 자산 6종**(`domain_seed_output.schema.v3.json` · `signals/signal_registry.v2.json` · `contracts/signals/s5_execution_contract.v2.json` · `routing/extension_payload_key_declarations.v1.json` · `stage1_runtime/worker_output_validator.txt` · `stage1_runtime/bo_surface_projection_policy.v1.json` — 하류 R0·F0·S0 이 쓸 것을 A0 가 미리 본다) | `runtime/domain_slices/<domain_id>.json` (json ×M, `task_c_bo_stage_b_domain_slice.v2`, 루트 키 `stage_b_domain_slice`) · `runtime/compiled_prompts/<domain_id>.md` (md ×M) · `fanout/domain_fanout_plan.json` (json, `domain_fanout_plan.v1`) · `stage1_tmp/task_c_bo/stage_a_context.json` (json, 루트 `stage_a_context`) · `stage1_tmp/task_c_bo/source_universe_manifest.json` (json) · `validation_assets/routing/stage_receipt.json` (json, `stage1_stage_receipt.v2`) |
|
||||||
| P2-B | `Task_C_B_domain_worker_*` | `{{item.compiled_prompt_path}}` (md) · `{{item.slice_path}}` (json) — **둘뿐** | `{{item.expected_output_path}}` = `runtime/domain_seed_outputs/<domain_id>.json` (json, `task_c_bo_stage_b_domain_bo_seed.v3`) |
|
| P2-B | `Task_C_B_domain_worker_*` | `{{item.compiled_prompt_path}}` (md) · `{{item.slice_path}}` (json) — **둘뿐** | `{{item.expected_output_path}}` = `runtime/domain_seed_outputs/<domain_id>.json` (json, `task_c_bo_stage_b_domain_bo_seed.v3`) |
|
||||||
| P2-R0 | `Task_C_BO_R0_…exception_planner` | `fanout/domain_fanout_plan.json` · `runtime/domain_slices/<id>.json` ×M · `runtime/domain_seed_outputs/<id>.json` ×M · `stage1_tmp/task_c_bo/stage_a_context.json` · `stage1_tmp/task_c_bo/source_universe_manifest.json` (json) + 자산 `platform/schemas/domain_seed_output.schema.v3.json` · `stage1_runtime/bo_surface_projection_policy.v1.json`(판본까지 검사) · `runtime_manifest.json` + 모듈 미러 4종 · **선언만 하고 읽지 않는 상수 2개**(`ACTIVATION_MANIFEST_PATH` · `REGISTRY_INDEX_PATH` — 각각 대입 1회뿐이고 read 0회). 추가 개정으로 seed 스키마와 검증기 미러는 `_verify_asset`이 **매니페스트 해시와 대조하며** 읽는다 | `stage1_tmp/task_c_bo/postb_seed_ledger.json` (json) · `quality_gates/stage1_part2_exception_pack.json` (json) · `quality_gates/stage1_part2_review_handoff.json` (json) — **셋뿐이다.** 구판의 worker seed 제자리 재기록은 다섯째 회차에서 삭제됐고, seed 파일은 worker 가 쓴 바이트 그대로 남는다 |
|
| P2-R0 | `Task_C_BO_R0_…exception_planner` | `fanout/domain_fanout_plan.json` · `runtime/domain_slices/<id>.json` ×M · `runtime/domain_seed_outputs/<id>.json` ×M · `stage1_tmp/task_c_bo/stage_a_context.json` · `stage1_tmp/task_c_bo/source_universe_manifest.json` (json) + 자산 `platform/schemas/domain_seed_output.schema.v3.json` · `stage1_runtime/bo_surface_projection_policy.v1.json`(판본까지 검사) · `runtime_manifest.json` + 모듈 미러 4종 (구판의 사문 경로 상수 2개는 2026-08-20 자산 정리 회차에서 삭제됐다). 추가 개정으로 seed 스키마와 검증기 미러는 `_verify_asset`이 **매니페스트 해시와 대조하며** 읽는다 | `stage1_tmp/task_c_bo/postb_seed_ledger.json` (json) · `quality_gates/stage1_part2_exception_pack.json` (json) · `quality_gates/stage1_part2_review_handoff.json` (json) — **셋뿐이다.** 구판의 worker seed 제자리 재기록은 다섯째 회차에서 삭제됐고, seed 파일은 worker 가 쓴 바이트 그대로 남는다 |
|
||||||
| P2-R1 | `Task_C_BO_R1_exception_adjudicator` | `quality_gates/stage1_part2_exception_pack.json` (json, preflight) | `stage1_tmp/task_c_bo/postb_adjudication_decisions.json` (json, **조건부**) |
|
| P2-R1 | `Task_C_BO_R1_exception_adjudicator` | `quality_gates/stage1_part2_exception_pack.json` (json, preflight) | `stage1_tmp/task_c_bo/postb_adjudication_decisions.json` (json, **조건부**) |
|
||||||
| P2-F0 | `Task_C_BO_F0_…gate_writer` | `stage1_tmp/task_c_bo/stage_a_context.json` · `postb_seed_ledger.json` · `postb_adjudication_decisions.json`(조건부) · `quality_gates/stage1_part2_review_handoff.json` · `stage1_part2_exception_pack.json` (json) + 자산 `routing/extension_payload_key_declarations.v1.json` · `stage1_runtime/bo_surface_projection_policy.v1.json`(`_load_projection_policy` — 매니페스트 sha 대조 후 사용) · `runtime_manifest.json` | **`BO.json`** (json) · `stage1_tmp/task_c_bo/postb_compiled_bundle_compact.json` (json) · `quality_gates/stage1_part2_review_handoff.json` (json, `FINALIZED`로 **갱신 재기록** — R0과 공동 기록자) |
|
| P2-F0 | `Task_C_BO_F0_…gate_writer` | `stage1_tmp/task_c_bo/stage_a_context.json` · `postb_seed_ledger.json` · `postb_adjudication_decisions.json`(조건부) · `quality_gates/stage1_part2_review_handoff.json` · `stage1_part2_exception_pack.json` (json) + 자산 `routing/extension_payload_key_declarations.v1.json` · `stage1_runtime/bo_surface_projection_policy.v1.json`(`_load_projection_policy` — 매니페스트 sha 대조 후 사용) · `runtime_manifest.json` | **`BO.json`** (json) · `stage1_tmp/task_c_bo/postb_compiled_bundle_compact.json` (json) · `quality_gates/stage1_part2_review_handoff.json` (json, `FINALIZED`로 **갱신 재기록** — R0과 공동 기록자) |
|
||||||
| P2-S0 | `Task_C_BO_S0_signal_bundle_writer` | `BO.json` · `routing/domain_activation_manifest.json` · `fanout/domain_fanout_plan.json` · `stage1_tmp/task_c_bo/source_universe_manifest.json` · `runtime/domain_slices/<id>.json` ×M (json) + 자산 `signals/signal_registry.v2.json` · `contracts/signals/s5_execution_contract.v2.json` · `runtime_manifest.json` + 모듈 미러 24종 | `signals/…` 아래 정본 signal 집합 — `signals/signal_manifest.json` 포함 + 호환 뷰 3종 `signals/compatibility_views/{actio_case,case_liability,legal_effect}_signals.json` + **루트 별칭 3종** `actio_case_signals.json` · `case_liability_signals.json` · `legal_effect_signals.json` (구 이름 호환면, 같은 바이트) |
|
| P2-S0 | `Task_C_BO_S0_signal_bundle_writer` | `BO.json` · `routing/domain_activation_manifest.json` · `fanout/domain_fanout_plan.json` · `stage1_tmp/task_c_bo/source_universe_manifest.json` · `runtime/domain_slices/<id>.json` ×M (json) + 자산 `signals/signal_registry.v2.json` · `contracts/signals/s5_execution_contract.v2.json` · `runtime_manifest.json` + 모듈 미러 24종 | `signals/…` 아래 정본 signal 집합 — `signals/signal_manifest.json` 포함 + 호환 뷰 3종 `signals/compatibility_views/{actio_case,case_liability,legal_effect}_signals.json` + **루트 별칭 3종** `actio_case_signals.json` · `case_liability_signals.json` · `legal_effect_signals.json` (구 이름 호환면, 같은 바이트) |
|
||||||
@@ -378,7 +378,7 @@ YAML이 참조하는 `Default_Agent/…` 자산은 **21개 리터럴**이다(다
|
|||||||
|
|
||||||
| 배포 경로 (`Default_Agent/` 기준) | 크기 | 형태 | 쓰는 task | 역할 |
|
| 배포 경로 (`Default_Agent/` 기준) | 크기 | 형태 | 쓰는 task | 역할 |
|
||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| `domains/_registry_index.json` | 18,921 B | json | A0 | registry 색인. 봉인 대조 대상. (R0에도 경로 상수가 있으나 읽지 않는다) |
|
| `domains/_registry_index.json` | 18,921 B | json | A0 | registry 색인. 봉인 대조 대상 |
|
||||||
| `domains/_common/common_worker_contract.md` | **3,766 B** | md | A0 | 공통 worker 계약문. 사건 종류 이름을 라우팅 키로 쓰지 않는다는 규율을 여기서 선언한다. 다섯째 회차가 출력 규칙 한 문장을 더했다 — 검토는 v3 두 키(`review_items` · `unknown_or_unrouted_reviews`)로만 보내고 `domain_review_queue`(오버레이에 남은 구 이름)는 금지, 방어 후보의 정본 키는 `defense_candidates`. rank 10 계약이 rank 30 오버레이를 이기므로 오버레이 25건 · 색인 · Part 1 봉인은 전부 바이트 무변이다 |
|
| `domains/_common/common_worker_contract.md` | **3,766 B** | md | A0 | 공통 worker 계약문. 사건 종류 이름을 라우팅 키로 쓰지 않는다는 규율을 여기서 선언한다. 다섯째 회차가 출력 규칙 한 문장을 더했다 — 검토는 v3 두 키(`review_items` · `unknown_or_unrouted_reviews`)로만 보내고 `domain_review_queue`(오버레이에 남은 구 이름)는 금지, 방어 후보의 정본 키는 `defense_candidates`. rank 10 계약이 rank 30 오버레이를 이기므로 오버레이 25건 · 색인 · Part 1 봉인은 전부 바이트 무변이다 |
|
||||||
| `domains/<id>/domain_config.json` ×26 | — | json | A0 | 8선언 가문 원문 (`element_slots` · `opposing_fact_slots` · `evidence_components` · `defense_map` · `calculation_bindings` · `emits_signals` · `structure_types` · `effect_projection`) |
|
| `domains/<id>/domain_config.json` ×26 | — | json | A0 | 8선언 가문 원문 (`element_slots` · `opposing_fact_slots` · `evidence_components` · `defense_map` · `calculation_bindings` · `emits_signals` · `structure_types` · `effect_projection`) |
|
||||||
| `domains/<id>/seed_prompt_overlay.md` | — | md | A0 | 도메인 오버레이 산문. **파일명을 하드코딩하지 않고** config의 `prompt_overlay_ref`가 지목하는 것을 따른다 |
|
| `domains/<id>/seed_prompt_overlay.md` | — | md | A0 | 도메인 오버레이 산문. **파일명을 하드코딩하지 않고** config의 `prompt_overlay_ref`가 지목하는 것을 따른다 |
|
||||||
@@ -560,7 +560,7 @@ Part 1이 만들어 **Part 2가 읽는** 파일은 여섯이다.
|
|||||||
| 12 | embedded python | AST 실패 0 · 미정의 이름 0 · 미사용 def 1(`clip`, v3 원문) |
|
| 12 | embedded python | AST 실패 0 · 미정의 이름 0 · 미사용 def 1(`clip`, v3 원문) |
|
||||||
| 13 | 인계면 전수 대조 | PASS · finding 0 |
|
| 13 | 인계면 전수 대조 | PASS · finding 0 |
|
||||||
| 14 | 스키마 미지원 키워드 | PASS · 3/3 |
|
| 14 | 스키마 미지원 키워드 | PASS · 3/3 |
|
||||||
| 15 | 개별 6종 ↔ 통합본 | 불일치 0 (다섯째 회차 뒤 재대조 — P2-A0·R0·F0·S0 4종을 통합본 블록과 동기화한 뒤 블록 동일 재확인. R0 블록 946행) |
|
| 15 | 개별 6종 ↔ 통합본 | 불일치 0 (다섯째 회차 뒤 재대조 — P2-A0·R0·F0·S0 4종을 통합본 블록과 동기화한 뒤 블록 동일 재확인. R0 블록 944행 — 2026-08-20 사문 상수 삭제 후 재동기화·재확인) |
|
||||||
| 16 | 26 도메인 전수 compile (스키마 주입) | READY / slice_count 26 / 스키마 실패 0 |
|
| 16 | 26 도메인 전수 compile (스키마 주입) | READY / slice_count 26 / 스키마 실패 0 |
|
||||||
| 17 | `calculation_registry` · `computations/` 참조 | 0 · 0 |
|
| 17 | `calculation_registry` · `computations/` 참조 | 0 · 0 |
|
||||||
| 18 | `release_manifest` 전수 해시·크기 | **1,320항** · 불일치 **1** — `tools/build_default_agent_stage1.py`(장부 102,559 B vs 실물 102,997 B). 다섯째 회차의 빌더 제자리 수정(뿌리 6→10)이 조립본 장부에 미반영된 흔적으로, 이월 D-2 의 재생성 대상이다 |
|
| 18 | `release_manifest` 전수 해시·크기 | **1,320항** · 불일치 **1** — `tools/build_default_agent_stage1.py`(장부 102,559 B vs 실물 102,997 B). 다섯째 회차의 빌더 제자리 수정(뿌리 6→10)이 조립본 장부에 미반영된 흔적으로, 이월 D-2 의 재생성 대상이다 |
|
||||||
@@ -721,7 +721,7 @@ Part 2 개정은 독립 sub-agent 검증 3라운드에서 결함 10건을 닫았
|
|||||||
|
|
||||||
| 주장 | 근거 |
|
| 주장 | 근거 |
|
||||||
|---|---|
|
|---|---|
|
||||||
| 두 통합본의 크기·행수·sha256 | 원문 바이트 재계산 — Part 1 467,668 B / 6,667행 / `195b43edfaf1df14…`, Part 2 **195,938 B / 3,315행 / `ec4c43027ad85195…`** |
|
| 두 통합본의 크기·행수·sha256 | 원문 바이트 재계산 — Part 1 467,668 B / 6,667행 / `195b43edfaf1df14…`, Part 2 **195,963 B / 3,315행 / `ec407309a5ab43f4…`** |
|
||||||
| YAML 구문 PASS · 최상위 키 `Agent` | `yaml.safe_load` 재실행 |
|
| YAML 구문 PASS · 최상위 키 `Agent` | `yaml.safe_load` 재실행 |
|
||||||
| task 13 / 6 및 행 범위 | `- task_name:` 정규식 전수 추출 |
|
| task 13 / 6 및 행 범위 | `- task_name:` 정규식 전수 추출 |
|
||||||
| DAG 노드·edge | `task_procedure` 블록 원문 (Part 1 6,589–6,664행 · Part 2 **3,277–3,312행**) |
|
| DAG 노드·edge | `task_procedure` 블록 원문 (Part 1 6,589–6,664행 · Part 2 **3,277–3,312행**) |
|
||||||
@@ -754,7 +754,7 @@ Part 2 개정은 독립 sub-agent 검증 3라운드에서 결함 10건을 닫았
|
|||||||
| 심각도 | 건수 | 내용 |
|
| 심각도 | 건수 | 내용 |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| BLOCKER | 1 | §0 요약표가 Part 2의 사건 입력을 "없음"으로 적었다. Part 2 A0는 `client_meeting.md`를 `read_raw`로 직접 읽는다(통합본 515행). 같은 문서의 §3.3·§4.1과 자기모순이었다 |
|
| BLOCKER | 1 | §0 요약표가 Part 2의 사건 입력을 "없음"으로 적었다. Part 2 A0는 `client_meeting.md`를 `read_raw`로 직접 읽는다(통합본 515행). 같은 문서의 §3.3·§4.1과 자기모순이었다 |
|
||||||
| MAJOR | 5 | ① R0의 **네 번째 산출** 누락 — worker seed 파일 M개를 제자리에서 다시 쓴다(`transport_metadata`·`handoff_guard` 주입) ② R0의 IN에 적은 `domain_activation_manifest.json`·`_registry_index.json`은 **선언만 하고 읽지 않는 상수**다(각 대입 1회·read 0회) ③ 스테이지 기본 LLM은 Part 1도 `openai / gpt-4o-2024-08-06`으로 같다 ④ T1의 `preflight` 플래그는 `false`다(화이트리스트만 선언) ⑤ 검사 20의 `__pycache__ 0`은 후보 오버레이 기준이고 정본 조립본에는 `.pyc` 3이 남아 있다 |
|
| MAJOR | 5 | ① R0의 **네 번째 산출** 누락 — worker seed 파일 M개를 제자리에서 다시 쓴다(`transport_metadata`·`handoff_guard` 주입) ② R0의 IN에 적은 `domain_activation_manifest.json`·`_registry_index.json`은 **선언만 하고 읽지 않는 상수**다(각 대입 1회·read 0회 — 그 상수 2개는 2026-08-20 자산 정리 회차에서 삭제됐다) ③ 스테이지 기본 LLM은 Part 1도 `openai / gpt-4o-2024-08-06`으로 같다 ④ T1의 `preflight` 플래그는 `false`다(화이트리스트만 선언) ⑤ 검사 20의 `__pycache__ 0`은 후보 오버레이 기준이고 정본 조립본에는 `.pyc` 3이 남아 있다 |
|
||||||
| MINOR | 8 | Part 1 행수 6,668 → **6,667**(리포트에서 옮겨 온 값이 실측과 달랐다) · `task_procedure` 행 범위가 스테이지 층 `prevs`/`nexts`를 삼켰다 · T5가 shard 원문을 조건부로 읽는다 · T3·T4의 `max_concurrency: 12` 누락 · §2.5 표의 행 구성 설명 · `source_copy_map.json`은 두 뿌리 바이트 동일 · 예행의 세 번째 한계(Part 1 code task 8종 중 5종만 실행) · 인계면 선언표의 누락 2줄(`client_meeting.md` 소비자에 Part 2 A0, seed 경로의 `also_written_by`) |
|
| MINOR | 8 | Part 1 행수 6,668 → **6,667**(리포트에서 옮겨 온 값이 실측과 달랐다) · `task_procedure` 행 범위가 스테이지 층 `prevs`/`nexts`를 삼켰다 · T5가 shard 원문을 조건부로 읽는다 · T3·T4의 `max_concurrency: 12` 누락 · §2.5 표의 행 구성 설명 · `source_copy_map.json`은 두 뿌리 바이트 동일 · 예행의 세 번째 한계(Part 1 code task 8종 중 5종만 실행) · 인계면 선언표의 누락 2줄(`client_meeting.md` 소비자에 Part 2 A0, seed 경로의 `also_written_by`) |
|
||||||
|
|
||||||
검증이 **깨끗하다고 확인한 것**도 기록해 둔다. task 13/6 전수가 세 표(소작업·IO·연결)에 모두 오른 것, DAG 노드·edge·와일드카드 토큰 전부 일치, §2.5·§3.5·§4.1·§4.3에 인용한 바이트 크기 44개(중복 제외) 전부 정확, 두 뿌리 대조 수치(528/7/23)와 미러 규약 실측, 인계면 34와 구간 분포, task별 행 범위와 v3 대비 바이트 동일성(Part 1 무변경 6종 + Part 2 R1), 그리고 26 도메인 투영 합계 일곱(162/85/112/83/73/267/53)이 `domains/*/domain_config.json` 전수 재계산으로 정확히 재현되는 것.
|
검증이 **깨끗하다고 확인한 것**도 기록해 둔다. task 13/6 전수가 세 표(소작업·IO·연결)에 모두 오른 것, DAG 노드·edge·와일드카드 토큰 전부 일치, §2.5·§3.5·§4.1·§4.3에 인용한 바이트 크기 44개(중복 제외) 전부 정확, 두 뿌리 대조 수치(528/7/23)와 미러 규약 실측, 인계면 34와 구간 분포, task별 행 범위와 v3 대비 바이트 동일성(Part 1 무변경 6종 + Part 2 R1), 그리고 26 도메인 투영 합계 일곱(162/85/112/83/73/267/53)이 `domains/*/domain_config.json` 전수 재계산으로 정확히 재현되는 것.
|
||||||
|
|||||||
+315
@@ -0,0 +1,315 @@
|
|||||||
|
# Stage 1 Part 3 — 개정 YAML 작업내역서
|
||||||
|
|
||||||
|
- 문서 위치: `YAML_Prompts/1. Stage_1/v.7/extension_research/stage_1_part_3_updated_yaml_analysis.md`
|
||||||
|
- 분석 대상 정본: `ver_8_yaml_candidates/stage_1_part_3_v.8.yml` — **52,878 B / 1,037행 / sha256 `9a163a03262bfbad…`**
|
||||||
|
- 근거 자료: `stage_1_part_3_개정_신전략서.md`(작업 지시 정본 · D-4 결정안) · `stage_1_part_3_개정작업내역서.md`(개정 실행 기록) · `stage_1_part_1_and_2_updated_yaml_analysis.md`(상류 계약) · `v.7/MEMORY.md` 항목 ㉑~㉓
|
||||||
|
- 실측 기준: 이 문서의 모든 수치·경로·행 범위·해시는 통합본 원문과 배포 원본 트리(`extension_research/Default_Agent/`)를 **직접 파싱·해시**하여 얻었다. 예행 수치는 실행 루트 `/tmp/dry_p3/` 실물과 회귀 결과 기록에서 옮겼고 출처를 §9에 적었다.
|
||||||
|
- 자매 문서와의 관계: Part 1·2 는 `stage_1_part_1_and_2_updated_yaml_analysis.md`가 다룬다. 이 문서는 Part 3 하나를 같은 기준(전체 DAG · IO · 자산 배포 위치 · 소작업 · upstream–downstream)으로 다룬다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 0. 한눈에
|
||||||
|
|
||||||
|
| 축 | Part 3 |
|
||||||
|
|---|---|
|
||||||
|
| 스테이지 이름 | `stage1_법률효과구조_생성` |
|
||||||
|
| Agent 이름 | `Liti-agent_Civil_Suit_Plaintiff_Stage_1_Part_3` |
|
||||||
|
| task 수 | **2** (L0 · L2 — **L1 을 두지 않았다**, §1.3) |
|
||||||
|
| DAG 노드 수 | **4** (IN + 2 + OUT) · 완전 직렬 |
|
||||||
|
| LLM task / code task | **0 / 2** — Part 3 는 LLM 호출이 없다(조건부 판정조차 없다) |
|
||||||
|
| fan-out | 없음 |
|
||||||
|
| mcpServers | `{localdocs, code-executor}` |
|
||||||
|
| 스테이지 기본 LLM | `openai / gpt-4o-2024-08-06` (스테이지 머리 선언 — Part 1·2 와 동일. 쓰는 task 는 없다) |
|
||||||
|
| 입력 | Part 2 산출 — `BO.json` · `signals/`(SG-01 포함 정본 signal 집합) · `runtime/domain_slices/` + registry |
|
||||||
|
| 최종 산출 | **`legal_effect_structures.json`** (+ seed bundle · review handoff · receipt) |
|
||||||
|
| 조립 로직의 거처 | 신설 모듈 `stage1_runtime/structure_index_compiler.py` — YAML 은 반입·게이트·봉인·기록만 한다 |
|
||||||
|
| 구 계약 잔재 | **0** — 구 Part 3 v2(`Claude_YAML/…`)를 읽지도 승계하지도 않은 전면 신작이다 |
|
||||||
|
| YAML 구문 | PASS |
|
||||||
|
|
||||||
|
**Part 3 가 하는 일 한 문장** — Part 2 가 만든 BO 와 signal 을 registry 의 `structure_types` 선언 위에 얹어, **어느 법률효과 유형이 이 사건에서 선언되어 있고(Θ), 각 유형에 어떤 근거(SG-13 route · 증거 refs · BO)가 붙는가**를 결정론으로 확정하고 세 방향 색인(`by_domain_id` · `by_module` · `by_bo_id`)으로 하류(Part 4 · Stage 2)에 넘긴다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. 개정 계보와 설계 결정
|
||||||
|
|
||||||
|
### 1.1 계보 — diff 가 아니라 신작
|
||||||
|
|
||||||
|
구 Part 3(`Stage_1_Part_3_Claude_v2.yml`, 2,250행)는 구 이름 signal 3종(`actio_case_signals.json` 등)을 읽고 B1~B5 구 도메인 이름과 11종 유형 상수·한국어 키워드 사다리를 하드코딩하고 있었다. 개정은 그 파일의 diff 로 하지 않았다 — **`stage_1_part_3_개정_신전략서.md`가 registry 와 Part 1·2 실산출 계약만으로 Part 3 를 새로 규정**했고(제약 1: `v.7/Claude_YAML` 의존 0), 이 통합본은 그 신전략서의 실행 산출이다. 조각 후보본 2종(`P3-L0_structure_seed_reducer_v1.yml` 29,887 B · `P3-L2_final_structure_index_writer_v1.yml` 21,401 B)을 만들어 검사한 뒤 병합했으며, 개별↔통합 블록 대조 불일치 0 이다.
|
||||||
|
|
||||||
|
### 1.2 D-4 결정안 (신전략서 §2 — 사용자의 실행 지시로 승인 처리)
|
||||||
|
|
||||||
|
| 갈래 | 결정 | 통합본에 남은 흔적 |
|
||||||
|
|---|---|---|
|
||||||
|
| (가) 열거 범위 Θ | `expected_runnable_domain_ids` 의 `domain_config.structure_types` 합집합. `active_domain_ids` 가 아니다(D-3 넓은 정의) — 좁히면 감시 도메인 효과가 전부 검토로 쓸려 가는데 커버리지 등식은 그래도 통과한다 | 모듈 L0-1 · 회귀 L-k |
|
||||||
|
| (나) 전순서 | `(그 도메인이 선언한 priority_rank, registry 색인 entries[] 위치, type_id)` 3키. **구조 레코드는 (도메인, type_id) 쌍마다 하나 — 도메인 간 병합 금지** | 모듈 L0-2 `order_key` · 회귀 L-h/L-i |
|
||||||
|
| (다) `actio_remedy_or_cap` | 별도 매핑표를 만들지 않는다 — E-13 이 rank 9 · `module: actio` · `role_projection: linked_actio_structures` 로 이미 선언하고, `s5_execution_contract.v2.json` 의 `e13_extension_domains` 가 선언한 `actio_case_signals.v2` 를 `extension_key` 로 함께 싣는다 | 모듈 L0-2 (E-13 레코드의 `extension_key`) |
|
||||||
|
| (라) 폴백 폐기 · `by_module` 채택 | 빈 입력은 구조 0 으로 기록. Θ 밖·`registered:false` 유형은 버리지도 일반화하지도 않고 `UNREGISTERED_EFFECT_TYPE_REVIEW` 로 가시화. `by_claim_form` 은 만들지 않는다 — claim-form 어휘가 registry 에 없고 `(module, role_projection)` 은 `type_id` 와 일대일이라 묶음 색인은 **`by_module`**(+구현에서 `by_bo_id` 추가) | 모듈 L0-3 · L2 역인덱스 셋 · 회귀 L-e/L-f |
|
||||||
|
|
||||||
|
### 1.3 왜 task 가 둘인가 — L1(조건부 LLM 판정)의 부재
|
||||||
|
|
||||||
|
Part 1(T7)·Part 2(R1)의 네 박자 문법에는 조건부 LLM 판정이 있다. Part 3 의 예외 부류를 세어 보면 — 미등록 효과 유형은 registry 가 **사람 검토**로 지정했고(`nonregistered_type_review_code`), 계산 참조 dangling·사이드카 불일치·도메인 간 누출은 결정론이며, "같은 유형에 다른 투영"은 실측 0건이다. **LLM 이 판정할 부류가 없으므로 L1 을 두지 않았고 예외 pack 도 만들지 않는다**(판정자 없는 pack 은 침묵 삼킴 아니면 상시 실패가 된다). 검토는 `review_handoff` 가 사람에게 나른다. 되돌림 경로는 열려 있다 — 판정 부류가 생기면 L0–L2 사이에 L1 을 끼우고 그때 pack 과 Part 2 F0 의 조건부 규칙을 그대로 가져온다. `task_procedure` 의 주석이 그 자리를 명시한다(통합본 1,027행 부근).
|
||||||
|
|
||||||
|
### 1.4 로직의 거처 — 모듈 1 · 정책 1
|
||||||
|
|
||||||
|
판정·조립 규칙은 YAML 문자열에 없다. **`structure_index_compiler.py`**(27,309 B · 529행 · 순수 함수 — 파일 I/O·시각·난수 없음)가 전부 갖고, 그 규칙의 선언은 **`structure_index_policy.v1.json`**(7,032 B)이 코드 밖에 둔다 — Θ 정의 · 전순서 · admission 두 단 · 부착 분할 · BO 조인 · SG-11 조인 키 · 보존 등식 셋 · 검토/경성 코드 목록. 정책 선언의 목적문은 적대 검증의 오라클로 쓰인다(Part 2 BO 투영 회차에서 실증된 방식).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. 전체 작업 DAG
|
||||||
|
|
||||||
|
`task_procedure`는 통합본 1,017–1,034행에 있다(1,035행 공백, 스테이지 층 `prevs`/`nexts`는 1,036–1,037행). 노드 4개(IN · task 2 · OUT), edge 오류 0. **완전 직렬** — L0 가 seed bundle 과 review handoff 를 내고서야 L2 가 선다.
|
||||||
|
|
||||||
|
```
|
||||||
|
┌────────┐
|
||||||
|
│ IN │
|
||||||
|
└───┬────┘
|
||||||
|
▼
|
||||||
|
P3-L0 Task_C_LE_L0_structure_seed_reducer code · timeout 240
|
||||||
|
⓪ assert_deployment — PART3_REQUIRED_ASSETS 10 리터럴 + 모듈 미러 4종을
|
||||||
|
한 벌로 검사(중복 제거 후 실측 10경로 · 등재·sha256·가독)
|
||||||
|
실패 PART3_ASSET_DEPLOYMENT_INCOMPLETE
|
||||||
|
① 모듈 4종 미러 반입·해시 대조 (runtime_common · schema_subset_validator ·
|
||||||
|
registry_loader · structure_index_compiler)
|
||||||
|
② 정책 반입(_verify_asset) — 판본 불일치 PART3_POLICY_INVALID
|
||||||
|
③ 의미 검사 둘 — seed 스키마가 theta·admission_policy 를 아는가
|
||||||
|
(PART3_STRUCTURE_SCHEMA_STALE) · 컴파일러 산출에 theta·order_key 가
|
||||||
|
실려 나오는가(PART3_COMPILER_STALE — TypeError 는 signature_mismatch)
|
||||||
|
④ 진입 봉인 둘 — signal_manifest 의 transaction_id 형식 + files[] 19항
|
||||||
|
해시 전수 대조(PART3_SIGNAL_SEAL_FAILED — files[].path 에 signals/ 접두사를
|
||||||
|
붙여 대조) · SG-01 의 registry_index_sha256 ↔ 색인 원문
|
||||||
|
(PART3_REGISTRY_INDEX_SEAL_FAILED) + 도메인별 config_sha256 사슬
|
||||||
|
⑤ 입력 적재 — SG-13·SG-05·SG-11(+공백 정상 SG-02·SG-07) · 도메인 봉투 ·
|
||||||
|
BO.json · 슬라이스 · config ×expected_runnable · 사이드카(_verify_asset ·
|
||||||
|
선언 0 도메인 부재만 정상) · 별칭표
|
||||||
|
⑥ compile_structure_seeds 호출 (모듈) —
|
||||||
|
L0-1 Θ 조립 → L0-2c 사이드카 교차 검증(방언 3·3 정규화 — 레코드 생성보다
|
||||||
|
앞이다: admission_policy 의 재료) → L0-2 (도메인,type_id) 레코드 + 3키
|
||||||
|
전순서 + admission 2단 + module·role_projection 부여(L0-5 는 별도 단계가
|
||||||
|
아니라 여기서 config 원문으로 끝난다) → L0-2b 슬라이스 투영 정합
|
||||||
|
→ L0-3 SG-13 조인(Θ 밖은 검토) + L0-4 도메인 소속
|
||||||
|
→ L0-6 SG-11 조인(signal_id ↔ 봉투 calculation_refs · 봉투 부재 계수)
|
||||||
|
→ L0-7 근거 refs 합집합 → L0-7b BO 부착(별칭 해소 → 부착 → 침묵 금지)
|
||||||
|
→ L0-8 검토 수집
|
||||||
|
⑦ 기록 — 봉인 거래 id 를 bundle 에 부착(모듈 밖 — YAML 래퍼가 반환 후 수행)
|
||||||
|
→ seed bundle · review handoff(OPEN) · receipt (닫힌 스키마 자기 검증)
|
||||||
|
│
|
||||||
|
▼ (L1 자리 — 비워 둠. 판정 부류가 생기면 여기 끼운다)
|
||||||
|
P3-L2 Task_C_LE_L2_final_structure_index_writer code · timeout 240
|
||||||
|
모듈 2종 반입 · 정책 반입 · 색인 스키마 의미 검사(by_module·by_bo_id —
|
||||||
|
PART3_INDEX_SCHEMA_STALE)
|
||||||
|
보존 등식 셋 — 바깥 수를 원본에서 직접 계수:
|
||||||
|
선언: 레코드 수 == Σ config.structure_types (PART3_STRUCTURE_COUNT_BROKEN)
|
||||||
|
근거: 부착 route + 미부착 == SG-13 원본 총수 (PART3_ROUTE_CONSERVATION_BROKEN)
|
||||||
|
BO: 부착 BO + 미부착 == BO.json 총수 (PART3_BO_CONSERVATION_BROKEN)
|
||||||
|
역인덱스 셋(by_domain_id · by_module · by_bo_id — ID 목록만)
|
||||||
|
→ legal_effect_structures.json (닫힌 스키마 검증 + 기록 후 재읽기)
|
||||||
|
→ review handoff FINALIZED 갱신 (공동 기록자)
|
||||||
|
│
|
||||||
|
┌───▼────┐
|
||||||
|
│ OUT │
|
||||||
|
└────────┘
|
||||||
|
```
|
||||||
|
|
||||||
|
DAG 설계에서 의도적으로 만들지 않은 것 둘 — **L1 노드**(§1.3)와 **예외 pack 파일**. L0→L2 사이의 파일 계약(seed bundle · review handoff)은 L1 을 나중에 끼울 수 있도록 지금 만들어 둔 것이다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. 소작업 2종 — 명칭 · 실행기 · 목적 · 작업 내역
|
||||||
|
|
||||||
|
| # | task 명칭 | 실행기 / 설정 | 작업 목적 | 작업 내역 |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| P3-L0 | `Task_C_LE_L0_structure_seed_reducer` | code-executor · `run_code` · python · requirements `httpx` · network `agent-network` · timeout 240 · 통합본 50–605행 (임베디드 code 547행 — 파일 59–605행) | Part 2 산출과 registry 선언을 **구조 seed 로 결정론 축약**한다 — Θ 를 세우고, (도메인, type_id) 레코드를 만들고, SG-13·SG-11·BO 를 조인하고, 검토를 모은다 | 도입부는 Part 2 A0 형태의 복사다(localdocs 보일러플레이트 · clientInfo 해시 변수 · 실행 뿌리 `/tmp/s1` 공유). ⓪~⑦ 은 §2 DAG 박스 그대로다. 핵심 규율 — ① 판정 로직을 YAML 에 쓰지 않는다: `compile_structure_seeds` 한 호출이 전부다 ② 사이드카는 **읽는 시점에** `_verify_asset`(매니페스트 해시 대조)로 지키고, `structure_types` 선언 0 인 도메인(오늘 EC-00 하나)의 부재만 정상으로 스킵·기록한다 ③ 도메인 봉투 부재는 침묵 스킵이 아니라 `audit.input_gaps` 계수다(실주행에서 감시 도메인 봉투 부재는 상시 경로) ④ SG-02·SG-07 은 읽되 레코드 0 이 정상 — 조인 코드를 두지 않고 영수증에 형식화된 사실로 남긴다 ⑤ 진입 봉인의 `transaction_id` 를 bundle 에 부착해 L2 가 signal_manifest 를 다시 읽지 않게 한다 ⑥ 자기 산출을 닫힌 스키마(`structure_seed_bundle.schema.json`)로 검증한 뒤에만 기록한다. **결론을 내리지 않는다 — 선언과 근거를 잇기만 한다** |
|
||||||
|
| P3-L2 | `Task_C_LE_L2_final_structure_index_writer` | code-executor · 동일 5키 · timeout 240 · 통합본 607–1,015행 (임베디드 code 400행 — 파일 616–1,015행) | seed bundle 을 **최종 `legal_effect_structures.json` 으로 확정**하고 세 방향 색인과 품질 게이트를 쓴다 | 입력은 전부 파일 계약이다(메모리 전달 없음). **판정 파일은 없다** — L1 부재이므로 Part 2 F0 의 조건부 규칙(`exception_count > 0` 이면 판정 부재 = 실패)을 흉내 내지 않는다. 보존 등식 셋의 **바깥 수는 이 task 가 원본에서 직접 센다** — 선언 수는 `domain_config`(무결성은 SG-01 봉인 → `_registry_index` → `config_sha256` 사슬 재사용), route 총수는 `signals/legal_effect_routes.json`, BO 총수는 `BO.json`. bundle 의 counts 와 비교하면 같은 호출의 산물끼리 비교라 항등식으로 퇴행하기 때문이다. 부착 route 는 레코드에서 재계수한다(bundle counts 를 믿지 않는다). 역인덱스는 ID 목록만 담고 본문을 복제하지 않는다. 검토 재산정은 handoff 항목을 코드·심각도로 묶은 `review_queue` 로 — review 는 근거 없이 줄지 않는다. 닫힌 스키마(`legal_effect_structures.schema.json`) 검증 → 기록 → 재읽기 해시 대조 → handoff `FINALIZED` 갱신(공동 기록자) |
|
||||||
|
|
||||||
|
**구조 레코드의 정의** (두 task 가 공유하는 계약) — 레코드는 **Θ 의 (도메인, `type_id`) 쌍마다 정확히 하나**다. SG-13 route 와 BO 부착은 레코드 위에 붙는 근거이지 레코드 생성 주체가 아니다. 그래서 레코드 수가 registry 선언에서 결정론으로 나오고(26 도메인 전수면 73), 근거가 하나도 없는 유형은 "선언됐으나 근거 없음"으로 보이며, 선언 0 인 EC-00 은 자연히 0 이다. `structure_id` 는 `LES-<도메인ID>-<type_id>` 로 결정론이다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. IO — 작업별 입력·출력 파일과 포맷
|
||||||
|
|
||||||
|
경로 표기: 접두어 없는 경로는 **사건 작업공간**(런타임 산출), `Default_Agent/` 로 시작하는 경로는 **정적 자산**(배포 원본 트리 — §6).
|
||||||
|
|
||||||
|
| # | task | IN | OUT |
|
||||||
|
|---|---|---|---|
|
||||||
|
| P3-L0 | `Task_C_LE_L0_structure_seed_reducer` | **Part 2 산출** — `signals/signal_manifest.json` (json, v2 · 진입 봉인) · `signals/legal_effect_routes.json` (json, SG-13 봉투) · `signals/legal_relation_lifecycle_signals.json` (SG-05) · `signals/calculation_requirements.json` (SG-11) · `signals/procedural_posture_relief_signals.json` (SG-02, 레코드 0 정상) · `signals/asset_right_state_signals.json` (SG-07, 〃) · `signals/domain_signals/<domain_id>.json` (json ×실재분 — 부재는 계수) · `BO.json` (json 리스트, 18키 레코드) · `runtime/domain_slices/<domain_id>.json` (json ×expected_runnable — 정합 검사용) / **Part 1 산출** — `routing/domain_activation_manifest.json` (json, SG-01 — Θ 정의역 + 봉인 원문) / **자산** — `Default_Agent/runtime_manifest.json` · `domains/_registry_index.json` · `domains/<id>/domain_config.json` ×expected_runnable · `domains/<id>/structure_types.json`·`module_role_projection.json` (선언 있는 도메인만, `_verify_asset`) · `stage1_runtime/structure_index_policy.v1.json` · `routing/extension_payload_key_declarations.v1.json` (`legacy_alias_targets` — BO 별칭표) · `platform/schemas/structure_seed_bundle.schema.json` + 모듈 미러 4종(`.txt`) + 게이트가 존재·해시만 미리 보는 자산(`legal_effect_structures.schema.json` · `signals/signal_registry.v2.json` · `contracts/signals/s5_execution_contract.v2.json`) | `stage1_tmp/task_le/structure_seed_bundle.json` (json, 루트 키 `structure_seed_bundle` · `stage1_structure_seed_bundle.v1`) · `quality_gates/stage1_part3_review_handoff.json` (json, 루트 키 `stage1_part3_review_handoff` · `stage1_part3_review_handoff.v1` · status OPEN) · `validation_assets/routing/part3_receipt.json` (json, `stage1_part3_receipt.v1` — 게이트 실측 · 봉인 둘 · 조인 계수 · SG-02/07 공백 · 사이드카 방언 지도 · BO sha(무봉인 비대칭 관찰) · 해결된 전순서표) |
|
||||||
|
| P3-L2 | `Task_C_LE_L2_final_structure_index_writer` | `stage1_tmp/task_le/structure_seed_bundle.json` · `quality_gates/stage1_part3_review_handoff.json` · `routing/domain_activation_manifest.json` (SG-01) · `signals/legal_effect_routes.json` (SG-13 원본 — route 바깥 수) · `BO.json` (BO 바깥 수) · `Default_Agent/domains/<id>/domain_config.json` ×expected_runnable (선언 바깥 수 · `config_sha256` 사슬) · `domains/_registry_index.json` + 자산 `stage1_runtime/structure_index_policy.v1.json` · `platform/schemas/legal_effect_structures.schema.json` · `runtime_manifest.json` + 모듈 미러 2종(`runtime_common` · `schema_subset_validator`). **signal_manifest 는 읽지 않는다** — 거래 id 는 bundle 로 승계된다 | **`legal_effect_structures.json`** (json, 실행 루트 — 루트 래핑 없이 `schema_version: stage1_legal_effect_structures.v1` · `status` · `theta` · `structure_records[]` · `structure_index{by_domain_id, by_module, by_bo_id}` · `quality_gate`) · `quality_gates/stage1_part3_review_handoff.json` (**FINALIZED 로 갱신 재기록** — L0 과 공동 기록자) |
|
||||||
|
|
||||||
|
**bundle 레코드의 필드** (닫힌 스키마 필수 16키) — `structure_id` · `domain_id` · `type_id` · `priority_rank` · `order_key`(3원소) · `module` · `role_projection` · `admission_policy` · `routes[]`(signal_id·source_seed_id·registered·status) · `route_count` · `evidence_refs` · `meeting_clause_refs` · `calculation_request_refs` · `source_bo_ids` · `review_codes` · `review_required` + 선택(`admission_rule` · `registered_declared` · `extension_key` — E-13 은 `actio_case_signals.v2`).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. upstream–downstream 연결 — 이유 · 방식 · 자료 사용 방식
|
||||||
|
|
||||||
|
| 연결 | 연결 이유 | 연결 방식 | 자료 사용 방식 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| Part 2 S0 → P3-L0 (진입 봉인) | Part 3 는 signal 을 **봉인 검증 없이 신뢰하지 않는다.** Part 2 미수행·부분 배포 상태에서 착수하는 것을 막는 사실상의 순서 강제다 | `signal_manifest.json` 의 `transaction_id` 형식(`^S5TX-[a-f0-9]{20}$`) + `files[]` 19항의 `file_sha256` 전수 대조. **files[].path 에는 `signals/` 접두사가 없으므로 붙여서 대조한다** | 어긋나면 `PART3_SIGNAL_SEAL_FAILED` 로 선다. 검증된 `transaction_id` 는 bundle 에 부착돼 L2·최종 산출까지 승계된다(L2 의 재독 금지) |
|
||||||
|
| Part 1 D0 → P3-L0 (Θ 의 정의역) | 활성 판정은 Part 1 의 몫이고 Part 3 는 **소비만** 한다. Θ 는 `expected_runnable_domain_ids` 로만 정해진다 — 사건 이름이 개입할 자리가 없다(137종) | 파일 계약 — `routing/domain_activation_manifest.json` (SG-01) | `expected_runnable` 이 Θ 의 정의역·레코드 생성 범위·사이드카/봉투/슬라이스 읽기 범위를 전부 정한다. SG-01 의 `registry_index_sha256` 은 색인 원문과 대조된다 — 전순서 둘째 키가 색인의 배열 위치에 걸려 있어 **이 봉인만이 색인 교체를 잡는다**(매니페스트 미등재 자산) |
|
||||||
|
| registry → P3-L0 (선언의 정본) | 효과 유형·우선순위·module·역할 투영의 정본은 `domain_config.structure_types` 다. Part 3 는 **registry 가 말하지 않는 값을 만들지 않는다** | `domain_config.json` ×expected_runnable — 무결성은 SG-01 봉인 → `_registry_index.json` → 행별 `config_sha256` 사슬 | 사이드카 2종은 **교차 검증 대상**이다 — 목록 방언 3종(`entries`·`structure_types`·`types`)·투영 방언 3종을 하나의 정규화 리더로 읽어 config 와 집합 동등성을 단언하고(오늘 73/73), `admission_policy` 두 단 정의(파일 정책 → 항목 `admission_rule`)와 `default_projection` 을 여기서 얻는다. 어긋나면 `PART3_REGISTRY_SIDECAR_MISMATCH` 검토 |
|
||||||
|
| Part 2 S0 → P3-L0 (SG-13 · 효과 경로) | worker 가 낸 `legal_effect_candidates` 를 S0 이 SG-13 으로 실어 놓았다 — Part 3 효과 경로의 원천이다(구 이름 `legal_effect_signals.json` 은 더 이상 읽지 않는다 — C-7 폐쇄) | 파일 계약 — `record_type == "legal_effect_route"` 만 조인. `details.type_id`·`registered`·`source_seed_id` 사용 | Θ 안·자기 도메인 선언이면 그 레코드에 부착. Θ 안·남의 도메인 유형이면 선언 도메인 전부에 부착 + `PART3_EFFECT_TYPE_CROSS_DOMAIN`. Θ 밖·`registered:false` 는 버리지 않고 `UNREGISTERED_EFFECT_TYPE_REVIEW`(+사이드카 `default_projection` 동반). **분할은 부착 여부로만** — `registered:false` 라도 붙은 채 검토 꼬리표를 단다(이중 계상 금지, 근거 보존 등식의 전제) |
|
||||||
|
| Part 2 S0 → P3-L0 (SG-11 · 계산 조인) | 계산 요청과 구조의 연계는 Stage 2 의 재료다 | SG-11 레코드의 **`signal_id`**(worker `request_id` 승계값 — `details.request_id` 는 보장되지 않는 키라 쓰지 않는다) ↔ 도메인 봉투 `calculation_refs` | 매칭분은 그 도메인 레코드들의 `calculation_request_refs` 로. 봉투에 있는데 SG-11 에 없으면 `PART3_CALCULATION_REF_DANGLING` 검토. 봉투 참조에 연결되지 않은 SG-11(합성 id)은 구조에 싣지 않되 영수증 미연결 계수로 형식화 |
|
||||||
|
| Part 2 F0 → P3-L0 (BO 부착) | SG 층의 `source_bo_ids` 가 실측 공백이라 **BO↔구조 연결은 이 조인이 유일하게 세운다.** BO 투영 회차가 BO 레코드에 실은 registry 토큰(`Legal_Keywords` = type_id 들 · `provenance.source_domain`)을 여기서 회수한다 | 3단 결정론 — ① `source_domain` 별칭 해소(registry ID 면 그대로, 아니면 `legacy_alias_targets` **목록** — `B1_Money_Successor → [E-02, E-03]` 처럼 다중 타깃, 해소 불능은 `PART3_BO_DOMAIN_UNRESOLVED`) ② 해소된 모든 d 에 대해 `t ∈ Legal_Keywords` 인 (d, t) 레코드에 `source_bo_ids` 부착 ③ 어디에도 닿지 않으면 `PART3_BO_UNATTACHED` — **부착 실패 침묵 금지** | BO 보존 등식(부착 + 미부착 == BO 총수)이 L2 에서 원본 계수로 검증된다. 부착 결과의 사영이 `by_bo_id` 색인이다 |
|
||||||
|
| P3-L0 → P3-L2 | 축약과 확정을 가른다(Part 1 T5·Part 2 R0 와 같은 결정론 reducer 문법). 둘 사이 파일 계약은 **L1 을 나중에 끼울 자리**이기도 하다 | 파일 계약 둘 — seed bundle · review handoff. 그래프 `wait_until: [L0]` | L2 는 bundle 의 레코드를 그대로 확정하되 **counts 를 믿지 않는다** — 부착 route·BO 를 레코드에서 재계수하고 바깥 수를 원본에서 직접 세어 등식 셋을 건다. handoff 는 FINALIZED 로 갱신하며 항목을 줄이지 않는다 |
|
||||||
|
| P3-L2 → Part 4 · Stage 2 | 하류가 BO 행마다 구조를 찾는 소비 형태(구 Part 4 의 `by_bo_id` 접근)와 도메인/module 단위 소비를 모두 직접 색인으로 받친다 | `legal_effect_structures.json` 의 `structure_index` 3종 + 인계면 선언표(소비 task 이름은 Part 4 착수 시 기입) | 레코드 본문은 한 곳(`structure_records[]`)에만 있고 색인은 ID 목록만 담는다. `quality_gate` 의 등식 3종·`review_queue` 가 하류의 신뢰 근거다 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 6. Part 3 작업용 assets — 정확한 배포 위치
|
||||||
|
|
||||||
|
배포 원본은 **`v.7/extension_research/Default_Agent/`** 트리다(런타임이 `Default_Agent/` 로 본다). Part 3 개정이 이 트리에 **55 파일을 더해 155 → 210** 이 됐고, `runtime_manifest.json` 은 **371 → 426항**(델타 정확히 55 · 기존 행 수정 0 · indent=2 왕복 보존)이다. 등재-실물 대조는 트리 실재 등재분 전수 해시 일치 · 불일치 0.
|
||||||
|
|
||||||
|
### 6.1 신설 자산 5종 (이 회차 작성)
|
||||||
|
|
||||||
|
| 배포 경로 (`Default_Agent/` 기준) | 크기 | 형태 | 쓰는 task | 역할 |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| `stage1_runtime/structure_index_compiler.py` | 27,309 B · 529행 | py | — (정본) | **조립·판정 로직 전부.** 순수 모듈 — I/O·시각·난수 없음(같은 입력 = 같은 출력). 방언 정규화 리더 · Θ · 전순서 · 조인 · 검토 |
|
||||||
|
| `stage1_runtime/structure_index_compiler.txt` | 27,309 B (바이트 동일) | 미러 | L0 (반입) | `.py` 의 미러. L0 가 `read_raw` → 매니페스트 해시 대조 → `/tmp/s1/_rt` 에 `.py` 기록 → import (R-1~R-5 규약) |
|
||||||
|
| `stage1_runtime/structure_index_policy.v1.json` | 7,032 B | json | L0 · L2 (`_verify_asset`) | 규칙의 코드 밖 선언(`stage1_structure_index_policy.v1`) — Θ 정의 · 3키 전순서 · admission 2단 · 부착 분할 · BO 조인 · SG-11 키 · 등식 셋 · 검토 7종/경성 14종 코드 목록. 판본 불일치는 `PART3_POLICY_INVALID` |
|
||||||
|
| `platform/schemas/structure_seed_bundle.schema.json` | 9,128 B | json | L0 (자기 산출 검증 + 능력 검사) | seed bundle 닫힌 스키마(`additionalProperties: false`). **파일명에 판본을 넣지 않는다** — 빌더의 `$ref` 폐포·형식 검증이 `*.schema.json` 만 훑기 때문. 열거를 하드코딩하지 않고 패턴만 쓴다 — 어휘 패턴 3종(type_id `^[a-z][a-z0-9_]{1,127}$` · 도메인 `^(?:(?:EC\|E)-[A-Z0-9]{2,8}\|X[A-Z0-9]{1,8})$` · 검토 코드 `^[A-Z][A-Z0-9_]{2,127}$`)과 식별자 패턴 2종(`structure_id` `^LES-…$` · 거래 id `^S5TX-[a-f0-9]{20}$`). 도메인 증설 시 스키마 무수정 |
|
||||||
|
| `platform/schemas/legal_effect_structures.schema.json` | 6,809 B | json | L2 (자기 산출 검증 + 능력 검사) | 최종 산출 닫힌 스키마. 같은 명명·패턴 규칙 |
|
||||||
|
|
||||||
|
### 6.2 복사 배포 — registry 사이드카 2종 ×25 (합 50 파일 · 39,254 B)
|
||||||
|
|
||||||
|
`domains/<id>/structure_types.json` · `domains/<id>/module_role_projection.json` — EC-00 제외 25개 도메인. 조립본(`선행구축/Default_Agent_Stage_1/`)의 동명 파일을 **바이트 동일 복사**만 했다(내용 수정 0 — 방언 통일은 registry 소유자 몫). 복사 전 원천 정합으로 `domain_config.json` 26/26 이 조립본과 바이트 동일임을 확인했다. 사이드카가 갈리는 방언 — 목록 키 3종(`entries` 10 · `structure_types` 9 · `types` 6) · `schema_version` 6종 · 투영 키 3종 · 정책 자리 4갈래 — 은 정규화 리더가 전부 읽으며, config 와의 합집합 대조는 73/73 · 불일치 0 이다.
|
||||||
|
|
||||||
|
### 6.3 기존 자산 중 Part 3 가 새로 소비하는 것
|
||||||
|
|
||||||
|
| 배포 경로 | 크기 | 쓰는 task | 쓰임 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| `runtime_manifest.json` | 66,526 B · **426항** | L0 · L2 | 반입 자산 sha256 선언표. 게이트·`_verify_asset` 의 대조 원천. 매니페스트는 Stage 1 전 계열의 상위 장부라 배포 트리에 실물 없는 항목(계산기·법령판 등)이 정상이다 — 검사는 자기가 읽는 경로만 건다 |
|
||||||
|
| `domains/_registry_index.json` | 18,921 B | L0 · L2 | 도메인 순서(전순서 둘째 키)와 `config_sha256`. **매니페스트 등재 대상이 아니라 SG-01 봉인이 지킨다** |
|
||||||
|
| `routing/extension_payload_key_declarations.v1.json` | 23,071 B | L0 | `legacy_alias_targets` — BO 부착의 별칭표(구 이름 → registry ID 목록). Part 2 F0 와 같은 자산이다 |
|
||||||
|
| `signals/signal_registry.v2.json` · `contracts/signals/s5_execution_contract.v2.json` | 10,907 B · 1,451 B | (게이트 선검사) | 하류 소비 자산의 배포 완전성을 L0 게이트가 미리 본다. E-13 `extension_key`(`actio_case_signals.v2`)의 선언 원천은 s5 계약의 `e13_extension_domains` 다 |
|
||||||
|
|
||||||
|
**모듈 반입 — `stage1_runtime/` (`.py` 정본 + 바이트 동일 `.txt` 미러 쌍)**
|
||||||
|
|
||||||
|
| 모듈 | 크기(미러) | 반입 task | 역할 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| `runtime_common` | 4,496 B | L0 · L2 | 공통 런타임 |
|
||||||
|
| `schema_subset_validator` | 7,442 B | L0 · L2 | 닫힌 스키마 검증기 (L0 는 bundle, L2 는 최종 산출을 자기 검증) |
|
||||||
|
| `registry_loader` | 6,404 B | L0 | registry 적재 |
|
||||||
|
| `structure_index_compiler` | 27,309 B | L0 | **신설** — §6.1 |
|
||||||
|
|
||||||
|
`PART3_REQUIRED_ASSETS` 는 10 리터럴이다 — 스키마 2 · 정책 1 · 별칭표 1 · signal registry 1 · s5 계약 1 · 미러 4. 사이드카 50 은 게이트 목록에 넣지 않고 읽는 시점의 `_verify_asset` 이 지킨다(expected_runnable 것만 읽으므로 — Part 2 가 seed 스키마·검증기 미러에 쓴 규율).
|
||||||
|
|
||||||
|
### 6.4 작업명세서와 계약 문서
|
||||||
|
|
||||||
|
| 경로 | 내용 |
|
||||||
|
|---|---|
|
||||||
|
| `ver_8_yaml_candidates/stage_1_part_3_v.8.yml` | 통합본 (52,878 B · 1,037행) |
|
||||||
|
| `ver_8_yaml_candidates/P3-L0_structure_seed_reducer_v1.yml` · `P3-L2_final_structure_index_writer_v1.yml` | 조각 후보본 (통합본과 블록 동일) |
|
||||||
|
| `선행구축/Default_Agent_Stage_1/handoffs/stage1_part_interface.v1.json` | 인계면 선언표 — 34 → **45줄** (§7). 실행 자산이 아닌 계약 문서라 조립본 소재를 유지한다 |
|
||||||
|
| `선행구축/Default_Agent_Stage_1/handoffs/stage1_stage_chain.v1.json` | Part 3 구간 갱신 — yaml `stage_1_part_3_v.8.yml` · requires 3종 · produces 4종 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 7. Part 2 → Part 3 인계면 (선언표 45줄)
|
||||||
|
|
||||||
|
이 회차가 선언표에 **신규 11줄**을 더하고 기존 여러 줄을 갱신해 `handoff_count` 34 → 45 가 됐다. 검사기 `_check_stage1_interface.py` 를 세 통합본(Part 1·2·3) 전수로 돌려 **finding 0** 이다.
|
||||||
|
|
||||||
|
**신규 11줄** — 정본 signal 경로 6(SG-13 · SG-05 · SG-11 · SG-02 · SG-07 · `domain_signals/<id>` 패턴 — 전부 `produced_by_module: signals/compiler/common.py` 로 필수 키를 위임, SG-02/07 은 `optional: true`) + Part 3 산출 4(seed bundle · review handoff(`also_written_by: L2`) · `legal_effect_structures.json`(소비자 빈 배열 + note "Part 4 F0 · Stage 2 가 읽는다") · receipt) + **`client_goal.json` 등재 1**(C-8 폐쇄).
|
||||||
|
|
||||||
|
**기존 갱신** — ① `runtime/domain_slices/<id>` 소비자에 L0 ② `client_meeting.md` 소비자에 Part 2 A0(**중복 두 행 — `entry_inputs` 와 `handoffs` — 모두** 갱신, C-8) ③~⑤ 구 이름 3종(`actio_case_signals.json` 등)에서 Part 3 소비자 제거(**C-7 폐쇄** — Part 3 는 정본 집합 `downstream_read_sets.part3_L0` 로 이관 완료) ⑥~⑧ `signal_manifest.json`(L0) · `domain_activation_manifest.json`(L0·L2) · `BO.json`(L0·L2) 소비자에 실제 task 이름 등재 + `Stage_1.Part_3` 약칭 제거(`postb_compiled_bundle_compact.json` 의 약칭도 제거 — Part 3 는 읽지 않는다).
|
||||||
|
|
||||||
|
Part 2 가 만들어 **Part 3 가 읽는** 파일은 아홉 갈래다 — signal_manifest(봉인) · SG 5종 · domain_signals 패턴 · BO.json · 슬라이스 패턴. Part 1 에서 직접 받는 것은 SG-01 하나다. **사건 원문(`client_meeting.md` · `evidence_all.json`)은 읽지 않는다** — Part 3 는 Part 1·2 가 확정한 것 위에서만 선다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 8. 검증 상태
|
||||||
|
|
||||||
|
### 8.1 정적 검사
|
||||||
|
|
||||||
|
| # | 검사 | 결과 |
|
||||||
|
|---|---|---|
|
||||||
|
| 1 | YAML 구문 (`yaml.safe_load`) | PASS |
|
||||||
|
| 2 | `task_name` ↔ 그래프 노드 1:1 | task 2 / 노드 2 · 차집합 0 |
|
||||||
|
| 3 | 선언 1벌 | `Agent` 1 · `Stages` 1 · `tasks` 1 · `task_procedure` 1 · `prevs`/`nexts` 각 1벌 |
|
||||||
|
| 4 | DAG 정합 | 노드 4 · edge 오류 0 · 완전 직렬 |
|
||||||
|
| 5 | code-executor `parameters` 5키 | 2 task 전부 준수 |
|
||||||
|
| 6 | embedded python AST | 실패 0 · 미정의 이름 0 (모듈 포함) |
|
||||||
|
| 7 | 개별 2종 ↔ 통합본 | 블록 불일치 0 |
|
||||||
|
| 8 | 금지 참조(비주석) | `Claude_YAML` 0 · 구 signal 이름 3종 0 · `case_kind_domain_matrix` 0 · 조립본 경로 0 |
|
||||||
|
| 9 | 인계면 검사기 (3 yaml 전수) | **finding 0** |
|
||||||
|
| 10 | 매니페스트 등재-실물 | 426항 · 트리 실재 등재분 전수 해시 일치 · 불일치 0 · 미러 `.py`↔`.txt` 동일 |
|
||||||
|
|
||||||
|
### 8.2 예행 — 3패스 (실입력 · asset root = 배포 원본)
|
||||||
|
|
||||||
|
기존 2패스(Part 1 코드 5종+A0 → seed 대역 → R0·F0·S0) 뒤에 **pass3(L0·L2)** 를 이었다. 실행 루트 신선, `/tmp/s1`·`/tmp/s1_r0` 청소 절차 유지.
|
||||||
|
|
||||||
|
| 패스 | 내용 | 결과 |
|
||||||
|
|---|---|---|
|
||||||
|
| pass1 | Part 1 코드 task 5종 + P2-A0 | PASS · 6단계 · 기록 45건 |
|
||||||
|
| (사이) | seed 대역 | written 3 (X1·X2·X3) |
|
||||||
|
| pass2 | P2 R0 · F0 · S0 | PASS · 3단계 · 기록 29건 |
|
||||||
|
| **pass3** | **P3 L0 · L2** | **PASS · 2단계 · 기록 5건** (bundle · handoff · receipt · 최종 산출 · handoff 갱신) |
|
||||||
|
|
||||||
|
산출물 값 검증 — `legal_effect_structures.json` 실생성: status READY · **Θ 4종** (`asset_state`·`general_legal_effect`·`succession_notice_lien_asset_defense`·`valuation`) · **구조 레코드 6건**(X1 2·X2 2·X3 2 — (도메인,type_id) 쌍) · SG-13 route **6/6 부착** · **BO 2/2 부착**(bh1→X1 두 레코드 · bh2→X2 두 레코드 — `by_bo_id` 색인 성립) · 보존 등식 셋 전부 pass · `transaction_id` 승계(`S5TX-…`) · handoff FINALIZED · 영수증에 게이트 실측 10경로·봉인 둘·조인 계수·SG-02/07 공백 형식화·사이드카 방언 지도·전순서표 6줄.
|
||||||
|
|
||||||
|
### 8.3 26 도메인 합성 실측과 계산 조인 탐침 (예행 한계의 보완)
|
||||||
|
|
||||||
|
예행 Θ 는 4종에 그치므로(대역 스크리너가 상시 계열만 활성) 둘을 따로 쟀다 — ① 26 도메인 전부를 `expected_runnable` 로 둔 합성 SG-01 로 컴파일러를 돌려 **Θ 56종 · 구조 레코드 73건(= 선언 합) · module 34종 · 2회 실행 직렬화 동일 · 색인 머리 4줄**(rank 1 의 `money_claim`(E-02)·`money_claim`(E-03)·`construction_payment_claim`(E-07)·`lease_deposit_return`(E-08) — 병합하지 않으므로 넷) ② `request_id` 를 넣은 합성 재료로 **정상 조인·dangling 검토·미연결 형식화** 각 1 회씩 실증. 둘 다 회귀 결과 JSON 에 `SUPP-synth26` · `SUPP-calc-probe` 로 영구 기록했다.
|
||||||
|
|
||||||
|
### 8.4 회귀 22종 (L-a ~ L-s) — 전건 기대대로 발화
|
||||||
|
|
||||||
|
변조는 전부 **사본** 자산 트리/실행 루트에서 수행했다(배포 원본 무변). 필수 8종은 굵게.
|
||||||
|
|
||||||
|
| id | 시나리오 | 관측 |
|
||||||
|
|---|---|---|
|
||||||
|
| L-a | 필수 자산 1건 결손 | `PART3_ASSET_DEPLOYMENT_INCOMPLETE` |
|
||||||
|
| **L-b** | seed 스키마+매니페스트 함께 옛 판본 | `PART3_STRUCTURE_SCHEMA_STALE` · 기록 구조 0 |
|
||||||
|
| **L-b2** | 색인 스키마+매니페스트 함께 옛 판본 | `PART3_INDEX_SCHEMA_STALE` |
|
||||||
|
| **L-c** | 서명 같고 theta/order_key 투영만 잃은 컴파일러 | `PART3_COMPILER_STALE` |
|
||||||
|
| L-d | signal_manifest 의 `file_sha256` 변조 | `PART3_SIGNAL_SEAL_FAILED` |
|
||||||
|
| **L-d2** | 색인 도메인 순서 변경(SG-01 봉인 그대로) | `PART3_REGISTRY_INDEX_SEAL_FAILED` |
|
||||||
|
| L-e | Θ 밖 type 주입(봉인 동반 갱신) | 버려지지 않고 `UNREGISTERED_…_REVIEW` · 등식 유지 · 구조 수 보존 |
|
||||||
|
| L-f | `registered:false` + `default_projection` | 같은 검토 + 투영 동시 탑재 |
|
||||||
|
| L-g | Θ 안·남의 도메인 유형 | `PART3_EFFECT_TYPE_CROSS_DOMAIN` · 선언 도메인 전부에 부착 |
|
||||||
|
| L-h | rank 1 넷 동시 활성 | 색인 머리 네 줄 · 순서 결정론 |
|
||||||
|
| L-i | E-04·E-11 동시 활성 | `land_use_gain` 레코드 둘(rank 5·6) · E-11 선언 순서 보존 |
|
||||||
|
| L-j | EC-00 만 활성 | 구조 0 · 등식 통과 · 실패 아님 |
|
||||||
|
| **L-k** | `active ⊊ expected_runnable`(감시 도메인) | 감시 도메인 효과가 Θ 안 — 검토로 쓸려가지 않음 · **봉투 부재 2건 계수 기록** |
|
||||||
|
| L-l | 사이드카 항목 제거(매니페스트 동반) | `PART3_REGISTRY_SIDECAR_MISMATCH` |
|
||||||
|
| L-m | 슬라이스 투영 어긋남 주입 | `PART3_SLICE_PROJECTION_DIVERGENCE` |
|
||||||
|
| **L-m2** | `registered:false`·Θ 안·자기 도메인 | 붙은 채 검토 꼬리표 · 등식 불변 |
|
||||||
|
| L-n | 같은 입력 2회 | 산출 4파일 바이트 동일 |
|
||||||
|
| L-o | 137종 일반성 | 사건 이름 라우팅 0 · 구 이름/matrix/조립본 참조 0 |
|
||||||
|
| **L-p** | 무변조 트리 정규화 리더 | 세 방언 전부 읽어 73/73 · 불일치 0 |
|
||||||
|
| **L-q** | BO 부착 양성·음성 | 양성: 예행 2건 `by_bo_id` 등재. 음성: `PART3_BO_UNATTACHED`/`PART3_BO_DOMAIN_UNRESOLVED` + BO 등식 유지 |
|
||||||
|
| L-r | 정책 판본 변조(매니페스트 동반) | `PART3_POLICY_INVALID` |
|
||||||
|
| L-s | 매니페스트 **미동반** 변조 | `_verify_asset` 경성 실패 — 해시 게이트 자체의 발화 증명 (L-l·L-r 과 짝) |
|
||||||
|
|
||||||
|
### 8.5 적대적 sub-agent 검증 — 2라운드 (지적 5 → 0)
|
||||||
|
|
||||||
|
1차 지적 5건을 전부 반영했다. MAJOR 둘 — ① 선언표의 `client_meeting.md` 행이 **두 배열(entry_inputs·handoffs)에 중복**인데 절반만 갱신됐었다(검사기는 handoffs 만 읽으므로 기계 검증면 미반영) ② 도메인 봉투 부재가 침묵 스킵이었다(→ `audit.input_gaps` 계수 기록 + L-k 단언). MINOR 셋 — L2 의 계약 밖 `signal_manifest` 읽기(→ L0 가 거래 id 를 bundle 에 부착해 승계), 합성·탐침 증적 미보존(→ SUPP 2종 영구 기록), `Stage_1.Part_3` 약칭 잔존(→ 제거). 재검증 판정: **"지적 0건"**(반영 5 + 파급 12 = 17건 실측 전건 통과).
|
||||||
|
|
||||||
|
### 8.6 남은 것 — 이월 (조립본 동기화 회차)
|
||||||
|
|
||||||
|
Part 3 실행 경로 밖이다(배포 원본 단독 예행 전 사슬이 실증). ① 신설 자산·사이드카 등재의 조립본 반영 + 빌더 `PART3_ASSEMBLY_AUTHORED` 등록 + 사이드카 sweep 규칙(파일 반영과 등록은 한 벌 — 등록만 선행하면 `MISSING_SELECTED_SOURCE` 즉사) ② 조립본 `release_manifest`·`source_copy_map` 재생성 ③ 신선 빌드의 Part 3 자산 재현 확인 ④ `dry_run_receipt` 정본화(Part 2 M-* + Part 3 L-* 합본) ⑤ `effect_projection.schema_ref` dangling 해소(registry 소유자). **행동 검증(판정의 법률적 타당성)은 미측정으로 남는다** — 실 LLM 실주행과 법률 검토가 필요하며 대역으로 닫히지 않는다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 9. 근거
|
||||||
|
|
||||||
|
| 주장 | 근거 |
|
||||||
|
|---|---|
|
||||||
|
| 통합본 크기·행수·sha256 · task 행 범위(L0 50–605 · L2 607–1,015 · task_procedure 1,017–1,034 · prevs/nexts 1,036–1,037 — 범위는 내용 종행 기준·블록 구분 공백 제외) · 임베디드 code 행수(547 · 400) | 원문 바이트 재계산 + `- task_name:`/`code: \|-` 전수 추출 |
|
||||||
|
| 조각 2종 크기·통합본 블록 동일 | 파일 재계산 + 블록 문자열 포함 대조 |
|
||||||
|
| 신설 자산 5종·사이드카 50 의 크기·해시·미러 동일 | 배포 원본 트리 직접 해시 |
|
||||||
|
| 매니페스트 371→426 · 델타 55 · 기존 행 수정 0 · 실재 등재분 전수 일치 | `runtime_manifest.json` 파싱 + git HEAD 대비 diff + 전수 sha256 재계산 |
|
||||||
|
| 선언표 45 · 신규 11 · 갱신 내역 · 검사기 finding 0 | `stage1_part_interface.v1.json` 파싱 + `_check_stage1_interface.py` 3-yaml 실행 리포트 |
|
||||||
|
| 예행 3패스 수치(45/3/29/**5**)와 산출 값(Θ 4 · 레코드 6 · 부착 6/6·2/2 · 등식 3) | `/tmp/dry_p3/` 실물(`legal_effect_structures.json` · handoff · receipt · `_report_p1/p2/p3.json`) |
|
||||||
|
| 26 도메인 합성(56/73/34)·계산 탐침·회귀 22종 | 회귀 결과 기록(`part3_regression_results.json` — SUPP 2종 포함 24/24 PASS)과 그 스크립트 |
|
||||||
|
| 사이드카 방언 지도(목록 3 · 판본 6 · 투영 3 · 정책 4) · 73/73 | 정규화 리더 실행 + 신전략서 §1.2 실측 승계 |
|
||||||
|
| D-4 결정안·L1 부재 근거·입력 계약 I-1~I-14 | `stage_1_part_3_개정_신전략서.md` §2·§3·§4.1 (sub-agent 6라운드 검증 통과본) |
|
||||||
|
| 개정 실행 경과·적대 검증 2라운드 | `stage_1_part_3_개정작업내역서.md` · `v.7/MEMORY.md` ㉓ |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 10. 이 문서의 검증 이력
|
||||||
|
|
||||||
|
작성 후 독립 sub-agent 에 넘겨 다섯 필수 항목(전체 DAG · IO · 자산 배포 위치 · 소작업 · upstream–downstream)의 누락과 오기재를 전수 검증했다. 검증은 문서의 주장을 믿지 않고 통합본 원문 · 배포 원본 트리 · 예행 실물 · 회귀 기록을 직접 측정하는 방식으로 수행했다.
|
||||||
|
|
||||||
|
**라운드 1 — 지적 6건(전부 MINOR), 전부 반영.** ① 임베디드 code 행수 548/401 → **547/400**(`code: |-` 헤더 행 포함 여부의 계수 오류) ② 행 범위 규약 비일관(L0 종행이 블록 공백을 포함) → 내용 종행 기준으로 통일하고 규약을 §9 에 명문화 ③ §2 모듈 체인 순서 — 실물은 L0-2c(사이드카 교차 검증)가 레코드 생성보다 앞이고 L0-5 는 L0-2 안에서 끝난다 ④ transaction_id 부착은 모듈(⑥)이 아니라 YAML 래퍼(⑦)의 일이다 ⑤ §1.2 표가 신전략서 (다) 갈래(actio_remedy_or_cap)를 빠뜨리고 (라)를 둘로 쪼갰다 ⑥ seed 스키마의 패턴은 3종이 아니라 5종(어휘 3 + 식별자 2)이다.
|
||||||
|
|
||||||
|
**라운드 2 — 반영 6건 전부 실측 확인 · 수정 파급 0건 · 신규 지적 1건(MINOR)** — §0 의 L1 부재 교차참조가 §1.2 로 오기(정답 §1.3). **라운드 3 — 지적 0건.** 문서 내 절 참조 전수 재검까지 통과했다.
|
||||||
|
|
||||||
|
세 라운드에서 지적 7건(전부 MINOR — BLOCKER·MAJOR 0)을 받아 전부 반영했다. 라운드 1 의 ③·④가 시사하는 바를 남겨 둔다 — **요약 다이어그램은 코드의 실행 순서를 실측으로 옮겨야 한다.** 설계 문서(신전략서)의 단계 번호 순서를 그대로 옮기면, 구현이 정당하게 재배열한 순서(교차 검증을 재료 소비보다 앞에 두는 것)와 어긋난 채 정확해 보이는 그림이 남는다.
|
||||||
+375
@@ -0,0 +1,375 @@
|
|||||||
|
# Stage 1 — Part 3 개정 신전략서 (작업명세서)
|
||||||
|
|
||||||
|
- 작성일 2026-08-19 · 문서 위치 `v.7/extension_research/stage_1_part_3_개정_신전략서.md`
|
||||||
|
- 대상: `stage_1_update_strategy.md` §1 의 Part 3 구간(P3-L0 · P3-L1 · P3-L2)과 §4 세부 워크플로우
|
||||||
|
- 상위 계약: `ver_8_yaml_candidates/stage_1_part_1_v.8.yml` · `stage_1_part_2_v.8.yml`(195,938 B · BO 투영 회차 반영본) · `stage_1_part_1_and_2_updated_yaml_analysis.md`(2026-08-19 판)
|
||||||
|
- **이 문서는 `stage_1_part_3_개정방안전략서.md`(2026-08-19 09:37 판)를 대체한다.** 그 문서가 쓰인 뒤 같은 날 Part 2 의 BO 투영 회차가 실행 완료되어 전제 네 가지가 바뀌었다(§0.2). 구 문서는 참고용으로 제자리에 둔다.
|
||||||
|
- 정본 자산 뿌리(배포 원본): **`v.7/extension_research/Default_Agent/`** — 런타임이 `Default_Agent/` 로 보는 실제 배포 트리(155 파일). 조립본 `선행구축/Default_Agent_Stage_1/` 은 재생성 원천으로 강등됐고 실행 경로가 아니다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 0. 문서 성격과 판정 기준
|
||||||
|
|
||||||
|
### 0.1 완수의 정의 · 절대 원칙
|
||||||
|
|
||||||
|
이 명세를 실행해 만드는 Part 3 가 **완수**로 인정되는 기준은 실행 완주가 아니다 — **의도한 결과물(`legal_effect_structures.json` 과 그 색인)이 올바른 방식으로 생성되고, 소작업 간 upstream–downstream consistency(넘겨받은 파일을 올바로 읽고, handoff 를 정해진 포맷으로 넘김)가 끝까지 유지**되어야 한다.
|
||||||
|
|
||||||
|
절대 원칙(Stage 1 전체): Liti-agent 는 민사 137종 어느 사건이든 **registry 기반** — 사건 종류 이름이 아니라 증거 구성요소·요건 슬롯·단서 — 으로 다룬다. 자산은 법리 도메인 26(leaf 20 + 공통층 2 + 상시 4) · 계산 17 · signal 13 이며 정의는 `ensemble_v2.md` 다. **사건 종류 이름은 런타임 라우팅 키가 될 수 없다.**
|
||||||
|
|
||||||
|
제약: ① `v.7/Claude_YAML/` 의 구 yaml 이 지시하는 내용에 일절 의존하지 않는다 — Part 3 는 registry 와 Part 1·2 실산출 계약만으로 **새로 짓는다**(구 Part 3 v2 의 diff 가 아니다). ② Part 3 실행 자산(md·py·txt·json)은 전부 **`extension_research/Default_Agent/` 의 정확한 배포 위치 서브폴더에만** 만든다.
|
||||||
|
|
||||||
|
### 0.2 구 전략서에서 바뀐 전제 네 가지 (2026-08-19 BO 투영 회차의 결과)
|
||||||
|
|
||||||
|
| # | 구 전략서의 전제 | 지금의 사실 | 이 문서가 바꾸는 것 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| ① | 정본 자산 뿌리 = 조립본 `선행구축/Default_Agent_Stage_1/` | **배포 원본 = `extension_research/Default_Agent/`**(155 파일). 명세서 3곳의 `PART2_DEPLOYMENT_REMEDY` 가 이 트리를 정본화했고, 검증자가 이 트리 단독 재실행·바이트 동일을 실증했다 | 신설·복사 자산의 배치 목적지, `PART3_REQUIRED_ASSETS` 의 대조 대상, 예행의 `--asset-root` 전부 배포 원본 기준(§5·§6). 조립본 반영·빌더 등록·신선 빌드 재현은 **조립본 동기화 회차로 이월**(§10) |
|
||||||
|
| ② | `generate_runtime_manifest()` 뿌리 6개 — 370항 중 6 재현 불가(P3-0b 로 교정 예정) | **이미 교정됐다.** BO 투영 회차가 뿌리를 6→10 으로 늘렸고(`platform/schemas`·`contracts/signals`·`domains/_common`·`routing` 추가) 신선 시뮬레이션 395항 ⊇ 현행 370항(결손 0)을 실측했다 | P3-0b 를 "완료 확인"으로 축소(§6). 남은 것은 Part 3 자산의 등재 재현 규칙(사이드카 sweep)뿐이며 이월 묶음에 넣는다 |
|
||||||
|
| ③ | registry 사이드카(`structure_types.json`·`module_role_projection.json` ×25)를 조립본에서 읽는다(I-10) | 사이드카는 **배포 원본에 0건**이다(조립본에만 25+25). `domain_config.json` 의 `effect_projection.schema_ref` 도 배포 트리에서 dangling | 사이드카 2종 ×25 를 배포 원본으로 **바이트 복사 배포**하고 `runtime_manifest` 에 등재한다(§5.3). `effect_projection.schema.json` ×25 는 Part 3 가 읽지 않으므로 배포하지 않고 dangling 을 관찰로 기록(§10) |
|
||||||
|
| ④ | BO 레코드는 효과 유형을 싣지 않는다(SG-13 이 유일한 효과 원천, `source_bo_ids` 는 실측 공백) | **BO 투영 회차가 BO 레코드에 registry 토큰을 실었다** — `Legal_Keywords` = 그 후보의 `legal_effect_candidates[].type_id`(중복 제거·사전순), `Action` 은 `extensions.domain_payload.action_summary` 부재 시 `<bo_type>:<type_id>` 폴백(예행에서는 전건 폴백 경로), `provenance.source_domain` = 도메인 ID. 예행 실물: `bh1 = {source_domain: X1, Legal_Keywords: [general_legal_effect, succession_notice_lien_asset_defense]}` | **BO 부착 조인을 결정론으로 신설**한다(§4.2 L0-7b) — SG-05·SG-13 의 `source_bo_ids` 가 비어 있어도 BO↔구조 연결이 선다. 단 `source_domain` 은 Part 2 계약상 구 이름(B1~B5)일 수 있으므로 별칭 해소를 조인 앞에 둔다. 역인덱스에 `by_bo_id` 를 더한다(§4.3) |
|
||||||
|
|
||||||
|
그 밖의 정정 하나 — 구 전략서 I-4 는 SG-11 조인 키를 `details.request_id` 로 적었으나 그 키는 보장되지 않는다 — `emitter_runtime.py` 는 `details` 에 요청 원문을 통째로 복사하므로 worker 가 `request_id` 를 실은 실주행에서만 존재하고 예행에서는 부재다. 반면 `signal_id = request.get("request_id") or "calculation-request-<순번>"` 은 **항상 존재하며 `request_id` 를 승계**한다. 조인 키는 `signal_id` 다(§3 I-4).
|
||||||
|
|
||||||
|
### 0.3 구 전략서에서 승계하는 결정 (재론하지 않는다)
|
||||||
|
|
||||||
|
D-4 결정안 네 갈래(§2), L1 을 두지 않는 2-task 구성과 그 근거(§4.1), 스테이징 뿌리 `/tmp/s1` 공유, 스키마 파일명에 판본을 넣지 않는 규칙, order_key 3키 전순서, (도메인, `type_id`) 쌍 = 구조 레코드 정의, 보존 등식 둘과 부착 분할 규칙(이 문서가 BO 보존 등식 하나를 §4.3 에 신설해 셋이 된다), `admission_policy` 두 단 정의, 사이드카 방언 지도(목록 키 3 · `schema_version` 6 · 투영 키 3 · 정책 자리 4), `domains/_registry_index.json` 을 배포 게이트가 아니라 SG-01 봉인으로 지키는 규율. 각 근거 실측은 구 문서 §1 에 있고 이 문서 §1 이 배포 원본 기준으로 재확인한 값만 다시 적는다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. 전제 실측 (전부 배포 원본과 예행 실물에서 다시 쟀다)
|
||||||
|
|
||||||
|
### 1.1 registry — 배포 원본 `domain_config.json` 26종
|
||||||
|
|
||||||
|
- 배포 원본의 `domain_config.json` 26개는 조립본과 **26/26 바이트 동일**(사이드카 복사의 원천 정합 근거).
|
||||||
|
- `structure_types` 전수 = **선언 73건 · 고유 `type_id` 56종**. 레코드 필드는 정확히 4키 — `type_id` · `priority_rank` · `module` · `role_projection`.
|
||||||
|
- `general_legal_effect` 는 **10/26 도메인만** 선언(전부 rank 11 · `module: legal_effect`). 보편 폴백이 아니다.
|
||||||
|
- rank 는 도메인 간 전순서를 정의하지 못한다 — `land_use_gain` 이 E-04=5 · E-11=6 으로 갈리고, 같은 rank 에 서로 다른 유형이 **14개 rank**(1~6 · 20 · 21 · 71~76)에서 몰리고 관련 유형이 43종이다(머리 1~6 포함 — 구 전략서의 13/42 는 재실측으로 정정). **도메인 내부에서는 26/26 전부 rank 가 엄격 오름차순**이라 도메인 내 선언 순서는 rank 로 보존된다.
|
||||||
|
- `EC-00.structure_types == []` — 구조 0 은 정상값이다.
|
||||||
|
- `(module, role_projection)` 쌍 56개 ↔ `type_id` 56개 **일대일**. `module` 은 34종이고 12개가 2~6 유형을 덮는다 — 묶음 색인은 `by_module` 만 성립한다.
|
||||||
|
- 상시 도메인의 선언(예행 Θ 의 재료): X1 = `{succession_notice_lien_asset_defense(10), general_legal_effect(11)}` · X2 = `{asset_state(4), valuation(6)}` · X3 = X1 과 동일 2종 · E-00 = `{general_legal_effect(11)}` 하나.
|
||||||
|
|
||||||
|
### 1.2 사이드카 — 조립본에만 있고, 내용은 `domain_config` 와 일치한다
|
||||||
|
|
||||||
|
`domains/<id>/structure_types.json` · `module_role_projection.json` ×25(EC-00 만 없음 — 선언 0 도메인이므로 정합). 세 목록 방언(`entries` 10 · `structure_types` 9 · `types` 6)과 `schema_version` 6종, 투영 키 3종, 정책 자리 4갈래로 갈리지만, **정규화 리더로 읽으면 73/73 · 불일치 0** 이다. 정책 선언이 여기에 있다 — `nonregistered_type_review_code: "UNREGISTERED_EFFECT_TYPE_REVIEW"` · `silent_general_legal_effect_fallback_forbidden: true` · `registered_membership_required` · `multiple_types_allowed` · `source_order_deduplicated` · `default_projection` · `missing_mapping_policy`. `admission_policy` 는 두 단 정의(파일 단위 정책 3키 → 없으면 항목 단위 `admission_rule`)로 **73/73** 이 채워진다 — 둘째 단으로 채워지는 7건(E-00·E-15·X1·X3)은 상시 계열이라 예행의 주류다.
|
||||||
|
|
||||||
|
### 1.3 Part 2 실산출 — Part 3 의 입력면 (예행 `/tmp/dry_v6` 실물)
|
||||||
|
|
||||||
|
- `signals/signal_manifest.json`(v2): `downstream_read_sets.part3_L0 = ["SG-02","SG-05","SG-07","SG-11","SG-13"]` · `transaction_id ^S5TX-[a-f0-9]{20}$` · `files[]` 19항(자기 자신 제외, **`path` 에 `signals/` 접두사 없음**).
|
||||||
|
- 다섯 중 **SG-02·SG-07 은 구조적으로 비어 있다**(생산자 없음 · 레코드 0). SG-05(6) · SG-11(5) · SG-13(6) 은 채워진다. **다섯 전부 `source_bo_ids: []` · `issue_cluster_ids: []`** — signal 층의 BO 연결은 지금 비어 있다.
|
||||||
|
- SG-13 레코드: `record_type: "legal_effect_route"` · `details: {type_id, registered, source_seed_id, source_refs}` · `registered: false` 면 상류가 이미 `status: review` 로 내린다.
|
||||||
|
- SG-11 레코드: `signal_id`(= worker `request_id` 승계 또는 `calculation-request-<순번>`) · `details: {calculation_domain, completeness, review_code, source_refs}` — **`details.request_id` 는 없다.**
|
||||||
|
- `signals/domain_signals/<id>.json`(활성 도메인당 1): 루트 `domain_signal_envelope`, `evidence_slot_status[]` · `calculation_refs[]`(예행에서는 stub 이 `request_id` 를 안 실어 빈 배열) 등.
|
||||||
|
- `BO.json`: 레코드 18키 불변. BO 투영 회차 이후 `Legal_Keywords`·`Action`·`provenance.source_domain` 이 registry 토큰을 싣는다(§0.2 ④). `downstream_seed_refs.legal_effect_structure_seed_ref_proposed` 는 전부 null — Part 3 가 채울 자리가 예약돼 있다(이번 회차는 채우지 않는다 — BO.json 은 최대 호환면, §8.2).
|
||||||
|
- `routing/domain_activation_manifest.json`(SG-01): `expected_runnable_domain_ids` 가 Θ 의 정의역. `registry_index_sha256` 봉인 보유.
|
||||||
|
- `runtime/domain_slices/<id>.json`: `domain_declarations.structure_type_ids` 가 실려 있다(정합 검사 대상).
|
||||||
|
- 구 이름 3종(`actio_case_signals.json` 등 루트 별칭·호환 뷰)은 **읽지 않는다** — 이 이관이 Part 1|2 분석문서가 남긴 이월 **C-7** 이며, 이 문서의 입력 계약(§3)이 그것을 닫는다.
|
||||||
|
|
||||||
|
### 1.4 배포 지형 · 이월 인계
|
||||||
|
|
||||||
|
- 배포 원본 155 파일(`.json` 58 · `.md` 29 · `.py` 34 · `.txt` 34) · `runtime_manifest.json` **371항**(58,211 B) · 미러 34/34. **매니페스트는 Stage 1 전 계열의 상위 장부다** — 371항 중 배포 트리에 실물이 있는 것은 94항이고(전수 해시 일치·불일치 0), 나머지 277항(계산기 205 · 법령판 63 등)은 Part 1·2 실행이 반입하지 않는 모듈로 조립본에 실재한다. **매니페스트 전수 존재 검사를 배포 트리에 걸면 안 되는 이유다** — 게이트·`_verify_asset` 은 자기가 읽는 경로만 대조한다. 조립본은 세 파일이 낡았고(정책 부재·계약 구 바이트·매니페스트 370) 자기 장부(`release_manifest`)가 빌더 수정(뿌리 6→10)을 미반영(불일치 1) — 전부 조립본 동기화 회차 이월(D-1~D-6).
|
||||||
|
- Part 1|2 가 Part 3 에 넘긴 이월: **C-7**(구 signal 3종 → 정본 집합 이관 — §3 이 닫는다) · 인계면 선언표 갱신(개별 정본 signal 등재 + `client_goal.json` 등재 + `client_meeting.md` 소비자 — §5.6 이 닫는다) · 예행 영수증 정본화(D-5, Part 3 회귀 기록과 함께 이월 유지).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. D-4 결정안 (P3-0a 승인 대상 — 승인 없이 착수하지 않는다)
|
||||||
|
|
||||||
|
구 전략서 §2 를 승계한다. 네 갈래를 요지로 재확정한다.
|
||||||
|
|
||||||
|
**(가) 열거 범위 Θ** — `Θ(사건) = ⋃ { domain_config(d).structure_types[].type_id | d ∈ SG-01.expected_runnable_domain_ids }`. `active_domain_ids` 가 아니다(D-3 넓은 정의). "전역 열넷 고정"은 대상이 없다 — 유형은 56종이고, 전역 고정은 "이 사건에 없는 것"과 "이 사건에서 비어 있는 것"을 하류가 구별하지 못하게 한다.
|
||||||
|
|
||||||
|
**(나) 전순서** — `order_key(구조) = (그 도메인이 선언한 priority_rank, domains/_registry_index.json entries[] 의 도메인 위치, type_id)`. 구조 레코드는 **(도메인, `type_id`) 쌍마다 하나**이며 도메인 간에 유형을 합치지 않는다 — 그래서 rank 충돌을 뭉갤 일이 없고 각 도메인의 선언 순서가 보존된다.
|
||||||
|
|
||||||
|
**(다) `actio_remedy_or_cap`** — E-13 이 rank 9 · `module: actio` · `role_projection: linked_actio_structures` 로 이미 선언한다. 별도 매핑표를 만들지 않고, `s5_execution_contract.v2.json` 의 `e13_extension_domains` 가 선언한 `actio_case_signals.v2` 를 `extension_key` 로 함께 싣는다.
|
||||||
|
|
||||||
|
**(라) 폴백 폐기 · `by_module` 채택** — 빈 입력은 `structure_count: 0` 으로 기록한다(폴백 없음). Θ 밖·`registered:false` 유형은 버리지도 일반화하지도 않고 `UNREGISTERED_EFFECT_TYPE_REVIEW` 를 붙여 남긴다 — 사이드카에 `default_projection` 이 있으면 그 투영을 싣되 검토 코드를 반드시 동반한다. `by_claim_form` 은 만들지 않는다(claim-form 어휘가 registry 어디에도 없고 `(module, role_projection)` 은 `type_id` 와 일대일) — 묶음 색인은 `by_module`(34 버킷)이다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. 확정 입력 계약
|
||||||
|
|
||||||
|
경로는 실행 루트 기준. `Default_Agent/` 접두사가 붙은 것만 자산 뿌리(배포 원본)에서 읽는다. **`v.7/Claude_YAML/` 아래는 어떤 파일도 읽지 않는다.**
|
||||||
|
|
||||||
|
| # | 입력 | 루트 키 / 형식 | 생산자 | 쓰임 |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| I-1 | `signals/signal_manifest.json` | `signal_manifest` v2 | P2-S0 | **진입 봉인.** `transaction_id` 형식 + `files[].file_sha256` 를 실제 파일 해시와 대조(경로에 `signals/` 접두사를 붙여서). 실패 `PART3_SIGNAL_SEAL_FAILED` |
|
||||||
|
| I-2 | `signals/legal_effect_routes.json` | SG-13 봉투 | P2-S0 | 효과 경로. `record_type == "legal_effect_route"` 만 조인. `details.type_id`·`details.registered`·`details.source_seed_id` 사용 |
|
||||||
|
| I-3 | `signals/legal_relation_lifecycle_signals.json` | SG-05 봉투 | P2-S0 | 근거 refs 원자(`evidence_refs`·`meeting_clause_refs`) |
|
||||||
|
| I-4 | `signals/calculation_requirements.json` | SG-11 봉투 | P2-S0 | 계산 요청. **조인 키는 레코드의 `signal_id`**(worker `request_id` 승계값 — `details.request_id` 는 보장되지 않는 키라 쓰지 않는다) ↔ 도메인 봉투 `calculation_refs` |
|
||||||
|
| I-5 | `signals/domain_signals/<domain_id>.json` | `domain_signal_envelope` v2 | P2-S0 | 도메인별 슬롯 현황·계산 참조. `expected_runnable` 도메인 중 실재하는 것만(부재는 영수증 계수로 기록) |
|
||||||
|
| I-6 | `routing/domain_activation_manifest.json` | SG-01 | P1-D0 | **Θ 의 정의역** `expected_runnable_domain_ids` + `registry_index_sha256` 봉인 원문 |
|
||||||
|
| I-7 | `BO.json` | 리스트(18키 레코드) | P2-F0 | **BO 부착 조인**(L0-7b) — `provenance.source_domain` 과 `Legal_Keywords` 로 구조 레코드에 부착 |
|
||||||
|
| I-8 | `runtime/domain_slices/<domain_id>.json` | `stage_b_domain_slice` | P2-A0 | 정합 검사 — `domain_declarations.structure_type_ids` ↔ `domain_config` 집합 동일성(L0-2b) |
|
||||||
|
| I-9 | `Default_Agent/domains/<id>/domain_config.json` ×26 | json | registry | `structure_types` 원문 — **Θ 와 순서의 정본.** 무결성은 SG-01 → `_registry_index.json` → `config_sha256` 사슬이 지킨다 |
|
||||||
|
| I-10 | `Default_Agent/domains/<id>/structure_types.json` · `module_role_projection.json` ×25 | json(방언 3·6·3·4) | registry (이 회차에 배포 원본으로 복사, §5.3) | 정책 이름·`admission_policy` 재료·`default_projection`. `domain_config` 와 교차 검증(L0-2c). `_verify_asset` 로 매니페스트 해시 대조하며 읽는다 |
|
||||||
|
| I-11 | `Default_Agent/domains/_registry_index.json` | json (18,921 B) | registry | 도메인 순서(`entries[]` 위치)와 `config_sha256`. **매니페스트 등재 대상이 아니다** — SG-01 의 `registry_index_sha256` 봉인이 지킨다(`PART3_REGISTRY_INDEX_SEAL_FAILED`). 조립본 뿌리에는 동명·다른 바이트의 `_registry_index.json`(1,458 B)이 있다 — 사이드카 복사(§5.3) 때 그 파일을 끌어오지 않는다 |
|
||||||
|
| I-12 | `Default_Agent/runtime_manifest.json` | `stage1_runtime_manifest.v1` | 배포 원본 정본 | 반입 자산 sha256 (게이트·`_verify_asset` 의 대조 원천) |
|
||||||
|
| I-13 | `Default_Agent/stage1_runtime/structure_index_policy.v1.json` | `stage1_structure_index_policy.v1` | 이 회차 신설(§5.2) | Θ 정의·전순서·부착 분할·조인 키·검토 코드의 코드 밖 선언. 판본 불일치 `PART3_POLICY_INVALID` |
|
||||||
|
| I-14 | `Default_Agent/routing/extension_payload_key_declarations.v1.json` | `stage1_extension_payload_key_declarations.v1` | registry (Part 2 F0 도 같은 자산을 쓴다) | **`legacy_alias_targets` — BO 부착 조인의 별칭표**(구 이름 → registry 도메인 ID **목록**, 예 `B1_Money_Successor → ["E-02","E-03"]`. 단일 primary 필드는 없다). `_verify_asset` 반입 |
|
||||||
|
|
||||||
|
**읽되 비어 있음을 정상 처리** — SG-02(`signals/procedural_posture_relief_signals.json`) · SG-07(`signals/asset_right_state_signals.json`). 조인 코드를 지금 쓰지 않는다(SG-02 닫힌 스키마에 claim-form 어휘가 정의된 적이 없다). 영수증에 형식화된 사실로 남긴다 — `{signal_id, transform: "passthrough", producer_count: 0, record_count: 0, reason}`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. 작업 명세 — 두 task
|
||||||
|
|
||||||
|
### 4.1 왜 L1 이 없는가 (구 전략서 §4.1 승계)
|
||||||
|
|
||||||
|
예외 다섯 부류가 전부 결정론이거나 registry 가 사람 검토로 지정한 것이고, 하나("같은 `type_id` 에 다른 `(module, role_projection)`")는 실측 0건이다. **LLM 이 판정할 부류가 없다.** 그래서 L1 을 두지 않고 검토는 `quality_gates/stage1_part3_review_handoff.json` 이 사람에게 나른다. 예외 pack 은 만들지 않는다 — 판정자 없는 pack 은 침묵 삼킴이나 상시 실패 중 하나가 된다. 되돌리는 경로는 열어 둔다: 판정 부류가 생기면 L0–L2 사이에 L1 을 끼우고 그때 L0 가 pack 을 쓰기 시작하며 L2 가 Part 2 F0 의 조건부 규칙(`exception_count > 0` 이면 판정 부재 = 실패)을 그대로 복사한다. 그래서 **L0/L2 를 한 task 로 합치지 않고 둘 사이 파일 계약(seed bundle · review handoff)을 지금 만들어 둔다.**
|
||||||
|
|
||||||
|
### 4.2 P3-L0 `Task_C_LE_L0_structure_seed_reducer` [신설 · code-executor]
|
||||||
|
|
||||||
|
**도입부** — Part 2 A0 의 형태를 복사한다. 스테이징 뿌리 `/tmp/s1` 공유(새 뿌리 금지 — 회귀 변종의 청소 목록을 늘리지 않는다).
|
||||||
|
|
||||||
|
1. `assert_deployment()` — `PART3_REQUIRED_ASSETS`(§5.5) 를 한 벌로 검사(등재·sha256·가독). 실패 `PART3_ASSET_DEPLOYMENT_INCOMPLETE`.
|
||||||
|
2. 모듈 반입 R-1~R-5 — `.txt` 미러 `read_raw` → `runtime_manifest` 해시 대조 → `/tmp/s1` 에 `.py` 기록 → `sys.path.insert`. 실패 코드는 기존 `MODULE_MIRROR_UNREGISTERED` / `MODULE_MIRROR_HASH_MISMATCH`. 반입 모듈: `runtime_common` · `schema_subset_validator` · `registry_loader` · **신설 `structure_index_compiler`**.
|
||||||
|
3. 정책 반입 — I-13 을 `_verify_asset`(Part 2 R0 와 같은 헬퍼, 매니페스트 해시 대조) 로 읽고 `schema_version` 을 검사한다. 판본 불일치 `PART3_POLICY_INVALID`.
|
||||||
|
4. **의미 검사 두 갈래** (장부 검사만으로는 닫히지 않는다 — Part 2 R-b/R-g2 교훈. 각 검사는 자기가 쓰는 산출물의 스키마만 본다):
|
||||||
|
- 입력 쪽 — 자기가 쓸 `structure_seed_bundle.schema.json` 이 `theta[]` 와 `structure_records[].admission_policy` 를 아는지. 모르면 `PART3_STRUCTURE_SCHEMA_STALE`. (`admission_rule` 은 13/73 에만 있는 선택 필드라 게이트 기준이 아니다.)
|
||||||
|
- 출력 쪽 — 컴파일러 산출에 `theta` 와 `order_key` 가 실려 나오는지. 없으면 `PART3_COMPILER_STALE`(옛 판본은 `TypeError` 가 먼저 나므로 같은 코드에 `detail: "signature_mismatch"`).
|
||||||
|
5. 진입 봉인 둘 — ① I-1 의 `signal_manifest` 봉인(`PART3_SIGNAL_SEAL_FAILED`) ② SG-01 의 `registry_index_sha256` ↔ `Default_Agent/domains/_registry_index.json` 원문 해시(`PART3_REGISTRY_INDEX_SEAL_FAILED`). 전순서의 둘째 키가 이 색인의 배열 위치에 걸려 있으므로 이 봉인만이 색인 교체를 잡는다.
|
||||||
|
|
||||||
|
**호출부** — 신설 모듈 `structure_index_compiler` 하나를 부른다. 판정 규칙을 YAML 문자열에 쓰지 않는다.
|
||||||
|
|
||||||
|
```
|
||||||
|
compile_structure_seeds(
|
||||||
|
activation_manifest, registry_index, domain_configs, domain_sidecars,
|
||||||
|
policy, alias_declarations, sg13_records, sg05_records, sg11_records,
|
||||||
|
domain_envelopes, bo_records, slice_documents)
|
||||||
|
-> {structure_seed_bundle, review_items, audit}
|
||||||
|
```
|
||||||
|
|
||||||
|
**모듈이 하는 일**
|
||||||
|
|
||||||
|
| 단계 | 내용 | 검토/오류 코드 |
|
||||||
|
|---|---|---|
|
||||||
|
| L0-1 | Θ 조립 — `expected_runnable_domain_ids` 의 `domain_config.structure_types` 합집합 | `expected_runnable` 도메인이 색인에 없으면 `PART3_DOMAIN_NOT_IN_REGISTRY` |
|
||||||
|
| L0-2 | 전순서 부여(§2 나) · 구조 레코드를 (도메인, `type_id`) 쌍마다 하나 생성 · `admission_policy`(두 단 정의, 73/73) 를 싣고 `admission_rule`·`registered` 는 있는 것만 덧붙임 | — |
|
||||||
|
| L0-2b | 정합 검사 — `expected_runnable` 도메인의 `slice.domain_declarations.structure_type_ids` ↔ `domain_config` 집합 동일성 | `PART3_SLICE_PROJECTION_DIVERGENCE` 검토 |
|
||||||
|
| L0-2c | 사이드카 교차 검증 — 목록 방언 3종·투영 방언 3종을 **하나의 정규화 리더**로 읽어 `domain_config` 와 집합 동등성 단언(오늘 73/73) + `types` 방언의 항목 `registered` ↔ SG-13 `details.registered` 대조. 방언 지도는 영수증에 기록 | `PART3_REGISTRY_SIDECAR_MISMATCH` 검토 |
|
||||||
|
| L0-3 | SG-13 레코드를 `details.type_id` 로 Θ 에 조인 | Θ 밖·`registered:false` 는 버리지 않고 `UNREGISTERED_EFFECT_TYPE_REVIEW`(+`default_projection` 있으면 투영 동반) |
|
||||||
|
| L0-4 | 도메인 소속 검사 — 레코드의 `type_id` 가 자기 `domain_ids[0]` 의 선언인지 | `PART3_EFFECT_TYPE_CROSS_DOMAIN` 검토 |
|
||||||
|
| L0-5 | `module`·`role_projection` 부여 — `domain_config` 원문 그대로. E-13 레코드에는 `extension_key: "actio_case_signals.v2"` 동반(§2 다) | 사이드카 매핑과 어긋나면 L0-2c 검토에 합류 |
|
||||||
|
| L0-6 | 계산 조인 — SG-11 `signal_id` ↔ 도메인 봉투 `calculation_refs`. 봉투에 있는데 SG-11 에 없는 참조는 dangling. 반대로 봉투 참조에 연결되지 않은 SG-11 레코드(합성 `calculation-request-<순번>` id — worker 가 `request_id` 를 안 실은 경우)는 구조에 싣지 않되 **영수증에 미연결 계수로 형식화 기록**(SG-02/07 공백과 같은 처리) | 없는 참조 `PART3_CALCULATION_REF_DANGLING` 검토 |
|
||||||
|
| L0-7 | 근거 refs 수집 — SG-05 원자·SG-13 레코드의 `evidence_refs`·`meeting_clause_refs` 합집합. **출처 소속 재검사는 두지 않는다**(상류 R0 hard BLOCK + `_source_fields()` 교집합으로 이미 닫혔다 — 죽은 게이트 금지) | — |
|
||||||
|
| L0-7b | **BO 부착 조인(신설)** — ① `source_domain` 별칭 해소: 값이 registry 도메인 ID 면 그대로 `[d]`, 아니면 I-14 의 `legacy_alias_targets[값]` **목록**으로 옮긴다(Part 2 F0 의 `_resolve_domain_ids` 와 같은 목록 해소 — 별칭표에 단일 primary 개념은 없다). 별칭표에도 없는 값은 그 BO 를 `PART3_BO_DOMAIN_UNRESOLVED` 검토로 격리 ② 부착: BO 레코드 b 는 해소된 **모든** `d` 에 대해 `t ∈ b.Legal_Keywords` 인 구조 레코드 (d, t) 부착을 시도(`source_bo_ids` 에 `BO_ID` 추가). SG-13 `details.source_seed_id` 는 보조 근거로 보존 ③ **부착 실패는 침묵 금지** — `Legal_Keywords` 가 비었거나 해소된 어느 (d, t) 에도 닿지 않는 BO 는 `PART3_BO_UNATTACHED` 검토로 싣는다 | **BO 보존 등식**: 부착 BO + 미부착 BO == BO 총수(L2 가 원본에서 직접 센다, §4.3). 조인 계수 영수증 기록(예행 기대: 2건 전부 부착) |
|
||||||
|
| L0-8 | 검토 모으기 — 검토 코드 붙은 구조를 review handoff 에 싣는다(예외 pack 없음, §4.1). E-00 유래 구조는 `review_required: true` 강제 | — |
|
||||||
|
|
||||||
|
**비정본 라벨·다중 유형** — 라우팅에 쓰지 않되 원문 보존. 한 BO 가 여러 유형에 걸리면 유형별 레코드 각각에 부착되고 `source_bo_ids` 로 묶인다(`multiple_types_allowed` 와 같은 방향).
|
||||||
|
|
||||||
|
**산출**
|
||||||
|
|
||||||
|
| 경로 | 스키마 | 내용 |
|
||||||
|
|---|---|---|
|
||||||
|
| `stage1_tmp/task_le/structure_seed_bundle.json` | `stage1_structure_seed_bundle.v1` (루트 키 `structure_seed_bundle`) | 구조 seed · Θ 열거 · 전순서 · BO 부착 |
|
||||||
|
| `quality_gates/stage1_part3_review_handoff.json` | Part 2 handoff 준용 | 검토 항목. L2 가 `FINALIZED` 갱신(공동 기록자) |
|
||||||
|
| `validation_assets/routing/part3_receipt.json` | `stage1_part3_receipt.v1` | 배포 게이트 영수증(실측값 — 상수 PASS 금지) · 진입 봉인 둘 · 조인 계수(SG-13·SG-11·BO 부착) · 보존 등식 양변 · SG-02/07 공백 사실 · 사이드카 방언 지도 · **`BO.json` 의 sha256 과 레코드 수**(signal 5종은 I-1 봉인·registry 는 SG-01 봉인이 지키지만 BO.json 은 무봉인 입력이다 — 비대칭을 관찰로 남긴다) · **해결된 전순서표**(rank·domain·type_id·module·admission_policy 한 줄씩) |
|
||||||
|
|
||||||
|
### 4.3 P3-L2 `Task_C_LE_L2_final_structure_index_writer` [신설 · code-executor]
|
||||||
|
|
||||||
|
- **구조 레코드의 정의** — Θ 의 (도메인, `type_id`) 쌍마다 하나. SG-13 레코드·BO 부착은 그 위에 붙는 근거이지 레코드 생성 주체가 아니다. 레코드 수는 registry 선언에서 결정론으로 나오고(26 도메인 전수면 73), 근거 없는 유형은 "선언됐으나 근거 없음"으로 보이며, EC-00 은 자연히 0 이다.
|
||||||
|
- 입력은 전부 파일 계약 — seed bundle · review handoff · SG-01 · **`domain_config.json`(I-9 — `expected_runnable` 도메인 것만, Θ 의 정의역) · SG-13 원본(I-2) · `BO.json` 원본(I-7)** (+ 정책 I-13, `_verify_asset`). 뒤의 셋은 세 보존 등식의 **바깥 수**(선언 수·route 총수·BO 총수)를 L2 가 각각 원본에서 직접 세기 위해서다 — I-9 의 무결성은 L0 와 같은 SG-01 봉인 → `_registry_index.json` → `config_sha256` 사슬을 재사용한다 — L0 가 bundle 에 실은 수와 비교하면 같은 호출의 산물끼리 비교라 항등식이 된다. **판정 파일은 없다**(L1 부재 — 조건부 규칙을 흉내 내지 않는다, §4.1).
|
||||||
|
- 닫힌 스키마 검증 — `legal_effect_structures.schema.json`(`additionalProperties: false`) 으로 자기 산출을 검증. 자기 스키마가 `by_module`·`by_bo_id` 를 아는지 함께 본다(`PART3_INDEX_SCHEMA_STALE`).
|
||||||
|
- **보존 등식 셋** — 각각 바깥 수와 비교한다(항등식 금지):
|
||||||
|
|
||||||
|
| 등식 | 식 | 어긋나면 |
|
||||||
|
|---|---|---|
|
||||||
|
| 선언 보존 | 구조 레코드 수 == Σ(`expected_runnable` 도메인의 `structure_types` 개수) | `PART3_STRUCTURE_COUNT_BROKEN` |
|
||||||
|
| 근거 보존 | 붙은 route 수 + 미부착 route 수 == SG-13 `legal_effect_route` 총수 | `PART3_ROUTE_CONSERVATION_BROKEN` |
|
||||||
|
| BO 보존 | 부착 BO 수 + 미부착 BO 수(검토 포함) == `BO.json` 레코드 총수 | `PART3_BO_CONSERVATION_BROKEN` |
|
||||||
|
|
||||||
|
**분할은 부착 여부로만 가른다.** 검토 여부는 분할과 무관하다 — `registered:false` 라도 `type_id` 가 Θ 안·자기 도메인 선언이면 **붙은 채로** 검토 꼬리표를 단다(이중 계상 금지). 구조 0 은 등식을 깨지 않는다.
|
||||||
|
- **역인덱스 셋** — `by_domain_id` · `by_module` · **`by_bo_id`**(BO 부착 조인의 사영 — Part 4 F0 가 BO 행마다 구조를 찾는 소비 형태의 직접 색인). ID 목록만 담고 본문 복제 금지. 1차 전순서는 rank-major 라 `by_domain_id` 와 겹치지 않는다.
|
||||||
|
- 검토 재산정 후 review handoff `FINALIZED` 갱신 재기록(공동 기록자). review 는 근거 없이 줄지 않는다.
|
||||||
|
- 산출 — `legal_effect_structures.json`(실행 루트 · 루트 키 `legal_effect_structures_output` 아님 — 최상위에 `schema_version: "stage1_legal_effect_structures.v1"` · `status` · `theta` · `structure_records[]` · `structure_index{by_domain_id, by_module, by_bo_id}` · `quality_gate`) + handoff 갱신. 기록 후 재읽기 검증.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. 신설·배포 자산과 정확한 배포 위치 (전부 배포 원본 `extension_research/Default_Agent/`)
|
||||||
|
|
||||||
|
### 5.1 런타임 모듈 1종
|
||||||
|
|
||||||
|
| 배포 경로 | 비고 |
|
||||||
|
|---|---|
|
||||||
|
| `Default_Agent/stage1_runtime/structure_index_compiler.py` | 조립·판정 로직 전부 |
|
||||||
|
| `Default_Agent/stage1_runtime/structure_index_compiler.txt` | 바이트 동일 미러(직접 작성 — 미러 자동 생성은 조립본 빌더 몫이라 이월) |
|
||||||
|
|
||||||
|
`domain_slice_compiler` 확장 대신 신설 — 그 모듈은 Part 2 A0 의 봉인된 소비 대상이고 서명 변경은 `PART2_COMPILER_STALE` 판정을 흔든다.
|
||||||
|
|
||||||
|
### 5.2 정책 자산 1종 (신설)
|
||||||
|
|
||||||
|
`Default_Agent/stage1_runtime/structure_index_policy.v1.json` — `schema_version: "stage1_structure_index_policy.v1"`. Θ 정의(가) · 전순서 3키(나) · 레코드 정체((도메인,type_id) 쌍) · `admission_policy` 두 단 정의 · 부착 분할 규칙 · BO 부착 조인 규칙(별칭 해소 포함, L0-7b) · **BO 보존 등식** · SG-11 조인 키(`signal_id`) · `extension_key` 규칙(다) · 검토 코드 목록(`UNREGISTERED_EFFECT_TYPE_REVIEW` · `PART3_BO_UNATTACHED` · `PART3_BO_DOMAIN_UNRESOLVED` 포함). **선례**: `prompt_composition_policy.json` · `bo_surface_projection_policy.v1.json` — 규칙을 코드 밖에 선언하면 적대 검증이 선언의 목적문을 오라클로 쓸 수 있다(BO 투영 회차에서 결손 2건을 정확히 그 방식으로 잡았다).
|
||||||
|
|
||||||
|
### 5.3 사이드카 배포 2종 ×25 (조립본 → 배포 원본 바이트 복사)
|
||||||
|
|
||||||
|
`Default_Agent/domains/<id>/structure_types.json` · `module_role_projection.json` (EC-00 제외 25 도메인 · 합 50 파일). 원천은 조립본 동명 파일이며 **바이트 동일 복사만** 한다(내용 수정 금지 — 방언 통일은 registry 소유자 몫, §8.2). `domain_config` 26/26 이 조립본과 바이트 동일임을 복사 전에 재확인한다(원천 정합).
|
||||||
|
|
||||||
|
### 5.4 매니페스트 갱신 — `runtime_manifest.json` 371 → 426 (델타 정확히 55)
|
||||||
|
|
||||||
|
사이드카 50 + 스키마 2 + 모듈 `.py`/`.txt` 2 + 정책 1 = **55행 추가**(기존 행 수정 0). 직렬화 왕복 보존(indent=2 · trailing newline) 확인. `runtime_artifact_count` 도 426 으로.
|
||||||
|
|
||||||
|
### 5.5 봉인 스키마 2종과 `PART3_REQUIRED_ASSETS`
|
||||||
|
|
||||||
|
| 배포 경로 | 내용의 `schema_version` |
|
||||||
|
|---|---|
|
||||||
|
| `Default_Agent/platform/schemas/structure_seed_bundle.schema.json` | `stage1_structure_seed_bundle.v1` |
|
||||||
|
| `Default_Agent/platform/schemas/legal_effect_structures.schema.json` | `stage1_legal_effect_structures.v1` |
|
||||||
|
|
||||||
|
**파일명에 판본을 넣지 않는다**(`*.schema.v1.json` 금지) — 빌더의 `$ref` 폐포·형식 검증이 `rglob("*.schema.json")` 로만 훑는다. 스키마 패턴은 열거를 하드코딩하지 않는다 — `type_id` `^[a-z][a-z0-9_]{1,127}$` · 도메인 ID `^(?:(?:EC|E)-[A-Z0-9]{2,8}|X[A-Z0-9]{1,8})$` · 검토 코드 `^[A-Z][A-Z0-9_]{2,127}$` 재사용.
|
||||||
|
|
||||||
|
```
|
||||||
|
PART3_REQUIRED_ASSETS = (
|
||||||
|
"Default_Agent/platform/schemas/structure_seed_bundle.schema.json",
|
||||||
|
"Default_Agent/platform/schemas/legal_effect_structures.schema.json",
|
||||||
|
"Default_Agent/stage1_runtime/structure_index_policy.v1.json",
|
||||||
|
"Default_Agent/routing/extension_payload_key_declarations.v1.json",
|
||||||
|
"Default_Agent/signals/signal_registry.v2.json",
|
||||||
|
"Default_Agent/contracts/signals/s5_execution_contract.v2.json",
|
||||||
|
"Default_Agent/stage1_runtime/structure_index_compiler.txt",
|
||||||
|
"Default_Agent/stage1_runtime/runtime_common.txt",
|
||||||
|
"Default_Agent/stage1_runtime/schema_subset_validator.txt",
|
||||||
|
"Default_Agent/stage1_runtime/registry_loader.txt",
|
||||||
|
) # 10 리터럴
|
||||||
|
```
|
||||||
|
|
||||||
|
사이드카 50 은 게이트 목록에 넣지 않는다 — `expected_runnable` 도메인 것만 읽으므로 **읽는 시점에 `_verify_asset`(매니페스트 해시 대조)** 로 지킨다(Part 2 가 seed 스키마·검증기 미러에 쓴 규율). **부재 규칙**: `structure_types` 선언이 0 인 도메인(오늘 EC-00 하나)의 사이드카 부재는 정상이다 — 스킵하고 영수증에 기록한다. 선언이 있는 도메인의 부재·미등재는 `PART3_ASSET_DEPLOYMENT_INCOMPLETE` 계열 경성 실패다(L-j 의 "EC-00 활성 → 실패 아님"과 이 규칙이 맞물린다). `domains/_registry_index.json` 은 게이트가 아니라 SG-01 봉인이 지킨다(I-11).
|
||||||
|
|
||||||
|
### 5.6 Part 3 작업 yaml 과 선언표
|
||||||
|
|
||||||
|
| 경로 | 내용 |
|
||||||
|
|---|---|
|
||||||
|
| `ver_8_yaml_candidates/P3-L0_structure_seed_reducer_v1.yml` · `P3-L2_final_structure_index_writer_v1.yml` | 조각 후보본 |
|
||||||
|
| `ver_8_yaml_candidates/stage_1_part_3_v.8.yml` | 통합본 — Agent `Liti-agent_Civil_Suit_Plaintiff_Stage_1_Part_3` · 스테이지 `stage1_법률효과구조_생성` 하나 · 선언 1벌 · `IN → L0 → L2 → OUT` |
|
||||||
|
|
||||||
|
선언표 `handoffs/stage1_part_interface.v1.json` 과 `stage1_stage_chain.v1.json`(둘 다 조립본 `handoffs/` 의 계약 문서 — 실행 자산이 아니므로 **이 2종만 예외적으로 조립본에서 갱신**한다): **신규 11줄 + 기존 8줄 갱신 · `handoff_count` 34 → 45**(갱신은 수를 늘리지 않는다). 신규 = 구 전략서 §5.5 의 10줄(정본 signal 경로 6 · Part 3 산출 4) + **`client_goal.json` 등재 1줄**(생산자 T1 · 소비자 빈 배열 + note "Part 3 이후 스테이지가 읽는다" — C-8 폐쇄). 기존 갱신 8줄 = ① `runtime/domain_slices/<id>` 소비자에 L0 추가 ② `client_meeting.md` 소비자에 Part 2 A0 추가(C-8 나머지 한 줄) ③~⑤ **구 이름 3종 행(`actio_case_signals.json` 등)에서 Part 3 소비자 제거**(C-7 — 남겨 두면 계약 문서가 §3 의 "읽지 않는다"와 어긋난 채 남는다) ⑥~⑧ `signal_manifest.json` 행 소비자에 L0, `routing/domain_activation_manifest.json` · `BO.json` 행 소비자에 **L0 와 L2 둘 다**(`Task_C_LE_L0_structure_seed_reducer` · `Task_C_LE_L2_final_structure_index_writer`) 추가. 신규 행 중 `signals/legal_effect_routes.json` 의 소비자도 L0·L2 둘이다(§4.3 바깥 수). 규칙: `consumer_tasks` 는 실제 task 이름만 · 약칭 금지 · `produced_by_module` 위임을 빠뜨리면 `U5_REQUIRED_KEY_ABSENT`. `stage_chain` 의 Part 3 구간과 상위 전략서 `stage_1_update_strategy.md` 두 곳 — §1 사슬(`S0→L0→L1→L2`)과 §4.2(P3-L1 절) — 의 L1 부재 반영도 함께 고친다.
|
||||||
|
|
||||||
|
**신설·변경 자산 합계** — 실행 자산(배포 원본): 모듈 1(+미러 1) · 정책 1 · 스키마 2 · 사이드카 복사 50 · 매니페스트 갱신 1 = 56 파일. 명세·계약: yaml 3(조각 2+통합 1) · 선언표 1 · stage_chain 1 · 상위 전략서 두 곳(§1 사슬 · §4.2).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 6. 실행 단계
|
||||||
|
|
||||||
|
되돌릴 수 있는 크기로 자른다. 앞 단계 통과 전에 다음 단계에 착수하지 않는다.
|
||||||
|
|
||||||
|
| 단계 | 내용 | 통과 조건 |
|
||||||
|
|---|---|---|
|
||||||
|
| **P3-0a** | **D-4 결정(§2) 사용자 승인** — Θ 범위 · 전순서 · `by_module` · 폴백 폐기 | 승인 없이는 착수하지 않는다 |
|
||||||
|
| **P3-0b** | 전제 확인(작업 아님) — 빌더 뿌리 10(완료 실측) · 배포 원본 371항 · `domain_config` 26/26 조립본과 바이트 동일 | 실측 일치 |
|
||||||
|
| **P3-1** | 사이드카 50 복사 배포 + 매니페스트 등재 | 50/50 바이트 동일 · 등재 sha 일치 |
|
||||||
|
| **P3-2** | 정책 1 · 스키마 2 작성 배포 + 등재 | `schema_subset_validator` 로 자기 검증 통과 · 등재 sha 일치 |
|
||||||
|
| **P3-3** | `structure_index_compiler.py` + 미러 작성 배포 + 등재(426항 도달) | 미러 해시 일치 · 왕복 보존 |
|
||||||
|
| **P3-4** | 선언표 신규 11줄 + 기존 8줄 갱신 + count 45 + stage_chain + 상위 전략서 두 곳(§1 사슬 · §4.2) | `_check_stage1_interface.py` finding 0 |
|
||||||
|
| **P3-5** | L0 yaml (도입부는 Part 2 A0 복사, 호출부만 신작) | 문법 PASS · AST 미정의 이름 0 |
|
||||||
|
| **P3-6** | L2 yaml | 〃 |
|
||||||
|
| **P3-7** | 통합본 병합 | 선언 각 1벌 · 개별↔통합 블록 불일치 0 |
|
||||||
|
| **P3-8** | 예행 pass3(기존 2패스 뒤에 L0·L2, `--asset-root` = 배포 원본) + 26 도메인 합성 실측 + 계산 조인 탐침 | PASS · `legal_effect_structures.json` 실제 생성 · Θ·레코드 수·버킷 수·BO 부착 계수가 영수증에 실측 기록 |
|
||||||
|
| **P3-9** | 회귀 22종(§7.2) → 적대적 sub-agent 검증 루프(지적 0 까지) → 내역서 작성 | 회귀 전건 기대대로 발화 · "잔여 필수 수정 없음" |
|
||||||
|
|
||||||
|
### 6.1 조립본 동기화 회차로 이월 (Part 2 의 D-1~D-6 과 한 벌)
|
||||||
|
|
||||||
|
① Part 3 신설 자산 5종(+미러)·사이드카 등재의 조립본 반영 + 빌더 `PART3_ASSEMBLY_AUTHORED` 등록 + 사이드카 sweep 규칙(파일 반영과 등록은 한 벌 — 등록만 선행하면 `MISSING_SELECTED_SOURCE` 즉사) ② `release_manifest`·`source_copy_map` 재생성 ③ 신선 빌드의 Part 3 자산 재현 확인 ④ `dry_run_receipt` 정본화(Part 2 M-* + Part 3 L-* 합본) ⑤ `effect_projection.schema_ref` dangling 해소(배포 여부는 registry 소유자 결정).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 7. 검증 설계
|
||||||
|
|
||||||
|
### 7.1 세 층
|
||||||
|
|
||||||
|
| 층 | 통과 조건 |
|
||||||
|
|---|---|
|
||||||
|
| 결정론 회귀 | 같은 입력 2회 → `legal_effect_structures.json` sha256 동일(3키 전순서가 보장) |
|
||||||
|
| 계약 준수 | 닫힌 스키마 통과 · 선언표 finding 0 · 진입 봉인 둘 · 보존 등식 셋 · 정책-코드 등가(선언 목적문 대조) |
|
||||||
|
| 행동 검증 | **미측정으로 명시** — 사건 실주행과 법률 검토 필요. 대역으로 닫히지 않는다 |
|
||||||
|
|
||||||
|
### 7.2 회귀 22종 — Part 2 의 R-a~R-l · M-a~M-r 에 잇는다
|
||||||
|
|
||||||
|
변종 실행 전 `/tmp/s1` · `/tmp/s1_r0` 청소 절차 유지.
|
||||||
|
|
||||||
|
| id | 시나리오 | 기대 |
|
||||||
|
|---|---|---|
|
||||||
|
| L-a | 필수 자산 1건 결손 | `PART3_ASSET_DEPLOYMENT_INCOMPLETE` |
|
||||||
|
| L-b | seed 스키마와 매니페스트 항목을 함께 옛 판본으로 | `PART3_STRUCTURE_SCHEMA_STALE` · 기록 구조 0 |
|
||||||
|
| L-c | 서명 같고 `theta`/`order_key` 투영만 잃은 컴파일러 | `PART3_COMPILER_STALE` |
|
||||||
|
| L-d | `signal_manifest.files[].file_sha256` 변조 | `PART3_SIGNAL_SEAL_FAILED` |
|
||||||
|
| L-d2 | `_registry_index.json` 도메인 순서 변경(SG-01 봉인은 그대로) | `PART3_REGISTRY_INDEX_SEAL_FAILED` |
|
||||||
|
| L-e | Θ 밖 `type_id` 주입 | 버려지지 않고 `UNREGISTERED_EFFECT_TYPE_REVIEW` · 근거 보존 등식 유지 |
|
||||||
|
| L-f | `registered:false` 후보 | 같은 검토 코드 · `default_projection` 있으면 투영+검토 동시 |
|
||||||
|
| L-g | Θ 안이지만 남의 도메인 유형 | `PART3_EFFECT_TYPE_CROSS_DOMAIN` |
|
||||||
|
| L-h | rank 1 선언 도메인 넷(E-02·E-03·E-07·E-08) 동시 활성 | 색인 머리 네 줄(`money_claim` ×2 — 합치지 않음) · 순서 결정론 |
|
||||||
|
| L-i | E-04·E-11 동시 활성(`land_use_gain` 양쪽) | 구조 둘 · E-11 의 선언 순서 보존(`possession_vindication`(5) 가 E-11 `land_use_gain`(6) 앞) |
|
||||||
|
| L-j | EC-00 만 활성 | 구조 0 · 등식 통과 · 실패 아님 |
|
||||||
|
| L-k | `active ⊊ expected_runnable`(감시 도메인 포함) | 감시 도메인 효과가 Θ 안 — 검토로 쓸려가지 않음 (**D-3 회귀 · 필수**) |
|
||||||
|
| L-l | 사이드카 한 도메인 항목 하나 제거 — **매니페스트 항목도 함께 갱신**(안 하면 `_verify_asset` 해시 불일치가 먼저 난다) | `PART3_REGISTRY_SIDECAR_MISMATCH` |
|
||||||
|
| L-m | 슬라이스 투영 ↔ config 불일치 주입 | `PART3_SLICE_PROJECTION_DIVERGENCE` |
|
||||||
|
| L-m2 | `registered:false` + Θ 안·자기 도메인 | 붙은 채 검토 꼬리표 · 등식 불변 (**분할 규칙 회귀 · 필수**) |
|
||||||
|
| L-n | 같은 입력 2회 | 바이트 동일 |
|
||||||
|
| L-o | 137종 일반성 | 통합본에 사건 이름 라우팅 0 · `case_kind_domain_matrix` 참조 0 |
|
||||||
|
| L-p | 무변조 트리에서 사이드카 정규화 리더 | 73/73 · 불일치 0 (**리더 자체 검증 · 필수** — 방언 하나라도 못 읽으면 여기서 드러난다) |
|
||||||
|
| **L-q** | BO 부착 조인(신설) — 양성·음성 두 변종 | 양성: 예행 BO 2건 부착 · `by_bo_id` 등재. 음성: `Legal_Keywords` 를 비운 BO·별칭 해소 불능 `source_domain` 주입 → `PART3_BO_UNATTACHED` / `PART3_BO_DOMAIN_UNRESOLVED` 검토 · **BO 보존 등식 유지** |
|
||||||
|
| **L-r** | 정책 자산 판본 변조 — **매니페스트 항목도 함께 갱신** | `PART3_POLICY_INVALID` |
|
||||||
|
| **L-s** | 사이드카(또는 정책)를 매니페스트 **미동반** 변조 | `_verify_asset` 경성 실패(`PART3_ASSET_DEPLOYMENT_INCOMPLETE` 계열) — 해시 게이트 자체의 발화 증명 |
|
||||||
|
| **L-b2** | `legal_effect_structures.schema.json` 과 매니페스트 항목을 함께 옛 판본으로 | `PART3_INDEX_SCHEMA_STALE`(L2 쪽 의미 검사의 발화 증명) |
|
||||||
|
|
||||||
|
L-b·L-c 는 짝(장부 검사 대 의미 검사), L-l·L-r 대 L-s 도 짝(의미 검사 대 해시 게이트). **L-b·L-b2·L-c·L-d2·L-k·L-m2·L-p·L-q(음성 포함) 를 빼고 통과로 세지 않는다.**
|
||||||
|
|
||||||
|
### 7.3 예행의 한계와 별도 실측
|
||||||
|
|
||||||
|
예행 활성은 X1·X2·X3 — Θ 4종(`succession_notice_lien_asset_defense`·`general_legal_effect`·`asset_state`·`valuation`) · 구조 레코드 6건(X1 2·X2 2·X3 2). stub seed 에 `request_id` 가 없어 `calculation_refs` 가 비므로 L0-6 조인·dangling 검토가 예행에서 발화하지 않는다. 그래서 셋을 따로 잰다: ① **26 도메인 합성 실측** — 전 도메인 `execution_eligible` 합성 SG-01 로 컴파일러를 돌려 Θ 56종 · 구조 73건 · `by_module` 34 버킷 · 전순서 결정론 확인 ② **계산 조인 탐침** — `request_id` 를 넣은 합성 재료로 L0-6 정상·dangling 각 1회 ③ `admission_policy` 둘째 단 경로 — 예행 구조 6건 중 4건(E-00·E-15·X1·X3 방언)이 그 경로이므로 값이 비지 않음을 영수증으로 확인. 오버레이·실 LLM 활성(실체 도메인) 검증은 실주행 몫으로 남긴다.
|
||||||
|
|
||||||
|
### 7.4 검증 루프
|
||||||
|
|
||||||
|
작업 완료 후 독립 sub-agent 적대 검증: §4 동일 수행 여부(A 계열) + 완수 기준(B 계열 — 산출물 정합·상하류 consistency) 전건 실측. 지적 반영 → 재검증을 **"잔여 필수 수정 없음"까지 반복**한다. 정책 자산(§5.2)의 선언 목적문은 검증 오라클로 쓴다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 8. 137종 일반성 보증과 하지 않는 것
|
||||||
|
|
||||||
|
### 8.1 보증
|
||||||
|
|
||||||
|
Part 3 코드는 사건 이름·도메인 목록·유형 열거를 고정하지 않는다. 도메인 26→27, 새 `structure_type`, 새 계산 도메인, 새 `module`, 새 사건 종류 — 전부 Part 3 무수정으로 흡수된다(Θ 는 SG-01+config, 정렬은 색인 위치, 스키마는 패턴, 조인은 `signal_id`, 버킷은 값에서). 이름 검사(L-o)만으로 부족하므로 **L-k(D-3 넓은 정의)** 를 필수로 둔다.
|
||||||
|
|
||||||
|
### 8.2 하지 않는 것
|
||||||
|
|
||||||
|
| 항목 | 왜 |
|
||||||
|
|---|---|
|
||||||
|
| SG-02·SG-07 생산자 신설 | Part 2 S0 개정이다. 어휘 설계가 먼저다 — 공백을 형식화된 사실로 영수증에 남긴다 |
|
||||||
|
| 청구 형태 어휘 신설 · 사이드카 방언 통일 · `effect_projection.schema_ref` 해소 | registry 소유자 결정. Part 3 는 정규화해 읽고 보고한다 |
|
||||||
|
| 예행 seed 대역에 `request_id` 추가 | Part 2 예행 자산. §7.3 탐침으로 대신한다 |
|
||||||
|
| `signal_registry.v2.json`·13 signal 계약·`BO.json` 레코드 구조 변경 | 확정 계약·최대 호환면. `downstream_seed_refs.legal_effect_structure_seed_ref_proposed` 채우기도 BO 재기록이므로 하지 않는다 |
|
||||||
|
| 조립본·빌더·장부 갱신 | 조립본 동기화 회차(§6.1) |
|
||||||
|
| 구 Part 3 yaml 대조·읽기 | 제약 1 |
|
||||||
|
| Part 4 착수 | `legal_effect_structures.json` 이 서고 회귀 통과 뒤 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 9. 위험과 중단 규칙
|
||||||
|
|
||||||
|
| 위험 | 징후 | 대응 |
|
||||||
|
|---|---|---|
|
||||||
|
| Θ 를 `active_domain_ids` 로 잡음 | 감시 도메인 효과 전부 검토행 · 커버리지는 통과 | L-k 필수 회귀 |
|
||||||
|
| 전순서 비결정론 | 2회 실행 순서 상이 | L-n · 3키를 정책 자산에 못박음 |
|
||||||
|
| 스키마 파일명 판본 | 형식 검증·`$ref` 폐포 누락 | §5.5 규칙 |
|
||||||
|
| 사이드카를 조립본에서 읽는 코드 | 배포 원본 단독 실행이 깨진다 | **명세서 전수에서 `선행구축` 참조 0 을 회귀로 확인**(Part 2 검증 방식) |
|
||||||
|
| 보존 등식 항등식화 | 결손 불검출 | 세 등식 다 **원본 파일에서 직접 센 바깥 수**와 비교(§4.3) |
|
||||||
|
| 방언 못 읽는 리더 | 없는 불일치 생성(구 전략서 초안이 실제로 겪음) | L-p 필수 |
|
||||||
|
| pack 신설 유혹 | 판정자 없는 pack = 침묵 삼킴 or 상시 실패 | §4.1 — L1 도입 시점까지 pack 금지 |
|
||||||
|
| 구 계약 잔재 | 리터럴이 registry ID 와 동시 만족 불가(Part 2 가 두 번 겪음) | 신설이므로 처음부터 registry ID 패턴만 |
|
||||||
|
|
||||||
|
중단 규칙: P3-0a 미승인 착수 금지 · 앞 단계 미통과 진행 금지 · 필수 회귀 8종(L-b·b2·c·d2·k·m2·p·q) 미발화 상태로 완료 선언 금지.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 10. 완료 판정
|
||||||
|
|
||||||
|
1. `stage_1_part_3_v.8.yml` — 스테이지 하나 · 선언 1벌 · 개별↔통합 불일치 0 · task 2(L0·L2) · `IN→L0→L2→OUT`.
|
||||||
|
2. 배포 원본에 실행 자산 56 파일(모듈+미러 2 · 정책 1 · 스키마 2 · 사이드카 50 · 매니페스트 갱신 1)이 정확한 위치에 있고 `runtime_manifest` 426항. 해시 일치의 범위는 **이 회차 신설·복사 55행 전수 + 배포 트리에 실물이 있는 기존 등재분(94항)** 이다 — 매니페스트는 상위 장부라 277항은 이 트리에 실물이 없는 것이 정상이다(§1.4).
|
||||||
|
3. 선언표 45줄 · 검사기 finding 0 (C-7·C-8 폐쇄 포함).
|
||||||
|
4. 예행 pass3 통과 — `legal_effect_structures.json` 실제 생성 · Θ 4종/구조 6건/BO 부착 2건 실측 기록.
|
||||||
|
5. 26 도메인 합성 실측 — Θ 56종 · 구조 73건 · `by_module` 34 버킷 · 전순서 결정론.
|
||||||
|
6. 회귀 22종 전건 기대대로 발화(필수 8종 — L-b·L-b2·L-c·L-d2·L-k·L-m2·L-p·L-q — 포함).
|
||||||
|
7. 적대적 sub-agent 재검증 "잔여 필수 수정 없음".
|
||||||
|
8. 이월 목록(§6.1)이 내역서에 기록되고, 행동 검증은 **미측정으로 명시**된다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 11. 이 문서의 검증 이력
|
||||||
|
|
||||||
|
독립 sub-agent 가 문서의 주장을 믿지 않고 배포 원본·조립본·Part 2 통합본·예행 실물(`/tmp/dry_v6`)을 직접 측정해 대조했고, 지적이 0 이 될 때까지 반복했다 — 라운드 1 지적 13건(MAJOR 4 · MINOR 9: BO 부착 실패 처분·`source_domain` 별칭·회귀-읽기규율 모순·매니페스트 전수 일치 문구 넷이 MAJOR), 라운드 2 지적 5건(별칭표 배선 I-14 신설이 MAJOR), 라운드 3 지적 1건(선언 보존 등식의 바깥 수 원천), 라운드 4 지적 1건(등식 정의역 `expected_runnable` 용어 통일 — L-k 오발화 예방), 라운드 5 지적 1건(선언 0 도메인의 사이드카 부재 규칙), **라운드 6 지적 0건.** 약 90개 실측 항목(수치·경로·키 이름·코드 인용)은 라운드 1 에서 전건 일치가 확인됐다. 검증 불가로 남은 셋 — 배포 원본 단독 재실행 실증(분석문서 §6.4 기록으로만 확인) · Part 2 검증에서 정책 목적문이 오라클로 쓰였다는 서술 · 예행 하네스의 pass3 접속 가능성 — 은 P3-8 실행 시 실측으로 닫는다.
|
||||||
+58
@@ -0,0 +1,58 @@
|
|||||||
|
# Stage 1 — Part 3 개정 작업 내역서
|
||||||
|
|
||||||
|
- 문서 판본: v1 (2026-08-19)
|
||||||
|
- 지시 원문: `stage_1_part_3_개정_신전략서.md` (§3 입력 계약 · §4 작업 명세 · §5 자산 · §6 실행 단계 · §7 검증 · §10 완료 판정)
|
||||||
|
- 판정 기준(완수): 실행 완주가 아니라 **의도한 결과물이 올바른 방식으로 생성 + 소작업 간 upstream–downstream consistency 유지**.
|
||||||
|
- P3-0a(D-4 승인): 사용자의 "신전략서를 실행하라"는 지시를 승인으로 처리하고 착수했다.
|
||||||
|
- 결과: **§4·§5 처방 전건 반영 + 회귀 22종 및 보충 실측 2종 전건 통과 + 적대적 sub-agent 검증 2라운드(1차 지적 5건 전부 반영 · 재검증 "지적 0건")** — Part 3 는 예행 전 사슬(3패스 11단계)에서 완수 기준을 충족했다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 0. 요약
|
||||||
|
|
||||||
|
Part 3 작업명세서를 **registry 와 Part 1·2 실산출 계약만으로 새로 지었다**(구 Part 3 v2 무참조 — 제약 1). task 는 둘이다: `Task_C_LE_L0_structure_seed_reducer`(Θ 조립 → 구조 레코드 → SG-13·SG-11·BO 조인 → 검토) → `Task_C_LE_L2_final_structure_index_writer`(보존 등식 셋 → 역인덱스 셋 → 최종 기록). **L1 은 두지 않았다** — LLM 이 판정할 예외 부류가 없다(신전략서 §4.1). 조립·판정 로직은 신설 모듈 `structure_index_compiler` 에 있고 YAML 은 반입·게이트·봉인·기록만 한다.
|
||||||
|
|
||||||
|
가장 중요한 실측: **예행 전 사슬에서 `legal_effect_structures.json` 이 실제로 선다** — Θ 4종 · 구조 레코드 6건(레코드는 (도메인, type_id) 쌍마다 하나) · SG-13 route 6/6 부착 · **BO 2/2 부착**(`provenance.source_domain` + `Legal_Keywords` 결정론 조인 — SG 층의 `source_bo_ids` 가 비어 있어도 BO↔구조 연결이 섬) · 보존 등식 셋 전부 성립(바깥 수는 L2 가 원본에서 직접 계수) · 역인덱스 셋(`by_domain_id` · `by_module` · `by_bo_id`). 26 도메인 합성 실측은 **Θ 56종 · 구조 73건 · module 34종 · 결정론**이다.
|
||||||
|
|
||||||
|
## 1. 작업 분류 (method 1)
|
||||||
|
|
||||||
|
**병렬(독립) 수행분** — 서로 파일이 겹치지 않음: 정책 자산 작성 · 스키마 2종 작성 · 컴파일러 모듈 작성 · 사이드카 50 복사.
|
||||||
|
**순차 수행분** — 상하류 의존: 매니페스트 등재(자산 확정 후, 원자적 1회) → L0/L2 yaml 조각 → 통합본 병합 → 선언표·stage_chain·상위 전략서 → 예행 3패스 → 회귀 → 검증 루프 → 내역서.
|
||||||
|
|
||||||
|
## 2. 산출물 목록
|
||||||
|
|
||||||
|
| 파일 | 상태 |
|
||||||
|
| --- | --- |
|
||||||
|
| `ver_8_yaml_candidates/stage_1_part_3_v.8.yml` | **신규** (52,878 B · task 2 · `IN→L0→L2→OUT` · 선언 1벌) |
|
||||||
|
| `ver_8_yaml_candidates/P3-L0_structure_seed_reducer_v1.yml` · `P3-L2_final_structure_index_writer_v1.yml` | **신규** 조각 (통합본과 블록 동일) |
|
||||||
|
| `Default_Agent/stage1_runtime/structure_index_compiler.py` + `.txt` | **신규** (순수 모듈 — I/O·시각·난수 없음. 방언 3·3 정규화 리더 · Θ · 전순서 · 조인 · 검토) |
|
||||||
|
| `Default_Agent/stage1_runtime/structure_index_policy.v1.json` | **신규** (`stage1_structure_index_policy.v1` — Θ 정의 · 3키 전순서 · admission 2단 · 부착 분할 · BO 조인 · SG-11 키 · 등식 셋 · 코드 목록. 검증 오라클) |
|
||||||
|
| `Default_Agent/platform/schemas/structure_seed_bundle.schema.json` · `legal_effect_structures.schema.json` | **신규** (파일명 무판본 · 열거 하드코딩 없이 패턴 3종만) |
|
||||||
|
| `Default_Agent/domains/<id>/structure_types.json` · `module_role_projection.json` ×25 | **복사 배포** (조립본과 50/50 바이트 동일) |
|
||||||
|
| `Default_Agent/runtime_manifest.json` | 갱신 (**371 → 426** · 델타 정확히 55 · 기존 행 수정 0 · 왕복 보존) |
|
||||||
|
| `선행구축/.../handoffs/stage1_part_interface.v1.json` | 갱신 (신규 11줄 + 기존 갱신 — `handoff_count` 34→**45** · C-7 구 이름 3종 Part 3 소비자 제거 · C-8 `client_goal` 등재·`client_meeting` 소비자 · compact 직렬화 보존) |
|
||||||
|
| `선행구축/.../handoffs/stage1_stage_chain.v1.json` | 갱신 (Part 3 구간 — yaml·requires·produces·이관 완료 note) |
|
||||||
|
| `stage_1_update_strategy.md` | 갱신 두 곳 (§1 사슬 `S0→L0→L2` · §4.2 L1 부재 주석) |
|
||||||
|
| 예행 증거 | `/tmp/dry_p3/` (3패스 산출 전부) · 회귀 결과 scratchpad `part3_regression_results.json` |
|
||||||
|
|
||||||
|
배포 트리 최종 210 파일(155+55) · 매니페스트 등재-실물(트리 실재 149건) 전수 해시 일치 · `__pycache__` 0.
|
||||||
|
|
||||||
|
## 3. 검증 (method 3)
|
||||||
|
|
||||||
|
**정적** — yaml parse PASS · 선언 1벌 · AST 미정의 이름 0 · 개별↔통합 블록 동일 · 비주석 금지어(Claude_YAML·구 signal 이름·case_kind matrix·조립본 경로) 0 · code-executor parameters 5키 · 선언표 검사기 **finding 0**(3 yaml 전수).
|
||||||
|
|
||||||
|
**예행 3패스** (asset root = 배포 원본 `extension_research/Default_Agent` · 실행 루트 신선): pass1 PASS 6단계/45건 · seed 대역 3건 · pass2 PASS 3단계/29건 · **pass3 PASS 2단계/5건**. 산출 실측 — 최종 status READY · 봉인 승계(`S5TX-…`) · 레코드 6 · 게이트 3 전부 pass · handoff FINALIZED · 영수증(게이트 10 자산/실측·봉인 둘·조인 계수·SG-02/07 공백 형식화·사이드카 방언 지도·BO sha·전순서표).
|
||||||
|
|
||||||
|
**회귀 22종(L-a~L-s) + 보충 2종 = 24/24 PASS.** 필수 8종(L-b·b2·c·d2·k·m2·p·q) 포함 전건 기대대로 발화. 변조는 전부 사본 트리/실행 루트에서 수행(배포 원본 무변). 보충: SUPP-synth26(Θ56·73·34·머리 4줄·결정론) · SUPP-calc-probe(정상 조인·dangling 검토·미연결 형식화).
|
||||||
|
|
||||||
|
**적대적 sub-agent 2라운드**: 1차 지적 5건(MAJOR 2 — ① 선언표 `handoffs` 배열의 `client_meeting` 행 미갱신(중복 행 절반만 반영) ② 도메인 봉투 부재의 침묵 스킵(영수증 계수 부재) / MINOR 3 — L2 의 계약 밖 `signal_manifest` 읽기 · 합성/탐침 증적 미보존 · `Stage_1.Part_3` 약칭 잔존) — **전부 반영**(봉투 부재는 `audit.input_gaps` 기록 + L-k 단언, transaction_id 는 L0 가 bundle 에 부착해 L2 가 승계). 재검증: **"지적 0건"**(반영 5 + 파급 12 = 17건 실측 전건 통과).
|
||||||
|
|
||||||
|
## 4. 한계 (정직 선언)
|
||||||
|
|
||||||
|
- 예행은 LLM 대역 기반이다 — 실체 도메인 활성·실서버 실행은 범위 밖(행동 검증 **미측정** 명시, 신전략서 §7.1).
|
||||||
|
- 예행 Θ 는 4종에 그치므로 26 도메인 합성·계산 조인 탐침으로 따로 실측했다(§7.3 처방 그대로).
|
||||||
|
- P3-2 의 "정책·스키마 자기 검증" 별도 기록은 남기지 않았다 — 예행에서 두 스키마가 실주입 검증됐고(L0·L2 닫힌 스키마 통과) 회귀 L-b/L-b2 가 스키마 능력 검사의 발화를 실증한다.
|
||||||
|
|
||||||
|
## 5. 이월 (조립본 동기화 회차 — 신전략서 §6.1)
|
||||||
|
|
||||||
|
① Part 3 신설 자산 5종(+미러)·사이드카 등재의 조립본 반영 + 빌더 `PART3_ASSEMBLY_AUTHORED` 등록 + 사이드카 sweep 규칙(파일 반영과 등록은 한 벌) ② `release_manifest`·`source_copy_map` 재생성 ③ 신선 빌드의 Part 3 자산 재현 확인 ④ `dry_run_receipt` 정본화(Part 2 M-* + Part 3 L-* 합본) ⑤ `effect_projection.schema_ref` dangling 해소(registry 소유자). Part 2 의 D-1~D-6 과 한 벌로 처리한다. Part 3 실행 정합성 무영향은 배포 원본 단독 예행 전 사슬로 실증돼 있다.
|
||||||
+2
-2
@@ -173,7 +173,7 @@ signal 파일명은 다음과 같다. SG-01 `domain_activation_manifest.json`, S
|
|||||||
└─▶ Fact_Ledger_base.json + writer report ──▶ Stage 2
|
└─▶ Fact_Ledger_base.json + writer report ──▶ Stage 2
|
||||||
|
|
||||||
의존: T0→{T1,D0} · {T5,T6,T8}→D0 · D0→T9 · T9→A0 · fanout_plan→B*→R0→R1→F0→S0
|
의존: T0→{T1,D0} · {T5,T6,T8}→D0 · D0→T9 · T9→A0 · fanout_plan→B*→R0→R1→F0→S0
|
||||||
S0→L0→L1→L2→P4-F0→F1→F2
|
S0→L0→L2→P4-F0→F1→F2 (L1 은 두지 않는다 — stage_1_part_3_개정_신전략서.md §4.1)
|
||||||
```
|
```
|
||||||
|
|
||||||
LLM 호출 구조: Part 1은 스크리너 1 + Task_A 1 + 매퍼 2N + 조건부 판정(대개 즉시 종료). Part 2는 worker M개 + 조건부 판정. Part 3·4는 조건부 판정만. 순증 비용은 스크리너 1회와 활성 도메인 증가분이며, 상시 도메인과 감시 도메인은 낮은 등급 모델로 돈다.
|
LLM 호출 구조: Part 1은 스크리너 1 + Task_A 1 + 매퍼 2N + 조건부 판정(대개 즉시 종료). Part 2는 worker M개 + 조건부 판정. Part 3·4는 조건부 판정만. 순증 비용은 스크리너 1회와 활성 도메인 증가분이며, 상시 도메인과 감시 도메인은 낮은 등급 모델로 돈다.
|
||||||
@@ -287,7 +287,7 @@ signal마다 받아들이는 조건이 registry에 선언되어 있으므로 그
|
|||||||
|
|
||||||
### 4.2 P3-L1 예외 판정
|
### 4.2 P3-L1 예외 판정
|
||||||
|
|
||||||
무변경이다. 허용 결정 목록과 후보값 부분집합 규율을 유지하고, 예외 묶음에 동적 열거 목록이 동봉될 뿐이다.
|
(개정 실행에서 L1 은 두지 않는 것으로 확정됐다 — LLM 이 판정할 예외 부류가 없다. 되돌림 경로와 근거는 `stage_1_part_3_개정_신전략서.md` §4.1. 아래 원문은 기록으로 남긴다.) 무변경이다. 허용 결정 목록과 후보값 부분집합 규율을 유지하고, 예외 묶음에 동적 열거 목록이 동봉될 뿐이다.
|
||||||
|
|
||||||
### 4.3 P3-L2 최종 색인 기록 [개정]
|
### 4.3 P3-L2 최종 색인 기록 [개정]
|
||||||
|
|
||||||
|
|||||||
-2
@@ -65,8 +65,6 @@
|
|||||||
"registry_loader": "Default_Agent/stage1_runtime/registry_loader.txt",
|
"registry_loader": "Default_Agent/stage1_runtime/registry_loader.txt",
|
||||||
"worker_output_validator": "Default_Agent/stage1_runtime/worker_output_validator.txt",
|
"worker_output_validator": "Default_Agent/stage1_runtime/worker_output_validator.txt",
|
||||||
}
|
}
|
||||||
ACTIVATION_MANIFEST_PATH = "routing/domain_activation_manifest.json"
|
|
||||||
REGISTRY_INDEX_PATH = "Default_Agent/domains/_registry_index.json"
|
|
||||||
|
|
||||||
def _seed_docs_from_plan(plan):
|
def _seed_docs_from_plan(plan):
|
||||||
# v5 — 경로만이 아니라 계획 행 전체를 보관한다. validate_seed_object 가
|
# v5 — 경로만이 아니라 계획 행 전체를 보관한다. validate_seed_object 가
|
||||||
|
|||||||
+567
@@ -0,0 +1,567 @@
|
|||||||
|
# =============================================================================
|
||||||
|
# P3-L0 / Task_C_LE_L0_structure_seed_reducer — v1 (신설)
|
||||||
|
#
|
||||||
|
# 정본 근거 : stage_1_part_3_개정_신전략서.md §4.2 (L0-1 ~ L0-8) · §3 (I-1 ~ I-14) · §5
|
||||||
|
# 계약 : Θ = SG-01.expected_runnable_domain_ids 의 domain_config.structure_types 합집합
|
||||||
|
# 구조 레코드 = (도메인, type_id) 쌍마다 하나 · order_key 3키 전순서
|
||||||
|
# 조립·판정 로직은 stage1_runtime/structure_index_compiler 모듈에 있다.
|
||||||
|
# 이 task 는 자산 반입 → 게이트 → 봉인 → 적재 → 모듈 호출 → 기록만 한다.
|
||||||
|
# 제약 1 : v.7/Claude_YAML 의 어떤 파일도 읽지 않는다. 구 Part 3 에 의존하지 않는다.
|
||||||
|
# 137종 : 사건 이름·도메인 목록·유형 열거를 코드에 두지 않는다.
|
||||||
|
# =============================================================================
|
||||||
|
- task_name: Task_C_LE_L0_structure_seed_reducer
|
||||||
|
mcp: code-executor
|
||||||
|
tool_name: run_code
|
||||||
|
parameters:
|
||||||
|
language: python
|
||||||
|
requirements: "httpx"
|
||||||
|
network: "agent-network"
|
||||||
|
timeout: 240
|
||||||
|
code: |-
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
# Task_C_LE_L0_structure_seed_reducer (v1)
|
||||||
|
# 0) 배포 게이트 -> 1) 모듈 반입 -> 2) 정책 반입 -> 3) 의미 검사 둘 ->
|
||||||
|
# 4) 진입 봉인 둘 -> 5) 입력 적재 -> 6) compile_structure_seeds ->
|
||||||
|
# 7) bundle · review handoff · receipt 기록
|
||||||
|
import contextlib
|
||||||
|
import hashlib
|
||||||
|
import io
|
||||||
|
import itertools
|
||||||
|
import json
|
||||||
|
import pathlib
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
# localdocs 보일러플레이트 (SKILL.md 5장 / 5.2장) — Part 2 A0 검증 완료본 복사.
|
||||||
|
# clientInfo 에 {{__user_hash__}} / {{__workspace_hash__}} 를 반드시 넣는다.
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
TASK_NAME = "Task_C_LE_L0_structure_seed_reducer"
|
||||||
|
LOCALDOCS_URL = "http://mcp-localdocs:8012/mcp"
|
||||||
|
MCP_HEADERS = {"Content-Type": "application/json",
|
||||||
|
"Accept": "application/json, text/event-stream"}
|
||||||
|
CLIENT = httpx.Client(timeout=120)
|
||||||
|
MSG_ID_COUNTER = itertools.count(10)
|
||||||
|
|
||||||
|
|
||||||
|
def next_msg_id():
|
||||||
|
return next(MSG_ID_COUNTER)
|
||||||
|
|
||||||
|
|
||||||
|
def _init():
|
||||||
|
r = CLIENT.post(LOCALDOCS_URL, json={
|
||||||
|
"jsonrpc": "2.0", "id": 1, "method": "initialize",
|
||||||
|
"params": {"protocolVersion": "2025-03-26", "capabilities": {},
|
||||||
|
"clientInfo": {"name": TASK_NAME, "version": "1.0",
|
||||||
|
"user_id": "{{__user_hash__}}",
|
||||||
|
"workspace_id": "{{__workspace_hash__}}"}}
|
||||||
|
}, headers=MCP_HEADERS)
|
||||||
|
r.raise_for_status()
|
||||||
|
sid = r.headers.get("mcp-session-id")
|
||||||
|
if sid:
|
||||||
|
MCP_HEADERS["mcp-session-id"] = sid
|
||||||
|
CLIENT.post(LOCALDOCS_URL,
|
||||||
|
json={"jsonrpc": "2.0", "method": "notifications/initialized"},
|
||||||
|
headers=MCP_HEADERS).raise_for_status()
|
||||||
|
|
||||||
|
|
||||||
|
def _parse_mcp(text):
|
||||||
|
for line in text.strip().split("\n"):
|
||||||
|
if line.startswith("data: "):
|
||||||
|
try:
|
||||||
|
return json.loads(line[6:])
|
||||||
|
except Exception:
|
||||||
|
return None
|
||||||
|
try:
|
||||||
|
return json.loads(text)
|
||||||
|
except Exception:
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def _call(name, args, mid):
|
||||||
|
r = CLIENT.post(LOCALDOCS_URL, json={
|
||||||
|
"jsonrpc": "2.0", "id": mid, "method": "tools/call",
|
||||||
|
"params": {"name": name, "arguments": args}
|
||||||
|
}, headers=MCP_HEADERS)
|
||||||
|
r.raise_for_status()
|
||||||
|
p = _parse_mcp(r.text)
|
||||||
|
if not p or "result" not in p:
|
||||||
|
raise RuntimeError("MCP_CALL_FAILED:%s" % name)
|
||||||
|
return p
|
||||||
|
|
||||||
|
|
||||||
|
def read_raw(name):
|
||||||
|
# 재직렬화 없이 원문 그대로. 봉인·미러 해시 대조의 전제다.
|
||||||
|
p = _call("read_docs", {"doc_names": [name]}, next_msg_id())
|
||||||
|
text = (p["result"].get("content") or [{}])[0].get("text", "")
|
||||||
|
if not text:
|
||||||
|
raise RuntimeError("EMPTY_RESPONSE:%s" % name)
|
||||||
|
try:
|
||||||
|
outer = json.loads(text)
|
||||||
|
except Exception:
|
||||||
|
return text
|
||||||
|
if isinstance(outer, str):
|
||||||
|
return outer
|
||||||
|
if isinstance(outer, dict) and "results" in outer:
|
||||||
|
r0 = (outer.get("results") or [{}])[0]
|
||||||
|
inner = r0.get("content")
|
||||||
|
if inner is None:
|
||||||
|
inner = r0.get("text")
|
||||||
|
if not isinstance(inner, str) or not inner:
|
||||||
|
raise RuntimeError("EMPTY_CONTENT:%s" % name)
|
||||||
|
return inner
|
||||||
|
raise RuntimeError("UNEXPECTED_READ_DOCS_ENVELOPE:%s" % name)
|
||||||
|
|
||||||
|
|
||||||
|
def read_json(name):
|
||||||
|
raw = read_raw(name)
|
||||||
|
s = raw.strip()
|
||||||
|
try:
|
||||||
|
return json.loads(s)
|
||||||
|
except json.JSONDecodeError:
|
||||||
|
obj, _ = json.JSONDecoder().raw_decode(s)
|
||||||
|
return obj
|
||||||
|
|
||||||
|
|
||||||
|
def try_read_json(name):
|
||||||
|
try:
|
||||||
|
return read_json(name)
|
||||||
|
except Exception:
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def write_doc(path, content):
|
||||||
|
_call("write_file", {"path": path, "content": content, "overwrite": True},
|
||||||
|
next_msg_id())
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
# 실행 뿌리 — /tmp/s1 공유(신전략서 §4.2 도입부. 새 뿌리를 만들지 않는다).
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
ASSET_ROOT = "Default_Agent/"
|
||||||
|
EXECUTION_ROOT = "/tmp/s1"
|
||||||
|
RT = pathlib.Path(EXECUTION_ROOT) / "_rt"
|
||||||
|
|
||||||
|
MODULE_MIRRORS = {
|
||||||
|
"runtime_common": "Default_Agent/stage1_runtime/runtime_common.txt",
|
||||||
|
"schema_subset_validator": "Default_Agent/stage1_runtime/schema_subset_validator.txt",
|
||||||
|
"registry_loader": "Default_Agent/stage1_runtime/registry_loader.txt",
|
||||||
|
"structure_index_compiler": "Default_Agent/stage1_runtime/structure_index_compiler.txt",
|
||||||
|
}
|
||||||
|
MODULES = ["runtime_common", "schema_subset_validator", "registry_loader",
|
||||||
|
"structure_index_compiler"]
|
||||||
|
RUNTIME_MANIFEST = "Default_Agent/runtime_manifest.json"
|
||||||
|
RUNTIME_MANIFEST_SCHEMA = "stage1_runtime_manifest.v1"
|
||||||
|
|
||||||
|
# 정적 자산 (I-9 ~ I-14)
|
||||||
|
REGISTRY_INDEX = "Default_Agent/domains/_registry_index.json"
|
||||||
|
POLICY = "Default_Agent/stage1_runtime/structure_index_policy.v1.json"
|
||||||
|
POLICY_SCHEMA_VERSION = "stage1_structure_index_policy.v1"
|
||||||
|
ALIAS_DECLARATIONS = "Default_Agent/routing/extension_payload_key_declarations.v1.json"
|
||||||
|
SEED_SCHEMA = "Default_Agent/platform/schemas/structure_seed_bundle.schema.json"
|
||||||
|
INDEX_SCHEMA = "Default_Agent/platform/schemas/legal_effect_structures.schema.json"
|
||||||
|
|
||||||
|
# 사건 산출물 (I-1 ~ I-8) — Part 1·2 가 낸 것만 읽는다.
|
||||||
|
SIGNAL_MANIFEST = "signals/signal_manifest.json"
|
||||||
|
SG13_PATH = "signals/legal_effect_routes.json"
|
||||||
|
SG05_PATH = "signals/legal_relation_lifecycle_signals.json"
|
||||||
|
SG11_PATH = "signals/calculation_requirements.json"
|
||||||
|
SG02_PATH = "signals/procedural_posture_relief_signals.json"
|
||||||
|
SG07_PATH = "signals/asset_right_state_signals.json"
|
||||||
|
DOMAIN_SIGNAL_DIR = "signals/domain_signals"
|
||||||
|
ACTIVATION_MANIFEST = "routing/domain_activation_manifest.json"
|
||||||
|
BO_PATH = "BO.json"
|
||||||
|
SLICE_DIR = "runtime/domain_slices"
|
||||||
|
|
||||||
|
# 산출
|
||||||
|
BUNDLE_PATH = "stage1_tmp/task_le/structure_seed_bundle.json"
|
||||||
|
HANDOFF_PATH = "quality_gates/stage1_part3_review_handoff.json"
|
||||||
|
RECEIPT_PATH = "validation_assets/routing/part3_receipt.json"
|
||||||
|
|
||||||
|
# F-2 상당 — 배포 게이트가 한 벌로 검사하는 필수 자산 10 리터럴(신전략서 §5.5).
|
||||||
|
# 사이드카 50 은 여기 넣지 않는다 — expected_runnable 도메인 것만 읽는 시점에
|
||||||
|
# _verify_asset 으로 지킨다. domains/_registry_index.json 은 매니페스트 등재
|
||||||
|
# 대상이 아니므로 SG-01 봉인이 지킨다(I-11 · §1.10 규율).
|
||||||
|
PART3_REQUIRED_ASSETS = (
|
||||||
|
SEED_SCHEMA,
|
||||||
|
INDEX_SCHEMA,
|
||||||
|
POLICY,
|
||||||
|
ALIAS_DECLARATIONS,
|
||||||
|
"Default_Agent/signals/signal_registry.v2.json",
|
||||||
|
"Default_Agent/contracts/signals/s5_execution_contract.v2.json",
|
||||||
|
"Default_Agent/stage1_runtime/structure_index_compiler.txt",
|
||||||
|
"Default_Agent/stage1_runtime/runtime_common.txt",
|
||||||
|
"Default_Agent/stage1_runtime/schema_subset_validator.txt",
|
||||||
|
"Default_Agent/stage1_runtime/registry_loader.txt",
|
||||||
|
)
|
||||||
|
PART3_DEPLOYMENT_REMEDY = (
|
||||||
|
"배포 원본 extension_research/Default_Agent 트리를 서버 Default_Agent/ 에 통째로 배포하고 "
|
||||||
|
"runtime_manifest.json 의 등재·sha256 과 대조해 결손 경로를 복원한다. 부분 복사는 허용되지 않는다.")
|
||||||
|
|
||||||
|
TRANSACTION_ID_RE = re.compile(r"^S5TX-[a-f0-9]{20}$")
|
||||||
|
|
||||||
|
ERRORS = []
|
||||||
|
WARNINGS = []
|
||||||
|
|
||||||
|
|
||||||
|
def sha_text(text):
|
||||||
|
return hashlib.sha256(text.encode("utf-8")).hexdigest()
|
||||||
|
|
||||||
|
|
||||||
|
def canonical(value):
|
||||||
|
return json.dumps(value, ensure_ascii=False, sort_keys=True,
|
||||||
|
separators=(",", ":")) + "\n"
|
||||||
|
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
# 0) 배포 게이트 — 등재·sha256·가독을 한 벌로. 첫 실패에서 멈추지 않고 모은다.
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
def assert_deployment():
|
||||||
|
manifest = json.loads(read_raw(RUNTIME_MANIFEST))
|
||||||
|
if manifest.get("schema_version") != RUNTIME_MANIFEST_SCHEMA:
|
||||||
|
raise RuntimeError(json.dumps({
|
||||||
|
"reason_code": "PART3_RUNTIME_MANIFEST_INVALID", "detail": "schema_version",
|
||||||
|
"expected": RUNTIME_MANIFEST_SCHEMA, "actual": manifest.get("schema_version"),
|
||||||
|
}, ensure_ascii=False))
|
||||||
|
expected = {row["path"]: row["sha256"]
|
||||||
|
for row in (manifest.get("entries") or []) if isinstance(row, dict)}
|
||||||
|
unregistered, mismatch, unreadable = [], [], []
|
||||||
|
for logical in sorted(set(list(MODULE_MIRRORS.values()) + list(PART3_REQUIRED_ASSETS))):
|
||||||
|
rel = logical[len(ASSET_ROOT):]
|
||||||
|
want = expected.get(rel)
|
||||||
|
if want is None:
|
||||||
|
unregistered.append(rel)
|
||||||
|
try:
|
||||||
|
body = read_raw(logical)
|
||||||
|
except Exception:
|
||||||
|
unreadable.append(rel)
|
||||||
|
continue
|
||||||
|
if want is not None and want != sha_text(body):
|
||||||
|
mismatch.append({"path": rel, "expected": want, "actual": sha_text(body)})
|
||||||
|
if unregistered or mismatch or unreadable:
|
||||||
|
raise RuntimeError(json.dumps({
|
||||||
|
"reason_code": "PART3_ASSET_DEPLOYMENT_INCOMPLETE",
|
||||||
|
"message": "배포 원본에 Part 3 자산이 한 벌로 반영되지 않았다.",
|
||||||
|
"unregistered": unregistered, "hash_mismatch": mismatch,
|
||||||
|
"unreadable": unreadable, "remedy": PART3_DEPLOYMENT_REMEDY,
|
||||||
|
}, ensure_ascii=False))
|
||||||
|
return manifest
|
||||||
|
|
||||||
|
|
||||||
|
_MANIFEST_MAP = None
|
||||||
|
|
||||||
|
|
||||||
|
def _manifest_map():
|
||||||
|
global _MANIFEST_MAP
|
||||||
|
if _MANIFEST_MAP is None:
|
||||||
|
_MANIFEST_MAP = {row["path"]: row["sha256"]
|
||||||
|
for row in (json.loads(read_raw(RUNTIME_MANIFEST)).get("entries") or [])
|
||||||
|
if isinstance(row, dict)}
|
||||||
|
return _MANIFEST_MAP
|
||||||
|
|
||||||
|
|
||||||
|
def _deployment_error(logical, detail, extra=None):
|
||||||
|
payload = {"reason_code": "PART3_ASSET_DEPLOYMENT_INCOMPLETE", "path": logical,
|
||||||
|
"detail": detail, "remedy": PART3_DEPLOYMENT_REMEDY}
|
||||||
|
if extra:
|
||||||
|
payload.update(extra)
|
||||||
|
return RuntimeError(json.dumps(payload, ensure_ascii=False))
|
||||||
|
|
||||||
|
|
||||||
|
def _verify_asset(logical):
|
||||||
|
"""원문을 돌려준다. 등재·해시 대조를 통과해야만 소비된다."""
|
||||||
|
body = read_raw(logical)
|
||||||
|
want = _manifest_map().get(logical[len(ASSET_ROOT):])
|
||||||
|
if want is None:
|
||||||
|
raise _deployment_error(logical, "unregistered")
|
||||||
|
if want != sha_text(body):
|
||||||
|
raise _deployment_error(logical, "hash_mismatch", {"expected": want})
|
||||||
|
return body
|
||||||
|
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
# 1) 모듈 반입 — R-1~R-5.
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
def materialize_modules():
|
||||||
|
RT.mkdir(parents=True, exist_ok=True)
|
||||||
|
expected = _manifest_map()
|
||||||
|
staged = []
|
||||||
|
for name in MODULES:
|
||||||
|
logical = MODULE_MIRRORS[name]
|
||||||
|
raw = read_raw(logical).encode("utf-8")
|
||||||
|
want = expected.get(logical[len(ASSET_ROOT):])
|
||||||
|
if want is None:
|
||||||
|
raise RuntimeError("MODULE_MIRROR_UNREGISTERED:%s" % logical)
|
||||||
|
if want != hashlib.sha256(raw).hexdigest():
|
||||||
|
raise RuntimeError("MODULE_MIRROR_HASH_MISMATCH:%s" % logical)
|
||||||
|
(RT / (name + ".py")).write_bytes(raw)
|
||||||
|
staged.append(name)
|
||||||
|
if str(RT) not in sys.path:
|
||||||
|
sys.path.insert(0, str(RT))
|
||||||
|
return staged
|
||||||
|
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
# 3) 의미 검사 — 장부 검사만으로는 닫히지 않는다(Part 2 R-b/R-g2 교훈).
|
||||||
|
# 각 검사는 자기가 쓰는 산출물의 스키마만 본다. by_module 은 L2 몫이다.
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
def assert_seed_schema_capability(seed_schema):
|
||||||
|
bundle_props = (((seed_schema.get("properties") or {})
|
||||||
|
.get("structure_seed_bundle") or {}).get("properties") or {})
|
||||||
|
record_props = ((((bundle_props.get("structure_records") or {})
|
||||||
|
.get("items") or {}).get("properties") or {}))
|
||||||
|
missing = []
|
||||||
|
if "theta" not in bundle_props:
|
||||||
|
missing.append("theta")
|
||||||
|
if "admission_policy" not in record_props:
|
||||||
|
missing.append("structure_records[].admission_policy")
|
||||||
|
if missing:
|
||||||
|
raise RuntimeError(json.dumps({
|
||||||
|
"reason_code": "PART3_STRUCTURE_SCHEMA_STALE",
|
||||||
|
"message": "seed 스키마가 Part 3 계약 필드를 모른다. 배포 원본의 스키마가 개정 전 판본이다.",
|
||||||
|
"missing": missing, "remedy": PART3_DEPLOYMENT_REMEDY,
|
||||||
|
}, ensure_ascii=False))
|
||||||
|
|
||||||
|
|
||||||
|
def assert_compiler_capability(result):
|
||||||
|
bundle = (result or {}).get("structure_seed_bundle") or {}
|
||||||
|
records = bundle.get("structure_records")
|
||||||
|
bad = ("theta" not in bundle
|
||||||
|
or not isinstance(records, list)
|
||||||
|
or any("order_key" not in record for record in records
|
||||||
|
if isinstance(record, dict)))
|
||||||
|
if bad:
|
||||||
|
raise RuntimeError(json.dumps({
|
||||||
|
"reason_code": "PART3_COMPILER_STALE",
|
||||||
|
"message": "컴파일러 산출에 theta·order_key 가 실려 나오지 않는다. "
|
||||||
|
"배포 원본의 structure_index_compiler 가 개정 전 판본이다.",
|
||||||
|
"remedy": PART3_DEPLOYMENT_REMEDY,
|
||||||
|
}, ensure_ascii=False))
|
||||||
|
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
# 4) 진입 봉인 둘 (신전략서 §4.2-5)
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
def verify_signal_seal():
|
||||||
|
doc = read_json(SIGNAL_MANIFEST)
|
||||||
|
root = doc.get("signal_manifest", doc) if isinstance(doc, dict) else {}
|
||||||
|
transaction_id = root.get("transaction_id")
|
||||||
|
if not isinstance(transaction_id, str) or not TRANSACTION_ID_RE.match(transaction_id):
|
||||||
|
raise RuntimeError(json.dumps({
|
||||||
|
"reason_code": "PART3_SIGNAL_SEAL_FAILED", "detail": "transaction_id",
|
||||||
|
"actual": transaction_id}, ensure_ascii=False))
|
||||||
|
checked = 0
|
||||||
|
for row in root.get("files") or []:
|
||||||
|
if not isinstance(row, dict):
|
||||||
|
continue
|
||||||
|
# files[].path 에는 signals/ 접두사가 없다(I-1 주의). 붙여서 대조한다.
|
||||||
|
rel = str(row.get("path") or "")
|
||||||
|
actual = sha_text(read_raw("signals/" + rel))
|
||||||
|
if actual != row.get("file_sha256"):
|
||||||
|
raise RuntimeError(json.dumps({
|
||||||
|
"reason_code": "PART3_SIGNAL_SEAL_FAILED", "detail": "file_sha256",
|
||||||
|
"path": rel, "expected": row.get("file_sha256"), "actual": actual,
|
||||||
|
}, ensure_ascii=False))
|
||||||
|
checked += 1
|
||||||
|
return {"transaction_id": transaction_id, "files_checked": checked, "root": root}
|
||||||
|
|
||||||
|
|
||||||
|
def verify_registry_index_seal(activation_root, index_raw):
|
||||||
|
declared = activation_root.get("registry_index_sha256")
|
||||||
|
actual = sha_text(index_raw)
|
||||||
|
if declared != actual:
|
||||||
|
# 전순서 둘째 키가 이 색인의 배열 위치에 걸려 있다. 매니페스트 등재 대상이
|
||||||
|
# 아니므로 이 봉인만이 색인 교체를 잡는다(L-d2).
|
||||||
|
raise RuntimeError(json.dumps({
|
||||||
|
"reason_code": "PART3_REGISTRY_INDEX_SEAL_FAILED",
|
||||||
|
"declared": declared, "actual": actual}, ensure_ascii=False))
|
||||||
|
return actual
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
gate_manifest = assert_deployment()
|
||||||
|
staged = materialize_modules()
|
||||||
|
import structure_index_compiler
|
||||||
|
|
||||||
|
# 2) 정책 반입 — 판본 불일치는 PART3_POLICY_INVALID.
|
||||||
|
policy = json.loads(_verify_asset(POLICY))
|
||||||
|
if policy.get("schema_version") != POLICY_SCHEMA_VERSION:
|
||||||
|
raise RuntimeError(json.dumps({
|
||||||
|
"reason_code": "PART3_POLICY_INVALID",
|
||||||
|
"expected": POLICY_SCHEMA_VERSION,
|
||||||
|
"actual": policy.get("schema_version")}, ensure_ascii=False))
|
||||||
|
|
||||||
|
# 3) 의미 검사 (입력 쪽)
|
||||||
|
seed_schema = json.loads(_verify_asset(SEED_SCHEMA))
|
||||||
|
assert_seed_schema_capability(seed_schema)
|
||||||
|
|
||||||
|
# 4) 진입 봉인 둘
|
||||||
|
seal = verify_signal_seal()
|
||||||
|
activation_doc = read_json(ACTIVATION_MANIFEST)
|
||||||
|
activation_root = activation_doc.get("domain_activation_manifest", activation_doc)
|
||||||
|
index_raw = read_raw(REGISTRY_INDEX)
|
||||||
|
registry_index_sha = verify_registry_index_seal(activation_root, index_raw)
|
||||||
|
registry_index = json.loads(index_raw)
|
||||||
|
index_root = registry_index.get("domain_registry_index", registry_index)
|
||||||
|
|
||||||
|
expected_runnable = [d for d in (activation_root.get("expected_runnable_domain_ids") or [])
|
||||||
|
if isinstance(d, str)]
|
||||||
|
|
||||||
|
# 5) 입력 적재
|
||||||
|
# I-9 domain_config — 무결성은 SG-01 봉인 -> _registry_index -> config_sha256 사슬.
|
||||||
|
config_sha = {row.get("domain_id"): row.get("config_sha256")
|
||||||
|
for row in (index_root.get("entries") or []) if isinstance(row, dict)}
|
||||||
|
domain_configs = {}
|
||||||
|
domain_sidecars = {}
|
||||||
|
for domain_id in expected_runnable:
|
||||||
|
raw = read_raw("Default_Agent/domains/%s/domain_config.json" % domain_id)
|
||||||
|
if config_sha.get(domain_id) and sha_text(raw) != config_sha[domain_id]:
|
||||||
|
raise RuntimeError(json.dumps({
|
||||||
|
"reason_code": "PART3_REGISTRY_INDEX_SEAL_FAILED",
|
||||||
|
"detail": "config_sha256", "domain_id": domain_id}, ensure_ascii=False))
|
||||||
|
config = json.loads(raw)
|
||||||
|
domain_configs[domain_id] = config
|
||||||
|
config_root = config.get("domain_config", config)
|
||||||
|
declared = [row for row in (config_root.get("structure_types") or [])
|
||||||
|
if isinstance(row, dict)]
|
||||||
|
if declared:
|
||||||
|
# 사이드카 부재 규칙(§5.5) — 선언 있는 도메인의 부재·미등재는 경성 실패.
|
||||||
|
domain_sidecars[domain_id] = {
|
||||||
|
"structure_types": json.loads(_verify_asset(
|
||||||
|
"Default_Agent/domains/%s/structure_types.json" % domain_id)),
|
||||||
|
"module_role_projection": json.loads(_verify_asset(
|
||||||
|
"Default_Agent/domains/%s/module_role_projection.json" % domain_id)),
|
||||||
|
}
|
||||||
|
|
||||||
|
alias_declarations = json.loads(_verify_asset(ALIAS_DECLARATIONS))
|
||||||
|
|
||||||
|
def records_of(doc):
|
||||||
|
if not isinstance(doc, dict):
|
||||||
|
return []
|
||||||
|
return [row for row in (doc.get("records") or []) if isinstance(row, dict)]
|
||||||
|
|
||||||
|
# 경로 상수를 read_json 에 직접 넘긴다 — 선언표 검사기(U4)가 읽기를 코드에서
|
||||||
|
# 확인할 수 있는 형태다. 간접 호출로 감싸면 소비 선언이 실측 불가가 된다.
|
||||||
|
sg13_records = records_of(read_json(SG13_PATH))
|
||||||
|
sg05_records = records_of(read_json(SG05_PATH))
|
||||||
|
sg11_records = records_of(read_json(SG11_PATH))
|
||||||
|
# 읽되 비어 있음을 정상 처리(§3) — 조인 코드를 두지 않고 형식화된 사실로 남긴다.
|
||||||
|
sg02_rows = records_of(read_json(SG02_PATH))
|
||||||
|
sg07_rows = records_of(read_json(SG07_PATH))
|
||||||
|
empty_read_set = [
|
||||||
|
{"signal_id": "SG-02", "transform": "passthrough", "producer_count": 0,
|
||||||
|
"record_count": len(sg02_rows),
|
||||||
|
"reason": "closed schema declares no claim-form vocabulary"},
|
||||||
|
{"signal_id": "SG-07", "transform": "passthrough", "producer_count": 0,
|
||||||
|
"record_count": len(sg07_rows),
|
||||||
|
"reason": "closed schema declares no claim-form vocabulary"},
|
||||||
|
]
|
||||||
|
|
||||||
|
domain_envelopes = {}
|
||||||
|
for domain_id in expected_runnable:
|
||||||
|
doc = try_read_json("%s/%s.json" % (DOMAIN_SIGNAL_DIR, domain_id))
|
||||||
|
if doc is not None:
|
||||||
|
domain_envelopes[domain_id] = doc
|
||||||
|
|
||||||
|
bo_doc = try_read_json(BO_PATH)
|
||||||
|
bo_records = bo_doc if isinstance(bo_doc, list) else []
|
||||||
|
bo_raw = read_raw(BO_PATH) if bo_doc is not None else ""
|
||||||
|
|
||||||
|
slice_documents = {}
|
||||||
|
for domain_id in expected_runnable:
|
||||||
|
doc = try_read_json("%s/%s.json" % (SLICE_DIR, domain_id))
|
||||||
|
if doc is not None:
|
||||||
|
slice_documents[domain_id] = doc
|
||||||
|
|
||||||
|
# 6) 모듈 호출 — 판정 규칙을 이 파일에 쓰지 않는다.
|
||||||
|
try:
|
||||||
|
result = structure_index_compiler.compile_structure_seeds(
|
||||||
|
activation_doc, registry_index, domain_configs, domain_sidecars,
|
||||||
|
policy, alias_declarations, sg13_records, sg05_records, sg11_records,
|
||||||
|
domain_envelopes, bo_records, slice_documents)
|
||||||
|
except TypeError as exc:
|
||||||
|
raise RuntimeError(json.dumps({
|
||||||
|
"reason_code": "PART3_COMPILER_STALE", "detail": "signature_mismatch",
|
||||||
|
"signature_error": str(exc)[:200],
|
||||||
|
"remedy": PART3_DEPLOYMENT_REMEDY}, ensure_ascii=False))
|
||||||
|
assert_compiler_capability(result)
|
||||||
|
|
||||||
|
bundle = result["structure_seed_bundle"]
|
||||||
|
review_items = result["review_items"]
|
||||||
|
audit = result["audit"]
|
||||||
|
# 진입 봉인의 거래 식별자를 bundle 에 부착한다 — L2 는 signal_manifest 를
|
||||||
|
# 다시 읽지 않고(§4.3 입력 계약 밖) 이 값을 승계한다.
|
||||||
|
bundle["signal_manifest_transaction_id"] = seal["transaction_id"]
|
||||||
|
|
||||||
|
# 자기 산출을 닫힌 스키마로 검증한다.
|
||||||
|
import schema_subset_validator
|
||||||
|
schema_errors = schema_subset_validator.validate(
|
||||||
|
{"structure_seed_bundle": bundle}, seed_schema)
|
||||||
|
if schema_errors:
|
||||||
|
raise RuntimeError(json.dumps({
|
||||||
|
"reason_code": "PART3_FINAL_SCHEMA_VALIDATION_FAILED",
|
||||||
|
"stage": "L0", "errors": schema_errors[:10]}, ensure_ascii=False))
|
||||||
|
|
||||||
|
# 7) 기록 — bundle · handoff(OPEN) · receipt(실측값. 상수 PASS 금지).
|
||||||
|
write_doc(BUNDLE_PATH, canonical({"structure_seed_bundle": bundle}))
|
||||||
|
write_doc(HANDOFF_PATH, canonical({"stage1_part3_review_handoff": {
|
||||||
|
"schema_version": "stage1_part3_review_handoff.v1",
|
||||||
|
"status": "OPEN",
|
||||||
|
"review_items": review_items,
|
||||||
|
"counts": {"review_items": len(review_items)},
|
||||||
|
"created_by": TASK_NAME,
|
||||||
|
}}))
|
||||||
|
order_table = ["%s|%s|%s|%s|%s" % (
|
||||||
|
record.get("priority_rank"), record.get("domain_id"),
|
||||||
|
record.get("type_id"), record.get("module"),
|
||||||
|
record.get("admission_policy"))
|
||||||
|
for record in bundle.get("structure_records") or []]
|
||||||
|
write_doc(RECEIPT_PATH, canonical({
|
||||||
|
"schema_version": "stage1_part3_receipt.v1",
|
||||||
|
"stage": "P3-L0",
|
||||||
|
"deployment_gate": {
|
||||||
|
"checked_count": len(set(list(MODULE_MIRRORS.values())
|
||||||
|
+ list(PART3_REQUIRED_ASSETS))),
|
||||||
|
"runtime_manifest_sha256": sha_text(read_raw(RUNTIME_MANIFEST)),
|
||||||
|
"runtime_artifact_count": gate_manifest.get("runtime_artifact_count"),
|
||||||
|
"schema_capability_checked": ["theta", "structure_records[].admission_policy"],
|
||||||
|
"compiler_output_checked": ["theta", "structure_records[].order_key"],
|
||||||
|
"policy_schema_version": policy.get("schema_version"),
|
||||||
|
"note": "무엇을 봤는지 적는다. 상수 PASS 는 증거가 아니다.",
|
||||||
|
},
|
||||||
|
"entry_seals": {
|
||||||
|
"signal_manifest_transaction_id": seal["transaction_id"],
|
||||||
|
"signal_files_checked": seal["files_checked"],
|
||||||
|
"registry_index_sha256": registry_index_sha,
|
||||||
|
"config_sha256_chain_checked": len(domain_configs),
|
||||||
|
},
|
||||||
|
"join_counts": bundle.get("counts"),
|
||||||
|
"empty_read_set_signals": empty_read_set,
|
||||||
|
"sidecar_dialects": audit.get("sidecar_dialects"),
|
||||||
|
"unlinked_sg11": audit.get("unlinked_sg11"),
|
||||||
|
"dangling_calculation_refs": audit.get("dangling_calculation_refs"),
|
||||||
|
"input_gaps": audit.get("input_gaps"),
|
||||||
|
"bo_input": {"sha256": sha_text(bo_raw) if bo_raw else None,
|
||||||
|
"record_count": len(bo_records),
|
||||||
|
"note": "BO.json 은 무봉인 입력이다 — signal 5종은 I-1 봉인, "
|
||||||
|
"registry 는 SG-01 봉인이 지키는 비대칭을 관찰로 남긴다."},
|
||||||
|
"resolved_order_table": order_table,
|
||||||
|
"created_by": TASK_NAME,
|
||||||
|
}))
|
||||||
|
|
||||||
|
return {"status": bundle.get("status"),
|
||||||
|
"modules": staged,
|
||||||
|
"expected_runnable_domain_ids": expected_runnable,
|
||||||
|
"theta_count": len(bundle.get("theta") or []),
|
||||||
|
"structure_record_count": len(bundle.get("structure_records") or []),
|
||||||
|
"review_item_count": len(review_items),
|
||||||
|
"counts": bundle.get("counts"),
|
||||||
|
"errors": ERRORS, "warnings": WARNINGS}
|
||||||
|
|
||||||
|
|
||||||
|
_sink = io.StringIO()
|
||||||
|
with contextlib.redirect_stdout(_sink):
|
||||||
|
_init()
|
||||||
|
RESULT = main()
|
||||||
|
print(json.dumps(RESULT, ensure_ascii=False))
|
||||||
+420
@@ -0,0 +1,420 @@
|
|||||||
|
# =============================================================================
|
||||||
|
# P3-L2 / Task_C_LE_L2_final_structure_index_writer — v1 (신설)
|
||||||
|
#
|
||||||
|
# 정본 근거 : stage_1_part_3_개정_신전략서.md §4.3 · §2(D-4)
|
||||||
|
# 계약 : 구조 레코드 = Θ 의 (도메인, type_id) 쌍마다 하나 — 레코드 생성 주체는
|
||||||
|
# registry 선언이지 SG-13·BO 가 아니다.
|
||||||
|
# 보존 등식 셋(선언·근거·BO) — 바깥 수는 이 task 가 원본 파일에서 직접 센다
|
||||||
|
# (bundle 수와 비교하면 항등식으로 퇴행한다).
|
||||||
|
# 역인덱스 셋 by_domain_id · by_module · by_bo_id. by_claim_form 금지(D-4 라).
|
||||||
|
# 판정 파일은 없다 — L1 부재. F0 의 조건부 규칙을 흉내 내지 않는다(§4.1).
|
||||||
|
# =============================================================================
|
||||||
|
- task_name: Task_C_LE_L2_final_structure_index_writer
|
||||||
|
mcp: code-executor
|
||||||
|
tool_name: run_code
|
||||||
|
parameters:
|
||||||
|
language: python
|
||||||
|
requirements: "httpx"
|
||||||
|
network: "agent-network"
|
||||||
|
timeout: 240
|
||||||
|
code: |-
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
# Task_C_LE_L2_final_structure_index_writer (v1)
|
||||||
|
# 1) 게이트·정책·의미 검사 -> 2) bundle·handoff·원본 적재 ->
|
||||||
|
# 3) 보존 등식 셋(바깥 수 직접 계수) -> 4) 역인덱스 셋 ->
|
||||||
|
# 5) 닫힌 스키마 검증 -> 6) 기록·재읽기 -> 7) handoff FINALIZED
|
||||||
|
import contextlib
|
||||||
|
import hashlib
|
||||||
|
import io
|
||||||
|
import itertools
|
||||||
|
import json
|
||||||
|
import pathlib
|
||||||
|
import sys
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
TASK_NAME = "Task_C_LE_L2_final_structure_index_writer"
|
||||||
|
LOCALDOCS_URL = "http://mcp-localdocs:8012/mcp"
|
||||||
|
MCP_HEADERS = {"Content-Type": "application/json",
|
||||||
|
"Accept": "application/json, text/event-stream"}
|
||||||
|
CLIENT = httpx.Client(timeout=120)
|
||||||
|
MSG_ID_COUNTER = itertools.count(10)
|
||||||
|
|
||||||
|
|
||||||
|
def next_msg_id():
|
||||||
|
return next(MSG_ID_COUNTER)
|
||||||
|
|
||||||
|
|
||||||
|
def _init():
|
||||||
|
r = CLIENT.post(LOCALDOCS_URL, json={
|
||||||
|
"jsonrpc": "2.0", "id": 1, "method": "initialize",
|
||||||
|
"params": {"protocolVersion": "2025-03-26", "capabilities": {},
|
||||||
|
"clientInfo": {"name": TASK_NAME, "version": "1.0",
|
||||||
|
"user_id": "{{__user_hash__}}",
|
||||||
|
"workspace_id": "{{__workspace_hash__}}"}}
|
||||||
|
}, headers=MCP_HEADERS)
|
||||||
|
r.raise_for_status()
|
||||||
|
sid = r.headers.get("mcp-session-id")
|
||||||
|
if sid:
|
||||||
|
MCP_HEADERS["mcp-session-id"] = sid
|
||||||
|
CLIENT.post(LOCALDOCS_URL,
|
||||||
|
json={"jsonrpc": "2.0", "method": "notifications/initialized"},
|
||||||
|
headers=MCP_HEADERS).raise_for_status()
|
||||||
|
|
||||||
|
|
||||||
|
def _parse_mcp(text):
|
||||||
|
for line in text.strip().split("\n"):
|
||||||
|
if line.startswith("data: "):
|
||||||
|
try:
|
||||||
|
return json.loads(line[6:])
|
||||||
|
except Exception:
|
||||||
|
return None
|
||||||
|
try:
|
||||||
|
return json.loads(text)
|
||||||
|
except Exception:
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def _call(name, args, mid):
|
||||||
|
r = CLIENT.post(LOCALDOCS_URL, json={
|
||||||
|
"jsonrpc": "2.0", "id": mid, "method": "tools/call",
|
||||||
|
"params": {"name": name, "arguments": args}
|
||||||
|
}, headers=MCP_HEADERS)
|
||||||
|
r.raise_for_status()
|
||||||
|
p = _parse_mcp(r.text)
|
||||||
|
if not p or "result" not in p:
|
||||||
|
raise RuntimeError("MCP_CALL_FAILED:%s" % name)
|
||||||
|
return p
|
||||||
|
|
||||||
|
|
||||||
|
def read_raw(name):
|
||||||
|
p = _call("read_docs", {"doc_names": [name]}, next_msg_id())
|
||||||
|
text = (p["result"].get("content") or [{}])[0].get("text", "")
|
||||||
|
if not text:
|
||||||
|
raise RuntimeError("EMPTY_RESPONSE:%s" % name)
|
||||||
|
try:
|
||||||
|
outer = json.loads(text)
|
||||||
|
except Exception:
|
||||||
|
return text
|
||||||
|
if isinstance(outer, str):
|
||||||
|
return outer
|
||||||
|
if isinstance(outer, dict) and "results" in outer:
|
||||||
|
r0 = (outer.get("results") or [{}])[0]
|
||||||
|
inner = r0.get("content")
|
||||||
|
if inner is None:
|
||||||
|
inner = r0.get("text")
|
||||||
|
if not isinstance(inner, str) or not inner:
|
||||||
|
raise RuntimeError("EMPTY_CONTENT:%s" % name)
|
||||||
|
return inner
|
||||||
|
raise RuntimeError("UNEXPECTED_READ_DOCS_ENVELOPE:%s" % name)
|
||||||
|
|
||||||
|
|
||||||
|
def read_json(name):
|
||||||
|
raw = read_raw(name)
|
||||||
|
s = raw.strip()
|
||||||
|
try:
|
||||||
|
return json.loads(s)
|
||||||
|
except json.JSONDecodeError:
|
||||||
|
obj, _ = json.JSONDecoder().raw_decode(s)
|
||||||
|
return obj
|
||||||
|
|
||||||
|
|
||||||
|
def write_doc(path, content):
|
||||||
|
_call("write_file", {"path": path, "content": content, "overwrite": True},
|
||||||
|
next_msg_id())
|
||||||
|
|
||||||
|
ASSET_ROOT = "Default_Agent/"
|
||||||
|
EXECUTION_ROOT = "/tmp/s1"
|
||||||
|
RT = pathlib.Path(EXECUTION_ROOT) / "_rt"
|
||||||
|
|
||||||
|
MODULE_MIRRORS = {
|
||||||
|
"runtime_common": "Default_Agent/stage1_runtime/runtime_common.txt",
|
||||||
|
"schema_subset_validator": "Default_Agent/stage1_runtime/schema_subset_validator.txt",
|
||||||
|
}
|
||||||
|
MODULES = ["runtime_common", "schema_subset_validator"]
|
||||||
|
RUNTIME_MANIFEST = "Default_Agent/runtime_manifest.json"
|
||||||
|
|
||||||
|
POLICY = "Default_Agent/stage1_runtime/structure_index_policy.v1.json"
|
||||||
|
POLICY_SCHEMA_VERSION = "stage1_structure_index_policy.v1"
|
||||||
|
INDEX_SCHEMA = "Default_Agent/platform/schemas/legal_effect_structures.schema.json"
|
||||||
|
REGISTRY_INDEX = "Default_Agent/domains/_registry_index.json"
|
||||||
|
|
||||||
|
BUNDLE_PATH = "stage1_tmp/task_le/structure_seed_bundle.json"
|
||||||
|
HANDOFF_PATH = "quality_gates/stage1_part3_review_handoff.json"
|
||||||
|
ACTIVATION_MANIFEST = "routing/domain_activation_manifest.json"
|
||||||
|
SG13_PATH = "signals/legal_effect_routes.json"
|
||||||
|
BO_PATH = "BO.json"
|
||||||
|
TARGET_PATH = "legal_effect_structures.json"
|
||||||
|
|
||||||
|
PART3_DEPLOYMENT_REMEDY = (
|
||||||
|
"배포 원본 extension_research/Default_Agent 트리를 서버 Default_Agent/ 에 통째로 배포하고 "
|
||||||
|
"runtime_manifest.json 의 등재·sha256 과 대조해 결손 경로를 복원한다. 부분 복사는 허용되지 않는다.")
|
||||||
|
|
||||||
|
_MANIFEST_MAP = None
|
||||||
|
|
||||||
|
|
||||||
|
def sha_text(text):
|
||||||
|
return hashlib.sha256(text.encode("utf-8")).hexdigest()
|
||||||
|
|
||||||
|
|
||||||
|
def canonical(value):
|
||||||
|
return json.dumps(value, ensure_ascii=False, sort_keys=True,
|
||||||
|
separators=(",", ":")) + "\n"
|
||||||
|
|
||||||
|
|
||||||
|
def _manifest_map():
|
||||||
|
global _MANIFEST_MAP
|
||||||
|
if _MANIFEST_MAP is None:
|
||||||
|
_MANIFEST_MAP = {row["path"]: row["sha256"]
|
||||||
|
for row in (json.loads(read_raw(RUNTIME_MANIFEST)).get("entries") or [])
|
||||||
|
if isinstance(row, dict)}
|
||||||
|
return _MANIFEST_MAP
|
||||||
|
|
||||||
|
|
||||||
|
def _deployment_error(logical, detail, extra=None):
|
||||||
|
payload = {"reason_code": "PART3_ASSET_DEPLOYMENT_INCOMPLETE", "path": logical,
|
||||||
|
"detail": detail, "remedy": PART3_DEPLOYMENT_REMEDY}
|
||||||
|
if extra:
|
||||||
|
payload.update(extra)
|
||||||
|
return RuntimeError(json.dumps(payload, ensure_ascii=False))
|
||||||
|
|
||||||
|
|
||||||
|
def _verify_asset(logical):
|
||||||
|
body = read_raw(logical)
|
||||||
|
want = _manifest_map().get(logical[len(ASSET_ROOT):])
|
||||||
|
if want is None:
|
||||||
|
raise _deployment_error(logical, "unregistered")
|
||||||
|
if want != sha_text(body):
|
||||||
|
raise _deployment_error(logical, "hash_mismatch", {"expected": want})
|
||||||
|
return body
|
||||||
|
|
||||||
|
|
||||||
|
def materialize_modules():
|
||||||
|
RT.mkdir(parents=True, exist_ok=True)
|
||||||
|
expected = _manifest_map()
|
||||||
|
staged = []
|
||||||
|
for name in MODULES:
|
||||||
|
logical = MODULE_MIRRORS[name]
|
||||||
|
raw = read_raw(logical).encode("utf-8")
|
||||||
|
want = expected.get(logical[len(ASSET_ROOT):])
|
||||||
|
if want is None:
|
||||||
|
raise RuntimeError("MODULE_MIRROR_UNREGISTERED:%s" % logical)
|
||||||
|
if want != hashlib.sha256(raw).hexdigest():
|
||||||
|
raise RuntimeError("MODULE_MIRROR_HASH_MISMATCH:%s" % logical)
|
||||||
|
(RT / (name + ".py")).write_bytes(raw)
|
||||||
|
staged.append(name)
|
||||||
|
if str(RT) not in sys.path:
|
||||||
|
sys.path.insert(0, str(RT))
|
||||||
|
return staged
|
||||||
|
|
||||||
|
|
||||||
|
def assert_index_schema_capability(index_schema):
|
||||||
|
# 의미 검사(자기 스키마) — by_module · by_bo_id 를 아는가(PART3_INDEX_SCHEMA_STALE).
|
||||||
|
index_props = (((index_schema.get("properties") or {})
|
||||||
|
.get("structure_index") or {}).get("properties") or {})
|
||||||
|
missing = [key for key in ("by_module", "by_bo_id") if key not in index_props]
|
||||||
|
if missing:
|
||||||
|
raise RuntimeError(json.dumps({
|
||||||
|
"reason_code": "PART3_INDEX_SCHEMA_STALE",
|
||||||
|
"message": "색인 스키마가 by_module·by_bo_id 를 모른다. "
|
||||||
|
"배포 원본의 legal_effect_structures.schema.json 이 개정 전 판본이다.",
|
||||||
|
"missing": missing, "remedy": PART3_DEPLOYMENT_REMEDY,
|
||||||
|
}, ensure_ascii=False))
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
staged = materialize_modules()
|
||||||
|
import schema_subset_validator
|
||||||
|
|
||||||
|
policy = json.loads(_verify_asset(POLICY))
|
||||||
|
if policy.get("schema_version") != POLICY_SCHEMA_VERSION:
|
||||||
|
raise RuntimeError(json.dumps({
|
||||||
|
"reason_code": "PART3_POLICY_INVALID",
|
||||||
|
"expected": POLICY_SCHEMA_VERSION,
|
||||||
|
"actual": policy.get("schema_version")}, ensure_ascii=False))
|
||||||
|
index_schema = json.loads(_verify_asset(INDEX_SCHEMA))
|
||||||
|
assert_index_schema_capability(index_schema)
|
||||||
|
|
||||||
|
# 입력은 전부 파일 계약. 판정 파일은 없다(L1 부재 — §4.1).
|
||||||
|
bundle_doc = read_json(BUNDLE_PATH)
|
||||||
|
bundle = bundle_doc.get("structure_seed_bundle", bundle_doc)
|
||||||
|
records = [row for row in (bundle.get("structure_records") or [])
|
||||||
|
if isinstance(row, dict)]
|
||||||
|
handoff_doc = read_json(HANDOFF_PATH)
|
||||||
|
handoff = handoff_doc.get("stage1_part3_review_handoff", handoff_doc)
|
||||||
|
activation_doc = read_json(ACTIVATION_MANIFEST)
|
||||||
|
activation_root = activation_doc.get("domain_activation_manifest", activation_doc)
|
||||||
|
expected_runnable = [d for d in (activation_root.get("expected_runnable_domain_ids") or [])
|
||||||
|
if isinstance(d, str)]
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
# 보존 등식 셋 — 바깥 수를 원본에서 직접 센다.
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
# (1) 선언 보존 — Σ(expected_runnable 도메인의 structure_types 개수).
|
||||||
|
# domain_config 무결성은 SG-01 봉인 -> _registry_index -> config_sha256 사슬 재사용.
|
||||||
|
index_raw = read_raw(REGISTRY_INDEX)
|
||||||
|
if activation_root.get("registry_index_sha256") != sha_text(index_raw):
|
||||||
|
raise RuntimeError(json.dumps({
|
||||||
|
"reason_code": "PART3_REGISTRY_INDEX_SEAL_FAILED",
|
||||||
|
"stage": "L2"}, ensure_ascii=False))
|
||||||
|
registry_index = json.loads(index_raw)
|
||||||
|
index_root = registry_index.get("domain_registry_index", registry_index)
|
||||||
|
config_sha = {row.get("domain_id"): row.get("config_sha256")
|
||||||
|
for row in (index_root.get("entries") or []) if isinstance(row, dict)}
|
||||||
|
declared_total = 0
|
||||||
|
for domain_id in expected_runnable:
|
||||||
|
raw = read_raw("Default_Agent/domains/%s/domain_config.json" % domain_id)
|
||||||
|
if config_sha.get(domain_id) and sha_text(raw) != config_sha[domain_id]:
|
||||||
|
raise RuntimeError(json.dumps({
|
||||||
|
"reason_code": "PART3_REGISTRY_INDEX_SEAL_FAILED",
|
||||||
|
"detail": "config_sha256", "domain_id": domain_id}, ensure_ascii=False))
|
||||||
|
config = json.loads(raw)
|
||||||
|
config_root = config.get("domain_config", config)
|
||||||
|
declared_total += len([row for row in (config_root.get("structure_types") or [])
|
||||||
|
if isinstance(row, dict)])
|
||||||
|
declaration_pass = (len(records) == declared_total)
|
||||||
|
|
||||||
|
# (2) 근거 보존 — SG-13 원본에서 legal_effect_route 총수를 직접 센다.
|
||||||
|
# 붙은 route 는 레코드에서 재계수한다(bundle counts 를 믿지 않는다).
|
||||||
|
sg13_doc = read_json(SG13_PATH)
|
||||||
|
sg13_total = len([row for row in (sg13_doc.get("records") or [])
|
||||||
|
if isinstance(row, dict)
|
||||||
|
and row.get("record_type") == "legal_effect_route"])
|
||||||
|
attached_signal_ids = set()
|
||||||
|
for record in records:
|
||||||
|
for ref in record.get("routes") or []:
|
||||||
|
if isinstance(ref, dict) and isinstance(ref.get("signal_id"), str):
|
||||||
|
attached_signal_ids.add(ref["signal_id"])
|
||||||
|
routes_unattached = len(bundle.get("unattached_routes") or [])
|
||||||
|
route_pass = (len(attached_signal_ids) + routes_unattached == sg13_total)
|
||||||
|
|
||||||
|
# (3) BO 보존 — BO.json 원본에서 총수를 직접 센다.
|
||||||
|
bo_doc = read_json(BO_PATH)
|
||||||
|
bo_total = len(bo_doc) if isinstance(bo_doc, list) else 0
|
||||||
|
attached_bo = set()
|
||||||
|
for record in records:
|
||||||
|
for bo_id in record.get("source_bo_ids") or []:
|
||||||
|
if isinstance(bo_id, str):
|
||||||
|
attached_bo.add(bo_id)
|
||||||
|
bo_unattached = len(bundle.get("unattached_bo") or [])
|
||||||
|
bo_pass = (len(attached_bo) + bo_unattached == bo_total)
|
||||||
|
|
||||||
|
failures = []
|
||||||
|
if not declaration_pass:
|
||||||
|
failures.append({"reason_code": "PART3_STRUCTURE_COUNT_BROKEN",
|
||||||
|
"records": len(records), "declared_total": declared_total})
|
||||||
|
if not route_pass:
|
||||||
|
failures.append({"reason_code": "PART3_ROUTE_CONSERVATION_BROKEN",
|
||||||
|
"attached": len(attached_signal_ids),
|
||||||
|
"unattached": routes_unattached, "sg13_total": sg13_total})
|
||||||
|
if not bo_pass:
|
||||||
|
failures.append({"reason_code": "PART3_BO_CONSERVATION_BROKEN",
|
||||||
|
"attached": len(attached_bo),
|
||||||
|
"unattached": bo_unattached, "bo_total": bo_total})
|
||||||
|
if failures:
|
||||||
|
raise RuntimeError(json.dumps({"conservation_failures": failures},
|
||||||
|
ensure_ascii=False))
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
# 역인덱스 셋 — ID 목록만 담는다. 본문을 복제하지 않는다.
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
by_domain_id = {}
|
||||||
|
by_module = {}
|
||||||
|
by_bo_id = {}
|
||||||
|
for record in records:
|
||||||
|
structure_id = record.get("structure_id")
|
||||||
|
by_domain_id.setdefault(record.get("domain_id"), []).append(structure_id)
|
||||||
|
if record.get("module"):
|
||||||
|
by_module.setdefault(record["module"], []).append(structure_id)
|
||||||
|
for bo_id in record.get("source_bo_ids") or []:
|
||||||
|
by_bo_id.setdefault(bo_id, []).append(structure_id)
|
||||||
|
for index in (by_domain_id, by_module, by_bo_id):
|
||||||
|
for key in index:
|
||||||
|
index[key] = sorted(set(index[key]))
|
||||||
|
|
||||||
|
# 검토 재산정 — handoff 항목을 코드·심각도로 묶는다. review 는 근거 없이 줄지 않는다.
|
||||||
|
review_queue = []
|
||||||
|
queue_keys = {}
|
||||||
|
for item in handoff.get("review_items") or []:
|
||||||
|
if not isinstance(item, dict):
|
||||||
|
continue
|
||||||
|
key = (item.get("review_code"), item.get("severity"))
|
||||||
|
if key in queue_keys:
|
||||||
|
queue_keys[key]["count"] += 1
|
||||||
|
else:
|
||||||
|
row = {"review_code": key[0], "severity": key[1] or "SOFT_WARNING",
|
||||||
|
"count": 1}
|
||||||
|
queue_keys[key] = row
|
||||||
|
review_queue.append(row)
|
||||||
|
review_queue.sort(key=lambda row: (row["review_code"], row["severity"]))
|
||||||
|
status = "READY_WITH_REVIEW" if (review_queue or any(
|
||||||
|
record.get("review_required") for record in records)) else "READY"
|
||||||
|
|
||||||
|
final_doc = {
|
||||||
|
"schema_version": "stage1_legal_effect_structures.v1",
|
||||||
|
"status": status,
|
||||||
|
"registry_version": bundle.get("registry_version"),
|
||||||
|
"registry_index_sha256": sha_text(index_raw),
|
||||||
|
"activation_manifest_sha256": sha_text(read_raw(ACTIVATION_MANIFEST)),
|
||||||
|
"signal_manifest_transaction_id": bundle.get("signal_manifest_transaction_id"),
|
||||||
|
"expected_runnable_domain_ids": expected_runnable,
|
||||||
|
"theta": bundle.get("theta") or [],
|
||||||
|
"structure_records": records,
|
||||||
|
"structure_index": {"by_domain_id": by_domain_id,
|
||||||
|
"by_module": by_module,
|
||||||
|
"by_bo_id": by_bo_id},
|
||||||
|
"quality_gate": {
|
||||||
|
"declaration_conservation": {
|
||||||
|
"structure_records": len(records),
|
||||||
|
"declared_total_from_config": declared_total,
|
||||||
|
"conservation_pass": declaration_pass,
|
||||||
|
},
|
||||||
|
"route_conservation": {
|
||||||
|
"routes_attached": len(attached_signal_ids),
|
||||||
|
"routes_unattached": routes_unattached,
|
||||||
|
"sg13_route_total_from_source": sg13_total,
|
||||||
|
"conservation_pass": route_pass,
|
||||||
|
},
|
||||||
|
"bo_conservation": {
|
||||||
|
"bo_attached": len(attached_bo),
|
||||||
|
"bo_unattached": bo_unattached,
|
||||||
|
"bo_total_from_source": bo_total,
|
||||||
|
"conservation_pass": bo_pass,
|
||||||
|
},
|
||||||
|
"review_queue": review_queue,
|
||||||
|
},
|
||||||
|
"created_by": TASK_NAME,
|
||||||
|
}
|
||||||
|
|
||||||
|
# 닫힌 스키마 검증 -> 기록 -> 재읽기.
|
||||||
|
schema_errors = schema_subset_validator.validate(final_doc, index_schema)
|
||||||
|
if schema_errors:
|
||||||
|
raise RuntimeError(json.dumps({
|
||||||
|
"reason_code": "PART3_FINAL_SCHEMA_VALIDATION_FAILED",
|
||||||
|
"stage": "L2", "errors": schema_errors[:10]}, ensure_ascii=False))
|
||||||
|
text = canonical(final_doc)
|
||||||
|
write_doc(TARGET_PATH, text)
|
||||||
|
reread = read_raw(TARGET_PATH)
|
||||||
|
if sha_text(reread) != sha_text(text):
|
||||||
|
raise RuntimeError("PART3_WRITE_REREAD_MISMATCH")
|
||||||
|
|
||||||
|
# handoff FINALIZED 갱신(공동 기록자). 항목을 줄이지 않는다.
|
||||||
|
handoff["status"] = "FINALIZED"
|
||||||
|
handoff["finalized_by"] = TASK_NAME
|
||||||
|
write_doc(HANDOFF_PATH, canonical({"stage1_part3_review_handoff": handoff}))
|
||||||
|
|
||||||
|
return {"status": status, "modules": staged,
|
||||||
|
"structure_record_count": len(records),
|
||||||
|
"theta_count": len(bundle.get("theta") or []),
|
||||||
|
"index_bucket_counts": {"by_domain_id": len(by_domain_id),
|
||||||
|
"by_module": len(by_module),
|
||||||
|
"by_bo_id": len(by_bo_id)},
|
||||||
|
"quality_gate_pass": {"declaration": declaration_pass,
|
||||||
|
"route": route_pass, "bo": bo_pass},
|
||||||
|
"review_queue_count": len(review_queue)}
|
||||||
|
|
||||||
|
|
||||||
|
_sink = io.StringIO()
|
||||||
|
with contextlib.redirect_stdout(_sink):
|
||||||
|
_init()
|
||||||
|
RESULT = main()
|
||||||
|
print(json.dumps(RESULT, ensure_ascii=False))
|
||||||
+967
@@ -0,0 +1,967 @@
|
|||||||
|
# =============================================================================
|
||||||
|
# P2-R0 / Task_C_BO_R0_seed_reducer_and_exception_planner — v4 (개정본)
|
||||||
|
#
|
||||||
|
# 원본 : Claude_YAML/Stage_1_Part_2_Claude_v3.yml 2827~3620행 (794행)
|
||||||
|
# 근거 : stage_1_part_2_optimal_update_strategy_v.2.md §6.3 / stage_1_update_strategy.md §3.3
|
||||||
|
#
|
||||||
|
# v3 대비 변경 셋. 그 외는 무변경이다 — 병합·전역 출처 검증·예외 축소 로직은 손대지 않았다.
|
||||||
|
# 1. seed 원천 교체
|
||||||
|
# v3 는 SEED_INPUTS 의 {{prev.Task_C_BO_Stage_B_B*.json_output}} 다섯을 읽었다.
|
||||||
|
# v4 는 A0 가 낸 fanout/domain_fanout_plan.json 의 task_instances[*].expected_output_path
|
||||||
|
# 를 따라 읽는다. 정적 다섯 이름과 stage1_tmp 구 경로가 함께 사라진다.
|
||||||
|
# 2. worker_output_validator 호출
|
||||||
|
# seed 마다 slice·registry·activation_manifest 를 물려 검증한다.
|
||||||
|
# domain_seed_output.schema.v3.json 을 주입한다 — 넘기지 않으면 검증이 조용히 건너뛰어진다.
|
||||||
|
# 3. C-2 — meeting_only_evidence_gap 판정 확장 (P0 판정 B)
|
||||||
|
# registry_component_ids 로 뒷받침된 seed 는 증거 유래로 인정한다.
|
||||||
|
# 값이 비면 종전과 완전히 같으므로 승계 5도메인 등가가 깨지지 않는다.
|
||||||
|
#
|
||||||
|
# 무변경 확인
|
||||||
|
# mcp code-executor / parameters 5키 / CANDIDATE_REF_RE / add_policy_review /
|
||||||
|
# 전역 출처 universe 재검사 / 예외 축소 / postb_seed_ledger 구조
|
||||||
|
# =============================================================================
|
||||||
|
- task_name: Task_C_BO_R0_seed_reducer_and_exception_planner
|
||||||
|
mcp: code-executor
|
||||||
|
tool_name: run_code
|
||||||
|
parameters:
|
||||||
|
language: python
|
||||||
|
requirements: httpx
|
||||||
|
network: agent-network
|
||||||
|
timeout: 240
|
||||||
|
code: |-
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
# Task_C_BO_R0_seed_reducer_and_exception_planner (v3)
|
||||||
|
# publisher + domain_join + PostB_1 통합 결정적 reducer.
|
||||||
|
# Spec: Part_2_Improvement_Strategy_Claude_v1.md §7 (defer policy = 개선전략서 X-2, pack 조건 = X-3)
|
||||||
|
from __future__ import annotations
|
||||||
|
import hashlib
|
||||||
|
import itertools
|
||||||
|
import json
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
from typing import Any
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
LOCALDOCS_URL = "http://mcp-localdocs:8012/mcp"
|
||||||
|
MCP_HEADERS = {"Content-Type": "application/json", "Accept": "application/json, text/event-stream"}
|
||||||
|
CLIENT = httpx.Client(timeout=60)
|
||||||
|
MSG_ID = itertools.count(10)
|
||||||
|
JSON_DECODER = json.JSONDecoder()
|
||||||
|
|
||||||
|
# v4 — {{prev.Task_C_BO_Stage_B_B*}} 다섯을 걷어냈다.
|
||||||
|
# worker 산출은 wildcard fan-out 인스턴스가 파일로 남기므로 경로로 읽는다.
|
||||||
|
# v4 — seed 목록은 상수가 아니라 A0 의 fan-out 계획이 정한다.
|
||||||
|
FANOUT_PLAN_PATH = "fanout/domain_fanout_plan.json"
|
||||||
|
SLICE_DIR = "runtime/domain_slices"
|
||||||
|
SEED_SCHEMA_PATH = "Default_Agent/platform/schemas/domain_seed_output.schema.v3.json"
|
||||||
|
SEED_SCHEMA_VERSION = "task_c_bo_stage_b_domain_bo_seed.v3"
|
||||||
|
SLICE_ROOT_KEY = "stage_b_domain_slice"
|
||||||
|
# R-4 — 머리말이 약속한 worker_output_validator 를 실제로 부른다. 반입은 D0 규약 R-1~R-5.
|
||||||
|
RUNTIME_MANIFEST = "Default_Agent/runtime_manifest.json"
|
||||||
|
EXECUTION_ROOT = "/tmp/s1_r0"
|
||||||
|
VALIDATOR_MIRRORS = {
|
||||||
|
"runtime_common": "Default_Agent/stage1_runtime/runtime_common.txt",
|
||||||
|
"schema_subset_validator": "Default_Agent/stage1_runtime/schema_subset_validator.txt",
|
||||||
|
"registry_loader": "Default_Agent/stage1_runtime/registry_loader.txt",
|
||||||
|
"worker_output_validator": "Default_Agent/stage1_runtime/worker_output_validator.txt",
|
||||||
|
}
|
||||||
|
ACTIVATION_MANIFEST_PATH = "routing/domain_activation_manifest.json"
|
||||||
|
REGISTRY_INDEX_PATH = "Default_Agent/domains/_registry_index.json"
|
||||||
|
|
||||||
|
def _seed_docs_from_plan(plan):
|
||||||
|
# v5 — 경로만이 아니라 계획 행 전체를 보관한다. validate_seed_object 가
|
||||||
|
# slice_sha256 · compiled_prompt_sha256 기대값을 이 행에서 대조한다(R0-6).
|
||||||
|
root = plan.get("domain_fanout_plan", plan)
|
||||||
|
out = {}
|
||||||
|
rows = {}
|
||||||
|
for row in root.get("task_instances") or []:
|
||||||
|
domain_id = row.get("domain_id")
|
||||||
|
path = row.get("expected_output_path")
|
||||||
|
if isinstance(domain_id, str) and isinstance(path, str) and domain_id and path:
|
||||||
|
out[domain_id] = path
|
||||||
|
rows[domain_id] = row
|
||||||
|
if not out:
|
||||||
|
raise RuntimeError("R0_FANOUT_PLAN_EMPTY")
|
||||||
|
return out, rows
|
||||||
|
# v4 — 계획이 정하는 두 목록. 상수가 아니므로 비워 두고 main 에서 내용만 채운다.
|
||||||
|
# 재바인딩하지 않고 갱신만 하므로 아래 도우미들이 같은 객체를 본다.
|
||||||
|
SEED_DOCS: dict[str, str] = {}
|
||||||
|
PLAN_ROWS: dict[str, dict[str, Any]] = {}
|
||||||
|
DOMAIN_ORDER: list[str] = []
|
||||||
|
|
||||||
|
# DOMAIN_ORDER 는 fan-out 계획의 등재 순서를 그대로 쓴다. 상수 순서를 두지 않는다.
|
||||||
|
def _domain_order(seed_docs):
|
||||||
|
return list(seed_docs.keys())
|
||||||
|
# v5 — 구 이름 표(DOMAIN_LABELS)와 _domain_label 을 걷어냈다. 유일 소비처가 되쓰기
|
||||||
|
# (R0-5 에서 삭제)의 transport_metadata 였다. 이로써 R0 에 구 명세서(B1~B5) 이름 의존이 없다.
|
||||||
|
STAGE_A_PATH = "stage1_tmp/task_c_bo/stage_a_context.json"
|
||||||
|
MANIFEST_PATH = "stage1_tmp/task_c_bo/source_universe_manifest.json"
|
||||||
|
LEDGER_PATH = "stage1_tmp/task_c_bo/postb_seed_ledger.json"
|
||||||
|
PACK_PATH = "quality_gates/stage1_part2_exception_pack.json"
|
||||||
|
REVIEW_HANDOFF_PATH = "quality_gates/stage1_part2_review_handoff.json"
|
||||||
|
# R0-1 — BO 투영 정책. 투영 규칙의 정본은 코드가 아니라 이 선언 자산이다.
|
||||||
|
BO_PROJECTION_POLICY = "Default_Agent/stage1_runtime/bo_surface_projection_policy.v1.json"
|
||||||
|
BO_PROJECTION_SCHEMA_VERSION = "stage1_bo_surface_projection_policy.v1"
|
||||||
|
# v3 계약이 정본이다. 도메인 ID 는 registry 값(E-00 · EC-00 · X1 …)이고 구 이름도 아직 들어올 수 있으므로
|
||||||
|
# 접두사는 도메인에 묶지 않고 형식만 본다 — 도메인 일치는 validate_candidate 의 prefix 검사가 맡는다.
|
||||||
|
CANDIDATE_REF_RE = re.compile(r"^[A-Za-z][A-Za-z0-9_.-]{0,63}:[0-9]{3}$")
|
||||||
|
REVIEW_ISSUE_ENUM = {
|
||||||
|
"missing_source", "source_conflict", "cross_domain_merge_needed",
|
||||||
|
"amount_or_date_uncertain", "legal_effect_uncertain", "review_required",
|
||||||
|
"legal_theory_required", "near_duplicate_kept_separate",
|
||||||
|
"meeting_only_evidence_gap", "schema_field_fallback", "prior_link_ambiguous",
|
||||||
|
}
|
||||||
|
DOWNSTREAM_OWNER_ENUM = {"publisher", "domain_join", "C0", "C1", "C2", "C3", "C5", "D", "E", "Stage2"}
|
||||||
|
# v5 — ALLOWED_SEED_KEYS(v2 화이트리스트)를 걷어냈다. v3 후보 18필드와의 교집합이
|
||||||
|
# extensions 하나뿐이라 워커 산출을 통째로 버리던 자리다(C-1). 원장 payload 의
|
||||||
|
# 키 집합은 project_to_bo_surface 의 반환문이 유일한 정의다.
|
||||||
|
|
||||||
|
def _mid() -> int:
|
||||||
|
return next(MSG_ID)
|
||||||
|
|
||||||
|
def _init() -> None:
|
||||||
|
r = CLIENT.post(
|
||||||
|
LOCALDOCS_URL,
|
||||||
|
json={
|
||||||
|
"jsonrpc": "2.0",
|
||||||
|
"id": 1,
|
||||||
|
"method": "initialize",
|
||||||
|
"params": {
|
||||||
|
"protocolVersion": "2025-03-26",
|
||||||
|
"capabilities": {},
|
||||||
|
"clientInfo": {
|
||||||
|
"name": "task-c-bo-r0-seed-reducer-and-exception-planner",
|
||||||
|
"version": "1.0",
|
||||||
|
"user_id": "{{__user_hash__}}",
|
||||||
|
"workspace_id": "{{__workspace_hash__}}",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
headers=MCP_HEADERS,
|
||||||
|
)
|
||||||
|
r.raise_for_status()
|
||||||
|
sid = r.headers.get("mcp-session-id")
|
||||||
|
if sid:
|
||||||
|
MCP_HEADERS["mcp-session-id"] = sid
|
||||||
|
CLIENT.post(
|
||||||
|
LOCALDOCS_URL,
|
||||||
|
json={"jsonrpc": "2.0", "method": "notifications/initialized"},
|
||||||
|
headers=MCP_HEADERS,
|
||||||
|
).raise_for_status()
|
||||||
|
|
||||||
|
def _parse_mcp(text: str) -> Any:
|
||||||
|
for line in text.strip().split("\n"):
|
||||||
|
if line.startswith("data: "):
|
||||||
|
try:
|
||||||
|
return json.loads(line[6:])
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
return json.loads(text)
|
||||||
|
except Exception:
|
||||||
|
return None
|
||||||
|
|
||||||
|
def _call(name: str, args: dict[str, Any]) -> Any:
|
||||||
|
r = CLIENT.post(
|
||||||
|
LOCALDOCS_URL,
|
||||||
|
json={"jsonrpc": "2.0", "id": _mid(), "method": "tools/call",
|
||||||
|
"params": {"name": name, "arguments": args}},
|
||||||
|
headers=MCP_HEADERS,
|
||||||
|
)
|
||||||
|
r.raise_for_status()
|
||||||
|
payload = _parse_mcp(r.text)
|
||||||
|
if not payload or "result" not in payload:
|
||||||
|
raise RuntimeError(f"MCP {name} failed")
|
||||||
|
return payload
|
||||||
|
|
||||||
|
def read_raw(name: str) -> str:
|
||||||
|
# 재직렬화 없이 원문 그대로 돌려준다. 미러 해시 대조의 전제다.
|
||||||
|
p = _call("read_docs", {"doc_names": [name]})
|
||||||
|
text = (p["result"].get("content") or [{}])[0].get("text", "")
|
||||||
|
if not text:
|
||||||
|
raise RuntimeError("EMPTY_RESPONSE:%s" % name)
|
||||||
|
try:
|
||||||
|
outer = json.loads(text)
|
||||||
|
except Exception:
|
||||||
|
return text
|
||||||
|
if isinstance(outer, str):
|
||||||
|
return outer
|
||||||
|
if isinstance(outer, dict) and "results" in outer:
|
||||||
|
r0 = (outer.get("results") or [{}])[0]
|
||||||
|
inner = r0.get("content")
|
||||||
|
if inner is None:
|
||||||
|
inner = r0.get("text")
|
||||||
|
if not isinstance(inner, str) or not inner:
|
||||||
|
raise RuntimeError("EMPTY_CONTENT:%s" % name)
|
||||||
|
return inner
|
||||||
|
raise RuntimeError("UNEXPECTED_READ_DOCS_ENVELOPE:%s" % name)
|
||||||
|
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
# F-4 — 자기 입력의 배포 무결성. A0 게이트가 앞에서 걸러 주지만 이 task 는
|
||||||
|
# 개별 재실행이 가능하다(예행 하네스가 실제로 task 단위로 돌린다).
|
||||||
|
# 매니페스트는 task 당 한 번만 읽는다. 호출마다 읽으면 S0 의 $ref 폐포 walk 에서만 19 회다.
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
PART2_DEPLOYMENT_REMEDY = (
|
||||||
|
"배포 원본 extension_research/Default_Agent 트리를 서버 Default_Agent/ 에 통째로 배포하고 "
|
||||||
|
"runtime_manifest.json 의 등재·sha256 과 대조해 결손 경로를 복원한다. 부분 복사는 허용되지 않는다.")
|
||||||
|
_MANIFEST_MAP = None
|
||||||
|
|
||||||
|
|
||||||
|
def _manifest_map():
|
||||||
|
global _MANIFEST_MAP
|
||||||
|
if _MANIFEST_MAP is None:
|
||||||
|
_MANIFEST_MAP = {row["path"]: row["sha256"]
|
||||||
|
for row in (json.loads(read_raw(RUNTIME_MANIFEST)).get("entries") or [])
|
||||||
|
if isinstance(row, dict)}
|
||||||
|
return _MANIFEST_MAP
|
||||||
|
|
||||||
|
|
||||||
|
def _deployment_error(logical, detail, extra=None):
|
||||||
|
payload = {"reason_code": "PART2_ASSET_DEPLOYMENT_INCOMPLETE", "path": logical,
|
||||||
|
"detail": detail, "remedy": PART2_DEPLOYMENT_REMEDY}
|
||||||
|
if extra:
|
||||||
|
payload.update(extra)
|
||||||
|
return RuntimeError(json.dumps(payload, ensure_ascii=False))
|
||||||
|
|
||||||
|
|
||||||
|
def _verify_asset(logical: str) -> str:
|
||||||
|
"""원문을 돌려준다. 반환값을 소비해야 읽기 횟수가 늘지 않는다."""
|
||||||
|
body = read_raw(logical)
|
||||||
|
want = _manifest_map().get(logical[len("Default_Agent/"):])
|
||||||
|
if want is None:
|
||||||
|
raise _deployment_error(logical, "unregistered")
|
||||||
|
if want != hashlib.sha256(body.encode("utf-8")).hexdigest():
|
||||||
|
raise _deployment_error(logical, "hash_mismatch", {"expected": want})
|
||||||
|
return body
|
||||||
|
|
||||||
|
|
||||||
|
def _assert_mirror_consistent(logical: str) -> None:
|
||||||
|
"""F-4b — 부재는 통과(materialize_validator 의 기존 관용 유지). 미등재·불일치만 막는다.
|
||||||
|
|
||||||
|
예외 종류를 바꿔 try 를 뚫는 우회(SystemExit 등)는 쓰지 않는다. 그것은 __main__ 가드의
|
||||||
|
stdout 출력과 예행 하네스의 단계 기록까지 건너뛴다. 판정을 try 밖으로 옮기는 것이 답이다.
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
body = read_raw(logical)
|
||||||
|
except Exception:
|
||||||
|
return
|
||||||
|
want = _manifest_map().get(logical[len("Default_Agent/"):])
|
||||||
|
if want is None:
|
||||||
|
raise _deployment_error(logical, "unregistered")
|
||||||
|
if want != hashlib.sha256(body.encode("utf-8")).hexdigest():
|
||||||
|
raise _deployment_error(logical, "hash_mismatch", {"expected": want})
|
||||||
|
|
||||||
|
|
||||||
|
def materialize_validator() -> list[str]:
|
||||||
|
"""worker_output_validator 와 그 의존 셋을 반입한다. 실패는 경고로 남기고 진행한다.
|
||||||
|
|
||||||
|
이 검증은 덧붙이는 층이다 — 반입이 안 되는 배포에서도 R0 본체는 돌아야 한다.
|
||||||
|
"""
|
||||||
|
import hashlib
|
||||||
|
import os
|
||||||
|
import pathlib
|
||||||
|
rt = pathlib.Path(EXECUTION_ROOT) / "_rt"
|
||||||
|
rt.mkdir(parents=True, exist_ok=True)
|
||||||
|
manifest_doc = json.loads(read_raw(RUNTIME_MANIFEST))
|
||||||
|
expected = {row["path"]: row["sha256"] for row in manifest_doc.get("entries") or []}
|
||||||
|
staged: list[str] = []
|
||||||
|
for name, logical in VALIDATOR_MIRRORS.items():
|
||||||
|
body = read_raw(logical)
|
||||||
|
raw = body.encode("utf-8")
|
||||||
|
want = expected.get(logical[len("Default_Agent/"):])
|
||||||
|
if want is None:
|
||||||
|
raise RuntimeError("MODULE_MIRROR_UNREGISTERED:%s" % logical)
|
||||||
|
if want != hashlib.sha256(raw).hexdigest():
|
||||||
|
raise RuntimeError("MODULE_MIRROR_HASH_MISMATCH:%s" % logical)
|
||||||
|
(rt / (name + ".py")).write_bytes(raw)
|
||||||
|
staged.append(name)
|
||||||
|
if str(rt) not in sys.path:
|
||||||
|
sys.path.insert(0, str(rt))
|
||||||
|
return staged
|
||||||
|
|
||||||
|
|
||||||
|
def read_json_doc(path: str) -> Any:
|
||||||
|
result = _call("read_docs", {"doc_names": [path]})
|
||||||
|
content = result["result"].get("content", [])
|
||||||
|
text = content[0].get("text", "") if content else ""
|
||||||
|
try:
|
||||||
|
parsed = json.loads(text)
|
||||||
|
except json.JSONDecodeError as exc:
|
||||||
|
raise RuntimeError(f"Invalid read_docs envelope for {path}") from exc
|
||||||
|
if isinstance(parsed, dict) and "results" in parsed:
|
||||||
|
rows = parsed.get("results") or []
|
||||||
|
if not rows or rows[0].get("error"):
|
||||||
|
raise RuntimeError(f"read_docs failed for {path}: {rows[:1]}")
|
||||||
|
inner = rows[0].get("content") or ""
|
||||||
|
if isinstance(inner, str):
|
||||||
|
try:
|
||||||
|
return json.loads(inner)
|
||||||
|
except json.JSONDecodeError:
|
||||||
|
obj, end = JSON_DECODER.raw_decode(inner.strip())
|
||||||
|
if inner.strip()[end:].strip():
|
||||||
|
raise RuntimeError(f"{path}: non-json tail")
|
||||||
|
return obj
|
||||||
|
return inner
|
||||||
|
return parsed
|
||||||
|
|
||||||
|
def write_doc(path: str, content: str) -> None:
|
||||||
|
_call("write_file", {"path": path, "content": content, "overwrite": True})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def _dict(value: Any) -> dict[str, Any]:
|
||||||
|
return value if isinstance(value, dict) else {}
|
||||||
|
|
||||||
|
def _list(value: Any) -> list[Any]:
|
||||||
|
return value if isinstance(value, list) else []
|
||||||
|
|
||||||
|
def _strings(value: Any) -> list[str]:
|
||||||
|
out: list[str] = []
|
||||||
|
for item in _list(value):
|
||||||
|
if item is None:
|
||||||
|
continue
|
||||||
|
text = str(item).strip()
|
||||||
|
if text and text not in out:
|
||||||
|
out.append(text)
|
||||||
|
return out
|
||||||
|
|
||||||
|
def clip(value: Any, limit: int = 120) -> str:
|
||||||
|
text = " ".join(str(value or "").split())
|
||||||
|
return text if len(text) <= limit else text[:limit].rstrip() + "..."
|
||||||
|
|
||||||
|
# v4 — parse_llm_json 을 걷어냈다. worker 가 {{item.expected_output_path}} 에
|
||||||
|
# strict JSON 파일을 직접 쓰므로 LLM 원문 관용 파싱 경로가 없어졌다.
|
||||||
|
# salvage_notes 는 산출 스키마에 남지만 v4 에서는 항상 빈 목록이다 — 구제할 원문이 없다.
|
||||||
|
# v5 — DOMAIN_PAYLOAD_CANON · _canon_payload 를 걷어냈다. canon 키가 구 이름(B1~B4)뿐이라
|
||||||
|
# registry ID 26종 전부에서 no-op 였다(사문 코드). 확장 payload 는 워커 발행 형태 그대로 둔다.
|
||||||
|
def ensure_candidate_ref(cand: dict[str, Any], domain_id: str, idx: int) -> dict[str, Any]:
|
||||||
|
"""v3 워커 출력에는 candidate_ref 가 없다 — seed 스키마가 additionalProperties: false 로 봉인돼
|
||||||
|
워커가 실을 수 없는 필드다. v3 이 주는 순번에서 R0 내부 식별자를 결정적으로 만든다.
|
||||||
|
이미 실려 있으면(구 판본 산출) 그대로 둔다."""
|
||||||
|
ref = cand.get("candidate_ref")
|
||||||
|
if isinstance(ref, str) and ref:
|
||||||
|
return cand
|
||||||
|
out = dict(cand)
|
||||||
|
out["candidate_ref"] = "%s:%03d" % (domain_id, idx + 1)
|
||||||
|
return out
|
||||||
|
|
||||||
|
def project_to_bo_surface(cand: dict[str, Any], domain_id: str, universe: dict[str, set[str]],
|
||||||
|
policy: dict[str, Any], allowed_bo_types: set[str],
|
||||||
|
reviews: list[dict[str, Any]]) -> dict[str, Any]:
|
||||||
|
"""v3 후보를 BO 호환면으로 투영한다. 값의 정본은 registry 이고 규칙은 정책 파일이 선언한다.
|
||||||
|
|
||||||
|
전임자 둘(expand_candidate + _seed_payload)은 v2 키를 기본값으로 깔고 v2 화이트리스트로
|
||||||
|
걸렀다. v3 후보를 넣으면 워커가 실은 값이 extensions 하나만 남았고, 그 결과 중복 판정 키
|
||||||
|
여덟 성분이 전부 비어 사건 전체가 한 버킷으로 접혔다(C-1·C-2). 여기서는 v3 필드에서
|
||||||
|
끌어오고, registry 가 말해 주지 않는 칸은 채우지 않고 reviews 에 올린다.
|
||||||
|
반환 키 집합은 입력과 무관하게 고정이다 — 이 반환문이 원장 payload 키 집합의 유일한 정의다.
|
||||||
|
"""
|
||||||
|
ref = str(cand.get("candidate_ref"))
|
||||||
|
|
||||||
|
def note(issue_type: str, field: str, source: str) -> None:
|
||||||
|
reviews.append({"issue_type": issue_type, "candidate_ref": ref,
|
||||||
|
"field": field, "source": source})
|
||||||
|
|
||||||
|
refs = _strings(cand.get("source_refs"))
|
||||||
|
evidence = sorted(set(refs) & universe["source_evidence_indexes"])
|
||||||
|
events = sorted(set(refs) & universe["source_event_candidate_ids"])
|
||||||
|
clauses = sorted(set(refs) & universe["source_meeting_clause_ids"])
|
||||||
|
|
||||||
|
norm = _dict(policy.get("f0_normalization"))
|
||||||
|
bo_type = cand.get("bo_type")
|
||||||
|
if allowed_bo_types and bo_type not in allowed_bo_types:
|
||||||
|
note("legal_effect_uncertain", "BOType", "bo_type")
|
||||||
|
|
||||||
|
ext = dict(_dict(cand.get("extensions")))
|
||||||
|
if not isinstance(ext.get("domain_payload"), dict):
|
||||||
|
ext["domain_payload"] = {}
|
||||||
|
domain_payload = _dict(ext.get("domain_payload"))
|
||||||
|
|
||||||
|
action_type = domain_payload.get("action_type")
|
||||||
|
if not (isinstance(action_type, str) and action_type in set(_strings(norm.get("action_type_enum")))):
|
||||||
|
# registry 근거가 없는 칸이다. 기본값은 선언이며 추정이 아니다 — 반드시 검토로 올린다.
|
||||||
|
action_type = norm.get("action_type_default")
|
||||||
|
note("schema_field_fallback", "ActionType", "policy_default")
|
||||||
|
|
||||||
|
effect_type_ids = sorted({str(e.get("type_id")).strip()
|
||||||
|
for e in _list(cand.get("legal_effect_candidates"))
|
||||||
|
if isinstance(e, dict) and str(e.get("type_id") or "").strip()})
|
||||||
|
action_summary = domain_payload.get("action_summary")
|
||||||
|
if isinstance(action_summary, str) and action_summary.strip():
|
||||||
|
action = action_summary.strip()
|
||||||
|
elif effect_type_ids:
|
||||||
|
# 값은 registry token 이지 서술문이 아니다. Stage 2 는 review_handoff 의 action_source 를 함께 읽는다.
|
||||||
|
action = "%s:%s" % (bo_type, effect_type_ids[0])
|
||||||
|
note("schema_field_fallback", "Action", "legal_effect_type_id")
|
||||||
|
else:
|
||||||
|
action = str(bo_type)
|
||||||
|
note("schema_field_fallback", "Action", "bo_type")
|
||||||
|
|
||||||
|
time_facts = [t for t in _list(cand.get("time_facts")) if isinstance(t, dict)]
|
||||||
|
behavior_time = None
|
||||||
|
time_text = None
|
||||||
|
if time_facts:
|
||||||
|
pick = sorted(time_facts, key=lambda t: (str(t.get("fact_type") or ""), str(t.get("value") or "")))[0]
|
||||||
|
behavior_time = pick.get("value")
|
||||||
|
time_text = pick.get("value")
|
||||||
|
distinct_times = {str(t.get("value") or "").strip() for t in time_facts if str(t.get("value") or "").strip()}
|
||||||
|
if len(distinct_times) > 1:
|
||||||
|
note("amount_or_date_uncertain", "core_field_base.BehaviorTime", "time_facts")
|
||||||
|
|
||||||
|
object_refs = sorted(_strings(cand.get("object_refs")))
|
||||||
|
|
||||||
|
amount_facts = [a for a in _list(cand.get("amount_facts")) if isinstance(a, dict)]
|
||||||
|
amount = None
|
||||||
|
if amount_facts:
|
||||||
|
pick = sorted(amount_facts, key=lambda a: (str(a.get("amount_type") or ""), str(a.get("decimal_value") or "")))[0]
|
||||||
|
# v3 amount_facts 는 {amount_type, decimal_value, currency, source_refs} 닫힌 스키마다 —
|
||||||
|
# value_text 필드가 없으므로 정책 규칙대로 decimal_value 원문을 그대로 쓴다.
|
||||||
|
amount = {"value_text": pick.get("decimal_value"),
|
||||||
|
"numeric_value": pick.get("decimal_value"),
|
||||||
|
"currency": pick.get("currency")}
|
||||||
|
distinct_amounts = {str(a.get("decimal_value") or "").strip() for a in amount_facts if str(a.get("decimal_value") or "").strip()}
|
||||||
|
if len(distinct_amounts) > 1:
|
||||||
|
note("amount_or_date_uncertain", "amount", "amount_facts")
|
||||||
|
|
||||||
|
return {
|
||||||
|
"candidate_ref": ref,
|
||||||
|
"source_domain": domain_id,
|
||||||
|
"BOType": bo_type,
|
||||||
|
"ActionType": action_type,
|
||||||
|
"JuristicAct": _normalize_juristic(cand.get("juristic_act_type")),
|
||||||
|
"Action": action,
|
||||||
|
"Reason": None,
|
||||||
|
"PriorAct": None,
|
||||||
|
"ReasonRefs": [],
|
||||||
|
"Legal_Keywords": effect_type_ids,
|
||||||
|
"core_field_base": {"BehaviorTime": behavior_time, "TimeText": time_text,
|
||||||
|
"Object": object_refs[0] if object_refs else None,
|
||||||
|
"StatementType": bo_type},
|
||||||
|
"amount": amount,
|
||||||
|
"source_evidence_indexes": evidence,
|
||||||
|
"provenance": {"source_event_candidate_ids": events,
|
||||||
|
"source_meeting_clause_ids": clauses,
|
||||||
|
"source_evidence_indexes": evidence,
|
||||||
|
"source_domain": domain_id},
|
||||||
|
"downstream_seed_refs": {},
|
||||||
|
"extensions": ext,
|
||||||
|
"registry_component_ids": _strings(cand.get("registry_component_ids")),
|
||||||
|
}
|
||||||
|
|
||||||
|
def expand_review_item(item: Any, domain_id: str, idx: int) -> dict[str, Any]:
|
||||||
|
"""v3 검토 항목(후보별 review_items · 루트 unknown_or_unrouted_reviews)을 handoff 항목형으로 사상한다.
|
||||||
|
|
||||||
|
구판은 v3 루트 13키에 없는 domain_review_queue 를 읽었다 — 봉인(additionalProperties: false)이
|
||||||
|
워커에게 발행을 금지한 키라 워커 검토가 한 건도 도달하지 못했다(C-6). 사상 규칙은 정책
|
||||||
|
review_item_projection 이 선언한다. 원본 코드는 덧붙이기 키 source_review_code 로 보존한다.
|
||||||
|
"""
|
||||||
|
src = _dict(item)
|
||||||
|
raw_type = str(src.get("unresolved_type") or "").strip()
|
||||||
|
raw_code = str(src.get("review_code") or "").strip()
|
||||||
|
severity = src.get("severity") if src.get("severity") in ("SOFT_WARNING", "HARD_WARNING") else "SOFT_WARNING"
|
||||||
|
return {
|
||||||
|
"review_id": str(src.get("review_id") or f"{domain_id}:review:{idx:03d}"),
|
||||||
|
"issue_type": raw_type if raw_type in REVIEW_ISSUE_ENUM else "review_required",
|
||||||
|
"severity": severity,
|
||||||
|
# 원본 review_code(v3 필수 키)를 잃지 않는다 — 정책 additive_keys 의 목적이 그것이다.
|
||||||
|
"source_review_code": raw_code or raw_type or None,
|
||||||
|
"reason": str(src.get("reason") or "").strip(),
|
||||||
|
"source_refs": _strings(src.get("source_refs")),
|
||||||
|
"recommended_downstream_owner": src.get("recommended_downstream_owner") or "Stage2",
|
||||||
|
}
|
||||||
|
|
||||||
|
# ---------- 워커 출력 수용 검증 (v3 계약 정본 · 정책 status_policy · 계획 해시 대조) ----------
|
||||||
|
def validate_seed_object(seed_obj: dict[str, Any], domain_id: str, plan_row: dict[str, Any], warnings: list[dict[str, Any]]) -> None:
|
||||||
|
"""v3 seed 루트를 검증한다. status 는 v3 enum 5종을 정책 status_policy 로 가른다.
|
||||||
|
|
||||||
|
구판은 READY 계열 2종만 허용해 계약상 적법한 NO_SUPPORT 가 R0 전체를 중단시켰고(C-11),
|
||||||
|
신선도는 워커가 실을 수 없는 transport_metadata.slice_guard 를 읽는 죽은 검사였다.
|
||||||
|
신선도의 제 필드는 v3 루트의 slice_sha256 · compiled_prompt_sha256 이고(둘 다 required
|
||||||
|
— 워커가 반드시 echo 한다), 기대값은 fan-out 계획 행이 든다.
|
||||||
|
"""
|
||||||
|
if seed_obj.get("schema_version") != SEED_SCHEMA_VERSION:
|
||||||
|
raise ValueError(f"{domain_id}: seed schema_version mismatch")
|
||||||
|
if seed_obj.get("domain_id") != domain_id:
|
||||||
|
raise ValueError(f"{domain_id}: seed domain_id mismatch")
|
||||||
|
status = seed_obj.get("status")
|
||||||
|
if status in ("BLOCKED", "FAILED"):
|
||||||
|
# 워커 실패 신호다. fail-open 은 활성화 판정의 원칙이고, 실패의 침묵 흡수는 금지 원칙이 막는다.
|
||||||
|
raise ValueError(f"{domain_id}: worker reported {status}")
|
||||||
|
if status == "NO_SUPPORT":
|
||||||
|
# 적법한 "실을 것 없음". 후보가 있으면 상태·내용 모순이다.
|
||||||
|
if _list(seed_obj.get("bo_seed_candidates")):
|
||||||
|
raise ValueError(f"{domain_id}: NO_SUPPORT with non-empty bo_seed_candidates")
|
||||||
|
elif status not in ("READY", "READY_WITH_REVIEW"):
|
||||||
|
raise ValueError(f"{domain_id}: seed status outside v3 enum: {status!r}")
|
||||||
|
for key in ("slice_sha256", "compiled_prompt_sha256"):
|
||||||
|
want = plan_row.get(key)
|
||||||
|
if isinstance(want, str) and want:
|
||||||
|
if seed_obj.get(key) != want:
|
||||||
|
raise ValueError(f"{domain_id}: stale seed output: {key} mismatch")
|
||||||
|
else:
|
||||||
|
warnings.append({"domain_id": domain_id, "warning": f"fanout plan carries no {key} expectation"})
|
||||||
|
|
||||||
|
def validate_candidate(cand: dict[str, Any], domain_id: str, idx: int) -> None:
|
||||||
|
prefix = domain_id
|
||||||
|
ref = cand.get("candidate_ref")
|
||||||
|
if not isinstance(ref, str) or not CANDIDATE_REF_RE.fullmatch(ref):
|
||||||
|
raise ValueError(f"{domain_id}.bo_seed_candidates[{idx}].candidate_ref invalid")
|
||||||
|
if not ref.startswith(prefix + ":"):
|
||||||
|
raise ValueError(f"{domain_id}.bo_seed_candidates[{idx}].candidate_ref prefix mismatch")
|
||||||
|
for forbidden in ("BO_ID", "id", "Evidence", "EvidenceTitles"):
|
||||||
|
if forbidden in cand:
|
||||||
|
raise ValueError(f"{domain_id}.{ref}: final field {forbidden} is prohibited")
|
||||||
|
if cand.get("Reason") is not None:
|
||||||
|
raise ValueError(f"{domain_id}.{ref}: Reason must be null/absent")
|
||||||
|
if cand.get("PriorAct") is not None:
|
||||||
|
raise ValueError(f"{domain_id}.{ref}: PriorAct must be null/absent")
|
||||||
|
if cand.get("ReasonRefs") not in ([], None):
|
||||||
|
raise ValueError(f"{domain_id}.{ref}: ReasonRefs must be []/absent")
|
||||||
|
|
||||||
|
# ---------- PostB_1 이식: sort key / duplicate keys / schema risk ----------
|
||||||
|
def _source_refs(seed: dict[str, Any]) -> dict[str, list[str]]:
|
||||||
|
provenance = _dict(seed.get("provenance"))
|
||||||
|
return {
|
||||||
|
"source_evidence_indexes": _strings(seed.get("source_evidence_indexes") or provenance.get("source_evidence_indexes")),
|
||||||
|
"source_event_candidate_ids": _strings(provenance.get("source_event_candidate_ids")),
|
||||||
|
"source_meeting_clause_ids": _strings(provenance.get("source_meeting_clause_ids")),
|
||||||
|
}
|
||||||
|
|
||||||
|
def _sort_key(seed: dict[str, Any]) -> dict[str, Any]:
|
||||||
|
core = _dict(seed.get("core_field_base"))
|
||||||
|
domain = seed.get("source_domain")
|
||||||
|
juristic = _dict(seed.get("JuristicAct"))
|
||||||
|
return {
|
||||||
|
"BehaviorTime": core.get("BehaviorTime"),
|
||||||
|
"domain_order": DOMAIN_ORDER.index(domain) if domain in DOMAIN_ORDER else len(DOMAIN_ORDER),
|
||||||
|
"BOType": seed.get("BOType"),
|
||||||
|
"ActionType": seed.get("ActionType"),
|
||||||
|
"JuristicActLabel": juristic.get("label"),
|
||||||
|
"Action": seed.get("Action"),
|
||||||
|
"candidate_ref": seed.get("candidate_ref"),
|
||||||
|
}
|
||||||
|
|
||||||
|
def _duplicate_key(seed: dict[str, Any]) -> tuple[Any, ...]:
|
||||||
|
core = _dict(seed.get("core_field_base"))
|
||||||
|
juristic = _dict(seed.get("JuristicAct"))
|
||||||
|
refs = _source_refs(seed)
|
||||||
|
return (
|
||||||
|
tuple(sorted(refs["source_evidence_indexes"])),
|
||||||
|
tuple(sorted(refs["source_event_candidate_ids"])),
|
||||||
|
seed.get("BOType"),
|
||||||
|
seed.get("ActionType"),
|
||||||
|
juristic.get("label"),
|
||||||
|
str(seed.get("Action") or "").strip(),
|
||||||
|
str(core.get("BehaviorTime") or "").strip(),
|
||||||
|
str(core.get("Object") or "").strip(),
|
||||||
|
)
|
||||||
|
|
||||||
|
def _normalize_juristic(value: Any) -> Any:
|
||||||
|
if value is None:
|
||||||
|
return None
|
||||||
|
if isinstance(value, dict):
|
||||||
|
label = value.get("label")
|
||||||
|
return {"label": str(label).strip()} if label not in (None, "") else {"label": None}
|
||||||
|
text = str(value).strip()
|
||||||
|
return {"label": text} if text else None
|
||||||
|
|
||||||
|
def _compact_exception_payload(seeds: list[dict[str, Any]]) -> list[dict[str, Any]]:
|
||||||
|
compact = []
|
||||||
|
for seed in seeds:
|
||||||
|
compact.append({
|
||||||
|
"candidate_ref": seed.get("candidate_ref"),
|
||||||
|
"source_domain": seed.get("source_domain"),
|
||||||
|
"BOType": seed.get("BOType"),
|
||||||
|
"ActionType": seed.get("ActionType"),
|
||||||
|
"JuristicAct": seed.get("JuristicAct"),
|
||||||
|
"Action": seed.get("Action"),
|
||||||
|
"core_field_base": seed.get("core_field_base"),
|
||||||
|
"amount": seed.get("amount"),
|
||||||
|
"source_refs": _source_refs(seed),
|
||||||
|
})
|
||||||
|
return compact
|
||||||
|
|
||||||
|
def main() -> None:
|
||||||
|
_init()
|
||||||
|
# F-4a — 자기 정적 입력. try 밖이어야 한다. 안에 넣으면 아래 except Exception 이
|
||||||
|
# 삼켜 WORKER_VALIDATOR_UNAVAILABLE 경고로 강등되고 R0 이 계속 돈다.
|
||||||
|
_seed_schema_body = _verify_asset(SEED_SCHEMA_PATH)
|
||||||
|
# R0-1 — 투영 정책 반입 (F-4a 와 같은 규율: try 밖 경성). 정책이 없거나 낡았는데
|
||||||
|
# 조용히 옛 규칙으로 도는 것이 이번 결손(v2 잔재)의 재발 경로다.
|
||||||
|
projection_policy = _dict(json.loads(_verify_asset(BO_PROJECTION_POLICY)))
|
||||||
|
if projection_policy.get("schema_version") != BO_PROJECTION_SCHEMA_VERSION:
|
||||||
|
raise RuntimeError("PART2_PROJECTION_POLICY_INVALID")
|
||||||
|
# F-4b — 미러 넷의 무결성. 부재는 통과시키고 미등재·불일치만 막는다.
|
||||||
|
for _mirror in VALIDATOR_MIRRORS.values():
|
||||||
|
_assert_mirror_consistent(_mirror)
|
||||||
|
salvage_notes: list[dict[str, Any]] = []
|
||||||
|
guard_warnings: list[dict[str, Any]] = []
|
||||||
|
# v4 — seed 목록과 그 순서는 A0 의 fan-out 계획이 정한다. 이 파일은 목록을 만들지 않는다.
|
||||||
|
worker_validator = None
|
||||||
|
seed_schema = None
|
||||||
|
try:
|
||||||
|
materialize_validator()
|
||||||
|
import worker_output_validator as worker_validator
|
||||||
|
seed_schema = json.loads(_seed_schema_body)
|
||||||
|
except Exception as exc:
|
||||||
|
guard_warnings.append({"code": "WORKER_VALIDATOR_UNAVAILABLE", "message": str(exc)[:200]})
|
||||||
|
worker_validator = None
|
||||||
|
_docs, _rows = _seed_docs_from_plan(_dict(read_json_doc(FANOUT_PLAN_PATH)))
|
||||||
|
SEED_DOCS.update(_docs)
|
||||||
|
PLAN_ROWS.update(_rows)
|
||||||
|
DOMAIN_ORDER.extend(_domain_order(SEED_DOCS))
|
||||||
|
stage_a_outer = read_json_doc(STAGE_A_PATH)
|
||||||
|
stage_a = _dict(_dict(stage_a_outer).get("stage_a_context") or stage_a_outer)
|
||||||
|
if stage_a.get("schema_version") != "task_c_bo_stage_a_context.v1" or stage_a.get("status") != "READY":
|
||||||
|
raise RuntimeError("Stage A context must be READY task_c_bo_stage_a_context.v1")
|
||||||
|
manifest = _dict(read_json_doc(MANIFEST_PATH))
|
||||||
|
universe = {
|
||||||
|
"source_event_candidate_ids": set(_strings(manifest.get("event_candidate_ids"))),
|
||||||
|
"source_evidence_indexes": set(_strings(manifest.get("evidence_index_set"))),
|
||||||
|
"source_meeting_clause_ids": set(_strings(manifest.get("meeting_clause_ids"))),
|
||||||
|
}
|
||||||
|
if not universe["source_evidence_indexes"]:
|
||||||
|
raise RuntimeError("source universe manifest has no evidence indexes")
|
||||||
|
|
||||||
|
# 1) 워커 출력 수용: 검증 -> 투영. 워커 seed 파일은 손대지 않는다 —
|
||||||
|
# 선언표(stage1_part_interface.v1)가 기록자를 워커 하나로 정했다(R0-5).
|
||||||
|
seed_objects: dict[str, dict[str, Any]] = {}
|
||||||
|
projected_candidates: dict[str, list[dict[str, Any]]] = {}
|
||||||
|
review_handoff_items: list[dict[str, Any]] = []
|
||||||
|
allowed_bo_types_by_domain: dict[str, set[str]] = {}
|
||||||
|
projection_review_counter = 0
|
||||||
|
for domain_id in DOMAIN_ORDER:
|
||||||
|
# v4 — worker 가 {{item.expected_output_path}} 에 자기 seed 를 직접 쓴다.
|
||||||
|
# {{prev}} 원문 관용 파싱이 아니라 계획이 정한 경로에서 읽는다.
|
||||||
|
outer = _dict(read_json_doc(SEED_DOCS[domain_id]))
|
||||||
|
seed_obj = _dict(outer.get("stage_b_domain_bo_seed_output"))
|
||||||
|
if not seed_obj:
|
||||||
|
raise RuntimeError(f"{domain_id}: stage_b_domain_bo_seed_output missing")
|
||||||
|
validate_seed_object(seed_obj, domain_id, PLAN_ROWS.get(domain_id) or {}, guard_warnings)
|
||||||
|
# 슬라이스는 검증기 유무와 무관하게 읽는다 — worker_output_validator 와
|
||||||
|
# BOType 허용 어휘(allowed_legal_effect_bo_types, registry 유래)가 이 값을 쓴다.
|
||||||
|
try:
|
||||||
|
slice_doc = read_json_doc("%s/%s.json" % (SLICE_DIR, domain_id))
|
||||||
|
except Exception:
|
||||||
|
slice_doc = None
|
||||||
|
slice_root = _dict(_dict(slice_doc).get(SLICE_ROOT_KEY)) if isinstance(slice_doc, dict) else {}
|
||||||
|
allowed_bo_types = set(_strings(slice_root.get("allowed_legal_effect_bo_types")))
|
||||||
|
allowed_bo_types_by_domain[domain_id] = allowed_bo_types
|
||||||
|
# R-4 — 스키마와 슬라이스를 실제로 넘긴다. 넘기지 않으면 검증이 조용히 건너뛰어진다.
|
||||||
|
if worker_validator is not None:
|
||||||
|
report = worker_validator.validate_worker_output(
|
||||||
|
{"stage_b_domain_bo_seed_output": seed_obj},
|
||||||
|
schema=seed_schema,
|
||||||
|
expected_domain_id=domain_id,
|
||||||
|
slice_document=slice_doc)
|
||||||
|
for item in report.get("errors") or []:
|
||||||
|
guard_warnings.append({"code": "WORKER_OUTPUT_ERROR", "domain_id": domain_id,
|
||||||
|
"detail": item})
|
||||||
|
for item in report.get("warnings") or []:
|
||||||
|
guard_warnings.append({"code": "WORKER_OUTPUT_REVIEW", "domain_id": domain_id,
|
||||||
|
"detail": item})
|
||||||
|
cands = _list(seed_obj.get("bo_seed_candidates"))
|
||||||
|
projected: list[dict[str, Any]] = []
|
||||||
|
projection_reviews: list[dict[str, Any]] = []
|
||||||
|
for idx, cand in enumerate(cands):
|
||||||
|
if not isinstance(cand, dict):
|
||||||
|
raise RuntimeError(f"{domain_id}.bo_seed_candidates[{idx}] must be object")
|
||||||
|
cand = ensure_candidate_ref(cand, domain_id, idx)
|
||||||
|
validate_candidate(cand, domain_id, idx)
|
||||||
|
# membership 검사 — v3 의 평평한 source_refs 를 universe 와 대조 (hard BLOCK).
|
||||||
|
# 이쪽을 보지 않으면 membership 게이트가 v3 산출에서는 통과만 하는 빈 검사가 된다.
|
||||||
|
known_sources = (universe["source_event_candidate_ids"] | universe["source_meeting_clause_ids"]
|
||||||
|
| universe["source_evidence_indexes"])
|
||||||
|
ref_bad = [v for v in _strings(cand.get("source_refs")) if v not in known_sources]
|
||||||
|
if ref_bad:
|
||||||
|
raise RuntimeError(f"BLOCK: {domain_id}.{cand.get('candidate_ref')}: source_refs outside Stage A universe: {ref_bad}")
|
||||||
|
projected.append(project_to_bo_surface(cand, domain_id, universe, projection_policy,
|
||||||
|
allowed_bo_types, projection_reviews))
|
||||||
|
# R0-5 — 되쓰기 없음. seed_objects 는 워커 원본 그대로다(S0 와 signal adapter 가
|
||||||
|
# v3 적합 원본을 읽는다). 투영본은 projected_candidates 가 따로 든다(R0-2 배선).
|
||||||
|
seed_objects[domain_id] = seed_obj
|
||||||
|
projected_candidates[domain_id] = projected
|
||||||
|
# R0-4 — v3 검토 채널: 후보별 review_items + 루트 unknown_or_unrouted_reviews.
|
||||||
|
# list(...) 복사는 워커 원본 목록을 제자리 변형하지 않기 위한 것이다.
|
||||||
|
worker_reviews = list(_list(seed_obj.get("unknown_or_unrouted_reviews")))
|
||||||
|
for cand in _list(seed_obj.get("bo_seed_candidates")):
|
||||||
|
worker_reviews.extend(_list(_dict(cand).get("review_items")))
|
||||||
|
if seed_obj.get("status") == "NO_SUPPORT":
|
||||||
|
worker_reviews.append({"review_id": f"{domain_id}:status:NO_SUPPORT",
|
||||||
|
"review_code": "NO_SUPPORT",
|
||||||
|
"unresolved_type": "review_required",
|
||||||
|
"severity": "SOFT_WARNING",
|
||||||
|
"reason": "worker reported NO_SUPPORT (nothing to carry for this domain)"})
|
||||||
|
for idx, item in enumerate(worker_reviews, start=1):
|
||||||
|
mapped = expand_review_item(item, domain_id, idx)
|
||||||
|
refs = set(mapped.get("source_refs") or [])
|
||||||
|
review_handoff_items.append({
|
||||||
|
"review_id": mapped["review_id"],
|
||||||
|
"source_domain": domain_id,
|
||||||
|
"severity": mapped["severity"],
|
||||||
|
"issue_type": mapped["issue_type"],
|
||||||
|
"source_review_code": mapped.get("source_review_code"),
|
||||||
|
"source_event_candidate_ids": sorted(refs & universe["source_event_candidate_ids"]),
|
||||||
|
"source_evidence_indexes": sorted(refs & universe["source_evidence_indexes"]),
|
||||||
|
"source_meeting_clause_ids": sorted(refs & universe["source_meeting_clause_ids"]),
|
||||||
|
"downstream_owner": mapped["recommended_downstream_owner"] if mapped.get("recommended_downstream_owner") in DOWNSTREAM_OWNER_ENUM else "Stage2",
|
||||||
|
"template_note": mapped.get("reason") or "후속 단계에서 해당 review 항목의 증거와 법률상 의미를 재검토한다.",
|
||||||
|
})
|
||||||
|
for note_item in projection_reviews:
|
||||||
|
projection_review_counter += 1
|
||||||
|
entry = {
|
||||||
|
"review_id": "R0:projection:%03d" % projection_review_counter,
|
||||||
|
"source_domain": domain_id,
|
||||||
|
"severity": "SOFT_WARNING",
|
||||||
|
"issue_type": note_item["issue_type"],
|
||||||
|
"source_review_code": note_item.get("field"),
|
||||||
|
"source_event_candidate_ids": [],
|
||||||
|
"source_evidence_indexes": [],
|
||||||
|
"source_meeting_clause_ids": [],
|
||||||
|
"downstream_owner": "Stage2",
|
||||||
|
"template_note": "투영 규칙이 채우지 못했거나 기본값을 적용한 칸이다: %s ← %s (%s)" % (
|
||||||
|
note_item.get("field"), note_item.get("source"), note_item.get("candidate_ref")),
|
||||||
|
}
|
||||||
|
if note_item.get("field") == "Action":
|
||||||
|
entry["action_source"] = note_item.get("source")
|
||||||
|
review_handoff_items.append(entry)
|
||||||
|
|
||||||
|
# 2) ledger 구성 — 원장은 워커 원본이 아니라 투영본을 읽는다 (R0-2 배선).
|
||||||
|
# 워커 원본에는 candidate_ref 가 없으므로(봉인 스키마) 원본을 넣으면 아래 검사에서 즉사한다.
|
||||||
|
input_candidate_total = 0
|
||||||
|
seeds: list[dict[str, Any]] = []
|
||||||
|
for domain_id in DOMAIN_ORDER:
|
||||||
|
projected = projected_candidates[domain_id]
|
||||||
|
input_candidate_total += len(projected)
|
||||||
|
seeds.extend(projected)
|
||||||
|
if not seeds:
|
||||||
|
raise RuntimeError("no seed candidate from Stage B workers")
|
||||||
|
|
||||||
|
seen_refs: set[str] = set()
|
||||||
|
ledger_candidates: list[dict[str, Any]] = []
|
||||||
|
deterministic_decisions: list[dict[str, Any]] = []
|
||||||
|
exceptions: list[dict[str, Any]] = []
|
||||||
|
duplicate_buckets: dict[tuple[Any, ...], list[dict[str, Any]]] = {}
|
||||||
|
policy_review_counter = 0
|
||||||
|
|
||||||
|
def add_policy_review(domain_id: str, issue_type: str, refs: dict[str, list[str]], severity: str = "SOFT_WARNING") -> None:
|
||||||
|
nonlocal policy_review_counter
|
||||||
|
policy_review_counter += 1
|
||||||
|
review_handoff_items.append({
|
||||||
|
"review_id": f"R0:policy:{policy_review_counter:03d}",
|
||||||
|
"source_domain": domain_id,
|
||||||
|
"severity": severity,
|
||||||
|
"issue_type": issue_type,
|
||||||
|
"source_event_candidate_ids": refs.get("source_event_candidate_ids", []),
|
||||||
|
"source_evidence_indexes": refs.get("source_evidence_indexes", []),
|
||||||
|
"source_meeting_clause_ids": refs.get("source_meeting_clause_ids", []),
|
||||||
|
"downstream_owner": "Stage2",
|
||||||
|
"template_note": "결정적 defer 정책에 의해 보존된 검토 항목이다.",
|
||||||
|
})
|
||||||
|
|
||||||
|
for seed in seeds:
|
||||||
|
ref = seed.get("candidate_ref")
|
||||||
|
if not isinstance(ref, str) or not CANDIDATE_REF_RE.fullmatch(ref):
|
||||||
|
raise RuntimeError(f"invalid candidate_ref: {ref!r}")
|
||||||
|
if ref in seen_refs:
|
||||||
|
raise RuntimeError(f"duplicate candidate_ref: {ref}")
|
||||||
|
seen_refs.add(ref)
|
||||||
|
refs = _source_refs(seed)
|
||||||
|
# hard BLOCK: universe 밖 ref는 soft-strip 이후에도 남아있으면 안 된다 (방어적 재검사)
|
||||||
|
for key, values in refs.items():
|
||||||
|
allowed = universe.get(key, set())
|
||||||
|
outside = [v for v in values if allowed and v not in allowed]
|
||||||
|
if outside:
|
||||||
|
raise RuntimeError(f"{ref}: {key} outside Stage A universe: {outside}")
|
||||||
|
flags: list[str] = []
|
||||||
|
# 결정적 defer 정책 (개선전략서 X-2):
|
||||||
|
# C-2 (P0 판정 B) — 증거 단계에서 붙은 registry 구성요소는 증거 유래 근거다.
|
||||||
|
# _source_refs 가 seed 루트와 provenance 를 모두 보는 관례를 그대로 따른다.
|
||||||
|
registry_components = [
|
||||||
|
str(value)
|
||||||
|
for value in (seed.get("registry_component_ids")
|
||||||
|
or _dict(seed.get("provenance")).get("registry_component_ids")
|
||||||
|
or [])
|
||||||
|
if isinstance(value, str) and value
|
||||||
|
]
|
||||||
|
if not refs["source_evidence_indexes"] and not registry_components:
|
||||||
|
flags.append("meeting_only_evidence_gap")
|
||||||
|
add_policy_review(seed.get("source_domain"), "meeting_only_evidence_gap", refs)
|
||||||
|
domain_allowed = allowed_bo_types_by_domain.get(str(seed.get("source_domain"))) or set()
|
||||||
|
if (domain_allowed and seed.get("BOType") not in domain_allowed) or not seed.get("ActionType") or not (
|
||||||
|
seed.get("Action") or _dict(_dict(seed.get("extensions")).get("domain_payload")).get("action_summary")
|
||||||
|
):
|
||||||
|
flags.append("schema_field_fallback")
|
||||||
|
add_policy_review(seed.get("source_domain"), "schema_field_fallback", refs)
|
||||||
|
link_candidates = _strings(_dict(seed.get("downstream_seed_refs")).get("prior_candidate_refs"))
|
||||||
|
if len(link_candidates) > 1:
|
||||||
|
flags.append("prior_link_ambiguous")
|
||||||
|
add_policy_review(seed.get("source_domain"), "prior_link_ambiguous", refs)
|
||||||
|
duplicate_buckets.setdefault(_duplicate_key(seed), []).append(seed)
|
||||||
|
ledger_candidates.append({
|
||||||
|
"candidate_ref": ref,
|
||||||
|
"source_domain": seed.get("source_domain"),
|
||||||
|
"seed_payload": seed,
|
||||||
|
"source_refs": refs,
|
||||||
|
"deterministic_sort_key": _sort_key(seed),
|
||||||
|
"flags": flags,
|
||||||
|
})
|
||||||
|
|
||||||
|
# exact duplicate: provenance union 무손실이므로 canonical merge (v2 규칙 계승)
|
||||||
|
for bucket in duplicate_buckets.values():
|
||||||
|
if len(bucket) <= 1:
|
||||||
|
continue
|
||||||
|
canonical = bucket[0].get("candidate_ref")
|
||||||
|
duplicates = [item.get("candidate_ref") for item in bucket[1:]]
|
||||||
|
deterministic_decisions.append({
|
||||||
|
"decision_type": "EXACT_DUPLICATE_MERGE",
|
||||||
|
"canonical_candidate_ref": canonical,
|
||||||
|
"duplicate_candidate_refs": duplicates,
|
||||||
|
"basis": "exact duplicate deterministic rule (provenance-lossless union)",
|
||||||
|
})
|
||||||
|
|
||||||
|
# near duplicate: KEEP_SEPARATE + cluster id + review (LLM 금지 — defer 정책)
|
||||||
|
near_buckets: dict[tuple[Any, ...], list[dict[str, Any]]] = {}
|
||||||
|
for seed in seeds:
|
||||||
|
refs = _source_refs(seed)
|
||||||
|
key = (
|
||||||
|
tuple(sorted(refs["source_evidence_indexes"])),
|
||||||
|
tuple(sorted(refs["source_event_candidate_ids"])),
|
||||||
|
seed.get("BOType"),
|
||||||
|
seed.get("ActionType"),
|
||||||
|
)
|
||||||
|
near_buckets.setdefault(key, []).append(seed)
|
||||||
|
near_cluster_count = 0
|
||||||
|
pack_field_conflicts: list[dict[str, Any]] = []
|
||||||
|
for bucket in near_buckets.values():
|
||||||
|
if len(bucket) <= 1 or len({_duplicate_key(s) for s in bucket}) <= 1:
|
||||||
|
continue
|
||||||
|
near_cluster_count += 1
|
||||||
|
cluster_id = f"near-dup-{near_cluster_count:03d}"
|
||||||
|
cluster_refs = [str(s.get("candidate_ref")) for s in bucket]
|
||||||
|
for item in ledger_candidates:
|
||||||
|
if item["candidate_ref"] in cluster_refs:
|
||||||
|
item.setdefault("near_dup_cluster_id", cluster_id)
|
||||||
|
if "near_duplicate_kept_separate" not in item["flags"]:
|
||||||
|
item["flags"].append("near_duplicate_kept_separate")
|
||||||
|
add_policy_review(bucket[0].get("source_domain"), "near_duplicate_kept_separate",
|
||||||
|
{"source_evidence_indexes": _source_refs(bucket[0])["source_evidence_indexes"],
|
||||||
|
"source_event_candidate_ids": _source_refs(bucket[0])["source_event_candidate_ids"],
|
||||||
|
"source_meeting_clause_ids": []})
|
||||||
|
# non-deferrable 판정(X-3 4중 조건): 같은 near cluster에서 BehaviorTime 또는 amount가
|
||||||
|
# 서로 다른 non-null 값으로 충돌하면 writer가 단일 값을 고를 수 없으므로 pack에 수록
|
||||||
|
times = {str(_dict(s.get("core_field_base")).get("BehaviorTime")) for s in bucket if _dict(s.get("core_field_base")).get("BehaviorTime")}
|
||||||
|
amounts = set()
|
||||||
|
for s in bucket:
|
||||||
|
av = s.get("amount")
|
||||||
|
if isinstance(av, dict) and av.get("value_text"):
|
||||||
|
amounts.add(str(av.get("value_text")))
|
||||||
|
elif isinstance(av, str) and av.strip():
|
||||||
|
amounts.add(av.strip())
|
||||||
|
if len(times) > 1 or len(amounts) > 1:
|
||||||
|
pack_field_conflicts.append({
|
||||||
|
"exception_id": f"EX-FIELD-{len(pack_field_conflicts) + 1:03d}",
|
||||||
|
"exception_type": "field_conflict",
|
||||||
|
"candidate_refs": cluster_refs,
|
||||||
|
"reason": "same-source candidates carry conflicting BehaviorTime/amount values",
|
||||||
|
"conflicting_values": {"BehaviorTime": sorted(times), "amount": sorted(amounts)},
|
||||||
|
"compact_candidate_payload": _compact_exception_payload(bucket),
|
||||||
|
"allowed_decisions": ["KEEP_SEPARATE", "MERGE", "SPLIT", "DROP", "BLOCK_REVIEW"],
|
||||||
|
"escalation_flag": True,
|
||||||
|
})
|
||||||
|
|
||||||
|
exceptions.extend(pack_field_conflicts)
|
||||||
|
has_exceptions = bool(exceptions)
|
||||||
|
|
||||||
|
# 3) conservation invariant (write 전)
|
||||||
|
merged_absorbed = sum(len(_strings(d.get("duplicate_candidate_refs"))) for d in deterministic_decisions)
|
||||||
|
if len(ledger_candidates) != input_candidate_total:
|
||||||
|
raise RuntimeError(f"ledger candidate count {len(ledger_candidates)} != input candidates {input_candidate_total}")
|
||||||
|
if len(seen_refs) != input_candidate_total:
|
||||||
|
raise RuntimeError("candidate_ref conservation failed")
|
||||||
|
|
||||||
|
ledger = {
|
||||||
|
"postb_seed_ledger": {
|
||||||
|
"schema_version": "task_c_bo_postb_seed_ledger.v1",
|
||||||
|
"status": "READY",
|
||||||
|
"source_stage_a_created_at_utc": stage_a.get("created_at_utc"),
|
||||||
|
"input_digests_sha256": stage_a.get("input_digests_sha256"),
|
||||||
|
"source_universe": {
|
||||||
|
"source_event_candidate_ids": sorted(universe["source_event_candidate_ids"]),
|
||||||
|
"source_evidence_indexes": sorted(universe["source_evidence_indexes"]),
|
||||||
|
"source_meeting_clause_ids": sorted(universe["source_meeting_clause_ids"]),
|
||||||
|
},
|
||||||
|
"stage_b_source_contract": {
|
||||||
|
"schema_version": "task_c_bo_stage_b_bo_seed_universe.compat_from_r0.v1",
|
||||||
|
"status": "READY",
|
||||||
|
"compatibility_source": "r0_seed_reducer.direct_worker_outputs",
|
||||||
|
},
|
||||||
|
"ledger_candidates": sorted(ledger_candidates, key=lambda item: (
|
||||||
|
item["deterministic_sort_key"].get("BehaviorTime") is None,
|
||||||
|
item["deterministic_sort_key"].get("BehaviorTime") or "",
|
||||||
|
item["deterministic_sort_key"].get("domain_order", 99),
|
||||||
|
item["deterministic_sort_key"].get("BOType") or "",
|
||||||
|
item["deterministic_sort_key"].get("ActionType") or "",
|
||||||
|
item["deterministic_sort_key"].get("JuristicActLabel") or "",
|
||||||
|
item["deterministic_sort_key"].get("Action") or "",
|
||||||
|
item["deterministic_sort_key"].get("candidate_ref") or "",
|
||||||
|
)),
|
||||||
|
"deterministic_decisions": deterministic_decisions,
|
||||||
|
"exception_pack": {
|
||||||
|
"has_exceptions": has_exceptions,
|
||||||
|
"clusters": [],
|
||||||
|
"field_conflicts": pack_field_conflicts,
|
||||||
|
"link_ambiguities": [],
|
||||||
|
"schema_risks": [],
|
||||||
|
},
|
||||||
|
"audit_trace": {
|
||||||
|
"removed_or_sidecar_fields": [],
|
||||||
|
"source_membership_policy": "outside-universe source ref => hard BLOCK (defer 정책 §7)",
|
||||||
|
"normalization_notes": salvage_notes + guard_warnings,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
write_doc(LEDGER_PATH, json.dumps(ledger, ensure_ascii=False, indent=2))
|
||||||
|
|
||||||
|
pack = {
|
||||||
|
"schema_version": "stage1_part2_exception_pack.v1",
|
||||||
|
"has_exceptions": has_exceptions,
|
||||||
|
"exception_count": len(exceptions),
|
||||||
|
"exceptions": exceptions,
|
||||||
|
"budget": {"max_candidates_per_exception": 8, "max_payload_chars_per_candidate": 2000},
|
||||||
|
}
|
||||||
|
write_doc(PACK_PATH, json.dumps(pack, ensure_ascii=False, indent=2))
|
||||||
|
|
||||||
|
handoff = {
|
||||||
|
"schema_version": "stage1_part2_review_handoff.v1",
|
||||||
|
"status": "PENDING_FINALIZE",
|
||||||
|
"review_items": review_handoff_items,
|
||||||
|
}
|
||||||
|
write_doc(REVIEW_HANDOFF_PATH, json.dumps(handoff, ensure_ascii=False, indent=2))
|
||||||
|
|
||||||
|
print(json.dumps({
|
||||||
|
"status": "READY",
|
||||||
|
"message": "R0 seed reducer 완료: ledger/exception pack/review handoff 생성",
|
||||||
|
"ledger_path": LEDGER_PATH,
|
||||||
|
"exception_pack_path": PACK_PATH,
|
||||||
|
"review_handoff_path": REVIEW_HANDOFF_PATH,
|
||||||
|
"has_exceptions": has_exceptions,
|
||||||
|
"exception_count": len(exceptions),
|
||||||
|
"candidate_counts": {
|
||||||
|
"input": input_candidate_total,
|
||||||
|
"ledger": len(ledger_candidates),
|
||||||
|
"exact_duplicate_absorbed": merged_absorbed,
|
||||||
|
"near_dup_clusters": near_cluster_count,
|
||||||
|
},
|
||||||
|
"review_item_count": len(review_handoff_items),
|
||||||
|
"salvage_count": len(salvage_notes),
|
||||||
|
}, ensure_ascii=False))
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
try:
|
||||||
|
main()
|
||||||
|
except Exception as exc:
|
||||||
|
print(json.dumps({"status": "FAILED", "message": "R0 seed reducer 실패: downstream 진행 금지",
|
||||||
|
"reason": str(exc)}, ensure_ascii=False))
|
||||||
|
raise
|
||||||
+3315
File diff suppressed because it is too large
Load Diff
+3
-3
@@ -25,7 +25,9 @@
|
|||||||
# fan-out fanout/domain_fanout_plan.json domain_fanout_plan.v1
|
# fan-out fanout/domain_fanout_plan.json domain_fanout_plan.v1
|
||||||
# worker 이름 Task_C_B_domain_worker_* · 인스턴스 DOMAIN-<도메인ID>
|
# worker 이름 Task_C_B_domain_worker_* · 인스턴스 DOMAIN-<도메인ID>
|
||||||
# 실행 인자 --asset-root · --execution-root · --logical-root
|
# 실행 인자 --asset-root · --execution-root · --logical-root
|
||||||
# 구 경로 stage1_tmp/task_c_bo/** 는 쓰지 않는다(legacy_paths_forbidden).
|
# 구 slice/seed 경로(stage1_tmp/task_c_bo/domain_slices|domain_seed_outputs)는 쓰지 않는다
|
||||||
|
# (legacy_paths_forbidden). stage_a_context·source_universe_manifest(P-1 복귀)와
|
||||||
|
# postb_* 3종은 stage1_tmp/task_c_bo/ 를 정본 경로로 유지한다.
|
||||||
#
|
#
|
||||||
# 모듈 반입 — Part 1 D0 규약 R-1~R-5 승계
|
# 모듈 반입 — Part 1 D0 규약 R-1~R-5 승계
|
||||||
# .txt 미러를 read_raw 로 읽고 runtime_manifest.json 의 sha256 과 대조한 뒤
|
# .txt 미러를 read_raw 로 읽고 runtime_manifest.json 의 sha256 과 대조한 뒤
|
||||||
@@ -890,8 +892,6 @@ Agent:
|
|||||||
"registry_loader": "Default_Agent/stage1_runtime/registry_loader.txt",
|
"registry_loader": "Default_Agent/stage1_runtime/registry_loader.txt",
|
||||||
"worker_output_validator": "Default_Agent/stage1_runtime/worker_output_validator.txt",
|
"worker_output_validator": "Default_Agent/stage1_runtime/worker_output_validator.txt",
|
||||||
}
|
}
|
||||||
ACTIVATION_MANIFEST_PATH = "routing/domain_activation_manifest.json"
|
|
||||||
REGISTRY_INDEX_PATH = "Default_Agent/domains/_registry_index.json"
|
|
||||||
|
|
||||||
def _seed_docs_from_plan(plan):
|
def _seed_docs_from_plan(plan):
|
||||||
# v5 — 경로만이 아니라 계획 행 전체를 보관한다. validate_seed_object 가
|
# v5 — 경로만이 아니라 계획 행 전체를 보관한다. validate_seed_object 가
|
||||||
|
|||||||
+1037
File diff suppressed because it is too large
Load Diff
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
|||||||
{"enforcement":{"declared":true,"note":"강제와 선언은 다르다. 이 파일이 선언을 맡는다.","runtime_guard":"Task_C_BO_A0 가 봉인 세 해시를 대조하므로 Part 1 미수행 시 SEAL_FAILED 로 멈춘다."},"interface_table":"handoffs/stage1_part_interface.v1.json","purpose":"Part 1~4 의 실행 순서와 인계 파일을 선언한다. 지금은 각 통합본의 prevs/nexts 가 비어 있어 순서가 A0 의 파일 부재 실패로 사실상 강제될 뿐 선언되어 있지 않다.","schema_version":"stage1_stage_chain.v1","stages":[{"order":1,"part":"Stage_1.Part_1","produces":["routing/domain_activation_manifest.json","quality_gates/stage1_part1_soft_gate_handoff.json","routing/domain_screening.json","evidence_indexed.json","evidence_event_candidates.json"],"requires":["client_meeting.md","evidence_all.json"],"yaml":"stage_1_part_1_v.8.yml"},{"order":2,"part":"Stage_1.Part_2","produces":["BO.json","signals/signal_manifest.json","actio_case_signals.json","case_liability_signals.json","legal_effect_signals.json","stage1_tmp/task_c_bo/postb_compiled_bundle_compact.json"],"requires":["routing/domain_activation_manifest.json","quality_gates/stage1_part1_soft_gate_handoff.json","routing/domain_screening.json","evidence_indexed.json","evidence_event_candidates.json"],"yaml":"stage_1_part_2_v.8.yml"},{"note":"정본 signal 집합으로의 이관은 Part 3 개정의 몫이다.","order":3,"part":"Stage_1.Part_3","produces":[],"requires":["BO.json","signals/signal_manifest.json"],"yaml":"Stage_1_Part_3_Claude_v2.yml"},{"note":"같음.","order":4,"part":"Stage_1.Part_4","produces":[],"requires":["BO.json","signals/signal_manifest.json"],"yaml":"Stage_1_Part_4_Claude_v3.yml"}],"status":"ACTIVE"}
|
{"enforcement":{"declared":true,"note":"강제와 선언은 다르다. 이 파일이 선언을 맡는다.","runtime_guard":"Task_C_BO_A0 가 봉인 세 해시를 대조하므로 Part 1 미수행 시 SEAL_FAILED 로 멈춘다."},"interface_table":"handoffs/stage1_part_interface.v1.json","purpose":"Part 1~4 의 실행 순서와 인계 파일을 선언한다. 지금은 각 통합본의 prevs/nexts 가 비어 있어 순서가 A0 의 파일 부재 실패로 사실상 강제될 뿐 선언되어 있지 않다.","schema_version":"stage1_stage_chain.v1","stages":[{"order":1,"part":"Stage_1.Part_1","produces":["routing/domain_activation_manifest.json","quality_gates/stage1_part1_soft_gate_handoff.json","routing/domain_screening.json","evidence_indexed.json","evidence_event_candidates.json"],"requires":["client_meeting.md","evidence_all.json"],"yaml":"stage_1_part_1_v.8.yml"},{"order":2,"part":"Stage_1.Part_2","produces":["BO.json","signals/signal_manifest.json","actio_case_signals.json","case_liability_signals.json","legal_effect_signals.json","stage1_tmp/task_c_bo/postb_compiled_bundle_compact.json"],"requires":["routing/domain_activation_manifest.json","quality_gates/stage1_part1_soft_gate_handoff.json","routing/domain_screening.json","evidence_indexed.json","evidence_event_candidates.json"],"yaml":"stage_1_part_2_v.8.yml"},{"note":"정본 signal 집합(downstream_read_sets.part3_L0) 이관 완료. L1 없음 — 2 task 직렬.","order":3,"part":"Stage_1.Part_3","produces":["legal_effect_structures.json","stage1_tmp/task_le/structure_seed_bundle.json","quality_gates/stage1_part3_review_handoff.json","validation_assets/routing/part3_receipt.json"],"requires":["BO.json","signals/signal_manifest.json","routing/domain_activation_manifest.json"],"yaml":"stage_1_part_3_v.8.yml"},{"note":"같음.","order":4,"part":"Stage_1.Part_4","produces":[],"requires":["BO.json","signals/signal_manifest.json"],"yaml":"Stage_1_Part_4_Claude_v3.yml"}],"status":"ACTIVE"}
|
||||||
|
|||||||
+175
-213
@@ -2068,17 +2068,18 @@ Stage 1 -- Part 2 작업내역서를 개정한 작업 내용을 바탕으로 기
|
|||||||
|
|
||||||
MEMORY.md 파일에는 지금까지의 작업 내역들이 압축적으로 요약되어 있다.
|
MEMORY.md 파일에는 지금까지의 작업 내역들이 압축적으로 요약되어 있다.
|
||||||
|
|
||||||
그리고 2개 yaml 작업명세서의 작업 흐름과 내역을 상세히 분석하여 제시한 문서가 `stage_1_part_1_and_2_updated_yaml_analysis.md`이다.
|
그리고 `stage 1 -- part 1|2` 2개 yaml 작업명세서의 작업 흐름과 내역을 상세히 분석하여 제시한 문서가 `stage_1_part_1_and_2_updated_yaml_analysis.md`이다.
|
||||||
|
|
||||||
이제 `stage_1_update_strategy.md`에 제시된 stage 1 -- part 3 개정작업 내용을 좀 더 최적화하고, 최적화된 개정 작업 전략서를 작성하고자 한다.
|
이제 `stage_1_update_strategy.md`에 제시된 `stage 1 -- part 3` 개정작업을 최적화된 방식으로 실행할 수 있도록 지시 사항을 작성하여 part 3 개정 작업 전략서를 작성하고자 한다.
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<method>
|
<method>
|
||||||
1. <context>에 제시된 지금까지의 작업 히스토리를 숙지한다.
|
1. <context>에 제시된 지금까지의 작업 히스토리를 숙지한다.
|
||||||
2. `stage_1_update_strategy.md`의 `## 1. Stage 1 최적 워크플로우 — 전체 DAG`의 `Part 3 — 법률효과 구조`의 `P3-L0`, `P3-L1`, `P3-L2` 작업 흐름도와 `## 4. Part 3 세부 워크플로우`에 제시된 내용을 분석한다.
|
2. `stage_1_update_strategy.md`의 `## 1. Stage 1 최적 워크플로우 — 전체 DAG`의 `Part 3 — 법률효과 구조`의 `P3-L0`, `P3-L1`, `P3-L2` 작업 흐름도와 `## 4. Part 3 세부 워크플로우`에 제시된 내용을 분석한다.
|
||||||
3. 지금까지 stage 1 -- part 1|2 개정 작업명세서와 작업 결과물들과 consistent한 방식으로, '최소한의 작업으로 최고의 품질을 얻는다' 원칙을 준수하여 stage 1 -- part 3 작업을 최적화하는 방안을 구상한다. 최적화하는 방안을 구상할 때 아래 제시하는 <constraints>를 준수한다.
|
3. Liti-agent가 Stage 1 -- Part 1,2 yaml 작업명세서를 실행할 때 사용하는 자산들이 저장된 `v.7/extension_research/Default_Agent` 폴더 내 자산들의 위치와 파일들을 점검한다.
|
||||||
4. 최적 개정 작업 방안에 대한 구상을 1차 드래프트로 작성한 후, 독립적인 sub-agent를 띄워서 1차 드래프트 내용이 과연 stage 1 -- part 3 작업 개정을 위한 최적의 방안인지 엄격하게 검증한다. Sub-agent가 최적의 개정 작업 방안이라고 판단할 때까지 최적 개정 작업 방안을 재작성한다.
|
4. 3에서 얻은 지식에 기반을 두고, `stage 1 -- part 1|2` 2개 yaml 작업명세서 및 그것을 실행해서 얻는 작업 결과물들과 consistent한 방식으로, '최소한의 작업으로 최고의 품질을 얻는다' 원칙을 준수하여 stage 1 -- part 3 작업을 최적화하는 방안을 구상한다. 최적화하는 방안을 구상할 때 아래 제시하는 <constraints>를 준수한다.
|
||||||
5. 4번의 검증 작업을 완전히 통과한 stage 1 -- part 3 최적 개정 방안을 상세한 작업 명세서 겸 실행 전략서로 작성하여 `v.7/extension_research/stage_1_part_3_개정_신전략서.md`로 생성한다.
|
5. 최적 개정 작업 방안에 대한 구상을 1차 드래프트로 작성한 후, 독립적인 sub-agent를 띄워서 1차 드래프트 내용이 과연 stage 1 -- part 3 작업 개정을 위한 최적의 방안인지 엄격하게 검증한다. 검증에 100% 통과할 때까지, sub-agent 검증과 최적 개정 작업명세서를 반복한다.
|
||||||
|
6. 5번의 검증 작업을 완전히 통과한 stage 1 -- part 3 최적 개정 작업명세서를 `v.7/extension_research/stage_1_part_3_개정_신전략서.md`로 생성한다.
|
||||||
|
|
||||||
<constraints>
|
<constraints>
|
||||||
1. 작업 시, 기존 yaml 작업명세서('v.7/Claude_YAML'의 yaml 파일들)와 관련한 dependency는 완전히 제거한다. 즉, 기존 yaml 작업 명세서가 지시하는 내용에 전혀 의존하지 않도록 한다.
|
1. 작업 시, 기존 yaml 작업명세서('v.7/Claude_YAML'의 yaml 파일들)와 관련한 dependency는 완전히 제거한다. 즉, 기존 yaml 작업 명세서가 지시하는 내용에 전혀 의존하지 않도록 한다.
|
||||||
@@ -2094,43 +2095,19 @@ MEMORY.md 파일에는 지금까지의 작업 내역들이 압축적으로 요
|
|||||||
</method>
|
</method>
|
||||||
|
|
||||||
<global_constraints>
|
<global_constraints>
|
||||||
- `v.7/CLAUDE.md`가 제시하는 #### 5 행동 규칙을 준수한다.
|
- `v.7/CLAUDE.md`가 제시하는 Fable 5 행동 규칙을 준수한다.
|
||||||
- 작업 완료 시 작업 내역을 압축 요약하여 `v.7/MEMORY.md`에 추가 기입한다.
|
- 작업 완료 시 작업 내역을 압축 요약하여 `v.7/MEMORY.md`에 추가 기입한다.
|
||||||
</global_constraints>
|
</global_constraints>
|
||||||
|
|
||||||
|
|
||||||
|
==================================
|
||||||
|
|
||||||
|
┌────────────────────────────────────────────┐
|
||||||
|
│ Lessons │
|
||||||
|
└────────────────────────────────────────────┘
|
||||||
|
작업명세서 개정 작성 시 그 작업의 궁극적 목적/목표/목적물을 '최소 작업으로 최고 품질로 달성'하는 원칙을 기반으로 두고 최적 워크플로우를 구성하여 작업명세서를 작성한다.
|
||||||
|
|
||||||
|
--> 이 기준을 prompt에 명시해야 한다.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<global_constraints>
|
|
||||||
- `v.7/CLAUDE.md`가 제시하는 #### 5 행동 규칙을 준수한다.
|
|
||||||
- 작업 완료 시 작업 내역을 압축 요약하여 `v.7/MEMORY.md`에 추가 기입한다.
|
|
||||||
- yaml 작성을 할 때는 <v.7/SKILL.md>의 규칙을 엄격하게 준수하며, python code를 작성할 때는 <v.7/extension_research/test_code_executor.ipynb>가 제시하는 Python code 작성 규칙을 엄수한다.
|
|
||||||
</global_constraints>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
┌────────────────────────────────────────────┐
|
┌────────────────────────────────────────────┐
|
||||||
@@ -2140,28 +2117,27 @@ MEMORY.md 파일에는 지금까지의 작업 내역들이 압축적으로 요
|
|||||||
└────────────────────────────────────────────┘
|
└────────────────────────────────────────────┘
|
||||||
|
|
||||||
<goal>
|
<goal>
|
||||||
`stage_1_part_3_개정방안전략서.md`를 실행하여 stage 1 -- part 3 작업명세서를 개정한다.
|
`stage_1_part_3_개정_신전략서.md`에 제시된 지시사항을 실행하여 stage 1 -- part 3 작업내역서를 개정 생성한다.
|
||||||
</goal>
|
</goal>
|
||||||
|
|
||||||
<context>
|
<context>
|
||||||
지금까지 stage 1 -- part 1|2 개정작업을 진행했다.
|
지금까지 stage 1 -- part 1|2 개정작업을 진행하여 yaml 작업명세서 `stage_1_part_1_v.8.yml`와 `stage_1_part_2_v.8.yml`를 생성했다.
|
||||||
`stage_1_part_1_v.8.yml`, `stage_1_part_2_v.8.yml`를 검증하여 두 작업명세서가 모두 의도한 작업 과정을 실행하는 것을 확인했다.
|
두 yaml 작업명세서는 검증을 통해 모두 의도한 작업 과정을 실행함을 확인했다.
|
||||||
|
|
||||||
이제 `stage_1_part_3_개정방안전략서.md`가 제시하는 방식을 실행하여 part 3 작업명세서(yaml & related assets)를 개정하고자 한다.
|
이제 `stage_1_part_3_개정_신전략서.md`가 제시하는 방식을 실행하여 part 3 작업의 궁극적 목적(목표/목적물)을 '최소 작업으로 최고 품질로 달성'하는 원칙을 달성하는 part 3 작업명세서(yaml & related assets)를 생성하고자 한다.
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
<method>
|
<method>
|
||||||
1. 구 part 3 yaml('v.7/Claude_YAML/Stage_1_Part_3_Claude_v2.yml')를 확인한다.
|
1. `stage_1_part_3_개정_신전략서.md`의 작업 내용들을 독립적으로 동시 실행가능한 task들과, 직렬로 sequential 방식으로 실행해야 할 task들로 분류한다.
|
||||||
2. `stage_1_part_3_개정방안전략서.md`가 제시하는 개정 방법을 읽고, 독립 실행 가능한 task들과 sequential 작업이 필요한 task들로 분류한다.
|
2. 1의 결과를 바탕으로 독립 동시 실행 가능한 task들은 병렬로 동시 실행하고, sequential 방식으로 실행해야 하는 task들은 upstream-downstream 작업 consistency를 유지하면서 실행하여 part 3의 yaml 작업명세서를 작성한다.
|
||||||
3. 2번 과정에서 분류한 task들에 대해서 독립 실행 가능한 task들은 병렬로 작업을 수행하고, sequential 작업이 필요한 task들은 upstream-downstream consistency를 유지하면서 작업을 수행한다. 작업 수행 시 아래 제시한 <constraints>를 준수한다.
|
3. 2번 작업을 수행한 후 sub-agent를 띄워서 2번 작업이 `stage_1_part_3_개정_신전략서.md`가 지시하는 사항들을 100% 정확하게 준수하여 작업을 수행했는지 검증한다. Sub-agent가 100% 검증 통과라고 판정할 때까지, 2번 작업(yaml 작성 & 검증)을 반복한다.
|
||||||
4. 3번 작업 과정에서 얻은 결과물들은 기본적으로 `v.7/extension_research/ver_8_yaml_candidates` 폴더에 '정확한 배포 위치'로 저장하는 것을 원칙으로 한다. 작업 수행 과정에서 기존 stage 1 -- part 3의 개별 작업용 yaml 파일들, md 파일들, python code (.py|.txt)들을 수정하거나 재작성하면 기존 파일들은 outdated 폴더로 옮기고, 수정 및 재작성한 파일은 기존 파일들을 대체하는 방식으로 정확한 배포 위치에 생성한다. 신규 작성한 자산이 있다면 그 역시 정확한 배포 위치에 저장한다.
|
4. 3번 작업이 완료되면, 작업 결과물 중 저장해야 할 자산들(assets)을 `extension_research/Default_Agent` 폴더에 배포 위치를 정확히 지켜서 저장하고, part 3 작업명세서를 `extension_research/ver_8_yaml_candidates/stage_1_part_3_v.8.yml`로 생성한다.
|
||||||
5. 작업을 완료하면 독립적으로 sub-agent를 띄워서 `stage_1_part_3_개정방안전략서.md`가 제시하는 개정 방법에 따라 작업이 100% 수행되었는지 검증한다. 만일 검증을 통과하지 못한 작업 내용이 존재하면 그 작업 내역만을 incremental 수정한다. 이 과정은 sub-agent의 검증을 통과할 때까지 반복한다.
|
|
||||||
6. 5번 검증까지 통과하여 작업을 완료하면 작업 내역서를 문서로 작성하여 'v.7/extension_research/stage_1_part_3_1차개정작업.md'로 생성한다.
|
|
||||||
|
|
||||||
<constraints>
|
<constraints>
|
||||||
1. 작업 시, 기존 yaml 작업명세서('v.7/Claude_YAML'의 yaml 파일들)와 관련한 dependency가 없도록 한다. 즉, 기존 yaml 작업 명세서가 지시하는 내용에 절대 의존하면 안된다. 새로 작성하는 yaml이나 자산들은 기존 작업명세서에서 지시하는 내용과는 별개로 독립적인 결과물이어야 한다.
|
1. 작업 시, 기존 yaml 작업명세서('v.7/Claude_YAML'의 yaml 파일들)와 관련한 dependency는 완전히 제거한다. 즉, 기존 yaml 작업 명세서가 지시하는 내용에 전혀 의존하지 않도록 한다.
|
||||||
2. Stage 1 -- part 1|2 작업이 사용하는 자산들의 명칭과 배포 위치 그리고 포맷들을 정확히 활용한다.
|
2. Stage 1 -- part 1|2 작업이 사용하는 자산들의 명칭과 배포 위치 그리고 포맷은 `extension_research/Default_Agent` 폴더에 저장되어 있으며, 앞으로 개정 생성될 Part 3 yaml 작업명세서가 실행되어 생성될 모든 자산(md, .py, .txt, .json)들은 이 폴더의 정확한 배포 위치(서브 폴더)에 저장한다.
|
||||||
3. Stage 1 전체 작업에 대한 아래의 절대 규칙을 'conerstone'으로 삼는다.
|
3. Liti-agent가 stage # yaml 작업명세서를 실행하여 작업을 `완수`했다는 표현을 사용할 때, `완수`의 기준은 단순히 yaml 작업명세서를 끝까지 실행 완주할 수 있다는 것이 아니다. Yaml 작업명세서를 실행했을 때, 원래 의도한 결과물들이 올바른 방식으로 생성되어야 하고, 소작업(sub-task)들의 upstream-downstream 간에 consistency(넘겨받은 파일을 올바로 읽고, handoff로 넘겨주는 파일도 정해진 포맷에 맞게 넘겨줌)를 유지하여 작업이 끝까지 이어진 경우를 작업이 `완수`되었다고 평가한다.
|
||||||
|
4. Stage 1 전체 작업에 대한 아래 내용을 절대 규칙으로 삼는다.
|
||||||
<absolute_principle_for_whole_stage_1>
|
<absolute_principle_for_whole_stage_1>
|
||||||
- Liti-agent는 대한민국 민사소송 사건종류 137종을 모두 다룰 수 있도록 개발되어야 한다.
|
- Liti-agent는 대한민국 민사소송 사건종류 137종을 모두 다룰 수 있도록 개발되어야 한다.
|
||||||
- Stage 1 에서는 Liti-agent가 137종 중 그 어떤 사건을 다루더라도 `레지스트리 기반` 방식으로 사건 종류의 이름이 아니라 증거 구성요소·요건 슬롯·단서로 구조화된 정보를 확보하는 것을 목표로 한다. 이를 위해 사용할 자산들이 '법리 도메인, 계산 도메인, signal'이며 이에 대한 정의는 `v.7/extension_research/ensemble_v2.md`에 제시되어 있다.
|
- Stage 1 에서는 Liti-agent가 137종 중 그 어떤 사건을 다루더라도 `레지스트리 기반` 방식으로 사건 종류의 이름이 아니라 증거 구성요소·요건 슬롯·단서로 구조화된 정보를 확보하는 것을 목표로 한다. 이를 위해 사용할 자산들이 '법리 도메인, 계산 도메인, signal'이며 이에 대한 정의는 `v.7/extension_research/ensemble_v2.md`에 제시되어 있다.
|
||||||
@@ -2171,11 +2147,140 @@ MEMORY.md 파일에는 지금까지의 작업 내역들이 압축적으로 요
|
|||||||
</method>
|
</method>
|
||||||
|
|
||||||
<global_constraints>
|
<global_constraints>
|
||||||
- `v.7/CLAUDE.md`가 제시하는 Opus 5 행동 규칙을 준수한다.
|
- `v.7/CLAUDE.md`가 제시하는 Fable 5 행동 규칙을 준수한다.
|
||||||
- 작업 완료 시 작업 내역을 압축 요약하여 `v.7/MEMORY.md`에 추가 기입한다.
|
- 작업 완료 시 작업 내역을 압축 요약하여 `v.7/MEMORY.md`에 추가 기입한다.
|
||||||
- yaml 작성을 할 때는 <v.7/SKILL.md>의 규칙을 엄격하게 준수하며, python code를 작성할 때는 <v.7/extension_research/test_code_executor.ipynb>가 제시하는 Python code 작성 규칙을 엄수한다.
|
- yaml 작성을 할 때는 <v.7/SKILL.md>의 규칙을 엄격하게 준수하며, python code를 작성할 때는 <v.7/extension_research/test_code_executor.ipynb>가 제시하는 Python code 작성 규칙을 엄수한다.
|
||||||
</global_constraints>
|
</global_constraints>
|
||||||
|
|
||||||
|
==================================
|
||||||
|
|
||||||
|
┌────────────────────────────────────────────┐
|
||||||
|
│ 어떤 작업을 할 것인가 │
|
||||||
|
└────────────────────────────────────────────┘
|
||||||
|
Part 3 분석서
|
||||||
|
┌────────────────────────────────────┐
|
||||||
|
│ Stage 1 -- Part 3 Analysis Doc │
|
||||||
|
└────────────────────────────────────┘
|
||||||
|
|
||||||
|
<goal>
|
||||||
|
Stage 1 -- Part 3 작업명세서를 정밀하게 파악하고 그로부터 Part 3 작업 내역을 정교하게 보고서로 작성한다.
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<input_data_for_context>
|
||||||
|
`stage_1_part_1_and_2_updated_yaml_analysis.md`: Stage 1 -- Part 1 & 2 작업내역 분석서
|
||||||
|
`MEMORY.md`: stage 1 -- part 1, 2, 3 작업명세서 개정 작업 히스토리 반영되어 있음
|
||||||
|
`stage_1_part_3_개정작업내역서.md`: part 3 작업명세서 개정 작업 내역 요약
|
||||||
|
`ver_8_yaml_candidates/stage_1_part_3_v.8.yml`: stage 1 -- part 3 yaml 작업명세서
|
||||||
|
</input_data_for_context>
|
||||||
|
|
||||||
|
<method>
|
||||||
|
1. <input_data> 자료들을 정밀하게 분석한다.
|
||||||
|
2. 1번 작업에 기반을 두고, `stage_1_part_3_v.8.yml`를 아래 기준(<기준>)으로 분석한다.
|
||||||
|
<기준>
|
||||||
|
[1] Part 3 전체 작업 내역 및 세부작업 내역의 연결성
|
||||||
|
[2] Part 3 IO(in and out) 파일 구조 (자산들의 배포 위치도 정확하게 식별한다)
|
||||||
|
[3] Part 3 세부 작업들의 작업 명칭, 작업 목적, 작업 내역, 연결된 upstream-downstream 작업들 간 어떤 방식으로 작업 내역들이 input으로 사용되고, handoff 되는지 파악
|
||||||
|
</기준>
|
||||||
|
|
||||||
|
3. 2번에서 <기준>에 따라 Part 3 작업 내역을 분석한 내용을 1개의 문서로 작성한다. 문서 작성 시 Part 3 각 작업에 대해 아래 항목(<항목>)들을 main contents로 삼는다:
|
||||||
|
<항목>
|
||||||
|
- 전체 작업 DAG flow (UML or ASCII art 표현)
|
||||||
|
- IO (작업별 in & out files with file format)
|
||||||
|
- 작업용 assets (정확한 배포 위치 folder path 정보도 포함 / python code는 .py뿐만 아니라 .txt로 복제 저장한 것도 포함)
|
||||||
|
- 개별 소작업(sub-task)들의 명칭, 작업 내역, 작업 목적
|
||||||
|
- upstream-downstream 연결된 작업들의 연결 이유, 연결 방식, 자료 사용 방식
|
||||||
|
</항목>
|
||||||
|
|
||||||
|
4. 1~3번까지 작업을 마쳤으면 독립적인 sub-agent를 띄워서 1~3 작업이 thourough하게 수행되었는지(i.e., 분석 시 빼먹은 작업 내역이 없는지, 잘못 작성한 내용은 없는지 등)를 엄격하게 검증한다. 검증에서 문제가 된다고 도출된 것들에 대해서는 incremental 작업을 통해서 sub-agent 검증을 통과할 때까지 1~3 재작업을 수행한다.
|
||||||
|
|
||||||
|
5. 검증까지 모두 통과했으면, Part 1 & 2 작업내역서를 `v.7/extension_research/stage_1_part_3_updated_yaml_analysis.md`로 생성한다.
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<global_constraints>
|
||||||
|
- `v.7/CLAUDE.md`가 제시하는 Fable 5 행동 규칙을 준수한다.
|
||||||
|
- 작업 완료 시 작업 내역을 압축 요약하여 `v.7/MEMORY.md`에 추가 기입한다.
|
||||||
|
- yaml 검증해야 한다면 <v.7/SKILL.md>의 규칙을 엄격하게 준수하며, python code를 검증해야 한다면 <v.7/extension_research/test_code_executor.ipynb>가 제시하는 Python code 작성 규칙을 엄수한다.
|
||||||
|
</global_constraints>
|
||||||
|
|
||||||
|
==================================
|
||||||
|
|
||||||
|
┌────────────────────────────────────┐
|
||||||
|
│ Stage 1 -- Part 1|2|3 │
|
||||||
|
│ Location of All Assets │
|
||||||
|
└────────────────────────────────────┘
|
||||||
|
[v.7 폴더에 Claude CLI 띄우고 작업]
|
||||||
|
|
||||||
|
<goal>
|
||||||
|
`stage_1_2_3_assets_distribution_location.md` 생성
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<method>
|
||||||
|
1. `v.7/extension_research/ver_8_yaml_candidates` 폴더 내 `stage_1_part_1_v.8.yml`, `stage_1_part_2_v.8.yml`, `stage_1_part_3_v.8.yml`를 정확하게 빠짐없이 읽어서 각 part별 Liti-agent가 작업을 수행할 때 사용할 자산(json, md, .py|.txt)들의 정확한 배포 위치를 식별한다.
|
||||||
|
|
||||||
|
2. 1에서 식별한 내용을 바탕으로 '특정 작업에 해당하는 자산', '공통자산' 등으로 자산들을 분류한 후, 각 자산 파일들에 대한 "정확한 배포 위치 / 형태 / 크기 / 쓰는 task / 비고(역할, 정의, 간단한 작업 내역 등 가장 특징적인 description)"를 표로 작성한다.
|
||||||
|
|
||||||
|
3. 2번 작업 후 별도 sub-agent를 띄워, 1,2 작업이 정확하게 수행되었는지 검증한다. 이 검증을 통과할 때까지 1,2 작업을 반복한다.
|
||||||
|
|
||||||
|
3. 3번 검증까지 통과한 내용을 `v.7/extension_research/stage_1_2_3_assets_distribution_location.md`로 생성한다.
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<global_constraints>
|
||||||
|
- `v.7/CLAUDE.md`가 제시하는 Fable 5 행동 규칙을 준수한다.
|
||||||
|
- 작업 완료 시 작업 내역을 압축 요약하여 `v.7/MEMORY.md`에 추가 기입한다.
|
||||||
|
</global_constraints>
|
||||||
|
|
||||||
|
==================================
|
||||||
|
|
||||||
|
[Asset Distribution Location 기입 작업에서 발견된 내용으로 질문]
|
||||||
|
|
||||||
|
`stage_1_2_3_assets_distribution_location.md`의 `§8. 특기사항 (판독 중 확인된 사실)`에 제시된 8가지 항목들 내용의 validity를 한 번 더 점검하여 정말 문제가 되는 것들을 식별하고 그 중에서 `stage_1_part_1_v.8.yml`, `stage_1_part_2_v.8.yml`, `stage_1_part_3_v.8.yml`를 수정해야 하는 작업과 `Default_Agent` 폴더 내 자산을 등재하거나 삭제해야 하는 작업들로 구별하여 정리하라.
|
||||||
|
|
||||||
|
지금 위 답변을 제목을 '자산 위치 정리 중 발견한 문제'로 하고 `v.7/extension_research/problems_identified_in_detecting_assets_location.md`로 생성하라.
|
||||||
|
|
||||||
|
==================================
|
||||||
|
┌────────────────────────────────────┐
|
||||||
|
│ Claude CLI 작업에서 밝혀진 │
|
||||||
|
│ 문제점들에 대한 재점검 │
|
||||||
|
│ VS Code Fable 5 작업 복귀 │
|
||||||
|
└────────────────────────────────────┘
|
||||||
|
<context>
|
||||||
|
`v.7/extension_research/stage_1_2_3_assets_distribution_location.md`: stage 1 -- part 1|2|3 yaml 작업명세서 `v.7/extension_research/ver_8_yaml_candidates/stage_1_part_1_v.8.yml`, `v.7/extension_research/ver_8_yaml_candidates/stage_1_part_2_v.8.yml`, `v.7/extension_research/ver_8_yaml_candidates/stage_1_part_3_v.8.yml`가 작업을 수행할 때 사용하는 자산들의 정확한 배포 위치를 기입한 문서다. 그런데 이 문서를 생성하기 위해서 part 1|2|3 yaml 파일들과 기존 자산 폴더인 `v.7/extension_research/Default_Agent` 폴더를 점검하는 과정에서 몇 가지 문제가 발생한 것으로 드러났다.
|
||||||
|
|
||||||
|
stage_1_2_3_assets_distribution_location.md`의 `§8. 특기사항 (판독 중 확인된 사실)`은 part 1|2|3와 `Default_Agent`의 문제점들을 제시한다. 이 문제점들을 점검하여, 실제 문제가 되는 내용을 식별하고, 그것들을 yaml 수정을 통해 해결할지 아니면 자산폴더에 파일들을 등재/삭제하여 해결할지를 `v.7/extension_research/problems_identified_in_detecting_assets_location.md`에 기록했다.
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<tasks_to_do>
|
||||||
|
`stage_1_2_3_assets_distribution_location.md`의 §8과 `problems_identified_in_detecting_assets_location.md`의 모든 세부 사항을 꼼꼼하게 읽고 분석하여, 두 문서에 제시된 문제점들이 확실히 문제가 되는 것인지 식별하라. 1번 점검 후 sub-agent를 띄워서 1회 더 점검하여 확인한다.
|
||||||
|
|
||||||
|
확인 후, 정말 문제가 되는 것들을 정리하고, 그것들을 yaml 수정이냐, 아니면 Default_Agent 폴더의 자산 파일들을 등재/삭제하여 해결하느냐로 구분하여 `problems_identified_in_detecting_assets_location_v.2.md`로 생성하라.
|
||||||
|
</tasks_to_do>
|
||||||
|
|
||||||
|
<global_constraints>
|
||||||
|
- `v.7/CLAUDE.md`가 제시하는 Fable 5 행동 규칙을 준수한다.
|
||||||
|
- 작업 완료 시 작업 내역을 압축 요약하여 `v.7/MEMORY.md`에 추가 기입한다.
|
||||||
|
</global_constraints>
|
||||||
|
|
||||||
|
==================================
|
||||||
|
|
||||||
|
<only_tasks_to_perform>
|
||||||
|
`problems_identified_in_detecting_assets_location_v.2.md`--`§2. 확정 작업 분류`의 `A. YAML 수정으로 해결`에서 `P2 L893–894 사문 상수 2줄 삭제`, `P2 L28 주석 1줄`
|
||||||
|
`B. Default_Agent 자산 등재/삭제로 해결`에서 `**P1 자산 6종 manifest 등재**`, ``validation_assets/routing/case_kind_domain_matrix.v2.json` 제거` 작업들을 수행한다.
|
||||||
|
</only_tasks_to_perform>
|
||||||
|
|
||||||
|
<method>
|
||||||
|
1. <only_tasks_to_perform>에 기재된 작업을 수행한다.
|
||||||
|
2. 작업 수행 후, sub-agent를 띄워 지시사항을 100% 정확히 준수하여 작업이 진행되었는지 검증한다. 이 검증을 통과할 때까지 작업수행-검증 과정을 반복한다.
|
||||||
|
3. 검증 과정을 완전히 통과했을 때, 수정된 yaml 파일들은 overwrite하여 기존 위치에 저장하고, 기존 yaml들은 outdated 폴더로 옮긴다.
|
||||||
|
4. `B. Default_Agent 자산 등재/삭제로 해결` 작업 수행 결과로 Default_Agent 폴더에 변화가 발생한 내용만을 `stage_1_2_3_assets_distribution_location.md` 동일 파일명으로 overwrite하여 저장하고 기존 파일은`stage_1_2_3_assets_distribution_location_old.md`로 파일명만 바꾸어서 유지한다.
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<global_constraints>
|
||||||
|
- `v.7/CLAUDE.md`가 제시하는 Fable 5 행동 규칙을 준수한다.
|
||||||
|
- 작업 완료 시 작업 내역을 압축 요약하여 `v.7/MEMORY.md`에 추가 기입한다.
|
||||||
|
- MEMORY.md 기입 후 연결된 git repository에 commit한다.
|
||||||
|
</global_constraints>
|
||||||
|
|
||||||
|
==================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -2187,46 +2292,27 @@ MEMORY.md 파일에는 지금까지의 작업 내역들이 압축적으로 요
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--> stage 1 -- part 4 개정 작업 최적 워크플로우 탐구 --> 작업 명세서 작성
|
||||||
|
--> stage 1 -- part 4 개정 --> 남은 작업 check --> 추가작업 명세서 생성 및 작업 수행 --> part 4 개정 마무리
|
||||||
|
|
||||||
|
--> stage 1 -- part 3 개정 작업 최적 워크플로우 탐구 --> 작업 명세서 생성
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--> stage 1 -- part 3 개정 --> 남은 작업 check --> 추가작업 명세서 생성 및 작업 수행 --> part 3 개정 마무리
|
--> stage 1 -- part 3 개정 --> 남은 작업 check --> 추가작업 명세서 생성 및 작업 수행 --> part 3 개정 마무리
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[다음]
|
|
||||||
- stage 1 -- part 2에서 더 개정할 작업이 남아있는가?
|
|
||||||
- if no -> 오늘 stage 1 -- part 2 개정 작업 결과물을 읽어들여서 `stage_1_part_1_and_2_updated_yaml_analysis.md`를 incremental update하여 `stage_1_part_1_and_2_updated_yaml_analysis.md`로 생성 (기존 파일은 `stage_1_part_1_and_2_updated_yaml_analysis_old.md`로 파일명을 바꿔서 outdated 폴더로 이송)
|
|
||||||
- `stage_1_part_1_and_2_updated_yaml_analysis.md` 내용을 기반으로 part 3 최적 개정 방식 탐구
|
|
||||||
- 기존 stage_1_update_strategy.md가 제시한 part 3 개정 작업 내용 및 DAG 형식 참조
|
|
||||||
|
|
||||||
|
|
||||||
Part 3 — 법률효과 구조
|
|
||||||
P3-L0 -> P3-L1 -> P3-L2
|
|
||||||
§4. Part 3 세부 워크플로우
|
|
||||||
- §4.1 P3-L0 구조 seed 축약 [개정]
|
|
||||||
- §4.2 P3-L1 예외 판정
|
|
||||||
- §4.3 P3-L2 최종 색인 기록 [개정]
|
|
||||||
|
|
||||||
최적 개정 작업 전략서 작성
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<global_constraints>
|
||||||
|
- `v.7/CLAUDE.md`가 제시하는 #### 5 행동 규칙을 준수한다.
|
||||||
|
- 작업 완료 시 작업 내역을 압축 요약하여 `v.7/MEMORY.md`에 추가 기입한다.
|
||||||
|
- yaml 작성을 할 때는 <v.7/SKILL.md>의 규칙을 엄격하게 준수하며, python code를 작성할 때는 <v.7/extension_research/test_code_executor.ipynb>가 제시하는 Python code 작성 규칙을 엄수한다.
|
||||||
|
</global_constraints>
|
||||||
|
|
||||||
┌─────────────────────────────┐
|
|
||||||
│ Must Task │
|
|
||||||
└─────────────────────────────┘
|
|
||||||
MEMORY.md에 기록된 {{실측이 리포트와 갈린 곳 · 문서가 처음 기록한 것}}에 제시된 내용을 참조한 리포트는 파일명 마지막에 '_outdated'를 붙여서 남기고, {{실측이 리포트와 갈린 곳 · 문서가 처음 기록한 것}} 내용을 반영하여 기존 리포트에 반영하여 새 리포트를 동일한 파일명으로 생성하라.
|
|
||||||
|
|
||||||
|
|
||||||
=> 리포트에 반영하여, 리포트 개정 요망
|
|
||||||
|
|
||||||
|
|
||||||
==================================
|
==================================
|
||||||
@@ -2259,13 +2345,6 @@ Opus 5에 명시적으로 검증 작업을 시킬 때, 검증 100% 통과할 때
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[2] [1]의 md 문서를 기준으로
|
|
||||||
--> stage 1 -- part 3 개정 작업 최적 워크플로우 탐구 --> 작업 명세서 생성
|
|
||||||
--> stage 1 -- part 3 개정 --> 남은 작업 check --> 추가작업 명세서 생성 및 작업 수행 --> part 3 개정 마무리
|
|
||||||
|
|
||||||
|
|
||||||
[3]
|
[3]
|
||||||
Stage 1 -- part 1, 2, 3 개정 작업 요약
|
Stage 1 -- part 1, 2, 3 개정 작업 요약
|
||||||
기존 stage 1 -- part 1, 2 개정 작업 요약본에 stage 1 -- part 3 개정 작업본을 추가 입력하여 업데이트
|
기존 stage 1 -- part 1, 2 개정 작업 요약본에 stage 1 -- part 3 개정 작업본을 추가 입력하여 업데이트
|
||||||
@@ -2287,42 +2366,6 @@ Stage 1 -- part 1, 2, 3 개정 작업 요약
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Part 2 작업 검증
|
Part 2 작업 검증
|
||||||
Part 3 개정 작업 리서치
|
Part 3 개정 작업 리서치
|
||||||
Part 3 개정 yaml 작성
|
Part 3 개정 yaml 작성
|
||||||
@@ -2332,6 +2375,13 @@ Part 4 개정 yaml 작성
|
|||||||
--> 안종선이 step by step으로 실행하고, 결과물을 내가 체크하여 수정, 추후 다시 실행
|
--> 안종선이 step by step으로 실행하고, 결과물을 내가 체크하여 수정, 추후 다시 실행
|
||||||
--> stage 1 4개 yaml 파일들이 문제없이 실행되도록 완료
|
--> stage 1 4개 yaml 파일들이 문제없이 실행되도록 완료
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
┌────────────────────────────────────────────┐
|
||||||
|
│ Sketch of How to Update Stage 2 │
|
||||||
|
└────────────────────────────────────────────┘
|
||||||
|
|
||||||
[Stage 1 작업 내역들 + DAG + stage 2 작업 목표 + 기존 stage 2 yaml] 종합하여 stage 2 최적 워크플로우 탐구
|
[Stage 1 작업 내역들 + DAG + stage 2 작업 목표 + 기존 stage 2 yaml] 종합하여 stage 2 최적 워크플로우 탐구
|
||||||
-->
|
-->
|
||||||
큰 덩어리:
|
큰 덩어리:
|
||||||
@@ -2357,10 +2407,14 @@ Part 4 개정 yaml 작성
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
`stage_1_part_2_optimal_update_strategy.md`를 수행한다.
|
|
||||||
|
|
||||||
|
|
||||||
==========================================================================
|
==========================================================================
|
||||||
|
┌────────────────────────────────────────────┐
|
||||||
|
│ Structure of Prompt │
|
||||||
|
└────────────────────────────────────────────┘
|
||||||
|
|
||||||
<goal>
|
<goal>
|
||||||
|
|
||||||
</goal>
|
</goal>
|
||||||
@@ -2408,98 +2462,6 @@ Part 4 개정 yaml 작성
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
[질문]
|
|
||||||
1. `registry_component_ids`를 `evidence_indexed` 내부의 항목으로 표현되도록 `evidence_indexed` json schema에 포함시키면 되나?
|
|
||||||
만일 답이 '예'라면, 'part_2_update_addition.md'의 "§1. `registry_component_ids`는 파일이 아니다"에 제시된 내용을 반영하여 작업을 실행하면 `registry_component_ids`를 `evidence_indexed` 내부의 항목으로 표현되게 하는가?
|
|
||||||
|
|
||||||
2. `evidence_indexed`를 검증하는 json schema가 반드시 필요한가? 예, 아니오로 답하고 이유를 한 문단 이내로 설명하라.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
조건
|
|
||||||
Stage 1 part 1 단일 yaml 파일 생성
|
|
||||||
DAG 표현 정확히 기입
|
|
||||||
Python code 표현 정확히
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
케이무크 작업 실행 계획 세우기
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
4 + 2 + 3 + 0.5 = 9.5
|
|
||||||
1 + 1 + 0.5 + 0.5 = 3
|
|
||||||
|
|
||||||
12.5 1억 2천 5백
|
|
||||||
총 2억 모음 --> tips 진행
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user