Files
LexAI/docs/PROJECT_BRIEF.md
john kevin asprec 8bc529ef2d
Some checks failed
CI — Test & Build / Test & Build (push) Has been cancelled
feat: add LexAI status bar and suggestion panel
- 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.
2026-08-13 18:06:45 +08:00

56 lines
3.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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 users 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
1. `npm run typecheck` and `npm test -- --run` pass
2. `npm run build` yields a loadable `.output/chrome-mv3/`
3. Chrome: Replace works on `textarea`/`input` and `contenteditable` (load-unpacked — unit tests do not cover DOM timing)
4. Chrome: API key uses the encrypted path (`apiKeyEnc` + `encKey`) and is never logged or exfiltrated
5. `npm run vscode:typecheck` and `npm run vscode:build` succeed; 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); shared `src/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 verifies `fast`; 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 in `entrypoints/`, VS Code in `packages/vscode/`, shared core in `src/lib/`, tasks in `docs/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).*