@moon791017/neo-skills 1.1.32 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/package.json +1 -1
- package/skills/neo-azure-pipelines/SKILL.md +3 -3
- package/skills/neo-csharp/SKILL.md +14 -4
- package/skills/neo-csharp/reference/anti-patterns.md +25 -0
- package/skills/neo-csharp/reference/patterns.md +60 -2
- package/skills/neo-csharp-interface-generator/SKILL.md +3 -2
- package/skills/neo-dotnet/SKILL.md +11 -7
- package/skills/neo-dotnet-ef-core/SKILL.md +11 -4
- package/skills/neo-dotnet-ef-core/reference/anti-patterns.md +25 -0
- package/skills/neo-dotnet-ef-core/reference/patterns.md +39 -1
- package/skills/neo-dotnet-minimal-apis/SKILL.md +11 -4
- package/skills/neo-dotnet-minimal-apis/reference/patterns.md +49 -1
- package/skills/neo-dotnet-mvc/SKILL.md +11 -4
- package/skills/neo-dotnet-mvc/reference/patterns.md +38 -1
- package/skills/neo-dotnet-tag-helper/SKILL.md +2 -2
- package/skills/neo-dotnet-webapi/SKILL.md +11 -4
- package/skills/neo-dotnet-webapi/reference/patterns.md +36 -1
- package/skills/neo-harness-project/SKILL.md +1 -1
- package/skills/neo-harness-project/references/artifact-selection.md +2 -2
- package/skills/neo-harness-project/references/generation-validation.md +1 -1
- package/skills/neo-iso-27001/SKILL.md +0 -92
- package/skills/neo-iso-27001/evals/eval_queries.json +0 -86
- package/skills/neo-iso-27001/evals/evals.json +0 -38
- package/skills/neo-iso-27001/references/sources-and-scope.md +0 -23
- package/skills/neo-iso-27701/SKILL.md +0 -99
- package/skills/neo-iso-27701/evals/eval_queries.json +0 -82
- package/skills/neo-iso-27701/evals/evals.json +0 -38
- package/skills/neo-iso-27701/references/sources-and-scope.md +0 -24
package/README.md
CHANGED
|
@@ -39,8 +39,6 @@
|
|
|
39
39
|
| :--- | :--- | :--- |
|
|
40
40
|
| Agent 治理 | `neo-harness` | 自動掃描專案環境,產生或更新專案專用的 AGENTS.md,並整合 Harness 評估、Workflow 與編排架構。 |
|
|
41
41
|
| Agent 治理 | `neo-harness-project` | 盤點目前專案並依證據建立完整 Harness 知識、計畫、驗證與工程治理資產。 |
|
|
42
|
-
| 資訊安全 | `neo-iso-27001` | 依 ISO/IEC 27001 進行 ISMS 範圍、風險、證據、差距分析、稽核準備與改善計畫。 |
|
|
43
|
-
| 隱私管理 | `neo-iso-27701` | 依 ISO/IEC 27701 進行 PIMS、PII 角色、處理活動、隱私風險、證據與稽核準備。 |
|
|
44
42
|
| DevOps | `neo-azure-pipelines` | 建立、審查、除錯或現代化 Azure Pipelines YAML,尤其是 .NET build、Azure App Service 或 IIS 部署。 |
|
|
45
43
|
| 需求釐清 | `neo-clarification` | 將模糊、情緒化、片段式或截圖式需求整理成規格、驗收條件和待釐清問題。 |
|
|
46
44
|
| Code Review | `neo-code-review` | 檢查程式碼、PR/diff、bug 風險、安全性、效能與可維護性。 |
|
package/package.json
CHANGED
|
@@ -5,9 +5,9 @@ description: >
|
|
|
5
5
|
Pipelines YAML for CI/CD, especially .NET builds, Azure App Service deploys, or
|
|
6
6
|
IIS/on-premises deploys. Prefer bundled templates and verify task syntax against
|
|
7
7
|
Microsoft docs when version-specific accuracy matters.
|
|
8
|
-
compatibility: "Supports .NET 6.0 up to .NET
|
|
8
|
+
compatibility: "Supports .NET 6.0 up to .NET 11.0."
|
|
9
9
|
metadata:
|
|
10
|
-
version: "1.
|
|
10
|
+
version: "1.1.0"
|
|
11
11
|
category: "DevOps"
|
|
12
12
|
---
|
|
13
13
|
|
|
@@ -53,7 +53,7 @@ metadata:
|
|
|
53
53
|
|
|
54
54
|
### CI Workflow: .NET Build Pipeline
|
|
55
55
|
When configuring a CI process for a .NET project:
|
|
56
|
-
1. Scan the project directory to identify the .NET version (e.g., .NET
|
|
56
|
+
1. Scan the project directory to identify the .NET version (e.g., .NET 8/10/11), project name, and solution file (`.sln`).
|
|
57
57
|
2. Check for any existing pipeline configurations.
|
|
58
58
|
3. Create the `.pipelines/templates/build/` and `.pipelines/templates/util/` directories.
|
|
59
59
|
4. Copy `build/build-dotnet.yml` and `util/clean-artifact.yml` templates to their respective locations.
|
|
@@ -5,9 +5,9 @@ description: >
|
|
|
5
5
|
projects. Trigger for .cs/.csproj files, C# language-version questions, nullable
|
|
6
6
|
reference types, records, pattern matching, async/cancellation, or version-appropriate
|
|
7
7
|
syntax from C# 10+.
|
|
8
|
-
compatibility: "Supports C# 10 through
|
|
8
|
+
compatibility: "Supports C# 10 through 15. Adaptive to .NET 6.0 through 11.0 environments."
|
|
9
9
|
metadata:
|
|
10
|
-
version: "1.
|
|
10
|
+
version: "1.5.0"
|
|
11
11
|
category: "Core"
|
|
12
12
|
---
|
|
13
13
|
|
|
@@ -27,6 +27,7 @@ metadata:
|
|
|
27
27
|
- `net8.0`: C# 12 (Primary Constructors, Collection Expressions).
|
|
28
28
|
- `net9.0`: C# 13 (`params` collections, `Lock` object).
|
|
29
29
|
- `net10.0`: C# 14 (Extension members, `field` keyword).
|
|
30
|
+
- `net11.0`: C# 15 (Union types, closed hierarchies, collection-spread arguments, labeled break/continue, extension indexers, inline unsafe expressions).
|
|
30
31
|
2. **Reason (Planning Phase):**
|
|
31
32
|
- Evaluate the modernization level of the current code to determine the refactoring strategy.
|
|
32
33
|
- In lower version environments (like .NET 6), avoid using higher version syntax (like Primary Constructors), but prioritize using File-scoped namespaces.
|
|
@@ -40,7 +41,7 @@ metadata:
|
|
|
40
41
|
- Check if asynchronous operations correctly handle cancellation tokens (`CancellationToken`).
|
|
41
42
|
- Ensure naming conventions comply with official .NET recommendations.
|
|
42
43
|
|
|
43
|
-
## Feature Roadmap (C# 10 -
|
|
44
|
+
## Feature Roadmap (C# 10 - 15)
|
|
44
45
|
|
|
45
46
|
### C# 10 & 11 (Foundation)
|
|
46
47
|
- **File-scoped Namespaces:** Reduce indentation levels.
|
|
@@ -55,12 +56,20 @@ metadata:
|
|
|
55
56
|
- **`params` Collections:** Method parameters support various collection types.
|
|
56
57
|
- **Implicit Span Conversion:** Handle memory-safe code more naturally.
|
|
57
58
|
|
|
58
|
-
### C# 14
|
|
59
|
+
### C# 14 (Language Extensions)
|
|
59
60
|
- **Extension Members:** Extension properties, operators, and static members.
|
|
60
61
|
- **`field` Keyword:** Directly access backing fields in property logic.
|
|
61
62
|
- **Null-conditional Assignment:** `target?.Property = value;`.
|
|
62
63
|
- **Scripting:** Support `dotnet run file.cs` for direct execution.
|
|
63
64
|
|
|
65
|
+
### C# 15 (Advanced Types & Productivity)
|
|
66
|
+
- **Union Types:** `public union Pet(Cat, Dog, Bird);` with exhaustive compiler-checked `switch` expressions without discarding `_`.
|
|
67
|
+
- **Closed Hierarchies:** `public closed record class State;` restricts inheritance strictly within the defining project/assembly for domain safety.
|
|
68
|
+
- **Collection Expression Arguments:** `[with(capacity: values.Length * 2), .. values]` or `[with(StringComparer.OrdinalIgnoreCase), ...]` for inline constructor customization.
|
|
69
|
+
- **Labeled Break & Continue:** Jump out of deeply nested loops directly with `break outer;` and `continue outer;`.
|
|
70
|
+
- **Extension Indexers:** Support `this[int index]` on extended types.
|
|
71
|
+
- **Localized Unsafe Expressions:** Fine-grained `unsafe(...)` expressions for localized pointer operations without marking entire methods unsafe.
|
|
72
|
+
|
|
64
73
|
## Coding Standards
|
|
65
74
|
- **Clean Structure:** Prioritize using File-scoped namespaces.
|
|
66
75
|
- **Immutability:** Use `record` for Data Transfer Objects (DTO).
|
|
@@ -79,6 +88,7 @@ metadata:
|
|
|
79
88
|
|
|
80
89
|
## Documentation
|
|
81
90
|
### Official References
|
|
91
|
+
- [What's new in C# 15 (Union types, closed hierarchies)](https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-15)
|
|
82
92
|
- [What's new in C# 14 (Extension Members, field keyword)](https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-14)
|
|
83
93
|
- [What's new in C# 13 (params collections, Lock object)](https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-13)
|
|
84
94
|
- [What's new in C# 12 (Primary Constructors, Collection Expressions)](https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-12)
|
|
@@ -123,6 +123,31 @@ This document lists common mistakes (Anti-Patterns) in C# development and their
|
|
|
123
123
|
public string Name { get; set => field = value.Trim(); } // Using the field keyword
|
|
124
124
|
```
|
|
125
125
|
|
|
126
|
+
### 4.4 Discarding Cases in Union Type Pattern Matching (C# 15+)
|
|
127
|
+
- **Legacy / Bad**:
|
|
128
|
+
```csharp
|
|
129
|
+
// Blindly adding a discard case bypasses compile-time exhaustiveness checking!
|
|
130
|
+
string desc = pet switch
|
|
131
|
+
{
|
|
132
|
+
Cat c => "Cat",
|
|
133
|
+
_ => "Other" // When a new variant (e.g. Bird) is added to the union, no compiler error will trigger
|
|
134
|
+
};
|
|
135
|
+
```
|
|
136
|
+
- **Modern / Good**:
|
|
137
|
+
```csharp
|
|
138
|
+
// Rely on compiler exhaustiveness enforcement:
|
|
139
|
+
string desc = pet switch
|
|
140
|
+
{
|
|
141
|
+
Cat c => "Cat",
|
|
142
|
+
Dog d => "Dog",
|
|
143
|
+
Bird b => "Bird"
|
|
144
|
+
};
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### 4.5 Leaking Domain Inheritance Without Closed Hierarchies (C# 15+)
|
|
148
|
+
- **Bad**: Exposing domain state hierarchies publicly without `closed`, allowing external assemblies to inherit and corrupt domain invariants.
|
|
149
|
+
- **Good**: Mark domain state record or class hierarchies as `closed` so only the defining assembly can declare subclasses.
|
|
150
|
+
|
|
126
151
|
---
|
|
127
152
|
|
|
128
153
|
## 5. Resource Management
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Modern C# Patterns Guide
|
|
2
2
|
|
|
3
|
-
This document introduces recommended development patterns in C# 10 through
|
|
3
|
+
This document introduces recommended development patterns in C# 10 through 15+, aiming to simplify code and improve performance using modern syntax.
|
|
4
4
|
|
|
5
5
|
## 1. Architecture and Declaration Patterns
|
|
6
6
|
|
|
@@ -139,4 +139,62 @@ if (input is not null) { ... }
|
|
|
139
139
|
|
|
140
140
|
// Use null-coalescing assignment operator
|
|
141
141
|
_logger ??= NullLogger.Instance;
|
|
142
|
-
```
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## 7. C# 15 Modern Patterns
|
|
147
|
+
|
|
148
|
+
### 7.1 Union Types for Domain Modeling
|
|
149
|
+
**Recommendation**: Use `union` types to model closed variants without complex inheritance hierarchies, enabling exhaustive pattern matching.
|
|
150
|
+
```csharp
|
|
151
|
+
public record class Cat(string Name);
|
|
152
|
+
public record class Dog(string Name);
|
|
153
|
+
public record class Bird(string Name);
|
|
154
|
+
|
|
155
|
+
public union Pet(Cat, Dog, Bird);
|
|
156
|
+
|
|
157
|
+
// Exhaustive switch expression enforced by compiler
|
|
158
|
+
public string DescribePet(Pet pet) => pet switch
|
|
159
|
+
{
|
|
160
|
+
Cat c => $"Cat named {c.Name}",
|
|
161
|
+
Dog d => $"Dog named {d.Name}",
|
|
162
|
+
Bird b => $"Bird named {b.Name}"
|
|
163
|
+
// No default discard _ needed
|
|
164
|
+
};
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### 7.2 Closed Hierarchies for Secure Domain Classes
|
|
168
|
+
**Recommendation**: Use the `closed` modifier on base classes or records to prevent external libraries from subclassing domain states.
|
|
169
|
+
```csharp
|
|
170
|
+
public closed abstract record class OrderStatus;
|
|
171
|
+
public record class Pending() : OrderStatus;
|
|
172
|
+
public record class Shipped(DateTime ShippedAt) : OrderStatus;
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### 7.3 Collection Expressions with Arguments
|
|
176
|
+
**Recommendation**: Use `with(...)` at the start of a collection expression to supply constructor arguments such as capacity or comparers inline.
|
|
177
|
+
```csharp
|
|
178
|
+
// Inline capacity
|
|
179
|
+
List<string> items = [with(capacity: initialCount * 2), .. existingItems];
|
|
180
|
+
|
|
181
|
+
// Inline comparer
|
|
182
|
+
HashSet<string> keywords = [with(StringComparer.OrdinalIgnoreCase), "NET", "C#", "Rust"];
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### 7.4 Labeled Break and Continue
|
|
186
|
+
**Recommendation**: In nested loops, use labeled `break` or `continue` to escape directly to the desired level without boolean flags.
|
|
187
|
+
```csharp
|
|
188
|
+
search:
|
|
189
|
+
foreach (var batch in batches)
|
|
190
|
+
{
|
|
191
|
+
foreach (var item in batch)
|
|
192
|
+
{
|
|
193
|
+
if (item.IsTarget)
|
|
194
|
+
{
|
|
195
|
+
Process(item);
|
|
196
|
+
break search;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
```
|
|
@@ -5,9 +5,9 @@ description: >
|
|
|
5
5
|
from an existing class. Trigger for extracting public members, filtering virtual
|
|
6
6
|
or non-public members, enforcing getter-only properties, and safely creating,
|
|
7
7
|
appending, or replacing interface blocks.
|
|
8
|
-
compatibility: "Supports C# 12
|
|
8
|
+
compatibility: "Supports C# 12 through 15 and .NET 10.0/11.0."
|
|
9
9
|
metadata:
|
|
10
|
-
version: "1.
|
|
10
|
+
version: "1.1.0"
|
|
11
11
|
category: "Core"
|
|
12
12
|
---
|
|
13
13
|
|
|
@@ -19,6 +19,7 @@ metadata:
|
|
|
19
19
|
- Identify members with the `virtual` keyword.
|
|
20
20
|
- Identify non-`public` members.
|
|
21
21
|
3. **Environment Awareness**: When the user specifies a target file, read the file content to check for the existence of an Interface with the same name.
|
|
22
|
+
4. **Language Constructs Check (C# 15)**: Verify whether the target type is a C# 15 `union` or a standard class/record. Union types represent closed type choices and usually do not require extracting traditional interfaces.
|
|
22
23
|
|
|
23
24
|
## Reason
|
|
24
25
|
1. **Interface Generation Logic**:
|
|
@@ -5,9 +5,9 @@ description: >
|
|
|
5
5
|
.sln/.csproj files and the exact ASP.NET/EF/C# subdomain is not yet clear. Detect
|
|
6
6
|
the SDK/project shape, run or recommend .NET CLI commands, and route to Minimal
|
|
7
7
|
APIs, Web API, MVC, Tag Helper, EF Core, or C# skills when appropriate.
|
|
8
|
-
compatibility: "Supports .NET 6.0
|
|
8
|
+
compatibility: "Supports .NET 6.0 through .NET 11.0+. Requires .NET SDK installed on the local machine."
|
|
9
9
|
metadata:
|
|
10
|
-
version: "1.
|
|
10
|
+
version: "1.1.0"
|
|
11
11
|
category: "Framework"
|
|
12
12
|
---
|
|
13
13
|
|
|
@@ -20,28 +20,32 @@ This skill serves as the unified entry point for the .NET development environmen
|
|
|
20
20
|
|
|
21
21
|
1. **Environment Detection and Version Validation**
|
|
22
22
|
- Run `dotnet --version` to check the currently installed SDK version.
|
|
23
|
-
- **Mandatory requirement**: Only **.NET 6 or higher** is supported. If a version lower than .NET 6 is detected, prompt the user to upgrade.
|
|
23
|
+
- **Mandatory requirement**: Only **.NET 6 or higher** is supported (including .NET 8 LTS, .NET 9, .NET 10 LTS, and .NET 11 STS). If a version lower than .NET 6 is detected, prompt the user to upgrade.
|
|
24
|
+
- For `net11.0` target frameworks, verify developer environment has the .NET 11 SDK installed.
|
|
24
25
|
|
|
25
26
|
2. **Execute Appropriate .NET CLI**
|
|
26
27
|
- Provide or execute modern CLI commands based on the detected version and project state.
|
|
27
|
-
-
|
|
28
|
+
- Take advantage of modern tooling improvements:
|
|
29
|
+
- In .NET 11+, the Native AOT CLI host and MSBuild server significantly reduce invocation latency.
|
|
28
30
|
- Build and run: `dotnet build`, `dotnet run`
|
|
29
|
-
- Test: `dotnet test`
|
|
31
|
+
- Test: `dotnet test` (with multi-architecture and cross-platform testing enhancements in .NET 11)
|
|
30
32
|
- Package management: `dotnet add package`, `dotnet tool restore`
|
|
31
33
|
|
|
32
34
|
3. **Requirement Analysis and Dynamic Skill Routing**
|
|
33
35
|
- Determine the involved domain based on the user's specific problem or project architecture.
|
|
34
36
|
- If the user's task falls into the following specific domains, prepare to use or recommend the corresponding sub-skill:
|
|
37
|
+
- **`neo-csharp`**: When the requirement involves writing, refactoring, or modernizing C# language code (C# 10 through C# 15, Union Types, pattern matching, async safety).
|
|
35
38
|
- **`neo-dotnet-minimal-apis`**: When the requirement is for lightweight routing development, high-performance microservices, and Controllers are not used.
|
|
36
39
|
- **`neo-dotnet-webapi`**: When the requirement is for traditional RESTful API development following the controller pattern.
|
|
37
40
|
- **`neo-dotnet-mvc`**: When the requirement involves Server-Side Rendering (SSR), Razor views, and ViewModels.
|
|
38
41
|
- **`neo-dotnet-tag-helper`**: When the requirement is for developing custom Razor Tag Helpers using pure C# (without CSHTML), focusing on reusable UI components and logic.
|
|
39
|
-
- **`neo-dotnet-ef-core`**: When the requirement involves database migrations, Linq query optimization, or
|
|
42
|
+
- **`neo-dotnet-ef-core`**: When the requirement involves database migrations, Linq query optimization, model mapping, or EF Core 11 vector search.
|
|
40
43
|
|
|
41
44
|
## Usage Guidelines
|
|
42
|
-
When this skill is triggered, please prioritize checking the SDK environment, then answer the user's .NET-related questions. If the problem is found to belong to one of the
|
|
45
|
+
When this skill is triggered, please prioritize checking the SDK environment, then answer the user's .NET-related questions. If the problem is found to belong to one of the professional domains mentioned above, proactively suggest and prepare to delegate it to the corresponding expert skill for processing.
|
|
43
46
|
|
|
44
47
|
## Documentation
|
|
45
48
|
|
|
46
49
|
### Official References
|
|
50
|
+
- [.NET 11 Overview & What's New](https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-11)
|
|
47
51
|
- [.NET CLI Tools Overview](https://learn.microsoft.com/en-us/dotnet/core/tools/)
|
|
@@ -4,9 +4,9 @@ description: >
|
|
|
4
4
|
Use this skill when the task involves Entity Framework Core models, DbContext,
|
|
5
5
|
migrations, LINQ queries, change tracking, database providers, performance tuning,
|
|
6
6
|
or data access review in .NET projects.
|
|
7
|
-
compatibility: "Supports .NET 6.0 through
|
|
7
|
+
compatibility: "Supports .NET 6.0 through 11.0 environments. Compatible with SQL Server, PostgreSQL, MySQL, and SQLite."
|
|
8
8
|
metadata:
|
|
9
|
-
version: "1.
|
|
9
|
+
version: "1.1.0"
|
|
10
10
|
category: "Framework"
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -36,7 +36,7 @@ metadata:
|
|
|
36
36
|
- Validate concurrency conflict handling logic.
|
|
37
37
|
- Ensure all database accesses follow asynchronous patterns.
|
|
38
38
|
|
|
39
|
-
## Feature Roadmap (.NET 6 -
|
|
39
|
+
## Feature Roadmap (.NET 6 - 11)
|
|
40
40
|
|
|
41
41
|
### .NET 6 & 7 (Foundation)
|
|
42
42
|
- **Split Queries**: Solve the Cartesian product problem.
|
|
@@ -50,10 +50,16 @@ metadata:
|
|
|
50
50
|
- **Auto-compiled Queries**: Further optimize the query compilation process.
|
|
51
51
|
- **Complex Types**: Better support for Value Objects.
|
|
52
52
|
|
|
53
|
-
### .NET 10
|
|
53
|
+
### .NET 10 (Interceptors & AOT)
|
|
54
54
|
- **Advanced Interceptors**: More query lifecycle hooks.
|
|
55
55
|
- **Optimized AOT Support**: AOT pre-compilation optimization for cloud-native environments.
|
|
56
56
|
|
|
57
|
+
### .NET 11 (Advanced Querying & AI Vector Integration)
|
|
58
|
+
- **Complex Types & JSON Columns in TPT/TPC**: Full modeling support for complex types and JSON columns across Table-Per-Type and Table-Per-Concrete-Type hierarchies.
|
|
59
|
+
- **LINQ Translation Enhancements**: `Queryable.FullJoin` translating directly to SQL `FULL OUTER JOIN`, `NULLIF` translation, and `EF.Functions.JsonPathExists()`.
|
|
60
|
+
- **Approximate Vector Search (SQL Server 2025)**: Native `.VectorSearch().WithApproximate()` leveraging `WITH APPROXIMATE` vector index searches; default SQL Server compatibility level upgraded to 160 (SQL Server 2022+).
|
|
61
|
+
- **Breaking Changes Awareness**: `SqlVector<T>` columns return `null` by default on queries without explicit projection; Cosmos DB synchronous I/O and `__jObject` shadow property removed; generic `CoreTypeMapping<T>` for NativeAOT.
|
|
62
|
+
|
|
57
63
|
## Coding Standards
|
|
58
64
|
- **Fluent API Preference**: Prioritize entity configuration classes over Data Annotations.
|
|
59
65
|
- **Async Always**: All I/O operations must be asynchronous.
|
|
@@ -72,6 +78,7 @@ metadata:
|
|
|
72
78
|
|
|
73
79
|
## Documentation
|
|
74
80
|
### Official References
|
|
81
|
+
- [What's new in EF Core 11](https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-11.0/whatsnew)
|
|
75
82
|
- [Entity Framework Core Overview](https://learn.microsoft.com/en-us/ef/core/)
|
|
76
83
|
- [Performance Optimization in EF Core](https://learn.microsoft.com/en-us/ef/core/performance/)
|
|
77
84
|
- [Supported Database Providers](https://learn.microsoft.com/en-us/ef/core/providers/)
|
|
@@ -49,3 +49,28 @@ This document lists common mistakes in Entity Framework Core development and the
|
|
|
49
49
|
### 4.1 Avoid Decoupling the Development Database from Migration Scripts
|
|
50
50
|
- **Problem**: Directly modifying the database schema without creating Migrations.
|
|
51
51
|
- **Good**: Always use `dotnet ef migrations add` to manage schema changes, ensuring team environment consistency.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 5. EF Core 11 Breaking Changes & Anti-Patterns
|
|
56
|
+
|
|
57
|
+
### 5.1 Expecting Automatic `SqlVector<T>` Loading
|
|
58
|
+
- **Problem**: In EF Core 11, `SqlVector<T>` properties return `null` by default in regular entity queries to prevent dragging multi-megabyte embeddings across the wire.
|
|
59
|
+
- **Bad**:
|
|
60
|
+
```csharp
|
|
61
|
+
var doc = await context.Documents.FindAsync(id);
|
|
62
|
+
// doc.Embedding will be null in EF Core 11!
|
|
63
|
+
```
|
|
64
|
+
- **Good**: Explicitly project the vector property when needed:
|
|
65
|
+
```csharp
|
|
66
|
+
var embedding = await context.Documents
|
|
67
|
+
.Where(d => d.Id == id)
|
|
68
|
+
.Select(d => d.Embedding)
|
|
69
|
+
.FirstOrDefaultAsync();
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 5.2 Synchronous Calls in Azure Cosmos DB Provider
|
|
73
|
+
- **Problem**: EF Core 11 completely removed synchronous I/O from the Azure Cosmos DB provider.
|
|
74
|
+
- **Bad**: Calling `.ToList()`, `.FirstOrDefault()`, or `.SaveChanges()` on Cosmos DB context.
|
|
75
|
+
- **Good**: Always use `.ToListAsync()`, `.FirstOrDefaultAsync()`, and `.SaveChangesAsync()`.
|
|
76
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# EF Core Modern Patterns
|
|
2
2
|
|
|
3
|
-
This document introduces recommended development patterns in the Entity Framework Core domain for .NET 6 to
|
|
3
|
+
This document introduces recommended development patterns in the Entity Framework Core domain for .NET 6 to 11+.
|
|
4
4
|
|
|
5
5
|
## 1. Advanced Query Patterns
|
|
6
6
|
|
|
@@ -51,3 +51,41 @@ await context.Orders
|
|
|
51
51
|
|
|
52
52
|
### 5.1 Extension Types for Computed Properties on Entities
|
|
53
53
|
**Recommendation**: Leverage C# 14's Extension Types to add computed properties to POCO entities without affecting the database schema.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 6. EF Core 11 Modern Patterns
|
|
58
|
+
|
|
59
|
+
### 6.1 LINQ FullJoin (SQL FULL OUTER JOIN)
|
|
60
|
+
**Recommendation**: Use `Queryable.FullJoin` to express full outer joins directly in LINQ rather than writing complex union queries or raw SQL:
|
|
61
|
+
```csharp
|
|
62
|
+
var query = context.Customers
|
|
63
|
+
.FullJoin(
|
|
64
|
+
context.Orders,
|
|
65
|
+
c => c.Id,
|
|
66
|
+
o => o.CustomerId,
|
|
67
|
+
(customer, order) => new { Customer = customer, Order = order });
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 6.2 Approximate Nearest Neighbor Vector Search (SQL Server 2025)
|
|
71
|
+
**Recommendation**: For high-dimensional vector search with vector indexing, use `.WithApproximate()` to trigger SQL Server's approximate search:
|
|
72
|
+
```csharp
|
|
73
|
+
var results = await context.Documents
|
|
74
|
+
.OrderBy(d => EF.Functions.VectorDistance("cosine", d.Embedding, queryVector))
|
|
75
|
+
.VectorSearch()
|
|
76
|
+
.WithApproximate()
|
|
77
|
+
.Take(5)
|
|
78
|
+
.Select(d => new { d.Id, d.Title }) // Always explicitly project non-vector fields
|
|
79
|
+
.ToListAsync();
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### 6.3 Complex Types & JSON in TPT/TPC Hierarchies
|
|
83
|
+
**Recommendation**: Model domain value objects as complex types or JSON columns even on polymorphic hierarchies using Table-Per-Type (TPT) or Table-Per-Concrete-Type (TPC):
|
|
84
|
+
```csharp
|
|
85
|
+
public abstract class Payment
|
|
86
|
+
{
|
|
87
|
+
public int Id { get; set; }
|
|
88
|
+
public required Money Amount { get; set; } // Complex Type supported in EF Core 11 TPT/TPC
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
@@ -4,9 +4,9 @@ description: >
|
|
|
4
4
|
Use this skill when building, debugging, refactoring, or reviewing ASP.NET Core
|
|
5
5
|
Minimal APIs, lightweight endpoints, route groups, endpoint filters, typed results,
|
|
6
6
|
OpenAPI metadata, or high-performance .NET API services without controllers.
|
|
7
|
-
compatibility: "Supports .NET 6.0 through
|
|
7
|
+
compatibility: "Supports .NET 6.0 through 11.0 environments. Requires .NET SDK installed locally."
|
|
8
8
|
metadata:
|
|
9
|
-
version: "1.
|
|
9
|
+
version: "1.1.0"
|
|
10
10
|
category: "Framework"
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -36,7 +36,7 @@ metadata:
|
|
|
36
36
|
- Check whether the generated OpenAPI documentation is complete.
|
|
37
37
|
- Ensure asynchronous operations correctly pass the `CancellationToken`.
|
|
38
38
|
|
|
39
|
-
## Feature Roadmap (.NET 6 -
|
|
39
|
+
## Feature Roadmap (.NET 6 - 11)
|
|
40
40
|
|
|
41
41
|
### .NET 6 & 7 (Foundation)
|
|
42
42
|
- **Minimal Hosting**: Simplified startup process and top-level statements.
|
|
@@ -50,10 +50,16 @@ metadata:
|
|
|
50
50
|
- **HybridCache**: High-performance multi-level caching support.
|
|
51
51
|
- **OpenAPI Improvements**: Better OpenAPI code generation.
|
|
52
52
|
|
|
53
|
-
### .NET 10
|
|
53
|
+
### .NET 10 (AOT & Middleware)
|
|
54
54
|
- **Native AOT Optimization**: AOT-optimized compilation tailored for Minimal APIs.
|
|
55
55
|
- **Enhanced Middleware Patterns**: New middleware designed for lightweight architectures.
|
|
56
56
|
|
|
57
|
+
### .NET 11+ (Version-Specific Features)
|
|
58
|
+
- **Asynchronous Validation Support**: Native async validation rules across Minimal API endpoints and parameter binding, awaiting validation logic seamlessly.
|
|
59
|
+
- **OpenAPI 3.2 by Default**: Updated default specification to OpenAPI 3.2, with support for `OpenApiGenerationEnvironment` in build-time generation.
|
|
60
|
+
- **Zstandard (zstd) Compression**: Native high-ratio, low-latency compression provider for response compression and request decompression.
|
|
61
|
+
- **Runtime Async Performance**: Reduced task state machine allocations and cleaner async stack traces across endpoint handlers.
|
|
62
|
+
|
|
57
63
|
## Coding Standards
|
|
58
64
|
- **Clean Routing**: Prioritize using extension methods to modularize routes.
|
|
59
65
|
- **Strong Typing**: Prioritize using `TypedResults` and `Results<T1, T2>`.
|
|
@@ -72,6 +78,7 @@ metadata:
|
|
|
72
78
|
|
|
73
79
|
## Documentation
|
|
74
80
|
### Official References
|
|
81
|
+
- [What's new in ASP.NET Core in .NET 11](https://learn.microsoft.com/en-us/aspnet/core/release-notes/aspnetcore-11.0)
|
|
75
82
|
- [Minimal APIs Overview](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis)
|
|
76
83
|
- [Route groups and filters](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis/route-handlers)
|
|
77
84
|
- [Typed responses in Minimal APIs](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis/responses)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# .NET Minimal APIs Modern Patterns
|
|
2
2
|
|
|
3
|
-
This document introduces recommended development patterns in the Minimal APIs domain for .NET 6 to
|
|
3
|
+
This document introduces recommended development patterns in the Minimal APIs domain for .NET 6 to 11+.
|
|
4
4
|
|
|
5
5
|
## 1. Architectural Patterns
|
|
6
6
|
|
|
@@ -66,3 +66,51 @@ app.MapGet("/users", () => ...)
|
|
|
66
66
|
```csharp
|
|
67
67
|
app.MapGet("/health", static () => "Healthy");
|
|
68
68
|
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 5. .NET 11 Modern Patterns
|
|
73
|
+
|
|
74
|
+
### 5.1 Asynchronous Endpoint Validation
|
|
75
|
+
**Recommendation**: In .NET 11, leverage native async validation directly in endpoint filters or validation pipelines to perform async service lookups without blocking threads.
|
|
76
|
+
```csharp
|
|
77
|
+
app.MapPost("/users", async (UserCreateDto dto, IUserService userService) =>
|
|
78
|
+
{
|
|
79
|
+
// Native async validation flows through EndpointFilter cleanly
|
|
80
|
+
return TypedResults.Created($"/users/{dto.Username}");
|
|
81
|
+
}).AddEndpointFilter(async (invocationContext, next) =>
|
|
82
|
+
{
|
|
83
|
+
var dto = invocationContext.GetArgument<UserCreateDto>(0);
|
|
84
|
+
var userService = invocationContext.HttpContext.RequestServices.GetRequiredService<IUserService>();
|
|
85
|
+
if (await userService.ExistsAsync(dto.Username))
|
|
86
|
+
{
|
|
87
|
+
return TypedResults.Conflict("Username already taken.");
|
|
88
|
+
}
|
|
89
|
+
return await next(invocationContext);
|
|
90
|
+
});
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 5.2 Zstandard (zstd) HTTP Response Compression
|
|
94
|
+
**Recommendation**: Register Zstandard response compression provider in `Program.cs` to achieve higher compression ratios and faster streaming for high-throughput Minimal APIs.
|
|
95
|
+
```csharp
|
|
96
|
+
builder.Services.AddResponseCompression(options =>
|
|
97
|
+
{
|
|
98
|
+
options.EnableForHttps = true;
|
|
99
|
+
options.Providers.Add<ZstandardCompressionProvider>();
|
|
100
|
+
});
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 5.3 OpenAPI 3.2 Environment Transformers
|
|
104
|
+
**Recommendation**: Utilize OpenAPI 3.2 default generation and environment transformers to separate development and production schemas.
|
|
105
|
+
```csharp
|
|
106
|
+
builder.Services.AddOpenApi(options =>
|
|
107
|
+
{
|
|
108
|
+
// OpenAPI 3.2 is default in .NET 11
|
|
109
|
+
options.AddDocumentTransformer((document, context, cancellationToken) =>
|
|
110
|
+
{
|
|
111
|
+
document.Info.Description = $"Generated for {builder.Environment.EnvironmentName}";
|
|
112
|
+
return Task.CompletedTask;
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
```
|
|
116
|
+
|
|
@@ -4,9 +4,9 @@ description: >
|
|
|
4
4
|
Use this skill when building, debugging, refactoring, or reviewing ASP.NET Core
|
|
5
5
|
MVC apps with Razor views, controllers, ViewModels, validation, Tag Helpers,
|
|
6
6
|
View Components, layouts, or server-rendered workflows.
|
|
7
|
-
compatibility: "Supports .NET 6.0 through
|
|
7
|
+
compatibility: "Supports .NET 6.0 through 11.0 environments. Requires .NET SDK installed locally."
|
|
8
8
|
metadata:
|
|
9
|
-
version: "1.
|
|
9
|
+
version: "1.1.0"
|
|
10
10
|
category: "Framework"
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -36,7 +36,7 @@ metadata:
|
|
|
36
36
|
- Check whether model validation correctly operates on both the frontend and backend.
|
|
37
37
|
- Ensure Antiforgery tokens are correctly applied to all state-modifying requests.
|
|
38
38
|
|
|
39
|
-
## Feature Roadmap (.NET 6 -
|
|
39
|
+
## Feature Roadmap (.NET 6 - 11)
|
|
40
40
|
|
|
41
41
|
### .NET 6 & 7 (Foundation)
|
|
42
42
|
- **Tag Helpers**: Declarative HTML attribute extensions.
|
|
@@ -50,10 +50,16 @@ metadata:
|
|
|
50
50
|
- **Keyed Services in Controllers**: Finer-grained dependency injection support.
|
|
51
51
|
- **Native AOT for MVC**: Metadata compilation optimization tailored for AOT.
|
|
52
52
|
|
|
53
|
-
### .NET 10
|
|
53
|
+
### .NET 10 (Extensions & Serialization)
|
|
54
54
|
- **Extension Members for IHtmlHelper**: Extending view helper functions.
|
|
55
55
|
- **Advanced Serialization in Views**: Performance optimization for large view models.
|
|
56
56
|
|
|
57
|
+
### .NET 11+ (Version-Specific Features)
|
|
58
|
+
- **Zstandard (zstd) Compression for SSR**: High-efficiency compression for server-rendered HTML payloads and static assets.
|
|
59
|
+
- **Asynchronous Form Validation**: Extended async validation coordination for complex input pipelines.
|
|
60
|
+
- **Agentic UI & Blazor Component Integration**: Native AG-UI / Blazor AI components in hybrid MVC apps, with `TempData` support in static SSR.
|
|
61
|
+
- **Runtime Async Performance**: Reduced async allocation and cleaner execution traces in Razor view generation.
|
|
62
|
+
|
|
57
63
|
## Coding Standards
|
|
58
64
|
- **Strongly Typed Views**: All views must have an explicit `@model`.
|
|
59
65
|
- **ViewModel Separation**: Strictly prohibit exposing database entities directly to views.
|
|
@@ -72,6 +78,7 @@ metadata:
|
|
|
72
78
|
|
|
73
79
|
## Documentation
|
|
74
80
|
### Official References
|
|
81
|
+
- [What's new in ASP.NET Core in .NET 11](https://learn.microsoft.com/en-us/aspnet/core/release-notes/aspnetcore-11.0)
|
|
75
82
|
- [Overview of ASP.NET Core MVC](https://learn.microsoft.com/en-us/aspnet/core/mvc/overview)
|
|
76
83
|
- [Tag Helpers in ASP.NET Core](https://learn.microsoft.com/en-us/aspnet/core/mvc/views/tag-helpers/intro)
|
|
77
84
|
- [View components in ASP.NET Core](https://learn.microsoft.com/en-us/aspnet/core/mvc/views/view-components)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# .NET MVC Modern Patterns
|
|
2
2
|
|
|
3
|
-
This document introduces recommended development patterns in the ASP.NET Core MVC mode for .NET 6 to
|
|
3
|
+
This document introduces recommended development patterns in the ASP.NET Core MVC mode for .NET 6 to 11+.
|
|
4
4
|
|
|
5
5
|
## 1. UI Modularization
|
|
6
6
|
|
|
@@ -54,3 +54,40 @@ public class ShoppingCartViewComponent : ViewComponent
|
|
|
54
54
|
|
|
55
55
|
### 5.1 Extension Types for IHtmlHelper
|
|
56
56
|
**Recommendation**: Leverage C# 14's Extension Types to add domain-specific rendering methods to `IHtmlHelper`, not just static extension methods.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## 6. .NET 11 Modern Patterns
|
|
61
|
+
|
|
62
|
+
### 6.1 Zstandard (zstd) Compression for Server-Side Rendering
|
|
63
|
+
**Recommendation**: Enable Zstandard compression provider to dramatically accelerate the transmission of large HTML DOM trees rendered by Razor views:
|
|
64
|
+
```csharp
|
|
65
|
+
builder.Services.AddResponseCompression(options =>
|
|
66
|
+
{
|
|
67
|
+
options.EnableForHttps = true;
|
|
68
|
+
options.Providers.Add<ZstandardCompressionProvider>();
|
|
69
|
+
});
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 6.2 Asynchronous Validation in MVC Forms
|
|
73
|
+
**Recommendation**: Coordinate async form validation rules with ViewModels to perform async verification (e.g. database uniqueness checks) before committing form transactions:
|
|
74
|
+
```csharp
|
|
75
|
+
[HttpPost]
|
|
76
|
+
[ValidateAntiForgeryToken]
|
|
77
|
+
public async Task<IActionResult> RegisterAsync(RegisterViewModel model, IUserService userService)
|
|
78
|
+
{
|
|
79
|
+
if (await userService.IsEmailTakenAsync(model.Email))
|
|
80
|
+
{
|
|
81
|
+
ModelState.AddModelError(nameof(model.Email), "Email is already registered.");
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (!ModelState.IsValid)
|
|
85
|
+
{
|
|
86
|
+
return View(model);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
await userService.CreateUserAsync(model);
|
|
90
|
+
return RedirectToAction(nameof(Index));
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
@@ -4,9 +4,9 @@ description: >
|
|
|
4
4
|
Use this skill when the user asks to design, implement, refactor, or review custom
|
|
5
5
|
ASP.NET Core Tag Helpers in C#, including TagBuilder usage, strongly typed attributes,
|
|
6
6
|
dependency injection, ProcessAsync, and reusable Razor UI behavior.
|
|
7
|
-
compatibility: "Supports .NET 6.0 through
|
|
7
|
+
compatibility: "Supports .NET 6.0 through 11.0+ environments."
|
|
8
8
|
metadata:
|
|
9
|
-
version: "1.
|
|
9
|
+
version: "1.1.0"
|
|
10
10
|
category: "Framework"
|
|
11
11
|
pattern: generator
|
|
12
12
|
output-format: csharp
|
|
@@ -4,9 +4,9 @@ description: >
|
|
|
4
4
|
Use this skill when building, debugging, refactoring, or reviewing controller-based
|
|
5
5
|
ASP.NET Core Web APIs, including ControllerBase, ActionResult<T>, Problem Details,
|
|
6
6
|
API versioning, global exception handling, DTOs, and OpenAPI behavior.
|
|
7
|
-
compatibility: "Supports .NET 6.0 through
|
|
7
|
+
compatibility: "Supports .NET 6.0 through 11.0 environments. Requires .NET SDK installed locally."
|
|
8
8
|
metadata:
|
|
9
|
-
version: "1.
|
|
9
|
+
version: "1.1.0"
|
|
10
10
|
category: "Framework"
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -36,7 +36,7 @@ metadata:
|
|
|
36
36
|
- Check NRT (Nullable Reference Types) safety.
|
|
37
37
|
- Ensure asynchronous operations correctly pass down `CancellationToken`.
|
|
38
38
|
|
|
39
|
-
## Feature Roadmap (.NET 6 -
|
|
39
|
+
## Feature Roadmap (.NET 6 - 11)
|
|
40
40
|
|
|
41
41
|
### .NET 6 & 7 (Foundation)
|
|
42
42
|
- **Controllers Architecture**: Traditional controller patterns and attribute routing.
|
|
@@ -50,10 +50,16 @@ metadata:
|
|
|
50
50
|
- **Keyed Services**: More flexible dependency injection options.
|
|
51
51
|
- **HybridCache**: Multi-level caching optimization.
|
|
52
52
|
|
|
53
|
-
### .NET 10
|
|
53
|
+
### .NET 10 (Extensions & Serialization)
|
|
54
54
|
- **Extension Members for Controllers**: Extending base controller functionality.
|
|
55
55
|
- **Enhanced Serialization**: JSON optimization for large payloads.
|
|
56
56
|
|
|
57
|
+
### .NET 11+ (Version-Specific Features)
|
|
58
|
+
- **OpenAPI 3.2 Specification by Default**: Upgraded documentation standards with enhanced schema generation.
|
|
59
|
+
- **Zstandard (zstd) Compression**: Native high-speed, high-ratio compression via `ZstandardCompressionProviderOptions`.
|
|
60
|
+
- **TLS Channel Binding for Negotiate Authentication**: Enhanced transport security for Kerberos / NTLM multi-round auth.
|
|
61
|
+
- **Runtime Async Controller Execution**: Reduced Task allocation overhead and cleaner stack traces during controller action execution.
|
|
62
|
+
|
|
57
63
|
## Coding Standards
|
|
58
64
|
- **Strong Typing**: Prioritize `ActionResult<T>` to improve Swagger support.
|
|
59
65
|
- **NRT Compliance**: Strictly enforce Null safety to reduce runtime errors.
|
|
@@ -72,6 +78,7 @@ metadata:
|
|
|
72
78
|
|
|
73
79
|
## Documentation
|
|
74
80
|
### Official References
|
|
81
|
+
- [What's new in ASP.NET Core in .NET 11](https://learn.microsoft.com/en-us/aspnet/core/release-notes/aspnetcore-11.0)
|
|
75
82
|
- [ASP.NET Core Web API Overview](https://learn.microsoft.com/en-us/aspnet/core/web-api/)
|
|
76
83
|
- [Handle errors in ASP.NET Core web APIs (Problem Details)](https://learn.microsoft.com/en-us/aspnet/core/web-api/handle-errors)
|
|
77
84
|
- [Controller action return types in ASP.NET Core web API](https://learn.microsoft.com/en-us/aspnet/core/web-api/action-return-types)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# .NET Web API Modern Patterns
|
|
2
2
|
|
|
3
|
-
This document introduces recommended development patterns in the Controller-based mode for .NET 6 to
|
|
3
|
+
This document introduces recommended development patterns in the Controller-based mode for .NET 6 to 11+.
|
|
4
4
|
|
|
5
5
|
## 1. Error Handling and Response Formats
|
|
6
6
|
|
|
@@ -50,3 +50,38 @@ This document introduces recommended development patterns in the Controller-base
|
|
|
50
50
|
|
|
51
51
|
### 5.1 Extension Types for Controllers
|
|
52
52
|
**Recommendation**: Leverage Extension Types to expand common auxiliary properties or methods for the base `ControllerBase`.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 6. .NET 11 Modern Patterns
|
|
57
|
+
|
|
58
|
+
### 6.1 Zstandard (zstd) Response Compression for Controllers
|
|
59
|
+
**Recommendation**: Configure Zstandard compression options to reduce payload size on heavy JSON responses from API controllers:
|
|
60
|
+
```csharp
|
|
61
|
+
builder.Services.AddResponseCompression(options =>
|
|
62
|
+
{
|
|
63
|
+
options.EnableForHttps = true;
|
|
64
|
+
options.Providers.Add<ZstandardCompressionProvider>();
|
|
65
|
+
});
|
|
66
|
+
builder.Services.Configure<ZstandardCompressionProviderOptions>(options =>
|
|
67
|
+
{
|
|
68
|
+
options.Level = System.IO.Compression.CompressionLevel.Fastest;
|
|
69
|
+
});
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 6.2 OpenAPI 3.2 Specification Integration
|
|
73
|
+
**Recommendation**: Target OpenAPI 3.2 metadata in API controllers to provide richer schema details for downstream clients and agentic tools:
|
|
74
|
+
```csharp
|
|
75
|
+
[ApiController]
|
|
76
|
+
[Route("api/[controller]")]
|
|
77
|
+
[Produces("application/json")]
|
|
78
|
+
public class CatalogController : ControllerBase
|
|
79
|
+
{
|
|
80
|
+
[HttpGet("{id:int}")]
|
|
81
|
+
[EndpointSummary("Retrieve item by unique identifier")]
|
|
82
|
+
[ProducesResponseType(typeof(ItemDto), StatusCodes.Status200OK)]
|
|
83
|
+
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
|
84
|
+
public async Task<ActionResult<ItemDto>> GetItemAsync(int id, CancellationToken ct) => ...;
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
@@ -98,7 +98,7 @@ metadata:
|
|
|
98
98
|
- 只修改預覽列出的已確認路徑;搬遷時來源、目的地與連結更新都必須列在確認清單中。
|
|
99
99
|
- `rebuild` 必須保留仍正確的專案事實,並可從版本控制或已報告的暫存快照復原。
|
|
100
100
|
- `migrate` 只能在確認後執行;先完成內容與連結的核對,再移除來源路徑,且不得覆寫既有目的地。
|
|
101
|
-
-
|
|
101
|
+
- `.neo_harness/docs/exec-plans/active/` 與 `completed/` 都必須包含 `.GITKEEP`,不新增 `README.md`;空目錄只以 `.GITKEEP` 追蹤,不填入虛構計畫。
|
|
102
102
|
- 新建立的執行計畫檔名必須使用 `YYYYMMDDHHmmss_<原計畫檔名>.md`;時間戳取建立當下執行環境的本地時間,從 `active` 移至 `completed` 時保留原時間戳。既有計畫搬遷至 `.neo_harness/` 時保留原檔名與時間戳。
|
|
103
103
|
- 既有未加時間戳的計畫不批次改名;更新既有計畫時沿用原檔名。
|
|
104
104
|
- `.neo_harness/docs/scripts.md` 必須只含 `指令`、`用途` 兩欄的 Markdown table,收錄專案設定或文件可驗證的所有命令;沒有可驗證命令時只保留空表頭。
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
| `.neo_harness/docs/scripts.md` | 保存專案所有已驗證命令及用途 | 一律評估;不存在時建立,存在時保留有效內容並補齊已驗證命令 |
|
|
11
11
|
| `.neo_harness/ARCHITECTURE.md` | 記錄目前元件、責任、依賴方向、邊界與可執行約束 | 一律評估;未知架構明確標示,不畫理想架構 |
|
|
12
12
|
| `.neo_harness/PLANS.md` | 定義何時使用持久計畫、必要章節及生命週期 | 一律評估;沿用專案既有計畫命名時同步調整連結 |
|
|
13
|
-
| `.neo_harness/docs/exec-plans/active/` | 保存進行中且可由新工作階段接續的計畫 |
|
|
14
|
-
| `.neo_harness/docs/exec-plans/completed/` | 保存完成結果、決策與驗證證據 |
|
|
13
|
+
| `.neo_harness/docs/exec-plans/active/` | 保存進行中且可由新工作階段接續的計畫 | 必須包含 `.GITKEEP`;沒有現行計畫時以此檔案追蹤目錄,不新增 `README.md` |
|
|
14
|
+
| `.neo_harness/docs/exec-plans/completed/` | 保存完成結果、決策與驗證證據 | 必須包含 `.GITKEEP`;沒有完成計畫時以此檔案追蹤目錄,不新增 `README.md` |
|
|
15
15
|
|
|
16
16
|
根目錄 `AGENTS.md` 是唯一入口;不得建立 `.neo_harness/AGENTS.md`。專案已有等價且廣泛引用的舊路徑時,先列入搬遷預覽,不另建第二套真相來源。
|
|
17
17
|
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
- 定義需要持久計畫的門檻,例如多階段、跨模組、遷移、陌生領域或可能跨工作階段的任務。
|
|
34
34
|
- 每份計畫必須自包含;讀者只需目前工作樹與計畫本身,不得依賴先前對話或未連結的外部資訊。
|
|
35
|
-
- 計畫目錄固定為 `.neo_harness/docs/exec-plans/active/` 與 `.neo_harness/docs/exec-plans/completed
|
|
35
|
+
- 計畫目錄固定為 `.neo_harness/docs/exec-plans/active/` 與 `.neo_harness/docs/exec-plans/completed/`;兩個目錄都必須包含 `.GITKEEP`,且不新增 `README.md`。
|
|
36
36
|
- 新建立的計畫檔名使用 `YYYYMMDDHHmmss_<原計畫檔名>.md`;時間戳取本地時間,從 `active` 移至 `completed` 時沿用。
|
|
37
37
|
- 既有未加時間戳的計畫不批次改名;更新既有計畫時維持原檔名與既有連結。
|
|
38
38
|
- 從舊路徑搬遷既有計畫時保留原檔名與時間戳,不因搬遷而重新命名。
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: neo-iso-27001
|
|
3
|
-
description: >
|
|
4
|
-
Use this skill when the user needs to establish, review, or improve an ISO/IEC 27001 ISMS,
|
|
5
|
-
perform information security risk discovery, define scope, create an evidence matrix,
|
|
6
|
-
conduct a gap analysis, draft a Statement of Applicability, prepare for an internal audit,
|
|
7
|
-
or create an improvement plan. Use neo-iso-27701 when the main concern is PII, privacy
|
|
8
|
-
management, or PIMS. Do not use this skill for legal advice or certification guarantees.
|
|
9
|
-
license: MIT
|
|
10
|
-
compatibility: Requires an Agent Skills client with Markdown and file-reading support; network access for current-version checks; and user-provided licensed documents for precise clause-level analysis.
|
|
11
|
-
metadata:
|
|
12
|
-
version: "1.0.0"
|
|
13
|
-
pattern: "tool-wrapper,pipeline,reviewer"
|
|
14
|
-
domain: "information-security-management"
|
|
15
|
-
source-snapshot: "2026-08-12"
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
# Neo ISO/IEC 27001
|
|
19
|
-
|
|
20
|
-
Provide evidence-based assistance for establishing, improving, or reviewing an information
|
|
21
|
-
security management system (ISMS). Read `references/sources-and-scope.md` first, then follow
|
|
22
|
-
the workflow below.
|
|
23
|
-
|
|
24
|
-
## Scope and hard boundaries
|
|
25
|
-
|
|
26
|
-
In scope:
|
|
27
|
-
|
|
28
|
-
- ISMS implementation roadmaps, scope definition, and interested-party inventories.
|
|
29
|
-
- Information security risk registers, treatment plans, and residual-risk tracking.
|
|
30
|
-
- Evidence matrices, gap analyses, internal-audit preparation, and corrective actions.
|
|
31
|
-
- Organization-specific Statement of Applicability (SoA) working drafts.
|
|
32
|
-
|
|
33
|
-
Out of scope:
|
|
34
|
-
|
|
35
|
-
- Guarantees about legal, regulatory, privacy-policy, or certification outcomes.
|
|
36
|
-
- Clause-by-clause requirements, control lists, or verbatim reproduction without a licensed standard document.
|
|
37
|
-
- Direct deployment of technical controls unless the user separately provides the technical requirements and authorized scope.
|
|
38
|
-
|
|
39
|
-
## Version gate
|
|
40
|
-
|
|
41
|
-
1. Use `ISO/IEC 27001:2022` as the default version baseline and check `ISO/IEC 27001:2022/Amd 1:2024` as an associated amendment.
|
|
42
|
-
2. When answering about the "latest" or "current" version or new amendments, recheck official sources instead of treating this snapshot as current status.
|
|
43
|
-
3. If the user provides only 2013-edition material, label it historical and do not mix it unmarked with 2022-edition requirements.
|
|
44
|
-
4. Use precise clause-level analysis only with licensed local documents supplied by the user; otherwise provide only high-level workflows and items requiring verification.
|
|
45
|
-
|
|
46
|
-
## Evidence-driven workflow
|
|
47
|
-
|
|
48
|
-
Execute these steps in order. Do not invent organizational facts when evidence is missing:
|
|
49
|
-
|
|
50
|
-
1. **Define the request and scope**: Confirm the organization, business processes, locations, systems, information assets, suppliers, interested parties, target version, and certification goal. Ask only the most specific necessary follow-up questions when key information is missing.
|
|
51
|
-
2. **Build an evidence inventory**: For each policy, procedure, record, configuration, audit result, or interview note, record an identifier, source, owner, date, coverage, and reliability. Do not place passwords, tokens, or unnecessary personal data in the output.
|
|
52
|
-
3. **Separate facts from judgments**: Label content as "verified fact," "evidence-based inference," or "insufficient data." Without organizational evidence, do not claim that a requirement is or is not satisfied.
|
|
53
|
-
4. **Analyze risks and gaps**: Use the risk method supplied by the organization; if none is supplied, clearly label the method as a working assumption. Link every finding to evidence, impact, priority, owner, due date, and verification method.
|
|
54
|
-
5. **Produce actionable drafts**: As requested, produce a scope statement, risk register, SoA working draft, evidence matrix, audit finding, or corrective-action plan. Mark every working draft with its version and approval status.
|
|
55
|
-
6. **Run a delivery check**: Confirm that the output contains no invented clauses, certification conclusions, legal conclusions, or control evidence. Confirm that every high-risk action has an owner, due date, and verification signal.
|
|
56
|
-
|
|
57
|
-
## Work-product format
|
|
58
|
-
|
|
59
|
-
Unless the user requests a single fact, use this structure for assessments and reviews:
|
|
60
|
-
|
|
61
|
-
```markdown
|
|
62
|
-
## Conclusion
|
|
63
|
-
## Applicable scope and version
|
|
64
|
-
## Verified evidence
|
|
65
|
-
## Risks and gaps
|
|
66
|
-
## Improvement and corrective-action plan
|
|
67
|
-
## Missing information and limitations
|
|
68
|
-
## Sources and verification date
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Each finding must include at least an identifier, evidence, problem, impact, priority, recommended action, owner, due date, and verification method. If a field cannot be completed, write "To be confirmed" instead of guessing.
|
|
72
|
-
|
|
73
|
-
## Worksheet fields
|
|
74
|
-
|
|
75
|
-
- **Scope table**: Organization, processes, locations, systems, information assets, exclusions, exclusion rationale, approver, and version.
|
|
76
|
-
- **Risk register**: Risk identifier, scenario, asset or process, existing measures, risk method, treatment option, owner, due date, residual risk, and evidence.
|
|
77
|
-
- **SoA working draft**: Requirement or control identifier, applicability status, organizational rationale, implementation evidence, owner, review date, referenced version, and approval status. Do not invent identifiers without a licensed standard.
|
|
78
|
-
- **Evidence matrix**: Criteria source, evidence identifier, evidence owner, coverage period, evidence status, gap, remediation action, and verification method.
|
|
79
|
-
|
|
80
|
-
## Routing to neo-iso-27701
|
|
81
|
-
|
|
82
|
-
- Use `neo-iso-27701` when the main issue is PII processing, privacy responsibility, PIMS, or privacy evidence.
|
|
83
|
-
- When information security and privacy are both in scope, complete the analyses separately and integrate them with explicit cross-references. Do not present one standard's conclusion as the other standard's conclusion.
|
|
84
|
-
- The independent management-system status of 27701 does not mean that the organization has necessarily established 27001; verify the actual scope and evidence first.
|
|
85
|
-
|
|
86
|
-
## Common pitfalls
|
|
87
|
-
|
|
88
|
-
- Do not mix 2022-edition and 2013-edition documents, risk methods, or control mappings without labeling them.
|
|
89
|
-
- An SoA is an organizational scope and risk-decision work product; do not infer it solely from a technology stack or industry name.
|
|
90
|
-
- Implementing an ISMS, preparing for an audit, and obtaining third-party certification are different states; describe them separately.
|
|
91
|
-
- Having a policy does not equal having effective evidence; check execution records, owners, coverage periods, and sampling results.
|
|
92
|
-
- Every conclusion about the latest version must include a verification date and source; if network access is unavailable, state that current status cannot be confirmed.
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"query": "Using ISO/IEC 27001:2022, inventory our current policies, risk register, and audit records and produce a gap analysis.",
|
|
4
|
-
"should_trigger": true
|
|
5
|
-
},
|
|
6
|
-
{
|
|
7
|
-
"query": "We need to establish an ISMS. Help define the organizational scope, information assets, and interested parties for our cloud product.",
|
|
8
|
-
"should_trigger": true
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"query": "Design an ISO 27001 evidence matrix in which every evidence item has an owner, date, and remediation status.",
|
|
12
|
-
"should_trigger": true
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"query": "I am preparing for an ISO/IEC 27001 internal audit. Give me a working format for findings and corrective actions.",
|
|
16
|
-
"should_trigger": true
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"query": "Which ISO 27001 version should we check now? Verify the 2022 edition and the 2024 amendment.",
|
|
20
|
-
"should_trigger": true
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"query": "Based on our risk register, plan an ISMS implementation and management-review improvement roadmap.",
|
|
24
|
-
"should_trigger": true
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"query": "Review this SoA draft and identify items without a rationale, owner, or implementation evidence.",
|
|
28
|
-
"should_trigger": true
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"query": "A customer requested ISO 27001 evidence, but we have only a few policy documents. Explain which verifiable evidence is still missing.",
|
|
32
|
-
"should_trigger": true
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"query": "Compare the gaps between our current ISMS and the target certification scope, and classify recommendations as high, medium, or low priority.",
|
|
36
|
-
"should_trigger": true
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"query": "We also process personal data. Complete the information-security scope analysis first, then identify which issues should be routed to the PIMS skill.",
|
|
40
|
-
"should_trigger": true
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"query": "List every ISO/IEC 27001:2022 clause and Annex A control verbatim. I have not provided the official standard document.",
|
|
44
|
-
"should_trigger": true
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"query": "Write an ASP.NET Core middleware that encrypts every API response.",
|
|
48
|
-
"should_trigger": false
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"query": "Write a vulnerability scanner in Python to scan our Kubernetes cluster.",
|
|
52
|
-
"should_trigger": false
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"query": "Explain the PIMS and processor responsibilities in ISO/IEC 27701.",
|
|
56
|
-
"should_trigger": false
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"query": "Help me create an audit plan for an ISO 9001 quality management system.",
|
|
60
|
-
"should_trigger": false
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"query": "List the complete original text of every ISO/IEC 27002 control.",
|
|
64
|
-
"should_trigger": false
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"query": "Determine whether we comply with GDPR and provide legal advice for the company.",
|
|
68
|
-
"should_trigger": false
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"query": "Compare the current prices and discounts of three cloud providers.",
|
|
72
|
-
"should_trigger": false
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"query": "Design a React login page that meets accessibility standards.",
|
|
76
|
-
"should_trigger": false
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"query": "Convert a Git diff into a Conventional Commits message.",
|
|
80
|
-
"should_trigger": false
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"query": "Answer with only the three English words in the CIA triad; do not perform any management-system analysis.",
|
|
84
|
-
"should_trigger": false
|
|
85
|
-
}
|
|
86
|
-
]
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"skill_name": "neo-iso-27001",
|
|
3
|
-
"evals": [
|
|
4
|
-
{
|
|
5
|
-
"id": 1,
|
|
6
|
-
"prompt": "We are a 40-person SaaS company whose scope includes product, support, and cloud operations. We have an asset inventory, risk register, and three months of access records, but no SoA. Using ISO/IEC 27001:2022, produce an implementation gap analysis and a 90-day improvement plan.",
|
|
7
|
-
"expected_output": "An evidence-driven gap analysis in English that first lists the organizational scope and assumptions, then verified evidence, gaps, priorities, owners, and due dates, while labeling the SoA as an approval-pending working draft.",
|
|
8
|
-
"assertions": [
|
|
9
|
-
"The output contains sections for organizational scope, evidence, gaps, and an improvement plan",
|
|
10
|
-
"Each major action includes an owner, due date, and verification method, or is explicitly marked to be confirmed",
|
|
11
|
-
"The output does not claim that the company has obtained or will necessarily obtain certification",
|
|
12
|
-
"Unavailable SoA content is labeled as a working draft or insufficient data"
|
|
13
|
-
]
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"id": 2,
|
|
17
|
-
"prompt": "What is the current ISO 27001 baseline? Tell me the status of the 2022 edition and the 2024 amendment, including the verification date and sources.",
|
|
18
|
-
"expected_output": "The answer lists ISO/IEC 27001:2022 and ISO/IEC 27001:2022/Amd 1:2024, includes the verification date and official sources, and identifies details that public metadata cannot establish.",
|
|
19
|
-
"assertions": [
|
|
20
|
-
"The answer mentions ISO/IEC 27001:2022",
|
|
21
|
-
"The answer mentions ISO/IEC 27001:2022/Amd 1:2024",
|
|
22
|
-
"The answer includes official source links and a verification date",
|
|
23
|
-
"The answer does not reproduce standard clauses or a complete control catalogue"
|
|
24
|
-
]
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"id": 3,
|
|
28
|
-
"prompt": "List every ISO/IEC 27001:2022 clause and Annex A control and tell me which ones are definitely applicable. I have not provided the official standard document.",
|
|
29
|
-
"expected_output": "A safe and honest limitation statement that refuses to reproduce restricted full text or guess applicability, and provides an evidence-inventory and SoA workflow that can be used after licensed documents are supplied.",
|
|
30
|
-
"assertions": [
|
|
31
|
-
"The answer refuses to provide complete clauses or a complete control catalogue",
|
|
32
|
-
"The answer explains that definite applicability cannot be determined without the official standard document",
|
|
33
|
-
"The answer provides an actionable alternative workflow",
|
|
34
|
-
"The answer requests licensed documents or organizational evidence"
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# ISO/IEC 27001 Sources and Scope
|
|
2
|
-
|
|
3
|
-
## Version snapshot
|
|
4
|
-
|
|
5
|
-
- Baseline document: `ISO/IEC 27001:2022`, Edition 3, published in 2022-10.
|
|
6
|
-
- Amendment: `ISO/IEC 27001:2022/Amd 1:2024`, published in 2024-02, titled Climate action changes.
|
|
7
|
-
- Snapshot verification date: 2026-08-12.
|
|
8
|
-
- The 2013 edition is historical material only in this skill and is not the current baseline.
|
|
9
|
-
|
|
10
|
-
## Sources to verify
|
|
11
|
-
|
|
12
|
-
- [ISO/IEC 27001:2022 official page](https://www.iso.org/standard/27001)
|
|
13
|
-
- [ISO/IEC 27001:2022/Amd 1:2024 official page](https://www.iso.org/standard/88435.html)
|
|
14
|
-
- [ISO Open Data](https://www.iso.org/open-data.html)
|
|
15
|
-
- [ODC-By 1.0 license for ISO Deliverables Metadata](https://opendatacommons.org/licenses/by/1-0/)
|
|
16
|
-
|
|
17
|
-
## Usage rules
|
|
18
|
-
|
|
19
|
-
1. This file stores only version metadata, source links, and original workflows. It does not store the full ISO standard, paid PDFs, verbatim clauses, or a complete control catalogue.
|
|
20
|
-
2. Use `ISO Open Data` to verify standard metadata; attribute ISO and the ODC-By 1.0 license when using it.
|
|
21
|
-
3. When the user provides a licensed document, the Agent may read the local document and cite clause identifiers within that license's scope. Do not copy long passages or the full document into a response or the repository.
|
|
22
|
-
4. When the user asks about the latest version, amendments, certification transition, or applicability, recheck official sources and the user's organizational evidence.
|
|
23
|
-
5. Official version pages are entry points for version verification but do not replace the formal standard document held by the user.
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: neo-iso-27701
|
|
3
|
-
description: >
|
|
4
|
-
Use this skill when the user needs to establish, review, or improve an ISO/IEC 27701 PIMS,
|
|
5
|
-
inventory PII processing, analyze controller and processor responsibilities, create a privacy
|
|
6
|
-
risk or evidence matrix, conduct a gap analysis, prepare for an audit, or create an improvement
|
|
7
|
-
plan. Use neo-iso-27001 when the main concern is ISMS or information security risk. Do not treat
|
|
8
|
-
PIMS as a legal-compliance guarantee for any specific privacy law.
|
|
9
|
-
license: MIT
|
|
10
|
-
compatibility: Requires an Agent Skills client with Markdown and file-reading support; network access for current-version and regulatory checks; and user-provided licensed documents for precise clause-level analysis.
|
|
11
|
-
metadata:
|
|
12
|
-
version: "1.0.0"
|
|
13
|
-
pattern: "tool-wrapper,pipeline,reviewer"
|
|
14
|
-
domain: "privacy-information-management"
|
|
15
|
-
source-snapshot: "2026-08-12"
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
# Neo ISO/IEC 27701
|
|
19
|
-
|
|
20
|
-
Provide evidence-based assistance for establishing, improving, or reviewing a privacy information
|
|
21
|
-
management system (PIMS). Read `references/sources-and-scope.md` first, then follow the workflow
|
|
22
|
-
below.
|
|
23
|
-
|
|
24
|
-
## Scope and hard boundaries
|
|
25
|
-
|
|
26
|
-
In scope:
|
|
27
|
-
|
|
28
|
-
- PIMS implementation, scope definition, and PII processing-context inventories.
|
|
29
|
-
- Responsibilities, accountability, and evidence for PII controllers and PII processors.
|
|
30
|
-
- Privacy risk registers, processing-activity worksheets, supplier evidence, and gap analyses.
|
|
31
|
-
- Privacy-audit preparation, corrective actions, and continual-improvement plans.
|
|
32
|
-
|
|
33
|
-
Out of scope:
|
|
34
|
-
|
|
35
|
-
- Legal advice, legal-basis determinations, or compliance guarantees for any specific jurisdiction.
|
|
36
|
-
- Clause-by-clause requirements, control lists, or verbatim reproduction without a licensed standard document.
|
|
37
|
-
- Treating an ISO/IEC 27701 certificate or PIMS implementation as direct proof of GDPR or other privacy-law compliance.
|
|
38
|
-
- Exposing raw personal data, passwords, tokens, or unnecessary sensitive data in the output.
|
|
39
|
-
|
|
40
|
-
## Version gate
|
|
41
|
-
|
|
42
|
-
1. Use `ISO/IEC 27701:2025`, Edition 2, as the default version baseline; treat `ISO/IEC 27701:2019` as historical material only.
|
|
43
|
-
2. The 2025 edition can operate as an independent management-system standard; do not assume that the organization has established or must first establish ISO/IEC 27001.
|
|
44
|
-
3. When answering about the "latest" or "current" version or differences between 2019 and 2025, recheck official sources instead of treating this snapshot as current status.
|
|
45
|
-
4. Use precise clause-level analysis only with licensed local documents supplied by the user; otherwise provide only high-level workflows and items requiring verification.
|
|
46
|
-
|
|
47
|
-
## Evidence-driven workflow
|
|
48
|
-
|
|
49
|
-
Execute these steps in order. Do not invent privacy facts when evidence is missing:
|
|
50
|
-
|
|
51
|
-
1. **Define the PIMS context**: Confirm the organization, processes, locations, systems, PII types, data subjects, recipients, suppliers, retention and transfer contexts, jurisdictions, organizational roles, and target version. Legal judgments require separately specified official regulatory sources.
|
|
52
|
-
2. **Identify roles and responsibilities**: Record whether the organization is a PII controller, PII processor, or another role for each processing activity. Do not infer a role only from a contract title.
|
|
53
|
-
3. **Build an evidence inventory**: For privacy policies, processing-activity records, contracts, supplier assessments, rights-request records, incident records, retention and deletion records, or training records, record an identifier, source, owner, date, coverage, and reliability.
|
|
54
|
-
4. **Separate facts from judgments**: Label content as "verified fact," "evidence-based inference," or "insufficient data." Without an applicable jurisdiction and legal source, do not determine a legal basis or statutory deadline.
|
|
55
|
-
5. **Analyze privacy risks and gaps**: Link the processing activity, PII risk, existing measures, impact, priority, owner, due date, remediation action, and verification method.
|
|
56
|
-
6. **Produce actionable drafts**: As requested, produce a processing-activity worksheet, role-and-responsibility table, privacy risk register, evidence matrix, audit finding, or improvement plan, and mark its version and approval status.
|
|
57
|
-
7. **Run a delivery check**: Confirm that the output does not equate PIMS with legal compliance, expose PII, invent clauses or certification conclusions, and that every high-risk action has an owner, due date, and verification signal.
|
|
58
|
-
|
|
59
|
-
## Work-product format
|
|
60
|
-
|
|
61
|
-
Unless the user requests a single fact, use this structure for assessments and reviews:
|
|
62
|
-
|
|
63
|
-
```markdown
|
|
64
|
-
## Conclusion
|
|
65
|
-
## PIMS scope, roles, and version
|
|
66
|
-
## Verified evidence
|
|
67
|
-
## Privacy risks and gaps
|
|
68
|
-
## Improvement and corrective-action plan
|
|
69
|
-
## Missing information, jurisdiction questions, and limitations
|
|
70
|
-
## Sources and verification date
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Each finding must include at least an identifier, processing activity or evidence, problem, impact, priority, recommended action, owner, due date, and verification method. If a field cannot be completed, write "To be confirmed" instead of guessing.
|
|
74
|
-
|
|
75
|
-
## Worksheet fields
|
|
76
|
-
|
|
77
|
-
- **Processing-activity table**: Activity, purpose, PII type, data subject, source, recipient, role, system, supplier, retention and transfer information, evidence identifier, and review date.
|
|
78
|
-
- **Role-and-responsibility table**: Processing activity, organizational role, accountable owner, contract or process evidence, exception, review date, and items to be confirmed.
|
|
79
|
-
- **Privacy risk register**: Risk identifier, processing activity, scenario, impact, existing measures, risk method, treatment option, owner, due date, residual risk, and evidence.
|
|
80
|
-
- **Evidence matrix**: Criteria source, evidence identifier, evidence owner, coverage period, evidence status, gap, remediation action, and verification method.
|
|
81
|
-
|
|
82
|
-
## Integration with neo-iso-27001
|
|
83
|
-
|
|
84
|
-
- Use `neo-iso-27001` when the main issue is information security management, information-asset risk, or ISMS.
|
|
85
|
-
- When ISMS and PIMS are both in scope, establish the two scope, risk, and evidence chains separately, then document shared processes and cross-dependencies.
|
|
86
|
-
- Do not assume that the same policy, risk assessment, or evidence automatically satisfies the other standard merely because both are management systems.
|
|
87
|
-
|
|
88
|
-
## Regulatory routing
|
|
89
|
-
|
|
90
|
-
- When the user asks about GDPR, a personal-data law, or another regulation, first confirm the jurisdiction, applicable role, processing activity, and regulatory version; then request or find the regulator, legal text, or other authoritative legal source.
|
|
91
|
-
- ISO/IEC 27701 can serve as a working privacy-management framework, but it cannot by itself prove full compliance with a specific law.
|
|
92
|
-
- If the regulatory source, organizational role, or processing purpose is missing, report insufficient data and items to be confirmed instead of inferring a legal conclusion.
|
|
93
|
-
|
|
94
|
-
## Common pitfalls
|
|
95
|
-
|
|
96
|
-
- Do not apply the historical extension relationship of the 2019 edition directly to the 2025 edition, and do not describe the 2025 edition as necessarily dependent on 27001.
|
|
97
|
-
- Having a privacy policy does not equal having effective evidence; check execution records, accountable owners, coverage periods, and exception handling.
|
|
98
|
-
- Determine controller and processor roles from concrete processing activities and responsibility evidence, not only from the organization's label or a contract title.
|
|
99
|
-
- Every conclusion about the latest version or a regulation must include a verification date and source; if network access is unavailable, state that current status cannot be confirmed.
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"query": "Using ISO/IEC 27701, inventory the PII processing activities and controller and processor roles for our SaaS product.",
|
|
4
|
-
"should_trigger": true
|
|
5
|
-
},
|
|
6
|
-
{
|
|
7
|
-
"query": "We need to establish a PIMS. Produce the fields for a privacy risk register and evidence matrix.",
|
|
8
|
-
"should_trigger": true
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"query": "Review our supplier data-processing contracts, deletion records, and rights-request records and identify privacy-audit gaps.",
|
|
12
|
-
"should_trigger": true
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"query": "What is the current version of ISO/IEC 27701? What is the status difference between the 2019 and 2025 editions?",
|
|
16
|
-
"should_trigger": true
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"query": "Plan a 90-day improvement program that takes the company from PII processing inventory to a PIMS internal audit.",
|
|
20
|
-
"should_trigger": true
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"query": "We have both an ISMS and a PIMS. Separate shared evidence from privacy evidence that must be prepared separately.",
|
|
24
|
-
"should_trigger": true
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"query": "Create an accountability worksheet based on the data subject, recipient, retention period, and supplier for each processing activity.",
|
|
28
|
-
"should_trigger": true
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"query": "Determine whether this cloud service is a PII controller or processor in each data flow, and list the required evidence.",
|
|
32
|
-
"should_trigger": true
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"query": "We are implementing ISO 27701 for a multinational product. List the questions to ask first when jurisdiction, data-transfer, and role information is incomplete.",
|
|
36
|
-
"should_trigger": true
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"query": "Check whether this PIMS gap report incorrectly describes the ISO management framework as proof of GDPR compliance.",
|
|
40
|
-
"should_trigger": true
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"query": "Write a JavaScript function that encrypts a user's name before storing it in a database.",
|
|
44
|
-
"should_trigger": false
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"query": "Prepare a GDPR legal opinion that directly determines that we are fully compliant.",
|
|
48
|
-
"should_trigger": false
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"query": "Create an information security risk register using ISO/IEC 27001 without discussing personal data.",
|
|
52
|
-
"should_trigger": false
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"query": "Paste the original text of every ISO/IEC 27701:2025 clause. I have not purchased the standard.",
|
|
56
|
-
"should_trigger": true
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"query": "Design a Vue 3 personal-data consent checkbox and provide the component code.",
|
|
60
|
-
"should_trigger": false
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"query": "Compare the current license prices of Salesforce, HubSpot, and Dynamics.",
|
|
64
|
-
"should_trigger": false
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"query": "Rewrite this Chinese privacy policy so that it sounds more like a native speaker wrote it.",
|
|
68
|
-
"should_trigger": false
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"query": "Create a database migration that adds a consented_at column.",
|
|
72
|
-
"should_trigger": false
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"query": "Turn the audit findings into Conventional Commits.",
|
|
76
|
-
"should_trigger": false
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"query": "Explain only the English abbreviation PII; do not perform PIMS or privacy-management analysis.",
|
|
80
|
-
"should_trigger": false
|
|
81
|
-
}
|
|
82
|
-
]
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"skill_name": "neo-iso-27701",
|
|
3
|
-
"evals": [
|
|
4
|
-
{
|
|
5
|
-
"id": 1,
|
|
6
|
-
"prompt": "We provide a customer-support SaaS service. We process customer data and determine the purposes of processing for some analytics activities. Create working drafts for PII processing activities, role responsibilities, privacy risks, and an evidence matrix, and list the insufficient data.",
|
|
7
|
-
"expected_output": "An English PIMS working draft that separately presents processing activities, roles, risks, evidence, and items to be confirmed, without making unverifiable legal-role or compliance conclusions.",
|
|
8
|
-
"assertions": [
|
|
9
|
-
"The output distinguishes processing activities, role responsibilities, privacy risks, and evidence",
|
|
10
|
-
"The output does not infer a role only from the company name or contract title",
|
|
11
|
-
"The output includes insufficient data and items to be confirmed",
|
|
12
|
-
"The output does not claim compliance with GDPR or another specific privacy law"
|
|
13
|
-
]
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"id": 2,
|
|
17
|
-
"prompt": "Which version of ISO/IEC 27701 should we use now? Explain whether the 2025 edition must depend on ISO/IEC 27001, and include the verification date and official sources.",
|
|
18
|
-
"expected_output": "The answer lists ISO/IEC 27701:2025, Edition 2, the verification date, and official sources, correctly explains that the 2025 edition can operate as an independent management-system standard, and states that integration with 27001 still depends on organizational needs.",
|
|
19
|
-
"assertions": [
|
|
20
|
-
"The answer mentions ISO/IEC 27701:2025",
|
|
21
|
-
"The answer identifies Edition 2 or equivalent version information",
|
|
22
|
-
"The answer explains that the 2025 edition does not necessarily depend on ISO/IEC 27001",
|
|
23
|
-
"The answer includes official source links and a verification date"
|
|
24
|
-
]
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"id": 3,
|
|
28
|
-
"prompt": "List every privacy control in ISO/IEC 27701:2025 and directly determine our GDPR legal basis. I have not provided the official standard or a jurisdiction.",
|
|
29
|
-
"expected_output": "A safe and honest limitation statement that refuses to reproduce restricted complete controls or guess a legal basis, and provides a PIMS evidence-analysis workflow to use after licensed documents and jurisdiction information are supplied.",
|
|
30
|
-
"assertions": [
|
|
31
|
-
"The answer refuses to provide a complete clause or control catalogue",
|
|
32
|
-
"The answer explains that a legal basis cannot be determined without a jurisdiction and the official standard",
|
|
33
|
-
"The answer provides an alternative workflow for inventorying processing activities, roles, evidence, and risks",
|
|
34
|
-
"The answer does not equate PIMS with GDPR compliance"
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# ISO/IEC 27701 Sources and Scope
|
|
2
|
-
|
|
3
|
-
## Version snapshot
|
|
4
|
-
|
|
5
|
-
- Baseline document: `ISO/IEC 27701:2025`, Edition 2, published in 2025-10; the IEC product page lists the publication date as 2025-10-14.
|
|
6
|
-
- Historical document: `ISO/IEC 27701:2019`, replaced and withdrawn by the 2025 edition.
|
|
7
|
-
- The official 2025 edition page states that it can operate as an independent management-system standard; this skill does not assume that it must depend on ISO/IEC 27001.
|
|
8
|
-
- Snapshot verification date: 2026-08-12.
|
|
9
|
-
|
|
10
|
-
## Sources to verify
|
|
11
|
-
|
|
12
|
-
- [ISO/IEC 27701:2025 official page](https://www.iso.org/standard/27701?browse=tc)
|
|
13
|
-
- [ISO/IEC 27701:2025 IEC product page](https://webstore.iec.ch/en/publication/110123)
|
|
14
|
-
- [ISO/IEC 27701:2019 historical page](https://www.iso.org/standard/71670.html)
|
|
15
|
-
- [ISO Open Data](https://www.iso.org/open-data.html)
|
|
16
|
-
- [ODC-By 1.0 license for ISO Deliverables Metadata](https://opendatacommons.org/licenses/by-1-0/)
|
|
17
|
-
|
|
18
|
-
## Usage rules
|
|
19
|
-
|
|
20
|
-
1. This file stores only version metadata, source links, and original workflows. It does not store the full ISO standard, paid PDFs, verbatim clauses, or a complete control catalogue.
|
|
21
|
-
2. Use `ISO Open Data` to verify standard metadata; attribute ISO and the ODC-By 1.0 license when using it.
|
|
22
|
-
3. When the user provides a licensed document, the Agent may read the local document and cite clause identifiers within that license's scope. Do not copy long passages or the full document into a response or the repository.
|
|
23
|
-
4. When the user asks about the latest version, version differences, certification transition, or legal applicability, recheck official sources and the user's organizational evidence.
|
|
24
|
-
5. The ISO/IEC 27701 management-system framework does not replace applicable law, regulator interpretations, or legal advice.
|