@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.
Files changed (71) hide show
  1. package/dist/index.json +2 -3
  2. package/dist/skills/code-quality-gate/SKILL.md +4 -5
  3. package/dist/skills/code-quality-gate/references/gate-bigo.md +1 -1
  4. package/dist/skills/delivery-coordinator/SKILL.md +7 -8
  5. package/dist/skills/delivery-coordinator/references/hud-output.md +1 -1
  6. package/dist/skills/delivery-coordinator/references/issue-claim.md +5 -5
  7. package/dist/skills/delivery-coordinator/references/issue-dedup.md +1 -1
  8. package/dist/skills/delivery-coordinator/references/worktree-isolation.md +2 -2
  9. package/dist/skills/greptile-review-loop/SKILL.md +3 -4
  10. package/dist/skills/greptile-review-loop/references/review-protocol.md +1 -1
  11. package/dist/skills/issue-reviewer/SKILL.md +10 -13
  12. package/dist/skills/issue-reviewer/references/review-format.md +1 -1
  13. package/dist/skills/issue-reviewer/references/triage.md +6 -6
  14. package/dist/skills/question-gate/SKILL.md +6 -8
  15. package/dist/skills/question-gate/references/client-hooks.md +10 -10
  16. package/dist/skills/question-gate/references/diagram-routing.md +3 -3
  17. package/dist/skills/skill-clean-architecture/SKILL.md +2 -3
  18. package/dist/skills/skill-clean-architecture/references/source-headers.md +2 -3
  19. package/dist/skills/tool-depot/references/readonly-access.md +1 -1
  20. package/dist/skills/tool-depot/references/tool-catalog.json +2 -2
  21. package/dist/skills/watcher-observability/SKILL.md +3 -4
  22. package/dist/skills/watcher-observability/references/batch-protocol.md +6 -6
  23. package/dist/skills/watcher-observability/references/configuration.md +1 -1
  24. package/dist/skills/watcher-observability/references/error-scan.md +1 -1
  25. package/dist/skills/watcher-observability/references/live-protocol.md +8 -8
  26. package/dist/skills/watcher-observability/references/server-account.md +8 -8
  27. package/dist/skills/watcher-observability/server/watcher-gate.sh +1 -1
  28. package/dist/skills/watcher-observability/tests/watcher-gate.test.sh +10 -7
  29. package/dist/skills/workflow-auditor/SKILL.md +3 -5
  30. package/dist/skills/workflow-auditor/references/audit-protocol.md +3 -3
  31. package/dist/skills/workflow-auditor/references/ledger.md +1 -1
  32. package/package.json +26 -27
  33. package/dist/skills/code-quality-gate/scripts/extract-diff-scope.py +0 -225
  34. package/dist/skills/code-quality-gate/tests/extract-diff-scope.test.sh +0 -200
  35. package/dist/skills/delivery-coordinator/scripts/check-issue-claim.py +0 -363
  36. package/dist/skills/delivery-coordinator/scripts/check-worktree-guard.py +0 -220
  37. package/dist/skills/delivery-coordinator/scripts/classify-change-lane.py +0 -263
  38. package/dist/skills/delivery-coordinator/tests/check-issue-claim.test.sh +0 -221
  39. package/dist/skills/delivery-coordinator/tests/check-worktree-guard.test.sh +0 -123
  40. package/dist/skills/delivery-coordinator/tests/classify-change-lane.test.sh +0 -124
  41. package/dist/skills/greptile-review-loop/scripts/review-loop.py +0 -435
  42. package/dist/skills/greptile-review-loop/tests/review-loop.test.sh +0 -331
  43. package/dist/skills/issue-reviewer/scripts/fetch-issue-attachments.py +0 -239
  44. package/dist/skills/issue-reviewer/scripts/plan-issue-triage.py +0 -311
  45. package/dist/skills/issue-reviewer/tests/fetch-issue-attachments.test.sh +0 -90
  46. package/dist/skills/issue-reviewer/tests/plan-issue-triage.test.sh +0 -168
  47. package/dist/skills/question-gate/scripts/triage-question.py +0 -713
  48. package/dist/skills/question-gate/tests/question-corpus.test.sh +0 -32
  49. package/dist/skills/question-gate/tests/triage-question.test.sh +0 -441
  50. package/dist/skills/skill-clean-architecture/scripts/measure-bigo.py +0 -427
  51. package/dist/skills/skill-clean-architecture/tests/measure-bigo.test.sh +0 -222
  52. package/dist/skills/watcher-observability/scripts/error-scan.py +0 -318
  53. package/dist/skills/watcher-observability/scripts/resolve-containers.py +0 -155
  54. package/dist/skills/watcher-observability/scripts/save-counts.py +0 -381
  55. package/dist/skills/watcher-observability/scripts/summarize-logs.py +0 -113
  56. package/dist/skills/watcher-observability/scripts/watch-live.py +0 -606
  57. package/dist/skills/watcher-observability/tests/error-scan.test.sh +0 -257
  58. package/dist/skills/watcher-observability/tests/live-windows.test.sh +0 -177
  59. package/dist/skills/watcher-observability/tests/resolve-containers.test.sh +0 -87
  60. package/dist/skills/watcher-observability/tests/save-counts.test.sh +0 -338
  61. package/dist/skills/watcher-observability/tests/sleuth.test.sh +0 -176
  62. package/dist/skills/watcher-observability/tests/summarize-logs.test.sh +0 -105
  63. package/dist/skills/watcher-observability/tests/watcher-config.test.sh +0 -70
  64. package/dist/skills/workflow-auditor/scripts/audit-ledger.py +0 -624
  65. package/dist/skills/workflow-auditor/scripts/list-zed-commands.py +0 -183
  66. package/dist/skills/workflow-auditor/scripts/render-workflow.py +0 -201
  67. package/dist/skills/workflow-auditor/scripts/validate-skills.py +0 -444
  68. package/dist/skills/workflow-auditor/tests/audit-ledger.test.sh +0 -660
  69. package/dist/skills/workflow-auditor/tests/list-zed-commands.test.sh +0 -93
  70. package/dist/skills/workflow-auditor/tests/render-workflow.test.sh +0 -135
  71. 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 ]]