Skip to content

Select models by tier only and add runtime for-loops to swarm - #379

Merged
neich merged 6 commits into
mainfrom
feat/dsl-update
Nov 16, 2026
Merged

neich merged 6 commits into
mainfrom
feat/dsl-update

Conversation

@neich

@neich neich commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Summary

Moves the DSL, CLI and swarm panel to tier-only model selection: models are chosen by tier, and tiers resolve to models only in model profiles. Also adds runtime for loops, budgets, JSON outputs and cost totals to the swarm pipeline, and teaches the tree-sitter grammar and highlighting the new syntax.

Changes

  • Tier-only model selection (DSL/CLI/TUI)
    • Agents declare a default tier. A workflow tiers {} block and gaviero-cli --tier <agent>=<tier> override it.
    • Model profiles (profiles/<name>.gaviero) are the one place a tier maps to a client/model. --profile <name|path> selects one, and default is used otherwise.
    • Removed gaviero-dsl/src/tiers.rs, the clients.gaviero example and the doc-claude, doc-codex and doc-cursor profiles. Added profiles/default.gaviero.
    • Updated ast, parser, compiler, profile, workflow_params and inspect in gaviero-dsl. Updated CLI flags in gaviero-cli/src/main.rs. Updated the swarm panel (swarm_run.rs, swarm_dashboard.rs, prompt_input.rs).
  • Swarm runtime (gaviero-core)
    • New swarm/runtime_for.rs for runtime for loops.
    • Large changes to swarm/pipeline.rs. Changes to spawn.rs, plan.rs, coordinator.rs, loop_resume.rs, models.rs and backend/runner.rs. Smaller edits in iteration, router, privacy, validation and others.
    • Adds budgets, JSON outputs and cost totals.
    • New tests: swarm_budget, swarm_parallel_dispatch and swarm_runtime_for.
  • Grammar and highlighting
    • Updated tree-sitter-gaviero (grammar.js, corpus tests, lib.rs), queries/gaviero/highlights.scm, the VS Code TextMate grammar and TUI highlight.rs.
    • Regenerated parser.c, grammar.json and node-types.json.
  • Docs and examples
    • Rewrote the examples around profiles and added deep_explore.gaviero.
    • Updated the README, ARCHITECTURE and per-crate CLAUDE.md, README and ARCHITECTURE files.
    • Added tests/fixtures/test-profile.gaviero. Extended the compile, profiles, swarm_contract and loop_resume_contract tests.

Testing

  • git diff --check origin/main...HEAD
  • cargo test was not run (skipped: only runs with --run-tests)

Risks / Notes

  • Breaking change: scripts must now declare an agent tier. Client blocks, client params and tier <alias> <client> lines are gone, so existing scripts need migrating.
  • crates/tree-sitter-gaviero/src/parser.c, grammar.json and node-types.json are generated from grammar.js. Review grammar.js and the corpus tests rather than the generated diff.
  • The change touches a lot of code (about 11.5k lines added), concentrated in swarm/pipeline.rs and the DSL compiler. The test suite has not been run for this PR.

Scripts now name a tier per agent and never declare clients; the model
profile is the single place a tier becomes a model. The CLI replaces
--tiers-file with --tier AGENT=TIER and passes the profile to the
compiler, and the TUI swarm form follows the new API.
Docs and example scripts drop client blocks and tier bindings in favor
of per-agent tiers, and a single default model profile replaces the old
client roster and doc profiles. A new deep_explore example shows the
runtime for and budget features.
Docs and example scripts drop client blocks and tier bindings in favor
of per-agent tiers, and a single default model profile replaces the old
client roster and doc profiles. A new deep_explore example shows the
runtime for and budget features.
The swarm runtime gains runtime for expansion, parallel dispatch, budget
enforcement and produces-json validation, and retries now report the
summed cost of every attempt. The coordinator prompt teaches tiers,
produces and timeout, and the new WorkUnit field is carried through
every constructor.
The swarm runtime gains runtime for expansion, parallel dispatch, budget
enforcement and produces-json validation, and retries now report the
summed cost of every attempt. The coordinator prompt teaches tiers,
produces and timeout, and the new WorkUnit field is carried through
every constructor.
The grammar is updated and its generated parser and node types are
regenerated from grammar.js, with matching highlight queries, VS Code
syntax and corpus tests. The editor highlight and prompt input code
follow the new syntax.
@neich
neich merged commit 9277ffa into main Nov 16, 2026
3 of 4 checks passed
@neich
neich deleted the feat/dsl-update branch November 16, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant