Files
jhogyuandClaude Opus 5.5 4bee20a5eb feat(appendix): apply decision-record fixes for 4 rule docs and add C12 record_ids check
- appx_clean.py: accept numbered-heading ID definitions (R_DEF_NUM), add
  record_ids exemption with C12 guard, OLD_WORDING_ROW flag
- Apply revised decisions for 4 docs (old ones kept as dec_outdated), rebuild
  outputs, update _요약.md rows
- _new folder: 137-doc rebuild, item probe, 판단기록_수정.md
- Sync prompt §5-1 ID regex and appx_brief.md b2 with script R_ID
- MEMORY.md entries for 10-27 work

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 11:40:15 +09:00

22 lines
5.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Appendix-cleanup brief (one KEY per agent)
Repo root (your cwd; NEVER `cd` anywhere else — a `cd` into ROOT or its subfolders makes the harness create a stray `.claude/` folder that breaks check C1; use absolute or repo-relative paths only):
/Users/hogyujhang/Library/CloudStorage/Dropbox/Business/Eroom AI Partners/Legal POC portfolio/민사에이전트-사해행위취소및대여금청구/POC - Law-aid Agent/프롬프트/prompt_updates_sequential
ROOT = "Default_Agent_청구취지기재방법/0 청구취지규칙문서_전체모음" (relative to repo root). Filenames on this volume are NFD; compare with unicodedata.normalize("NFC", …).
Read first:
1. The procedure: Case_02_Comparison_Research/YAML_Prompts/2. Stage_2/Default_Agent/Stage_2_Clean/agent_scripts/최적색인방식전_청구취지규칙문서_정리_프롬프트_Opus.md (all of it).
2. The script docstring: ROOT/appx_clean.py (top ~25 lines explain the DEC.json format). Do NOT modify the script.
3. Example decision files for style: ROOT/appx_decisions/매매대금청구.dec.json, ROOT/appx_decisions/보관금청구.dec.json (a name-variant reference "부록 B 규칙 연결표" resolved to a differently named section), ROOT/appx_decisions/분양권확인청구.dec.json (body type codes like "B1~B8" classified NOT_REF).
Steps:
a. WORK = $TMPDIR/appx_work/KEY (mkdir -p). Run: python3 "ROOT/appx_clean.py" inv "ROOT" KEY "$WORK" → read WORK/KEY.inv.json (sections with default verdicts, refs, IDs).
b. Read the raw file ROOT/raw/청구취지작성규칙_KEY_beta_0.8.md (or _beta_0.8_re.md) appendix B sections as needed and decide each 부록 B 하위 절: KEEP_SECTION (path–form correspondence content: LEAF↔FORM 경로–문형 대응, including differently named sections that body text points to as an application target), KEEP_ITEMS (only ID definition items that the kept text uses but are defined only in a discarded section — check "ID는/은" sentences and table first cells, even in "실행 지시 아님" sections), DISCARD (production records). Classify every reference in refs (APPLY / RECORD / RAW_DANGLING / NOT_REF) with a target heading line exactly as in the raw. No `patches` key, except the §4.7 baseline-date patch: if the body or 부록 A relies on a review/execution baseline date ("v2 법률 검토 기준일 현재", "실행 기준일", "부록 B에 승계한 v2 검토시점", "검토일은 부록 B 승계 정보") and that date exists only in a section you OMIT/DROP, add ONE patch that appends "(실행 기준일 YYYY-MM-DD)" to the referring 부록 A sentence (or, if none, one sentence after the 부록 A intro status sentence), exactly as prompt §4.7 says. Example already applied: appx_decisions/손해배상의청구.dec.json last patch. Never edit the body. Report the date and its raw location.
b2. KEEP_ITEMS notes (script 2026-10-27): rows whose "잔여…" column is not 없음/—/-/blank are kept automatically (C11 verifies), `items` is optional, and the fixed line under a kept heading is chosen automatically (residue rows only / named items only / both). C5 also accepts mid-line definition markers ("(IMP-04, 원문 217행)", "LC-05:", "효과: RULE-09 (피고)", heading-end "(`RULE-G-06`)", numbered heading "### 4.2 RULE-RES-03 — …"), so never keep production-history items that carry old instruction wording ("이전:" lines, or table rows whose "원문 … 문구" cell quotes an old execution instruction the current rules replaced) just to satisfy C5; if the body uses such an ID only as a record pointer ("부록 B.6 X-2"), put it in the decision's `record_ids` {ID: why} instead (C12 checks every use sits right after a 부록 B reference); OLD_WORDING_ROW flags mark kept rows from tables with a "원문 … 문구" column — say in `why` whether the quoted wording still matches the current rules; if C5 still fails, keep only the smallest item for that ID and report it. The inventory ID regex (same R_ID as the script) blocks only a following letter, digit, `_` or `-`, so IDs followed directly by a Korean particle ("O-21의", "LC-05는") are caught; no hand check is needed for them.
c. Write the decision file to ROOT/appx_decisions/KEY.dec.json (if one already exists, stop and report instead of overwriting).
d. Run: python3 "ROOT/appx_clean.py" build "ROOT" KEY "$WORK" "ROOT/appx_decisions/KEY.dec.json". All checks C1–C12 must be true and flags empty or explained. If a check fails, fix the decision file (never the script, never the output by hand) and rebuild. Other agents are building other KEYs in parallel into the same output folder; C1 only checks that folder holds no stray non-rule files, so that is fine.
e. Verify: output ROOT/청구취지규칙문서_사건종류별_부록정리/청구취지작성규칙_KEY.md contains no "http"; `find ROOT -name .claude` shows nothing new (one pre-existing one under 청구취지규칙문서_사건종류별 dated Oct 23 is known — ignore it); no secrets.
f. Do NOT edit _요약.md or MEMORY.md (the main session does).
Report (concise): build JSON line (checks, actions, chars), raw→output chars, each 부록 B section's action with one-line reason, OMIT/KEEP_ITEMS details, any name-variant references you resolved, any RAW_DANGLING, and — important — list any DROPped or OMITted section that contains real legal content (unresolved issues, unverified holdings, conflicts, review dates, general caveats like "후속 변경 미확인" that apply to all cited cases, old order wording) that nothing points to, and say whether that content also survives in the body or appendix A (search the output for it; count, don't guess), so a human can review it. Do not print any tokens/keys.