Cori
Contributing

Where features go

Architectural table for placing new functionality in the Cori codebase, and coding conventions.

Feature placement table

Feature areaWhere it lives
New CLI verb or flagcrates/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 changecrates/cori-manifest/src/lib.rs + packages/sdk/ for TS types
New activity kindcori-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 logiccrates/cori-run/src/temporal_endpoint.rs
Step compilationcrates/cori-compiler/
Step-to-queue assignmentcrates/cori-run/src/planner.rs
Remote-ref resolutioncrates/cori-run/src/remote/ (refspec, git, pins, trust)
Activity execution (all side effects)crates/cori-broker/ — the trust boundary
Run trace shapecrates/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 / runtimecrates/cori-worker/
Schedule store / cron drivercrates/cori-run/src/schedules.rs + crates/cori-run/src/cron_driver.rs
Cori Console IPC commands / eventsconsole/src-tauri/src/commands.rs (Rust) + console/app/lib/api.ts (typed client)
Cori Console UIconsole/app/routes/, console/app/components/, console/app/styles/
Tauri lifecycle / sidecar / capabilitiesconsole/src-tauri/src/lib.rs, console/src-tauri/tauri.conf.json, console/src-tauri/capabilities/
Agent skill authoring procedureskills/cori-save-workflow/
Docsdocs/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:

  1. Defining the execution semantics in crates/cori-worker/src/workflow.rs (it's workflow code, not an activity)
  2. Updating packages/sdk/ with the constructor implementations
  3. 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-broker or in a crate that cori-broker calls.
  • 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 use tracing.
  • Cori Console has no network surface. No HTTP server, no port bind. Frontend ↔ Rust core is Tauri IPC only.

On this page