from research import *
s=begin(1346,'Assemble the connected main manuscript','Does the chapter sequence form one complete explanatory account?',{},['C1332–C1345'])
paths=['01_opening','02a_row_examples','02b_whole_fields','03_regular_kernel','04a_SP_cap','04b_SP_rectangle','05a_Moses_blocks','05b_Moses_residuals','06a_inverse_backbone','06b_Keys','07_Covenant','08a_counts','08b_NT_grouping','09_synthesis']
chunks=[(ROOT/('draft/'+p+'.md')).read_text().strip() for p in paths]
t='\n\n'.join(chunks)+'\n'
t=t.replace('exact \\(129+801\\)','strict Actual \\(129+801\\)')
a=artifact('draft/Connected_Explanation_v1.md',t)
b=artifact('model/main_v1_section_bindings.json',json.dumps([{'path':'draft/'+p+'.md','sha256':hashlib.sha256((ROOT/('draft/'+p+'.md')).read_bytes()).hexdigest()} for p in paths],indent=2)+'\n')
finish(s,{'manuscript':a,'sections':b,'words':len(t.split())},'The first complete manuscript now follows the mechanisms from source rows through the six family reconstructions and ends with the precise next transfer question.','Audit the nine reader obligations against the complete draft.',{'fourteen_parts':len(paths)==14,'one_title':sum(x.startswith('# ') for x in t.splitlines())==1,'reader_length':4500<len(t.split())<7500})
