Add .github/copilot-instructions.md with coding conventions#88
Merged
Conversation
Closes #53 Create copilot-instructions.md (98 lines) with project-specific guidance for GitHub Copilot covering: - Language & runtime (Python 3.10+, future annotations, type hints) - Code style (Ruff config matching pyproject.toml) - Architecture rules (Pydantic models, exception hierarchy, no LLM in executor) - Project layout (key files/dirs for fast Copilot orientation) - Testing conventions (pytest, fixtures, assertions) - Validation commands (lint, format, mypy, pytest matching CI) - PR conventions - Anti-patterns (never generate these) - Trust these instructions footer (per GitHub best practices)
There was a problem hiding this comment.
Pull request overview
Adds repository-scoped GitHub Copilot guidance for ChainWeaver to help generated code match the project’s Python/runtime constraints, style/tooling, layout, testing conventions, and PR hygiene.
Changes:
- Introduces
.github/copilot-instructions.mdwith language/runtime rules, Ruff/mypy/pytest commands, architecture constraints, and anti-patterns. - Documents project layout to reduce agent search and improve navigation context.
- Establishes Copilot-specific PR conventions and “trust these instructions” guidance.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
.github/copilot-instructions.md(98 lines) with repository-level coding guidance for GitHub Copilot[tool.ruff.lint.isort]/known-first-party = ["chainweaver"]topyproject.tomlto back the import-order claim in the instructions file (behavior-preserving — codifies Ruff's auto-detection)Sections included
from __future__ import annotations, type annotationspyproject.tomlexactly)ruff check,ruff format --check,mypy,pytest(matches CI)Why
Closes #53
Without this file, Copilot has no project-specific guidance on coding style, testing patterns, import organization, or validation commands. This complements
AGENTS.md(architecture context) with coding conventions scoped to Copilot specifically.How verified
ruff check chainweaver/ tests/ examples/— all checks passedruff format --check chainweaver/ tests/ examples/— 13 files already formattedpython -m pytest tests/ -v— 46 passed, 0 failedAcceptance criteria checklist
.github/copilot-instructions.mdexistspyproject.toml[tool.ruff]section.github/workflows/ci.yml)Tradeoffs / risks
pyproject.toml, this file must be updated in the same PR. This convention is documented in the file itself (PR conventions section).Scope notes
.github/copilot-instructions.md— new documentation file (98 lines)pyproject.toml— added[tool.ruff.lint.isort]withknown-first-party = ["chainweaver"]to explicitly back the import-order claim in the instructions file. This is behavior-preserving (codifies Ruff's existing auto-detection).