- Design review — current proposal, open questions, and comment sections for Claude/Gemini/human reviewers.
uv sync --dev
uv run pytest
uv run tandem validate --config tandem.yamltandem.yaml currently contains the example task profiles and relay pipeline.
The text-relay pipeline is a read-only smoke-test pipeline; review-relay
is the workspace-writing example.
coding-review is a workspace-capable Claude profile with MCP disabled for
deterministic repository review.
Run a single profile without a relay:
MOST_COMMAND='uv run --directory ../most python -m most' \
uv run tandem task review "Summarize the current Tandem design."For reusable configuration, Tandem also supports two layers:
- user defaults:
~/.config/tandem/task-profiles.yamland~/.config/tandem/pipeline.yaml; - repository overrides:
./tandem/task-profiles.yamland./tandem/pipeline.yaml.
Repository entries with the same name replace the complete user entry. An
explicit --config file takes precedence over layered loading.
To run the example against the sibling MOST checkout:
MOST_COMMAND='uv run python -m most' \
uv run tandem run-pipeline review-relay \
--workspace ./ \
"Review the Tandem design and propose the next safe implementation step."The pipeline performs live alias/MCP/policy preflight before the first model call. The writable example uses Claude through e-INFRA and therefore requires the corresponding MOST credential to be configured.
Writable stages currently support Claude, Codex, Gemini, and OpenCode CLI
providers. Gemini uses its yolo approval mode and OpenCode uses run --auto;
both remain explicit opt-in through a writable pipeline stage.
To run only the live preflight (no credentials or model call):
MOST_COMMAND='uv run --directory ../most python -m most' \
uv run tandem preflight review-relayUse tandem preflight review-relay --json for machine-readable pipeline and
stage policy metadata.
tandem task PROFILE PROMPT --json returns the task operation ID together
with the profile and result content.
Use tandem history PIPELINE_ID --json to inspect journaled stage outputs and
lineage without starting a model call.
Tandem requests history through MOST's history --pipeline-id ... --json
command; it does not read MOST journal files directly.
For a read-only council, set topology: parallel on a pipeline. All stages
in a round receive the same prior context and the next round receives their
role-labelled results. Parallel pipelines reject write: true stages.
Enable explicit council scoring with:
council:
quorum: 2
approval_score: 70Each read-only council stage may emit exact markers TANDEM_VOTE: approve
or TANDEM_VOTE: reject and TANDEM_SCORE: 0..100. A quorum of approvals
with the configured average score produces approved; a quorum of rejects
produces blocked. The structured result and telemetry include the vote
counts and score, without exposing additional model data.
When a council has votes but does not meet either terminal condition, its
decision is needs_revision; the next configured round receives the prior
round's role-labelled output. Council JSON also includes score history and
the round-to-round score delta. If synthesis is configured, it receives this
final council decision and history in its structured envelope.
Set termination: approved to allow an early stop at a completed round. The
configured final stage must emit an exact line TANDEM_STATUS: approved;
without it, Tandem runs the configured maximum number of rounds. The default
is termination: fixed.
For richer bounded decisions, use termination: decision. The final stage of
each round may emit TANDEM_STATUS: approved, TANDEM_STATUS: blocked, or
TANDEM_STATUS: needs_revision. The first two stop the pipeline; the latter
continues to the next round.
With context_mode: compact, long prior outputs keep their beginning and end
with an explicit omission marker. Workspace diffs remain separate and are
forwarded in full.
Set session_mode: shared to reuse the MOST journal session from one
sequential stage in the next. The default isolated mode creates one MOST
session per stage. Shared mode is rejected for parallel pipelines. Claude CLI
stages additionally resume the matching Claude conversation; other provider
routes retain journal continuity only.
Set output_mode: round to return all role-labelled outputs from the final
completed round. The default output_mode: last returns only the final stage.
Add a synthesizer after a council with:
synthesis:
profile: review
role: synthesizerThe synthesizer is one bounded, read-only stage and becomes the final result.
Without synthesis, no extra model call is made.
When termination_reason is blocked, run-pipeline returns exit code 2
and JSON includes "ok": false; approval and fixed completion return 0.
Pass --checkpoint-file PATH to persist the last successful stage's recovery
metadata atomically. It contains no stage content or diff; use the recorded
pipeline/stage with --resume-from after inspecting the workspace. Checkpoint
files must be kept outside the workspace.
Use --resume-checkpoint PATH to load that metadata and continue from the
recorded stage automatically. An interrupted run remains resumable; a
successfully completed run is marked complete. The checkpoint is updated in
place unless a different --checkpoint-file is supplied.
Pass --events-file PATH to append redacted JSONL progress events. Events
contain stage metadata and timing only; model content and workspace diffs are
never written to the telemetry file.
Verify an event file after a run with tandem verify-events PATH --json.
Use tandem events-summary PATH --json for a verified, content-free
duration/retry/failure/cost report.
Use tandem events-prune PATH --keep N for explicit retention rotation; the
retained records receive a new verified self-contained hash chain.
When MOST returns token usage and the catalog contains numeric prices, stage
JSON and telemetry also include an estimated cost; missing pricing remains
explicitly unpriced rather than guessed.
tandem validate --json returns the validated profile and pipeline names.
JSON command errors use the same machine-readable shape: {"ok": false, "error": "..."}.
Retries are bounded to transient failures only. A failed run can be branched from a journaled stage without deleting the original history:
uv run tandem run-pipeline review-relay \
--rewind-from PIPELINE_ID:STAGE_INDEX \
--workspace ./ "Continue with the revised task."Use --resume-from PIPELINE_ID:STAGE_INDEX when the intent is to continue a
failed run; it creates the same append-only branch while making the intent
explicit. --rewind-from remains the equivalent branching form.
For integrations, add --json to receive the pipeline ID, stage operation
IDs, retry counts, workspace snapshots, and final content as one JSON object.
For rewound runs it also includes the source pipeline, stage, and operation ID.
Every stage has a stable operation ID reused by its bounded retries. MOST records it in the journal and forwards it to configured MCP servers, allowing those servers to deduplicate side effects when they support idempotency.
Stage execution uses MOST's structured --json output contract; Tandem does
not scrape human-readable assistant/session framing. Pipeline JSON results
also expose each MOST session_id; v1 records one provider session per stage
and does not reuse conversation sessions across stages.
Release acceptance is tracked in ACCEPTANCE_CHECKLIST.md.