bigpowers 2.90.1 → 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 (128) 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 +14 -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/ab_report.py +11 -4
  102. package/scripts/lib/assert-epic-gate.sh +32 -0
  103. package/scripts/lib/assert-planning-artifacts.sh +65 -0
  104. package/scripts/lib/atomic_write.py +71 -0
  105. package/scripts/lib/blind-spot-checks.py +3 -1
  106. package/scripts/lib/blind-spots.py +3 -1
  107. package/scripts/lib/golden-suite-gates.sh +2 -0
  108. package/scripts/lib/run-benchmark.py +7 -5
  109. package/scripts/lib/srp_engine_okf.py +6 -2
  110. package/scripts/lib/trace-stories.py +6 -4
  111. package/scripts/lib/trace_renderer.py +6 -4
  112. package/scripts/okf-add-references.py +4 -1
  113. package/scripts/sync-bugs-registry.sh +5 -2
  114. package/scripts/test-atomic-writes.sh +129 -0
  115. package/scripts/test-generated-path-hook.sh +57 -0
  116. package/scripts/test-test-lock-hook.sh +100 -0
  117. package/scripts/validate-doctrine.sh +4 -4
  118. package/scripts/verify-adversarial.sh +146 -0
  119. package/scripts/verify-tdd-red-commit.sh +39 -1
  120. package/scripts/yaml-tools.py +6 -3
  121. package/skills/build-epic/SKILL.md +1 -1
  122. package/skills/commit-message/SKILL.md +1 -0
  123. package/skills/release-branch/SKILL.md +4 -5
  124. package/skills/run-planning/SKILL.md +6 -1
  125. package/skills/verify-work/SKILL.md +2 -1
  126. package/skills-lock.json +5 -5
  127. package/tests/test-artifact-assertions.sh +86 -0
  128. package/tests/test-verify-adversarial.sh +27 -0
@@ -66,7 +66,7 @@ Orchestrates the **build** flow for a single epic: survey → plan tasks → kic
66
66
  After step 5 (verify-work) completes successfully, step 6 runs `audit-code` automatically in `--gate` mode:
67
67
 
68
68
  1. **Run audit:** Invoke `audit-code --gate` on the complete diff for this story.
69
- 2. **Pass (exit 0):** All checklist sections pass → advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
69
+ 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`.
70
70
  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.
71
71
  4. **Audit artifact:** Full audit report saved to `specs/verifications/AUDIT-<epic>-<story>.md` regardless of pass/fail, for reviewer traceability.
72
72
  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.
@@ -36,6 +36,7 @@ description: "Reviews working-tree changes, then drafts a Conventional Commits t
36
36
 
37
37
  ## Checklist before finalizing
38
38
 
39
+ - [ ] **Audit pass confirmed (HARD GATE — Issue #182):** In active epic flow, `bash scripts/lib/assert-epic-gate.sh commit` passes.
39
40
  - [ ] Type matches the **dominant** user-visible outcome (`feat` vs `fix` vs `perf`, etc.).
40
41
  - [ ] **Scope** is a short noun in parentheses if it helps (e.g. `fix(api): …`).
41
42
  - [ ] Breaking changes are explicit (`!` and/or `BREAKING CHANGE:` in the body/footer).
@@ -56,13 +56,12 @@ git log main...HEAD --format="%B" | grep -qiE 'co[- ]authored[- ]by' && echo "
56
56
  ### 2a. Security gate
57
57
 
58
58
  - [ ] `specs/security/REVIEW.md` exists and is fresh (matches current branch diff)
59
- - [ ] No unresolved HIGH findings with confidence ≥ 8 (or all documented in `specs/security/EXCEPTIONS.md` with sign-off rationale)
60
59
 
61
- If REVIEW.md is missing or stale → run `security-review` inline. Findings block the merge unless documented in EXCEPTIONS.md.
60
+ ### 2b. Audit-code & Traceability gates (HARD GATES — Issue #182)
62
61
 
63
- ### 2b. Traceability gate
64
-
65
- 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.
62
+ - [ ] Run `bash scripts/lib/assert-epic-gate.sh release` (asserts `specs/AUDIT_LATEST.md` passed; blocks release on failure).
63
+ - [ ] No unresolved HIGH security findings with confidence ≥ 8 (or documented in `specs/security/EXCEPTIONS.md`).
64
+ - [ ] Run `gate-trace`. FAIL blocks merge; CONCERNS requires explicit override in `specs/state.yaml`. WAIVED if no matrix available.
66
65
 
67
66
  > **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.
68
67
 
@@ -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
 
@@ -62,7 +62,8 @@ Review answers "is the code good?"; Verify answers "does the built thing do what
62
62
  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.
63
63
  5a2. **Completeness critic (e45s05)** — `bash scripts/lib/completeness-critic.sh`. **BLOCKER** aborts merge gate; WARNING → gaps loop; FILLED = evidence only.
64
64
 
65
- 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.
65
+ 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.
66
+ 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`.
66
67
  6. **Step-by-step UAT** (skip if P2/P3) — one user-observable action at a time.
67
68
  7. **Gaps loop** — failures → log → `plan-work` → re-verify. Unaddressed HIGH findings from step 5 feed into this loop alongside other quality gaps.
68
69
 
@@ -66,7 +66,7 @@ Orchestrates the **build** flow for a single epic: survey → plan tasks → kic
66
66
  After step 5 (verify-work) completes successfully, step 6 runs `audit-code` automatically in `--gate` mode:
67
67
 
68
68
  1. **Run audit:** Invoke `audit-code --gate` on the complete diff for this story.
69
- 2. **Pass (exit 0):** All checklist sections pass → advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
69
+ 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`.
70
70
  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.
71
71
  4. **Audit artifact:** Full audit report saved to `specs/verifications/AUDIT-<epic>-<story>.md` regardless of pass/fail, for reviewer traceability.
72
72
  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.
@@ -36,6 +36,7 @@ description: "Reviews working-tree changes, then drafts a Conventional Commits t
36
36
 
37
37
  ## Checklist before finalizing
38
38
 
39
+ - [ ] **Audit pass confirmed (HARD GATE — Issue #182):** In active epic flow, `bash scripts/lib/assert-epic-gate.sh commit` passes.
39
40
  - [ ] Type matches the **dominant** user-visible outcome (`feat` vs `fix` vs `perf`, etc.).
40
41
  - [ ] **Scope** is a short noun in parentheses if it helps (e.g. `fix(api): …`).
41
42
  - [ ] Breaking changes are explicit (`!` and/or `BREAKING CHANGE:` in the body/footer).
@@ -56,13 +56,12 @@ git log main...HEAD --format="%B" | grep -qiE 'co[- ]authored[- ]by' && echo "
56
56
  ### 2a. Security gate
57
57
 
58
58
  - [ ] `specs/security/REVIEW.md` exists and is fresh (matches current branch diff)
59
- - [ ] No unresolved HIGH findings with confidence ≥ 8 (or all documented in `specs/security/EXCEPTIONS.md` with sign-off rationale)
60
59
 
61
- If REVIEW.md is missing or stale → run `security-review` inline. Findings block the merge unless documented in EXCEPTIONS.md.
60
+ ### 2b. Audit-code & Traceability gates (HARD GATES — Issue #182)
62
61
 
63
- ### 2b. Traceability gate
64
-
65
- 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.
62
+ - [ ] Run `bash scripts/lib/assert-epic-gate.sh release` (asserts `specs/AUDIT_LATEST.md` passed; blocks release on failure).
63
+ - [ ] No unresolved HIGH security findings with confidence ≥ 8 (or documented in `specs/security/EXCEPTIONS.md`).
64
+ - [ ] Run `gate-trace`. FAIL blocks merge; CONCERNS requires explicit override in `specs/state.yaml`. WAIVED if no matrix available.
66
65
 
67
66
  > **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.
68
67
 
@@ -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
 
@@ -62,7 +62,8 @@ Review answers "is the code good?"; Verify answers "does the built thing do what
62
62
  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.
63
63
  5a2. **Completeness critic (e45s05)** — `bash scripts/lib/completeness-critic.sh`. **BLOCKER** aborts merge gate; WARNING → gaps loop; FILLED = evidence only.
64
64
 
65
- 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.
65
+ 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.
66
+ 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`.
66
67
  6. **Step-by-step UAT** (skip if P2/P3) — one user-observable action at a time.
67
68
  7. **Gaps loop** — failures → log → `plan-work` → re-verify. Unaddressed HIGH findings from step 5 feed into this loop alongside other quality gaps.
68
69
 
@@ -66,7 +66,7 @@ Orchestrates the **build** flow for a single epic: survey → plan tasks → kic
66
66
  After step 5 (verify-work) completes successfully, step 6 runs `audit-code` automatically in `--gate` mode:
67
67
 
68
68
  1. **Run audit:** Invoke `audit-code --gate` on the complete diff for this story.
69
- 2. **Pass (exit 0):** All checklist sections pass → advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
69
+ 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`.
70
70
  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.
71
71
  4. **Audit artifact:** Full audit report saved to `specs/verifications/AUDIT-<epic>-<story>.md` regardless of pass/fail, for reviewer traceability.
72
72
  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.
@@ -36,6 +36,7 @@ description: "Reviews working-tree changes, then drafts a Conventional Commits t
36
36
 
37
37
  ## Checklist before finalizing
38
38
 
39
+ - [ ] **Audit pass confirmed (HARD GATE — Issue #182):** In active epic flow, `bash scripts/lib/assert-epic-gate.sh commit` passes.
39
40
  - [ ] Type matches the **dominant** user-visible outcome (`feat` vs `fix` vs `perf`, etc.).
40
41
  - [ ] **Scope** is a short noun in parentheses if it helps (e.g. `fix(api): …`).
41
42
  - [ ] Breaking changes are explicit (`!` and/or `BREAKING CHANGE:` in the body/footer).
@@ -56,13 +56,12 @@ git log main...HEAD --format="%B" | grep -qiE 'co[- ]authored[- ]by' && echo "
56
56
  ### 2a. Security gate
57
57
 
58
58
  - [ ] `specs/security/REVIEW.md` exists and is fresh (matches current branch diff)
59
- - [ ] No unresolved HIGH findings with confidence ≥ 8 (or all documented in `specs/security/EXCEPTIONS.md` with sign-off rationale)
60
59
 
61
- If REVIEW.md is missing or stale → run `security-review` inline. Findings block the merge unless documented in EXCEPTIONS.md.
60
+ ### 2b. Audit-code & Traceability gates (HARD GATES — Issue #182)
62
61
 
63
- ### 2b. Traceability gate
64
-
65
- 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.
62
+ - [ ] Run `bash scripts/lib/assert-epic-gate.sh release` (asserts `specs/AUDIT_LATEST.md` passed; blocks release on failure).
63
+ - [ ] No unresolved HIGH security findings with confidence ≥ 8 (or documented in `specs/security/EXCEPTIONS.md`).
64
+ - [ ] Run `gate-trace`. FAIL blocks merge; CONCERNS requires explicit override in `specs/state.yaml`. WAIVED if no matrix available.
66
65
 
67
66
  > **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.
68
67
 
@@ -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
 
@@ -62,7 +62,8 @@ Review answers "is the code good?"; Verify answers "does the built thing do what
62
62
  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.
63
63
  5a2. **Completeness critic (e45s05)** — `bash scripts/lib/completeness-critic.sh`. **BLOCKER** aborts merge gate; WARNING → gaps loop; FILLED = evidence only.
64
64
 
65
- 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.
65
+ 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.
66
+ 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`.
66
67
  6. **Step-by-step UAT** (skip if P2/P3) — one user-observable action at a time.
67
68
  7. **Gaps loop** — failures → log → `plan-work` → re-verify. Unaddressed HIGH findings from step 5 feed into this loop alongside other quality gaps.
68
69
 
@@ -66,7 +66,7 @@ Orchestrates the **build** flow for a single epic: survey → plan tasks → kic
66
66
  After step 5 (verify-work) completes successfully, step 6 runs `audit-code` automatically in `--gate` mode:
67
67
 
68
68
  1. **Run audit:** Invoke `audit-code --gate` on the complete diff for this story.
69
- 2. **Pass (exit 0):** All checklist sections pass → advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
69
+ 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`.
70
70
  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.
71
71
  4. **Audit artifact:** Full audit report saved to `specs/verifications/AUDIT-<epic>-<story>.md` regardless of pass/fail, for reviewer traceability.
72
72
  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.
@@ -36,6 +36,7 @@ description: "Reviews working-tree changes, then drafts a Conventional Commits t
36
36
 
37
37
  ## Checklist before finalizing
38
38
 
39
+ - [ ] **Audit pass confirmed (HARD GATE — Issue #182):** In active epic flow, `bash scripts/lib/assert-epic-gate.sh commit` passes.
39
40
  - [ ] Type matches the **dominant** user-visible outcome (`feat` vs `fix` vs `perf`, etc.).
40
41
  - [ ] **Scope** is a short noun in parentheses if it helps (e.g. `fix(api): …`).
41
42
  - [ ] Breaking changes are explicit (`!` and/or `BREAKING CHANGE:` in the body/footer).
@@ -56,13 +56,12 @@ git log main...HEAD --format="%B" | grep -qiE 'co[- ]authored[- ]by' && echo "
56
56
  ### 2a. Security gate
57
57
 
58
58
  - [ ] `specs/security/REVIEW.md` exists and is fresh (matches current branch diff)
59
- - [ ] No unresolved HIGH findings with confidence ≥ 8 (or all documented in `specs/security/EXCEPTIONS.md` with sign-off rationale)
60
59
 
61
- If REVIEW.md is missing or stale → run `security-review` inline. Findings block the merge unless documented in EXCEPTIONS.md.
60
+ ### 2b. Audit-code & Traceability gates (HARD GATES — Issue #182)
62
61
 
63
- ### 2b. Traceability gate
64
-
65
- 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.
62
+ - [ ] Run `bash scripts/lib/assert-epic-gate.sh release` (asserts `specs/AUDIT_LATEST.md` passed; blocks release on failure).
63
+ - [ ] No unresolved HIGH security findings with confidence ≥ 8 (or documented in `specs/security/EXCEPTIONS.md`).
64
+ - [ ] Run `gate-trace`. FAIL blocks merge; CONCERNS requires explicit override in `specs/state.yaml`. WAIVED if no matrix available.
66
65
 
67
66
  > **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.
68
67
 
@@ -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
 
@@ -62,7 +62,8 @@ Review answers "is the code good?"; Verify answers "does the built thing do what
62
62
  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.
63
63
  5a2. **Completeness critic (e45s05)** — `bash scripts/lib/completeness-critic.sh`. **BLOCKER** aborts merge gate; WARNING → gaps loop; FILLED = evidence only.
64
64
 
65
- 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.
65
+ 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.
66
+ 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`.
66
67
  6. **Step-by-step UAT** (skip if P2/P3) — one user-observable action at a time.
67
68
  7. **Gaps loop** — failures → log → `plan-work` → re-verify. Unaddressed HIGH findings from step 5 feed into this loop alongside other quality gaps.
68
69
 
@@ -66,7 +66,7 @@ Orchestrates the **build** flow for a single epic: survey → plan tasks → kic
66
66
  After step 5 (verify-work) completes successfully, step 6 runs `audit-code` automatically in `--gate` mode:
67
67
 
68
68
  1. **Run audit:** Invoke `audit-code --gate` on the complete diff for this story.
69
- 2. **Pass (exit 0):** All checklist sections pass → advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
69
+ 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`.
70
70
  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.
71
71
  4. **Audit artifact:** Full audit report saved to `specs/verifications/AUDIT-<epic>-<story>.md` regardless of pass/fail, for reviewer traceability.
72
72
  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.
@@ -36,6 +36,7 @@ description: "Reviews working-tree changes, then drafts a Conventional Commits t
36
36
 
37
37
  ## Checklist before finalizing
38
38
 
39
+ - [ ] **Audit pass confirmed (HARD GATE — Issue #182):** In active epic flow, `bash scripts/lib/assert-epic-gate.sh commit` passes.
39
40
  - [ ] Type matches the **dominant** user-visible outcome (`feat` vs `fix` vs `perf`, etc.).
40
41
  - [ ] **Scope** is a short noun in parentheses if it helps (e.g. `fix(api): …`).
41
42
  - [ ] Breaking changes are explicit (`!` and/or `BREAKING CHANGE:` in the body/footer).
@@ -56,13 +56,12 @@ git log main...HEAD --format="%B" | grep -qiE 'co[- ]authored[- ]by' && echo "
56
56
  ### 2a. Security gate
57
57
 
58
58
  - [ ] `specs/security/REVIEW.md` exists and is fresh (matches current branch diff)
59
- - [ ] No unresolved HIGH findings with confidence ≥ 8 (or all documented in `specs/security/EXCEPTIONS.md` with sign-off rationale)
60
59
 
61
- If REVIEW.md is missing or stale → run `security-review` inline. Findings block the merge unless documented in EXCEPTIONS.md.
60
+ ### 2b. Audit-code & Traceability gates (HARD GATES — Issue #182)
62
61
 
63
- ### 2b. Traceability gate
64
-
65
- 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.
62
+ - [ ] Run `bash scripts/lib/assert-epic-gate.sh release` (asserts `specs/AUDIT_LATEST.md` passed; blocks release on failure).
63
+ - [ ] No unresolved HIGH security findings with confidence ≥ 8 (or documented in `specs/security/EXCEPTIONS.md`).
64
+ - [ ] Run `gate-trace`. FAIL blocks merge; CONCERNS requires explicit override in `specs/state.yaml`. WAIVED if no matrix available.
66
65
 
67
66
  > **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.
68
67
 
@@ -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
 
@@ -62,7 +62,8 @@ Review answers "is the code good?"; Verify answers "does the built thing do what
62
62
  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.
63
63
  5a2. **Completeness critic (e45s05)** — `bash scripts/lib/completeness-critic.sh`. **BLOCKER** aborts merge gate; WARNING → gaps loop; FILLED = evidence only.
64
64
 
65
- 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.
65
+ 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.
66
+ 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`.
66
67
  6. **Step-by-step UAT** (skip if P2/P3) — one user-observable action at a time.
67
68
  7. **Gaps loop** — failures → log → `plan-work` → re-verify. Unaddressed HIGH findings from step 5 feed into this loop alongside other quality gaps.
68
69
 
@@ -65,7 +65,7 @@ Orchestrates the **build** flow for a single epic: survey → plan tasks → kic
65
65
  After step 5 (verify-work) completes successfully, step 6 runs `audit-code` automatically in `--gate` mode:
66
66
 
67
67
  1. **Run audit:** Invoke `audit-code --gate` on the complete diff for this story.
68
- 2. **Pass (exit 0):** All checklist sections pass → advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
68
+ 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`.
69
69
  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.
70
70
  4. **Audit artifact:** Full audit report saved to `specs/verifications/AUDIT-<epic>-<story>.md` regardless of pass/fail, for reviewer traceability.
71
71
  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.
@@ -35,6 +35,7 @@ alwaysApply: false
35
35
 
36
36
  ## Checklist before finalizing
37
37
 
38
+ - [ ] **Audit pass confirmed (HARD GATE — Issue #182):** In active epic flow, `bash scripts/lib/assert-epic-gate.sh commit` passes.
38
39
  - [ ] Type matches the **dominant** user-visible outcome (`feat` vs `fix` vs `perf`, etc.).
39
40
  - [ ] **Scope** is a short noun in parentheses if it helps (e.g. `fix(api): …`).
40
41
  - [ ] Breaking changes are explicit (`!` and/or `BREAKING CHANGE:` in the body/footer).
@@ -55,13 +55,12 @@ git log main...HEAD --format="%B" | grep -qiE 'co[- ]authored[- ]by' && echo "
55
55
  ### 2a. Security gate
56
56
 
57
57
  - [ ] `specs/security/REVIEW.md` exists and is fresh (matches current branch diff)
58
- - [ ] No unresolved HIGH findings with confidence ≥ 8 (or all documented in `specs/security/EXCEPTIONS.md` with sign-off rationale)
59
58
 
60
- If REVIEW.md is missing or stale → run `security-review` inline. Findings block the merge unless documented in EXCEPTIONS.md.
59
+ ### 2b. Audit-code & Traceability gates (HARD GATES — Issue #182)
61
60
 
62
- ### 2b. Traceability gate
63
-
64
- 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.
61
+ - [ ] Run `bash scripts/lib/assert-epic-gate.sh release` (asserts `specs/AUDIT_LATEST.md` passed; blocks release on failure).
62
+ - [ ] No unresolved HIGH security findings with confidence ≥ 8 (or documented in `specs/security/EXCEPTIONS.md`).
63
+ - [ ] Run `gate-trace`. FAIL blocks merge; CONCERNS requires explicit override in `specs/state.yaml`. WAIVED if no matrix available.
65
64
 
66
65
  > **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.
67
66
 
@@ -61,7 +61,12 @@ if written:
61
61
  - `plan-release` — sequence epics by WSJF
62
62
  - `slice-tasks` — cut vertical slices
63
63
 
64
- 4. **Update status** — On successful completion, set `status: done` for that workflow key in `planning-status.yaml`.
64
+ 4. **Mechanical artifact assertion before status update (HARD GATE — Issue #183):**
65
+ Before marking any workflow key `status: done`, run:
66
+ ```bash
67
+ bash scripts/lib/assert-planning-artifacts.sh <workflow-key>
68
+ ```
69
+ 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`.
65
70
 
66
71
  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`.
67
72
 
@@ -61,7 +61,8 @@ Review answers "is the code good?"; Verify answers "does the built thing do what
61
61
  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.
62
62
  5a2. **Completeness critic (e45s05)** — `bash scripts/lib/completeness-critic.sh`. **BLOCKER** aborts merge gate; WARNING → gaps loop; FILLED = evidence only.
63
63
 
64
- 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.
64
+ 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.
65
+ 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`.
65
66
  6. **Step-by-step UAT** (skip if P2/P3) — one user-observable action at a time.
66
67
  7. **Gaps loop** — failures → log → `plan-work` → re-verify. Unaddressed HIGH findings from step 5 feed into this loop alongside other quality gaps.
67
68
 
@@ -65,7 +65,7 @@ Orchestrates the **build** flow for a single epic: survey → plan tasks → kic
65
65
  After step 5 (verify-work) completes successfully, step 6 runs `audit-code` automatically in `--gate` mode:
66
66
 
67
67
  1. **Run audit:** Invoke `audit-code --gate` on the complete diff for this story.
68
- 2. **Pass (exit 0):** All checklist sections pass → advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
68
+ 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`.
69
69
  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.
70
70
  4. **Audit artifact:** Full audit report saved to `specs/verifications/AUDIT-<epic>-<story>.md` regardless of pass/fail, for reviewer traceability.
71
71
  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.
@@ -35,6 +35,7 @@ description: "Reviews working-tree changes, then drafts a Conventional Commits t
35
35
 
36
36
  ## Checklist before finalizing
37
37
 
38
+ - [ ] **Audit pass confirmed (HARD GATE — Issue #182):** In active epic flow, `bash scripts/lib/assert-epic-gate.sh commit` passes.
38
39
  - [ ] Type matches the **dominant** user-visible outcome (`feat` vs `fix` vs `perf`, etc.).
39
40
  - [ ] **Scope** is a short noun in parentheses if it helps (e.g. `fix(api): …`).
40
41
  - [ ] Breaking changes are explicit (`!` and/or `BREAKING CHANGE:` in the body/footer).
@@ -55,13 +55,12 @@ git log main...HEAD --format="%B" | grep -qiE 'co[- ]authored[- ]by' && echo "
55
55
  ### 2a. Security gate
56
56
 
57
57
  - [ ] `specs/security/REVIEW.md` exists and is fresh (matches current branch diff)
58
- - [ ] No unresolved HIGH findings with confidence ≥ 8 (or all documented in `specs/security/EXCEPTIONS.md` with sign-off rationale)
59
58
 
60
- If REVIEW.md is missing or stale → run `security-review` inline. Findings block the merge unless documented in EXCEPTIONS.md.
59
+ ### 2b. Audit-code & Traceability gates (HARD GATES — Issue #182)
61
60
 
62
- ### 2b. Traceability gate
63
-
64
- 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.
61
+ - [ ] Run `bash scripts/lib/assert-epic-gate.sh release` (asserts `specs/AUDIT_LATEST.md` passed; blocks release on failure).
62
+ - [ ] No unresolved HIGH security findings with confidence ≥ 8 (or documented in `specs/security/EXCEPTIONS.md`).
63
+ - [ ] Run `gate-trace`. FAIL blocks merge; CONCERNS requires explicit override in `specs/state.yaml`. WAIVED if no matrix available.
65
64
 
66
65
  > **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.
67
66
 
@@ -61,7 +61,12 @@ if written:
61
61
  - `plan-release` — sequence epics by WSJF
62
62
  - `slice-tasks` — cut vertical slices
63
63
 
64
- 4. **Update status** — On successful completion, set `status: done` for that workflow key in `planning-status.yaml`.
64
+ 4. **Mechanical artifact assertion before status update (HARD GATE — Issue #183):**
65
+ Before marking any workflow key `status: done`, run:
66
+ ```bash
67
+ bash scripts/lib/assert-planning-artifacts.sh <workflow-key>
68
+ ```
69
+ 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`.
65
70
 
66
71
  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`.
67
72
 
@@ -61,7 +61,8 @@ Review answers "is the code good?"; Verify answers "does the built thing do what
61
61
  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.
62
62
  5a2. **Completeness critic (e45s05)** — `bash scripts/lib/completeness-critic.sh`. **BLOCKER** aborts merge gate; WARNING → gaps loop; FILLED = evidence only.
63
63
 
64
- 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.
64
+ 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.
65
+ 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`.
65
66
  6. **Step-by-step UAT** (skip if P2/P3) — one user-observable action at a time.
66
67
  7. **Gaps loop** — failures → log → `plan-work` → re-verify. Unaddressed HIGH findings from step 5 feed into this loop alongside other quality gaps.
67
68
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bigpowers",
3
- "version": "2.90.1",
3
+ "version": "2.91.0",
4
4
  "description": "80 skills — 73 agent skills synthesizing 17 years of software engineering discipline into a prescriptive methodology for solo developers",
5
5
  "keywords": [
6
6
  "gemini-extension"
@@ -67,7 +67,7 @@ Orchestrates the **build** flow for a single epic: survey → plan tasks → kic
67
67
  After step 5 (verify-work) completes successfully, step 6 runs `audit-code` automatically in `--gate` mode:
68
68
 
69
69
  1. **Run audit:** Invoke `audit-code --gate` on the complete diff for this story.
70
- 2. **Pass (exit 0):** All checklist sections pass → advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
70
+ 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`.
71
71
  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.
72
72
  4. **Audit artifact:** Full audit report saved to `specs/verifications/AUDIT-<epic>-<story>.md` regardless of pass/fail, for reviewer traceability.
73
73
  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 @@ disable-model-invocation: true
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).
@@ -57,13 +57,12 @@ git log main...HEAD --format="%B" | grep -qiE 'co[- ]authored[- ]by' && echo "
57
57
  ### 2a. Security gate
58
58
 
59
59
  - [ ] `specs/security/REVIEW.md` exists and is fresh (matches current branch diff)
60
- - [ ] No unresolved HIGH findings with confidence ≥ 8 (or all documented in `specs/security/EXCEPTIONS.md` with sign-off rationale)
61
60
 
62
- If REVIEW.md is missing or stale → run `security-review` inline. Findings block the merge unless documented in EXCEPTIONS.md.
61
+ ### 2b. Audit-code & Traceability gates (HARD GATES — Issue #182)
63
62
 
64
- ### 2b. Traceability gate
65
-
66
- 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.
63
+ - [ ] Run `bash scripts/lib/assert-epic-gate.sh release` (asserts `specs/AUDIT_LATEST.md` passed; blocks release on failure).
64
+ - [ ] No unresolved HIGH security findings with confidence ≥ 8 (or documented in `specs/security/EXCEPTIONS.md`).
65
+ - [ ] Run `gate-trace`. FAIL blocks merge; CONCERNS requires explicit override in `specs/state.yaml`. WAIVED if no matrix available.
67
66
 
68
67
  > **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.
69
68
 
@@ -63,7 +63,12 @@ if written:
63
63
  - `plan-release` — sequence epics by WSJF
64
64
  - `slice-tasks` — cut vertical slices
65
65
 
66
- 4. **Update status** — On successful completion, set `status: done` for that workflow key in `planning-status.yaml`.
66
+ 4. **Mechanical artifact assertion before status update (HARD GATE — Issue #183):**
67
+ Before marking any workflow key `status: done`, run:
68
+ ```bash
69
+ bash scripts/lib/assert-planning-artifacts.sh <workflow-key>
70
+ ```
71
+ 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`.
67
72
 
68
73
  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`.
69
74
 
@@ -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
 
@@ -66,7 +66,7 @@ Orchestrates the **build** flow for a single epic: survey → plan tasks → kic
66
66
  After step 5 (verify-work) completes successfully, step 6 runs `audit-code` automatically in `--gate` mode:
67
67
 
68
68
  1. **Run audit:** Invoke `audit-code --gate` on the complete diff for this story.
69
- 2. **Pass (exit 0):** All checklist sections pass → advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
69
+ 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`.
70
70
  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.
71
71
  4. **Audit artifact:** Full audit report saved to `specs/verifications/AUDIT-<epic>-<story>.md` regardless of pass/fail, for reviewer traceability.
72
72
  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.