feat(stage2): S2_20 v.2 YAMLs (G1, G2 draft/verify, G3 CU repair) and legal reference PDFs #4

Merged
jhogyu merged 2 commits from stage2/s2-20-index-coverage-build into main 2026-10-28 12:26:54 +00:00
Owner

Summary

Adds the S2_20 v.2 agent YAMLs, built in stages, plus the legal reference PDFs used to write them.

  • Stage_2_S2_20_G1.yml — G1, T0 prepare: input binding and snapshot, index load with sha check, coverage check, the three CU bundle layers, status decision, and item/packet output.
  • Stage_2_S2_20_G1_G2.yml — G1 + G2, CU drafting and checking:
    • T2a/T2b draft each CU with gpt-6.1-sol. They share prompts and the cache key S2_20:v2:draft.
    • T3a/T3b check each draft (V1–V9).
    • T1 loads the remaining CUs.
  • Stage_2_S2_20_G1_G2_G3.yml — G1 + G2 + G3, CU repair:
    • T4p loads the CUs marked REPAIR and builds a repair packet (block 4).
    • T4 is the repair LLM. It uses the same prompt prefix and cache key as T2.
    • T3c re-checks the repaired draft. It runs the T3 code with stage=repair and adds a scope check. A CU that still fails becomes HOLD.
    • task_procedure encodes the G1 → G2 → G3 graph and ends at OUT.
    • Packet limit is 260,000 chars, matching the backend preflight per-file limit (env override). The total limit is still 500,000.
  • 작업구조도설계_S2_20_v.2.md is the design doc. The superseded YAML is kept as Stage_2_S2_20_outdated_kept.yml. The PR also includes the 10-28 work history and the MEMORY.md entries for G2 and G3.
  • Reference PDFs: chapter PDFs from 주석 민법 (418 files, about 223MB) and 주석 상법 (2 files), in their own commit.

Stage_2_S2_20_G1.yml, Stage_2_S2_20_G1_G2.yml and design v.2 §5.2 still use the older 240,000 limit on purpose. Only the G1_G2_G3 file uses 260,000.

Testing

  • Local harnesses only. All cases in the G3 harness, including the review-fix cases, give the expected results. The G2 harness output is unchanged after the G3 changes.
  • Two independent review rounds were run on G3, and their fixes are applied.
  • I scanned the text files for secrets, local paths and IPs and found none.
  • Not yet run online. These probes are still open:
    • P11: does T4 hit T2's prefix cache?
    • P10: the {{prev}} key format in chain tasks.
    • Does verify_repair_* run, and are the waits released, when the repair LLM call fails?
    • P2, P3, P4 and P6.

🤖 Generated with Claude Code

## Summary Adds the S2_20 v.2 agent YAMLs, built in stages, plus the legal reference PDFs used to write them. - **`Stage_2_S2_20_G1.yml`** — G1, T0 `prepare`: input binding and snapshot, index load with sha check, coverage check, the three CU bundle layers, status decision, and item/packet output. - **`Stage_2_S2_20_G1_G2.yml`** — G1 + G2, CU drafting and checking: - T2a/T2b draft each CU with `gpt-6.1-sol`. They share prompts and the cache key `S2_20:v2:draft`. - T3a/T3b check each draft (V1–V9). - T1 loads the remaining CUs. - **`Stage_2_S2_20_G1_G2_G3.yml`** — G1 + G2 + G3, CU repair: - T4p loads the CUs marked REPAIR and builds a repair packet (block 4). - T4 is the repair LLM. It uses the same prompt prefix and cache key as T2. - T3c re-checks the repaired draft. It runs the T3 code with `stage=repair` and adds a scope check. A CU that still fails becomes HOLD. - `task_procedure` encodes the G1 → G2 → G3 graph and ends at `OUT`. - Packet limit is 260,000 chars, matching the backend preflight per-file limit (env override). The total limit is still 500,000. - **`작업구조도설계_S2_20_v.2.md`** is the design doc. The superseded YAML is kept as `Stage_2_S2_20_outdated_kept.yml`. The PR also includes the 10-28 work history and the MEMORY.md entries for G2 and G3. - **Reference PDFs**: chapter PDFs from 주석 민법 (418 files, about 223MB) and 주석 상법 (2 files), in their own commit. `Stage_2_S2_20_G1.yml`, `Stage_2_S2_20_G1_G2.yml` and design v.2 §5.2 still use the older 240,000 limit on purpose. Only the G1_G2_G3 file uses 260,000. ## Testing - Local harnesses only. All cases in the G3 harness, including the review-fix cases, give the expected results. The G2 harness output is unchanged after the G3 changes. - Two independent review rounds were run on G3, and their fixes are applied. - I scanned the text files for secrets, local paths and IPs and found none. - **Not yet run online.** These probes are still open: - P11: does T4 hit T2's prefix cache? - P10: the `{{prev}}` key format in chain tasks. - Does `verify_repair_*` run, and are the waits released, when the repair LLM call fails? - P2, P3, P4 and P6. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jhogyu added 2 commits 2026-10-28 12:19:48 +00:00
- Stage_2_S2_20_G1.yml: T0 prepare (input binding, index load, coverage, CU packets)
- Stage_2_S2_20_G1_G2.yml: CU drafting and verification (T2a/T3a/T1/T2b/T3b, gpt-6.1-sol)
- Stage_2_S2_20_G1_G2_G3.yml: CU repair loader, repair LLM and re-verification
  (T4p/T4/T3c); packet limit 260,000 chars to match the backend preflight limit
- 작업구조도설계_S2_20_v.2.md design doc, work history, previous YAML kept as outdated
- MEMORY.md entries for G2 and G3

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jhogyu merged commit 6ee013d83b into main 2026-10-28 12:26:53 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jhogyu/Liti-agent-Development#4