refactor: simplify generation and runtime - #182
Merged
Merged
Conversation
Signed-off-by: samzong <samzong.lu@gmail.com>
Contributor
Merging this PR will improve performance by 35.92%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | yaml-large |
15.7 ms | 10.2 ms | +54.77% |
| ⚡ | small |
203.5 µs | 139.2 µs | +46.13% |
| ⚡ | yaml |
5.5 ms | 3.8 ms | +46.02% |
| ⚡ | large |
2.6 ms | 1.8 ms | +44.24% |
| ⚡ | BenchmarkFindCatalogCommand |
9 µs | 6.3 µs | +43.4% |
| ⚡ | BenchmarkCatalogJSON |
3.1 ms | 2.2 ms | +40.57% |
| ⚡ | json-small |
275.9 µs | 199.8 µs | +38.1% |
| ⚡ | BenchmarkFormatTableInferredColumns |
1,204.2 µs | 873 µs | +37.94% |
| ⚡ | hit |
3.8 ms | 2.7 ms | +37.72% |
| ⚡ | miss |
3.7 ms | 2.7 ms | +37.71% |
| ⚡ | table |
779.9 µs | 566.4 µs | +37.7% |
| ⚡ | large |
2.3 ms | 1.7 ms | +37.67% |
| ⚡ | large |
1.7 ms | 1.3 ms | +36.39% |
| ⚡ | small |
146.3 µs | 107.8 µs | +35.71% |
| ⚡ | small |
152.5 µs | 112.7 µs | +35.34% |
| ⚡ | json |
1.4 ms | 1 ms | +33.02% |
| ⚡ | BenchmarkParseNormalize |
6.5 ms | 4.9 ms | +32.82% |
| ⚡ | json-large |
3.3 ms | 2.6 ms | +24.03% |
| ⚡ | small |
100.8 µs | 81.8 µs | +23.25% |
| ⚡ | large |
1.3 ms | 1.1 ms | +19.94% |
| ... | ... | ... | ... | ... |
ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.
Tip
Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.
Comparing refactor/simplify-codebase (83b56ab) with main (1dde095)
samzong
marked this pull request as ready for review
September 16, 2026 13:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lathe repeated declaration rendering, parameter conversion, workflow interpolation, host loading, and spec-copy logic across large files. This change consolidates those paths and separates parsing, schema handling, command construction, request execution, catalog projection, and Skill rendering by responsibility.
cloc, excluding blank/comment lines)Net effective reduction is 3,699 lines (9.57%). The requested 30% overall reduction is not met; this PR remains a draft.
Verification
make checkgo test -race -json -coverprofile=.local/simplify-codebase/final-cover.out ./...__lathe verify --json. Full catalogs, catalog schemas, search results, every command detail and all generated Skill files matched the base revision.__lathe verify --json.Compatibility
Generated Go formatting changes; compiled declarations, public APIs, catalog schema versions, command surfaces, authentication policy and supported features are preserved. No new dependencies or generated artifacts are committed. The catalog schema source-file reference in the contracts document follows the new file location.
Checklist
internal/generated/,.cache/, and ad-hocskills/<cli-name>/directories is not committed.