Agentic AI coding works best if you explain the AI exactly why and what you want to get done. And then you track how it achieves this goal like you would with a team of developers. Craft prompts systematically to maximize agent effectiveness. Start by defining a specific persona, such as "senior AWS Serverless Python developer," to set expertise context. Clearly state the problem with functional and non-functional requirements, then provide rich context like code examples, docs, or integrations (e.g., MCP servers for internal data). Always ask the agent for a plan before execution to catch issues early and apply domain knowledge. Periodically summarize changes (e.g., update the README, ARCHITECTURE, and ROADMAP, as well as your AI assistant's core instruction file). When working with "cheap" models such as Grok, review and approve commits incrementally, asking the agent to do test-driven development in small batches (one task at a time) rather than making bulk changes. Onboard agents by having them review key files like the README or rules at session start. Switch to top models for multi-step tasks, and refine guardrails for the agents. To get started, you should generate a [Specification](#Specification) for the project and then use [Task Management](#Task%20Management) to track progress. ## Specification For most projects it makes more sense to just work with your LLM to generate a clear roadmap and description (README.md) of your application, maybe with an architecture diagram. Simply go ahead and create those three artifacts with your LLM: - `ROADMAP.md` - `ARCHITECTURE.md` - `README.md` ### Spec-Kit Spec-Kit might often be overkill, but here is how to work with it: [Spec-Kit](https://github.com/github/spec-kit) is a tool to build specification in Markdown format for your coding AI: ```bash uv tool install specify-cli --from git+https://github.com/github/spec-kit.git ``` Set up a **new** project spec with [Spec-Kit](https://github.com/github/spec-kit): ```bash specify init $PROJECT_NAME ``` If you already have a project, and want to add Spec-Kit, e.g. to a Claude-based project: ```bash specify init . --ai claude ``` Commands for your AI CLI will be available as `/speckit.*`. Start with the **`/speckit.constitution`** command to create your project's governing principles and development guidelines that will guide all subsequent development. This could be a global spec for all your projects: ``` /speckit.constitution Create principles focused on code quality, testing standards, user experience consistency, and performance requirements. ``` Use the **`/speckit.specify`** command to describe the first feature you want to build. Focus on the **what** and **why**, not the tech stack. For example (although a real spec might be much longer): ``` /speckit.specify Build an application that can help me organize my photos in separate photo albums. Albums are grouped by date and can be re-organized by dragging and dropping on the main page. Albums are never in other nested albums. Within each album, photos are previewed in a tile-like interface. ``` Finally, use the **`/speckit.plan`** command to provide your tech stack and architecture choices. For example: ``` /speckit.plan The application uses Vite with minimal number of libraries. Use vanilla HTML, CSS, and JavaScript as much as possible. Images are not uploaded anywhere and metadata is stored in a local SQLite database. ``` In reality, these prompts might be longer and contain more detail of what you want to achieve. And of course, you will repeatedly use `/speckit.specify` to flesh out more features. ## Task Management In theory, using `TODO.md` lists or the Spec-Kit work planning in Markdown has become popular. Instead, you should be using Beads because they use less context (the AI doesn't have to parse the whole file) and it enables concurrency: You can have multiple AI assistants work on the same project in different instances of the repo. Beads is set up to sync work across AI assistants working on the same project. ### Beads Use [Beads](https://github.com/steveyegge/beads) to manage the tasks of your LLM. Don't just use a plain `TODO.md` file. ```bash curl -fsSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash ``` If you are using VS Code, get the Beads UI plugin: `vscode-beads`. Otherwise, you can use a web UI: ``` npm i beads-ui -g bdui start --open --port 3333 ``` Set up Beads to track the tasks of your agents: ```shell bd init # project setup bd setup [claude|aider|cursor|factory|gemini] --project bd hooks install echo "- Use 'bd' for task tracking" >> [CLAUDE.md|.github/copilot-instructions.md] ``` Once done, check in the `./.beads` folder and your updates to your AI coding agent instructions (`CLAUDE.md` or `.github/copilot-instructions.md`, for example). To figure out if your setup is in good shape, run: ``` bd doctor ``` And resolve any unresolved instructions there. Later you can create epics for which your agent can create issues by using: ```shell bd create "TITLE" -t epic -p 1 --description "DESCRIPTION" ``` If you want to quickly throw in an issue for your agent to work on: ```shell bd create "TITLE" -d "DESCRIPTION" ``` Or add a bug task: ```shell bd create "TITLE" -t bug -p 1 -d "DESCRIPTION" ``` Of course, you can also ask your agent to create epics for you, and ask it to propose the issues for it. Once you created a tree of epics and tasks, you can review them with: ```shell bd dep tree $EPIC_ID --direction both ``` To only see open tickets in the tree, add `--status open` to the above. If you want your coding agent to work on a single task at a time, this is a good approach while keeping context in check: First, clear the context and then instruct the agent to remind themselves how to work with Beads and work on the next task: ``` Use `bd prime` to remind yourself of the beads workflow and then check with `bd ready` for the next task to work on. ```