# Soi96 Legal — Product Strategy

## What This Is

Soi96 Legal is a standalone legal practice management platform for civil law firms. It is not a version of BigWig ERP. It is not an ERP with legal modules. It is a purpose-built product for the legal services market that shares infrastructure with BigWig ERP at the code level only.

The name BigWig does not appear in it. The word ERP does not appear in it. It is sold to law firms, under its own name, for a different price, with a different story.

---

## What It Shares With BigWig ERP (Infrastructure Only)

| Shared component | What it does |
|---|---|
| Auth + RBAC | Identity, roles, permissions |
| Contacts + relationship mapping | Client records, contact graph |
| Communications suite | Email and call capture, record linkage |
| Document intake + storage | Incoming documents, filing, retrieval |
| Activity log (immutable) | Every action, permanent record |
| Billing engine | Invoice generation, AR — restructured for time/retainer, not product sales |
| Multilingual infrastructure | UI and document processing in multiple languages |
| Multi-tenant isolation layer | Tenant data separation enforced at platform level |
| Training pipeline (Workbeast) | Weekly fine-tune, per-tenant model adapters |

This is plumbing. It has nothing to do with law firms specifically. It is the same plumbing in any vertical product.

---

## What Is Built Fresh for Soi96 Legal

Everything that makes it a legal platform. None of this exists in BigWig ERP.

| Component | What it does |
|---|---|
| Matter management | The core legal entity — cases, parties, status, lifecycle |
| Time entry | 6-minute increment logging, task codes, billable hour capture |
| Trust accounting | Client fund isolation, retainer ledger, Thai Bar compliance |
| Conflict of interest checking | Cross-reference new parties against all existing records |
| Hearing + deadline tracking | Court dates, response deadlines, escalating alerts |
| Thai civil procedure templates | Court types, hearing types, filing requirements |
| 9-agent AI intelligence layer | Full agent architecture — see `docs/agent-architecture.md` |

---

## Two Goals, One Build

### Goal 1 — GPS Legal (Design Partner, Tenant 1)
GPS Legal is the firm that shapes the product. Their attorney is the domain architect — every matter structure, document type, workflow, and AI priority is defined by a practising Thai civil attorney, not by a software team guessing at what law firms need.

GPS Legal gets the platform free in exchange for that input. They are Tenant 1. Their practice proves the product works.

### Goal 2 — Commercial Product
Soi96 Legal is sold to other Thai civil law firms and eventually to firms in other civil law jurisdictions. GPS Legal's intake answers shaped the configuration schema. Every subsequent tenant configures to their own needs within the same schema.

These goals are not in conflict. GPS Legal built right is the proof of concept. Every feature that exists because GPS Legal needed it is a feature every similar firm also needs.

---

## Product Architecture

```
SHARED CORE  (@bigwig/core — maintained once, used by all vertical products)
├── Auth + RBAC
├── Contacts + relationships
├── Communications suite
├── Document intake + storage
├── Activity log
├── Billing engine
├── Multilingual infrastructure
└── Multi-tenant isolation

SOI96 LEGAL  (built on top of @bigwig/core)
├── Matter management
├── Time entry + billing (time-based, not product-based)
├── Trust accounting
├── Conflict checking
├── Court deadline calendar
├── Thai civil procedure templates
└── 9-agent AI layer (per-tenant trained, fully isolated)

TENANT CONFIGURATION  (generated from intake interview, editable)
├── matter_types[]
├── matter_statuses[]
├── document_types[]
├── billing_model (hourly / retainer / flat fee / mixed)
├── team_roles[]
├── jurisdiction_template
├── language_primary
├── communication_channels (LINE / email / both)
└── ai_year_one_priorities[]

TENANT AI  (isolated per tenant — trains only on their own data)
├── Their matters and outcomes
├── Their communications voice
├── Their document patterns
├── Their court and adversary intelligence
└── Their client profiles
```

---

## Business Model

| | BigWig ERP | Soi96 Legal |
|---|---|---|
| Customer | Product-selling businesses | Law firms (service businesses) |
| Core transaction | Order / sale | Matter / engagement |
| Billing unit | Product line items | Time entries + retainers |
| Inventory | Central to the product | Does not exist |
| Revenue model | SaaS subscription | SaaS subscription per firm |
| Buyer | Operations / finance | Managing partner / practice manager |
| Sales motion | SME product businesses | Law firm relationships |
| Pricing basis | Seats + modules | Seats + matter volume |
| AI value driver | Product knowledge, distributor intelligence | Court intelligence, institutional memory |

Two products. Two markets. Two buyers. Shared infrastructure at the code level only.

---

## Pricing Model (Draft)

Monthly subscription. No product sales. No inventory.

| Tier | Firm size | What's included |
|---|---|---|
| Starter | 1–3 attorneys | Core platform — matters, time entry, billing, trust accounting, conflict check |
| Professional | 4–10 attorneys | Core + AI layer (Comms Agent, Client Manager, Prompt Analyst) |
| Intelligence | Any size | Full platform + Intelligence Agent + Case Strategy Agent |

Thai market pricing in THB. Other markets in local currency.

---

## Jurisdiction Templates

Thai civil practice is the first jurisdiction template. It is a configuration layer, not hardcoded. Every new jurisdiction replaces it with their own.

```
jurisdiction: thai_civil
├── Property regime fields: Sin Suan Tua / Sin Somros
├── Court hearing types: Thai civil procedure
├── Corporate fields: DBD registration, chanote deed
├── Trust accounting: Thai Bar Association requirements
├── Communication channels: LINE as primary option
├── Document processing: Thai + English bilingual
└── RAG corpus: Thai CCC, Land Code, Labour Act, BOI, Revenue Code, etc.
```

GPS Legal funds the Thai template. Revenue from Thai tenants funds the next jurisdiction.

---

## The Intake as Onboarding

The design session interview built for GPS Legal becomes the onboarding flow for every tenant.

```
New law firm signs up
    ↓
Intake interview (platform-conducted)
    ↓
JSON configuration output
    ↓
Tenant provisioned with their specific setup
    ↓
AI training pipeline initialised (empty, ready for their data)
    ↓
Day 1: functional platform
Week 1: first data accumulating
Month 6: AI starting to reflect their practice
Year 2: institutional intelligence that did not exist before
```

---

## Tenant 1 — GPS Legal

GPS Legal is Tenant 1 and the reference customer. Every product decision they make becomes a configurable option. Their intake shapes the schema. Their feedback shapes the priorities.

When selling to Tenant 2:
> "This platform was designed with a practising Thai civil attorney in active practice. Every feature exists because it solved a real problem in a real firm. GPS Legal runs on it. Here is what changed for them."

That story is worth more than any feature list. It is proof the product works for firms exactly like theirs.

---

## Build Sequence

### Phase 0 — Foundation
- Design sessions with GPS Legal attorney + partner
- Intake output → Tenant 1 configuration record
- Architecture decisions locked
- Extract shared core from bigwig-erp-v3 into @bigwig/core package

### Phase 1 — Core Legal Layer
- Matter model + API
- Time entry + billing (time-based)
- Trust accounting
- Conflict checking
- Court deadline calendar
- Thai civil procedure templates

### Phase 2 — AI Layer
- Prompt Analyst
- Client Manager (per client)
- Comms Agent (email + LINE + calendar)
- Case/Situation Analyst
- Onboarding Agent
- Document Classifier
- Billing Agent

### Phase 3 — Multi-Tenant
- Tenant provisioning from intake output
- Second tenant onboarded
- Jurisdiction template system formalised

### Phase 4 — Intelligence Layer
- Intelligence Agent (judge + opposing counsel + court profiles)
- Case Strategy Agent (requires sufficient matter history)
- RAG Agent (statute corpus, Thai jurisdiction first)

### Phase 5 — Commercial
- Pricing and billing live
- Self-serve onboarding
- Additional jurisdiction templates
- Partner/referral programme
