judokon-architecture-guardian
Enforces JU-DO-KON! architectural boundaries, module responsibilities, and design intent. Use when designing, refactoring, or reviewing core game logic.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Skill Instructions
This skill ensures that all changes respect the established JU-DO-KON! architecture.
Inputs / Outputs / Non-goals
- Inputs: PRD sections, architecture docs, core engine/UI modules, refactor diffs.
- Outputs: boundary-compliant change guidance, module placement advice, risk callouts.
- Non-goals: redesigning architecture or altering public APIs without approval.
What this skill helps accomplish
- Prevent architectural drift
- Maintain separation of concerns
- Preserve the Battle Engine mental model
- Ensure UI, engine, and data layers remain decoupled
When to use this skill
- Adding new game modes
- Refactoring battle logic
- Modifying state machines
- Reviewing AI-generated code for correctness
Core architectural rules (must follow)
-
Battle Engine owns rules and outcomes
- No game rules in UI components
- No DOM access inside engine logic
-
UI is reactive, not authoritative
- UI reads state, never mutates it directly
-
JSON is the source of truth
- Battle states, judoka data, and configuration live in JSON
-
Facades define boundaries
- External callers interact through facades, not internals
-
Feature flags gate behaviour
- Experimental logic must be flag-protected
Boundary examples
- UI can render a timer display; engine computes timer state and transitions.
- UI reads state from facades; engine never imports or touches DOM helpers.
Anti-patterns (must avoid)
- Business logic inside rendering functions
- Implicit coupling between UI and engine internals
- Duplicated rule definitions across files
Check yourself
- No dynamic imports in hot paths (
src/helpers/classicBattle*,src/helpers/battleEngineFacade.js). - Engine logic has no DOM access; UI does not own rules.
- New logic behind flags when experimental.
Expected output
- Clear explanation of where changes belong
- Suggested module placement
- Warnings when boundaries are crossed
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-26
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!