feat(hitl): Stage 1 display input contract check and variable list (v1 r3-r4)
- stage_1_display_v1.py: CONTRACT (required/optional/known keys, schema refs); stop with file and path on a required-key violation; show keys outside the contract in the detail panel and a review card; --check-contract and --print-contract; evidence amounts reformat only plain won amounts; header docstring matches 5 screens and 12 inputs. - Manual: r4 behaviour, §5.3 contract check, new options, corrected key table. - stage_1_contract_variables.md / stage_1_decisions.json: --print-contract output and its JSON form. - 결과물_변수_리스트_Stage_1_v1.md: per-file variable tables of the 12 Stage 1 outputs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+182
@@ -0,0 +1,182 @@
|
||||
| 파일 | 이름 | 구분 | 변수(키 경로) | 조건·꼴 | 스키마 |
|
||||
|---|---|---|---|---|---|
|
||||
| `client_goal.json` | 의뢰인 목표 | 필수 | `parties.plaintiffs[].name` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 필수 | `parties.defendants[].name` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 필수 | `parties.third_parties[].name` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 필수 | `issue_clusters[].cluster_id` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `primary_goal` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `constraints` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `constraints[]` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `key_facts` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `key_facts[]` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `parties` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `parties.plaintiffs` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `parties.plaintiffs[]` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `parties.defendants` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `parties.defendants[]` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `parties.defendants[].asset_status` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `parties.third_parties` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `parties.third_parties[]` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `parties.third_parties[].relationship` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `aliases` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `aliases.<이름>` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `aliases.<이름>[]` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[]` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].cluster_label` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].candidate_plaintiffs` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].candidate_plaintiffs[]` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].candidate_defendants_or_counterparties` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].candidate_defendants_or_counterparties[]` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].client_requested_relief` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].client_requested_relief[]` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].desired_relief_keywords` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].desired_relief_keywords[]` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].legal_sustainability_watchpoints` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].legal_sustainability_watchpoints[]` | | |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.slot_status` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.slot_status[]` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.slot_status[].slot_id` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.slot_status[].slot_kind` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.slot_status[].status` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.slot_status[].note` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.evidence_component_status` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.evidence_component_status[]` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.evidence_component_status[].component_id` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.evidence_component_status[].status` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.evidence_component_status[].note` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.defense_signal_status` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.defense_signal_status[]` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.defense_signal_status[].defense_id` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.defense_signal_status[].raised_by` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.defense_signal_status[].status` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.defense_signal_status[].note` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.calculation_readiness` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.calculation_readiness[]` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.calculation_readiness[].need_basis` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.calculation_readiness[].operand_gaps` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.calculation_readiness[].operand_gaps[]` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.calculation_readiness[].operand_gaps[].operand_label` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.review_items` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.review_items[]` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.review_items[].review_code` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.review_items[].reason` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `client_goal.json` | 의뢰인 목표 | 선택 | `issue_clusters[].domain_profiles.<영역>.review_items[].note` | | platform/schemas/client_goal_domain_profiles.schema.json |
|
||||
| `evidence_indexed.json` | 증거 목록 | 필수 | `items` | | |
|
||||
| `evidence_indexed.json` | 증거 목록 | 필수 | `items[].evidence_index` | | |
|
||||
| `evidence_indexed.json` | 증거 목록 | 선택 | `items[]` | | |
|
||||
| `evidence_indexed.json` | 증거 목록 | 선택 | `items[].title` | | |
|
||||
| `evidence_indexed.json` | 증거 목록 | 선택 | `items[].doc_type` | | |
|
||||
| `evidence_indexed.json` | 증거 목록 | 선택 | `items[].key_facts` | | |
|
||||
| `evidence_indexed.json` | 증거 목록 | 선택 | `items[].key_facts[]` | | |
|
||||
| `evidence_indexed.json` | 증거 목록 | 선택 | `items[].key_dates` | | |
|
||||
| `evidence_indexed.json` | 증거 목록 | 선택 | `items[].key_dates[]` | | |
|
||||
| `evidence_indexed.json` | 증거 목록 | 선택 | `items[].key_amounts` | | |
|
||||
| `evidence_indexed.json` | 증거 목록 | 선택 | `items[].key_amounts[]` | | |
|
||||
| `evidence_indexed.json` | 증거 목록 | 선택 | `items[].key_parties` | | |
|
||||
| `evidence_indexed.json` | 증거 목록 | 선택 | `items[].key_parties[]` | | |
|
||||
| `value_facts.json` | 값 항목 | 선택 | `records` | | |
|
||||
| `value_facts.json` | 값 항목 | 선택 | `records[]` | | |
|
||||
| `value_facts.json` | 값 항목 | 선택 | `records[].value_id` | | |
|
||||
| `value_facts.json` | 값 항목 | 선택 | `records[].item_label` | | |
|
||||
| `value_facts.json` | 값 항목 | 선택 | `records[].amount_text` | | |
|
||||
| `value_facts.json` | 값 항목 | 선택 | `records[].amount_value` | | |
|
||||
| `value_facts.json` | 값 항목 | 선택 | `records[].value_type` | | |
|
||||
| `value_facts.json` | 값 항목 | 선택 | `records[].dates` | | |
|
||||
| `value_facts.json` | 값 항목 | 선택 | `records[].dates[]` | | |
|
||||
| `value_facts.json` | 값 항목 | 선택 | `records[].dates[].date_value` | | |
|
||||
| `value_facts.json` | 값 항목 | 선택 | `records[].source_ref` | | |
|
||||
| `value_facts.json` | 값 항목 | 선택 | `records[].source_ref.evidence_index` | | |
|
||||
| `value_facts_party_links.json` | 값·당사자 연결 | 필수 | `links[].value_id` | 당사자 이름이 있는 연결에서만 | |
|
||||
| `value_facts_party_links.json` | 값·당사자 연결 | 선택 | `links` | | |
|
||||
| `value_facts_party_links.json` | 값·당사자 연결 | 선택 | `links[]` | | |
|
||||
| `value_facts_party_links.json` | 값·당사자 연결 | 선택 | `links[].party_ref` | | |
|
||||
| `value_facts_party_links.json` | 값·당사자 연결 | 선택 | `links[].party_label` | | |
|
||||
| `value_facts_party_links.json` | 값·당사자 연결 | 선택 | `links[].status` | | |
|
||||
| `routing/party_aliases.json` | 당사자 표기 | 필수 | `alias_candidates[].canonical` | | |
|
||||
| `routing/party_aliases.json` | 당사자 표기 | 필수 | `alias_candidates[].variant` | | |
|
||||
| `routing/party_aliases.json` | 당사자 표기 | 선택 | `alias_candidates` | | |
|
||||
| `routing/party_aliases.json` | 당사자 표기 | 선택 | `alias_candidates[]` | | |
|
||||
| `routing/party_aliases.json` | 당사자 표기 | 선택 | `aliases` | | |
|
||||
| `routing/party_aliases.json` | 당사자 표기 | 선택 | `aliases.<이름>` | | |
|
||||
| `routing/party_aliases.json` | 당사자 표기 | 선택 | `canonical_parties` | | |
|
||||
| `routing/party_aliases.json` | 당사자 표기 | 선택 | `canonical_parties[]` | | |
|
||||
| `routing/party_aliases.json` | 당사자 표기 | 선택 | `succession_candidates` | | |
|
||||
| `routing/party_aliases.json` | 당사자 표기 | 선택 | `succession_candidates[]` | | |
|
||||
| `routing/party_aliases.json` | 당사자 표기 | 선택 | `succession_candidates[].deceased` | | |
|
||||
| `routing/party_aliases.json` | 당사자 표기 | 선택 | `succession_candidates[].renouncers` | | |
|
||||
| `routing/party_aliases.json` | 당사자 표기 | 선택 | `succession_candidates[].renouncers[]` | | |
|
||||
| `quality_gates/stage1_part1_soft_gate_handoff.json` | 1부 검토 넘김 | 선택 | `review_items` | | |
|
||||
| `quality_gates/stage1_part1_soft_gate_handoff.json` | 1부 검토 넘김 | 선택 | `review_items[]` | | |
|
||||
| `quality_gates/stage1_part1_soft_gate_handoff.json` | 1부 검토 넘김 | 선택 | `review_items[].review_code` | | |
|
||||
| `quality_gates/stage1_part1_soft_gate_handoff.json` | 1부 검토 넘김 | 선택 | `review_items[].source_check` | | |
|
||||
| `quality_gates/stage1_part1_soft_gate_handoff.json` | 1부 검토 넘김 | 선택 | `review_items[].severity` | | |
|
||||
| `quality_gates/stage1_part1_soft_gate_handoff.json` | 1부 검토 넘김 | 선택 | `review_items[].review_instruction` | | |
|
||||
| `quality_gates/stage1_part1_soft_gate_handoff.json` | 1부 검토 넘김 | 선택 | `review_items[].concise_basis` | | |
|
||||
| `quality_gates/stage1_part1_soft_gate_handoff.json` | 1부 검토 넘김 | 선택 | `review_items[].source_refs` | | |
|
||||
| `quality_gates/stage1_part1_soft_gate_handoff.json` | 1부 검토 넘김 | 선택 | `review_items[].source_refs.evidence_indexes` | | |
|
||||
| `quality_gates/stage1_part1_soft_gate_handoff.json` | 1부 검토 넘김 | 선택 | `review_items[].source_refs.evidence_indexes[]` | | |
|
||||
| `quality_gates/stage1_part1_soft_gate_handoff.json` | 1부 검토 넘김 | 선택 | `review_items[].issue_type` | | |
|
||||
| `BO.json` | 원 기록 | 필수 | `[].BO_ID` | | |
|
||||
| `BO.json` | 원 기록 | 선택 | `[]` | | |
|
||||
| `BO.json` | 원 기록 | 선택 | `[].ActionType` | | |
|
||||
| `BO.json` | 원 기록 | 선택 | `[].JuristicAct` | | |
|
||||
| `BO.json` | 원 기록 | 선택 | `[].JuristicAct.label` | | |
|
||||
| `BO.json` | 원 기록 | 선택 | `[].Action` | | |
|
||||
| `BO.json` | 원 기록 | 선택 | `[].core_field_base` | | |
|
||||
| `BO.json` | 원 기록 | 선택 | `[].core_field_base.TimeText` | | |
|
||||
| `BO.json` | 원 기록 | 선택 | `[].core_field_base.BehaviorTime` | | |
|
||||
| `BO.json` | 원 기록 | 선택 | `[].amount` | | |
|
||||
| `BO.json` | 원 기록 | 선택 | `[].amount.value_text` | | |
|
||||
| `BO.json` | 원 기록 | 선택 | `[].amount.numeric_value` | | |
|
||||
| `BO.json` | 원 기록 | 선택 | `[].value_refs` | | |
|
||||
| `BO.json` | 원 기록 | 선택 | `[].value_refs[]` | | |
|
||||
| `quality_gates/stage1_part2_review_handoff.json` | 2부 검토 넘김 | 선택 | `review_items` | | |
|
||||
| `quality_gates/stage1_part2_review_handoff.json` | 2부 검토 넘김 | 선택 | `review_items[]` | | |
|
||||
| `quality_gates/stage1_part2_review_handoff.json` | 2부 검토 넘김 | 선택 | `review_items[].source_review_code` | | |
|
||||
| `quality_gates/stage1_part2_review_handoff.json` | 2부 검토 넘김 | 선택 | `review_items[].template_note` | | |
|
||||
| `quality_gates/stage1_part2_review_handoff.json` | 2부 검토 넘김 | 선택 | `review_items[].source_domain` | | |
|
||||
| `quality_gates/stage1_part2_review_handoff.json` | 2부 검토 넘김 | 선택 | `review_items[].source_evidence_indexes` | | |
|
||||
| `quality_gates/stage1_part2_review_handoff.json` | 2부 검토 넘김 | 선택 | `review_items[].source_evidence_indexes[]` | | |
|
||||
| `quality_gates/stage1_part2_review_handoff.json` | 2부 검토 넘김 | 선택 | `review_items[].issue_type` | | |
|
||||
| `legal_effect_structures.json` | 법적 효과 구조 | 선택 | `structure_records` | | platform/schemas/legal_effect_structures.schema.json |
|
||||
| `legal_effect_structures.json` | 법적 효과 구조 | 선택 | `structure_records[]` | | platform/schemas/legal_effect_structures.schema.json |
|
||||
| `legal_effect_structures.json` | 법적 효과 구조 | 선택 | `structure_records[].domain_id` | | platform/schemas/legal_effect_structures.schema.json |
|
||||
| `legal_effect_structures.json` | 법적 효과 구조 | 선택 | `structure_records[].source_bo_ids` | | platform/schemas/legal_effect_structures.schema.json |
|
||||
| `legal_effect_structures.json` | 법적 효과 구조 | 선택 | `structure_records[].source_bo_ids[]` | | platform/schemas/legal_effect_structures.schema.json |
|
||||
| `quality_gates/stage1_part3_review_handoff.json` | 3부 검토 넘김 | 선택 | `review_items` | | |
|
||||
| `quality_gates/stage1_part3_review_handoff.json` | 3부 검토 넘김 | 선택 | `review_items[]` | | |
|
||||
| `quality_gates/stage1_part3_review_handoff.json` | 3부 검토 넘김 | 선택 | `review_items[].review_code` | | |
|
||||
| `quality_gates/stage1_part3_review_handoff.json` | 3부 검토 넘김 | 선택 | `review_items[].bo_id` | | |
|
||||
| `quality_gates/stage1_part3_review_handoff.json` | 3부 검토 넘김 | 선택 | `review_items[].domain_id` | | |
|
||||
| `quality_gates/stage1_part3_review_handoff.json` | 3부 검토 넘김 | 선택 | `review_items[].issue_type` | | |
|
||||
| `Fact_Ledger_base.json` | 사실 원장 | 필수 | `[].fact_id` | 사실 번호는 '접두어-숫자' 꼴이어야 한다(예: F-001) | platform/schemas/fact_ledger_base.schema.json |
|
||||
| `Fact_Ledger_base.json` | 사실 원장 | 필수 | `[].source_bo_id` | | platform/schemas/fact_ledger_base.schema.json |
|
||||
| `Fact_Ledger_base.json` | 사실 원장 | 필수 | `[].parties[].value` | | platform/schemas/fact_ledger_base.schema.json |
|
||||
| `Fact_Ledger_base.json` | 사실 원장 | 선택 | `[]` | | platform/schemas/fact_ledger_base.schema.json |
|
||||
| `Fact_Ledger_base.json` | 사실 원장 | 선택 | `[].parties` | | platform/schemas/fact_ledger_base.schema.json |
|
||||
| `Fact_Ledger_base.json` | 사실 원장 | 선택 | `[].parties[]` | | platform/schemas/fact_ledger_base.schema.json |
|
||||
| `Fact_Ledger_base.json` | 사실 원장 | 선택 | `[].date` | | platform/schemas/fact_ledger_base.schema.json |
|
||||
| `Fact_Ledger_base.json` | 사실 원장 | 선택 | `[].action` | | platform/schemas/fact_ledger_base.schema.json |
|
||||
| `Fact_Ledger_base.json` | 사실 원장 | 선택 | `[].derived_fact` | | platform/schemas/fact_ledger_base.schema.json |
|
||||
| `Fact_Ledger_base.json` | 사실 원장 | 선택 | `[].evidence_refs` | | platform/schemas/fact_ledger_base.schema.json |
|
||||
| `Fact_Ledger_base.json` | 사실 원장 | 선택 | `[].evidence_refs[]` | | platform/schemas/fact_ledger_base.schema.json |
|
||||
| `Fact_Ledger_base.json` | 사실 원장 | 선택 | `[].proof_strength` | | platform/schemas/fact_ledger_base.schema.json |
|
||||
| `Fact_Ledger_base.json` | 사실 원장 | 선택 | `[].domain_effects` | | platform/schemas/fact_ledger_base.schema.json |
|
||||
| `Fact_Ledger_base.json` | 사실 원장 | 선택 | `[].domain_effects.<영역>` | | platform/schemas/fact_ledger_base.schema.json |
|
||||
| `Fact_Ledger_base.json` | 사실 원장 | 선택 | `[].domain_effects.<영역>.module` | | platform/schemas/fact_ledger_base.schema.json |
|
||||
| `Fact_Ledger_base.json` | 사실 원장 | 선택 | `[].domain_effects.<영역>.module[]` | | platform/schemas/fact_ledger_base.schema.json |
|
||||
| `Fact_Ledger_base.json` | 사실 원장 | 선택 | `[].calculation_requests` | | platform/schemas/fact_ledger_base.schema.json |
|
||||
| `Fact_Ledger_base.json` | 사실 원장 | 선택 | `[].amount` | | platform/schemas/fact_ledger_base.schema.json |
|
||||
| `quality_gates/stage1_part4_review_handoff.json` | 4부 검토 넘김 | 필수 | `review_items[].review_code` | fact_id가 있는 항목에서만 | |
|
||||
| `quality_gates/stage1_part4_review_handoff.json` | 4부 검토 넘김 | 선택 | `review_items` | | |
|
||||
| `quality_gates/stage1_part4_review_handoff.json` | 4부 검토 넘김 | 선택 | `review_items[]` | | |
|
||||
| `quality_gates/stage1_part4_review_handoff.json` | 4부 검토 넘김 | 선택 | `review_items[].fact_id` | | |
|
||||
| `quality_gates/stage1_part4_review_handoff.json` | 4부 검토 넘김 | 선택 | `review_items[].domain_id` | | |
|
||||
| `quality_gates/stage1_part4_review_handoff.json` | 4부 검토 넘김 | 선택 | `review_items[].blocks_final_drafting` | | |
|
||||
| `quality_gates/stage1_part4_review_handoff.json` | 4부 검토 넘김 | 선택 | `review_items[].detail` | | |
|
||||
| `quality_gates/stage1_part4_review_handoff.json` | 4부 검토 넘김 | 선택 | `review_items[].issue_type` | | |
|
||||
|
||||
파일 12개 · 필수 14 · 선택 164
|
||||
+687
@@ -0,0 +1,687 @@
|
||||
{
|
||||
"description": "stage_1_display_v1.py 가 Stage 1 HTML을 만들 때 읽는 변수 목록(입력 계약 CONTRACT). --print-contract 출력(마크다운 표)을 변환한 것.",
|
||||
"source": "python3 -I stage_1_display_v1.py --print-contract",
|
||||
"generator_version": "v1 r4",
|
||||
"generated": "2026-11-23",
|
||||
"path_notation": "a.b = 객체 안 키, a[] = 배열 원소, <영역> = 영역 ID 키. part3·part4 handoff 는 감싼 객체를 벗긴 뒤의 경로.",
|
||||
"kinds": {
|
||||
"required": "없으면 생성 전에 멈춘다(condition 이 있으면 그 원소에서만 검사)",
|
||||
"optional": "없으면 그 표시만 빠진다"
|
||||
},
|
||||
"counts": {
|
||||
"files": 12,
|
||||
"required": 14,
|
||||
"optional": 164
|
||||
},
|
||||
"files": {
|
||||
"client_goal.json": {
|
||||
"label": "의뢰인 목표",
|
||||
"required": [
|
||||
{
|
||||
"path": "parties.plaintiffs[].name"
|
||||
},
|
||||
{
|
||||
"path": "parties.defendants[].name"
|
||||
},
|
||||
{
|
||||
"path": "parties.third_parties[].name"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].cluster_id"
|
||||
}
|
||||
],
|
||||
"optional": [
|
||||
{
|
||||
"path": "primary_goal"
|
||||
},
|
||||
{
|
||||
"path": "constraints"
|
||||
},
|
||||
{
|
||||
"path": "constraints[]"
|
||||
},
|
||||
{
|
||||
"path": "key_facts"
|
||||
},
|
||||
{
|
||||
"path": "key_facts[]"
|
||||
},
|
||||
{
|
||||
"path": "parties"
|
||||
},
|
||||
{
|
||||
"path": "parties.plaintiffs"
|
||||
},
|
||||
{
|
||||
"path": "parties.plaintiffs[]"
|
||||
},
|
||||
{
|
||||
"path": "parties.defendants"
|
||||
},
|
||||
{
|
||||
"path": "parties.defendants[]"
|
||||
},
|
||||
{
|
||||
"path": "parties.defendants[].asset_status"
|
||||
},
|
||||
{
|
||||
"path": "parties.third_parties"
|
||||
},
|
||||
{
|
||||
"path": "parties.third_parties[]"
|
||||
},
|
||||
{
|
||||
"path": "parties.third_parties[].relationship"
|
||||
},
|
||||
{
|
||||
"path": "aliases"
|
||||
},
|
||||
{
|
||||
"path": "aliases.<이름>"
|
||||
},
|
||||
{
|
||||
"path": "aliases.<이름>[]"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[]"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].cluster_label"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].candidate_plaintiffs"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].candidate_plaintiffs[]"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].candidate_defendants_or_counterparties"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].candidate_defendants_or_counterparties[]"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].client_requested_relief"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].client_requested_relief[]"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].desired_relief_keywords"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].desired_relief_keywords[]"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].legal_sustainability_watchpoints"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].legal_sustainability_watchpoints[]"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.slot_status",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.slot_status[]",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.slot_status[].slot_id",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.slot_status[].slot_kind",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.slot_status[].status",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.slot_status[].note",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.evidence_component_status",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.evidence_component_status[]",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.evidence_component_status[].component_id",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.evidence_component_status[].status",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.evidence_component_status[].note",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.defense_signal_status",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.defense_signal_status[]",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.defense_signal_status[].defense_id",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.defense_signal_status[].raised_by",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.defense_signal_status[].status",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.defense_signal_status[].note",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.calculation_readiness",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.calculation_readiness[]",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.calculation_readiness[].need_basis",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.calculation_readiness[].operand_gaps",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.calculation_readiness[].operand_gaps[]",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.calculation_readiness[].operand_gaps[].operand_label",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.review_items",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.review_items[]",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.review_items[].review_code",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.review_items[].reason",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "issue_clusters[].domain_profiles.<영역>.review_items[].note",
|
||||
"schema": "platform/schemas/client_goal_domain_profiles.schema.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
"evidence_indexed.json": {
|
||||
"label": "증거 목록",
|
||||
"required": [
|
||||
{
|
||||
"path": "items"
|
||||
},
|
||||
{
|
||||
"path": "items[].evidence_index"
|
||||
}
|
||||
],
|
||||
"optional": [
|
||||
{
|
||||
"path": "items[]"
|
||||
},
|
||||
{
|
||||
"path": "items[].title"
|
||||
},
|
||||
{
|
||||
"path": "items[].doc_type"
|
||||
},
|
||||
{
|
||||
"path": "items[].key_facts"
|
||||
},
|
||||
{
|
||||
"path": "items[].key_facts[]"
|
||||
},
|
||||
{
|
||||
"path": "items[].key_dates"
|
||||
},
|
||||
{
|
||||
"path": "items[].key_dates[]"
|
||||
},
|
||||
{
|
||||
"path": "items[].key_amounts"
|
||||
},
|
||||
{
|
||||
"path": "items[].key_amounts[]"
|
||||
},
|
||||
{
|
||||
"path": "items[].key_parties"
|
||||
},
|
||||
{
|
||||
"path": "items[].key_parties[]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"value_facts.json": {
|
||||
"label": "값 항목",
|
||||
"required": [],
|
||||
"optional": [
|
||||
{
|
||||
"path": "records"
|
||||
},
|
||||
{
|
||||
"path": "records[]"
|
||||
},
|
||||
{
|
||||
"path": "records[].value_id"
|
||||
},
|
||||
{
|
||||
"path": "records[].item_label"
|
||||
},
|
||||
{
|
||||
"path": "records[].amount_text"
|
||||
},
|
||||
{
|
||||
"path": "records[].amount_value"
|
||||
},
|
||||
{
|
||||
"path": "records[].value_type"
|
||||
},
|
||||
{
|
||||
"path": "records[].dates"
|
||||
},
|
||||
{
|
||||
"path": "records[].dates[]"
|
||||
},
|
||||
{
|
||||
"path": "records[].dates[].date_value"
|
||||
},
|
||||
{
|
||||
"path": "records[].source_ref"
|
||||
},
|
||||
{
|
||||
"path": "records[].source_ref.evidence_index"
|
||||
}
|
||||
]
|
||||
},
|
||||
"value_facts_party_links.json": {
|
||||
"label": "값·당사자 연결",
|
||||
"required": [
|
||||
{
|
||||
"path": "links[].value_id",
|
||||
"condition": "당사자 이름이 있는 연결에서만"
|
||||
}
|
||||
],
|
||||
"optional": [
|
||||
{
|
||||
"path": "links"
|
||||
},
|
||||
{
|
||||
"path": "links[]"
|
||||
},
|
||||
{
|
||||
"path": "links[].party_ref"
|
||||
},
|
||||
{
|
||||
"path": "links[].party_label"
|
||||
},
|
||||
{
|
||||
"path": "links[].status"
|
||||
}
|
||||
]
|
||||
},
|
||||
"routing/party_aliases.json": {
|
||||
"label": "당사자 표기",
|
||||
"required": [
|
||||
{
|
||||
"path": "alias_candidates[].canonical"
|
||||
},
|
||||
{
|
||||
"path": "alias_candidates[].variant"
|
||||
}
|
||||
],
|
||||
"optional": [
|
||||
{
|
||||
"path": "alias_candidates"
|
||||
},
|
||||
{
|
||||
"path": "alias_candidates[]"
|
||||
},
|
||||
{
|
||||
"path": "aliases"
|
||||
},
|
||||
{
|
||||
"path": "aliases.<이름>"
|
||||
},
|
||||
{
|
||||
"path": "canonical_parties"
|
||||
},
|
||||
{
|
||||
"path": "canonical_parties[]"
|
||||
},
|
||||
{
|
||||
"path": "succession_candidates"
|
||||
},
|
||||
{
|
||||
"path": "succession_candidates[]"
|
||||
},
|
||||
{
|
||||
"path": "succession_candidates[].deceased"
|
||||
},
|
||||
{
|
||||
"path": "succession_candidates[].renouncers"
|
||||
},
|
||||
{
|
||||
"path": "succession_candidates[].renouncers[]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"quality_gates/stage1_part1_soft_gate_handoff.json": {
|
||||
"label": "1부 검토 넘김",
|
||||
"required": [],
|
||||
"optional": [
|
||||
{
|
||||
"path": "review_items"
|
||||
},
|
||||
{
|
||||
"path": "review_items[]"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].review_code"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].source_check"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].severity"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].review_instruction"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].concise_basis"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].source_refs"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].source_refs.evidence_indexes"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].source_refs.evidence_indexes[]"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].issue_type"
|
||||
}
|
||||
]
|
||||
},
|
||||
"BO.json": {
|
||||
"label": "원 기록",
|
||||
"required": [
|
||||
{
|
||||
"path": "[].BO_ID"
|
||||
}
|
||||
],
|
||||
"optional": [
|
||||
{
|
||||
"path": "[]"
|
||||
},
|
||||
{
|
||||
"path": "[].ActionType"
|
||||
},
|
||||
{
|
||||
"path": "[].JuristicAct"
|
||||
},
|
||||
{
|
||||
"path": "[].JuristicAct.label"
|
||||
},
|
||||
{
|
||||
"path": "[].Action"
|
||||
},
|
||||
{
|
||||
"path": "[].core_field_base"
|
||||
},
|
||||
{
|
||||
"path": "[].core_field_base.TimeText"
|
||||
},
|
||||
{
|
||||
"path": "[].core_field_base.BehaviorTime"
|
||||
},
|
||||
{
|
||||
"path": "[].amount"
|
||||
},
|
||||
{
|
||||
"path": "[].amount.value_text"
|
||||
},
|
||||
{
|
||||
"path": "[].amount.numeric_value"
|
||||
},
|
||||
{
|
||||
"path": "[].value_refs"
|
||||
},
|
||||
{
|
||||
"path": "[].value_refs[]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"quality_gates/stage1_part2_review_handoff.json": {
|
||||
"label": "2부 검토 넘김",
|
||||
"required": [],
|
||||
"optional": [
|
||||
{
|
||||
"path": "review_items"
|
||||
},
|
||||
{
|
||||
"path": "review_items[]"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].source_review_code"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].template_note"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].source_domain"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].source_evidence_indexes"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].source_evidence_indexes[]"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].issue_type"
|
||||
}
|
||||
]
|
||||
},
|
||||
"legal_effect_structures.json": {
|
||||
"label": "법적 효과 구조",
|
||||
"required": [],
|
||||
"optional": [
|
||||
{
|
||||
"path": "structure_records",
|
||||
"schema": "platform/schemas/legal_effect_structures.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "structure_records[]",
|
||||
"schema": "platform/schemas/legal_effect_structures.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "structure_records[].domain_id",
|
||||
"schema": "platform/schemas/legal_effect_structures.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "structure_records[].source_bo_ids",
|
||||
"schema": "platform/schemas/legal_effect_structures.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "structure_records[].source_bo_ids[]",
|
||||
"schema": "platform/schemas/legal_effect_structures.schema.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
"quality_gates/stage1_part3_review_handoff.json": {
|
||||
"label": "3부 검토 넘김",
|
||||
"required": [],
|
||||
"optional": [
|
||||
{
|
||||
"path": "review_items"
|
||||
},
|
||||
{
|
||||
"path": "review_items[]"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].review_code"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].bo_id"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].domain_id"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].issue_type"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Fact_Ledger_base.json": {
|
||||
"label": "사실 원장",
|
||||
"required": [
|
||||
{
|
||||
"path": "[].fact_id",
|
||||
"condition": "사실 번호는 '접두어-숫자' 꼴이어야 한다(예: F-001)",
|
||||
"schema": "platform/schemas/fact_ledger_base.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "[].source_bo_id",
|
||||
"schema": "platform/schemas/fact_ledger_base.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "[].parties[].value",
|
||||
"schema": "platform/schemas/fact_ledger_base.schema.json"
|
||||
}
|
||||
],
|
||||
"optional": [
|
||||
{
|
||||
"path": "[]",
|
||||
"schema": "platform/schemas/fact_ledger_base.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "[].parties",
|
||||
"schema": "platform/schemas/fact_ledger_base.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "[].parties[]",
|
||||
"schema": "platform/schemas/fact_ledger_base.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "[].date",
|
||||
"schema": "platform/schemas/fact_ledger_base.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "[].action",
|
||||
"schema": "platform/schemas/fact_ledger_base.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "[].derived_fact",
|
||||
"schema": "platform/schemas/fact_ledger_base.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "[].evidence_refs",
|
||||
"schema": "platform/schemas/fact_ledger_base.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "[].evidence_refs[]",
|
||||
"schema": "platform/schemas/fact_ledger_base.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "[].proof_strength",
|
||||
"schema": "platform/schemas/fact_ledger_base.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "[].domain_effects",
|
||||
"schema": "platform/schemas/fact_ledger_base.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "[].domain_effects.<영역>",
|
||||
"schema": "platform/schemas/fact_ledger_base.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "[].domain_effects.<영역>.module",
|
||||
"schema": "platform/schemas/fact_ledger_base.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "[].domain_effects.<영역>.module[]",
|
||||
"schema": "platform/schemas/fact_ledger_base.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "[].calculation_requests",
|
||||
"schema": "platform/schemas/fact_ledger_base.schema.json"
|
||||
},
|
||||
{
|
||||
"path": "[].amount",
|
||||
"schema": "platform/schemas/fact_ledger_base.schema.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
"quality_gates/stage1_part4_review_handoff.json": {
|
||||
"label": "4부 검토 넘김",
|
||||
"required": [
|
||||
{
|
||||
"path": "review_items[].review_code",
|
||||
"condition": "fact_id가 있는 항목에서만"
|
||||
}
|
||||
],
|
||||
"optional": [
|
||||
{
|
||||
"path": "review_items"
|
||||
},
|
||||
{
|
||||
"path": "review_items[]"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].fact_id"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].domain_id"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].blocks_final_drafting"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].detail"
|
||||
},
|
||||
{
|
||||
"path": "review_items[].issue_type"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
+270
-9
@@ -5,18 +5,24 @@ LLM 을 부르지 않는다. 입력 JSON 을 읽어 정해진 규칙(어휘표·
|
||||
|
||||
입력 (기본값: 이 파일 옆 inputs_v1/)
|
||||
client_goal.json, BO.json, Fact_Ledger_base.json, legal_effect_structures.json,
|
||||
evidence_indexed.json, quality_gates/stage1_part{1..4}_*handoff.json
|
||||
evidence_indexed.json, quality_gates/stage1_part{1..4}_*handoff.json,
|
||||
routing/party_aliases.json, value_facts.json, value_facts_party_links.json (12개 모두 필수, 하나라도 없으면 시작 전에 멈춘다)
|
||||
레지스트리 (기본값: Stage 1 배포 원본 Default_Agent/domains)
|
||||
영역 이름(label_ko), 요건·반대사실·증거 슬롯 이름(label), 항변 지도(defense_map)
|
||||
|
||||
화면 4개
|
||||
1 보고 요약 2 사건 시간표 3 요건 충족도 4 결정 요청
|
||||
화면 5개
|
||||
1 보고 요약 2 당사자 관계도 3 사건 시간표 4 요건 충족도 5 결정 요청
|
||||
모든 사실·증거는 오른쪽 상세 패널(사실 → 원 기록 → 증거 요지)로 연다.
|
||||
|
||||
사용
|
||||
python3 -I stage_1_display_v1.py [--inputs DIR] [--registry DIR] [--out FILE]
|
||||
|
||||
변경 기록
|
||||
v1 r4 (2026-11-23) 입력 계약 CONTRACT(필수·선택·이미 아는 키, 스키마 근거)를 두고 시작 전에 검사한다. 필수 키를 어기면
|
||||
파일·위치를 밝혀 멈추고, 계약 밖 키는 멈추지 않고 상세 패널 '원 자료'와 검토 메모로 알린다. --check-contract 추가.
|
||||
--print-contract 추가(변수 목록을 마크다운 표로 출력, 입력·레지스트리 불필요).
|
||||
v1 r3 (2026-11-23) 머리 주석을 실제(화면 5개·입력 12개)에 맞춤, 입력 누락을 시작 전에 알림,
|
||||
증거 요지 금액은 '원'으로 끝나는 숫자 금액만 통일 표기(면적·이율·지분은 원문, '억·만' 표기는 그대로).
|
||||
v1 r2 (2026-11-22, 독립검증 15건 반영) 결정 카드 질문형·금액 고르기·묶음 처리, 사실 문장 어미 치환,
|
||||
원 기록 층 중복 생략, 금액 표기 통일, 쟁점 색 재배정, 연도 바로가기, 접근성(대화상자·탭 화살표).
|
||||
"""
|
||||
@@ -247,6 +253,15 @@ def fmt_value(text, value, vtype=None):
|
||||
return fmt_won(value) or t
|
||||
|
||||
|
||||
def ev_amount(x):
|
||||
"""증거 요지 금액. '40,000,000원'처럼 숫자로 쓴 원 금액만 '4,000만 원'으로 통일한다.
|
||||
'원'으로 끝나지 않는 값(면적·이율·지분)이나 '억·만·천' 단위가 이미 있는 값은 원문 그대로 둔다."""
|
||||
t = clean(x)
|
||||
if not re.fullmatch(r"\d[\d,]*\s*원", t or ""): # 숫자 사이 공백은 두 금액일 수 있어 합치지 않는다
|
||||
return t
|
||||
return fmt_won(re.sub(r"\D", "", t)) or t
|
||||
|
||||
|
||||
def fmt_date(d):
|
||||
if not d:
|
||||
return ""
|
||||
@@ -278,6 +293,208 @@ def unwrap(d, key):
|
||||
return d.get(key, d)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# 입력 계약 — 생성기가 읽는 키(필수·선택)와 이미 아는 키. 137종 공통이며 사건 값이 아니다.
|
||||
# required: (경로, 조건) 경로가 없으면 시작 전에 멈춘다. 조건이 있으면 그 조건을 만족하는 원소에서만 본다.
|
||||
# optional: 없으면 그 표시만 빠진다(설명용, 검사하지 않음).
|
||||
# known: 수준별로 이미 아는 키. 그 밖의 키는 멈추지 않고 '원 자료'와 검토 메모로 알린다.
|
||||
# 경로 표기: a.b = 객체 안 키, a[] = 배열 원소. part3·part4 넘김은 감싼 객체를 벗긴 뒤의 경로다.
|
||||
# ---------------------------------------------------------------------------
|
||||
CONTRACT = {
|
||||
'client_goal.json': {
|
||||
"label": '의뢰인 목표', "schema": 'platform/schemas/client_goal_domain_profiles.schema.json (issue_clusters[].domain_profiles 만)',
|
||||
"required": [('parties.plaintiffs[].name', None), ('parties.defendants[].name', None), ('parties.third_parties[].name', None), ('issue_clusters[].cluster_id', None)],
|
||||
"optional": ['primary_goal', 'constraints', 'constraints[]', 'key_facts', 'key_facts[]', 'parties', 'parties.plaintiffs', 'parties.plaintiffs[]', 'parties.defendants', 'parties.defendants[]', 'parties.defendants[].asset_status', 'parties.third_parties', 'parties.third_parties[]', 'parties.third_parties[].relationship', 'aliases', 'aliases.<이름>', 'aliases.<이름>[]', 'issue_clusters', 'issue_clusters[]', 'issue_clusters[].cluster_label', 'issue_clusters[].candidate_plaintiffs', 'issue_clusters[].candidate_plaintiffs[]', 'issue_clusters[].candidate_defendants_or_counterparties', 'issue_clusters[].candidate_defendants_or_counterparties[]', 'issue_clusters[].client_requested_relief', 'issue_clusters[].client_requested_relief[]', 'issue_clusters[].desired_relief_keywords', 'issue_clusters[].desired_relief_keywords[]', 'issue_clusters[].legal_sustainability_watchpoints', 'issue_clusters[].legal_sustainability_watchpoints[]', 'issue_clusters[].domain_profiles', 'issue_clusters[].domain_profiles.<영역>', 'issue_clusters[].domain_profiles.<영역>.slot_status', 'issue_clusters[].domain_profiles.<영역>.slot_status[]', 'issue_clusters[].domain_profiles.<영역>.slot_status[].slot_id', 'issue_clusters[].domain_profiles.<영역>.slot_status[].slot_kind', 'issue_clusters[].domain_profiles.<영역>.slot_status[].status', 'issue_clusters[].domain_profiles.<영역>.slot_status[].note', 'issue_clusters[].domain_profiles.<영역>.evidence_component_status', 'issue_clusters[].domain_profiles.<영역>.evidence_component_status[]', 'issue_clusters[].domain_profiles.<영역>.evidence_component_status[].component_id', 'issue_clusters[].domain_profiles.<영역>.evidence_component_status[].status', 'issue_clusters[].domain_profiles.<영역>.evidence_component_status[].note', 'issue_clusters[].domain_profiles.<영역>.defense_signal_status', 'issue_clusters[].domain_profiles.<영역>.defense_signal_status[]', 'issue_clusters[].domain_profiles.<영역>.defense_signal_status[].defense_id', 'issue_clusters[].domain_profiles.<영역>.defense_signal_status[].raised_by', 'issue_clusters[].domain_profiles.<영역>.defense_signal_status[].status', 'issue_clusters[].domain_profiles.<영역>.defense_signal_status[].note', 'issue_clusters[].domain_profiles.<영역>.calculation_readiness', 'issue_clusters[].domain_profiles.<영역>.calculation_readiness[]', 'issue_clusters[].domain_profiles.<영역>.calculation_readiness[].need_basis', 'issue_clusters[].domain_profiles.<영역>.calculation_readiness[].operand_gaps', 'issue_clusters[].domain_profiles.<영역>.calculation_readiness[].operand_gaps[]', 'issue_clusters[].domain_profiles.<영역>.calculation_readiness[].operand_gaps[].operand_label', 'issue_clusters[].domain_profiles.<영역>.review_items', 'issue_clusters[].domain_profiles.<영역>.review_items[]', 'issue_clusters[].domain_profiles.<영역>.review_items[].review_code', 'issue_clusters[].domain_profiles.<영역>.review_items[].reason', 'issue_clusters[].domain_profiles.<영역>.review_items[].note'],
|
||||
"known": {
|
||||
'': {'aliases', 'claim_type_candidates', 'constraints', 'current_control_map', 'current_control_map_4axis', 'defendant_qualification', 'domain_screening_ref', 'issue_clusters', 'key_facts', 'parties', 'plaintiff_capacity_matrix', 'primary_goal', 'standing_watchpoints', 'summary_key_incidents'},
|
||||
'issue_clusters[]': {'candidate_defendants_or_counterparties', 'candidate_plaintiffs', 'client_requested_relief', 'cluster_id', 'cluster_label', 'commercial_successor_liability_hint', 'defense_hints', 'desired_relief_keywords', 'domain_profiles', 'fractional_title_issue_hint', 'land_use_gain_hint', 'lease_payment_semantics_hint', 'legal_entitlement_candidates', 'legal_sustainability_watchpoints', 'liability_group_hint', 'notice_lifecycle_hints', 'preferred_plaintiff_selection_basis', 'preferred_plaintiffs_for_complaint', 'preserved_claim_bundle_hint', 'succession_resolution_needed', 'value_compensation_hint'},
|
||||
'parties.plaintiffs[]': {'name', 'type'},
|
||||
'parties.defendants[]': {'asset_status', 'name', 'type'},
|
||||
'parties.third_parties[]': {'name', 'relationship'},
|
||||
},
|
||||
},
|
||||
'evidence_indexed.json': {
|
||||
"label": '증거 목록', "schema": None,
|
||||
"required": [('items', None), ('items[].evidence_index', None)],
|
||||
"optional": ['items[]', 'items[].title', 'items[].doc_type', 'items[].key_facts', 'items[].key_facts[]', 'items[].key_dates', 'items[].key_dates[]', 'items[].key_amounts', 'items[].key_amounts[]', 'items[].key_parties', 'items[].key_parties[]'],
|
||||
"known": {
|
||||
'items[]': {'admission_components', 'business_transfer_components', 'claim_document_components', 'contract_components', 'defense_assertions', 'defense_components', 'doc_semantic_flags', 'doc_type', 'doc_uid', 'evidence_index', 'key_amounts', 'key_dates', 'key_facts', 'key_parties', 'legal_calculation_object', 'legal_calculation_objects', 'loan_components', 'mixed_contract_payment_semantics', 'multi_event_registry', 'notice_components', 'party_assertion_components', 'property_cluster_id', 'registry_component_ids', 'registry_object_display', 'registry_row_components', 'registry_row_role_map', 'schedule_items', 'secured_debt_components', 'source_pointer', 'succession_document_components', 'title', 'title_normalized', 'valuation_matrix', 'valuation_object', 'valuation_rows'},
|
||||
},
|
||||
},
|
||||
'value_facts.json': {
|
||||
"label": '값 항목', "schema": None,
|
||||
"required": [],
|
||||
"optional": ['records', 'records[]', 'records[].value_id', 'records[].item_label', 'records[].amount_text', 'records[].amount_value', 'records[].value_type', 'records[].dates', 'records[].dates[]', 'records[].dates[].date_value', 'records[].source_ref', 'records[].source_ref.evidence_index'],
|
||||
"known": {
|
||||
'records[]': {'absence_stated', 'amount_text', 'amount_value', 'bound', 'condition_text', 'currency', 'dates', 'fraction', 'item_label', 'local_id', 'object_label_text', 'object_scope', 'obligation_ref', 'parties', 'per', 'period', 'premise_text', 'provenance', 'recurrence', 'relations', 'right_refs', 'security_terms', 'source_ref', 'stated_by', 'tolerance_text', 'unit', 'value_basis', 'value_id', 'value_kind', 'value_type'},
|
||||
},
|
||||
},
|
||||
'value_facts_party_links.json': {
|
||||
"label": '값·당사자 연결', "schema": None,
|
||||
"required": [('links[].value_id', 'linked')],
|
||||
"optional": ['links', 'links[]', 'links[].party_ref', 'links[].party_label', 'links[].status'],
|
||||
"known": {
|
||||
'links[]': {'party_label', 'party_ref', 'path', 'reason', 'status', 'value_id'},
|
||||
},
|
||||
},
|
||||
'routing/party_aliases.json': {
|
||||
"label": '당사자 표기', "schema": None,
|
||||
"required": [('alias_candidates[].canonical', None), ('alias_candidates[].variant', None)],
|
||||
"optional": ['alias_candidates', 'alias_candidates[]', 'aliases', 'aliases.<이름>', 'canonical_parties', 'canonical_parties[]', 'succession_candidates', 'succession_candidates[]', 'succession_candidates[].deceased', 'succession_candidates[].renouncers', 'succession_candidates[].renouncers[]'],
|
||||
"known": {
|
||||
},
|
||||
},
|
||||
'quality_gates/stage1_part1_soft_gate_handoff.json': {
|
||||
"label": '1부 검토 넘김', "schema": None,
|
||||
"required": [],
|
||||
"optional": ['review_items', 'review_items[]', 'review_items[].review_code', 'review_items[].source_check', 'review_items[].severity', 'review_items[].review_instruction', 'review_items[].concise_basis', 'review_items[].source_refs', 'review_items[].source_refs.evidence_indexes', 'review_items[].source_refs.evidence_indexes[]', 'review_items[].issue_type'],
|
||||
"known": {
|
||||
'review_items[]': {'blocks_final_drafting', 'candidate_use_policy', 'concise_basis', 'created_from', 'domain_hints', 'issue_type', 'lawyer_workflow_role', 'negative_instruction', 'review_code', 'review_id', 'review_instruction', 'severity', 'source_check', 'source_gate', 'source_refs', 'target_stage_hints', 'target_task_hints'},
|
||||
},
|
||||
},
|
||||
'BO.json': {
|
||||
"label": '원 기록', "schema": None,
|
||||
"required": [('[].BO_ID', None)],
|
||||
"optional": ['[]', '[].ActionType', '[].JuristicAct', '[].JuristicAct.label', '[].Action', '[].core_field_base', '[].core_field_base.TimeText', '[].core_field_base.BehaviorTime', '[].amount', '[].amount.value_text', '[].amount.numeric_value', '[].value_refs', '[].value_refs[]'],
|
||||
"known": {
|
||||
'[]': {'Action', 'ActionType', 'BOType', 'BO_ID', 'Evidence', 'EvidenceTitles', 'JuristicAct', 'Legal_Keywords', 'PriorAct', 'Reason', 'ReasonRefs', 'amount', 'core_field_base', 'downstream_seed_refs', 'extensions', 'id', 'provenance', 'source_evidence_indexes', 'value_refs'},
|
||||
},
|
||||
},
|
||||
'quality_gates/stage1_part2_review_handoff.json': {
|
||||
"label": '2부 검토 넘김', "schema": None,
|
||||
"required": [],
|
||||
"optional": ['review_items', 'review_items[]', 'review_items[].source_review_code', 'review_items[].template_note', 'review_items[].source_domain', 'review_items[].source_evidence_indexes', 'review_items[].source_evidence_indexes[]', 'review_items[].issue_type'],
|
||||
"known": {
|
||||
'review_items[]': {'downstream_owner', 'issue_type', 'review_id', 'severity', 'source_domain', 'source_event_candidate_ids', 'source_evidence_indexes', 'source_field', 'source_meeting_clause_ids', 'source_review_code', 'source_value_fact_ids', 'template_note'},
|
||||
},
|
||||
},
|
||||
'legal_effect_structures.json': {
|
||||
"label": '법적 효과 구조', "schema": 'platform/schemas/legal_effect_structures.schema.json',
|
||||
"required": [],
|
||||
"optional": ['structure_records', 'structure_records[]', 'structure_records[].domain_id', 'structure_records[].source_bo_ids', 'structure_records[].source_bo_ids[]'],
|
||||
"known": {
|
||||
},
|
||||
},
|
||||
'quality_gates/stage1_part3_review_handoff.json': {
|
||||
"label": '3부 검토 넘김', "schema": None,
|
||||
"required": [],
|
||||
"optional": ['review_items', 'review_items[]', 'review_items[].review_code', 'review_items[].bo_id', 'review_items[].domain_id', 'review_items[].issue_type'],
|
||||
"known": {
|
||||
'review_items[]': {'attached_to', 'bo_absent', 'bo_id', 'candidate_type_id', 'decided_by', 'default_projection', 'detail', 'domain_id', 'legal_keywords', 'pair_scores', 'resolved_domains', 'review_code', 'severity', 'signal_id', 'source_domain', 'type_id'},
|
||||
},
|
||||
},
|
||||
'Fact_Ledger_base.json': {
|
||||
"label": '사실 원장', "schema": 'platform/schemas/fact_ledger_base.schema.json',
|
||||
"required": [('[].fact_id', None), ('[].source_bo_id', None), ('[].parties[].value', None)],
|
||||
"optional": ['[]', '[].parties', '[].parties[]', '[].date', '[].action', '[].derived_fact', '[].evidence_refs', '[].evidence_refs[]', '[].proof_strength', '[].domain_effects', '[].domain_effects.<영역>', '[].domain_effects.<영역>.module', '[].domain_effects.<영역>.module[]', '[].calculation_requests', '[].amount'],
|
||||
"known": {
|
||||
'[]': {'actio_roles', 'action', 'amount', 'calculation_requests', 'claim_chain_ref', 'commercial_successor_effect', 'credibility', 'date', 'derivation_basis', 'derived_fact', 'domain_effects', 'downstream_module_candidates', 'evidence_refs', 'fact_id', 'legal_calculation_object', 'legal_centrality', 'legal_effect_roles', 'linked_actio_structures', 'linked_structures', 'money_claim_effect', 'must_consider', 'must_not_drop_in_claim_types', 'object_spec', 'parties', 'proof_strength', 'skeleton_validation_codes', 'source_bo_id', 'state_context', 'type'},
|
||||
},
|
||||
},
|
||||
'quality_gates/stage1_part4_review_handoff.json': {
|
||||
"label": '4부 검토 넘김', "schema": None,
|
||||
"required": [('review_items[].review_code', 'fact_id')],
|
||||
"optional": ['review_items', 'review_items[]', 'review_items[].fact_id', 'review_items[].domain_id', 'review_items[].blocks_final_drafting', 'review_items[].detail', 'review_items[].issue_type'],
|
||||
"known": {
|
||||
'review_items[]': {'actual_missing', 'blocks_final_drafting', 'derived_list', 'detail', 'domain_id', 'excess_domain_ids', 'fact_id', 'gate_id', 'legacy', 'missing_domain_ids', 'projected_row_count', 'review_code', 'severity'},
|
||||
},
|
||||
},
|
||||
}
|
||||
FORMAT = {("Fact_Ledger_base.json", "[].fact_id"): (r"[^-]+-\d+", "사실 번호는 '접두어-숫자' 꼴이어야 한다(예: F-001)")}
|
||||
COND = {"linked": lambda r: (r.get("status") == "RESOLVED" and r.get("party_ref")) or r.get("party_label"),
|
||||
"fact_id": lambda r: r.get("fact_id")}
|
||||
|
||||
|
||||
def _segs(path):
|
||||
return [x for x in re.split(r"\.|(?=\[\])|(?<=\[\])", path) if x]
|
||||
|
||||
|
||||
def _at(o, segs, loc=""):
|
||||
"""경로 끝의 값들을 (값, 위치) 로 돌려준다. 중간이 없으면 건너뛴다."""
|
||||
if not segs:
|
||||
yield o, loc
|
||||
elif segs[0] == "[]":
|
||||
for i, v in enumerate(o if isinstance(o, list) else []):
|
||||
yield from _at(v, segs[1:], f"{loc}[{i}]")
|
||||
elif isinstance(o, dict) and segs[0] in o:
|
||||
yield from _at(o[segs[0]], segs[1:], f"{loc}.{segs[0]}" if loc else segs[0])
|
||||
|
||||
|
||||
def _input(inp, f):
|
||||
d = load(inp / f)
|
||||
w = {"quality_gates/stage1_part3_review_handoff.json": "stage1_part3_review_handoff",
|
||||
"quality_gates/stage1_part4_review_handoff.json": "stage1_part4_review_handoff"}.get(f)
|
||||
return unwrap(d, w) if w and isinstance(d, dict) else d
|
||||
|
||||
|
||||
def check_contract(inp):
|
||||
"""필수 키 검사. 어긴 곳을 '파일: 위치 — 이유' 목록으로 돌려준다(최대 파일마다 5곳)."""
|
||||
bad = []
|
||||
for f, c in CONTRACT.items():
|
||||
d, n = _input(inp, f), 0
|
||||
for path, cond in c["required"]:
|
||||
segs = _segs(path)
|
||||
for parent, loc in _at(d, segs[:-1]):
|
||||
if not isinstance(parent, dict) or (cond and not COND[cond](parent)):
|
||||
continue
|
||||
key = segs[-1]
|
||||
at = f"{loc}.{key}" if loc else key
|
||||
if key not in parent:
|
||||
why = "키가 없다"
|
||||
elif (f, path) in FORMAT and not re.fullmatch(FORMAT[(f, path)][0], str(parent[key])):
|
||||
why = FORMAT[(f, path)][1]
|
||||
else:
|
||||
continue
|
||||
n += 1
|
||||
if n <= 5:
|
||||
bad.append(f"{f}: {at} — {why}")
|
||||
if n > 5:
|
||||
bad.append(f"{f}: 그 밖에 {n - 5}곳")
|
||||
return bad
|
||||
|
||||
|
||||
COND_KO = {"linked": "당사자 이름이 있는 연결에서만", "fact_id": "fact_id가 있는 항목에서만"}
|
||||
|
||||
|
||||
def print_contract():
|
||||
"""CONTRACT 의 변수 목록(필수·선택)을 마크다운 표로 stdout 에 쓴다."""
|
||||
print("| 파일 | 이름 | 구분 | 변수(키 경로) | 조건·꼴 | 스키마 |")
|
||||
print("|---|---|---|---|---|---|")
|
||||
n = Counter()
|
||||
for f, c in CONTRACT.items():
|
||||
rows = [("필수", p, cond) for p, cond in c["required"]] + [("선택", p, None) for p in c["optional"]]
|
||||
for kind, path, cond in rows:
|
||||
note = "; ".join(x for x in (COND_KO.get(cond, ""), (FORMAT.get((f, path)) or ("", ""))[1]) if x)
|
||||
sch = (c["schema"] or "").split(" (")[0]
|
||||
if f == "client_goal.json" and not path.startswith("issue_clusters[].domain_profiles"):
|
||||
sch = "" # 이 스키마는 domain_profiles 만 덮는다
|
||||
print(f"| `{f}` | {c['label']} | {kind} | `{path}` | {note} | {sch} |")
|
||||
n[kind] += 1
|
||||
print(f"\n파일 {len(CONTRACT)}개 · 필수 {n['필수']} · 선택 {n['선택']}")
|
||||
|
||||
|
||||
def _raw(v):
|
||||
return (v if isinstance(v, str) else json.dumps(v, ensure_ascii=False))[:300]
|
||||
|
||||
|
||||
def unknown_keys(inp):
|
||||
"""계약의 known 밖 키를 모은다. 사실·원 기록·증거에 붙은 것은 원소별 키-값도 돌려준다."""
|
||||
out = {"fl": {}, "bo": {}, "ev": {}, "count": Counter()}
|
||||
own = {"Fact_Ledger_base.json": ("fl", "fact_id"), "BO.json": ("bo", "BO_ID"), "evidence_indexed.json": ("ev", "evidence_index")}
|
||||
for f, c in CONTRACT.items():
|
||||
d = _input(inp, f)
|
||||
for lvl, known in c["known"].items():
|
||||
for el, _ in _at(d, _segs(lvl)):
|
||||
if not isinstance(el, dict):
|
||||
continue
|
||||
new = {k: v for k, v in el.items() if k not in known}
|
||||
for k in new:
|
||||
out["count"][(f, lvl, k)] += 1
|
||||
if new and f in own and el.get(own[f][1]):
|
||||
out[own[f][0]][el[own[f][1]]] = {k: _raw(v) for k, v in new.items()}
|
||||
return out
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# 레지스트리
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -474,7 +691,8 @@ def fmt_filing(d):
|
||||
# ---------------------------------------------------------------------------
|
||||
# 화면 모델
|
||||
# ---------------------------------------------------------------------------
|
||||
def build_model(inp, reg):
|
||||
def build_model(inp, reg, extra=None):
|
||||
extra = extra or {"fl": {}, "bo": {}, "ev": {}, "count": Counter()}
|
||||
domain_ko, slot_ko, slot_by_code, defense_ko = load_registry(reg)
|
||||
goal = load(inp / "client_goal.json")
|
||||
bo = {b["BO_ID"]: b for b in load(inp / "BO.json")}
|
||||
@@ -525,8 +743,10 @@ def build_model(inp, reg):
|
||||
"type": DOC_TYPE_KO.get(e.get("doc_type"), clean(e.get("doc_type"))),
|
||||
"facts": [clean(x) for x in e.get("key_facts", []) if clean(x)],
|
||||
"dates": [fmt_date(x) for x in e.get("key_dates", [])],
|
||||
"amounts": [fmt_won(re.sub(r"\D", "", x)) or clean(x) for x in e.get("key_amounts", [])],
|
||||
"amounts": [ev_amount(x) for x in e.get("key_amounts", [])],
|
||||
"parties": [clean(x) for x in e.get("key_parties", [])]}
|
||||
if extra["ev"].get(k):
|
||||
evidence[k]["raw"] = extra["ev"][k]
|
||||
|
||||
# 사실별 검토(Part 4 사실 단위)
|
||||
fact_flags = defaultdict(list)
|
||||
@@ -582,6 +802,10 @@ def build_model(inp, reg):
|
||||
"amount": money((b.get("amount") or {}).get("value_text"), (b.get("amount") or {}).get("numeric_value"))
|
||||
if b.get("amount") else ""},
|
||||
})
|
||||
if extra["fl"].get(f["fact_id"]):
|
||||
facts[-1]["raw"] = extra["fl"][f["fact_id"]]
|
||||
if extra["bo"].get(f["source_bo_id"]):
|
||||
facts[-1]["bo"]["raw"] = extra["bo"][f["source_bo_id"]]
|
||||
facts.sort(key=lambda x: (x["sort"], x["no"]))
|
||||
fact_by_bo = {f["source_bo_id"]: f["fact_id"] for f in fl}
|
||||
fx_by_id = {x["id"]: x for x in facts}
|
||||
@@ -706,6 +930,14 @@ def build_model(inp, reg):
|
||||
"area": domain_ko.get(r.get("source_domain"), "") or "공통", "facts": [],
|
||||
"blocking": code in gated.get(r.get("source_domain"), ()),
|
||||
"ev": [e for e in r.get("source_evidence_indexes", []) if e in evidence]})
|
||||
if extra["count"]:
|
||||
by = defaultdict(list)
|
||||
for (f, lvl, k), n in extra["count"].items():
|
||||
by[CONTRACT[f]["label"]].append(f"{k} {n}건")
|
||||
decisions.append({"group": "check", "kind": "contract", "order": 9, "title": "에이전트가 아직 화면에 정리하지 못한 입력 항목",
|
||||
"body": "1단계 결과물에 이 화면이 처음 보는 항목이 있습니다. 사실·원 기록·증거에 붙은 것은 상세 패널의 '원 자료'에서 볼 수 있습니다. 소장 내용에 영향이 있는지 확인해 주십시오.",
|
||||
"items": [f"{lab}: {', '.join(v)}" for lab, v in by.items()], "choices": [], "blocking": False,
|
||||
"area": "입력 항목", "facts": [], "ev": []})
|
||||
decisions.sort(key=lambda d: (d["group"] != "urgent", d["order"]))
|
||||
for i, d in enumerate(decisions):
|
||||
d["id"] = f"D{i + 1:03d}"
|
||||
@@ -977,6 +1209,7 @@ $('#dr').addEventListener('keydown',e=>{if(e.key!=='Tab')return;const f=$$('#dr
|
||||
if(e.shiftKey&&document.activeElement===a){e.preventDefault();z.focus()}else if(!e.shiftKey&&document.activeElement===z){e.preventDefault();a.focus()}});
|
||||
function evName(k){const e=M.evidence[k];return e?`자료 ${e.no} · ${e.title}`:'자료'}
|
||||
function evBtn(e,sub){return `<button class="evlink" data-ev="${e}"><b>${esc(evName(e))}</b><br><small>${esc(sub||M.evidence[e].type+' · 원문 요지 보기')}</small></button>`}
|
||||
function rawHTML(r,t){return r?`<h4>${esc(t)}</h4><dl class="kv">${Object.entries(r).map(([k,v])=>`<dt>${esc(k)}</dt><dd>${esc(v)}</dd>`).join('')}</dl>`:''}
|
||||
function renderDr(){const [kind,id]=trail[trail.length-1];
|
||||
$('#crumbs').innerHTML=trail.map((t,i)=>{const lab=t[0]==='fact'?`사실 ${FX[t[1]].no}`:t[0]==='bo'?'원 기록':t[0]==='party'?esc(PN[t[1]].name):t[0]==='edge'?'관계':`자료 ${M.evidence[t[1]].no}`;return i<trail.length-1?`<button data-i="${i}">${lab}</button> ›`:`<b>${lab}</b>`}).join(' ');
|
||||
$$('#crumbs button').forEach(b=>b.onclick=()=>{trail=trail.slice(0,+b.dataset.i+1);renderDr()});
|
||||
@@ -991,6 +1224,7 @@ function renderDr(){const [kind,id]=trail[trail.length-1];
|
||||
if(f.calc)h+=`<dt>계산</dt><dd>이 사실로 계산할 항목 ${f.calc}건</dd>`;
|
||||
h+=`<dt>쟁점</dt><dd>${f.clusters.length?f.clusters.map(c=>`<span class="tag cl" style="--cc:${CC[c]}">${esc(CL[c].label)}</span>`).join(' '):'<span class="tag none">쟁점 미지정</span>'}</dd></dl>`;
|
||||
if(f.flags.length)h+=`<div class="layer"><b style="color:var(--hot)">확인 필요</b> — ${esc(f.flags.join(', '))}</div>`;
|
||||
h+=rawHTML(f.raw,'원 자료 (사실 원장에서 화면이 처음 보는 항목)')+rawHTML(b.raw,'원 자료 (원 기록에서 화면이 처음 보는 항목)');
|
||||
if(f.alt.length)h+=`<h4>금액 후보</h4>`+f.alt.map(a=>`<div class="layer"><b>${esc(a.text)}</b> ${esc(a.label)} <span class="note">${esc(a.span)}</span>${a.ev?` · <span class="note">${esc(evName(a.ev))}</span>`:''}</div>`).join('');
|
||||
if(f.rel.length)h+=`<h4>함께 볼 금액</h4>`+f.rel.map(a=>`<div class="layer">${esc(a.text)} ${esc(a.label)}${a.ev?` · <span class="note">${esc(evName(a.ev))}</span>`:''}</div>`).join('');
|
||||
h+=`<h4>근거 증거 ${f.ev.length}건</h4>`+(f.ev.map(e=>evBtn(e)).join('')||'<p class="note">연결된 자료가 없습니다.</p>');
|
||||
@@ -1000,7 +1234,7 @@ function renderDr(){const [kind,id]=trail[trail.length-1];
|
||||
h+=`<p class="eyebrow">원 기록 · 증거에서 처음 뽑은 내용</p><h3 id="drtitle">${esc(b.act||'원 기록')}</h3>`;
|
||||
h+=`<div class="layer l2">${esc(b.action)}</div><dl class="kv" style="margin-top:12px"><dt>행위 성격</dt><dd>${esc(b.kind||'—')}</dd><dt>기록된 시점</dt><dd>${esc(b.time||'—')}</dd>`;
|
||||
if(b.amount)h+=`<dt>기록된 금액</dt><dd>${esc(b.amount)}</dd>`;
|
||||
h+=`</dl><h4>이 기록이 근거로 든 자료</h4>`+(f.ev.map(e=>evBtn(e)).join('')||'<p class="note">연결된 자료가 없습니다.</p>');
|
||||
h+=`</dl>`+rawHTML(b.raw,'원 자료 (화면이 처음 보는 항목)')+`<h4>이 기록이 근거로 든 자료</h4>`+(f.ev.map(e=>evBtn(e)).join('')||'<p class="note">연결된 자료가 없습니다.</p>');
|
||||
} else if(kind==='party'){const n=PN[id];
|
||||
h+=`<p class="eyebrow">당사자</p><h3 id="drtitle">${esc(n.name)}${n.deceased?' (사망)':''}</h3><dl class="kv"><dt>역할</dt><dd>${esc(n.role)}</dd>`;
|
||||
if(n.note)h+=`<dt>현재 상태</dt><dd>${esc(n.note)}</dd>`;
|
||||
@@ -1022,6 +1256,7 @@ function renderDr(){const [kind,id]=trail[trail.length-1];
|
||||
h+=`<p class="eyebrow">증거 원문 요지</p><h3 id="drtitle">자료 ${e.no} · ${esc(e.title)}</h3><p class="note">${esc(e.type)}</p>`;
|
||||
if(e.facts.length)h+=`<h4>문서가 말하는 내용</h4><ul class="plain">${e.facts.map(x=>`<li>${esc(x)}</li>`).join('')}</ul>`;
|
||||
h+=`<dl class="kv" style="margin-top:12px">`;if(e.dates.length)h+=`<dt>날짜</dt><dd>${esc(e.dates.join(', '))}</dd>`;if(e.amounts.length)h+=`<dt>금액</dt><dd>${esc(e.amounts.join(', '))}</dd>`;if(e.parties.length)h+=`<dt>등장 인물</dt><dd>${esc(e.parties.join(', '))}</dd>`;h+=`</dl>`;
|
||||
h+=rawHTML(e.raw,'원 자료 (증거 목록에서 화면이 처음 보는 항목)');
|
||||
const used=M.facts.filter(f=>f.ev.includes(id));if(used.length)h+=`<h4>이 자료를 근거로 한 사실 ${used.length}건</h4>`+used.map(f=>`<button class="evlink" data-f="${f.id}"><small>${esc(f.date||'날짜 미상')}</small><br>${esc(f.text)}</button>`).join('');
|
||||
}
|
||||
$('#drbody').innerHTML=h;$('#drbody').scrollTop=0;
|
||||
@@ -1286,7 +1521,7 @@ def check_vocab(reg_dir):
|
||||
|
||||
def visible_latin(model):
|
||||
"""화면에 나갈 문자열에 남은 영어 단어(사건 자료에서 온 것)를 모은다."""
|
||||
skip = {"id", "ev", "facts", "clusters", "sort", "group", "tone", "kind", "today"}
|
||||
skip = {"id", "ev", "facts", "clusters", "sort", "group", "tone", "kind", "today", "raw"}
|
||||
words = Counter()
|
||||
|
||||
def walk(o, key=""):
|
||||
@@ -1299,7 +1534,7 @@ def visible_latin(model):
|
||||
elif isinstance(o, str) and key not in skip:
|
||||
for w in re.findall(r"[a-z]{3,}", o):
|
||||
words[w] += 1
|
||||
walk({k: v for k, v in model.items() if k != "evidence"})
|
||||
walk({k: ([d for d in v if d.get("kind") != "contract"] if k == "decisions" else v) for k, v in model.items() if k != "evidence"})
|
||||
return words
|
||||
|
||||
|
||||
@@ -1311,7 +1546,12 @@ def main():
|
||||
ap.add_argument("--out", default=str(HERE / "stage_1_display_v1.html"))
|
||||
ap.add_argument("--filing-date", default="", help="소제기일 YYYY-MM-DD (주면 작업실 값보다 먼저)")
|
||||
ap.add_argument("--check-vocab", action="store_true", help="137종 레지스트리 전체 어휘 검사만 하고 끝낸다")
|
||||
ap.add_argument("--check-contract", action="store_true", help="입력 계약 검사만 하고 끝낸다")
|
||||
ap.add_argument("--print-contract", action="store_true", help="생성기가 읽는 변수 목록(CONTRACT)을 마크다운 표로 출력하고 끝낸다")
|
||||
a = ap.parse_args()
|
||||
if a.print_contract:
|
||||
print_contract()
|
||||
sys.exit(0)
|
||||
reg = Path(a.registry) if a.registry else None
|
||||
n_cfg = len(list(reg.glob("*/domain_config.json"))) if reg and reg.is_dir() else 0
|
||||
if not n_cfg:
|
||||
@@ -1319,7 +1559,28 @@ def main():
|
||||
sys.exit(1)
|
||||
if a.check_vocab:
|
||||
sys.exit(1 if check_vocab(reg) else 0)
|
||||
model = build_model(Path(a.inputs), Path(a.registry))
|
||||
need = ["client_goal.json", "BO.json", "Fact_Ledger_base.json", "legal_effect_structures.json", "evidence_indexed.json",
|
||||
"quality_gates/stage1_part1_soft_gate_handoff.json", "quality_gates/stage1_part2_review_handoff.json",
|
||||
"quality_gates/stage1_part3_review_handoff.json", "quality_gates/stage1_part4_review_handoff.json",
|
||||
"routing/party_aliases.json", "value_facts.json", "value_facts_party_links.json"]
|
||||
miss = [n for n in need if not (Path(a.inputs) / n).is_file()]
|
||||
if miss:
|
||||
print(f"error: 입력 폴더 {a.inputs} 에 필수 파일이 없다: {', '.join(miss)}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
bad = check_contract(Path(a.inputs))
|
||||
if bad:
|
||||
print(f"error: 입력이 계약(CONTRACT)의 필수 키를 어긴다 {len(bad)}건:", file=sys.stderr)
|
||||
for x in bad:
|
||||
print(" -", x, file=sys.stderr)
|
||||
sys.exit(1)
|
||||
extra = unknown_keys(Path(a.inputs))
|
||||
if extra["count"]:
|
||||
print(f"warning: 계약 밖 입력 키 {len(extra['count'])}종 — 화면 '원 자료'와 검토 메모로 알린다: "
|
||||
f"{[f'{f}:{l}.{k}' for f, l, k in list(extra['count'])[:10]]}", file=sys.stderr)
|
||||
if a.check_contract:
|
||||
print(f"계약 검사 통과: 필수 키 위반 0, 계약 밖 키 {len(extra['count'])}종")
|
||||
sys.exit(0)
|
||||
model = build_model(Path(a.inputs), Path(a.registry), extra)
|
||||
model["filing"] = load_filing_date(Path(a.inputs), a.filing_date)
|
||||
if not model["filing"]:
|
||||
print("warning: 사용자가 넣은 소제기일이 없어 머리글에 '미입력'으로 표시한다", file=sys.stderr)
|
||||
|
||||
+62
-16
@@ -4,9 +4,9 @@
|
||||
|---|---|
|
||||
| 대상 독자 | Liti-agent 웹페이지에 Stage 1 결과 화면을 붙이는 백엔드 엔지니어, 그와 함께 작업하는 LLM |
|
||||
| 대상 코드 | `HITL/stage_1_display_v1.py` (생성기), `HITL/stage_1_display_v1.html` (생성 결과 예시) |
|
||||
| 기준일 | 2026-11-22 |
|
||||
| 기준일 | 2026-11-23 (생성기 v1 r4) |
|
||||
| 기준 실행 | workspace `11월_1일_구성`, Stage 1 Part 1~4 + Stage 2 S2_00~S2_30 전체 실행 결과 |
|
||||
| 기준 출력 | 279,866바이트(내장 모델 215,509바이트), 사실 78·증거 30·결정 8·검토 메모 176·제외 420 |
|
||||
| 기준 출력 | 280,444바이트(내장 모델 215,509바이트), 사실 78·증거 30·결정 8·검토 메모 176·제외 420 |
|
||||
|
||||
---
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|---|---|---|
|
||||
| 1 | 생성기를 배치한다. 경로 제약은 없다 | §4 |
|
||||
| 2 | 레지스트리 경로를 정한다. 저장소 밖에서는 `--registry`가 필수다 | §4, §6 |
|
||||
| 3 | Stage 1 Part 4 완료 후 생성기를 실행한다. 소제기일은 `--filing-date`로 넘긴다 | §6 |
|
||||
| 3 | Stage 1 Part 4 완료 후 생성기를 실행한다. 소제기일은 `--filing-date`로 넘긴다. 입력만 먼저 보려면 `--check-contract`를 쓴다 | §5.3, §6 |
|
||||
| 4 | 종료 코드와 stderr 경고를 확인한다 | §6, §10 |
|
||||
| 5 | 생성된 HTML을 인증 뒤의 사건별 URL로 제공하고 `<iframe>`으로 넣는다 | §8 |
|
||||
| 6 | 사용자 결정을 회수하려면 §8.3을 구현한다 | §8.3 |
|
||||
@@ -94,30 +94,66 @@
|
||||
| `quality_gates/stage1_part4_review_handoff.json` | Part 4 | object | 필수 | 결정·메모 |
|
||||
| `stage2_control/s2_20_request.json` | S2_20 T0 | object | 선택 | 머리글 소제기일 |
|
||||
|
||||
- 필수 파일이 없으면 `FileNotFoundError`로 종료한다(종료 코드 1).
|
||||
- 필수 파일 12개 중 하나라도 없으면 생성 전에 `error: 입력 폴더 <경로> 에 필수 파일이 없다: <파일 목록>`을 stderr에 쓰고 종료 코드 1로 끝난다(HTML을 만들지 않음).
|
||||
- `routing/domain_activation_manifest.json`, `signals/*`는 읽지 않는다. `inputs_v1/`의 같은 이름 파일은 참고용이다.
|
||||
|
||||
### 5.2 키
|
||||
|
||||
각 파일의 스키마는 생성 YAML이 정의한다. 생성기가 읽는 키는 아래와 같다. **필수 키**가 없으면 `KeyError`로 종료한다(종료 코드 1). **선택 키**가 없으면 빈 값으로 처리한다.
|
||||
각 파일의 모양은 생성 YAML이 정의한다. 정식 스키마는 3개뿐이다: `platform/schemas/client_goal_domain_profiles.schema.json`(`issue_clusters[].domain_profiles`만), `fact_ledger_base.schema.json`, `legal_effect_structures.schema.json`.
|
||||
|
||||
생성기가 읽는 키의 기준은 생성기 안의 상수 `CONTRACT`다. 아래 표는 그 요약이다. 둘이 다르면 `CONTRACT`가 맞다.
|
||||
|
||||
- **필수 키**: 생성 전에 검사한다. 어기면 HTML을 만들지 않고 종료 코드 1로 끝난다(§5.3).
|
||||
- **선택 키**: 검사하지 않는다. 없으면 그 표시만 빠진다.
|
||||
- 파일 전체의 변수 목록(표본 기준)은 `HITL/결과물_변수_리스트_Stage_1_v1.md`에 있다.
|
||||
|
||||
| 파일 | 필수 키 | 선택 키 |
|
||||
|---|---|---|
|
||||
| `client_goal.json` | `issue_clusters[].cluster_id`, `parties.{plaintiffs,defendants,third_parties}[].name` | `primary_goal`, `constraints`, `key_facts`, `aliases`, `parties.defendants[].asset_status`, `parties.third_parties[].relationship`, `issue_clusters[].{cluster_label,candidate_plaintiffs,candidate_defendants_or_counterparties,client_requested_relief,desired_relief_keywords,legal_sustainability_watchpoints,domain_profiles}`; `domain_profiles.<영역>.{slot_status[].{slot_id,slot_kind,status,note},evidence_component_status[].{component_id,status,note},defense_signal_status[].{defense_id,raised_by,status,note},calculation_readiness[].{need_basis,operand_gaps[].operand_label},review_items[].{review_code,reason,note}}` |
|
||||
| `evidence_indexed.json` | `items`, `items[].evidence_index` | `items[].{title,doc_type,key_facts,key_dates,key_amounts,key_parties}` |
|
||||
| `Fact_Ledger_base.json` | `[].fact_id`(`X-숫자` 꼴, 예 `F-001`), `[].source_bo_id`, `[].parties[].value`(parties가 있을 때) | `date`, `action`, `derived_fact`, `evidence_refs`, `proof_strength`, `domain_effects.<영역>.module`, `calculation_requests`, `amount`(JSON 문자열: `value_text,numeric_value,conflict.candidates[].{amount_text,amount_value,item_label,period,evidence_index},related_values[].{amount_text,amount_value,item_label,evidence_index}`) |
|
||||
| `Fact_Ledger_base.json` | `[].fact_id`('접두어-숫자' 꼴, 예 `F-001`. 꼴도 검사한다), `[].source_bo_id`, `[].parties[].value`(parties가 있을 때) | `date`, `action`, `derived_fact`, `evidence_refs`, `proof_strength`, `domain_effects.<영역>.module`, `calculation_requests`, `amount`(JSON 문자열: `value_text,numeric_value,conflict.candidates[].{amount_text,amount_value,item_label,period,evidence_index},related_values[].{amount_text,amount_value,item_label,evidence_index}`) |
|
||||
| `BO.json` | `[].BO_ID` | `ActionType`, `JuristicAct.label`, `Action`, `core_field_base.{TimeText,BehaviorTime}`, `amount.{value_text,numeric_value}`, `value_refs` |
|
||||
| `legal_effect_structures.json` | — | `structure_records[].{domain_id,source_bo_ids}` |
|
||||
| `value_facts_party_links.json` | `links[].value_id` | `links[].{party_ref,party_label,status}` |
|
||||
| `value_facts_party_links.json` | `links[].value_id`(당사자 이름이 있는 연결에서만: `status`가 `RESOLVED`이고 `party_ref`가 있거나, `party_label`이 있을 때) | `links[].{party_ref,party_label,status}` |
|
||||
| `value_facts.json` | — | `records[].{value_id,item_label,amount_text,amount_value,value_type,dates[].date_value,source_ref.evidence_index}` |
|
||||
| `routing/party_aliases.json` | `alias_candidates[].{canonical,variant}` | `canonical_parties`, `aliases`, `succession_candidates[].{deceased,renouncers}` |
|
||||
| Part 1 handoff | — | `review_items[].{source_check,review_code,severity,review_instruction,concise_basis,source_refs.evidence_indexes}` |
|
||||
| Part 2 handoff | — | `review_items[].{source_review_code,issue_type,source_domain,template_note,source_evidence_indexes}` |
|
||||
| Part 3 handoff | — | `stage1_part3_review_handoff.review_items[].{review_code,bo_id,domain_id}` |
|
||||
| Part 4 handoff | — | `stage1_part4_review_handoff.review_items[].{review_code,fact_id,domain_id,detail,blocks_final_drafting}` |
|
||||
| Part 4 handoff | `review_items[].review_code`(`fact_id`가 있는 항목에서만) | `stage1_part4_review_handoff.review_items[].{fact_id,domain_id,detail,blocks_final_drafting}`, `review_code`(그 밖의 항목) |
|
||||
| `s2_20_request.json` | — | `filing_reference_date_env`, `filing_reference_date`, `filing_reference_date_default` |
|
||||
| 레지스트리 `domain_config.json` | `domain_id`, `defense_map[].defense_id`(defense_map이 있을 때) | `kind`, `label_ko`, `element_slots[].{slot_id,label,missing_review_code}`, `opposing_fact_slots[].{slot_id,label}`, `evidence_components[].{component_id,label}`, `defense_map[].{trigger_slot_ids,review_code}` |
|
||||
|
||||
### 5.3 계약 검사 (v1 r4)
|
||||
|
||||
생성기는 HTML을 만들기 전에 입력을 `CONTRACT`와 대조한다. 순서는 다음과 같다.
|
||||
|
||||
1. 필수 파일 12개가 있는지 본다(§5.1).
|
||||
2. **필수 키 검사.** 어긴 곳이 있으면 stderr에 아래처럼 쓰고 종료 코드 1로 끝난다. 파일마다 5곳까지 적고, 나머지는 `그 밖에 N곳`으로 센다.
|
||||
```
|
||||
error: 입력이 계약(CONTRACT)의 필수 키를 어긴다 2건:
|
||||
- Fact_Ledger_base.json: [3].source_bo_id — 키가 없다
|
||||
- Fact_Ledger_base.json: [0].fact_id — 사실 번호는 '접두어-숫자' 꼴이어야 한다(예: F-001)
|
||||
```
|
||||
위치는 감싼 객체를 벗긴 뒤의 경로다(Part 3·4 handoff).
|
||||
3. **계약 밖 키 검사.** `CONTRACT`의 `known`은 수준별로 이미 아는 키 목록이다. 그 밖의 키가 있어도 멈추지 않는다. 대신 세 곳에 알린다.
|
||||
- stderr: `warning: 계약 밖 입력 키 N종 — 화면 '원 자료'와 검토 메모로 알린다: [...]`(10종까지)
|
||||
- 상세 패널: 사실(`Fact_Ledger_base.json` 행), 원 기록(`BO.json` 행), 증거(`evidence_indexed.json` 항목)에 붙은 키는 '원 자료' 칸에 키와 값을 그대로 보인다. 값은 300자까지 보이며, 객체·배열은 JSON 문자열로 보인다.
|
||||
- 결정 요청 화면: 검토 메모 묶음에 "에이전트가 아직 화면에 정리하지 못한 입력 항목" 카드 하나를 붙인다. 파일별로 키 이름과 건수를 적는다.
|
||||
|
||||
검사하는 수준(`known`)
|
||||
|
||||
| 파일 | 수준 |
|
||||
|---|---|
|
||||
| `client_goal.json` | 최상위, `issue_clusters[]`, `parties.{plaintiffs,defendants,third_parties}[]` |
|
||||
| `evidence_indexed.json` | `items[]` |
|
||||
| `value_facts.json` | `records[]` |
|
||||
| `value_facts_party_links.json` | `links[]` |
|
||||
| `BO.json`, `Fact_Ledger_base.json` | 각 행 |
|
||||
| Part 1~4 handoff | `review_items[]` |
|
||||
|
||||
이 밖의 하위 구조(예: `BO.json`의 `extensions.domain_payload`, 증거 항목 안의 문서 종류별 세부 구조)는 검사하지 않는다.
|
||||
|
||||
## 6. 실행 방법
|
||||
|
||||
```bash
|
||||
@@ -128,6 +164,10 @@ python3 -I stage_1_display_v1.py \
|
||||
[--filing-date YYYY-MM-DD]
|
||||
|
||||
python3 -I stage_1_display_v1.py --registry <경로> --check-vocab
|
||||
|
||||
python3 -I stage_1_display_v1.py --inputs <폴더> --registry <경로> --check-contract
|
||||
|
||||
python3 -I stage_1_display_v1.py --print-contract > 변수목록.md
|
||||
```
|
||||
|
||||
| 옵션 | 기본값 | 설명 |
|
||||
@@ -137,18 +177,21 @@ python3 -I stage_1_display_v1.py --registry <경로> --check-vocab
|
||||
| `--out` | `HITL/stage_1_display_v1.html` | 출력 파일. 같은 경로면 덮어쓴다. 상위 폴더는 만들지 않는다 |
|
||||
| `--filing-date` | 없음 | 소제기일 `YYYY-MM-DD`. 주면 파일 값보다 우선 |
|
||||
| `--check-vocab` | 꺼짐 | 어휘 전수 검사만 수행(§10) |
|
||||
| `--check-contract` | 꺼짐 | 입력 계약 검사만 수행(§5.3). HTML을 만들지 않는다. 레지스트리 경로도 필요하다 |
|
||||
| `--print-contract` | 꺼짐 | 생성기가 읽는 변수 목록(`CONTRACT`의 필수·선택 키, 조건·꼴, 스키마 근거)을 마크다운 표로 stdout에 쓰고 끝낸다. 입력·레지스트리가 필요 없다 |
|
||||
|
||||
| 출력 | 내용 |
|
||||
|---|---|
|
||||
| stdout(생성) | `wrote <경로>: facts=N evidence=N urgent=N check=N system=N` |
|
||||
| stdout(검사) | `어휘 검사: 영역 N · 모듈 N · 검토 코드 N · 이름 N → 실패 N`, 이어서 실패 항목 최대 40건 |
|
||||
| stderr 경고 | 소제기일 미입력 / 화면 문자열의 영어 잔존 / 어미 치환 실패 문장. 경고가 있어도 HTML은 생성되고 종료 코드는 0 |
|
||||
| stderr 오류 | 예외 시 Python traceback |
|
||||
| stdout(계약 검사) | `계약 검사 통과: 필수 키 위반 0, 계약 밖 키 N종` |
|
||||
| stderr 경고 | 계약 밖 입력 키 / 소제기일 미입력 / 화면 문자열의 영어 잔존 / 어미 치환 실패 문장. 경고가 있어도 HTML은 생성되고 종료 코드는 0 |
|
||||
| stderr 오류 | 레지스트리 없음, 필수 파일 없음, 필수 키 위반(§5.3)은 `error:` 한 줄과 목록. 그 밖의 예외는 Python traceback |
|
||||
|
||||
| 종료 코드 | 의미 |
|
||||
|---|---|
|
||||
| 0 | 정상(경고 포함) |
|
||||
| 1 | 레지스트리 없음, 예외(입력 파일·필수 키 누락, `--out` 상위 폴더 없음 등), 또는 `--check-vocab` 실패 |
|
||||
| 1 | 레지스트리 없음, 필수 파일 없음, 필수 키 위반, 예외(`--out` 상위 폴더 없음, 잘못된 자료형 등), 또는 `--check-vocab` 실패 |
|
||||
| 2 | 명령줄 인자 오류(argparse) |
|
||||
|
||||
- 출력 파일은 직접 덮어쓴다(원자적 쓰기 아님). 서빙 중인 파일을 갱신할 때는 임시 경로로 `--out`을 지정한 뒤 이동(rename)으로 교체한다.
|
||||
@@ -186,7 +229,7 @@ python3 -I stage_1_display_v1.py --registry <경로> --check-vocab
|
||||
- 한 번에 한 화면만 보인다. 첫 화면은 주소 해시 → `sessionStorage['tab']` → `s1` 순으로 정한다.
|
||||
- 해시는 페이지 로드 때 한 번만 읽는다(`hashchange` 처리 없음). 탭을 눌러도 주소 해시는 바뀌지 않는다.
|
||||
- 탭 목록은 ←/→ 키로 이동한다. Esc는 상세 패널을 닫는다. 입력란에 초점이 있거나 패널이 열려 있거나 Cmd·Ctrl·Alt가 눌린 경우 숫자 단축키는 동작하지 않는다.
|
||||
- 상세 패널(오른쪽 서랍, `role="dialog"`, `aria-modal="true"`)의 종류: `fact`(사실), `bo`(원 기록), `ev`(증거 요지), `party`(사람), `edge`(관계). 패널 안 링크로 서로 이동하고, 상단 경로 표시로 되돌아간다. 닫으면 패널을 연 요소로 초점이 돌아간다.
|
||||
- 상세 패널(오른쪽 서랍, `role="dialog"`, `aria-modal="true"`)의 종류: `fact`(사실), `bo`(원 기록), `ev`(증거 요지), `party`(사람), `edge`(관계). `fact`·`bo`·`ev`에는 계약 밖 키가 있을 때만 '원 자료' 칸이 붙는다(§5.3). 패널 안 링크로 서로 이동하고, 상단 경로 표시로 되돌아간다. 닫으면 패널을 연 요소로 초점이 돌아간다.
|
||||
- 머리글: 제목, `민사송무 원고 대리 에이전트 Liti-agent, 소제기일: YYYY. MM. DD`, 탭.
|
||||
- 다크 모드: `prefers-color-scheme`을 따른다. `<html data-theme="light|dark">`로 강제할 수 있다.
|
||||
- 반응형 기준 폭: 860px, 760px, 560px. 관계도는 최소 폭 900px이며 좁은 화면에서 가로 스크롤된다.
|
||||
@@ -212,10 +255,10 @@ python3 -I stage_1_display_v1.py --registry <경로> --check-vocab
|
||||
|---|---|---|
|
||||
| `summary` | object | `goal`, `constraints[]`, `keyfacts[]`, `plaintiffs[]`, `defendants[{name,note}]`, `n_evidence`, `n_facts`, `n_money`, `n_urgent`, `n_check`, `n_reviews`, `n_system`, `slots{ok,ok2,warn,hot,miss}` |
|
||||
| `clusters` | array | 쟁점 `{id,no,label,plaintiffs,defendants,relief[],watch[]}` |
|
||||
| `facts` | array | 사실 `{id('F-001'),no,date,sort,text,parties[],amount,alt[],rel[],ev[],cred,areas[],modules[],calc,clusters[],flags[],bo{act,kind,action,time,amount}}` |
|
||||
| `evidence` | object | 증거 번호(`E-001`) → `{no,title,type,facts[],dates[],amounts[],parties[]}` |
|
||||
| `facts` | array | 사실 `{id('F-001'),no,date,sort,text,parties[],amount,alt[],rel[],ev[],cred,areas[],modules[],calc,clusters[],flags[],bo{act,kind,action,time,amount,raw?},raw?}`. `raw`는 계약 밖 키가 있을 때만 생긴다(키 → 문자열) |
|
||||
| `evidence` | object | 증거 번호(`E-001`) → `{no,title,type,facts[],dates[],amounts[],parties[],raw?}` |
|
||||
| `req` | object | 쟁점 id → 영역별 `{area,slots[],def[],calc[],rev[],facts[],count{},total}` |
|
||||
| `decisions` | array | `{id('D001'),group('urgent'|'check'),kind('pick'|'source'|'request'|'basic'),order,title,body,items[],choices[],area,facts[],ev[],blocking}` |
|
||||
| `decisions` | array | `{id('D001'),group('urgent'|'check'),kind('pick'|'source'|'request'|'basic'|'contract'),order,title,body,items[],choices[],area,facts[],ev[],blocking}` |
|
||||
| `party` | object | `nodes[{id('P01'),name,group('p'|'d'|'t'|'u'),role,note,deceased,aliases[],clusters[],x,y}]`, `edges[{id('R01'),a,b,values[],facts[],succ,clusters[],n}]`, `claims[{a,b,cluster,label}]`, `w`, `h`, `heads[]`, `headx[]` |
|
||||
| `today` | string | 생성일 `YYYY. MM. DD.`. 화면에는 표시하지 않고 내려받기 파일 첫 줄에 쓴다 |
|
||||
| `filing` | string | 소제기일 `YYYY-MM-DD` 또는 빈 문자열 |
|
||||
@@ -299,6 +342,7 @@ python3 -I stage_1_display_v1.py --registry <경로> --check-vocab
|
||||
| 순서 | 명령·방법 | 통과 기준 |
|
||||
|---|---|---|
|
||||
| 1 | `python3 -I stage_1_display_v1.py --registry <경로> --check-vocab` | `실패 0`, 종료 코드 0 |
|
||||
| 1a | `python3 -I stage_1_display_v1.py --inputs <폴더> --registry <경로> --check-contract` | `필수 키 위반 0`, 종료 코드 0. 계약 밖 키가 있으면 그 키를 `CONTRACT`에 넣을지 판단한다(§12) |
|
||||
| 2 | 생성 실행 | 종료 코드 0. stderr에 영어 잔존·어미 치환 실패 경고가 없다. stdout 건수가 입력과 맞다 |
|
||||
| 3 | 헤드리스 렌더 확인: `chrome --headless=new --virtual-time-budget=4000 --dump-dom "file://<HTML>#s1"` | 결과 DOM에 `class="fact"`(사실 수+1), `class="pn "`(사람 수+1), `class="card dec`(결정·메모 수+1)가 있다. +1은 JS 소스 안의 같은 문자열 |
|
||||
| 4 | 화면 확인 | 5개 화면 전환, 사실·사람·관계 클릭 시 패널, 결정 단추·내려받기 동작 |
|
||||
@@ -320,7 +364,8 @@ python3 -I stage_1_display_v1.py --registry <경로> --check-vocab
|
||||
| L7 | 쟁점의 원고 후보가 `parties.plaintiffs`에 없으면 관계도에서 피고 후보로 표시 | 역할 표시 오류 | `client_goal` 생성 YAML에서 원고 명단 일관성 보장, 또는 생성기 수정 |
|
||||
| L8 | 관계도 노드 이름 11자, 역할 14자 초과 시 줄여 표시 | 긴 이름이 잘린다 | 전체 이름은 툴팁·상세 패널에 표시 |
|
||||
| L9 | 고정 머리글이 약 170px 차지 | 세로가 짧은 화면에서 본문 영역이 줄어든다 | CSS `header.top`의 `position:sticky` 해제로 조정 |
|
||||
| L10 | 생성기 모듈 설명문(독스트링)이 "화면 4개" 등 옛 내용을 적고 있다 | 코드 설명과 이 문서가 다르다 | 이 문서를 기준으로 한다 |
|
||||
| L10 | (해결, 2026-11-23 r3) 생성기 설명문이 "화면 4개" 등 옛 내용 | — | 설명문을 화면 5개·입력 12개로 고침 |
|
||||
| L11 | `CONTRACT`의 `known` 키 목록은 한 사건의 실행 결과에서 뽑았다(증거 항목 35키는 Stage 1 YAML 고정 집합과 같다) | 다른 사건에서는 정상 키도 '계약 밖'으로 알릴 수 있다. 계약 밖 키는 '원 자료'로만 보이고 화면 규칙으로 정리되지 않는다 | 새 실행 결과에서 나온 키를 검토해 `known` 또는 화면 규칙에 넣는다 |
|
||||
|
||||
## 12. 유지보수 지점
|
||||
|
||||
@@ -331,4 +376,5 @@ python3 -I stage_1_display_v1.py --registry <경로> --check-vocab
|
||||
| 결정 선정 규칙 | `build_model()`의 "결정 요청" 블록 |
|
||||
| 용어·이름 표 | `GLOSSARY`, `CE_KO`, `MODULE_KO`, `CODE_WORDS`, `ENDINGS` |
|
||||
| 글자 크기·색 | `CSS` 상수. 화면별 크기 조정은 CSS 끝의 "글자 크기 조정" 블록 |
|
||||
| 입력 계약 | `CONTRACT`(필수·선택·이미 아는 키, 스키마 근거), `FORMAT`(값 꼴 검사), `COND`(필수 키 검사 조건) |
|
||||
| 화면 추가 | `render()`에 `<section class="screen" data-s="sN">`와 탭 단추 추가, JS `TABS` 배열과 `<main>` 순서 갱신, 해시 검사 정규식(`/^s[1-5]$/`) 범위 갱신 |
|
||||
|
||||
+1343
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user