dotnet-techne-qa-pipel…
Use when the user asks to verify a story or ticket implementation against its spec - per-AC verdicts, code reuse and design…
Use when designing or changing public C#/.NET APIs with compatibility and versioning constraints. Keywords: breaking change, API design, backward compatibility, binary compatibility, deprecation strategy, versioning.
Claude Code
$ npx -y skills add Metalnib/dotnet-episteme-skills --skill dotnet-techne-csharp-api-design --agent claude-code
Codex
$ npx skills add Metalnib/dotnet-episteme-skills --skill dotnet-techne-csharp-api-design -a codex -y
Cursor
$ npx skills add Metalnib/dotnet-episteme-skills --skill dotnet-techne-csharp-api-design -a cursor -y
Gemini CLI
$ npx skills add Metalnib/dotnet-episteme-skills --skill dotnet-techne-csharp-api-design -a gemini-cli -y
GitHub Copilot
$ npx skills add Metalnib/dotnet-episteme-skills --skill dotnet-techne-csharp-api-design -a github-copilot -y
OpenCode
$ npx skills add Metalnib/dotnet-episteme-skills --skill dotnet-techne-csharp-api-design -a opencode -y
Windsurf
$ npx skills add Metalnib/dotnet-episteme-skills --skill dotnet-techne-csharp-api-design -a windsurf -y
name: dotnet-techne-csharp-api-design
description: "Use when designing or changing public C#/.NET APIs with compatibility and versioning constraints. Keywords: breaking change, API design, backward compatibility, binary compatibility, deprecation strategy, versioning."
disable-model-invocation: false
user-invocable: true
metadata:
author: Metalnib
version: "1.0.0"
trigger_keywords:
- breaking change
- api design
- backward compatibility
- binary compatibility
- deprecation strategy
- versioningUse this skill when:
---
| Type | Definition | Scope | |------|------------|-------| | **API/Source** | Code compiles against newer version | Public method signatures, types | | **Binary** | Compiled code runs against newer version | Assembly layout, method tokens | | **Wire** | Serialized data readable by other versions | Network protocols, persistence formats |
Breaking any of these creates upgrade friction for users.
---
The foundation of stable APIs: **never remove or modify, only extend**.
1. **Previous functionality is immutable** - Once released, behavior and signatures are locked 2. **New functionality through new constructs** - Add overloads, new types, opt-in features 3. **Removal only after deprecation period** - Years, not releases
**Resources:**
---
// ADD new overloads with default parameters
public void Process(Order order, CancellationToken ct = default);
// ADD new optional parameters to existing methods
public void Send(Message msg, Priority priority = Priority.Normal);
// ADD new types, interfaces, enums
public interface IOrderValidator { }
public enum OrderStatus { Pending, Complete, Cancelled }
// ADD new members to existing types
public class Order
{
public DateTimeOffset? ShippedAt { get; init; } // NEW
}// REMOVE or RENAME public members
public void ProcessOrder(Order order); // Was: Process()
// CHANGE parameter types or order
public void Process(int orderId); // Was: Process(Order order)
// CHANGE return types
public Order? GetOrder(string id); // Was: public Order GetOrder()
// CHANGE access modifiers
internal class OrderProcessor { } // Was: public
// ADD required parameters without defaults
public void Process(Order order, ILogger logger); // Breaks callers!// Step 1: Mark as obsolete with version (any release)
[Obsolete("Obsolete since v1.5.0. Use ProcessAsync instead.")]
public void Process(Order order) { }
// Step 2: Add new recommended API (same release)
public Task ProcessAsync(Order order, CancellationToken ct = default);
// Step 3: Remove in next major version (v2.0+)
// Only after users have had time to migrate---
Prevent accidental breaking changes with automated API surface testing.
dotnet add package PublicApiGenerator dotnet add package Verify.Xunit
[Fact]
public Task ApprovePublicApi()
{
var api = typeof(MyLibrary.PublicClass).Assembly.GeneratePublicApi();
return Verify(api);
}Creates `ApprovePublicApi.verified.txt`:
namespace MyLibrary
{
public class OrderProcessor
{
public OrderProcessor() { }
public void Process(Order order) { }
public Task ProcessAsync(Order order, CancellationToken ct = default) { }
}
}**Any API change fails the test** - reviewer must explicitly approve changes.
1. PR includes changes to `*.verified.txt` files 2. Reviewers see exact API surface changes in diff 3. Breaking changes are immediately visible 4. Conscious decision required to approve
---
For distributed systems, serialized data must be readable across versions.
| Direction | Requirement | |-----------|-------------| | **Backward** | Old writers → New readers (current version reads old data) | | **Forward** | New writers → Old readers (old version reads new data) |
Both are required for zero-downtime rolling upgrades.
**Phase 1: Add read-side support (opt-in)**
// New message type - readers deployed first
public sealed record HeartbeatV2(
Address From,
long SequenceNr,
long CreationTimeMs); // NEW field
// Deserializer handles both old and new
public object Deserialize(byte[] data, string manifest) => manifest switch
{
"Heartbeat" => DeserializeHeartbeatV1(data), // Old format
"HeartbeatV2" => DeserializeHeartbeatV2(data), // New format
_ => throw new NotSupportedException()
};**Phase 2: Enable write-side (opt-out, next minor version)**
// Config to enable new format (off by default initially) akka.cluster.use-heartbeat-v2 = on
**Phase 3: Make default (future version)**
After install base has absorbed read-side code.
Prefer schema-based formats over reflection-based:
| Format | Type | Wire Compatibility | |--------|------|-------------------| | **Protocol Buffers** | Schema-based | Excellent - explicit field numbers | | **MessagePack** | Schema-based | Good - with contracts | | **System.Text.Json** |
DotNet Episteme Skills - a curated, manual-first .NET AI skills library rooted in systematic knowledge (episteme) and shaped by disciplined craft (techne), designed for engineers who prioritise precision over hype.
Use when the user asks to verify a story or ticket implementation against its spec - per-AC verdicts, code reuse and design…
Use when the user asks for a phase-gated refactoring or redesign loop - session-blind workers map and trace the area, empirical…
Use when the user asks for a multi-agent .NET code review - five parallel reviewers (correctness, performance,…
Use when reviewing PRs/diffs/branches/documents for .NET quality, correctness, performance, security, data access, messaging, and…
Use when you need CRAP score and coverage risk analysis to find high-risk code before refactoring or release. Keywords: CRAP…
Use when reviewing a .NET pull request for breaking changes that may affect other microservice repositories. Detects cross-repo…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.