Skip to content

Commit 23cc5da

Browse files
author
DavidQ
committed
PR_01_03_POST_MOVE_VALIDATION
& PR_03_01_SHARED_NUMBERS_NORMALIZATION
1 parent 45bb4b7 commit 23cc5da

23 files changed

Lines changed: 574 additions & 52 deletions

docs/dev/CODEX_COMMANDS.md

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,45 @@
1+
PR Naming Rule:
2+
ALL PRs MUST follow:
3+
PR_<SECTION>_<STEP>_<SHORT_NAME>
4+
5+
Reject any PR name that does not follow this format.
6+
17
MODEL: GPT-5.4
28
REASONING: high
39

410
COMMAND:
5-
Implement PR_01_02_REPO_STRUCTURE_APPLY.
11+
Implement PR_03_01_SHARED_NUMBERS_NORMALIZATION.
12+
13+
Goal:
14+
Consolidate duplicated numeric helpers onto the shared math layer with no behavior or API changes.
15+
16+
Target layer:
17+
- src/shared/math/
18+
19+
Focus helpers:
20+
- asFiniteNumber
21+
- asPositiveInteger
22+
- toFiniteNumber
23+
- roundNumber
624

7-
Use:
8-
- docs/dev/reports/move_map.txt
9-
- docs/dev/reports/validation_checklist.txt
25+
Required steps:
26+
1. Produce docs/dev/reports/number_usage_scan.txt for numeric helper duplicates and consumers in scope.
27+
2. Produce docs/dev/reports/extraction_map.txt with exact source -> shared target mapping.
28+
3. Standardize consumers in scope onto shared numeric helpers.
29+
4. Remove only obsolete duplicate numeric helper implementations within this PR scope.
30+
5. Keep changes surgical.
1031

1132
Rules:
12-
- Apply only the mapped moves
13-
- Update only the imports/paths required by those moves
14-
- No logic refactors
15-
- No broad repo cleanup
16-
- No deletes unless explicitly mapped
33+
- numeric helpers only
34+
- no string/id/object helper extraction
35+
- no broad cleanup
36+
- no API changes
37+
- no behavior changes
1738

1839
Validation:
19-
- imports resolve
20-
- structure matches move_map
21-
- no unresolved live sample links
22-
- runtime harness phase matcher remains intact
40+
- impacted imports resolve
41+
- duplicate numeric helpers in scope removed or redirected
42+
- impacted tests/smoke pass
2343

2444
Return ZIP:
25-
<project folder>/tmp/PR_01_02_REPO_STRUCTURE_APPLY.zip
45+
<project folder>/tmp/PR_03_01_SHARED_NUMBERS_NORMALIZATION.zip

docs/dev/COMMIT_COMMENT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
PR_01_02_REPO_STRUCTURE_APPLY
1+
PR_03_01_SHARED_NUMBERS_NORMALIZATION
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Apply the validated repo structure move map and only the import/path updates required by those moves.
1+
Shared numeric helper consolidation package focused on canonicalizing numeric normalization utilities under src/shared/math.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
EXTRACTION MAP
2+
Generated: 2026-04-13
3+
Command: PR_03_01_SHARED_NUMBERS_NORMALIZATION
4+
5+
Source -> Shared Target Mapping
6+
- src/shared/utils/numberUtils.js::toFiniteNumber -> src/shared/math/numberNormalization.js::toFiniteNumber
7+
- src/shared/utils/numberUtils.js::asFiniteNumber -> src/shared/math/numberNormalization.js::asFiniteNumber
8+
- src/shared/utils/numberUtils.js::asPositiveInteger -> src/shared/math/numberNormalization.js::asPositiveInteger
9+
- src/shared/math/numberNormalization.js::roundNumber remains canonical owner
10+
11+
Compatibility Redirects
12+
- src/shared/utils/numberUtils.js keeps export surface and redirects numeric helper ownership to shared/math.
13+
- samples/_shared/numberUtils.js routes core numeric helpers to shared/math and keeps non-target helpers from shared/utils.

0 commit comments

Comments
 (0)