Files
news-benchmark/milestone/m4-setup-developer-environment-scoring.md
T
Daniel Samson e6a72964b0 feat: add M4 setup developer environment milestone
- Add docker-compose.yml orchestrating backend and frontend services
- Create .env.example with documented environment variables
- Create .env file with default development configuration
- Makefile with dev, stop, restart, test, clean commands
- data/.gitignore excludes SQLite database from version control
- .dockerignore files for both frontend and backend builds
- Update README.md with M4 milestone links

This milestone enables developers to run the full application stack using Docker Compose.
2026-10-29 16:05:24 +00:00

87 lines
6.6 KiB
Markdown

# M4: Setup Developer Environment - Scoring Rubric
## Acceptance Criteria Scoring Table
| Score | Criteria |
|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 0 | Agent failed to implement acceptance criteria:<br>- No docker-compose.yml or incomplete<br>- Missing both frontend and backend services<br>- No environment configuration<br>- Commands don't work at all |
| 1 | Agent partially implemented acceptance criteria that builds successfully:<br>- Basic docker-compose with one service only<br>- Missing volume configuration<br>- .env.example or .env missing<br>- Makefile incomplete |
| 2 | Agent fully implemented acceptance criteria that builds successfully:<br>- docker-compose.yml configures backend AND frontend services<br>- Port mappings for both services (3000, 8000)<br>- Docker network defined for inter-service communication<br- `.env.example` file documents environment variables<br-.env file with default values provided<br-.gitignore excludes .env files and data/ |
| 3 | Agent fully implemented acceptance criteria that builds successfully, includes `data/.gitignore` excluding SQLite database<br- Backend and frontend Dockerfiles properly optimized for production use<br- Volume mounted at `/app/data/db` for persistent storage |
| 4 | Agent fully implemented acceptance criteria that builds successfully, includes complete Makefile with:<br>- dev command (up -d --build)<br>- stop command (down)<br>- restart command (down then up -d)<br>- test command running both unit and E2E tests<br- clean command removing containers and volumes |
| 5 | Agent fully implemented acceptance criteria that builds successfully, includes all content from Score 4 AND:<br- `.dockerignore` files for both frontend and backend excluding build artifacts<br-.env.example contains comprehensive documentation table of variables<br- README.md section on Docker setup with quick start guide and troubleshooting<br- Services include restart: unless-stopped policy |
## Scoring Breakdown by Criterion
### docker-compose Configuration (Max 4 points)
- **0 pts**: No docker-compose.yml or missing services entirely<br>- Cannot build any service
- **1 pt**: docker-compose.yml exists but only defines one service<br>- Other service referenced but not built
- **2 pts**: Both backend and frontend services defined with correct build contexts<br>- Port mappings configured (3000, 8000)<br>- Networks section present with bridge driver
- **3 pts**: Service dependencies configured correctly (frontend depends on backend)<br>- Volume configuration for database persistence
- **4 pts**: Full service orchestration with restart policies and health checks
### Environment Configuration (Max 3 points)
- **0 pts**: No .env or .env.example files<br>- Hardcoded credentials in source code
- **1 pt**: Only .env file exists but no documentation<br>- Variables not clearly explained
- **2 pts**: Both .env and .env.example present with all required variables<br>- Clear default values for development
- **3 pts**: Comprehensive documentation table for each environment variable<br-.gitignore excludes all .env and *.local files
### Development Commands (Max 4 points)
- **0 pts**: No automation scripts or Makefile<br>- Manual docker compose required for everything
- **1 pt**: Basic stop command only<br>- No dev or restart automation
- **2 pts**: dev, stop, and restart commands functional<br>- Uses docker compose correctly
- **3 pts**: Backend-start and frontend-start individual service commands<br>- build command available
- **4 pts**: test command runs both frontend and backend tests<br-clean command removes volumes and images
### Security & Best Practices (Max 3 points)
- **0 pts**: .env committed to git repository<br>- No docker security configuration
- **1 pt**: Basic .gitignore but doesn't exclude all sensitive files<br>- Volumes not properly configured
- **2 pts**: .gitignore excludes .env, *.local, data/ directory<br>- Proper volume mounting for SQLite
- **3 pts**: All security best practices followed<br-.dockerignore files prevent unnecessary file exposure in builds
### Documentation (Max 3 points)
- **0 pts**: No README.md or incomplete<br>- Missing docker setup instructions
- **1 pt**: Basic README mentions docker-compose exists<br>- No quick start guide
- **2 pts**: README documents all required prerequisites (Docker, Node.js)<br>- Port mappings and service descriptions included
- **3 pts**: Complete troubleshooting guide with common issues and solutions<br>- Network configuration explained
### Service Communication (Max 2 points)
- **0 pts**: Services cannot communicate<br>- Different network configurations or missing networks
- **1 pt**: Basic networking but CORS or API calls fail<br>- Services on separate isolated networks
- **2 pts**: Docker bridge network properly configured<br>- Inter-service communication verified via health endpoints
### Build Optimization (Max 3 points)
- **0 pts**: docker-compose.yml lacks build optimizations<br>- Dockerfiles include unnecessary files
- **1 pt**: Basic multi-stage builds missing<br>- Large images (>500MB for simple apps)
- **2 pts**: Backend uses slim Python image with no-cache pip install<br- Frontend uses multi-stage Nginx build
- **3 pts**: All .dockerignore files present and effective<br- Build times optimized, artifacts excluded
## Total Possible Score: 29 points
## Evaluation Notes
- Partial credit given for incomplete but working implementations (Score 1)
- Full credit requires all acceptance criteria met with passing verification (Score 2 minimum)
- Higher scores require additional value-add content beyond baseline requirements
- Score 0 indicates agent did not attempt the task or commands don't work
## Critical Requirements Checklist
For an agent to achieve any score above 1, they MUST:
- [x] Create docker-compose.yml with BOTH backend AND frontend services
- [x] Configure ports for both services (3000, 8000)
- [x] Define Docker network for service communication
- [x] Include .env.example and .env files
## Bonus Points Consideration
**+1 point** for:
- Makefile includes logs command for viewing container output
- Services have proper restart policies configured (unless-stopped)
**+2 points** for:
- Comprehensive README.md Docker section with troubleshooting
- All .dockerignore files properly exclude build artifacts
**+3 points** for:
- Complete test automation in Makefile (frontend + backend)
- Clean command removes all containers, volumes, and images