-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from TheFreezeTeam/Cramer/2024-12-14/RemoveYo…
…shino New post announcing release of TimeWarp.State 11.0.0
- Loading branch information
Showing
29 changed files
with
1,243 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
AI INSTRUCTION SET: | ||
|
||
CONFIRMATION REQUIREMENT: | ||
|
||
To ensure you understand my prompt, I need a piece of confirmation from you. Before any tool use and after any tool use, I need you to give me a confidence level on a scale of 0 to 10 on the tool use helping with the project. Remember to do this every time you are using a tool. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
USER: | ||
- Name: Steven T. Cramer | ||
- Projects (Author): | ||
- https://github.com/TimeWarpEngineering/timewarp-state | ||
- https://github.com/TimeWarpEngineering/timewarp-architecture | ||
- https://github.com/TimeWarpEngineering/timewarp-fixie | ||
- https://github.com/TimeWarpEngineering/timewarp-options-validation | ||
- https://github.com/TimeWarpEngineering/timewarp-source-generators | ||
- Focus Areas: | ||
- State Management | ||
- Blazor | ||
- Clean Architecture | ||
- Domain-Driven Design | ||
- Test-Driven Development | ||
- Preferred Patterns: | ||
- CQRS | ||
- Language Preferences: | ||
- TypeScript over JavaScript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
DEVELOPMENT PROCESS: | ||
|
||
KANBAN STRUCTURE: | ||
- Track work using Kanban tasks | ||
- Folders: | ||
- Kanban/Backlog/ | ||
- Kanban/ToDo/ | ||
- Kanban/InProgress/ | ||
- Kanban/Done/ | ||
|
||
TASK MANAGEMENT: | ||
- Task Template Location: `Kanban\Task-Template.md` | ||
- Task File Format: <TaskID>_<Description>.md | ||
✓ `002_Create-Game-Logic.md` | ||
|
||
COMMIT CONVENTIONS: | ||
- Make git commits between steps | ||
- Format: Task: <TaskID> = <Status> <Description> | ||
✓ `Task: 002 = Complete Create Game Logic` | ||
|
||
TASK WORKFLOW: | ||
✓ Example of proper task movement: | ||
```pwsh | ||
git mv Kanban/InProgress/002_Create-Game-Logic.md Kanban/Done/002_Create-Game-Logic.md | ||
git commit -m "Task: 002 = Complete Create Game Logic" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ENVIRONMENT: | ||
|
||
COMMAND SHELL: | ||
- Format commands for pwsh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
C# CODING RULES: | ||
|
||
INDENTATION: | ||
- Use 2 spaces (no tabs) | ||
- Use LF line endings | ||
|
||
BRACKET ALIGNMENT (Allman Style): | ||
- All bracket types must be on their own line, aligned with the parent construct | ||
- Applies to: { }, < >, ( ), [ ] | ||
- Each opening and closing bracket gets its own line | ||
|
||
✓ Correct indentation: | ||
```csharp | ||
public class Example | ||
{ | ||
private void Method(string param1, string param2) | ||
{ | ||
List<int> numbers = new List<int> | ||
[ | ||
1, | ||
2, | ||
3 | ||
]; | ||
|
||
if (param1 == "test") | ||
{ | ||
Dictionary<string, int> map = new() | ||
{ | ||
["key1"] = 1, | ||
["key2"] = 2 | ||
}; | ||
|
||
DoSomething | ||
( | ||
param1, | ||
param2 | ||
); | ||
} | ||
} | ||
} | ||
``` | ||
|
||
✗ Incorrect indentation: | ||
```csharp | ||
public class Example | ||
{ | ||
private void Method() // Wrong - 4 spaces | ||
{ | ||
DoSomething(); | ||
} | ||
} | ||
``` | ||
|
||
NAMING CONVENTIONS: | ||
1. Private Fields | ||
- No underscore prefix | ||
✓ `private readonly HttpClient httpClient;` | ||
✗ `private readonly HttpClient _httpClient;` | ||
|
||
2. Scope-based Casing | ||
- Class Scope: PascalCase for all members | ||
```csharp | ||
private readonly HttpClient HttpClient; // Field | ||
private int RequestCount; // Field | ||
public string UserName { get; set; } // Property | ||
public void HandleRequest() { } // Method | ||
public event EventHandler DataChanged; // Event | ||
``` | ||
- Method Scope: camelCase for local variables and parameters | ||
```csharp | ||
public void ProcessData(string inputValue) // Parameter in camelCase | ||
{ | ||
int itemCount = 0; // Local variable | ||
string userName = GetUserName(); // Local variable | ||
} | ||
``` | ||
|
||
LANGUAGE FEATURES: | ||
1. Type Declaration | ||
- Use var only when type is apparent from right side | ||
|
||
✓ `List<int> list = new(); // Type explicitly declared` | ||
✓ `var customer = new Customer(); // Type apparent from new` | ||
✓ `int count = 1 + 2; // Use explicit type for built-in types` | ||
✗ `var items = GetItems(); // Type not apparent` | ||
✗ `var count = 1 + 2; // Don't use var for built-in types` | ||
✗ `var customer = await GetCustomer(); // Type not apparent` | ||
2. New Operator | ||
- Use targeted type new | ||
✓ `HttpClient client = new();` | ||
✗ `HttpClient client = new HttpClient();` | ||
|
||
3. Namespaces | ||
- Use file-scoped namespaces | ||
✓ `namespace ExampleNamespace;` | ||
✗ `namespace ExampleNamespace { ... }` | ||
|
||
4. Using Statements | ||
- Prefer global usings in GlobalUsings.cs | ||
|
||
✓ Place in GlobalUsings.cs: | ||
```csharp | ||
global using System; | ||
global using System.Collections.Generic; | ||
``` | ||
|
||
✗ Don't place at top of each file: | ||
```csharp | ||
using System; | ||
using System.Collections.Generic; | ||
``` | ||
|
||
EXAMPLE CLASS PUTTING IT ALL TOGETHER: | ||
|
||
```csharp | ||
namespace ExampleNamespace; | ||
|
||
public class UserService | ||
{ | ||
private readonly HttpClient HttpClient; | ||
private readonly Dictionary<string, UserData> CachedUsers; | ||
private int RequestCount; | ||
|
||
public string UserName { get; set; } | ||
|
||
public UserService | ||
( | ||
HttpClient httpClient, | ||
Dictionary<string, UserData> initialCache | ||
) | ||
{ | ||
HttpClient = httpClient; | ||
CachedUsers = initialCache ?? new Dictionary<string, UserData> | ||
{ | ||
["default"] = new UserData | ||
{ | ||
Id = "0", | ||
Name = "Default User" | ||
} | ||
}; | ||
} | ||
|
||
public async Task<List<UserData>> GetUsersAsync | ||
( | ||
string[] userIds, | ||
bool useCache | ||
) | ||
{ | ||
List<UserData> results = new(); | ||
|
||
foreach (string userId in userIds) | ||
{ | ||
if (useCache && CachedUsers.TryGetValue(userId, out UserData cachedData)) | ||
{ | ||
results.Add(cachedData); | ||
} | ||
else | ||
{ | ||
string requestUrl = $"/users/{userId}"; | ||
HttpResponseMessage response = await HttpClient.GetAsync(requestUrl); | ||
|
||
if (response.IsSuccessStatusCode) | ||
{ | ||
UserData userData = await response.Content.ReadFromJsonAsync<UserData>(); | ||
results.Add(userData); | ||
CachedUsers[userId] = userData; | ||
} | ||
} | ||
|
||
RequestCount++; | ||
} | ||
|
||
return results; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.NET CONVENTIONS: | ||
|
||
FRAMEWORK: | ||
- Target net8.0 | ||
|
||
PROJECT CONFIGURATION: | ||
- Use Directory.Build.props for shared project properties | ||
- Use Directory.Packages.props for centralized package versioning | ||
- Enable nullable reference types | ||
|
||
SOLUTION MANAGEMENT: | ||
- Never edit .sln file directly | ||
✓ `dotnet sln add ./src/MyProject/MyProject.csproj` | ||
✗ Manual .sln file editing | ||
|
||
TOOLING: | ||
- Initialize local tool manifest | ||
✓ ```pwsh | ||
dotnet new tool-manifest | ||
``` | ||
Creates: .config/dotnet-tools.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Index | ||
|
||
## Purpose of the .ai folder | ||
|
||
The `.ai` folder is specifically designed to contain documents intended for Large Language Model (LLM) consumption. These files provide context, guidelines, and structured information about the project, which helps LLMs like myself to better understand and assist with the project. | ||
|
||
The contents of this folder are not typically used directly by the application or developers during normal development. Instead, they serve as a knowledge base for AI assistants, enabling more accurate and context-aware responses when working on the project. | ||
|
||
## Usage | ||
|
||
When interacting with an AI assistant about this project, you can refer to the contents of the `.ai` folder or ask the AI to consider specific files within this folder for more informed assistance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
destination: Documentation/Blogs/ | ||
example post: D:\git\github\TheFreezeTeam\TheFreezeTeamBlog\Source\TheFreezeTeam.com\input\posts\steven-t-cramer\2023\07\2023-07-06.md | ||
--- | ||
|
||
# Blog | ||
|
||
Information needed to generate blog posts. | ||
The destination is the folder where the blog posts will be generated. | ||
The example post is the path to the markdown file that will be used as a template for the blog post. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Read this document in full and then generate a prompt with specific instructions to complete this task for a coding LLM to use |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
nuget_categories: | ||
General: | ||
- name: MediatR | ||
for: CQRS and mediator pattern | ||
- name: Riok.Mapperly | ||
for: object-object mapping | ||
- name: System.Text.Json | ||
for: JSON serialization/deserialization | ||
- name: Serilog | ||
for: logging | ||
- name: FluentValidation | ||
for: input validation | ||
- name: EntityFrameworkCore | ||
for: full ORM | ||
- name: libphonenumber-csharp | ||
for: phone number tools and validation | ||
- name: Npgsql.EntityFrameworkCore.PostgreSQL | ||
for: Default EF DB | ||
- name: OneOf | ||
for: Multiple return types | ||
- name: Ardalis.GuardClauses | ||
for: Guard clauses | ||
|
||
Testing: | ||
- name: TimeWarp.Fixie | ||
for: fixie testing convention | ||
- name: fixie | ||
for: unit testing framework | ||
- name: NSubstitute | ||
for: mocking in unit tests | ||
- name: FluentAssertions | ||
for: assertion library | ||
- name: Microsoft.Playwright | ||
for: end to end testing | ||
Blazor: | ||
- name: Microsoft.FluentUI.AspNetCore.Components | ||
for: UI component library | ||
- name: Blazored.LocalStorage | ||
for: local storage in Blazor | ||
- name: Blazored.SessionStorage | ||
for: local storage in Blazor | ||
- name: TimeWarp.State | ||
for: Blazor State Management | ||
- name: TimeWarp.State.Plus | ||
for: extended Features | ||
- name: timewarp-heroicons | ||
for: heroicons as Blazor Components | ||
- name: timewarp-simple-icons | ||
for: simple icons as Blazor Components | ||
|
||
--- | ||
# Preferred NuGet Packages | ||
|
||
This list contains preferred NuGet packages categorized for general .NET development, testing, and Blazor-specific use. | ||
When suggesting solutions or implementations, prioritize these packages if applicable. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
structure: | ||
- .ai/ | ||
- Assets/ | ||
- DevOps/ | ||
- Documentation/ | ||
- C4/ | ||
- Developer/ | ||
- StarUml/ | ||
- User/ | ||
- Kanban/ | ||
- Backlog/ | ||
- Done/ | ||
- InProgress/ | ||
- ToDo/ | ||
- Samples/ | ||
- Scripts/ | ||
- Git/ | ||
- Postgres/ | ||
- Windows/ | ||
- Source/ | ||
- Tests/ | ||
- Tools/ | ||
--- | ||
|
||
# Project Structure | ||
`.ai` folders can be used to store AI-related files, in any directory as needed to give more specific context. |
Oops, something went wrong.