LLM Schizophrenia: A Vibe Coder's Cookbook
Anthropic
An experienced developer shares a workflow for using AI agents to write large production code. By creating specialized subagents with distinct roles, clean contexts, and restricted tools, the author prevents context degradation and improves code quality. The approach includes skills (process files), planning, rules, and automated checks.
The author, a programmer with over 20 years of experience, describes a method for using AI agents to write large production projects. They argue that big tasks fail not because of the model but because a single session tries to be everything at once. The solution is to create subagents—markdown files defining a role, a model, and allowed tools—that operate with clean contexts and die after completing their task. The author's 'troupe' includes an architect, a developer, a reviewer (read-only), a tester who verifies tests are 'lethal' by breaking code, a security expert, and a DBA. A crucial insight is to use a cheaper model for execution and a more expensive one for review, because a reviewer's error goes unnoticed. The process is codified in 'skills'—files with a description, body, and details—that grow from incidents, like the rule to check facts, not reports. Planning is essential: humans review the plan to catch costly errors early, and plans must be refreshed by an architect before large work. The author emphasizes that state must be recorded in files because agents have no memory between sessions. Project rules (CLAUDE.md) and a single check script with an honest exit code serve as glue; rules are dated precedents, and checks cannot be bypassed. Start by asking the model to create a reviewer subagent, then turn repeated instructions into a skill, and let the troupe grow organically. The cost: significantly more tokens, human time shifts to reviewing reports and resolving disputes, and rules will be broken—but that's normal. The approach only pays off for tasks that don't fit in one context.
- Сокращения
- LLM = Large Language Model — большая языковая модель
- CI = Continuous Integration — непрерывная интеграция
- DBA = Database Administrator — администратор баз данных
Source: Habr — хаб ИИ —
original
