# Proposal Template

Canonical template for Horizon Europe RIA/IA proposals, designed for use with ProposalEngine.

## Quick Start

1. Copy this directory for a new proposal
2. Fill in `.proposalengine.json` with project details
3. Parse the call text into `.call/requirements.json`
4. Configure consortium in `.config/consortium.json`
5. Write sections in `src/` directories
6. Run validation and review cycles
7. Build the final PDF

## Directory Structure

```
proposal-template/
├── .proposalengine.json     # Project configuration
├── .call/                   # Parsed call requirements
│   ├── requirements.json    # Structured call data
│   └── template-schema.json # JSON schema for requirements
├── .config/                 # Proposal configuration
│   ├── consortium.json      # Partner details
│   ├── budget-rules.json    # EU funding rules
│   └── generation-config.yaml # AI generation settings
├── src/                     # Proposal sections (Part B)
│   ├── 01-excellence/       # Section 1: Excellence
│   ├── 02-impact/           # Section 2: Impact
│   ├── 03-implementation/   # Section 3: Implementation
│   ├── 04-consortium/       # Consortium descriptions
│   ├── 05-budget/           # Budget tables and justification
│   └── 06-ethics-gender/    # Ethics and gender
├── reviews/                 # Review results and outcome tracking
├── build/                   # Build output (gitignored)
└── reference/               # Official HE templates
```

## Section Metadata

Each section directory contains a `_meta.json` file tracking:
- **status**: `empty` → `draft` → `reviewed` → `final`
- **word_count** / **word_limit**: Progress tracking
- **confidence**: AI-assessed quality score (0.0–1.0)
- **dependencies**: Sections this section depends on
- **patterns_used**: Knowledge library patterns applied
- **review_score**: Latest simulated ESR score

## Configuration

### `.proposalengine.json`
Main project configuration. Set your call ID, budget, consortium, and AI generation preferences.

### `.config/generation-config.yaml`
Per-section AI generation parameters (temperature, guidance, token limits).

### `.call/requirements.json`
Parsed call requirements. Populate using the call-parser prompt or MCP tool.

## Workflow

1. **Parse Call** → Populate `.call/requirements.json`
2. **Configure** → Set `.proposalengine.json` and `.config/` files
3. **Generate** → AI generates section drafts using knowledge library
4. **Validate** → Check cross-references, word counts, KPI consistency
5. **Review** → Simulated ESR evaluation with multiple personas
6. **Iterate** → Refine based on review feedback
7. **Build** → Generate final PDF via Pandoc
