Some checks failed
CI — Test & Build / Test & Build (push) Has been cancelled
- Implemented a status bar item for LexAI with dynamic status updates (ready, processing, notReady). - Created a suggestion panel for displaying and interacting with AI-generated suggestions. - Added functionality for accepting, regenerating, and discarding suggestions within the suggestion zone. - Introduced configuration options for writing style, prompt patterns, personas, and formats. - Integrated progress indicators for long-running tasks and improved user feedback. - Established TypeScript configuration for the vscode package.
3.1 KiB
3.1 KiB
Project brief
The single source of truth for what this app is and why. Keep it under two screens; link out for detail.
Outcome
- One-line product: LexAI — BYO-LLM writing help as a Chrome MV3 extension and a VS Code extension, sharing one provider/prompt core.
- Measurable outcome: Select text → AI action (fix / rephrase / shorten / expand / explain / prompt) → replace in place (Chrome also supports Copy), with no LexAI backend and no subscription.
- Primary user: People who already hold an LLM API key and want inline writing help without a SaaS subscription.
- Why now: BYO-key writing help without accounts, telemetry, or a LexAI server in the path.
Non-goals
- No LexAI backend, account, or subscription
- No telemetry; no transmission of text or API key except to the user’s chosen provider
- Not a full document editor
- VS Code v1: no floating toolbar, Prompt Builder UI, or Copy As; Firefox/Safari packaging not in scope
Acceptance tests
npm run typecheckandnpm test -- --runpassnpm run buildyields a loadable.output/chrome-mv3/- Chrome: Replace works on
textarea/inputandcontenteditable(load-unpacked — unit tests do not cover DOM timing) - Chrome: API key uses the encrypted path (
apiKeyEnc+encKey) and is never logged or exfiltrated npm run vscode:typecheckandnpm run vscode:buildsucceed; VS Code stores the key in Secret Storage and replaces the editor selection
Constraints
- Deadline / milestones: none fixed; track in Plane (LEXAI) and
docs/TASKS.md - Budget / cost ceiling: user pays their own provider; extension has no LexAI infra bill
- Stack: WXT ^0.20 + React 18 + TypeScript (Chrome);
packages/vscode+ esbuild (VS Code); sharedsrc/lib; Node 22; providers OpenAI / Anthropic / Groq / OpenRouter - Security / compliance: never log the key; Chrome encrypts in
chrome.storage.local; VS Code uses Secret Storage; content/popup must not call providers - Team / bus factor: solo owner; operating system in
AGENTS.md+CLAUDE.md+docs/
Stakeholders
| Role | Who | Decision authority |
|---|---|---|
| Product owner | John Kevin | scope, priorities, release, reference-bar acceptance |
| Eng / harness | this Cursor kit + Claude kit in-repo | architecture proposals, implementation under gates |
Unknowns
- Reference bar for selection-toolbar/card UX is proposed (Grammarly screenshots into
docs/reference/) but not yet concrete — no gauntlet until artifacts exist - Whether Cursor picker IDs match the profile-table slugs written in
docs/MODEL_ROUTING.md(live scout verifiesfast; mid/strong fail loudly on first Task if not)
Source of truth
- Issue tracker: Plane (LEXAI)
- Design / specs:
docs/(+DESIGN_SYSTEM.md/design/when created) - This repo:
AGENTS.md(Cursor control plane),CLAUDE.md(Claude control plane), Chrome inentrypoints/, VS Code inpackages/vscode/, shared core insrc/lib/, tasks indocs/TASKS.md
Related: ARCHITECTURE.md (how it's built), DECISIONS.md (why choices were made), TASKS.md (active work), SELF_MODEL.md (who the harness is building for).