Examples

Real Plans. Real Code.

See actual hardened plan files for each supported stack โ€” complete with execution slices, validation gates, acceptance criteria, and code output.

Phase 12: User Profile & Dashboard

๐ŸŸก HARDENED 3 days ยท 12 slices Risk: Medium

Add user profile management and personalized dashboard. Users can view/edit their profile, see activity history, and access personalized metrics with full multi-tenant isolation.

Acceptance Criteria

  • โ˜ Users can view and edit their profile (name, email, avatar)
  • โ˜ Dashboard shows personalized metrics (last login, activity count)
  • โ˜ Profile changes are audited in the activity log
  • โ˜ Multi-tenant isolation โ€” users only see their own tenant's data
  • โ˜ 90%+ test coverage on new code
1

Slice 12.1 โ€” Database Migration: user_profiles Table

Tasks

1. Create migration V012__add_user_profiles.sql

2. Add columns: display_name, avatar_url, bio, last_login_at

3. Add RLS policy: WHERE tenant_id = current_setting('app.tenant_id')

4. Write integration test: verify RLS blocks cross-tenant access

Validation Gate
dotnet build                                        # zero errors
dotnet test --filter "Category=Integration"         # all pass
grep -rn "string interpolation" --include="*.cs"    # zero hits in new files
Stop Condition: If RLS policy fails integration test โ†’ STOP, do not proceed.
2

Slice 12.2 โ€” Repository Layer: UserProfileRepository

Tasks

1. Create IUserProfileRepository interface

2. Implement with Dapper, parameterized queries

3. Methods: GetByUserIdAsync, UpdateAsync, GetActivitySummaryAsync

4. Unit tests for all repository methods

View full .NET example on GitHub โ†’

Project-Level Examples