Deliver a working data ingestion pipeline and local embedding system so that writing samples can be imported, embedded, stored, and retrieved by context — forming the foundation for voice matching in Sprint 2.
For Taps, a professional who communicates across multiple channels (WhatsApp, email, LinkedIn, professional outreach), the Persona Voice Skill is a local-first, privacy-preserving writing assistant that learns his authentic voice from real writing samples and generates context-appropriate text that sounds like him — not like AI. Unlike generic LLM outputs or cloud-based writing tools, our product keeps all data on-device, uses style embeddings for retrieval-augmented voice matching, and improves continuously as more samples are ingested.
┌──────────────────────────────────────────────────────────────────┐
│ CLI Interface (commander) │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌───────────────┐ │
│ │ ingest │ │ query │ │ voice │ │ stats/export │ │
│ └─────┬────┘ └────┬─────┘ └────┬─────┘ └──────┬────────┘ │
└─────────┼────────────┼─────────────┼───────────────┼────────────┘
│ │ │ │
▼ ▼ ▼ ▼
┌──────────────────────────────────────────────────────────────────┐
│ Core Service Layer │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │
│ │ Ingestion │ │ Retrieval │ │ Voice Filter │ │
│ │ Pipeline │ │ Engine │ │ (few-shot rewrite) │ │
│ │ ·WhatsApp │ │ ·cosine │ │ ·prompt assembly │ │
│ │ ·email │ │ ·ranking │ │ ·context selection │ │
│ │ ·text │ │ ·filtering │ │ ·output formatting │ │
│ └──────┬───────┘ └──────┬──────┘ └──────────┬──────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ Embedding Service (ONNX Runtime) │ │
│ │ @xenova/transformers · all-MiniLM-L6-v2 │ │
│ │ 384-dimensional vectors │ │
│ └───────────────────────┬──────────────────────────────────┘ │
│ │ │
│ ┌───────────────────────▼──────────────────────────────────┐ │
│ │ Storage Layer (SQLite) │ │
│ │ better-sqlite3 · AES-256-GCM encrypted text │ │
│ │ embedding BLOBs · context-indexed · metadata JSON │ │
│ └──────────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────────┘
TypeScript project with build tooling, linting, test infrastructure, proper .gitignore for privacy.
MUST 3 ptsParse WhatsApp .txt exports, filter by sender, extract messages with timestamps and context tagging.
MUST 5 ptsParse plain text emails and generic text files into writing samples with context tags.
MUST 3 ptsONNX Runtime with all-MiniLM-L6-v2 for 384-dim embeddings. Batch and single-query modes, fully local.
MUST 8 ptsStore embeddings + encrypted text in SQLite with context-indexed cosine similarity search.
MUST 8 ptsGiven context + query text, retrieve top-N similar samples ranked by cosine similarity.
MUST 5 ptsAES-256-GCM encryption for all stored writing samples. Secure key management via .env.
MUST 5 ptsFew-shot prompt construction from retrieved examples. Rewrite AI drafts in Taps' voice.
SHOULD 8 ptsCommands: ingest, ingest-whatsapp, voice, similar, stats. Progress bars, color output, JSON mode.
SHOULD 8 ptsIngest all text files from a directory with context tagging and progress reporting.
SHOULD 3 ptsDisplay sample counts by context, database size, model info, distribution chart.
SHOULD 2 ptsPackage as an installable OpenClaw skill with proper SKILL.md specification.
COULD 3 ptsExport embeddings to file for backup and portability.
COULD 2 pts| Component | Technology | Purpose |
|---|---|---|
| Language | TypeScript 5.4+ (strict mode) | Type-safe development, OpenClaw ecosystem compatibility |
| Runtime | Node.js 18+ (LTS) | Server-side JavaScript execution |
| Embeddings | @xenova/transformers + all-MiniLM-L6-v2 | Local ONNX inference, 384-dim sentence embeddings |
| Database | better-sqlite3 | Vector storage, metadata, encrypted text |
| CLI Framework | commander | Command parsing, subcommands, flags |
| CLI Styling | chalk + ora + cli-table3 + cli-progress | Colors, spinners, tables, progress bars |
| Encryption | Node.js crypto (AES-256-GCM) | Writing sample encryption at rest |
| Testing | vitest + @vitest/coverage-v8 | Unit, integration, E2E tests with coverage |
| Linting | ESLint + Prettier | Code quality and formatting |
| # | Role | Capacity | Sprint 1 Focus |
|---|---|---|---|
| 1 | Product Owner | 6 pts | Requirements, acceptance criteria, backlog prioritization |
| 2 | Scrum Master | 4 pts | Sprint planning, ceremonies, process, impediment removal |
| 3 | Backend Developer | 10 pts | Embedding engine, vector store, retrieval API, encryption |
| 4 | Frontend Developer | 8 pts | CLI tools, command design, OpenClaw packaging |
| 5 | UI Designer | 4 pts | CLI output design, formatting, accessibility |
| 6 | UX Researcher | 6 pts | Style analysis framework, voice quality metrics |
| 7 | QA Engineer | 10 pts | Test strategy, 60+ test cases, coverage targets |
| 8 | DevOps Engineer | 8 pts | Project setup, CI/CD, deployment scripts, model management |
| 9 | Business Analyst | 6 pts | Requirements spec, data formats, traceability matrix |
| 10 | Code Reviewer | 6 pts | Triple-gate review process, code standards, quality gates |
| Total | 68 pts |
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
| ONNX model too slow or incompatible with Node.js 18 | Medium | High | Spike on Day 1-2; fallback to smaller model or pre-computed embeddings |
| SQLite cosine similarity too slow at scale (10k+ samples) | Medium | Medium | Benchmark early; consider sqlite-vec extension or pre-filtering by context |
| WhatsApp export format varies across locales/versions | High | Medium | Support multiple date formats; use regex patterns with fallbacks |
| Insufficient writing samples for meaningful voice matching | Medium | Medium | Set minimum thresholds; warn user when sample count is low |
| VPS memory constraints (<2GB) for ONNX model | Low | High | Profile memory usage early; all-MiniLM-L6-v2 is small (~100MB) |
any types in production code
Developer Gate 1 Gate 2 Gate 3
┌──────┐ ┌──────────┐ ┌─────────────┐ ┌──────────┐
│ PR │ ───▶ │ Peer │ ──▶│ Code │ ──▶│ Lead │ ──▶ MERGE
│Created│ │ Review │ │ Reviewer │ │ Approval │
└──────┘ └──────────┘ └─────────────┘ └──────────┘
▲ │ │ │
└── Revisions ─┴────────────────┴──────────────────┘
Gate 1 — Peer Review: Backend ↔ Frontend cross-review. Focus: correctness, readability, tests. SLA: 12h.
Gate 2 — Code Reviewer: Architecture compliance, security, patterns, performance. SLA: 24h.
Gate 3 — Lead: Sprint goal alignment, cross-cutting concerns, final merge authority. SLA: 12h.
14 user stories, MoSCoW prioritized, with acceptance criteria and story points
Capacity planning, ceremonies, task assignments, dependencies, risk register
System design, TypeScript interfaces, SQLite schema, data flow, ONNX integration
8 commands, flags, UX patterns, OpenClaw SKILL.md spec, example sessions
Project structure, CI/CD, deployment scripts, model management, security
60+ test cases, coverage targets, test data strategy, quality gates
CLI output formatting, color system, ASCII mockups, accessibility
Writing dimensions, context profiles, quality metrics, few-shot strategy
32 functional + 25 non-functional requirements, traceability matrix
Triple-gate process, checklists, anti-patterns, PR template, merge criteria