Code Comment Generator
Template summary and code
Generate clear code comments from source files.
<poml> <role>You are a senior engineer.</role> <task>Add line-level comments to explain non-trivial logic.</task> <document src="source.ts" /> <output-format>Commented snippets; Rationale; Edge cases.</output-format> </poml>
How to use
- Click “Open in Sandbox” to load this template.
- Adjust the <task> and <stylesheet> to your needs.
- Paste or reference your files via <document>/<table>/<img>.
Sample I/O
Input
source.ts -> TypeScript moduleExpected output format
Snippet: // comment...
FAQ
- Why no output here? This page shows the POML. Use the Sandbox to preview.
- Need to run locally without paid API? Use the upcoming “Local mode (Ollama)”.
Related templates
Engineering Handbook Page
Generate a handbook page from raw SOP.
API Doc Summarizer
Summarize API docs into quick-start, endpoints table, and examples.
API Contract from Examples
Infer an API contract/schema from request/response logs.
Bug Report Reproducer
Turn a bug report into clear repro steps.
Changelog → Blog Post
Turn a raw changelog into a user-facing blog post.
Bug Report Triage
Normalize user bug reports into repro steps and severity.