Ghost-ALICE OS

Installer Platform Compatibility Matrix

🇺🇸 English 🇰🇷 한국어

This document is the compatibility test contract for the Ghost-ALICE installer. Each row states a required behavior and names the test or validation that verifies it. The Core architecture describes the responsibilities and return paths.

Contents

Runtime Contract

Area Contract Test owner
Python runtime Python 3.11+ accepted, no upper bound, no future-version allowlist scripts/run_installer_compat_tests.py, scripts.tests.test_install_runtime_detection
Python bootstrap Default install path attempts package-manager Python setup before aborting; read-only status/doctor/list do not mutate the system scripts.tests.test_install_runtime_detection
Python lookup python, python3, python3.*, broken store stubs, PATH with spaces scripts.tests.test_install_runtime_detection
Encoding UTF-8 mode forced for shell entrypoints and native wrappers scripts.tests.test_install_ps1_encoding, scripts.tests.test_install_cmd_wrapper
User home paths spaces and non-ASCII HOME fixtures stay supported scripts.tests.test_installer_asset_inventory, installer integration tests
PSScriptAnalyzer optional PSScriptAnalyzer optional; parser/static tests are the minimum gate when the module is absent local full validation
Public surface parity Claude command wrappers stay aligned with skill-catalog/skills.json targets; README keeps its required headings and commands; index.html keeps its repo-root links scripts/validate_public_surfaces.py, scripts/run_installer_compat_tests.py --group public-surface-contract
Ghost-ALICE fresh clone install policy A fresh AidALL/ghost-alice clone plus install fetches remote refs/heads/main. In an extracted release archive or tagged checkout, --local-source installs that folder’s files. The installed update command fetches remote main. scripts.tests.test_installer_version_handoff, _shared.test_installer_source
Upgrade from v0.5.1 After a local main checkout fast-forwards to the release, running its installer updates both detected hosts, records the installed commit and preserves unrelated host settings. scripts.tests.test_installer_version_handoff.OfficialReleaseUpgradeTests
Windows skill junction upgrade and retry When an upgrade replaces a junction with a copy, cleanup preserves the source files and any junction another host still uses. After a v0.6.0 cleanup failure, running the current installer retries cleanup once the junction is unused. If the user accepts a proposed move of checkout-based work records, the moved ledger returns the same input ID. scripts.tests.test_installer_version_handoff.DirectoryLinkUpgradeTests, _shared.test_install_transaction_publish.DirectoryLinkCleanupTests
Installed Claude permissions Cleanup removes only managed stale checkout path allow rules and the Skill(<name>) permissions of retired skills. _shared.test_install_hooks.TestInstallHook, _shared.test_installed_hook_cleanup
Agent visibility profile The agent visibility profile section gives the default, the allowed values, the --visibility flag and the --agent-visibility alias. Native wrapper compatibility aliases remain implementation-test coverage. The profile does not change generated hook command contracts. _shared.test_runtime_config, _shared.test_hook_profile_gate, _shared.test_install_hooks, scripts.tests.test_install_status_contract
Agent visibility runtime command surface Slash commands by platform gives each platform’s command. Documentation must not present /visibility as a Codex command. scripts.tests.test_install_status_contract

Agent Hook Runtime Contract

The Ghost-ALICE installer does not treat hook files as sufficient merely because they exist. It also synchronizes the managed hook entries and the platform permission policy with the current repository contract. When the command of an existing managed hook entry differs from the command the installer generates, the installer replaces that entry. The agent visibility profile must not relax missing or drift judgments.

Responsibilities and flow assigns the recording and authentication of work and judgments to Core code. An addon registers observational hooks at its declared native events, and the Core runner never lets them block the host.

Runtime live smoke follows live-smoke-regression, which runs one small request on each claimed installed target and lists the signals it observes.

Platform Runtime surface Contract Regression owner
Claude Code ${CLAUDE_CONFIG_DIR:-~/.claude}/CLAUDE.md, settings.json hooks, and permissions.allow Install the self-contained platforms/claude/CLAUDE.md managed block so arbitrary-working-directory sessions receive the common contract and the hookless fallback. Preserve markerless user-owned files through a proposal that does not count as installed. The installer writes Skill(<name>) allow rules into Claude Code settings for the full set of installed Ghost-ALICE skills, writing Core skill rules on every install run; a shortened allowlist that covers only the core gate skills is insufficient. scripts.tests.test_global_rule_blocks, scripts.tests.test_validate_entrypoints, scripts.tests.test_install_status_contract, _shared.test_install_hooks.TestInstallHook
Codex ~/.codex/hooks.json, ~/.codex/config.toml, bootstrap AGENTS.md Because there is no visible Skill tool, required gates are recorded through SKILL.md read plus workflow execution. Hook event names in hooks.json are install-surface configuration, not runtime firing proof; gate-completion claims require observed hook payload evidence, runtime smoke, or the hookless/manual fallback wording. tool-checkpoint payloads are installation and drift verification targets; external-tool evidence selection follows the verification reference when a claim needs it. Windows native Codex gets separate smoke for actual hook payload firing and SKILL.md read records. _shared.test_install_hooks, scripts.check_skill_gate_contract, Windows native live smoke

The Codex managed loader declares the installed ~/.codex/ghost-alice-governance.md as the common instruction source. Work reads that source together with project-specific constraints; a direct answer uses the loader’s no-tool rule. Status and doctor require the declared companion regardless of prose headings. The installer does not increase unrelated projects’ instruction budgets. User-owned governance files remain protected, and a symlink at the Codex common-contract path prevents replacement. See common governance and project instructions.

Hook Message Semantics

task-router

The common contract’s Work Selection section sets whether an input gets a direct answer or follows task-router as work.

session-intent-analyzer

The installer registers session-intent-analyzer as the sole Core code input intake hook for the host’s prompt-submit event (UserPromptSubmit) and as the SessionStart session-receipt hook. The host runs the prompt-submit event’s hooks when a prompt is submitted; the event name does not show who sent the prompt. The session gate matrix’s Session Intent Ledger Contract owns how Core code’s input intake records a prompt the host delivers under the user role.

pending merge precheck

merge-companion sets what the SessionStart pending-merge report means and when the response model checks the manifest and reviews its entries.

completion-reminder

Hook calls describes Core code’s Stop script, and Evidence and native delivery describes the two judgments that Core authenticates.

The hook runner removes the block, stop and permission-decision controls from the JSON output of every hook it runs and reports block, stop, deny and ask requests in systemMessage; it turns a hook’s exit code 2 into a non-blocking exit code 1, and the hook log keeps the original code. Verification-before-completion owns claim scope and control formats. Its review reference owns recording recovery and delivery; tool output semantics names returned states. Installer tests check the registered hook payloads and platform mappings, not the truth of model judgments.

Shell Matrix

Environment Required coverage Automation
macOS bash 3.2 install.sh parse and targeted install/status flows local macOS full validation
modern bash Linux/GitHub Actions install.sh smoke and unittest integration ci.yml job Public validation
zsh invocation zsh install.sh re-execs under bash before bash-only syntax runs, then runs the Python installer _shared/installer/cli.py scripts.tests.test_installer_compat_matrix
Linux bash install.sh --platform codex --skip-source-health task-router fixture scripts.tests.test_install_preflight_quarantine
WSL same as Linux bash, with Windows path boundary smoke manual or Windows CI
Git Bash copy-mode fallback, Codex hook config through ~/.codex/hooks.json, forced UTF-8 locale and Python UTF-8 mode runtime detection and Codex hook config tests
Windows native Codex hook smoke Native Windows Codex installer path .\install.cmd --platform codex writes Codex bootstrap, hooks.json, and config.toml with hooks enabled; live smoke observes hook payload firing scripts.tests.test_install_status_contract, docs/policies/live-smoke-regression.md
Windows visibility preference smoke Native wrapper visibility forwarding reaches _shared/install_hooks.py --visibility; visibility aliases remain accepted as compatibility coverage, and status reports hook state and runtime profile separately scripts.tests.test_install_status_contract, Windows PowerShell/CMD live smoke
Windows PowerShell 5.1 Not supported. install.ps1 keeps a UTF-8 BOM and Windows PowerShell 5.1 syntax (PSUseCompatibleSyntax with target 5.1) so that 5.1 reaches its first statement, which prints PowerShell 7.6 or newer is required with winget install --id Microsoft.PowerShell --exact and exits 1 scripts.tests.test_thin_shells, scripts.tests.test_install_ps1_encoding, scripts.tests.test_powershell_static_analysis
PowerShell 7 The 7.6 LTS line is the baseline: install.ps1 runs under PowerShell 7.6 or newer and stops older 7.x with the same requirement; the installer installs no PowerShell. It sets UTF-8 console I/O, prepares Python 3.11+, turns the earlier PowerShell parameter names into the cli flags, passes every argument in order to _shared/installer/cli.py and returns that exit code scripts.tests.test_thin_shells (runs install.ps1 where pwsh exists, as on the CI runner), scripts.tests.test_powershell_static_analysis
CMD wrapper Delegates to install.ps1 with pwsh.exe, or with powershell.exe when pwsh.exe is absent, where the install.ps1 version check prints the requirement; forwards arguments, forces UTF-8 and returns the exit code. Options and help come from the Python installer scripts.tests.test_install_cmd_wrapper, scripts.tests.test_thin_shells

CI Commands

Minimum cross-platform Python gate:

python3 -m pip install pytest
python3 scripts/run_installer_compat_tests.py

The shared-all group runs shared unittest discovery and the pytest functions in _shared/test_install_destination.py; either execution failing fails the group.

Without --group, scripts/run_installer_compat_tests.py skips each focused group whose within field names another group. The named group already runs every test module of the focused group, so each test module runs once. Name a focused group with --group to run it alone.

Focused groups:

python3 scripts/run_installer_compat_tests.py --list
python3 scripts/run_installer_compat_tests.py --group installer-runtime-detection
python3 scripts/run_installer_compat_tests.py --group public-surface-contract
python3 scripts/run_installer_compat_tests.py --group installer-status-contract
python3 scripts/run_installer_compat_tests.py --group installer-powershell-static

Optional analyzer coverage is exposed through the installer-powershell-static group above; direct analyzer invocation is intentionally not part of public install guidance.