Files
news-benchmark/milestone/m3-setup-frontend-scoring.md
T
Daniel Samson d66fe178c3 feat: add M3 setup frontend milestone with scoring rubric
- Add m3-setup-frontend-prompt.md with React + TypeScript + Vite setup instructions
- Add m3-setup-frontend-scoring.md with comprehensive acceptance criteria scoring (22 points)
- Update README.md with M3 frontend milestone links
2026-10-29 15:50:24 +00:00

5.4 KiB

M3: Setup Frontend - Scoring Rubric

Acceptance Criteria Scoring Table

Score Criteria
0 Agent failed to implement acceptance criteria:
- No Vite/React project created
- TypeScript not configured
- Project structure missing key folders
- Components incomplete
- Dockerfile or docker-compose missing
1 Agent partially implemented acceptance criteria that builds successfully:
- Basic React app with vite but no typescript
- Missing multiple required folders
- Components render but have errors
- npm scripts incomplete
2 Agent fully implemented acceptance criteria that builds successfully:
- Vite + React + TypeScript project in frontend/ folder
- All required directories (components/, pages/, types/, api/) created
- Article, Author, Category TypeScript interfaces defined
- Header and Home components created
- package.json scripts (dev, build, preview) working
- .gitignore excludes node_modules, dist/, IDE configs
3 Agent fully implemented acceptance criteria that builds successfully, includes properly configured API client with error handling
- Types exported for all interfaces match backend models
- ESLint configuration present and passing
4 Agent fully implemented acceptance criteria that builds successfully, includes comprehensive TypeScript types with validation
- Proper function signatures in API client<br- Components use TypeScript props with proper typing
5 Agent fully implemented acceptance criteria that builds successfully, includes all content from Score 4 AND:
- Full docker-compose.yml at project root with both backend and frontend services
- Production-ready Nginx configuration for serving React SPA
- Performance benchmarks showing acceptable build times

Scoring Breakdown by Criterion

Project Setup (Max 2 points)

  • 0 pts: No Vite/React project or not in frontend/ folder
    - TypeScript missing entirely
  • 1 pt: Basic React app created but structure incomplete
    - Missing api/, types/, pages/ folders
  • 2 pts: Complete directory structure with all required folders (public/, src/, components/, pages/, types/, api/)

TypeScript Implementation (Max 3 points)

  • 0 pts: No TypeScript or tsconfig.json
    - Plain JavaScript only
  • 1 pt: TypeScript enabled but no type definitions
    - Partial interfaces
  • 2 pts: Article, Author, Category interfaces properly defined
    - Types used in components
  • 3 pts: Comprehensive types including ApiResponse, function signatures, validation

Components (Max 3 points)

  • 0 pts: No components or App.tsx missing
    - Application doesn't render
  • 1 pt: Only Header component created
    - Home page incomplete
  • 2 pts: Header and Home components implemented correctly
    - Components mount without errors
  • 3 pts: Reusable UI components (ArticleCard, AuthorAvatar, CategoryBadge) created

API Integration (Max 2 points)

  • 0 pts: No API client or fetch not configured
    - Cannot make requests to backend
  • 1 pt: Basic fetch wrapper exists but no error handling
    - Missing type safety
  • 2 pts: api/client.ts with base URL configuration, fetch wrapper, and error handling
    - Type-safe request/response functions

Docker Configuration (Max 3 points)

  • 0 pts: No Dockerfile or .dockerignore
    - Cannot containerize frontend
  • 1 pt: Basic Dockerfile but doesn't work
    - Missing build steps or nginx config
  • 2 pts: Multi-stage Dockerfile with Node.js build and Nginx serve stages
    - Application serves correctly from container
  • 3 pts: Complete docker-compose.yml with backend + frontend services, port mappings, depends_on

Code Quality (Max 2 points)

  • 0 pts: No ESLint or linting fails
    - Poor code organization
  • 1 pt: Basic ESLint rules configured but warnings present
    - Inconsistent formatting
  • 2 pts: ESLint passing with zero critical warnings
    - Consistent code style, type hints on all functions

Documentation (Max 2 points)

  • 0 pts: No README.md or incomplete
    - No setup instructions
  • 1 pt: README exists with basic info only
    - Missing examples
  • 2 pts: Comprehensive README with setup guide, API documentation, and usage examples |

Total Possible Score: 22 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 application won't run

Bonus Points Consideration

+1 point for:

  • ESLint rules properly configured and enforcing best practices
  • .eslintrc.cjs or vite.config.ts includes meaningful linting rules

+2 points for:

  • TypeScript strict mode enabled in tsconfig.json
  • Components use proper TypeScript generics and props typing

+3 points for:

  • docker-compose.yml at project root orchestrating both services
  • Nginx configuration properly routes SPA (try_files with index.html fallback)