Files
Bo c6558508d1 Consolidate AgentOps into a 34-skill engineering menu (#1133)
AgentOps' 55-skill catalog contained overlapping entry points, stale
routes and descriptions that could lose meaningful guidance in the Codex
projection. This change consolidates 21 roots into existing owners,
leaving 34 distinct skills and a generated, task-oriented menu. README
documents every retired name and its replacement.

Planning now establishes observable behavior in the caller's existing
intent, using proportional Given/When/Then examples and domain language.
Implementation and final validation carry those same examples forward.
Original adaptations informed by Matt Pocock's engineering skills
strengthen existing owners rather than adding a new workflow. Routine
edits need no mandatory plan, coverage report, mutation exercise or
learning artifact.

Codex retains complete source descriptions and translates explicit-only
invocation policy. All descriptions fit the existing 180-character
limit; the root instructions retain their 250-line limit. Generated
catalogs, projections, routers, moved references/helpers and their live
consumers are updated together. RPI remains explicitly selected.

Validation passed: projection/conformance checks, the local aggregate
(10 passed; one existing optional-directory skip), and exact-commit CI
covering the complete gate registry, Bats, Go build/vet/race/coverage,
Windows and security. A fresh author-distinct reviewer passed all
acceptance criteria over the complete 573-path subject at
aa642a55d6, including the installed-link
and protected-backup changes. Review findings were repaired and
revalidated. Existing ranker goldens are regression checks, not
model-quality measurements. A fixed six-case fresh-context pilot
supplied an exact candidate menu: three of four targeted cases loaded
expected guidance, a simple refactor selected no skill, and both
no-skill controls selected none. No wrong owner was selected. This pilot
preceded final wording repairs for existing ranker/context limits; it
does not establish installed automatic activation, coding benefit or
savings. No live coding task was run in that pilot.
2026-09-10 22:18:05 -04:00

68 lines
2.5 KiB
Bash

#!/usr/bin/env bats
# Lightweight smoke tests for scripts/install-bd.sh. Network-dependent paths
# (download, version-resolve from GitHub) are skipped here to keep CI offline-
# safe; the verify-existing-install short-circuit and the unsupported-platform
# branches are exercised.
setup() {
REPO_ROOT="$(cd "$BATS_TEST_DIRNAME/../.." && pwd)"
SCRIPT="$REPO_ROOT/scripts/install-bd.sh"
}
@test "script exists and is executable" {
[ -f "$SCRIPT" ]
[ -x "$SCRIPT" ]
}
@test "--help prints usage and exits 0" {
run "$SCRIPT" --help
[ "$status" -eq 0 ]
[[ "$output" == *"install the \`bd\`"* ]]
[[ "$output" == *"--version"* ]]
}
@test "rejects unknown flag" {
run "$SCRIPT" --bogus
[ "$status" -ne 0 ]
[[ "$output" == *"unknown flag"* ]]
}
@test "short-circuits when bd is already installed at the requested version" {
if ! command -v bd >/dev/null 2>&1; then
skip "bd not on PATH on this host"
fi
have="$(bd version 2>&1 | head -1 || true)"
# Pull the version number out of "bd version 1.0.3 (Homebrew)".
ver="$(printf '%s' "$have" | sed -n 's/.*version[[:space:]]\([0-9.][0-9.]*\).*/\1/p' | head -1)"
if [[ -z "$ver" ]]; then
skip "could not parse current bd version: $have"
fi
run "$SCRIPT" --version "v$ver"
[ "$status" -eq 0 ]
[[ "$output" == *"already installed"* ]] || [[ "$output" == *"skipping"* ]]
}
@test "documentation setup keeps bd installation with install-bd.sh" {
# Documentation setup absorbed bootstrap; installation remains an explicit tool operation.
run grep -q "install-bd.sh" "$REPO_ROOT/skills/doc/SKILL.md"
[ "$status" -ne 0 ]
run bash -c 'tr "\n" " " < "$1" | grep -Fq "Setup does not install tools"' _ "$REPO_ROOT/skills/doc/SKILL.md"
[ "$status" -eq 0 ]
[ -x "$SCRIPT" ]
}
@test "installer-common.sh pin in install-bd.sh matches the file on disk" {
# The curl|bash path of install-bd.sh sources installer-common.sh only
# after verifying it against INSTALLER_COMMON_SHA256. Any edit to
# installer-common.sh must bump that pin or remote installs fail closed.
pin="$(sed -n 's/^INSTALLER_COMMON_SHA256="\([0-9a-f]\{64\}\)"$/\1/p' "$SCRIPT")"
[ -n "$pin" ]
if command -v sha256sum >/dev/null 2>&1; then
actual="$(sha256sum "$REPO_ROOT/scripts/lib/installer-common.sh" | awk '{print $1}')"
else
actual="$(shasum -a 256 "$REPO_ROOT/scripts/lib/installer-common.sh" | awk '{print $1}')"
fi
[ "$pin" = "$actual" ]
}