Skip to content

Audit and fix inaccuracies in AI guidance files#5424

Merged
tig merged 2 commits into
developfrom
claude/ai-guidance-audit-HSB49
May 26, 2026
Merged

Audit and fix inaccuracies in AI guidance files#5424
tig merged 2 commits into
developfrom
claude/ai-guidance-audit-HSB49

Conversation

@tig
Copy link
Copy Markdown
Member

@tig tig commented May 26, 2026

Summary

Audited the AI-agent guidance files (CLAUDE.md and .claude/rules/*) for claims that have drifted from the actual codebase/config, and corrected them. Each fix is backed by the real source/config rather than assumption.

  • CLAUDE.md
    • Single-test command now uses the real Microsoft Testing Platform flags (--filter-method / --filter-class) instead of the VSTest-only --filter "FullyQualifiedName~...". Confirmed the test projects are xunit.v3 with OutputType=Exe (MTP runner).
    • Removed the dangling .claude/tasks/scenario-modernization.md link — that file does not exist (.claude/tasks/ contains only build-app.md and clean-code-review.md).
    • Added the existing unicode-graphemes.md rule to the "Detailed Rules" list, where it was missing.
  • .claude/rules/event-patterns.md — Local-function naming corrected from camelCase to PascalCase, matching .editorconfig's local_functions_rule (upper_camel_case_style, warning severity) and real code (OnButtonClicked, OnMouseLeave, …).
  • .claude/rules/testing-patterns.md — Non-parallel section now points at the real Tests/UnitTests.NonParallelizable project (Tests/UnitTests does not exist); names UnitTests.Legacy as the do-not-add project; replaces the phantom coverlet.runsettings reference (no .runsettings file exists and MTP ignores them) with the actual mechanism — the coverlet.collector package plus Tests/TestEnvironmentSetup.cs.

Verified-and-already-correct (left unchanged): C# 14 / net10.0, all docfx/docs/* links, the var-for-built-in-types rule (matches ReSharper use_var_when_evident), and the Benchmarks / StressTests / IntegrationTests directory references.

Test plan

  • Docs-only change — no build/test impact.
  • Spot-check the corrected commands: dotnet test --project Tests/UnitTests.NonParallelizable --no-build and --filter-method "*MyTestMethod" resolve against existing projects.
  • Confirm all file paths referenced in CLAUDE.md / .claude/rules/* now resolve.

https://claude.ai/code/session_01Msd5RHe9K8JR55YXTZEtdn


Generated by Claude Code

Correct claims in CLAUDE.md and .claude/rules that drifted from the
actual codebase/config:

- CLAUDE.md: use MTP filter flags (--filter-method/--filter-class) for
  single-test runs; drop dangling scenario-modernization.md reference;
  list the existing unicode-graphemes.md rule.
- event-patterns.md: local functions use PascalCase, matching the
  .editorconfig local_functions_rule (upper_camel_case_style).
- testing-patterns.md: point non-parallel tests at the real
  Tests/UnitTests.NonParallelizable project; reference UnitTests.Legacy
  as the do-not-add project; replace the phantom coverlet.runsettings
  with the actual coverage/setup mechanism.

https://claude.ai/code/session_01Msd5RHe9K8JR55YXTZEtdn
Copy link
Copy Markdown
Contributor

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

Updates the repository’s AI-agent guidance documentation to match the current Terminal.Gui codebase/config (test project names, test runner/filter flags, rule links, and naming rules), reducing drift-related misinformation for contributors and agents.

Changes:

  • Updated CLAUDE.md to include the existing unicode/grapheme rule, remove a non-existent task link, and switch single-test examples to Microsoft Testing Platform filtering flags.
  • Updated .claude/rules/testing-patterns.md to reference the actual non-parallel test project and replace stale coverage/runsettings guidance with the current mechanism.
  • Updated .claude/rules/event-patterns.md to align local-function naming guidance with .editorconfig.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
CLAUDE.md Fixes rule/task links and corrects test command examples for the repo’s MTP runner setup.
.claude/rules/testing-patterns.md Corrects test project naming and updates guidance about environment setup and coverage tooling.
.claude/rules/event-patterns.md Aligns local-function naming guidance with the enforced .editorconfig naming rule.

Comment thread .claude/rules/testing-patterns.md Outdated
Comment thread .claude/rules/testing-patterns.md Outdated
- Drop the "Includes --diagnostic flag" characteristic from the
  non-parallel section; the example command omits it and CI uses
  --diagnostic for the parallelizable runs too, so it was misleading.
- Reword the coverage note so it no longer conflicts with the
  "Code Coverage" section: the coverlet.collector package is referenced,
  but coverage is not actively collected in CI yet.

https://claude.ai/code/session_01Msd5RHe9K8JR55YXTZEtdn
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.

3 participants