|
| 1 | +# Clean up repository to follow kebab-case naming and C# conventions |
| 2 | + |
| 3 | +## Description |
| 4 | + |
| 5 | +Audit and clean up the entire repository to ensure consistent kebab-case file naming and proper C# documentation conventions per the csharp skill. This includes renaming files from PascalCase to kebab-case and replacing all "TODO: Add purpose description" region comments with proper Purpose/Design/Responsibilities documentation. |
| 6 | + |
| 7 | +## Scope |
| 8 | + |
| 9 | +This is a large-scale style cleanup task affecting the entire codebase. It should be done in manageable chunks to keep PRs reviewable. |
| 10 | + |
| 11 | +## Checklist |
| 12 | + |
| 13 | +### Phase 1: Core Files (source/timewarp-amuru/) |
| 14 | +- [ ] Rename `AppContextExtensions.cs` → `app-context-extensions.cs` |
| 15 | +- [ ] Rename `CliConfiguration.cs` → `cli-configuration.cs` |
| 16 | +- [ ] Rename `ScriptContext.cs` → `script-context.cs` |
| 17 | +- [ ] Rename `PathResolver.cs` → `path-resolver.cs` |
| 18 | +- [ ] Rename `Installer.cs` → `installer.cs` |
| 19 | +- [ ] Update regions in all core files with proper Purpose/Design descriptions |
| 20 | + |
| 21 | +### Phase 2: DotNet Commands (source/timewarp-amuru/dot-net-commands/) |
| 22 | +- [ ] Rename `DotNet.cs` → `dot-net.cs` |
| 23 | +- [ ] Rename `DotNet.*.cs` files → `dot-net.*.cs` (kebab-case) |
| 24 | +- [ ] Rename tool subdirectory files |
| 25 | +- [ ] Update regions in all dotnet command files |
| 26 | + |
| 27 | +### Phase 3: Git Commands (source/timewarp-amuru/git-commands/) |
| 28 | +- [ ] Rename `Git.cs` → `git.cs` |
| 29 | +- [ ] Rename `Git.*.cs` → `git.*.cs` (kebab-case) |
| 30 | +- [ ] Update regions in all git command files |
| 31 | + |
| 32 | +### Phase 4: Fzf Commands (source/timewarp-amuru/fzf-command/) |
| 33 | +- [ ] Rename `Fzf.cs` → `fzf.cs` |
| 34 | +- [ ] Rename `Fzf.*.cs` → `fzf.*.cs` (kebab-case) |
| 35 | +- [ ] Update regions in all fzf command files |
| 36 | + |
| 37 | +### Phase 5: Native/FileSystem (source/timewarp-amuru/native/) |
| 38 | +- [ ] Rename `Bash.cs` → `bash.cs` |
| 39 | +- [ ] Rename file-system commands (`Commands.*.cs` → `commands.*.cs`) |
| 40 | +- [ ] Rename file-system direct (`Direct.*.cs` → `direct.*.cs`) |
| 41 | +- [ ] Rename utilities (`Post.cs`, `GenerateColor.cs`, etc.) |
| 42 | +- [ ] Rename `PathResolver.cs` |
| 43 | +- [ ] Update regions in all native files |
| 44 | + |
| 45 | +### Phase 6: JSON-RPC (source/timewarp-amuru/json-rpc/) |
| 46 | +- [ ] Rename `JsonRpcClient.cs` → `json-rpc-client.cs` |
| 47 | +- [ ] Rename `JsonRpcClientBuilder.cs` → `json-rpc-client-builder.cs` |
| 48 | +- [ ] Rename `IJsonRpcClient.cs` → `ijson-rpc-client.cs` |
| 49 | +- [ ] Update regions |
| 50 | + |
| 51 | +### Phase 7: Testing (source/timewarp-amuru/testing/) |
| 52 | +- [ ] Rename `CommandMock.cs` → `command-mock.cs` |
| 53 | +- [ ] Rename `MockScope.cs` → `mock-scope.cs` |
| 54 | +- [ ] Rename `MockState.cs` → `mock-state.cs` |
| 55 | +- [ ] Rename `MockSetup.cs` → `mock-setup.cs` |
| 56 | +- [ ] Update regions |
| 57 | + |
| 58 | +### Phase 8: Interfaces & Extensions |
| 59 | +- [ ] Rename `ICommandBuilder.cs` → `icommand-builder.cs` |
| 60 | +- [ ] Rename `CommandBuilderExtensions.cs` → `command-builder-extensions.cs` |
| 61 | +- [ ] Update regions |
| 62 | + |
| 63 | +### Phase 9: Tests (tests/) |
| 64 | +- [ ] Audit test files for PascalCase naming |
| 65 | +- [ ] Rename test files to kebab-case |
| 66 | +- [ ] Update regions in test files |
| 67 | + |
| 68 | +### Phase 10: Final Verification |
| 69 | +- [ ] Run `dotnet build` to verify no compilation errors |
| 70 | +- [ ] Run `dev test` to verify all tests pass |
| 71 | +- [ ] Check for any remaining PascalCase files |
| 72 | +- [ ] Check for any remaining "TODO: Add purpose" comments |
| 73 | +- [ ] Update documentation references if needed |
| 74 | + |
| 75 | +## Region Documentation Template |
| 76 | + |
| 77 | +All files should follow this pattern (see csharp skill): |
| 78 | + |
| 79 | +```csharp |
| 80 | +#region Purpose |
| 81 | +// One-line description of what this file/class does |
| 82 | +#endregion |
| 83 | + |
| 84 | +#region Design |
| 85 | +// Key design decisions and rationale |
| 86 | +// Constraints and dependencies |
| 87 | +// Why certain approaches were chosen |
| 88 | +#endregion |
| 89 | + |
| 90 | +#region Responsibilities (optional) |
| 91 | +// What this class/file is responsible for |
| 92 | +// What it is NOT responsible for |
| 93 | +#endregion |
| 94 | + |
| 95 | +#region Open Questions (optional) |
| 96 | +// Q1 (YYYY-MM-DD, author): question text |
| 97 | +// A1 (YYYY-MM-DD, author): answer text |
| 98 | +#endregion |
| 99 | +``` |
| 100 | + |
| 101 | +## Notes |
| 102 | + |
| 103 | +### Current State |
| 104 | +- 96 files have "TODO: Add purpose description" in their regions |
| 105 | +- Many files still use PascalCase naming (e.g., `AppContextExtensions.cs`, `CliConfiguration.cs`) |
| 106 | +- The `core/` folder has been cleaned up (completed in tasks 080/081) |
| 107 | +- The `nu-get/` folder has been cleaned up (completed in task 081) |
| 108 | + |
| 109 | +### Approach |
| 110 | +1. Work folder-by-folder to keep commits focused |
| 111 | +2. Each rename + region update should be a single commit |
| 112 | +3. Create small PRs (one folder per PR) for easier review |
| 113 | +4. Run tests after each folder cleanup |
| 114 | + |
| 115 | +### Reference |
| 116 | +- See `.ai/04-csharp-coding-standards.md` for C# conventions |
| 117 | +- See `csharp` skill for region documentation patterns |
| 118 | +- Examples of good collocated docs: |
| 119 | + - `source/timewarp-amuru/core/command-extensions.cs` |
| 120 | + - `source/timewarp-amuru/core/command-result.cs` |
| 121 | + |
| 122 | +### Files with TODO: comments (96 total) |
| 123 | + |
| 124 | +**Core (6 files):** |
| 125 | +- AppContextExtensions.cs |
| 126 | +- CliConfiguration.cs |
| 127 | +- Installer.cs |
| 128 | +- ScriptContext.cs |
| 129 | +- core/shell-builder.cs |
| 130 | +- interfaces/ICommandBuilder.cs |
| 131 | + |
| 132 | +**DotNet Commands (25 files):** |
| 133 | +- DotNet.cs, DotNet.*.cs, tool/DotNet.*.cs |
| 134 | + |
| 135 | +**Git Commands (17 files):** |
| 136 | +- Git.cs, Git.*.cs |
| 137 | + |
| 138 | +**Fzf Commands (10 files):** |
| 139 | +- Fzf.cs, Fzf.*.cs |
| 140 | + |
| 141 | +**JSON-RPC (3 files):** |
| 142 | +- JsonRpcClient.cs, JsonRpcClientBuilder.cs, IJsonRpcClient.cs |
| 143 | + |
| 144 | +**Native (14 files):** |
| 145 | +- Bash.cs, utilities/*, file-system/commands/*, file-system/direct/*, PathResolver.cs |
| 146 | + |
| 147 | +**Testing (4 files):** |
| 148 | +- CommandMock.cs, MockScope.cs, MockState.cs, MockSetup.cs |
| 149 | + |
| 150 | +**Extensions (1 file):** |
| 151 | +- CommandBuilderExtensions.cs |
| 152 | + |
| 153 | +**Tests (spike files, may be lower priority):** |
| 154 | +- cliwrap-exit-code-tests/*.cs (9 files) |
| 155 | + |
| 156 | +## Session |
| 157 | + |
| 158 | +- Created: ses_27dd18c7effe1K4rnFRhnQezjn (2026-04-13) |
0 commit comments