Xpert Platform Local Environment
Bring one explicitly selected Xpert checkout to a reproducible, plugin-test-ready local state. Default to source-hybrid: run infrastructure with Docker Compose and run the API and Cloud UI from the selected source checkout. Use full Docker only for platform smoke testing or when live host/plugin SDK debugging is not required.
This skill owns platform checkout, local configuration materialization, infrastructure, API/UI process provenance, health verification, recovery guidance, and a secret-free environment receipt. It does not own plugin code, plugin installation semantics, Assistant DSLs, or application acceptance.
Route to Companion Skills
- After the platform is ready, use
xpert-plugin-development for plugin build, plugin:deploy:local, runtime verification, and plugin release states. Read its references/general.md local deployment sections rather than duplicating authentication or installation rules here.
- Use
xpert-assistant-dsl-builder for Assistant template installation, update, publication, and runtime acceptance.
- Use
xpert-agent-pipeline-developer for multi-role Case pipelines, role Assistants, External Xpert orchestration, dashboard/swimlane product behavior, and end-to-end application acceptance.
Environment Modes
| Mode |
Use when |
Plugin-development consequence |
source (source-hybrid) |
Building or debugging plugins, SDK/contracts, View Host, Assistant provisioning, or host behavior |
Default. The API can load an allowlisted host workspacePath, and API/UI logs and source provenance are inspectable. |
docker |
Quickly proving a released platform image or reproducing ordinary self-hosted behavior |
Do not assume an arbitrary host plugin path is visible inside the API container. Use a supported mount/package flow or switch to source mode for local-code plugins. |
Read setup-and-lifecycle.md before setup, start, repair, mode switching, port remediation, or configuration changes. Read plugin-test-readiness.md before handing the environment to plugin deployment or claiming it is ready for application testing.
Workflow
1. Inspect Without Mutation
- Read repository-level instructions for every existing checkout.
- Discover checkouts and worktree state instead of assuming machine-specific paths.
- Inspect tools, declared package manager, platform scripts, local configuration presence, endpoint health, port owners, and process provenance:
node <skill-dir>/scripts/inspect-xpert-local-environment.mjs \
--workspace <workspace-root> \
--platform <xpert-root> \
--mode source \
--plugin-dir <plugin-root> \
--strict
Do not accept a healthy port as evidence that the selected checkout is running. In source mode, the listening API and Cloud processes must resolve to the selected checkout. In Docker mode, the containers must belong to the selected Compose project.
2. Plan, Then Apply
The setup command is dry-run by default:
node <skill-dir>/scripts/setup-xpert-local-environment.mjs \
--workspace <workspace-root> \
--platform <xpert-root> \
--mode source \
--plugin-dir <plugin-root>
Review the plan, especially checkout target, mode, configuration files, ports, Compose project, and plugin workspace allowlist. Then apply the same plan:
node <skill-dir>/scripts/setup-xpert-local-environment.mjs \
--workspace <workspace-root> \
--platform <xpert-root> \
--mode source \
--plugin-dir <plugin-root> \
--apply
The command may clone the official public Xpert repository when the exact target path is absent, create missing local .env files from the checked-out template with generated local-only secrets, run the repository-owned bootstrap, start namespaced infrastructure and source processes, wait for health, and write a secret-free receipt. It must not overwrite existing configuration or update/switch an existing checkout.
3. Respect Human and Security Gates
Pause with a specific action when any of these is required:
- repository authentication or a non-public fork;
- a branch/ref choice that would change an existing checkout;
- port ownership by another checkout or Compose project;
- elevated volume permissions;
- first-user/platform initialization;
- Xpert deployment credentials or model/provider secrets.
Never ask the user to paste passwords or tokens into chat. Never inspect browser storage, cookies, shell history, or unrelated process environments. Prefer the credential mechanism defined by xpert-plugin-development after platform readiness.
4. Prove Plugin-Test Readiness
Platform readiness requires more than dependency installation:
- the selected checkout and exact commit are recorded;
- infrastructure is healthy or explicitly reused;
- the API readiness endpoint passes;
- the Cloud UI is reachable;
- source listeners belong to the selected checkout, or Docker containers belong to the selected Compose project;
- required plugin workspace roots are allowlisted in source mode;
- the platform exposes the expected local-deploy and Assistant-suite commands;
- initialization/credentials are ready, or the receipt names the remaining human action.
Only then hand off to xpert-plugin-development. Plugin built, staged, running, Assistant published, and application acceptance passed remain later, distinct states.
5. Repair Conservatively
- Re-run the inspector before changing a failed environment.
- Preserve user-owned
.env, volumes, databases, repositories, logs, and running instances.
- Do not automatically stop, kill, delete, reset, pull, or switch anything to resolve a collision.
- Prefer a targeted restart of the selected API/UI or namespaced Compose project after the cause is known.
- After repair, repeat provenance and health checks; do not rely only on the absence of errors.
Non-Negotiable Invariants
- The checkout named in the receipt is the checkout actually serving source-mode API and UI processes.
- Compose always uses an explicit project name derived from or supplied for the selected environment.
- Existing repositories, dirty worktrees,
.env files, volumes, and credentials are never overwritten by setup.
- Configuration generation writes secrets only to ignored local files, never stdout, receipts, documentation, or source control.
- An occupied port owned by another checkout/project blocks setup unless the user explicitly chooses a different port/environment or authorizes reuse after inspection.
- Source setup uses the repository-declared package manager through Corepack and repository-owned scripts.
- Full Docker health does not prove local source-code plugin loading.
- Platform health does not prove plugin registration, runtime loading, Assistant publication, or application acceptance.
Expected Output
Return a secret-free receipt containing:
- environment mode, workspace, platform path, branch, commit, and worktree state;
- Node, Corepack, package-manager, Docker, and Compose versions;
- generated-versus-preserved configuration paths without values;
- Compose project, services, source PIDs/log paths, and provenance results;
- API/UI endpoint health and readiness state;
- plugin path/SDK compatibility and workspace-allowlist state when supplied;
- commands discovered for bootstrap, local plugin deployment, Assistant suites, and preview;
ready, action_required, or failed, plus remaining human actions and unverified layers.
1---2name: xpert-platform-local-environment3description: Provision, start, inspect, repair, and verify a local Xpert platform environment for plugin and Agentic App testing, using a source checkout with Docker infrastructure by default or full Docker smoke mode. Use when Xpert must be cloned, bootstrapped, made healthy, or proven to be the exact instance loading a local plugin; do not use for plugin implementation itself.4---56# Xpert Platform Local Environment78Bring one explicitly selected Xpert checkout to a reproducible, plugin-test-ready local state. Default to `source-hybrid`: run infrastructure with Docker Compose and run the API and Cloud UI from the selected source checkout. Use full Docker only for platform smoke testing or when live host/plugin SDK debugging is not required.910This skill owns platform checkout, local configuration materialization, infrastructure, API/UI process provenance, health verification, recovery guidance, and a secret-free environment receipt. It does not own plugin code, plugin installation semantics, Assistant DSLs, or application acceptance.1112## Route to Companion Skills1314- After the platform is ready, use `xpert-plugin-development` for plugin build, `plugin:deploy:local`, runtime verification, and plugin release states. Read its `references/general.md` local deployment sections rather than duplicating authentication or installation rules here.15- Use `xpert-assistant-dsl-builder` for Assistant template installation, update, publication, and runtime acceptance.16- Use `xpert-agent-pipeline-developer` for multi-role Case pipelines, role Assistants, External Xpert orchestration, dashboard/swimlane product behavior, and end-to-end application acceptance.1718## Environment Modes1920| Mode | Use when | Plugin-development consequence |21|---|---|---|22| `source` (`source-hybrid`) | Building or debugging plugins, SDK/contracts, View Host, Assistant provisioning, or host behavior | Default. The API can load an allowlisted host `workspacePath`, and API/UI logs and source provenance are inspectable. |23| `docker` | Quickly proving a released platform image or reproducing ordinary self-hosted behavior | Do not assume an arbitrary host plugin path is visible inside the API container. Use a supported mount/package flow or switch to source mode for local-code plugins. |2425Read [setup-and-lifecycle.md](references/setup-and-lifecycle.md) before setup, start, repair, mode switching, port remediation, or configuration changes. Read [plugin-test-readiness.md](references/plugin-test-readiness.md) before handing the environment to plugin deployment or claiming it is ready for application testing.2627## Workflow2829### 1. Inspect Without Mutation3031- Read repository-level instructions for every existing checkout.32- Discover checkouts and worktree state instead of assuming machine-specific paths.33- Inspect tools, declared package manager, platform scripts, local configuration presence, endpoint health, port owners, and process provenance:3435```bash36node <skill-dir>/scripts/inspect-xpert-local-environment.mjs \37 --workspace <workspace-root> \38 --platform <xpert-root> \39 --mode source \40 --plugin-dir <plugin-root> \41 --strict42```4344Do not accept a healthy port as evidence that the selected checkout is running. In source mode, the listening API and Cloud processes must resolve to the selected checkout. In Docker mode, the containers must belong to the selected Compose project.4546### 2. Plan, Then Apply4748The setup command is dry-run by default:4950```bash51node <skill-dir>/scripts/setup-xpert-local-environment.mjs \52 --workspace <workspace-root> \53 --platform <xpert-root> \54 --mode source \55 --plugin-dir <plugin-root>56```5758Review the plan, especially checkout target, mode, configuration files, ports, Compose project, and plugin workspace allowlist. Then apply the same plan:5960```bash61node <skill-dir>/scripts/setup-xpert-local-environment.mjs \62 --workspace <workspace-root> \63 --platform <xpert-root> \64 --mode source \65 --plugin-dir <plugin-root> \66 --apply67```6869The command may clone the official public Xpert repository when the exact target path is absent, create missing local `.env` files from the checked-out template with generated local-only secrets, run the repository-owned bootstrap, start namespaced infrastructure and source processes, wait for health, and write a secret-free receipt. It must not overwrite existing configuration or update/switch an existing checkout.7071### 3. Respect Human and Security Gates7273Pause with a specific action when any of these is required:7475- repository authentication or a non-public fork;76- a branch/ref choice that would change an existing checkout;77- port ownership by another checkout or Compose project;78- elevated volume permissions;79- first-user/platform initialization;80- Xpert deployment credentials or model/provider secrets.8182Never ask the user to paste passwords or tokens into chat. Never inspect browser storage, cookies, shell history, or unrelated process environments. Prefer the credential mechanism defined by `xpert-plugin-development` after platform readiness.8384### 4. Prove Plugin-Test Readiness8586Platform readiness requires more than dependency installation:87881. the selected checkout and exact commit are recorded;892. infrastructure is healthy or explicitly reused;903. the API readiness endpoint passes;914. the Cloud UI is reachable;925. source listeners belong to the selected checkout, or Docker containers belong to the selected Compose project;936. required plugin workspace roots are allowlisted in source mode;947. the platform exposes the expected local-deploy and Assistant-suite commands;958. initialization/credentials are ready, or the receipt names the remaining human action.9697Only then hand off to `xpert-plugin-development`. Plugin `built`, `staged`, `running`, Assistant `published`, and application `acceptance passed` remain later, distinct states.9899### 5. Repair Conservatively100101- Re-run the inspector before changing a failed environment.102- Preserve user-owned `.env`, volumes, databases, repositories, logs, and running instances.103- Do not automatically stop, kill, delete, reset, pull, or switch anything to resolve a collision.104- Prefer a targeted restart of the selected API/UI or namespaced Compose project after the cause is known.105- After repair, repeat provenance and health checks; do not rely only on the absence of errors.106107## Non-Negotiable Invariants108109- The checkout named in the receipt is the checkout actually serving source-mode API and UI processes.110- Compose always uses an explicit project name derived from or supplied for the selected environment.111- Existing repositories, dirty worktrees, `.env` files, volumes, and credentials are never overwritten by setup.112- Configuration generation writes secrets only to ignored local files, never stdout, receipts, documentation, or source control.113- An occupied port owned by another checkout/project blocks setup unless the user explicitly chooses a different port/environment or authorizes reuse after inspection.114- Source setup uses the repository-declared package manager through Corepack and repository-owned scripts.115- Full Docker health does not prove local source-code plugin loading.116- Platform health does not prove plugin registration, runtime loading, Assistant publication, or application acceptance.117118## Expected Output119120Return a secret-free receipt containing:1211221. environment mode, workspace, platform path, branch, commit, and worktree state;1232. Node, Corepack, package-manager, Docker, and Compose versions;1243. generated-versus-preserved configuration paths without values;1254. Compose project, services, source PIDs/log paths, and provenance results;1265. API/UI endpoint health and readiness state;1276. plugin path/SDK compatibility and workspace-allowlist state when supplied;1287. commands discovered for bootstrap, local plugin deployment, Assistant suites, and preview;1298. `ready`, `action_required`, or `failed`, plus remaining human actions and unverified layers.