Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 20 additions & 22 deletions docs_build/dev/BUILD_PR.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,47 @@
# PR_26177_002-shared-noise-foundation
# PR_26177_003-shared-geometry-foundation

## Purpose

Add a small shared deterministic noise foundation.
Add a small shared geometry foundation.

## Source Of Truth

This `BUILD_PR.md`, `PLAN_PR.md`, and the user request are the source of truth for `PR_26177_002-shared-noise-foundation`.
This `BUILD_PR.md`, `PLAN_PR.md`, and the user request are the source of truth for `PR_26177_003-shared-geometry-foundation`.

## Stack

- Base branch: `PR_26177_001-shared-hash-foundation`
- This PR builds on PR_001 hash utilities.
- Base branch: `PR_26177_002-shared-noise-foundation`

## Exact Scope

- Add `src/shared/noise/` foundation.
- Build on existing `Random`/`RandomSeed` and PR_001 hash utilities.
- Include deterministic Value, Perlin-style, Simplex-style, and Fractal-style helpers only where practical.
- Keep API small and documented.
- Add targeted tests for the shared noise area.
- Add `src/shared/geometry/` foundation.
- Include small reusable primitives/helpers such as vectors, rectangles, bounds, distance, clamp/intersection basics.
- Add targeted tests for the shared geometry area.
- No engine refactor.
- Create required Codex reports under `docs_build/dev/reports/`.
- Create repo-structured delta ZIP under `tmp/`.

## Exact Targets

- `docs_build/dev/PLAN_PR.md`
- `docs_build/dev/BUILD_PR.md`
- `src/shared/noise/noise.js`
- `tests/shared/NoiseFoundation.test.mjs`
- `docs_build/dev/reports/PR_26177_002-shared-noise-foundation.md`
- `docs_build/dev/reports/PR_26177_002-shared-noise-foundation_branch-validation.md`
- `docs_build/dev/reports/PR_26177_002-shared-noise-foundation_requirement-checklist.md`
- `docs_build/dev/reports/PR_26177_002-shared-noise-foundation_validation-lane.md`
- `docs_build/dev/reports/PR_26177_002-shared-noise-foundation_manual-validation-notes.md`
- `src/shared/geometry/geometry.js`
- `tests/shared/GeometryFoundation.test.mjs`
- `docs_build/dev/reports/PR_26177_003-shared-geometry-foundation.md`
- `docs_build/dev/reports/PR_26177_003-shared-geometry-foundation_branch-validation.md`
- `docs_build/dev/reports/PR_26177_003-shared-geometry-foundation_requirement-checklist.md`
- `docs_build/dev/reports/PR_26177_003-shared-geometry-foundation_validation-lane.md`
- `docs_build/dev/reports/PR_26177_003-shared-geometry-foundation_manual-validation-notes.md`
- `docs_build/dev/reports/codex_review.diff`
- `docs_build/dev/reports/codex_changed_files.txt`

## Out Of Scope

- No engine refactor.
- No browser-owned product data.
- No runtime UI changes.
- No browser storage changes.
- No API/database changes.
- No engine refactor.
- No `start_of_day` folder changes.
- No unrelated cleanup.
- No full samples smoke by default.
Expand All @@ -53,9 +51,9 @@ This `BUILD_PR.md`, `PLAN_PR.md`, and the user request are the source of truth f
Run exactly:

```powershell
node ./scripts/run-node-test-files.mjs tests/shared/NoiseFoundation.test.mjs tests/shared/HashFoundation.test.mjs
node --check src/shared/noise/noise.js
node --check tests/shared/NoiseFoundation.test.mjs
node ./scripts/run-node-test-files.mjs tests/shared/GeometryFoundation.test.mjs
node --check src/shared/geometry/geometry.js
node --check tests/shared/GeometryFoundation.test.mjs
git diff --check
```

Expand All @@ -64,5 +62,5 @@ git diff --check
Create repo-structured delta ZIP:

```text
tmp/PR_26177_002-shared-noise-foundation_delta.zip
tmp/PR_26177_003-shared-geometry-foundation_delta.zip
```
17 changes: 8 additions & 9 deletions docs_build/dev/PLAN_PR.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
# PLAN_PR: PR_26177_002-shared-noise-foundation
# PLAN_PR: PR_26177_003-shared-geometry-foundation

## Purpose

Add a small shared deterministic noise foundation.
Add a small shared geometry foundation.

## Scope

- Add `src/shared/noise/` foundation.
- Build on existing `RandomSeed` and PR_001 hash utilities.
- Include deterministic Value, Perlin-style, Simplex-style, and Fractal-style helpers where practical.
- Keep API small and documented.
- Add `src/shared/geometry/` foundation.
- Include reusable primitives/helpers for vectors, rectangles, bounds, distance, clamp, containment, and intersection basics.
- Add targeted tests.
- No engine refactor.
- No browser-owned product data.
- No runtime UI changes.
- No unrelated cleanup.

## Implementation Plan

1. Add `src/shared/noise/noise.js`.
2. Add `tests/shared/NoiseFoundation.test.mjs`.
3. Validate deterministic output, seed variation, practical ranges, and permutation determinism.
1. Add `src/shared/geometry/geometry.js`.
2. Add `tests/shared/GeometryFoundation.test.mjs`.
3. Validate vector, rectangle, bounds, distance, clamp, containment, and intersection behavior.
4. Produce required Codex reports and repo-structured ZIP.
23 changes: 23 additions & 0 deletions docs_build/dev/reports/PR_26177_003-shared-geometry-foundation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# PR_26177_003-shared-geometry-foundation

Date: 2026-06-26
Scope: Shared geometry foundation
Status: PASS

## Summary

- Added `src/shared/geometry/geometry.js`.
- Added small vector, rectangle, bounds, distance, clamp, containment, and intersection helpers.
- Added targeted tests in `tests/shared/GeometryFoundation.test.mjs`.
- No engine refactor, runtime UI, API, database, or unrelated cleanup changes were made.

## Validation

- PASS: `node ./scripts/run-node-test-files.mjs tests/shared/GeometryFoundation.test.mjs`.
- PASS: `node --check src/shared/geometry/geometry.js`.
- PASS: `node --check tests/shared/GeometryFoundation.test.mjs`.
- PASS: `git diff --check`.

## Artifact

- `tmp/PR_26177_003-shared-geometry-foundation_delta.zip`
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# PR_26177_003-shared-geometry-foundation Branch Validation

Status: PASS

- PASS: Branch `PR_26177_003-shared-geometry-foundation` was created from `PR_26177_002-shared-noise-foundation`.
- PASS: Stack base was clean before branch creation.
- PASS: One PR purpose only: shared geometry foundation.
- PASS: No `start_of_day` files changed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# PR_26177_003-shared-geometry-foundation Manual Validation Notes

Status: PASS

Manual review confirmed this PR only adds shared geometry primitives/helpers and targeted tests. It does not refactor engine code or change runtime UI behavior.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# PR_26177_003-shared-geometry-foundation Requirement Checklist

| Requirement | Status | Notes |
|---|---:|---|
| Add `src/shared/geometry/` foundation | PASS | Added `src/shared/geometry/geometry.js`. |
| Include vector helpers | PASS | Added vector creation and vector arithmetic helpers. |
| Include rectangles and bounds helpers | PASS | Added rectangle and bounds helpers. |
| Include distance helper | PASS | Added `distance`. |
| Include clamp/intersection basics | PASS | Added `clamp`, containment, intersection checks, and intersection rectangle. |
| No engine refactor | PASS | No engine files changed. |
| Add targeted tests | PASS | Added `tests/shared/GeometryFoundation.test.mjs`. |
| No runtime UI changes | PASS | No UI files changed. |
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# PR_26177_003-shared-geometry-foundation Validation Lane

Status: PASS

## Commands

```powershell
node ./scripts/run-node-test-files.mjs tests/shared/GeometryFoundation.test.mjs
node --check src/shared/geometry/geometry.js
node --check tests/shared/GeometryFoundation.test.mjs
git diff --check
```

## Results

- PASS: Targeted geometry foundation test.
- PASS: Changed JS syntax checks.
- PASS: `git diff --check`.

## Not Run

- Full samples smoke was not run by default.
14 changes: 7 additions & 7 deletions docs_build/dev/reports/codex_changed_files.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
docs_build/dev/BUILD_PR.md
docs_build/dev/PLAN_PR.md
docs_build/dev/reports/PR_26177_002-shared-noise-foundation.md
docs_build/dev/reports/PR_26177_002-shared-noise-foundation_branch-validation.md
docs_build/dev/reports/PR_26177_002-shared-noise-foundation_manual-validation-notes.md
docs_build/dev/reports/PR_26177_002-shared-noise-foundation_requirement-checklist.md
docs_build/dev/reports/PR_26177_002-shared-noise-foundation_validation-lane.md
docs_build/dev/reports/PR_26177_003-shared-geometry-foundation.md
docs_build/dev/reports/PR_26177_003-shared-geometry-foundation_branch-validation.md
docs_build/dev/reports/PR_26177_003-shared-geometry-foundation_manual-validation-notes.md
docs_build/dev/reports/PR_26177_003-shared-geometry-foundation_requirement-checklist.md
docs_build/dev/reports/PR_26177_003-shared-geometry-foundation_validation-lane.md
docs_build/dev/reports/codex_changed_files.txt
docs_build/dev/reports/codex_review.diff
src/shared/noise/noise.js
tests/shared/NoiseFoundation.test.mjs
src/shared/geometry/geometry.js
tests/shared/GeometryFoundation.test.mjs
Loading
Loading