"""Gate-only additions for the v22 selective-read protocol. Skim, memory update, and final-answer behavior remain the v7 read-all protocol. The only new learned action is a focused READ/SKIP decision. """ try: from .protocol_v5 import TEMPLATE_FINAL, TEMPLATE_SKIM, TEMPLATE_UPDATE_READALL except ImportError: # Script execution with selective/ on PYTHONPATH. from protocol_v5 import TEMPLATE_FINAL, TEMPLATE_SKIM, TEMPLATE_UPDATE_READALL TEMPLATE_FOCUSED_BINARY_READ_POST_OUTLINE = """Below is a global outline of a long document, one gist per section: {total_sections} {outline} A user will ask the following question about the document: {prompt} Decide whether the focused section should be read in full during the second pass. Output READ when the section contains, or is likely to contain, factual evidence useful for answering the question, including direct answer evidence, entity identity, aliases, attributes, and multi-step bridge facts. Output SKIP when the section is unrelated or would not add useful evidence. Use the whole outline to interpret the focused entry. Do not enforce a fixed number or fraction of READ decisions; classify this section independently. Classify this section: {focus_section} {focused_entry} Output exactly READ or SKIP and nothing else. """