feat: Implement Prompt Builder functionality in Popup and Options
Some checks failed
CI — Test & Build / Test & Build (push) Failing after 39s
Some checks failed
CI — Test & Build / Test & Build (push) Failing after 39s
- Added a new "Prompt Builder" tab in the Popup for generating AI prompts with customizable parameters. - Introduced new state variables for managing prompt styles, personas, formats, and models. - Enhanced the Options page to fetch and display models based on the provided API key. - Updated the actions and types to include the new 'prompt' action and its associated parameters. - Implemented migration logic for legacy plaintext API keys to encrypted storage. - Updated the getSystemPrompt function to incorporate prompt parameters for better instruction generation. - Added tests for the new functionality, including context menu entries and prompt generation logic.
This commit is contained in:
38
docs/SELF_MODEL.md
Normal file
38
docs/SELF_MODEL.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# Self-model — LexAI
|
||||
|
||||
> What the harness believes about the operator and this project. Kept honest by `self-model-audit`. No secrets or sensitive personal data.
|
||||
|
||||
## Operator
|
||||
|
||||
- **Who I'm building for:** John Kevin Asprec — owner/maintainer of LexAI.
|
||||
- **Working style:** ships in focused phases (Phase 1 delivered 7 workitems to a deadline); values concise, direct output over verbose explanation; comfortable with the code and the toolchain.
|
||||
- **Communication preferences:** concise and direct; minimal formatting; prefers the point over the preamble.
|
||||
- **Technical depth:** high — WXT/MV3, TypeScript, React, CI/CD. Wants surgical diffs and real verification, not hand-holding.
|
||||
- **Decision authority kept:** manifest permission changes, key-handling changes, releases (version bump + `v*.*.*` tag), and anything touching the Web Store listing.
|
||||
|
||||
## Project intent (the real one)
|
||||
|
||||
- **Optimizing for:** a genuinely useful, private, subscription-free writing assistant that runs on the user's own key — shipped to the Chrome Web Store.
|
||||
- **What "good" means here:** typecheck + tests + build green, real-page behavior verified, minimal diffs, invariants preserved (see LESSONS_LEARNED), key never exposed.
|
||||
- **Non-negotiable constraints:** no backend; never transmit user text or key anywhere but the chosen provider; inline styles until PostCSS is deliberately wired.
|
||||
|
||||
## Voice (if the harness writes as the operator)
|
||||
|
||||
- **Sounds like:** direct, technical, no filler.
|
||||
- **Never sounds like:** marketing fluff, over-hedged, or padded with obvious restatement.
|
||||
|
||||
## Known drift risks
|
||||
|
||||
- "API key is encrypted" — the current tweetnacl approach is obfuscation, not protection; don't let docs or UI over-claim (see attacksurface + TASKS #2).
|
||||
- Phase-1 framing may go stale as recommendations land; re-read `TASKS.md` state before assuming what's done.
|
||||
- Tailwind is present but inactive — don't infer a Tailwind workflow from its presence in devDependencies.
|
||||
|
||||
## Change log
|
||||
|
||||
| Date | What changed in this model | Evidence |
|
||||
| --- | --- | --- |
|
||||
| 2026-07-15 | Initial capture from README, CLAUDE.md, PHASE1_SUMMARY, RECOMMENDATIONS | repo docs |
|
||||
|
||||
---
|
||||
|
||||
*Update via `self-model-audit` when behavior and this file diverge. Never store credentials, financial/health data, or anything not agreed to persist.*
|
||||
Reference in New Issue
Block a user