task-d.5.1
This commit is contained in:
@@ -236,6 +236,19 @@ If ADR coverage is incomplete, this registry marks the gap explicitly.
|
||||
| Reuse status | Reusable and active. |
|
||||
| Governance note | `docs/implementation/task-l31-customer-contact-approval-visibility.md` contains an outdated limitation stating persisted contact sharing does not exist. Treat ADR-0015 and Task C.1 as the current source of truth. |
|
||||
|
||||
### Lead Foundation
|
||||
|
||||
| Field | Details |
|
||||
| --- | --- |
|
||||
| Purpose | Dedicated marketing-owned lead domain, including lead identity, awareness source, marketing follow-up status, lead outcome state, and future `1 lead -> N enquiries` linkage |
|
||||
| Location | `src/db/schema.ts` (`crm_leads`), `drizzle/0020_lead_foundation_schema.sql`, `drizzle/0021_worried_nebula.sql`, `src/db/seeds/foundation.seed.ts`, `docs/adr/0018-lead-enquiry-domain-separation.md` |
|
||||
| Related tasks | Task D.5, Task D.5.1 |
|
||||
| Related ADRs | ADR-0018 |
|
||||
| Reusable services | None production-ready yet. D.5.1 only stabilizes schema and seed foundations before D.5.2 API work. |
|
||||
| Reusable APIs | None yet. Lead API surface is explicitly deferred to Task D.5.2. |
|
||||
| Reuse status | Foundation introduced and partially stabilized. Schema and seed contracts exist, but feature services, APIs, UI, migration flows, and separated datasets are not complete yet. |
|
||||
| Governance note | This foundation supersedes the long-term direction of the old single-record lead/enquiry model in ADR-0011, but current production behavior still largely runs on the shared `crm_enquiries` implementation until later D.5 phases are completed. |
|
||||
|
||||
### Lead / Enquiry Foundation
|
||||
|
||||
| Field | Details |
|
||||
@@ -247,6 +260,7 @@ If ADR coverage is incomplete, this registry marks the gap explicitly.
|
||||
| Reusable services | `getEnquiryReferenceData()`, `listEnquiries()`, `getEnquiryDetail()`, `createEnquiry()`, `updateEnquiry()`, `softDeleteEnquiry()`, `assignEnquiryToUser()`, `reassignEnquiryToUser()`, `listEnquiryProjectParties()` |
|
||||
| Reusable APIs | `/api/crm/enquiries`, `/api/crm/enquiries/[id]`, `/api/crm/enquiries/[id]/assign`, `/api/crm/enquiries/[id]/reassign`, `/api/crm/enquiries/[id]/customers` |
|
||||
| Reuse status | Reusable and active. This is the source of truth for lead versus enquiry separation. |
|
||||
| Governance note | ADR-0018 introduces the target split-domain direction, but this shared enquiry foundation still describes the active production service layer until D.5 migration phases complete. |
|
||||
|
||||
### Won / Lost Governance Foundation
|
||||
|
||||
@@ -350,6 +364,7 @@ If ADR coverage is incomplete, this registry marks the gap explicitly.
|
||||
|
||||
- Approvals: Approval Foundation, Authorization Foundation, Audit Foundation, PDF Foundation
|
||||
- CRM leads and enquiries: Lead / Enquiry Foundation, Won / Lost Governance Foundation, Follow-Up Foundation, Authorization Foundation
|
||||
- CRM lead split-domain migration: Lead Foundation, Lead / Enquiry Foundation, Won / Lost Governance Foundation, Authorization Foundation, Reporting Foundation, Dashboard Foundation
|
||||
- Customers and contacts: Customer Ownership Foundation, Contact Sharing Foundation, Authorization Foundation
|
||||
- Dashboard analytics: Dashboard Foundation, Revenue Attribution Foundation, Follow-Up Foundation, Reporting Foundation
|
||||
- Forms and filters: CRM Form Design Foundation, Master Data Foundation
|
||||
|
||||
@@ -52,6 +52,7 @@ Before changing any feature, foundation, report, PDF flow, or authorization beha
|
||||
| Role Management Foundation | Task L | Task L.1, Task L.2 |
|
||||
| CRM Role Assignment Foundation | Task L.1 | Task L.2 |
|
||||
| Authorization Foundation | Task L | Task L.1, Task L.2, Task L.3, Task L.3.1 |
|
||||
| Lead Foundation | Task D.5 | Task D.5.1, Task D.5.2 |
|
||||
| Follow-Up Foundation | Task D plus Task E | Task J, Task K.2 |
|
||||
| Revenue Attribution Foundation | Task D.2.1 | Task J, Task K.1, Task K.2 |
|
||||
|
||||
@@ -71,6 +72,7 @@ Before changing any feature, foundation, report, PDF flow, or authorization beha
|
||||
| ADR-0015 Customer Ownership and Contact Sharing | Task C.1, Task L.3.1 |
|
||||
| ADR-0016 Won / Lost Lifecycle Governance | Task D.4, Task J, Task K.2 |
|
||||
| ADR-0017 CRM Report Foundation | Task K.1, Task K.2 |
|
||||
| ADR-0018 Lead / Enquiry Domain Separation | Task D.5, Task D.5.1 |
|
||||
|
||||
## Task Dependency Map
|
||||
|
||||
@@ -85,6 +87,8 @@ Before changing any feature, foundation, report, PDF flow, or authorization beha
|
||||
- Task D.3 depends on: Task D, Task D.1
|
||||
- Task D.3.1 depends on: Task D.3
|
||||
- Task D.4 depends on: Task D, Task D.3
|
||||
- Task D.5 depends on: Task D.3, Task D.4, Task J, Task K.2, Task L.3
|
||||
- Task D.5.1 depends on: Task D.5
|
||||
- Task E depends on: Task D, Task B foundations
|
||||
- Task E.1 depends on: Task E
|
||||
- Task F depends on: Task E, Task E.1
|
||||
@@ -269,6 +273,32 @@ Before changing any feature, foundation, report, PDF flow, or authorization beha
|
||||
- Key Files: `docs/implementation/task-d4-won-lost-lifecycle-governance.md`, `docs/adr/0016-won-lost-lifecycle-governance.md`, `src/app/api/crm/enquiries/[id]/mark-won/route.ts`
|
||||
- Read Before Modify: `0016-won-lost-lifecycle-governance.md`, `task-d4-won-lost-lifecycle-governance.md`, `task-j-crm-dashboard-kpi.md`, `task-k2-pipeline-reports.md`
|
||||
|
||||
### Task D.5
|
||||
|
||||
- Task ID: `Task D.5`
|
||||
- Task Name: `Lead / Enquiry Domain Separation`
|
||||
- Status: `In progress`
|
||||
- Objective: Replace the single-record lead/enquiry persistence model with a split-domain direction built around `crm_leads` plus lead-linked enquiries.
|
||||
- Related ADRs: `ADR-0018`
|
||||
- Foundations Created: `Lead Foundation`
|
||||
- Foundations Modified: `Lead / Enquiry Foundation` lineage, `Document Sequence Foundation`, `Master Data Foundation`
|
||||
- Major Deliverables: ADR-0018 target direction, `crm_leads`, `crm_enquiries.lead_id`, lead option seeds, lead/enquiry split foundation planning.
|
||||
- Key Files: `docs/adr/0018-lead-enquiry-domain-separation.md`, `docs/implementation/task-d5-lead-enquiry-domain-separation.md`, `src/db/schema.ts`, `src/db/seeds/foundation.seed.ts`
|
||||
- Read Before Modify: `0018-lead-enquiry-domain-separation.md`, `task-d5-lead-enquiry-domain-separation.md`, `0011-lead-enquiry-ownership-model.md`, `task-d31-leads-enquiries-navigation-separation.md`, `task-k2-pipeline-reports.md`
|
||||
|
||||
### Task D.5.1
|
||||
|
||||
- Task ID: `Task D.5.1`
|
||||
- Task Name: `Lead Foundation Stabilization & Output Completion`
|
||||
- Status: `Completed`
|
||||
- Objective: Audit the existing D.5 phase-1 foundation work, avoid duplicate schema creation, complete missing registrations, and document compatibility status before lead API work begins.
|
||||
- Related ADRs: `ADR-0018`
|
||||
- Foundations Created: `None`
|
||||
- Foundations Modified: `Lead Foundation`, `Master Data Foundation` registration, `Document Sequence Foundation` audit visibility
|
||||
- Major Deliverables: lead foundation audit, master-option category contract completion, foundation registry registration, task catalog registration, D.5.1 implementation note.
|
||||
- Key Files: `docs/implementation/task-d51-lead-foundation-stabilization.md`, `docs/standards/project-foundations.md`, `docs/standards/task-catalog.md`, `src/features/foundation/master-options/types.ts`
|
||||
- Read Before Modify: `task-d51-lead-foundation-stabilization.md`, `0018-lead-enquiry-domain-separation.md`, `task-d5-lead-enquiry-domain-separation.md`, `src/db/schema.ts`, `src/db/seeds/foundation.seed.ts`
|
||||
|
||||
### Task E
|
||||
|
||||
- Task ID: `Task E`
|
||||
|
||||
Reference in New Issue
Block a user