import json, sys
sys.stdout.reconfigure(encoding='utf-8', errors='replace')
p=r"C:\Users\epilectrik\.claude\projects\C--git-bt411\09bf24bb-f92d-423a-b815-1eb662736f58\subagents\workflows\wf_1f336584-654\journal.jsonl"
for line in open(p,encoding='utf-8'):
    try: o=json.loads(line)
    except: continue
    if o.get('type')!='result': continue
    r=o.get('result')
    if not isinstance(r,dict): continue
    if 'order' in r and 'verdict' in r:
        print('#'*70); print('SYNTHESIS PLAN'); print('#'*70)
        print('\n[verdict]', r.get('verdict'))
        for k in ['order','turnkey','reconstruction','deep','dependencies','traps']:
            v=r.get(k)
            if not v: continue
            print('\n['+k+']')
            for i,x in enumerate(v): print('  %d. %s'%(i+1,x))
    if 'cluster' in r:
        print('\n'+'='*70); print('CLUSTER:', r.get('cluster','')[:80], '| conf:', (r.get('confidence','') or '')[:120])
        for it in (r.get('items') or []):
            print('  ITEM:', (it.get('item','') or '')[:150])
            if it.get('risk'): print('    risk:', it.get('risk','')[:200])
            for f in (it.get('functions') or []):
                print('    fn:', f.get('name','?'), '@', (f.get('address','') or '')[:30], '(%d chars)'%len(f.get('cpp','') or ''))
