Bid Module Specification¶
Purpose¶
The bid module implements the Bid Domain inside the Spring Boot Modulith. It owns bid workspace execution, planning, collaboration, proposal artefacts, task management, SBD form preparation, pricing coordination, approval workflows, submission readiness, submission pack records, electronic and manual submission support, outcome capture, loss feedback, and lessons learned.
Owned Domain¶
Bid owns tender workspaces, bid plans, bid tasks, bid team members, comments, proposal drafts, proposal sections, SBD forms, pricing workbooks, BOQ references, submission checklists, approval workflows, briefing notes, submission packs, electronic submission requests, manual submission packs, bid outcomes, loss feedback, and lessons learned.
Owned Aggregates¶
| Aggregate | Responsibility |
|---|---|
| Tender Workspace | Root aggregate for bid preparation status, opportunity reference, team, plan, and major artefact references. |
| Bid Plan | Milestones, task structure, task groups, and due dates. |
| Proposal Draft | Proposal sections, versions, comments, review state, and accepted AI content. |
| Submission Package | Checklist, electronic request, manual pack, validation, and readiness state. |
| Approval Workflow | Reviewers, approval steps, decisions, conditions, and audit state. |
| Bid Outcome | Award/loss state, buyer feedback, loss reasons, and lessons learned. |
Owned Entities¶
Tender Workspace, Bid Plan, Bid Task, Bid Team Member, Comment, Proposal Draft, Proposal Section, SBD Form, Pricing Workbook, BOQ Reference, Submission Checklist, Approval Workflow, Briefing Notes, Submission Pack, Bid Outcome, and Lesson Learned.
Owned Value Objects¶
WorkspaceId, BidStatus, TaskStatus, TaskPriority, ProposalSectionStatus, SBDFormType, PricingStatus, SubmissionReadinessStatus, ApprovalDecision, SubmissionMethod, BidOutcomeResult, and LossReasonCategory.
Commands¶
| Command | Responsibility |
|---|---|
| CreateTenderWorkspace | Create workspace after pursue decision. |
| CreateBidPlan | Establish milestones, workstreams, and initial planning state. |
| AssignBidTask | Assign task to user, Digital Professional, or queue. |
| UpdateBidTask | Change task status, priority, or due date. |
| AddWorkspaceComment | Record collaboration comment. |
| CreateProposalDraft | Create draft artefact and initial sections. |
| UpdateProposalSection | Update section state, review state, or accepted content. |
| PrepareSbdForm | Prepare and validate standard bidding document form. |
| UpdatePricingWorkbook | Update pricing artefact status and metadata. |
| CompleteSubmissionChecklist | Record readiness checklist completion. |
| RequestApproval | Start governed approval workflow. |
| RecordApprovalDecision | Record approval, rejection, conditional approval, or requested changes. |
| CreateSubmissionPack | Assemble submission pack metadata and readiness state. |
| RequestElectronicSubmission | Record support request for electronic submission. |
| PrepareManualSubmissionPack | Record manual pack preparation state. |
| RecordBidSubmission | Record submission evidence and method. |
| CaptureBidOutcome | Capture award/loss result and buyer feedback. |
| CaptureLessonsLearned | Record learning output from outcome and execution. |
Queries¶
| Query | Responsibility |
|---|---|
| GetTenderWorkspace | Return workspace summary and status. |
| GetBidPlan | Return plan, milestones, and task structure. |
| GetBidTasks | Return assigned tasks and task filters. |
| GetWorkspaceComments | Return collaboration thread where authorized. |
| GetProposalDraft | Return proposal draft metadata and section state. |
| GetSbdForms | Return SBD form state and validation status. |
| GetPricingWorkbook | Return pricing artefact state and review status. |
| GetSubmissionReadiness | Return checklist, validation, and approval readiness. |
| GetApprovalWorkflow | Return approval workflow state and decisions. |
| GetSubmissionPack | Return final pack metadata and readiness. |
| GetBidOutcome | Return outcome, feedback, and lessons learned summary. |
Application Services¶
TenderWorkspaceApplicationService, BidPlanningApplicationService, BidTaskApplicationService, BidCollaborationApplicationService, ProposalDraftApplicationService, SbdFormApplicationService, PricingApplicationService, SubmissionReadinessApplicationService, ApprovalApplicationService, SubmissionApplicationService, BidOutcomeApplicationService, and LessonsLearnedApplicationService.
Domain Services¶
WorkspaceCreationService, BidPlanningService, TaskAssignmentService, AIDraftAcceptanceService, SbdValidationService, PricingReviewService, SubmissionChecklistService, ApprovalDecisionService, OutcomeCaptureService, and LessonsLearnedService.
Policies¶
Workspace Creation Policy, Bid Planning Policy, Task Assignment Policy, AI Draft Acceptance Policy, SBD Validation Policy, Pricing Review Policy, Submission Checklist Policy, Approval Policy, Outcome Capture Policy, and Lessons Learned Policy.
Repositories¶
TenderWorkspaceRepository, BidPlanRepository, BidTaskRepository, BidTeamMemberRepository, BidCommentRepository, ProposalDraftRepository, ProposalSectionRepository, SbdFormRepository, PricingWorkbookRepository, SubmissionChecklistRepository, ApprovalWorkflowRepository, SubmissionPackRepository, BidOutcomeRepository, LessonLearnedRepository, and BidAuditRepository.
Events Published¶
TenderWorkspaceCreated, BidPlanCreated, BidTaskAssigned, ProposalDraftCreated, ProposalSectionUpdated, SBDFormPrepared, PricingWorkbookUpdated, SubmissionChecklistCompleted, ApprovalRequested, BidApproved, SubmissionPackCreated, ElectronicSubmissionRequested, ManualSubmissionPackPrepared, BidSubmitted, BidOutcomeCaptured, and LessonsLearnedCaptured.
Events Consumed¶
BidNoBidRecommendationCreated, TenderDeadlineTracked, BriefingSessionTracked, TenderRequirementCaptured, ProcurementReadinessScoreUpdated, ComplianceRiskIdentified, ComplianceDocumentExpired, OrganizationProfileUpdated, CapabilityVerified, AISuggestionAccepted, SubmissionIntegrationCompleted, and AdministrativePolicyChanged.
REST API Responsibility¶
The module owns API responsibilities for tender workspaces, bid planning, task management, collaboration, proposal drafts, proposal sections, SBD forms, pricing workbook metadata, approval workflows, submission readiness, submission packs, submission support records, outcomes, and lessons learned. Final endpoint specs are deferred.
Database Ownership¶
Bid owns conceptual persistence for bid workspaces, bid plans, bid tasks, bid team members, bid comments, proposal drafts, proposal sections, SBD forms, pricing workbooks, BOQ references, submission checklists, approval workflows, briefing notes, submission packs, electronic submission requests, manual submission packs, bid outcomes, loss feedback, lessons learned, and bid audit logs.
Module Dependencies¶
Allowed dependencies are shared kernel identifiers, identity authorization context, opportunity tender and recommendation read models, organization profile/evidence read models, compliance readiness/evidence summaries, intelligence draft and task suggestions, notification task/deadline/approval triggers, analytics event projections, contract award handoff events, and integration gateway submission support adapters.
Forbidden Dependencies¶
Bid must not mutate Opportunity tender facts, Organization profile facts, Compliance evidence or readiness facts, Intelligence reasoning records, Contract delivery obligations, Notification delivery state, Analytics projections, or external tender portal records. Other modules must not write bid workspace, proposal, approval, submission, or outcome tables directly.
AIOS Interaction Boundary¶
AIOS may suggest bid plans, tasks, summaries, draft sections, risk explanations, pricing review prompts, and lessons learned. Bid owns acceptance and lifecycle state. AI-generated content becomes Bid state only after accepted by a governed command with provenance and review status.
Security And Tenant Rules¶
- Every workspace must reference
OrganizationIdandTenderOpportunityId. - Workspace access requires membership, role/permission, entitlement where applicable, and workspace-level access control.
- Approval, submission, and pricing actions require stronger authorization and audit logging.
- Proposal content, pricing data, and submission packs are sensitive tenant data.
- Bid may reference compliance evidence and organization facts but must not copy them as canonical facts.
Test Strategy¶
Tests must cover workspace creation, planning, task assignment, AI draft acceptance, proposal versioning, SBD validation, pricing review, submission checklist readiness, approval workflow decisions, submission records, outcome capture, lessons learned, event publication, idempotent event consumption, tenant filtering, authorization, and Spring Modulith boundary verification.
Future Microservice Extraction Notes¶
Bid can be extracted after workspace, approval, submission, and outcome contracts stabilize. Extraction requires stable events from Opportunity, Organization, Compliance, and Intelligence, document storage contracts, workflow audit guarantees, and a migration plan for collaborative bid artefacts.
Mermaid Component Diagram¶
flowchart TD
Api[bid.api.rest]
App[bid.application.service]
Command[bid.application.command]
Query[bid.application.query]
Domain[bid.domain.model]
Policy[bid.domain.policy]
Repo[bid.infrastructure.persistence]
Messaging[bid.infrastructure.messaging]
Integration[bid.infrastructure.integration]
Opportunity[opportunity context]
Organization[organization evidence]
Compliance[compliance readiness]
Intelligence[intelligence drafts]
Notification[notification triggers]
Contract[contract handoff]
Api --> App
App --> Command
App --> Query
App --> Domain
Domain --> Policy
App --> Repo
App --> Messaging
App --> Integration
App --> Opportunity
App --> Organization
App --> Compliance
App --> Intelligence
Messaging --> Notification
Messaging --> Contract