Development
Instructions for coding agents working on the repository are in AGENTS.md.
Dev commands
Section titled “Dev commands”One command, from any shell (it enters nix develop by itself):
./dev demo # start the daemon, run a few echo threads, stop it./dev # qccd in the foreground, data in ./.dev./dev qcc thread spawn --provider echo --prompt 'hello' --follow # the CLI against this daemon./dev qcc thread spawn --provider claude-code --permission-mode ask --prompt 'what is in this directory?' --follow./dev qcc thread send <thread-id> 'and one more thing' --steer./dev desktop # the desktop app (nix develop .#desktop)./dev check # fmt, clippy -D warnings, all tests./dev clean # delete ./.devEvery ./dev command that builds the project also restarts the dev daemon if it was left over
from a previous build: otherwise the app and the CLI would be talking to old code. If agents are
working in it, the script lists them and asks (without a terminal it only warns and leaves the
daemon alone).
Inside nix develop the same is available as make run|demo|check|test|clean.
Every qcc command has --json. Outside ./dev the data lives in ~/.local/share/qcc
(QCC_DATA_DIR), and the socket is $XDG_RUNTIME_DIR/qcc/qccd.sock (QCC_SOCKET).
How ./dev desktop differs from ./dev app is described in
Desktop app.
Architecture
Section titled “Architecture”wit/plugin.wit plugin contract (qcc:plugin@0.7.0)crates/qcc-domain types without IO: the delta grammar and the canonical timelinecrates/qcc-runtime delta assembler, thread state machine, recovery after restartcrates/qcc-store SQLite: event journal and projectionscrates/qcc-plugin-host wasmtime, permissions, plugin actorcrates/qcc-plugin-sdk guest side of the contractcrates/qcc-plugin-testkit runs a plugin without the daemon: conformance of bridges against recordings, and a bench for other pluginscrates/qcc-plugins-bundle builds plugins/ into wasm components when the daemon is builtcrates/qcc-protocol daemon API (JSON-RPC over a unix socket)crates/qcc-client Rust client of the APIcrates/qcc-daemon qccdcrates/qcc-cli qccapps/desktop control panel: src-tauri (proxy to qccd) + Reactplugins/provider-echo example providerplugins/provider-claude-code, provider-acp, provider-codex bridges to real agentsplugins/env-git-worktree environment: a git worktree per threadplugins/orchestration skill for agents, handoff and review commandsplugins/notify desktop notifications when an agent finishes, fails or asksplugins/reviewers reviewer agents that look at a thread's changes and commentplugins/gitlab merge requests of a thread's branch, beside the threadThe main rule: the bridge knows the dialect, the core knows the timeline. A provider plugin
translates the agent's output into a narrow set of deltas; the ids, order and lifecycle of turns
and items belong to the assembler in qcc-runtime. The core never branches on a provider id, and
built-in plugins take the same path as third-party ones.
No host import blocks, so work that waits for a process answers later: handle returns
deferred(token), and the result arrives through completions.complete. This is how
env-git-worktree is built: each operation is a state machine over finished git commands
(src/jobs.rs, tested without wasm).
Bridges and recorded traffic
Section titled “Bridges and recorded traffic”Agent protocol formats are not written from memory: plugins/provider-*/fixtures/*.ndjson holds
traffic recorded from the installed CLIs, and next to it is *.timeline.jsonl, the timeline it must
assemble into. The tests plugins/provider-*/tests/conformance.rs replay the recording in place of
the agent process, through the real wasm host and assembler.
When an agent has been updated and its behavior changed:
# record the scenario again (the scripts run the real CLI)python3 scripts/fixtures/record-claude.py RAW.ndjson allow '[{"send": …}, {"wait": "result"}]'python3 scripts/fixtures/record-jsonrpc.py RAW.ndjson '[…]' -- opencode acp# remove paths, credentials and anything extra; the script checks that nothing personal is leftpython3 scripts/fixtures/redact.py claude RAW.ndjson plugins/provider-claude-code/fixtures/NAME.ndjson --work "$PWD"# rewrite the golden timelines and look at the diffQCC_UPDATE_GOLDEN=1 cargo test -p provider-claude-code --test conformanceThe website
Section titled “The website”qcc.quantick.dev is built from this repository: site/ is an
Astro Starlight project, and its pages are the files of docs/.
They are not copied: site/src/content/docs is a link to docs/, and site/src/lib/docs.mjs
takes each page's title from its # heading, its description from the first paragraph, and turns
links between the files (agents.md#permission-mode) into links between pages. A link to a file
outside docs/ goes to the file on GitHub. So write docs/ for GitHub as before, without
frontmatter; a new page also needs its place in the sidebar, in site/astro.config.mjs.
docs/README.md is GitHub's index of the folder and is not a page; the landing page is
site/src/pages/index.astro. docs/cli.md is generated from the CLI's definitions (see the top
of the file); a test fails while it is out of date.
./dev site # dev server with hot reload at http://localhost:4321 (nix develop .#site)./dev site build # the site in site/dist, as CI builds it./dev site preview # serve site/distThe build fails on a link to a page or a heading that does not exist (starlight-links-validator).
Search is Pagefind's index, made by the build, so it works in build + preview, not in dev.
.github/workflows/site.yml builds the site on pull requests and pushes to main that touch
docs/, site/ or the workflow, and publishes main to GitHub Pages. site/public/CNAME holds
the domain.