agentleFS
sortie-aisortie-ai/sortie/AGENTS.md

sortie

AGENTS.md232 starsChanged 2 months agoApache-2.0View on GitHub

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. make help lists the build, test, and lint targets; they carry the flags CI uses, so prefer one when it fits. Calling the Go toolchain directly is fine when no target does what you need.

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 33,398 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository2 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Generic naming in core code: Use agent_*, tracker_*, session_* in orchestrator core.

    line 13
  2. Distinctive:

    Read the architecture section your task touches before implementing.

    line 28
  3. Distinctive:

    Use CGo or any library requiring a C toolchain.

    line 40
  4. Distinctive:

    Put integration-specific logic (Jira field names, Claude Code CLI flags) in orchestrator core packages.

    line 41

≈ “Common” is an estimate: at least 1 in 5 of the 43,423 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

sortie

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.

Commands

make help lists the build, test, and lint targets; they carry the flags CI uses, so prefer one when it fits. Calling the Go toolchain directly is fine when no target does what you need.

Gotchas

  • Go resolves through the asdf shim at ~/.asdf/shims/go. Overriding GOPATH, GOMODCACHE or the binary path breaks the pinned toolchain; GOFLAGS is 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. Never jira_*, claude_*, codex_* outside their adapter packages.
  • The orchestrator resolves adapters by kind through internal/registry. Importing a package that registers a kind in its init() is a layering violation there even though go build accepts it; a package alongside it that registers none may be imported directly. cmd/sortie blank-imports every kind package solely to trigger that registration.
  • internal/scm/ is an adapter family. Apply the same boundary rules as internal/tracker/*/: no cross-adapter imports, must not import the orchestrator, normalize external responses to domain types at the boundary.
  • Shared adapter helpers go in an internal/ package named for the concern it serves, never duplicated per adapter and never in internal/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.
  • Tests wait on events, never on a clock. A test stops the code after its readiness or completion signal (for run(), runUntilStarted on the startupDone hook), never by handing it a short deadline, and proves a fast path by its result or under testing/synctest, not by timing it. Every wait goes through internal/waittest: HangGuard is the one hang guard, and a live suite passes its measured bound to the same waits, shortened through waittest.Within so a hung step fails its own test before the binary's -timeout ends every test. No time.Sleep for ordering. A raised timeout or a rerun job does not fix a flake.
  • workflow.Manager.Reload() is fail-safe. On parse or validation error the previous currentConfig and currentPrompt are retained and LastLoadError() reports the failure. Preserve that invariant; never os.Exit on 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.
  • The dashboard draws structure with layout, never with characters. No Unicode arrows, check marks, bullets or box glyphs to connect or mark values (a → b, ✓ done). A middle dot separates only the parts of one metadata line, and only through Parts; anywhere else a column, a second line, a chip or a stepper carries the split. Glyphs come from web/src/components/icons.tsx.
  • The dashboard's build output under internal/server/ui/dist is committed. make ui-build regenerates it from web/; commit it with the sources it was built from, and resolve a conflict in it by rebuilding, never by hand.

Boundaries

Always

  • 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. When a shared mechanism lacks what the adapter needs, extend it with an optional hook (for a per-turn kind, an agentcore.ForkPerTurnHooks field) instead of copying it.
  • Keep documentation true in the same change. Whenever a spec, plan or code change alters the API or behavior (a feature, a fix, a refactor that changes a contract), find every document it makes wrong (architecture sections, docs/workflow-reference.md, adapter notes, guides, env and config references, event and API schemas, CHANGELOG.md) and update it in that change. A task that never mentions docs, or names only some of them, does not exempt the rest. Accepted ADRs in docs/decisions/*.md keep their Ask-first protection: report them as stale instead of editing them.

Ask first

  • Any change to docs/decisions/*.md.
  • Adding a dependency beyond what the architecture specifies.

Never

  • 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 go directive in go.mod, or add or modify toolchain directives, unless explicitly asked.

Reference docs

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; NN is a file ordinal, not the section number (file 14 holds section 11C). 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.
  • RELEASING.md - the ordered checklist for cutting a release.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.