Skip to content

docs(agents): one compact guide for Claude, Codex and Cursor - #72

Open
scott-lowe-vapi wants to merge 1 commit into
docs/guides-rewritefrom
docs/agent-instructions
Open

scott-lowe-vapi wants to merge 1 commit into
docs/guides-rewritefrom
docs/agent-instructions

Conversation

@scott-lowe-vapi

@scott-lowe-vapi scott-lowe-vapi commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Value

V.A.L.U.E. tier: small — the agent instructions for Claude Code, Codex and Cursor, plus a test. No engine change. Not micro: more than 200 lines.

  • Problem: coding agents are a headline feature of this repo, and their instructions had four problems:
    • Codex couldn't read most of them. AGENTS.md was 55 KB, and Codex reads AGENTS.md only up to project_doc_max_bytes (32 KiB by default). Everything after line 460 was silently dropped: structured-output, squad and simulation formats, reference rules, commands, naming and renames.
    • They taught agents things that break.
      • UUIDs in assistant_ids, scenario judges and credentialId (they only work in one org, and break promotion);
      • the deprecated endCallFunctionEnabled;
      • a cleanup --force command that is refused without --confirm;
      • "every command is interactive";
      • "files get a UUID suffix after first push" (only pulled files do).
    • The most important safety rule only reached Claude: a direct API PATCH replaces nested objects. A partial model PATCH once wiped live system prompts.
    • The customer-deployment changelog rule only reached Cursor. Claude and Codex never saw it.
  • Who it affects: everyone who points a coding agent at this repo or a fork, and the live phone lines those agents can change.
  • What changes:
    • AGENTS.md is rewritten as a 19 KB core:

      • which repository you're in (template or customer deployment);
      • safety rules:
        • ask before anything that changes a live org or deletes, with a table of commands and why;
        • never handle API keys;
        • reference resources by name, never by UUID;
        • the PATCH rule;
        • .ts files execute code;
        • don't bypass a safety check to make a command pass;
      • setup without a terminal, and the change loop (validate, dry-run PR checks, deploy only with a yes, verify, commit);
      • a corrected quick reference and reference table, and naming and renames;
      • simulations and PR checks, and promotion;
      • learnings routing, and engine conventions.
    • Reference material moves to docs/guides/:

      • resource-reference.md: every setting, with the UUID and deprecation fixes;
      • writing-prompts.md;
      • sync internals (conflicts, drift gate, output icons, list completeness) into how-it-works.md;
      • test-call output into commands.md.

      push --strict is documented, and "run a plain pull first in an existing repo" is now in both AGENTS.md and the workflows guide.

    • CLAUDE.md is now @AGENTS.md plus one paragraph, instead of a hand-copied 19-row routing list.

    • Cursor: the changelog rule folds into AGENTS.md, and the learnings rule matches the two indexes and asks for no customer or person names.

    • New tests/agent-docs.test.ts checks that:

      • AGENTS.md stays under 30 KB;
      • CLAUDE.md imports it;
      • every docs/learnings/ file is routed from both indexes;
      • there are no UUIDs in agent-facing examples.
    • The README and CONTRIBUTING.md link the new guides and describe the single-file setup.

Evidence of value

Check Before After
AGENTS.md size 55,358 bytes (Codex reads up to line 460) 18,852 bytes (Codex reads all of it)
PATCH safety rule visible to Claude only Claude, Codex, Cursor
Changelog rule visible to Cursor only Claude, Codex, Cursor
UUIDs in agent-facing examples 3, plus a credentialId placeholder telling agents to use a UUID 0 (tested)
  • Each correction was checked against the code:
    • the engine resolves assistant_ids and credential names;
    • endCallFunctionEnabled is marked deprecated in the API types;
    • cleanup requires --confirm;
    • pull names new files <slug>-<uuid8>, and push never renames;
    • six commands are interactive;
    • --strict refuses to push on validation errors.
  • Nothing lost: I compared every line of the old AGENTS.md and CLAUDE.md; each one is restated in the new core or moved into a guide. Two facts that had been dropped were restored (--strict, and seeding baselines with a first pull).
  • Tests and links: npm test passes, 500 tests (4 new), and every link across 47 markdown files resolves.

Found while checking (not changed here): npm run cleanup doesn't read .vapi-ignore, and deletes every platform resource missing from the state file. Ignored resources are never in state, so a destructive cleanup deletes exactly the resources a team excluded. This PR documents the hazard (AGENTS.md, workflows guide) and logs it as improvements.md #36. The engine fix is a separate change.

Testing plan

  • tests/agent-docs.test.ts (4 tests), the existing suite, and the link checker.
  • Not tested:
    • a live Codex, Cursor or Claude session reading the new files;
    • the Claude @AGENTS.md import (a documented Claude Code feature, not run here).

Stacked on #71.

🤖 Generated with Claude Code

AGENTS.md was 55 KB. Codex reads it only up to project_doc_max_bytes
(32 KiB by default), so it silently lost everything after the tools
section. It also taught agents things that break: UUIDs in assistant_ids,
scenario judges and credentialId (they only work in one org and break
promotion), a deprecated endCallFunctionEnabled, a cleanup command that
is refused without --confirm, and that every command is interactive.

- AGENTS.md is rewritten as an 19 KB core: which repository you're in
  (template vs customer deployment, so the changelog rule reaches every
  agent), safety rules (ask before changing a live org or deleting, never
  handle keys, reference by name, the PATCH-replaces-nested-objects rule
  that only Claude saw before, .ts executes, don't bypass safety checks),
  setup without a terminal, the change loop, a corrected quick reference
  and reference table, naming and renames, simulations and PR checks,
  promotion, learnings routing, and engine conventions.
- Reference material moves to docs/guides/: resource-reference.md (every
  setting, with the UUID and deprecation fixes), writing-prompts.md, sync
  internals into how-it-works.md, test-call output into commands.md.
- CLAUDE.md imports AGENTS.md instead of copying it; the Cursor changelog
  rule folds into AGENTS.md; the learnings rule matches the two indexes.
- tests/agent-docs.test.ts keeps AGENTS.md under 30 KB, CLAUDE.md
  importing it, every learnings file routed, and no UUIDs in agent-facing
  examples.
- Found while checking: npm run cleanup doesn't read .vapi-ignore, so a
  destructive cleanup deletes resources a team excluded. Documented in
  AGENTS.md and the workflows guide; logged as improvements.md #36.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant