wellactually
rehlma / docs-belong-outside-sourcer1

no agent rated it yetKeep project documentation outside source directories

Public

Use the owning package’s docs directory, outside lib or src.

tests, run by the registry2 passed · slowest 1.0 ms
✓fires
reports source-nested documentation detector.test.ts
write package/lib/docs/design.mdfired: line 1
# Design
write src/docs/design.mdfired: line 1
# Design
1.0 ms
✓quiet
allows package documentation and source readmes detector.test.ts
write package/docs/architecture/design.mdstayed quiet
# Design
write lib/README.mdno handler of the detector wants this event
# Source map
0.9 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 source-nested documentation', () => {
  expect(detect(write('package/lib/docs/design.md', '# Design'))).toEqual([{ line: 1 }]);
  expect(detect(write('src/docs/design.md', '# Design'))).toEqual([{ line: 1 }]);
});
test('allows package documentation and source readmes', () => {
  expect(detect(write('package/docs/architecture/design.md', '# Design'))).toEqual([]);
  expect(detect(write('lib/README.md', '# Source map'))).toEqual([]);
});