WriterKnowsBest: Evidence-Bound Writing for Faithful Repository-Level Documentation

Repository documentation must describe implemented behavior and cover the public application programming interfaces (APIs) developers need. Detailed descriptions may go beyond the available evidence, while cautious ones may omit useful content. We present WriterKnowsBest, an evidence-bound approach that requires explicit claim attribution and coverage during generation. The system records repository reads, and the writer binds checkable claims to these records during drafting. Separate coverage obligations identify the content to address, and typed checks validate structural facts and usage examples before delivery. Claim–evidence associations are available for inspection throughout generation. We evaluate the approach on four Java repositories comprising 31 matched components, 62 documents, and 3,808 atomic facts. Compared with RepoDoc, weighted atomic support increases from 0.844 to 0.924 and public-API coverage from 87.3% to 99.0%. When the same generator is required to cover repository facts and link its claims to evidence, the atomic support rate rises from 0.871 to 0.904. Of 223 audited bindings, 88.8% have full or partial evidentiary support. These results suggest that explicit evidence and coverage constraints can improve factual support and completeness together within the studied setting.

Authors

Institutions

Publication Details

Journal
Research Square
Published
2026-11-27
DOI
https://doi.org/10.21203/rs.3.rs-11565916/v1
Primary Topic
Software Engineering Research
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

WriterKnowsBest: Evidence-Bound Writing for Faithful Repository-Level Documentation

Jiayu Zhang, Danfeng Zhang, Tongtong Wang, Yaokai Zu
Research Square
Software Engineering Research
preprint

WriterKnowsBest: Evidence-Bound Writing for Faithful Repository-Level Documentation

Jiayu Zhang, Danfeng Zhang, Tongtong Wang, Yaokai Zu
preprint en

Abstract

Repository documentation must describe implemented behavior and cover the public application programming interfaces (APIs) developers need. Detailed descriptions may go beyond the available evidence, while cautious ones may omit useful content. We present WriterKnowsBest, an evidence-bound approach that requires explicit claim attribution and coverage during generation. The system records repository reads, and the writer binds checkable claims to these records during drafting. Separate coverage obligations identify the content to address, and typed checks validate structural facts and usage examples before delivery. Claim–evidence associations are available for inspection throughout generation. We evaluate the approach on four Java repositories comprising 31 matched components, 62 documents, and 3,808 atomic facts. Compared with RepoDoc, weighted atomic support increases from 0.844 to 0.924 and public-API coverage from 87.3% to 99.0%. When the same generator is required to cover repository facts and link its claims to evidence, the atomic support rate rises from 0.871 to 0.904. Of 223 audited bindings, 88.8% have full or partial evidentiary support. These results suggest that explicit evidence and coverage constraints can improve factual support and completeness together within the studied setting.

Research Square
University of Electronic Science and Technology of China (CN)
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon