Data

Clean up duplicate sections in an AI-built wiki

The Synthadoc team had an AI fix flagged wiki pages for approval; they report it rewrote pages, kept weak duplicates and leaked notes until they added checks.

Done with Custom agent

What they did

The makers of Synthadoc, an open-source wiki that builds pages from documents, built a cleanup step. A plain script flags repeated or thin sections. An AI proposes fixes, the user sees before and after, and approves before anything is saved.

How it went

They say the AI first rewrote whole pages, kept a short duplicate over one with citations, leaked file-reading commands, left planning notes, and dropped a year it thought was wrong. They added output cleaning and draft detection.

Worth knowing

Telling the AI 'keep the first copy' was precise but wrong; the rule needed to be 'keep the best'. Better instructions alone did not stop failures, so they also kept the approval step and undo.

Try it yourself

Review the Markdown pages in [wiki folder]. List every page with repeated headings, empty sections or very short sections. For each problem, propose the smallest fix: merge duplicates by keeping the most detailed version with its citations, and never rename headings, change dates or add facts that are not on the page. Show each change as a before-and-after view and wait for my approval. Save a copy of the original before writing anything.

Swap the highlighted [parts] for your own details.

Read the original

Source: DEV Community · Paul Chen · Oct 16, 2026

Written with AI assistance from the original post and checked against our editorial guidelines. Results are as reported by the source, not independently verified.

Get 5 use cases every day

The best things people got an agent to do yesterday, each with the prompt. Free, one email a day.

See today's issue