Skip to content

Commit 520f8e7

Browse files
committed
Use the individual commit comment generated for each PR. Do not squash PR_26152_224 through PR_26152_228 into a single commit.
1 parent 8a64393 commit 520f8e7

12 files changed

Lines changed: 1331 additions & 0 deletions
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Engine V2 AI Behavior Closeout
2+
3+
PR: PR_26152_228-engine-v2-ai-behavior-closeout
4+
Date: 2026-06-03
5+
6+
## Scope
7+
8+
- Closed the Engine V2 AI behavior lane.
9+
- Validated patrol, chase, flee, and pathfinding baseline together.
10+
- Documented reuse/adapt/new decisions.
11+
- Documented the next engine slice.
12+
13+
## Validation
14+
15+
Commands:
16+
17+
```powershell
18+
node tests/engine/EngineV2PatrolBehavior.test.mjs
19+
node tests/engine/EngineV2ChaseFleeBehavior.test.mjs
20+
node tests/engine/EngineV2PathfindingBaseline.test.mjs
21+
```
22+
23+
Result: PASS.
24+
25+
## Reuse/Adapt/New Decisions
26+
27+
| Capability | Decision | Notes |
28+
| --- | --- | --- |
29+
| Patrol | New pure Engine V2 runtime, adapted from existing route ideas | Existing patrol helper mutates entities/actors and uses optional defaults. |
30+
| Chase/flee | New pure Engine V2 runtime, adapted from existing steering ideas | Existing steering helper mutates actors; Engine V2 emits movement commands. |
31+
| Pathfinding | New validated Engine V2 baseline, promoted from existing grid search concept | Existing grid pathfinding is useful but silently returns an empty path on invalid/unwalkable input. |
32+
| AI state/group behavior | Defer | Useful future surfaces, not required for this patrol/chase/flee/pathfinding lane. |
33+
34+
## Lane Status
35+
36+
| Area | Status | Notes |
37+
| --- | --- | --- |
38+
| Patrol | PASS | Manifest config controls waypoints, loop, ping-pong, and pauses. |
39+
| Chase/flee | PASS | Manifest selectors drive target resolution and movement commands. |
40+
| Pathfinding | PASS | Grid/path request contract resolves reusable paths for dynamic objects. |
41+
| Samples | SKIP | Permanently out of scope. |
42+
| Tools | SKIP | Out of scope. |
43+
44+
## Next Engine Slice
45+
46+
Next lane: Engine V2 AI application adapters.
47+
48+
Expected first slice:
49+
50+
- apply AI movement commands into runtime object motion processors
51+
- connect path results to chase/patrol target movement where explicitly configured
52+
- keep AI behavior processors manifest-driven and headless
53+
- keep samples and tool work out of scope
54+
- preserve visible error handling and no silent fallback
55+
56+
## Lanes Executed
57+
58+
- engine - Engine V2 AI behavior closeout validation.
59+
- runtime - patrol, chase/flee, and pathfinding baseline only.
60+
61+
## Lanes Skipped
62+
63+
- samples - permanently out of scope.
64+
- tools - out of scope.
65+
- browser Playwright - not part of this headless engine validation.
66+
67+
## Playwright
68+
69+
Playwright impacted: No browser/tool UI impact. This closeout validates headless Engine V2 runtime processors through targeted Node tests.
70+
71+
## Manual Validation
72+
73+
Review the three closeout tests and confirm AI behavior remains manifest-driven, generic, and independent from samples, tools, and hard-coded game behavior.
74+
75+
## Blocker Scope
76+
77+
No blocker for the Engine V2 AI behavior lane.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Engine V2 AI Capability Audit
2+
3+
PR: PR_26152_224-engine-v2-ai-capability-audit
4+
Date: 2026-06-03
5+
6+
## Scope
7+
8+
- Audited existing `src/` and `src/engine/` AI, pathfinding, movement, and behavior helpers.
9+
- Identified reuse, adapt, and promote candidates for Engine V2.
10+
- Confirmed legacy AI code does not block Engine V2.
11+
- No runtime behavior changes were made for this audit PR.
12+
13+
## Existing Capability Review
14+
15+
| Surface | Existing files reviewed | Decision | Notes |
16+
| --- | --- | --- | --- |
17+
| Steering | `src/engine/ai/SteeringBehaviors.js` | Adapt | Useful chase/evade vector math, but it mutates actor records and includes defaults that do not fit the Engine V2 no-hidden-defaults contract. |
18+
| Patrol | `src/engine/ai/PatrolSystem.js` | Adapt | Useful waypoint and patrol route concepts, but legacy functions mutate entities/actors and use optional defaults. |
19+
| Pathfinding | `src/engine/ai/GridPathfinding.js` | Promote concept with stricter validation | Pure grid search is compatible in spirit, but empty-path failure is too silent for Engine V2. |
20+
| AI state | `src/engine/ai/AIStateController.js` | Defer | State-machine wrapper is useful for future AI orchestration but couples to state callbacks outside this lane. |
21+
| Group behavior | `src/engine/ai/GroupBehaviors.js` | Defer/adapt | Useful steering concepts for future flock/group behavior; not in patrol/chase/flee/pathfinding scope. |
22+
| Movement | `src/engine/systems/MovementSystem.js`, `src/engine/runtime/runtimeMovementProcessing.js` | Reuse pattern | Movement systems show reusable velocity/application patterns; Engine V2 AI emits movement commands rather than mutating objects. |
23+
24+
## Reuse Decisions
25+
26+
- Reused the current Engine V2 runtime result/error pattern.
27+
- Adapted steering and patrol math concepts into pure command-producing processors.
28+
- Promoted grid pathfinding ideas into a visibly validated Engine V2 path request contract.
29+
- Did not import legacy mutable AI systems directly.
30+
- Did not create legacy coupling.
31+
32+
## Validation
33+
34+
Command:
35+
36+
```powershell
37+
git diff --check
38+
```
39+
40+
Result: PASS.
41+
42+
## Lanes Executed
43+
44+
- engine - existing AI/pathfinding capability audit and static diff validation.
45+
46+
## Lanes Skipped
47+
48+
- runtime behavior - audit PR only.
49+
- samples - permanently out of scope.
50+
- tools - out of scope.
51+
- browser Playwright - not part of this headless engine audit.
52+
53+
## Playwright
54+
55+
Playwright impacted: No browser/tool UI impact. This PR is an audit/static validation surface.
56+
57+
## Manual Validation
58+
59+
Review this audit and confirm Engine V2 reuse decisions avoid mutable legacy coupling while preserving useful AI/pathfinding concepts.
60+
61+
## Blocker Scope
62+
63+
No blocker for Engine V2. Existing AI/pathfinding helpers are adapt/promote candidates, not blockers.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Engine V2 Chase Flee Behavior
2+
3+
PR: PR_26152_226-engine-v2-chase-flee-behavior
4+
Date: 2026-06-03
5+
6+
## Scope
7+
8+
- Added manifest-driven chase and flee behavior.
9+
- Supported target selectors from manifest config.
10+
- Supported `instanceId` and `tag` selectors.
11+
- Rejected invalid target references visibly.
12+
- Avoided game-specific AI logic.
13+
14+
## Validation
15+
16+
Command:
17+
18+
```powershell
19+
node tests/engine/EngineV2ChaseFleeBehavior.test.mjs
20+
```
21+
22+
Result: PASS.
23+
24+
## Lane Status
25+
26+
| Area | Status | Notes |
27+
| --- | --- | --- |
28+
| Chase | PASS | Chase behavior emits movement toward selected target. |
29+
| Flee | PASS | Flee behavior emits movement away from selected target. |
30+
| Target selectors | PASS | `instanceId` and `tag` selectors resolve from manifest config. |
31+
| Invalid targets | PASS | Missing selector targets reject visibly. |
32+
| Samples | SKIP | Permanently out of scope. |
33+
| Tools | SKIP | Out of scope. |
34+
35+
## Lanes Executed
36+
37+
- engine - Engine V2 chase/flee behavior validation.
38+
- runtime - manifest-driven steering command generation only.
39+
40+
## Lanes Skipped
41+
42+
- samples - permanently out of scope.
43+
- tools - out of scope.
44+
- browser Playwright - not part of this headless engine validation.
45+
46+
## Playwright
47+
48+
Playwright impacted: No browser/tool UI impact. This PR validates a headless Engine V2 runtime slice through targeted Node tests.
49+
50+
## Manual Validation
51+
52+
Review `src/engine/runtime/engineV2ChaseFleeBehavior.js` and `tests/engine/EngineV2ChaseFleeBehavior.test.mjs` to confirm selectors and behavior are manifest-driven and generic.
53+
54+
## Blocker Scope
55+
56+
No blocker for the Engine V2 chase/flee behavior lane.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Engine V2 Pathfinding Baseline
2+
3+
PR: PR_26152_227-engine-v2-pathfinding-baseline
4+
Date: 2026-06-03
5+
6+
## Scope
7+
8+
- Added Engine V2 pathfinding baseline.
9+
- Supported grid/path request contracts for dynamic runtime objects.
10+
- Kept pathfinding reusable and manifest-driven.
11+
- Rejected invalid dynamic object references and blocked start/goal cells visibly.
12+
- Avoided tool and sample dependencies.
13+
14+
## Validation
15+
16+
Command:
17+
18+
```powershell
19+
node tests/engine/EngineV2PathfindingBaseline.test.mjs
20+
```
21+
22+
Result: PASS.
23+
24+
## Lane Status
25+
26+
| Area | Status | Notes |
27+
| --- | --- | --- |
28+
| Grid contract | PASS | Grid requires explicit width, height, and 0/1 cells. |
29+
| Path request contract | PASS | Requests require requestId, instanceId, start, and goal. |
30+
| Dynamic object boundary | PASS | Requests are limited to dynamic runtime objects. |
31+
| Invalid paths | PASS | Blocked starts reject visibly. |
32+
| Samples | SKIP | Permanently out of scope. |
33+
| Tools | SKIP | Out of scope. |
34+
35+
## Lanes Executed
36+
37+
- engine - Engine V2 pathfinding baseline validation.
38+
- runtime - manifest-driven path request resolution only.
39+
40+
## Lanes Skipped
41+
42+
- samples - permanently out of scope.
43+
- tools - out of scope.
44+
- browser Playwright - not part of this headless engine validation.
45+
46+
## Playwright
47+
48+
Playwright impacted: No browser/tool UI impact. This PR validates a headless Engine V2 runtime slice through targeted Node tests.
49+
50+
## Manual Validation
51+
52+
Review `src/engine/runtime/engineV2PathfindingBaseline.js` and `tests/engine/EngineV2PathfindingBaseline.test.mjs` to confirm grid/path requests are explicit and invalid references fail visibly.
53+
54+
## Blocker Scope
55+
56+
No blocker for the Engine V2 pathfinding baseline lane.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Engine V2 Patrol Behavior
2+
3+
PR: PR_26152_225-engine-v2-patrol-behavior
4+
Date: 2026-06-03
5+
6+
## Scope
7+
8+
- Added manifest-driven patrol behavior.
9+
- Supported waypoint, loop, ping-pong, and pause behavior from explicit manifest config.
10+
- Emitted movement commands and waypoint events instead of mutating runtime objects.
11+
- Avoided hard-coded enemy behavior.
12+
13+
## Validation
14+
15+
Command:
16+
17+
```powershell
18+
node tests/engine/EngineV2PatrolBehavior.test.mjs
19+
```
20+
21+
Result: PASS.
22+
23+
## Lane Status
24+
25+
| Area | Status | Notes |
26+
| --- | --- | --- |
27+
| Waypoints | PASS | Waypoints require explicit x, y, and pauseMs values. |
28+
| Loop mode | PASS | Loop patrol advances to the next waypoint and records pause state. |
29+
| Ping-pong mode | PASS | Ping-pong patrol reverses direction at route ends. |
30+
| Invalid config | PASS | Invalid waypoint config rejects visibly. |
31+
| Samples | SKIP | Permanently out of scope. |
32+
| Tools | SKIP | Out of scope. |
33+
34+
## Lanes Executed
35+
36+
- engine - Engine V2 patrol behavior validation.
37+
- runtime - manifest-driven patrol command generation only.
38+
39+
## Lanes Skipped
40+
41+
- samples - permanently out of scope.
42+
- tools - out of scope.
43+
- browser Playwright - not part of this headless engine validation.
44+
45+
## Playwright
46+
47+
Playwright impacted: No browser/tool UI impact. This PR validates a headless Engine V2 runtime slice through targeted Node tests.
48+
49+
## Manual Validation
50+
51+
Review `src/engine/runtime/engineV2PatrolBehavior.js` and `tests/engine/EngineV2PatrolBehavior.test.mjs` to confirm patrol behavior is driven by explicit manifest config.
52+
53+
## Blocker Scope
54+
55+
No blocker for the Engine V2 patrol behavior lane.

0 commit comments

Comments
 (0)