Your setup guide is an untested surface. Make the tool drive the agent instead
Описание и применение
Заменив ручное руководство на тестируемый драйвер, вы создаёте надёжный, автоматизированный мастер установки, который проверяет состояние, защищает секреты и использует дешёвые модели LLM для рендеринга.
Задача
Manual prose setup guides lack test suites, leading to fragile, error‑prone deployments that require human re‑execution after every change.
Результат
Replacing prose with a testable driver script turns a fragile, human‑dependent setup into a reliable, automated wizard that verifies state, protects secrets, and uses only inexpensive LLMs for rendering.
Рабочий процесс
- Write a driver script exposing currentRecord(state) and advance(state, answer) with injectable I/O.
- Define a record vocabulary (ask, do, say) with closed‑choice options.
- Implement verification functions that check credentials and attach recovery data to each step.
- Create a single npm script (e.g., npm run wizard:drive) as the sole entry point.
- Commit permission configs denying agent access to secret files by name.
- Add an AGENTS.md at the repo root to expose the driver to supported agents.
- Run tests with fake dependencies to ensure the wizard behaves correctly without live side effects.
- Deploy the wizard; the agent renders JSON records, collects user answers, and the driver validates and proceeds.
- Verify the final deployment with an end‑to‑end test purchase to confirm functionality.
Доказательства
The wizard became a program. The agent runs one command, npm run wizard:drive, which prints exactly one JSON record.
A record is one of three things: a question, a manual step, or a message to show.
The agent never sees the secrets.
- Дата записи: 2026-09-06T04:06:25.140Z