Skip to content

feat: inject compile_command guidance into agent context files#18

Open
frederikprijck wants to merge 3 commits into
mainfrom
worktree-compilation
Open

feat: inject compile_command guidance into agent context files#18
frederikprijck wants to merge 3 commits into
mainfrom
worktree-compilation

Conversation

@frederikprijck

@frederikprijck frederikprijck commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds an optional compile_command PROMPT.md frontmatter field. When set, a verify-compiles instruction is injected into the agent's native context file (CLAUDE.md / GEMINI.md / AGENTS.md / .github/copilot-instructions.md) alongside the existing "no docs files" guidance — so the agent verifies the project compiles and the command shows up in the tool trace.
  • Wires the field into all 10 CLI-buildable quickstart evals (react, angular, vue, nuxt, nextjs, spa-js, express, fastify-api, flask, fastapi).

Implementation

  • eval-core/types/eval.tscompileCommand? on EvalDefinition
  • eval-core/loader.ts — parse compile_command frontmatter
  • eval-core/workspace/workspace.ts — new compileGuidance() helper; writeAgentGuidance() takes an optional compileCommand
  • eval/cli/run.ts — pass evalDef.compileCommand to writeAgentGuidance
  • Docs: AGENTS.md doc-sync table + checklist; docs/ADDING_EVALS.md frontmatter table + examples

Test plan

  • npm run build passes
  • npm run lint passes
  • npm test passes (684 tests)
  • New tests: loader compile_command parsing; writeAgentGuidance with/without compile command; compileGuidance helper

Add an optional `compile_command` PROMPT.md frontmatter field. When set,
a verify-compiles instruction is appended to the agent's native context
file (CLAUDE.md / GEMINI.md / AGENTS.md / copilot-instructions.md)
alongside the existing "no docs files" guidance, so the agent verifies
the project compiles and the command appears in the tool trace.

Wires the field into all 10 quickstart evals.
Uncomment the ranCommand/ranCommandOneOf build graders in the six
frontend quickstarts (react, vue, spa-js, angular, nuxt, nextjs) now
that compile_command instructs the agent to run the build. Install
graders stay disabled — a valid solution may edit package.json then run
a bare `npm install`, which the install grader would not match.
The injected compile-verification guidance used permissive wording
("you can use this command"), so capable models produced correct code
but skipped the build — failing the mandatory build-verification grader.
Rephrase as a "you MUST run" instruction and assert the mandatory
wording in tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant