### Setup and Run Construct 3 Copilot Source: https://github.com/xhxiaiein/construct3-copilot/blob/main/README.md Commands to clone the repository, install dependencies, start the required RAG and clipboard services, and launch the Copilot. ```bash # 1. Clone Copilot git clone https://github.com/XHXIAIEIN/Construct3-Copilot.git cd Construct3-Copilot # 2. Auto-clone all dependencies + install pip packages bash .claude/plugins/construct3-copilot/scripts/infra/setup.sh # 3. Start services (each in its own terminal) cd ../Construct3-RAG && python src/api.py cd ../Construct3-Clipboard && python src/api.py # 4. Run Copilot cd ../Construct3-Copilot && claude ``` -------------------------------- ### Usage Examples for Construct 3 Copilot Source: https://github.com/xhxiaiein/construct3-copilot/blob/main/README.md Examples of natural language prompts and the corresponding AI-generated output types. ```text > Create a breakout game, paddle follows mouse AI generates: - layout.json → Paste to: Project Bar → Layouts - events.json → Paste to: Event sheet margin ``` ```text > Add WASD 8-direction movement controls AI generates events JSON → Paste to: Event sheet margin ``` ```text > Add a pause feature, press ESC to pause AI generates events JSON → Paste to: Existing event sheet ``` -------------------------------- ### Explain Behavior in RAG Source: https://context7.com/xhxiaiein/construct3-copilot/llms.txt Query the RAG service to get explanations for Construct 3 behaviors, including their properties. This is useful for understanding how to implement specific game mechanics. ```bash # Explain a behavior python3 scripts/query/rag.py search "8direction behavior properties" ``` -------------------------------- ### Correct ACE ID and Parameter Formatting Source: https://context7.com/xhxiaiein/construct3-copilot/llms.txt Examples of correct ACE IDs, behavior types, and parameter structures to avoid common hallucination traps. ```javascript // WRONG (does not exist) // CORRECT (actual ID) "set-angle-toward-position" -> "set-angle" + "angle(x1,y1,x2,y2)" expression "move-toward" -> MoveTo behavior or manual displacement "EightDir" -> "8Direction" (use display name for behaviorType) "set-speed" (8Direction) -> "set-max-speed" "on-click" (no params) -> "on-click" requires "mouse-button" parameter "toggle-boolean" -> "toggle-boolean-eventvar" "compare-boolean" -> "compare-boolean-eventvar" "add-to" -> "add-to-eventvar" // Example of correct behavior action { "id": "simulate-control", "objectClass": "Player", "behaviorType": "8Direction", // Use display name, not "EightDir" "parameters": {"control": "up"} } // Key codes are numbers {"key": 32} // Space {"key": 87} // W {"key": 65} // A {"key": 37} // Left arrow {"key": 39} // Right arrow // Comparison operators are numbers // 0=eq, 1=neq, 2=lt, 3=lte, 4=gt, 5=gte {"comparison": 0, "value": "100"} // equals 100 ``` -------------------------------- ### Get Information on Addon Types Source: https://context7.com/xhxiaiein/construct3-copilot/llms.txt Query the RAG service, specifying multiple collections like 'addon_sdk' and 'scripting', to compare different addon types, such as the difference between behaviors and plugins. ```bash # Get information about addon types python3 scripts/query/rag.py search "behavior vs plugin difference" --collections addon_sdk,scripting ``` -------------------------------- ### Run Full JSON Health Report Source: https://context7.com/xhxiaiein/construct3-copilot/llms.txt Execute the health check script to get a full JSON report of service status. This is useful for detailed monitoring. ```bash python3 scripts/infra/health.py ``` -------------------------------- ### Enhance welcome.sh for Project Memory Source: https://github.com/xhxiaiein/construct3-copilot/blob/main/docs/superpowers/plans/2026-04-07-memory-module.md Initializes the project memory loading logic within the welcome script. ```bash # 3b. Project memory (if .c3proj found) C3PROJ="" ``` -------------------------------- ### Search Addon SDK Documentation Source: https://context7.com/xhxiaiein/construct3-copilot/llms.txt Use the RAG service with the 'addon_sdk' collection to search for documentation related to creating custom plugins and behaviors for Construct 3. ```bash # Search addon SDK documentation python3 scripts/query/rag.py search "create custom behavior" --collections addon_sdk ``` -------------------------------- ### Search SDK Documentation for ACE Definition Source: https://context7.com/xhxiaiein/construct3-copilot/llms.txt Use the RAG service with the 'addon_sdk' collection to find documentation on how to define Actions, Conditions, and Expressions (ACEs) in the 'aces.json' file for Construct 3 addons. ```bash # Search SDK documentation python3 scripts/query/rag.py search "plugin instance lifecycle" --collections addon_sdk python3 scripts/query/rag.py search "define ACE in aces.json" --collections addon_sdk ``` -------------------------------- ### Search SDK Documentation for Patterns Source: https://context7.com/xhxiaiein/construct3-copilot/llms.txt Use the RAG service with the 'addon_sdk' collection to search for specific patterns or methods within the Construct 3 Addon SDK documentation, such as 'IWorldInstance methods' or 'editor property types'. ```bash # Search for specific SDK patterns python3 scripts/query/rag.py search "IWorldInstance methods" --collections addon_sdk python3 scripts/query/rag.py search "editor property types" --collections addon_sdk ``` -------------------------------- ### Update SessionStart Instruction Source: https://github.com/xhxiaiein/construct3-copilot/blob/main/docs/superpowers/plans/2026-04-07-memory-module.md Configures the SessionStart instruction to incorporate project memory and user profile context. ```bash # 4. Instruction to Claude echo "## SessionStart Instruction" echo "用中文向用户打招呼。简短介绍当前服务状态,提示用户可以用哪些 skill。" echo "如果有 User Profile,根据用户等级调整语气。" echo "如果有 Project Memory,简要提及上次的项目进展。" echo "不要逐字复读以上内容,用自然的方式表达。" ``` -------------------------------- ### Locate and Load Project Memory Source: https://github.com/xhxiaiein/construct3-copilot/blob/main/docs/superpowers/plans/2026-04-07-memory-module.md Searches for a .c3proj file in the current or parent directory and displays the project memory if found. ```bash # Search current dir and one level up for .c3proj for D in "$PROJECT_ROOT" "$PARENT_DIR"; do FOUND=$(find "$D" -maxdepth 1 -name "*.c3proj" -print -quit 2>/dev/null) if [ -n "$FOUND" ]; then C3PROJ="$FOUND" break fi done if [ -n "$C3PROJ" ]; then C3PROJ_DIR=$(dirname "$C3PROJ") PROJ_MEMORY="$C3PROJ_DIR/.claude/memory/memory.md" if [ -s "$PROJ_MEMORY" ]; then echo "## Project Memory" grep -v '^