Skip to content

[DSP-7] Patterns & Telemetry: orchestrator/synthesizer, task chains, review-fix termination, anonymous telemetry from devswarm #60

@justrach

Description

@justrach

Child of #53. Source: justrach/devswarm.

This child is the glue — the patterns DSP-1 needs and the observability surface that makes swarm runs debuggable.

Patterns to port

1. Orchestrator → Workers → Synthesizer

2. Task chain presets

Four chains, configurable, runnable via run_task:

  • finder_fixer — locate → fix
  • reviewer_fixer — verify → correct
  • explore_report — investigate → structured summary
  • architect_build — design → implement

3. Review-fix loop termination

  • Reviewer returns NO_ISSUES_FOUND → terminate.
  • Iteration count hits max_iter (default 5) → terminate with BAILED.

4. Role + mode routing config

  • .codegraff/swarm.toml with [roles.<role>] model = ... and [modes.<mode>] strategy = ....
  • Per-call override via SDK / TUI command flags.

Telemetry (port from devswarm, opt-out by default? decide here)

DevSwarm collects (anonymous):

  • Agent roles invoked
  • Model names used
  • Token counts (in/out per worker)
  • Execution time, estimated cost
  • Worker parallelism metrics

DevSwarm explicitly never collects:

  • Code, diffs, file contents
  • Prompts, task descriptions, outputs
  • Repo names, file paths, branches
  • PII

Opt-out: enabled = false in .devswarm/config.toml or DEVSWARM_TELEMETRY=false.

Open question for this issue: mirror this telemetry shape in codegraff, or fold it into the existing forge_tracker crate? Decide before implementation lands.

Acceptance criteria

  • Task chain presets land as configurable structures, not hard-coded in code paths.
  • Review-fix loop has both termination conditions tested.
  • Telemetry decision recorded in this issue (forge_tracker vs new) and implemented.
  • Adversarial benchmark verification — when the orchestrator reports per-worker metrics, they're independently verifiable, not LLM-self-reported (devswarm #330 was the lesson; codegraff's own Interactive multi-turn test harness for agents #20 multi-turn harness is adjacent).

Related codegraff issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: featureBrand new functionality, features, pages, workflows, endpoints, etc.work: complexThe situation is complex, emergent practices used.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions