MCPcopy Create free account
hub / github.com/Ishabdullah/Codey-v2 / extract_doc_needs

Function extract_doc_needs

core/recursive.py:184–196  ·  view source on GitHub ↗

Extract NEED_DOCS markers from critique text for targeted retrieval. The model should emit lines like: NEED_DOCS: Flask error handler decorator syntax Returns the joined query string, or None if no markers found.

(critique: str)

Source from the content-addressed store, hash-verified

182
183
184def extract_doc_needs(critique: str) -> Optional[str]:
185 """
186 Extract NEED_DOCS markers from critique text for targeted retrieval.
187
188 The model should emit lines like:
189 NEED_DOCS: Flask error handler decorator syntax
190
191 Returns the joined query string, or None if no markers found.
192 """
193 matches = re.findall(r'NEED_DOCS:\s*(.+?)(?:\n|$)', critique, re.IGNORECASE)
194 if matches:
195 return " ".join(m.strip() for m in matches)
196 return None
197
198
199_CRITICAL_MARKERS = [

Callers 1

recursive_inferFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected