{% extends "base.html" %} {% block title %}{{ article.title }} - {{ wiki_name }}{% endblock %} {% block content %} {% macro field_label(key) -%} {%- if lang == 'ko' -%} {%- set labels = { 'facts': '핵심 사실', 'mission': '목적', 'design_principles': '설계 원칙', 'architecture': '시스템 구조', 'ai_workflow': 'AI 작업 흐름', 'protocol_contract': '프로토콜 규약', 'retrieval_pipeline': '검색 파이프라인', 'document_model': '문서 모델', 'write_safety': '안전한 쓰기', 'verification_policy': '검증 정책', 'purpose_specific_wikis': '목적별 위키', 'agent_integrations': 'AI 에이전트 연동', 'human_role': '인간의 역할', 'current_release': '현재 릴리스', 'use_cases': '활용 사례', 'limitations': '한계', 'best_practices': '운영 원칙', 'when_to_use': '사용하기 좋은 경우', 'when_not_to_use': '적합하지 않은 경우', 'definition': '정의', 'key_principles': '핵심 원칙', 'examples': '예시', 'applications': '응용', 'steps': '절차', 'prerequisites': '사전 조건', 'solution': '해결 방법', 'root_cause': '원인', 'timeline': '연표', 'conclusion': '결론', 'caveats': '주의사항', 'status': '상태' } -%} {%- else -%} {%- set labels = {} -%} {%- endif -%} {{- labels.get(key, key|replace('_', ' ')|title) -}} {%- endmacro %} {% macro render_value(value, depth=0) %} {% if value is mapping %}
{% for k, v in value.items() %}
{{ label(k) }}{% if label(k) != k %}{{ k }}{% endif %}
{{ render_value(v, depth + 1) }}
{% endfor %}
{% elif value is iterable and value is not string %} {% else %} {{ easy(value) }} {% endif %} {% endmacro %}
{{ article.category|replace('/', ' / ') }} {{ label(article.content.type or 'document') }}

{{ article.title }}

{% if article.content.get('what') %}

{{ easy(article.content.get('what')) }}

{% elif article.content.get('summary') %}

{{ easy(article.content.get('summary')) }}

{% endif %}
{{ "%.0f"|format(article.confidence * 100) }}% {{ t('common.confidence') }}
{% if quality %}
{{ "%.0f"|format(quality.quality_score * 100) }}% {{ t('common.quality') }}
{% endif %}
v{{ article.version }} {{ t('article.version') }}
{{ article.verification|length }} {{ t('article.verified_paths') }}
ID
{{ article.id }}
{{ t('common.author') }}
{{ article.author }}
{{ t('common.created') }}
{{ article.created_at.strftime('%Y-%m-%d') }}
{{ t('common.modified') }}
{{ article.last_modified.strftime('%Y-%m-%d %H:%M') }}
{% if article.content.get('summary') and article.content.get('what') %}

{{ t('article.overview') }}

{{ easy(article.content.get('summary')) }}

{% endif %}
{% for key, value in article.content.items() %} {% if not key.startswith('_') and key not in ['type', 'what', 'summary'] %} {% set anchor = 'section-' ~ key|replace('_', '-') %} {% if key == 'disputes' and value is iterable and value is not string %}

{{ label(key) }}{% if label(key) != key %}{{ key }}{% endif %}

{% for dispute in value %} {% if dispute is mapping %}
{{ dispute.get('topic', '') }}
{% if dispute.get('status') %}{{ dispute.status }}{% endif %} {% if dispute.get('consensus_shift') %}

{{ dispute.consensus_shift }}

{% endif %} {% if dispute.get('positions') is iterable %}
{% for pos in dispute.positions %} {% if pos is mapping %}
{{ pos.get('claim', '') }}
{% if pos.get('supporters') %}
{{ pos.supporters }}
{% endif %} {% if pos.get('evidence_quality') %}{{ pos.evidence_quality }}{% endif %} {% if pos.get('note') %}

{{ pos.note }}

{% endif %}
{% endif %} {% endfor %}
{% endif %}
{% else %}
{{ render_value(dispute) }}
{% endif %} {% endfor %}
{% elif key == 'historiography' and value is iterable and value is not string %}

{{ label(key) }}{% if label(key) != key %}{{ key }}{% endif %}

{% for entry in value %} {% if entry is mapping %}
{{ entry.get('period', '') }}

{{ entry.get('interpretation', entry.get('consensus', '')) }}

{% if entry.get('context') %}

{{ entry.context }}

{% endif %} {% if entry.get('source_type') %}{{ entry.source_type }}{% endif %} {% if entry.get('note') %}

{{ entry.note }}

{% endif %}
{% endif %} {% endfor %}
{% elif key == 'timeline' and value is iterable and value is not string %}

{{ label(key) }}{% if label(key) != key %}{{ key }}{% endif %}

{% for entry in value %} {% if entry is mapping %}
{{ entry.get('date', entry.get('period', '')) }}

{{ entry.get('event', entry.get('description', '')) }}

{% if entry.get('entity_ids') %}

{{ '관련 엔터티' if lang == 'ko' else 'Linked entities' }}: {% for entity_id in entry.get('entity_ids', []) %} {{ entity_labels.get(entity_id, entity_id) }} {% endfor %}

{% endif %} {% if entry.get('status') %}

{{ entry.status }}

{% endif %}
{% endif %} {% endfor %}
{% else %}

{{ label(key) }}{% if label(key) != key %}{{ key }}{% endif %}

{{ render_value(value) }}
{% endif %} {% endif %} {% endfor %}
{% if article.source_records or article.sources %}

{{ t('common.sources') }}

{{ article.sources|length }}
    {% if article.source_records %} {% for src in article.source_records %}
  1. {{ "%02d"|format(loop.index) }}
  2. {% endfor %} {% else %} {% for src in article.sources %}
  3. {{ "%02d"|format(loop.index) }}
  4. {% endfor %} {% endif %}
{% endif %}
{% if article.content._meta is defined and article.content._meta %}
{{ t('article.document_meta') }}
{{ article.content._meta | yaml_dump }}
{% endif %} {% if article.content._changelog is defined and article.content._changelog %}
{{ t('article.changelog', count=article.content._changelog|length) }}
{% for entry in article.content._changelog|reverse %}
{{ entry.date }} {{ entry.action }} {% if entry.fields %}{{ entry.fields|join(', ') }}{% endif %} {% if entry.details %}

{{ entry.details }}

{% endif %}
{% endfor %}
{% endif %} {% if article.history %}
{{ t('article.history_normalized') }} ({{ article.history|length }})
{{ article.history | yaml_dump }}
{% endif %}
{{ t('article.raw_yaml') }}
{{ article.content | yaml_dump }}
{{ t('article.management') }}
{% endblock %}