@bbcsoftwarefactory/skills 0.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.json +2 -3
- package/dist/skills/code-quality-gate/SKILL.md +4 -5
- package/dist/skills/code-quality-gate/references/gate-bigo.md +1 -1
- package/dist/skills/delivery-coordinator/SKILL.md +7 -8
- package/dist/skills/delivery-coordinator/references/hud-output.md +1 -1
- package/dist/skills/delivery-coordinator/references/issue-claim.md +5 -5
- package/dist/skills/delivery-coordinator/references/issue-dedup.md +1 -1
- package/dist/skills/delivery-coordinator/references/worktree-isolation.md +2 -2
- package/dist/skills/greptile-review-loop/SKILL.md +3 -4
- package/dist/skills/greptile-review-loop/references/review-protocol.md +1 -1
- package/dist/skills/issue-reviewer/SKILL.md +10 -13
- package/dist/skills/issue-reviewer/references/review-format.md +1 -1
- package/dist/skills/issue-reviewer/references/triage.md +6 -6
- package/dist/skills/question-gate/SKILL.md +6 -8
- package/dist/skills/question-gate/references/client-hooks.md +10 -10
- package/dist/skills/question-gate/references/diagram-routing.md +3 -3
- package/dist/skills/skill-clean-architecture/SKILL.md +2 -3
- package/dist/skills/skill-clean-architecture/references/source-headers.md +2 -3
- package/dist/skills/tool-depot/references/readonly-access.md +1 -1
- package/dist/skills/tool-depot/references/tool-catalog.json +2 -2
- package/dist/skills/watcher-observability/SKILL.md +3 -4
- package/dist/skills/watcher-observability/references/batch-protocol.md +6 -6
- package/dist/skills/watcher-observability/references/configuration.md +1 -1
- package/dist/skills/watcher-observability/references/error-scan.md +1 -1
- package/dist/skills/watcher-observability/references/live-protocol.md +8 -8
- package/dist/skills/watcher-observability/references/server-account.md +8 -8
- package/dist/skills/watcher-observability/server/watcher-gate.sh +1 -1
- package/dist/skills/watcher-observability/tests/watcher-gate.test.sh +10 -7
- package/dist/skills/workflow-auditor/SKILL.md +3 -5
- package/dist/skills/workflow-auditor/references/audit-protocol.md +3 -3
- package/dist/skills/workflow-auditor/references/ledger.md +1 -1
- package/package.json +26 -27
- package/dist/skills/code-quality-gate/scripts/extract-diff-scope.py +0 -225
- package/dist/skills/code-quality-gate/tests/extract-diff-scope.test.sh +0 -200
- package/dist/skills/delivery-coordinator/scripts/check-issue-claim.py +0 -363
- package/dist/skills/delivery-coordinator/scripts/check-worktree-guard.py +0 -220
- package/dist/skills/delivery-coordinator/scripts/classify-change-lane.py +0 -263
- package/dist/skills/delivery-coordinator/tests/check-issue-claim.test.sh +0 -221
- package/dist/skills/delivery-coordinator/tests/check-worktree-guard.test.sh +0 -123
- package/dist/skills/delivery-coordinator/tests/classify-change-lane.test.sh +0 -124
- package/dist/skills/greptile-review-loop/scripts/review-loop.py +0 -435
- package/dist/skills/greptile-review-loop/tests/review-loop.test.sh +0 -331
- package/dist/skills/issue-reviewer/scripts/fetch-issue-attachments.py +0 -239
- package/dist/skills/issue-reviewer/scripts/plan-issue-triage.py +0 -311
- package/dist/skills/issue-reviewer/tests/fetch-issue-attachments.test.sh +0 -90
- package/dist/skills/issue-reviewer/tests/plan-issue-triage.test.sh +0 -168
- package/dist/skills/question-gate/scripts/triage-question.py +0 -713
- package/dist/skills/question-gate/tests/question-corpus.test.sh +0 -32
- package/dist/skills/question-gate/tests/triage-question.test.sh +0 -441
- package/dist/skills/skill-clean-architecture/scripts/measure-bigo.py +0 -427
- package/dist/skills/skill-clean-architecture/tests/measure-bigo.test.sh +0 -222
- package/dist/skills/watcher-observability/scripts/error-scan.py +0 -318
- package/dist/skills/watcher-observability/scripts/resolve-containers.py +0 -155
- package/dist/skills/watcher-observability/scripts/save-counts.py +0 -381
- package/dist/skills/watcher-observability/scripts/summarize-logs.py +0 -113
- package/dist/skills/watcher-observability/scripts/watch-live.py +0 -606
- package/dist/skills/watcher-observability/tests/error-scan.test.sh +0 -257
- package/dist/skills/watcher-observability/tests/live-windows.test.sh +0 -177
- package/dist/skills/watcher-observability/tests/resolve-containers.test.sh +0 -87
- package/dist/skills/watcher-observability/tests/save-counts.test.sh +0 -338
- package/dist/skills/watcher-observability/tests/sleuth.test.sh +0 -176
- package/dist/skills/watcher-observability/tests/summarize-logs.test.sh +0 -105
- package/dist/skills/watcher-observability/tests/watcher-config.test.sh +0 -70
- package/dist/skills/workflow-auditor/scripts/audit-ledger.py +0 -624
- package/dist/skills/workflow-auditor/scripts/list-zed-commands.py +0 -183
- package/dist/skills/workflow-auditor/scripts/render-workflow.py +0 -201
- package/dist/skills/workflow-auditor/scripts/validate-skills.py +0 -444
- package/dist/skills/workflow-auditor/tests/audit-ledger.test.sh +0 -660
- package/dist/skills/workflow-auditor/tests/list-zed-commands.test.sh +0 -93
- package/dist/skills/workflow-auditor/tests/render-workflow.test.sh +0 -135
- package/dist/skills/workflow-auditor/tests/validate-skills.test.sh +0 -190
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Suite for the Watcher's alias-prefix configuration (#60). The real scripts run
|
|
3
|
-
# against a fake ssh that records whether it was called.
|
|
4
|
-
set -u
|
|
5
|
-
cd -- "${BASH_SOURCE[0]%/*}/.."
|
|
6
|
-
SCRIPTS="$PWD/scripts"
|
|
7
|
-
PYTHON_BIN=$(command -v python3 || command -v python)
|
|
8
|
-
PYTHON_BIN=$("$PYTHON_BIN" -c 'import sys; print(sys.executable)')
|
|
9
|
-
scratch=$(mktemp -d)
|
|
10
|
-
trap 'rm -rf -- "$scratch"' EXIT
|
|
11
|
-
checks=0
|
|
12
|
-
failures=0
|
|
13
|
-
fail() { printf 'FAIL [%s]: %s\n' "$1" "$2" >&2; failures=$((failures + 1)); }
|
|
14
|
-
|
|
15
|
-
mkdir -p "$scratch/bin" "$scratch/repo/sub"
|
|
16
|
-
printf '#!/usr/bin/env bash\nprintf "called\\n" >>"%s/ssh-calls"\nprintf "2026-01-01T00:00:00Z ERROR boom\\n"\n' "$scratch" >"$scratch/bin/ssh"
|
|
17
|
-
chmod +x "$scratch/bin/ssh"
|
|
18
|
-
git -C "$scratch/repo" init -q
|
|
19
|
-
printf '/tmp_logs/\n' >"$scratch/repo/.gitignore"
|
|
20
|
-
export PATH="$scratch/bin:$PATH"
|
|
21
|
-
|
|
22
|
-
run() { # label, cwd, want rc ("0" or "fail"), want ssh called (yes/no), script args...
|
|
23
|
-
local label=$1 dir=$2 want=$3 called=$4 rc=0 out
|
|
24
|
-
shift 4
|
|
25
|
-
rm -f "$scratch/ssh-calls"
|
|
26
|
-
out=$(cd "$dir" && "$PYTHON_BIN" -I -B "$@" 2>&1) || rc=$?
|
|
27
|
-
checks=$((checks + 1))
|
|
28
|
-
if [[ $want == 0 && $rc != 0 ]] || [[ $want == fail && $rc == 0 ]]; then
|
|
29
|
-
fail "$label" "rc=$rc want=$want: $out"; return
|
|
30
|
-
fi
|
|
31
|
-
if [[ $called == no && -e $scratch/ssh-calls ]]; then fail "$label" "ssh was called: $out"; fi
|
|
32
|
-
if [[ $called == yes && ! -e $scratch/ssh-calls ]]; then fail "$label" "ssh was not called: $out"; fi
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
# 1. Default configuration (watcher.json in the skill): bb-/bbc- as before.
|
|
36
|
-
run 'default accepts bb-' "$scratch/repo" 0 yes "$SCRIPTS/error-scan.py" bb-prod app-1 5
|
|
37
|
-
run 'default rejects acme-' "$scratch/repo" fail no "$SCRIPTS/error-scan.py" acme-prod app-1 5
|
|
38
|
-
run 'resolver default bbc-' "$scratch/repo" 0 no "$SCRIPTS/resolve-containers.py" bbc-prod app-1
|
|
39
|
-
|
|
40
|
-
# 2. A project override in the Git root, found from a subdirectory too.
|
|
41
|
-
printf '{"alias_prefixes": ["acme", "acme2"]}\n' >"$scratch/repo/.watcher.json"
|
|
42
|
-
run 'override accepts acme-' "$scratch/repo/sub" 0 yes "$SCRIPTS/error-scan.py" acme-prod app-1 5
|
|
43
|
-
run 'override rejects bb-' "$scratch/repo/sub" fail no "$SCRIPTS/error-scan.py" bb-prod app-1 5
|
|
44
|
-
run 'resolver override acme2-' "$scratch/repo" 0 no "$SCRIPTS/resolve-containers.py" acme2-eu app-1
|
|
45
|
-
run 'resolver override rejects bbc-' "$scratch/repo" fail no "$SCRIPTS/resolve-containers.py" bbc-prod app-1
|
|
46
|
-
run 'save-counts override rejects bb-' "$scratch/repo" fail no "$SCRIPTS/save-counts.py" --no-save historical bb-prod app-1
|
|
47
|
-
run 'live override rejects bb-' "$scratch/repo" fail no "$SCRIPTS/watch-live.py" bb-prod app-1
|
|
48
|
-
# A prefix must not match a longer alias by accident: "acme" is not "acmex".
|
|
49
|
-
run 'no partial prefix match' "$scratch/repo" fail no "$SCRIPTS/error-scan.py" acmex-prod app-1 5
|
|
50
|
-
|
|
51
|
-
# 3. Invalid configuration: refuse before any connection, with a clear message.
|
|
52
|
-
for bad in '{"alias_prefixes": []}' '{"alias_prefixes": ["*"]}' '{"alias_prefixes": ["ACME"]}' \
|
|
53
|
-
'{"alias_prefixes": ["a.b"]}' '{"alias_prefixes": ["acme"], "extra": 1}' '{"alias_prefixes": "acme"}' \
|
|
54
|
-
'{"alias_prefixes": ["a","b","c","d","e","f","g","h","i"]}' '{"alias_prefixes": ["toolongprefix-abcdefgh"]}' \
|
|
55
|
-
'not json'; do
|
|
56
|
-
printf '%s\n' "$bad" >"$scratch/repo/.watcher.json"
|
|
57
|
-
rm -f "$scratch/ssh-calls"
|
|
58
|
-
out=$(cd "$scratch/repo" && "$PYTHON_BIN" -I -B "$SCRIPTS/error-scan.py" acme-prod app-1 5 2>&1); rc=$?
|
|
59
|
-
checks=$((checks + 1))
|
|
60
|
-
[[ $rc != 0 && $out == *'configuration'* && ! -e $scratch/ssh-calls ]] || fail "invalid config: $bad" "rc=$rc out=$out"
|
|
61
|
-
done
|
|
62
|
-
|
|
63
|
-
# 4. Outside a Git repository there is no override: the skill default applies.
|
|
64
|
-
rm -f "$scratch/repo/.watcher.json"
|
|
65
|
-
mkdir -p "$scratch/nogit"
|
|
66
|
-
printf '{"alias_prefixes": ["acme"]}\n' >"$scratch/nogit/.watcher.json"
|
|
67
|
-
run 'no git: default applies' "$scratch/nogit" 0 yes "$SCRIPTS/error-scan.py" bb-prod app-1 5
|
|
68
|
-
|
|
69
|
-
printf 'watcher-config.test.sh: %d checks, %d failed\n' "$checks" "$failures"
|
|
70
|
-
[[ $failures == 0 ]]
|