AI Usage Best Practices Plan
Outlines a plan to use AI productively in development, with guardrails against duplication and over-reliance.
What this file does
Outlines a plan to use AI productively in development, with guardrails against duplication and over-reliance.
When to use it
- Adopting AI coding assistants and want to avoid common pitfalls
- Setting up CI checks for code duplication
- Creating team guidelines for when to use AI
- Building a prompt library for repetitive tasks
Assumes this stack
AI Usage Best Practices Plan
Goal
Position as a developer who uses AI thoughtfully—maximizing productivity while avoiding common pitfalls like code duplication and over-reliance.
Current State
- CLAUDE.md with project constraints
- Explicit anti-patterns defined
- CI guardrails for duplication (in progress)
Implementation Roadmap
1. CI Duplication Detection
Problem: AI tends to generate similar code rather than reuse existing abstractions.
Solutions:
- Add
jscpdto CI pipeline for copy-paste detection - Configure thresholds: fail on >5% duplication
- Add custom ESLint rules for project-specific patterns
npm install -D jscpd
3. Pre-commit AI Review Hook
Checks to implement:
- Bundle size delta
- New dependencies added
- Duplicate utility detection
- Naming convention violations
Tool options:
- Husky + custom scripts
- lint-staged with custom functions
4. Scoped Usage Guidelines
Document when AI helps vs hurts:
| Task | AI Recommended | Why |
|---|---|---|
| Boilerplate (types, tests) | Yes | Repetitive, low risk |
| State management | No | Requires domain context |
| Styling/layout | Yes | Follows patterns |
| Business logic | No | Needs human judgment |
| Refactoring | Partial | Good for suggestions, review manually |
| Code review | Yes | Catches patterns linters miss |
5. Prompt Library
Create reusable prompts for common tasks:
/prompts
component-scaffold.md
test-generation.md
pr-review.md
refactor-check.md
Each prompt should include:
- Context requirements
- Expected output format
- Quality checks to apply after
6. AI-Assisted PR Review Checklist
Use AI to check:
- Does this duplicate existing utilities?
- Are naming conventions consistent?
- Could this be simplified?
- Are there abstraction opportunities?
Do NOT use AI to check:
- Business logic correctness
- Security implications
- Performance in production context
Metrics to Track
- Duplication percentage over time
- PR review turnaround
- Bugs introduced in AI-assisted vs manual code
- Bundle size trends
Talking Points for Marketing
- "I use AI as a force multiplier, not a replacement for judgment"
- "I've built guardrails that catch AI's common failure modes"
- "I document when AI helps and when it hurts—that's the skill"
- "AI is great at patterns, humans are great at context"
Next Actions
- Set up jscpd in CI
- Create prompt library folder
- Document team's scoped usage guidelines
- Add pre-commit hook for bundle size check
What's inside
6 roadmap sections, 1 table, 1 folder structure, 1 checklist, 1 metrics list, 4 talking points
Change this for your project
- Replace
jscpdduplication threshold5%with your team's acceptable limit - Replace
/promptsfolder structure with your own prompt storage path
Where it goes
Keep alongside your test suite. Used to define and score model evaluations.
Worth borrowing
- Scoped usage guidelines table distinguishing AI-suitable from human-only tasks
- Prompt library with context, output format, and quality checks
Related Documents
IATA BCBP Standard Compliance
Documents which IATA BCBP fields and barcode formats a Swift library implements, including Version 8 gender code support.
Evaluating AI Agent Systems: Metrics, Benchmarks, and Quality Assurance (2024-2026)
Surveys 2024-2026 metrics, benchmarks, and monitoring tools for evaluating AI agent systems, with recommendations for a self-improving coding agent.
Voice AI Leaderboards, Benchmarks, and Evaluation Gaps (Jan 2025 -- Feb 2026)
Surveys 20+ voice AI benchmarks from Jan 2025, Feb 2026, identifies evaluation gaps, and provides leaderboard data for STT, TTS, and end-to-end voice agents.
LLM Evaluation — Deep Dive
Covers why LLM evaluation is hard, benchmark taxonomy, LLM-as-judge methodology, contamination, robustness, and designing an eval suite for a product.