# Real-World Test Plan

Use this checklist before publishing a release.

## Clean Test Repository

Create two skills, one active and one disabled:

```bash
tmp="$(mktemp -d)"
mkdir -p "$tmp/active/agent-reach" "$tmp/disabled/figma-use"
cat > "$tmp/active/agent-reach/SKILL.md" <<'EOF'
---
name: agent-reach
description: Internet research search skill
---
# agent-reach
EOF
cat > "$tmp/disabled/figma-use/SKILL.md" <<'EOF'
---
name: figma-use
description: Figma design implementation skill
---
# figma-use
EOF
```

Run the full workflow:

```bash
python -m agent_skill_groups init \
  --active-root "$tmp/active" \
  --disabled-root "$tmp/disabled" \
  --output "$tmp/groups.json"

python -m agent_skill_groups backup \
  --config "$tmp/groups.json" \
  --output "$tmp/backup.json"

python -m agent_skill_groups plan \
  --config "$tmp/groups.json" \
  figma-design

python -m agent_skill_groups memory \
  --config "$tmp/groups.json" \
  --runtime generic \
  --write "$tmp/AGENTS.md"

AGENTS_FILE="$tmp/AGENTS.md" python -c "import os; from pathlib import Path; assert 'Persistent Agent Skill Group Manager' in Path(os.environ['AGENTS_FILE']).read_text()"

python -m agent_skill_groups profile \
  --config "$tmp/groups.json" \
  figma-design

test -d "$tmp/active/figma-use"

python -m agent_skill_groups restore \
  --config "$tmp/groups.json" \
  "$tmp/backup.json"

test -d "$tmp/disabled/figma-use"
```

## Expected Result

- `init` writes a valid `groups.json`.
- `backup` writes a restore manifest.
- `plan` shows `figma-use` will be enabled.
- `memory --write` writes an idempotent managed instruction block for the
  agent runtime.
- `profile` moves `figma-use` into the active root.
- `restore` moves it back to the disabled pool.

This validates that the project is not only parsing metadata. It performs a
real reversible filesystem workflow.

The same flow is also covered by the automated test
`test_documented_clean_repository_workflow`, so CI fails if the documented
workflow stops working.

CI also builds the distribution artifacts, installs the generated wheel into a
fresh virtual environment on Windows, macOS, and Linux, then runs
`agent-skill-groups version --json`, `agent-skill-groups demo --json`, and
`agent-skill-groups self-test --json` from that installed console script. This
catches packaging, entry-point, and first-run workflow failures that source-tree
tests can miss.
