Skip to content

Repository files navigation

TatShack

A reusable domain model (ontology) for tattooing. Not an application—a foundation for building applications.

What is TatShack?

TatShack is a semantic compiler target that answers: What is a tattoo, and how do all the pieces fit together?

It encodes the complete tattoo lifecycle as immutable, validated domain entities:

Customer Intent → Feasibility Analysis → Design Generation → Selection → 
Execution Plan → Session Recording → Healing Tracking → Outcome Assessment

Each entity is immutable at construction, validates its invariants upfront, and answers exactly one business question. No backflow. One-way data flow.

Quick Start

# Run all tests
cargo test --lib

# 492 tests, all passing

What's Included

20 Domain Entities (492 tests, 0 failures):

Phase 1: Core Design Pipeline (7 entities)

  • ProblemSpace, ConstraintGraph, DesignSpace, ApprovedDesign, ExecutionPlan, SessionResult, ArtistSearchCriteria

Phase 2: Booking & Consultation (7 entities)

  • BookingAgreement, PreConsultationData, DepositLifecycle, ConsultationSchedule, ConsultationExecution, DataConfirmation, DesignAgreement

Phase 3: Session & Healing (6 entities)

  • SessionArrivalLogic, SessionExecution, AftercareBrief, HealingProfile, HealingOutcome

Architecture

One-Way Data Flow: Each stage owns one business question and produces immutable output. Next stage references by ID only (clean boundaries, no backflow).

7 Essential Checks (austere review):

  1. No Option dumping (required fields are required)
  2. Validation at construction (Result<T, Error>)
  3. Immutability enforced (private fields, getters only)
  4. Determinism only (same input → same output)
  5. No infrastructure code (zero HTTP/SQL/JSON)
  6. Errors explain why (actual values, not templates)
  7. Tests cover both paths (happy + error)

Documentation

  • docs/architecture.md — Complete pipeline overview
  • docs/problem-space.md — Customer intent validation
  • docs/constraint-engine.md — Feasibility analysis
  • docs/design-engine.md — Design generation
  • docs/execution.md — Execution specifications
  • docs/session.md — Session recording
  • docs/healing.md — Healing tracking
  • docs/skills/ — Implementation guidelines

Development

Branch Strategy: Trunk-based development

  • main — protected (production-ready)
  • feature/* — feature branches flow to main

Current Branch: feature/problem-space (completed)

Completed Phases:

  • ✅ Phase 1: Core entities (7 entities, 96 tests)
  • ✅ Phase 2: Booking & consultation (7 entities, 198 tests)
  • ✅ Phase 3: Session & healing (6 entities, 198 tests)

Why This Matters

Most tattoo software treats the domain as a black box. TatShack makes it explicit:

  • Semantic precision: Every entity has a name that unambiguously answers "What is this?"
  • Validation upfront: Invalid state is impossible at construction time
  • Immutability: Records never change (append-only for time-series)
  • No infrastructure leakage: Pure domain logic
  • Explainability: Every error shows why with actual values

Future Work

  1. Semantic Compiler: Ingest tattoo corpus, discover ontology, measure convergence with SSI
  2. Applications: Booking app, CRM, design assistant built on top
  3. Knowledge Base: Aggregate patterns across many tattoos
  4. Research: Publish compiler as semantic ontology extraction contribution

Questions?

Read the entity source code in crates/core/src/. Every field has a comment explaining why. Every validation function has a test verifying its behavior.


Built with discipline. No shortcuts. No fake patterns. Pure domain logic.

TatShack: The ontology that makes tattooing explicit.

About

Reusable domain model (ontology) for tattooing. 20 entities, 492 tests, one-way data flow, immutable, validated.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages