Vibe coding on a boilerplate: stop your agent from rebuilding what it already has
Point a coding agent at a SaaS boilerplate and ask for "premium plans with a 14-day trial". If the agent does not know that internal/billing exists, what you get back is impressive, plausible — and wrong: a second Stripe client, a second webhook route, a plans table that duplicates one already served by configuration. Everything compiles. Half of it is untested. You now own two billing systems.…
When asked to build premium plans with a 14-day trial on a SaaS boilerplate, an agent may generate impressive yet incorrect code. This includes creating duplicate billing systems, such as a second Stripe client and webhook route, alongside a duplicated plans table. The issue stems from the agent not recognizing that the required functionality already exists within the boilerplate.
The problem lies not in hallucinations but in the agent's inability to understand that the work has already been completed. Prompting harder, such as utilizing existing billing code, provides temporary relief but fails to persist across multiple sessions or with other agents.
To mitigate this, GoVueKit provides AGENTS.md at the root of its repository, which serves as a map for agents to reference before writing any new code. This map outlines capabilities, such as internal/billing and billing.Provider email, to ensure agents write code in line with the existing boilerplate. Additionally, AGENTS.md includes rules on how features should be built, including portable SQL, organization_id on business queries, and idempotent webhooks.
The map also explains the codebase's chain, encompassing aspects like migration, queries, domain packages, handlers, routes, stores, views, and tests.
By ensuring that an agent has access to this map, the risk of reinventing existing functionality is significantly reduced. Should the map be updated or become outdated, the GoVueKit test suite, cmd/server/agents_test.go, will fail, preventing any discrepancies. The harness also incorporates tests for PostgreSQL and SQLite database compatibility, frontend translations, and Playwright journeys to ensure the agent's work aligns with the codebase's standards.
Ultimately, while the harness prevents agents from rebuilding foundational elements, it does not guarantee the quality of specific features. Review remains crucial to ensure the implementation is elegant and meets user needs.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.
This story
This is one outlet's version. Read the fullest account.