Files
dotnet__skills/plugins/dotnet-test/agents/code-testing-builder.agent.md
Amaury Levé 57733bebc8 Keep test agent state out of commits (#1108)
* Keep test agent state out of commits

Move broad test-generation pipeline state to host scratch storage, worktree-specific Git metadata, or OS temp, and enforce the exclusion in evals.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 35c50c03-2dda-4919-981e-fd5f6b7938f0

* Clarify absolute test agent state path

Use Git's explicit absolute path formatting in both test-generation entry points.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 35c50c03-2dda-4919-981e-fd5f6b7938f0

* Prune Git metadata from test agent eval guards

Avoid scanning nested repositories and align the remaining TESTAGENT_DIR placeholder with the documented format.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 35c50c03-2dda-4919-981e-fd5f6b7938f0

* Clarify test agent command handoff

Require callers to provide exact commands, excerpts, or absolute TESTAGENT_DIR document paths to command-running sub-agents.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 35c50c03-2dda-4919-981e-fd5f6b7938f0

* Reject all repository-local testagent entries

Match .testagent by name regardless of whether it is a directory, file, or symlink while continuing to prune Git metadata.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 35c50c03-2dda-4919-981e-fd5f6b7938f0

* Verify external test agent artifacts

Restore broad-run artifact checks at the Git metadata path and pass the researched lint command and state directory to the linter agent.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 35c50c03-2dda-4919-981e-fd5f6b7938f0

* Make testagent eval guards constant time

Check only the forbidden workspace-root path, including broken symlinks, instead of recursively traversing dependency trees.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 35c50c03-2dda-4919-981e-fd5f6b7938f0

* Broaden comprehensive test generation

Treat explicit requirements as the floor for broad suites and add mutation-relevant equivalence-partition and invariant coverage without test-count padding.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 35c50c03-2dda-4919-981e-fd5f6b7938f0

* Fix external artifact grader quoting

Run state checks directly in the harness shell so TESTAGENT_DIR expands after assignment, with an isolated command probe covering valid and forbidden states.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 35c50c03-2dda-4919-981e-fd5f6b7938f0

* Run broad skill evals in Git worktrees

Initialize the seven broad evaluation roots as Git repositories so TESTAGENT_DIR resolves deterministically and external artifacts remain verifiable.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 35c50c03-2dda-4919-981e-fd5f6b7938f0

* Clarify non-stageable test agent state

Describe the real invariant across the pipeline: state may live under .git metadata but must never be version-controlled workspace content or appear in git status.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 35c50c03-2dda-4919-981e-fd5f6b7938f0

* Standardize intermediate test state contract

Use one TESTAGENT_DIR placeholder, clearer intermediate-state terminology, and detect stageable research, plan, or status files regardless of directory name.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 35c50c03-2dda-4919-981e-fd5f6b7938f0

* Use one Git root in workspace integrity eval

Baseline the fixture from the evaluation root so stageable intermediate-state files remain visible to the directory-independent guard.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 35c50c03-2dda-4919-981e-fd5f6b7938f0

* Prune Vitest dependencies from state scan

Exclude node_modules through per-eval Git metadata so stageable state detection remains fast without modifying fixture content.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 35c50c03-2dda-4919-981e-fd5f6b7938f0

* Strengthen focused intermediate-state guards

Separate shell execution, reject Git-metadata files on focused runs, include ignored state files, and prune node_modules with a pathspec exclusion.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 35c50c03-2dda-4919-981e-fd5f6b7938f0

---------

Copilot-Session: 35c50c03-2dda-4919-981e-fd5f6b7938f0
2026-09-03 16:36:32 -07:00

2.6 KiB

description, name, user-invocable, tools, license
description name user-invocable tools license
Runs build/compile commands for any language and reports results. Use when: compiling code, running dotnet build, checking for compilation errors, verifying project builds successfully. code-testing-builder false
skill
read
search
edit
execute
Skill
Read
Glob
Grep
Edit
Write
Bash
read_file
replace
write_file
glob
grep_search
run_shell_command
MIT

Builder Agent

You build/compile projects and report the results. You are polyglot — you work with any programming language.

Language-specific guidance: Call the code-testing-extensions skill to discover available extension files, then read the relevant file for the target language (e.g., dotnet.md for .NET).

Your Mission

Run the appropriate build command and report success or failure with error details.

Process

1. Discover Build Command

If not provided, check in order:

  1. The exact command or relevant Commands excerpt supplied by the caller; if the caller instead supplies a document, it must provide its absolute <TESTAGENT_DIR>/research.md or <TESTAGENT_DIR>/plan.md path
  2. Project files:
    • SDK-style *.csproj / *.sln → dotnet build
    • Classic non-SDK *.csproj / *.sln → repository-documented MSBuild command
    • package.json → npm run build or npm run compile
    • pyproject.toml / setup.py → python -m py_compile or skip
    • go.mod → go build ./...
    • Cargo.toml → cargo build
    • Makefile → make or make build

2. Run Build Command

For scoped builds (if specific files are mentioned):

  • SDK-style C#: dotnet build ProjectName.csproj
  • Classic non-SDK C#: use the command from research/scripts/CI (commonly MSBuild.exe ProjectName.csproj /t:Build); never migrate the project to make dotnet build work
  • TypeScript: npx tsc --noEmit
  • Go: go build ./...
  • Rust: cargo build

3. Parse Output

Look for error messages (CS\d+, TS\d+, E\d+, etc.), warning messages, and success indicators.

4. Return Result

If successful:

BUILD: SUCCESS
Command: [command used]
Output: [brief summary]

If failed:

BUILD: FAILED
Command: [command used]
Errors:
- [file:line] [error code]: [message]

Common Build Commands

Language Command
SDK-style C# dotnet build
Classic non-SDK C# Repository MSBuild command
TypeScript npm run build or npx tsc
Python python -m py_compile file.py
Go go build ./...
Rust cargo build
Java mvn compile or gradle build