Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 48 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,51 @@
When running python scripts, ALWAYS use command `uv run <script.py>`.
# Repository Guidelines

This is a TypeScript monorepo for AgentEvo - an AI agent evaluation framework.

## Tech Stack & Tools
- **Language:** TypeScript 5.x targeting ES2022
- **Package Manager:** pnpm 10.20.0 (use `pnpm` for all package operations)
- **Build System:** Turbo (monorepo task orchestration)
- **Bundler:** tsup (TypeScript bundler)
- **Testing:** Vitest
- **LLM Framework:** @ax-llm/ax, Vercel AI SDK
- **Validation:** Zod

## Project Structure
- `packages/core/` - Evaluation engine, providers, grading
- `apps/cli/` - Command-line interface (published as `agentevo`)

## Essential Commands
- `pnpm install` - Install dependencies
- `pnpm build` - Build all packages
- `pnpm test` - Run tests
- `pnpm typecheck` - Type checking
- `pnpm lint` - Lint code
- `pnpm format` - Format with Prettier

## Functional Testing

When functionally testing changes to the AgentEvo CLI, **NEVER** use `agentevo` directly as it may run the globally installed npm version. Instead:

- **From repository root:** Use `pnpm agentevo <args>` to run the locally built version
- **From apps/cli directory:** Use `pnpm dev -- <args>` to run from TypeScript source with tsx

This ensures you're testing your local changes, not the published npm package.

## TypeScript Guidelines
- Target ES2022 with Node 20+
- Prefer type inference over explicit types
- Use `async/await` for async operations
- Prefer named exports
- Keep modules cohesive

## Package Publishing
- CLI package (`apps/cli`) is published as `agentevo` on npm
- Uses tsup with `noExternal: ["@agentevo/core"]` to bundle workspace dependencies
- Install command: `npm install -g agentevo`

## Python Scripts
When running Python scripts, always use: `uv run <script.py>`

<!-- OPENSPEC:START -->
# OpenSpec Instructions
Expand Down
2 changes: 2 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Always follow instructions in `@AGENTS.md`.

<!-- OPENSPEC:START -->
# OpenSpec Instructions

Expand Down
2 changes: 1 addition & 1 deletion apps/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "agentevo",
"version": "0.1.3",
"version": "0.1.4",
"description": "CLI entry point for AgentEvo",
"type": "module",
"repository": {
Expand Down
2 changes: 2 additions & 0 deletions apps/cli/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ export default defineConfig({
dts: false,
target: "node20",
tsconfig: "./tsconfig.build.json",
// Bundle @agentevo/core since it's a workspace dependency
noExternal: ["@agentevo/core"],
});
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@entityprocess/agentevo-workspace",
"name": "@agentevo/workspace",
"version": "0.0.0",
"private": true,
"description": "AgentEvo monorepo workspace",
Expand All @@ -20,7 +20,8 @@
"test:coverage": "turbo run test:coverage",
"format": "prettier --cache --write .",
"format:check": "prettier --check .",
"dev": "pnpm --filter @agentevo/cli dev"
"dev": "pnpm --filter @agentevo/cli dev",
"agentevo": "node apps/cli/dist/index.js"
},
"devDependencies": {
"@types/node": "24.1.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/evaluation/yaml-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export async function loadTestCases(
}

try {
const fileContent = await readFile(resolvedPath, "utf8");
const fileContent = (await readFile(resolvedPath, "utf8")).replace(/\r\n/g, "\n");
if (isGuidelineFile(displayPath)) {
guidelinePaths.push(path.resolve(resolvedPath));
if (verbose) {
Expand Down Expand Up @@ -253,7 +253,7 @@ export async function buildPromptInputs(
}

try {
const content = await readFile(absolutePath, "utf8");
const content = (await readFile(absolutePath, "utf8")).replace(/\r\n/g, "\n");
guidelineContents.push(`=== ${path.basename(absolutePath)} ===\n${content}`);
} catch (error) {
logWarning(`Could not read guideline file ${absolutePath}: ${(error as Error).message}`);
Expand Down