tessary
AGENTS.md20 starsChanged 2 months agoApache-2.0View on GitHub
An agent-reliability platform: ingest every trace, filter it with cheap classifiers, group the survivors into cases, and explain a case with an agentic root-cause run grounded in the customer's own repository. The .tessary/ pipeline bundle authored by the evals plugin (a Claude Code plugin in a separate repo) is an INPUT — it names call sites, failure modes and intent, and Layer-2 triage rules against it. Nothing in this tree synthesises, runs or scores a grader: this repo has no…
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 31,542 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 repository7 other files it gives its agents.
- backend/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- frontend/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- groundedness-setupSkill
- instrumentSkill
- setupSkill
The file
We split this AGENTS.md into the rules it gives an agent
10 rules. About 0 are common, 6 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 65
NEVER keep old implementation as fallback: Delete dead code.
- Very specific: line 77
NOT a workspace, so every Dockerfile can build from its own directory.
- Distinctive: line 87
Test first, watch it fail: Run the test red for the right reason, then implement.
- Distinctive: line 90
Every test names the bug it catches: If you can't name one, don't write it.
- Distinctive: line 92
Never weaken a test to get green: no skipping, loosening, or re-baselining.
- Very specific: line 105
Prefer Read/Grep over dumping files through the shell.
- Very specific: line 110
Run the slices your change touches (task check -- rca,metering or task check -- frontend), and the bare task check before merging.
- Distinctive: line 141
One home per fact: Never duplicate a rule across files — restate at most one line and link to the owning doc.
- Very specific: line 153
After moving or renaming a doc, grep -rn for the old path and retarget every link in the same PR.
- Distinctive: line 175
If a choice in the codebase doesn't fit that framing, surface it before implementing.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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.
Files
tessary
An agent-reliability platform: ingest every trace, filter it with cheap classifiers, group the
survivors into cases, and explain a case with an agentic root-cause run grounded in the customer's
own repository. The .tessary/ pipeline bundle authored by the evals plugin (a Claude Code
plugin in a separate repo) is an INPUT — it names call sites, failure modes and intent, and Layer-2
triage rules against it. Nothing in this tree synthesises, runs or scores a grader: this repo has
no graders, datasets, experiments, review queues, or observer. Details:
devdocs/reference/architecture.md.
The product thesis lives in Tessary's internal Agent Reliability document,
not in this repo — see Strategic context at the bottom for the working summary.
devdocs/reference/principles.md carries the standing
engineering constraints, and devdocs/README.md maps the rest of the docs.
Architecture
┌──────────────────────────────┐
│ Caddy (:8000) — reverse proxy │
└──────┬─────────────────┬─────┘
/api/* │ │ /
▼ ▼
┌──────────────────┐ ┌──────────────────┐
│ Spring Boot │ │ Vite dev (:5173) │
│ backend (:8080) │ │ or static build │
│ — JVM + Loom │ │ React + TS │
└────┬─────────────┘ └──────────────────┘
│ reads / writes + groundedness model (serve.py on
▼ your own GPU, outside Docker)
Postgres (pgvector; per-project pipeline, substrate, findings, cases)| Layer | Tech |
| Reverse proxy | Caddy (Caddyfile) — /api/*, /auth/*, /mcp → backend; rest → Vite/static |
| Backend | Spring Boot 4.0.x, Java 25 + Loom virtual threads, an eleven-module Maven reactor (layering in devdocs/modules.md), Postgres via JdbcClient + Liquibase |
| Frontend | React 19, Vite, TypeScript, TanStack Query, react-router-dom 7, Tailwind v4 (token-driven design system) |
| Auth | WorkOS AuthKit (sealed cookie session); per-project bearer tokens / API keys for MCP + headless (devdocs/reference/auth-and-mcp.md) |
Repo map
| Path | What it is |
backend/ | The Java backend — conventions in backend/AGENTS.md, inventory in devdocs/reference/architecture.md, module layering in devdocs/modules.md |
frontend/ | The React app — conventions in frontend/AGENTS.md |
sandbox-runner/ | The launcher that runs every agentic lane (RCA, Layer-2 triage) in a fresh E2B microVM — see its README |
classifiers/ | The Python classifier tree: the groundedness model server (classifiers/groundedness/). Training and research code lives in tessaryai/experiments, not here |
contract/ | Vendored evals-plugin output contract (scripts/sync-evals-contract.sh). Files are verbatim copies; scripts/check-vendored-plugin.sh proves they still match the plugin |
claude-skill/ | Claude Code integration helpers (the MCP skill) |
docs/ | Reference, concepts, guides — start at devdocs/README.md |
scripts/, observability/ | The shared check and deploy scripts; Grafana dashboards |
Before editing under backend/ or frontend/, read that directory's AGENTS.md. Running
the stack locally: devdocs/guides/local-dev.md. Tessary's own
hosted deployment is documented privately and is not part of the public export. Cross-stack recipes (schema
change, new classifier): devdocs/guides/common-tasks.md.
Config keys: devdocs/reference/config-keys.md.
Universal rules
- No comments in code changes unless they explain a non-obvious invariant, a workaround for a specific bug, or behavior that would surprise a reader. Well-named identifiers are the documentation.
- NEVER keep old implementation as fallback. Delete dead code.
- No example files or demo code unless explicitly requested.
- User-visible copy follows
handbook/voice-and-tone.md. Plain words, active voice, no em-dashes, no hedging. Applies to UI strings, errors, Slack, CLI output and docs prose; not to code comments. - The schema is the source of truth. The evals plugin owns the bundle schema; absorb changes
in order:
contract/→ backend records → frontend types → views. The plugin still emits grader and quality-dimension shards this tree has nothing to run;BundleAssemblerroutes them toShard.IGNORErather than rejecting the bundle, and that is deliberate. - Python uses uv, never pip or poetry.
classifiers/owns apyproject.toml+uv.lock; runuv lockafter any dependency change and commit both. - Node packages use pnpm, never npm. Each has its own
pnpm-lock.yaml; they are deliberately NOT a workspace, so every Dockerfile can build from its own directory. Two consequences worth knowing before you touch one: pnpm 11 keeps settings inpnpm-workspace.yamlrather than thepnpmfield inpackage.json(which it ignores silently), and dependency build scripts are blocked unless allowlisted there underallowBuilds. The single exception is the in-sandboxnpm installinsandbox-runner/agent-sandbox/template.ts, which is intentional.
Tests
- Expected values come from the requirement, never from running the code. Derive them from the issue, spec, or a hand calculation before implementing.
- Test first, watch it fail. Run the test red for the right reason, then implement. A bug fix's test goes red again when the fix is reverted; a test on a helper the fix didn't touch doesn't count.
- Every test names the bug it catches. If you can't name one, don't write it. Don't add tests to code you didn't change unless asked.
- Never weaken a test to get green: no skipping, loosening, or re-baselining. If a test looks wrong, or breaks on a pure refactor, stop and ask.
- Delete a test only when it is proven redundant. For unit-testable code, PIT's full mutation matrix shows kept tests kill every mutant it kills, and it is not the only test pinning what PIT can't mutate (literals, tables, tuning constants); for an integration test PIT can't run, per-test coverage shows no branch lost and a read confirms a kept test asserts the same behaviour.
- Report each new test in your summary: the bug it catches and its red output.
- How to write them:
backend/AGENTS.md,frontend/AGENTS.md.
Working loop
- Batch independent tool calls; don't batch dependent find→read chains.
- Prefer
Read/Grepover dumping files through the shell; edit only after reading constraints in this file + the scopedAGENTS.md. - Iterate on
task check -- <slices>; gate on baretask check.
Validation
Run the slices your change touches (task check -- rca,metering or task check -- frontend),
and the bare task check before merging. CI runs the same gate on every pull request that touches
code — .github/workflows/check.yml calls scripts/check.sh, the same manifest task check runs,
so local green means CI green by construction. A prose-only diff is filtered out by that file's
paths-ignore (prose is Mintlify's check to run, not this pipeline's), and a draft PR is skipped
until it is marked ready. secret-scan.yml also runs on every pull request.
Two workflows run on a cron: price-book-refresh.yml daily and codeql.yml weekly
(Mondays 04:00 UTC). Everything else is workflow_dispatch: only.
Nothing is merge-blocking (branch protection is plan-gated on this tier), so a red check still has to
be respected by a human. Docker is required for any backend slice. Full cost model and recount commands:
devdocs/reference/test-suite.md.
Documentation policy
Where a new piece of documentation goes, by kind:
- Imperative rule an agent must follow while editing code under a directory → that
directory's
AGENTS.md(backend/,frontend/); this root file only for rules that apply repo-wide. - Lookup / reference material (tables, inventories, schemas, topology) →
devdocs/reference/. - Step-by-step runbook or cross-stack recipe →
devdocs/guides/. - Why-explanations of a subsystem →
devdocs/concepts/. - Durable engineering constraint →
devdocs/reference/principles.md. Product thesis, positioning, and market framing do NOT live in this repo — they live in Notion, and a PR that adds a strategy doc here is adding a second source of truth that will go stale. - Deferred or planned work → the roadmap, which is maintained privately and is not part of the public export.
Rules that keep this working:
- One home per fact. Never duplicate a rule across files — restate at most one line and link to the owning doc.
- Same-PR co-update. A code change that invalidates any of these docs updates the doc in
the same PR (schema changes update
devdocs/reference/data-model.md; package-set changes update the architecture inventory; controller/DTO changes regenerate the OpenAPI spec). The classifier-quality reference page isdevdocs/reference/classifier-quality.md; its gatescripts/check-classifier-quality-doc.shpins the page's model revision and threshold toclassifiers/groundedness/serve.pyand the catalog. - Size budgets. This file stays ≤ ~150 lines; a scoped
AGENTS.md≤ ~250. When a budget is blown, extract reference material todevdocs/reference/instead of growing the guide. - New top-level code directory → gets a
README.md; add anAGENTS.mdonly once it accrues agent-imperative conventions (thefrontend/precedent). - After moving or renaming a doc,
grep -rnfor the old path and retarget every link in the same PR.
Strategic context
Enough to make a design call without leaving the repo; the full thesis is Tessary's internal Agent Reliability document, which is authoritative and the only place it is maintained.
We watch every production trace — not a sample, because once an agent is mature every failure is a low-percentage failure and sampling structurally cannot find them. A cascade of cheap classifiers filters the potentially-bad ones, which are grouped into failure modes and root-caused against the customer's repo. We sell the cause, not the chart.
The moat is that cheap filter, which yields two rules for code in this repo:
- Anything that scales per-event LLM cost with ingest volume attacks the product directly.
LLM work is the escalation, applied to what a cheap filter already flagged — never the
default detection path. (There are two recorded exceptions,
frustrationand an extension classifier's per-match call; their conditions are indevdocs/reference/principles.md.) - An unmeasured detector is a liability, not a feature. A filter's false-positive rate at a stated alert budget is the asset.
If a choice in the codebase doesn't fit that framing, surface it before implementing.
devdocs/reference/principles.md § Product & positioning now
carries only the engineering constraints that fall out of this framing; the framing itself is
maintained in Notion and summarised above.
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
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.

