Purpose
This handbook is the main navigation guide for the AI protocol system. Use it to understand:
- what each protocol is for
- which tasks are a good fit
- which commands to use
- what the system can solve well today
- where you still need extra context, code verification, or human judgment
Current Shared Surface
Verified against the live shared AIRoot/Modules/XUUnity/ surface on 2026-05-13.
- Task surface includes engineering, review, feature-delivery, architecture-plan, validation-plan, rollout-plan, change-delivery, and incident-response entrypoints.
- Review surface includes code, git-change, SDK, native, release-readiness, delivery-risk, and test-quality review flows.
- Utility surface includes extraction, integration, review-artifact, system-governance, cleanup, and task-registry flows.
- First-class policy packs currently exist for:
- SDK changes
- startup changes
- manifest/native changes
- monetization changes
- save/load changes
- UI-heavy changes
Start Here
- Use
xuunityfor most Unity engineering, review, product-facing implementation questions, and protocol-system work. - Host repos may attach additional private protocols outside
AIRoot, but they are not part of this public handbook.
Supported Host Topologies
Core-only setup
Use this for a single-project repo or any host that does not need a shared internal layer across multiple projects.
Load shape:
- repo router
AIRoot/Modules/XUUnity/- project router
- project memory
Rule:
- do not create
AIModules/XUUnityInternal/just becausexuunityexists
Core plus internal overlay
Use this for monorepos or multi-project hosts that need reusable internal shared knowledge across projects.
Load shape:
- repo router
AIRoot/Modules/XUUnity/AIModules/XUUnityInternal/when present- project router
- project memory
Rule:
AIModules/XUUnityInternal/is an optional host overlay, not a mandatory part ofxuunity
MCP Surfaces
Treat MCP as two different operational surfaces:
- Unity-aware validation and editor evidence
- delivery/reporting integrations such as Slack
Do not collapse them into one generic "MCP setup" concept.
For the public topology view of these surfaces, use:
AIRoot/Visuals/AI_PROTOCOL_VISUAL_MAP.md- especially sections:
5. MCP Surfaces6. Unity MCP Validation Topology7. Delivery / Reporting MCP Topology
Unity MCP
Use this when the task needs Unity-aware evidence rather than source-only reasoning.
Shared source of truth:
AIRoot/Modules/XUUnity/tasks/start_session.mdAIRoot/Modules/XUUnity/knowledge/unity_validation_boundaries.mdAIRoot/Modules/XUUnity/knowledge/validation_lanes.md
Shared operational package:
AIRoot/Operations/XUUnityLightUnityMcp/README.md
Supporting public docs:
AIRoot/Operations/XUUnityLightUnityMcp/BUILD_AUTOMATION.mdAIRoot/Operations/XUUnityLightUnityMcp/AI_INTEGRATION.mdAIRoot/Operations/XUUnityLightUnityMcp/AGENT_WORKFLOWS.mdAIRoot/Operations/XUUnityLightUnityMcp/SMOKE_TESTS.md
Working rule:
- if the active host or project exposes a supported Unity MCP path, prefer that path for Unity-aware validation
- do not treat shell compile, generated project builds, or ad hoc shell scripts as equivalent to Unity MCP evidence
- treat MCP package
devmodeandprodmodeas dependency-source switches, not validation evidence; after either switch, run package refresh and the relevant Unity validation lane - host repos may add narrower local rules or wrappers on top of this public baseline
Slack MCP
Use this for delivery/reporting only, not as a project source of truth.
Shared public-safe setup:
AIRoot/Operations/CodexSlackMcp/README.mdAIRoot/Operations/CodexSlackMcp/init_codex_slack_mcp.shAIRoot/Templates/CodexSlackMcp/README.md
Working rule:
- Slack MCP is a delivery surface
- host repos may pin it to one channel, require explicit approval, or route it through host-local closeout utilities
- do not treat Slack posts as canonical project state
Protocol Map
xuunity
Best for:
- bug fixing
- refactoring
- feature development
- code review
- SDK integration and SDK review
- native plugin work and review
- runtime safety
- performance, startup, ANR, microfreeze, thermal, battery
- product-facing implementation explanations
- AI knowledge extraction, merge, and system maintenance
Fast Command Lookup
Daily Engineering
xuunity fix this bugxuunity refactor this codexuunity review this componentxuunity review testsxuunity review the git changexuunity git change reviewxuunity feature request this flowxuunity feature design this flowxuunity feature screen this flowxuunity feature popup this flowxuunity feature presenter this flowxuunity feature plan this flowxuunity feature validation this flowxuunity feature risk review this flowxuunity feature implement this flowxuunity arch plan this subsystem splitxuunity rollout plan this featurexuunity sdk discover AppsFlyerxuunity sdk discover AppLovin Panglexuunity sdk profile design Mixpanelxuunity sdk review this integrationxuunity sdk breakage review this integrationxuunity native review this iOS bridge
Product Queries
xuunity product explain this featurexuunity product brief this systemxuunity product impact this flow changexuunity product rollout this featurexuunity product deps this popupxuunity product bug this issuexuunity product health this projectxuunity project memory freshness this project
Knowledge And System Work
xuunity extract knowledgexuunity extract this sourcexuunity extract implementation patternxuunity extract presenter patternxuunity system extract knowledgexuunity system extract implementation patternxuunity apply approved extractionxuunity system apply approved extractionxuunity intake this knowledgexuunity integrate approved knowledgexuunity system extract skill candidatesxuunity system extract review artifact from this chatxuunity system merge review artifactsxuunity system integrate review artifactsxuunity system merge these new UniTask rules into skillsxuunity system intake review this knowledgexuunity system progress reviewxuunity system registry refreshxuunity system project registry auditxuunity system evaluation cadencexuunity system next milestonexuunity system research watchxuunity system health reviewxuunity system cleanupxuunity system cleanup projectsxuunity system cleanup reportsxuunity system cleanup aggressivexuunity system cleanup allxuunity system cleanup all aggressivexuunity system cleanup applyxuunity system apply cleanupxuunity system cleanup stale reportsxuunity system cleanup ai outputsxuunity system archive old reportsxuunity system evaluate the xuunity protocol structurexuunity task registry bootstrapxuunity start tracking this taskxuunity finish the workxuunity publish the workxuunity this worksxuunity this has bugsxuunity validate task registryxuunity task metricsxuunity archive task registry
Task-registry feature report:
AIRoot/Operations/XUUNITY_TASK_REGISTRY_PUBLIC_REPORT.md
Role Shortcuts
Use these when you want a specific angle instead of default routing.
xuunity po ...-> product ownerxuunity sud ...-> senior unity developerxuunity arch ...-> architectxuunity td ...-> technical developerxuunity ta ...-> technical artistxuunity ui ...-> ui integratorxuunity qa ...-> qa manualxuunity qa auto ...-> qa automationxuunity researcher ...-> researcherxuunity tm ...-> troubleshooter master
Examples:
xuunity td fix this frame spikexuunity tm find the root cause of this legacy bugxuunity po evaluate this feature
What The System Solves Well
High confidence
- Unity implementation and refactor work with clear local code context
- review of risky SDK and native integrations
- performance and stability guidance for mobile-critical flows
- extracting reusable engineering knowledge from real implementation work
- product-facing explanations when source code is available for verification
- consolidating engineering reasoning into reusable review artifacts
Good, but context-sensitive
- architecture proposals across messy legacy code
- release-readiness evaluation
- migration planning between SDK versions
- change-delivery and closure orchestration when the repo exposes the task-registry surface
- turning informal chats into durable shared skills
- using prior reports and project memory as working context
- periodic roadmap progress assessment
- external research watch if strong sources are used and findings are filtered through current system needs
- project health and memory freshness assessments when code and project memory are both available
Needs careful verification
- answers based mostly on old project memory
- product questions when source code is not available
- build-system and manifest conclusions without checking merged artifacts
- vendor-specific SDK recommendations that depend on changing external releases
What The System Does Not Do Reliably By Itself
- verify current third-party release status from the internet without fresh external evidence
- guarantee current behavior if only stale docs are loaded
- replace device testing for ANR, ad-flow, rendering, or lifecycle regressions
- replace human approval for knowledge integration into shared prompts
- decide project-specific rollout risk without enough project context
Best Practices
- Start from the project root or monorepo root, not from nested code folders.
- Let shorthand commands stay short. Do not manually enumerate the whole prompt stack unless needed.
- Choose repo topology first:
core-onlyfor single-project hosts,core + internal overlayfor true multi-project hosts. - Keep the MCP surface explicit:
- Unity MCP for validation and editor evidence
- delivery/reporting MCPs for closeout workflows
- Choose a primary validation lane before claiming runtime proof:
interactive_mcpfor live editor state, console, scene, Game View, play mode, or integrated Unity toolingbatch_compilefor non-interactive compile, define, target, or narrow test evidence when shell automation is allowedscenariofor ordered runtime steps, waits, screenshots, play mode transitions, or project-defined hooks
- For gameplay projects, keep
Assets/AIOutput/ProjectMemory/as the default context layer. - Treat
Assets/AIOutput/as historical artifact storage, not default working memory. - Load historical artifacts only when investigating behavior drift, reconstructing legacy intent, or researching old bugs.
- For product questions, prefer queries that point to a concrete feature, flow, or file area.
- For knowledge work, use
intake reviewbefore integration. - For long technical chats, first create a review artifact, then decide whether any of it should become shared knowledge.
- For risky SDK updates, verify dependency track, native versions, and merged build outputs.
- For risky gameplay, monetization, save/load, or UI-heavy changes, let the matched policy pack narrow the review and validation surface instead of improvising the whole checklist.
- For mobile stability questions, verify with code and build artifacts before trusting old memory.
- Treat
AIRootas intentionally routerless. Do not createAIRoot/Agents.mdorAIRoot/Assets/AIOutput/ProjectMemory/to emulate a project-local runtime layer. - Treat
AIModules/XUUnityInternal/as optional. Use it only when there is real host-level reusable internal knowledge across projects.
Effective Workflows
Bug Fix
xuunity fix this bug- Let the system load role, skills, project memory, and prior reports.
- If the bug is deep or legacy-heavy, switch to
xuunity tm ...
Presenter-Based Feature Work
xuunity feature screen ...for long-lived presenter-driven screens, pages, tabs, or lobby sectionsxuunity feature popup ...for modal, popup, or one-shot flow presentersxuunity feature presenter ...if you want presenter-based routing but want the system to infer the lifetime shape- If the task is only shaping implementation before coding, use
xuunity feature design ...orxuunity feature plan ...
SDK Upgrade Or Review
xuunity sdk discover AppsFlyerto run the full update-candidate research flow for the active project- Use
xuunity sdk discover AppsFlyer for ApperfunHubwhen the project must be explicit xuunity sdk review this integrationafter a candidate is selected or implemented- If breakage risk is high, use
xuunity sdk breakage review this integration - If rollout risk matters, follow with
xuunity product rollout this feature
Expected review output:
- findings
- feature and core-flow risk assessment
- QA manual validation recommendations
- candidate test cases when useful
- release recommendation or residual risk
Expected SDK discovery output:
- saved report under the resolved project's SDK review output destination
- exact recommended candidate or explicit
do not update - rejected candidates with reasons
New SDK Research Profile
xuunity sdk profile design Mixpanelto design a new full vendor profile before enabling one-command discovery- Use
xuunity sdk research profile Firebaseorxuunity system design sdk research profile OneSignalfor the same flow - After the profile is integrated, use
xuunity sdk discover <Vendor>for project-specific candidate research
Expected profile-design output:
- source-of-truth ladder
- exact candidate identity
- wrapper-to-native version mapping
- breaking-change and API migration checkpoint
- hard gates and no-update conditions
- report requirements and command examples
- business, marketing, monetization, compliance, and runtime risk notes
- validation and staged rollout requirements
Canonical generic review template:
AIRoot/Templates/XUUNITY_REVIEW_REPORT_TEMPLATE.md
Review And Risk Coverage
Use these when the work is review-heavy or release-sensitive:
xuunity review this componentfor a source-scope reviewxuunity review testsfor test-surface quality and riskxuunity review the git changefor branch or working-tree deltaxuunity feature risk review ...for pre-implementation or pre-release risk framing- let the matched policy pack narrow the checklist for:
- SDK changes
- startup changes
- manifest/native changes
- monetization changes
- save/load changes
- UI-heavy changes
Git Change Review
xuunity review the git change- review the branch diff against
developby default - if local uncommitted changes exist, assess them as additional delta unless the user asked for committed changes only
- save a short review report under
<Project>/Assets/AIOutput/CodeReviews/with a timestamped collision-safe filename likeYYYY-MM-DD_HH-MM-SS_git_change_review_<branch_slug>_vs_<base_slug>.md - include feature/core-flow risk scoring, QA manual validation recommendations, and candidate test cases when the code evidence is sufficient
- inspect the scorecard and release recommendation
- fix blocking issues before moving toward production
Canonical template:
AIRoot/Templates/XUUNITY_GIT_CHANGE_REVIEW_TEMPLATE.md
Expected saved review contents:
- findings
- scorecard
- feature and core-flow risk assessment
- QA manual validation recommendations
- candidate test cases when useful
- release recommendation
Use 100 breakage probability only for deterministic bugs that can be explained from the current code or diff.
Validation Lane Selection
- Prefer
interactive_mcpwhen the question is about live Unity editor behavior. - Prefer
batch_compilewhen the question is compile health or target or define coverage and direct shell automation is permitted. - Prefer
scenariowhen the answer depends on multiple ordered runtime steps rather than one isolated tool call. - If repo or project rules require integrated validation, do not fall back to direct Unity CLI just because the editor binary exists.
- If no permitted lane can produce representative proof, keep the validation gap explicit.
- When a host exposes a supported
XUUnityLightUnityMcpor equivalent Unity MCP package, treat that package as the preferred Unity-aware validation surface.
For the topology view of this lane model, use:
AIRoot/Visuals/AI_PROTOCOL_VISUAL_MAP.md->6. Unity MCP Validation Topology
New Knowledge
xuunity extract knowledge- review the triage package across review artifacts, skills, and shared knowledge
- approve only the destinations you want
xuunity apply approved extraction
When the source is primarily code and the goal is to learn a repeated implementation style from multiple concrete examples, prefer:
xuunity extract implementation pattern- review the extracted invariants, variations, and non-promoted quirks
- approve only the destination layer you want
xuunity apply approved extraction
For extraction-quality regression work, use:
AIRoot/Operations/XUUNITY_KNOWLEDGE_EXTRACTION_EVALUATION.mdAIRoot/Operations/XUUNITY_KNOWLEDGE_EXTRACTION_GOLDEN_CASES.yamlAIRoot/Operations/XUUNITY_EXTRACTION_AUTHORITATIVE_APPROVAL_CHECKLIST.md
xuunity system health review should also check whether the extraction workflow has current regression evidence.
If extraction routing changed but the golden pack was not rerun, treat that as a system-health gap rather than a silent assumption.
Use AIOutput/Reports/System/knowledge_extraction_eval_latest_summary.json as the preferred extraction-health evidence only when it is a real evaluation output, not a scaffold slot or placeholder.
Task Registry
xuunity task registry bootstrapwhen the repo needs the scaffoldxuunity start tracking this taskwhen lifecycle timing should begin before closurexuunity finish the workto record engineering closurexuunity this worksorxuunity this has bugsafter human validationxuunity validate task registrybefore publishing metrics or migration resultsxuunity task metricsfor outcome-based reportingxuunity archive task registryfor retention and rollover planning
Reference:
AIRoot/Operations/XUUNITY_TASK_REGISTRY_PUBLIC_REPORT.md
Change Delivery
xuunity publish local changes ...,xuunity publish all changes ..., orxuunity split these changes into commits ...- let
tasks/change_delivery.mdchoose the narrowest delivery shape - if the repo also exposes task-registry flows, pair delivery with
xuunity finish the work - keep validation evidence explicit before closeout rather than folding it into commit-only output
Delivery Reporting
- If the host repo exposes a delivery/reporting MCP such as Slack, use the host-local closeout route rather than inventing an ad hoc post format.
- Keep delivery/reporting MCP output secondary to the actual system of record.
- Do not claim work is fully closed out when the host-defined delivery step was explicitly requested but could not be completed.
For the topology view of delivery/reporting MCP, use:
AIRoot/Visuals/AI_PROTOCOL_VISUAL_MAP.md->7. Delivery / Reporting MCP Topology
System Progress
xuunity system progress review- review the maturity snapshot
- take the recommended next milestone
- if project inventory or project metadata changed, update
AIOutput/Registry/project_registry.yamlin the same maintenance pass
System Output Cleanup
xuunity system cleanup,xuunity system cleanup reports, orxuunity system cleanup all- review the filled cleanup scorecards and the
keep,archive,delete_candidate, andmanual_reviewbuckets xuunity system cleanup applyonly after explicit approval- archive meaningful old reports first
- delete only junk, exact duplicates, or orphan artifacts after explicit approval
Project Registry Refresh
xuunity system registry refresh- review changed versus unchanged entries
- if ambiguities remain, keep the registry conservative and flag them for human review
Project Registry Audit
xuunity system project registry audit- review current, stale, missing, and ambiguous entries
- run
xuunity system registry refreshonly if the required updates are low-risk and evidence-backed
Internet Research Watch
xuunity system research watch- review what is actually new and useful
- if strong findings appear, run
xuunity system intake review this knowledge
Long Engineering Chat
xuunity system extract review artifact from this chat- If there are multiple artifacts,
xuunity system merge review artifacts - If durable rules emerged, run
xuunity system intake review this knowledge
Product Question
xuunity product explain this feature- Check whether the answer is:
verified in source codebased on project memorypartially inferred
- If verification is weak, ask for a code-backed answer
Project Health
xuunity product health this project- review blockers, risks, and readiness scores
- if memory trust is unclear, run
xuunity project memory freshness this project
Verification Rules
- Code wins over project memory when they conflict.
- Merged build artifacts matter more than source declarations for manifest and plist checks.
- Review artifacts are reusable context, not automatic source of truth.
- Shared knowledge must be approved before integration.
- Public-safe reusable guidance belongs in
AIRoot/Modules/XUUnity/. - Reusable monorepo-internal guidance belongs in
AIModules/XUUnityInternal/when that overlay exists. - Project-only durable guidance belongs in project memory or project outputs unless the reusable part is cleanly split out first.
AIOutput/Registry/project_registry.yamlshould be refreshed when project routers, project memory presence, or host-defined gameplay-bridge availability change.- Host-level system and review-artifact outputs belong in
AIOutput/Reports/, with registry and portfolio state stored underAIOutput/Registry/.
If You Are Unsure Which Command To Use
- Need code changed or reviewed: start with
xuunity - Need architecture direction beyond public
xuunity: use the host repo's private architecture protocol if one exists - Need host-specific onboarding beyond public
xuunity: use the host repo's private onboarding protocol if one exists - Need to process a new piece of knowledge: start with
xuunity extract knowledge - Need to extract a repeated development style from code: start with
xuunity extract implementation pattern - Need to process a long technical chat: start with
xuunity system extract review artifact from this chat
Quick Limits Summary
- Best results happen when the AI can see the code, project memory, and relevant outputs.
- Product answers are only as good as their verification level.
- Upstream or shared knowledge should be integrated intentionally, not copied blindly.
- Device-level runtime risks still require real testing.