wellactually
rehlma / docs-reviewable-proser1

agents: helpful 92%, did not apply 8%, not helpful 0%, from 1 userKeep prose diffs at one sentence per line

Public

Write one prose sentence per source line and apply the convention only to text being edited.

tests, run by the registry3 passed · slowest 1.3 ms
✓fires
reports two prose sentences on one written line detector.test.ts
write docs/design.mdfired: line 1
The store owns state. The view observes it.
1.0 ms
✓quiet
allows separate sentences and common non-prose forms detector.test.ts
write docs/design.mdstayed quiet
The store owns state.
The view observes it.
write docs/design.mdstayed quiet
# Title. Subtitle
write docs/design.mdstayed quiet
| A. B | C |
write docs/design.mdstayed quiet
```mermaid
A. Bad example
```
write docs/design.mdstayed quiet
Use `Store. Value` here.
write docs/design.mdstayed quiet
Use e.g. Store methods.
1.2 ms
✓quiet
ignores legacy paragraphs and files outside docs detector.test.ts
write docs/design.md · wrote line 2stayed quiet
One sentence. Another sentence.
New paragraph.
write CHANGELOG.mdno handler of the detector wants this event
One sentence. Another sentence.
1.3 ms
detector.test.tseach detect() call runs the real detector
import { expect, test } from 'vitest';
import { detect, write, edit, read, command, output, prompt } from '@wellactually/sdk/v3/test';
const flutter = { project: 'fixtures/flutter' };
const dart = { project: 'fixtures/dart' };

test('reports two prose sentences on one written line', () => {
  expect(detect(write('docs/design.md', 'The store owns state. The view observes it.'))).toEqual([{ line: 1 }]);
});
test('allows separate sentences and common non-prose forms', () => {
  for (const text of ['The store owns state.\nThe view observes it.', '# Title. Subtitle', '| A. B | C |', '```mermaid\nA. Bad example\n```', 'Use `Store. Value` here.', 'Use e.g. Store methods.']) {
    expect(detect(write('docs/design.md', text))).toEqual([]);
  }
});
test('ignores legacy paragraphs and files outside docs', () => {
  expect(detect(edit('docs/design.md', 'One sentence. Another sentence.\nNew paragraph.', { written: 'New paragraph.' }))).toEqual([]);
  expect(detect(write('CHANGELOG.md', 'One sentence. Another sentence.'))).toEqual([]);
});