
Creator, simulation reviewer, and portable player toolchain for binary-choice card narratives.
Creator, simulation reviewer, and portable player toolchain for binary-choice card narratives.
English | 简体中文
ReignsAgent is a modular authoring, validation, and publishing stack for Reigns-like card narratives. It combines a creator workbench, a deterministic headless runtime, simulation-based diagnostics, content import/export tooling, and a deployable player build path.
The project is built for two primary audiences: creators who need a practical workspace for narrative card production, and AI-assisted workflows that need clear contracts for drafting, repairing, validating, and shipping content without crossing runtime boundaries.
ReignsAgent has two kinds of application. Creator is the authoring workspace used to make, inspect, test, and publish projects. Player is the deliberately smaller application that runs one published project and exposes only the left/right game experience. A Player build cannot edit its own content, run reviews, or connect to an AI endpoint.
Most release users should download a portable desktop Creator ZIP. The other clients exist for zero-install browser use, a system-Node workflow, development, and deployment-specific needs.
| Client | Best for | Installation and storage | Important trade-offs |
|---|---|---|---|
| Portable desktop Creator | Most creators; offline local work | Extract the platform ZIP and run ReignsAgent. No system Node.js or installer is required. ReignsAgentData stays beside the extracted application. |
Unsigned in v0.1.0; the operating system may show a warning. Keep the application and ReignsAgentData together when moving or backing it up. |
| Local Node Creator | Server-style local use and users who already have Node.js | Extract reigns-agent-.zip, install Node.js 22+, then run node start.mjs. It opens the Creator in the default browser and stores data beside the archive. |
A terminal process remains open while Creator is running. |
| Hosted PWA | Evaluation, Chromebook-style use, or a static deployment | Open the hosted URL in current Chrome or Edge. Projects are stored in origin-scoped browser storage and the app can reopen offline after a successful first load. | Clearing site data or changing the origin selects a different workspace. Export backups regularly. AI endpoints must support browser CORS and HTTPS. |
| Source checkout | Contributors and integrators | Run the Creator Server and Vite client from this repository. The default development workspace is .reigns-agent-data/. |
Requires Node.js 22+, npm dependencies, and two development processes. |
| Published Player | People playing a finished project | Open the exported Web Player or the project-specific Windows EXE supplied by its author. | It is intentionally not a Creator client and never contains Creator, Reviewer, Pipeline, endpoint settings, or credentials. |
The Creator overview is the hand-off point between project setup, card editing, review, preview, and release. The screenshots in this guide use the bundled Open Court sample and the Famicom skin; content and appearance are project/client choices.
The Releases page contains five Creator archives plus SHA256SUMS.txt:
| Download | Target | Start it after extraction |
|---|---|---|
ReignsAgent-win32-x64-.zip |
Windows 10/11 x64 | Run ReignsAgent.exe. |
ReignsAgent-darwin-arm64-.zip |
Apple Silicon macOS | Open ReignsAgent.app. |
ReignsAgent-darwin-x64-.zip |
Intel macOS | Open ReignsAgent.app. |
ReignsAgent-linux-x64-.zip |
Linux x64 | Run the ReignsAgent executable. |
reigns-agent-.zip |
Any platform with Node.js 22+ | Run node start.mjs; Windows also includes start.cmd, and macOS/Linux include start.sh. |
Do not run the application from inside the ZIP. Extract it into a writable directory first so the portable ReignsAgentData workspace can be created beside it. Desktop archives are unsigned: Windows SmartScreen, macOS Gatekeeper, or Linux desktop policy may ask you to confirm the first launch. The current release has no installer, automatic updater, code signing, or notarization.
Verify the downloaded archive before extraction:
# macOS/Linux, from the directory containing the ZIP and SHA256SUMS.txt
sha256sum -c SHA256SUMS.txt --ignore-missing# Windows PowerShell: compare the result with the matching SHA256SUMS.txt line
Get-FileHash .\ReignsAgent-win32-x64-0.1.0.zip -Algorithm SHA256The desktop Creator starts its shared local server automatically and opens /workbench inside the application window. The Node Creator prints its loopback address, normally http://127.0.0.1:4321/workbench, and opens that address in the default browser. Closing the desktop window stops its server; stop the Node Creator with Ctrl+C.
The onboarding guide is a 12-step, localized walkthrough of the actual Creator rather than a separate tutorial project. Its first screen explains the Reigns-style loop with an interactive left/right dilemma; the remaining spotlight steps move through the live workspace:
| Steps | What the guide introduces |
|---|---|
| Introduction | One card, two decisions, four gauges, story-state changes, and what ends a reign. |
| Project → Content → Story | Starting from a blank or cloned sample project, authoring binary choices, and reading tag-driven narrative structure. |
| Review → AI Assist | Reproducible simulation diagnostics and controlled, reviewable AI proposals. |
| Preview → Build → Player | Playing with the production rules, checking release readiness, and separating the player-only surface from Creator. |
| Settings → GitHub → Replay | Workspace preferences and persistence, project documentation, releases, issue tracking, and where to restart the tour. |
The guide starts automatically only on the first ordinary /workbench visit for the current client. An explicit deep link such as /workbench/content wins over onboarding so shared links remain deterministic. Completion is stored in guarded client-local storage: Finish, Skip, or Esc suppresses the next automatic launch, while unavailable or throwing localStorage falls back safely and does not block Creator startup.
Use the on-screen arrows, Left/Right, or Space to move between steps; Esc exits. The introductory card remains interactive, while later targets are highlighted without triggering editor, AI, Review, or Build actions. When the guide changes panels it restores the panel from which the tour began when closed, and it never changes projects or shared settings. Open Settings → Guidance → Replay onboarding guide at any time to start again immediately.
Use the Project menu in the top bar to choose one of these starting points:
The bundled sample itself is immutable; New from sample creates an ordinary editable copy. The title shown in the top bar and releases comes from content.json.metadata.title, while author, description, links, version, localization, and gauge presentation remain project-authored metadata.
The numbered rail is ordered as a practical production loop. You can move freely between panels, but a first project is easiest to understand in this order.
Open Content to import a bundle, search and filter the deck, add or select a card, and edit the dilemma text. Every playable card has exactly one left choice and one right choice. Choice effects can change the four gauge slots and set author-owned tags or variables; requirements decide when a card is eligible. Use the author summary above the fields to inspect the current gate and both outcomes before changing low-level values.
Save actions validate the edited shape before it becomes the current project state. A card marked player-ready satisfies the Player contract; invalid cards remain visible to the author but block a release. Use assets relative to the project, and confirm art bindings in Preview rather than relying on a file name alone.
Open Story after the first branch exists. The graph projects card-to-card possibilities from requirements and effects; its summary distinguishes reachable, unreachable, and isolated cards. Story groups can label chapters, themes, arcs, or endings without adding built-in gameplay systems. Click a graph node to return to its card, filter by a story group to isolate a thread, and rename tags carefully because they connect authored state across multiple cards.
Graph reachability is structural. It tells you whether a path can exist, not how often a player will see it. Review adds simulation evidence: run it after meaningful content changes, then inspect coverage, pacing, endings, dead paths, gauge pressure, and story-group health. Review findings are diagnostics, not automatic edits; return to Content or Story to make deliberate changes and rerun the review.
AI Assist is an optional Creator-side collaboration layer, not an autonomous author and not part of the game runtime. Turning on the AI control exposes contextual actions around the current Overview, card, Story selection, or Review finding. Without an endpoint it can still assemble and preview a local request plan; with a configured endpoint it executes that plan and returns proposals for inspection.
| Workflow | Input and result |
|---|---|
| Project or card drafting | Combines the current project snapshot with a premise, tone, branch depth, ending goal, constraints, target card, and requested card count. The endpoint returns explicit patch proposals rather than a replacement project. |
| Review repair | Requires a completed Review result, targets the selected diagnostic and affected cards, and proposes the smallest relevant repair. Rerun Review after applying changes to measure the result. |
| Context actions | Explain, translate, or branch from the selected card/graph context while preserving ids, tags, variables, and left/right meaning unless the instruction explicitly changes them. |
| Visual generation | Generate new art or, when the chosen adapter supports it, use reference images, edit, inpaint, outpaint, masks, aspect ratios, negative prompts, and multiple output candidates. Results remain binary drafts until applied. |
Text endpoint configuration lives under **Settings → A
No open issues yet, or sync has not completed.