An agent orchestrator that ships as one statically-linked binary with no runtime dependencies. Most of its structure is enforced by convention rather than by the compiler: go build accepts every layering violation listed below.
Read the Makefile to discover available targets before running any Go toolchain command directly.
- Go resolves through the asdf shim at
~/.asdf/shims/go. OverridingGOPATH,GOMODCACHEor the binary path breaks the pinned toolchain;GOFLAGSis not such an override and is allowed. - Symphony is prior art, not a template. Sortie derives from OpenAI Symphony but diverges intentionally. Do not port Symphony patterns or Elixir idioms.
- Generic naming in core code. Use
agent_*,tracker_*,session_*in orchestrator core. Neverjira_*,claude_*,codex_*outside their adapter packages. - Orchestrator and
cmd/sortiereach adapters viainternal/registry. Direct imports ofinternal/tracker/<kind>orinternal/agent/<kind>from these layers are layering violations even thoughgo buildaccepts them. internal/scm/is an adapter family. Apply the same boundary rules asinternal/tracker/*/: no cross-adapter imports, no orchestrator imports, normalize external responses to domain types at the boundary. The coder agent's layer constraints enumerate trackers and agents but omit SCM — treat that gap as a drafting bug, not permission.- Shared adapter helpers go in an
internal/package named for the concern it serves, never duplicated per adapter and never ininternal/domain/. Logic scoped to one adapter family nests under that family instead. - Integration tests are env-gated by a per-adapter
SORTIE_<ADAPTER>_TEST=1. Without the gate set they must skip cleanly — never fail. workflow.Manager.Reload()is fail-safe. On parse or validation error the previouscurrentConfigandcurrentPromptare retained andLastLoadError()reports the failure. Preserve that invariant; neveros.Exiton a bad WORKFLOW.md.- Prompt templates render with
Option("missingkey=error"). Adding a template variable without wiring its data field is a runtime error, not an empty string.
- Read the architecture section your task touches before implementing. Drift from the spec is a bug.
- Implement adapter integrations as new packages behind the existing Go interface — additive only.
- Any change to
docs/decisions/*.md. - Adding a dependency beyond what the architecture specifies.
- Discard, revert, reset, stash, or reformat uncommitted changes outside your current task's file set - the working tree may hold the user's or a parallel agent's work (see the working-agreement rule).
- Use CGo or any library requiring a C toolchain. It breaks the single-binary deployment model.
- Put integration-specific logic (Jira field names, Claude Code CLI flags) in orchestrator core packages.
- Weaken workspace path containment, workspace-key sanitization, or cwd validation before agent launch. These are security boundaries.
- Reference
docs/architecture.md,docs/decisions/*.md, section numbers, ADR numbers, or ticket IDs in any comment, godoc or inline. Those belong in specs and plans. - Downgrade the
godirective ingo.mod, or add or modifytoolchaindirectives, unless explicitly asked.
Consult these for the area you are working on, not as a blanket prerequisite:
docs/architecture.md- the index. A system-at-a-glance plus a routing table mapping each task to the one section it needs. It is a map, not a second source of truth.docs/architecture/NN-<slug>.md- the specification, one file per section. Open only the section the index routes you to; on conflict the section file wins.docs/decisions/*.md- accepted ADRs. Read when discussing or revising a prior design choice.docs/workflow-reference.md- WORKFLOW.md syntax.docs/*-adapter-notes.md- API details, response examples and implementation tips per integration.