- The solution references sibling repositories under
/Users/svante/Documents/xecrets, especiallyxecrets-netandxecrets-slip39. Build and test commands can read and write outside the currentxecrets-cli/srcworkspace sandbox. Xecrets.Cliis the executable layer. Keep it onXecrets.Core,Xecrets.Core.Desktop, andXecrets.Slip39; do not referenceAxCrypt.*types directly here.Xecrets.CoreandXecrets.Core.Desktopare thin adapter layers and may bridge to AxCrypt code.- Put non-filesystem-backed adapters in
Xecrets.Core; put filesystem/stdin/stdout/wipe/CLI platform adapters inXecrets.Core.Desktop. - Do not modify old AxCrypt code for adapter work unless explicitly asked.
- Keep one top-level C# type per
.csfile. If a file accumulates multiple classes, interfaces, records, or structs, split them before finishing the change. - Keep implementation types
internalunless they are intentionally part of the external surface or must be consumed from another assembly. - Do not modify autogenerated files such as
*.Designer.cs, generatedobj/outputs, or other tool-generated sources unless explicitly asked. - When moving code between files or within a file during refactoring or rewiring, move accompanying comments with the code instead of deleting them.
- When asked to restructure, refactor, rearchitect, or rewire code, preserve equivalent behavior and do not add features, improve functionality, or silently change behavior. It is fine to call out specific issues that should be improved, but not to change behavior without being asked.
- Use block namespaces, not file-scoped namespaces.
- Keep the existing copyright/license header on C# source files.
- Follow
.editorconfig: 4-space indents for code, 2-space indents for project/XML files, braces on all control blocks, andvarwhen the type is obvious. - Prefer expression-bodied properties and accessors where it keeps things simple; methods and constructors usually stay block-bodied.
- Use collection expressions and target-typed
new()when they improve clarity. - Keep naming descriptive and PascalCase for types, members, enums, and constants.
- Public option/status identifiers use the
Xfprefix already established in the repo. - Do not add
ArgumentNullException.ThrowIfNull()checks. If null is invalid, follow the existing contract style; if null is valid, allow it.
- After making code changes, always run an appropriate build or equivalent verification command before finishing. If the command touches sibling project trees or build outputs, request escalation and then run it.
- Do not run
dotnet build,dotnet test,dotnet restore,msbuild, or related .NET verification commands in the default sandbox for this repository. Request escalation first, explain that the command touches sibling project trees/build outputs, and wait for approval. - If a build or test command appears stuck, stop it before continuing. Do not leave background build sessions running.
- After edits, normalize line endings to the host default for the files you touched.
- There may be unrelated local changes in sibling repositories. Do not revert or normalize those changes unless explicitly asked.
- Most behavior is organized as small
Operation/*classes implementingIExecutionPhases. RunFactoryowns the opcode-to-operation wiring.Statusis the standard result object for success/failure flow.- Logging and progress reporting are separate concerns, with
TotalsTracker/IProgressContexthandling progress andILoggerhandling message output.
- Tests use NUnit with
[TestFixture],[SetUp], andAssert.That. - Test class names commonly start with
Test.... - Use fake AxCrypt runtime helpers where needed.
- Prefer focused tests around parser behavior, progress updates, and status mapping.