Thanks for improving HPC-AI-Optimization-Lab.
This repository is in a finishing-and-hardening phase. The goal is not to expand scope aggressively; it is to leave the project clean, credible, and easy to understand. Contributions should reduce drift, clarify intent, and keep the repository maintainable.
| Topic | Canonical location |
|---|---|
| Public overview | README.md, README.zh-CN.md |
| User-facing docs and Pages content | docs/ |
| Canonical requirements | openspec/specs/ |
| Active change scope | openspec/changes/<change>/ |
| Human workflow | CONTRIBUTING.md |
| Shared AI workflow | AGENTS.md |
| Tool-specific AI guidance | CLAUDE.md, .github/copilot-instructions.md |
| Release summary | CHANGELOG.md |
| Detailed release notes | changelog/ |
If a lower-value file duplicates one of these sources, prefer the canonical source and remove or rewrite the duplicate.
Non-trivial work uses OpenSpec.
- Investigate with
/opsx:explorewhen requirements or tradeoffs are unclear. - Create a bounded change with
/opsx:propose. - Refine proposal, specs, design, and tasks until the change is apply-ready.
- Implement with
/opsx:applyor equivalent task-by-task execution. - Run
/reviewbefore merge. - Archive the completed change with
/opsx:archive.
- Prefer small serial changes over long-lived parallel branches.
- Prefer one long
autopilotsession over/fleetunless the work is genuinely parallel and worth the extra cost. - Keep cleanup changes aggressive but safe: delete low-value drift only after a stronger canonical replacement exists.
hpc-ai-optimization-lab/
├── src/ CUDA/C++ implementation
├── tests/ automated tests
├── examples/ runnable examples
├── python/ nanobind bindings and Python-side code
├── docs/ user-facing docs and Pages content
├── openspec/ canonical specs, active changes, archives
├── changelog/ detailed release notes and historical notes
└── .github/ GitHub workflows and templates
Keep the repository root high-signal. Root files should usually be project identity, governance, or build-entry files rather than temporary summaries.
Use the CMake presets before inventing local variants:
cmake --preset default
cmake --build --preset default
ctest --preset defaultIf the current build tree is stale or incomplete, reconfigure first. Do not treat a zero-test build tree as authoritative.
- Primary C++/CUDA language server:
clangd - Primary input for
clangd:compile_commands.jsongenerated by CMake - Optional CMake editor support is fine if it reduces friction, but keep the baseline tool-agnostic
- Python-specific editor tooling is only necessary when touching bindings or benchmark code
Install hooks with:
pip install pre-commit
pre-commit installThe hook set is intentionally narrow. If a hook does not protect a recurring repository-specific failure mode, remove or simplify it rather than adding more automation.
Use gh for repository metadata, workflow inspection, and issue/PR operations. Keep GitHub-facing changes scoped and deliberate.
- Repository-level Copilot instructions live at
.github/copilot-instructions.md. - Repository-level LSP configuration lives at
.github/lsp.json. - The default LSP path for this project is
clangdbacked bycompile_commands.json. .clangdpointsclangdatbuild/default, socmake --preset defaultis the expected first setup step.- If you previously built into a legacy top-level
build/tree, reruncmake --preset defaultsobuild/default/compile_commands.jsonbecomes the active compilation database forclangd. - Use
/lspto inspect or enable the configured repo-level language server profile in Copilot CLI. - Use
/remoteonly to continue the same bounded workflow from GitHub/web surfaces; do not use it to create parallel drift. - Use
/researchfor genuinely external or fast-moving information, not for questions answerable from the local repo. - Use
/mcpand/pluginsparingly. Prefer built-in skills, local files, andghunless an additional integration provides repeated concrete value for this repository.
Before merging:
- the change is backed by an OpenSpec change when the scope is non-trivial
- docs and governance files point to the same source of truth
- validation commands and limitations are stated honestly
- unnecessary duplication is removed rather than preserved
/reviewhas been run for meaningful changes
- long-lived feature branches
- broad plugin bundles
- heavy MCP integrations
- generic assistant boilerplate
- extra docs that merely repeat README, specs, or existing guidance