AI Writes His npm Code in Seconds. He Rebuilt His Packages for AI Users.
The next wave of open-source consumers is AI agents, and they read type definitions and llms.txt before they read README parameter tables. A maintainer who optimizes only for human eyes is already invisible to the default user.
A front-end developer who spent five years publishing 10 npm packages for RuoYi-style admin dashboards watched his so-called technical moat collapse when a single AI prompt produced a Vue3 number-scroll component in about fifteen seconds, complete with thousand separators, easing, and a `prefers-reduced-motion` fallback he had never considered. His weekly download counts were thin — 384 for `s-timeline`, 372 for `ball-swiper`, 371 for `trends-table` — and even those were inflated by CI `npm installs`. The realization that AI could handle 95% of business development sent him into a crisis where he almost deleted the repos.
The turning point was a line he encountered: AI is not the enemy of plugins; AI is the new user of plugins. He re-examined his packages from an AI perspective and found four concrete hurdles: they weren’t discoverable in training data, READMEs didn’t describe capabilities readably, there were no type declarations to guide correct argument passing, and integration steps were undocumented. He codified this as a “four-layer acceptance” checklist — discoverable, understandable, correctly invokable, directly integratable.
His response was fourfold: he added an `llms.txt` file at his documentation root, wrote an `AI.md` manual for each package, filled in `index.d.ts` type declarations, and built a scaffolding tool with `AGENTS.md` for AI collaborators. He also open-sourced all 10 repos and republished 9 npm packages with richer metadata. He admits the download data hasn’t changed yet, but he says he can finally talk about his work, and he now believes code isn’t the barrier — the judgment to choose the right code is.
Treating AI as a user rather than a rival reframes every maintenance decision: READMEs become capability descriptions, type declarations become the primary API documentation, and package discoverability now depends on machine-readable metadata like llms.txt.
The author's admission that his 'technical barrier' was just an information gap is the real lesson: any code that can be expressed as a prompt stops being a moat when AI collapses the knowledge lag.
The download numbers (300-500 weekly, with bumps from CI) show the packages were already niche, yet the author's emotional crisis was real; the problem wasn't losing users but losing a sense of purpose.
The claim that 'AI reads type definitions more accurately than docs' is a practical signal for any maintainer: investing in index.d.ts may matter more than any human-facing tutorial.