Back to directory
Batch utility · 2026-09-11

Auto-documenting 1,000+ undocumented functions in one pass

A loop over a large, undocumented codebase asked a local model to summarize each function in a strict word limit, then wrote the result back as a header comment.

Facing a large application with more than 1,000 undocumented functions, this person looped through the whole codebase, sending each one to a local model via API with instructions to summarize its behavior concisely, then formatted that summary into a header comment block and inserted it above the function. It took some prompt tweaking to get the summaries genuinely short rather than padded, but the end result did the job across the whole codebase.

VERIFIABLE SOURCE

Reported anonymously by an r/LocalLLM contributor · 2 upvotes at capture

View source
SETUP HISTORY

Snapshots over time

1 version
CURRENT2026-09-11Auto-documenting 1,000+ undocumented functions in one pass

A loop over a large, undocumented codebase asked a local model to summarize each function in a strict word limit, then wrote the result back as a header comment.

Batch utilityHardware unspecifiedModels unspecifiedRuntime unspecified

This is the currently published snapshot.

Discussion

0 comments

No comments yet. Questions and corrections on this setup are welcome.

Leave a comment

Comments are reviewed before they appear. Keep it civil, cite your sources, and stay on topic.