49 lines
2.5 KiB
Markdown
49 lines
2.5 KiB
Markdown
# Tasks: Inventory Dependencies Graph
|
|
|
|
## Schema & Data Model
|
|
- [x] T001 Define relationship taxonomy (enum or config) with display labels, directionality, descriptions
|
|
- [x] T002 Create `inventory_links` migration with unique constraint + indexes
|
|
- [x] T003 Create `InventoryLink` model + factory
|
|
|
|
## Extraction Pipeline
|
|
- [x] T004 Implement `DependencyExtractionService` (normalize references, resolve targets, create edges)
|
|
- [x] T005 Add reference parsers for `assigned_to`, `scoped_by`, `targets`, `depends_on`
|
|
- [x] T006 Integrate extraction into `InventorySyncService` (post-item-creation hook)
|
|
- [x] T007 Implement 50-edge-per-direction limit with priority sorting
|
|
|
|
## Query Services
|
|
- [x] T008 Implement `DependencyQueryService::getOutboundEdges(item, type?, limit=50)`
|
|
- [x] T009 Implement `DependencyQueryService::getInboundEdges(item, type?, limit=50)`
|
|
- [x] T010 Ensure tenant-scoping enforced at query builder level
|
|
|
|
## UI Components
|
|
- [x] T011 Add "Dependencies" section to `InventoryItemResource` ViewInventoryItem page
|
|
- [x] T012 Implement direction filter (single-select: all/inbound/outbound, default: all)
|
|
- [x] T013 Create Blade view `dependency-edges.blade.php` (zero-state, missing badge, tooltip)
|
|
- [x] T014 Add relationship-type grouping/collapsible sections
|
|
|
|
## Tests
|
|
- [x] T015 Unit: `DependencyExtractionServiceTest` (determinism, unique key, unsupported refs)
|
|
- [x] T016 Unit: `InventoryLinkTest` (unique constraint, tenant scoping)
|
|
- [x] T017 Feature: extraction creates expected edges + handles missing targets
|
|
- [x] T018 Feature: extraction respects 50-edge limit
|
|
- [x] T019 Feature: `DependencyQueryService` filters by tenant + direction
|
|
- [x] T020 UI Smoke: dependencies section renders + filter works + zero-state shown
|
|
- [x] T021 Security: tenant isolation (cannot see other tenant edges)
|
|
|
|
## Finalization
|
|
- [x] T022 Run full test suite (`php artisan test`)
|
|
- [x] T023 Run Pint (`vendor/bin/pint`)
|
|
- [x] T024 Update checklist items in `checklists/pr-gate.md`
|
|
|
|
## 追加 Tasks (MVP Remediation)
|
|
- [ ] T025 Implement relationship-type filter (single-select dropdown, default: all)
|
|
- [ ] T026 UI Smoke: relationship-type filter limits edges
|
|
- [ ] T027 Create and complete `checklists/requirements.md` (Constitution gate)
|
|
|
|
## MVP Constraints (Non-Tasks)
|
|
- MVP is limit-only (no pagination/cursors).
|
|
- Show up to 50 edges per direction (up to 100 total for "all").
|
|
- Unknown/unsupported shapes are warning-only; persist warnings on run record (`InventorySyncRun.error_context.warnings[]`).
|
|
- No new tables for warnings.
|