tsconfig.build.json:buildcompilesindex.ts,types.ts,cli/, andsrc/withtscagainst Node types only intodist/: ES modules and.d.tsfiles,.tsimports rewritten to.js; Git-ignored and removed on each build. The package ships onlydist/and runs on Node 22 or later, without Bun.index.ts: the package's public runtime exports; nothing insidesrc/orcli/imports it.types.ts: the package's public type exports; type-only.cli/index.ts: the#!/usr/bin/env nodeentry; loads the working directory's.env, when present, without overriding variables already set, then command dispatch and help;runandevalpassprocess.envtoAgentests.cli/commands/:init,compile,validate,run,eval, andlist;validatechecks the config, thetest.yamlfiles, and theeval.yamlfiles of each Test that loads, needing no key;initandcompileare the CLI's own and do their work themselves:initchecks its--decisionand--reasoningflags against the preset providers, writes the config and a pre-commit hook at the path Git reports, and creates.agents/tests/, never overwriting;compiletakes 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'sTEST.mdholds a rule, else the prompt to write it, naming a new Test when the id is omitted.cli/commands/compile/:index.tsthe command;prompts.tslists each prompt's sections and steps in order;sections.tsandsteps.tshold them, constants orto…functions of the id or rule.cli/commands/init/:index.tsthe command;presets.tsthe provider presets for the config'sdecisionandreasoningsections, 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, forinitandcompile; the loader keeps its own literal.src/AGENTS.md: the rules everysrc/module follows; only the loader validates.src/index.ts: theAgentestsclass, 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 validatestest.yaml,eval.yaml, andagentests.config.yaml, three files per folder, Test and eval folders sorted by name, and owns their schemas intypes.ts; layout locked in itsAGENTS.md.src/engines/: the glob, grep, decide, and reason engines; each scores an input against criteria.index.tsis the single import; rules locked in the folder'sAGENTS.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.tsis the single import.src/scope/: aScopeOrchestratorbuilt once from the config'signoreglobs, whoserun(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 matchingignore, symlinks, and files under a symlinked directory, and returns them with their ancestor directories as sources; requires a Git repository. ItsrunFolder(folder)does the same for every file under a folder taken as the repository root, without Git.index.tsis the single import.src/select/: aSelectOrchestratorbuilt once from the engines and the config'sselectsection, whoserun(select, sources)returns the sources a Test inspects, running the Test'sselectfilters in order (glob, grep, decide) on all sources concurrently and reading content only when grep or decide is reached.index.tsis the single import.src/assert/: anAssertOrchestratorbuilt once from the engines and the config'sassertsection, whoserun(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.tsis the single import.src/eval/: anEvalOrchestratorbuilt once from the scope, select, and assert orchestrators, whoserun(test, eval)scopes the eval folder as the root without itseval.yaml, runs the Test's select then assert, and returns the eval with its actual outcome (skipwhen nothing is selected,failon a finding, elsepass),matches(whether actual equals expected), and findings; logs ✓ for a match and ✗ otherwise.index.tsis the single import.tests/: thebun testsuite (bun run testbuilds first), kept out ofdist/and the package; rules and helpers in itsAGENTS.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.