ttnhan18062000/rpg-based-simulation
Large-scale, detailed fantasy world simulation engine in Python: autonomous entities with strategic cognition, social interaction, economy, and world evolution. Built with an AI-first, multi-agent development workflow.
ARCHETYPE
Fort Knox
Deny lists, pre-tool hooks, sandboxing. Nothing touches prod without a signature.
GUARDRAILS
4/5
Blocks destructive commands · Pre-tool screening hook · No YOLO mode · Sandbox or ask-first rules · details
Copy this rig
# review before running: this installs third-party code $ claude mcp add github -- docker run -i --rm --env-file .env ghcr.io/github/github-mcp-server $ npx degit ttnhan18062000/rpg-based-simulation/.claude ./rig-rpg-based-simulation # inspect, then merge into .claude/
MCP servers are added to Claude Code at local scope; env vars are shown as YOUR_… placeholders — we never store values. Files are fetched with degit into a separate folder so you can review before merging.
$ claude mcp add github -- docker run -i --rm --env-file .env ghcr.io/github/github-mcp-server $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/agent-monitoring-retro .claude/skills/agent-monitoring-retro $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/api-design-principles .claude/skills/api-design-principles $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/architecture .claude/skills/architecture $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/backend-testing .claude/skills/backend-testing $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/brainstorming .claude/skills/brainstorming $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/code-craft .claude/skills/code-craft $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/cognition-strategy .claude/skills/cognition-strategy $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/combat-mechanics .claude/skills/combat-mechanics $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/create-tickets .claude/skills/create-tickets $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/debugging-strategies .claude/skills/debugging-strategies $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/doc-coauthoring .claude/skills/doc-coauthoring $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/frontend-design .claude/skills/frontend-design $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/implement-epic .claude/skills/implement-epic $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/implement-ticket .claude/skills/implement-ticket $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/observability .claude/skills/observability $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/progression-entities .claude/skills/progression-entities $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/prompt-builder .claude/skills/prompt-builder $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/python-performance-optimization .claude/skills/python-performance-optimization $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/python-testing-patterns .claude/skills/python-testing-patterns $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/simq-audit .claude/skills/simq-audit $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/simq-dev .claude/skills/simq-dev $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/systems-economy .claude/skills/systems-economy $ npx degit ttnhan18062000/rpg-based-simulation/.agents/skills/test-driven-development .claude/skills/test-driven-development
$ curl -fsSL --create-dirs -o .claude/agents/architecture-reviewer.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/architecture-reviewer.md $ curl -fsSL --create-dirs -o .claude/agents/concern-investigator.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/concern-investigator.md $ curl -fsSL --create-dirs -o .claude/agents/doc-updater.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/doc-updater.md $ curl -fsSL --create-dirs -o .claude/agents/done-checker.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/done-checker.md $ curl -fsSL --create-dirs -o .claude/agents/implementer.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/implementer.md $ curl -fsSL --create-dirs -o .claude/agents/investigator.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/investigator.md $ curl -fsSL --create-dirs -o .claude/agents/mechanics-auditor.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/mechanics-auditor.md $ curl -fsSL --create-dirs -o .claude/agents/parity-updater.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/parity-updater.md $ curl -fsSL --create-dirs -o .claude/agents/planner.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/planner.md $ curl -fsSL --create-dirs -o .claude/agents/security-reviewer.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/security-reviewer.md $ curl -fsSL --create-dirs -o .claude/agents/session-agent-working-designer.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/session-agent-working-designer.md $ curl -fsSL --create-dirs -o .claude/agents/session-agent-working-implementer.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/session-agent-working-implementer.md $ curl -fsSL --create-dirs -o .claude/agents/session-agent-working-planner.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/session-agent-working-planner.md $ curl -fsSL --create-dirs -o .claude/agents/session-codebase-designer.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/session-codebase-designer.md $ curl -fsSL --create-dirs -o .claude/agents/session-codebase-implementer.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/session-codebase-implementer.md $ curl -fsSL --create-dirs -o .claude/agents/session-codebase-planner.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/session-codebase-planner.md $ curl -fsSL --create-dirs -o .claude/agents/session-rpg-designer.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/session-rpg-designer.md $ curl -fsSL --create-dirs -o .claude/agents/session-rpg-implementer.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/session-rpg-implementer.md $ curl -fsSL --create-dirs -o .claude/agents/session-rpg-planner.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/session-rpg-planner.md $ curl -fsSL --create-dirs -o .claude/agents/session-testing-designer.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/session-testing-designer.md $ curl -fsSL --create-dirs -o .claude/agents/session-testing-implementer.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/session-testing-implementer.md $ curl -fsSL --create-dirs -o .claude/agents/session-testing-planner.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/session-testing-planner.md $ curl -fsSL --create-dirs -o .claude/agents/simulation-analyst.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/simulation-analyst.md $ curl -fsSL --create-dirs -o .claude/agents/spec-document-reviewer.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/spec-document-reviewer.md $ curl -fsSL --create-dirs -o .claude/agents/test-scoper.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/test-scoper.md $ curl -fsSL --create-dirs -o .claude/agents/ticket-scoper.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/ticket-scoper.md $ curl -fsSL --create-dirs -o .claude/agents/world-debugger.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/world-debugger.md $ curl -fsSL --create-dirs -o .claude/agents/world-render-reviewer.md https://raw.githubusercontent.com/ttnhan18062000/rpg-based-simulation/main/.claude/agents/world-render-reviewer.md
Merge into .claude/settings.json (project) or ~/.claude/settings.json (user). Hook commands reference scripts in the source repo — copy those too.
{
"permissions": {
"deny": [
"Bash(gh pr merge*--admin*)"
],
"ask": [
"Bash(gh pr merge *)",
"Bash(git push --delete *)",
"Bash(git push * --delete *)",
"Bash(gh api -X DELETE *)",
"Bash(gh api --method DELETE *)",
"Bash(git worktree remove *)",
"Bash(rm *agent-working/agent-monitoring/*)",
"Workflow"
]
},
"hooks": {
"PreToolUse": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "R=$(git rev-parse --show-toplevel 2>/dev/null) || exit 0; test -f \"$R/tools/agent-monitoring/pre_tool_hook.py\" || exit 0; cd \"$R\" && python3 tools/agent-monitoring/pre_tool_hook.py 2>/dev/null || true"
}
]
},
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "CMD=$(python3 -c \"import json,sys; d=json.load(sys.stdin); print(d.get('tool_input',d).get('command',''))\" 2>/dev/null || true); case \"$CMD\" in *grep*|*rg\\ *|*ripgrep*|*find\\ *|*fd\\ *|*ack\\ *|*ag\\ *) if [ -f graphify-out/graph.json ]; then "
},
{
"type": "command",
"command": "python3 -c \"import json,sys\ntry:\n from tools.write_path_guard import scan_for_secrets\n d=json.load(sys.stdin)\n m=scan_for_secrets(d.get('tool_input',d).get('command',''))\n if m: print(json.dumps({'hookSpecificOutput':{'hookEvent"
},
{
"type": "command",
"command": "R=$(git rev-parse --show-toplevel 2>/dev/null) || exit 0; test -f \"$R/tools/agent-monitoring/cd_prefix_advisory_hook.py\" || exit 0; cd \"$R\" && python3 tools/agent-monitoring/cd_prefix_advisory_hook.py 2>/dev/null || true"
},
{
"type": "command",
"command": "python3 tools/delivery/pre_push_advisory_hook.py 2>/dev/null || true"
}
]
},
{
"matcher": "Agent",
"hooks": [
{
"type": "command",
"command": "DESC=$(python3 -c \"import json,sys; d=json.load(sys.stdin); i=d.get('tool_input',{}); print(i.get('description','') + ' ' + i.get('prompt',''))\" 2>/dev/null || true); case \"$DESC\" in *invest*|*search*|*find*|*explor*|*locat*|*grep*|*where*|"
}
]
},
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "FILE=$(python3 -c \"import json,sys; d=json.load(sys.stdin); print(d.get('tool_input',d).get('file_path',''))\" 2>/dev/null || true); case \"$FILE\" in */agent-working/tickets/*|*/agent-working/staging_artifacts/*|*/src/*|*/tests/*|*/docs/*) if"
}
]
},
{
"matcher": "Bash|Edit|Write|MultiEdit|NotebookEdit|SendMessage",
"hooks": [
{
"type": "command",
"command": "R=$(git rev-parse --show-toplevel 2>/dev/null) || exit 0; test -f \"$R/tools/sessions/guard.py\" || exit 0; python3 \"$R/tools/sessions/guard.py\""
}
]
}
]
}
} MCP servers (4)
| server | source | est. tokens |
|---|---|---|
| knowledge-search | local / custom | 2.5k |
| GitHub MCP · "github" | docker | 18.0k |
| headroom | local / custom | 2.5k |
| aseprite-pixel-art | local / custom | 2.5k |
Skills (23)
agent-monitoring-retroapi-design-principlesarchitecturebackend-testingbrainstormingcode-craftcognition-strategycombat-mechanicscreate-ticketsdebugging-strategiesdoc-coauthoringfrontend-designimplement-epicimplement-ticketobservabilityprogression-entitiesprompt-builderpython-performance-optimizationpython-testing-patternssimq-auditsimq-devsystems-economytest-driven-development
Subagents (28)
| architecture-reviewer | Validates an implementation plan (pre-Implement) or a diff (post-Implement Architecture-Verify) against the project's durable-state, API-boundary, registry, and Mechanics Bible/engine-contract rules b |
| concern-investigator | Given a proposal concern (not yet a ticket), investigates the codebase via search_docs → graphify → registry → working_log ordering and returns structured JSON findings for create-tickets.js's Structu |
| doc-updater | After a behavior change is implemented, updates the relevant docs/ files (outside parity_ledger/, audits/, archive/, scenarios/, entity/) to reflect the new state. |
| done-checker | Verifies all 13 Definition-of-Done conditions for a ticket before it can move to agent-working/tickets/done/, citing the static pre-check script for the five script-checkable conditions. |
| implementer | Writes the code changes described in an approved plan.md, following the project's durable-state and API-boundary architecture constraints exactly. |
| investigator | Given a ticket, digs into the affected codebase and produces the two mandatory pre-implementation artifacts, investigation.md and test_plan.md. |
| mechanics-auditor | Compares a Mechanics Bible chapter to the actual source implementation and reports PARITY/DIVERGENT/MISSING/UNDOCUMENTED findings. |
| parity-updater | After a behavior change is implemented, updates the relevant YAML entries in docs/parity_ledger/ to reflect the new state. |
| planner | Given a ticket and investigation findings, produces plan.md — the ordered, implementer-ready implementation spec with scope guards and an acceptance-criteria map. |
| security-reviewer | Given implemented code changes on a security-tagged ticket, reviews the diff for injection, unsafe deserialization, path traversal, secrets-in-code, and raw-domain-model exposure before Verify. |
| session-agent-working-designer | Launcher-only session role card for agent-working-designer. Never spawn this as a subagent: it is the main-session definition used by `--agent`. |
| session-agent-working-implementer | Launcher-only session role card for agent-working-implementer. Never spawn this as a subagent: it is the main-session definition used by `--agent`. |
| session-agent-working-planner | Launcher-only session role card for agent-working-planner. Never spawn this as a subagent: it is the main-session definition used by `--agent`. |
| session-codebase-designer | Launcher-only session role card for codebase-designer. Never spawn this as a subagent: it is the main-session definition used by `--agent`. |
| session-codebase-implementer | Launcher-only session role card for codebase-implementer. Never spawn this as a subagent: it is the main-session definition used by `--agent`. |
| session-codebase-planner | Launcher-only session role card for codebase-planner. Never spawn this as a subagent: it is the main-session definition used by `--agent`. |
| session-rpg-designer | Launcher-only session role card for rpg-designer. Never spawn this as a subagent: it is the main-session definition used by `--agent`. |
| session-rpg-implementer | Launcher-only session role card for rpg-implementer. Never spawn this as a subagent: it is the main-session definition used by `--agent`. |
| session-rpg-planner | Launcher-only session role card for rpg-planner. Never spawn this as a subagent: it is the main-session definition used by `--agent`. |
| session-testing-designer | Launcher-only session role card for testing-designer. Never spawn this as a subagent: it is the main-session definition used by `--agent`. |
| session-testing-implementer | Launcher-only session role card for testing-implementer. Never spawn this as a subagent: it is the main-session definition used by `--agent`. |
| session-testing-planner | Launcher-only session role card for testing-planner. Never spawn this as a subagent: it is the main-session definition used by `--agent`. |
| simulation-analyst | Lightweight single-pass analysis of a completed simulation run against Mechanics Bible ranges — spots anomalies and classifies severity; escalate CRITICAL findings to the investigate-simulation-result |
| spec-document-reviewer | Reviews a written design spec for completeness, internal consistency, clarity, scope focus, and YAGNI violations before implementation planning begins. |
| test-scoper | Given a set of changed files, maps them to relevant existing tests, builds and runs the correct scoped pytest command, and reports pass/fail counts and coverage gaps. |
| ticket-scoper | Given a request description, produces a complete correctly-formatted ticket and flags any conflicts (duplicate work, mechanics constraints, parity overlap) before implementation begins. |
| world-debugger | Given a failure symptom in world assembly, worldbuilding, worldmodules, worldgeneration, content resolution, or the core registries, traces the authoritative pipeline to find the root cause. |
| world-render-reviewer | Tiered visual/geometric quality review of a rendered world state — Tier 0 pure-data scoring by default, escalating to the annotated/gridlined render only when Tier 0/1 flags an anomaly. Cites tile coo |
Hooks (16)
| event | matcher | runs |
|---|---|---|
| PreToolUse | * | R=$(git rev-parse --show-toplevel 2>/dev/null) || exit 0; test -f "$R/tools/agent-monitoring/pre_tool_hook.py" || exit 0; cd "$R" && python3 tools/agent-monitoring/pre_tool_hook.py 2>/dev/null || true |
| PreToolUse | Bash | CMD=$(python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('tool_input',d).get('command',''))" 2>/dev/null || true); case "$CMD" in *grep*|*rg\ *|*ripgrep*|*find\ *|*fd\ *|*ack\ *|*ag\ *) if [ -f graphify-out/graph.json ]; then |
| PreToolUse | Agent | DESC=$(python3 -c "import json,sys; d=json.load(sys.stdin); i=d.get('tool_input',{}); print(i.get('description','') + ' ' + i.get('prompt',''))" 2>/dev/null || true); case "$DESC" in *invest*|*search*|*find*|*explor*|*locat*|*grep*|*where*| |
| PreToolUse | Edit|Write | FILE=$(python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('tool_input',d).get('file_path',''))" 2>/dev/null || true); case "$FILE" in */agent-working/tickets/*|*/agent-working/staging_artifacts/*|*/src/*|*/tests/*|*/docs/*) if |
| PreToolUse | Bash | python3 -c "import json,sys try: from tools.write_path_guard import scan_for_secrets d=json.load(sys.stdin) m=scan_for_secrets(d.get('tool_input',d).get('command','')) if m: print(json.dumps({'hookSpecificOutput':{'hookEvent |
| PreToolUse | Bash | R=$(git rev-parse --show-toplevel 2>/dev/null) || exit 0; test -f "$R/tools/agent-monitoring/cd_prefix_advisory_hook.py" || exit 0; cd "$R" && python3 tools/agent-monitoring/cd_prefix_advisory_hook.py 2>/dev/null || true |
| PreToolUse | Bash | python3 tools/delivery/pre_push_advisory_hook.py 2>/dev/null || true |
| PreToolUse | Bash|Edit|Write|MultiEdit|NotebookEdit|SendMessage | R=$(git rev-parse --show-toplevel 2>/dev/null) || exit 0; test -f "$R/tools/sessions/guard.py" || exit 0; python3 "$R/tools/sessions/guard.py" |
| PostToolUse | * | R=$(git rev-parse --show-toplevel 2>/dev/null) || exit 0; test -f "$R/tools/agent-monitoring/post_tool_hook.py" || exit 0; cd "$R" && python3 tools/agent-monitoring/post_tool_hook.py 2>/dev/null || true |
| PostToolUse | Edit|Write|MultiEdit | FILE=$(python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('tool_input',d).get('file_path',''))" 2>/dev/null || true); case "$FILE" in */src/*|*/tests/*) [ -f graphify-out/graph.json ] && graphify update . 2>/dev/null || true ; |
| PostToolUse | * | R=$(git rev-parse --show-toplevel 2>/dev/null) || exit 0; test -f "$R/tools/agent-monitoring/retro_nudge_hook.py" || exit 0; cd "$R" && python3 tools/agent-monitoring/retro_nudge_hook.py 2>/dev/null || true |
| PostToolUse | * | R=$(git rev-parse --show-toplevel 2>/dev/null) || exit 0; test -f "$R/tools/agent-monitoring/epic_staleness_check.py" || exit 0; cd "$R" && python3 tools/agent-monitoring/epic_staleness_check.py --hook 2>/dev/null || true |
| PostToolUse | Edit|Write|MultiEdit | python3 -m codebase.hooks.edit_ratchet_hook 2>/dev/null || true |
| SubagentStop | * | python3 tools/agent-monitoring/subagent_stop_background_guard.py |
| UserPromptSubmit | * | R=$(git rev-parse --show-toplevel 2>/dev/null) || exit 0; test -f "$R/tools/agent-monitoring/manual_actions.py" || exit 0; python3 "$R/tools/agent-monitoring/manual_actions.py" hook 2>/dev/null || true |
| SessionStart | * | python3 tools/sessions/session_start_hook.py 2>/dev/null || true |
Permissions
deny (1)
Bash(gh pr merge*--admin*)
ask (8)
Bash(gh pr merge *)
Bash(git push --delete *)
Bash(git push * --delete *)
Bash(gh api -X DELETE *)
Bash(gh api --method DELETE *)
Bash(git worktree remove *)
Bash(rm *agent-working/agent-monitoring/*)
Workflow
allow (49)
Write
Edit
mcp__knowledge-search__search_docs
mcp__knowledge-search__search_health
Bash(git *)
Bash(grep *)
Bash(find *)
Bash(sed *)
Bash(awk *)
Bash(mkdir *)
Bash(mv *)
Bash(rm *)
Bash(cp *)
Bash(ln *)
Bash(ls *)
Bash(cat *)
Bash(head *)
Bash(tail *)
Bash(echo *)
Bash(sort *)
Bash(xargs *)
Bash(wc *)
Bash(python3 *)
Bash(python *)
Bash(/usr/bin/python3 *)
Bash(.venv/bin/python3 *)
Bash(~/Work/rpg-based-simulation/.venv/bin/python3 *)
Bash(~/Work/venv/bin/python3 *)
Bash(uv run *)
Bash(uv *)
Bash(pytest *)
Bash(pip *)
Bash(pip3 *)
Bash(make *)
Bash(graphify *)
Bash(npm *)
Bash(node *)
Bash(npx *)
Bash(nohup *)
Bash(curl *)
Bash(tmux *)
Bash(pkill *)
Bash(docker *)
Bash(timeout *)
Bash(gh pr create *)
Bash(rm -rf data/runs*)
Bash(rm -rf reports/release_proof*)
Bash(rm -rf data/runs/*)
Bash(rm -rf reports/release_proof/*)
Similar rigs
mitchmolstad/claude-spark
Project template for Claude Code. Keep building useful stuff as things get complex through smart scaffolding and memory-that-matters. Persistent memory across sessions via structured documentation and skills.
Skill Collector 20.9k tok ·
Matheuscara/claude-code
🤖 Config do meu Claude Code para homelab: regras, hooks de segurança, subagentes, skills, commands e instincts (cherry-pick inspirado no ECC)
Pragmatist 1.6k tok ·
orynvn/claude-workspace-setup
A project template for Claude Code CLI — opinionated, token-efficient, and built for multi-agent workflows.
Orchestrator 22.3k tok ·
Yuutokata/claude-code-setup
🔄 One Claude Code setup for my desktop and MacBook, synced through git, with guardrails that keep secrets out.
Fort Knox 1.1k tok ·