solid-code-synthesizer
Skill2 starsChanged 18 days agoMITView on GitHub
Scaffold C# 14 / .NET 10 value objects, segregated interfaces, Razor code-behind components, NSubstitute mocks, DomainTestDataBuilders, and LSP contract / xUnit 100%-branch-coverage test suites with deterministic SOLID verification. Use when generating boilerplate, DTOs, adapters, UI bindings, or automated unit/contract tests in GeoAssets.
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- code-gen-dagSkill
- outer-loop-dag-orchestratorSkill
- plan-gen-dagSkill
- solid-code-synthesizerSkill
- csharp-conventionsSkill
- jira-conventionsSkill
- observability-conventionsSkill
- outer-loop-dag-orchestratorSkill
- solid-code-synthesizerSkill
- ui-ux-pro-maxSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 0 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Keep GeoJSON coordinates strictly RFC 7946 [longitude, latitude] (SRID 4326) with coordinate arrays as the serialized source of truth.
- Very specific: line 24
Keep new interfaces narrow and role-specific (<= 5 cohesive methods.
- Very specific: line 26
Never emit throw new NotImplementedException() stubs in production adapters.
- Very specific: line 30
Never emit DateTime.Now, DateTime.UtcNow, DateTime.Today, DateTimeOffset.Now, or DateTimeOffset.UtcNow (RS0030).
- Very specific: line 31
Never emit .Result, .Wait(), .GetAwaiter().GetResult(), or Thread.Sleep(...) (AsyncFixer02).
- Very specific: line 32
Never emit Microsoft.EntityFrameworkCore, Npgsql, or GeoAssets.Provider.* references inside core/ projects.
- Very specific: line 35
LSP Contract Suites: When testing an implementation of a multi-backend port (e.g., IServiceOrderRepository, IAssetProvider), inherit or …
- Very specific: line 36
OCP Strategy / Rule Matrices: Use exhaustive C# 14 switch expressions in production and [Theory] + [InlineData] / MemberData matrices in …
- Very specific: line 40
Verify expected "not found" queries return null (Task<T?>) rather than throwing, while write invariant violations across REST boundaries …
- Very specific: line 41
Run both deterministic verifiers before completing any task (never add #pragma warning disable, [SuppressMessage], or <NoWarn>):
- Very specific: line 48
If Stage 1 of verify-agent-worktree.sh exits 10 (formatting drift), run dotnet format style GeoAssets.sln and re-verify until both scripts …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SOLID & Categorical C# 14 Synthesizer (GitHub Copilot Agent Skill)
Guides GitHub Copilot (IDE Agent Mode, Copilot CLI, Coding Agent, and Code Review) through GeoAssets' 5-stage SOLID & Categorical synthesis workflow for .NET 10 / C# 14 implementation and exhaustive xUnit QA.
1. Stage-by-Stage C# 14 Scaffolding & QA Rules
Stage 1 — SRP & Value Semantics (readonly record struct & sealed record)
- Emit
readonly record structfor small immutable value types, coordinate pairs, bounding boxes, and strongly-typed IDs (zero heap allocation). - Emit
sealed recordfor immutable DTOs, commands, domain events, and REST payloads; prefer source-generatedJsonSerializerContext([JsonSerializable(typeof(...))]) on high-throughput GeoJSON/REST paths. - Keep GeoJSON coordinates strictly RFC 7946
[longitude, latitude](SRID 4326) with coordinate arrays as the serialized source of truth. - Split every Blazor component into markup-only
.razor+.razor.cspartial class ([Parameter]down,EventCallback<T>up; never add inline@code {}, exceptapps/GeoAssets.MAUI/Pages/MauiLogin.razor).
Stage 2 — ISP & Minimal Mocks (Role-Segregated Contracts)
- Keep new interfaces narrow and role-specific (
<= 5cohesive methods; separateI*ReaderfromI*Writer). - In xUnit tests, mock only the narrow segregated port via
NSubstitute(Substitute.For<IOrderReader>()) rather than over-mocking large concrete graphs. - Never emit
throw new NotImplementedException()stubs in production adapters.
Stage 3 — DIP & Deterministic Guardrails (TimeProvider & CancellationToken)
- Validate reference inputs with
ArgumentNullException.ThrowIfNull(arg)and strings withArgumentException.ThrowIfNullOrWhiteSpace(arg)(<Nullable>enable</Nullable>— avoid null-forgiving!). - Never emit
DateTime.Now,DateTime.UtcNow,DateTime.Today,DateTimeOffset.Now, orDateTimeOffset.UtcNow(RS0030). Always injectSystem.TimeProviderin production types andFakeTimeProviderin xUnit tests. - Never emit
.Result,.Wait(),.GetAwaiter().GetResult(), orThread.Sleep(...)(AsyncFixer02). Alwaysawaitasynchronously and accept/forwardCancellationToken. - Never emit
Microsoft.EntityFrameworkCore,Npgsql, orGeoAssets.Provider.*references insidecore/projects.
Stage 4 — OCP & LSP Behavioral Contract Test Suites (100% Branch Coverage)
- LSP Contract Suites: When testing an implementation of a multi-backend port (e.g.,
IServiceOrderRepository,IAssetProvider), inherit or extend shared abstract contract suites (followingServiceOrderRepositoryContractTestsinGeoAssets.Workflow.TestKit) so EF Core, PostgreSQL, In-Memory, and REST implementations prove identical behavioral and event-propagation semantics. - OCP Strategy / Rule Matrices: Use exhaustive C# 14
switchexpressions in production and[Theory]+[InlineData]/MemberDatamatrices in xUnit to verify every rule/plugin permutation without duplicating test bodies. - Exhaustive Branch Coverage: Cover happy paths, null/whitespace guard clauses, boundary geometry/topology conditions,
FakeTimeProviderclock advances, and cancelledCancellationTokenpaths using shared fluent builders (DomainTestDataBuilders).
Stage 5 — Boundary Error Parity & Deterministic Oracle Verification
- Verify expected "not found" queries return
null(Task<T?>) rather than throwing, while write invariant violations across REST boundaries test both server status/payload serialization (400/409/404) and client exception reconstruction (Rest*Repository). - Run both deterministic verifiers before completing any task (never add
#pragma warning disable,[SuppressMessage], or<NoWarn>):
python3 scripts/verify-solid-contracts.py --target .
./scripts/verify-agent-worktree.sh .If Stage 1 of verify-agent-worktree.sh exits 10 (formatting drift), run dotnet format style GeoAssets.sln and re-verify until both scripts return Exit 0.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

