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>
This commit is contained in:
2026-06-15 21:09:09 +02:00
parent 268d511f79
commit b332b0972b
38 changed files with 1907 additions and 0 deletions

88
PROGRESS.md Normal file
View File

@@ -0,0 +1,88 @@
# PROGRESS — VoiceCat
Living status. **Update this file in the same commit as your work** so the next agent picks
up instantly. Newest status at the top.
- **Date convention:** ISO (YYYY-MM-DD).
- Statuses: `[ ]` not started · `[~]` in progress · `[x]` done.
---
## ▶ Where we left off / next action
- **Done:** design docs (`docs/`) + **M0 skeleton** — repo builds, links, and passes the
smoke test with no third-party deps.
- **Next:** start **M1 — control plane**. First concrete task: implement protobuf + the
`[u32 length][Envelope]` frame codec in `core/src/protocol/` and round-trip an `Envelope`
in a test (see M1 checklist below and [`AGENTS.md`](AGENTS.md) "Suggested first steps").
---
## Milestones (see [docs/roadmap.md](docs/roadmap.md) for full detail)
- [x] **M0 — Scaffolding** ✓ complete
- [~] **M1 — Control plane** (TCP/TLS, auth, channels, ephemeral text) ← current
- [ ] **M2 — Voice, single stream** (UDP, Opus, jitter buffer, APM send-side, VAD/PTT)
- [ ] **M3 — Multi-stream & per-channel tuning** (screen audio, listener-side per-user NR)
- [ ] **M4 — Native clients** (Windows C#, macOS/iOS Swift)
- [ ] **M5 — Moderation, polish, beyond** (perms, bans, DRED; then file transfer, E2EE, …)
---
## M0 — Scaffolding ✓ (completed)
- [x] Repo layout (`core/ server/ tools/ clients/ tests/`), CMake + presets, vcpkg manifest.
- [x] C ABI header `core/include/voicecat.h` (full surface, stubbed).
- [x] Protocol source-of-truth `core/proto/voicecat.proto` (matches docs/protocol.md).
- [x] Core stubs for all six subsystems (net/crypto/codec/protocol/session/audio) + `vc_client`.
- [x] `voicecat-server` (arg parsing, config, stub run) and `vccli` (drives the C ABI).
- [x] CTest **smoke test** asserting the C ABI contract (not just "it compiles").
- [x] `.gitattributes` (LF), `.gitignore`, `.clang-format`, onboarding docs.
- **Verified:** `cmake --preset dev && cmake --build --preset dev && ctest --preset dev` → green.
---
## M1 — Control plane (current)
**Exit criterion (definition of done):** two `vccli` instances connect to a real
`voicecat-server` over **TLS 1.3**, authenticate (guest + admin-provisioned account), browse
the channel tree, and exchange channel + private text messages. Encode this as an integration
test driving two clients.
Tasks (rough order — see [docs/protocol.md](docs/protocol.md), [docs/security.md](docs/security.md)):
- [ ] Turn on vcpkg deps; set a real `builtin-baseline` in `vcpkg.json`; wire `find_package`
for protobuf in `core/CMakeLists.txt` and `protobuf_generate` for `voicecat.proto`.
- [ ] `protocol/`: implement the `[u32 length][Envelope]` `FrameCodec` (+ oversized-frame
guard). **Test:** round-trip an `Envelope` through feed/emit.
- [ ] `net/`: plain TCP connect/accept via Asio; then wrap with **TLS 1.3 (mbedTLS)** in
`crypto/`. **Test:** `vccli``voicecat-server` complete a TLS handshake.
- [ ] Handshake: `ClientHello`/`ServerHello` with version + feature negotiation.
- [ ] Server identity: generate/persist Ed25519 key + self-signed cert on first run; expose
fingerprint; client TOFU pin. (docs/security.md §1)
- [ ] Auth: `AuthRequest``AuthResult`; guest path + Argon2id password verify (libsodium);
SQLite accounts; `voicecat-admin` account add/reset/del/list. (docs/security.md §4)
- [ ] Session model: channel tree snapshot (`ServerStateSnapshot`) + `ChannelEvent`/`UserEvent`
deltas; join/leave; create/edit/delete (permission-gated).
- [ ] Text: ephemeral relay of channel + private messages with acks (no history). (protocol.md §5)
- [ ] Wire the C ABI: `vc_connect/authenticate_*/join_channel/send_text` drive the above and
emit `vc_event`s; `vccli` exercises them.
- [ ] **Integration test:** two `vccli` chat through the server over TLS. ← M1 exit.
---
## Decisions log
All architecture/scope decisions are settled and recorded in
[docs/roadmap.md §2 "Resolved decisions"](docs/roadmap.md) and reflected across `docs/`.
If you make a *new* decision, record it there and link it here.
---
## How to update this file
1. Check off tasks as you complete them; flip a milestone to `[x]` only when its **exit
criterion test** passes.
2. Keep the **"Where we left off / next action"** block at the top accurate — it's the first
thing the next agent reads.
3. When you start a milestone, copy its task list from `docs/roadmap.md` into a section here.