mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-11-05 20:31:54 +00:00
Merge pull request #58 from PR0M3TH3AN/agents/daily/decompose-agent-v1-14520720754219938139
[decompose] Extract modules from src/lib.mjs
This commit is contained in:
12 files changed
+429
-528
No files matched your search
@@ -1,14 +1,16 @@
|
||||
# Context: 2026-02-14 Constants Refactor
|
||||
# Context: Decompose src/lib.mjs
|
||||
|
||||
## Chosen File
|
||||
`src/lib.mjs` (approx 700 lines).
|
||||
|
||||
## Reason for Selection
|
||||
It is one of the largest grandfathered files (excluding HTML files which are harder to module-decompose). It contains mixed concerns: roster management, lock operations, and dashboard server logic.
|
||||
|
||||
## Extraction Plan
|
||||
1. Extract roster logic to `src/roster.mjs`.
|
||||
2. Extract lock operations to `src/lock-ops.mjs`.
|
||||
3. Extract dashboard logic to `src/dashboard.mjs`.
|
||||
4. Move configuration helpers to `src/torch-config.mjs` and constants to `src/constants.mjs`.
|
||||
|
||||
## Goal
|
||||
To refactor duplicate or magic numeric literals into a canonical constants file.
|
||||
Specifically targeting `4173` (default dashboard port) and `1500` (race check delay).
|
||||
|
||||
## Scope
|
||||
- Create `src/constants.mjs`.
|
||||
- Modify `src/lib.mjs`.
|
||||
|
||||
## Constraints
|
||||
- Must preserve existing values.
|
||||
- Must pass lint and tests.
|
||||
- Must follow `const-refactor-agent` guidelines.
|
||||
Reduce `src/lib.mjs` by at least 200 lines while preserving behavior.
|
||||
Reference in new issue
Block a user