Skip to content

donaldfilimon/abi / .agents/skills/cluster-demo-guide

cluster-demo-guide

Verified

Build the abi CLI and run the in-process WDBX Raft-style consensus demo — leader election, log replication, leader failover, and re-election — plus the single-node cluster status. Use when asked about WDBX clustering, consensus, Raft, or failover behavior.

FileKindSize
SKILL.mdskill md1.6 KB
cluster.shexecutablescript1.5 KB

cluster.sh

View on GitHub
#!/usr/bin/env bash
# cluster-demo-guide driver: build the abi CLI and exercise the in-process
# Raft-style consensus demo (elect -> replicate -> fail over -> re-elect) plus
# the single-node status report. Asserts the consensus markers.
#
# Usage: .agents/skills/cluster-demo-guide/cluster.sh [nodes]   # default 3
set -uo pipefail
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
REPO_ROOT=$(cd -- "$SCRIPT_DIR/../../.." && pwd)
cd "$REPO_ROOT"
ABI="$REPO_ROOT/target/debug/abi"
NODES="${1:-3}"
case "$NODES" in ''|*[!0-9]*) echo "usage: cluster.sh [nodes]" >&2; exit 2;; esac
fail=0
say() { printf '\n=== %s ===\n' "$*"; }
check() { local label="$1" expect="$2"; shift 2; local out; out=$("$@" 2>&1)
    printf '%s\n' "$out"
    grep -qF -- "$expect" <<<"$out" && echo "[ok] $label" || { echo "[FAIL] $label (missing: $expect)"; fail=$((fail+1)); }; }

say "build cli"
./tools/cargo.sh build -p abi-cli >/dev/null 2>&1 && echo "[ok] build" || { echo "[FAIL] build"; exit 1; }
[ -x "$ABI" ] || { echo "[FAIL] no binary"; exit 1; }

check "cluster status"      "cluster: nodes="     "$ABI" wdbx cluster status
check "demo: election"      "leader_elected=true" "$ABI" wdbx cluster demo "$NODES"
check "demo: replication"   "replicate("          "$ABI" wdbx cluster demo "$NODES"
check "demo: failover+reelect" "re-election"       "$ABI" wdbx cluster demo "$NODES"

say "summary"; echo "failed: $fail"
[ "$fail" -eq 0 ] && echo "RESULT: PASS — cluster consensus demo ran." || echo "RESULT: FAIL — $fail check(s)."
exit "$fail"
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall