Recipes

Migrate HVE Core agent library from VS Code Local harness to Copilot agent harness

Discovered from README cross-links · today

Software & DevOpsWork & Operations

Move 31 agents and 37 instructions onto skills, tool aliases

What they did

The author migrated the HVE Core agent library from VS Code's Local chat harness to the Copilot agent harness, where `#file:` imports never load, `applyTo` instructions don't attach to running agents, subagents get no custom instructions, and Copilot ignores `handoffs`, `agents`, and prompt files. They created four shared skills (`disclaimer-language`, `untrusted-content-boundary`, `planner-identity`, `engagement-report-conventions`) to replace instructions that only existed to feed agents, and moved other agent-only protocols (RAI, privacy, ADR identity, TM7/VEX generation, code review diff computation, community interaction, commit/merge conventions) into the skills their agents already use as references. Thirty-one agents now preload skills via a `skills:` list; five phase-based planners activate `planner-identity` by name at session start. No agent uses `#file:` anymore. Subagents get rules from preloaded skills or the parent's dispatch prompt. The plugin stopped shipping always-on rules — all 37 remaining instructions have an `applyTo`. Agents dropped `handoffs`, `agents`, and `argument-hint`, and the frontmatter schema now rejects them. Tool lists use Copilot aliases (`read`, `edit`, `search`, `execute`, `web`, `agent`, plus `skill` and `ask_user`). Bodies were rewritten in plain words instead of naming Local tools. Tooling followed: `lint:frontmatter` rejects retired fields (learning JSON Schema `not`), cold-start budgets count preloaded skills, `lint:artifact-portability` flags `#file:`, and eval dependency mapping follows `skills:` lists. Settings dropped `chat.*Locations`, `.vscode/mcp.json.sample` became portable `.mcp.json.sample`, and docs/installer now lead with the plugin across five install routes.

How it went

The migration landed as a breaking change with a targeted preflight against `origin/main`. Four follow-up commits repaired CI findings: filling stub Example usage sections flagged by `lint:asset-docs`, fixing slide bundle source titles (22/22 deck tests pass), raising the light Prism string token to `#c9105f` for WCAG AA (5.3:1) after an accessibility crawl failed at 4.32:1, and adding eval stimuli for the three shared skills after the Agent Eval Plan stopped. The suite totals 338 stimuli across 87 skills. Docs build, spell-check, markdown/table lint, and validate:docs all pass.

Worth knowing

This is explicitly a breaking change: sixteen instruction files leave `.github/instructions/` and the plugin, and agents lose `handoffs`, `agents`, and `argument-hint`, so downstream users must update their setups. The PR text is cut off mid-sentence in the testing section, so the final verification state of the last commit isn't fully described. The migration depends on Copilot harness behavior (skill preloading, tool aliases) that may shift again. Eval coverage required manual retagging of 13 stimuli and dropping 7, so behavior-conformance coverage changed shape.

Wiring

Order: (1) inventory `#file:` usage and agent-only instructions; (2) create shared skills and move protocols into existing skills as references; (3) add `skills:` preload lists to all 31 agents and switch phase planners to name-based activation; (4) strip `handoffs`/`agents`/`argument-hint` from agent frontmatter and update the JSON Schema to reject them using `not`; (5) convert tool lists to Copilot aliases, adding `skill` for name-loading agents and `ask_user` for interactive ones; (6) rewrite bodies to plain language; (7) update lint scripts (`lint:frontmatter`, cold-start budgets, `lint:artifact-portability`) and eval dependency mapping to follow `skills:`; (8) drop `chat.*Locations` from `.vscode/settings.json`, rename `mcp.json.sample` to portable `mcpServers` shape, gitignore personal `.mcp.json`; (9) update docs, installer skill, and reference catalog. Config touches `.github/agents/`, `.github/skills/`, `.github/instructions/`, `evals/`, `scripts/linting/`, `.vscode/`, and `docs/`.

Try it yourself

Audit this repo's Copilot agent and instruction setup for the Copilot agent harness. Find every `#file:` import in `.github/agents/` and `.github/skills/`, every instruction file without an `applyTo`, and every agent frontmatter field Copilot ignores (`handoffs`, `agents`, `argument-hint`). For each agent-only instruction, propose whether it should become a shared skill, a reference inside an existing skill, or be deleted. Then rewrite agent tool lists to Copilot aliases (`read`, `edit`, `search`, `execute`, `web`, `agent`, `skill`, `ask_user`), add a `skills:` preload list to each agent, and update lint rules to reject the retired fields. Finally, update eval dependency mapping to follow `skills:` lists and report which evals need new stimuli.

Source

Tools in this stack