me2resh/apexyard / .claude/skills/setup
setup
VerifiedFirst-run framework bootstrap — 3 exchanges (describe stack → defaults → accept/customize) and the fork is configured.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 61.9 KB |
| tests/README.md | markdown | 3.2 KB |
| tests/test_setup_first_push_text.shexecutable | script | 9.9 KB |
| tests/test_setup_reset.shexecutable | script | 5.8 KB |
| tests/test_setup_single_fork.shexecutable | script | 7.4 KB |
| tests/test_setup_split_portfolio_v2.shexecutable | script | 11.4 KB |
tests/README.md
View on GitHub# `/setup` tests
Regression tests for the `/setup` skill. The sandbox tests build a synthetic fork under `mktemp -d`, run the file-state actions the SKILL.md prescribes, then assert the post-state matches the spec. `test_setup_first_push_text.sh` pins Step 2b text and does not build a sandbox.
## What's tested
| Test | Covers | Reference in `SKILL.md` |
|------|--------|-------------------------|
| `test_setup_split_portfolio_v2.sh` | Split-portfolio v2 setup branch — config block with all 7 `portfolio.*` keys, `.apexyard-fork` marker, gitignore additions, `portfolio_validate` happy, `portfolio_is_v2` true, `resolve_ops_root` walks via the marker | Step 2b (config-block mode) + AgDR-0021 § B |
| `test_setup_single_fork.sh` | Single-fork setup branch — placeholder replacement in `onboarding.yaml`, marker written even in single-fork mode, no `portfolio:` block (defaults apply), in-fork registry resolution | Step 6 (single-fork branch) |
| `test_setup_reset.sh` | `--reset` flag — restore `onboarding.yaml` to the framework template defaults, idempotent on re-run | Step 1 (`--reset` mode detection) |
| `test_setup_first_push_text.sh` | Text pin for the operator commit and push. Staging is by name. The skill prints two command forms and verifies the exact ref. | Step 2b items 3–5 + AgDR-0252 |
## What's NOT tested
`/setup`'s interactive prompts (Step 2 "describe your stack", Step 2a privacy gate, Step 2c LSP enablement) are out of scope — they're operator-interactive and OS / shell-dependent. The tests target the file-state outcomes that survive every branch of the interactive flow.
The LSP enablement step (Step 2c) is doubly out of scope: it installs language-server binaries and mutates shell rc files. Driving that in a sandbox would require mock prerequisites (npm / pipx / go / rustup) that the framework can't ship.
## Running
```bash
# Individual test
bash .claude/skills/setup/tests/test_setup_split_portfolio_v2.sh
# All setup tests
for t in .claude/skills/setup/tests/test_*.sh; do bash "$t" || exit 1; done
```
## Adding a new test
1. Copy the closest existing test as a starting shape.
2. Match the conventions from `.claude/hooks/tests/test_split_portfolio_v2_migration.sh` (the canonical sandbox-test reference):
- `set -u` at the top
- `ROOT="$(cd "$(dirname "$0")/../../../.." && pwd)"` to resolve the fork root from the test file's location (four `..` for `setup/tests/test_*.sh`)
- `red()` / `green()` color helpers + per-case `==` banner echos
- `mark_pass` / `mark_fail` + a per-test `PASS` / `FAIL` counter
- Sandbox dir via `mktemp -d`
- `trap 'rm -rf "$TMP_ROOT"' EXIT` (single-quoted trap, double-quoted variable — shellcheck SC2064)
- Exit 0 on all-pass, 1 on any fail
3. Source `_lib-portfolio-paths.sh` from the sandbox's `.claude/hooks/` copy (NOT the live fork's) — copying the libs into the sandbox via the `cp "$LIB_*"` lines keeps the test hermetic.
4. Call `portfolio_clear_cache` before each new assertion that re-resolves portfolio paths; otherwise the per-process cache will return stale state from an earlier case.
---
*Part of [ApexYard](https://github.com/me2resh/apexyard) — multi-project SDLC framework for Claude Code · MIT.*
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |