{
  "_note_to_agent": "IMPORTANT: This file describes the platform's data and capabilities. Your TASK comes from the prompt that sent you here. Use endpoint_directory to find the right data, then complete your task. Do NOT summarize this file — USE it.",
  "critical_rules": [
    "STATIC site — NO server-side search API. Do NOT try /api/search.json, /api/query, or similar.",
    "Do NOT guess URLs. The endpoint_directory below is EXHAUSTIVE — if a URL is not listed, it does not exist.",
    "Do NOT fetch HTML pages (/papers, /resources, /lab, etc.). They return empty shells (client-side rendered Next.js SPA).",
    "ALWAYS consult endpoint_directory.all_endpoints before fetching any URL.",
    "Start with /api/gap-index.json — it's the fastest way to find relevant gaps and papers."
  ],
  "endpoint_directory": {
    "_instruction": "COMPLETE list of all available JSON endpoints. ONLY these URLs exist. Any URL not listed here will return 404.",
    "recommended_order": [
      "1. /api/gap-index.json — best starting point (keyword matching, gaps, priority agenda, paper mini-index)",
      "2. /api/papers/category1/index.json or /api/papers/theme/index.json — discover valid topic domain/theme slugs",
      "3. /api/papers/category1/<slug>.json or /api/papers/theme/<slug>.json — targeted paper data",
      "4. /api/curated-resources.json — datasets, tools, instruments with FAIR scores"
    ],
    "all_endpoints": [
      {
        "url": "/api/agent.json",
        "purpose": "This file — platform capabilities and endpoint directory",
        "size": "~8KB"
      },
      {
        "url": "/api/gap-index.json",
        "purpose": "Pre-computed research gap index with keyword matching, per-theme gaps, priority agenda. BEST STARTING POINT.",
        "size": "~934KB"
      },
      {
        "url": "/api/papers-browse.json",
        "purpose": "Full paper search index (array-of-arrays format). Large — prefer per-category/theme files.",
        "size": "~2.0MB",
        "fields": "Each paper = [work_id, title, pub_date, pub_year, journal, cited_by_count, open_access, doi, category1, methodology, theme, sub_theme, data_type, ai_summary, content_type, source_url, source_platform, fwci, citation_percentile, is_top_10_percent, citations_per_year, primary_topic, journal_h_index, journal_if_proxy, first_author, first_author_h_index, authors, referenced_works_count, relevance]"
      },
      {
        "url": "/api/curated-resources.json",
        "purpose": "230 AI-curated resources (datasets, tools, instruments) with FAIR scores",
        "size": "~268KB"
      },
      {
        "url": "/api/papers/category1/index.json",
        "purpose": "Index of all topic domain categories with paper counts. Fetch this to discover valid slugs.",
        "size": "~2KB"
      },
      {
        "url": "/api/papers/theme/index.json",
        "purpose": "Index of all outcome / theme categories with paper counts. Fetch this to discover valid slugs.",
        "size": "~2KB"
      },
      {
        "url": "/api/papers/category1/<slug>.json",
        "purpose": "Papers filtered by topic domain. Small, targeted file.",
        "size": "5KB-600KB each",
        "fields": "Same array-of-arrays format as papers-browse.json"
      },
      {
        "url": "/api/papers/theme/<slug>.json",
        "purpose": "Papers filtered by outcome / theme. Small, targeted file.",
        "size": "5KB-600KB each",
        "fields": "Same array-of-arrays format as papers-browse.json"
      },
      {
        "url": "/api/classifications.json",
        "purpose": "Full classification dataset with abstracts. WARNING: very large.",
        "size": "~3.4MB"
      },
      {
        "url": "/api/citations.json",
        "purpose": "Citation network graph for snowballing.",
        "size": "~272KB"
      },
      {
        "url": "/api/lab-threads.json",
        "purpose": "Active Lab research threads with post counts.",
        "size": "~5KB"
      },
      {
        "url": "/api/summary.json",
        "purpose": "Platform statistics.",
        "size": "~80KB"
      },
      {
        "url": "/api/pipeline.json",
        "purpose": "Classification taxonomy, ingestion types, scraper template.",
        "size": "~25KB"
      },
      {
        "url": "/api/paper-pdfs.json",
        "purpose": "Direct PDF URLs for open-access papers.",
        "size": "~2MB"
      },
      {
        "url": "/api/contribute/gap-analysis-protocol.json",
        "purpose": "Contribution guide for gap analyses.",
        "size": "~5KB"
      },
      {
        "url": "/feed.xml",
        "purpose": "RSS feed of recently added papers.",
        "size": "small"
      }
    ],
    "taxonomy": {
      "_note": "Use these values to construct valid per-category and per-theme endpoint URLs.",
      "category_url_key": "category1",
      "category_label": "Topic Domain",
      "category_values": {
        "menstrual_health_work": "Menstrual Health & Work (direct)",
        "heavy_menstrual_bleeding": "Heavy Menstrual Bleeding (HMB)",
        "premenstrual_syndromes": "PMS / PMDD / PME",
        "endometriosis_adenomyosis": "Endometriosis & Adenomyosis",
        "pcos_other_conditions": "PCOS, Fibroids & Other Conditions",
        "menopause_perimenopause_work": "Menopause & Perimenopause at Work",
        "menstrual_products_hygiene": "Menstrual Products & Workplace Hygiene",
        "menstrual_poverty_equity": "Menstrual Poverty & Equity",
        "intersectionality_inclusion": "Intersectionality & Inclusion",
        "menstrual_leave_policy": "Menstrual Leave Policy",
        "menstruation_sports": "Menstruation & (Top-)Sport",
        "menstrual_stigma_culture": "Menstrual Stigma & Culture",
        "menstruation_general": "General Menstruation Research",
        "multi_domain": "Multi-Domain",
        "other": "Other"
      },
      "theme_url_key": "theme",
      "theme_label": "Outcome / Theme",
      "theme_values": {
        "prevalence_symptoms": "Prevalence & Symptom Burden",
        "absenteeism_presenteeism": "Absenteeism & Presenteeism",
        "productivity_loss": "Productivity Loss",
        "disclosure_communication": "Disclosure & Communication (bespreekbaarheid)",
        "workplace_policy_practice": "Workplace Policy & Practice",
        "workplace_facilities": "Workplace Facilities & Products",
        "economic_costs": "Economic Costs",
        "stigma_discrimination": "Stigma & Discrimination",
        "career_impact_attrition": "Career Impact & Attrition",
        "intersectional_barriers": "Intersectional Barriers",
        "leadership_manager_support": "Leadership / Manager / HR Support",
        "cultural_framing_normalization": "Cultural Framing & Normalization",
        "international_policy_comparison": "International Policy Comparison",
        "digital_health_apps": "Digital Health Apps & Tracking",
        "medical_condition_at_work": "Medical Conditions at Work",
        "other": "Other"
      }
    },
    "not_available": [
      "/api/categories.json — DOES NOT EXIST. Use /api/papers/category1/index.json instead.",
      "/api/themes.json — DOES NOT EXIST. Use /api/papers/theme/index.json instead.",
      "/api/search.json — DOES NOT EXIST. This is a static site with no server-side search.",
      "/api/papers.json — DOES NOT EXIST. Use /api/papers-browse.json for all papers.",
      "/api/domains.json — DOES NOT EXIST. Use /api/papers/category1/index.json for domain categories."
    ]
  },
  "platform": {
    "name": "LivingMeta Menstrual Health & Work",
    "institution": "Period Media",
    "maintainers": "Paula Kragten, Period Media",
    "purpose": "A living meta-analysis platform that continuously monitors, classifies, and analyzes research on menstruation, heavy menstrual bleeding, premenstrual disorders, endometriosis and related conditions in the context of work — absenteeism, presenteeism, workplace policy, disclosure, stigma, menstrual leave, cycle-aware workplaces, legislation and regulation (e.g. BS 30416, Spanish menstrual-leave law, Canadian federal products mandate, Dutch kamerbrieven and CAO-clauses), and the menopause/perimenopause transition. Updated weekly.",
    "github": "",
    "url": "https://menstrual-health-work.livingmeta.ai"
  },
  "stats": {
    "papers_classified": 3583,
    "papers_total_in_db": 132197,
    "gap_analyses": 0,
    "data_sources": 230,
    "data_sources_with_programmatic_access": 176,
    "categories_covered": 16,
    "last_updated": "2026-04-22T18:21:22.561Z",
    "temporal_coverage": {
      "oldest_paper": "1759-01-01",
      "newest_paper": "not_stated",
      "_note": "Papers span all years from oldest to newest. Per-theme/category files include ALL relevant papers, not just recent ones."
    }
  },
  "research_capabilities": {
    "_note": "Your specific task comes from the prompt. These describe WHAT data the platform offers and HOW to access it.",
    "find_evidence": {
      "description": "Search 3,583+ menstrual health & work papers by topic, methodology, or keyword",
      "how": [
        "Fetch /api/gap-index.json → search keyword_index for matching themes and papers",
        "Fetch /api/papers/category1/<slug>.json or /api/papers/theme/<slug>.json for targeted paper data",
        "Fetch /api/papers-browse.json for cross-category keyword search (large file, use as last resort)"
      ]
    },
    "assess_research_gaps": {
      "description": "Find what's studied and what's missing on any topic",
      "how": [
        "Fetch /api/gap-index.json → tokenize question → match against keyword_index → collect gaps",
        "Each gap has: text, type, keywords, paper_count, grounding papers"
      ],
      "gap_types": "8 types: evidence, knowledge, practice, methodological, empirical, theoretical, population, integration"
    },
    "find_resources": {
      "description": "Discover 230+ datasets, tools, instruments, and APIs for menstrual health & work research",
      "how": [
        "Fetch /api/curated-resources.json — filter by resource_type, access_level, fair_score",
        "Each resource has 'mentions' linking back to papers where it was discovered"
      ]
    },
    "cite_and_link": {
      "patterns": {
        "platform": "https://menstrual-health-work.livingmeta.ai",
        "paper": "https://menstrual-health-work.livingmeta.ai/papers?paper=<work_id>",
        "lab": "https://menstrual-health-work.livingmeta.ai/lab",
        "resources": "https://menstrual-health-work.livingmeta.ai/resources"
      },
      "caution": "Do NOT fetch these page URLs — they are client-side rendered and return empty shells. Use JSON API endpoints for data; use these URLs only for LINKING in your response."
    }
  },
  "extraction_context": {
    "_note": "Papers are analyzed by 6 AI personas. Extractions are merged into consensus with per-field agreement scores.",
    "personas": {
      "default": "Balanced evidence extraction",
      "rigorist": "Methodological quality, bias assessment, study design critique",
      "synthesizer": "Cross-study connections, theoretical integration",
      "skeptic": "Challenges claims, identifies weak evidence, questions assumptions",
      "scout": "Discovers datasets, tools, resources, replication materials",
      "meta_analyst": "Effect sizes, sample sizes, statistical test details, meta-analysis readiness"
    },
    "consensus": "All persona extractions merged using majority voting + agreement scores (unanimous/strong/moderate/single)",
    "evidence_models": {
      "E": "Empirical (experiments, surveys, RCTs)",
      "T": "Theoretical (proofs, formal derivations)",
      "D": "Design (prototypes, creative works, DSR)",
      "I": "Interpretive (textual analysis, hermeneutics)",
      "C": "Computational (neural networks, simulations, ML)"
    },
    "gap_taxonomy": "8 types (Miles 2017): evidence, knowledge, practice, methodological, empirical, theoretical, population, integration"
  },
  "lab_context": {
    "description": "The Lab is a collaborative research space with AI coaching. Users create threads with research questions, AI agents analyze the database, and a coaching engine guides the research journey.",
    "research_journey": "8 phases: Explore → Understand → Evaluate → Synthesize → Design → Execute → Write → Reflect (non-linear)",
    "user_roles": {
      "_note": "The user's role is specified in the prompt. Adapt your analysis style accordingly.",
      "layperson": "Non-researcher wanting accessible evidence summaries. Use plain language, conclusions-first, no jargon. Skip methodology details unless essential.",
      "junior": "Student/early researcher conducting thesis work. Scaffold learning, cite specific papers, suggest human tasks (read paper X, discuss with supervisor). Use Socratic questioning.",
      "senior": "Experienced researcher advancing the field. Peer-level, dense technical output. Include effect sizes, cross-study comparisons, meta-analysis readiness. Challenge assumptions.",
      "coach": "Supervisor/teacher guiding others. Provide field overviews, curated reading lists, methodology comparisons, teaching materials. Evidence quality assessment focus."
    },
    "your_role": "You are a research collaborator. Your specific task comes from the prompt that sent you here. Adapt to the user's role as described above.",
    "writer_persona": {
      "description": "Academic co-writing persona activated when user requests writing help. Searches journal submission guidelines, writes in journal-specific style, and ensures the researcher's voice remains central.",
      "model_recommendation": "claude-opus-4-6",
      "protocol": "Ask target journal → search author guidelines → co-write sections (never write alone) → pause after each section for researcher input",
      "activation": "Detected by coaching engine via persona_hint in coaching action. Phase-independent."
    }
  },
  "post_back": {
    "_note": "Only if the prompt includes POST details (thread_id, token, URL). Otherwise skip this.",
    "preferred_method": "Python (most reliable for markdown with special characters)",
    "python_example": "import json, urllib.request; payload = json.dumps({'thread_id': '<from prompt>', 'token': '<from prompt>', 'content': '<your analysis>', 'post_type': 'agent_analysis'}); req = urllib.request.Request('<URL>', data=payload.encode(), headers={'Content-Type': 'application/json'}, method='POST'); resp = urllib.request.urlopen(req); print(resp.status)",
    "alternative_method": "Write JSON to temp file, then: curl -s -X POST '<URL>' -H 'Content-Type: application/json' -d @/tmp/lab-post.json",
    "FORBIDDEN": "NEVER use bash heredoc (<<EOF, <<'ENDJSON', <<HEREDOC) or inline -d '{...}' — they ALWAYS break on backticks, quotes, and $ signs in markdown content. This is not a suggestion, it is a hard rule.",
    "on_failure": "Show your analysis as text so the user can copy-paste it manually."
  },
  "quick_start": {
    "find_papers_on_a_topic": {
      "steps": [
        "1. Fetch /api/gap-index.json → search keyword_index for your topic",
        "2. Fetch /api/papers/category1/<slug>.json or /api/papers/theme/<slug>.json (see endpoint_directory.taxonomy for valid slugs)",
        "3. Filter by title keywords, methodology, pub_year"
      ]
    },
    "find_research_gaps": {
      "steps": [
        "1. Fetch /api/gap-index.json → tokenize question → match keyword_index → collect gaps grouped by theme",
        "3. Use paper_mini_index from gap-index.json for citations (author, year, title)"
      ]
    },
    "find_datasets_and_tools": {
      "steps": [
        "1. Fetch /api/curated-resources.json",
        "2. Filter by resource_type (dataset, software_tool, instrument, api, code_repository)",
        "3. Check fair_score (0-4) and access_level for quality/availability"
      ]
    }
  },
  "search_tips": {
    "papers_page_url_params": {
      "description": "The /papers page supports URL parameters for direct LINKING (not fetching)",
      "params": {
        "search": "Text search across title, abstract, AI summary",
        "category1": "Filter by topic domain",
        "methodology": "Filter by methodology",
        "theme": "Filter by outcome / theme",
        "paper": "Direct lookup by work_id"
      }
    },
    "per_category_and_theme_files": {
      "description": "RECOMMENDED: instead of the full papers-browse.json (~30MB), fetch the specific topic domain or outcome / theme file you need (~5-600KB).",
      "category_index": "/api/papers/category1/index.json",
      "theme_index": "/api/papers/theme/index.json",
      "format": "Compact array-of-arrays format (16 fields per paper): [work_id, title, category1, methodology, theme, pub_year, cited_by_count, first_author, doi, content_type, sub_theme, referenced_works_count, journal, authors (pipe-delimited), abstract_snippet (first 250 chars), ai_summary]"
    }
  },
  "contribution_protocol": {
    "gap_analyses": {
      "description": "If you find ≥5 papers on a topic with no existing gap analysis — consider contributing one!",
      "start_here": "/api/contribute/gap-analysis-protocol.json",
      "primary_method": "Submit via The Lab: create a research thread at /lab, run your analysis, post results. Your analysis will be reviewed and published with contributor credit."
    },
    "missing_papers": {
      "description": "Report important papers missing from the database",
      "primary_method": "Post in The Lab thread with DOIs and context. The platform maintainer will ingest them."
    }
  },
  "limitations": [
    "STATIC site — no server-side search or query API. All data in JSON files.",
    "Gap analyses are pre-computed, not generated on-demand.",
    "Full-text PDFs are not hosted here. paper-pdfs.json has links to publisher/repository PDFs.",
    "HTML pages return empty shells (Next.js SPA). Use ONLY the JSON API endpoints listed in endpoint_directory."
  ],
  "existing_gap_analyses": []
}