Jern Cloud docs

Add docstrings the way this repository writes them.

A skill is a playbook the agent reads when a task matches. This one is four rules for a docstring. The session that used it produced exactly the line the rules describe, and nothing else.

The skill

One file, .jern/skills/docstrings/SKILL.md, committed to the repository and reviewed like code:

---
name: docstrings
description: How this project writes a docstring for a conversion function.
---

Every conversion function in `src/temperature.py` carries a one-line
docstring, and nothing more:

- It starts with "Convert a temperature from" and names both units in
  full: "Convert a temperature from Kelvin to Celsius."
- It ends with a period and stays on one line.
- It does not repeat the formula, the parameter, or the return type.

When you add or change a docstring, run the tests afterwards and leave the
function body as it is unless the task says otherwise.

Only the name and the description ride the agent's prompt. The body is read when the task matches.

The message

A comment on an issue, which opens a session through the comment trigger:

/jern Add a docstring to every function in src/temperature.py that lacks one.

What came back

Pull request 78, forty-six seconds after the comment. One line added: """Convert a temperature from Celsius to Fahrenheit.""", on the one function that had no docstring. The agent ran the tests, saw one fail on a known bug in the file, and left the function body alone, because the skill's last line said so. A session on the same repository without the skill had fixed that bug on its way to a docstring.

Receipt rowWhat it said
Outcomesuccess, pull request ready
Policy.jern/baseline.json digest 5a58da65014e, repository baseline, pinned
Model3 gateway calls
Tokens15,190 in, 454 out; 6,755 counted toward the cap
Estimated spend$0.009 at list price
Files touchedsrc/temperature.py +1 −0; 1 of at most 4 files, 1 of at most 200 lines
Toolsread_file ×6, edit_file ×1, file_tree ×1, list_dir ×1, run_tests ×1: the listing of the skills folder, and the read of the skill, are on the trace

Why a skill and not a longer message

The message says what to do this time. The skill says how it is done here, every time, and it is reviewed once. A repository can carry a skill per procedure, releases, migrations, tests, docstrings, and pay context for only the one a task needs. See Skills.

Try it on your repository

  1. Write .jern/skills/<name>/SKILL.md with a one-line description of when it applies, and merge it.
  2. Ask for the work in a session, an issue label, or a /jern comment, in words that match the description.
  3. Check the receipt's tool line for the listing and the read, and the pull request for the rule followed.