use-agents #1

Merged
ks merged 37 commits from use-agents into main 2025-11-07 17:54:44 +00:00
Owner
No description provided.
ks added 37 commits 2025-11-07 17:54:23 +00:00
- Create `campaign-creator` agent to automate complete campaign setup including character creation with dice-rolled ability scores, world-building via random tables, and file structure generation
- Create `session-prep` agent to load campaign context at session start by reading STATE.md, character.md, quick-reference.md, and current day logs
- Create `combat-manager` agent to handle all combat mechanics including initiative rolling, enemy HP tracking, attack/damage rolls, and contested checks (grapple/shove)
- Create `dm-state-logger` agent to update STATE.md and daily logs after game events (HP changes, resource use, quest updates, location/time changes)
- Create `long-rest-handler` agent to automate complete long rest workflow including log finalization, STATE.md updates, weather rolling, and new day log creation
- Create `npc-file-generator` agent to create and maintain NPC documentation files for important recurring characters
- Create `random-table-roller` agent to execute all random table rolls (weather, loot, rumors, quest hooks, NPC names/personalities) using actual dice
- Update `CLAUDE.md` to introduce agent system and clarify when to invoke each agent
- Update `CLAUDE.md` to emphasize that agents handle mechanics and file management while DM focuses on narration and player interaction
- Add detailed combat initialization rules to `CLAUDE.md` requiring immediate combat-manager invocation when combat is triggered
- Add comprehensive grapple/shove mechanics documentation to `CLAUDE.md` explaining contested checks vs attack rolls
- Update `/new-campaign` command to delegate to campaign-creator agent instead of inline instructions
- Add `mkdir -p` to bash permissions in `.claude/settings.json` to allow directory creation
- Remove `Grep` and `Glob` from agent tools list, keeping only `Bash` and `Read`
- Add permissions for new `bin/random-*` scripts in settings.json
- Create `bin/random-weather` script to roll seasonal and general weather with automatic table parsing
- Create `bin/random-loot` script to roll loot tables with sub-roll resolution for gems, trinkets, and multi-roll mechanics
- Create `bin/random-name` script to roll NPC, tavern, place, and shop names
- Create `bin/random-personality` script to roll personality traits with configurable count and trait types
- Create `bin/random-quest` script to roll quest hooks by type with multi-roll support
- Create `bin/random-rumor` script to roll rumors by category with multi-roll support
- Split `resources/random-tables/weather.md` into individual seasonal files: `weather-general.md`, `weather-spring.md`, `weather-summer.md`, `weather-autumn.md`, `weather-winter.md`, `weather-extreme.md`, `weather-magical.md`
- Split `resources/random-tables/loot.md` into individual hoard files: `loot-individual.md`, `loot-small.md`, `loot-medium.md`, `loot-large.md`, `loot-dragon.md`, `loot-trinkets.md`, `loot-gems.md`, `loot-art.md`, `loot-trade.md`
- Split `resources/random-tables/names.md` into individual name files: `name-npc.md`, `name-tavern.md`, `name-place.md`, `name-shop.md`, `name-blacksmith.md`, `name-magic-shop.md`, `name-apothecary.md`
- Split `resources/random-tables/personality-traits.md` into individual trait files: `personality-quick.md`, `personality-demeanor.md`, `personality-speech.md`, `personality-quirk.md`, `personality-ideal.md`, `personality-bond.md`, `personality-flaw.md`, `personality-secret.md`, `personality-goal.md`, `personality-fear.md`, `personality-habit.md`
- Split `resources/random-tables/quest-hooks.md` into individual quest files: `quest-type.md`, `quest-complication.md`, `quest-twist.md`, `quest-reward.md`, `quest-urban.md`, `quest-wilderness.md`, `quest-dungeon.md`, `quest-social.md`, `quest-monster.md`, `quest-personal.md`
- Split `resources/random-tables/rumors.md` into individual rumor files: `rumor-general.md`, `rumor-political.md`, `rumor-supernatural.md`, `rumor-criminal.md`, `rumor-treasure.md`, `rumor-monster.md`, `rumor-lore.md`, `rumor-npc.md`, `rumor-event.md`
- Refactor agent documentation to describe new script-based workflow instead of manual dice rolling and table reading
- Update agent instructions to use `bin/random-*` scripts with appropriate arguments instead of `bin/dice` and manual file parsing
- Add comprehensive script reference section listing all available scripts and their usage patterns
- Expand campaign-creator Step 2 from conversational setting discussion to 7 structured AskUserQuestion prompts covering magic level, technology level, campaign scope, starting power level, campaign type, setting type, and campaign tone
- Replace direct random table reading in campaign-creator with dedicated `bin/random-*` scripts: `bin/random-region`, `bin/random-settlement type/problem`, `bin/random-starting-scenario`, `bin/random-faction type/goal`, `bin/random-weather`, `bin/random-rumor`, `bin/random-quest`
- Implement dynamic NPC/faction/rumor/quest generation using dice rolls (1d3+1 for factions, 1d3+2 for NPCs, 1d2+1 for rumors, 1d2 for quests) instead of fixed numbers
- Add faction system to campaign-creator with faction types, goals, relationships, and NPC representatives
- Connect world elements in campaign-creator: NPCs to factions, rumors to NPCs/settlement problems, quests to factions/NPCs/settlement problems
- Expand campaign.md generation to include setting preferences, region type, settlement type, settlement problem, faction details with relationships, and NPC faction affiliations
- Create new character-updater agent to handle all character state changes (HP, resources, equipment, conditions, leveling) with interactive level-up workflow
- Reorganize agent responsibilities: character-updater manages character.md and character sections of STATE.md; dm-state-logger manages world state only (quests, NPCs, location, time)
- Update combat-manager model from sonnet to haiku for efficiency
- Update dm-state-logger description and responsibilities to exclude character state management, clarify world-state-only focus
- Update dm-state-logger model from sonnet to haiku
- Update long-rest-handler model from sonnet to haiku
- Update npc-file-generator model from sonnet to haiku
- Update random-table-roller model to haiku and add new scripts: `bin/random-region`, `bin/random-settlement`, `bin/random-starting-scenario`, `bin/random-faction`
- Add new random table files: faction-type.md, faction-goal.md, region-type.md, settlement-type.md, settlement-problem.md, starting-scenario.md
- Create new bin scripts: random-faction, random-region, random-settlement, random-starting-scenario
- Update .claude/settings.json permissions to include new random scripts: bin/random-faction, bin/random-region, bin/random-settlement, bin/random-starting-scenario
- Update CLAUDE.md core instructions to reference character-updater agent for character changes and clarify agent responsibilities
- Add STATE.md section ownership table to CLAUDE.md showing which agents manage which sections
- Update CLAUDE.md weather rolling workflow to clarify daily weather (long-rest-handler) vs ad-hoc queries (random-table-roller)
- Expand CLAUDE.md grapple/shove mechanics documentation with condition effects and escape procedures
- Update CLAUDE.md to emphasize proactive Perception and Insight check prompts
- Add detailed grappled condition effects and escape mechanics to CLAUDE.md combat section
- Change `model` configuration from `haiku` to `sonnet` to enable more sophisticated NPC file generation
- Reorganize campaign-creator workflow: move pre-flight checks to Step 5 (after world generation), rename steps 1-4, and consolidate world-building into single parallel generation step using new `bin/generate-campaign-world` script
- Replace sequential world-building rolls with parallel `bin/generate-campaign-world` that generates all elements (~0.4 seconds) and returns structured JSON with region, settlement, factions, NPCs, rumors, quests, and weather
- Integrate npc-file-generator agent into campaign creation: call it for each generated NPC to create personality + stat files automatically instead of manual NPC file creation
- Add comprehensive NPC stat generation to npc-file-generator: determine if stats needed based on occupation, roll ability scores using `bin/generate-ability-scores`, calculate derived stats (HP, AC, attacks, skills), and format D&D 5e stat blocks
- Create `bin/generate-ability-scores` script supporting multiple rolling methods (standard-array, 3d6, 4d6-drop-lowest, 5d6-drop-2, 2d6+2, 3d4+2, 4d6-drop-lowest-reroll-1s) with JSON output
- Create `bin/generate-campaign-world` parallel world generator that calls existing random-* scripts concurrently and returns complete JSON with all world elements in structured format
- Create `bin/random-occupation` script for rolling NPC occupations from d100 table with optional subtables (martial, arcane, divine, skilled, common, noble)
- Add `--json` flag to `bin/dice` script to output structured JSON instead of human-readable text for programmatic use
- Update combat-manager to look up NPC stats with priority: custom NPC files first, then standard monsters, then ask DM
- Add `.gitignore` file to exclude `/campaigns` directory from version control
- Update `.claude/settings.json` permissions to allow new scripts: `bin/generate-ability-scores`, `bin/generate-campaign-world`, `bin/random-occupation`
- Create `resources/random-tables/npc-occupation.md` with d100 occupation table and 6 subtables for different NPC types
- Add critical protocol requiring agents be invoked IMMEDIATELY when events occur (NPC introduction, world changes, character changes, combat start) rather than deferred or batched, with examples showing agent invocation mid-play
- Expand `/roll` command documentation to distinguish three check types: Active vs Passive (most common for social/stealth), Active vs DC (environmental challenges), and Contested (rare - both sides roll)
- Add detailed guidance on Passive Insight (10 + WIS mod + prof) for social skills, specifying when to use passive (casual lies, normal persuasion, NPC not suspicious) vs active contested checks (NPC actively suspicious/interrogating)
- Implement mandatory rolling workflow requiring DC announcement BEFORE rolling dice to maintain transparency and prevent perceived result-adjustment
- Add comprehensive social skill examples showing correct usage of Passive Insight vs Active Insight vs set DC, with common mistakes highlighted
- Expand `save` command to include NPC documentation validation, checking for missing NPC files and offering npc-file-generator invocation before saving
- Add section on Contested Checks in combat-manager agent clarifying they are RARE and listing specific examples (grapple, shove, escape grapple, escape restraints)
- Clarify that Passive Insight applies to Deception, Persuasion, and Intimidation checks by default unless NPC is actively suspicious
- Add table summarizing when to use each social skill check type (Passive, Active, or DC-based)
- Expand mechanics-reference with detailed Passive Insight section including when to use active vs passive and summary table of social skill scenarios
- Update dm-cheatsheet social interactions section to emphasize Passive Insight as default for social skills with modifiers for NPC advantage/disadvantage
- Add emphasis that showing NPC rolls transparently (attacks, saves, ability checks, contested checks) is critical for trust and transparency
- Expand step 2 to include explicit instruction to run `ls -1 campaigns/` for listing existing campaigns
- Add detailed weather check procedure in step 6 specifying use of `bin/dice d12` with seasonal table and optional `bin/dice d20` roll for minor changes
- Clarify that weather should be added to STATE.md after rolling
- Restructure step 6 with bold formatting to emphasize the weather check requirement
- Add `"alwaysThinkingEnabled": true` property at the top level of settings configuration
- Add example workflow for invoking dm-state-logger during NPC conversations at natural pauses to record dialogue and cover story details
- Add Agent Invocation Quick Reference table mapping event types to responsible agents, trigger timing, and file updates
- Add Fictional NPCs & Cover Stories section explaining that fictional NPCs (aliases, made-up references) do NOT get separate files but are documented in related NPC files, STATE.md, or day logs instead
- Add responsibility for handling lightweight updates to existing NPC files when new interactions occur
- Implement file existence check workflow: read existing file, determine if detailed or minimal, then either append-only or full generation
- Define 'detailed' vs 'minimal' file criteria (>500 characters, substantial Goals/Secrets sections vs bare-bones setup)
- Add append-only mode for detailed existing files that only appends to Interactions section without modifying other content
- Update workflow steps to include checking for existing files before generation (steps 4-5)
- Clarify that npc-file-generator should NOT be invoked for ongoing conversations with existing NPCs
- Update success criteria to distinguish between new file creation, detailed file updates (append-only), and minimal file enrichment
- Add note that NPC files are reference documents for personality/goals/secrets, not conversation transcripts
- Update agent description in CLAUDE.md to specify npc-file-generator creates files for NEW important characters when first introduced
- Clarify in CLAUDE.md that ongoing NPC conversations are logged by dm-state-logger, not npc-file-generator
- Add guidance that dm-state-logger captures conversation details in day logs while npc-file-generator handles character sheet creation
- Update agent invocation table in CLAUDE.md to separate NEW NPC introduction from existing NPC conversation handling
- Add note in CLAUDE.md that NPC files should only be manually updated when fundamental changes occur (goals shift, secrets revealed, faction change)
- Reduce CLAUDE.md from 647 to 121 lines by moving detailed content to separate reference files
- Add step 2 to continue.md workflow: read `resources/claude-dm/game-feel.md` for writing style and pacing guidance
- Renumber continue.md steps 2-9 to 3-11 to accommodate new game-feel step
- Create `resources/claude-dm/game-feel.md` with writing style, narration boundaries, time tracking, player agency, and story engagement principles
- Create `resources/claude-dm/combat-mechanics.md` with detailed combat rules including initiative, grappling, shoving, solo balance, and difficulty classes
- Create `resources/claude-dm/dice-rolling.md` with rolling workflow, DC announcement protocol, and three types of skill checks (contested, active vs passive, active vs DC)
- Create `resources/claude-dm/npc-management.md` with NPC creation, existing NPC management, world continuity, and fictional NPC documentation guidelines
- Create `resources/claude-dm/play-flow.md` with workflows for new campaigns, continuing campaigns, normal play loop, long rest, and player commands
- Consolidate CLAUDE.md core identity section to emphasize dice rolling, file usage, game feel, randomness, and character consistency
- Simplify agent descriptions in CLAUDE.md to remove implementation details and focus on when to invoke each agent
- Replace detailed agent invocation examples in CLAUDE.md with concise quick reference table
- Remove STATE.md section ownership table from CLAUDE.md (moved to file-management.md reference)
- Remove detailed critical behaviors section from CLAUDE.md and replace with condensed checklist
- Remove game feel and pacing section from CLAUDE.md (moved to game-feel.md)
- Remove play flow section from CLAUDE.md (moved to play-flow.md)
- Remove combat essentials section from CLAUDE.md (moved to combat-mechanics.md)
- Remove dice rolling section from CLAUDE.md (moved to dice-rolling.md)
- Remove skill check types section from CLAUDE.md (moved to dice-rolling.md)
- Remove NPCs & world section from CLAUDE.md (moved to npc-management.md)
- Remove player commands section from CLAUDE.md (moved to play-flow.md)
- Remove difficulty classes table from CLAUDE.md (moved to combat-mechanics.md)
- Remove story engagement section from CLAUDE.md (moved to game-feel.md)
- Update CLAUDE.md remember section to reference new modular documentation files
- Consolidate CLAUDE.md additional resources section to point to new reference files
- Add zero-padded day log filename formatting instructions to `dm-state-logger.md` (e.g., `day-01.md`, `day-10.md`, `day-100.md`)
- Add zero-padded day log filename formatting instructions to `long-rest-handler.md` with examples for days 1-99 and 100+
- Delete `session-prep.md` agent file (replaced by bin/load-campaign-context script)
- Update `continue.md` command to use `bin/load-campaign-context [campaign-name]` instead of manually reading individual files
- Add `bin/load-campaign-context` permission to `.claude/settings.json` bash allow list
- Update `CLAUDE.md` to remove session-prep agent reference and replace with `bin/load-campaign-context` for campaign loading
- Create new `bin/load-campaign-context` Python script that loads STATE.md, character.md, quick-reference.md, last 2 day logs, and lists additional campaign files for selective reading
- Delete `campaigns.md` command file entirely
- Delete `exit.md` command file entirely
- Remove step 1 (Read CLAUDE.md for context) from `character.md`, `continue.md`, `inventory.md`, `level.md`, `map.md`, `npcs.md`, `quests.md`, `recap.md`, `rest-long.md`, `rest-short.md`, `roll.md`, and `status.md`
- Remove step 2 (Find the active campaign in campaigns/) from `character.md`, `inventory.md`, `level.md`, `map.md`, `npcs.md`, `quests.md`, `recap.md`, `rest-long.md`, `rest-short.md`, `roll.md`, and `status.md`
- In `continue.md`, replace step 1-2 with single step to read `resources/claude-dm/*.md` files
- In `continue.md`, simplify campaign selection logic and remove weather/event rolling steps
- In `continue.md`, remove step 10 (Follow all guidelines in CLAUDE.md) and step 11 (Update STATE.md and day log)
- In `rest-long.md`, add step to update `character.md` during new day transition
- In `rest-short.md`, add recommended Hit Dice suggestion to short rest prompt
- Renumber all remaining steps sequentially in affected command files after removals
- Add new 'Transaction Checkpoint (MANDATORY)' section defining immediate triggers for character state, world state, combat, and NPC changes with detailed examples
- Create 'After Every Player Action' checklist to verify if agents should be invoked based on number changes, world changes, and STATE.md accuracy
- Reorganize agent invocation quick reference table into categorized sections (Character State, World State, Combat, Rest) with specific trigger conditions and timing guidance
- Add detailed 'Agent Invocation & Game Flow' section to game-feel.md explaining how to invoke agents gracefully without breaking immersion, with examples of good vs. acceptable vs. poor invocation styles
- Expand play-flow.md Normal Play Loop with explicit checkpoint step listing character state, world state, combat, and NPC triggers as checkboxes
- Add 'Post-Scene Checklist' to CLAUDE.md footer verifying gold, items, HP, plot conversations, time/location, and STATE.md accuracy before moving to next scene
- Clarify that agent invocation is 'PART of good DMing, not breaking character' and emphasize immediate invocation over batching or deferring
- Update Remember section in CLAUDE.md to prioritize 'INVOKE AGENTS IMMEDIATELY' as core principle alongside dice rolling and file management
- Add `Bash` to the tools array in the agent configuration (line 6)
- Add reference to `resources/claude-dm/*.md` files in campaign-creator agent workflow
- Restructure dice rolling workflow section with explicit step ordering and mandatory DC announcement before rolling
- Add player vs NPC check examples to dice rolling protocol with formatted dialogue
- Expand critical warning about announcing DC before rolling with trust-building rationale
- Add 'NEVER' section listing prohibited practices in dice rolling (rolling first, retroactive DC changes, fudging)
- Reorganize skill check types with improved formatting and clearer examples
- Add comprehensive NPC behavior section covering limited knowledge, guarded responses, and self-interest
- Introduce progressive information extraction system requiring multiple successful checks (DC 12-15, 15, 18-20)
- Document NPC domain expertise limitations and what NPCs don't know
- Add fragmented information principle showing how truth is scattered across multiple NPC sources
- Create meaningful failures section describing NPC consequences for failed social checks
- Refactor play flow normal loop with numbered steps, concise scene-setting guidance (2-3 sentences max), and explicit DC announcement requirement
- Reorganize play flow checkpoint section with clearer formatting and checkbox organization
- Clarify default outcome determination rule: roll if outcome uncertain AND failure is interesting
- Remove the Examples section with four detailed combat scenarios
- Simplify agent description from detailed explanation to concise statement
- Consolidate 'Initialize Combat' and 'Track Combat State' into single 'Initial Combat State' section with clearer output format
- Rename 'Execute Enemy Turns' to 'Running the combat rounds' and expand with comprehensive turn execution logic including saving throws and advantage/disadvantage mechanics
- Rename 'End Combat' section and remove reference to deleting `.combat-active.md` file
- Move 'Action Output' section before 'Combat Round Format' and add detailed examples for attack rolls and saving throws
- Remove 'Example Combat Flow' section with step-by-step round progression
- Remove 'Quality Assurance' section with pre-action verification checklist
- Simplify 'Critical Rules' section by removing redundant points
- Remove reference to 'random-table-roller' agent from Integration section
- Remove 'Solo Combat Balance' section
- Adjust indentation and formatting for consistency throughout document
- Remove 'Contested Checks' section reference to 'Social skills' check type
- Clarify that stats lookup is 'if not yet known' in Initialize Combat section
- Add Reactions section to character-sheet-dnd5e.md template with opportunity attacks and placeholder for character-specific reactions (Shield, Counterspell, Uncanny Dodge, etc.)
- Update campaign-creator.md to populate Reactions section in character.md during character creation with appropriate reactions for the character's class, spells, and features
- Update character-updater.md to update Reactions section when character gains new reactions through leveling or spell selection
- Convert combat-manager agent to combat skill in `.claude/skills/combat/SKILL.md` with internal HP/initiative tracking, mandatory reaction checkpoints, and seamless mechanical flow
- Update CLAUDE.md to invoke combat skill (not agent) immediately when hostile actions occur, with skill handling all initiative rolling automatically via chained commands
- Update settings.json to add `Skill(combat)` permission for combat skill invocation
- Refactor `bin/dice` output to be more concise: single-line format showing notation, rolls, and result instead of multi-line verbose output
- Update combat-mechanics.md to reference combat skill instead of combat-manager agent and clarify skill invocation workflow
- Update game-feel.md to distinguish between skills (flow naturally) and agents (require explicit invocation) and provide graceful invocation techniques
- Update roll.md command documentation to clarify DC announcement before rolling and passive vs contested check determination
- Reduce 'Running the combat rounds' section from detailed multi-step procedures to concise bullet-point format covering player turns, enemy turns, and damage resolution
- Consolidate reaction handling from four separate detailed checkpoints into a single unified checkpoint flow with trigger list and key rules
- Remove extensive combat round format examples (Enemy Turn, Player Turn variations, Reaction examples) and replace with minimal template format
- Delete 'Contested Checks' section and move grapple/shove rules to 'Special Cases' as brief reference
- Remove 'Enemy Intelligence & Tactics' section entirely
- Remove 'Solo Combat Balance' section entirely
- Remove 'File Structure Awareness' section entirely
- Remove 'After Combat' section and 'Success Criteria' section
- Consolidate 'Critical Rules' from two long lists (ALWAYS/NEVER) into single concise bullet list
- Simplify action output formatting rules by removing redundant examples and consolidating guidance
- Add 'Special Cases' section with brief entries for contested checks, critical hits, and saves
- Reduce overall document from 549 lines to 228 lines while maintaining all essential combat mechanics and procedures
- Remove all `<example>` blocks from campaign-creator.md, character-updater.md, dm-state-logger.md, long-rest-handler.md, and npc-file-generator.md agent documentation
- Simplify agent descriptions to single-line format without examples in campaign-creator.md, character-updater.md, dm-state-logger.md, and long-rest-handler.md
- Change character-updater.md model from `sonnet` to `haiku`
- Change random-table-roller.md model from `sonnet` to `haiku`
- Remove example sections from random-table-roller.md documentation
- Streamline continue.md command to remove redundant resource loading step and consolidate campaign loading workflow
- Update save.md command to add character.md validation check and simplify NPC detection logic
- Add critical player intent rule to dice-rolling.md: player actions to understand/observe NPCs automatically trigger Insight checks without narration
- Expand dice-rolling.md with detailed examples of when Insight checks are required (watching reactions, reading body language, observing emotions)
- Clarify in dice-rolling.md that Insight vs Passive Score is the default for social skills unless NPC is actively suspicious
- Update CLAUDE.md to clarify character-updater triggers focus on loot/money/resources and remove redundant agent invocation details
- Add emphasis in CLAUDE.md that player actions trigger checks immediately without narration
- Expand Transaction Checkpoint section in CLAUDE.md with clearer trigger examples for character-updater invocation
- Rename `dm-state-logger` agent to `state-logger` with simplified description focused on STATE.md, daily logs, and quick-reference.md updates
- Add  FAST PATH workflows to `character-updater` and `long-rest-handler` agents for simple transactions (currency, single items, HP changes) requiring only 2-5 tool calls instead of full workflow
- Reorganize `campaign-creator` agent: consolidate Steps 4-6 into single "World-Building and Create Campaign File Structure" step, remove redundant JSON processing details, simplify NPC categorization from major/minor to enemies/allies/neutral based on PC relationship
- Update NPC file structure in `campaign-creator` and `npc-file-generator`: change from `npcs/major/` and `npcs/minor/` directories to `npcs/enemies/`, `npcs/allies/`, and `npcs/neutral/` with faction membership noted in Affiliation field rather than directory structure
- Simplify `character-updater` agent: remove extensive example workflows, consolidate to quick summary format, emphasize Fast Path for simple changes
- Reduce `long-rest-handler` agent documentation by ~25%: remove detailed edge cases section, consolidate D&D 5e rules to single reference table, simplify to core workflow only
- Update `bin/load-campaign-context` script to: load campaign.md as first section, include 4 core DM resources (game-feel, dice-rolling, play-flow, npc-management) with full contents, categorize additional files by type (enemies/allies/neutral NPCs, locations, plot, factions, setting)
- Update all random table scripts (`random-faction`, `random-loot`, `random-name`, `random-occupation`, `random-personality`, `random-quest`, `random-region`, `random-rumor`, `random-settlement`, `random-starting-scenario`, `random-weather`) to use `--json` flag with `bin/dice` and parse JSON output instead of text parsing
- Revise CLAUDE.md core instructions: remove detailed agent reference table, consolidate to essential triggers only, emphasize immediate agent invocation, clarify skill check triggers with explicit stop-and-roll guidance, remove redundant success criteria sections
- Enhance `dice-rolling.md` with anti-pattern examples showing WRONG vs CORRECT Insight check usage, clarify when to use Active vs Passive Insight, add explicit guidance on player intent triggering checks
- Update `game-feel.md` to reference `state-logger` instead of `dm-state-logger`, clarify agent invocation as part of good DMing
- Expand `play-flow.md` with explicit skill check trigger checklist before narrating outcomes, add reminder to announce DC before rolling
- Update `continue.md` command to optionally accept campaign name parameter, simplify campaign selection logic
- Remove redundant "Success Criteria" and "Integration with Other Agents" sections from agent documentation where they duplicate core instructions
- Create location-file-generator agent for documenting locations with dynamic scene tables and auto-detection of location types
- Simplify long-rest-handler agent to use bin/long-rest-prepare script for calculations, reducing agent to file I/O operations only
- Create bin/long-rest-prepare script to calculate resource restoration, call world progression, and output pre-formatted JSON text blocks
- Create bin/world-progression script to roll weather, check quest deadlines, roll faction actions, roll NPC actions, and check calendar events
- Create bin/generate-npc-stats script to generate complete D&D 5e stat blocks for NPCs with ability score generation and standard monster fallback
- Create bin/get-last-log script to fetch current day log path from campaign STATE.md
- Create bin/random-location script to roll on location scene tables with three-tier fallback (campaign-specific, global, direct path)
- Create bin/faction-turn script to roll faction actions on d20 faction-action table
- Create bin/check-deadlines script to roll quest consequences on d20 quest-consequence table
- Create bin/npc-action script to roll NPC goal pursuit on d6 with three-tier results
- Add location-dynamics.md documentation explaining dynamic location tables, roll triggers (on-visit/daily/manual), and scene table system
- Add world-progression.md documentation explaining faction clocks, quest deadlines, NPC actions, calendar events, and travel encounters
- Add long-rest-reference.md documentation with D&D 5e rest rules, edge cases, and technical implementation details
- Update CLAUDE.md to reference location-file-generator agent, location dynamics, and automated world progression systems
- Update long-rest-handler.md to use bin/long-rest-prepare script with JSON parsing and exact text block copying
- Update npc-file-generator.md to use bin/generate-npc-stats script and simplify to core responsibilities
- Update state-logger.md to handle location Recent Scenes updates and distinguish from long-rest-handler automated updates
- Update file-management.md to document automated long rest workflow, minimal output format, and world progression history section
- Update play-flow.md to add travel encounter tracking and location dynamic element rolling
- Update rest-long.md command to invoke long-rest-handler agent instead of manual workflow
- Update .claude/settings.json to allow new bin scripts: generate-npc-stats, get-last-log, long-rest-prepare, random-location, world-progression
- Create 8 location scene tables: location-tavern-scene.md, location-market-event.md, location-street-scene.md, location-docks-scene.md, location-temple-scene.md, location-wilderness-forest.md, location-wilderness-road.md, location-dungeon-encounter.md
- Create faction-action.md table with 20 faction action types for d20 rolls
- Create quest-consequence.md table with 20 quest failure consequences for d20 rolls
- Create npc-schedule-exception.md table with 20 reasons NPC isn't at expected location
- Update STATE.md template to include Factions section with progress clocks, Upcoming Events section, World Progression History section, Miles Traveled Today field, and quest deadlines
- Update character-sheet-dnd5e.md template to add Long Rest Quick Reference section for faster automation
- Update day-log.md template to use automated summary format and clarify event logging structure
- Create world-calendar.md template for scheduling world events that trigger during long rests
- Add Step 0: Resume Detection and Recovery to check for existing progress files and resume from last completed step
- Restructure campaign creation into 7 explicit steps with clear checkpoints and error handling for each step
- Implement progress file persistence in `campaigns/.progress/campaign-creator-[timestamp].json` to save user choices and generated data after Steps 1, 2, 3, and 5
- Add resume logic to skip completed steps and load previous answers when progress file exists
- Separate world-building (Step 4) from campaign naming (Step 5) and file creation (Step 6) into distinct phases
- Add Step 7: Verify and Return to Main Thread with mandatory Quality Assurance Checklist before completion
- Implement error handling for user cancellation (Escape key) at each step to save progress and allow graceful resumption
- Update Step 2 to support multiple ability score rolling methods via `bin/generate-ability-scores [method]` instead of only 4d6 drop-lowest
- Add world element connection logic in Step 4 to link NPCs to factions, rumors to NPCs/problems, and quests to world elements
- Expand Quality Assurance Checklist with mandatory verification items and explicit instruction that agent must not return until all checkboxes pass
- Add cleanup step to delete progress file upon successful completion
- Update `/new-campaign` command documentation to explain interruption/resume capability and progress file persistence
- Disable `alwaysThinkingEnabled` in settings.json (change from true to false)
- Update `bin/generate-ability-scores` to use default method '4d6-drop-lowest' when no argument provided and improve help flag handling
- Delete `.claude/agents/campaign-creator.md` agent definition (669 lines) - functionality moved to skill
- Create `.claude/skills/campaign-creator/SKILL.md` with streamlined skill definition emphasizing natural interaction, multi-page browsing for mechanical choices, and conversational flexibility
- Update `.claude/commands/new-campaign.md` to reference campaign-creator as a skill instead of agent, emphasizing natural interaction and flexible workflow over rigid forms and interruption handling
- Add `Skill(campaign-creator)` permission to `.claude/settings.json` permissions allow list
- Refactor `bin/generate-ability-scores` output format from pretty-printed JSON to single-line compact JSON with rolls array on separate lines for better parsing
- Update `resources/claude-dm/play-flow.md` to reference campaign-creator skill instead of agent in starting play section
- Restructure workflow from 7 steps to 8 steps with detailed substeps for each phase
- Replace individual setting questions with tabbed UI grouping: World Settings (4 tabs), Campaign Style (3 tabs), and conversational Character Flavor
- Add dedicated Step 2 for Class & Race selection using tabbed UI with 12-13 class options and 9 core race options, plus conditional subclass/subrace selection
- Expand ability score methods from 4 to 5 options, adding `5d6-drop-2` and clarifying custom method handling
- Add comprehensive 'Rules Reference Workflow' section detailing how to read and extract data from `rules/` directory for accurate character stat calculation
- Include detailed calculation reference sheet with formulas for HP, AC, initiative, proficiency bonus, skills, saving throws, attacks, and spellcasting
- Restructure Step 4 (formerly Step 3) Character Creation into 6 substeps: Background & Skills (tabbed), Starting Gear (paginated), Languages, Spells (for casters), Character Name, and Review
- Expand Step 5 World-Building to include: automated generation, JSON parsing with formatted presentation, internal element connections (NPCs to factions, rumors to NPCs, quests to world), and player review/iteration loop
- Add Step 6 Campaign Naming with uniqueness verification workflow
- Expand Step 7 File Creation (formerly Step 6) into 8 substeps (A-H) with detailed templates for each file type: character.md, campaign.md, STATE.md, quick-reference.md, NPC files, location files, and day logs
- Add mandatory Step 8 Verification with 5-part quality assurance checklist: folder structure verification, file content verification (with specific checks for each file), data accuracy double-checking, failure handling procedures, and completion message template
- Add detailed character.md template with sections for header, ability scores, combat stats, attacks, skills, saving throws, features, reactions (with emphasis on Opportunity Attacks + class/spell/racial reactions), equipment, spellcasting, and personality
- Add detailed campaign.md template with settings, world overview, factions with relationships, rumors with truth markers (DM secret), and quest hooks with twists (DM secret)
- Add detailed STATE.md template with time/location, character status, present NPCs, faction progress clocks, active quests, recent events, and immediate hooks
- Add detailed quick-reference.md template as player-facing summary without DM secrets
- Add NPC file creation workflow with category determination (allies/enemies/neutral based on faction relationships) and template structure
- Add starting location file template with settlement overview, problem, important NPCs, points of interest (tavern, shop, government, temple), and dynamic elements
- Add day log file template with time-of-day sections (Morning, Afternoon, Evening, Night) and summary
- Clarify that Reactions section in character.md MUST include: Opportunity Attacks (universal), class reactions, spell reactions (if applicable), and racial reactions (if applicable)
- Add emphasis on using `bin/generate-campaign-world` for parallel generation instead of individual random scripts
- Add detailed NPC assignment logic: distribute evenly across factions, match personality to faction type, assign rumors to NPCs based on personality fit
- Add quest connection logic: link to factions, NPCs, and settlement problem to create logical ties
- Add player review loop for world-building allowing regeneration of all elements, specific elements, or conversational customization
- Add comprehensive verification checklist with 40+ specific checks across folder structure, file contents, data accuracy, and connection validation
- Add failure handling procedures for verification: identify issues, fix immediately, re-run verification, repeat until all checks pass
- Add common fixes reference for verification failures (missing files, wrong stats, placeholder text, missing reactions, empty sections, unconnected rumors)
- Add completion message template showing campaign name, character details, world overview, factions, NPCs, quest opportunities, starting scenario, and next steps
- Clarify that campaign creation is complete only after Step 8 verification passes with all checks successful
- Add `list_rules_directories()` function to categorize and list rules directories with selective detail (detailed file listings for Gamemastering and Gameplay, file counts for Classes, Races, Spells, Equipment, Monsters, Treasure, and Characterizations)
- Add `list_random_tables()` function to retrieve available random table files from `resources/random-tables` directory
- Extend core DM resources list with three new files: `combat-mechanics.md`, `location-dynamics.md`, and `file-management.md`
- Add Rules Reference section to output that displays detailed file listings for Gamemastering and Gameplay directories, and summarized counts for other rules directories
- Add Random Tables section to output that lists all available random table files
- Change Step 1 world settings instruction from 'single question using tabs' to 'single question using SEPARATE tabs' for clarity
- Create faction-file-generator agent for documenting political organizations with goals, leadership, and relationships
- Expand bin/random-name script to support 10+ races with gender-specific names and auto-selection based on D&D demographics
- Add component-based location name generation (tavern, place, shop, blacksmith, magic-shop, apothecary) with 10,000+ combinations each
- Create 100-entry name tables for all D&D races: human, elf, dwarf, halfling, gnome, half-elf, half-orc, dragonborn, tiefling
- Add family/clan name tables for all races and optional dragonborn clan names
- Replace old flat name tables with prefix/suffix component tables for location names
- Update CLAUDE.md to invoke faction-file-generator for new factions with detailed descriptions
- Update location-file-generator documentation with expanded name generation command examples
- Update random-table-roller documentation to reflect new name generation capabilities
- Update file-management.md with comprehensive faction file workflow, creation triggers, and STATE.md integration
Updated CLAUDE.md with:
- 🛑 ENFORCEMENT header to make skill-check-enforcer triggers crystal clear
- "DO NOT generate narration text" instruction to prevent narrating uncertain outcomes
- Expanded RED FLAG PHRASES list with more trigger examples
- CRITICAL note about agent invocation being a HARD STOP to narrative flow

This addresses the issue where agents weren't being invoked because there was no
enforcement mechanism forcing me to stop and call them. Now the instructions are
explicit about STOPPING narration and invoking agents BEFORE generating any text
about uncertain skill-based outcomes.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
- Create `skill-check-enforcer.md` agent to intercept and enforce mechanical skill check workflow before narration
- Create `skill-check-workflow.md` template with standardized skill check procedures and common scenario examples
- Expand `dice-rolling.md` with detailed anti-patterns showing wrong vs correct skill check execution
- Add red flag phrase detection system ("You notice", "They seem", "You slip past", etc.) to prevent narration without rolling
- Reorganize `play-flow.md` to add mandatory skill check gate at step 4 before any outcome narration
- Document skill-to-DC mapping table with default DCs for all common skills
- Add critical success/failure outcomes (natural 20, beat DC by 5+, natural 1, fail by 5+) with examples
- Clarify Type 2 (Active vs Passive) skill checks for social interactions and observation
- Include transparency requirements: announce DC before rolling, show result in brackets, narrate after roll
- Replace multi-step check type determination with automatic skill extraction from DM message context
- Add smart mode (`/roll` without args) to parse recent DM messages for skill/save names
- Simplify workflow to focus on modifier lookup, dice execution, and transparent result display
- Remove DC determination logic and passive check calculations - defer to DM for outcome narration
- Add explicit support for advantage/disadvantage flags in arguments and context detection
- Clarify dice notation format and result display with examples showing d20 roll and total
- Remove day log update and outcome narration responsibilities from command scope
- Delete skill-check-enforcer agent (consolidated into CLAUDE.md core instructions)
- Simplify CLAUDE.md: Restructure as concise checklist with 'STOP AND ROLL' as primary focus, remove verbose explanations, consolidate agent triggers into single transaction checkpoint section
- Streamline dice-rolling.md: Remove 328 lines of detailed examples, consolidate to essential workflow (announce DC → roll → show result → narrate), keep only critical red flags and anti-patterns
- Condense game-feel.md: Remove 86 lines of verbose guidance, keep only radical brevity rules, narration boundaries, and agent invocation principles
- Simplify location-dynamics.md: Remove 176 lines of detailed examples and troubleshooting, consolidate to core concept, three-tier system, and quick reference
- Reduce npc-management.md: Remove 31 lines of verbose explanations, consolidate progressive information extraction into concise check system
- Update play-flow.md: Clarify skill check gate with inline DC format `[Skill (Ability +Bonus) DC X]` instead of separate announcement
- Update .claude/commands/roll.md: Add output behavior guidance (show only roll result in brackets when context is clear, ask for clarification when unclear), clarify narration workflow (DM narrates outcome after roll, not just showing number)
- Enable alwaysThinkingEnabled in settings.json for improved reasoning
- Update bin/load-campaign-context: Remove file-management.md from auto-loaded core DM resources (keep as reference-only material), add note clarifying which resources are loaded by default
- Delete dm-cheatsheet.md, improv-tips.md, session-zero.md, pacing-guide.md (reference materials not needed for core session flow)
- Remove `quick-reference.md` from core files; consolidate into `campaign.md` with DM Notes section
- Update CLAUDE.md to emphasize STATE.md as source of truth and load resources on-demand rather than at session start
- Modify `load-campaign-context` script to load only `game-feel.md` automatically; list other DM resources as available for reference
- Remove automatic loading of recent day logs; list all logs in Additional Files section instead
- Update README.md to remove `quick-reference.md` from file structure and clarify on-demand resource reading
- Update commands.md to reference `campaign.md` instead of `quick-reference.md` in `/new-campaign` and `/continue` responses
- Update file-management.md to consolidate `quick-reference.md` content into `campaign.md` and document location hierarchy conventions
- Update STATE.md template to include parent location field and remove `quick-reference.md` from pre-session checklist
- Update location templates to include parent location links for buildings and districts to prevent confusion
- Condense long-rest-handler.md workflow from 8 detailed steps to 6 concise bullet points
- Add TODOs section to long-rest-handler.md for validation, error handling, and faction edge cases
- Update CLAUDE.md to clarify relative path usage for bin scripts
- Make location optional in long-rest-prepare (handle None gracefully)
- Replace hardcoded log template generation with template file reading in long-rest-prepare
- Add `--dry-run` flag support to long-rest-prepare for testing
- Add `new_day_padded` field to JSON output for zero-padded filenames
- Rename `new_log_template` to `new_log_content` in JSON output
- Improve log summary generation to handle missing location
- Simplify world progression block formatting to single-line format per section
- Simplify character-updater agent: remove 75% of instructions, consolidate fast-path and complex workflows, eliminate interactive leveling details
- Reduce faction-file-generator model from sonnet to haiku
- Rewrite long-rest-handler: change from autonomous workflow to JSON file reader, remove bin/long-rest-prepare invocation
- Refactor state-logger: clarify input types, add JSON file path support for long-rest updates, remove quick-reference.md management
- Update rest-long command: invoke both long-rest-handler and state-logger in parallel with shared JSON file
- Expand long-rest-prepare script: add new log file creation with pre-filled state data, add dry-run support, add state_updates JSON field for agent consumption
- Simplify day-log.md template: remove 350+ lines of detailed sections, keep only header and summary placeholder
- Add Bash permissions: allow `cat` and `find` commands in settings.json
- Condense faction-file-generator.md: remove verbose explanations, consolidate workflow into concise steps, simplify template structure
- Condense location-file-generator.md: remove detailed edge cases, streamline dynamic location type detection, simplify random table usage
- Condense npc-file-generator.md: reduce stat generation explanation, simplify workflow, change model from sonnet to haiku
- Condense random-table-roller.md: remove extensive narrative explanations, consolidate script reference into compact list, simplify workflow
- Update CLAUDE.md: add long-rest-handler and random-table-roller to file update triggers, add available random tables reference, emphasize PAUSE GENERATION for agent invocation, clarify parallel agent invocation is required workflow, reorganize resource file locations
ks merged commit 95e1bb2d9a into main 2025-11-07 17:54:44 +00:00
ks referenced this pull request from a commit 2025-11-07 17:54:46 +00:00
Sign in to join this conversation.
No reviewers
No labels
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: ks/claude-dm#1
No description provided.