from pathlib import Path
p=Path('/opt/struktur/social-media-agent/publish_ready.py'); s=p.read_text()
old=''' policy_violation = _mas_policy_violation(combined)
if policy_violation:
return QualityAssessment(False, policy_violation)
if any(term in low for term in AGENT_LANGUAGE_TERMS):
return QualityAssessment(False, "agent_language")'''
new=''' if any(term in low for term in AGENT_LANGUAGE_TERMS):
return QualityAssessment(False, "agent_language")
policy_violation = _mas_policy_violation(combined)
if policy_violation:
return QualityAssessment(False, policy_violation)'''
assert s.count(old)==1; p.write_text(s.replace(old,new)); print('preserved AA-009 agent-language reason')