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 · score 2

View comment