Skip to the content.

Developer Handbook

Status: Active handbook Role: Canonical current Last updated: 2026-03-21 Last verified: 2026-03-21 developer-doc routing review + script inventory check Purpose: developer-facing repository map and current source-of-truth routing for implementation work Source-of-truth: developer reference guide; command details defer to local_setup.md and build_and_release.md, and runtime claims verify in source code and feature_state_matrix.md.

This document is the primary developer-facing reference for LexiShift implementation work. Use it as a map and routing handbook, not as the only authority for fast-moving command surfaces.

1. Purpose

Use this handbook to:

2. System Surfaces

LexiShift has four main runtime surfaces:

  1. Desktop GUI app (apps/gui/src/)
    • Authoring surface for profiles, rulesets, language packs, and settings.
  2. Chrome extension (apps/chrome-extension/)
    • Primary runtime for webpage replacement, SRS interactions, and helper bridge requests.
  3. BetterDiscord plugin (apps/betterdiscord-plugin/)
    • Runtime replacement surface for Discord messages.
  4. Native helper (scripts/helper/ + core/lexishift_core/helper/)
    • Local SRS set planning/initialization/refresh, rulegen publication, and feedback ingestion.

3. Repository Map (Developer-Focused)

Core code areas:

App/runtime code:

Operational and tooling:

4. Data Ownership And Storage Layout (Current)

Extension-side persistent stores:

  1. chrome.storage.local
    • settings and runtime mirrors,
    • srsProfiles.<profile_id>.* profile-scoped state,
    • srsStore, srsFeedbackLog, srsExposureLog,
    • helper feedback sync queue keys (helperFeedbackSyncQueue, helperFeedbackSyncLock, helperFeedbackSyncDropped).
  2. IndexedDB
    • profile_media_store for profile background assets.

Helper/app-data stores (profile-first under app data root):

Current policy notes to keep explicit:

For maintained data diagrams, use:

5. Local Setup And Validation Entry Points

Use local_setup.md as the current runbook for setup, repo safety, style, parity, and branch-scope loops. Keep this handbook focused on the minimum entrypoints needed to resume work quickly.

Create environment:

python -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt
npm --prefix scripts run hooks:install

Default local safety loop:

npm --prefix scripts run check

Default branch-scope loop:

npm --prefix scripts run check:changed:local

Build/package safety loop when those surfaces are touched:

npm --prefix scripts run build

Specialty runbooks, policies, and ledgers live in:

6. Runtime Development Loops

Desktop GUI

python apps/gui/src/main.py

Chrome extension

  1. Open chrome://extensions.
  2. Enable Developer mode.
  3. Load unpacked: apps/chrome-extension/.
  4. Use options/debug flows to validate state and helper paths.

BetterDiscord plugin

node apps/betterdiscord-plugin/build_plugin.js

Optional dev helpers:

node apps/betterdiscord-plugin/watch_plugin.js
node apps/betterdiscord-plugin/sync_plugin.js

7. Core Engineering Flows

A) Replacement runtime changes

Primary touchpoints:

Reference docs:

B) Options/settings/controller changes

Primary touchpoints:

Reference docs:

C) Helper/SRS flow changes

Primary touchpoints:

Reference docs:

8. Build And Release

Use:

Key gate before CWS upload:

npm --prefix scripts run preflight:cws

Runbook and reports:

9. Testing And Diagnostics

Core tests:

python -m unittest discover -s core/tests

Syntax-check changed extension files as needed:

node --check <changed_js_file>

Helper diagnostics scripts:

Rulegen quality workflow references:

SRS workflow references:

Extension architecture debug references:

10. Architecture Reliability Map

Use this classification first when reading architecture docs:

For broader documentation authority, archive, and salvage-forward rules, use:

Source:

11. Resume Workflow

When resuming after a break:

  1. Read feature_state_matrix.md for current status, evidence, and known contradictions.
  2. Read local_setup.md for the current operating loops before changing code.
  3. Read ../architecture/README.md.
  4. Read ../architecture/chrome_web_store_review_working_doc.md for open policy/product decisions and ../TODOs.md for active backlog.
  5. Re-check source-level truth in:
    • ../../apps/chrome-extension/manifest.json
    • ../../apps/chrome-extension/options/core/bootstrap/controller_graph.js
    • ../../apps/chrome-extension/shared/settings/settings_defaults.js

12. Canonical References

Current routing and runbooks:

Policy and state:

Planning and workstreams:

Reference maps:

13. Legacy Snapshot

Historical root README snapshot (archival):