agentleFS
qforge-devqforge-dev/torque/AGENTS.md

torque

AGENTS.md94 starsChanged 13 months agoMITView on GitHub

  • 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,700 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

8 rules. About 1 is common, 2 are distinctive, and 5 are very specific to this project.

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

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

    Keep the Torque monorepo healthy: the core DSL (packages/torque), evaluation helpers (packages/torque-eval), shared scripts, and StackBlitz …

    line 4
  2. Distinctive:

    Prefer small, reviewable changes.

    line 5
  3. Very specific:

    Prefer Bun-native test utilities (bun:test).

    line 29
  4. Very specific:

    Follow the AI SDK testing guide (https://ai-sdk.dev/docs/ai-sdk-core/testing) whenever a test depends on generateText or other ai …

    line 32
  5. Very specific:

    Use the mocks re-exported from ai/test to stand up deterministic providers.

    line 33
  6. Very specific:

    Prefer feeding helpers/functions (e.g., pass async (prompt) => JSON.stringify({...})) only for ultra-light tests.

    line 66
  7. Distinctive:

    Every change must include automated coverage or a justification for gaps.

    line 69
  8. Common:

    Keep prompts, instructions, and fixtures free of secrets or user data.

    line 70

≈ “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.

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

Torque Repository Agent Guide

Mission & Scope

  • Keep the Torque monorepo healthy: the core DSL (packages/torque), evaluation helpers (packages/torque-eval), shared scripts, and StackBlitz templates.
  • Prefer small, reviewable changes; surface architectural or product questions early.
  • Preserve type safety, deterministic generation, and reproducibility across every package.

Context Map

  • packages/torque: declarative DSL for assembling synthetic LLM datasets (schemas, generators, RNG helpers, CLI renderer).
  • packages/torque-eval: dataset scoring + pairwise comparison utilities built on top of Torque exports.
  • scripts/generate-stackblitz-templates.ts and stackblitz-templates/*: browser playgrounds that must stay in sync with published APIs.
  • Shared data lives in data/ and examples in examples/; keep them lightweight and anonymized.

Ways of Working

  1. Clarify intent – Restate requirements, note assumptions, and point to the relevant files or docs before modifying code.
  2. Design in the open – For behavioral shifts or new public APIs, outline the approach (data flow, error handling, backward compatibility) before implementing.
  3. Bias toward composability – Reuse existing helpers (e.g., withSeed, schema builders, loader utilities) instead of duplicating logic.
  4. Document as you go – Update README snippets, StackBlitz templates, or inline JSDoc when APIs change.
  5. Validate determinism – Any change touching randomness, caching, or streaming must explain how determinism and reproducibility are preserved.

Tooling & Commands

  • Install deps with bun install (Node 18+). Keep bun.lock consistent.
  • Linting is enforced via TypeScript; run targeted builds instead of ad-hoc scripts.
  • Useful commands:
    • bun run --filter @qforge/torque build
    • bun run --filter @qforge/torque-eval build
    • bun test (or bun test packages/<pkg> for targeted suites)
    • bun run scripts/generate-stackblitz-templates.ts
  • Prefer Bun-native test utilities (bun:test). Do not introduce new test runners without discussion.

AI SDK Testing

  • Follow the AI SDK testing guide (https://ai-sdk.dev/docs/ai-sdk-core/testing) whenever a test depends on generateText or other ai helpers—keep network calls out of CI.
  • Use the mocks re-exported from ai/test to stand up deterministic providers; they expose call logs (mock.doGenerateCalls) so you can assert prompts without patching global state.
  • Example for a language-model dependency:
import { MockLanguageModelV2 } from "ai/test";
import { scoreDataset } from "@qforge/torque-eval";

const mockJudge = new MockLanguageModelV2({
  doGenerate: async () => ({
    content: [
      {
        type: "text",
        text: JSON.stringify({
          quality: 10,
          coherence: 9,
          adherence: 9,
          notes: "passes rubric",
        }),
      },
    ],
    finishReason: "stop",
    usage: { inputTokens: 0, outputTokens: 0, totalTokens: 0 },
    warnings: [],
  }),
});

await scoreDataset({
  dataset,
  sampleSize: 1,
  judgeModel: mockJudge, // behaves like a LanguageModel from ai-sdk
});
  • Prefer feeding helpers/functions (e.g., pass async (prompt) => JSON.stringify({...})) only for ultra-light tests; MockLanguageModelV2 (and its streaming sibling) gives better parity with production code.

Quality Bar

  • Every change must include automated coverage or a justification for gaps.
  • Keep prompts, instructions, and fixtures free of secrets or user data.
  • Large data files (>1MB) should live in data/ and be gitignored if generated.
  • Public APIs require changelog/README updates and migrate notes if breaking.

When to Escalate to a Human

  • You need new third-party services, paid APIs, or environment variables.
  • A change could break template backwards compatibility or published npm contracts.
  • A deterministic behavior (RNG, sampling, caching) must change.
  • Security/privacy concerns, or when unsure how to anonymize sample data.

Deliverables Checklist

  • Code + tests pass via Bun
  • Docs/templates reflect the change
  • Repro steps and verification commands included in PR/summary
  • Todo / follow-up issues opened if scope is split

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.