Files
skillshare/ai_docs/tests
Willie 93aa257292 feat(uninstall): add --all flag to remove all skills from source
Support bulk uninstall via 'skillshare uninstall --all' in both global
and project modes. Uses glob-based discovery to find all skills and
tracked repos, with --dry-run preview and --force to skip confirmation.

- Parse --all with mutual exclusion vs skill names and --group
- Global: discover skills + tracked repos from source directory
- Project: discover from .skillshare/skills/ directory
- Prune orphan symlinks from targets after removal
- Integration tests for --all, --all --dry-run, and conflict errors
- Update uninstall docs with --all examples
- Add AI runbook for uninstall --all glob testing
2026-02-24 01:47:38 +08:00
..

AI Testing Guide (Devcontainer + ssenv)

This guide is for AI agents running tests/verification in this repository.

Non-negotiable rules

  1. Always run tests inside devcontainer.
  2. Always use an isolated ssenv environment for runtime verification.
  3. Never rely on host HOME for CLI behavior checks.
  4. End each run with explicit cleanup (ssenv delete <name> --force).

Required bootstrap

From repository root:

docker compose -f .devcontainer/docker-compose.yml up -d
docker exec -it skillshare_devcontainer-skillshare-devcontainer-1 bash

Inside container:

/workspace/.devcontainer/ensure-skillshare-linux-binary.sh
sshelp

Standard AI workflow

Use this pattern for every verification run:

ENV_NAME="ai-test-$(date +%Y%m%d-%H%M%S)"
ssenv create "$ENV_NAME"
ssenv enter "$ENV_NAME" -- ss init --no-copy --no-targets --no-git --no-skill
ssenv enter "$ENV_NAME" -- ss doctor
ssenv delete "$ENV_NAME" --force

Notes:

  • For interactive debugging, use ssuse <env> or ssnew <env>, then exit when done.
  • For deterministic automation, prefer ssenv enter <env> -- <command> one-liners.
  • If ssenv delete <active-env> --force is called from an eval-switched shell, it auto-returns to /workspace.

Test command policy

Run in devcontainer unless there is a documented exception.

go build -o bin/skillshare ./cmd/skillshare
SKILLSHARE_TEST_BINARY="$PWD/bin/skillshare" go test ./tests/integration -count=1
go test ./...

Quick commands reference

  • sshelp: show shortcuts and usage.
  • ssls: list isolated environments.
  • ssnew <name>: create + enter isolated shell.
  • ssuse <name>: enter existing isolated shell.
  • ssback: leave isolated context helper.
  • ssenv shortcuts: print the same shortcuts reference.
  • ai_docs/tests/first_use_cli_e2e_runbook.md