-
Notifications
You must be signed in to change notification settings - Fork 0
AI Development Methodology
Complete guide to AI-assisted development in Photo Map MVP - Claude Code, GitHub Copilot, Gemini CLI, and prompt engineering best practices.
- Overview
- Claude Code
- GitHub Copilot
- Gemini CLI
- Best Practices
Photo Map MVP leverages multiple AI tools for development, each serving different purposes:
| Tool | Purpose | Use Cases |
|---|---|---|
| Claude Code | Full-stack development, refactoring, documentation | Feature implementation, code review, architecture decisions |
| GitHub Copilot | Real-time code completion, inline suggestions | Writing boilerplate, test scaffolding, quick fixes |
| Gemini CLI | Large context analysis, codebase understanding | Analyzing entire codebase, finding patterns, architectural review |
Benefits:
- β Faster prototyping and iteration
- β Consistent code quality and patterns
- β Comprehensive documentation generation
- β Automated refactoring with context awareness
- β Test generation and coverage improvement
Approach:
- AI as assistant, not replacement
- Human review of all AI-generated code
- Structured prompts with clear specifications
- Context-rich documentation (
.ai/,.decisions/directories)
Claude Code is the primary AI tool for Photo Map MVP development. Used for complex multi-file changes, feature implementation, and architectural decisions.
Model: Claude Sonnet 4.5 (claude-sonnet-4-5-20250929) Knowledge Cutoff: January 2025
Location: .claude/ directory
.claude/
βββ CLAUDE.md # Main workflow instructions
βββ claude.md # User-specific global config
βββ skills/ # Custom skills for specific tasks
βββ angular-frontend/ # Angular 18 patterns
βββ spring-boot-backend/ # Spring Boot 3 patterns
βββ code-review/ # Code quality checks
βββ ... (more skills)
Always Read Before Implementation:
| File | Purpose | When to Read |
|---|---|---|
.ai/prd.md |
MVP requirements, user stories | Start of any feature |
.ai/tech-stack.md |
Technology specifications | Before backend/frontend work |
.ai/db-plan.md |
Database schema, migrations | Before data model changes |
.ai/api-plan.md |
REST API specification | Before endpoint implementation |
.ai/ui-plan.md |
Frontend architecture | Before UI component work |
Decision Context (On-Demand):
| File | Purpose | When to Read |
|---|---|---|
.decisions/prd-context.md |
Business rationale | When questioning requirements |
.decisions/tech-decisions.md |
Technology choices | When considering alternatives |
Key Guidelines from CLAUDE.md:
-
Language Policy:
- Communication with user: Polish
- Code: English (all identifiers, class names, methods)
- Documentation: English (all .md files, README, comments)
- Scripts: English (comments, help messages, log messages)
- Git commits: Conventional Commits format (English)
-
Code Quality:
- Self-documenting code (clear names > comments)
- Minimize comments (only for complex business logic)
- TypeScript strict mode (all types explicit)
-
Testing Policy:
- Unit tests before every commit (TDD-like approach)
- Coverage >70% for new code
- Integration tests at end of each phase
-
Git Workflow:
- Small, focused commits
- Test immediately before committing
- Conventional Commits format
- Always ask for confirmation before push
Chrome DevTools MCP:
- Frontend verification after implementation
- Debugging console errors and network requests
- Performance analysis
- Responsive design testing
MCP Ref (Documentation Search):
- Search Angular, Spring Boot, Leaflet.js docs
- Used proactively for library-specific details
- Skip for obvious, simple changes
Sequential Thinking MCP:
- Complex algorithmic problems
- Multi-step debugging
- System architecture design
- NOT for simple CRUD operations
Available Skills:
| Skill | Description | Use Cases |
|---|---|---|
angular-frontend |
Angular 18 standalone components, TypeScript services | Component implementation, routing, services |
spring-boot-backend |
Spring Boot 3 REST APIs, JPA entities, security | Controllers, services, repositories |
code-review |
Review code for security, performance, quality | Before commits, pull requests |
doc-update |
Update documentation files | Cleanup .ai/features/, README updates |
frontend-verification |
Verify Angular changes with Chrome DevTools | After UI implementation |
project-planning |
Break down features into implementable tasks | Feature planning, task breakdown |
Using Skills:
# Invoke skill from Claude Code
skill: angular-frontendGitHub Copilot provides real-time code completion and inline suggestions during development.
Model: Claude Sonnet 4.5 IDE: VS Code (frontend), IntelliJ IDEA (backend)
Location: .github/copilot-instructions.md
Key Features:
- Real-time code completion
- Inline suggestions (context-aware)
- Chat mode for quick questions
- Inline documentation generation
Architecture Patterns:
Frontend (Angular 18):
- Standalone components only (no NgModules)
- Routing in
app.routes.tswith flat Routes array - BehaviorSubject pattern for shared state
- Signals for component-local state
- Tailwind CSS 3.4 utility-first
Backend (Spring Boot 3):
- Photo processing pipeline with Spring Integration
- JWT tokens with Spring Security 6
- DTOs for request/response (never expose entities)
- Pagination with
PageableβPage<T>wrapped inPageResponse<T>
Data Layer:
- Flyway migrations in
backend/src/main/resources/db/migration/ - JPA entities with
@ManyToOne/@OneToManyrelationships - Repository pattern: Spring Data JPA
Copilot Excels At:
- Writing boilerplate code (DTOs, entities, simple methods)
- Test scaffolding (unit test templates)
- Inline documentation generation
- Simple refactoring (rename, extract method)
- Quick bug fixes (null checks, validation)
When to Use Claude Code Instead:
- Multi-file changes
- Complex architectural decisions
- Feature implementation with dependencies
- Database schema changes
- API specification implementation
Chrome DevTools MCP:
# Check if app is running
tail -n 20 scripts/.pid/backend.log
tail -n 20 scripts/.pid/frontend.log
# Start if not running
./scripts/start-dev.shCommon Use Cases:
- "Verify login form works on localhost:4200"
- "Gallery photos not loading - diagnose the issue"
- "Analyze gallery performance and suggest optimizations"
SonarCloud API Integration:
# Fetch issues via API
Pobierz z SonarCloud blocker i critical issues
# Fix issues from working file
Napraw bΕΔdy z .sonarqube/CURRENT_ISSUES.mdGemini CLI (powered by Google Gemini 2.5 Pro) is used for large context analysis tasks where understanding the entire codebase is needed.
Key Feature: 1M token context window (entire codebase fits)
Codebase Analysis:
- Finding patterns across all files
- Identifying architectural inconsistencies
- Detecting duplicate code
- Analyzing dependencies and imports
Large-Scale Refactoring:
- Planning multi-file refactoring
- Understanding impact of breaking changes
- Reviewing entire feature implementations
Documentation Generation:
- Generating comprehensive API documentation
- Creating architecture diagrams from code
- Writing feature specifications based on code
Use Gemini CLI for:
- β Analyzing entire codebase (>100 files)
- β Finding all instances of a pattern
- β Planning large refactoring
- β Reviewing architecture consistency
Use Claude Code for:
- β Implementing features (actionable tasks)
- β Writing code with file edits
- β Real-time code generation
- β Task execution (git commands, file operations)
Location: .ai/features/
Structure:
# Feature: User Authentication
## Status
π IN-PROGRESS
## Requirements
- User can log in with email + password
- JWT token returned on success
- Token expires after 24h
## Acceptance Criteria
- [ ] POST /api/auth/login endpoint
- [ ] Unit tests passing
- [ ] Integration tests passing
## Implementation
### Phase 1: Backend (2h)
- JWT token provider
- Auth controller
- Auth service
- Unit tests
### Phase 2: Frontend (1h)
- Login component
- Auth service
- Route guardsLocation: .decisions/
Purpose: Document "why" behind technology and architecture choices.
Example:
# Decision: Why Tailwind 3.x (not 4.x)?
**Date:** 2025-10-15
**Status:** Approved
**Context:**
- Angular 18 is incompatible with Tailwind 4
- Need utility-first CSS framework
**Decision:**
- Use Tailwind 3.4.17
- Do NOT upgrade to Tailwind 4 until Angular 19
**Consequences:**
- β
Stable, well-tested
- β
Good Angular 18 integration
- β Missing some Tailwind 4 featuresFor Claude Code:
-
Start with core docs:
- Read
.ai/prd.md,.ai/tech-stack.md,PROGRESS_TRACKER.md - Read phase-specific plan (
.ai/db-plan.md,.ai/api-plan.md,.ai/ui-plan.md)
- Read
-
Monitor token usage:
- Use
/compactwhen >150k tokens - Use
/cleanwhen switching phases - Save progress to
PROGRESS_TRACKER.mdbefore/clean
- Use
-
Provide full context in prompts:
- Reference specific files and sections
- Include acceptance criteria
- Mention related decisions from
.decisions/
Before Committing:
- Review changes:
git diff --cached - Run tests:
./scripts/run-all-tests.sh - Check coverage: >70% for new code
- Verify conventions: Code in English, docs in English, commits in English
Before Pushing:
- Pre-push hook runs automatically (all tests)
- If tests fail β fix and retry
- Never bypass with
--no-verifyfor main/master
Always Review:
- Security (SQL injection, XSS, hardcoded secrets)
- Error handling (null checks, exception handling)
- Performance (N+1 queries, unnecessary loops)
- Code quality (naming, comments, duplication)
Red Flags:
- β Hardcoded passwords or secrets
- β Missing input validation
- β Incomplete error handling
- β Missing tests
Workflow:
-
Plan with Claude Code and Gemini:
- Read specs from
.ai/ - Break down feature into tasks
- Update
PROGRESS_TRACKER.md
- Read specs from
-
Implement with Claud Code and GitHub Copilot:
- Real-time code completion
- Test scaffolding
- Inline documentation
-
Verify with Claude Code:
- Code review with
code-reviewskill - Run tests and verify coverage
- Update documentation
- Code review with
-
Analyze with Gemini CLI:
- Large-scale pattern analysis
- Architecture consistency check
- Refactoring planning
- Development Setup - Environment configuration
- Architecture - System architecture overview
- Contributing - Git workflow, code conventions
- Testing & Quality - Testing strategy
Last Updated: 2025-11-10
Sources:
-
CLAUDE.md(Claude Code workflow instructions) -
.github/copilot-instructions.md(GitHub Copilot instructions) -
.ai/prd.md,.ai/tech-stack.md(Core specifications) -
.decisions/(Decision rationale)