bigpowers 2.84.0 → 2.85.0

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 (112) hide show
  1. package/.agents/skills/audit-code/SKILL.md +4 -7
  2. package/.agents/skills/craft-skill/SKILL.md +21 -4
  3. package/.agents/skills/grill-me/SKILL.md +12 -0
  4. package/.agents/skills/grill-with-docs/SKILL.md +12 -0
  5. package/.agents/skills/request-review/SKILL.md +1 -0
  6. package/.agents/skills/seed-conventions/SKILL.md +21 -4
  7. package/.agents/skills/stocktake-skills/SKILL.md +2 -0
  8. package/.agents/skills/wire-ci/SKILL.md +164 -181
  9. package/.codebuddy/skills/audit-code/SKILL.md +4 -7
  10. package/.codebuddy/skills/craft-skill/SKILL.md +21 -4
  11. package/.codebuddy/skills/grill-me/SKILL.md +12 -0
  12. package/.codebuddy/skills/grill-with-docs/SKILL.md +12 -0
  13. package/.codebuddy/skills/request-review/SKILL.md +1 -0
  14. package/.codebuddy/skills/seed-conventions/SKILL.md +21 -4
  15. package/.codebuddy/skills/stocktake-skills/SKILL.md +2 -0
  16. package/.codebuddy/skills/wire-ci/SKILL.md +164 -181
  17. package/.codex/skills/audit-code/SKILL.md +4 -7
  18. package/.codex/skills/craft-skill/SKILL.md +21 -4
  19. package/.codex/skills/grill-me/SKILL.md +12 -0
  20. package/.codex/skills/grill-with-docs/SKILL.md +12 -0
  21. package/.codex/skills/request-review/SKILL.md +1 -0
  22. package/.codex/skills/seed-conventions/SKILL.md +21 -4
  23. package/.codex/skills/stocktake-skills/SKILL.md +2 -0
  24. package/.codex/skills/wire-ci/SKILL.md +164 -181
  25. package/.hermes/skills/audit-code/SKILL.md +4 -7
  26. package/.hermes/skills/craft-skill/SKILL.md +21 -4
  27. package/.hermes/skills/grill-me/SKILL.md +12 -0
  28. package/.hermes/skills/grill-with-docs/SKILL.md +12 -0
  29. package/.hermes/skills/request-review/SKILL.md +1 -0
  30. package/.hermes/skills/seed-conventions/SKILL.md +21 -4
  31. package/.hermes/skills/stocktake-skills/SKILL.md +2 -0
  32. package/.hermes/skills/wire-ci/SKILL.md +164 -181
  33. package/.kilocode/rules/audit-code.md +4 -7
  34. package/.kilocode/rules/craft-skill.md +21 -4
  35. package/.kilocode/rules/grill-me.md +12 -0
  36. package/.kilocode/rules/grill-with-docs.md +12 -0
  37. package/.kilocode/rules/request-review.md +1 -0
  38. package/.kilocode/rules/seed-conventions.md +21 -4
  39. package/.kilocode/rules/stocktake-skills.md +2 -0
  40. package/.kilocode/rules/wire-ci.md +164 -181
  41. package/.mimocode/skills/audit-code/SKILL.md +4 -7
  42. package/.mimocode/skills/craft-skill/SKILL.md +21 -4
  43. package/.mimocode/skills/grill-me/SKILL.md +12 -0
  44. package/.mimocode/skills/grill-with-docs/SKILL.md +12 -0
  45. package/.mimocode/skills/request-review/SKILL.md +1 -0
  46. package/.mimocode/skills/seed-conventions/SKILL.md +21 -4
  47. package/.mimocode/skills/stocktake-skills/SKILL.md +2 -0
  48. package/.mimocode/skills/wire-ci/SKILL.md +164 -181
  49. package/.pi/package.json +1 -1
  50. package/.pi/prompts/audit-code.md +4 -7
  51. package/.pi/prompts/craft-skill.md +21 -4
  52. package/.pi/prompts/grill-me.md +12 -0
  53. package/.pi/prompts/grill-with-docs.md +12 -0
  54. package/.pi/prompts/request-review.md +1 -0
  55. package/.pi/prompts/seed-conventions.md +21 -4
  56. package/.pi/prompts/stocktake-skills.md +2 -0
  57. package/.pi/prompts/wire-ci.md +164 -181
  58. package/.pi/skills/audit-code/SKILL.md +4 -7
  59. package/.pi/skills/craft-skill/SKILL.md +21 -4
  60. package/.pi/skills/grill-me/SKILL.md +12 -0
  61. package/.pi/skills/grill-with-docs/SKILL.md +12 -0
  62. package/.pi/skills/request-review/SKILL.md +1 -0
  63. package/.pi/skills/seed-conventions/SKILL.md +21 -4
  64. package/.pi/skills/stocktake-skills/SKILL.md +2 -0
  65. package/.pi/skills/wire-ci/SKILL.md +164 -181
  66. package/.trae/skills/audit-code/SKILL.md +4 -7
  67. package/.trae/skills/craft-skill/SKILL.md +21 -4
  68. package/.trae/skills/grill-me/SKILL.md +12 -0
  69. package/.trae/skills/grill-with-docs/SKILL.md +12 -0
  70. package/.trae/skills/request-review/SKILL.md +1 -0
  71. package/.trae/skills/seed-conventions/SKILL.md +21 -4
  72. package/.trae/skills/stocktake-skills/SKILL.md +2 -0
  73. package/.trae/skills/wire-ci/SKILL.md +164 -181
  74. package/.windsurf/rules/audit-code.md +4 -7
  75. package/.windsurf/rules/craft-skill.md +21 -4
  76. package/.windsurf/rules/grill-me.md +12 -0
  77. package/.windsurf/rules/grill-with-docs.md +12 -0
  78. package/.windsurf/rules/request-review.md +1 -0
  79. package/.windsurf/rules/seed-conventions.md +21 -4
  80. package/.windsurf/rules/stocktake-skills.md +2 -0
  81. package/.windsurf/rules/wire-ci.md +164 -181
  82. package/.zcode/skills/audit-code/SKILL.md +4 -7
  83. package/.zcode/skills/craft-skill/SKILL.md +21 -4
  84. package/.zcode/skills/grill-me/SKILL.md +12 -0
  85. package/.zcode/skills/grill-with-docs/SKILL.md +12 -0
  86. package/.zcode/skills/request-review/SKILL.md +1 -0
  87. package/.zcode/skills/seed-conventions/SKILL.md +21 -4
  88. package/.zcode/skills/stocktake-skills/SKILL.md +2 -0
  89. package/.zcode/skills/wire-ci/SKILL.md +164 -181
  90. package/CHANGELOG.md +19 -0
  91. package/README.md +14 -1
  92. package/SKILL-INDEX.md +84 -76
  93. package/package.json +1 -1
  94. package/scripts/generate-skill-index.sh +20 -4
  95. package/scripts/golden-g04-selftest.sh +19 -0
  96. package/scripts/land-branch.sh +22 -9
  97. package/scripts/lib/__pycache__/link_utils.cpython-312.pyc +0 -0
  98. package/scripts/lib/__pycache__/srp_engine_links.cpython-312.pyc +0 -0
  99. package/scripts/lib/land-branch-push.sh +106 -0
  100. package/scripts/validate-agentic-ste.sh +229 -0
  101. package/skills/audit-code/SKILL.md +4 -7
  102. package/skills/craft-skill/SKILL.md +22 -4
  103. package/skills/grill-me/SKILL.md +12 -0
  104. package/skills/grill-with-docs/SKILL.md +12 -0
  105. package/skills/request-review/SKILL.md +1 -0
  106. package/skills/seed-conventions/SKILL.md +21 -4
  107. package/skills/stocktake-skills/SKILL.md +2 -0
  108. package/skills/visual-dashboard/scripts/frame-template.html +1 -39
  109. package/skills/wire-ci/REFERENCE.md +137 -152
  110. package/skills/wire-ci/SKILL.md +28 -30
  111. package/skills-lock.json +8 -8
  112. package/tests/test-land-branch-protected.sh +222 -0
@@ -0,0 +1,222 @@
1
+ #!/usr/bin/env bash
2
+ # story: BUG-2026-07-25-land-branch-protected
3
+ # Regression: land-branch protected-branch push rejection + PR fallback.
4
+ set -euo pipefail
5
+
6
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7
+ REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
8
+ # shellcheck source=../scripts/lib/land-branch-push.sh
9
+ source "$REPO_ROOT/scripts/lib/land-branch-push.sh"
10
+
11
+ pass_count=0
12
+ fail_count=0
13
+
14
+ assert_true() {
15
+ local label="$1"
16
+ shift
17
+ if "$@"; then
18
+ echo " PASS $label"
19
+ pass_count=$((pass_count + 1))
20
+ else
21
+ echo " FAIL $label"
22
+ fail_count=$((fail_count + 1))
23
+ fi
24
+ }
25
+
26
+ assert_false() {
27
+ local label="$1"
28
+ shift
29
+ if ! "$@"; then
30
+ echo " PASS $label"
31
+ pass_count=$((pass_count + 1))
32
+ else
33
+ echo " FAIL $label"
34
+ fail_count=$((fail_count + 1))
35
+ fi
36
+ }
37
+
38
+ assert_contains() {
39
+ local label="$1"
40
+ local haystack="$2"
41
+ local needle="$3"
42
+ if [[ "$haystack" == *"$needle"* ]]; then
43
+ echo " PASS $label"
44
+ pass_count=$((pass_count + 1))
45
+ else
46
+ echo " FAIL $label (missing: $needle)"
47
+ fail_count=$((fail_count + 1))
48
+ fi
49
+ }
50
+
51
+ echo "=== is_protected_branch_rejection fixtures ==="
52
+
53
+ GH006_FIXTURE=$'remote: error: GH006: Protected branch update failed for refs/heads/main.\nremote: - Changes must be made through a pull request.\nerror: failed to push some refs'
54
+ PR_ONLY_FIXTURE=$'remote: - Changes must be made through a pull request.\nerror: failed to push some refs'
55
+ UNRELATED_FIXTURE=$'error: failed to push some refs\nremote: Permission denied'
56
+
57
+ assert_true "detects GH006 rejection" is_protected_branch_rejection "$GH006_FIXTURE"
58
+ assert_true "detects PR-required message without GH006 code" is_protected_branch_rejection "$PR_ONLY_FIXTURE"
59
+ assert_false "ignores unrelated push failure" is_protected_branch_rejection "$UNRELATED_FIXTURE"
60
+
61
+ echo "=== temp bare remote with rejecting pre-receive hook ==="
62
+
63
+ TMPDIR_ROOT="$(mktemp -d)"
64
+ trap 'rm -rf "$TMPDIR_ROOT"' EXIT
65
+
66
+ BARE="$TMPDIR_ROOT/remote.git"
67
+ WORK="$TMPDIR_ROOT/work"
68
+ MOCK_BIN="$TMPDIR_ROOT/bin"
69
+ mkdir -p "$MOCK_BIN"
70
+
71
+ git init --bare "$BARE" >/dev/null
72
+ mkdir -p "$BARE/hooks"
73
+ cat >"$BARE/hooks/pre-receive" <<'HOOK'
74
+ #!/bin/sh
75
+ while read -r oldrev newrev refname; do
76
+ case "$refname" in
77
+ refs/heads/main)
78
+ if [ "$oldrev" = "0000000000000000000000000000000000000000" ]; then
79
+ continue
80
+ fi
81
+ echo "remote: error: GH006: Protected branch update failed for refs/heads/main."
82
+ echo "remote: - Changes must be made through a pull request."
83
+ exit 1
84
+ ;;
85
+ esac
86
+ done
87
+ exit 0
88
+ HOOK
89
+ chmod +x "$BARE/hooks/pre-receive"
90
+
91
+ git clone "$BARE" "$WORK" >/dev/null
92
+ git -C "$WORK" config user.email "test@example.com"
93
+ git -C "$WORK" config user.name "test"
94
+ echo "base" >"$WORK/README.md"
95
+ git -C "$WORK" add README.md
96
+ git -C "$WORK" commit -qm "chore: init"
97
+ git -C "$WORK" push origin main >/dev/null
98
+
99
+ git -C "$WORK" checkout -b feat/test >/dev/null
100
+ echo "feature" >>"$WORK/README.md"
101
+ git -C "$WORK" add README.md
102
+ git -C "$WORK" commit -qm "feat: add feature"
103
+ git -C "$WORK" checkout main >/dev/null
104
+ git -C "$WORK" merge --squash feat/test >/dev/null
105
+ git -C "$WORK" commit -qm "feat(test): squash land"
106
+ LAND_SHA="$(git -C "$WORK" rev-parse --short HEAD)"
107
+ LAND_FULL_SHA="$(git -C "$WORK" rev-parse HEAD)"
108
+ RECOVERY_BRANCH="land-recovery/feat/test"
109
+
110
+ cat >"$MOCK_BIN/gh" <<'MOCK'
111
+ #!/usr/bin/env bash
112
+ echo "https://github.com/example/repo/pull/1"
113
+ exit 0
114
+ MOCK
115
+ chmod +x "$MOCK_BIN/gh"
116
+
117
+ cd "$WORK"
118
+ export PATH="$MOCK_BIN:$PATH"
119
+ LAND_PR_FALLBACK=0
120
+ if ! land_push_default_branch main "$LAND_SHA" "feat/test" "feat(test): squash land"; then
121
+ echo " FAIL land_push_default_branch should succeed via PR fallback"
122
+ fail_count=$((fail_count + 1))
123
+ else
124
+ echo " PASS land_push_default_branch succeeds on protected rejection"
125
+ pass_count=$((pass_count + 1))
126
+ fi
127
+
128
+ if [ "$LAND_PR_FALLBACK" = "1" ]; then
129
+ echo " PASS LAND_PR_FALLBACK flag set"
130
+ pass_count=$((pass_count + 1))
131
+ else
132
+ echo " FAIL LAND_PR_FALLBACK flag not set"
133
+ fail_count=$((fail_count + 1))
134
+ fi
135
+
136
+ if git show-ref --verify --quiet "refs/heads/$RECOVERY_BRANCH"; then
137
+ echo " PASS recovery branch exists locally"
138
+ pass_count=$((pass_count + 1))
139
+ else
140
+ echo " FAIL recovery branch missing locally"
141
+ fail_count=$((fail_count + 1))
142
+ fi
143
+
144
+ if git rev-parse main >/dev/null 2>&1 && [ "$(git rev-parse main)" != "$LAND_FULL_SHA" ]; then
145
+ echo " PASS local main reset away from stranded squash commit"
146
+ pass_count=$((pass_count + 1))
147
+ else
148
+ echo " FAIL local main still points at squash commit"
149
+ fail_count=$((fail_count + 1))
150
+ fi
151
+
152
+ if git ls-remote --heads origin "$RECOVERY_BRANCH" | grep -q "$RECOVERY_BRANCH"; then
153
+ echo " PASS recovery branch pushed to origin"
154
+ pass_count=$((pass_count + 1))
155
+ else
156
+ echo " FAIL recovery branch not on origin"
157
+ fail_count=$((fail_count + 1))
158
+ fi
159
+ cd "$REPO_ROOT"
160
+
161
+ echo "=== gh failure prints recovery commands ==="
162
+
163
+ BARE2="$TMPDIR_ROOT/remote2.git"
164
+ WORK2="$TMPDIR_ROOT/work2"
165
+ git init --bare "$BARE2" >/dev/null
166
+ mkdir -p "$BARE2/hooks"
167
+ cp "$BARE/hooks/pre-receive" "$BARE2/hooks/pre-receive"
168
+ chmod +x "$BARE2/hooks/pre-receive"
169
+
170
+ cat >"$MOCK_BIN/gh" <<'MOCK'
171
+ #!/usr/bin/env bash
172
+ echo "gh: authentication required" >&2
173
+ exit 1
174
+ MOCK
175
+ chmod +x "$MOCK_BIN/gh"
176
+
177
+ git clone "$BARE2" "$WORK2" >/dev/null
178
+ git -C "$WORK2" config user.email "test@example.com"
179
+ git -C "$WORK2" config user.name "test"
180
+ echo "base" >"$WORK2/README.md"
181
+ git -C "$WORK2" add README.md
182
+ git -C "$WORK2" commit -qm "chore: init"
183
+ git -C "$WORK2" push origin main >/dev/null
184
+ git -C "$WORK2" checkout -b feat/broken >/dev/null
185
+ echo "feature" >>"$WORK2/README.md"
186
+ git -C "$WORK2" add README.md
187
+ git -C "$WORK2" commit -qm "feat: broken land"
188
+ git -C "$WORK2" checkout main >/dev/null
189
+ git -C "$WORK2" merge --squash feat/broken >/dev/null
190
+ git -C "$WORK2" commit -qm "feat(broken): squash land"
191
+ BROKEN_SHA="$(git -C "$WORK2" rev-parse --short HEAD)"
192
+ BROKEN_FULL_SHA="$(git -C "$WORK2" rev-parse HEAD)"
193
+ BROKEN_RECOVERY="land-recovery/feat/broken"
194
+
195
+ cd "$WORK2"
196
+ export PATH="$MOCK_BIN:$PATH"
197
+ set +e
198
+ stderr_file="$(mktemp)"
199
+ land_push_default_branch main "$BROKEN_SHA" "feat/broken" "feat(broken): squash land" 2>"$stderr_file"
200
+ status=$?
201
+ set -e
202
+ stderr="$(cat "$stderr_file")"
203
+ rm -f "$stderr_file"
204
+
205
+ if [ "$status" -ne 0 ]; then
206
+ echo " PASS land_push_default_branch exits non-zero when gh fails"
207
+ pass_count=$((pass_count + 1))
208
+ else
209
+ echo " FAIL expected non-zero exit when gh fails"
210
+ fail_count=$((fail_count + 1))
211
+ fi
212
+
213
+ assert_contains "recovery commands mention git branch" "$stderr" "git branch $BROKEN_RECOVERY $BROKEN_FULL_SHA"
214
+ assert_contains "recovery commands mention gh pr create" "$stderr" "gh pr create --base main --head $BROKEN_RECOVERY"
215
+ cd "$REPO_ROOT"
216
+
217
+ echo ""
218
+ echo "Results: $pass_count passed, $fail_count failed"
219
+ if [ "$fail_count" -gt 0 ]; then
220
+ exit 1
221
+ fi
222
+ echo "All land-branch protected-branch tests passed."