Skip to content

feat(agents): Contribute Code Standards Review agent to hve-core #1112

@erikschlegel

Description

@erikschlegel

Custom Agent Name

/code-review/code-standards-review.agent

Type

Custom Agent

Purpose

As a development team adopting hve-core, I want a skills-based code review agent that enforces project-defined coding standards through dynamically loaded skill files so that I can establish a baseline set of language-specific conventions and augment them with my enterprise's own standards without modifying the review agent itself.

This agent is contributed as a new, separate agent alongside the existing Functional Code Review agent, not as a modification to it. The two agents serve deliberately different purposes: the Functional Code Review agent catches logic errors, edge cases, error handling gaps, and behavioral bugs using hardcoded review focus areas. The Standards Code Review agent enforces coding conventions, style rules, and architectural patterns defined externally in skill files. Their scope rules are incompatible the functional agent explicitly excludes convention violations while the standards agent's entire purpose is to surface them. Merging them would produce contradictory instructions and inconsistent review behavior.

Why skills instead of instruction files: Coding standards are authored as skills rather than GitHub Copilot instruction files because instructions are loaded into the LLM context window automaticall based on applyTo glob patterns - every matching file edit injects the full instruction content regardless of relevance. A team with standards covering Python, TypeScript, C#, Pydantic, MCP patterns, and testing conventions would consume significant context window budget on every request, even when the developer is editing a single Python model file that only needs two of those standards. Skills solve this by loading on demand, the agent reads skill metadata first, evaluates relevance against the diff, and loads only the applicable skill content. This keeps the context window lean and focused, which directly improves review quality and reduces token cost.

The standards agent is language-agnostic by design. It discovers skill files at review time based on the file extensions present in the diff, loads core skills (always applied) and non-core skills (selected by relevance), and traces every finding back to the specific skill that surfaced it. Teams adopt it by contributing skill files to their repository no agent modification required.

Requirements

What this PR will include

  • The Standards Code Review agent (standards-code-review.agent.md) in the code-review/ agent folder
  • A shared review artifacts instruction (review-artifacts.instructions.md)
  • A composite prompt (full-code-review.prompt.md) that chains both agents with single-pass diff computation and merged output

Definition of Done notes

  • Agent file passes hve-core frontmatter linting (Validate-FrontmatterSchema.ps1)
  • All markdown files pass markdownlint

Metadata

Metadata

Assignees

Labels

needs-triageRequires triage and prioritization

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions