feat(converter): implement deterministic JSON to Markdown article converter (spec 005)

This commit is contained in:
2026-08-21 10:30:14 -03:00
parent 64dfd842de
commit 926a6b8cfc
58 changed files with 20138 additions and 2301 deletions
+185 -51
View File
@@ -1,16 +1,16 @@
# Graph Report - TextNLPClassifierApp (2026-08-21)
## Corpus Check
- 174 files · ~91,990 words
- 199 files · ~108,365 words
- Verdict: corpus is large enough that graph structure adds value.
## Summary
- 1235 nodes · 1541 edges · 131 communities (93 shown, 38 thin omitted)
- 1527 nodes · 1899 edges · 165 communities (118 shown, 47 thin omitted)
- Extraction: 97% EXTRACTED · 3% INFERRED · 0% AMBIGUOUS · INFERRED: 51 edges (avg confidence: 0.95)
- Token cost: 0 input · 0 output
## Graph Freshness
- Built from commit: `ff7a50e0`
- Built from commit: `64dfd842`
- Run `git rev-parse HEAD` and compare to check if the graph is stale.
- Run `graphify update .` after code changes (no API cost).
@@ -59,7 +59,7 @@
- ClassificationResult
- InherenceClassifier
- classifier.py
- main
- test_convert_article_to_markdown.py
- content_northvolt_de.md
- content_presal_pt.md
- content_tangential_es.md
@@ -109,13 +109,13 @@
- CLI Contract: Google News Headlines Extractor
- 🧠 TextNLPClassifierApp
- Extraction Pipeline Checklist: Article Content Multi-Engine Extractor
- sample_rss_xml
- parametrize
- models.py
- ECPSnapshot
- Feature Specification: Multilingual NLP Entity Inherence Classifier (POC)
- 4. Requisitos Funcionais (FR)
- Tasks: Article Content Multi-Engine Extractor
- LocalEmbeddingsAdapter
- Tasks: Convert Article JSON to Markdown
- Implementation Plan: Article Content Multi-Engine Extractor
- 2. Cenários de Validação
- 1. Technical Decisions & Tradeoffs
@@ -130,6 +130,7 @@
- Tasks: Deterministic Article Content Selection
- select_article_extractor
- process_batch
- detect_language
- test_select_article_extractor.py
- Feature Specification: Deterministic Content Selection
- 2. Entity Descriptions & Fields
@@ -138,7 +139,40 @@
- Quickstart: Deterministic Article Content Selection
- Specification Quality Checklist: Deterministic Content Selection
- CLI Interface Contract: Deterministic Article Content Selection
- convert_article_to_markdown.py
- 8. Regras funcionais
- 12. Critérios de aceite
- PRD — Conversão de artigo JSON para Markdown
- resolve_article_body
- Implementation Plan: Convert Article JSON to Markdown
- 2. Technical Decisions & Research Findings
- Feature Specification: Convert Article JSON to Markdown
- Markdown Conversion Checklist: End-to-End Requirements Quality
- convert_article
- 005-convert-json-markdown/plan.md
- Quickstart: Convert Article JSON to Markdown
- 1. Domain Entities & Schemas
- 11. Requisitos não funcionais
- parse_arguments
- Specification Quality Checklist: Convert Article JSON to Markdown
- CLI Contract: `convert_article_to_markdown.py`
- 9. Interface CLI
- get_hl_gl_ceid
- 13. Estratégia de testes
- 6. Contrato de entrada
- assemble_markdown_document
- convert_html_to_markdown
- JSON Schema Contract: Deterministic Article Content Selection
- 5. Escopo
- Los puntajes de River vs. Independiente Santa Fe, por la Copa Sudamericana - TyC Sports
- valid_newspaper4k.md
- valid_readability.md
- test_normalize_date_rfc_2822_variants
- test_normalize_date_invalid_and_placeholders
- test_metadata_priority_title_all_fallbacks
- test_metadata_priority_subtitle_omitted_when_equal_to_title
- test_metadata_priority_first_valid_source_no_cross_merging
- test_normalize_scalar_non_string_types
## God Nodes (most connected - your core abstractions)
1. `ECPSnapshot` - 31 edges
@@ -147,27 +181,27 @@
4. `ExtractorName` - 21 edges
5. `DecisionCategory` - 17 edges
6. `ClassificationResult` - 17 edges
7. `process_batch()` - 15 edges
8. `process_batch()` - 14 edges
9. `LocalEmbeddingsAdapter` - 14 edges
10. `LLMFallbackAdapter` - 14 edges
7. `PRD — Conversão de artigo JSON para Markdown` - 16 edges
8. `process_batch()` - 15 edges
9. `8. Regras funcionais` - 15 edges
10. `resolve_article_metadata()` - 14 edges
## Surprising Connections (you probably didn't know these)
- `main()` --uses--> `ECPSnapshot` [INFERRED]
classify.py → src/models.py
- `main()` --uses--> `ErrorCode` [INFERRED]
classify.py → src/models.py
- `test_extract_google_news_orchestration_mocked()` --uses--> `ExtractionResult` [INFERRED]
- `test_e2e_extract_google_news_live_pipeline()` --uses--> `ExtractionResult` [INFERRED]
tests/test_extract_google_news.py → scripts/extract_google_news.py
- `test_llm_adapter_interface()` --calls--> `LLMFallbackAdapter` [EXTRACTED]
tests/test_adapters.py → src/adapters/llm.py
- `classifier()` --uses--> `InherenceClassifier` [INFERRED]
tests/test_benchmark_24.py → src/classifier.py
- `test_classification_result_serialization()` --uses--> `DecisionCategory` [INFERRED]
tests/test_models.py → src/models.py
- `petrobras_ecp()` --uses--> `ECPSnapshot` [INFERRED]
tests/test_classifier.py → src/models.py
## Import Cycles
- None detected.
## Communities (131 total, 38 thin omitted)
## Communities (165 total, 47 thin omitted)
### Community 0 - "Task Planning"
Cohesion: 0.07
@@ -310,20 +344,20 @@ Cohesion: 0.29
Nodes (6): 1.1 Arguments & Options, 1. Command Line Interface, 2.1 Exit Codes, 2.2 Standard Output (`stdout`) / Standard Error (`stderr`), 2. Standard Streams & Exit Codes, CLI Contract & Interface Specification (POC)
### Community 45 - "ClassificationResult"
Cohesion: 0.14
Nodes (12): ABC, BaseNLPAdapter, Base abstract adapter interface for optional Tier 2 / Tier 3 NLP enhancers., Abstract interface for pluggable NLP classification adapters., Return True if the underlying provider or model is installed and configured., Compute semantic similarity score between text and a set of candidate terms., Optionally refine an ambiguous classification result., LLMFallbackAdapter (+4 more)
Cohesion: 0.09
Nodes (19): ABC, BaseNLPAdapter, Base abstract adapter interface for optional Tier 2 / Tier 3 NLP enhancers., Abstract interface for pluggable NLP classification adapters., Return True if the underlying provider or model is installed and configured., Compute semantic similarity score between text and a set of candidate terms., Optionally refine an ambiguous classification result., LocalEmbeddingsAdapter (+11 more)
### Community 46 - "InherenceClassifier"
Cohesion: 0.12
Nodes (27): InherenceClassifier, Tier 1 Deterministic NLP Entity Inherence Classifier., DecisionCategory, RelatedEntity, Adversarial and robustness test suite for Multilingual NLP Entity Inherence…, Run CLI via subprocess without --output and verify stdout is pure parseable…, Run CLI via subprocess with empty content and verify error code and exit code., Content about city/state governance of São Paulo against ECP for São Paulo FC. (+19 more)
### Community 47 - "classifier.py"
Cohesion: 0.10
Nodes (31): count_phrase_occurrences(), match_phrase_in_text(), Core deterministic classification engine (Tier 1 core)., Check if a normalized phrase appears in normalized text with word boundary…, Count occurrences of a phrase in text., Classify inherence of content against an ECP snapshot., detect_language(), extract_words() (+23 more)
Cohesion: 0.16
Nodes (16): count_phrase_occurrences(), match_phrase_in_text(), Core deterministic classification engine (Tier 1 core)., Check if a normalized phrase appears in normalized text with word boundary…, Count occurrences of a phrase in text., Classify inherence of content against an ECP snapshot., extract_evidence_snippets(), extract_sentences() (+8 more)
### Community 48 - "main"
Cohesion: 0.31
Nodes (9): main(), parse_args(), Namespace, CLI execution tests covering flags, arguments, stdout, and error handling., test_cli_empty_content_file(), test_cli_missing_ecp_file(), test_cli_missing_required_ecp_field(), test_cli_output_file() (+1 more)
### Community 48 - "test_convert_article_to_markdown.py"
Cohesion: 0.07
Nodes (27): Suíte de Testes Automatizados para Conversão de Artigo JSON para Markdown.…, Testa deduplicação case-insensitive preservando a grafia e ordem da primeira…, Valida parsing de datas ISO 8601 em múltiplos formatos e fusos., Valida a cadeia de fallback completa para a URL ORIGINAL (5 níveis)., Valida decodificação de entidades HTML nomeadas e numéricas., Valida colapso de tabs, quebras de linha e espaços múltiplos em um único espaço., Garante correspondência exata byte a byte para Trafilatura, Newspaper4k e…, Garante que múltiplas execuções no mesmo arquivo produzam hashes SHA-256… (+19 more)
### Community 80 - "test_extract_article_contents.py"
Cohesion: 0.06
@@ -334,16 +368,16 @@ Cohesion: 0.08
Nodes (24): 1. Visão geral (arquitetura), 2.1 DTO de entrada (`googlenews_etl/application/dtos/extract_news_dto.py`), 2.2 Value Object de validação (`googlenews_etl/domain/entities/search_query.py`), 2. Entrada, 3.1 O caso de uso (`googlenews_etl/application/use_cases/extract_news_use_case.py`), 3.2 A porta (`googlenews_etl/domain/ports/news_extractor_port.py`), 3.3.1 Inicialização: sessão HTTP com impersonação de browser, 3.3.2 Mapeamento idioma → parâmetros `hl`/`gl` (`_get_hl_gl`) (+16 more)
### Community 82 - "extract_google_news.py"
Cohesion: 0.15
Nodes (18): extract_google_news(), _fetch_rss_content(), get_hl_gl_ceid(), NewsArticle, _normalize_text_for_comparison(), parse_google_news_rss(), Mapeia idioma e locale para os parâmetros hl, gl e ceid do Google News., Remove pontuação e espaços extras para comparação de redundância. (+10 more)
Cohesion: 0.20
Nodes (14): extract_google_news(), _fetch_rss_content(), NewsArticle, _normalize_text_for_comparison(), parse_google_news_rss(), Remove pontuação e espaços extras para comparação de redundância., Parseia o XML do RSS do Google News e extrai os itens estruturados., Resolve em paralelo as URLs intermediárias do Google News para os links finais… (+6 more)
### Community 83 - "ExtractionResult"
Cohesion: 0.29
Nodes (5): ExtractionResult, Any, Resultado consolidado da extração., Valida E2E o fluxo completo de busca, parsing e resolução de URLs reais ao vivo., test_e2e_extract_google_news_live_pipeline()
Nodes (5): ExtractionResult, Any, Resultado consolidado da extração., Valida a consolidação do ExtractionResult a partir da busca mockada com URLs…, test_extract_google_news_orchestration_mocked()
### Community 84 - "test_extract_google_news.py"
Cohesion: 0.15
Nodes (15): Resolve a URL intermediária do Google News para a URL real do veículo., resolve_article_url(), Testes unitários e de integração para o Extrator de Manchetes do Google News.…, Valida fallback gracioso de URL quando não é link do Google News ou em erro., Valida resolução bem-sucedida de URL do Google News para o portal destino., Valida E2E que o decodificador resolve uma URL real do Google News para o…, Valida o mapeamento padrão de idiomas para pares (hl, gl, ceid)., Valida a sobrescrita geográfica quando o argumento locale é especificado. (+7 more)
Cohesion: 0.16
Nodes (14): Resolve a URL intermediária do Google News para a URL real do veículo., resolve_article_url(), fixture, Testes unitários e de integração para o Extrator de Manchetes do Google News.…, Valida o parsing do feed RSS, higienização de tags HTML e deduplicação., Valida fallback gracioso de URL quando não é link do Google News ou em erro., Valida resolução bem-sucedida de URL do Google News para o portal destino., Valida E2E que o decodificador resolve uma URL real do Google News para o… (+6 more)
### Community 85 - "Implementation Tasks: Google News Headlines Extractor"
Cohesion: 0.14
@@ -363,7 +397,7 @@ Nodes (7): Architecture & Pipeline, Documentation (this feature), Implementation
### Community 90 - "SearchQuery"
Cohesion: 0.20
Nodes (6): Value Object com parâmetros de busca validados., SearchQuery, Valida a consolidação do ExtractionResult a partir da busca mockada com URLs…, Valida as regras de negócio e limites de SearchQuery., test_extract_google_news_orchestration_mocked(), test_search_query_validation()
Nodes (6): Value Object com parâmetros de busca validados., SearchQuery, Valida E2E o fluxo completo de busca, parsing e resolução de URLs reais ao vivo., Valida as regras de negócio e limites de SearchQuery., test_e2e_extract_google_news_live_pipeline(), test_search_query_validation()
### Community 91 - "1. Technical Decisions & Tradeoffs"
Cohesion: 0.25
@@ -386,24 +420,24 @@ Cohesion: 0.33
Nodes (6): 1. Comando e Argumentos, 2. Códigos de Saída (Exit Codes), 3. Protocolo de Streams (Stdout / Stderr), Argumentos de Linha de Comando, CLI Contract: Google News Headlines Extractor, Sintaxe
### Community 97 - "🧠 TextNLPClassifierApp"
Cohesion: 0.06
Nodes (35): 1. 🧠 Classificador de Conteúdo e Inerência (NLP / LLM / ECP), 1. Clonar o Repositório e Criar Ambiente Virtual, 1. Execução Padrão Automática, 2. Execução com Modo Verboso, 2. 📰 Extrator de Manchetes do Google News, 2. Instalar Dependências, 3. Baixar Binários do Navegador Stealth (Camoufox), 3. 📄 Extrator e Parser Multimotor de Artigos (+27 more)
Cohesion: 0.04
Nodes (45): 1. 🧠 Classificador de Conteúdo e Inerência (NLP / LLM / ECP), 1. Clonar o Repositório e Criar Ambiente Virtual, 1. Conversão Padrão, 1. Execução Padrão Automática, 2. Conversão com Caminho de Destino Personalizado, 2. Execução com Modo Verboso, 2. 📰 Extrator de Manchetes do Google News, 2. Instalar Dependências (+37 more)
### Community 98 - "Extraction Pipeline Checklist: Article Content Multi-Engine Extractor"
Cohesion: 0.05
Nodes (34): 1. Requirement Completeness, 2. Requirement Clarity & Non-Ambiguity, 3. Requirement Consistency & Data Contracts, 4. Scenario & Edge Case Coverage, 5. Non-Functional & Operational Readiness, Extraction Pipeline Checklist: Article Content Multi-Engine Extractor, Notes, Content Quality (+26 more)
### Community 99 - "sample_rss_xml"
Cohesion: 0.67
Nodes (3): fixture, Fixture que fornece o conteúdo do XML de exemplo para testes offline., sample_rss_xml()
### Community 99 - "parametrize"
Cohesion: 0.22
Nodes (9): parametrize, Garante aceitação de URLs absolutas com esquema HTTP e HTTPS válidos., Garante rejeição de esquemas não permitidos, URLs relativas e strings vazias., Garante que a ausência de corpo no extrator selecionado NUNCA faça fallback…, Garante que todos os placeholders documentados no PRD sejam descartados…, test_normalize_scalar_placeholders_discarded(), test_resolve_article_body_strict_isolation_all_extractors(), test_validate_url_invalid_schemes() (+1 more)
### Community 100 - "models.py"
Cohesion: 0.24
Nodes (8): emit_error(), ClassificationError, ErrorCode, MatchedGraphEntity, Enum, str, Data models and validation schemas for Multilingual NLP Entity Inherence…, test_classification_error_serialization()
Cohesion: 0.15
Nodes (17): emit_error(), main(), parse_args(), Namespace, ClassificationError, ErrorCode, MatchedGraphEntity, Enum (+9 more)
### Community 101 - "ECPSnapshot"
Cohesion: 0.19
Nodes (11): parametrize, ECPSnapshot, Any, classifier(), fixture, Controlled 24-case benchmark suite for Multilingual NLP Entity Inherence…, test_benchmark_case(), Unit tests for ECP models, schema validation, and structured error handling. (+3 more)
Cohesion: 0.20
Nodes (10): ECPSnapshot, Any, classifier(), fixture, parametrize, Controlled 24-case benchmark suite for Multilingual NLP Entity Inherence…, test_benchmark_case(), test_ecp_snapshot_defaults() (+2 more)
### Community 102 - "Feature Specification: Multilingual NLP Entity Inherence Classifier (POC)"
Cohesion: 0.14
@@ -417,9 +451,9 @@ Nodes (20): 1.1 Objetivo do Produto, 1. Visão Geral e Contexto, 2. Personas e C
Cohesion: 0.11
Nodes (18): Dependencies & Execution Order, Entrega Incremental, Implementation Strategy, Implementação da User Story 1, Implementação da User Story 2, Implementação da User Story 3, MVP First (User Story 1 Only), Oportunidades de Execução Paralela (+10 more)
### Community 105 - "LocalEmbeddingsAdapter"
Cohesion: 0.18
Nodes (7): LocalEmbeddingsAdapter, Optional local vector embeddings adapter (Tier 2). Disabled by default.…, Optional adapter for local multilingual semantic vector embeddings., Unit tests for optional adapter interfaces (Tier 2 / Tier 3)., test_classifier_with_adapter_flags(), test_embeddings_adapter_interface(), test_llm_adapter_interface()
### Community 105 - "Tasks: Convert Article JSON to Markdown"
Cohesion: 0.11
Nodes (19): Dependencies & Execution Order, Implementation for User Story 1, Implementation for User Story 2, Implementation for User Story 3, Implementation Strategy, Incremental Delivery, MVP First (User Story 1 Only), Parallel Opportunities (+11 more)
### Community 106 - "Implementation Plan: Article Content Multi-Engine Extractor"
Cohesion: 0.17
@@ -477,6 +511,10 @@ Nodes (35): CandidateStatus, extract_candidate_data(), ExtractorName, Any, Enum,
Cohesion: 0.11
Nodes (24): atomic_save_json(), process_batch(), Path, Salva dados em JSON de forma atômica utilizando arquivo temporário e rename., Lê o JSON de entrada, valida a estrutura, processa todos os artigos e grava o…, Path, CT-012: A entrada já contém selected_extractor -> Recalcular e substituir…, CT-013: articles está vazio -> Gerar saída válida com articles vazio. (+16 more)
### Community 121 - "detect_language"
Cohesion: 0.19
Nodes (16): detect_language(), extract_words(), normalize_text(), Lightweight multilingual language detection and text normalization., Normalize text by converting to lowercase and stripping combining diacritical…, Tokenize text into lowercase alphanumeric words., Detect the ISO-639-1 language code of text among supported languages (pt, en,…, Unit tests for language detection and text normalization. (+8 more)
### Community 122 - "test_select_article_extractor.py"
Cohesion: 0.18
Nodes (16): generate_shingles(), normalize_text(), Executa a normalização determinística para comparação: 1. Decodificar entidades…, Gera conjunto de shingles ordenados de tamanho window_size (padrão 5). - Se…, Suíte de Testes Automatizados para o Seletor Determinístico de Extrator. Cobre…, Garante que marcação de imagem Markdown ![alt](url) seja descartada e link…, E2E: Executa scripts/select_article_extractor.py como subprocesso real na linha…, test_e2e_cli_subprocess_real_execution() (+8 more)
@@ -509,24 +547,116 @@ Nodes (5): Content Quality, Feature Readiness, Notes, Requirement Completeness,
Cohesion: 0.33
Nodes (5): 1. Command Syntax, 2. Arguments and Flags, 3. Standard Streams (I/O), 4. Exit Codes, CLI Interface Contract: Deterministic Article Content Selection
### Community 131 - "JSON Schema Contract: Deterministic Article Content Selection"
### Community 131 - "convert_article_to_markdown.py"
Cohesion: 0.19
Nodes (17): _get_dict(), normalize_date(), normalize_list(), normalize_scalar(), Any, Interpreta datas ISO 8601 e RFC 2822 preservando fuso horário ou YYYY-MM-DD…, Valida se a URL é absoluta com protocolo http ou https e hostname não vazio., Retorna o dicionário associado à chave ou um dicionário vazio caso não seja… (+9 more)
### Community 132 - "8. Regras funcionais"
Cohesion: 0.13
Nodes (15): 8. Regras funcionais, RF-001 — Receber um único artigo, RF-002 — Respeitar o extrator selecionado, RF-003 — Resolver o corpo dentro do extrator selecionado, RF-004 — Selecionar metadados deterministicamente, RF-005 — Priorizar metadados por campo, RF-006 — Normalizar valores escalares, RF-007 — Normalizar listas (+7 more)
### Community 133 - "12. Critérios de aceite"
Cohesion: 0.14
Nodes (14): 12. Critérios de aceite, CA-001 — Trafilatura selecionada, CA-002 — Newspaper4k selecionado, CA-003 — Readability selecionado, CA-004 — Fallback dentro do extrator, CA-005 — Proibição de fallback de corpo entre extratores, CA-006 — Metadado vindo de outro extrator, CA-007 — Obrigatórios presentes (+6 more)
### Community 134 - "PRD — Conversão de artigo JSON para Markdown"
Cohesion: 0.17
Nodes (11): 10. Tratamento de erros, 14. Definition of Done, 15. Dependência técnica escolhida, 1. Visão geral, 2. Problema, 3. Objetivo, 4. História do usuário, 7.1 Arquivo (+3 more)
### Community 135 - "resolve_article_body"
Cohesion: 0.20
Nodes (10): Obtém o corpo do artigo exclusivamente do selected_extractor com fallback…, resolve_article_body(), Testa prioridade trafilatura.markdown sobre trafilatura.text., Testa prioridade newspaper4k.article_html sobre newspaper4k.text., Testa prioridade readability.cleaned_html sobre readability.cleaned_text., Garante erro ao receber selected_extractor ausente ou não reconhecido., test_resolve_article_body_invalid_selected_extractor(), test_resolve_article_body_newspaper4k_primary_and_fallback() (+2 more)
### Community 136 - "Implementation Plan: Convert Article JSON to Markdown"
Cohesion: 0.17
Nodes (12): Complexity Tracking, Constitution Check, Documentation (this feature), Implementation Phases, Implementation Plan: Convert Article JSON to Markdown, Phase 0: Outline & Research *(Completed)*, Phase 1: Design & Contracts *(Completed)*, Phase 2: Tasks & Implementation Breakdown *(Next: `/speckit-tasks`)* (+4 more)
### Community 137 - "2. Technical Decisions & Research Findings"
Cohesion: 0.17
Nodes (11): 1. Executive Summary & Goals, 2. Technical Decisions & Research Findings, 3. Technology Stack & Dependencies, Decision 1: HTML-to-Markdown Engine Selection, Decision 2: Direct Markdown Handling for Trafilatura, Decision 3: Metadata Normalization & Priority Resolution Pipeline, Decision 4: Date Parsing Strategy (ISO 8601 & RFC 2822), Decision 5: URL Validation & Media Filtering (+3 more)
### Community 138 - "Feature Specification: Convert Article JSON to Markdown"
Cohesion: 0.17
Nodes (12): Assumptions, Edge Cases, Feature Specification: Convert Article JSON to Markdown, Functional Requirements, Key Entities, Measurable Outcomes, Requirements *(mandatory)*, Success Criteria *(mandatory)* (+4 more)
### Community 139 - "Markdown Conversion Checklist: End-to-End Requirements Quality"
Cohesion: 0.18
Nodes (11): 1. Validação de Entrada, Tipagem & Isolamento de Lotes, 2. Isolamento Estrito de Extrator & Conversão de Conteúdo (HTML/MD), 3. Resolução Determinística de Metadados & Mapeamento de SELECIONADO, 4. Normalização de Escalares, Placeholders & Sanitização de Listas, 5. Normalização de Datas, Fusos & Validação Estrita de URLs, 6. Sanitização Editorial, Tratamento de Imagens & Título Duplicado, 7. Estrutura, Sintaxe do Markdown de Saída & Restrições, 8. Interface CLI, Tratamento de Erros & Atomicidade (+3 more)
### Community 140 - "convert_article"
Cohesion: 0.15
Nodes (13): clean_body_images(), convert_article(), Path, Remove o primeiro título H1 do corpo somente quando ele for igual ao título…, Preserva imagens com URL absoluta http/https, remove relativas/data:/vazias e…, Executa a leitura do JSON, validação, conversão e escrita atômica do arquivo…, remove_duplicate_initial_h1(), Testa remoção de H1 inicial coincidente com título com variações de espaços e… (+5 more)
### Community 141 - "005-convert-json-markdown/plan.md"
Cohesion: 0.33
Nodes (3): 1. Output Document Specification, 2. Formatting & Syntax Constraints, Markdown Schema Contract: Output Article Markdown
### Community 142 - "Quickstart: Convert Article JSON to Markdown"
Cohesion: 0.22
Nodes (8): 1. Prerequisites & Setup, 2. Running the CLI Tool, 3. Verification & Testing, Basic Conversion (Default Output Path), Custom Destination Path, Quickstart: Convert Article JSON to Markdown, Run All Unit & Integration Tests, Run Linter & Type Checker
### Community 143 - "1. Domain Entities & Schemas"
Cohesion: 0.25
Nodes (8): 1. Domain Entities & Schemas, 2. Priority Resolution Matrix, Data Model: Convert Article JSON to Markdown, Entity 1: `ArticleInput` (Source JSON), Entity 2: `ExtractorBlock` (Per-Extractor Data), Entity 3: `ResolvedArticleMetadata`, Entity 4: `MarkdownDocument`, Validation Rules:
### Community 144 - "11. Requisitos não funcionais"
Cohesion: 0.29
Nodes (7): 11. Requisitos não funcionais, RNF-001 — Determinismo, RNF-002 — Compatibilidade, RNF-003 — Execução local, RNF-004 — Integridade, RNF-005 — Manutenibilidade, RNF-006 — Qualidade
### Community 145 - "parse_arguments"
Cohesion: 0.29
Nodes (7): main(), parse_arguments(), Namespace, Configura o parser de argumentos do CLI., Ponto de entrada do CLI., Testa a chamada direta do parse_arguments., test_parse_arguments_api_direct()
### Community 146 - "Specification Quality Checklist: Convert Article JSON to Markdown"
Cohesion: 0.33
Nodes (5): Content Quality, Feature Readiness, Notes, Requirement Completeness, Specification Quality Checklist: Convert Article JSON to Markdown
### Community 147 - "CLI Contract: `convert_article_to_markdown.py`"
Cohesion: 0.33
Nodes (5): 1. Script Signature, 2. Command-Line Arguments, 3. Exit Codes, 4. Standard Stream Behavior, CLI Contract: `convert_article_to_markdown.py`
### Community 148 - "9. Interface CLI"
Cohesion: 0.40
Nodes (5): 9.1 Script, 9.2 Argumentos, 9.3 Exemplos, 9.4 Saída do processo, 9. Interface CLI
### Community 149 - "get_hl_gl_ceid"
Cohesion: 0.25
Nodes (8): get_hl_gl_ceid(), Mapeia idioma e locale para os parâmetros hl, gl e ceid do Google News., Valida o mapeamento padrão de idiomas para pares (hl, gl, ceid)., Valida a sobrescrita geográfica quando o argumento locale é especificado., Valida fallback dinâmico para idiomas regionais não listados explicitamente., test_get_hl_gl_ceid_default_mappings(), test_get_hl_gl_ceid_dynamic_fallback(), test_get_hl_gl_ceid_with_custom_locale()
### Community 150 - "13. Estratégia de testes"
Cohesion: 0.50
Nodes (4): 13.1 Testes unitários, 13.2 Testes de integração do CLI, 13.3 Casos de resultado esperado, 13. Estratégia de testes
### Community 151 - "6. Contrato de entrada"
Cohesion: 0.50
Nodes (4): 6.1 Formato, 6.2 Valores aceitos para `selected_extractor`, 6.3 Campos obrigatórios após a resolução, 6. Contrato de entrada
### Community 152 - "assemble_markdown_document"
Cohesion: 0.50
Nodes (4): assemble_markdown_document(), Monta a estrutura final do documento Markdown respeitando a ordem estrita do…, Testa montagem com todos os campos e apenas com campos obrigatórios., test_assemble_markdown_document_full_and_minimal()
### Community 153 - "convert_html_to_markdown"
Cohesion: 0.33
Nodes (6): convert_html_to_markdown(), Converte HTML para Markdown usando títulos ATX, removendo scripts e estilos., Valida conversão de elementos HTML estruturados para Markdown com títulos ATX., Testa conversão de HTML vazio retornando string vazia., test_convert_html_to_markdown_empty_or_whitespace(), test_convert_html_to_markdown_rich_formatting()
### Community 154 - "JSON Schema Contract: Deterministic Article Content Selection"
Cohesion: 0.50
Nodes (3): 1. Input JSON Schema, 2. Output JSON Schema, JSON Schema Contract: Deterministic Article Content Selection
### Community 155 - "5. Escopo"
Cohesion: 0.67
Nodes (3): 5.1 Incluído, 5.2 Fora do escopo, 5. Escopo
## Knowledge Gaps
- **562 isolated node(s):** `text-nlp-classifier`, `MatchedGraphEntity`, `graphify`, `Usage`, `What graphify is for` (+557 more)
- **696 isolated node(s):** `text-nlp-classifier`, `MatchedGraphEntity`, `graphify`, `Usage`, `What graphify is for` (+691 more)
These have ≤1 connection - possible missing edges or undocumented components.
- **38 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
- **47 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
## Suggested Questions
_Questions this graph is uniquely positioned to answer:_
- **Why does `ECPSnapshot` connect `ECPSnapshot` to `models.py`, `LocalEmbeddingsAdapter`, `ClassificationResult`, `InherenceClassifier`, `classifier.py`, `main`?**
_High betweenness centrality (0.003) - this node is a cross-community bridge._
- **Why does `LLMFallbackAdapter` connect `ClassificationResult` to `LocalEmbeddingsAdapter`, `ECPSnapshot`, `InherenceClassifier`, `classifier.py`?**
_High betweenness centrality (0.003) - this node is a cross-community bridge._
- **Why does `Research & Architectural Decisions: Deterministic Content Selection` connect `1. Text Normalization Pipeline` to `004-deterministic-content-selection/spec.md`?**
_High betweenness centrality (0.003) - this node is a cross-community bridge._
- **Why does `PRD — Conversão de artigo JSON para Markdown` connect `PRD — Conversão de artigo JSON para Markdown` to `8. Regras funcionais`, `12. Critérios de aceite`, `11. Requisitos não funcionais`, `9. Interface CLI`, `13. Estratégia de testes`, `6. Contrato de entrada`, `5. Escopo`?**
_High betweenness centrality (0.007) - this node is a cross-community bridge._
- **Are the 10 inferred relationships involving `ECPSnapshot` (e.g. with `main()` and `BaseNLPAdapter`) actually correct?**
_`ECPSnapshot` has 10 INFERRED edges - model-reasoned connections that need verification._
- **Are the 6 inferred relationships involving `InherenceClassifier` (e.g. with `LocalEmbeddingsAdapter` and `LLMFallbackAdapter`) actually correct?**
@@ -534,4 +664,8 @@ _Questions this graph is uniquely positioned to answer:_
- **Are the 12 inferred relationships involving `ExtractorName` (e.g. with `test_article_1_regression_technical_tie_markdown_images()` and `test_ct_001_three_candidates_clear_winner()`) actually correct?**
_`ExtractorName` has 12 INFERRED edges - model-reasoned connections that need verification._
- **Are the 10 inferred relationships involving `DecisionCategory` (e.g. with `InherenceClassifier` and `test_adversarial_apple_fruit_recipe()`) actually correct?**
_`DecisionCategory` has 10 INFERRED edges - model-reasoned connections that need verification._
_`DecisionCategory` has 10 INFERRED edges - model-reasoned connections that need verification._
- **What connects `text-nlp-classifier`, `MatchedGraphEntity`, `graphify` to the rest of the system?**
_696 weakly-connected nodes found - possible documentation gaps or missing edges._
- **Should `Task Planning` be split into smaller, more focused modules?**
_Cohesion score 0.07407407407407407 - nodes in this community are weakly interconnected._