Skip to content

Commit c0697cf

Browse files
committed
vosk work
1 parent e3f94b6 commit c0697cf

33 files changed

Lines changed: 5164 additions & 802 deletions

.claude/skills/c-bash/SKILL.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
name: c-bash
3+
description: make .sh files follow common C code conventions for readability and maintainability
4+
allowed-tools: bash
5+
---
6+
7+
All `.sh` files should follow `.claude/skills/bash-coding-standards.md`
8+
9+
You MUST work on one file at a time, don't do bulk updates since these tend to break scripts subtly.
10+
11+
When replacing `"${var}"` it is _not_ always safe to use `$var`, especially if the variable might contain spaces or unknown input.
12+
13+
It is only safe to use the shortened `$var` syntax when the variable is known to be a simple string value, usually that means its set earlier in the script.
14+
15+
It is also only safe to remove the `{}` if the use of this variable does not cause ambiguity, or if the text following it does not cause bash to interpret it as a different variable.
16+
17+
After making changes to each file one at a time you must `bash -n` the changed script and then run the script to make sure it still works.
18+
19+
## converting non-compliant code
20+
21+
When asked to convert bash to to these conventions...
22+
23+
Never do mass sed/perl replacements across many files at once.
24+
25+
Each change must be read in context first. A variable that looks like a path may hold multi-line output, quoted strings, or JSON. The fix that is correct for one variable may silently corrupt another.
26+
27+
Quotes are load-bearing — check usage before removing them
28+
"$var" is NOT just style. It is required when:
29+
- the variable may contain spaces (file names, URLs with query strings, response bodies)
30+
- the variable may contain newlines (curl response bodies, grep output)
31+
- the variable may contain glob characters (*, ?, [)
32+
- the variable is on the right-hand side of [[ ]] and could contain * or ?
33+
34+
- Only remove quotes when you can see, from reading the script, that none of these apply.
35+
echo "$var" must stay quoted when var is a response body
36+
echo $var word-splits and glob-expands. echo "$var" preserves newlines. Any variable holding HTTP response bodies, JSON, or log output must keep quotes.
37+
38+
Work iteratively — one file at a time
39+
40+
1. Read the full file
41+
1. Identify violations
42+
1. Understand each variable's content and all its usages
43+
1. Make targeted changes
44+
1. Run bash -n and the test before moving to the next file
45+
46+
Never use automated tools (sed/perl/python) to rename variables across files
47+
48+
Variable names are not unique tokens — $body in one script is a response body requiring quotes; in another it is a simple path. Mass rename without reading context will introduce bugs.
49+
The rule is: remove ${braces} only, not quotes
50+
51+
"${foo}" → "$foo" is usually safe (keeps quotes, removes unnecessary braces).
52+
If any code uses "${foo}_baa" changing to "$foo_bar" is not safe.
53+
54+
"${foo}" → $foo is only safe after reading the specific usage.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Bash coding standards
2+
3+
All test `.sh` scripts should follow these guidelines.
4+
5+
follow [bash code style](bash-code-style.md).
6+
7+
8+
Presume no spaces in paths, this is Linux, no need to quote them.
9+
Presume URLs do not have spaces, they never do, no need to quote them.
10+
Don't quote `$port` variables
11+
Don't use colors `${RED}` outside of the test utilities.
12+
Avoid env vars for nodejs server parameters, use CLI args.
13+
14+
Make use of test utilities `test-functions.sh` and `integration-test-fucntion.sh`, do not write script specific
15+
16+
- assertions
17+
- kill functions
18+
19+
Finish scripts with `test_summary` this will exit in a way that integrates with Makefile test targets.
20+
For nginx integration tests just before `test_summary` run `crash_check`
21+
22+
## exit handlers
23+
24+
Handle cleanup in an exit handler, that runs in success or failure scenario.
25+
```
26+
cleanup() {
27+
cleanup_nginx
28+
cleanup_pid $backend_pid
29+
cleanup_temp_dir
30+
}
31+
trap cleanup EXIT
32+
```
33+
34+
# Prefer standard ports
35+
36+
mxsrv 53880
37+
legacy 8080
38+
winchecker-next 9090
39+
cache_manager 9999
40+
41+
# preferred vars
42+
43+
base_url

.claude/skills/opus-exec/SKILL.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: opus-exec
3+
description: executing a plan written by opus-plan
4+
allowed-tools: java, bash
5+
---
6+
7+
Claude Opus will write phased delivery plans in `./ai-context`.
8+
9+
Claude Sonnet should execute, if the agent asked to execute is Opus it should stop and report this as an error.
10+
11+
Arguments to this skill should be the plan name and phase.
12+
Plan may be provided as an attached document to the chat.
13+
14+
For this skill, executed by Claude Sonnet, each phase should be executed in sequence.
15+
Agent should execute phases autonomously, one after the other. until the context window is 80% full.
16+
17+
If the context window is 80% full it should report progress, and wait for human user to clear the
18+
context for the subsequent phases.
19+
20+
During execution
21+
22+
Never submit code.
23+
Never change .perf.targets - humans must review performance regressions
24+
25+
After each phase is complete update the _PLAM.md, so that we can recover from crashes and full context windows.

.claude/skills/opus-plan/SKILL.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
name: opus-plan
3+
description: use Claude Opus to plan development for Claude Sonnet
4+
allowed-tools: java, bash
5+
---
6+
7+
Rather than implementing any code, output should be a markdown file in `./ai-context`
8+
that contains a phased implementation plan where each phase fits in the Claude Sonnet 4.6 context window.
9+
10+
No changes should be made, other than writing one new plan document.
11+
12+
After each phase Claude Sonnet should write to ./ai-context/PROGRESS.md so we can /clear and continue with a fresh context.

Makefile.am

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ if ENABLE_GEANYCONTROL
111111
SUBDIRS += geanycontrol
112112
endif
113113

114+
if ENABLE_GEANYVOSK
115+
SUBDIRS += geanyvosk
116+
endif
117+
114118
if ENABLE_GEANYSERVERS
115119
SUBDIRS += geanyservers
116120
endif

ai-context/PROGRESS.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# geanyvosk — Implementation Progress
2+
3+
## Status
4+
5+
| Phase | Description | Status |
6+
|-------|--------------------------------------|----------|
7+
| 1 | Project scaffold & build system | complete |
8+
| 2 | ALSA microphone capture thread | complete |
9+
| 3 | Vosk ASR + wake word detection | complete |
10+
| 4 | UI command dispatch via geanycontrol | complete |
11+
| 5 | Skill & AI-prompt creation by voice | complete |
12+
| 6 | Agent skill execution by voice | complete |
13+
14+
## Notes
15+
16+
- Plan document: `ai-context/geanyvosk-plan.md`
17+
- Vosk is NOT installed on the system; must be installed before Phase 3.
18+
- Install libvosk: download from https://alphacephei.com/vosk/models (C library + header)
19+
- Install ALSA dev: `sudo apt install libasound2-dev`
20+
- To resume after `/clear`, start a new session and say:
21+
"Continue geanyvosk Phase N per ai-context/geanyvosk-plan.md"

0 commit comments

Comments
 (0)