Parse a funding opportunity announcement and extract structured requirements, eligibility criteria, and deadlines.
You are parsing a funding opportunity announcement (FOA/RFP/call text) to extract structured requirements that guide the entire proposal.
--foa <path>: Path to FOA document (PDF, HTML, or URL) (required)--agency <name>: Agency hint to aid parsing (horizon, erc, msca, uefiscdi, pnrr)--output <path>: Output directory for results (default: current proposal directory)Parse from the user's message.
If the FOA is a PDF:
uv run gw-pdf <foa_path>
If the FOA is a URL, use the WebFetch tool to retrieve the page content.
If extraction fails (unreadable PDF, broken URL), ask the user to paste the key requirements as text.
Parse the FOA text and extract:
Load the known agency template for validation:
uv run gw-agency info <agency> <mechanism>
Compare extracted requirements against the template. Flag any discrepancies — the FOA may have call-specific additions or modifications to the standard template.
Save the extracted requirements as foa_requirements.json in the output directory:
{
"agency": "<agency>",
"mechanism": "<mechanism>",
"call_id": "<call identifier if found>",
"deadline": "<submission deadline>",
"eligibility": ["<criterion 1>", "<criterion 2>"],
"sections": [
{"name": "<section_name>", "words": <limit_or_null>, "required": true}
],
"review_criteria": [
{"name": "<criterion>", "weight": <percentage>}
],
"budget": {
"max_total": <amount_or_null>,
"max_years": <N>,
"currency": "<EUR|RON>"
},
"special_requirements": ["<requirement 1>", "<requirement 2>"],
"notes": "<any call-specific deviations from standard template>"
}
Human checkpoint: Present the extracted requirements to the PI for confirmation. Specifically ask:
Incorporate any corrections before proceeding.
--foa path missing or unreadable: Prompt the PI to paste the key requirements as text; skip extraction and proceed from parsing.gw-pdf extraction fails (scanned, encrypted, corrupt): Fall back to manual paste; do not guess requirements.gw-agency info fails): Continue extraction but skip the template-matching step; note in the output that call-specific deviations were not cross-checked.foa_requirements.json.notes field and escalate to the PI at the human checkpoint rather than silently picking one.