[PR #409] [MERGED] Pixelforge 0.6.x: NPC standing axis, transient-merchant stalls, loitering (#408) #955

Closed
opened 2026-10-20 17:32:39 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/409
Author: @kolacheee
Created: 8/17/2026
Status: ✅ Merged
Merged: 8/17/2026
Merged by: @kolacheee

Base: staging ← Head: feat/pixelforge-merchant-stalls


📝 Commits (5)

  • 07a9d16 feat(pixelforge): 0.6.0 — NPC standing axis (resident/transient/fringe/destitute)
  • b333f16 feat(pixelforge): 0.6.1 — transient merchant stalls + transient loitering
  • 156a400 fix(pixelforge): 0.6.2 — home-aware dwelling gate + roof-overhang tree guard
  • 90d8fcd fix(pixelforge): 0.6.3 — NPCs never spawn on a solid tile
  • 53a2120 test(pixelforge): harden the walkable-spawn invariant against OOB indices

📊 Changes

14 files changed (+732 additions, -80 deletions)

View changed files

➕ artifacts/pixelforge-0.6.0.zip (+0 -0)
➕ artifacts/pixelforge-0.6.1.zip (+0 -0)
➕ artifacts/pixelforge-0.6.2.zip (+0 -0)
➕ artifacts/pixelforge-0.6.3.zip (+0 -0)
📝 catalog/catalog.json (+6 -6)
📝 catalog/v2/catalog.json (+6 -6)
📝 catalog/v3/catalog.json (+6 -6)
📝 packages/pixelforge/client.js (+173 -25)
📝 packages/pixelforge/docs/brief-schema.md (+23 -7)
📝 packages/pixelforge/manifest.json (+3 -3)
📝 packages/pixelforge/src/18-brief.js (+11 -1)
📝 packages/pixelforge/src/20-world.js (+161 -23)
📝 packages/pixelforge/test-brief.mjs (+342 -2)
📝 scripts/build-pixelforge-package.mjs (+1 -1)

📄 Description

Linked issue

Closes #408

Why this change

Every Pixelforge NPC compiled to the same shape: a house in the settlement and a wander box beside it. There was no way for a brief to say "this trader is passing through," "this hermit lives at the wood's edge," or "this beggar sleeps in the square" — the compiler gave them all a roof, which both wasted building lots and flattened exactly the texture a generated settlement needs. This arc adds that axis of rootedness, and is the foundation the upcoming NPC-schedules arc keys off (kind × standing).

What changed

Three stacked versions of pixelforge (0.6.0 → 0.6.2), all package-local (no engine changes):

  • 0.6.0 — the standing axis. New optional cast enum standing: resident (default) | transient | fringe | destitute in the brief (guidance bullet, schema enum, Pass-4 fold, stock-cast default). The compiler mints dwellings only for residents, denies non-residents permanent special buildings, and anchors each standing to a predictable rest spot: transient → the inn interior, fringe → the wilds zone (else the outer margin), destitute → the plaza. Conservative guidance: resident stays the norm; hubs/crossroads may lean transient.
  • 0.6.1 — transient-merchant stalls + loitering. A transient merchant claims a free building lot and sets up a light 3-table market stall (never a permanent shop) and tends it; with no free lot it falls back to loitering. Other transients spread across the settlement's public spots by seeded rotation: inside the inn, beside a resident shop's door (never in the doorway), inside a shop that has a real interior (workshop-bound), or the plaza. Stall lots join the feature-claim and tree-reservation maps.
  • 0.6.2 — audit refinements. (a) The dwelling gate is now home-aware: a resident whose home is a place/wilds zone lives there and no longer mints a phantom empty house in the settlement (matches the harness's root-households invariant by construction). (b) Scattered trees can no longer land under a building's roof overhang — the overhang rows are grass/non-solid so the old checks missed them and the roof drew over the trunk; scatterTrees now guards the overhead layer with the RNG stream untouched (only seeds that exhibited the clip change). (c) Docs §1/§5 updated; harness cases 11b–11j cover standing placement/suppression, stall/no-lot/two-merchant paths, loiter spread incl. interior-shop browsing, the dwelling-gate equality, and a 60-seed no-trunk-under-roof sweep.

Generated outputs rebuilt per version: packages/pixelforge/{client.js,manifest.json}, catalog/{catalog,v2/catalog,v3/catalog}.json, artifacts/pixelforge-0.6.{0,1,2}.zip.

Package and security impact

  • Affected package IDs: pixelforge only.
  • Engine compatibility impact: none — engine range unchanged (2.4.3 ≤ v < 4.0.0); no engine API surface touched; the feature is entirely compile-time within the package.
  • New or changed permissions/entrypoints: none.
  • Restart, storage, update, or uninstall impact: none — saves are unaffected (standing is consumed at compile; snapshots carry only seed/theme/zone/position/clock as before). Existing briefs without standing compile byte-identically (default resident reproduces the old arithmetic).

Validation

  • node scripts/validate-catalog.mjs passes locally — run against the committed LF content in a clean core.autocrlf=false worktree of 156a400 (Catalog valid: 36 packages, lanes valid: v2=36, v3=36); a plain Windows autocrlf=true worktree inflates byte sizes and false-fails, unrelated to this PR
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry — client.js sha256 verified against the manifest at each version
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • node packages/pixelforge/test-brief.mjs — all cases pass at each of the three commits, including the new 11b–11j.
  • Adversarial review workflows across the arc (three rounds): placement + regression lenses came back clean; brute-force sweeps compiled 57,600–60,000 worlds per round asserting zero loiterers/stall-tenders on solid/tree/door/table tiles, and 960 in-settlement transients after the beside-the-door refinement with zero bad tiles.
  • Live playtest (dev engine 2.4.3, seeded demo world "Crossford — Stall Demo"): transient merchant tends a 3-table stall, transients spread inn/shop-front/plaza, fringe in the wilds, destitute in the plaza; playtest feedback (NPC standing in a doorway, tree clipping a building) drove the 0.6.1 loiter refinement and the 0.6.2 tree guard, both re-verified live via the compiled world's geometry.
  • Still owed by a human: an install/update pass through the Engine package browser and a modes/restart/uninstall sweep (boxes left unchecked above).

Documentation impact

  • No documentation changes needed — outside the package: README catalog text does not enumerate these features. Within the package, docs/brief-schema.md §1/§5 document the new field and its derivation rules (shipped in this PR).
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

UI evidence (if applicable)

The feature is world-compilation, not UI chrome — screenshots of the seeded demo world (stall + loiterers) can be added here after the human install pass if wanted.

Summary by CodeRabbit

  • New Features
    • Added cast-member roles for residents, transients, fringe characters, and destitute characters.
    • Added transient merchant stalls, role-based placement, wandering areas, and shop interiors.
  • Bug Fixes
    • Prevented trees from appearing beneath building roof overhangs.
    • Improved dwelling and special-building assignment based on resident status.
    • Improved NPC placement on walkable terrain.
  • Documentation
    • Updated schema guidance for cast-member roles and interaction text.
  • Release
    • Updated Pixelforge to version 0.6.3.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/409 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 8/17/2026 **Status:** ✅ Merged **Merged:** 8/17/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `feat/pixelforge-merchant-stalls` --- ### 📝 Commits (5) - [`07a9d16`](https://github.com/Pasta-Devs/Marinara-Agents/commit/07a9d166d592e6fed7f3aa2944ac53df4ddb796c) feat(pixelforge): 0.6.0 — NPC standing axis (resident/transient/fringe/destitute) - [`b333f16`](https://github.com/Pasta-Devs/Marinara-Agents/commit/b333f16bce021717919b577da93884c51fc99616) feat(pixelforge): 0.6.1 — transient merchant stalls + transient loitering - [`156a400`](https://github.com/Pasta-Devs/Marinara-Agents/commit/156a400f47b205fcdc60cd29cfe3f10a13aace18) fix(pixelforge): 0.6.2 — home-aware dwelling gate + roof-overhang tree guard - [`90d8fcd`](https://github.com/Pasta-Devs/Marinara-Agents/commit/90d8fcd142e388a70d51a5aa7672ca945c086824) fix(pixelforge): 0.6.3 — NPCs never spawn on a solid tile - [`53a2120`](https://github.com/Pasta-Devs/Marinara-Agents/commit/53a2120c4e8320c221e0ec4db482a515eb1b4822) test(pixelforge): harden the walkable-spawn invariant against OOB indices ### 📊 Changes **14 files changed** (+732 additions, -80 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/pixelforge-0.6.0.zip` (+0 -0) ➕ `artifacts/pixelforge-0.6.1.zip` (+0 -0) ➕ `artifacts/pixelforge-0.6.2.zip` (+0 -0) ➕ `artifacts/pixelforge-0.6.3.zip` (+0 -0) 📝 `catalog/catalog.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+6 -6) 📝 `packages/pixelforge/client.js` (+173 -25) 📝 `packages/pixelforge/docs/brief-schema.md` (+23 -7) 📝 `packages/pixelforge/manifest.json` (+3 -3) 📝 `packages/pixelforge/src/18-brief.js` (+11 -1) 📝 `packages/pixelforge/src/20-world.js` (+161 -23) 📝 `packages/pixelforge/test-brief.mjs` (+342 -2) 📝 `scripts/build-pixelforge-package.mjs` (+1 -1) </details> ### 📄 Description ## Linked issue Closes #408 ## Why this change Every Pixelforge NPC compiled to the same shape: a house in the settlement and a wander box beside it. There was no way for a brief to say "this trader is passing through," "this hermit lives at the wood's edge," or "this beggar sleeps in the square" — the compiler gave them all a roof, which both wasted building lots and flattened exactly the texture a generated settlement needs. This arc adds that axis of *rootedness*, and is the foundation the upcoming NPC-schedules arc keys off (`kind × standing`). ## What changed Three stacked versions of `pixelforge` (0.6.0 → 0.6.2), all package-local (no engine changes): - **0.6.0 — the `standing` axis.** New optional cast enum `standing: resident (default) | transient | fringe | destitute` in the brief (guidance bullet, schema enum, Pass-4 fold, stock-cast default). The compiler mints dwellings only for residents, denies non-residents permanent special buildings, and anchors each standing to a predictable rest spot: transient → the inn interior, fringe → the wilds zone (else the outer margin), destitute → the plaza. Conservative guidance: `resident` stays the norm; hubs/crossroads may lean transient. - **0.6.1 — transient-merchant stalls + loitering.** A transient `merchant` claims a free building lot and sets up a light 3-table market stall (never a permanent shop) and tends it; with no free lot it falls back to loitering. Other transients spread across the settlement's public spots by seeded rotation: inside the inn, *beside* a resident shop's door (never in the doorway), inside a shop that has a real interior (workshop-bound), or the plaza. Stall lots join the feature-claim and tree-reservation maps. - **0.6.2 — audit refinements.** (a) The dwelling gate is now home-aware: a resident whose `home` is a place/wilds zone lives there and no longer mints a phantom empty house in the settlement (matches the harness's root-households invariant by construction). (b) Scattered trees can no longer land under a building's roof overhang — the overhang rows are grass/non-solid so the old checks missed them and the roof drew over the trunk; `scatterTrees` now guards the overhead layer with the RNG stream untouched (only seeds that exhibited the clip change). (c) Docs §1/§5 updated; harness cases 11b–11j cover standing placement/suppression, stall/no-lot/two-merchant paths, loiter spread incl. interior-shop browsing, the dwelling-gate equality, and a 60-seed no-trunk-under-roof sweep. Generated outputs rebuilt per version: `packages/pixelforge/{client.js,manifest.json}`, `catalog/{catalog,v2/catalog,v3/catalog}.json`, `artifacts/pixelforge-0.6.{0,1,2}.zip`. ## Package and security impact - Affected package IDs: `pixelforge` only. - Engine compatibility impact: none — engine range unchanged (2.4.3 ≤ v < 4.0.0); no engine API surface touched; the feature is entirely compile-time within the package. - New or changed permissions/entrypoints: none. - Restart, storage, update, or uninstall impact: none — saves are unaffected (`standing` is consumed at compile; snapshots carry only seed/theme/zone/position/clock as before). Existing briefs without `standing` compile byte-identically (default `resident` reproduces the old arithmetic). ## Validation <!-- These are human tasks. Never tick a box for a check that was not actually performed. --> - [x] `node scripts/validate-catalog.mjs` passes locally — run against the committed LF content in a clean `core.autocrlf=false` worktree of 156a400 (`Catalog valid: 36 packages`, `lanes valid: v2=36, v3=36`); a plain Windows `autocrlf=true` worktree inflates byte sizes and false-fails, unrelated to this PR - [x] `git diff --check` passes locally - [x] Rebuilt every affected manifest, payload, artifact, and catalog entry — `client.js` sha256 verified against the manifest at each version - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes - `node packages/pixelforge/test-brief.mjs` — all cases pass at each of the three commits, including the new 11b–11j. - Adversarial review workflows across the arc (three rounds): placement + regression lenses came back clean; brute-force sweeps compiled 57,600–60,000 worlds per round asserting zero loiterers/stall-tenders on solid/tree/door/table tiles, and 960 in-settlement transients after the beside-the-door refinement with zero bad tiles. - Live playtest (dev engine 2.4.3, seeded demo world "Crossford — Stall Demo"): transient merchant tends a 3-table stall, transients spread inn/shop-front/plaza, fringe in the wilds, destitute in the plaza; playtest feedback (NPC standing in a doorway, tree clipping a building) drove the 0.6.1 loiter refinement and the 0.6.2 tree guard, both re-verified live via the compiled world's geometry. - Still owed by a human: an install/update pass through the Engine package browser and a modes/restart/uninstall sweep (boxes left unchecked above). ## Documentation impact - [x] No documentation changes needed — outside the package: README catalog text does not enumerate these features. Within the package, `docs/brief-schema.md` §1/§5 document the new field and its derivation rules (shipped in this PR). - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) The feature is world-compilation, not UI chrome — screenshots of the seeded demo world (stall + loiterers) can be added here after the human install pass if wanted. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added cast-member roles for residents, transients, fringe characters, and destitute characters. * Added transient merchant stalls, role-based placement, wandering areas, and shop interiors. * **Bug Fixes** * Prevented trees from appearing beneath building roof overhangs. * Improved dwelling and special-building assignment based on resident status. * Improved NPC placement on walkable terrain. * **Documentation** * Updated schema guidance for cast-member roles and interaction text. * **Release** * Updated Pixelforge to version 0.6.3. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-20 17:32:39 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#955
No description provided.