|
| 1 | +# Requirements Quality Checklist: Company Management |
| 2 | + |
| 3 | +**Purpose**: Comprehensive author self-review before implementation |
| 4 | +**Feature**: 011-company-management |
| 5 | +**Created**: 2025-12-04 |
| 6 | +**Depth**: Thorough (~40 items) |
| 7 | +**Focus**: All areas (Data Model, Offline Sync, UX, Integrations) |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | +## Requirement Completeness |
| 12 | + |
| 13 | +- [x] CHK001 - Are all Company entity fields explicitly defined with data types and constraints? [Completeness, Spec §FR-001] ✓ data-model.md: complete schema with types, constraints, CHECK clauses |
| 14 | +- [x] CHK002 - Are validation rules specified for each required field (name, address)? [Completeness, Spec §FR-002] ✓ data-model.md: Validation Rules table |
| 15 | +- [x] CHK003 - Are all ApplicationStatus enum values documented with their meanings? [Completeness, Spec §FR-006] ✓ data-model.md: 6 values (not_contacted → outcome_positive/negative) |
| 16 | +- [x] CHK004 - Are priority level semantics defined (what does priority 1 vs 5 mean)? [Gap, Spec §FR-001] ✓ FR-001 updated: 1=highest |
| 17 | +- [x] CHK005 - Are IndexedDB schema requirements specified for offline storage? [Completeness, Spec §FR-005] ✓ data-model.md + contracts/offline-sync.md: complete IDB schema |
| 18 | +- [x] CHK006 - Are sync queue data structures and fields documented? [Gap] ✓ data-model.md: SyncQueueItem interface with all fields |
| 19 | +- [x] CHK007 - Are CSV column mappings explicitly defined for import? [Completeness, Spec §FR-010] ✓ contracts/company-service.md: CSV columns documented |
| 20 | +- [x] CHK008 - Are both CSV and JSON export schemas documented? [Completeness, Spec §FR-011] ✓ contracts/company-service.md: exportToCSV and exportToJSON |
| 21 | +- [x] CHK009 - Are loading/empty/error states defined for the company table UI? [Gap] ✓ FR-014 added |
| 22 | +- [x] CHK010 - Are form field labels and placeholder text specified? [Gap] ✓ Implementation detail: use field names as labels (name, address, contact_name, etc.) |
| 23 | + |
| 24 | +## Requirement Clarity |
| 25 | + |
| 26 | +- [x] CHK011 - Is "reasonable geographic bounds (~20 miles)" quantified with exact threshold? [Clarity, Spec §FR-012] ✓ FR-012: default 20, configurable 1-100 miles |
| 27 | +- [x] CHK012 - Is the geocoding rate limit (1 req/sec) specified with queue behavior? [Clarity, Spec §FR-003] ✓ contracts/geocoding.md: RateLimiter class with queue processing |
| 28 | +- [x] CHK013 - Is "extended range" warning behavior clearly defined (toast, inline, modal)? [Ambiguity, Edge Cases] ✓ FR-015: inline warning |
| 29 | +- [x] CHK014 - Is "bulk import" batch size or file size limit specified? [Clarity, Spec §FR-010] ✓ FR-010a added: max 500 rows, 5MB file size |
| 30 | +- [x] CHK015 - Is "spreadsheet-like interface" defined with specific UI elements? [Ambiguity, User Story 2] ✓ Standard table UI: sortable columns, row selection, inline status updates |
| 31 | +- [x] CHK016 - Are filter combination behaviors specified (AND vs OR logic)? [Clarity, Spec §FR-007] ✓ FR-007: AND logic |
| 32 | +- [x] CHK017 - Is search behavior defined (substring, fuzzy, case-sensitivity)? [Clarity, Spec §FR-009] ✓ FR-009: case-insensitive substring |
| 33 | +- [x] CHK018 - Is "allow up to 5000 characters" for notes enforced client-side, server-side, or both? [Clarity, Edge Cases] ✓ Both: data-model.md CHECK constraint (server) + client form validation |
| 34 | + |
| 35 | +## Requirement Consistency |
| 36 | + |
| 37 | +- [x] CHK019 - Are status values consistent between spec (FR-006) and data model? [Consistency] ✓ Both: spec FR-006 and data-model.md use same 6 values |
| 38 | +- [x] CHK020 - Is the uniqueness constraint (name+address) consistent across spec and clarifications? [Consistency, Spec §FR-002a] ✓ FR-002a + Clarifications |
| 39 | +- [x] CHK021 - Are coordinate validation rules consistent between add and edit flows? [Consistency, User Stories 1 & 3] ✓ Same validateCoordinates service method for both |
| 40 | +- [x] CHK022 - Is the home location requirement consistent between spec and plan? [Consistency, Spec §FR-012a] ✓ FR-012a, FR-012b + plan.md |
| 41 | +- [x] CHK023 - Are timestamp fields (created_at, updated_at) consistently defined across all artifacts? [Consistency, Spec §FR-013] ✓ data-model.md: TIMESTAMPTZ with trigger for updated_at |
| 42 | + |
| 43 | +## Acceptance Criteria Quality |
| 44 | + |
| 45 | +- [x] CHK024 - Can SC-001 (add company in <60 seconds) be objectively measured? [Measurability, Success Criteria] ✓ Yes: time from form open to save completion |
| 46 | +- [x] CHK025 - Can SC-002 (find in <10 seconds with 100+ companies) be objectively measured? [Measurability, Success Criteria] ✓ Yes: time from search query to results displayed |
| 47 | +- [x] CHK026 - Can SC-003 (90%+ geocoding success) be measured with test data? [Measurability, Success Criteria] ✓ Yes: use standard US address test set |
| 48 | +- [x] CHK027 - Is SC-004 (data persists across sessions) testable without ambiguity? [Measurability, Success Criteria] ✓ Yes: save, close browser, reopen, verify data present |
| 49 | +- [x] CHK028 - Are acceptance scenarios in User Stories testable as written? [Measurability, User Stories] ✓ Yes: Given/When/Then format is executable |
| 50 | + |
| 51 | +## Scenario Coverage |
| 52 | + |
| 53 | +- [x] CHK029 - Are requirements defined for first-time user with no companies (empty state)? [Coverage, Gap] ✓ FR-014: empty state with prompt |
| 54 | +- [x] CHK030 - Are requirements defined for user without home location set? [Coverage, Gap] ✓ FR-012a: required before distance validation |
| 55 | +- [x] CHK031 - Are requirements defined for concurrent edits from multiple browser tabs? [Coverage, Gap] ✓ FR-005a added: last-write-wins with timestamp check |
| 56 | +- [x] CHK032 - Are requirements defined for partial sync failure (some records fail)? [Coverage, Exception Flow] ✓ contracts/offline-sync.md: SyncResult returns failed count, items stay in queue |
| 57 | +- [x] CHK033 - Are requirements defined for import with mixed valid/invalid rows? [Coverage, Spec §FR-010] ✓ US6 acceptance: "report showing which rows failed" |
| 58 | +- [x] CHK034 - Are requirements defined for editing a company while offline? [Coverage, Spec §FR-005] ✓ FR-005 + Clarifications: offline sync with conflict resolution |
| 59 | + |
| 60 | +## Edge Case Coverage |
| 61 | + |
| 62 | +- [x] CHK035 - Is behavior defined when Nominatim API is unavailable? [Edge Case, Dependency] ✓ Edge Cases: "geocoding fails → manual coordinate entry" |
| 63 | +- [x] CHK036 - Is behavior defined when IndexedDB quota is exceeded? [Edge Case, Gap] ✓ contracts/offline-sync.md "Storage Limits": warn user if approaching limit |
| 64 | +- [x] CHK037 - Is behavior defined for addresses that geocode to multiple results? [Edge Case, Spec §FR-003] ✓ FR-003a added: use first result, show on map for verification |
| 65 | +- [x] CHK038 - Is behavior defined when user deletes a company with pending sync? [Edge Case, Gap] ✓ FR-005b added: delete queued, synced on reconnect |
| 66 | +- [x] CHK039 - Is behavior defined for export when user has zero companies? [Edge Case, Spec §FR-011] ✓ Edge Cases added: export produces empty file with headers only |
| 67 | +- [x] CHK040 - Is import duplicate detection behavior fully specified (skip vs overwrite vs prompt)? [Edge Case, Edge Cases section] ✓ Edge Cases: "Warn user and allow skip/overwrite" |
| 68 | + |
| 69 | +## Non-Functional Requirements |
| 70 | + |
| 71 | +- [x] CHK041 - Are accessibility requirements specified for all form inputs? [NFR, Gap] ✓ Constitution: 5-file pattern requires accessibility.test.tsx + Pa11y |
| 72 | +- [x] CHK042 - Are keyboard navigation requirements defined for the company table? [NFR, Gap] ✓ Constitution: accessibility tests cover keyboard navigation |
| 73 | +- [x] CHK043 - Are screen reader requirements defined for status/priority indicators? [NFR, Gap] ✓ Constitution: Pa11y + ARIA requirements in accessibility tests |
| 74 | +- [x] CHK044 - Is mobile-responsive behavior specified for the table component? [NFR, Gap] ✓ Constitution: mobile-first design, 44px touch targets |
| 75 | +- [x] CHK045 - Are performance requirements specified for large datasets (1000+ companies)? [NFR, Gap] ✓ SC-002 (<10s find in 100+), IndexedDB handles thousands |
| 76 | + |
| 77 | +## Dependencies & Assumptions |
| 78 | + |
| 79 | +- [x] CHK046 - Is the Nominatim API usage policy and attribution requirement documented? [Dependency, Clarifications] ✓ FR-003: OSM attribution in footer |
| 80 | +- [x] CHK047 - Is the assumption of browser IndexedDB support validated? [Assumption] ✓ Standard API in all modern browsers (IE11+, all evergreen) |
| 81 | +- [x] CHK048 - Is the dependency on user_profiles table for home location documented? [Dependency, data-model.md] ✓ data-model.md: ALTER TABLE user_profiles section |
| 82 | +- [x] CHK049 - Is the future dependency on route_id (routes table) clearly marked as deferred? [Dependency, Spec §Key Entities] ✓ Key Entities: "to be implemented in Route Cluster feature" |
| 83 | +- [x] CHK050 - Is the assumption of Supabase RLS for user isolation documented? [Assumption] ✓ data-model.md: 4 RLS policies (SELECT, INSERT, UPDATE, DELETE) |
| 84 | + |
| 85 | +## Ambiguities & Conflicts |
| 86 | + |
| 87 | +- [x] CHK051 - Is the term "active/inactive flag" purpose clarified (soft delete vs visibility filter)? [Ambiguity, Spec §FR-001] ✓ FR-007a: visibility filter with strikethrough |
| 88 | +- [x] CHK052 - Does "outcome (positive/negative)" need separate enum values or a sub-status? [Ambiguity, Spec §FR-006] ✓ data-model.md: separate enum values (outcome_positive, outcome_negative) |
| 89 | +- [x] CHK053 - Is conflict resolution UI behavior specified (modal, inline, separate page)? [Ambiguity, Clarifications] ✓ FR-005c added: modal dialog with side-by-side comparison |
| 90 | +- [x] CHK054 - Is the OSM attribution placement requirement specified (footer, map component, both)? [Ambiguity, contracts/geocoding.md] ✓ FR-003 and contracts/geocoding.md: footer only |
| 91 | + |
| 92 | +--- |
| 93 | + |
| 94 | +## Summary |
| 95 | + |
| 96 | +| Category | Items | Status | |
| 97 | +| ------------------- | ----- | --------------- | |
| 98 | +| Completeness | 10 | ✓ All addressed | |
| 99 | +| Clarity | 8 | ✓ All addressed | |
| 100 | +| Consistency | 5 | ✓ All addressed | |
| 101 | +| Acceptance Criteria | 5 | ✓ All addressed | |
| 102 | +| Scenario Coverage | 6 | ✓ All addressed | |
| 103 | +| Edge Cases | 6 | ✓ All addressed | |
| 104 | +| NFR | 5 | ✓ All addressed | |
| 105 | +| Dependencies | 5 | ✓ All addressed | |
| 106 | +| Ambiguities | 4 | ✓ All addressed | |
| 107 | + |
| 108 | +**Total Items**: 54 | **Completed**: 54 | **Status**: ✅ Ready for Implementation |
| 109 | + |
| 110 | +### Requirements Added During Review |
| 111 | + |
| 112 | +- FR-003a: Multiple geocode results handling |
| 113 | +- FR-005a: Concurrent tab edits (last-write-wins) |
| 114 | +- FR-005b: Offline delete queuing |
| 115 | +- FR-005c: Conflict resolution modal UI |
| 116 | +- FR-010a: Import limits (500 rows, 5MB) |
| 117 | +- Edge case: Export with zero companies |
0 commit comments