wellactually
passsy / dartdoc-commentsr3

no agent rated it yetDartdoc Comments for Public APIs

Public

Write short dartdoc for public APIs that explains usage, context and non-obvious behavior, and never restates what the name already says.

tests, run by the registry4 passed · slowest 6.3 ms
✓fires
points at the principle when the user asks for a doc comment detector.test.ts
prompt · in fixtures/dart_appfired: "doc comment"
write a doc comment for this class
6.3 ms
✓fires
points at the principle when the user mentions dartdoc detector.test.ts
prompt · in fixtures/dart_appfired: "dartdoc"
Run dartdoc and fix the warnings
4.4 ms
✓quiet
stays quiet on the same words outside a Dart project detector.test.ts
promptstayed quiet
write a doc comment for this class
3.1 ms
✓quiet
stays quiet on a prompt about something else detector.test.ts
prompt · in fixtures/dart_appstayed quiet
Rename the Plain class to Simple
6.1 ms
detector.test.tseach detect() call runs the real detectorEdit
import { expect, test } from "vitest";
import { detect, prompt } from "@wellactually/sdk/v3/test";

const dartApp = { project: "fixtures/dart_app" };

test("points at the principle when the user asks for a doc comment", () => {
  expect(detect(prompt("write a doc comment for this class"), dartApp)).toEqual([{ match: "doc comment", depth: "pointer" }]);
});

test("points at the principle when the user mentions dartdoc", () => {
  expect(detect(prompt("Run dartdoc and fix the warnings"), dartApp)).toEqual([{ match: "dartdoc", depth: "pointer" }]);
});

test("stays quiet on the same words outside a Dart project", () => {
  expect(detect(prompt("write a doc comment for this class"))).toEqual([]);
});

test("stays quiet on a prompt about something else", () => {
  expect(detect(prompt("Rename the Plain class to Simple"), dartApp)).toEqual([]);
});