How werewolvesrevamped/werewolves-roles works
Project type and purpose
• This is a content-generation project for the “Werewolves Revamped” role book: essentially a static documentation/data generator.
• It ingests a large hierarchy of Markdown files (roles, rules, categories, info, prompts.json) and produces:
• A static website (http://werewolves.me/)
• Data files (JSON for the Werewolves Bot)
• A formatted role-book document
File structure
• Top-level content folders (each containing Markdown files):
• _categories – category headers/templates
• _rules – rule definitions
• _game – game data (abilities, displays, polls, teams, etc.)
• _info – informational messages/queries
• paths – lookup mappings for commands
• rules – detailed rule breakdowns
• archive, limited, extra, other, townsfolk, werewolves, unaligned, haunting – role definitions by grouping
• book – master order file driving TOC generation
• prompts.json – definitions of chatbot prompts
• website – static assets or site configuration
• No visible application code, but the README describes automated sync, pull-request workflow, query syntax, and book/site generation
README for additional insights
• “Book Generation” section describes how the “book” file and folder structure drive ordering
• “Auto Role Sync” ties folder conventions to bot data ingestion
• Query macro syntax (@Query;…;…@) is a lightweight template engine built into the generator
Main components
a. Content Repository
– GitHub repo managing all Markdown content (roles, rules, categories, info, prompts.json)
b. Build/Generation Engine
– A CLI script or tool (likely Node.js or similar) that:
• Reads the “book” file and directory hierarchy
• Applies category headers from “_categories”
• Parses queries (@Query;…;…@) and inline includes (@x path)
• Outputs:
– Static HTML/CSS/JS (into “website”) for the public role book site
– JSON payloads (e.g. prompts.json variants) consumed by Werewolves Bot
– A formatted role-book document (e.g. PDF or Doc export)
c. Query Engine Module
– Processes queries in info files, maps metadata (Team, Class, Category, Type) to content
d. Deployment Pipeline / CI
– GitHub Actions or similar that:
• Triggers on pull requests/merges
• Validates Markdown syntax, runs generation scripts
• Deploys static site (to GitHub Pages or Netlify)
• Publishes updated JSON data to the bot repo or a CDN
e. External Integrations
– Google Docs (for the master Role Book Document)
– Werewolves Bot repository (pulls JSON data)
Architectural patterns & design principles
• Content-first architecture: folder structure as canonical source
• Template engine for includes & queries (lightweight DSL)
• Separation of concerns: content vs. build scripts vs. output
• Convention over configuration: folder names drive category/role sync
• CI/CD for automated validation and deployment
Detail is critical
• Enumerate all major Markdown domains: roles, rules, game, info, prompts
• “book” file as the orchestrator of ordering
• Don’t shy away from listing sub-modules in the Build Engine (Include Resolver, Query Resolver, TOC Generator, JSON Serializer)