diff --git a/.agents/testing.md b/.agents/testing.md index 58d45949..2fea0aff 100644 --- a/.agents/testing.md +++ b/.agents/testing.md @@ -12,7 +12,7 @@ NSubstitute is the shared test-double library; use the existing AutoFixture and The checked-in configuration is SDK-style .NET 10, **xUnit on Microsoft.Testing.Platform (MTP)**, in native MTP `dotnet test` mode. [global.json](../global.json) selects the runner; [tests/Directory.Build.props](../tests/Directory.Build.props) enables the xUnit MTP runner and executable test projects. The current package is `xunit.v3.mtp-v2`; its version is centrally managed and should be read from [Directory.Packages.props](../Directory.Packages.props). -Use `dotnet-test:platform-detection` and `dotnet-test:run-tests` before selecting commands; use `dotnet-test:filter-syntax` for unfamiliar filters. Recheck configuration after dependency/SDK changes. +Use `run-tests` directly before running .NET tests or selecting commands and flags; it handles the required runner discovery. Use `platform-detection` for identification-only questions and `filter-syntax` for unfamiliar filters. Resolve equivalent prefixed skill names from the installed catalog. Recheck configuration after dependency/SDK changes. ## Where tests live @@ -22,11 +22,11 @@ Use `dotnet-test:platform-detection` and `dotnet-test:run-tests` before selectin | [LexerRegexGenerator.UnitTests](../tests/HydraScript.Infrastructure.LexerRegexGenerator.UnitTests) | Generated pattern source and ordering | Explicit `Category=Unit`; Roslyn GeneratorDriver and xUnit assertions | | [HydraScript.IntegrationTests](../tests/HydraScript.IntegrationTests) | Real interpreter pipeline, success/error programs, console/input/dumps | TestHostFixture composes production services and substitutes external dependencies | -Before locating C# tests, use `rider-skills:finding-tests` and its documented Rider `findTests` route. Read the returned tests and fixture before adding coverage. Follow the skill's fallback rules when tooling is unavailable. +Before locating tests for C# production code, use `finding-tests` and its documented Rider `findTests` route. Read the returned tests and fixture before adding coverage. Follow the skill's fallback rules when tooling is unavailable. ## Writing tests -- Use `dotnet-test:code-testing-agent` for test implementation and `dotnet-test:assertion-quality` for assertions; use the relevant gap-analysis skill when the task is specifically about missing coverage. +- Use the `code-testing-agent` skill for test implementation: focused work stays direct, while broad suites use its `code-testing-generator` agent and prescribed pipeline. Route test-quality and gap/coverage audits through the `test-quality-auditor` agent and its selected specialist; `assertion-quality` is not a prerequisite for every focused test addition. Use `testability-obstacle` when one behavior requires a minimal production seam for deterministic tests and seam selection is still open; use `code-testing-agent` when a suitable seam already exists. - Follow `MethodName_Scenario_ExpectedBehavior` (Roy Osherove). The happy-path convention requested in issue #205 is `MethodName_Always_Success`; prefer a specific scenario/outcome when it adds information. - Add a minimal regression at the stage that owns the defect. For language behavior, also verify the interpreter's observable result where unit tests cannot establish it. - Reuse [AutoHydraScriptDataAttribute](../tests/HydraScript.UnitTests/AutoHydraScriptDataAttribute.cs) for applicable unit fixtures and [TestHostFixture](../tests/HydraScript.IntegrationTests/TestHostFixture.cs) for pipeline tests. Keep semantic inputs explicit when randomized data would hide the case. diff --git a/AGENTS.md b/AGENTS.md index 191b8bcb..faff85d2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -9,13 +9,27 @@ HydraScript is a statically typed scripting-language interpreter in C#. Keep thi - Read the [ADR index](docs/adr/README.md) and relevant records before making architectural decisions. Keep checked-in guidance focused on the current implementation. - Follow [.editorconfig](.editorconfig), [CONTRIBUTING.md](CONTRIBUTING.md), and the existing local conventions. New guidance and ADRs use English. -## Required tools and skills +## Required tools, skills, and agents - **Use Rider MCP for repository development:** inspect the open solution and worktree first; use its symbol navigation, usages, diagnostics, refactoring, build, and run capabilities where applicable. Run CLI-only operations through Rider's terminal when available. -- **Read and use the applicable Rider skills:** `rider-skills:refactoring-code` for semantic refactoring, `rider-skills:debugging-code` for runtime investigation needing debugger evidence, and `rider-skills:finding-tests` before locating tests for C# changes. Equivalent unprefixed Rider skills are valid. Follow their documented `execute_tool` routing. -- **Read and use applicable .NET skills before acting:** `dotnet-test:platform-detection` and `dotnet-test:run-tests` for test commands; `code-testing-agent` and `assertion-quality` from `dotnet-test` when authoring tests; relevant `dotnet-msbuild`, `dotnet-nuget`, `dotnet-upgrade`, or `dotnet-advanced` skills for their respective tasks. Resolve names from the installed skill catalog; read referenced instructions as required. -- Skill use is mandatory when applicable, not a requirement to run unrelated workflows. Prose changes do not require a debugger, refactoring, or test generation. -- If Rider MCP or a required skill is unavailable, report the exact limitation and use an available documented fallback. Never silently skip the requirement or claim a tool ran. +- **Resolve installed capabilities:** the table uses skill short names and explicitly labels agents. Resolve equivalent prefixed names from the active catalog, read the applicable `SKILL.md` before acting, and follow its scope and tool routing (`execute_tool` or directly exposed Rider tools, as documented). An installed skill does not imply its tools or agents are available. + +| Task | Skill or agent entry point | +| --- | --- | +| Symbols, usages, and refactoring | `navigating-code` for symbol navigation; `refactoring-code` for semantic IDE refactoring; `csharp-refactoring` for behavior-preserving C# restructuring. | +| Runtime investigation requiring debugger evidence | `debugging-code`; ordinary static diagnosis does not require a debugger. | +| Locate tests for C# production code | `finding-tests` before searching for existing coverage or writing related tests. | +| Run .NET tests or choose commands/flags | `run-tests` directly; `platform-detection` is for identification-only questions. Load `filter-syntax` when needed. | +| Write or extend tests | `code-testing-agent` skill: focused work stays direct; broad suites use its `code-testing-generator` agent and prescribed pipeline. | +| Audit test quality, assertions, gaps, or coverage | `test-quality-auditor` agent selects the matching specialist, such as `assertion-quality` or `test-gap-analysis`; use the combined audit only for broad reviews. | +| Make code testable | `testability-obstacle` for one behavior needing a minimal production seam and tests when seam selection is still open; `testability-migration` agent for static-dependency inventories or migrations to abstractions. Use `code-testing-agent` when a suitable seam already exists. | +| Migrate test framework or platform | `test-migration` agent and its selected migration skill. | +| Diagnose or improve MSBuild | `msbuild` agent; `build-perf` for build performance and `msbuild-code-review` for project-file reviews. Follow their selected skills. | +| Investigate .NET runtime performance | `optimizing-dotnet-performance` agent with applicable `analyzing-dotnet-performance` guidance; `microbenchmarking` for BenchmarkDotNet work. | + +- Select other installed skills by the actual task, such as `convert-to-cpm` for central package management, the matching `migrate-dotnet*` skill for SDK/runtime upgrades, and `dotnet-aot-compat` for AOT compatibility. Use the `template-engine` agent for .NET template discovery, scaffolding, or authoring. +- Skill and agent use is mandatory when applicable; keep workflows proportional to scope. Prose changes do not require a debugger, refactoring, test generation, or a test audit. Delegate independent work with explicit ownership and preserve other agents' edits. +- If a required tool, skill, or agent is unavailable, report the exact limitation and use its documented fallback when available. Never silently skip the requirement, present a generic helper as a named specialist, or claim a tool ran. ## Work and handoff diff --git a/Directory.Packages.props b/Directory.Packages.props index 5b29556d..1696d4d7 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -3,7 +3,7 @@ true true false - 10.0.11 + 10.0.12 5.9.0 5.0.0-rc.1 @@ -19,8 +19,8 @@ - - + + @@ -34,13 +34,13 @@ - - + + - + - + \ No newline at end of file