GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — agentests/core/AGENTS.md at main · feuersteiner/agentests

Expand file tree

/

AGENTS.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
27 lines (24 loc) · 6.11 KB
/

AGENTS.md

Copy path

File metadata and controls

27 lines (24 loc) · 6.11 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

core agent guide

Layout

  • tsconfig.build.json: build compiles index.ts, types.ts, cli/, and src/ with tsc against Node types only into dist/: ES modules and .d.ts files, .ts imports rewritten to .js; Git-ignored and removed on each build. The package ships only dist/ and runs on Node 22 or later, without Bun.
  • index.ts: the package's public runtime exports; nothing inside src/ or cli/ imports it.
  • types.ts: the package's public type exports; type-only.
  • cli/index.ts: the #!/usr/bin/env node entry; loads the working directory's .env, when present, without overriding variables already set, then command dispatch and help; run and eval pass process.env to Agentests.
  • cli/commands/: init, compile, validate, run, eval, and list; validate checks the config, the test.yaml files, and the eval.yaml files of each Test that loads, needing no key; init and compile are the CLI's own and do their work themselves: init checks its --decision and --reasoning flags against the preset providers, writes the config and a pre-commit hook at the path Git reports, and creates .agents/tests/, never overwriting; compile takes an optional id, rejected unless lowercase kebab-case, and prints a prompt, calling no model and needing no config or key: the compile prompt when the Test's TEST.md holds a rule, else the prompt to write it, naming a new Test when the id is omitted.
  • cli/commands/compile/: index.ts the command; prompts.ts lists each prompt's sections and steps in order; sections.ts and steps.ts hold them, constants or to… functions of the id or rule.
  • cli/commands/init/: index.ts the command; presets.ts the provider presets for the config's decision and reasoning sections, their provider names, and the config built from the chosen ones.
  • cli/helpers/error.ts: the message of a thrown value, shared by the commands.
  • cli/config/banner.ts: CLI banner, printed only when stdout is a terminal.
  • cli/config/paths.ts: the Tests folder and a Test's folder by id, for init and compile; the loader keeps its own literal.
  • src/AGENTS.md: the rules every src/ module follows; only the loader validates.
  • src/index.ts: the Agentests class, the main class and the entry for everything, built from the full config and an environment map (AgentTestEnv), throwing when the decision or reasoning API key is missing or blank, with the engines as a protected member, for test stubs, and one scope, select, assert, and eval orchestrator as private members; run(scope, id?) loads the Tests through the loader, scopes the sources once, runs each Test's select then assert one Test after another, and returns each Test with its findings; eval(id?) loads the Tests and their evals through the loader, runs each Test's evals one after another, and returns each Test with each eval's expected and actual outcome and findings; these are its only public members; not a barrel.
  • src/types.ts: the shared building-block schemas; imports nothing from the package.
  • src/loader/: loads, parses, and validates test.yaml, eval.yaml, and agentests.config.yaml, three files per folder, Test and eval folders sorted by name, and owns their schemas in types.ts; layout locked in its AGENTS.md.
  • src/engines/: the glob, grep, decide, and reason engines; each scores an input against criteria. index.ts is the single import; rules locked in the folder's AGENTS.md.
  • src/sources/: file, directory, and in-memory sources, each with a logical path, a kind, and lazily cached text content; a directory lists its immediate children sorted by name. index.ts is the single import.
  • src/scope/: a ScopeOrchestrator built once from the config's ignore globs, whose run(scope) asks Git for the files (all tracked and untracked non-ignored files, or only those changed, staged, or differing from a base ref), drops the ones matching ignore, symlinks, and files under a symlinked directory, and returns them with their ancestor directories as sources; requires a Git repository. Its runFolder(folder) does the same for every file under a folder taken as the repository root, without Git. index.ts is the single import.
  • src/select/: a SelectOrchestrator built once from the engines and the config's select section, whose run(select, sources) returns the sources a Test inspects, running the Test's select filters in order (glob, grep, decide) on all sources concurrently and reading content only when grep or decide is reached. index.ts is the single import.
  • src/assert/: an AssertOrchestrator built once from the engines and the config's assert section, whose run(assert, sources) returns a finding for each source and assertion that fails, escalating grep, decide, reason and stopping at the first stage that clears the source. index.ts is the single import.
  • src/eval/: an EvalOrchestrator built once from the scope, select, and assert orchestrators, whose run(test, eval) scopes the eval folder as the root without its eval.yaml, runs the Test's select then assert, and returns the eval with its actual outcome (skip when nothing is selected, fail on a finding, else pass), matches (whether actual equals expected), and findings; logs ✓ for a match and ✗ otherwise. index.ts is the single import.
  • tests/: the bun test suite (bun run test builds first), kept out of dist/ and the package; rules and helpers in its AGENTS.md.

Status: the version: 1 format, the config file, validate, the engines, the sources, the scope, the select, assert, and eval orchestrators, and Agentests, which builds and coordinates them, exist; run and eval call Agentests; list calls the loader; init, inside the CLI, writes the config, .agents/tests/, and a pre-commit hook running npx agentests run --staged, never overwriting; compile, inside the CLI, prints the compile prompt for a Test's TEST.md, or the rule prompt to write that file when it is missing or blank or no id is given; no command is a stub. The CLI loads .env before any command; the library never reads process.env. build emits dist/, which bin and exports point at.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.