Skip to content

Enhance Copilot instructions with Spack integration, formatting standards, and Git workflow#320

Merged
greenc-FNAL merged 5 commits intomainfrom
copilot/set-up-copilot-instructions
Feb 18, 2026
Merged

Enhance Copilot instructions with Spack integration, formatting standards, and Git workflow#320
greenc-FNAL merged 5 commits intomainfrom
copilot/set-up-copilot-instructions

Conversation

Copy link
Contributor

Copilot AI commented Feb 13, 2026

  • Add Spack package manager integration section
  • Expand Code Formatting Standards with C++, Python, and Jsonnet guidance
  • Add Git branch management guidance per reviewer feedback
  • Clarify setup-env.sh paths in Spack section per reviewer feedback
  • Distinguish agent-specific instructions from general guidance

Summary

Enhanced Copilot instructions with:

  1. Spack Integration: Document spack load pattern for tools, with explicit path references to scripts/setup-env.sh
  2. Code Formatting Standards: C++, Python, CMake, Jsonnet configurations (explicitly mentioning jsonnetfmt)
  3. Git Branch Management: Guidance to prevent accidental pushes to base branches
  4. Context Clarification: Added notes distinguishing instructions for AI agents working in CI containers (phlex-ci, phlex-dev) or devcontainers versus human developers who may use different local setups (e.g., native macOS, Linux with system packages, or their own Spack configurations)

All reviewer feedback has been addressed. The instructions now clearly indicate which guidance applies to specific development contexts, making them more useful for both automated agents and interactive human development.

<issue_title>✨ Set up Copilot instructions</issue_title>
><issue_description>Analyze and adjust instructions for this repository as documented in Best practices for Copilot coding agent in your repository.
> </issue_description>
>
><agent_instructions>When considering development environment, analyze the existing VSCode and codespace instructions in this repository, and be aware that applications made available via Spack can be brought into the current environment with spack load when required</agent_instructions>
>
> ## Comments on the Issue (you are @copilot in this section)
>
>
>

Original prompt

This section details on the original issue you should resolve

<issue_title>✨ Set up Copilot instructions</issue_title>
<issue_description>Analyze and adjust instructions for this repository as documented in Best practices for Copilot coding agent in your repository.
</issue_description>

<agent_instructions>When considering development environment, analyze the existing VSCode and codespace instructions in this repository, and be aware that applications made available via Spack can be brought into the current environment with spack load when required</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 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.

Copilot AI changed the title [WIP] Analyze and adjust Copilot instructions for repository Enhance Copilot instructions with Spack integration and formatting standards Feb 13, 2026
Copilot AI requested a review from greenc-FNAL February 13, 2026 15:19
@greenc-FNAL
Copy link
Contributor

@copilot Please adjust the instructions to ensure that when creating a branch for eventual pushing as a new upstream branch (e.g. for a PR), it should never have an upstream tracking branch even if created based on another branch. This eliminates the possibility of accidentally pushing commits to the base branch when pushing the new branch upstream.

Copy link
Contributor Author

Copilot AI commented Feb 13, 2026

@copilot Please adjust the instructions to ensure that when creating a branch for eventual pushing as a new upstream branch (e.g. for a PR), it should never have an upstream tracking branch even if cr...

Added Git branch management guidance in commit 0e16acb. The instructions now explicitly state that new PR branches should never have upstream tracking, with rationale and example workflow included.

Copilot AI changed the title Enhance Copilot instructions with Spack integration and formatting standards Enhance Copilot instructions with Spack integration, formatting standards, and Git workflow Feb 13, 2026
@greenc-FNAL
Copy link
Contributor

@phlexbot format

@github-actions
Copy link
Contributor

No automatic markdownlint fixes were necessary.

@github-actions
Copy link
Contributor

No automatic cmake-format fixes were necessary.

@github-actions
Copy link
Contributor

No automatic jsonnetfmt fixes were necessary.

@github-actions
Copy link
Contributor

No automatic clang-format fixes were necessary.

@greenc-FNAL greenc-FNAL marked this pull request as ready for review February 13, 2026 15:27
Copilot AI review requested due to automatic review settings February 13, 2026 15:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the repository’s Copilot instructions to better reflect established local/CI workflows around Git branching, Spack-based environments, and language-specific formatting tools.

Changes:

  • Adds Git branch management guidance to avoid accidentally pushing to the wrong branch.
  • Documents Spack usage patterns (including spack load <package>) and how setup-env.sh behaves when Spack is/ isn’t available.
  • Documents formatting/linting tooling for C++, Python, and Jsonnet to align with repo/CI configuration.

Copilot AI and others added 4 commits February 13, 2026 18:18
- Add Spack package manager integration section with common usage patterns
- Document C++ formatting (clang-format) and linting (clang-tidy) standards
- Document Python formatting (ruff) and type checking (mypy) configurations
- Document Jsonnet file formatting for workflow configurations
- Provide guidance on dependency installation via both Spack and system packages

Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com>
- Document that new PR branches should never have upstream tracking
- Explain rationale: prevents accidentally pushing to base branch
- Provide example workflow for creating and pushing feature branches
- Address feedback from @greenc-FNAL on PR comment

Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com>
- Change generic 'setup-env.sh' to explicit 'scripts/setup-env.sh'
- Update dependency installation guidance to mention both repository and workspace-level paths
- Addresses review feedback on line 165-166

Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com>
@greenc-FNAL greenc-FNAL force-pushed the copilot/set-up-copilot-instructions branch from 35e7529 to c43e5f8 Compare February 14, 2026 00:18
Copy link
Member

@knoepfel knoepfel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @greenc-FNAL. Just a couple comments

### Jsonnet Files

- Jsonnet configuration files (`.jsonnet`) are used for Phlex workflow configurations
- Follow consistent formatting as enforced by CI checks
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This instruction seems a little indirect--perhaps it's better to say Follow consistent formatting as enforced by jsonnetfmt?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We certainly could; this is AI's own wording, supposedly to be the most clear to itself. Presumably at this point it will read the workflows and work out what needs to be done?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I was thinking in the context of someone's interactive development environment via (e.g.) Visual Studio Code. If they're using an agent in their Copilot chat, won't this file be used for instructions? If so, it seems less likely that someone's interactive session would have ready access to the workflow logs than if they had access to jsonnetfmt. But maybe I'm misunderstanding the purpose of these instructions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The instructions were generated by AI specifically to improve agent behavior. I will try to distinguish agent-specific instructions from those relevant for interactive use.

@greenc-FNAL
Copy link
Contributor

@copilot Per the conversations started by @knoepfel's review comments, please adjust .github/copilot-instructions.md to clearly distinguish instructions relevant only to agents or web-UI copilot interactions (or to human developers working within a phlex-ci or phlex-dev container) from more general instructions, or those aimed at AI interactions with developers who might be working in a different environment (e.g. native MacOS or Linux with Spack, say).

- Add note clarifying environment setup applies to CI containers/devcontainers
- Clarify Spack integration section is for CI/container environments
- Update Jsonnet formatting to explicitly mention jsonnetfmt tool
- Address feedback to distinguish instructions for different development contexts

Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 18, 2026

@copilot Per the conversations started by @knoepfel's review comments, please adjust .github/copilot-instructions.md t...

Updated in commit a2feb26. Added notes at the beginning of "Workspace Environment Setup" and "Spack Package Manager Integration" sections to clarify these instructions apply primarily to AI agents working in CI containers (phlex-ci, phlex-dev) or devcontainers. Also made the Jsonnet formatting instruction more direct by explicitly mentioning jsonnetfmt.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@codecov
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main     #320      +/-   ##
==========================================
+ Coverage   80.19%   80.36%   +0.17%     
==========================================
  Files         126      127       +1     
  Lines        3070     3102      +32     
  Branches      547      547              
==========================================
+ Hits         2462     2493      +31     
  Misses        381      381              
- Partials      227      228       +1     
Flag Coverage Δ
unittests 80.36% <ø> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d703e4c...a2feb26. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@greenc-FNAL greenc-FNAL merged commit f508fb6 into main Feb 18, 2026
59 checks passed
@knoepfel knoepfel deleted the copilot/set-up-copilot-instructions branch February 24, 2026 20:58
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.

✨ Set up Copilot instructions

4 participants