from research import *
s=begin(1341,'Integrate the Key chapter','How do calibrated measures and anchored placement connect?',{},['prep/final_inverse_keys_draft.md','C1299','C1337'])
src=(ROOT/'prep/final_inverse_keys_draft.md').read_text()
t='## Calendar Keys preserve a declared measure\n\n'+src[src.index('The Keys explain how another kind'):src.index('These connections give the Strategy')]
intro='Placement is specified by a held anchor: \\(D_{k,a}(x)=a+k(x-a)\\). This acts on a distance from the anchor, not a naked BC date. Source units, moving components and anchor together define the chronological comparison.\n\n'
pos=t.index('For the appointed E route')
t=t[:pos]+intro+t[pos:]
a=artifact('draft/06b_Keys.md',t)
finish(s,{'chapter':a,'words':len(t.split())},'The Key chapter connects common modeled day-volume to anchored chronological paths, preserving rational intermediate positions and the distinction between total completion and integer-grid completion.','Integrate the Covenant chapter while moving rank detail to the companion.',{'three_factors':all(x in t for x in ['25/23','70/69','300/299']),'anchor_formula':'D_{k,a}' in t})
