Skip to content

docs: add coding guidelines and copilot instructions#482

Merged
microsasa merged 1 commit intomainfrom
docs/coding-guidelines
Mar 29, 2026
Merged

docs: add coding guidelines and copilot instructions#482
microsasa merged 1 commit intomainfrom
docs/coding-guidelines

Conversation

@microsasa
Copy link
Copy Markdown
Owner

Summary

Adds coding guidelines and wires them into the entire agent pipeline.

New files

Agent workflow updates

All 6 agent workflows now read and follow the guidelines:

  • issue-implementer.md — write code following guidelines
  • review-responder.md — fix review comments following guidelines
  • ci-fixer.md — don't introduce violations while fixing CI
  • quality-gate.md — verify compliance as part of merge evaluation
  • code-health.md — flag violations in existing code on main
  • test-analysis.md — context for coding standards

Code changes

  • logging_config.py — removed TYPE_CHECKING guard, replaced with runtime import loguru + string annotation (complies with new ban)
  • pyproject.toml — removed stale if TYPE_CHECKING: coverage exclusion
  • architecture.md / changelog.md — updated stale TYPE_CHECKING references

How it works

No new workflow needed. The existing pipeline handles everything:

  1. Implementer writes code following guidelines
  2. Copilot code review flags violations as review comments
  3. Orchestrator dispatches responder to fix violations
  4. Quality gate verifies compliance before merge
  5. Code-health finds violations in existing code on main

Closes #110

Copilot AI review requested due to automatic review settings March 29, 2026 04:05
Copy link
Copy Markdown

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

Adds repository-wide coding standards and ensures the agent workflows (and Copilot) explicitly read/follow them, while updating a small bit of code/docs to comply with the new TYPE_CHECKING ban.

Changes:

  • Add .github/CODING_GUIDELINES.md and .github/copilot-instructions.md to standardize contributor/agent behavior.
  • Update all agent workflow instruction files to reference the coding guidelines.
  • Remove TYPE_CHECKING-based typing import usage and related stale references (plus coverage exclusion cleanup).

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/copilot_usage/logging_config.py Removes TYPE_CHECKING guard and adds runtime import loguru to support loguru.Record annotation usage.
src/copilot_usage/docs/changelog.md Updates changelog entry to reflect the new logging import approach.
src/copilot_usage/docs/architecture.md Updates component documentation to reflect runtime loguru import approach.
pyproject.toml Removes coverage exclusion line for if TYPE_CHECKING:.
.github/workflows/test-analysis.md Instructs agent to read coding guidelines for standards context.
.github/workflows/review-responder.md Requires coding guideline compliance when addressing review comments.
.github/workflows/quality-gate.md Adds explicit guideline compliance verification step.
.github/workflows/issue-implementer.md Requires implementer to follow coding guidelines for all authored code.
.github/workflows/code-health.md Uses coding guidelines as the standard for flagging cleanup items.
.github/workflows/ci-fixer.md Requires coding guideline compliance when fixing CI.
.github/copilot-instructions.md Adds Copilot instruction pointer to the coding guidelines + repo layout overview.
.github/CODING_GUIDELINES.md Introduces repo-wide coding standards (typing, imports, error handling, testing, security, formatting).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/copilot_usage/logging_config.py
Add .github/CODING_GUIDELINES.md with coding standards for all
contributors (human and AI): type safety, data modelling, naming,
error handling, testing, security, formatting.

Add .github/copilot-instructions.md as a pointer — Copilot code review
automatically reads this file and follows the link to the guidelines.

Update all 6 agent workflow .md files (issue-implementer, review-responder,
ci-fixer, quality-gate, code-health, test-analysis) to read and follow
the guidelines.

Remove TYPE_CHECKING from logging_config.py — replaced with runtime
import loguru + string annotation, consistent with the new ban.

Remove stale TYPE_CHECKING coverage exclusion from pyproject.toml.
Update architecture.md and changelog.md to reflect the change.

Closes #110

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@microsasa microsasa force-pushed the docs/coding-guidelines branch from 8312d72 to 0a425c6 Compare March 29, 2026 04:45
@microsasa microsasa merged commit 7dffe1f into main Mar 29, 2026
5 checks passed
@microsasa microsasa deleted the docs/coding-guidelines branch March 29, 2026 04:50
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.

Add .github/copilot-instructions.md for repo-wide Copilot rules

2 participants