中文 README | Deutsche README
Developer documentation. For the end-user guide shown inside the app, use:
- USER_GUIDE.md
- USER_GUIDE.zh-CN.md
- USER_GUIDE.de.md
Software Coach is a Windows-first, privacy-first, plugin-first desktop MVP for guided software coaching. It does not automate clicks. It resolves software context at the conversation level, sends screenshots directly to a vision-capable model when available, grounds the result in local workflow knowledge, and returns bounded next-step guidance with explicit evidence and uncertainty.
This repository currently ships one real Coach Pack: PerfView. The core is intentionally software-agnostic, model-provider-agnostic, and structured so that adding a new pack does not require changing core orchestration.
- Local-first: mock mode and local-provider mode remain useful offline.
- Privacy-first: screenshots are not uploaded by default.
- Plugin-first: software-specific logic lives in Coach Packs, not in core.
- Provider-agnostic: model integration is behind a single
ModelProviderinterface. - Progressive coaching: the app is a step-by-step coach, not just a one-turn chatbot.
This project uses a plugin-first monolith instead of a distributed plugin runtime.
- It keeps the MVP shippable.
- It preserves clean boundaries.
- It avoids leaking PerfView-specific logic into the core.
- It leaves room for future installable packs, OCR, trace analysis, and vector retrieval.
flowchart LR
UI["React Overlay UI"] --> IPC["Typed Preload IPC"]
IPC --> MAIN["Electron Main Process"]
MAIN --> APP["Application Use Cases"]
APP --> DOMAIN["Domain Contracts"]
APP --> INFRA["Infrastructure Adapters"]
APP --> PACKS["Coach Packs"]
PACKS --> KNOW["Docs / Workflows / Ontology / Prompts / Fixtures"]
INFRA --> MODELS["Model Providers"]
INFRA --> STORE["Local Session / Feedback / Logs"]
- New software integrations should be added by registering a new
CoachPack. - Core orchestration should not gain
if (perfview)branches. - Software-specific prompts, docs, workflows, ontology, fixtures, and future state graphs stay owned by the pack.
- Different deployments need different model backends.
- Some users need offline or local-only operation.
- Some providers support vision, streaming, or embeddings differently.
- The app should be able to add Claude, Azure OpenAI, LM Studio, vLLM, or a local gateway without rewriting application logic.
Current packaged runtime:
contextIsolation: truenodeIntegration: false- typed preload API only
- CSP on the renderer page
- no dynamic remote script execution
- no arbitrary remote
BrowserWindownavigation - narrow IPC channels
- permission handler denies unused permissions
Current Windows packaging note:
sandboxis temporarily disabled in the renderer for packaged builds because the MVP hit a real preload bridge failure in the packaged Electron runtime.- This is a pragmatic compatibility tradeoff, not the final target architecture.
- The intended future state is to restore
sandbox: trueonce the preload path is stable in packaged production builds.
More detail is in SECURITY.md.
By default:
- screenshots stay local
- screenshots are not stored
- telemetry is disabled
- remote docs are disabled
- cloud model use is disabled
What leaves the machine:
- nothing in mock mode
- nothing in local Ollama mode, assuming Ollama runs locally
- text and image content may leave the machine only if the user enables a cloud-capable provider and selects it
What stays local:
- local docs, workflows, ontology, prompts, and fixtures
- feedback files
- sessions
- logs
- screenshots unless a future feature changes that behavior
The MVP is designed to remain useful offline:
- mock provider works without network or API keys
- local provider mode can run through an OpenAI-compatible local endpoint or Ollama
- local retrieval works from checked-in markdown and YAML assets
The current coaching flow is:
- confirm
software name + versionin the conversation when possible - if the user does not provide them, ask for confirmation before detailed coaching
- if the user still declines, use the first screenshot to produce a candidate software/version guess
- pre-route a candidate Coach Pack
- send the screenshot, question, and pack-grounded docs/workflows/prompts to a vision-capable model
- validate the structured result and render the final coach response
This keeps the experience close to direct screenshot Q&A while preserving Coach Pack routing, local docs grounding, and progressive coaching state.
src/
domain/
application/
infrastructure/
plugins/
prompts/
ui/
electron/
resources/
tests/
docs/
- Install dependencies:
npm install- Start the desktop app:
npm run devThe overlay window opens as an always-on-top Electron window. The default shortcut is Ctrl+Shift+Space.
The app now exposes local documentation in two places, and both open inside a built-in read-only documentation window:
- the
Help & Docspanel inside the overlay UI - the tray menu under
Documentation
Available in-app end-user documents:
- English Guide
- Chinese Guide
- German Guide
npm run testnpm run buildThis produces dist/ and dist-electron/.
npm run distInstaller output is written to release/.
- Windows target:
nsis - macOS target:
dmg - Linux target:
AppImage
Current implementation-time verification priority is Windows. macOS and Linux packaging targets are configured but not validated to the same level in this MVP.
- App name:
Software Coach - Version:
0.1.0 - App ID:
com.softwarecoach.desktop - Windows installer name:
Software Coach Setup 0.1.0.exe - Installer output path: release/Software Coach Setup 0.1.0.exe
Default example:
models:
default:
provider: openai-compatible
baseUrl: https://api.openai.com/v1
model: gpt-4.1
local:
provider: openai-compatible
baseUrl: http://localhost:11434/v1
model: qwen2.5vl:7b
routing:
vision:
use: default
text:
use: local
embeddings:
use: local
privacy:
allowCloudModels: false
storeScreenshots: false
telemetry: false
allowRemoteDocs: falseAPI keys are never stored in config files. Use environment variables such as OPENAI_API_KEY.
As of May 16, 2026, the app connects to Ollama through Ollama's OpenAI-compatible API at http://localhost:11434/v1. Ollama's official docs show base_url='http://localhost:11434/v1/', an ignored placeholder api_key='ollama', and a vision example on /v1/chat/completions. In this project, no real API key is needed for local Ollama because local base URLs bypass the API key requirement.
Example:
models:
local:
provider: openai-compatible
baseUrl: http://localhost:11434/v1
model: qwen2.5vl:7b
routing:
vision:
use: local
text:
use: localIf you prefer a named internal route, the code also supports provider: ollama.
Recommended local setup:
ollama pull qwen2.5vl:7b
ollama serveThen in Software Coach:
- open
Settings - set
Text Providertoollama - set
Ollama Base URLtohttp://localhost:11434/v1 - set
Local Model Nametogemma3:4borqwen2.5vl:7b - click
Apply Settings
The app now persists these settings to a local config.yaml under the app data directory, so they survive restart.
Current settings behavior:
- when
ollamais selected, the settings panel shows Ollama-specific fields only - the app lists locally installed Ollama models from
ollama list - you can still type a custom model name manually
- if the custom model is not installed, the app asks for confirmation before running
ollama pull <model> - the settings panel shows installation progress while the model is being pulled
As of May 16, 2026, the best Ollama local model for this project is qwen2.5vl:7b.
Reasoning:
- Ollama describes Qwen2.5-VL as its "new flagship vision-language model"
- the official page says it is highly capable of analyzing text, charts, icons, graphics, and layouts inside images
- that is exactly the workload here: reading software screenshots, table headers, buttons, metrics, and panel layouts
- the same page says Qwen2.5-VL-7B outperforms GPT-4o-mini on a number of tasks, which is a strong signal for a local screenshot-coaching use case
Recommended choices:
qwen2.5vl:7bBest overall fit for this app. Recommended default for local screenshot coaching.gemma3:12bBest balanced fallback if you want a larger general multimodal model. Official Ollama library lists it as multimodal with a 128K context window. Good choice if you have more VRAM and want a broader reasoning model.gemma3:4bGood lower-resource fallback whenqwen2.5vl:7bis too heavy.llama3.2-vision:11bUsable, but not my first choice here. Ollama's page explicitly notes that image+text applications are officially English-only, which is a worse fit for a product that may coach in Chinese, English, or German.minicpm-vLightweight fallback for constrained machines, but not the first recommendation for high-accuracy software UI coaching.
Practical recommendation by machine size:
- 8 GB class local setup: start with
gemma3:4b - 12 to 16 GB class local setup: start with
qwen2.5vl:7b - 24 GB+ class local setup: try
gemma3:12band compare againstqwen2.5vl:7b
Official sources:
- Ollama OpenAI compatibility
- Ollama Qwen2.5-VL library page
- Ollama Gemma 3 library page
- Ollama Llama 3.2 Vision library page
- Ollama MiniCPM-V library page
Example cloud route:
models:
default:
provider: openai-compatible
baseUrl: https://api.openai.com/v1
model: gpt-4.1Set:
set OPENAI_API_KEY=your_key_hereIf privacy.allowCloudModels is false, cloud routes fall back to the mock provider.
- Add a new folder under
src/plugins/<software-id>/ - Create:
manifest.yamldetector.tspack.tsdocs/workflows/ontology/prompts/fixtures/- optional
state-graph/ - optional
trace/
- Implement the
CoachPackinterface. - Register the pack in src/application/createServices.ts.
Core application orchestration should not need modification.
- Create a provider in
src/infrastructure/models/ - Implement the
ModelProviderinterface - Add its routing logic in
modelProviderFactory.ts - Express its differences through
capabilities
- detect likely PerfView screens from direct vision analysis and pack-grounded hints
- explain common views such as CPU Stacks, CallTree, ByName, GC Heap, Thread Time, and Events
- answer CPU-high, GC-heap, memory-leak, and Thread-Time style questions using local docs
- provide next-step guidance without clicking
- expose debug details and citations
- support progressive actions such as
I completed this stepandStill stuck - hide Software Coach, let the user drag a region on the primary display, and save only the cropped area through Electron main process
- no ETL or trace parsing yet
- no automatic clicking or overlay highlighting
- screenshot capture currently supports drag-to-select region capture on the primary display only
- the best screenshot understanding currently depends on a vision-capable provider
- when software context is not confirmed, the app will ask clarifying questions before detailed coaching
- manual image selection remains as a fallback screenshot path for MVP
- non-PerfView software options are UI-level placeholders for future packs
- settings now persist locally and support provider-aware fields, but they are still an MVP settings surface
- the current packaged Electron runtime uses
sandbox: falseas a temporary preload compatibility workaround - macOS and Linux targets are configured, but Windows is the only validated packaging path today
electron-updater is wired as a non-blocking placeholder. The current app starts normally without waiting on update checks.
Future update strategies:
- GitHub Releases
- internal enterprise update server
- signed private distribution channels
For the complete Windows-first delivery status, troubleshooting, implemented features, extension points, and TODO inventory, see docs/windows-first-delivery.md.
- restore
sandbox: truefor packaged builds after preload compatibility is fixed cleanly - extend region capture to multi-display selection
- add OCR providers
- add vector retrieval
- add trace analysis
- add overlay highlighting
- add workflow verification
- add enterprise mode
- add fully local-only hardened mode
- add richer UI state graph reasoning