Party Management
Context: The
skill-contexthook injects NPC state when this skill is invoked. Use theProject dirvalue as$PROJECT_DIRin bash commands below. The active party name is available directly from hook context.
Manage adventuring parties — teams of NPC character beads organized as epics.
Parties are beads of type epic with label npc:party. Members are character beads (type task, label npc:character) linked via parent-child dependencies.
Arguments
$ARGUMENTS
Parse Arguments
- •No arguments → list all parties
- •
create <name> [description...]→ create a new party - •
delete <name>→ delete a party (confirm first) - •
active(no name) → show the currently active party - •
active <name>→ set the active party - •Any other single word → show that party's roster
Commands
List All Parties (no arguments)
- •
List all party beads:
bashbd list --label npc:party -t epic --json
- •
For each party, display a summary line:
code- **<title>** — <description> (<N> members)
To get member count, use
bd children <party-id> --jsonand count results. - •
Show which party is currently active (from skill-context hook output).
- •
If no parties exist, say so and suggest
/party create <name>.
Show Party Roster: <name>
- •
Resolve party:
bashPARTY_ID=$("$PROJECT_DIR"/hooks/scripts/resolve-party.sh "<name>") - •
If not found, error and stop.
- •
Get party details:
bashbd show "$PARTY_ID" --json
- •
Get members (children):
bashbd children "$PARTY_ID" --json
- •
For each child bead, extract alignment/class/role from labels, name from title, persona from description.
- •
Display as a formatted roster:
code## <Party Name> <description> | # | Name | Alignment | Class | Role | Persona | |---|------|-----------|-------|------|---------| | 1 | Vera | LG | Rogue | Defender | Battle-scarred security architect... | | 2 | Kai | NE | Rogue | Attacker | — |
- •Alignment: use short form (LG, NG, CG, LN, TN, CN, LE, NE, CE)
- •Persona: truncated preview (~40 chars) or "—"
- •
Show if this is the active party.
Create Party: create <name> [description...]
- •
Validate name: must be kebab-case (
[a-z0-9-]+). - •
Check if party already exists:
bashEXISTING=$("$PROJECT_DIR"/hooks/scripts/resolve-party.sh "<name>")If found, error and stop.
- •
Create the party bead:
bashbd create "<name>" -t epic -l "npc:party" -d "<description>"
- •
If no active party is set, set this one active on the session bead:
bashSESSION_ID=$("$PROJECT_DIR"/hooks/scripts/ensure-session.sh) "$PROJECT_DIR"/hooks/scripts/set-session-state.sh "$SESSION_ID" active-party=<name> - •
Announce: "Created party <name>. Use
/recruitto add members."
Delete Party: delete <name>
- •
Resolve party via
resolve-party.sh. - •
Show the roster (using
bd children). - •
Confirm with the user before deleting.
- •
If confirmed, delete:
bashbd delete "$PARTY_ID"
Note: This only deletes the party epic. Character beads survive — they're independent entities.
- •
If this was the active party, clear it on the session bead:
bashSESSION_ID=$("$PROJECT_DIR"/hooks/scripts/ensure-session.sh) "$PROJECT_DIR"/hooks/scripts/set-session-state.sh "$SESSION_ID" active-party=none - •
Announce: "Deleted party <name>. Character beads are preserved."
Show Active Party: active (no name)
- •Read the active party from skill-context hook output.
- •If set, show that party's roster.
- •If not set, say "No active party. Use
/party active <name>to set one."
Set Active Party: active <name>
- •
Resolve party via
resolve-party.sh. Verify it exists. - •
Update session bead:
bashSESSION_ID=$("$PROJECT_DIR"/hooks/scripts/ensure-session.sh) "$PROJECT_DIR"/hooks/scripts/set-session-state.sh "$SESSION_ID" active-party=<name> - •
Show the party's roster.
- •
Announce: "<name> is now the active party."