HairstyleConsultationKit is a tiny Swift library for product teams building neutral haircut-planning checklists. It turns four ordinary preparation inputs into a coarse conversation band and a plain-language next step.
The package is intentionally modest. It does not analyze a face, diagnose hair, recommend a cut, score attractiveness, or promise a salon result. Its job is to help an interface notice when a user still needs basic reference information before discussing a change with a qualified stylist.
A hairstyle preview can make an idea easier to discuss, but a single image does not settle practical questions. Current length affects what can be achieved in one appointment. Texture and density affect how a shape behaves. Maintenance time changes whether a style remains convenient. A front-only reference can hide the side profile, neckline, layering, or transition around the ears.
These variables are easy to lose when an app moves directly from inspiration to a confident-looking result. This package provides a deliberately conservative checkpoint that a product can place between those moments.
ConsultationReadiness accepts four facts:
- whether current length is known;
- whether texture is known;
- whether the user's upkeep budget is known;
- how many useful reference angles are available.
The implementation treats fewer than two useful angles as one unresolved constraint. It counts missing basics and assigns one of three bands:
exploremeans several inputs are missing;comparemeans one or two constraints remain;consultmeans the basic preparation set is complete.
The bands are workflow labels, not judgments about a person's appearance or eligibility for a hairstyle.
import HairstyleConsultationKit
let readiness = ConsultationReadiness(
currentLengthKnown: true,
textureKnown: true,
upkeepBudgetKnown: false,
referenceAnglesAvailable: 2
)
print(readiness.band) // compare
print(readiness.prompt) // Resolve the remaining constraint before choosing.The returned prompt stays neutral and encourages comparison or consultation. Applications can present it as helper text, an accessibility announcement, or a checkpoint before saving a salon brief.
Keep the four inputs editable. A user may learn more after talking with a stylist, taking another photo, or trying a different reference. Do not store the band as a permanent user trait.
Explain why a question is being asked. “How much weekly styling time fits your routine?” is more useful than a vague “maintenance” checkbox. If a user does not know their texture category, offer “not sure” and let that remain an unresolved constraint.
Do not present consult as approval or feasibility. It means only that the
small preparation set supplied to this model is complete. A qualified
professional still needs to assess the real hair, desired service, timing, and
care requirements.
The test suite covers a complete input set, one missing constraint, and several missing constraints:
swift testThe public API has no network dependency and no analytics. Identical inputs always produce identical results, which makes the model straightforward to test, translate, and explain.
Dahmani Limited also publishes Hairstyle App: Hair Try On for people who want to compare hairstyle directions on their own photo: official Google Play listing.
Disclosure: Dahmani Limited owns this package and the linked hairstyle app. Dahmani Limited is not affiliated with Google, the Swift project, or the Swift Package Index. Hairstyle previews are for inspiration; real results vary with hair characteristics, starting length, photo conditions, technique, and professional execution.
Released under the MIT License.