Skip to content

docs: Write agent guidance for IssueTracker - #146

Merged
mpaulosky merged 7 commits into
mainfrom
chore/issuetracker-agent-guidance
Sep 29, 2026
Merged

mpaulosky merged 7 commits into
mainfrom
chore/issuetracker-agent-guidance

Conversation

@mpaulosky

@mpaulosky mpaulosky commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

Replaces two sets of guidance that didn't describe this repo: the Copilot-era instructions, which described a "TailwindBlogApp" solution, and the files copied from atelier-store, which describe a storefront.

New

  • CLAUDE.md at the root covers:
    • the layers and how they connect (the UI calls services only; Extensions/ is the composition root)
    • build, run and test commands, and why the SDK is pinned to 10.0.3xx
    • test conventions and code style
    • the branch → PR → auto-merge → release workflow
  • .github/skills/code-review: review checks specific to IssueTracker (layering, the IMemoryCache invalidation, model/fake/repository drift, [Authorize] policies, -warnaserror, workflow rules).
  • blog.instructions.md: front matter for the generated posts in docs/blogs/.

Rewritten for IssueTracker

  • blazor.instructions.md (Blazor Server via _Host.cshtml, code-behind, @inject, Radzen + Bootstrap, Azure AD B2C, DTO-bound forms), dotnet-project.instructions.md, and git-commit-instructions.md (IssueTracker scopes and examples, fixed code fences).
  • markdown.instructions.md now uses one H1 title per file, resolving the MD041 conflict Copilot flagged on ci: Adopt atelier-store's CI, release and lint setup #140.

Removed

  • copilot-instructions.md (both copies), all 14 prompts, and 9 skills written for other repos. That includes bunit-test-migration, which targets bUnit's 1.0 beta API; IssueTracker never used it. The TestContext → BunitContext migration will get its own guidance.

Kept: mongo-dba.instructions.md (long line wrapped).

markdownlint now covers .github/ too; the temporary ignores from #140 are gone.

Checked against the code

While writing this I checked each claim against the code, and corrected these:

  • Services cache in IMemoryCache, not Redis.
  • Architecture.Tests only enforces part of the layering; the rest is convention.
  • The UI project references PlugIns for two things: DI registration in Extensions/, and the MongoDB health probe in Helpers/MongoHealthCheck.cs.

Validation

  • markdownlint-cli2 over the whole repo: 0 issues
  • Pre-push scripts/gate.sh: lint, build and all test projects pass
  • --filter "FullyQualifiedName~…" syntax in the instructions verified with a real run

🤖 Generated with Claude Code

The Copilot-era guidance described another solution (TailwindBlogApp),
and the files copied from atelier-store described a storefront. This
replaces both with guidance that matches IssueTracker:

- New root CLAUDE.md: layers, how they connect, build/test commands,
  test conventions, code style, and the branch/PR/release workflow.
- Blazor, .NET, Markdown and commit instructions rewritten for the
  Blazor Server UI, Radzen, Azure AD B2C, MongoDB and xUnit/bUnit.
  Markdown now uses one H1 title per file, matching MD041.
- A code-review skill for this repo; the blog post front-matter rules.
- Removed: the stale Copilot instructions, 14 prompts, and 9 skills
  written for other repos (including bunit-test-migration, which
  targets bUnit's beta API that IssueTracker never used).
- markdownlint now covers .github/ too; mongo-dba.instructions.md kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings September 29, 2026 19:04
@mpaulosky
mpaulosky enabled auto-merge (squash) September 29, 2026 19:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Several new instructions misstate existing behavior and should be corrected before they guide future work.

Review effort: Balanced
Findings: 8 Low severity

Open (8)
What changed in this PR

This PR replaces guidance copied from other projects with instructions for IssueTracker’s architecture, tests, and workflow.

Changes:

  • Adds root-level project guidance and a repository-specific code-review skill.
  • Rewrites Blazor, .NET, Markdown, blog, and commit instructions.
  • Removes unrelated prompts and skills, and brings .github/ under Markdown linting.
File Description
tests/​IssueTracker.UI.Tests.Unit/​IssueTracker.UI.Tests.Unit.csproj Updates the warning-suppression comment.
CLAUDE.md Adds project-wide guidance.
.markdownlint-cli2.jsonc Removes guidance-file lint exclusions.
.github/​skills/​test-discipline/​SKILL.md Removes unrelated skill.
.github/​skills/​session-recovery/​SKILL.md Removes unrelated skill.
.github/​skills/​reviewer-protocol/​SKILL.md Removes unrelated skill.
.github/​skills/​refactor/​SKILL.md Removes generic skill.
.github/​skills/​prd/​SKILL.md Removes generic skill.
.github/​skills/​nuget-manager/​SKILL.md Removes generic skill.
.github/​skills/​microsoft-docs/​SKILL.md Removes generic skill.
.github/​skills/​github-issues/​SKILL.md Removes generic skill.
.github/​skills/​github-issues/​references/​templates.md Removes obsolete skill templates.
.github/​skills/​code-review/​SKILL.md Adds IssueTracker review checks.
.github/​skills/​bunit-test-migration/​SKILL.md Removes inapplicable migration skill.
.github/​prompts/​xunit.prompt.md Removes unrelated test prompt.
.github/​prompts/​xunit-integration.prompt.md Removes unrelated integration-test prompt.
.github/​prompts/​structured-autonomy.md Removes unrelated workflow prompt.
.github/​prompts/​structured-autonomy-plan.prompt.md Removes unrelated planning prompt.
.github/​prompts/​structured-autonomy-implement.prompt.md Removes unrelated implementation prompt.
.github/​prompts/​structured-autonomy-generate.prompt.md Removes unrelated generation prompt.
.github/​prompts/​playwright-explore-website.prompt.md Removes generic browser prompt.
.github/​prompts/​editorconfig.prompt.md Removes conflicting style prompt.
.github/​prompts/​dotnet-best-practices.prompt.md Removes unrelated .NET prompt.
.github/​prompts/​csharp-xunit.prompt.md Removes generic test prompt.
.github/​prompts/​csharp-docs.prompt.md Removes generic documentation prompt.
.github/​prompts/​create-readme.prompt.md Removes generic README prompt.
.github/​prompts/​copyright-header-update-prompt.md Removes generic header prompt.
.github/​prompts/​build-repair.prompt.md Removes generic build prompt.
.github/​instructions/​mongo-dba.instructions.md Wraps an existing instruction line.
.github/​instructions/​markdown.instructions.md Rewrites Markdown guidance.
.github/​instructions/​git-commit-instructions.md Updates commit examples and formatting.
.github/​instructions/​dotnet-project.instructions.md Adds .NET project guidance.
.github/​instructions/​copilot-instructions.md Removes incorrect project guidance.
.github/​instructions/​blog.instructions.md Adds release-post guidance.
.github/​instructions/​blazor.instructions.md Rewrites Blazor guidance.
.github/​copilot-instructions.md Removes incorrect root Copilot guidance.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/instructions/blazor.instructions.md Outdated
Comment thread .github/instructions/blog.instructions.md
Comment thread .github/instructions/dotnet-project.instructions.md Outdated
Comment thread .github/instructions/markdown.instructions.md Outdated
Comment thread CLAUDE.md Outdated
Comment thread CLAUDE.md Outdated
Comment thread CLAUDE.md Outdated
Comment thread tests/IssueTracker.UI.Tests.Unit/IssueTracker.UI.Tests.Unit.csproj Outdated
Copilot AI balanced review requested due to automatic review settings September 29, 2026 19:12
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Test Results Summary

449 tests  ±0   449 ✅ ±0   21s ⏱️ +6s
  9 suites ±0     0 💤 ±0 
  9 files   ±0     0 ❌ ±0 

Results for commit 1530212. ± Comparison against base commit 9fbf336.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.13%. Comparing base (9fbf336) to head (1530212).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #146   +/-   ##
=======================================
  Coverage   85.13%   85.13%           
=======================================
  Files          77       77           
  Lines        1561     1561           
  Branches      143      143           
=======================================
  Hits         1329     1329           
  Misses        189      189           
  Partials       43       43           

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread .github/skills/code-review/SKILL.md Outdated
Comment thread .github/skills/code-review/SKILL.md Outdated
Comment thread CLAUDE.md Outdated
mpaulosky and others added 3 commits September 29, 2026 12:22
- JS interop: event handlers may call it; only first-load interop
  waits for OnAfterRenderAsync.
- Name MongoHealthCheck as the second UI use of PlugIns.
- Describe cache invalidation as a rule, noting StatusService's gap.
- Only PRs without [skip-release] get a release.
- Blog front matter includes microsoft_alias; skill files keep their
  name/description front matter.
- The CS0067 NoWarn has its own removal condition.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings September 29, 2026 19:24
@mpaulosky
mpaulosky merged commit 6c8b3a6 into main Sep 29, 2026
28 checks passed
@mpaulosky
mpaulosky deleted the chore/issuetracker-agent-guidance branch September 29, 2026 19:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Core guidance overstates architecture checks, misstates form patterns, and conflicts with the contributor guide.

Review effort: Balanced
Findings: None

Resolved since last review (11)
Previously missed (3)

In code that hasn't changed since last review

Low severity Distinguish form validation from inline grid editing

.github/​instructions/​blazor.instructions.md:34

This says all forms bind UI DTOs, but Pages/Categories.razor:21-42 and Pages/Statuses.razor:21-42 edit model rows in RadzenDataGrid without EditForm. Distinguish issue/comment create forms from inline grid editing in the data and validation guidance; otherwise agents may replace working admin-grid editors with an incompatible form pattern.

Low severity Clarify which AppHost dependencies architecture tests verify

CLAUDE.md:21

tests/Architecture.Tests/ArchitectureTests.cs:10-36 checks AppHost's outgoing dependencies and whether UI depends on AppHost; it does not check whether Services or PlugIns reference AppHost. Saying the tests ensure "nothing references AppHost" gives reviewers false confidence in that boundary. List the dependencies these tests actually check, and leave the rest as convention.

Low severity Align contributor branch guidance with main-targeted workflow

CLAUDE.md:73

Targeting main is consistent with .github/workflows/pr-automerge.yml:17-19, but docs/CONTRIBUTING.md:91,98 still directs contributors to branch from and open PRs against develop. A contributor following that guide will use the wrong base and miss the main-targeted merge workflow. Update the contributor guide to match this new workflow guidance.

Copilot AI balanced review requested due to automatic review settings September 29, 2026 19:34
mpaulosky added a commit that referenced this pull request Sep 29, 2026
* docs: add release blog for PR #146 [skip-release]

* docs: Name both UI uses of PlugIns in the #146 post [skip-release]

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Several new instructions misdescribe existing UI patterns, infrastructure calls, or the conditions needed for automated releases.

Review effort: Balanced
Findings: 5 Low severity

Open (5)

Comment on lines +33 to +34
- Components display the CoreBusiness models (`IssueModel`, `BasicUserModel`, ...). Forms bind to the DTOs in the UI's
`Models/` folder (`CreateIssueDto`, `CreateCommentDto`), so UI-only fields and validation stay out of CoreBusiness.
- `author1`: the primary author.
- `post_slug`: the URL slug.
- `microsoft_alias`: the author's Microsoft alias, or `n/a` when there is none.
- `featured_image`: the URL of the featured image.
Comment on lines +29 to +32
**Data access and caching.** Repositories in `IssueTracker.PlugIns/DataAccess` own every application-data query; the
one other MongoDB call is the ping in `Helpers/MongoHealthCheck.cs`. A write path added or changed in a service must
remove every `IMemoryCache` entry it affects, including per-user keys such as `GetIssuesByUser`'s; several existing
write paths don't yet (#149). Flag a new query that loads a whole collection where a filter would do.
Comment thread CLAUDE.md

## Tests

- xUnit v2 on VSTest, with FluentAssertions, NSubstitute or Moq, and Bogus fakes from CoreBusiness.
Comment thread CLAUDE.md
Comment on lines +80 to +82
- Each PR merged to `main` gets a release (patch by default; label `semver:minor` or `semver:major` to bump more) and
a follow-up PR with its blog post under `docs/blogs/`. PRs with `[skip-release]` in the title, such as those blog
PRs and metrics refreshes, don't release.
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