AGENTS.md instructions for /home/entity/projects/EntityProcess/agentv
This file is the root index for repo-facing agent instructions. Read the linked .agents/*.md guide for the kind of work you are doing, and read STRATEGY.md plus ROADMAP.md before making product-boundary calls.
Product Direction
AgentV aims to be the repo-native, workspace-native evaluation framework for AI agents.
Repo-native evals: run against real repos, multi-repo workspaces, setup scripts, and existing harnesses.
Zero-infra local to CI: keep the default path lightweight so the same eval contract works on a laptop and in CI.
Portable run artifacts: treat run bundles, traces, and summaries as the source of truth for comparison, gating, and export.
Adapter boundaries: integrate with Phoenix, Harbor, Opik, and provider-specific systems through narrow adapters instead of absorbing their concepts into core.
AI-native extensibility: keep the core small and composable so engineers and coding agents can extend it with plugins, wrappers, and harness-specific glue.
Phoenix boundary after the 2026-06-20 product decision:
AgentV-owned run bundles, traces, transcripts, datasets, experiments, indexes, and Git-backed artifacts are not exported or projected into Phoenix.
The local Dashboard is the supported zero-infra inspection path for AgentV run, trace, and session artifacts.
Phoenix may be referenced as UI inspiration and optional external trace infrastructure only when Codex, Arize, or another hook already emitted spans independently.
Optional Phoenix integration is link-out correlation only through safe external_trace metadata and an Open in Phoenix URL when available.
Dashboard must not require the px CLI at runtime or query Phoenix database tables directly.
Design guardrails:
Prefer core primitives plus plugins or wrappers over new built-ins.
Document composition patterns before inventing a new feature.
Match industry-standard lowest-common-denominator contracts when possible.
When designing AgentV contracts, check public reference standards such as Claude Skills, Vercel agent-eval, Hugging Face Datasets, and OpenInference before inventing AgentV-specific shapes. Use their shared lowest common denominator where it fits, and document any intentional divergence.
Apply YAGNI aggressively and solve the current request with the smallest surface that works.
Keep extensions non-breaking unless a same-week unreleased surface should be hard-corrected.
Design for AI comprehension with self-describing modules, clear extension points, and no dead scaffolding.
Read the full rationale and examples in .agents/product-boundary.md.
Always-Read Rules
Start every repo change with git fetch origin and git status --short --branch.
Use bun for package and script operations.
Use the operator-supplied tracker when present. Do not commit tracker runtime state, local coordination config, or other machine-local artifacts.
Do not use git stash on shared checkouts. Stage explicit paths only, and never push directly to main.
Every merge to main requires a GitHub pull request with passing GitHub Actions. Do not locally merge feature or integration branches into main as a substitute for opening a PR.
Prefer the primary checkout only for small, clean, bounded work. Use a dedicated worktree from the latest origin/main for non-trivial, risky, long-running, or parallel changes.
When working from a dedicated worktree, copy the ignored .env from the primary/main checkout into the worktree before running evals, provider dogfood, grader verification, or local OpenAI OAuth proxy checks. Keep copied env files local and uncommitted; if the primary checkout has no .env, record that exact blocker instead of using .env.example as credentials.
Non-trivial work needs a plan or task list. If the implementation surface starts to balloon, stop and re-plan.
Large or high-risk PRs need meaningful, reviewable commits for each coherent change. Rewrite only the PR branch with git push --force-with-lease when needed to replace WIP or accidental squashed history before review.
Manual red/green UAT is blocking before a branch is ready for review. GitHub Actions is the authoritative merge gate.
For eval execution, experiments, repeat runs, providers, graders, or artifact-layout changes, dogfood with a live provider and a real LLM grader before marking ready. agentv validate, mock targets, replay/frozen transcript runs, and deterministic-only smoke tests are useful checks, but they are not live dogfood. Use canonical .agentv/results/<run_id>/ output and publish private evidence. See .agents/verification.md.
For browser or screenshot UAT, keep evidence out of the public repo and publish reviewable artifacts to an agentv-private evidence branch. See .agents/verification.md.
When dogfood or review reveals a durable workflow lesson, capture it in this guide or the relevant .agents/*.md guide before merge; do not leave durable agent instructions only in PR comments, Bead comments, or private evidence. Use for fuller reusable writeups.
Repo Map
packages/core/: evaluation engine, providers, grading, project registry, and the programmatic API.
packages/sdk/: lightweight assertion SDK such as defineAssertion and defineCodeGrader.
apps/cli/: published CLI surface for agentv.
apps/web/src/content/docs/: public product and CLI docs on agentv.dev.
examples/: examples that double as reference material and integration coverage.
docs/adr/: durable product and architecture boundary decisions.
docs/plans/: implementation plans and temporary design artifacts.
docs/solutions/: documented fixes, decisions, and best practices, organized by category.
CONCEPTS.md: shared domain vocabulary.
Routing
Read the relevant guide before specialized work:
.agents/product-boundary.md: full goals, design principles, AI-first guidance, and how to decide core vs plugin vs docs.
we are going to adopt promptfoo eval contract. see https://github.com/EntityProcess/wtg-ai-prompts-experiment/tree/main/framework-parity/promptfoo/pr-679. though the directory structure cna be cleaner. i suggest we remove workspace field in agentv and create workspace and skills extension. agentv should support extensions using sam syntax as promptfoo (cloned locally). if you need to research promptfoo refer to local clone or deepwiki mcp. draft plan.
Assistant
I’ll use the ce-plan skill because you asked for a concrete implementation plan, and I’ll ground it in the repo’s product boundaries plus the local Promptfoo parity work before drafting.
Assistant
I’ve confirmed the checkout is on main and fetched origin; origin/main moved forward. Next I’m reading the planning rules and the AgentV product docs that define the extension boundary so the plan does not invent a shape that conflicts with repo direction.
Assistant
The product direction lines up with a Promptfoo-compatible contract only if AgentV treats it as a repo-native authoring/import surface and keeps heavier semantics in extensions. I’m now checking existing config/workspace/skill concepts and the Promptfoo branch content to make the plan concrete.
Assistant
The current AgentV glossary still defines workspace as a first-class eval YAML concept, so removing it is a contract migration, not just parser cleanup. I’m narrowing the scan to schema/parser/orchestrator files and locating the local Promptfoo parity branch so the proposed migration has the right blast radius.
Assistant
I found the local wtg-ai-prompts-experiment clone. The existing AgentV implementation already has an agent-skills parser and a large workspace materialization subsystem; the plan should reuse the materializer behind a new extensions.workspace shape instead of deleting runtime workspace support.
Assistant
The Promptfoo parity directory is not present on the current main checkout, but the clone has a matching remote branch. I’m inspecting that branch directly with git ls-tree/git show so I don’t disturb the checkout.
Assistant
The Promptfoo parity branch has exactly the split you described: a suite file plus separate workspace.yaml, workspace.materialization.yaml, skills.yaml, and two extension scripts. I’m reading those plus Promptfoo’s local extension examples/API surface next.
Assistant
Promptfoo’s version keeps core config clean: providers, prompts, defaultTest, tests, and an extensions list that points to file://...:beforeAll hooks. The workspace and skills setup live outside the suite file and communicate through env vars, which is useful prior art but too ad hoc for AgentV unless normalized.
User
we want promptfoo compatbility but want to structure the example better so its more reusable.
Assistant
Understood. I’ll treat this as Promptfoo-compatible authoring, not a one-off PR 679 port: the plan will make the example reusable by moving workspace and skills setup into named extensions while keeping the eval suite close to Promptfoo’s contract.
Assistant
I created tracker item av-fyig for this planning work and will keep it scoped to the plan artifact. I’m claiming it now and then I’ll finish the source scan before writing.
Assistant
Promptfoo’s hook names are beforeAll, afterAll, beforeEach, and afterEach, with hook files addressed as file://path:function. I’m checking the exact runtime contract so AgentV can be compatible at the syntax layer without copying Promptfoo’s whole runner model.
Assistant
AgentV already supports reusable external workspace config files (workspace: ../../workspace.yaml) and Agent Skills JSON import, but those are parallel surfaces. The plan will converge them behind extensions.workspace and extensions.skills, leaving workspace as a migration alias only if implementation confirms released compatibility requires it.
Assistant
I have enough context to write the plan. The key design choice is to make Promptfoo compatibility a syntax and lifecycle compatibility layer (extensions: ["file://...:beforeAll"]), while keeping AgentV’s existing workspace engine as an internal runtime primitive fed by a workspace extension.
User
i think we can remove workspace from agentv core and use extensions which are more generalized
Assistant
I agree with that direction. I’m tightening the plan so workspace is not a core AgentV primitive with an extension facade, but a bundled/general extension capability that supplies runtime context to the core runner.
Assistant
I updated the core product stance in the plan. I’m now adjusting the implementation units so the work is sequenced as “general extension runtime first, extract workspace second,” instead of keeping workspace as an internal core backend.
Assistant
The plan now treats workspace as a bundled extension capability, not a core backend. I’m doing a quick contradiction scan for leftover compatibility wording before I close the tracker item.
Assistant
The scan found a few stale phrases that still implied a compatibility reader or core-owned workspace pipeline. I’m cleaning those up so the document is consistent about hard removal from core.
Assistant
The plan is consistent now: core gets generalized extensions, workspace becomes an extension package. I’m running the closeout checks required by the repo tracker workflow.
Assistant
Drafted the plan at docs/plans/2026-07-01-001-feat-promptfoo-compatible-extensions-plan.md.
I updated it to match your direction: workspace is removed from AgentV core, core gets a generalized Promptfoo-compatible extension runtime, and workspace/skills become bundled or local extensions that return generic runtime context (cwd, env, metadata, artifacts, cleanup, provider context).
Tracker item av-fyig is closed. I did not run code tests because this was a plan-only doc change. Git status shows the new plan file is untracked and main is behind origin/main by 2 commits.
User
create draft PR with the plan so i can rview
Assistant
I’ll use the PR publishing skill for this turn. I’ll create a branch from the latest origin/main, commit only the plan file, push it, and open a draft PR.
Assistant
The repo is on main, behind origin/main, with only the new plan file untracked. I’m reading the branch-creation and PR-description rules before making the branch and commit.
Assistant
origin/HEAD is not configured in this checkout, so I’m resolving the default branch through GitHub and checking whether local main has unpushed commits before branching from the fresh remote base.
Assistant
Local main has no unpushed commits, so the PR branch can start cleanly from origin/main. I’m creating the feature branch now and committing only the plan document.
Assistant
Branch creation succeeded from origin/main. I’m staging the single plan file with an explicit path and committing it with the repo’s conventional commit style.
Assistant
The commit is created. I’m pushing the branch, then I’ll open a draft PR with a concise plan-focused description.
Assistant
The branch is pushed. I’m creating the draft PR now; since this is documentation-only planning work, the validation note will say no code tests were run.
Assistant
Draft PR creation succeeded. I’m doing the final status check now so I can report the branch state cleanly.
Research-only workers must not run bun install, bun run build, tests, or evals unless the assigned work explicitly needs that command and the worker records why.
Prefer commit-addressed CI build artifacts over copying mutable main-tree build output. A prebuilt artifact is valid only when its manifest commit SHA, bun.lock hash, runner platform, Bun version expectation, and included output paths match the consuming checkout.
Implementation workers must rebuild any package whose source they changed; never trust a prebuilt artifact for a touched package, and never publish node_modules, Bun caches, .turbo, .cache, or .tsbuildinfo as the build artifact.
Public docs and examples should describe the current user-facing contract directly. Reserve historical context for files that are explicitly migration guides, changelogs, or ADRs.
Wire formats are snake_case; internal TypeScript is camelCase. Translate only at the boundary.
In AgentV, a project holds runs, traces, and experiments; a benchmark is a curated eval suite. Do not collapse those terms.
artifact_pointers are an offload indirection for large detached payload bytes, such as transcript artifacts. Do not use them as the discovery path for ordinary per-case sidecars; expose those with explicit index/manifest path fields such as metrics_path.