원클릭으로
project-architecture-maintenance
Guide for maintaining the modular structure, script order, and global module patterns.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Guide for maintaining the modular structure, script order, and global module patterns.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Guide for maintaining and adding new battle animations, focusing on specific sequence timing (Entry, Hits, Faints) and the data-driven Animation Framework.
Guide for adding new moves, items, or mechanics to the modular Pokemon Battle system.
Learn how to use the DialogManager system to display text, ask questions, and manage user interactions in the game.
Guide for creating new screens and managing transitions using the ScreenManager framework.
Guidelines for maintaining visual consistency across the UI, based on the Summary Screen reference.
| name | Project Architecture & Maintenance |
| description | Guide for maintaining the modular structure, script order, and global module patterns. |
This project uses a "No-Bundler" modular approach. Modules are defined as global objects and loaded sequentially via script tags in Pokemon.html.
All modules must follow the singleton object pattern:
const ModuleName = {
// State
stateVar: null,
// Methods
init() { ... },
doSomething() { ... }
};
export or import (Browser support for modules is not currently used to avoid CORS/Server issues for local files).constants.js.The order in Pokemon.html is strictly enforced. When adding a new file, place it in the correct category:
utils.js, constants.js, settings.js.audio.js, api.js, storage.js, logger.js, screen_manager.js, dialog_manager.js.items.js, moves.js, debug.js.mechanics.js, effects.js, moves_engine.js, capture.js.ui.js, menus.js.js/anim/): anim_framework.js → anim_registry.js → animations.js.
party.js, summary.js, selection.js, menus.js (PackScreen).rage_manager.js, turn_manager.js, battle.js, game.js.Rule: If Module A calls Module B, Module B MUST be loaded before Module A in the HTML file.
Since everything is global, you can call Battle.someMethod() from TurnManager.js.
Battle).js/core/, js/ui/, js/anim/, js/systems/, etc.Pokemon.html in the correct prioritized section.CSS is split into modular files loaded in order in Pokemon.html:
base.css → Variables, body, game containerutils.css → Utility classes, focus states, scrollbarsscreens.css → Start, Name, Continue screensselection.css, summary.css, party.css, pack.css → Individual screen stylesbattle.css → Battle scene, HUD, dialog, menusanimations.css → All @keyframes and .anim-*/.fx-* classes (covers all 18 types)explosion.css → Explosion-specific FX (@keyframes screenShake, .fx-explosion) — still needed, the animation framework applies these CSS classes but doesn't generate themNew @keyframes always go in animations.css. New screen styles get their own file.
To maintain the project's complex modular structure without a bundler, we use JSDoc Typedefs and jsconfig.json.
jsconfig.jsonLocated in the root, this file enables project-wide IntelliSense. It tells VS Code that all scripts in js/ share a global scope, despite being in separate files.
js/types.jsCentral registry of types. Contains:
Pokemon: Full data structure for Pokémon objects.BattleEngine: The main orchestrator methods.AnimationEngine / AnimStep: Complete typing for the data-driven animation framework.MoveEntry / ItemEntry: Structures for move and item databases.Rule: When creating new complex objects or framework steps, update types.js to preserve autocomplete across the project.