"""Prompt templates for the gap-to-draft generation pipeline."""

from __future__ import annotations

OUTLINE_PROMPT_V2 = """\
You are writing an IETF Internet-Draft to address a gap in the AI/agent standardization landscape.

## Gap to Address
Topic: {gap_topic}
Description: {gap_description}
Category: {gap_category}
Evidence: {gap_evidence}
Severity: {gap_severity}

## Convergent Ideas from Existing Drafts
These ideas from the current landscape converge on this topic — build on them, don't duplicate:
{convergent_ideas}

## RFC Foundations
Most-referenced RFCs in this space — cite where relevant:
{rfc_foundations}

## Similar Existing Drafts
These drafts are closest to this gap — differentiate from them:
{similar_drafts}

## Top-Rated Drafts in Category
Drafts the community considers strong in this area:
{top_rated}

## Working Group Context
{wg_context}

## Ecosystem Vision
{ecosystem_vision}

## Sibling Drafts (same family)
{sibling_context}

Generate a detailed outline for an Internet-Draft that fills this gap.
Return JSON:
{{
  "title": "full draft title",
  "abstract": "150-250 word abstract",
  "sections": [
    {{"title": "section title", "summary": "2-3 sentence summary of content", "key_ideas": ["idea titles to incorporate"]}}
  ],
  "normative_refs": ["RFC NNNN", "draft-name"],
  "informative_refs": ["RFC NNNN", "draft-name"],
  "terminology": {{"term": "definition"}},
  "target_wg": "suggested IETF working group",
  "intended_status": "informational|standards-track|experimental"
}}

Requirements:
- Include standard sections: Introduction, Terminology, Problem Statement, then 2-4 technical sections, Security Considerations, IANA Considerations
- Reference specific RFCs and drafts from the context above
- Use terminology consistent with sibling drafts if any
- Abstract should clearly state the problem, approach, and contribution
JSON only, no fences."""

SECTION_PROMPT_V2 = """\
Write the following section of an Internet-Draft titled "{draft_title}".

Abstract: {abstract}

Full outline:
{outline_text}

Write section {section_num}: {section_title}
Summary: {section_summary}

## Relevant Ideas to Incorporate
{relevant_ideas}

## RFC References to Cite
{rfc_refs}

## Cross-References to Sister Drafts
{cross_refs}

## Terminology
{terminology}

Follow IETF Internet-Draft conventions:
- Formal, precise technical language
- Use RFC 2119 keywords (MUST, SHOULD, MAY) where appropriate
- Reference existing RFCs and drafts where relevant (use [RFCNNNN] format)
- 3-6 paragraphs per section
- Use the terminology definitions provided above consistently

Write the section content only (no section number or title). Plain text."""
