Development
This page is for contributors to Iterion itself. The repository's reproducible toolchain is the supported path; CI and bot verification use the same task entry points.
Toolchain
Install Devbox. The checked-in devbox.json currently provides Go 1.26, Node 24, Go Task, golangci-lint, Helm, kubectl/kind, desktop build libraries, and supporting tools.
devbox shell
# or run one command without entering a shell:
devbox run -- task checkOptional direnv integration activates the environment on entry:
eval "$(direnv hook bash)" # use the equivalent hook for your shell
direnv allowThe repository also ships .devcontainer/ for VS Code/Codespaces. Task automatically reads a root .env when present; it is gitignored and intended for local credential/config overrides.
Build and checks
task build # build studio, sync embedded dispatcher bots, then ./iterion
task lint # gofmt + go vet + golangci-lint
task test # all Go unit tests
task test:e2e # deterministic/stub E2E suite
task test:goldens # recorded bot-schema/invariant replays; no credentials
task studio:check # ESLint + TypeScript + Vitest
task check # lint + unit + goldens + studio:checkUseful narrower gates:
task test:race
task test:bundle
task test:live:compile # compile every -tags=live test without running/cost
task openapi:check # regenerate OpenAPI + studio types, fail on diff
task sdk:ts:check # TypeScript SDK build/typecheck/tests
task desktop:test
task chart:linttask test:live and the narrower test:live:* tasks call real backends and require the credentials named in each task description. test:goldens:record also calls a real LLM and rewrites fixtures; ordinary verification should use test:goldens.
The direct Go commands work when generated assets are already materialised:
go build -mod=vendor -o iterion ./cmd/iterion
go test ./...Prefer task build after editing studio assets or any of the nine embedded dispatcher bots because it runs studio:build and templates:dispatch-bots first.
Frontend and local services
task studio:dev # backend + Vite HMR
task studio:dev:backend
task studio:dev:frontend
task cloud:up # local Mongo/NATS/MinIO/server stack
task cloud:logs
task cloud:down # also removes compose volumesDesktop, chart, image, and cross-platform packaging tasks are listed by task --list-all; use their dedicated runbooks before releasing: desktop build, desktop release, and cloud deployment.
Repository structure
iterion/
├── cmd/
│ ├── iterion/ # Cobra entrypoint
│ └── iterion-desktop/ # Wails desktop wrapper
├── pkg/
│ ├── cli/ # public CLI command implementations/templates
│ ├── dsl/ # lexer/parser, AST, expressions, IR/compiler, unparser
│ ├── runtime/ # graph engine, routing, loops, budgets, recovery, worktrees
│ ├── backend/ # model/delegated executors, MCP, tools, cost, secret guard
│ ├── bundle/ # .botz loading; bundlelint holds C200–C234 checks
│ ├── sandbox/ # Docker/Podman/Kubernetes isolation and egress controls
│ ├── store/ # local and cloud persistence abstractions
│ ├── server/ + runview/ # studio/run/cloud HTTP and streaming surfaces
│ ├── dispatcher/ # tracker polling, leases, hooks, issue-to-bot dispatch
│ ├── schedule-related # cloudsched, schedgate, trigger
│ ├── cloud-related # queue, runner, auth, identity, orgusage, forge, webhooks
│ └── extensions/state # plugin, skilllib, memory, secrets, marketplace, supervise
├── studio/ # React/Vite/TypeScript UI
├── bots/ # maintained bot catalogue (main.bot + manifest/resources)
├── examples/ # focused DSL/integration demonstrations
├── e2e/ # deterministic and build-tagged live E2E tests
├── sdks/typescript/ # @iterion/sdk CLI wrapper
├── charts/iterion/ # Helm chart and tests
├── docker/ + sandbox/ # container images/helpers and sandbox fixtures
├── docs/ # living guides plus explicitly dated records
├── scripts/ + tooling/ # generation, release, and verification helpers
├── internal/httpx/ # module-private HTTP utility
├── third_party/ # checked-in third-party source/assets
└── vendor/ # vendored Go modules, including claw-code-goThe labels schedule-related, cloud-related, and extensions/state above are conceptual groupings, not literal directories; inspect pkg/ for the individual packages. This keeps the map useful as packages evolve.
Key contracts
- DSL syntax lives in
pkg/dsl/parser; compilation/semantic validation lives in the split files underpkg/dsl/ir. Diagnostics use sparse DSL ranges C001–C199 and async C240–C242; bundle checks use C200–C234. pkg/serverregisters the HTTP route table that generatesopenapi.json;task openapi:checkguards the committed spec and studio types.bots/is the editable full catalogue.pkg/cli/templates/dispatch_bots/is generated for the embedded zero-config subset; do not hand-maintain the copies.- Studio's production build is copied into
pkg/server/staticand embedded into the Go binary. - The module vendors
claw-code-gofor in-process multi-provider execution. Keepgo.mod,go.sum, andvendor/consistent.
Before opening a change, run the smallest relevant gates and finish with devbox run -- task check when practical. Changes to OpenAPI, the SDK, Helm, desktop, or live-test declarations also need their domain-specific checks above.
