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
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
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 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 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 allxuunity system cleanup applyxuunity system apply cleanupxuunity system cleanup stale reportsxuunity system cleanup ai outputsxuunity system archive old reportsxuunity system evaluate the xuunity protocol structure
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
- 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. - 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 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 review this integration- 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
Canonical generic review template:
AIRoot/Templates/XUUNITY_REVIEW_REPORT_TEMPLATE.md
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.
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 when it exists.
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.