Skip to content

[GitHub] Add GitHub Copilot instructions for Kratos Multiphysics#14334

Open
loumalouomega wants to merge 1 commit intomasterfrom
github/copilot-instructions
Open

[GitHub] Add GitHub Copilot instructions for Kratos Multiphysics#14334
loumalouomega wants to merge 1 commit intomasterfrom
github/copilot-instructions

Conversation

@loumalouomega
Copy link
Copy Markdown
Member

📝 Description

Adds .github/copilot-instructions.md — a comprehensive set of repository-specific instructions for GitHub Copilot and other coding agents working in Kratos Multiphysics.

What's included

The file is structured in two parts: a Project Overview with technical context, and Instructions with actionable rules for agents and contributors.

Project Overview sections

  • Repository structure: Full directory tree covering kratos/ core, applications/ scaffold (including custom_python/, cpp_tests/, fast suite fixtures), scripts/, and external_libraries/.
  • Tech stack: C++20, Python 3.x, pybind11, CMake, GTest + KRATOS_EXPECT_* macros, KratosUnittest, Google Benchmark, GitHub Actions.
  • Build system: scripts/standard_configure.* as templates, build/configure.* as local customized copies, key CMake options and environment variables (KRATOS_BUILD_TYPE, KRATOS_SOURCE, KRATOS_APPLICATIONS, etc.).
  • Architecture & design: Core vs applications separation, C++ naming conventions (PascalCase methods, m/r/p prefixes), Python (PEP 8), pybind11 binding patterns.
  • Testing: KratosUnittest.TestCase for Python, KRATOS_TEST_CASE_IN_SUITE + KratosCoreFastSuite for C++, KRATOS_EXPECT_* vs KRATOS_CHECK_* distinction, test factory patterns, benchmark conventions.
  • CI/CD: GitHub Actions workflows (ci.yml, nightly_build.yml), Ubuntu gcc/clang matrix.
  • Key concepts table: ModelPart, Model, Node, Element, Condition, Process, Variable, ConstitutiveLaw, ProcessInfo, DataCommunicator, Kernel, Parameters.

Instruction sections

  1. Purpose and precedence rules
  2. Project identity and scope boundaries (external_libraries/ off-limits by default)
  3. Real repository layout and generated artifacts
  4. Build system workflow and environment variables
  5. VS Code tasks mapping (Build, MPI Build, Run Tests, Run C++ Test Suite, etc.)
  6. C++ coding conventions (naming, error handling, memory)
  7. Python conventions
  8. pybind11 binding conventions
  9. CMake / application pattern (GLOB_RECURSECore lib → pybind module → kratos_add_gtests → install)
  10. Testing conventions (C++, Python, MPI)
  11. CI/CD constraints
  12. Change checklist for coding agents
  13. Do / Don't summary
  14. Additional notes (application scaffolding, Elements/Conditions/Processes, branch naming)
  15. Maintenance guidance

Validation

Content cross-referenced against:

  • Root CMakeLists.txt (C++20 standard, build options)
  • scripts/standard_configure.sh / .bat (build flow, env vars)
  • build/configure.bat (local build config)
  • .vscode/tasks.json (all task labels)
  • .github/workflows/ci.yml and nightly_build.yml (CI structure)
  • applications/StructuralMechanicsApplication/ (application scaffold, test patterns, binding patterns)
  • kratos/testing/testing.h, kratos/includes/expect.h, kratos/includes/checks.h (test macros)
  • CONTRIBUTING.md (branch naming convention)

🆕 Changelog

@loumalouomega loumalouomega requested a review from a team as a code owner March 30, 2026 12:36
@loumalouomega loumalouomega added Documentation FastPR This Pr is simple and / or has been already tested and the revision should be fast GitHub Copilot labels Mar 30, 2026
@loumalouomega loumalouomega enabled auto-merge March 30, 2026 12:36
@AlejandroCornejo
Copy link
Copy Markdown
Member

nah I prefer @loumalouomega as our default LLM !!!

@loumalouomega
Copy link
Copy Markdown
Member Author

nah I prefer @loumalouomega as our default LLM !!!

But I don't have @loumalouomega to myself (Pablo doesn't know C++ yet), so I use Copilot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation FastPR This Pr is simple and / or has been already tested and the revision should be fast GitHub Copilot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants