Skip to content

ci(review): add L9 Copilot code-review instructions + org rollout handoff#4

Merged
cryptoxdog merged 2 commits into
mainfrom
claude/copilot-code-review-config
Jul 20, 2026
Merged

ci(review): add L9 Copilot code-review instructions + org rollout handoff#4
cryptoxdog merged 2 commits into
mainfrom
claude/copilot-code-review-config

Conversation

@cryptoxdog

Copy link
Copy Markdown
Collaborator

Summary

Adds the LLM reviewer layer (Copilot code review) as code, org-wide, auto-run on PR open/update — complementary to, and explicitly non-overlapping with, the deterministic tools (ruff, CodeQL security-and-quality, mypy). Separate PR from the CodeQL centralization work (#3), branched off main.

What's in this PR

File Role
.github/copilot-instructions.md L9-tuned Copilot review instructions. Anti-overlap section (ruff owns style/imports, CodeQL owns unused/dead code + security, mypy owns types) so the two reviewers don't talk over each other; focuses Copilot on logic / edge cases / fail-closed / missing tests, and surfaces L9 house rules (Quantum-L9 org invariant, L9_META/DORA headers, no print/eval, honest PASS/FAIL). Also the canonical template to copy to every repo.
docs/handoffs/COPILOT_REVIEW_ROLLOUT_HANDOFF.md GMP-format handoff: copy the instructions file to each Quantum-L9 repo (it isn't centrally inherited) + apply an org-wide ruleset that auto-requests Copilot review on PR open/update — UI click-path (authoritative) plus an as-code JSON template with a "verify the rule key" caveat.

Design notes (honest)

  • Instructions are advisory LLM nudges, not enforcement. Hard invariants stay in deterministic gates (L9-Ops-MCP/scripts/validate_org_invariants.py, coding-kernel CI). The file references invariants; it is not load-bearing for them.
  • .github/copilot-instructions.md is read from the repo being reviewed — not inherited from a central repo — so "org-wide" = template + per-repo copy (handoff covers it), same shape as the CodeQL caller rollout.
  • Guardrail: suggestions only, no auto-commit; a human commits every change.

Prerequisite / verification

  • Requires a Copilot Business/Enterprise license (no license → no reviewer).
  • LLM review can't be exercised locally. Verification (in the handoff) is: enable the ruleset → open a PR → confirm Copilot is auto-requested and its comments respect the instructions (doesn't nitpick line length; flags a planted non-Quantum-L9 URL / missing L9_META). Not claimed working until that's observed.

Related, not in this PR

  • Moving ORG_INVARIANTS.yaml's canonical home to Cursor-Governance (separate migration; touches L9-Ops-MCP's gate) — offered as a follow-up.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Rr6wpk9eehnJdRmh5BwWGG


Generated by Claude Code

…doff

Adds the LLM reviewer layer as code, complementary to (not overlapping) the
deterministic tools:

- .github/copilot-instructions.md: L9-tuned Copilot code-review instructions.
  Explicit anti-overlap (ruff owns style/imports, CodeQL security-and-quality
  owns unused/dead code + security, mypy owns types) so the two reviewers don't
  talk over each other; focuses Copilot on logic/edge-cases/fail-closed/tests and
  surfaces L9 house rules (Quantum-L9 org invariant, L9_META/DORA headers, no
  print/eval, honest PASS/FAIL). Suggestions only; a human commits.
- docs/handoffs/COPILOT_REVIEW_ROLLOUT_HANDOFF.md: GMP-format handoff to copy the
  instructions file to every Quantum-L9 repo and apply an org-wide ruleset that
  auto-requests Copilot review on PR open/update (UI click-path + as-code JSON
  template with a verify-the-key caveat).

Guardrail: instructions are advisory LLM nudges, not enforcement — hard invariants
stay in deterministic gates (validate_org_invariants.py, coding-kernel CI).
Separate PR from the CodeQL centralization work, branched off main.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rr6wpk9eehnJdRmh5BwWGG
Rewrite the review focus from hand-picked rules to the repo's actual rules/*.mdc
SSOT, with rule-id citations so each guideline traces back to the law:
- explicit failure semantics / fail-loud + timeouts (00-global, 20-lang-python, 60-anti-patterns)
- determinism & idempotency, structured audit logging (00-global)
- async correctness — no blocking calls in async (20-lang-python)
- existing-code-is-source-of-truth (91), tests use real drivers (50-qa-testing)
- hard flags: protected core (90), secrets/env/PII (61/96/74), L9 three-block
  DORA header (25), graph-layer boundary (97), org invariant, honesty hard-bans

Keeps the anti-overlap discipline (ruff/CodeQL/mypy own their domains) and the
suggestion-only / no-auto-commit guardrail (99-no-auto-commit, 01-git-push-prohibition).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rr6wpk9eehnJdRmh5BwWGG
@sonarqubecloud

sonarqubecloud Bot commented Jul 5, 2026

Copy link
Copy Markdown

@cryptoxdog
cryptoxdog merged commit 568a1ba into main Jul 20, 2026
2 checks passed
@cryptoxdog
cryptoxdog deleted the claude/copilot-code-review-config branch July 20, 2026 02:33
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.

2 participants