bigpowers 2.90.2 → 2.91.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 (115) hide show
  1. package/.agents/skills/build-epic/SKILL.md +1 -1
  2. package/.agents/skills/commit-message/SKILL.md +1 -0
  3. package/.agents/skills/release-branch/SKILL.md +4 -5
  4. package/.agents/skills/run-planning/SKILL.md +6 -1
  5. package/.agents/skills/verify-work/SKILL.md +2 -1
  6. package/.cline/skills/build-epic/SKILL.md +1 -1
  7. package/.cline/skills/commit-message/SKILL.md +1 -0
  8. package/.cline/skills/release-branch/SKILL.md +4 -5
  9. package/.cline/skills/run-planning/SKILL.md +6 -1
  10. package/.cline/skills/verify-work/SKILL.md +2 -1
  11. package/.codebuddy/skills/build-epic/SKILL.md +1 -1
  12. package/.codebuddy/skills/commit-message/SKILL.md +1 -0
  13. package/.codebuddy/skills/release-branch/SKILL.md +4 -5
  14. package/.codebuddy/skills/run-planning/SKILL.md +6 -1
  15. package/.codebuddy/skills/verify-work/SKILL.md +2 -1
  16. package/.codex/skills/build-epic/SKILL.md +1 -1
  17. package/.codex/skills/commit-message/SKILL.md +1 -0
  18. package/.codex/skills/release-branch/SKILL.md +4 -5
  19. package/.codex/skills/run-planning/SKILL.md +6 -1
  20. package/.codex/skills/verify-work/SKILL.md +2 -1
  21. package/.copilot/skills/build-epic/SKILL.md +1 -1
  22. package/.copilot/skills/commit-message/SKILL.md +1 -0
  23. package/.copilot/skills/release-branch/SKILL.md +4 -5
  24. package/.copilot/skills/run-planning/SKILL.md +6 -1
  25. package/.copilot/skills/verify-work/SKILL.md +2 -1
  26. package/.cursor/rules/build-epic.mdc +1 -1
  27. package/.cursor/rules/commit-message.mdc +1 -0
  28. package/.cursor/rules/release-branch.mdc +4 -5
  29. package/.cursor/rules/run-planning.mdc +6 -1
  30. package/.cursor/rules/verify-work.mdc +2 -1
  31. package/.gemini/extensions/bigpowers/commands/prompts/build-epic.md +1 -1
  32. package/.gemini/extensions/bigpowers/commands/prompts/commit-message.md +1 -0
  33. package/.gemini/extensions/bigpowers/commands/prompts/release-branch.md +4 -5
  34. package/.gemini/extensions/bigpowers/commands/prompts/run-planning.md +6 -1
  35. package/.gemini/extensions/bigpowers/commands/prompts/verify-work.md +2 -1
  36. package/.gemini/extensions/bigpowers/gemini-extension.json +1 -1
  37. package/.gemini/extensions/bigpowers/skills/build-epic/SKILL.md +1 -1
  38. package/.gemini/extensions/bigpowers/skills/commit-message/SKILL.md +1 -0
  39. package/.gemini/extensions/bigpowers/skills/release-branch/SKILL.md +4 -5
  40. package/.gemini/extensions/bigpowers/skills/run-planning/SKILL.md +6 -1
  41. package/.gemini/extensions/bigpowers/skills/verify-work/SKILL.md +2 -1
  42. package/.hermes/skills/build-epic/SKILL.md +1 -1
  43. package/.hermes/skills/commit-message/SKILL.md +1 -0
  44. package/.hermes/skills/release-branch/SKILL.md +4 -5
  45. package/.hermes/skills/run-planning/SKILL.md +6 -1
  46. package/.hermes/skills/verify-work/SKILL.md +2 -1
  47. package/.kilocode/rules/build-epic.md +1 -1
  48. package/.kilocode/rules/commit-message.md +1 -0
  49. package/.kilocode/rules/release-branch.md +4 -5
  50. package/.kilocode/rules/run-planning.md +6 -1
  51. package/.kilocode/rules/verify-work.md +2 -1
  52. package/.mimocode/skills/build-epic/SKILL.md +1 -1
  53. package/.mimocode/skills/commit-message/SKILL.md +1 -0
  54. package/.mimocode/skills/release-branch/SKILL.md +4 -5
  55. package/.mimocode/skills/run-planning/SKILL.md +6 -1
  56. package/.mimocode/skills/verify-work/SKILL.md +2 -1
  57. package/.opencode/skills/build-epic/SKILL.md +1 -1
  58. package/.opencode/skills/commit-message/SKILL.md +1 -0
  59. package/.opencode/skills/release-branch/SKILL.md +4 -5
  60. package/.opencode/skills/run-planning/SKILL.md +6 -1
  61. package/.opencode/skills/verify-work/SKILL.md +2 -1
  62. package/.pi/package.json +1 -1
  63. package/.pi/prompts/build-epic.md +1 -1
  64. package/.pi/prompts/commit-message.md +1 -0
  65. package/.pi/prompts/release-branch.md +4 -5
  66. package/.pi/prompts/run-planning.md +6 -1
  67. package/.pi/prompts/verify-work.md +2 -1
  68. package/.pi/skills/build-epic/SKILL.md +1 -1
  69. package/.pi/skills/commit-message/SKILL.md +1 -0
  70. package/.pi/skills/release-branch/SKILL.md +4 -5
  71. package/.pi/skills/run-planning/SKILL.md +6 -1
  72. package/.pi/skills/verify-work/SKILL.md +2 -1
  73. package/.qwen/skills/build-epic/SKILL.md +1 -1
  74. package/.qwen/skills/commit-message/SKILL.md +1 -0
  75. package/.qwen/skills/release-branch/SKILL.md +4 -5
  76. package/.qwen/skills/run-planning/SKILL.md +6 -1
  77. package/.qwen/skills/verify-work/SKILL.md +2 -1
  78. package/.trae/skills/build-epic/SKILL.md +1 -1
  79. package/.trae/skills/commit-message/SKILL.md +1 -0
  80. package/.trae/skills/release-branch/SKILL.md +4 -5
  81. package/.trae/skills/run-planning/SKILL.md +6 -1
  82. package/.trae/skills/verify-work/SKILL.md +2 -1
  83. package/.windsurf/rules/build-epic.md +1 -1
  84. package/.windsurf/rules/commit-message.md +1 -0
  85. package/.windsurf/rules/release-branch.md +4 -5
  86. package/.windsurf/rules/run-planning.md +6 -1
  87. package/.windsurf/rules/verify-work.md +2 -1
  88. package/.zcode/skills/build-epic/SKILL.md +1 -1
  89. package/.zcode/skills/commit-message/SKILL.md +1 -0
  90. package/.zcode/skills/release-branch/SKILL.md +4 -5
  91. package/.zcode/skills/run-planning/SKILL.md +6 -1
  92. package/.zcode/skills/verify-work/SKILL.md +2 -1
  93. package/CHANGELOG.md +7 -0
  94. package/hooks/pre-tool-use.sh +23 -1
  95. package/package.json +2 -1
  96. package/scripts/convert-legado.sh +1 -0
  97. package/scripts/lib/__pycache__/atomic_write.cpython-310.pyc +0 -0
  98. package/scripts/lib/__pycache__/link_utils.cpython-310.pyc +0 -0
  99. package/scripts/lib/__pycache__/srp_engine_links.cpython-310.pyc +0 -0
  100. package/scripts/lib/__pycache__/srp_engine_okf.cpython-310.pyc +0 -0
  101. package/scripts/lib/assert-epic-gate.sh +32 -0
  102. package/scripts/lib/assert-planning-artifacts.sh +65 -0
  103. package/scripts/test-generated-path-hook.sh +57 -0
  104. package/scripts/test-test-lock-hook.sh +100 -0
  105. package/scripts/validate-doctrine.sh +4 -4
  106. package/scripts/verify-adversarial.sh +146 -0
  107. package/scripts/verify-tdd-red-commit.sh +39 -1
  108. package/skills/build-epic/SKILL.md +1 -1
  109. package/skills/commit-message/SKILL.md +1 -0
  110. package/skills/release-branch/SKILL.md +4 -5
  111. package/skills/run-planning/SKILL.md +6 -1
  112. package/skills/verify-work/SKILL.md +2 -1
  113. package/skills-lock.json +5 -5
  114. package/tests/test-artifact-assertions.sh +86 -0
  115. package/tests/test-verify-adversarial.sh +27 -0
@@ -78,7 +78,45 @@ if [[ -z "$VERIFY_CMD" ]]; then
78
78
  fi
79
79
  fi
80
80
 
81
- RED_SHA=$(git rev-parse HEAD~1)
81
+ LATEST_MSG=$(git log -1 --format=%s 2>/dev/null || echo "")
82
+
83
+ # Enforce during fix_bug flow, bug-fix commits, or when explicitly requested
84
+ IS_FIX_FLOW=false
85
+ if [ -f specs/state.yaml ] && grep -qE "active_flow:[[:space:]]*fix_bug" specs/state.yaml 2>/dev/null; then
86
+ IS_FIX_FLOW=true
87
+ elif [[ -n "${TDD_ENFORCE_RED:-}" ]]; then
88
+ IS_FIX_FLOW=true
89
+ elif [[ "$LATEST_MSG" =~ ^fix\(bug ]] || [[ "$LATEST_MSG" =~ BUG-[0-9] ]]; then
90
+ IS_FIX_FLOW=true
91
+ fi
92
+
93
+ if [ "$IS_FIX_FLOW" = false ] && [[ "${CHECK_PENDING_FIX:-0}" != "1" ]]; then
94
+ echo "SKIP: verify-tdd-red-commit only enforces during fix_bug flow or bug-fix commits"
95
+ exit 0
96
+ fi
97
+
98
+ if [[ "$LATEST_MSG" =~ ^fix ]]; then
99
+ RED_SHA=$(git rev-parse HEAD~1 2>/dev/null || echo "")
100
+ RED_MSG=$(git log -1 --format=%s "$RED_SHA" 2>/dev/null || echo "")
101
+ if [[ ! "$RED_MSG" =~ ^test ]]; then
102
+ echo "FAIL: preceding commit $RED_SHA is not a test-only commit (found: '$RED_MSG') — RED gate violated"
103
+ exit 1
104
+ fi
105
+ elif [[ "$LATEST_MSG" =~ ^test ]]; then
106
+ RED_SHA=$(git rev-parse HEAD 2>/dev/null || echo "")
107
+ else
108
+ if [[ "${CHECK_PENDING_FIX:-0}" == "1" ]]; then
109
+ echo "FAIL: latest commit '$LATEST_MSG' is not a test-only (RED) commit — RED gate violated"
110
+ exit 1
111
+ fi
112
+ RED_SHA=$(git rev-parse HEAD~1 2>/dev/null || echo "")
113
+ fi
114
+
115
+ if [[ -z "$RED_SHA" ]]; then
116
+ echo "FAIL: could not identify RED commit"
117
+ exit 1
118
+ fi
119
+
82
120
  WORKTREE=$(mktemp -d)
83
121
  trap 'git worktree remove -f "$WORKTREE" 2>/dev/null || rm -rf "$WORKTREE"' EXIT
84
122
 
@@ -68,7 +68,7 @@ Orchestrates the **build** flow for a single epic: survey → plan tasks → kic
68
68
  After step 5 (verify-work) completes successfully, step 6 runs `audit-code` automatically in `--gate` mode:
69
69
 
70
70
  1. **Run audit:** Invoke `audit-code --gate` on the complete diff for this story.
71
- 2. **Pass (exit 0):** All checklist sections pass → advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
71
+ 2. **Pass (exit 0):** All checklist sections pass → run `bash scripts/lib/assert-epic-gate.sh advance` to mechanically confirm the audit pass, then advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
72
72
  3. **Fail (exit 1):** One or more checklist sections fail → **reset `epic_cycle.current_step` to `4`** (develop-tdd) and add the failing section IDs to `completed_steps` as `"1,2,3,4,5,6(fail: ...)"`. Record `epic_cycle.audit_result: fail` in `state.yaml`. Do NOT advance past step 6 until audit passes.
73
73
  4. **Audit artifact:** Full audit report saved to `specs/verifications/AUDIT-<epic>-<story>.md` regardless of pass/fail, for reviewer traceability.
74
74
  5. **Enforce F.I.R.S.T:** After audit-code passes, run `enforce-first --quick` on new/modified tests. Append F.I.R.S.T violations (if any) to the audit report. Failing F.I.R.S.T criteria trigger the same loop-back to step 4.
@@ -37,6 +37,7 @@ description: Reviews working-tree changes, then drafts a Conventional Commits ti
37
37
 
38
38
  ## Checklist before finalizing
39
39
 
40
+ - [ ] **Audit pass confirmed (HARD GATE — Issue #182):** In active epic flow, `bash scripts/lib/assert-epic-gate.sh commit` passes.
40
41
  - [ ] Type matches the **dominant** user-visible outcome (`feat` vs `fix` vs `perf`, etc.).
41
42
  - [ ] **Scope** is a short noun in parentheses if it helps (e.g. `fix(api): …`).
42
43
  - [ ] Breaking changes are explicit (`!` and/or `BREAKING CHANGE:` in the body/footer).
@@ -58,13 +58,12 @@ git log main...HEAD --format="%B" | grep -qiE 'co[- ]authored[- ]by' && echo "
58
58
  ### 2a. Security gate
59
59
 
60
60
  - [ ] `specs/security/REVIEW.md` exists and is fresh (matches current branch diff)
61
- - [ ] No unresolved HIGH findings with confidence ≥ 8 (or all documented in `specs/security/EXCEPTIONS.md` with sign-off rationale)
62
61
 
63
- If REVIEW.md is missing or stale → run `security-review` inline. Findings block the merge unless documented in EXCEPTIONS.md.
62
+ ### 2b. Audit-code & Traceability gates (HARD GATES — Issue #182)
64
63
 
65
- ### 2b. Traceability gate
66
-
67
- Run `gate-trace` before merge. FAIL blocks merge; CONCERNS requires explicit override in `specs/state.yaml` (`traceability_override: CONCERNS accepted, reason: <explanation>`). WAIVED if no matrix available.
64
+ - [ ] Run `bash scripts/lib/assert-epic-gate.sh release` (asserts `specs/AUDIT_LATEST.md` passed; blocks release on failure).
65
+ - [ ] No unresolved HIGH security findings with confidence ≥ 8 (or documented in `specs/security/EXCEPTIONS.md`).
66
+ - [ ] Run `gate-trace`. FAIL blocks merge; CONCERNS requires explicit override in `specs/state.yaml`. WAIVED if no matrix available.
68
67
 
69
68
  > **Adversarial refute framing (e45s32):** The final pre-merge check is **refute, not rubber-stamp**. Before declaring ready, actively try to disprove traceability completeness — missing story tags, absent verify evidence, stale security review. Only proceed when refutation fails.
70
69
 
@@ -62,7 +62,12 @@ if written:
62
62
  - `plan-release` — sequence epics by WSJF
63
63
  - `slice-tasks` — cut vertical slices
64
64
 
65
- 4. **Update status** — On successful completion, set `status: done` for that workflow key in `planning-status.yaml`.
65
+ 4. **Mechanical artifact assertion before status update (HARD GATE — Issue #183):**
66
+ Before marking any workflow key `status: done`, run:
67
+ ```bash
68
+ bash scripts/lib/assert-planning-artifacts.sh <workflow-key>
69
+ ```
70
+ If the artifact assertion fails, do NOT advance status. Remediate missing output files before continuing. On success, set `status: done` for that workflow key in `planning-status.yaml`.
66
71
 
67
72
  5. **Advance** — Set `state.yaml` `active_flow: planning` while in this chain. When all required keys are done, set `handoff.next_skill` to `plan-work`.
68
73
 
@@ -63,7 +63,8 @@ Review answers "is the code good?"; Verify answers "does the built thing do what
63
63
  5a. **Blind-spot check** — run `bash scripts/check-blind-spots.sh`. This detects structural quality gaps (verify-gap, test-gap, stale-tag, etc.) beyond percentage coverage. If any HIGH-severity findings exist → **block the verify-work PASS gate**. Findings are written to `specs/blind-spots.json`. MEDIUM/LOW findings warn but don't block.
64
64
  5a2. **Completeness critic (e45s05)** — `bash scripts/lib/completeness-critic.sh`. **BLOCKER** aborts merge gate; WARNING → gaps loop; FILLED = evidence only.
65
65
 
66
- 5b. **NFR Evidence Gate** (P0 only) — Produces go/no-go output on three dimensions: Performance (response time, throughput), Reliability (error rate, recovery), and Operability (logging, health checks). Reads thresholds from `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md` and writes evidence as OKF verification-report bundles to `specs/verifications/NFR-eNNsYY.json`. FAIL on any dimension blocks the gate.
66
+ 5b. **NFR Evidence Gate** (P0 only) — Go/no-go on Performance, Reliability, Operability against `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md`. Evidence written to `specs/verifications/NFR-eNNsYY.json`. FAIL blocks gate.
67
+ 5c. **Adversarial Defect Mutation Gate (HARD GATE — e86 / ab-20)** — `bash scripts/verify-adversarial.sh`. Boundary fuzzing & parameter injection against modified interfaces. Crashes or failures block PASS gate; evidence in `specs/verifications/ADVERSARIAL_LATEST.yaml`.
67
68
  6. **Step-by-step UAT** (skip if P2/P3) — one user-observable action at a time.
68
69
  7. **Gaps loop** — failures → log → `plan-work` → re-verify. Unaddressed HIGH findings from step 5 feed into this loop alongside other quality gaps.
69
70
 
package/skills-lock.json CHANGED
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "build-epic": {
25
25
  "description": "Eight-step epic build cycle — reads state.yaml, execution-status.yaml, and one epic capsule; updates status via bp-yaml-set or direct edit. Resume mode runs one step per invocation. Use instead of ad-hoc execute-plan for release work.",
26
- "sha256": "a524120e0bf940c2",
26
+ "sha256": "c1687698f60f5df1",
27
27
  "path": "skills/build-epic/SKILL.md"
28
28
  },
29
29
  "change-request": {
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "commit-message": {
35
35
  "description": "Reviews working-tree changes, then drafts a Conventional Commits title/body and states the semantic-release version bump a single such commit would imply. Also notes which defensive-code categories were touched. Use when the user wants to commit recent work, prepare a Conventional Commits message, or asks for semantic-release / semver-consistent messaging before git commit.",
36
- "sha256": "9c21fead0938a924",
36
+ "sha256": "58bc72a02aa4ce00",
37
37
  "path": "skills/commit-message/SKILL.md"
38
38
  },
39
39
  "compose-workflow": {
@@ -248,7 +248,7 @@
248
248
  },
249
249
  "release-branch": {
250
250
  "description": "Make the merge/PR/keep/discard decision for a feature branch, verify coverage gates, create the PR with gh, and clean up the worktree. Use when a feature is done and ready to ship, or when user says \"release\", \"merge\", or \"open a PR\".",
251
- "sha256": "4c3509bc9fd4a8a1",
251
+ "sha256": "41b42f5d409de4cb",
252
252
  "path": "skills/release-branch/SKILL.md"
253
253
  },
254
254
  "request-review": {
@@ -283,7 +283,7 @@
283
283
  },
284
284
  "run-planning": {
285
285
  "description": "\"DISCOVER-PHASE ADVANCER — Drive the discover-phase checklist (specs/planning-status.yaml) through survey-context → scope-work → research-first → elaborate-spec → plan-release → slice-tasks. NOT a duplicate of plan-work or the planning spine; it orchestrates the pre-coding discover phase only.\"",
286
- "sha256": "9a28211414df158a",
286
+ "sha256": "5cdd1e03360f0f6c",
287
287
  "path": "skills/run-planning/SKILL.md"
288
288
  },
289
289
  "scope-work": {
@@ -378,7 +378,7 @@
378
378
  },
379
379
  "verify-work": {
380
380
  "description": "Multi-phase UAT gate — cold-start smoke, build, typecheck, lint, tests, step-by-step manual verification, gaps-closure loop. Use after execute-plan or develop-tdd, before audit-code.",
381
- "sha256": "518ffc602775b589",
381
+ "sha256": "b395c44051f4ac3c",
382
382
  "path": "skills/verify-work/SKILL.md"
383
383
  },
384
384
  "visual-dashboard": {
@@ -0,0 +1,86 @@
1
+ #!/usr/bin/env bash
2
+ # story: e86 / GH #182 / GH #183
3
+ # Tests for mechanical artifact assertions and epic audit gate.
4
+ set -euo pipefail
5
+
6
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7
+ REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
8
+
9
+ pass_count=0
10
+ fail_count=0
11
+
12
+ assert_true() {
13
+ local label="$1"
14
+ shift
15
+ if "$@"; then
16
+ echo " PASS $label"
17
+ pass_count=$((pass_count + 1))
18
+ else
19
+ echo " FAIL $label"
20
+ fail_count=$((fail_count + 1))
21
+ fi
22
+ }
23
+
24
+ assert_false() {
25
+ local label="$1"
26
+ shift
27
+ if ! "$@"; then
28
+ echo " PASS $label"
29
+ pass_count=$((pass_count + 1))
30
+ else
31
+ echo " FAIL $label"
32
+ fail_count=$((fail_count + 1))
33
+ fi
34
+ }
35
+
36
+ echo "=== Artifact & Gate Assertion Tests (GH #182, GH #183) ==="
37
+
38
+ TMP_DIR=$(mktemp -d)
39
+ trap 'rm -rf "$TMP_DIR"' EXIT
40
+
41
+ cd "$TMP_DIR"
42
+ mkdir -p specs/product specs/epics/e01-test
43
+
44
+ # 1. Test assert-planning-artifacts.sh for scope-work (missing -> fail, present -> pass)
45
+ assert_false "scope-work fails when SCOPE_LATEST.yaml missing" \
46
+ bash "$REPO_ROOT/scripts/lib/assert-planning-artifacts.sh" scope-work
47
+
48
+ echo "scope: test" > specs/product/SCOPE_LATEST.yaml
49
+ assert_true "scope-work passes when SCOPE_LATEST.yaml exists and non-empty" \
50
+ bash "$REPO_ROOT/scripts/lib/assert-planning-artifacts.sh" scope-work
51
+
52
+ # 2. Test assert-planning-artifacts.sh for slice-tasks
53
+ assert_false "slice-tasks fails when no *-tasks.yaml exists" \
54
+ bash "$REPO_ROOT/scripts/lib/assert-planning-artifacts.sh" slice-tasks
55
+
56
+ cat > specs/epics/e01-test/e01s01-tasks.yaml <<'YAML'
57
+ story_id: e01s01
58
+ tasks: []
59
+ YAML
60
+ assert_true "slice-tasks passes when *-tasks.yaml exists" \
61
+ bash "$REPO_ROOT/scripts/lib/assert-planning-artifacts.sh" slice-tasks
62
+
63
+ # 3. Test assert-epic-gate.sh (Issue #182)
64
+ assert_false "assert-epic-gate fails when no audit report exists" \
65
+ bash "$REPO_ROOT/scripts/lib/assert-epic-gate.sh" commit
66
+
67
+ cat > specs/AUDIT_LATEST.md <<'MD'
68
+ # Audit Report
69
+ VERDICT: FAIL
70
+ MD
71
+ assert_false "assert-epic-gate fails when audit report is FAIL" \
72
+ bash "$REPO_ROOT/scripts/lib/assert-epic-gate.sh" commit
73
+
74
+ cat > specs/AUDIT_LATEST.md <<'MD'
75
+ # Audit Report
76
+ VERDICT: PASS
77
+ MD
78
+ assert_true "assert-epic-gate passes when audit report is PASS" \
79
+ bash "$REPO_ROOT/scripts/lib/assert-epic-gate.sh" commit
80
+
81
+ echo ""
82
+ echo "=== Summary: $pass_count passed, $fail_count failed ==="
83
+ if [ "$fail_count" -gt 0 ]; then
84
+ exit 1
85
+ fi
86
+ exit 0
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env bash
2
+ # story: e86 / verify-work adversarial mutation
3
+ set -euo pipefail
4
+
5
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6
+ REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
7
+
8
+ echo "=== Testing verify-adversarial.sh ==="
9
+
10
+ # 1. Run self-test
11
+ bash "$REPO_ROOT/scripts/verify-adversarial.sh" --self-test
12
+ echo " PASS verify-adversarial self-test"
13
+
14
+ # 2. Run normal invocation in repo root
15
+ bash "$REPO_ROOT/scripts/verify-adversarial.sh"
16
+ echo " PASS verify-adversarial repo root run"
17
+
18
+ # 3. Assert artifact was created
19
+ if [[ -f "$REPO_ROOT/specs/verifications/ADVERSARIAL_LATEST.yaml" ]]; then
20
+ echo " PASS ADVERSARIAL_LATEST.yaml created"
21
+ else
22
+ echo " FAIL ADVERSARIAL_LATEST.yaml missing"
23
+ exit 1
24
+ fi
25
+
26
+ echo "=== All verify-adversarial tests passed ==="
27
+ exit 0