agentleFS
MicrosoftKnown publishermicrosoft/hve-core/.github/copilot-instructions.md

hve-core

Copilot instructions1.5k starsChanged 2 months agoMITView on GitHub

Comprehensive coding guidelines and instructions for hve-core

Trending

Less talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 5 mentionsMar 2026: 6 mentionsApr 2026: 2 mentionsMay 2026: 1 mentionJun 2026: 0 mentionsJul 2026: 5 mentionsAug 2026: 0 mentionsSep 2026: 1 mentionOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the microsoft/hve-core repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about microsoft/hve-core

The biggest 5 of 21 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 21

Talked about on GitHub, Hacker News and Bluesky (21 times).

On GitHub · 18

13 more on GitHub

On Hacker News · 2

The file

Show its rules and text

We split this copilot-instructions.md into the rules it gives an agent

14 rules. About 0 are common, 3 are distinctive, and 11 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 11

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before a dependency-backed npm command, establish the relevant package root with npm ci when no successful installation for its current …

    line 17
  2. Very specific:

    When editing any Markdown file whose frontmatter already contains an ms.date field, update that field to today's date.

    line 30
  3. Very specific:

    When a prompt, agent, or instruction uses #file::

    line 83
  4. Very specific:

    Use relative paths; do not use absolute paths or a .github/ prefix.

    line 87
  5. Distinctive:

    Ensure every distributable cross-kind target is included by the plugin manifest's tracked path-and-license classification.

    line 89
  6. Very specific:

    After adding, changing, moving, or removing a distributable artifact, run npm run plugin:sync to update the manifest.

    line 143
  7. Very specific:

    Run npm run extension:prepare or npm run extension:prepare:prerelease to refresh the single extension/package.json and extension/README.md.

    line 145
  8. Very specific:

    Run npm run plugin:validate to confirm the manifest, one-entry locator, and component coverage are correct.

    line 147
  9. Distinctive:

    Commit message scopes map to repository directories:

    line 163
  10. Very specific:

    Test directories follow the pattern scripts/tests/{category}/Test-*.Tests.ps1.

    line 187
  11. Very specific:

    Test organization mirrors source: scripts/linting/ tests live in scripts/tests/linting/, scripts/security/ tests live in …

    line 188
  12. Distinctive:

    Use package scripts for applicable validation.

    line 224
  13. Very specific:

    Run specific tests by passing a -TestPath argument:

    line 240
  14. Very specific:

    Test results are always written to the logs/ directory:

    line 247

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

General Instructions

Items in the Highest Priority Rules section from attached instructions files override any conflicting guidance.

<!-- <highest-priority-rules> -->

Priority Rules

  • Conventions and styling from the codebase take precedence for all changes.
  • Instructions files not already attached are read before deciding on edits.
  • Breaking changes are acceptable.
  • Backward-compatibility layers or legacy support are added only when explicitly requested.
  • Tests, scripts, and one-off markdown docs are created or modified only when the requested change or its directly required support work needs them.
  • Before a dependency-backed npm command, establish the relevant package root with npm ci when no successful installation for its current lockfile is known. Treat the repository root and docs/docusaurus independently; do not substitute npm install or reinstall a known-current root.
  • Generic validation uses local-safe commands and does not select ci:* commands. A command in a plan, README, template, prior log, catalog, or error is a reference, not an execution request. A task that specifically asks to run or reproduce a named CI lane may use its ordinary ci:* command.
  • Browser installation, model or moderation environments, service startup, credentials, execution outside the sandbox, interactive UI, and adjacent CI lanes are separate actions. Do not infer them from generic validation or a failed command.

Rules for comments:

  • Remain brief and factual, describing behavior, intent, invariants, and edge cases.
  • Thought processes, step-by-step reasoning, and narrative comments do not appear in code.
  • Comments that contradict current behavior are removed or updated.
  • Temporal markers (phase references, dates, task IDs) are removed from code files during any edit.

Rules for markdown frontmatter:

  • When editing any Markdown file whose frontmatter already contains an ms.date field, update that field to today's date.
  • Format the date using ISO 8601 (YYYY-MM-DD), matching the existing ms.date convention.

Rules for human review checkboxes:

  • Agents never check or mark complete any human review checkbox (for example, - [ ] Reviewed and validated by a qualified human reviewer). Only a human may convert [ ] to [x] on review checkboxes.
  • Backlog managers must verify that all human review checkboxes are checked before processing artifacts into a backlog. If any checkbox is unchecked, halt processing and inform the user that human review is required first.

Rules for fixing errors:

  • Fix directly blocking or in-scope problems. Record unrelated problems without widening source changes or command execution silently.
  • Root-cause fixes are preferred over symptom-only patches.
  • Further investigation of the codebase or through tools is always allowed.
<!-- </highest-priority-rules> --><!-- <project-structure> -->

Project Structure

This repository contains documentation, scripts, and tooling for the HVE (Hyper Velocity Engineering) Core project.

Directory Organization

The project is organized into these main areas:

  • Documentation (docs/) - Getting started guides, templates, RPI workflow documentation, and contribution guidelines.
  • Scripts (scripts/) - Automation for linting, security validation, extension packaging, and development tools.
  • Skills (.github/skills/{package-id}/) - Self-contained skill packages, by convention organized by package.
  • Extension (extension/) - VS Code extension source and packaging.
  • GitHub Configuration (.github/) - Workflows, instructions, prompts, agents, composite actions, and issue templates, typically organized into {package-id} subdirectories.
  • Plugin manifest (plugin.json) - Deterministic membership and metadata for the sole hve-core plugin.
  • Plugin locator (.github/plugin/marketplace.json) - One relative marketplace entry that points to .github.
  • Logs (logs/) - Output from validation and analysis scripts.

Scripts Organization

Scripts are organized by function:

  • Shared artifact libraries (scripts/lib/Modules/) - Reusable artifact and validation helpers.
  • Extension (scripts/extension/) - Extension packaging and preparation.
  • Linting (scripts/linting/) - Markdown validation, link checking, frontmatter validation, model reference validation, and PowerShell analysis.
  • Devcontainer (scripts/devcontainer/) - Lockfile integrity validation and infrastructure change log generation.
  • Security (scripts/security/) - Dependency pinning validation, SHA staleness checks, and action version consistency.
  • Library (scripts/lib/) - Shared utilities such as verified downloads.
  • Plugins (scripts/plugins/) - Plugin manifest synchronization and validation.

Skills Organization

By convention, skills are self-contained packages organized under .github/skills/{package-id}/{skill-name}/. Each skill folder contains a SKILL.md file with domain-specific instructions, and may include other markdown files that are referenced by SKILL.md along with scripts/, references/, assets/, or other subdirectories.

Cross-Kind Artifact References

Generic authoring guidance uses portable paths such as .github/skills/<skill>/SKILL.md and does not assume a package directory. HVE-Core packaging may add a {package-id} layer as an optional host packaging convention.

When a prompt, agent, or instruction uses #file::

  • Resolve the path relative to the containing file, not the workspace root.
  • Preserve the original artifact suffix, such as .instructions.md, .agent.md, or .prompt.md.
  • Use relative paths; do not use absolute paths or a .github/ prefix. Plugin and extension packaging strip .github/ while preserving relative depth between artifact-kind directories.
  • For example, from .github/agents/{package-id}/, a same-package instruction target uses #file:../../instructions/{package-id}/name.instructions.md.
  • Ensure every distributable cross-kind target is included by the plugin manifest's tracked path-and-license classification.

Documentation Structure

  • HVE Guide (docs/hve-guide/) - Project lifecycle stages and role-specific guides.
    • Lifecycle (docs/hve-guide/lifecycle/) - AI-assisted project lifecycle stage documentation.
    • Roles (docs/hve-guide/roles/) - Role-specific guides for engineers, leads, architects, and other contributors.
  • Getting Started (docs/getting-started/) - Installation and first workflow guides with multiple setup methods.
  • RPI (docs/rpi/) - Research, Plan, Implement, Review, and Follow-up workflow documentation.
  • Contributing (docs/contributing/) - Guidelines for instructions, prompts, agents, and AI artifacts.
  • Templates (docs/templates/) - Templates for custom agents, instructions, and prompts.

Documentation Templates

Templates for agent and prompt outputs are stored in docs/templates/:

  • docs/templates/full-review-output-format.md - Code review full output format.
  • docs/templates/standards-review-output-format.md - Standards review output format.
  • docs/templates/engineering-fundamentals.md - Engineering fundamentals reference.
  • docs/templates/user-journey-template.md - User journey template.
  • docs/templates/adr-template-solutions.md - Architecture decision record template.
  • docs/templates/rca-template.md - Root cause analysis template.

The canonical Business Requirements Document template lives in .github/skills/project-planning/requirements-author/templates/brd/brd-full.md as part of the requirements-author skill.

Copilot Tracking

The .copilot-tracking/ directory (gitignored) contains AI-assisted workflow artifacts:

  • Work Items (.copilot-tracking/workitems/) - ADO work item discovery and planning.
  • Pull Requests (.copilot-tracking/pr/) - PR reference generation, handoff, and review tracking.
  • Changes (.copilot-tracking/changes/) - Implementation changes, amendments, and divergences.
  • Plans (.copilot-tracking/plans/) - Ordinary plan checklists.
  • Research (.copilot-tracking/research/) - Technical research findings and subagent research outputs.
  • Reviews (.copilot-tracking/reviews/) - Completed review evidence.
    • Architecture reviews (.copilot-tracking/reviews/architecture/) - System Architecture Reviewer records that preserve review analysis while linked ADRs retain decision authority.
  • ADRs (.copilot-tracking/adrs/) - Architecture Decision Record drafts.
  • BRD Sessions (.copilot-tracking/brd-sessions/) - Business requirements document session state.
  • PRD Sessions (.copilot-tracking/prd-sessions/) - Product requirements document session state.
  • GitHub Issues (.copilot-tracking/github-issues/) - GitHub issue search, triage, and workflow tracking.
  • HVE Builder (.copilot-tracking/hve-builder/) - Prompt-engineering discovery, authoring, review, and validation evidence.
  • Documentation (.copilot-tracking/documentation/) - Documentation workflow session tracking.
  • Challenges (.copilot-tracking/challenges/YYYY-MM-DD/) - Challenge session Q&A logs, unresolved items, and scope records from rpi-challenger sessions.

RPI and HVE Builder tracking records follow .github/instructions/hve-core/copilot-tracking.instructions.md; ADO, Jira, and GitHub backlog tracking follows its domain-specific instructions. Every workflow resolves the tracking folder location and searches its gitignored files as .github/instructions/hve-core/copilot-tracking-location.instructions.md defines.

Agents and Subagents

By convention, custom agents are organized under .github/agents/{package-id}/. Each package typically places its agents in a dedicated subdirectory (e.g., .github/agents/hve-core/, .github/agents/ado/). Subagents are typically organized under .github/agents/{package-id}/subagents/. Parent agents reference subagents using glob paths like .github/agents/**/code-review-functional.agent.md so resolution works regardless of nesting depth.

The plugin manifest owns plugin and VSIX composition:

  • Root plugin.json owns the complete hve-core component membership: package-scoped agents, prompts, instructions, and distributable skills discovered from tracked .github paths. The manifest declares no hooks. Hooks support was removed with the telemetry hook, so a committed hooks field is reported as drift rather than preserved. .github/plugin/marketplace.json contains one relative locator to the repository root and no component recipe.
  • After adding, changing, moving, or removing a distributable artifact, run npm run plugin:sync to update the manifest. Run npm run plugin:validate to check manifest drift, marketplace parity and containment, and component coverage.
  • The installable plugin root is the repository root. Artifact discovery remains limited to package-scoped .github paths; do not materialize a copied plugin tree or create a repository-root plugins/ directory.
  • Run npm run extension:prepare or npm run extension:prepare:prerelease to refresh the single extension/package.json and extension/README.md. Stable and PreRelease contain the same component set.
  • After adding, changing, moving, or removing a documentable agent, prompt, instruction, or skill, run npm run docs:generate and commit the matching page under docs/reference/. The generator owns page frontmatter and the prefix through <!-- END AUTO-GENERATED: overview -->; edit only the preserved When to use it, applicable How to use it, and Example usage tail. Do not edit generated regions or catalog indexes by hand.
  • Run npm run plugin:validate to confirm the manifest, one-entry locator, and component coverage are correct.
<!-- </project-structure> --><!-- <script-operations> -->

Script Operations

  • Scripts follow instructions provided by the codebase for convention and standards.
  • Scripts used by the codebase have an npm run script for ease of use.
  • A root plugins/ directory is forbidden as validation or package output. Do not create, edit, or stage one.
  • The plugin uses the repository root directly. Synchronize root plugin.json; do not generate plugin output or ZIP packages.
  • Artifacts at the root of .github/agents/, .github/instructions/, .github/prompts/, or .github/skills/ (without a package subdirectory) are repo-specific and excluded from plugin membership and extension packaging. Validation enforces this rule.

PowerShell scripts follow PSScriptAnalyzer rules from scripts/linting/PSScriptAnalyzer.psd1 and include proper comment-based help. Validation runs via npm run lint:ps with results output to logs/.

Commit Message Scopes

Commit message scopes map to repository directories:

  • (agents) = .github/agents/
  • (prompts) = .github/prompts/
  • (instructions) = .github/instructions/
  • (skills) = .github/skills/
  • (templates) = .github/ISSUE_TEMPLATE/
  • (workflows) = .github/workflows/
  • (extension) = extension/
  • (scripts) = scripts/
  • (docs) = docs/
  • (adrs) = Architecture Decision Records
  • (settings) = Configuration files (.vscode/, linter configs)
  • (build) = Build system and dependencies
  • (ci) = CI/CD configuration changes

Frontmatter Schema Validation

Frontmatter schemas are stored in scripts/linting/schemas/. Schema-to-file mapping is defined in scripts/linting/schemas/schema-mapping.json. Run npm run validate:frontmatter or pwsh scripts/linting/Validate-MarkdownFrontmatter.ps1 to validate.

PowerShell Conventions

  • Copyright header validation: scripts/linting/Test-CopyrightHeaders.ps1 (also used by bash scripts).
  • Shared CI helpers module: scripts/lib/Modules/CIHelpers.psm1.
  • Test directories follow the pattern scripts/tests/{category}/Test-*.Tests.ps1.
  • Test organization mirrors source: scripts/linting/ tests live in scripts/tests/linting/, scripts/security/ tests live in scripts/tests/security/.

Documentation Operations

The Documentation agent scans these directories for documentation coverage analysis:

  • docs/ - Primary documentation tree.
  • scripts/ - Script-level markdown files and inline documentation.
  • extension/ - Extension packaging documentation.
  • .github/ - Agent, prompt, instruction, and skill documentation.

Validation commands for documentation quality:

  • npm run lint:md - Markdown linting.
  • npm run lint:frontmatter - Frontmatter validation.
  • npm run lint:md-links - Markdown link checking.
  • Parse JSON output from logs/ when available for structured validation results.
<!-- </script-operations> --><!-- <coding-agent-environment> -->

Coding Agent Environment

Copilot Coding Agent uses a cloud-based GitHub Actions environment, separate from the local devcontainer. The .github/workflows/copilot-setup-steps.yml workflow pre-installs tools to match devcontainer capabilities.

Pre-installed Tools

  • Node.js 24 with npm dependencies from package.json
  • Python 3.11
  • uv and uvx for Python package management and skill dependency sync
  • PowerShell 7 with PSScriptAnalyzer, PowerShell-Yaml, and Pester 5.7.1 modules
  • shellcheck for bash script validation (pre-installed on ubuntu-latest)
  • actionlint for GitHub Actions workflow validation
  • cosign for artifact manifest signing

Using npm Scripts

Use package scripts for applicable validation. Start with the local-safe aggregate or a targeted check, and use the validation guide for CI-owned lane prerequisites and direct local reproduction.

  • npm run validate:local - Run the non-mutating, locally safe repository validation aggregate
  • npm run validate:docs - Run non-mutating documentation lint, label, type, and component checks
  • npm run lint:tables - Check Markdown table formatting without modifying files
  • npm run format:tables - Markdown table formatting
  • npm run lint:md:fix - Apply the explicit Markdown fixer
  • npm run lint:<area> - Run the targeted non-mutating check that owns the changed area
  • npm run test:ps -- -TestPath <path> - Run bounded PowerShell tests
  • npm run test:ps - PowerShell tests
  • npm run test:py - Python tests via pytest

PowerShell Testing

PowerShell tests run exclusively through npm run test:ps. Never invoke Pester or test scripts directly.

Run specific tests by passing a -TestPath argument:

npm run test:ps -- -TestPath "scripts/tests/linting/"
npm run test:ps -- -TestPath "scripts/tests/security/Test-DependencyPinning.Tests.ps1"

Test results are always written to the logs/ directory:

  • logs/pester-summary.json - Overall pass/fail counts, duration, and result status.
  • logs/pester-failures.json - Failure details including test name, file path, error message, and stack trace.

Inline execution protocol

Pipe output through tail to capture the summary:

npm run test:ps 2>&1 | tail -20
npm run test:ps -- -TestPath "scripts/tests/linting/" 2>&1 | tail -20

After the command completes, read logs/pester-summary.json to confirm overall status. If failures exist, read logs/pester-failures.json to identify which tests failed and why. If logs/pester-summary.json does not exist, review the terminal output for startup errors. Use tools that include ignored files when searching the logs/ directory since it is gitignored.

Python Skill Configuration

Python skills include a pyproject.toml validated by validate:skills via Test-PythonSkillConfig. Required and recommended sections:

  • [tool.ruff] - Required. Enables lint:py compatibility across all Python skills.
  • [tool.ruff.lint] - Recommended. Configures rule selection (e.g., select = ["E", "F", "I", "W"]).
  • [tool.pytest.ini_options] - Required when the skill contains a tests/ directory.
  • tests/fuzz_harness.py - Required when the skill contains a tests/ directory. Polyglot Atheris fuzz harness for OSSF Scorecard compliance.
  • fuzz dependency group with atheris>=3.0 - Required alongside fuzz_harness.py. Kept separate from dev (no macOS wheels).
  • python_files = ["test_*.py", "fuzz_harness.py"] in [tool.pytest.ini_options] - Required alongside fuzz_harness.py. Enables pytest discovery.
  • ruff in dev dependencies - Recommended. Ensures the linter is available in the skill's virtual environment.
  • uv.lock - Required at the skill root when Python dependencies exist. Skills must commit both pyproject.toml and uv.lock so Dependabot can resolve and patch vulnerable dependencies via the .github/skills/** uv glob.

PowerShell Module Installation in Workflows

Workflows install PowerShell modules via the composite action .github/actions/setup-ps-modules/action.yml. This action caches modules keyed on scripts/security/ps-module-versions.json and retries installation with exponential backoff on PSGallery failures. The action always installs to CurrentUser scope because the cache path is hardcoded to the CurrentUser module location. Do not use inline Install-Module steps in workflows; use the composite action instead. The copilot-setup-steps.yml workflow calls scripts/security/Install-PSModules.ps1 directly with -Scope CurrentUser because the Copilot coding-agent runner is not elevated; AllUsers targets /usr/local/share/powershell/Modules and fails with admin-rights errors that retries cannot recover. CurrentUser installs to the same runner user's module path the agent reads, so no caching or elevation is required.

Environment Synchronization

The copilot-setup-steps.yml and .devcontainer/scripts/on-create.sh share most tools but differ intentionally: gitleaks is devcontainer-only (not needed during agent-driven development). When adding or removing tools in either environment, evaluate whether both need the change and update accordingly.

<!-- </coding-agent-environment> -->

🤖 Crafted with precision by ✨Copilot following brilliant human instruction, then carefully refined by our team of discerning human reviewers.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.