Go to file
saravanakumardb1 7bd14054d4 docs(local-llm): Rich Features PRD rev 2 — comprehensive review + expansion
Review findings addressed (20+ issues):

Structure additions:
- Target Users section with 5 personas (solo dev, tinkerer, privacy pro, writer, power user)
- Non-Goals section (8 explicit out-of-scope items for v4)
- Risks & Mitigations table (10 risks with impact/likelihood/mitigation)
- New API Routes section (4 new routes with security notes)
- Settings Expansion section (full tree: General, Router, Models, Input, Tasks, Data, About)
- New Dependencies table (idb ~1KB, fuse.js ~6KB, cron-parser ~3KB)
- Error Handling appendix (12 edge cases with expected behavior)

Data model fixes:
- Conversation/Message split into separate IndexedDB stores (scalability)
- Message gets conversationId FK, promptTokens field, size/language on Attachment
- Design decision note explaining why messages are stored separately

Feature spec improvements:
- 3.1 Conversations: context window management (token bar, auto-summarize at 80/95%)
- 3.2 Quick Actions: expanded Cmd+K palette spec (5 result types, ranking)
- 3.3 Agents: tools marked v4 vs v5, duplicate-from-builtin, unlink on delete
- 3.4 Model Router: full resolveModel() with 4-level fallback chain + availability
- 3.5 Multi-Modal: attachment size limits, Whisper error handling
- 3.6 Response: hover-only action bars, rating aggregation per task type
- 3.7 Cron: built-in templates table, runtime constraints, security (execFile)
- 3.8 Orchestration: full data model, chain/race/vote UI specs, step limits
- 3.9 Projects: system context detail, project stats, unlink behavior

Acceptance criteria added to ALL 9 features (was missing on 5).
Competitive analysis expanded with local competitors (Open WebUI, LM Studio, Jan.ai).
Success metrics improved with measurement methodology and rationale.
Open questions restructured as decision table with recommendations.
IndexedDB schema with explicit indexes and compound keys.
Migration strategy: 7-step v3→v4 with safety (no delete until confirmed).

681 lines → 1149 lines (+69% content)
2026-02-19 23:47:59 -08:00
__LOCAL_LLMs docs(local-llm): Rich Features PRD rev 2 — comprehensive review + expansion 2026-02-19 23:47:59 -08:00
.changeset chore(release): add changesets 2026-02-14 19:49:08 -08:00
.github docs(agent-docs): update platform service and copilot references 2026-02-19 08:22:09 -08:00
.husky chore(husky): run hooks from repo root and avoid npx 2026-02-14 12:55:41 -08:00
.windsurf/workflows fix: remove push-to-main from backup script, remove push from commit-workspace 2026-02-14 20:51:36 -08:00
AI.dev/SKILLS fix: update .env.example comments, Grafana dashboard, and debug-service.md for consolidated services 2026-02-14 22:01:55 -08:00
docs docs(telemetry): update roadmap — correct test counts (158), add Phase 4 operational wiring gaps 2026-02-17 18:41:38 -08:00
packages test(platform-service): add repository tests for notifications, plans, subscriptions, usage, tokens, memory + fix extraction-service flaky test 2026-02-16 11:59:06 -08:00
scripts chore(deploy): add railway deploy script 2026-02-17 11:32:40 -08:00
services docs(local-llm): update original setup doc to redirect to docs/ structure 2026-02-19 13:01:35 -08:00
.aider.conf.yml fix(common): configure ESLint 9 and fix lint issues 2026-02-12 16:37:30 -08:00
.clinerules docs: update agent docs — add missing packages, fix stale service refs, update test counts 2026-02-15 01:09:29 -08:00
.cursorrules docs: update agent docs — add missing packages, fix stale service refs, update test counts 2026-02-15 01:09:29 -08:00
.editorconfig chore(scaffold): initialize pnpm workspace with build tooling 2026-02-12 11:19:29 -08:00
.env.example test(waitlist): add 45 unit tests + update doc checkboxes with commit links 2026-02-16 22:49:42 -08:00
.gitignore docs: mark all 13 lysnr-* secrets as seeded, remove kv.txt + kv_azure.txt, update audit + rotation docs 2026-02-15 00:53:04 -08:00
.nvmrc chore(scaffold): initialize pnpm workspace with build tooling 2026-02-12 11:19:29 -08:00
.prettierrc feat: add quick wins - prettier, bundle limits, coverage 2026-02-12 15:54:06 -08:00
.windsurfrules docs: update agent docs — add missing packages, fix stale service refs, update test counts 2026-02-15 01:09:29 -08:00
AGENTS.md docs(agent-docs): update platform service and copilot references 2026-02-19 08:22:09 -08:00
CLAUDE.md fix(common): configure ESLint 9 and fix lint issues 2026-02-12 16:37:30 -08:00
docker-compose.yml refactor: remove growth/billing/tracker from common-plat docker-compose, update Traefik labels 2026-02-14 21:40:09 -08:00
eslint.config.js feat(local-llm): add Mission Control dashboard v1 2026-02-19 13:02:48 -08:00
MANUAL_CI.md ci: disable GitHub Actions and add manual quality checks 2026-02-12 23:13:07 -08:00
package.json chore: add extraction-service to AGENTS.md, CI matrix, token pre-commit hook (7.9) 2026-02-14 20:48:07 -08:00
pnpm-lock.yaml feat(config): add Azure Key Vault secret resolution with env fallback 2026-02-14 22:15:02 -08:00
pnpm-workspace.yaml fix(common): configure ESLint 9 and fix lint issues 2026-02-12 16:37:30 -08:00
quick-check.sh ci: disable GitHub Actions and add manual quality checks 2026-02-12 23:13:07 -08:00
README.md feat(monitoring): add @bytelyst/monitoring package 2026-02-14 15:57:41 -08:00
tsconfig.base.json chore(scaffold): initialize pnpm workspace with build tooling 2026-02-12 11:19:29 -08:00
vitest.config.ts fix(common): configure ESLint 9 and fix lint issues 2026-02-12 16:37:30 -08:00

ByteLyst Common Platform

Shared packages and microservices for ByteLyst ecosystem products.

⚠️ GitHub Actions Temporarily Disabled

CI/CD is currently disabled due to billing issues. Please run manual quality checks before merging:

  • See MANUAL_CI.md for instructions
  • Use .windsurf/workflows/production-readiness.md for comprehensive checks

Quick Start

# Install dependencies
pnpm install

# Build all packages + services
pnpm build

# Quick quality check (5 min) - run before pushing!
./quick-check.sh

# Run all tests (165 total across packages + services)
pnpm test

# Type-check all packages
pnpm typecheck

# Run a specific service in dev mode
pnpm --filter @lysnrai/platform-service dev

Repository Structure

learning_ai_common_plat/
├── packages/                    # Shared libraries (@bytelyst/*)
│   ├── errors/                  # Typed HTTP service errors (400429)
│   ├── cosmos/                  # Azure Cosmos DB client + container registry
│   ├── config/                  # Zod env loader + product identity
│   ├── auth/                    # JWT, middleware, password hashing
│   ├── api-client/              # Configurable fetch wrapper
│   ├── react-auth/              # React auth context factory
│   └── design-tokens/           # Cross-platform tokens (JSON → CSS/TS/Kotlin/Swift)
├── services/                    # Product-agnostic microservices
│   ├── platform-service/        # Auth, audit, flags, notifications, blob (port 4003)
│   ├── billing-service/         # Subscriptions, Stripe, usage, licenses (port 4002)
│   ├── growth-service/          # Invitations, referrals, promos (port 4001)
│   ├── tracker-service/         # Items, comments, votes, public roadmap (port 4004)
│   └── monitoring/              # Loki + Grafana config, health-check
└── docs/                        # Architecture docs, roadmap, analysis

Shared Libraries

Package Description Peer Dependencies
@bytelyst/errors Typed HTTP service errors (400429)
@bytelyst/logger Structured logger factory for services/dashboards
@bytelyst/cosmos Azure Cosmos DB client singleton + container registry @azure/cosmos
@bytelyst/blob Azure Blob Storage helpers + SAS URL generation @azure/storage-blob
@bytelyst/config Zod-based env config loader + product identity zod
@bytelyst/auth JWT utilities, auth middleware, password hashing jose, bcryptjs
@bytelyst/fastify-core Fastify service bootstrap (request-id, /health, errors) fastify
@bytelyst/api-client Configurable fetch wrapper with auth token injection
@bytelyst/react-auth React auth context factory (typed provider + hook) react
@bytelyst/design-tokens Cross-platform design tokens (JSON → CSS/TS/Kotlin/Swift)
@bytelyst/extraction Extraction service client + shared types @bytelyst/api-client
@bytelyst/testing Shared test helpers (Fastify inject, schema asserts) vitest
@bytelyst/monitoring Health-check aggregation utilities

Shared Services

Service Port Description Tests
platform-service 4003 Auth, audit, feature flags, notifications, blob storage 55
billing-service 4002 Subscriptions, Stripe webhooks, usage tracking, licenses, plans 32
growth-service 4001 Invitations, referrals, promo codes 33
tracker-service 4004 Feature requests, bugs, tasks, public roadmap 45
monitoring Loki + Grafana dashboards, health-check script

All services are product-agnostic — every Cosmos document includes a productId field, so a single deployment serves LysnrAI, MindLyst, or any future product.

Quick Start

# Install dependencies
pnpm install

# Build all packages + services
pnpm build

# Quick quality check (5 min) - run before pushing!
./quick-check.sh

# Run all tests (165 total across packages + services)
pnpm test

# Type-check all packages
pnpm typecheck

# Run a specific service in dev mode
pnpm --filter @lysnrai/platform-service dev

Consuming Libraries from Product Repos

During development, use file: references in consumer package.json:

// From a Next.js dashboard at repo root (2 levels up):
"@bytelyst/errors": "file:../../learning_ai_common_plat/packages/errors"

// From MindLyst web (3 levels up — inside mindlyst-native/web/):
"@bytelyst/design-tokens": "file:../../../learning_ai_common_plat/packages/design-tokens"

All repos must be cloned side-by-side under the same parent directory.

Design Tokens

Generate platform-specific token files from the canonical JSON:

cd packages/design-tokens
pnpm generate

Outputs in packages/design-tokens/generated/:

  • tokens.css — CSS custom properties (--ml-*)
  • tokens.ts — TypeScript constants
  • MindLystTokens.kt — Kotlin object for KMP
  • MindLystTheme.swift — Swift structs for SwiftUI

Roadmap

See docs/ROADMAP.md for the full phased extraction plan.