Contributing
Where features go
Architectural table for placing new functionality in the Cori codebase, and coding conventions.
Feature placement table
| Feature area | Where it lives |
|---|---|
| New CLI verb or flag | crates/cori-cli/src/commands/ + wire in crates/cori-cli/src/main.rs. The eight verbs are locked — new functionality is flags, not verbs. |
| Manifest schema change | crates/cori-manifest/src/lib.rs + packages/sdk/ for TS types |
| New activity kind | cori-protocol (StepKind enum) → packages/sdk/ (constructor) → cori-compiler/src/step_parser.rs (parser) → cori-broker/ (executor) → cori-worker/src/activities.rs (handler) → workflow dispatch loop |
| Temporal endpoint logic | crates/cori-run/src/temporal_endpoint.rs |
| Step compilation | crates/cori-compiler/ |
| Step-to-queue assignment | crates/cori-run/src/planner.rs |
| Remote-ref resolution | crates/cori-run/src/remote/ (refspec, git, pins, trust) |
| Activity execution (all side effects) | crates/cori-broker/ — the trust boundary |
| Run trace shape | crates/cori-protocol/src/trace.rs (RunTrace, ActivityTrace, CostSummary, TokenUsage, WorkflowSource). Update skills/cori-save-workflow/references/trace_interpretation.md in the same PR. |
| Worker setup / runtime | crates/cori-worker/ |
| Schedule store / cron driver | crates/cori-run/src/schedules.rs + crates/cori-run/src/cron_driver.rs |
| Cori Console IPC commands / events | console/src-tauri/src/commands.rs (Rust) + console/app/lib/api.ts (typed client) |
| Cori Console UI | console/app/routes/, console/app/components/, console/app/styles/ |
| Tauri lifecycle / sidecar / capabilities | console/src-tauri/src/lib.rs, console/src-tauri/tauri.conf.json, console/src-tauri/capabilities/ |
| Agent skill authoring procedure | skills/cori-save-workflow/ |
| Docs | docs/content/docs/ |
The largest known gap
The builtin activity kind (map, for_each, branch, parallel, wait) is accepted by the compiler but short-circuits in the v1 runtime (the trace records a "deferred" notice instead of executing the step body). Cori Console surfaces this with a warning banner on the /run screen so users don't trigger a run that will silently skip.
Adding builtin execution requires:
- Defining the execution semantics in
crates/cori-worker/src/workflow.rs(it's workflow code, not an activity) - Updating
packages/sdk/with the constructor implementations - Adding integration tests in
crates/cori-worker/tests/
Coding conventions
- Edition 2024 Rust. MSRV 1.94.
- No
unwrap()in library code. Use?and proper error types.unwrap()is acceptable in tests. - Broker is the only place with side effects. If new code makes a network call, touches the filesystem, or executes a subprocess, it belongs in
cori-brokeror in a crate thatcori-brokercalls. - TypeScript-only step files. No other language runtimes for step execution.
- No
println!from library crates. Only the CLI prints; library crates return data or usetracing. - Cori Console has no network surface. No HTTP server, no port bind. Frontend ↔ Rust core is Tauri IPC only.

