AGENTS.md

September 20, 2026 · View on GitHub

House rules for agents working in this repo.

evaluate is a Go MCP stdio server that forwards typed questions to TypeSafe Jev. One static binary. README.md is user-facing.

Read this before your first action in a session. It overrides your defaults.

Main purpose: let agents outsource narrow validation and judgment to Jev instead of burning additional reasoning/context tokens on questions Jev can answer cheaply and directly. The server stays a thin direct Jev connection for any AI agent — setup concerns never leak into the runtime environment the agent-launched MCP server receives.

Pack layout (field-notes style, MCP identity preserved):

PathWhat it is
AGENTS.mdThis file — house rules
ANTIPATTERNS.mdWhat breaks → why → principle
agents/Verification, orchestration, skills/routines, prompts, named skills
roster/Lean paste-ready roles
playbooks/Engineering and Jev-host workflows
docs/Product docs (CONTEXT, ROADMAP, jev, ADR)
cmd/evaluate/AGENTS.mdGo/MCP layer constraints

The one rule

Verification is the job. Writing code is the easy part.

If you cannot demonstrate that your change works, you have not finished — no matter how confident you are. Everything below is downstream of this.

Every new feature and bug fix must be tested, verified, and validated before it is committed or pushed. No exceptions for small changes, follow-ups, or "obviously correct" edits. Committing or pushing on unverified green is a process failure, not a shortcut.

  • Tested — the behavior is covered by a test that fails without the change (bugs: the reproduction is red, then the same steps are green).
  • Verifiedtask check (gofmt, go vet, go test -race -count=1) runs clean, and the output is observed directly: never piped through filters that can mask a failure (| tail, | head, || true). A verification command whose exit status you did not see is not a verification.
  • Validated — the change is demonstrated against the real thing it claims to fix: live smoke (task smoke) whenever request/response validation rules change; a stdio round-trip (task inspect or against ./evaluate) for tool-contract or transport changes.

Done means proven, not "should pass". Details: agents/VERIFICATION.md.


Hard constraints (identity)

These are not style nits. Do not “simplify” them away.

  1. Canonical surface is cmd/evaluate/tools.go. Schema + user-facing prose. Host adapters own transport and registration only — they never author Jev semantics.
  2. evaluate mcp stdout is MCP-only. Diagnostics go to stderr. Secrets stay out of logs and stdout.
  3. state and questions are hostile input. HTTP client, 16 MiB cap, and criteria validate are the boundary.
  4. Jev answers come from the API. Do not fabricate probabilities.
  5. Client validates both sides of the upstream contract (request in, successful response out against the request’s criteria).
  6. Failed adapter writes leave the previous registration intact.
  7. Do not reopen docs/ROADMAP.md §0 baseline seams without observed pressure.
  8. Prefer evaluate + host code over new MCP tools for judgment/orchestration.
  9. Jev does not spawn agents. Hosts execute delegation.
  10. Keys, billing routes, destructive git, production publish → stop and ask.

Layer detail: cmd/evaluate/AGENTS.md. Failure log: ANTIPATTERNS.md.


Hosts

evaluate is the same canonical MCP surface for every host.

HostHow it attaches
Claude Codeevaluate setup mcp — user-scope MCP registration via the claude CLI
Codexevaluate setup mcp — MCP registration via the codex CLI
Claude Desktopevaluate setup mcp — config-file registration when the app is installed
Pievaluate setup pi writes the native extension (stock pi has no MCP client); or register evaluate mcp in an MCP adapter config (pi-mcp-adapter and similar)
OMP (Oh My Pi)stdio MCP client — /absolute/path/to/evaluate mcp with TYPESAFE_API_KEY or OPENROUTER_API_KEY in env
PyThinkerstdio MCP client — same registration as any other MCP-capable agent/CLI
Any other MCP client/absolute/path/to/evaluate mcp + key in env

Automated setup covers Claude Code, Codex, Claude Desktop, and stock pi. OMP, PyThinker, and other MCP-capable CLIs/agents use the manual stdio path — same binary, same tool contract.


Load by branch

BranchFile
Editing under cmd/cmd/evaluate/AGENTS.md
Writing evaluate questions / interpreting answersdocs/jev/README.md
Domain terms (System One, canonical surface, adapter)docs/CONTEXT.md
Agent pack indexagents/README.md
Verify loopagents/VERIFICATION.md
Roster / autopilot / Jev-as-supervisoragents/ORCHESTRATION.md
Skills & routinesagents/SKILLS-AND-ROUTINES.md
Named skillsagents/skills/
Prompt patternsagents/PROMPTS.md
Paste-ready rolesroster/
End-to-end workflowsplaybooks/
What breaksANTIPATTERNS.md
Product roadmapdocs/ROADMAP.md

Before you write any code

  1. Reproduce first. Get the bug red — a failing test or a real evaluate call. For a feature, name the current behaviour you will change.
  2. Restate the task before anything non-trivial: what you will do, what you will not do, what you assumed.
  3. Say what you'd need to see to call it done. One sentence — the proof.
  4. If asked to investigate, investigate. Do not start fixing because you spotted something on the way.

While you work

  • Small changes. One scoped concern per change.
  • Run the thing. Not only task check — the binary when the change is in tool, setup, or stdio paths.
  • Fix the root cause. If about to workaround, say why the real fix is out of scope.
  • Use what this repo chose. cobra, MCP SDK, stdlib.
  • Don't invent content. Jev/TypeSafe facts from docs/jev or https://docs.typesafe.ai only.
  • No internal language in user-facing output. README, tool prose, errors stay in product language from tools.go.

Before you open a PR

Attach proof. Every time.

Change typeRequired proof
Bug fixThe reproduction, then the same steps passing
MCP / tool contracttask check plus task inspect or captured stdio
Setup / host adapterHost client path, or go test -run TestPiAdapterRoundTrip ./cmd/evaluate/ / pi -e
Request/response validationtask check plus task smoke
Refactortask check showing behaviour unchanged
DocsClaim matches tools.go or live TypeSafe docs

A PR with no proof is a draft. Also state what changed and why, what you did not change that a reviewer might expect, and anything unsure.


Code style

  • Comments for non-obvious why only — never what as a crutch.
  • No dead code, no commented-out blocks, no debug leftovers.
  • Delete scaffolding you added to investigate.
  • Hostile input at the boundary; prompt-injection called out when user text enters prompts or state.

When you are corrected

  1. Apply the fix.
  2. Name the general rule.
  3. Write it here, in cmd/evaluate/AGENTS.md, or under agents/ / a skill.
  4. Strip the incident. Principle only.

Bad: "When editing setup.go, watch the Claude Desktop rollback because it failed on 2026-09-18."

Good: "A failed adapter write must leave the previous registration intact."


When to stop and ask

  • keys, billing routes, auth, credentials
  • destructive git
  • production publish / release
  • product decision you would have to guess
  • same approach failed twice — report; do not loop

Status

Done / in progress / blocked. No change since last update → say "no change" or stay silent.


Workflow

  • Product documentation lives under docs/. Root product entry files: README.md, CHANGELOG.md, LICENSE, AGENTS.md. Agent process pack (do not move into docs/): agents/, roster/, playbooks/, ANTIPATTERNS.md. New product docs → docs/; new process rules → the pack.
  • Roadmap §-numbering in docs/ROADMAP.md is canonical for milestones.
  • task check before calling work done.
  • task build./evaluate (gitignored). task inspect → MCP Inspector.

Commits

Conventional Commits → release-please: feat minor, fix patch, ! breaking (still minor pre-1.0), docs/test/chore no bump. Scopes in use: tools, setup, client, cli, readme. Generated: CHANGELOG.md, .release-please-manifest.json.

A commit carries verification with it per The one rule. No proof → draft.


Vocabulary

TermMeaning
Verification skillDeterministic exercise of the product — agents/VERIFICATION.md, agents/skills/
Feature mapBinary surface, hosts, flows — in agents/VERIFICATION.md
Autopilot ladderinvestigate → draft → autopilot → full autopilot — agents/ORCHESTRATION.md
Skill / routinehow / whenagents/SKILLS-AND-ROUTINES.md
Principle, not incidentHow rules get written — above
System One / Jev / state / criteria / canonical surface / adapter / routedocs/CONTEXT.md

The short version

Reproduce it. Run it. Prove it. Fix the cause, not the symptom. Keep the MCP contract canonical. When you're wrong, write the principle — not the story.