This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Medhāvī ProductionPlanning - Project Description Document (PDD) | |
| **Product**: Medhāvī ProductionPlanning | |
| **Version**: 1.0 | |
| **Date**: September 2025 | |
| **Author**: Medhāvī Development Team | |
| **Status**: Draft - Architecture Definition Phase | |
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ConstraintAbstraction we needValues inside structureFunctorIndependent contextual valuesApplicativeDependent contextual stepsMonadEffectful functionsKleisli categoryCombining valuesMonoidTransforming between contextsNatural transformationConsuming valuesContravariant functorInput-output adaptationProfunctorRecursive interpretationF-algebra / catamorphismWorkflow descriptionFree structure / DSL | |
| 1. What are the input and output types? | |
| 2. Can this step fail? | |
| 3. Are checks independent or dependent? | |
| 4. Do we want error accumulation or fail-fast? | |
| 5. Does order matter? | |
| 6. What operation do we need? | |
| 7. Which lawful abstraction fits? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Medhavi.Domain.Material.BillOfMaterials | |
| open System | |
| open Medhavi.Domain.Ids | |
| open Medhavi.Domain | |
| open Medhavi.Domain.Validation | |
| open Medhavi.Common.ResultCE | |
| type BomItem = | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Medhavi.Domain.Customer | |
| open System | |
| open Medhavi.Domain.Ids | |
| open Medhavi.Domain | |
| open Medhavi.Domain.Validation | |
| open Medhavi.Common.ResultCE | |
| type Customer = | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Medhavi.Domain.Validation | |
| open System | |
| open Medhavi.Domain | |
| /// Reusable validation helpers for command/input checks | |
| let required (field: string) (value: string) = | |
| if String.IsNullOrWhiteSpace value then | |
| Error(DomainError.Validation(DomainErrorCodes.ValidationFailed, $"{field} is required", Map.empty)) | |
| else |