555133d245
Phase 2 Batch 1 - No Dependencies (Start Immediately) ├─ VS-01: ManageIdentityAndRoles │ ├─ GOV: VS-01_SLICE_SPEC.md (Policy/Scope/Failure/Acceptance) │ ├─ DATA: VS-01_DATA_CONTRACT.md (3NF schema, PIT, CDC events) │ └─ DOMAIN: VS01_IdentityPolicyTests.cs (15 tests, pure logic) └─ VS-02: SynchronizeSecurityMaster (🔜 Next) ### VS-01 GOV Component - User Management (CRUD, soft-delete) - Role & Permission Model (Admin/Analyst/Trader/Viewer) - Data Integrity (PIT compliance, immutable email) - API Contracts (POST/GET/PATCH endpoints) - UI/UX Acceptance Criteria - Security Model - Failure Modes & Recovery ### VS-01 DATA Component - Schema (3NF): identity.users, identity.roles, identity.user_roles, identity.user_permissions - Constraints: Email UNIQUE, status ENUM, PIT temporal ordering - Immutability: Email/UserID/Roles cannot change post-creation - Soft-delete: removed_at pattern (append-only) - PIT Queries: published_at <= cutoff validation - CDC Events: UserCreated, RoleAssigned, RoleRevoked - Idempotency: Email-based dedup, role assignment idempotent ### VS-01 DOMAIN Component - 15 Domain Policy Tests (NO database, pure logic) ✅ Email validation (format, normalization, case-insensitivity) ✅ Password validation (length ≥12 chars) ✅ Role management (assign, revoke, idempotency) ✅ Permission hierarchy (role-based access control) ✅ User status transitions (active/inactive/suspended) ✅ Admin-only operations (user creation, role modification) ✅ Immutability (email, user ID) ✅ Soft-delete (inactive users filtered out) ✅ Consistency (every user must have role) Execution Timeline (Per Slice): - GOV: 1-2 hours ✅ COMPLETE - DATA: 2-3 hours ✅ COMPLETE - DOMAIN: 2-3 hours ✅ COMPLETE - BE: 3-4 hours (next) - ASYNC: 2-3 hours - FE: 3-4 hours - TESTOPS: 2-3 hours Total VS-01: ~18-22 hours (wall-clock ~3 days) Phase 2 Status: - Batch 1: 3/14 components COMPLETE (VS-01: 3/7, VS-02: 0/7) - Batch 2-3: 🔜 Queued (after Batch 1 deps satisfied) - 56 items total, 8 parallel batches AGENTS.md v16.0 Compliance: ✅ Necessity: User goal/non-goal/acceptance criteria specified ✅ Pattern: Vertical Slice (GOV → DATA → DOMAIN → BE → ASYNC → FE → TESTOPS) ✅ Traceability: VS-01 specs linked to Phase 2 plan ✅ Safety: Pure logic tests (no side effects) ✅ Maturity: Contracts before implementation Next: VS-01 BE (API/Handler/SQL) OR continue parallel VS-02 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>