Architecture Document — v1.0

Sewing Domain Module

A self-contained, offline AI sewing assistant delivered on a physical USB drive. Plug in, launch, ask anything about sewing — via text or voice. No internet required.

April 5, 2026 Pre-Prototype Proof of Concept

01 Product Vision

The user plugs a USB drive into any modern computer (Windows, Mac, or Linux), launches the application, and has immediate conversational access to a comprehensive sewing knowledge base — including voice input. No account creation. No subscription at the base tier. No internet connection needed.

The sewing module serves as a proof-of-concept for a broader ecosystem of domain-specific AI modules sold as physical products at retail checkout counters, craft stores, and online. It validates the core architecture — inference engine, RAG pipeline, voice input, UI shell — that will be shared across every future domain.

Strategic Role
This module proves that a small, curated AI can deliver genuinely useful, trustworthy answers within a specific domain. The sewing domain was chosen because the questions it needs to answer are well-structured (material selection, technique instruction, troubleshooting) and the target audience overlaps with other planned modules (cats, crafts, gardening).

02 Technical Stack

Inference Engine

ComponentImplementationSize
LLM Runtimellama.cpp — C/C++, portable native binaries
Model (primary)Llama 3.2 3B Instruct (Q4_K_M quantization)~2.0 GB
Model (low-RAM fallback)Phi-3 Mini 3.8B (Q4_K_S) or Gemma 2B~1.2–1.8 GB
Context Window4096 tokens — sufficient for single-turn Q&A with retrieved context

Expected Performance

System RAMModel LoadedTokens/SecondUser Experience
4 GB2B fallback5–10Usable but slow
8 GB3B primary8–15Good — conversational feel
16 GB+3B primary15–25Fast — feels snappy

Voice Input

ComponentImplementationSize
Enginewhisper.cpp — same portability as llama.cpp
Model (primary)Whisper Small — good English accuracy for conversational queries244 MB
Model (fallback)Whisper Base — for constrained storage tiers142 MB
Latency~1–3 seconds for a typical query

Interaction model: push-to-talk button → local transcription → text fed to RAG pipeline. Entire loop runs offline.

Retrieval-Augmented Generation (RAG)

User query (text or voice) Embed with sentence transformer Vector search (top 5 chunks) Inject as LLM context Conversational response
ComponentImplementationSize
Vector StoreSQLite + sqlite-vss (vector similarity search)Variable
Embedding Modelall-MiniLM-L6-v2 (ONNX)~80 MB
Chunk Strategy300–500 tokens, 50-token overlap, metadata tags

Offline Image Classifier

Reusable Pattern
This is a key "increase value, decrease cost" pattern applicable to every domain. Instead of shipping a massive general vision model, train a tiny specialized classifier (~25 MB) on 50–200 categories relevant to the domain. High accuracy within scope, graceful failure outside it.

Model: MobileNet V3 or EfficientNet-Lite fine-tuned on sewing-specific visual categories — fabric types (~50–80 categories), stitch patterns (~30–40), machine parts. Total model size: ~10–30 MB.

Accuracy target: 80%+ on top-3 predictions for well-lit, close-up photos. Graceful "I'm not certain" fallback for unrecognized inputs.

Interaction: User takes photo → classifier identifies fabric/stitch/part → LLM provides contextual advice based on identification result.

User Interface

Local HTTP server (bundled lightweight C++ server) serving a web-based UI. Auto-launches browser to localhost:8741. Built with vanilla HTML/CSS/JS — no build step, no framework dependencies. Features include chat with session history, voice input button, photo input, topic browser, and a quick-start guide for first-time users.

Launcher

PlatformFormatBehavior
WindowsPortable .exeDetects hardware → loads model → starts server → opens browser
macOS.app bundle or shell scriptSame flow
LinuxShell script + bundled binariesSame flow

Hardware detection on first launch checks available RAM and CPU cores, stores a config file on the drive for faster subsequent launches.

03 Storage Budget by Tier

16 GB USB 3.0
~$10 hardware / ~$20–25 retail
3B model + Whisper + embeddings + classifier + UI + runtime = ~2.6 GB of infrastructure.

Leaves ~4.5 GB for sewing corpus (text + images/diagrams) with 2 GB headroom.

Verdict: Comfortable fit. Rich corpus with hundreds of diagrams and photographs.
2 TB External SSD
~$100 hardware / ~$150–200 retail
Premium: 13B+ model with substantially better reasoning. Exhaustive multimedia library. Multi-domain bundle (sewing + quilting + knitting + embroidery). Full pattern library with project templates.

16 GB Breakdown (Reference)

ComponentSize
LLM (3B, Q4_K_M)2.0 GB
Whisper Small244 MB
Embedding model80 MB
Image classifier25 MB
Runtime binaries (Win + Mac + Linux)~150 MB
UI assets~20 MB
Sewing knowledge corpus (text)~200 MB
Sewing images/diagrams~2 GB
Vector database (embeddings)~100 MB
Headroom / OS overhead~2 GB
Total~7 GB of 14.5 GB usable

04 Content Architecture

Content Taxonomy

T1 Core Reference — essential, included in all tiers
  • Fabric encyclopedia (~200 entries): fiber content, weight, drape, care, common uses
  • Needle guide: types, sizes, fabric-to-needle compatibility matrix
  • Thread guide: types, weights, fiber content, use cases
  • Stitch encyclopedia (~60 stitches): description, machine settings, when to use, visual example
  • Machine anatomy: parts, functions, maintenance schedules
  • Glossary (~300 terms)
T2 Technique Library
  • Basic (~40): straight seams, hems, darts, gathering, easing, pressing
  • Intermediate (~40): zippers, buttonholes, collars, sleeves, linings
  • Advanced (~30): tailoring, couture finishes, leather/vinyl, stretch fabrics

Each technique includes: written steps, difficulty rating, required materials, common mistakes, and troubleshooting notes.

T3 Troubleshooting Engine
  • Machine problems (~50 scenarios): thread breaking, skipped stitches, tension issues, noise
  • Fabric problems (~30 scenarios): puckering, stretching, fraying, shifting
  • Project problems (~30 scenarios): fit issues, pattern adjustments, seam failures

Structured as decision trees: symptom → probable causes → fixes ranked by likelihood. This is where the AI adds the most value — conversationally walking someone through a diagnostic process.

T4 Project Guidance
  • Beginner (~20): pillows, tote bags, simple skirts, curtains
  • Intermediate (~20): lined dresses, structured bags, home decor
  • Advanced (~10): tailored jackets, evening wear, upholstery

Each includes: materials list, skill prerequisites, estimated time, step overview.

T5 Pattern Reading & Fitting
  • How to read commercial patterns (major brands: Simplicity, McCall's, Butterick, Vogue)
  • Taking measurements accurately
  • Size selection guidance
  • Common fitting adjustments (full bust, swayback, petite, tall)

Content Sourcing Strategy

Public Domain / Open License Sources

  • Vintage sewing manuals (pre-1929 publications — fully public domain)
  • US Patent Office illustrations of sewing machine mechanisms
  • University extension service publications (USDA/land-grant sewing guides — public domain government works)
  • Creative Commons licensed sewing tutorials (with attribution)
  • Open educational resources from textile science programs

Original Content Generation Pipeline

Frontier AI generates draft Expert sewist reviews Corrections applied Final version indexed

This is the primary content pipeline. AI generates comprehensive technique descriptions, troubleshooting trees, and fabric profiles. Humans validate for accuracy.

Image Pipeline

  • Diagrams and technical illustrations: Generate programmatically with SVG/vector tools (stitch patterns, machine diagrams, seam cross-sections)
  • Fabric swatches: Photograph a reference set (~200 types) — one-time photo shoot or licensed stock imagery
  • Technique step photos: Commission or source from CC-licensed creators
  • Generative images: For decorative/conceptual imagery only — never for accuracy-critical content

Content Entry Format

{
  "id": "FABRIC-042",
  "domain": "sewing",
  "category": "fabric-encyclopedia",
  "title": "Jersey Knit",
  "content": "Jersey knit is a single-knit fabric with a smooth face...",
  "metadata": {
    "difficulty": "beginner",
    "related_entries": ["NEEDLE-012", "STITCH-008", "TECH-015"],
    "tags": ["knit", "stretch", "t-shirt", "casual"],
    "compatibility": {
      "needles": ["ballpoint", "stretch", "jersey"],
      "threads": ["polyester-all-purpose", "wooly-nylon"],
      "stitches": ["stretch-stitch", "zigzag", "lightning-stitch"]
    }
  },
  "images": ["jersey-knit-closeup.jpg", "jersey-knit-drape.jpg"],
  "last_updated": "2026-04-01"
}

05 User Journey

First-Time User

Plug in USB
Auto-run prompt (Windows) or user opens drive in Finder/Files
Click Launcher
Hardware detection runs silently (~5 seconds)
Loading Screen
Model loads into RAM (~10–30 seconds depending on hardware)
Welcome Screen
"I'm your AI sewing assistant. Ask me anything about sewing — type or tap the microphone to speak."
Suggested First Questions
Displayed as tappable cards: "I'm a complete beginner," "Help me choose a needle," "My thread keeps breaking," "What supplies do I need?"

Example Query Flows

Material Selection

User asks
"I want to make a summer dress from linen. What needle and thread should I use?"

RAG retrieves: linen fabric profile, needle compatibility, thread compatibility

Response: "For linen, use a Universal needle in size 80/12 (or 90/14 for heavier linen). Pair it with cotton or polyester all-purpose thread. Set your stitch length to 2.5mm. Linen frays easily, so consider French seams or a serged edge to finish your seam allowances."

Troubleshooting

User asks
"My bobbin thread is showing on top of my fabric"

RAG retrieves: tension troubleshooting tree, bobbin threading guide

Response: "This is almost always a top tension issue. Try these steps: First, check that your presser foot is up when you thread — the tension discs only engage when it's down. Second, rethread completely from scratch. Third, try increasing your top tension by one number. If it persists, check your bobbin is inserted correctly and spinning the right direction."

Upgrade Path

In-App Prompt (after 10+ queries)
"Want more? Scan this QR code to download the mobile app — take your sewing assistant anywhere."
QR → App Store
USB serial number serves as license key to unlock the mobile app
Mobile App (Offline)
Same offline capability, same knowledge base, runs on phone's NPU
Premium Subscription
Photo-based fabric identification via frontier model, pattern recommendations, community Q&A, content updates

06 Quality Benchmarks

Before shipping, the sewing module must pass a quality gate across a minimum of 100 test queries spanning all content categories.

Answer Quality Gates

MetricTarget
Factual accuracy95%+ of claims correct (expert-verified)
Retrieval relevanceTop-3 chunks relevant 90%+ of the time
CompletenessAddresses actual question 90%+ (not tangential)
SafetyZero responses suggesting unsafe practices
Hallucination rate<5% of responses contain fabricated info
Scope disciplineGracefully redirects off-topic queries

Performance Gates

MetricTarget (8 GB RAM, USB 3.0)
Time to first token<5 seconds
Voice transcription<3 seconds for queries under 15 words
Total query-to-response<15 seconds end-to-end

07 Partnership Integration

The content architecture supports optional product mapping for retail partners (e.g., Joann Fabrics for sewing).

Product Link Schema

{
  "recommendation": "Use a ballpoint needle, size 80/12",
  "product_links": [
    {
      "partner": "joann",
      "sku": "JN-BP-8012",
      "product_name": "Schmetz Ballpoint Needle 80/12 (5-pack)",
      "price": "$4.99",
      "url": "https://joann.com/..."
    }
  ]
}

Product links only surface when the module is a co-branded partner version, the user has connectivity for purchase links, and the recommendation naturally involves a product. This is a revenue-sharing model where the partner subsidizes USB cost and the module drives attributable product sales.

Licensing Question
Can we reference commercial pattern brands (Simplicity, McCall's, Butterick, Vogue) in our guidance? Likely yes for factual references, but worth confirming with counsel before launch.

08 Open Questions

  • Brand name for the product line? Needs to work across all domains, not just sewing. Must communicate "AI you can hold in your hand."
  • Accessibility: Screen reader compatibility for the web UI? Important for broadening the addressable market.
  • Localization priority: Spanish first? Which languages matter most for the sewing market?
  • Return/support policy: What happens when the product doesn't work on someone's 2012 laptop? Minimum spec enforcement vs. graceful degradation.
  • Content refresh cadence: How often do we update the corpus? Sewing is relatively stable, but new fabrics, tools, and techniques do emerge.
  • Competitive response: What if a major craft retailer launches their own version? First-mover advantage + brand loyalty is the moat, but timeline matters.