Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 7 additions & 26 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,22 @@ permissions:
contents: read

jobs:
rust:
name: Rust checks
runs-on: windows-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Install Rust tools
run: |
rustup toolchain install stable --profile minimal --component clippy,rustfmt
rustup default stable
- name: Check Rust formatting
run: cargo fmt --all -- --check
- name: Lint Rust targets
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
- name: Test Rust workspace
run: cargo test --workspace --all-features --locked

windows:
name: Windows build and tests
runs-on: windows-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Install Rust toolchain
run: |
rustup toolchain install stable --profile minimal
rustup default stable
- uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
with:
dotnet-version: '8.0.x'
- name: Restore .NET packages
- name: Restore
run: dotnet restore .\AutoFix.sln
- name: Build WPF app and Rust DLL
- name: Build
run: dotnet build .\AutoFix.sln --configuration Release --no-restore
- name: Test .NET solution
run: dotnet test .\AutoFix.sln --configuration Release --no-build
- name: Unit tests
run: dotnet test .\tests\AutoFix.Tests\AutoFix.Tests.csproj --configuration Release --no-build
- name: Publish single-file app
run: .\scripts\publish.ps1
shell: pwsh
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
target/
bin/
obj/
dist/
progress-builds/
TestResults/
*.user
/.idea/.gitignore
/.idea/AutoFix.iml
/.idea/modules.xml
Expand Down
36 changes: 17 additions & 19 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,32 @@

## AutoFix invariants

AutoFix is a native Windows text-correction app. Preserve these boundaries in
runtime changes: use only text typed in the current session; keep read-only
informative context separate from editable executable context; never change
text after the caret; block password and secure fields; preserve the clipboard
and app-level undo.
AutoFix is a native Windows AI autocorrect (.NET 8, WPF). Preserve these rules in runtime changes:

Use `README.md` and the relevant component documentation to distinguish
implemented behavior from planned capabilities.
- Use only text typed in the current field since the last caret move or focus change. Never read the document.
- Send earlier text only as read-only context; edit only the target text.
- Never change text after the caret. Drop any answer whose text changed while it was in flight.
- Never read or send password fields; skip blocked and elevated apps.
- Keep the clipboard intact (selection fixes restore it) and keep Backspace-undo working.
- Hook callbacks on the input thread must stay fast: no network, UI Automation, disk, or UI work there.
- Never lose or reorder user input: keys pressed during an edit or an Enter hold are replayed in order.

See `README.md` for behavior and limits.

## Code organization

For Rust module placement or refactoring, use
`.agents/skills/vertical-codebase/SKILL.md`. Keep feature behavior and its tests
together, and expose narrow interfaces between features.
- `src/AutoFix.Core`: platform-free logic with unit tests. Prefer putting decisions here.
- `src/AutoFix`: thin Windows adapters (hooks, SendInput, UI Automation, clipboard, UI).
- Keep the app small. Add settings only when users need the choice.

Use `.agents/skills/caveman/SKILL.md` in lite mode for responses.

## Verification

For code changes, add or update focused tests when they protect the changed
behavior. Run the affected tests and builds, fix failures caused by the change,
and rerun them. Address warnings and errors at their source; do not hide them.
For runtime behavior changes, run the app and inspect the affected flow when
feasible. Report any check that could not be completed and why.
Documentation-only changes need no app build or launch.

Useful entry points: `cargo test`, `dotnet test .\AutoFix.sln`,
`dotnet build .\AutoFix.sln`, and `.\scripts\run-app.ps1`.
Add or update focused tests for changed behavior. Run `dotnet test .\tests\AutoFix.Tests` and
`dotnet build .\AutoFix.sln` (warnings are errors). For input, injection, focus or UI changes, run
`.\scripts\test-e2e.ps1` (it takes keyboard focus) and inspect screenshots for visual changes.
Report any check that could not be completed and why.

## Git

Expand Down
48 changes: 34 additions & 14 deletions AutoFix.sln
Original file line number Diff line number Diff line change
@@ -1,30 +1,50 @@
Microsoft Visual Studio Solution File, Format Version 12.00

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoFix.SettingsUi", "ui\settings-ui\AutoFix.SettingsUi.csproj", "{A1C55F1E-57CB-4D58-915E-A77F3A4C5B21}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D47260BB-A713-41CA-848E-F8ABBD4E6A8A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ui", "ui", "{413417B5-7CE1-4AFC-8840-00761C7EBE24}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoFix.Core", "src\AutoFix.Core\AutoFix.Core.csproj", "{C9D871BF-98EF-4237-A921-E60863D7D71F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoFix.SettingsUi.Tests", "ui\settings-ui-tests\AutoFix.SettingsUi.Tests.csproj", "{BFC90C08-9BE8-4054-A494-F178E43BB9E9}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoFix", "src\AutoFix\AutoFix.csproj", "{C029D6FA-F58E-4239-A97D-2C4AD1447927}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{170ACD64-4688-4E6E-A087-2839B3870605}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoFix.Tests", "tests\AutoFix.Tests\AutoFix.Tests.csproj", "{19F7034A-3BFA-4E6F-9A0C-E0338970E854}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoFix.E2E", "tests\AutoFix.E2E\AutoFix.E2E.csproj", "{37533850-033E-46C3-8BF0-C74C7EFAEFCD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A1C55F1E-57CB-4D58-915E-A77F3A4C5B21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A1C55F1E-57CB-4D58-915E-A77F3A4C5B21}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A1C55F1E-57CB-4D58-915E-A77F3A4C5B21}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A1C55F1E-57CB-4D58-915E-A77F3A4C5B21}.Release|Any CPU.Build.0 = Release|Any CPU
{BFC90C08-9BE8-4054-A494-F178E43BB9E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BFC90C08-9BE8-4054-A494-F178E43BB9E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BFC90C08-9BE8-4054-A494-F178E43BB9E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BFC90C08-9BE8-4054-A494-F178E43BB9E9}.Release|Any CPU.Build.0 = Release|Any CPU
{C9D871BF-98EF-4237-A921-E60863D7D71F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C9D871BF-98EF-4237-A921-E60863D7D71F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C9D871BF-98EF-4237-A921-E60863D7D71F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C9D871BF-98EF-4237-A921-E60863D7D71F}.Release|Any CPU.Build.0 = Release|Any CPU
{C029D6FA-F58E-4239-A97D-2C4AD1447927}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C029D6FA-F58E-4239-A97D-2C4AD1447927}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C029D6FA-F58E-4239-A97D-2C4AD1447927}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C029D6FA-F58E-4239-A97D-2C4AD1447927}.Release|Any CPU.Build.0 = Release|Any CPU
{19F7034A-3BFA-4E6F-9A0C-E0338970E854}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19F7034A-3BFA-4E6F-9A0C-E0338970E854}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19F7034A-3BFA-4E6F-9A0C-E0338970E854}.Release|Any CPU.ActiveCfg = Release|Any CPU
{19F7034A-3BFA-4E6F-9A0C-E0338970E854}.Release|Any CPU.Build.0 = Release|Any CPU
{37533850-033E-46C3-8BF0-C74C7EFAEFCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{37533850-033E-46C3-8BF0-C74C7EFAEFCD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{37533850-033E-46C3-8BF0-C74C7EFAEFCD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{37533850-033E-46C3-8BF0-C74C7EFAEFCD}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{A1C55F1E-57CB-4D58-915E-A77F3A4C5B21} = {413417B5-7CE1-4AFC-8840-00761C7EBE24}
{BFC90C08-9BE8-4054-A494-F178E43BB9E9} = {413417B5-7CE1-4AFC-8840-00761C7EBE24}
{C9D871BF-98EF-4237-A921-E60863D7D71F} = {D47260BB-A713-41CA-848E-F8ABBD4E6A8A}
{C029D6FA-F58E-4239-A97D-2C4AD1447927} = {D47260BB-A713-41CA-848E-F8ABBD4E6A8A}
{19F7034A-3BFA-4E6F-9A0C-E0338970E854} = {170ACD64-4688-4E6E-A087-2839B3870605}
{37533850-033E-46C3-8BF0-C74C7EFAEFCD} = {170ACD64-4688-4E6E-A087-2839B3870605}
EndGlobalSection
EndGlobal
Loading
Loading