scaffold: M0 skeleton + agent onboarding (build, architecture, progress)
Turn the design into a buildable, dependency-free M0 skeleton plus the
onboarding layer so a new agent can pick up instantly.
Build system:
- CMake + CMakePresets (dev = no deps; server-release = vcpkg) + vcpkg.json
- Skeleton builds with just a C++20 compiler; deps stay off until needed
- .gitattributes (LF), .gitignore, .clang-format
Core (libvoicecat):
- core/include/voicecat.h: full C ABI (the client/server contract), stubbed
- core/proto/voicecat.proto: control-plane wire format, matches docs/protocol.md
- src/{net,crypto,codec,protocol,session,audio,core}: subsystem stubs that
return VC_ERR_NOT_IMPLEMENTED, each pointing to its design doc
- server/ (voicecat-server) and tools/vccli/ link the core
- tests/: CTest smoke test asserting the C ABI contract (behavior, not just build)
- clients/{apple,windows}: M4 placeholders
Onboarding for agents:
- CLAUDE.md: hub — build/test commands, architecture at a glance, doc map, rules
- AGENTS.md: working method (behavior-driven; clean compile is the floor not the goal)
- PROGRESS.md: living tracker — M0 done, M1 task checklist, "where we left off"
Verified: cmake --preset dev && cmake --build --preset dev && ctest --preset dev → green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 21:09:09 +02:00
|
|
|
|
# AGENTS.md — working method
|
|
|
|
|
|
|
|
|
|
|
|
This file is the **working method** for a developer or AI agent picking up VoiceCat. Companion
|
|
|
|
|
|
files:
|
|
|
|
|
|
|
|
|
|
|
|
- [`CLAUDE.md`](CLAUDE.md) — the hub: build/test commands, architecture at a glance, doc map.
|
|
|
|
|
|
- [`PROGRESS.md`](PROGRESS.md) — living tracker: what's done, what's next. **Update it as you work.**
|
|
|
|
|
|
- [`docs/`](docs/) — the **source of truth** for all design.
|
|
|
|
|
|
|
|
|
|
|
|
Read those, then use the method below.
|
|
|
|
|
|
|
|
|
|
|
|
## What this repo is right now
|
|
|
|
|
|
|
build(cmake): clean up presets, add release/apple presets, cross-platform triplets
Rationalize the preset set to match the project's actual state (past M5):
- Rename dev->skeleton (no-deps stub smoke), m1-dev->dev (default dev preset)
- Drop m2-dev (cache-identical to m1-dev)
- Add release preset (optimized + tests on, symbols kept)
- Strip server-release binaries (-s linker flag)
- Add apple-dev/apple-ios/apple-ios-sim scaffolding presets for XCFramework
Add cmake/voicecat-toolchain.cmake wrapper that auto-resolves the vcpkg
triplet from the host platform (x64-mingw-static/x64-linux/arm64-osx) so
the main presets work on Windows/Linux/macOS without per-OS variants.
Update all docs (building.md, CLAUDE.md, README.md, AGENTS.md, deployment.md,
tech-stack.md, client READMEs) and stale preset-name references in code
comments. No C++ behavior changes — the core was already portable.
2026-06-18 03:16:01 +02:00
|
|
|
|
A complete **design** ([`docs/`](docs/)) plus a working implementation through M5: real TLS
|
|
|
|
|
|
control plane, encrypted UDP voice (Opus), multi-stream, TOFU identity pinning, channel tree,
|
|
|
|
|
|
permissions, moderation, disconnect/keepalive/reaper. The Windows WinForms C# client is
|
|
|
|
|
|
shipped (M4). The macOS/iOS Swift client is next. The `skeleton` preset still links a
|
|
|
|
|
|
no-deps stub path (`VC_ERR_NOT_IMPLEMENTED`) for smoke-check builds.
|
scaffold: M0 skeleton + agent onboarding (build, architecture, progress)
Turn the design into a buildable, dependency-free M0 skeleton plus the
onboarding layer so a new agent can pick up instantly.
Build system:
- CMake + CMakePresets (dev = no deps; server-release = vcpkg) + vcpkg.json
- Skeleton builds with just a C++20 compiler; deps stay off until needed
- .gitattributes (LF), .gitignore, .clang-format
Core (libvoicecat):
- core/include/voicecat.h: full C ABI (the client/server contract), stubbed
- core/proto/voicecat.proto: control-plane wire format, matches docs/protocol.md
- src/{net,crypto,codec,protocol,session,audio,core}: subsystem stubs that
return VC_ERR_NOT_IMPLEMENTED, each pointing to its design doc
- server/ (voicecat-server) and tools/vccli/ link the core
- tests/: CTest smoke test asserting the C ABI contract (behavior, not just build)
- clients/{apple,windows}: M4 placeholders
Onboarding for agents:
- CLAUDE.md: hub — build/test commands, architecture at a glance, doc map, rules
- AGENTS.md: working method (behavior-driven; clean compile is the floor not the goal)
- PROGRESS.md: living tracker — M0 done, M1 task checklist, "where we left off"
Verified: cmake --preset dev && cmake --build --preset dev && ctest --preset dev → green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 21:09:09 +02:00
|
|
|
|
|
|
|
|
|
|
## The working method (important)
|
|
|
|
|
|
|
|
|
|
|
|
**A clean compile is the floor, not the goal.** Do not treat "make the compiler errors go
|
|
|
|
|
|
away" as done. Each milestone in [`docs/roadmap.md`](docs/roadmap.md) has an **exit
|
|
|
|
|
|
criterion stated as observable behavior** — that is what "done" means. Examples:
|
|
|
|
|
|
|
|
|
|
|
|
- M1 done = *two `vccli` instances actually chat through a real server over TLS*, not "it builds".
|
|
|
|
|
|
- M2 done = *you can talk between two clients in a channel and hear loss concealment work*.
|
|
|
|
|
|
|
|
|
|
|
|
So the loop is:
|
|
|
|
|
|
|
|
|
|
|
|
1. Pick the current milestone in `docs/roadmap.md`. Read the relevant design doc section.
|
|
|
|
|
|
2. Write the smallest test (CTest, or a `vccli` interaction) that encodes the exit behavior.
|
|
|
|
|
|
3. Implement the subsystem until that test passes — not just until it compiles.
|
|
|
|
|
|
4. Keep the build green and the existing tests passing on every commit.
|
|
|
|
|
|
|
|
|
|
|
|
Every commit must compile and pass `ctest`. Behavior tests are how you know you're actually
|
|
|
|
|
|
making progress.
|
|
|
|
|
|
|
|
|
|
|
|
## Build
|
|
|
|
|
|
|
2026-07-03 10:42:42 +01:00
|
|
|
|
Default development preset (real deps via vcpkg — works on Windows/Linux/macOS). vcpkg is
|
|
|
|
|
|
bundled as a git submodule at `vcpkg/`, pinned to `vcpkg.json`'s `builtin-baseline`:
|
scaffold: M0 skeleton + agent onboarding (build, architecture, progress)
Turn the design into a buildable, dependency-free M0 skeleton plus the
onboarding layer so a new agent can pick up instantly.
Build system:
- CMake + CMakePresets (dev = no deps; server-release = vcpkg) + vcpkg.json
- Skeleton builds with just a C++20 compiler; deps stay off until needed
- .gitattributes (LF), .gitignore, .clang-format
Core (libvoicecat):
- core/include/voicecat.h: full C ABI (the client/server contract), stubbed
- core/proto/voicecat.proto: control-plane wire format, matches docs/protocol.md
- src/{net,crypto,codec,protocol,session,audio,core}: subsystem stubs that
return VC_ERR_NOT_IMPLEMENTED, each pointing to its design doc
- server/ (voicecat-server) and tools/vccli/ link the core
- tests/: CTest smoke test asserting the C ABI contract (behavior, not just build)
- clients/{apple,windows}: M4 placeholders
Onboarding for agents:
- CLAUDE.md: hub — build/test commands, architecture at a glance, doc map, rules
- AGENTS.md: working method (behavior-driven; clean compile is the floor not the goal)
- PROGRESS.md: living tracker — M0 done, M1 task checklist, "where we left off"
Verified: cmake --preset dev && cmake --build --preset dev && ctest --preset dev → green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 21:09:09 +02:00
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-07-03 10:42:42 +01:00
|
|
|
|
git submodule update --init vcpkg # one-time, after cloning
|
|
|
|
|
|
./vcpkg/bootstrap-vcpkg.sh # .bat on Windows
|
scaffold: M0 skeleton + agent onboarding (build, architecture, progress)
Turn the design into a buildable, dependency-free M0 skeleton plus the
onboarding layer so a new agent can pick up instantly.
Build system:
- CMake + CMakePresets (dev = no deps; server-release = vcpkg) + vcpkg.json
- Skeleton builds with just a C++20 compiler; deps stay off until needed
- .gitattributes (LF), .gitignore, .clang-format
Core (libvoicecat):
- core/include/voicecat.h: full C ABI (the client/server contract), stubbed
- core/proto/voicecat.proto: control-plane wire format, matches docs/protocol.md
- src/{net,crypto,codec,protocol,session,audio,core}: subsystem stubs that
return VC_ERR_NOT_IMPLEMENTED, each pointing to its design doc
- server/ (voicecat-server) and tools/vccli/ link the core
- tests/: CTest smoke test asserting the C ABI contract (behavior, not just build)
- clients/{apple,windows}: M4 placeholders
Onboarding for agents:
- CLAUDE.md: hub — build/test commands, architecture at a glance, doc map, rules
- AGENTS.md: working method (behavior-driven; clean compile is the floor not the goal)
- PROGRESS.md: living tracker — M0 done, M1 task checklist, "where we left off"
Verified: cmake --preset dev && cmake --build --preset dev && ctest --preset dev → green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 21:09:09 +02:00
|
|
|
|
cmake --preset dev
|
|
|
|
|
|
cmake --build --preset dev
|
|
|
|
|
|
ctest --preset dev
|
|
|
|
|
|
```
|
|
|
|
|
|
|
2026-07-03 10:42:42 +01:00
|
|
|
|
To use an external vcpkg checkout instead, `export VCPKG_ROOT=/path/to/vcpkg` — it always
|
|
|
|
|
|
takes priority over the bundled submodule.
|
|
|
|
|
|
|
build(cmake): clean up presets, add release/apple presets, cross-platform triplets
Rationalize the preset set to match the project's actual state (past M5):
- Rename dev->skeleton (no-deps stub smoke), m1-dev->dev (default dev preset)
- Drop m2-dev (cache-identical to m1-dev)
- Add release preset (optimized + tests on, symbols kept)
- Strip server-release binaries (-s linker flag)
- Add apple-dev/apple-ios/apple-ios-sim scaffolding presets for XCFramework
Add cmake/voicecat-toolchain.cmake wrapper that auto-resolves the vcpkg
triplet from the host platform (x64-mingw-static/x64-linux/arm64-osx) so
the main presets work on Windows/Linux/macOS without per-OS variants.
Update all docs (building.md, CLAUDE.md, README.md, AGENTS.md, deployment.md,
tech-stack.md, client READMEs) and stale preset-name references in code
comments. No C++ behavior changes — the core was already portable.
2026-06-18 03:16:01 +02:00
|
|
|
|
Skeleton (no third-party deps — works immediately, no vcpkg needed):
|
scaffold: M0 skeleton + agent onboarding (build, architecture, progress)
Turn the design into a buildable, dependency-free M0 skeleton plus the
onboarding layer so a new agent can pick up instantly.
Build system:
- CMake + CMakePresets (dev = no deps; server-release = vcpkg) + vcpkg.json
- Skeleton builds with just a C++20 compiler; deps stay off until needed
- .gitattributes (LF), .gitignore, .clang-format
Core (libvoicecat):
- core/include/voicecat.h: full C ABI (the client/server contract), stubbed
- core/proto/voicecat.proto: control-plane wire format, matches docs/protocol.md
- src/{net,crypto,codec,protocol,session,audio,core}: subsystem stubs that
return VC_ERR_NOT_IMPLEMENTED, each pointing to its design doc
- server/ (voicecat-server) and tools/vccli/ link the core
- tests/: CTest smoke test asserting the C ABI contract (behavior, not just build)
- clients/{apple,windows}: M4 placeholders
Onboarding for agents:
- CLAUDE.md: hub — build/test commands, architecture at a glance, doc map, rules
- AGENTS.md: working method (behavior-driven; clean compile is the floor not the goal)
- PROGRESS.md: living tracker — M0 done, M1 task checklist, "where we left off"
Verified: cmake --preset dev && cmake --build --preset dev && ctest --preset dev → green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 21:09:09 +02:00
|
|
|
|
|
|
|
|
|
|
```bash
|
build(cmake): clean up presets, add release/apple presets, cross-platform triplets
Rationalize the preset set to match the project's actual state (past M5):
- Rename dev->skeleton (no-deps stub smoke), m1-dev->dev (default dev preset)
- Drop m2-dev (cache-identical to m1-dev)
- Add release preset (optimized + tests on, symbols kept)
- Strip server-release binaries (-s linker flag)
- Add apple-dev/apple-ios/apple-ios-sim scaffolding presets for XCFramework
Add cmake/voicecat-toolchain.cmake wrapper that auto-resolves the vcpkg
triplet from the host platform (x64-mingw-static/x64-linux/arm64-osx) so
the main presets work on Windows/Linux/macOS without per-OS variants.
Update all docs (building.md, CLAUDE.md, README.md, AGENTS.md, deployment.md,
tech-stack.md, client READMEs) and stale preset-name references in code
comments. No C++ behavior changes — the core was already portable.
2026-06-18 03:16:01 +02:00
|
|
|
|
cmake --preset skeleton
|
|
|
|
|
|
cmake --build --preset skeleton
|
|
|
|
|
|
ctest --preset skeleton
|
scaffold: M0 skeleton + agent onboarding (build, architecture, progress)
Turn the design into a buildable, dependency-free M0 skeleton plus the
onboarding layer so a new agent can pick up instantly.
Build system:
- CMake + CMakePresets (dev = no deps; server-release = vcpkg) + vcpkg.json
- Skeleton builds with just a C++20 compiler; deps stay off until needed
- .gitattributes (LF), .gitignore, .clang-format
Core (libvoicecat):
- core/include/voicecat.h: full C ABI (the client/server contract), stubbed
- core/proto/voicecat.proto: control-plane wire format, matches docs/protocol.md
- src/{net,crypto,codec,protocol,session,audio,core}: subsystem stubs that
return VC_ERR_NOT_IMPLEMENTED, each pointing to its design doc
- server/ (voicecat-server) and tools/vccli/ link the core
- tests/: CTest smoke test asserting the C ABI contract (behavior, not just build)
- clients/{apple,windows}: M4 placeholders
Onboarding for agents:
- CLAUDE.md: hub — build/test commands, architecture at a glance, doc map, rules
- AGENTS.md: working method (behavior-driven; clean compile is the floor not the goal)
- PROGRESS.md: living tracker — M0 done, M1 task checklist, "where we left off"
Verified: cmake --preset dev && cmake --build --preset dev && ctest --preset dev → green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 21:09:09 +02:00
|
|
|
|
```
|
|
|
|
|
|
|
feat(windows): UI overhaul -- toolbar, unified log, PM windows, channel counts, output volume
- Voice actions (Join Voice, Share Screen Audio) moved to a ToolStrip toolbar and
a new Voice menu in the menu bar; removed from the bottom voice panel
- Activity log and chat log collapsed into a single RichTextBox (rtbLog); activity
events appear in gray, chat messages in default color
- Private messaging reworked: each conversation opens in its own modeless
PrivateMessageForm instead of sharing the main chat log via a scope dropdown;
cboScope removed; main compose bar always sends to the current channel
- New "Messages -> New Private Message..." menu item (Ctrl+P) opens a UserPickerDialog
listing all connected server users (not just the current channel) so you can PM
anyone on the server
- Channel tree now shows live user counts, e.g. "General (3)" -- counts sourced from
the existing _users dictionary which already tracks all server users with channel IDs
- Global output volume slider (TrackBar, 0-100, default 80) added to the right panel;
wired to new vc_set_output_volume C ABI function that applies a master gain multiplier
in the audio engine playback callback after mixing all streams
- vc_set_output_volume added end-to-end: voicecat.h, audio_engine.h/.cpp,
client.h/.cpp, voicecat.cpp, NativeMethods.cs, VoiceCatClient.cs
- Documented Windows PowerShell ctest requirement in AGENTS.md and CLAUDE.md:
MinGW binaries exit 0xc0000139 in Git Bash; always run ctest/.exe via PowerShell
22/22 ctest green (PowerShell); dotnet build 0 warnings.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 14:24:54 +02:00
|
|
|
|
> **Windows gotcha — always run `ctest` and built binaries via PowerShell, not Git Bash.**
|
|
|
|
|
|
> MinGW-built executables fail in Git Bash with exit code `0xc0000139`
|
|
|
|
|
|
> (STATUS_ENTRYPOINT_NOT_FOUND) even though the file exists and is marked executable.
|
|
|
|
|
|
> PowerShell runs them correctly. Use the PowerShell tool (not Bash) for any `ctest`,
|
|
|
|
|
|
> `voicecat-server.exe`, or `vccli.exe` invocation on Windows.
|
|
|
|
|
|
|
build(cmake): clean up presets, add release/apple presets, cross-platform triplets
Rationalize the preset set to match the project's actual state (past M5):
- Rename dev->skeleton (no-deps stub smoke), m1-dev->dev (default dev preset)
- Drop m2-dev (cache-identical to m1-dev)
- Add release preset (optimized + tests on, symbols kept)
- Strip server-release binaries (-s linker flag)
- Add apple-dev/apple-ios/apple-ios-sim scaffolding presets for XCFramework
Add cmake/voicecat-toolchain.cmake wrapper that auto-resolves the vcpkg
triplet from the host platform (x64-mingw-static/x64-linux/arm64-osx) so
the main presets work on Windows/Linux/macOS without per-OS variants.
Update all docs (building.md, CLAUDE.md, README.md, AGENTS.md, deployment.md,
tech-stack.md, client READMEs) and stale preset-name references in code
comments. No C++ behavior changes — the core was already portable.
2026-06-18 03:16:01 +02:00
|
|
|
|
Other presets: `release` (optimized + tests), `server-release` (optimized + stripped,
|
|
|
|
|
|
deployment-shaped), `windows-client` (DLL for C# app), `apple-dev`/`apple-ios`/
|
|
|
|
|
|
`apple-ios-sim` (Apple platform scaffolding). See [`docs/building.md`](docs/building.md)
|
|
|
|
|
|
for the full matrix.
|
|
|
|
|
|
|
|
|
|
|
|
`vcpkg.json` pins all deps to a fixed vcpkg baseline — `cmake --preset dev` resolves them
|
|
|
|
|
|
automatically on first configure. The vcpkg triplet is auto-resolved from the host platform
|
2026-07-03 10:42:42 +01:00
|
|
|
|
by [`cmake/voicecat-toolchain.cmake`](cmake/voicecat-toolchain.cmake), which also resolves
|
|
|
|
|
|
`VCPKG_ROOT` (env var override, else the bundled `vcpkg/` submodule).
|
scaffold: M0 skeleton + agent onboarding (build, architecture, progress)
Turn the design into a buildable, dependency-free M0 skeleton plus the
onboarding layer so a new agent can pick up instantly.
Build system:
- CMake + CMakePresets (dev = no deps; server-release = vcpkg) + vcpkg.json
- Skeleton builds with just a C++20 compiler; deps stay off until needed
- .gitattributes (LF), .gitignore, .clang-format
Core (libvoicecat):
- core/include/voicecat.h: full C ABI (the client/server contract), stubbed
- core/proto/voicecat.proto: control-plane wire format, matches docs/protocol.md
- src/{net,crypto,codec,protocol,session,audio,core}: subsystem stubs that
return VC_ERR_NOT_IMPLEMENTED, each pointing to its design doc
- server/ (voicecat-server) and tools/vccli/ link the core
- tests/: CTest smoke test asserting the C ABI contract (behavior, not just build)
- clients/{apple,windows}: M4 placeholders
Onboarding for agents:
- CLAUDE.md: hub — build/test commands, architecture at a glance, doc map, rules
- AGENTS.md: working method (behavior-driven; clean compile is the floor not the goal)
- PROGRESS.md: living tracker — M0 done, M1 task checklist, "where we left off"
Verified: cmake --preset dev && cmake --build --preset dev && ctest --preset dev → green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 21:09:09 +02:00
|
|
|
|
|
|
|
|
|
|
## Where each subsystem lives (and its doc)
|
|
|
|
|
|
|
|
|
|
|
|
| Path | Subsystem | Design |
|
|
|
|
|
|
|------|-----------|--------|
|
|
|
|
|
|
| `core/include/voicecat.h` | The C ABI every client/server calls | docs/architecture.md §4 |
|
|
|
|
|
|
| `core/proto/voicecat.proto` | Control-plane wire format | docs/protocol.md |
|
|
|
|
|
|
| `core/src/net/` | Asio TCP/UDP transport, framing | docs/architecture.md, docs/protocol.md §1 |
|
|
|
|
|
|
| `core/src/crypto/` | TLS 1.3 (mbedTLS), media AEAD (libsodium), anti-replay | docs/security.md |
|
|
|
|
|
|
| `core/src/codec/` | Opus encode/decode, FEC/DTX | docs/voice.md §3–4 |
|
|
|
|
|
|
| `core/src/protocol/` | Envelope (de)serialize, state machine, routing | docs/protocol.md |
|
|
|
|
|
|
| `core/src/session/` | Channels, users, streams, permissions, text | docs/protocol.md §5 |
|
|
|
|
|
|
| `core/src/audio/` | Capture/playback (miniaudio), APM DSP, jitter buffer, mixer | docs/voice.md §8–11 |
|
|
|
|
|
|
| `server/` | Connection mgr, session registry, SFU relay, SQLite | docs/architecture.md §5 |
|
|
|
|
|
|
| `tools/vccli/` | Headless client to drive/verify the protocol | — |
|
|
|
|
|
|
|
|
|
|
|
|
## Suggested first steps (M1 spine)
|
|
|
|
|
|
|
|
|
|
|
|
1. **Wire protobuf + framing** (`net/` + `protocol/`): build, then generate C++ from
|
|
|
|
|
|
`voicecat.proto`, implement the `[u32 length][Envelope]` framing over a plain TCP socket
|
|
|
|
|
|
(TLS can come right after). Test: round-trip an `Envelope` through the framer.
|
|
|
|
|
|
2. **TLS 1.3 via mbedTLS** (`crypto/`): wrap the TCP channel. Test: `vccli` completes a TLS
|
|
|
|
|
|
handshake against `voicecat-server` and exchanges a `ClientHello`/`ServerHello`.
|
|
|
|
|
|
3. **Auth + state** (`session/`): guest + admin-provisioned accounts (Argon2id/SQLite),
|
|
|
|
|
|
channel tree snapshot/deltas, ephemeral text relay. Test: two `vccli` chat.
|
|
|
|
|
|
|
|
|
|
|
|
Then proceed to M2 (UDP media) per the roadmap.
|
|
|
|
|
|
|
|
|
|
|
|
## House rules
|
|
|
|
|
|
|
|
|
|
|
|
- **No GPL/LGPL dependencies, ever** (closed-source redistribution is a goal). See
|
|
|
|
|
|
docs/tech-stack.md §5. CI should fail on a copyleft transitive dep.
|
|
|
|
|
|
- **Encryption is mandatory** — never add a plaintext transport path. docs/security.md.
|
|
|
|
|
|
- **Real-time audio threads** never allocate, lock, or block. docs/architecture.md §3.
|
|
|
|
|
|
- Keep `docs/` and code in sync. If you change a wire format or the C ABI, update the doc in
|
|
|
|
|
|
the same commit.
|
|
|
|
|
|
- The C ABI is the contract for the Swift/C# clients — treat changes to `voicecat.h` and
|
|
|
|
|
|
`voicecat.proto` as deliberate, versioned events (docs/protocol.md §8).
|