Playbook: AI-Assisted Dev Workflow¶
Objective¶
Accelerate homelab infrastructure development using a hierarchy of AI coding agents.
Pre-requisites¶
Step-by-Step Flow¶
- Drafting: Use Cursor to outline a new automation script in Python.
- Implementation: Use Aider to perform targeted code generation for complex functions.
- Refactoring: Assign Jules to refactor the repository asynchronously, focusing on best practices and unit test coverage.
- Verification: Anti-Gravity runs a plan-code-test loop to ensure the new script doesn't break existing Home Assistant configurations.
- Audit: Review AI-generated commits before merging into the
mainbranch.
Data Contract¶
- Input: Natural language prompt + Codebase context.
- Output: Git diff + Commit message.
Failure Modes & Recovery¶
- Hallucination: AI generates non-existent API calls.
- Detection: Linter or compiler errors.
- Recovery: Feed error logs back to Aider for automated fixing.
- Context Limit: Large repositories exceed LLM context window.
- Recovery: Use Aider's repository map feature.
Variants¶
- Cloud-Based: Use GPT-4o via LiteLLM for better reasoning.
- Privacy-First: Use local Llama-3-Coder models in Ollama.
Case Studies & References¶
- How we rebuilt Next.js with AI in one week (Cloudflare's experience with AI-assisted rebuilding of components).