Skip to content

Commit 2bbb486

Browse files
DaveSkenderclaude
andauthored
refactor: Reorganize folders and files (#2145)
Co-authored-by: Claude <noreply@anthropic.com>
1 parent fe5dbcc commit 2bbb486

1,385 files changed

Lines changed: 855 additions & 801 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/code-completion/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ Do not ignore, defer, or suppress warnings.
8383

8484
New or updated indicators require:
8585

86-
- Series: `*.StaticSeries.cs`
86+
- Series: `{Indicator}.Series.cs` partial class file
8787
- Catalog: `*.Catalog.cs` + registration
88-
- Tests: `*.Tests.cs` with full coverage
88+
- Tests: `*Tests.cs` with full coverage
8989
- Docs: `docs/indicators/{Name}.md`
9090
- Regression baseline (if algorithm changed)
9191
- Performance benchmark (complex indicators)

.agents/skills/indicator-buffer/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,17 @@ public override void Clear()
7676

7777
## Required implementation
7878

79-
- [ ] Source code: `src/**/{IndicatorName}.BufferList.cs` file exists
79+
- [ ] Source code: `src/**/{IndicatorName}List.cs` file exists
8080
- [ ] Inherits `BufferList<TResult>` and implements correct increment interface
8181
- [ ] Two constructors: primary + chaining via `: this(...) => Add(...);`
8282
- [ ] Uses `BufferListUtilities.Update()` or `UpdateWithDequeue()`
8383
- [ ] `Clear()` resets results and all internal buffers
84-
- [ ] Unit testing: `tests/indicators/**/{IndicatorName}.BufferList.Tests.cs` exists
84+
- [ ] Unit testing: `tests/Library/Indicators/**/{IndicatorName}BufferListTests.cs` exists
8585
- [ ] Inherits `BufferListTestBase` and implements correct test interface
8686
- [ ] All required abstract + interface methods implemented
8787
- [ ] Verifies equivalence with Series results
8888
- [ ] **Catalog registration**: Registered in `Catalog.Listings.cs`
8989
- [ ] **Performance benchmark**: Add to `tools/performance/Perf.Buffer.cs`
9090
- [ ] **Public documentation**: Update `docs/indicators/{IndicatorName}.md`
91-
- [ ] **Regression tests**: Add to `tests/indicators/**/{IndicatorName}.Regression.Tests.cs`
91+
- [ ] **Regression tests**: Add to `tests/Library/Indicators/**/{IndicatorName}RegressionTests.cs`
9292
- [ ] **Migration guide**: Update `docs/migration/v3.md` for notable and breaking changes from v2

.agents/skills/indicator-catalog/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: Create and register indicator catalog entries for automation. Use f
77

88
## File
99

10-
`src/{category}/{Indicator}/{Indicator}.Catalog.cs`
10+
`src/Indicators/{category}/{Indicator}/{Indicator}.Catalog.cs`
1111

1212
## Builder pattern
1313

@@ -131,7 +131,7 @@ listings.Add(Beta.SeriesListing);
131131

132132
## Testing
133133

134-
`tests/indicators/{folder}/{Indicator}/{Indicator}.Catalog.Tests.cs`:
134+
`tests/Library/Indicators/{folder}/{Indicator}/{Indicator}CatalogTests.cs`:
135135

136136
```csharp
137137
[TestClass]

.agents/skills/indicator-series/SKILL.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,27 @@ description: Implement Series-style batch indicators with mathematical precision
77

88
## File structure
99

10-
All files live in `src/{category}/{Indicator}/`:
10+
All files live in `src/Indicators/{category}/{Indicator}/`:
1111

1212
| File | Purpose |
1313
| ---- | ------- |
14-
| `{Indicator}.StaticSeries.cs` | Static partial class — `To{Indicator}()` + `To{Indicator}List()` entry points |
15-
| `{Indicator}.StreamHub.cs` | Hub class (internal ctor) + `To{Indicator}Hub()` extension |
16-
| `{Indicator}.BufferList.cs` | List class + `To{Indicator}List()` extension |
14+
| `{Indicator}.Series.cs` | Static partial class — `To{Indicator}()` series entry point |
15+
| `{Indicator}Hub.cs` | Hub class (internal ctor) + `To{Indicator}Hub()` extension |
16+
| `{Indicator}List.cs` | List class + `To{Indicator}List()` extension |
1717
| `{Indicator}.Catalog.cs` | `CommonListing`, `SeriesListing`, `StreamListing`, `BufferListing` |
18-
| `{Indicator}.Models.cs` | Result record(s) |
18+
| `{Indicator}Result.cs` | Result record |
1919
| `{Indicator}.Utilities.cs` | `Validate()` (internal), `Increment()` (public), `RemoveWarmupPeriods()` |
2020
| `I{Indicator}.cs` | Parameter interface (parameter properties only; NOT result properties) |
2121

22-
Test files mirror in `tests/indicators/{category}/{Indicator}/`:
22+
Test files mirror in `tests/Library/Indicators/{category}/{Indicator}/`:
2323

24-
- `{Indicator}.StaticSeries.Tests.cs`
25-
- `{Indicator}.BufferList.Tests.cs`
26-
- `{Indicator}.StreamHub.Tests.cs`
27-
- `{Indicator}.Regression.Tests.cs`
24+
- `{Indicator}SeriesTests.cs`
25+
- `{Indicator}BufferListTests.cs`
26+
- `{Indicator}HubTests.cs`
27+
- `{Indicator}CatalogTests.cs`
28+
- `{Indicator}RegressionTests.cs`
2829

29-
Category folders: `a-d`, `e-k`, `m-r`, `s-z` (alphabetical)
30+
Category folders: `a-b`, `c-d`, `e-j`, `k-q`, `r-s`, `t-z` (alphabetical)
3031

3132
## Performance optimization
3233

@@ -42,16 +43,16 @@ Some indicators (e.g., ADL) are faster with `List.Add()` — benchmark both.
4243

4344
## Required implementation
4445

45-
Beyond the `.StaticSeries.cs` file, ensure:
46+
Beyond the main `{Indicator}.Series.cs` file, ensure:
4647

4748
- [ ] **Catalog registration**: Create `src/**/{Indicator}.Catalog.cs` and register in `Catalog.Listings.cs`
4849
- [ ] **Interface file**: Create `src/**/{Indicator}/I{Indicator}.cs` with parameter properties (NOT result properties)
49-
- [ ] **Unit tests**: Create `tests/indicators/**/{Indicator}.StaticSeries.Tests.cs`
50+
- [ ] **Unit tests**: Create `tests/Library/Indicators/**/{Indicator}SeriesTests.cs`
5051
- Inherit from `StaticSeriesTestBase`
5152
- Verify against manually calculated reference values; assert documented value ranges with `IsBetween` if applicable
5253
- [ ] **Performance benchmark**: Add to `tools/performance/Perf.Series.cs`
5354
- [ ] **Public documentation**: Update `docs/indicators/{Indicator}.md`
54-
- [ ] **Regression baseline tests**: Add to `tests/indicators/**/{Indicator}.Regression.Tests.cs` inheriting from `RegressionTestBase<TResult>` with `[TestCategory("Regression")]` on the class — these compare the full result set to a frozen `*.standard.json` baseline so it can be filtered via `--filter TestCategory=Regression`
55+
- [ ] **Regression baseline tests**: Add to `tests/Library/Indicators/**/{Indicator}RegressionTests.cs` inheriting from `RegressionTestBase<TResult>` with `[TestCategory("Regression")]` on the class — these compare the full result set to a frozen `*.standard.json` baseline so it can be filtered via `--filter TestCategory=Regression`
5556
- [ ] **Migration guide**: Update `docs/migration/v3.md` for notable and breaking changes from v2
5657

5758
## Precision testing
@@ -63,10 +64,10 @@ Beyond the `.StaticSeries.cs` file, ensure:
6364

6465
## Examples
6566

66-
- Simple: `src/s-z/Sma/Sma.StaticSeries.cs`
67-
- Exponential smoothing: `src/e-k/Ema/Ema.StaticSeries.cs`
68-
- Complex multi-stage: `src/a-d/Adx/Adx.StaticSeries.cs`
69-
- Multi-value results: `src/a-d/Alligator/Alligator.StaticSeries.cs`
67+
- Simple: `src/Indicators/r-s/Sma/Sma.Series.cs`
68+
- Exponential smoothing: `src/Indicators/e-j/Ema/Ema.Series.cs`
69+
- Complex multi-stage: `src/Indicators/a-b/Adx/Adx.Series.cs`
70+
- Multi-value results: `src/Indicators/a-b/Alligator/Alligator.Series.cs`
7071

7172
See [references/decision-tree.md](references/decision-tree.md) for result interface selection.
7273

.agents/skills/indicator-stream/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,20 +97,20 @@ Replay up to `restoreIndex` (inclusive). The item at the rollback timestamp is r
9797

9898
## Required implementation
9999

100-
- [ ] Source code: `src/**/{IndicatorName}.StreamHub.cs` file exists
100+
- [ ] Source code: `src/**/{IndicatorName}Hub.cs` file exists
101101
- [ ] Uses appropriate provider base (ChainHub or BarProvider)
102102
- [ ] Validates parameters in constructor; calls Reinitialize() as needed
103103
- [ ] Implements O(1) state updates; avoids O(n²) recalculation
104104
- [ ] Overrides RollbackState() when maintaining stateful fields
105105
- [ ] Overrides ToString() with concise hub name
106-
- [ ] Unit testing: `tests/indicators/**/{IndicatorName}.StreamHub.Tests.cs` exists
106+
- [ ] Unit testing: `tests/Library/Indicators/**/{IndicatorName}HubTests.cs` exists
107107
- [ ] Inherits StreamHubTestBase with correct test interfaces
108108
- [ ] Comprehensive rollback validation present
109109
- [ ] Verifies Series parity
110110
- [ ] **Catalog registration**: Registered in `Catalog.Listings.cs`
111111
- [ ] **Performance benchmark**: Add to `tools/performance/Perf.Stream.cs`
112112
- [ ] **Public documentation**: Update `docs/indicators/{IndicatorName}.md`
113-
- [ ] **Regression tests**: Add to `tests/indicators/**/{IndicatorName}.Regression.Tests.cs`
113+
- [ ] **Regression tests**: Add to `tests/Library/Indicators/**/{IndicatorName}RegressionTests.cs`
114114
- [ ] **Migration guide**: Update `docs/migration/v3.md` for notable and breaking changes from v2
115115

116116
## References

.agents/skills/indicator-stream/references/compound-hubs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,4 +215,4 @@ Follow standard StreamHub testing requirements:
215215
3. Test rollback validation if RollbackState is overridden
216216
4. Verify Series parity with the compound indicator
217217

218-
**Example**: `tests/indicators/s-z/StochRsi/StochRsi.StreamHub.Tests.cs`
218+
**Example**: `tests/Library/Indicators/r-s/StochRsi/StochRsiHubTests.cs`

.coderabbit.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ reviews:
2929
- "!docs/.vitepress/dist/" # VitePress build output
3030
- "!bin/" # .NET build output
3131
- "!obj/" # .NET build intermediate files
32-
- "!**/_testdata/**/*.csv" # Test data
33-
- "!**/_testdata/**/*.json" # Test data
32+
- "!**/TestData/**/*.csv" # Test data
33+
- "!**/TestData/**/*.json" # Test data
3434
- "!**/*.g.cs" # Generated source code
3535
- "!**/*.docx" # Office Word
3636
- "!**/*.pptx" # Office PowerPoint

.editorconfig

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,13 @@ dotnet_style_require_accessibility_modifiers = for_non_interface_members:warning
7575
dotnet_style_space_around_colon_in_named_argument = true:suggestion
7676
dotnet_diagnostic.IDE0040.severity = suggestion
7777

78+
# Allow singular 'using' directive
79+
dotnet_style_namespace_match_folder = false:none
80+
7881
# Expression-level preferences
7982
dotnet_style_coalesce_expression = true:suggestion
8083
dotnet_style_collection_initializer = true:suggestion
8184
dotnet_style_explicit_tuple_names = true:suggestion
82-
dotnet_style_namespace_match_folder = false:none
8385
dotnet_style_null_propagation = true:suggestion
8486
dotnet_style_object_initializer = true:suggestion
8587
dotnet_style_prefer_auto_properties = true:suggestion
@@ -181,18 +183,18 @@ csharp_prefer_static_local_function = true:suggestion
181183

182184
# Namespace and method preferences
183185
csharp_style_namespace_declarations = file_scoped:suggestion
184-
csharp_style_prefer_method_group_conversion = true:silent
185-
csharp_style_prefer_top_level_statements = true:silent
186+
csharp_style_prefer_method_group_conversion = true:suggestion
187+
csharp_style_prefer_top_level_statements = true:suggestion
186188
csharp_style_prefer_primary_constructors = true:suggestion
187189

188190
# Expression-bodied members
189-
csharp_style_expression_bodied_constructors = true:silent
190-
csharp_style_expression_bodied_methods = true:silent
191-
csharp_style_expression_bodied_operators = true:silent
192-
csharp_style_expression_bodied_properties = true:silent
193-
csharp_style_expression_bodied_indexers = true:silent
194-
csharp_style_expression_bodied_accessors = true:silent
195-
csharp_style_expression_bodied_lambdas = true:silent
191+
csharp_style_expression_bodied_constructors = true:suggestion
192+
csharp_style_expression_bodied_methods = true:suggestion
193+
csharp_style_expression_bodied_operators = true:suggestion
194+
csharp_style_expression_bodied_properties = true:suggestion
195+
csharp_style_expression_bodied_indexers = true:suggestion
196+
csharp_style_expression_bodied_accessors = true:suggestion
197+
csharp_style_expression_bodied_lambdas = true:suggestion
196198

197199
# Function preferences
198200
csharp_style_prefer_local_over_anonymous_function = true:suggestion

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565

6666
- name: Build (package tests)
6767
run: >
68-
dotnet build tests/indicators/Tests.Indicators.csproj
68+
dotnet build tests/Library/Tests.Indicators.csproj
6969
--configuration Release
7070
--property:ContinuousIntegrationBuild=true
7171
-warnAsError
@@ -89,7 +89,7 @@ jobs:
8989

9090
- name: Test indicators
9191
run: >
92-
dotnet test tests/indicators/Tests.Indicators.csproj
92+
dotnet test tests/Library/Tests.Indicators.csproj
9393
--configuration Release
9494
--settings tests/tests.unit.runsettings
9595
--results-directory ./test-results/unit
@@ -182,7 +182,7 @@ jobs:
182182

183183
- name: Test regression baselines
184184
run: >
185-
dotnet test tests/indicators/Tests.Indicators.csproj
185+
dotnet test tests/Library/Tests.Indicators.csproj
186186
--configuration Release
187187
--settings tests/tests.regression.runsettings
188188
--results-directory ./test-results/regression

.github/workflows/test-integration.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ on:
66
- "main"
77
- "v[0-9]*"
88
paths:
9-
- "tests/integration/**"
9+
- "tests/Integration/**"
1010
- "tools/sse-server/**"
1111
- ".github/workflows/test-integration.yml"
1212
pull_request:
1313
paths:
14-
- "tests/integration/**"
14+
- "tests/Integration/**"
1515
- "tools/sse-server/**"
1616
- ".github/workflows/test-integration.yml"
1717
types: [opened, synchronize, reopened, ready_for_review]

0 commit comments

Comments
 (0)