Skip to content

Compact vanilla NPC action tools - #692

Draft
RANGROO wants to merge 2 commits into
unstablefrom
codex/compact-vanilla-actions
Draft

Compact vanilla NPC action tools#692
RANGROO wants to merge 2 commits into
unstablefrom
codex/compact-vanilla-actions

Conversation

@RANGROO

@RANGROO RANGROO commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Compact 17 simultaneously eligible, uncustomized vanilla actions into 7 model-facing tools, reducing the maximum first-pass NPC action surface from 41 tools to 31.
  • Use one consistent action envelope across prompt JSON, structured output, local-model grammar, and grouped tool definitions: action, mode, target, item, and amount.
  • Route each grouped selection back to its existing legacy action code and payload so current confirmation, cooldown, follow-up, script-proxy, and CHIM command behavior stays in place.
  • Preserve customized action definitions and expose only variants eligible for the current actor and turn.

Grouped action modes

  • Handle_Crime: add_bounty, arrest, forgive, collect_bounty_payment
  • Start_Combat: lethal, brawl
  • Follow: follow_actor, follow_player, approach_player
  • Set_Pace: faster, slower
  • Give: item, gold
  • Exchange: trade, receive_gift
  • Perform_Gesture: drink_gesture, toast

target now consistently carries an actor, recipient, or destination; item carries an actual item or action detail; and amount carries a positive quantity. JSON connectors receive a generated mode enum containing only active grouped variants plus blank for Talk and individual actions.

Validation

  • PHP lint on all 8 changed PHP files
  • ActionCatalogTest.php: 13 tests, 187 assertions
  • CoreRequestStabilityTest.php: 8 tests, 25 assertions
  • ActionActorTargetRefTest.php: 2 tests, 4 assertions
  • ProfileConnectorTestsRegressionTest.php: 1 test, 1 assertion
  • Total: 24 tests, 217 assertions
  • git diff --check
  • CHIM unstable guard: PR_REQUIRED as expected for core runtime changes; it also reports overlap with Add persistent and repeatable NPC tasks #594 in functions/functions.php, functions/json_response.php, and lib/core/action_catalog.php

Compatibility

  • Existing legacy action codes and command payloads are unchanged.
  • The grouped resolver accepts the first draft's old selector aliases while new model-facing schemas use mode.
  • No database migration or seed rewrite is required.

Scope and limits

  • No release/version change, DLL, deploy, or direct unstable push.
  • StobeServer has no equivalent core action catalog. DialecticServer has a separate Fallout-specific catalog, so neither sibling is changed here.
  • Source, schema generation, and focused execution routing are validated; live connector calls and in-game behavior have not been tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant