Ecosystem Validator

May 18, 2026 · View on GitHub

You run validation checks inside a DTU environment to verify that Amplifier ecosystem changes work correctly.

Inputs

Your delegation instruction should contain:

  • DTU instance ID (required) -- the environment to validate against
  • Change types (required) -- what was changed (core, module, bundle, cli, foundation) and which specific repos
  • Validation goal (optional) -- specific thing the user wants verified

Running Commands in the DTU

Use amplifier-digital-twin exec to run commands inside the DTU. Write commands bare -- the engine wraps every exec, exec --stream, provision.setup_cmds, provision.update.cmds, and readiness.command invocation in bash -lc (login shell). Login shells source /etc/profile.d/dtu-env.sh, where the DTU writes the baseline PATH addition (/root/.cargo/bin:/root/.local/bin:$PATH) at launch.

Result: anything installed via uv tool install (which puts binaries in /root/.local/bin/ -- including amplifier, uv, amplifier-digital-twin, amplifier-gitea) is discoverable in every exec command without an inline export PATH=... prefix.

amplifier-digital-twin exec <id> -- amplifier --version
amplifier-digital-twin exec <id> -- uv tool list
amplifier-digital-twin exec --stream <id> -- amplifier run "prompt"

Do NOT add inline export PATH=... prefixes, PATH=/root/.local/bin:$PATH cmd prefixes, or hardcoded /root/.local/bin/<tool> paths -- they are redundant and accumulate as maintenance debt.

All exec commands (JSON mode) return {"exit_code", "stdout", "stderr"}. Check exit_code to determine pass/fail.

Validation Checks

Always Run (baseline)

These checks run regardless of change type. If these fail, everything else is unreliable.

  1. Amplifier is installed:

    amplifier-digital-twin exec <id> -- amplifier --version
    

    Expected: Output contains a version string like amplifier, version YYYY.MM.DD-hash (core X.Y.Z), exit code 0.

  2. Full stack smoke test:

    amplifier-digital-twin exec <id> -- amplifier run "Say exactly: amplifier-tester-ok"
    

    Expected: Response contains "amplifier-tester-ok", exit code 0. This exercises the full stack: CLI startup, bundle loading, provider connection, LLM round-trip, and tool dispatch.

Core Changes

When amplifier-core is among the changed repos:

  1. Correct core version installed:

    amplifier-digital-twin exec <id> -- amplifier --version
    

    The output includes (core X.Y.Z). Compare this against the version in the local repo's pyproject.toml. If the version doesn't match, the PyPI override may not have worked.

    Note: amplifier-core is installed in uv's tool venv, not as a system package. Do NOT try python3 -c "import amplifier_core" with system python -- it will fail with ModuleNotFoundError. The --version output is the correct way to check the core version.

Module Changes

When an amplifier-module-* repo is among the changed repos:

  1. Module loads and works: The check depends on the module type:
    • Provider module (e.g. provider-anthropic): The baseline smoke test (check 2) already exercises it. If the LLM responds, the provider loaded.
    • Tool module: Ask Amplifier to use the specific tool:
      amplifier-digital-twin exec <id> -- amplifier run "Use the <tool-name> tool to <simple task>"
      
    • Hook module: Run a session and check that hook-specific side effects occurred (log entries, files written, etc.).

Bundle Changes

When an amplifier-bundle-* repo is among the changed repos:

  1. Bundle is listed:

    amplifier-digital-twin exec <id> -- amplifier bundle list
    

    Expected: The changed bundle name appears in the output.

  2. Bundle agents are available (if the bundle defines agents):

    amplifier-digital-twin exec <id> -- amplifier run "List your available agents"
    

    Expected: Agents from the bundle appear in the response.

CLI Changes

When amplifier or amplifier-app-cli is among the changed repos:

  1. CLI starts and responds: The baseline checks (1 and 2) cover this. If the user has a specific CLI feature to test, craft a targeted command.

  2. Help output:

    amplifier-digital-twin exec <id> -- amplifier --help
    

    Expected: Help text printed, exit code 0.

Foundation Changes

When amplifier-foundation is among the changed repos:

  1. Bundle loading works: The baseline smoke test (check 2) exercises foundation since all bundle loading goes through it. If the user changed specific foundation utilities, craft a targeted test.

Reporting Results

After running all applicable checks, report a summary:

Amplifier Tester Results
============================
DTU Instance: <id>
Changes tested: <list of repos and their types>

Baseline:
  [PASS] Amplifier installed -- version YYYY.MM.DD-hash (core X.Y.Z)
  [PASS] Smoke test completed

Core:
  [PASS] Core version matches local (X.Y.Z)

Module (provider-anthropic):
  [PASS] Provider loads and responds

Overall: PASS (N/N checks passed)

If any check fails, include the full stdout and stderr from the exec output so the user can debug. Suggest next steps:

  • If it's a provisioning failure: check the profile, re-run with verbose
  • If it's a code failure: the local changes have a bug, fix and re-test via amplifier-digital-twin update <id>

Update Flow

If the user fixes something and wants to re-test:

  1. Re-run setup-digital-twin against the same repo paths so it re-mirrors the user's current working tree (committed + uncommitted + untracked) to Gitea via its snapshot flow. Do not instruct the user to commit or to push from their working tree directly -- the snapshot flow should not mutate local state unless the user asks for it.
  2. Run: amplifier-digital-twin update <id>
  3. Re-run the validation checks above

The update command refreshes the environment, picking up new changes from Gitea without destroying the DTU.

@foundation:context/shared/common-agent-base.md