User Stories

Behavior-driven stories aligned to current SDK runtime

View as Markdown

NPC Processing

1Feature: NPC protocol execution
2
3 Scenario: Process one player input with API-directed protocol
4 Given an SDK store with an NPC registered via setNPCInfo
5 And a local cortex runtime is initialized
6 When I dispatch processNPC with npcId, text, apiUrl, and cortex
7 Then the SDK runs the `/npcs/{npcId}/process` continuation loop
8 And compatibility integrations may use directive/context/verdict sequence
9 And I receive dialogue and optional action in the thunk result

Memory Operations

1Feature: Remote memory operations
2
3 Scenario: List and recall memories by npcId
4 Given a valid API URL and key
5 When I dispatch listMemoryRemoteThunk for an npcId
6 And I dispatch recallMemoryRemoteThunk with a query
7 Then memory entries are returned from API-backed memory endpoints

Bridge Validation

1Feature: Bridge rule validation
2
3 Scenario: Validate an action payload
4 Given a candidate NPC action and validation context
5 When I dispatch validateBridgeThunk
6 Then I receive a validation result containing valid/reason fields

Soul Portability

1Feature: Soul export and import
2
3 Scenario: Export and re-import an NPC soul
4 Given an active NPC in store state
5 When I dispatch remoteExportSoulThunk
6 And I dispatch importSoulFromArweaveThunk with the txId
7 Then I can retrieve the soul payload for reuse

CLI Operations

1Feature: Node CLI operations
2
3 Scenario: Verify runtime and execute npc turn
4 Given API config is set using config set
5 When I run forbocai status
6 And I run forbocai npc process <npcId> <input>
7 Then the CLI prints protocol output or actionable errors