Skip to content

mitwilli-create/monolith

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MONOLITH

A deterministic wardrobe architect and budget controller, promoted from a gem configuration to a product. Mobile-first PWA. TypeScript end to end.

The core idea

The original gem config cataloged four LLM failure modes (sycophancy, hallucination, context degradation, agentic drift) and tried to mitigate them with prompt engineering. MONOLITH fixes them structurally:

Failure mode Structural fix
Sycophancy Constraint gates are code, not prompt. A validator cannot be talked into an exception.
Hallucination The LLM only does perception (page → structured fields) via schema-enforced structured outputs; every numeric claim in a verdict cites its source file; "unknown" is a legal value that produces INSUFFICIENT_DATA, never a guess.
Context degradation The server is stateless per request. Profile constraints are re-read from disk on every call. There is no "middle" to get lost in.
Agentic drift There is no multi-turn agent. Each verdict is a fresh, complete evaluation.

Verdict pipeline

URL or manual entry
  → extraction (Anthropic structured outputs; only if a key is configured)
  → GATE A · STATE AUDIT      budget position, campaign windows, inventory clash
  → GATE B · CLIMATE FILTER   material rules + live Open-Meteo forecast advisory
  → GATE C · AESTHETIC GATE   doctrine, banned brands, banned fit terms
  → verdict card              APPROVE / REJECT / INSUFFICIENT_DATA
                              + sizing override + capital status + care commitment
  → verdicts.jsonl            append-only audit log

All three gates run on every candidate and report every violation (no short-circuit), so a rejection tells you everything that is wrong at once.

Surfaces

  • GATE: paste a product URL, get a verdict. Approvals offer one-tap "record purchase" (ledger + vault in one move).
  • SIZE: brand + category → sizing override from the brand matrix (BBS / Rick Owens / Margiela seeded), with the profile's full body-measurement spec as a reference table.
  • VAULT: wardrobe inventory: add, bulk-import, wear tracking, cost-per-wear.
  • CAPITAL: monthly budget, ledger, hard-stop vs advisory policy. The tier-chase campaign engine exists but ships dormant (campaign: null).
  • CARE: 7-day forecast, weather-triggered protection alerts for rain-sensitive assets, interval-based maintenance schedule per item.

Run

npm install
npm run build          # frontend bundle + PWA icons
npm start              # http://localhost:4600

Add ANTHROPIC_API_KEY to .env (see .env.example) to enable URL extraction. Everything else works without it.

Network exposure is opt-in. The server binds to 127.0.0.1 by default because the API has no authentication. For phone use on your own Wi-Fi, start with MONOLITH_BIND=0.0.0.0 npm start, then open http://<mac-hostname>.local:4600 and "Add to Home Screen."

Do not tunnel this to the public internet without an auth layer. If you want access anywhere, put an authenticated proxy in front (e.g. Cloudflare Tunnel + Cloudflare Access, the career-ops dashboard pattern), never a bare tunnel: every endpoint mutates personal data and would be open to anyone.

Data layout (data/, gitignored, personal)

File Contents
profiles.json biometrics, measurement spec, aesthetic doctrine, material rules, budget
sizing-matrix.json per-brand sizing overrides + generic fallback
inventory.json the vault
ledger.json spend entries
care-protocols.json maintenance protocols + intervals
care-log.json executed maintenance
verdicts.jsonl append-only verdict audit trail

seed/ holds committed templates; missing data files are seeded on boot, existing ones are never overwritten. Profiles are pure data. A second user onboards by adding a profile, zero code changes.

Develop

npm run dev            # tsx watch
npm test               # vitest: 50 tests, all pure-function
npm run typecheck

v2 parking lot (explicitly out of v1)

Outfit-of-the-day + wardrobe photos · trend/runway/sales scanning agents · investment advice · multi-user onboarding UI · campaign activation UI.

About

Deterministic wardrobe architect + budget controller. Constraint gates as code, not prompts. TypeScript PWA.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors