Source: Takuya Matsuyama (creator of Inkdrop), How I fixed 55 bugs in a week by making my monorepo more agent-friendly, 2026-11-20 (devas.life). Surfaced by TLDR Dev 2026-12-02.
What he changed
Structure: the Electron desktop app moved from kind-based folders (
browser/,main/,shared/, with a flat 330-filecomponents/) to feature folders (renderer/features/*, domain folders undermain/,shared/ipc/). Each feature exposes only anindex.ts; main and renderer may not import each other. The mobile app and web editor got the same shape.Lint as a boundary: adopted Christoph Nakazawa's strict
@nkzw/oxlint-config, which opened with 11,589 findings in 2,422 files.rules-of-hooksalone found 18 real bugs. Moved ESLint to Oxlint and Jest to Vitest.Tests before fixes: wrote component tests before applying lint fixes, each fix paired with a test that failed first. About 55 bugs fixed, all in code he had written by hand; 13 more mobile bugs are pinned by tests awaiting fixes.
Cost: merging
maininto the lint branch after the moves produced 145 merge conflicts.
Why it matters
The argument is that agents imitate whatever nearby code looks like, so the repository's layout is a prompt. Feature folders with a single public entry point give the agent a coherent example to copy, and lint-enforced import boundaries make the architecture checkable instead of advisory. One developer's experience, with no measurement of agent output before and after; the bug count comes from the testing discipline as much as from the reorganization.