Skip to content

Add .github/copilot-instructions.md for AI coding agent guidance - #9

Closed
Sun Haoran (haoranpb) with Copilot wants to merge 2 commits into
mainfrom
copilot/update-copilot-instructions-file
Closed

Add .github/copilot-instructions.md for AI coding agent guidance#9
Sun Haoran (haoranpb) with Copilot wants to merge 2 commits into
mainfrom
copilot/update-copilot-instructions-file

Conversation

Copilot AI commented Oct 8, 2025

Copy link
Copy Markdown
Contributor

Overview

This PR adds .github/copilot-instructions.md to provide essential guidance for AI coding agents working on the BC-Bench codebase. The file focuses on discoverable patterns and architectural knowledge that would help agents be immediately productive in this Business Central benchmarking project.

What's Included

The instructions document (100 lines) covers:

Architecture & Data Flow

  • Core components: Python CLI (src/bcbench/), JSONL dataset (dataset/), PowerShell modules (scripts/powershell/), VS Code extension
  • Complete data flow: Collection from Azure DevOps → Validation → Agent execution → Evaluation with FAIL_TO_PASS tests

Critical BC-Specific Patterns

  • Dataset schema: BC-specific fields like environment_setup_version (e.g., "25.0") and project_paths, plus test format using {codeunitID, functionName[]} instead of class::method notation
  • PowerShell-first environment: Agent actions are PowerShell commands with custom bc_build and bc_test commands, no persistent shell state
  • Lazy imports pattern: Conditional imports of mini-swe-agent to avoid startup message pollution
  • Logging hierarchy: Use of get_logger(__name__) to maintain proper bcbench logger hierarchy

Essential Commands & Workflows

  • Development setup (pip install -e .)
  • Common workflows (collect, validate, agent execution)
  • Key files to reference for understanding the system

Early-Stage Emphasis

The instructions explicitly note the project is in early stages and emphasize keeping changes simple to enable fast iteration—avoiding premature optimization and focusing on validation through CLI commands rather than comprehensive test suites.

Why This Matters

As noted in the README, BC-Bench evaluates AI coding agents on Business Central (AL) development tasks. Having clear instructions helps AI agents:

  • Understand the PowerShell-centric workflow for BC container management
  • Navigate the SWE-Bench-inspired dataset schema with BC-specific extensions
  • Work with the mini-swe-agent integration and custom BC environment
  • Respect the early-stage nature of the project when making contributions

References

Original prompt

Analyze this codebase to generate or update .github/copilot-instructions.md for guiding AI coding agents.

Focus on discovering the essential knowledge that would help an AI agents be immediately productive in this codebase. Consider aspects like:

  • The "big picture" architecture that requires reading multiple files to understand - major components, service boundaries, data flows, and the "why" behind structural decisions
  • Critical developer workflows (builds, tests, debugging) especially commands that aren't obvious from file inspection alone
  • Project-specific conventions and patterns that differ from common practices
  • Integration points, external dependencies, and cross-component communication patterns

Source existing AI conventions from **/{.github/copilot-instructions.md,AGENT.md,AGENTS.md,CLAUDE.md,.cursorrules,.windsurfrules,.clinerules,.cursor/rules/**,.windsurf/rules/**,.clinerules/**,README.md} (do one glob search).

Guidelines (read more at https://aka.ms/vscode-instructions-docs):

  • If .github/copilot-instructions.md exists, merge intelligently - preserve valuable content while updating outdated sections
  • Write concise, actionable instructions (~20-50 lines) using markdown structure
  • Include specific examples from the codebase when describing patterns
  • Avoid generic advice ("write tests", "handle errors") - focus on THIS project's specific approaches
  • Document only discoverable patterns, not aspirational practices
  • Reference key files/directories that exemplify important patterns

Update .github/copilot-instructions.md for the user, then ask for feedback on any unclear or incomplete sections to iterate.

The guidlines should reflect that the project is still in early stages so AI should keep things simple so we can fast iterate
Analyze this codebase to generate or update .github/copilot-instructions.md for guiding AI coding agents.

Focus on discovering the essential knowledge that would help an AI agents be immediately productive in this codebase. Consider aspects like:

  • The "big picture" architecture that requires reading multiple files to understand - major components, service boundaries, data flows, and the "why" behind structural decisions
  • Critical developer workflows (builds, tests, debugging) especially commands that aren't obvious from file inspection alone
  • Project-specific conventions and patterns that differ from common practices
  • Integration points, external dependencies, and cross-component communication patterns

Source existing AI conventions from **/{.github/copilot-instructions.md,AGENT.md,AGENTS.md,CLAUDE.md,.cursorrules,.windsurfrules,.clinerules,.cursor/rules/**,.windsurf/rules/**,.clinerules/**,README.md} (do one glob search).

Guidelines (read more at https://aka.ms/vscode-instructions-docs):

  • If .github/copilot-instructions.md exists, merge intelligently - preserve valuable content while updating outdated sections
  • Write concise, actionable instructions (~20-50 lines) using markdown structure
  • Include specific examples from the codebase when describing patterns
  • Avoid generic advice ("write tests", "handle errors") - focus on THIS project's specific approaches
  • Document only discoverable patterns, not aspirational practices
  • Reference key files/directories that exemplify important patterns

Update .github/copilot-instructions.md for the user, then ask for feedback on any unclear or incomplete sections to iterate.

The guidlines should reflect that the project is still in early stages so AI should keep things simple so we can fast iterate

Created from VS Code via the [GitHub Pull Request](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github) extension.

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: haoranpb <27280733+haoranpb@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Copilot instructions for AI coding agents Add .github/copilot-instructions.md for AI coding agent guidance Oct 8, 2025
@haoranpb
Sun Haoran (haoranpb) deleted the copilot/update-copilot-instructions-file branch October 9, 2025 13:46
Marko Aleksandric (AleksandricMarko) added a commit that referenced this pull request Jul 31, 2026
…ding

Applies Haoran's review feedback for the extensibility-request categories:

- Rename to explicit `extensibility-request-implement` / `extensibility-request-triage`
  across category ids, enum members, classes, dataset files and module files (#1/#2/#4).
- Slim both prompt templates to reflect real-world usage; category-specific rules now
  live in the ai-ext-fix / argus-triage skills (#3).
- Merge duplicate `bcbench.results` import in commands/evaluate.py (#5).
- Uptake #761: both ext entries subclass `RepoGroundedEntry` (#6/#7).
- Triage `patch` defaults to None; stripped from the dataset (#8).
- Constrain triage label fields with a `ManagedLabel` Literal to catch dataset typos (#9).
- Move the ext dataset classes into dataset/extensibility_request.py, like code review (#10).
- Drop `fetch_commit_if_missing` from both ext pipelines to match the other pipelines (#11).
- Keep ext-implement judge-only for now; container build/publish noted as future work (#12).
- Grade triage with the NL2AL LMChecklist instead of the code-review-style hybrid:
  `ExtRequestTriageResult` removed in favour of `JudgeBasedEvaluationResult`, expected_*
  fields replaced by an `expected` checklist, evaluators `lm_checklist`, core score
  `test_passed`; 17 triage entries migrated (#13/#14/#15/#16).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: fb712366-b026-470c-9d09-1bd9e9f52a31
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.

2 participants