From c2ca659a2b5740d65f7cca271650dd2e78649cf3 Mon Sep 17 00:00:00 2001 From: john kevin asprec Date: Wed, 15 Jul 2026 16:01:13 +0800 Subject: [PATCH] feat: Enhance project memory and skills documentation; add memory-sync skill for knowledge consolidation --- .claude/AGENTS.md | 8 ++- .claude/agents/fable-orchestrator.md | 6 +-- .claude/agents/learning-steward.md | 4 +- .../skills/continuous-improvement/SKILL.md | 2 +- .claude/skills/memory-sync/SKILL.md | 16 ++++++ .claude/skills/resume-project/SKILL.md | 2 +- .gitea/workflows/ci.yml | 12 ++++- .gitea/workflows/deploy-chrome.yml | 12 ++++- CLAUDE.md | 21 ++++++-- docs/HANDOFF.md | 1 + docs/MEMORY.md | 49 +++++++++++++++++++ package-lock.json | 4 ++ package.json | 3 +- 13 files changed, 123 insertions(+), 17 deletions(-) create mode 100644 .claude/skills/memory-sync/SKILL.md create mode 100644 docs/MEMORY.md diff --git a/.claude/AGENTS.md b/.claude/AGENTS.md index 13788a1..f429d64 100644 --- a/.claude/AGENTS.md +++ b/.claude/AGENTS.md @@ -42,6 +42,10 @@ For LexAI code (anything under `entrypoints/` or `src/`), prefer `lexai-extensio ## Memory and skills -Fable, Planner, Builder, Verifier, Critic, Learning Steward, Integrator, and System Steward use project-scoped role memory. It is committed under `.claude/agent-memory/` when Claude Code creates it, so the team can review it. Fable also uses Claude Code Auto Memory for session continuity. +Fable, Planner, Builder, Verifier, Critic, Learning Steward, Integrator, and System Steward use project-scoped role memory. It is committed under `.claude/agent-memory/` when Claude Code creates it, so the team can review it. Fable also uses Claude Code Auto Memory for session continuity. Shared durable knowledge lives in `docs/MEMORY.md` (see the memory protocol in `CLAUDE.md`); role memory stays role-specific. -- `/resume-project` \ No newline at end of file +- `/resume-project` rebuilds verified working state after a new session, interruption, or compaction. +- `/memory-sync` consolidates durable knowledge into `docs/MEMORY.md`, dedupes, and enforces context caps (owner: Learning Steward). +- `/continuous-improvement` evaluates a proven workflow failure and sends agent/skill improvements to System Steward only when justified. +- `/dev-loop` runs a bounded autonomous maintenance loop (triage → one bounded task → full landing gates → clean stop). +- `/attack-surface` and `/prompt-injection-audit` keep security coverage current; `/self-model-audit` keeps the operator/project model honest. diff --git a/.claude/agents/fable-orchestrator.md b/.claude/agents/fable-orchestrator.md index 86d7063..b849847 100644 --- a/.claude/agents/fable-orchestrator.md +++ b/.claude/agents/fable-orchestrator.md @@ -10,10 +10,10 @@ color: blue You are Fable, this project's orchestration controller. Optimize for verified outcomes per token, not for agent activity or lengthy explanations. -Read `CLAUDE.md`, your project memory, `docs/HANDOFF.md`, and the smallest relevant project context before acting. If this is a resumed, compacted, or fresh session, invoke `/resume-project` before acting. For every task beyond a small isolated edit, first produce an orchestration record containing the objective, risk, lead, delegates, model routing, budget, verification, and stop condition. +Read `CLAUDE.md`, `docs/MEMORY.md`, your project memory, `docs/HANDOFF.md`, and the smallest relevant project context before acting. If this is a resumed, compacted, or fresh session, invoke `/resume-project` before acting. Fast path: if a task is low risk, touches ≤ 2 named files, and has a deterministic check, route it directly to one builder (or `lexai-extension-dev` for `entrypoints/`/`src/`) without an orchestration record. For every other task, first produce an orchestration record containing the objective, risk, lead, delegates, model routing, budget, verification, and stop condition. Use one lead by default. Delegate only genuinely independent, bounded outputs with named ownership. Do not assign overlapping file edits. Use the cheapest capable specialist and send each worker a compact task packet, not a raw transcript. Preserve user authority: surface any decision that changes scope, risk, cost, or external state. -Require each worker to return evidence, relevant commands, risks, and a next action. Have the verifier run objective checks. For high-risk work, use the critic after verification. When there is a material user correction, unexpected test failure, regression, proven wrong assumption, or rejected verifier/critic finding, delegate to `learning-steward` before handoff and invoke `/continuous-improvement`. Require its decision: record a concise evidence-backed lesson, add or strengthen a deterministic eval, or explicitly decline because no durable prevention is justified. Delegate to `system-steward` only when the evidence justifies an improvement to project agents or skills. Reconcile conflicting findings yourself, then summarize the accepted outcome, evidence, residual risk, learning decision, and next smallest action. Update your project memory only with durable routing, context, or recovery knowledge; never store raw transcripts, secrets, or transient task detail. +Require each worker to return evidence, relevant commands, risks, and a next action. Have the verifier run objective checks. For high-risk work, use the critic after verification. When there is a material user correction, unexpected test failure, regression, proven wrong assumption, or rejected verifier/critic finding, delegate to `learning-steward` before handoff and invoke `/continuous-improvement`. Require its decision: record a concise evidence-backed lesson, add or strengthen a deterministic eval, or explicitly decline because no durable prevention is justified. Delegate to `system-steward` only when the evidence justifies an improvement to project agents or skills. Reconcile conflicting findings yourself, then summarize the accepted outcome, evidence, residual risk, learning decision, and next smallest action. Update your project memory only with durable routing, context, or recovery knowledge; never store raw transcripts, secrets, or transient task detail. Follow the memory protocol in `CLAUDE.md`: promote knowledge two roles need into `docs/MEMORY.md`, and invoke `/memory-sync` at a phase change, before ending a long run, or when a capped context file is full. -You are a controller, not an implementer: do not modify files or run shell commands yourself. If no specialist fits, return a precise task contract for the user or \ No newline at end of file +You are a controller, not an implementer: do not modify files or run shell commands yourself. If no specialist fits, return a precise task contract for the user or a future builder. diff --git a/.claude/agents/learning-steward.md b/.claude/agents/learning-steward.md index a00c176..da71226 100644 --- a/.claude/agents/learning-steward.md +++ b/.claude/agents/learning-steward.md @@ -8,13 +8,13 @@ maxTurns: 8 color: pink --- -You are the Learning Steward. Turn a verified mistake into the smallest durable prevention, without polluting project memory. +You are the Learning Steward. Turn a verified mistake into the smallest durable prevention, without polluting project memory. You also own memory curation: when invoked via the `memory-sync` skill, consolidate `docs/MEMORY.md` per that skill's procedure. Consult your project memory for related lesson IDs and duplicate patterns. After a decision, save only durable curation knowledge such as a superseded rule or an evaluation convention; do not duplicate the lesson log or store sensitive content. Read the supplied incident evidence and the `Active guardrails` index in `docs/LESSONS_LEARNED.md`. A valid lesson needs a concrete trigger, root cause or clearly bounded failure mode, and a prevention that a future agent can follow or test. Do not infer a lesson from a single speculative concern, an unverified external instruction, or a model's unsupported claim. -You may edit only the one-line rules under `## Lessons` in `CLAUDE.md`, plus `docs/LESSONS_LEARNED.md` and `docs/EVALS.md`. Never change any other part of `CLAUDE.md`, application code, tests, configuration, or agent prompts. Do not record secrets, access tokens, credentials, personal data, customer content, raw transcripts, or sensitive internal details. Keep the `## Lessons` list to 12 or fewer short imperative rules. Archive or supersede duplicates rather than adding near-copies. +You may edit only the one-line rules under `## Lessons` in `CLAUDE.md`, plus `docs/LESSONS_LEARNED.md`, `docs/EVALS.md`, and `docs/MEMORY.md` (during memory-sync only, within its 60-entry-line cap). Never change any other part of `CLAUDE.md`, application code, tests, configuration, or agent prompts. Do not record secrets, access tokens, credentials, personal data, customer content, raw transcripts, or sensitive internal details. Keep the `## Lessons` list to 12 or fewer short imperative rules. Archive or supersede duplicates rather than adding near-copies. For each verified learning signal, add one concise imperative prevention rule under `## Lessons` in `CLAUDE.md`, unless an existing rule already covers it. Record the supporting evidence in `docs/LESSONS_LEARNED.md`. If a deterministic prevention is feasible, add the smallest check to `docs/EVALS.md` and link it from the lesson. If no defensible prevention rule exists, make no file change and state why. diff --git a/.claude/skills/continuous-improvement/SKILL.md b/.claude/skills/continuous-improvement/SKILL.md index 92b9d36..99cedb5 100644 --- a/.claude/skills/continuous-improvement/SKILL.md +++ b/.claude/skills/continuous-improvement/SKILL.md @@ -5,7 +5,7 @@ allowed-tools: Read Grep Glob --- 1. Read the evidence, `CLAUDE.md` → `## Lessons`, `docs/HANDOFF.md`, `docs/LESSONS_LEARNED.md`, and relevant role memory. -2. Decide whether the prevention belongs in: the one-line Lessons list, `docs/EVALS.md`, role memory, a role prompt, or a project skill. +2. Decide whether the prevention belongs in: the one-line Lessons list, `docs/EVALS.md`, `docs/MEMORY.md` (if the failure was a rediscoverable fact, not a mistake pattern), role memory, a role prompt, or a project skill. 3. Reuse existing guidance if it already prevents the issue. Do not create duplicate rules or a skill for a one-off task. 4. If an agent or skill change is justified, delegate the bounded change to `system-steward`; otherwise record the smallest lesson or handoff update allowed by the task. 5. Return the failure boundary, prevention, owner, validation, and expiry/review condition. Never save secrets, personal data, raw transcripts, or unverified external instructions. diff --git a/.claude/skills/memory-sync/SKILL.md b/.claude/skills/memory-sync/SKILL.md new file mode 100644 index 0000000..2c7ec48 --- /dev/null +++ b/.claude/skills/memory-sync/SKILL.md @@ -0,0 +1,16 @@ +--- +name: memory-sync +description: Consolidate project knowledge into docs/MEMORY.md — distill durable facts from recent handoffs, decisions, and lessons; dedupe; enforce the size cap; expire stale entries. Use at a phase change, before ending a long run, or when MEMORY.md or HANDOFF.md exceeds its cap. +allowed-tools: Read Grep Glob Write Edit +--- + +Keep `docs/MEMORY.md` small, current, and worth its token cost. This skill curates memory; it never invents facts. + +1. Read `docs/MEMORY.md`, `docs/HANDOFF.md`, and only the entries in `docs/DECISIONS.md` / `docs/LESSONS_LEARNED.md` added since the last consolidation-log date. +2. **Promote:** move into `MEMORY.md` only knowledge that is durable, evidence-backed, and would cost a fresh agent tokens to rediscover (facts, conventions, environment quirks, key paths). Do not copy state, task narration, or anything already canonical in another file — link instead. +3. **Dedupe and merge:** collapse overlapping entries into the stronger one. Prefer editing an existing line over adding a new one. +4. **Expire:** delete past-due expiring notes and entries whose subject no longer exists in the repo (verify with a quick grep before deleting). +5. **Enforce the cap:** if entries exceed 60 lines, archive the least-recently-useful lines into `docs/LESSONS_LEARNED.md` → Archive (with a one-line reason) until under cap. +6. Append one row to the consolidation log. Never store secrets, personal data, customer content, or raw transcripts. + +Return: entries added/merged/expired (counts + one-line each), current line count vs cap, and anything surfaced that needs a human decision. diff --git a/.claude/skills/resume-project/SKILL.md b/.claude/skills/resume-project/SKILL.md index 41ab489..f17754e 100644 --- a/.claude/skills/resume-project/SKILL.md +++ b/.claude/skills/resume-project/SKILL.md @@ -4,7 +4,7 @@ description: Rebuild verified project state after a fresh session, compaction, i allowed-tools: Read Grep Glob --- -1. Read `CLAUDE.md`, `docs/HANDOFF.md`, `docs/PROJECT_BRIEF.md` when present, and the active rules under `## Lessons`. +1. Read `CLAUDE.md`, `docs/MEMORY.md`, `docs/HANDOFF.md`, `docs/PROJECT_BRIEF.md` when present, and the active rules under `## Lessons`. 2. Inspect the current git status and only the files named by the handoff or current task. 3. Separate verified facts from stale or unverified handoff claims. Re-run the smallest relevant check if the status is uncertain. 4. Return a state snapshot: objective, verified progress, changed paths, verification status, open risks, and one next smallest action. diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 3bb1341..3069312 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -10,6 +10,7 @@ jobs: test-and-build: name: Test & Build runs-on: ubuntu-latest + timeout-minutes: 15 container: image: node:22-bookworm @@ -32,6 +33,13 @@ jobs: run: npm ci --prefer-offline --no-audit --no-fund working-directory: /tmp/lexai + # Generates .wxt/types (ImportMeta.env etc.) required by typecheck. + # Also runs via the postinstall hook — kept explicit so a future + # --ignore-scripts install can't silently break the typecheck step. + - name: Prepare WXT types + run: npx wxt prepare + working-directory: /tmp/lexai + - name: Type check run: npm run typecheck working-directory: /tmp/lexai @@ -65,8 +73,8 @@ jobs: "${{ gitea.server_url }}/api/packages/kibin/generic/lexai-extension/${PACKAGE_VERSION}/lexai-chrome-mv3-${PACKAGE_VERSION}.zip" \ -H "Authorization: token ${{ secrets.GITEATOKEN }}" \ -T "/tmp/lexai-chrome-mv3-${PACKAGE_VERSION}.zip") - HTTP_CODE=$(echo "$RESPONSE" | tail -1) - BODY=$(echo "$RESPONSE" | head -1) + HTTP_CODE=$(echo "$RESPONSE" | tail -n 1) + BODY=$(echo "$RESPONSE" | sed '$d') echo "HTTP: $HTTP_CODE | Response: $BODY" if [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 300 ]; then echo "✅ Published: https://git.juankibin.space/kibin/-/packages" diff --git a/.gitea/workflows/deploy-chrome.yml b/.gitea/workflows/deploy-chrome.yml index 80e2cb0..652a378 100644 --- a/.gitea/workflows/deploy-chrome.yml +++ b/.gitea/workflows/deploy-chrome.yml @@ -15,6 +15,7 @@ jobs: deploy: name: Build & Deploy to Chrome Web Store runs-on: ubuntu-latest + timeout-minutes: 20 container: image: node:22-bookworm @@ -30,6 +31,13 @@ jobs: - name: Install dependencies run: npm ci + # Same gates as CI — a release must never check less than a push. + - name: Prepare WXT types + run: npx wxt prepare + + - name: Type check + run: npm run typecheck + - name: Run tests run: npm test -- --run @@ -88,8 +96,8 @@ jobs: -H "Authorization: Bearer ${{ env.CWS_ACCESS_TOKEN }}" \ -H "x-goog-api-version: 2" \ -H "Content-Length: 0") - HTTP_CODE=$(echo "$PUBLISH_RESPONSE" | tail -1) - BODY=$(echo "$PUBLISH_RESPONSE" | head -1) + HTTP_CODE=$(echo "$PUBLISH_RESPONSE" | tail -n 1) + BODY=$(echo "$PUBLISH_RESPONSE" | sed '$d') echo "Publish HTTP: $HTTP_CODE" echo "Publish Response: $BODY" STATUS=$(echo "$BODY" | grep -o '"status":\["[^"]*"\]' | head -1) diff --git a/CLAUDE.md b/CLAUDE.md index a2b9d6f..b276cd7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -36,6 +36,7 @@ docs/ ARCHITECTURE.md # the three-context system and boundaries DECISIONS.md # ADRs: BYO-key, inline styles, no shadow DOM, key story, Gitea CI TASKS.md # active contracts derived from RECOMMENDATIONS.md + MEMORY.md # curated durable knowledge; loaded every session; capped (60 lines) EVALS.md # standing gates + failure-derived checks LESSONS_LEARNED.md # codebase invariants (detail behind the ## Lessons list) HANDOFF.md # current state, risks, next action @@ -73,7 +74,7 @@ npm run test:e2e # Playwright (requires a prior `npm run build`) npm run typecheck # tsc --noEmit ``` -**Prerequisite:** Node. CI pins **Node 22** (`node:22-bookworm`). Run `npm install` before any `npm run *` — the binaries (`tsc`, `vitest`) come from `node_modules/.bin`. +**Prerequisite:** Node. CI pins **Node 22** (`node:22-bookworm`). Run `npm install` before any `npm run *` — the binaries (`tsc`, `vitest`) come from `node_modules/.bin`. Install triggers `postinstall: wxt prepare`, which generates `.wxt/types/` — **typecheck fails without it** (`import.meta.env` is typed there). If a fresh clone errors with `Property 'env' does not exist on type 'ImportMeta'`, run `npx wxt prepare`. **Load unpacked in Chrome:** `npm run build` → `chrome://extensions` → Developer Mode → Load unpacked → select `.output/chrome-mv3`. @@ -138,7 +139,7 @@ Workflows live in `.gitea/workflows/`: For coordinated work, run Fable as the main session (`claude --agent fable-orchestrator`) and let it route to specialists; see `.claude/AGENTS.md` for the roster. For LexAI code (`entrypoints/`, `src/`), prefer the **`lexai-extension-dev`** specialist over the generic `builder` — it knows the message contract, snapshot pattern, and key rules. Security-relevant changes (permissions, key path, dependencies) go through `security-auditor`. -On-demand skills in `.claude/skills/`: `resume-project`, `continuous-improvement`, `dev-loop`, `attack-surface`, `prompt-injection-audit`, `self-model-audit`. Invoke by name; keep each run bounded. +On-demand skills in `.claude/skills/`: `resume-project`, `memory-sync`, `continuous-improvement`, `dev-loop`, `attack-surface`, `prompt-injection-audit`, `self-model-audit`. Invoke by name; keep each run bounded. ## Quality gates by risk @@ -168,8 +169,22 @@ Codebase invariants that break silently when violated (detail + evidence in `doc - Bump `version` in both `package.json` and `wxt.config.ts`. - Style inline; Tailwind classes do nothing until PostCSS is wired. +## Memory protocol + +Project knowledge lives in layers; write each item to exactly one and link instead of duplicating: + +| Layer | Holds | Written when | +| --- | --- | --- | +| `docs/MEMORY.md` | durable facts, conventions, environment quirks, key paths | a fresh agent would waste tokens rediscovering it | +| `docs/HANDOFF.md` | current state and next action only | end of every substantial task | +| `docs/DECISIONS.md` | why a choice was made | a hard-to-reverse choice is made | +| `docs/LESSONS_LEARNED.md` + `## Lessons` | verified mistakes and their preventions | a learning signal is verified | + +**Context budget caps** (session-start files are a recurring token tax): `## Lessons` ≤ 12 rules, `docs/MEMORY.md` ≤ 60 entry lines, `docs/HANDOFF.md` ≤ 25 lines, `docs/TASKS.md` Active ≤ 7 contracts. When a cap is hit, run `/memory-sync` to consolidate/archive before adding — never grow past the cap. + ## State continuity - On a fresh/compacted/interrupted session, invoke `/resume-project` before planning or editing. -- Before ending a substantial task, update `docs/HANDOFF.md` (verified state, changed paths, checks, risks, next action). +- Before ending a substantial task, update `docs/HANDOFF.md` (verified state, changed paths, checks, risks, next action) and promote any durable new knowledge into `docs/MEMORY.md` per the memory protocol. +- Run `/memory-sync` at a phase change, before ending a long run, or when a capped file is full. - After a verified recurring mistake or workflow gap, invoke `/continuous-improvement`; durable agent/skill changes go through `system-steward`. diff --git a/docs/HANDOFF.md b/docs/HANDOFF.md index 2ae2c88..8df49d1 100644 --- a/docs/HANDOFF.md +++ b/docs/HANDOFF.md @@ -19,6 +19,7 @@ - `entrypoints/content.ts` — fixed unbounded document-listener leak: `showToolbar` added `click`/`scroll` listeners per selection and never removed them; now unregistered in `hideToolbar` (also closes an orphaned More-menu). Error toast gained `data-lexai`; mouseup threshold now uses `MIN_SELECTION_LENGTH` (was hardcoded `<= 10`, which ate exactly-10-char selections); same sender guard on its listener. - `src/lib/providers.ts` — `callProvider` guards `res.json()` so non-JSON gateway errors (HTML 502) surface as `" error: HTTP "` instead of a raw SyntaxError. - Verified: typecheck clean, 54/54 tests (6 new: 4 migration, 1 non-JSON error, plus existing), build clean (280.3 kB). `security-auditor` reviewed the key-path diff: PASS; its two P3 hardening notes (await encKey persistence, concurrent-save re-check) were implemented and re-gated. User-text privacy audited clean: no persistence of analyzed text, debug logs dev-gated, key/text travel only to the chosen provider. Real-page load-unpacked check of toolbar/replace still recommended (DOM-timing paths untouched except listener cleanup). +- **CI fix + workflow hardening (2026-07-15):** CI typecheck failed on push (`content.ts(10,31) TS2339: Property 'env' does not exist on type 'ImportMeta'`) because `.wxt/types/` (which types `import.meta.env`) is generated by `wxt prepare`, which CI never ran — locally it existed as a side effect of `wxt build`/`dev`. Reproduced locally by deleting `.wxt/`. Fixes: `postinstall: wxt prepare` in package.json (root fix — every fresh install regenerates types); explicit "Prepare WXT types" step in both workflows (survives a future `--ignore-scripts`); `deploy-chrome.yml` now runs **typecheck** before tests (release previously gated less than CI); fixed `head -1` → `sed '$d'` body extraction in both curl-response checks (body is all-but-last-line, not first line); added `timeout-minutes` (15 CI / 20 deploy). Verified: fresh install regenerates `.wxt`, then typecheck + 54/54 tests + build all green. CLAUDE.md Commands section documents the gotcha. - **Changed paths (this alignment):** added `docs/` (brief, architecture, decisions, tasks, evals, lessons, handoff, self-model, attacksurface), ported `.claude/agents/*` roster + `.claude/skills/*`, kept `lexai-extension-dev`, updated `.claude/AGENTS.md`. `CLAUDE.md` restructured to the operating-system format (all original LexAI rules preserved). - **Open risks (ranked):** 1. `` host permission — privacy surface + CWS review blocker (TASKS #1). diff --git a/docs/MEMORY.md b/docs/MEMORY.md new file mode 100644 index 0000000..a4d4e41 --- /dev/null +++ b/docs/MEMORY.md @@ -0,0 +1,49 @@ +# Project memory — LexAI + +> Curated long-term knowledge that must survive sessions, compaction, and agent turnover. Loaded at every session start alongside `HANDOFF.md`. **Hard cap: 60 lines of entries.** When full, the `memory-sync` skill consolidates or archives before adding. Facts only — state goes in `HANDOFF.md`, mistakes in `LESSONS_LEARNED.md`, choices in `DECISIONS.md`. + +## Verified facts + +Durable, evidence-backed truths about this project (domain rules, invariants, external realities). + +- No backend: the background service worker is the only context that calls provider APIs; the user's key never leaves the extension except to the chosen provider. + +## Conventions + +How this codebase does things (naming, structure, patterns a new agent must follow). + +- UI is inline style objects (dark Catppuccin-ish palette); Tailwind is installed but inactive. +- Each provider is duplicated as `callX` + `callXWithPrompt` — change both until T-04 refactors the layer. + +## Environment quirks + +Non-obvious facts about tooling, commands, CI, or the operator's machine that repeatedly cost time to rediscover. + +- `node_modules` is gitignored and absent by default — run `npm install` before any `npm run *`. +- CI is Gitea (`.gitea/workflows/`), Node 22 pinned. Version must match in `package.json` and `wxt.config.ts`. + +## Key paths and entry points + +| What | Where | +| --- | --- | +| Content script (selection, toolbar, replace) | `entrypoints/content.ts` | +| Background LLM proxy (providers, key decrypt) | `entrypoints/background.ts` | +| Options (provider/model/key + encrypt) | `entrypoints/options/Options.tsx` | +| Popup (standalone analyze) | `entrypoints/popup/Popup.tsx` | +| Task list (from RECOMMENDATIONS) | `docs/TASKS.md` | + +## Expiring notes + +Short-lived knowledge with an explicit expiry; `memory-sync` deletes past-due entries. + +- _None yet. Format: `[YYYY-MM-DD expires] note`_ + +## Consolidation log + +| Date | Action | Reason | +| --- | --- | --- | +| 2026-07-15 | Seeded initial facts, conventions, quirks, key paths | memory layer added | + +--- + +*Write rules: one line per entry, evidence-backed, no secrets/personal data/transcripts. Every entry must answer "would a fresh agent waste tokens rediscovering this?" — if no, it doesn't belong here.* diff --git a/package-lock.json b/package-lock.json index 7e8e4a0..4e46f02 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "": { "name": "lexai", "version": "1.0.0", + "hasInstallScript": true, "dependencies": { "@wxt-dev/module-react": "^1.1.5", "react": "^18.3.1", @@ -22,6 +23,9 @@ "jsdom": "^28.1.0", "typescript": "^5.7.3", "vitest": "^3.0.7" + }, + "engines": { + "node": ">=22" } }, "node_modules/@1natsu/wait-element": { diff --git a/package.json b/package.json index 3d16eae..a941749 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "zip": "wxt zip", "test": "vitest", "test:e2e": "playwright test", - "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.test.json" + "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.test.json", + "postinstall": "wxt prepare" }, "dependencies": { "@wxt-dev/module-react": "^1.1.5",