Files
skillshare/ai_docs/tests/project_command_runbook.md
Willie 52744e2f34 feat(project): register every Git checkout in a workspace with --scan (#958)
Some tools, such as Codex, look for project skills only up to the Git root
of the folder you open. When one workspace folder holds several checkouts
or worktrees, skills synced to the workspace are not seen inside them, and
registering each checkout by hand repeats the same settings many times.

`project add <root> --scan DIR` registers the root and each Git checkout
found below the scan folders as ordinary project entries with the same
settings, in one write. No scan setting is saved; rerun it after a new
clone. It only adds: a checkout already registered with the same settings
is kept, one with different settings or its own .skillshare/ is skipped
with the reason, and a name clash derives the name from the path. A scan
folder that is missing or cannot be read is skipped with a warning so one
unreadable folder does not block the rest. Rows carry a root-relative path
and a skip code so the dashboard can explain them in its own words.

Dashboard:

The dashboard should offer what `project add --scan` does, so a workspace
with many checkouts can be set up without the terminal.

The Add project dialog gains "Also add each checkout inside this folder"
with the folders to look in. Review runs the scan as a dry run through the
new POST /api/projects/scan and lists each folder as Added, Kept or Skipped
with a translated reason and a link to a project whose settings differ;
nothing is written until it is confirmed. The write scans again and counts
what it actually added, so a checkout registered in the meantime is not
reported as new. MCP and Hooks, when picked, are set up for each added
project. Without an explicit storage choice the default follows
projects_storage, as the CLI does without a flag.

Closes #953

Release-As: 0.30.12
2026-11-19 01:35:56 +08:00

20 KiB

CLI E2E Runbook: Project registrations

Scope

Verify the global project CLI: defaults, selection, resource settings, previews, JSON failures, saved partial sync and retry, merge/copy/symlink removal, and registering Git checkouts with --scan. Tests use local fixture skills and agents; no network or external repositories. Native Windows link behavior is outside this Linux acceptance runbook.

Environment

Run in the devcontainer with a freshly built /workspace/bin/skillshare, mdproof, and jq. Create a fresh ssenv without --init and preserve it for inspection. Each step defines its own fixture under the isolated HOME and replaces only that environment's config. Variables never cross Markdown blocks. Expected failures retain exit 1 and JSON stdout. Do not run against your normal HOME.

# Container commands; replace the unique environment name for every run.
cd /workspace
go build -o bin/skillshare ./cmd/skillshare
/workspace/.devcontainer/bin/ssenv create project-command-UNIQUE
/workspace/.devcontainer/bin/ssenv enter project-command-UNIQUE -- mdproof --isolation shared --build true --setup true --teardown true --report json /workspace/ai_docs/tests/project_command_runbook.md

The narrow mdproof overrides bypass the shared config's initialization/teardown because this runbook supplies complete fixtures. They preserve the fresh ssenv and do not change ai_docs/tests/mdproof.json. No permission-bit failure tricks are used: a dangling target-parent link blocks sync even when run as root.

Steps

1. List defaults to the global project registry

set -euo pipefail
ss() { /workspace/bin/skillshare "$@"; }
fixture=$(mktemp -d "$HOME/project-command-XXXXXX")
root="$fixture/app"
mkdir -p "$root" "$fixture/other" "$fixture/skills/alpha" "$fixture/skills/beta" "$fixture/agents" "$XDG_CONFIG_HOME/skillshare"
printf '%s\n' '---' 'name: alpha' 'description: Alpha fixture' '---' '# Alpha' > "$fixture/skills/alpha/SKILL.md"
printf '%s\n' '---' 'name: beta' 'description: Beta fixture' '---' '# Beta' > "$fixture/skills/beta/SKILL.md"
printf '%s\n' '---' 'name: helper' 'description: Helper agent fixture' '---' '# Helper' > "$fixture/agents/helper.md"
cat > "$XDG_CONFIG_HOME/skillshare/config.yaml" <<CONFIG
sources:
  skills: $fixture/skills
  agents: $fixture/agents
mode: merge
targets: {}
CONFIG
ss project --json

Expected:

  • exit_code: 0
  • jq: .projects == []

2. Add and sync preview leaves config and targets unchanged

set -euo pipefail
ss() { /workspace/bin/skillshare "$@"; }
fixture=$(mktemp -d "$HOME/project-command-XXXXXX")
root="$fixture/app"
mkdir -p "$root" "$fixture/other" "$fixture/skills/alpha" "$fixture/skills/beta" "$fixture/agents" "$XDG_CONFIG_HOME/skillshare"
printf '%s\n' '---' 'name: alpha' 'description: Alpha fixture' '---' '# Alpha' > "$fixture/skills/alpha/SKILL.md"
printf '%s\n' '---' 'name: beta' 'description: Beta fixture' '---' '# Beta' > "$fixture/skills/beta/SKILL.md"
printf '%s\n' '---' 'name: helper' 'description: Helper agent fixture' '---' '# Helper' > "$fixture/agents/helper.md"
cat > "$XDG_CONFIG_HOME/skillshare/config.yaml" <<CONFIG
sources:
  skills: $fixture/skills
  agents: $fixture/agents
mode: merge
targets: {}
CONFIG
cp "$XDG_CONFIG_HOME/skillshare/config.yaml" "$fixture/before.yaml"
ss project add "$root" --target claude --agents --sync --dry-run --json > "$fixture/result.json"
cmp "$fixture/before.yaml" "$XDG_CONFIG_HOME/skillshare/config.yaml"
test ! -e "$root/.claude"
cat "$fixture/result.json"

Expected:

  • exit_code: 0
  • jq: .action == "add" and .applied == false
  • jq: .project.name == "app" and .project.agents != null
  • jq: .sync.failed == [] and (.sync.results | length) > 0

3. Register defaults and show by explicit root

set -euo pipefail
ss() { /workspace/bin/skillshare "$@"; }
fixture=$(mktemp -d "$HOME/project-command-XXXXXX")
root="$fixture/app"
mkdir -p "$root" "$fixture/other" "$fixture/skills/alpha" "$fixture/skills/beta" "$fixture/agents" "$XDG_CONFIG_HOME/skillshare"
printf '%s\n' '---' 'name: alpha' 'description: Alpha fixture' '---' '# Alpha' > "$fixture/skills/alpha/SKILL.md"
printf '%s\n' '---' 'name: beta' 'description: Beta fixture' '---' '# Beta' > "$fixture/skills/beta/SKILL.md"
printf '%s\n' '---' 'name: helper' 'description: Helper agent fixture' '---' '# Helper' > "$fixture/agents/helper.md"
cat > "$XDG_CONFIG_HOME/skillshare/config.yaml" <<CONFIG
sources:
  skills: $fixture/skills
  agents: $fixture/agents
mode: merge
targets: {}
CONFIG
ss project add "$root" --target claude,codex --name work --json >/dev/null
ss project show "$root" --json

Expected:

  • exit_code: 0
  • jq: .project.name == "work" and .project.customName == "work"
  • jq: .project.targets == ["claude", "codex"]
  • jq: .project.skills != null and .project.agents == null
  • jq: .project.missing == false and .project.hasOwnConfig == false

4. Edit replaces target and filter lists and enables agents

set -euo pipefail
ss() { /workspace/bin/skillshare "$@"; }
fixture=$(mktemp -d "$HOME/project-command-XXXXXX")
root="$fixture/app"
mkdir -p "$root" "$fixture/other" "$fixture/skills/alpha" "$fixture/skills/beta" "$fixture/agents" "$XDG_CONFIG_HOME/skillshare"
printf '%s\n' '---' 'name: alpha' 'description: Alpha fixture' '---' '# Alpha' > "$fixture/skills/alpha/SKILL.md"
printf '%s\n' '---' 'name: beta' 'description: Beta fixture' '---' '# Beta' > "$fixture/skills/beta/SKILL.md"
printf '%s\n' '---' 'name: helper' 'description: Helper agent fixture' '---' '# Helper' > "$fixture/agents/helper.md"
cat > "$XDG_CONFIG_HOME/skillshare/config.yaml" <<CONFIG
sources:
  skills: $fixture/skills
  agents: $fixture/agents
mode: merge
targets: {}
CONFIG
ss project add "$root" --target claude,codex --skills-include alpha --json >/dev/null
ss project edit app --target claude --skills-include beta --skills-exclude alpha --agents-mode copy --agents-include helper --skills-naming standard --json

Expected:

  • exit_code: 0
  • jq: .applied == true and .project.targets == ["claude"]
  • jq: .project.skills.include == ["beta"] and .project.skills.exclude == ["alpha"]
  • jq: .project.skills.targetNaming == "standard"
  • jq: .project.agents.mode == "copy" and .project.agents.include == ["helper"]

5. Empty values reset overrides and unchanged edit reports a no-op

set -euo pipefail
ss() { /workspace/bin/skillshare "$@"; }
fixture=$(mktemp -d "$HOME/project-command-XXXXXX")
root="$fixture/app"
mkdir -p "$root" "$fixture/other" "$fixture/skills/alpha" "$fixture/skills/beta" "$fixture/agents" "$XDG_CONFIG_HOME/skillshare"
printf '%s\n' '---' 'name: alpha' 'description: Alpha fixture' '---' '# Alpha' > "$fixture/skills/alpha/SKILL.md"
printf '%s\n' '---' 'name: beta' 'description: Beta fixture' '---' '# Beta' > "$fixture/skills/beta/SKILL.md"
printf '%s\n' '---' 'name: helper' 'description: Helper agent fixture' '---' '# Helper' > "$fixture/agents/helper.md"
cat > "$XDG_CONFIG_HOME/skillshare/config.yaml" <<CONFIG
sources:
  skills: $fixture/skills
  agents: $fixture/agents
mode: merge
targets: {}
CONFIG
ss project add "$root" --target claude --name work --skills-mode copy --skills-naming prefixed --skills-include alpha --agents --json >/dev/null
ss project edit work --name= --skills-mode= --skills-naming= --skills-include= --no-agents --json > "$fixture/reset.json"
jq -e '.project.name == "app" and .project.skills.mode == "" and .project.skills.targetNaming == null and .project.skills.include == [] and .project.agents == null' "$fixture/reset.json" >/dev/null
ss project edit app --json

Expected:

  • exit_code: 0
  • jq: .applied == false and .unchanged == true
set -euo pipefail
ss() { /workspace/bin/skillshare "$@"; }
fixture=$(mktemp -d "$HOME/project-command-XXXXXX")
root="$fixture/app"
mkdir -p "$root" "$fixture/other" "$fixture/skills/alpha" "$fixture/skills/beta" "$fixture/agents" "$XDG_CONFIG_HOME/skillshare"
printf '%s\n' '---' 'name: alpha' 'description: Alpha fixture' '---' '# Alpha' > "$fixture/skills/alpha/SKILL.md"
printf '%s\n' '---' 'name: beta' 'description: Beta fixture' '---' '# Beta' > "$fixture/skills/beta/SKILL.md"
printf '%s\n' '---' 'name: helper' 'description: Helper agent fixture' '---' '# Helper' > "$fixture/agents/helper.md"
cat > "$XDG_CONFIG_HOME/skillshare/config.yaml" <<CONFIG
sources:
  skills: $fixture/skills
  agents: $fixture/agents
mode: merge
targets: {}
CONFIG
ss project add "$root" --target claude --json >/dev/null
cp "$XDG_CONFIG_HOME/skillshare/config.yaml" "$fixture/before.yaml"
set +e
ss project edit app --agents-mode symlink --agents-include helper --json > "$fixture/result.json"
code=$?
set -e
cmp "$fixture/before.yaml" "$XDG_CONFIG_HOME/skillshare/config.yaml"
cat "$fixture/result.json"
exit "$code"

Expected:

  • exit_code: 1
  • jq: .error | contains("agent include/exclude")

7. Project config inside the folder does not change command scope

set -euo pipefail
ss() { /workspace/bin/skillshare "$@"; }
fixture=$(mktemp -d "$HOME/project-command-XXXXXX")
root="$fixture/app"
mkdir -p "$root" "$fixture/other" "$fixture/skills/alpha" "$fixture/skills/beta" "$fixture/agents" "$XDG_CONFIG_HOME/skillshare"
printf '%s\n' '---' 'name: alpha' 'description: Alpha fixture' '---' '# Alpha' > "$fixture/skills/alpha/SKILL.md"
printf '%s\n' '---' 'name: beta' 'description: Beta fixture' '---' '# Beta' > "$fixture/skills/beta/SKILL.md"
printf '%s\n' '---' 'name: helper' 'description: Helper agent fixture' '---' '# Helper' > "$fixture/agents/helper.md"
cat > "$XDG_CONFIG_HOME/skillshare/config.yaml" <<CONFIG
sources:
  skills: $fixture/skills
  agents: $fixture/agents
mode: merge
targets: {}
CONFIG
mkdir -p "$root/.skillshare"
printf '%s\n' 'targets: [claude]' > "$root/.skillshare/config.yaml"
cp "$root/.skillshare/config.yaml" "$fixture/project-before.yaml"
cd "$root"
ss project add . --target claude --json >/dev/null
cmp "$root/.skillshare/config.yaml" "$fixture/project-before.yaml"
ss project list --json

Expected:

  • exit_code: 0
  • jq: (.projects | length) == 1
  • jq: .projects[0].name == "app" and .projects[0].hasOwnConfig == true

8. Explicit project mode is rejected as JSON

set -euo pipefail
ss() { /workspace/bin/skillshare "$@"; }
fixture=$(mktemp -d "$HOME/project-command-XXXXXX")
root="$fixture/app"
mkdir -p "$root" "$fixture/other" "$fixture/skills/alpha" "$fixture/skills/beta" "$fixture/agents" "$XDG_CONFIG_HOME/skillshare"
printf '%s\n' '---' 'name: alpha' 'description: Alpha fixture' '---' '# Alpha' > "$fixture/skills/alpha/SKILL.md"
printf '%s\n' '---' 'name: beta' 'description: Beta fixture' '---' '# Beta' > "$fixture/skills/beta/SKILL.md"
printf '%s\n' '---' 'name: helper' 'description: Helper agent fixture' '---' '# Helper' > "$fixture/agents/helper.md"
cat > "$XDG_CONFIG_HOME/skillshare/config.yaml" <<CONFIG
sources:
  skills: $fixture/skills
  agents: $fixture/agents
mode: merge
targets: {}
CONFIG
ss project list -p --json

Expected:

  • exit_code: 1
  • jq: .error == "projects belong in the global config"

9. Ambiguous name and relative root are rejected

set -euo pipefail
ss() { /workspace/bin/skillshare "$@"; }
fixture=$(mktemp -d "$HOME/project-command-XXXXXX")
root="$fixture/app"
mkdir -p "$root" "$fixture/other" "$fixture/skills/alpha" "$fixture/skills/beta" "$fixture/agents" "$XDG_CONFIG_HOME/skillshare"
printf '%s\n' '---' 'name: alpha' 'description: Alpha fixture' '---' '# Alpha' > "$fixture/skills/alpha/SKILL.md"
printf '%s\n' '---' 'name: beta' 'description: Beta fixture' '---' '# Beta' > "$fixture/skills/beta/SKILL.md"
printf '%s\n' '---' 'name: helper' 'description: Helper agent fixture' '---' '# Helper' > "$fixture/agents/helper.md"
cat > "$XDG_CONFIG_HOME/skillshare/config.yaml" <<CONFIG
sources:
  skills: $fixture/skills
  agents: $fixture/agents
mode: merge
targets: {}
CONFIG
ss project add "$root" --target claude --name named --json >/dev/null
mkdir -p "$fixture/named"
ss project add "$fixture/named" --target claude --name other --json >/dev/null
cd "$fixture"
ss project show named --json

Expected:

  • exit_code: 1
  • jq: .error | contains("ambiguous")

10. Saved add reports partial sync and leaves the other project untouched

set -euo pipefail
ss() { /workspace/bin/skillshare "$@"; }
fixture=$(mktemp -d "$HOME/project-command-XXXXXX")
root="$fixture/app"
mkdir -p "$root" "$fixture/other" "$fixture/skills/alpha" "$fixture/skills/beta" "$fixture/agents" "$XDG_CONFIG_HOME/skillshare"
printf '%s\n' '---' 'name: alpha' 'description: Alpha fixture' '---' '# Alpha' > "$fixture/skills/alpha/SKILL.md"
printf '%s\n' '---' 'name: beta' 'description: Beta fixture' '---' '# Beta' > "$fixture/skills/beta/SKILL.md"
printf '%s\n' '---' 'name: helper' 'description: Helper agent fixture' '---' '# Helper' > "$fixture/agents/helper.md"
cat > "$XDG_CONFIG_HOME/skillshare/config.yaml" <<CONFIG
sources:
  skills: $fixture/skills
  agents: $fixture/agents
mode: merge
targets: {}
CONFIG
ss project add "$fixture/other" --target claude --json >/dev/null
ln -s "$fixture/absent-parent" "$root/.agents"
set +e
ss project add "$root" --target claude,codex --sync --json > "$fixture/result.json"
code=$?
set -e
ss project show app --json >/dev/null
test -L "$root/.claude/skills/alpha"
test ! -e "$fixture/other/.claude"
cat "$fixture/result.json"
exit "$code"

Expected:

  • exit_code: 1
  • jq: .action == "add" and .applied == true
  • jq: (.sync.failed | length) > 0 and (.sync.results | length) > 0

11. Standalone sync retries after the target conflict is removed

set -euo pipefail
ss() { /workspace/bin/skillshare "$@"; }
fixture=$(mktemp -d "$HOME/project-command-XXXXXX")
root="$fixture/app"
mkdir -p "$root" "$fixture/other" "$fixture/skills/alpha" "$fixture/skills/beta" "$fixture/agents" "$XDG_CONFIG_HOME/skillshare"
printf '%s\n' '---' 'name: alpha' 'description: Alpha fixture' '---' '# Alpha' > "$fixture/skills/alpha/SKILL.md"
printf '%s\n' '---' 'name: beta' 'description: Beta fixture' '---' '# Beta' > "$fixture/skills/beta/SKILL.md"
printf '%s\n' '---' 'name: helper' 'description: Helper agent fixture' '---' '# Helper' > "$fixture/agents/helper.md"
cat > "$XDG_CONFIG_HOME/skillshare/config.yaml" <<CONFIG
sources:
  skills: $fixture/skills
  agents: $fixture/agents
mode: merge
targets: {}
CONFIG
ln -s "$fixture/absent-parent" "$root/.agents"
set +e
ss project add "$root" --target claude,codex --sync --json >/dev/null
code=$?
set -e
test "$code" -eq 1
unlink "$root/.agents"
ss project sync app --json > "$fixture/result.json"
test -L "$root/.agents/skills/alpha"
test -L "$root/.claude/skills/beta"
cat "$fixture/result.json"

Expected:

  • exit_code: 0
  • jq: .action == "sync" and .applied == null
  • jq: .sync.failed == [] and (.sync.results | length) > 0

12. Merge removal preview is read-only and removal copies back skills, keeping agents

set -euo pipefail
ss() { /workspace/bin/skillshare "$@"; }
fixture=$(mktemp -d "$HOME/project-command-XXXXXX")
root="$fixture/app"
mkdir -p "$root" "$fixture/other" "$fixture/skills/alpha" "$fixture/skills/beta" "$fixture/agents" "$XDG_CONFIG_HOME/skillshare"
printf '%s\n' '---' 'name: alpha' 'description: Alpha fixture' '---' '# Alpha' > "$fixture/skills/alpha/SKILL.md"
printf '%s\n' '---' 'name: beta' 'description: Beta fixture' '---' '# Beta' > "$fixture/skills/beta/SKILL.md"
printf '%s\n' '---' 'name: helper' 'description: Helper agent fixture' '---' '# Helper' > "$fixture/agents/helper.md"
cat > "$XDG_CONFIG_HOME/skillshare/config.yaml" <<CONFIG
sources:
  skills: $fixture/skills
  agents: $fixture/agents
mode: merge
targets: {}
CONFIG
ss project add "$root" --target claude --agents --sync --json >/dev/null
cp "$XDG_CONFIG_HOME/skillshare/config.yaml" "$fixture/before.yaml"
ss project remove app --dry-run --json > "$fixture/preview.json"
cmp "$fixture/before.yaml" "$XDG_CONFIG_HOME/skillshare/config.yaml"
test -L "$root/.claude/skills/alpha"
jq -e '.applied == false and (.detach.copiedBack | length) > 0' "$fixture/preview.json" >/dev/null
ss project remove app --yes --json > "$fixture/result.json"
test -f "$root/.claude/skills/alpha/SKILL.md"
test ! -L "$root/.claude/skills/alpha"
test -f "$root/.claude/agents/helper.md"
ss project list --json | jq -e '.projects == []' >/dev/null
cat "$fixture/result.json"

Expected:

  • exit_code: 0
  • jq: .action == "remove" and .registration == "removed" and .applied == true
  • jq: (.detach.copiedBack | length) > 0

13. Copy removal keeps files and removes the manifest

set -euo pipefail
ss() { /workspace/bin/skillshare "$@"; }
fixture=$(mktemp -d "$HOME/project-command-XXXXXX")
root="$fixture/app"
mkdir -p "$root" "$fixture/other" "$fixture/skills/alpha" "$fixture/skills/beta" "$fixture/agents" "$XDG_CONFIG_HOME/skillshare"
printf '%s\n' '---' 'name: alpha' 'description: Alpha fixture' '---' '# Alpha' > "$fixture/skills/alpha/SKILL.md"
printf '%s\n' '---' 'name: beta' 'description: Beta fixture' '---' '# Beta' > "$fixture/skills/beta/SKILL.md"
printf '%s\n' '---' 'name: helper' 'description: Helper agent fixture' '---' '# Helper' > "$fixture/agents/helper.md"
cat > "$XDG_CONFIG_HOME/skillshare/config.yaml" <<CONFIG
sources:
  skills: $fixture/skills
  agents: $fixture/agents
mode: merge
targets: {}
CONFIG
ss project add "$root" --target claude --skills-mode copy --sync --json >/dev/null
test -f "$root/.claude/skills/.skillshare-manifest.json"
ss project remove app --yes --json > "$fixture/result.json"
test -f "$root/.claude/skills/alpha/SKILL.md"
test ! -e "$root/.claude/skills/.skillshare-manifest.json"
cat "$fixture/result.json"

Expected:

  • exit_code: 0
  • jq: .registration == "removed" and (.detach.retained | length) > 0
set -euo pipefail
ss() { /workspace/bin/skillshare "$@"; }
fixture=$(mktemp -d "$HOME/project-command-XXXXXX")
root="$fixture/app"
mkdir -p "$root" "$fixture/other" "$fixture/skills/alpha" "$fixture/skills/beta" "$fixture/agents" "$XDG_CONFIG_HOME/skillshare"
printf '%s\n' '---' 'name: alpha' 'description: Alpha fixture' '---' '# Alpha' > "$fixture/skills/alpha/SKILL.md"
printf '%s\n' '---' 'name: beta' 'description: Beta fixture' '---' '# Beta' > "$fixture/skills/beta/SKILL.md"
printf '%s\n' '---' 'name: helper' 'description: Helper agent fixture' '---' '# Helper' > "$fixture/agents/helper.md"
cat > "$XDG_CONFIG_HOME/skillshare/config.yaml" <<CONFIG
sources:
  skills: $fixture/skills
  agents: $fixture/agents
mode: merge
targets: {}
CONFIG
ss project add "$root" --target claude --skills-mode symlink --sync --json >/dev/null
test -L "$root/.claude/skills"
ss project remove app --yes --json > "$fixture/result.json"
test ! -L "$root/.claude/skills"
test -f "$fixture/skills/alpha/SKILL.md"
cat "$fixture/result.json"

Expected:

  • exit_code: 0
  • jq: .registration == "removed" and (.detach.removed | length) > 0

15. Scan registers checkouts once and a rescan only adds

set -euo pipefail
ss() { /workspace/bin/skillshare "$@"; }
fixture=$(mktemp -d "$HOME/project-command-XXXXXX")
suite="$fixture/suite"
mkdir -p "$suite/app-a/.git" "$suite/app-b/.git" "$suite/docs" "$suite/.worktrees/app-a" "$fixture/skills/team-alpha" "$XDG_CONFIG_HOME/skillshare"
printf 'gitdir: %s\n' "$suite/app-a/.git/worktrees/app-a" > "$suite/.worktrees/app-a/.git"
printf '%s\n' '---' 'name: team-alpha' 'description: Team fixture' '---' '# Team' > "$fixture/skills/team-alpha/SKILL.md"
cat > "$XDG_CONFIG_HOME/skillshare/config.yaml" <<CONFIG
sources:
  skills: $fixture/skills
targets: {}
CONFIG
args=(project add "$suite" --scan . --scan .worktrees --target codex --skills-include 'team-*')
before=$(cat "$XDG_CONFIG_HOME/skillshare/config.yaml")
ss "${args[@]}" -n --json >/dev/null
test "$before" = "$(cat "$XDG_CONFIG_HOME/skillshare/config.yaml")"
ss "${args[@]}" --sync --json >/dev/null
test -L "$suite/.worktrees/app-a/.agents/skills/team-alpha"
grep -q 'name: worktrees-app-a' "$XDG_CONFIG_HOME/skillshare/config.yaml"
ss project edit app-b --target codex,claude --json >/dev/null
mkdir -p "$suite/app-c/.git"
ss "${args[@]}" --json

Expected:

  • exit_code: 0
  • jq: ([.scan[] | select(.result == "added")] | length) == 1 and (.scan[] | select(.root | endswith("/app-c")) | .result) == "added" and (.scan[] | select(.root | endswith("/app-b")) | .result) == "skipped" and ([.scan[] | select(.root | endswith("/docs"))] | length) == 0

Pass Criteria

All 15 mdproof steps pass with zero failures or skips. JSON steps satisfy their jq assertions, expected rejection/partial-failure steps exit 1, and filesystem checks prove preview safety, sync scope, retry, detach behavior, and source survival.