AgentSkillsCN

add-genre-pack

在src/data/gameContent.ts中新增一个叙事卡类型包。在创作黑色电影、西部片、恐怖片、科幻片,或任何其他题材的角色、主题议程、卡牌定义与场景提示时使用。涵盖所需类型、卡牌平衡规则,以及getGenrePack注册表的使用。

SKILL.md
--- frontmatter
name: add-genre-pack
description: "Add a new genre pack to src/data/gameContent.ts for Narrative Cards. Use when creating noir, western, horror, sci-fi, or any other genre's characters, theme agendas, card definitions, and scene prompts. Covers required types, card balance rules, and the getGenrePack registry."
argument-hint: "Genre name (e.g. noir, western, horror, sci-fi)"

Add a Genre Pack

When to Use

  • Creating the initial noir genre content (the app's required default)
  • Adding a second or later genre
  • Expanding an existing genre with more cards or characters

Prerequisites

src/data/gameContent.ts must exist. If it doesn't, create it first — this file is the critical blocker preventing the app from compiling.

Required Exported Shape

typescript
// src/data/gameContent.ts must export these:
export interface Character { id: string; name: string; description: string; }
export interface ThemeAgenda { id: string; title: string; description: string; }
export interface GameCard {
  id: string;
  type: 'move' | 'element' | 'event';
  subtype?: string;   // move subtypes: Complicate|Introduce|Reveal|Callback|Resolve|Confront; element: 'secret'
  name: string;
  description: string;
  effect: string;     // Event cards: "+2 Tension", "-1 Coherence", etc.
}
export interface ScenePrompt { id: string; text: string; act: 1 | 2 | 3; }
export interface GenrePack {
  name: string;
  characters: Character[];
  themeAgendas: ThemeAgenda[];
  gameCards: GameCard[];
  scenePrompts: ScenePrompt[];
}
export function getGenrePack(genre: string): GenrePack { ... }

Procedure

1. Create or open src/data/gameContent.ts

Use assets/GenrePackTemplate.ts as your guide.

2. Design Characters (minimum 4)

One assigned to each player on setup. Rules:

  • Must support 4 simultaneous players → need ≥ 4 characters
  • IDs must be unique within the genre: "<genre>-detective", "<genre>-informant", etc.
  • description is flavor text seen during the draft phase (1–2 sentences)

3. Design Theme Agendas (minimum 4)

One assigned per player. A theme agenda describes the type of narrative moments that earn the player bonus points during scoring. Rules:

  • Must be discoverable from reading 9 LogEntry.narration strings
  • Not tied to winning/losing mechanics — scoring is manual, player-judged
  • Example: "Betrayal — scenes where trust is broken or a secret is exposed"

4. Design Cards

Card balance (single-copy deck — engine doubles it):

TypeCountNotes
Move6–8Must cover all 6 subtypes
Element4–6Mix of open and secret (subtype: 'secret')
Event4–6Each must have parseable meter deltas in effect

Move card subtypes — at least 1 card per subtype:

SubtypeEffect
Complicate+1 Tension, adds complication string to targeted Fact
IntroduceCreates new open Fact; +1 Coherence if references an existing Fact
RevealReveals a secret Fact; +1 Coherence
CallbackReferences a Fact, increments fact.callbacks; +1 Coherence
ResolveCosts 2 Tension, resolves a Fact; 2 pts to resolver, 1 pt to fact creator
Confront+1 Tension, free narration

Event card effect string format — the parser checks for these exact substrings:

  • +2 Tension, +1 Tension, -1 Tension
  • +2 Coherence, +1 Coherence, -1 Coherence
  • Multiple effects can be combined: "+2 Tension -1 Coherence"

5. Design Scene Prompts (minimum 9, three per act)

Provide at least 3 prompts per act so the engine can vary scenes across playthroughs:

  • Act 1 (scenes 1–3): Establishing prompts — introduce people, places, problems
  • Act 2 (scenes 4–6): Escalation prompts — complications, reveals, alliances
  • Act 3 (scenes 7–9): Resolution prompts — confrontations, final choices, aftermath

Prompt text should be setting-specific and leave room for player interpretation (1–2 sentences).

6. Register in getGenrePack

typescript
const GENRE_PACKS: Record<string, GenrePack> = {
  noir: noirPack,
  western: westernPack,   // add new genres here
};

export function getGenrePack(genre: string): GenrePack {
  return GENRE_PACKS[genre] ?? GENRE_PACKS["noir"];
}

7. Verify

  • npm run build compiles without errors
  • getGenrePack("noir") returns a pack with ≥ 4 characters, ≥ 4 agendas, the 6 move subtypes, and ≥ 9 scene prompts
  • No duplicate IDs within a pack