← Prompt Library / Engineering

Engineering

Docstrings & Comments Pass

Add documentation to code the right way: docstrings that state contracts, comments that explain WHY, and deletion of comments that lie or narrate.

Add documentation to this code: {{code}}. Conventions: {{style}} (JSDoc/PHPDoc/docstrings — or infer from the code).

Rules: public functions get contract docstrings — what it does, params with units/constraints, return, what it throws, side effects. Inline comments ONLY where the code can't speak: non-obvious WHY, workaround references, invariants, warnings ('order matters because…'). DELETE comments that narrate the obvious, restate the function name, or have drifted from what the code now does — show me what you deleted and why. Don't touch the code logic itself.

Fields like {{ this }} are placeholders — replace them with your own details, or let Aria ask you for them.

documentation comments maintainability

Run this prompt with your real data

This prompt runs with Aria connected to your email, files, CRM and 40+ other services — and you can schedule it to run automatically.

Start Free Week

More Engineering prompts

Pragmatic Code Reviewer

Review a diff for correctness, security, and readability issues.

Explain This Code

Get a plain-English walkthrough of unfamiliar code.

Write Unit Tests

Generate thorough unit tests for a function.

Debug Assistant

Diagnose an error systematically: likely causes ranked with reasoning, the cheapest test for each, a...

Regex Builder

Build a regular expression from a plain-English requirement — explained token by token, tested again...

SQL From a Question

Turn a plain-English data question into a working SQL query — with the assumptions stated, a readabl...