RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Diff/sethrobinson-ugtlive-cursor-rules-locale-invariant-formatting ↔ sethrobinson-ugtlive-agents

Comparison

A · Cursor rules · SethRobinson/UGTLiveB · AGENTS.md · SethRobinson/UGTLive
What each file covers, counted
DimensionSharedOnly in AOnly in BOverlap
Sections0770%
Commands0030%
Section tags12414%

What each file covers

Sections

0 shared · 7 only in A · 7 only in B
  • − Locale-Invariant Number Handling
  • − Rules
  • − Parsing numbers from strings (config, text boxes, files)
  • − Formatting numbers to strings (config persistence, CSS/HTML generation)
  • − String interpolation with doubles into CSS/HTML
  • − Required import
  • − Why this matters
  • + AGENTS.md
  • + Shared Project Memory
  • + Testing
  • + Cloud LLM Model Maintenance
  • + Feature Index
  • + Security
  • + Git

Commands

0 shared · 0 only in A · 3 only in B
  • + dotnet build .\UGTLive.sln --configuration Release
  • + git commit
  • + git push

Section tags

1 shared · 2 only in A · 4 only in B
  • − lint-format
  • − ui
  • + test
  • + git-pr
  • + security
  • + performance
  •   do-not

Line diff

+38 added−42 removed17 unchanged28.8% identical
SethRobinson/UGTLive · .cursor/rules/locale-invariant-formatting.mdc
@@ −1 @@
1---
2description: CRITICAL - All number parsing/formatting must use CultureInfo.InvariantCulture to prevent locale bugs
3alwaysApply: true
4---
5 
6# Locale-Invariant Number Handling
7 
8**CRITICAL**: This app MUST work correctly regardless of the user's Windows region/locale setting (e.g., German uses `,` as decimal separator instead of `.`). Locale-sensitive number formatting has caused serious bugs TWICE in this project. Always use InvariantCulture.
9 
10## Rules
 
 
 
 
 
 
11 
12### Parsing numbers from strings (config, text boxes, files)
13 
14```csharp
15// BAD - uses current locale, breaks under German/French/etc.
16double.TryParse(value, out double result)
17float.TryParse(value, out float result)
18 
19// GOOD - always uses '.' as decimal separator
20double.TryParse(value, NumberStyles.Float, CultureInfo.InvariantCulture, out double result)
21float.TryParse(value, NumberStyles.Float, CultureInfo.InvariantCulture, out float result)
22```
 
23 
24### Formatting numbers to strings (config persistence, CSS/HTML generation)
25 
26```csharp
27// BAD - produces "1,50" under German locale
28value.ToString("F2")
29value.ToString() // for doubles/floats being saved to config
30 
31// GOOD
32value.ToString("F2", CultureInfo.InvariantCulture)
33value.ToString(CultureInfo.InvariantCulture)
34```
35 
36### String interpolation with doubles into CSS/HTML
37 
38```csharp
39// BAD - produces "font-size: 14,5px" or "rgba(0,0,0,0,700)" under German locale
40$"font-size: {fontSize}px"
41$"rgba({r},{g},{b},{alpha:F3})"
42 
43// GOOD - FormattableString.Invariant forces '.' decimals
44FormattableString.Invariant($"font-size: {fontSize}px")
45FormattableString.Invariant($"rgba({r},{g},{b},{alpha:F3})")
46```
47 
48## Required import
49 
50```csharp
51using System.Globalization;
52```
 
 
 
53 
54## Why this matters
55 
56- Config values saved with `,` under one locale fail to parse under another
57- CSS/HTML with `,` decimals produces invalid styles (browsers expect `.`)
58- Font sizes, opacity values, and positions all break silently
 
59 
SethRobinson/UGTLive · AGENTS.md
@@ +1 @@
1# AGENTS.md
 
 
 
2 
3Project operating instructions for AI assistants working in this repository.
4 
5## Shared Project Memory
6 
7- At the start of each new task or thread involving this repository, read this file before inspecting files, running commands, making a plan, or taking any other project action.
8- Treat follow-up replies in the same continuous task as part of that task. Do not reread this file unless the repository or working directory changes, this file is modified, or its instructions are no longer available in context.
9- Treat this file as the shared project memory for AI assistants.
10- Do not rely on vendor-specific, proprietary, or hidden memory systems for project facts, preferences, or operating instructions. (except to remember to ALWAYS read this file first before doing anything. Remember that.)
11- Update this file with important repo-specific information learned during work, including build commands, test commands, conventions, decisions, pitfalls, and current project preferences.
12- Keep this file accurate and current. Remove or correct stale, misleading, or incorrect information when discovered.
13- If information is temporary or uncertain, label it clearly rather than presenting it as permanent fact.
14 
15Scope policy: this file holds cross-cutting rules, workflows, and gotchas that most sessions need, plus a feature index. Keep it around 30 KB. Feature deep-dives live in `docs/<topic>.md`: before working on a feature listed in the index, read its doc; when finishing feature work, update that doc and keep the index entry here to one or two lines (where it lives + the non-obvious constraint). Cross-cutting rules and new gotchas still land here directly. When a change makes anything stale, here or in a linked doc, update it in the same change.
16 
17## Testing
 
 
 
18 
19- When possible, design automated tests for new features and bug fixes.
20- Run relevant automated tests after finishing changes to guard against regressions.
21- If tests cannot be run or do not exist, state that clearly in the handoff and describe any manual verification performed.
22- Always finish project changes by building the Release configuration: `dotnet build .\UGTLive.sln --configuration Release`.
23- If a running UGTLive process prevents the Release build, capture its executable/command line, stop it, complete the build, and restart it afterward. Do not start UGTLive if it was not running before the build.
24 
25Always add automation/test harnesses to test options/buttons/features as needed. Document them.
26 
27## Cloud LLM Model Maintenance
 
 
 
28 
29- Cloud and CLI model picker presets live in `src/SettingsWindow.xaml`; their fallback/default values live in `src/ConfigManager.cs`, `src/ConfigManager.Translation.cs`, and `src/SettingsWindow.TranslationSettings.cs`.
30- Subscription-backed CLI providers display as `Anthropic Sub`, `OpenAI Sub`, and `Gemini CLI (Enterprise)`, but their stable internal IDs remain `ClaudeCli`, `CodexCli`, and `GeminiCli`; use `ComboBoxItem.Tag` for the internal ID. Google ended personal/free/AI Pro/AI Ultra access through Gemini CLI on June 18, 2026; do not replace it with Antigravity CLI until `agy -p` reliably exposes captured stdout to Windows parent processes (see `docs/settings-connection-tests.md`).
31- Keep provider-specific capability handling in the matching translation service. In particular, Anthropic model generations use different manual/adaptive thinking request shapes.
32- Verify model IDs and request compatibility against current official provider documentation. Verify OpenRouter-prefixed slugs against its `/api/v1/models` catalog before adding presets.
33 
34## Feature Index
35 
36- Settings API/model/voice tests: see `docs/settings-connection-tests.md`. UI buttons and `--test-settings-connection` must continue to call the shared `SettingsConnectionTester` implementation.
37- OpenAI All In One Snap translation: see `docs/openai-all-in-one.md`. It is a Snap-only, visual-only `gpt-image-2` Image Edits path; Auto and realtime processing must remain on the standard OCR pipeline.
 
 
38 
 
 
 
 
39 
40## Security
41 
42- Never commit sensitive data, including credentials, tokens, passwords, private keys, cookies, customer data, personal data, or machine-specific authentication material.
43- If an AI assistant needs authentication data or other secrets for local work, use `agents_secret.md` for those notes.
44- `agents_secret.md` must stay ignored by git and must not be committed.
45- Do not put secrets in commit messages, logs, issue text, pull request descriptions, generated docs, or other tracked files.
46- Configuration logging must pass key names through `ConfigManager.IsSensitiveConfigKey`; never print raw secret values in startup or harness output.
47- Before committing, review staged changes for accidental secrets.
48 
49## Git
50 
51- Never add OpenAI/Codex/Claude etc as a co-author on git commits.
52- NEVER `git commit` unless explicitly told to commit.
53- NEVER `git push` unless explicitly told to push. "Commit" means commit
54 locally only; committing is not permission to push.
55 
@@ −1 +1 @@
1−---
2−description: CRITICAL - All number parsing/formatting must use CultureInfo.InvariantCulture to prevent locale bugs
3−alwaysApply: true
4−---
1+# AGENTS.md
52  
6−# Locale-Invariant Number Handling
3+Project operating instructions for AI assistants working in this repository.
74  
8−**CRITICAL**: This app MUST work correctly regardless of the user's Windows region/locale setting (e.g., German uses `,` as decimal separator instead of `.`). Locale-sensitive number formatting has caused serious bugs TWICE in this project. Always use InvariantCulture.
5+## Shared Project Memory
96  
10−## Rules
7+- At the start of each new task or thread involving this repository, read this file before inspecting files, running commands, making a plan, or taking any other project action.
8+- Treat follow-up replies in the same continuous task as part of that task. Do not reread this file unless the repository or working directory changes, this file is modified, or its instructions are no longer available in context.
9+- Treat this file as the shared project memory for AI assistants.
10+- Do not rely on vendor-specific, proprietary, or hidden memory systems for project facts, preferences, or operating instructions. (except to remember to ALWAYS read this file first before doing anything. Remember that.)
11+- Update this file with important repo-specific information learned during work, including build commands, test commands, conventions, decisions, pitfalls, and current project preferences.
12+- Keep this file accurate and current. Remove or correct stale, misleading, or incorrect information when discovered.
13+- If information is temporary or uncertain, label it clearly rather than presenting it as permanent fact.
1114  
12−### Parsing numbers from strings (config, text boxes, files)
15+Scope policy: this file holds cross-cutting rules, workflows, and gotchas that most sessions need, plus a feature index. Keep it around 30 KB. Feature deep-dives live in `docs/<topic>.md`: before working on a feature listed in the index, read its doc; when finishing feature work, update that doc and keep the index entry here to one or two lines (where it lives + the non-obvious constraint). Cross-cutting rules and new gotchas still land here directly. When a change makes anything stale, here or in a linked doc, update it in the same change.
1316  
14−```csharp
15−// BAD - uses current locale, breaks under German/French/etc.
16−double.TryParse(value, out double result)
17−float.TryParse(value, out float result)
17+## Testing
1818  
19−// GOOD - always uses '.' as decimal separator
20−double.TryParse(value, NumberStyles.Float, CultureInfo.InvariantCulture, out double result)
21−float.TryParse(value, NumberStyles.Float, CultureInfo.InvariantCulture, out float result)
22−```
19+- When possible, design automated tests for new features and bug fixes.
20+- Run relevant automated tests after finishing changes to guard against regressions.
21+- If tests cannot be run or do not exist, state that clearly in the handoff and describe any manual verification performed.
22+- Always finish project changes by building the Release configuration: `dotnet build .\UGTLive.sln --configuration Release`.
23+- If a running UGTLive process prevents the Release build, capture its executable/command line, stop it, complete the build, and restart it afterward. Do not start UGTLive if it was not running before the build.
2324  
24−### Formatting numbers to strings (config persistence, CSS/HTML generation)
25+Always add automation/test harnesses to test options/buttons/features as needed. Document them.
2526  
26−```csharp
27−// BAD - produces "1,50" under German locale
28−value.ToString("F2")
29−value.ToString() // for doubles/floats being saved to config
27+## Cloud LLM Model Maintenance
3028  
31−// GOOD
32−value.ToString("F2", CultureInfo.InvariantCulture)
33−value.ToString(CultureInfo.InvariantCulture)
34−```
29+- Cloud and CLI model picker presets live in `src/SettingsWindow.xaml`; their fallback/default values live in `src/ConfigManager.cs`, `src/ConfigManager.Translation.cs`, and `src/SettingsWindow.TranslationSettings.cs`.
30+- Subscription-backed CLI providers display as `Anthropic Sub`, `OpenAI Sub`, and `Gemini CLI (Enterprise)`, but their stable internal IDs remain `ClaudeCli`, `CodexCli`, and `GeminiCli`; use `ComboBoxItem.Tag` for the internal ID. Google ended personal/free/AI Pro/AI Ultra access through Gemini CLI on June 18, 2026; do not replace it with Antigravity CLI until `agy -p` reliably exposes captured stdout to Windows parent processes (see `docs/settings-connection-tests.md`).
31+- Keep provider-specific capability handling in the matching translation service. In particular, Anthropic model generations use different manual/adaptive thinking request shapes.
32+- Verify model IDs and request compatibility against current official provider documentation. Verify OpenRouter-prefixed slugs against its `/api/v1/models` catalog before adding presets.
3533  
36−### String interpolation with doubles into CSS/HTML
34+## Feature Index
3735  
38−```csharp
39−// BAD - produces "font-size: 14,5px" or "rgba(0,0,0,0,700)" under German locale
40−$"font-size: {fontSize}px"
41−$"rgba({r},{g},{b},{alpha:F3})"
36+- Settings API/model/voice tests: see `docs/settings-connection-tests.md`. UI buttons and `--test-settings-connection` must continue to call the shared `SettingsConnectionTester` implementation.
37+- OpenAI All In One Snap translation: see `docs/openai-all-in-one.md`. It is a Snap-only, visual-only `gpt-image-2` Image Edits path; Auto and realtime processing must remain on the standard OCR pipeline.
4238  
43−// GOOD - FormattableString.Invariant forces '.' decimals
44−FormattableString.Invariant($"font-size: {fontSize}px")
45−FormattableString.Invariant($"rgba({r},{g},{b},{alpha:F3})")
46−```
4739  
48−## Required import
40+## Security
4941  
50−```csharp
51−using System.Globalization;
52−```
42+- Never commit sensitive data, including credentials, tokens, passwords, private keys, cookies, customer data, personal data, or machine-specific authentication material.
43+- If an AI assistant needs authentication data or other secrets for local work, use `agents_secret.md` for those notes.
44+- `agents_secret.md` must stay ignored by git and must not be committed.
45+- Do not put secrets in commit messages, logs, issue text, pull request descriptions, generated docs, or other tracked files.
46+- Configuration logging must pass key names through `ConfigManager.IsSensitiveConfigKey`; never print raw secret values in startup or harness output.
47+- Before committing, review staged changes for accidental secrets.
5348  
54−## Why this matters
49+## Git
5550  
56−- Config values saved with `,` under one locale fail to parse under another
57−- CSS/HTML with `,` decimals produces invalid styles (browsers expect `.`)
58−- Font sizes, opacity values, and positions all break silently
51+- Never add OpenAI/Codex/Claude etc as a co-author on git commits.
52+- NEVER `git commit` unless explicitly told to commit.
53+- NEVER `git push` unless explicitly told to push. "Commit" means commit
54+ locally only; committing is not permission to push.
5955  
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack