Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

## Unreleased

## 2.2.0

**Prompt builder controls.** Flowkey's `prompt:` mode can now target Claude Code or generic chat tools without exposing raw built-in system-prompt editing.

### Added

- **Prompt builder settings for `prompt:` mode.** The Config tab now exposes bounded prompt-output controls (target agent, action, detail, structure, acceptance criteria, verification, output expectations, and a capped user suffix) without allowing raw edits to the locked built-in system prompt. The default remains Claude Code-compatible and keeps the existing prompt-mode system prompt byte-identical; `generic_chat` adds a production Markdown adapter with target-aware validation and deterministic fallback/preview. Live FastFlowLM eval on `qwen3.5:4b`: `claude_code` 2/2, `generic_chat` 10/10.

## 2.1.1

**Maintenance.** Fixes a recurring meetings-batch error and clears a batch of small audit/doc items.
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ Flowkey is a Windows desktop assistant that adds local-LLM hotkeys for grammar f

Everything runs locally through [FastFlowLM](https://fastflowlm.com) (AMD Ryzen AI NPU) or, on machines without the NPU, through [Ollama](https://ollama.com) (CPU/GPU) as a secondary provider. No cloud service, analytics, or telemetry is used by the app.

Current version: `2.1.1`
Current version: `2.2.0`

## What's new in 2.2

- **Prompt builder settings for `prompt:` mode.** Dashboard → Config now lets you tune prompt output for Claude Code or generic chat targets, choose action/detail/structure, add acceptance criteria or verification sections, and preview the deterministic shape without a model call. Claude Code remains the default; `generic_chat` cleared the live FastFlowLM eval gate on `qwen3.5:4b` (10/10).

## What's new in 2.1

Expand Down Expand Up @@ -115,6 +119,7 @@ The dashboard is a web page served by the local daemon — open it from the tray
- **Tabs:** Overview, Chat, Telemetry, History, Notes, Meetings, Config, Benchmark.
- **Theme:** auto-follows your OS day/night setting; the topbar button cycles auto → light → dark.
- **Custom modes:** Config → Custom modes lets you add your own `prefix:` commands (id + system prompt). Changes apply to the running app within a second.
- **Prompt builder:** Config → Prompt builder controls the built-in `prompt:` output style without allowing raw edits to the locked system prompt.
- **Models:** pull models with live progress — pick a suggestion or type any name (on Ollama, anything from the [library](https://ollama.com/library) works); set active, remove. Suggestions are hardware-aware: detected RAM/VRAM caps the model size (e.g. 32 GB RAM → ~4B on the NPU; 8 GB VRAM → ~9B on the GPU), oversized models are hidden, and free-typing one asks before pulling.
- **Benchmark:** works on both providers — `flm bench` on FastFlowLM (~10–20 min, NPU), timed generations with native metrics on Ollama (~1–3 min, server keeps running).
- **Notes:** browse or search your vault; History shows recent runs (text is stored only if history storage is enabled).
Expand Down
9 changes: 6 additions & 3 deletions SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ Caveman-encoded (compression, not amputation). Paths / ids / action names / numb
- LLM: FastFlowLM NPU @ `:52625` | Ollama @ `:11434`, OpenAI-compat `POST /v1/chat/completions`
- dashboard: daemon-served `scripts/ui/web/{index.html,app.js,styles.css}`, CSP `default-src 'self'`
- paths: `scripts/paths.py` → USER_ROOT/{config,data,logs}; `_version.py` = version src of truth
- version: `2.1.1` (this branch, maintenance); `2.1.0` released (tag on `7835d4b`); repo `agr77one/Fastflow`
- version: `2.2.0` (prompt_builder release branch); `2.1.0` released (tag on `7835d4b`); repo `agr77one/Fastflow`
- run tree = `flowkey-pub2` (worktree, branch `live`=origin/main). old `FastFlowPrompt_Local_Setup`=1.5.0 stale.

## §I interfaces

- cfg blocks: `enabled`, `llm`, `providers.{fastflowlm,ollama}`, `server`, `routing`, `notes`, `chat`, `modes`, `dictionary`, `notifications`, `meetings`, `hotkeys`
- cfg blocks: `enabled`, `llm`, `providers.{fastflowlm,ollama}`, `server`, `routing`, `prompt_builder`, `notes`, `chat`, `modes`, `dictionary`, `notifications`, `meetings`, `hotkeys`
- api: `POST /action/<name>` ! header `X-FFP-API: 1` → 200 `{ok,result,error,elapsed_ms}`
- api: `GET /` → dashboard; `GET /healthz` → `{ok,version,api,actions}`
- action: `config_snapshot` → full cfg; `apply_config_patch {patch}` → merge (whitelist `filter_config_patch`)
- action: `prompt_builder_preview {settings?,sample?}` → deterministic local preview (`⊥` LLM call)
- action: `notify_gate {title,message}` → `{show,reason,category}` (logs); `notifications_log {limit}` → rows
- action: `quill_status` → `{reachable,enabled,server,server_version}`
- action: `quill_search_meetings {query,limit}` → `{meetings:[{id,title,date,duration,participants,url}]}`
Expand All @@ -41,7 +42,7 @@ Caveman-encoded (compression, not amputation). Paths / ids / action names / numb
- data: `data/{meeting_digests,meeting_action_status,meeting_skips,notifications,chat_threads}.jsonl`
- autostart: HKCU Run `FastFlowPrompt` → bundled `AutoHotkey64.exe` + `grammarFix.ahk`; `FlowkeyGitSync` → `sync.ps1`
- sched: Windows task `FlowkeyGitSync` daily 12:00 → `sync.ps1` (ff-only pull, guarded)
- ACTIONS count = 73
- ACTIONS count = 75

## §V invariants

Expand All @@ -68,6 +69,7 @@ Caveman-encoded (compression, not amputation). Paths / ids / action names / numb
- V21: local data (config/data/logs/vendor/certs) ∈ `.gitignore` ∴ pull moves code only, never user data
- V22: `sync.ps1` ∃ uncommitted tracked changes → skip pull (⊥ clobber un-pushed WIP)
- V23: meeting `NoContentError` & age ≥ 2d → skip-marker (`meeting_skips.jsonl`) ∴ ⊥ re-queue ever; age < 2d → retry (Quill transcript may still sync); non-content errors ⊥ skip-mark. batch errors → `daemon.log` only (⊥ UI panel, per user)
- V24: prompt_builder default cfg ⇒ `CLAUDE_PROMPT_SYSTEM_PROMPT` identity; non-default prompt validation target-aware (XML only when effective structure=xml); built-in `modes.prompt.system_prompt` still locked

## §T tasks

Expand All @@ -93,6 +95,7 @@ T17|.|[DOCS] installer layout: build script says flattened, installer.md still s
T18|.|[DOCS] provider roadmap marks selector/status UX incomplete → update to reflect it exists|—
T19|x|[DOCS] first-run wizard text "chat popup" → "Open chat" + hotkey now `^!c` (2.1.1)|B5
T20|x|[DOCS] daemon log location — audited 2.1.1: no stale ref in README/docs; nothing to change|—
T21|x|prompt_builder cfg + claude_code identity + generic_chat adapter + dashboard controls/preview|V17,V24
```

## §B bugs
Expand Down
12 changes: 12 additions & 0 deletions config/grammar_hotkey.config.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@
"chunk_size_chars": 1200,
"min_chunk_chars": 700
},
"prompt_builder": {
"target_agent": "claude_code",
"detail_level": "balanced",
"action_mode": "implement",
"structure": "agent_default",
"include_acceptance_criteria": false,
"include_verification": false,
"include_output_format": true,
"preserve_user_constraints": true,
"allow_user_suffix": true,
"user_suffix": ""
},
"dictionary": {
"protected_words": []
},
Expand Down
Loading